a26e35a1b4453a2f9378c068f014ca90c75dc80b
[external/binutils.git] / gdb / ChangeLog
1 2018-09-18  Tom Tromey  <tom@tromey.com>
2
3         * compile/compile-object-run.c (do_module_cleanup): Use delete.
4         * compile/compile-object-load.c (struct munmap_list): Move to
5         header file.
6         (munmap_list::add): Rename from munmap_list_add; rewrite.
7         (munmap_list::~munmap_list): Rename from munmap_list_free.
8         (munmap_listp_free_cleanup): Remove.
9         (compile_object_load): Update.
10         * compile/compile-object-load.h (struct munmap_list): Move from
11         compile-object-load.c.  Rewrite.
12
13 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
14
15         * aarch64-tdep.c (pass_in_v): Use register size.
16         (aarch64_extract_return_value): Likewise.
17         (aarch64_store_return_value): Likewise.
18
19 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
20
21         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
22         rlim_t.
23
24 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
25
26         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
27         Fix short help line.
28
29 2018-09-17  Tom Tromey  <tom@tromey.com>
30
31         PR python/20445:
32         * configure: Rebuild.
33         * configure.ac: Conditionally use -DNDEBUG for Python.
34
35 2018-09-17  Tom Tromey  <tom@tromey.com>
36
37         * configure: Rebuild.
38         * configure.ac: Use gmp as a library dependency when checking for
39         mpfr.
40
41 2018-09-17  Pedro Alves  <palves@redhat.com>
42
43         * python/py-inferior.c (find_inferior_object): Delete.
44
45 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
46
47         * compile/compile-cplus-types.c
48         (compile_cplus_instance::enter_scope): Don't use new_scope after
49         std::move.
50
51 2018-09-17  Tom Tromey  <tom@tromey.com>
52
53         * common/pathstuff.c (get_standard_cache_dir): Use
54         ~/Library/Caches on macOS.
55         * common/pathstuff.h (get_standard_cache_dir): Update comment.
56
57 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
58
59         PR python/23669
60         * breakpoint.c (commands_cmd_element): New.
61         (_initialize_breakpoint): Assign commands_cmd_element.
62         * breakpoint.h (commands_cmd_element): New.
63         * cli/cli-script.c (while_cmd_element, if_command,
64         define_cmd_element): New.
65         (command_name_equals): Remove.
66         (process_next_line): Compare commands by pointer, not by name.
67         (_initialize_cli_script): Assign the various cmd_list_element
68         variables.
69         * compile/compile.c (compile_cmd_element): New.
70         (_initialize_compile): Assign compile_cmd_element.
71         * compile/compile.h (compile_cmd_element): New.
72         * guile/guile.c (guile_cmd_element): New.
73         (install_gdb_commands): Assign guile_cmd_element.
74         * guile/guile.h (guile_cmd_element): New.
75         * python/python.c (python_cmd_element): New.
76         (_initialize_python): Assign python_cmd_element.
77         * python/python.h (python_cmd_element): New.
78         * tracepoint.c (while_stepping_cmd_element): New.
79         (_initialize_tracepoint): Assign while_stepping_cmd_element.
80         * tracepoint.h (while_stepping_cmd_element): New.
81
82 2018-09-17  Tom Tromey  <tom@tromey.com>
83
84         * infrun.c (save_infcall_suspend_state): Return
85         infcall_suspend_state_up.
86         (save_infcall_control_state): Return infcall_control_state_up.
87         * inferior.h (save_infcall_suspend_state)
88         (save_infcall_control_state): Declare later.  Return unique
89         pointers.
90
91 2018-09-17  Tom Tromey  <tom@tromey.com>
92
93         * infrun.c (struct stop_context): Declare constructor,
94         destructor, "changed" method.
95         (stop_context::stop_context): Rename from save_stop_context.
96         (stop_context::~stop_context): Rename from
97         release_stop_context_cleanup.
98         (normal_stop): Update.
99         (stop_context::changed): Rename from stop_context_changed.  Return
100         bool.
101
102 2018-09-17  Tom Tromey  <tom@tromey.com>
103
104         * inferior.h (struct infcall_suspend_state_deleter): New.
105         (infcall_suspend_state_up): New typedef.
106         (struct infcall_control_state_deleter): New.
107         (infcall_control_state_up): New typedef.
108         (make_cleanup_restore_infcall_suspend_state)
109         (make_cleanup_restore_infcall_control_state): Don't declare.
110         * infcall.c (call_function_by_hand_dummy): Update.
111         * infrun.c (do_restore_infcall_suspend_state_cleanup)
112         (make_cleanup_restore_infcall_suspend_state): Remove.
113         (do_restore_infcall_control_state_cleanup)
114         (make_cleanup_restore_infcall_control_state): Remove.
115
116 2018-09-17  Tom Tromey  <tom@tromey.com>
117
118         * gdbthread.h (struct thread_control_state): Add initializer.
119         (class thread_info) <control>: Remove initializer.
120         * inferior.h (struct inferior_control_state): Add initializer.
121         (class inferior) <control>: Remove initializer.
122         (exit_inferior_1): Update.
123         * infrun.c (struct infcall_control_state): Add constructors.
124         (save_infcall_control_state): Use new.
125         (restore_infcall_control_state, discard_infcall_control_state):
126         Use delete.
127
128 2018-09-17  Tom Tromey  <tom@tromey.com>
129
130         * infrun.c (struct infcall_suspend_state) <registers>: Now a
131         unique_ptr.
132         <siginfo_data>: Now a unique_xmalloc_ptr.
133         (save_infcall_suspend_state, restore_infcall_suspend_state)
134         (discard_infcall_suspend_state)
135         (get_infcall_suspend_state_regcache): Update.
136
137 2018-09-17  Tom Tromey  <tom@tromey.com>
138
139         * gdbthread.h (struct thread_suspend_state): Add initializers.
140         (class thread_info) <suspend>: Remove initializer.
141         * infrun.c (struct infcall_suspend_state): Add initializers.
142         (save_infcall_suspend_state): Use new.
143         (discard_infcall_suspend_state): Use delete.
144
145 2018-09-16  Tom Tromey  <tom@tromey.com>
146
147         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
148         Remove.
149         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
150         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
151         (py_varobj_iter_new): Likewise.
152         (py_varobj_get_iterator): Use gdbpy_ref.
153
154 2018-09-16  Tom Tromey  <tom@tromey.com>
155
156         * python/py-threadevent.c (py_get_event_thread): Simplify.
157         * python/py-inferior.c (infpy_thread_from_thread_handle):
158         Return immediately after calling thread_to_thread_object.  Use
159         Py_RETURN_NONE.
160         (thread_to_thread_object): Set the exception on a NULL return.
161
162 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
163
164         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
165
166 2018-09-16  Tom Tromey  <tom@tromey.com>
167
168         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
169         Remove.
170
171 2018-09-16  Tom Tromey  <tom@tromey.com>
172
173         * python/python-internal.h (thread_to_thread_object): Change
174         return type.
175         * python/py-inferior.c (thread_to_thread_object): Return a new
176         reference.
177         (infpy_thread_from_thread_handle): Update.
178         * python/py-infthread.c (gdbpy_selected_thread): Update.
179         * python/py-stopevent.c (create_stop_event_object): Update.
180         * python/py-threadevent.c (py_get_event_thread): Return a new
181         reference.
182         (py_get_event_thread): Update.
183         * python/py-event.h (py_get_event_thread): Change return type.
184         * python/py-continueevent.c (create_continue_event_object):
185         Update.
186
187 2018-09-16  Tom Tromey  <tom@tromey.com>
188
189         * python/py-progspace.c (pspy_get_objfiles): Update.
190         * python/python-internal.h (objfile_to_objfile_object): Change
191         return type.
192         * python/py-newobjfileevent.c (create_new_objfile_event_object):
193         Update.
194         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
195         Update.
196         * python/python.c (gdbpy_get_current_objfile): Update.
197         (gdbpy_objfiles): Update.
198         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
199         Update.
200         (objfile_to_objfile_object): Return a new reference.
201         * python/py-symtab.c (stpy_get_objfile): Update.
202         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
203         Update.
204
205 2018-09-16  Tom Tromey  <tom@tromey.com>
206
207         * python/py-inferior.c (infpy_get_progspace): Update.
208         * python/python-internal.h (pspace_to_pspace_object): Change
209         return type.
210         * python/py-newobjfileevent.c
211         (create_clear_objfiles_event_object): Update.
212         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
213         Update.
214         * python/python.c (gdbpy_get_current_progspace): Update.
215         (gdbpy_progspaces): Update.
216         * python/py-progspace.c (pspace_to_pspace_object): Return a new
217         reference.
218         * python/py-objfile.c (objfpy_get_progspace): Update.
219         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
220         Update.
221
222 2018-09-16  Tom Tromey  <tom@tromey.com>
223
224         * python/lib/gdb/__init__.py (current_progspace, objfiles)
225         (solib_name, block_for_pc, find_pc_line): New functions.
226         (execute_unwinders): Update.
227         * python/py-block.c (gdbpy_block_for_pc): Remove.
228         * python/py-inferior.c (infpy_get_progspace): New function.
229         (inferior_object_getset) <progspace>: Add.
230         * python/py-progspace.c (pspy_objfiles): Rewrite.
231         (pspy_solib_name, pspy_block_for_pc)
232         (pspy_find_pc_line, pspy_is_valid): New functions.
233         (progspace_object_methods): Add entries for solib_name,
234         block_for_pc, find_pc_line, is_valid.
235         * python/python-internal.h (gdbpy_block_for_pc)
236         (build_objfiles_list): Don't declare.
237         * python/python.c: Don't include solib.h.
238         (gdbpy_solib_name, gdbpy_find_pc_line)
239         (gdbpy_get_current_progspace, build_objfiles_list)
240         (gdbpy_objfiles): Remove.
241         (GdbMethods) <current_progspace, objfiles, block_for_pc,
242         solib_name, find_pc_line>: Remove entries.
243
244 2018-09-16  Tom Tromey  <tom@tromey.com>
245
246         * top.c (new_ui_command): Use GNU style for metasyntactic
247         variables.
248         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
249         variables.
250         * maint.c (maintenance_translate_address): Remove "<>" around
251         text.
252         * interps.c (interpreter_exec_cmd): Use GNU style for
253         metasyntactic variables.
254         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
255         metasyntactic variables.
256         * tracepoint.c (tfind_range_command): Use GNU style for
257         metasyntactic variables.
258         (tfind_outside_command): Likewise.
259         (_initialize_tracepoint): Likewise.
260         * remote.c (extended_remote_target::create_inferior): Use GNU
261         style for metasyntactic variables.
262         * sparc64-tdep.c (adi_examine_command): Use GNU style for
263         metasyntactic variables.
264         (adi_assign_command): Likewise.
265
266 2018-09-16  Tom Tromey  <tom@tromey.com>
267
268         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
269         metasyntactic variables.  Print message if no disassembler options
270         are available.
271
272 2018-09-15  Tom Tromey  <tom@tromey.com>
273
274         * infcmd.c (get_inferior_args): Return const char *.
275         * inferior.h (get_inferior_args): Return type now const.
276         * linux-tdep.c (linux_fill_prpsinfo): Update.
277         * procfs.c (procfs_target::make_corefile_notes): Update.
278
279 2018-09-07  Tom Tromey  <tom@tromey.com>
280
281         * python/python.c (execute_gdb_command): Call bpstat_do_actions
282         inside the TRY.
283
284 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
285
286         * nios2-tdep.c (nios2_type_align): New.
287         (nios2_gdb_arch_init): Install type_align hook.
288
289 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
290
291         * eval.c (fake_method::fake_method): Call xzalloc directly for a
292         type that is neither object file owned, nor gdbarch owned.
293         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
294         gdbarch is non-NULL.
295         (alloc_type_instance): Allocate non-objfile owned types on the
296         gdbarch obstack.
297         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
298         using TYPE_ALLOC to ensure memory is allocated on the correct
299         obstack.
300         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
301         obstack, or the gdbarch obstack.
302         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
303
304 2018-09-14  Tom Tromey  <tom@tromey.com>
305
306         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
307         block.
308
309 2018-09-14  Tom Tromey  <tom@tromey.com>
310
311         * nat/fork-inferior.c (get_startup_shell): Remove "static".
312
313 2018-09-13  Tom Tromey  <tom@tromey.com>
314
315         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
316         static.
317
318 2018-09-13  Tom Tromey  <tom@tromey.com>
319
320         * exec.c (try_open_exec_file): Use std::string.
321
322 2018-09-13  Tom Tromey  <tom@tromey.com>
323
324         * utils.h (gdb_bfd_errmsg): Return std::string.
325         * exec.c (exec_file_attach): Update.
326         * compile/compile-object-load.c (compile_object_load): Update.
327         * utils.c (gdb_bfd_errmsg): Return std::string.
328
329 2018-09-13  Tom Tromey  <tom@tromey.com>
330
331         * procfs.c (struct procinfo_deleter): New.
332         (procinfo_up): New typedef.
333         (do_destroy_procinfo_cleanup): Remove.
334         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
335
336 2018-09-13  Tom Tromey  <tom@tromey.com>
337
338         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
339
340 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
341 2018-09-13  Tom Tromey  <tom@tromey.com>
342
343         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
344         (pspy_get_objfiles): New function.
345         (progspace_object_methods): New.
346         (pspace_object_type): Add tp_methods callback.
347         * python/python-internal.h (build_objfiles_list): New
348         declaration.
349         * python/python.c (build_objfiles_list): New function.
350         (gdbpy_objfiles): Implement using build_objfiles_list.
351         * NEWS: Mention the Progspace.objfiles method.
352
353 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
354
355         * python/py-inferior.c (infpy_get_progspace): New function.
356         (inferior_object_getset): Add progspace property.
357         * NEWS: Mention the new property.
358
359 2018-09-13  Tom Tromey  <tom@tromey.com>
360
361         PR rust/23650:
362         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
363
364 2018-09-13  Tom Tromey  <tom@tromey.com>
365
366         PR rust/23626:
367         * rust-lang.c (rust_enum_variant): Now static.
368         (rust_empty_enum_p): New function.
369         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
370         Handle empty enum.
371
372 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
373
374         * python/py-inferior.c (infpy_repr): New.
375         (inferior_object_type): Register infpy_repr.
376         * python/py-objfile.c (objfpy_repr): New.
377         (objfile_object_type): Register objfpy_repr.
378
379 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
380
381         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
382
383 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
384
385         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
386         typo.
387
388 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
389
390         * common/common-utils.c: Don't include '<sys/stat.h>'.
391         (is_regular_file): Move to...
392         * common/filestuff.c (is_regular_file): ... here.
393         * common/common-utils.h (is_regular_file): Move to...
394         * common/filestuff.h (is_regular_file): ... here.
395
396 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
397
398         * skip.c (debug_skip): New variable.
399         (skiplist_entry::do_skip_file_p): Add debug output.
400         (skiplist_entry::do_skip_gfile_p): Likewise.
401         (skiplist_entry::skip_function_p): Likewise.
402         (_initialize_step_skip): Create debug command.
403         * NEWS: Mention set/show debug skip.
404
405 2018-09-11  Xavier Roirand  <roirand@adacore.com>
406
407         * darwin-nat.c (should_disable_startup_with_shell):
408         New function.
409         (darwin_nat_target::create_inferior): Add call.
410
411 2018-09-11  Xavier Roirand  <roirand@adacore.com>
412
413         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
414         inf_port, msg_state>: Initialize.
415         (struct darwin_thread_info) <signaled, single_step>: Change
416         type and initialize.
417         (struct darwin_thread_info) <event>: Initialize.
418
419 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
420
421         PR gdb/23555
422         PR gdb/23558
423         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
424         guesses.
425
426 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
427
428         Revert:
429         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
430
431         PR gdb/23555
432         PR gdb/23558
433         * gnulib/aclocal.m4: Regenerate.
434         * gnulib/config.in: Regenerate.
435         * gnulib/configure: Regenerate.
436         * gnulib/import/Makefile.am: Update.
437         * gnulib/import/Makefile.in: Update.
438         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
439         * gnulib/import/_Noreturn.h: ... this.
440         * gnulib/import/alloca.in.h: Update.
441         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
442         * gnulib/import/arg-nonnull.h: ... this.
443         * gnulib/import/assure.h: Update.
444         * gnulib/import/at-func.c: Update.
445         * gnulib/import/basename-lgpl.c: Update.
446         * gnulib/import/extra/snippet/c++defs.h: Rename to...
447         * gnulib/import/c++defs.h: ... this.
448         * gnulib/import/canonicalize-lgpl.c: Update.
449         * gnulib/import/cdefs.h: Update.
450         * gnulib/import/chdir-long.c: Update.
451         * gnulib/import/chdir-long.h: Update.
452         * gnulib/import/cloexec.c: Update.
453         * gnulib/import/cloexec.h: Update.
454         * gnulib/import/close.c: Update.
455         * gnulib/import/closedir.c: Update.
456         * gnulib/import/config.charset: Update.
457         * gnulib/import/dirent-private.h: Update.
458         * gnulib/import/dirent.in.h: Update.
459         * gnulib/import/dirfd.c: Update.
460         * gnulib/import/dirname-lgpl.c: Update.
461         * gnulib/import/dirname.h: Update.
462         * gnulib/import/dosname.h: Update.
463         * gnulib/import/dup-safer-flag.c: Update.
464         * gnulib/import/dup-safer.c: Update.
465         * gnulib/import/dup.c: Update.
466         * gnulib/import/dup2.c: Update.
467         * gnulib/import/errno.in.h: Update.
468         * gnulib/import/error.c: Update.
469         * gnulib/import/error.h: Update.
470         * gnulib/import/exitfail.c: Update.
471         * gnulib/import/exitfail.h: Update.
472         * gnulib/import/extra/update-copyright: Update.
473         * gnulib/import/fchdir.c: Update.
474         * gnulib/import/fcntl.c: Update.
475         * gnulib/import/fcntl.in.h: Update.
476         * gnulib/import/fd-hook.c: Update.
477         * gnulib/import/fd-hook.h: Update.
478         * gnulib/import/fd-safer-flag.c: Update.
479         * gnulib/import/fd-safer.c: Update.
480         * gnulib/import/fdopendir.c: Update.
481         * gnulib/import/filename.h: Update.
482         * gnulib/import/filenamecat-lgpl.c: Update.
483         * gnulib/import/filenamecat.h: Update.
484         * gnulib/import/flexmember.h: Update.
485         * gnulib/import/float+.h: Update.
486         * gnulib/import/float.c: Update.
487         * gnulib/import/float.in.h: Update.
488         * gnulib/import/fnmatch.c: Update.
489         * gnulib/import/fnmatch.in.h: Update.
490         * gnulib/import/fnmatch_loop.c: Update.
491         * gnulib/import/fpucw.h: Update.
492         * gnulib/import/frexp.c: Update.
493         * gnulib/import/frexpl.c: Update.
494         * gnulib/import/fstat.c: Update.
495         * gnulib/import/fstatat.c: Update.
496         * gnulib/import/getcwd-lgpl.c: Update.
497         * gnulib/import/getcwd.c: Update.
498         * gnulib/import/getdtablesize.c: Update.
499         * gnulib/import/getlogin_r.c: Update.
500         * gnulib/import/getprogname.c: Update.
501         * gnulib/import/getprogname.h: Update.
502         * gnulib/import/gettext.h: Update.
503         * gnulib/import/gettimeofday.c: Update.
504         * gnulib/import/glob-libc.h: Update.
505         * gnulib/import/glob.c: Update.
506         * gnulib/import/glob.in.h: Update.
507         * gnulib/import/glob_internal.h: Update.
508         * gnulib/import/glob_pattern_p.c: Update.
509         * gnulib/import/globfree.c: Update.
510         * gnulib/import/hard-locale.c: Update.
511         * gnulib/import/hard-locale.h: Update.
512         * gnulib/import/intprops.h: Update.
513         * gnulib/import/inttypes.in.h: Update.
514         * gnulib/import/isnan.c: Update.
515         * gnulib/import/isnand-nolibm.h: Update.
516         * gnulib/import/isnand.c: Update.
517         * gnulib/import/isnanl-nolibm.h: Update.
518         * gnulib/import/isnanl.c: Update.
519         * gnulib/import/itold.c: Update.
520         * gnulib/import/libc-config.h: Update.
521         * gnulib/import/limits.in.h: Update.
522         * gnulib/import/localcharset.c: Update.
523         * gnulib/import/localcharset.h: Update.
524         * gnulib/import/localtime-buffer.c: Update.
525         * gnulib/import/localtime-buffer.h: Update.
526         * gnulib/import/lstat.c: Update.
527         * gnulib/import/m4/00gnulib.m4: Update.
528         * gnulib/import/m4/__inline.m4: Update.
529         * gnulib/import/m4/absolute-header.m4: Update.
530         * gnulib/import/m4/alloca.m4: Update.
531         * gnulib/import/m4/builtin-expect.m4: Update.
532         * gnulib/import/m4/canonicalize.m4: Update.
533         * gnulib/import/m4/chdir-long.m4: Update.
534         * gnulib/import/m4/close.m4: Update.
535         * gnulib/import/m4/closedir.m4: Update.
536         * gnulib/import/m4/configmake.m4: Update.
537         * gnulib/import/m4/d-ino.m4: Update.
538         * gnulib/import/m4/d-type.m4: Update.
539         * gnulib/import/m4/dirent_h.m4: Update.
540         * gnulib/import/m4/dirfd.m4: Update.
541         * gnulib/import/m4/dirname.m4: Update.
542         * gnulib/import/m4/double-slash-root.m4: Update.
543         * gnulib/import/m4/dup.m4: Update.
544         * gnulib/import/m4/dup2.m4: Update.
545         * gnulib/import/m4/eealloc.m4: Update.
546         * gnulib/import/m4/environ.m4: Update.
547         * gnulib/import/m4/errno_h.m4: Update.
548         * gnulib/import/m4/error.m4: Update.
549         * gnulib/import/m4/exponentd.m4: Update.
550         * gnulib/import/m4/exponentl.m4: Update.
551         * gnulib/import/m4/extensions.m4: Update.
552         * gnulib/import/m4/extern-inline.m4: Update.
553         * gnulib/import/m4/fchdir.m4: Update.
554         * gnulib/import/m4/fcntl-o.m4: Update.
555         * gnulib/import/m4/fcntl.m4: Update.
556         * gnulib/import/m4/fcntl_h.m4: Update.
557         * gnulib/import/m4/fdopendir.m4: Update.
558         * gnulib/import/m4/filenamecat.m4: Update.
559         * gnulib/import/m4/flexmember.m4: Update.
560         * gnulib/import/m4/float_h.m4: Update.
561         * gnulib/import/m4/fnmatch.m4: Update.
562         * gnulib/import/m4/fnmatch_h.m4: Update.
563         * gnulib/import/m4/fpieee.m4: Update.
564         * gnulib/import/m4/frexp.m4: Update.
565         * gnulib/import/m4/frexpl.m4: Update.
566         * gnulib/import/m4/fstat.m4: Update.
567         * gnulib/import/m4/fstatat.m4: Update.
568         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
569         * gnulib/import/m4/getcwd-path-max.m4: Update.
570         * gnulib/import/m4/getcwd.m4: Update.
571         * gnulib/import/m4/getdtablesize.m4: Update.
572         * gnulib/import/m4/getlogin.m4: Update.
573         * gnulib/import/m4/getlogin_r.m4: Update.
574         * gnulib/import/m4/getpagesize.m4: Update.
575         * gnulib/import/m4/getprogname.m4: Update.
576         * gnulib/import/m4/gettimeofday.m4: Update.
577         * gnulib/import/m4/glibc21.m4: Update.
578         * gnulib/import/m4/glob.m4: Update.
579         * gnulib/import/m4/glob_h.m4: Update.
580         * gnulib/import/m4/gnulib-cache.m4: Update.
581         * gnulib/import/m4/gnulib-common.m4: Update.
582         * gnulib/import/m4/gnulib-comp.m4: Update.
583         * gnulib/import/m4/gnulib-tool.m4: Update.
584         * gnulib/import/m4/hard-locale.m4: Update.
585         * gnulib/import/m4/include_next.m4: Update.
586         * gnulib/import/m4/inttypes-pri.m4: Update.
587         * gnulib/import/m4/inttypes.m4: Update.
588         * gnulib/import/m4/isnand.m4: Update.
589         * gnulib/import/m4/isnanl.m4: Update.
590         * gnulib/import/m4/largefile.m4: Update.
591         * gnulib/import/m4/limits-h.m4: Update.
592         * gnulib/import/m4/localcharset.m4: Update.
593         * gnulib/import/m4/locale-fr.m4: Update.
594         * gnulib/import/m4/locale-ja.m4: Update.
595         * gnulib/import/m4/locale-zh.m4: Update.
596         * gnulib/import/m4/localtime-buffer.m4: Update.
597         * gnulib/import/m4/longlong.m4: Update.
598         * gnulib/import/m4/lstat.m4: Update.
599         * gnulib/import/m4/malloc.m4: Update.
600         * gnulib/import/m4/malloca.m4: Update.
601         * gnulib/import/m4/math_h.m4: Update.
602         * gnulib/import/m4/mbrtowc.m4: Update.
603         * gnulib/import/m4/mbsinit.m4: Update.
604         * gnulib/import/m4/mbsrtowcs.m4: Update.
605         * gnulib/import/m4/mbstate_t.m4: Update.
606         * gnulib/import/m4/memchr.m4: Update.
607         * gnulib/import/m4/memmem.m4: Update.
608         * gnulib/import/m4/mempcpy.m4: Update.
609         * gnulib/import/m4/memrchr.m4: Update.
610         * gnulib/import/m4/mkdir.m4: Update.
611         * gnulib/import/m4/mkstemp.m4: Update.
612         * gnulib/import/m4/mmap-anon.m4: Update.
613         * gnulib/import/m4/mode_t.m4: Update.
614         * gnulib/import/m4/msvc-inval.m4: Update.
615         * gnulib/import/m4/msvc-nothrow.m4: Update.
616         * gnulib/import/m4/multiarch.m4: Update.
617         * gnulib/import/m4/nocrash.m4: Update.
618         * gnulib/import/m4/off_t.m4: Update.
619         * gnulib/import/m4/onceonly.m4: Update.
620         * gnulib/import/m4/open-cloexec.m4: Update.
621         * gnulib/import/m4/open.m4: Update.
622         * gnulib/import/m4/openat.m4: Update.
623         * gnulib/import/m4/opendir.m4: Update.
624         * gnulib/import/m4/pathmax.m4: Update.
625         * gnulib/import/m4/rawmemchr.m4: Update.
626         * gnulib/import/m4/readdir.m4: Update.
627         * gnulib/import/m4/readlink.m4: Update.
628         * gnulib/import/m4/realloc.m4: Update.
629         * gnulib/import/m4/rename.m4: Update.
630         * gnulib/import/m4/rewinddir.m4: Update.
631         * gnulib/import/m4/rmdir.m4: Update.
632         * gnulib/import/m4/save-cwd.m4: Update.
633         * gnulib/import/m4/secure_getenv.m4: Update.
634         * gnulib/import/m4/setenv.m4: Update.
635         * gnulib/import/m4/signal_h.m4: Update.
636         * gnulib/import/m4/ssize_t.m4: Update.
637         * gnulib/import/m4/stat-time.m4: Update.
638         * gnulib/import/m4/stat.m4: Update.
639         * gnulib/import/m4/std-gnu11.m4: Update.
640         * gnulib/import/m4/stdbool.m4: Update.
641         * gnulib/import/m4/stddef_h.m4: Update.
642         * gnulib/import/m4/stdint.m4: Update.
643         * gnulib/import/m4/stdio_h.m4: Update.
644         * gnulib/import/m4/stdlib_h.m4: Update.
645         * gnulib/import/m4/strchrnul.m4: Update.
646         * gnulib/import/m4/strdup.m4: Update.
647         * gnulib/import/m4/strerror.m4: Update.
648         * gnulib/import/m4/string_h.m4: Update.
649         * gnulib/import/m4/strstr.m4: Update.
650         * gnulib/import/m4/strtok_r.m4: Update.
651         * gnulib/import/m4/sys_socket_h.m4: Update.
652         * gnulib/import/m4/sys_stat_h.m4: Update.
653         * gnulib/import/m4/sys_time_h.m4: Update.
654         * gnulib/import/m4/sys_types_h.m4: Update.
655         * gnulib/import/m4/tempname.m4: Update.
656         * gnulib/import/m4/time_h.m4: Update.
657         * gnulib/import/m4/unistd-safer.m4: Update.
658         * gnulib/import/m4/unistd_h.m4: Update.
659         * gnulib/import/m4/warn-on-use.m4: Update.
660         * gnulib/import/m4/wchar_h.m4: Update.
661         * gnulib/import/m4/wchar_t.m4: Update.
662         * gnulib/import/m4/wctype_h.m4: Update.
663         * gnulib/import/m4/wint_t.m4: Update.
664         * gnulib/import/malloc.c: Update.
665         * gnulib/import/malloc/scratch_buffer.h: Update.
666         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
667         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
668         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
669         * gnulib/import/malloca.c: Update.
670         * gnulib/import/malloca.h: Update.
671         * gnulib/import/malloca.valgrind: Update.
672         * gnulib/import/math.in.h: Update.
673         * gnulib/import/mbrtowc.c: Update.
674         * gnulib/import/mbsinit.c: Update.
675         * gnulib/import/mbsrtowcs-impl.h: Update.
676         * gnulib/import/mbsrtowcs-state.c: Update.
677         * gnulib/import/mbsrtowcs.c: Update.
678         * gnulib/import/memchr.c: Update.
679         * gnulib/import/memmem.c: Update.
680         * gnulib/import/mempcpy.c: Update.
681         * gnulib/import/memrchr.c: Update.
682         * gnulib/import/mkdir.c: Update.
683         * gnulib/import/mkstemp.c: Update.
684         * gnulib/import/msvc-inval.c: Update.
685         * gnulib/import/msvc-inval.h: Update.
686         * gnulib/import/msvc-nothrow.c: Update.
687         * gnulib/import/msvc-nothrow.h: Update.
688         * gnulib/import/open.c: Update.
689         * gnulib/import/openat-die.c: Update.
690         * gnulib/import/openat-priv.h: Update.
691         * gnulib/import/openat-proc.c: Update.
692         * gnulib/import/openat.c: Update.
693         * gnulib/import/openat.h: Update.
694         * gnulib/import/opendir.c: Update.
695         * gnulib/import/pathmax.h: Update.
696         * gnulib/import/pipe-safer.c: Update.
697         * gnulib/import/rawmemchr.c: Update.
698         * gnulib/import/readdir.c: Update.
699         * gnulib/import/readlink.c: Update.
700         * gnulib/import/realloc.c: Update.
701         * gnulib/import/ref-add.sin: Update.
702         * gnulib/import/ref-del.sin: Update.
703         * gnulib/import/rename.c: Update.
704         * gnulib/import/rewinddir.c: Update.
705         * gnulib/import/rmdir.c: Update.
706         * gnulib/import/same-inode.h: Update.
707         * gnulib/import/save-cwd.c: Update.
708         * gnulib/import/save-cwd.h: Update.
709         * gnulib/import/scratch_buffer.h: Update.
710         * gnulib/import/secure_getenv.c: Update.
711         * gnulib/import/setenv.c: Update.
712         * gnulib/import/signal.in.h: Update.
713         * gnulib/import/stat-time.c: Update.
714         * gnulib/import/stat-time.h: Update.
715         * gnulib/import/stat-w32.c: Update.
716         * gnulib/import/stat-w32.h: Update.
717         * gnulib/import/stat.c: Update.
718         * gnulib/import/stdbool.in.h: Update.
719         * gnulib/import/stddef.in.h: Update.
720         * gnulib/import/stdint.in.h: Update.
721         * gnulib/import/stdio.in.h: Update.
722         * gnulib/import/stdlib.in.h: Update.
723         * gnulib/import/str-two-way.h: Update.
724         * gnulib/import/strchrnul.c: Update.
725         * gnulib/import/strdup.c: Update.
726         * gnulib/import/streq.h: Update.
727         * gnulib/import/strerror-override.c: Update.
728         * gnulib/import/strerror-override.h: Update.
729         * gnulib/import/strerror.c: Update.
730         * gnulib/import/string.in.h: Update.
731         * gnulib/import/stripslash.c: Update.
732         * gnulib/import/strnlen1.c: Update.
733         * gnulib/import/strnlen1.h: Update.
734         * gnulib/import/strstr.c: Update.
735         * gnulib/import/strtok_r.c: Update.
736         * gnulib/import/sys_stat.in.h: Update.
737         * gnulib/import/sys_time.in.h: Update.
738         * gnulib/import/sys_types.in.h: Update.
739         * gnulib/import/tempname.c: Update.
740         * gnulib/import/tempname.h: Update.
741         * gnulib/import/time.in.h: Update.
742         * gnulib/import/unistd--.h: Update.
743         * gnulib/import/unistd-safer.h: Update.
744         * gnulib/import/unistd.in.h: Update.
745         * gnulib/import/unsetenv.c: Update.
746         * gnulib/import/verify.h: Update.
747         * gnulib/import/extra/snippet/warn-on-use.h: Update.
748         * gnulib/import/wchar.in.h: Update.
749         * gnulib/import/wctype.in.h: Update.
750         * gnulib/import/xalloc-oversized.h: Update.
751         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
752         "53e2c179f26a890fa6685af4b6c1397ee370433b".
753
754 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
755
756         * record-btrace.c (get_thread_current_frame): Remove
757         old_inferior_ptid.
758
759 2018-09-10  Jerome Guitton  <guitton@adacore.com>
760
761         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
762         with check_tag to 1 if and only if the type is tagged and the
763         component being searched cannot been found in the current
764         view. Otherwise, always call ada_to_fixed_type with
765         check_tag to 0.
766
767 2018-09-10  Xavier Roirand  <roirand@adacore.com>
768
769         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
770         declaration.
771         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
772         * ada-varobj.c (ada_varobj_get_number_of_children,
773         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
774
775 2018-09-10  Xavier Roirand  <roirand@adacore.com>
776
777         * ada-valprint.c (ada_value_print): Use type instead of
778         enclosing type.
779
780 2018-09-10  Xavier Roirand  <roirand@adacore.com>
781
782         * ada-lang.c (ada_value_subscript): Handle case when parameter is
783         an array of access to unconstrained array.
784
785 2018-09-10  Xavier Roirand  <roirand@adacore.com>
786
787         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
788         (ada_check_typedef): Use it.
789
790 2018-09-10  Xavier Roirand  <roirand@adacore.com>
791
792         * ada-varobj.c (ada_varobj_describe_struct_child)
793         (ada_varobj_describe_child): Handle union case like struct one.
794
795 2018-09-10  Tom Tromey  <tom@tromey.com>
796
797         PR python/18380:
798         * python/python.c (_initialize_python): Make example in "python"
799         help work in Python 3.
800
801 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
802
803         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
804         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
805         $(EXEEXT) to the script, as it is not a program.
806
807 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
808
809         * python/py-prettyprint.c (pretty_print_one_value): Return
810         gdbpy_ref<>.
811         (print_string_repr): Adjust.
812         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
813         * python/python-internal.h (apply_varobj_pretty_printer): Return
814         gdbpy_ref<>.
815         * varobj.c (varobj_value_get_print_value): Adjust.
816
817 2018-09-08  Tom Tromey  <tom@tromey.com>
818
819         PR python/16047:
820         * python/py-prettyprint.c (pretty_print_one_value): Check for
821         to_string method.
822
823 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
824
825         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
826         replace_operator_with_call.
827
828 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
829
830         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
831
832 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
833
834         * ada-typeprint.c (print_range): Print the bounds using TYPE
835         rather than its TYPE_TARGET_TYPE.
836
837 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
838
839         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
840         call to ada_to_fixed_value_create.
841
842 2018-09-08  Jerome Guitton  <guitton@adacore.com>
843
844         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
845
846 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
847
848         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
849         by calls to error.
850
851 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
852
853         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
854         Move update of loop variable "fi".
855
856 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
857
858         * ada-lang.c (value_assign_to_component): In the case of
859         big-endian targets, extract the bits of the given VAL
860         using an src_offset of zero if container is not a scalar.
861
862 2018-09-06  Simon Ser  <contact@emersion.fr>
863
864         PR gdb/23105
865         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
866         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
867         * fbsd-tdep.c (fbsd_make_note_desc): New.
868         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
869         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
870         * target.h (enum target_object) Add FreeBSD-specific
871         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
872
873 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
874
875         * compile/compile-c.h (generate_c_for_variable_locations):
876         Change reference to pointer.
877         * compile/compile-c-support.c (compile_program) <compute>:
878         Likewise.
879         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
880         (generate_c_for_for_one_variable): Likewise
881         (generate_c_for_variable_locations): Likewise
882         * compile/compile-c-types.c (compile_c_instance::convert_type):
883         Likewise
884         * compile/compile-cplus-symbols.c (convert_one_symbol):
885         std::move the scope passed to enter_scope.
886         * compile/compile-cplus-types.c
887         (compile_cplus_instance::enter_scope): Make parameter
888         rvalue-reference.
889         (compile_cplus_instance::new_scope): Change reference to
890         pointer.
891         (compile_cplus_instance::convert_type): Likewise
892         (compile_cplus_convert_typedef): std::move the scope passed to
893         enter_scope.
894         (compile_cplus_convert_struct_or_union): Likewise.
895         (compile_cplus_convert_enum): Likewise.
896         (compile_cplus_convert_namespace): Likewise.
897         * compile/compile-cplus.h (compile_cplus_instance)
898         <enter_scope>: Make parameter rvalue-reference.
899         * compile/compile-internal.h (compile_instance)
900         <get_cached_type>: Likewise
901         * compile/compile-loc2c.c (push): Likewise
902         (pushf): Likewise
903         (unary): Likewise
904         (binary): Likewise
905         (print_label): Likewise
906         (pushf_register_address): Likewise
907         (pushf_register): Likewise
908         (do_compile_dwarf_expr_to_c): Likewise
909         (compile_dwarf_expr_to_c): Likewise
910         (compile_dwarf_bounds_to_c): Likewise
911         * compile/compile.c (compile_instance::get_cached_type):
912         Likewise
913         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
914         (compile_dwarf_bounds_to_c): Likewise
915         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
916         (dwarf2_compile_property_to_c): Likewise
917         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
918         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
919         Likewise
920
921 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
922
923         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
924         * tui/tui-data.c (init_content_element): Don't initialize it.
925
926 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
927
928         * tui/tui-data.h (struct tui_win_info)
929         <detail::opaque>: Remove.
930         * tui/tui-data.c (init_win_info): Remove assignment.
931
932 2018-09-05  Tom Tromey  <tom@tromey.com>
933
934         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
935         -Wformat-nonliteral.
936         * target-float.c (host_float_ops<T>::to_string)
937         (host_float_ops<T>::from_string): Use
938         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
939         * configure: Rebuild.
940
941 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
942
943         * printcmd.c (printf_c_string): Use
944         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
945         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
946
947 2018-09-05  Tom Tromey  <tom@tromey.com>
948
949         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
950
951 2018-09-05  Tom de Vries  <tdevries@suse.de>
952
953         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
954         with resolve_abstract_p == true.
955         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
956         defaulting to false. Propagate resolve_abstract_p to
957         dwarf2_fetch_die_loc_sect_off.
958         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
959         parameter, defaulting to false.
960         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
961         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
962         parameter.
963         * dwarf2read.h (struct die_info): Forward-declare.
964         (die_info_ptr): New typedef.
965         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
966
967 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
968
969         GDB 8.2 released.
970
971 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
972             Pedro Alves  <palves@redhat.com>
973
974         * gnulib/Makefile.in (aclocal_m4_deps): Move to
975         "aclocal-m4-deps.mk".  Include file here.
976         $(srcdir)/aclocal.m4: Add "configure.ac".
977         * gnulib/aclocal-m4-deps.mk: New file.
978         * gnulib/update-gnulib.sh: Automatically update
979         "aclocal-m4-deps.mk".
980
981 2018-09-04  Tom Tromey  <tom@tromey.com>
982
983         * configure: Rebuild.
984         * configure.ac: Remove multi-ice code.
985
986 2018-09-04  Tom Tromey  <tom@tromey.com>
987
988         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
989         (ada-exp.o): Update.
990
991 2018-09-04  Tom Tromey  <tom@tromey.com>
992
993         * Makefile.in (printcmd.o, target-float.o): Remove.
994         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
995
996 2018-09-04  Tom Tromey  <tom@tromey.com>
997
998         * gnulib/Makefile.in: Remove obsolete comment.
999         * Makefile.in: Remove obsolete comment.
1000
1001 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
1002
1003         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1004         line with '+'.
1005
1006 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1007
1008         * riscv-tdep.c: Add 'prologue-value.h' include.
1009         (struct riscv_unwind_cache): New struct.
1010         (riscv_debug_unwinder): New global.
1011         (riscv_scan_prologue): Update arguments, capture register details
1012         from prologue scan.
1013         (riscv_skip_prologue): Reformat arguments line, move end of
1014         prologue calculation into riscv_scan_prologue.
1015         (riscv_frame_cache): Update return type, create
1016         riscv_unwind_cache, scan the prologue, and fill in remaining cache
1017         details.
1018         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1019         (riscv_frame_prev_register): Use the trad_frame within the
1020         riscv_unwind_cache.
1021         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1022         flag.
1023
1024 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1025
1026         * trad-frame.h (trad_frame_set_realreg): Declare.
1027         (trad_frame_set_addr): Declare.
1028         * trad-frame.c (trad_frame_set_realreg): Define new function.
1029         (trad_frame_set_addr): Define new function.
1030         (trad_frame_set_reg_realreg): Use new function.
1031         (trad_frame_set_reg_addr): Use new function.
1032
1033 2018-09-01  Keith Seitz  <keiths@redhat.com>
1034
1035         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1036         pulongest instead of "%lld".
1037         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1038         ATTRIBUTE_UNUSED.
1039
1040 2018-08-31  Tom Tromey  <tom@tromey.com>
1041
1042         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1043         variant part type.
1044
1045 2018-08-31  Pedro Alves  <palves@redhat.com>
1046
1047         * gdbarch.h: Regenerate.
1048
1049 2018-08-31  Pedro Alves  <palves@redhat.com>
1050
1051         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1052         * target.h (Hardware watchpoint interfaces): Describe
1053         continuable/steppable/non-steppable watchpoints.
1054         * gdbarch.h, gdbarch.c: Regenerate.
1055
1056 2018-08-31  Pedro Alves  <palves@redhat.com>
1057
1058         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1059         Delete.
1060         * s390-linux-nat.c
1061         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1062         * target.h (target_ops::have_continuable_watchpoint): Delete.
1063         (target_have_continuable_watchpoint): Delete.
1064         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1065         * target-delegates.c: Regenerate.
1066
1067 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1068
1069         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1070         the files present in "gnulib/import/m4/".
1071
1072 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1073
1074         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1075         c.sw, c.swsp, and c.sdsp.
1076
1077 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1078
1079         * riscv-tdep.c (struct riscv_inferior_data): Delete.
1080         (riscv_read_misa_reg): Don't cache value read into inferior data.
1081         (riscv_new_inferior_data): Delete.
1082         (riscv_inferior_data_cleanup): Delete.
1083         (riscv_inferior_data): Delete.
1084         (riscv_invalidate_inferior_data): Delete.
1085         (_initialize_riscv_tdep): Remove initialisation of inferior data.
1086
1087 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
1088
1089         * compile/compile-cplus-types.c
1090         (compile_cplus_instance::leave_scope): Take the address of scope
1091         object.
1092         (compile_cplus_instance::convert_qualified_base): Compare quals
1093         to 0.
1094
1095 2018-08-30  Keith Seitz  <keiths@redhat.com>
1096
1097         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1098         Use "%s" and host_address_to_string instead of "%p" in printf.
1099
1100 2018-08-29  Keith Seitz  <keiths@redhat.com>
1101
1102         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1103         and compile-cplus-types.c.
1104         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1105         * c-lang.c (cplus_language_defn): Set C++ compile functions.
1106         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1107         Declare.
1108         * compile/compile-c-support.c: Include compile-cplus.h.
1109         (load_libcompile): Templatize.
1110         (get_compile_context): "New" function.
1111         (c_get_compile_context): Use get_compile_context.
1112         (cplus_get_compile_context): New function.
1113         (cplus_push_user_expression, cplus_pop_user_expression)
1114         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1115         (cplus_compute_program): Define new structs/functions.
1116         * compile/compile-cplus-symmbols.c: New file.
1117         * compile/compile-cplus-types.c: New file.
1118         * compile/compile-cplus.h: New file.
1119         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1120         Declare.
1121         * compile/compile-object-load.c (get_out_value_type): Use
1122         strncmp_iw when comparing symbol names.
1123         (compile_object_load): Add mst_bss and mst_data.
1124         * compile/compile.c (_initialize_compile): Remove
1125         -Wno-implicit-function-declaration from `compile_args'.
1126         * compile/gcc-cp-plugin.h: New file.
1127         * NEWS: Mention C++ compile support and new debug options.
1128
1129 2018-08-29  Keith Seitz  <keiths@redhat.com>
1130
1131         * linespec.c (collect_info::add_symbol): Make virtual.
1132         (struct symbol_searcher_collect_info): New struct.
1133         (symbol_searcher::find_all_symbols): New method.
1134         * symtab.h (class symbol_searcher): New class.
1135
1136 2018-08-29  Keith Seitz  <keiths@redhat.com>
1137
1138         * linespec.c (struct linespec) <function_symbols, label_symbols>:
1139         Change to vector of block_symbol.  Update all users.
1140         (struct collect_info) <symbols>: Likewise.
1141         (collect_info::add_symbol): Take block_symbol as argument.
1142         Update all callers.
1143         (decode_compound_collector) <m_symbols>: Change type to vector
1144         of block_symbol.  Update all users.
1145         (decode_compound_collector::operator ()): Change parameter type
1146         to block_symbol.
1147         (find_method, find_function_symbols, find_linespec_symbols)
1148         (find_label_symbols_in_block, find_label_symbols): Change symbol
1149         vectors to block_symbol vectors.
1150         * symtab.h (symbol_found_callback_ftype): Change parameter type to
1151         block_symbol.
1152
1153 2018-08-29  Keith Seitz  <keiths@redhat.com>
1154
1155         * linespec.c (symbolp): Remove typedef and VEC definitions.
1156         (bound_minimal_symbol_d): Likewise.
1157
1158 2018-08-29  Keith Seitz  <keiths@redhat.com>
1159
1160         * linespec.c (decode_compound_collector::decode_compound_collector):
1161         Remove initialization for `m_symtabs'.
1162         (decode_compound_collector::release_symbols): Change return type
1163         to std::vector.  Update all callers.
1164         (class decode_compound_collector) <m_symbols>: Change type to
1165         std::vector.
1166         (lookup_prefix_sym): Change return type to std::vector.  Update all
1167         callers.
1168         (compare_symbols): Remove.
1169         (std_compare_symbols): Rename to `compare_symbols'.
1170         (find_method): Change `sym_classes' parameter to std::vector.
1171         Update all callers.  Use std::sort to sort sym_classes.
1172         (find_linespec_symbols): Remove cleanup.
1173
1174 2018-08-29  Keith Seitz  <keiths@redhat.com>
1175
1176         * linespec.c (struct linespec) <minimal_symbols>: Change type to
1177         std::vector.  Update all users.
1178         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1179         (struct collect_info) <minimal_symbols>: Likewise.
1180         (compare_msymbols): Return bool.  Change parameters to const
1181         bound_minimal_symbol references.
1182         (find_method, find_function_symbols, find_linespec_symbols): Change
1183         `minsyms' parameter to std::vector.  Update all callers.
1184
1185 2018-08-29  Keith Seitz  <keiths@redhat.com>
1186
1187         * linespec.c (struct linespec) <label_symbols>: Change type to
1188         std::vector.  Update all users.
1189         (find_label_symbols_in_block): Change `result' parameter to
1190         std::vector.  Update all callers.
1191         (find_label_symbols): Return std::vector.  Update all callers.
1192
1193 2018-08-29  Keith Seitz  <keiths@redhat.com>
1194
1195         * linespec.c (struct linespec) <function_symbols>: Change type to
1196         std::vector.  Update all users.
1197         (struct collect_info) <function_symbols>: Likewise.
1198         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1199         (std_compare_symbols): New function.
1200         (find_method, find_function_symbols, find_linespec_symbols)
1201         (find_label_symbols_in_block): Change `symbols' parameter to
1202         std::vector.  Update all callers.
1203         (find_label_symbols): Likewise for `function_symbols' and
1204         `label_funcs_ret'.
1205
1206 2018-08-29  Keith Seitz  <keiths@redhat.com>
1207
1208         * linespec.c (symtab_vector_up): Define.
1209         (struct linespec) <file_symtabs>: Change type to std::vector *.
1210         Update all uses.
1211         (struct collect_info) <file_symtabs>: Likewise.
1212         (collect_symtabs_from_filename): Return symtab_vector_up.
1213         Update all callers.
1214         (decode_objc): Remove cleanup.
1215         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1216         (symtab_collector::release_symtabs): Return symtab_vector_up.
1217         Update all callers.
1218         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1219         Update all users.
1220         (collect_symtabs_from_filename, symtabs_from_filename): Return
1221         symtab_vector_up.  Update all callers.
1222
1223 2018-08-29  Tom Tromey  <tom@tromey.com>
1224
1225         * csky-tdep.c (csky_analyze_prologue): Use
1226         core_addr_to_string_nz.
1227
1228 2018-08-29  Tom Tromey  <tom@tromey.com>
1229
1230         * windows-nat.c (struct xlate_exception) <them>: Change type to
1231         DWORD.
1232         (xlate): Fix formatting.  Remove last entry.
1233         (struct xlate_exception, xlate): Comment out.
1234         (windows_nat_target::resume): Use ranged for.
1235
1236 2018-08-29  Jim Wilson  <jimw@sifive.com>
1237
1238         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1239         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1240         of NT_PRFPREG.
1241         (riscv_linux_nat_target::store_registers): Likewise.
1242
1243 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1244
1245         PR gdb/23555
1246         PR gdb/23558
1247         * gnulib/aclocal.m4: Regenerate.
1248         * gnulib/config.in: Regenerate.
1249         * gnulib/configure: Regenerate.
1250         * gnulib/import/Makefile.am: Update.
1251         * gnulib/import/Makefile.in: Update.
1252         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1253         * gnulib/import/_Noreturn.h: ... this.
1254         * gnulib/import/alloca.in.h: Update.
1255         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1256         * gnulib/import/arg-nonnull.h: ... this.
1257         * gnulib/import/assure.h: Update.
1258         * gnulib/import/at-func.c: Update.
1259         * gnulib/import/basename-lgpl.c: Update.
1260         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1261         * gnulib/import/c++defs.h: ... this.
1262         * gnulib/import/canonicalize-lgpl.c: Update.
1263         * gnulib/import/cdefs.h: Update.
1264         * gnulib/import/chdir-long.c: Update.
1265         * gnulib/import/chdir-long.h: Update.
1266         * gnulib/import/cloexec.c: Update.
1267         * gnulib/import/cloexec.h: Update.
1268         * gnulib/import/close.c: Update.
1269         * gnulib/import/closedir.c: Update.
1270         * gnulib/import/config.charset: Update.
1271         * gnulib/import/dirent-private.h: Update.
1272         * gnulib/import/dirent.in.h: Update.
1273         * gnulib/import/dirfd.c: Update.
1274         * gnulib/import/dirname-lgpl.c: Update.
1275         * gnulib/import/dirname.h: Update.
1276         * gnulib/import/dosname.h: Update.
1277         * gnulib/import/dup-safer-flag.c: Update.
1278         * gnulib/import/dup-safer.c: Update.
1279         * gnulib/import/dup.c: Update.
1280         * gnulib/import/dup2.c: Update.
1281         * gnulib/import/errno.in.h: Update.
1282         * gnulib/import/error.c: Update.
1283         * gnulib/import/error.h: Update.
1284         * gnulib/import/exitfail.c: Update.
1285         * gnulib/import/exitfail.h: Update.
1286         * gnulib/import/extra/update-copyright: Update.
1287         * gnulib/import/fchdir.c: Update.
1288         * gnulib/import/fcntl.c: Update.
1289         * gnulib/import/fcntl.in.h: Update.
1290         * gnulib/import/fd-hook.c: Update.
1291         * gnulib/import/fd-hook.h: Update.
1292         * gnulib/import/fd-safer-flag.c: Update.
1293         * gnulib/import/fd-safer.c: Update.
1294         * gnulib/import/fdopendir.c: Update.
1295         * gnulib/import/filename.h: Update.
1296         * gnulib/import/filenamecat-lgpl.c: Update.
1297         * gnulib/import/filenamecat.h: Update.
1298         * gnulib/import/flexmember.h: Update.
1299         * gnulib/import/float+.h: Update.
1300         * gnulib/import/float.c: Update.
1301         * gnulib/import/float.in.h: Update.
1302         * gnulib/import/fnmatch.c: Update.
1303         * gnulib/import/fnmatch.in.h: Update.
1304         * gnulib/import/fnmatch_loop.c: Update.
1305         * gnulib/import/fpucw.h: Update.
1306         * gnulib/import/frexp.c: Update.
1307         * gnulib/import/frexpl.c: Update.
1308         * gnulib/import/fstat.c: Update.
1309         * gnulib/import/fstatat.c: Update.
1310         * gnulib/import/getcwd-lgpl.c: Update.
1311         * gnulib/import/getcwd.c: Update.
1312         * gnulib/import/getdtablesize.c: Update.
1313         * gnulib/import/getlogin_r.c: Update.
1314         * gnulib/import/getprogname.c: Update.
1315         * gnulib/import/getprogname.h: Update.
1316         * gnulib/import/gettext.h: Update.
1317         * gnulib/import/gettimeofday.c: Update.
1318         * gnulib/import/glob-libc.h: Update.
1319         * gnulib/import/glob.c: Update.
1320         * gnulib/import/glob.in.h: Update.
1321         * gnulib/import/glob_internal.h: Update.
1322         * gnulib/import/glob_pattern_p.c: Update.
1323         * gnulib/import/globfree.c: Update.
1324         * gnulib/import/hard-locale.c: Update.
1325         * gnulib/import/hard-locale.h: Update.
1326         * gnulib/import/intprops.h: Update.
1327         * gnulib/import/inttypes.in.h: Update.
1328         * gnulib/import/isnan.c: Update.
1329         * gnulib/import/isnand-nolibm.h: Update.
1330         * gnulib/import/isnand.c: Update.
1331         * gnulib/import/isnanl-nolibm.h: Update.
1332         * gnulib/import/isnanl.c: Update.
1333         * gnulib/import/itold.c: Update.
1334         * gnulib/import/libc-config.h: Update.
1335         * gnulib/import/limits.in.h: Update.
1336         * gnulib/import/localcharset.c: Update.
1337         * gnulib/import/localcharset.h: Update.
1338         * gnulib/import/localtime-buffer.c: Update.
1339         * gnulib/import/localtime-buffer.h: Update.
1340         * gnulib/import/lstat.c: Update.
1341         * gnulib/import/m4/00gnulib.m4: Update.
1342         * gnulib/import/m4/__inline.m4: Update.
1343         * gnulib/import/m4/absolute-header.m4: Update.
1344         * gnulib/import/m4/alloca.m4: Update.
1345         * gnulib/import/m4/builtin-expect.m4: Update.
1346         * gnulib/import/m4/canonicalize.m4: Update.
1347         * gnulib/import/m4/chdir-long.m4: Update.
1348         * gnulib/import/m4/close.m4: Update.
1349         * gnulib/import/m4/closedir.m4: Update.
1350         * gnulib/import/m4/configmake.m4: Update.
1351         * gnulib/import/m4/d-ino.m4: Update.
1352         * gnulib/import/m4/d-type.m4: Update.
1353         * gnulib/import/m4/dirent_h.m4: Update.
1354         * gnulib/import/m4/dirfd.m4: Update.
1355         * gnulib/import/m4/dirname.m4: Update.
1356         * gnulib/import/m4/double-slash-root.m4: Update.
1357         * gnulib/import/m4/dup.m4: Update.
1358         * gnulib/import/m4/dup2.m4: Update.
1359         * gnulib/import/m4/eealloc.m4: Update.
1360         * gnulib/import/m4/environ.m4: Update.
1361         * gnulib/import/m4/errno_h.m4: Update.
1362         * gnulib/import/m4/error.m4: Update.
1363         * gnulib/import/m4/exponentd.m4: Update.
1364         * gnulib/import/m4/exponentl.m4: Update.
1365         * gnulib/import/m4/extensions.m4: Update.
1366         * gnulib/import/m4/extern-inline.m4: Update.
1367         * gnulib/import/m4/fchdir.m4: Update.
1368         * gnulib/import/m4/fcntl-o.m4: Update.
1369         * gnulib/import/m4/fcntl.m4: Update.
1370         * gnulib/import/m4/fcntl_h.m4: Update.
1371         * gnulib/import/m4/fdopendir.m4: Update.
1372         * gnulib/import/m4/filenamecat.m4: Update.
1373         * gnulib/import/m4/flexmember.m4: Update.
1374         * gnulib/import/m4/float_h.m4: Update.
1375         * gnulib/import/m4/fnmatch.m4: Update.
1376         * gnulib/import/m4/fnmatch_h.m4: Update.
1377         * gnulib/import/m4/fpieee.m4: Update.
1378         * gnulib/import/m4/frexp.m4: Update.
1379         * gnulib/import/m4/frexpl.m4: Update.
1380         * gnulib/import/m4/fstat.m4: Update.
1381         * gnulib/import/m4/fstatat.m4: Update.
1382         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1383         * gnulib/import/m4/getcwd-path-max.m4: Update.
1384         * gnulib/import/m4/getcwd.m4: Update.
1385         * gnulib/import/m4/getdtablesize.m4: Update.
1386         * gnulib/import/m4/getlogin.m4: Update.
1387         * gnulib/import/m4/getlogin_r.m4: Update.
1388         * gnulib/import/m4/getpagesize.m4: Update.
1389         * gnulib/import/m4/getprogname.m4: Update.
1390         * gnulib/import/m4/gettimeofday.m4: Update.
1391         * gnulib/import/m4/glibc21.m4: Update.
1392         * gnulib/import/m4/glob.m4: Update.
1393         * gnulib/import/m4/glob_h.m4: Update.
1394         * gnulib/import/m4/gnulib-cache.m4: Update.
1395         * gnulib/import/m4/gnulib-common.m4: Update.
1396         * gnulib/import/m4/gnulib-comp.m4: Update.
1397         * gnulib/import/m4/gnulib-tool.m4: Update.
1398         * gnulib/import/m4/hard-locale.m4: Update.
1399         * gnulib/import/m4/include_next.m4: Update.
1400         * gnulib/import/m4/inttypes-pri.m4: Update.
1401         * gnulib/import/m4/inttypes.m4: Update.
1402         * gnulib/import/m4/isnand.m4: Update.
1403         * gnulib/import/m4/isnanl.m4: Update.
1404         * gnulib/import/m4/largefile.m4: Update.
1405         * gnulib/import/m4/limits-h.m4: Update.
1406         * gnulib/import/m4/localcharset.m4: Update.
1407         * gnulib/import/m4/locale-fr.m4: Update.
1408         * gnulib/import/m4/locale-ja.m4: Update.
1409         * gnulib/import/m4/locale-zh.m4: Update.
1410         * gnulib/import/m4/localtime-buffer.m4: Update.
1411         * gnulib/import/m4/longlong.m4: Update.
1412         * gnulib/import/m4/lstat.m4: Update.
1413         * gnulib/import/m4/malloc.m4: Update.
1414         * gnulib/import/m4/malloca.m4: Update.
1415         * gnulib/import/m4/math_h.m4: Update.
1416         * gnulib/import/m4/mbrtowc.m4: Update.
1417         * gnulib/import/m4/mbsinit.m4: Update.
1418         * gnulib/import/m4/mbsrtowcs.m4: Update.
1419         * gnulib/import/m4/mbstate_t.m4: Update.
1420         * gnulib/import/m4/memchr.m4: Update.
1421         * gnulib/import/m4/memmem.m4: Update.
1422         * gnulib/import/m4/mempcpy.m4: Update.
1423         * gnulib/import/m4/memrchr.m4: Update.
1424         * gnulib/import/m4/mkdir.m4: Update.
1425         * gnulib/import/m4/mkstemp.m4: Update.
1426         * gnulib/import/m4/mmap-anon.m4: Update.
1427         * gnulib/import/m4/mode_t.m4: Update.
1428         * gnulib/import/m4/msvc-inval.m4: Update.
1429         * gnulib/import/m4/msvc-nothrow.m4: Update.
1430         * gnulib/import/m4/multiarch.m4: Update.
1431         * gnulib/import/m4/nocrash.m4: Update.
1432         * gnulib/import/m4/off_t.m4: Update.
1433         * gnulib/import/m4/onceonly.m4: Update.
1434         * gnulib/import/m4/open-cloexec.m4: Update.
1435         * gnulib/import/m4/open.m4: Update.
1436         * gnulib/import/m4/openat.m4: Update.
1437         * gnulib/import/m4/opendir.m4: Update.
1438         * gnulib/import/m4/pathmax.m4: Update.
1439         * gnulib/import/m4/rawmemchr.m4: Update.
1440         * gnulib/import/m4/readdir.m4: Update.
1441         * gnulib/import/m4/readlink.m4: Update.
1442         * gnulib/import/m4/realloc.m4: Update.
1443         * gnulib/import/m4/rename.m4: Update.
1444         * gnulib/import/m4/rewinddir.m4: Update.
1445         * gnulib/import/m4/rmdir.m4: Update.
1446         * gnulib/import/m4/save-cwd.m4: Update.
1447         * gnulib/import/m4/secure_getenv.m4: Update.
1448         * gnulib/import/m4/setenv.m4: Update.
1449         * gnulib/import/m4/signal_h.m4: Update.
1450         * gnulib/import/m4/ssize_t.m4: Update.
1451         * gnulib/import/m4/stat-time.m4: Update.
1452         * gnulib/import/m4/stat.m4: Update.
1453         * gnulib/import/m4/std-gnu11.m4: Update.
1454         * gnulib/import/m4/stdbool.m4: Update.
1455         * gnulib/import/m4/stddef_h.m4: Update.
1456         * gnulib/import/m4/stdint.m4: Update.
1457         * gnulib/import/m4/stdio_h.m4: Update.
1458         * gnulib/import/m4/stdlib_h.m4: Update.
1459         * gnulib/import/m4/strchrnul.m4: Update.
1460         * gnulib/import/m4/strdup.m4: Update.
1461         * gnulib/import/m4/strerror.m4: Update.
1462         * gnulib/import/m4/string_h.m4: Update.
1463         * gnulib/import/m4/strstr.m4: Update.
1464         * gnulib/import/m4/strtok_r.m4: Update.
1465         * gnulib/import/m4/sys_socket_h.m4: Update.
1466         * gnulib/import/m4/sys_stat_h.m4: Update.
1467         * gnulib/import/m4/sys_time_h.m4: Update.
1468         * gnulib/import/m4/sys_types_h.m4: Update.
1469         * gnulib/import/m4/tempname.m4: Update.
1470         * gnulib/import/m4/time_h.m4: Update.
1471         * gnulib/import/m4/unistd-safer.m4: Update.
1472         * gnulib/import/m4/unistd_h.m4: Update.
1473         * gnulib/import/m4/warn-on-use.m4: Update.
1474         * gnulib/import/m4/wchar_h.m4: Update.
1475         * gnulib/import/m4/wchar_t.m4: Update.
1476         * gnulib/import/m4/wctype_h.m4: Update.
1477         * gnulib/import/m4/wint_t.m4: Update.
1478         * gnulib/import/malloc.c: Update.
1479         * gnulib/import/malloc/scratch_buffer.h: Update.
1480         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1481         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1482         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1483         * gnulib/import/malloca.c: Update.
1484         * gnulib/import/malloca.h: Update.
1485         * gnulib/import/malloca.valgrind: Update.
1486         * gnulib/import/math.in.h: Update.
1487         * gnulib/import/mbrtowc.c: Update.
1488         * gnulib/import/mbsinit.c: Update.
1489         * gnulib/import/mbsrtowcs-impl.h: Update.
1490         * gnulib/import/mbsrtowcs-state.c: Update.
1491         * gnulib/import/mbsrtowcs.c: Update.
1492         * gnulib/import/memchr.c: Update.
1493         * gnulib/import/memmem.c: Update.
1494         * gnulib/import/mempcpy.c: Update.
1495         * gnulib/import/memrchr.c: Update.
1496         * gnulib/import/mkdir.c: Update.
1497         * gnulib/import/mkstemp.c: Update.
1498         * gnulib/import/msvc-inval.c: Update.
1499         * gnulib/import/msvc-inval.h: Update.
1500         * gnulib/import/msvc-nothrow.c: Update.
1501         * gnulib/import/msvc-nothrow.h: Update.
1502         * gnulib/import/open.c: Update.
1503         * gnulib/import/openat-die.c: Update.
1504         * gnulib/import/openat-priv.h: Update.
1505         * gnulib/import/openat-proc.c: Update.
1506         * gnulib/import/openat.c: Update.
1507         * gnulib/import/openat.h: Update.
1508         * gnulib/import/opendir.c: Update.
1509         * gnulib/import/pathmax.h: Update.
1510         * gnulib/import/pipe-safer.c: Update.
1511         * gnulib/import/rawmemchr.c: Update.
1512         * gnulib/import/readdir.c: Update.
1513         * gnulib/import/readlink.c: Update.
1514         * gnulib/import/realloc.c: Update.
1515         * gnulib/import/ref-add.sin: Update.
1516         * gnulib/import/ref-del.sin: Update.
1517         * gnulib/import/rename.c: Update.
1518         * gnulib/import/rewinddir.c: Update.
1519         * gnulib/import/rmdir.c: Update.
1520         * gnulib/import/same-inode.h: Update.
1521         * gnulib/import/save-cwd.c: Update.
1522         * gnulib/import/save-cwd.h: Update.
1523         * gnulib/import/scratch_buffer.h: Update.
1524         * gnulib/import/secure_getenv.c: Update.
1525         * gnulib/import/setenv.c: Update.
1526         * gnulib/import/signal.in.h: Update.
1527         * gnulib/import/stat-time.c: Update.
1528         * gnulib/import/stat-time.h: Update.
1529         * gnulib/import/stat-w32.c: Update.
1530         * gnulib/import/stat-w32.h: Update.
1531         * gnulib/import/stat.c: Update.
1532         * gnulib/import/stdbool.in.h: Update.
1533         * gnulib/import/stddef.in.h: Update.
1534         * gnulib/import/stdint.in.h: Update.
1535         * gnulib/import/stdio.in.h: Update.
1536         * gnulib/import/stdlib.in.h: Update.
1537         * gnulib/import/str-two-way.h: Update.
1538         * gnulib/import/strchrnul.c: Update.
1539         * gnulib/import/strdup.c: Update.
1540         * gnulib/import/streq.h: Update.
1541         * gnulib/import/strerror-override.c: Update.
1542         * gnulib/import/strerror-override.h: Update.
1543         * gnulib/import/strerror.c: Update.
1544         * gnulib/import/string.in.h: Update.
1545         * gnulib/import/stripslash.c: Update.
1546         * gnulib/import/strnlen1.c: Update.
1547         * gnulib/import/strnlen1.h: Update.
1548         * gnulib/import/strstr.c: Update.
1549         * gnulib/import/strtok_r.c: Update.
1550         * gnulib/import/sys_stat.in.h: Update.
1551         * gnulib/import/sys_time.in.h: Update.
1552         * gnulib/import/sys_types.in.h: Update.
1553         * gnulib/import/tempname.c: Update.
1554         * gnulib/import/tempname.h: Update.
1555         * gnulib/import/time.in.h: Update.
1556         * gnulib/import/unistd--.h: Update.
1557         * gnulib/import/unistd-safer.h: Update.
1558         * gnulib/import/unistd.in.h: Update.
1559         * gnulib/import/unsetenv.c: Update.
1560         * gnulib/import/verify.h: Update.
1561         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1562         * gnulib/import/wchar.in.h: Update.
1563         * gnulib/import/wctype.in.h: Update.
1564         * gnulib/import/xalloc-oversized.h: Update.
1565         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1566         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1567
1568 2018-08-16  Gary Benson <gbenson@redhat.com>
1569
1570         PR gdb/13000:
1571         * gdb/main.c (captured_main_1): Exit with nonzero status
1572         in batch mode if the last command to be executed failed.
1573         * NEWS: Mention the above.
1574
1575 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
1576
1577         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1578         end of warning message.
1579
1580 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1581
1582         PR gdb/22943:
1583         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1584         (aarch64_extract_return_value): Use
1585         aapcs_is_vfp_call_or_return_candidate.
1586         (aarch64_return_in_memory): Likewise.
1587         (aarch64_store_return_value): Likewise.
1588
1589 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1590
1591         * aarch64-tdep.c
1592         (aapcs_is_vfp_call_or_return_candidate): Make static
1593         (pass_in_v_or_stack): Remove function.
1594         (pass_in_v_vfp_candidate): New function.
1595         (aarch64_push_dummy_call): Check for float register candidates.
1596
1597 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1598
1599         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1600         (aapcs_is_vfp_call_or_return_candidate_1): New function.
1601         (aapcs_is_vfp_call_or_return_candidate): Likewise.
1602
1603 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
1604
1605         PR build/23399
1606         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1607         (struct ipa_sym_addresses): Rename to...
1608         (struct ipa_sym_addresses_common): ... this.
1609         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1610
1611 2018-08-28  Tom Tromey  <tom@tromey.com>
1612
1613         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1614         (token_fifo): Now a std::vector.
1615         (yylex, c_parse): Update.
1616         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1617         (token_fifo): Now a std::vector.
1618         (yylex, d_parse): Update.
1619         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1620         (token_fifo): Now a std::vector.
1621         (yylex, go_parse): Update.
1622
1623 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
1624
1625         * parser-defs.h (struct type_stack) <elements>: Change type to
1626         std::vector<union type_stack_elt>.
1627         <depth, size>: Remove.
1628         * parse.c (parse_exp_in_context_1): Adjust.
1629         (type_stack_reserve): Remove.
1630         (check_type_stack_depth): Remove.
1631         (insert_into_type_stack): Adjust to std::vector.
1632         (insert_type): Likewise.
1633         (push_type): Likewise.
1634         (push_type_int): Likewise.
1635         (insert_type_address_space): Likewise.
1636         (pop_type): Likewise.
1637         (pop_type_int): Likewise.
1638         (pop_typelist): Likewise.
1639         (pop_type_stack): Likewise.
1640         (append_type_stack): Likewise.
1641         (push_type_stack): Likewise.
1642         (get_type_stack): Likewise.
1643         (type_stack_cleanup): Likewise.
1644         (push_typelist): Likewise.
1645         (follow_types): Likewise.
1646         (_initialize_parse): Likewise.
1647
1648 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1649
1650         * NEWS: Mention csky target.
1651
1652 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
1653             Hafiz Abid Qadeer  <abidh@codesourcery.com>
1654             Don Breazeal  <donb@codesourcery.com>
1655
1656         * csky-linux-tdep.c: New file.
1657         * csky-tdep.c: Likewise.
1658         * csky-tdep.h: Likewise.
1659         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1660         csky-tdep.o.
1661         (HFILES_NO_SRCDIR): Add csky-tdep.h.
1662         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1663         * configure.tgt: Add csky support.
1664
1665 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
1666
1667         * python/py-framefilter.c (py_print_frame): Print frame architecture
1668         when printing on an MI output.
1669
1670 2018-08-27  Tom Tromey  <tom@tromey.com>
1671
1672         PR build/23087:
1673         * configure: Rebuild.
1674         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1675
1676 2018-08-27  Tom Tromey  <tom@tromey.com>
1677
1678         * aarch64-linux-tdep.c
1679         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1680         casts to int.
1681
1682 2018-08-27  Tom Tromey  <tom@tromey.com>
1683
1684         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1685         unsigned.
1686         (ppc64_standard_linkage1, ppc64_standard_linkage2)
1687         (ppc64_standard_linkage3, ppc64_standard_linkage4)
1688         (ppc64_standard_linkage5, ppc64_standard_linkage6)
1689         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1690         unsigned.
1691
1692 2018-08-27  Tom Tromey  <tom@tromey.com>
1693
1694         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1695         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1696
1697 2018-08-27  Tom Tromey  <tom@tromey.com>
1698
1699         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1700         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1701         ULONGEST_MAX.
1702         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1703         ULONGEST_MAX.
1704         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1705         ULONGEST_MAX.
1706         * sparc-linux-tdep.c (sparc32_linux_sigframe)
1707         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1708         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1709         ULONGEST_MAX.
1710         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1711         (ppc64_linux_sigaction_tramp_frame)
1712         (ppc32_linux_sighandler_tramp_frame)
1713         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1714         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1715         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1716         * mn10300-linux-tdep.c (am33_linux_sigframe)
1717         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1718         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1719         * mips-linux-tdep.c (mips_linux_o32_sigframe)
1720         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1721         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1722         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1723         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1724         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1725         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1726         * microblaze-linux-tdep.c
1727         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1728         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1729         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1730         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1731         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1732         * common/common-types.h (ULONGEST_MAX): New define.
1733         (CORE_ADDR_MAX): Fix formatting.
1734         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1735         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1736         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1737         (arm_linux_rt_sigreturn_tramp_frame)
1738         (arm_eabi_linux_sigreturn_tramp_frame)
1739         (arm_eabi_linux_rt_sigreturn_tramp_frame)
1740         (thumb2_eabi_linux_sigreturn_tramp_frame)
1741         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1742         (arm_linux_restart_syscall_tramp_frame)
1743         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1744         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1745         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1746         ULONGEST_MAX.
1747         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1748
1749 2018-08-27  Tom Tromey  <tom@tromey.com>
1750
1751         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1752         CORE_ADDR_MAX.
1753         * mips-tdep.c (mips_deal_with_atomic_sequence)
1754         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1755         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1756         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1757         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1758         CORE_ADDR_MAX.
1759         * aarch64-tdep.c (aarch64_software_single_step): Use
1760         CORE_ADDR_MAX.
1761
1762 2018-08-27  Tom Tromey  <tom@tromey.com>
1763
1764         * linespec.c (complete_linespec_component): Add cast to "char".
1765         * completer.c (completion_tracker::build_completion_result): Add
1766         cast to "char".
1767
1768 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1769
1770         * solist.h (struct solist, struct target_so_ops): Fix
1771         indentation.
1772
1773 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1774
1775         * ada-tasks.c (ada_task_info_s): Remove typedef.
1776         (DEF_VEC_O(ada_task_info_s)): Remove.
1777         (struct ada_tasks_inferior_data): Initialize fields.
1778         <task_list>: Make an std::vector.
1779         (get_ada_tasks_inferior_data): Allocate with new.
1780         (ada_get_task_number): Adjust.
1781         (get_task_number_from_id): Likewise.
1782         (valid_task_id): Likewise.
1783         (ada_get_task_info_from_ptid): Likewise.
1784         (iterate_over_live_ada_tasks): Likewise.
1785         (add_ada_task): Likewise.
1786         (read_known_tasks): Likewise.
1787         (ada_build_task_list): Likewise.
1788         (print_ada_task_info): Likewise.
1789         (info_task): Likewise.
1790         (task_command_1): Likewise.
1791
1792 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1793
1794         * ada-lang.c (add_angle_brackets): Return std::string.
1795
1796 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
1797
1798         * python/py-threadevent.c (py_get_event_thread): Initialize
1799         pythread.
1800
1801 2018-08-24  Pedro Alves  <palves@redhat.com>
1802
1803         * python/py-bpevent.c (create_breakpoint_event_object): Use
1804         copy-initialization.
1805         * python/py-continueevent.c (emit_continue_event): Use
1806         copy-initialization.
1807         * python/py-exitedevent.c (create_exited_event_object): Return a
1808         gdbpy_ref<>.
1809         (emit_exited_event): Use copy-initialization.
1810         * python/py-inferior.c (python_new_inferior)
1811         (python_inferior_deleted, add_thread_object): Use
1812         copy-initialization.
1813         * python/py-infevents.c (create_inferior_call_event_object)
1814         (create_register_changed_event_object)
1815         (create_memory_changed_event_object): Return a gdbpy_ref<>.
1816         (emit_inferior_call_event, emit_memory_changed_event)
1817         (emit_register_changed_event): Use copy-initialization.
1818         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1819         Return a gdbpy_ref<>.
1820         (emit_new_objfile_event): Use copy-initialization.
1821         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1822         (emit_clear_objfiles_event): Use copy-initialization.
1823         * python/py-signalevent.c (create_signal_event_object): Use
1824         copy-initialization.
1825         * python/py-threadevent.c (create_thread_event_object): Use
1826         copy-initialization.
1827
1828 2018-08-24  Pedro Alves  <palves@redhat.com>
1829             Simon Marchi  <simon.marchi@ericsson.com>
1830
1831         PR gdb/23379
1832         * python/py-continueevent.c: Include "gdbthread.h".
1833         (create_continue_event_object): Add intro comment.  Add 'ptid'
1834         parameter.  Use it to find thread to pass to
1835         create_thread_event_object.
1836         (emit_continue_event): Pass PTID down to
1837         create_continue_event_object.
1838         * python/py-event.h (py_get_event_thread): Declare.
1839         (create_thread_event_object): Remove default from 'thread'
1840         parameter.
1841         * python/py-stopevent.c (create_stop_event_object): Use
1842         py_get_event_thread.
1843         * python/py-threadevent.c (get_event_thread): Rename to ...
1844         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1845         and use it to find the thread.
1846         (create_thread_event_object): Assert that THREAD isn't null.
1847         Don't find the event thread here.
1848
1849 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
1850
1851         * block.h (blockrange, blockranges): New struct declarations.
1852         (struct block): Add new field named `ranges'.
1853         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1854         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1855         macros for accessing ranges in struct block.
1856         (make_blockranges): New declaration.
1857         block.c (make_blockranges): New function.
1858         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1859         for block.
1860         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1861         * blockframe.c (cache_pc_function_block): New static global.
1862         (clear_pc_function_cache): Clear cache_pc_function_block.
1863         (find_pc_partial_function): Move comment to symtab.h.  Add
1864         support for non-contiguous blocks.
1865         * cli/cli-cmds.c (block.h): Include.
1866         (print_disassembly): Handle printing of non-contiguous blocks.
1867         (disassemble_current_function): Likewise.
1868         (disassemble_command): Likewise.
1869
1870         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1871         BLOCK_START.
1872         * blockframe.c (get_pc_function_start): Likewise.
1873         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1874         (gcc_symbol_address): Likewise.
1875         * compile/compile-object-run.c (compile_object_run): Likewise.
1876         * compile/compile.c (get_expr_block_and_pc): Likewise.
1877         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1878         (func_addr_to_tail_call_list): Likewise.
1879         * findvar.c (default_read_var_value): Likewise.
1880         * inline-frame.c (inline_frame_this_id): Likewise.
1881         (skip-inline_frames): Likewise.
1882         * infcmd.c (until_next_command): Likewise.
1883         * linespec.c (convert_linespec_to_sals): Likewise.
1884         * parse.c (parse_exp_in_context_1): Likewise.
1885         * printcmd.c (build_address_symbolic): likewise.
1886         (info_address_command): Likewise.
1887         symtab.c (find_function_start_sal): Likewise.
1888         (skip_prologue_sal): Likewise.
1889         (find_function_alias_target): Likewise.
1890         (find_gnu_ifunc): Likewise.
1891         * stack.c (find_frame_funname): Likewise.
1892         * symtab.c (fixup_symbol_section): Likewise.
1893         (find_function_start_sal): Likewise.
1894         (skip_prologue_sal): Likewsie.
1895         (find_function_alias_target): Likewise.
1896         (find_gnu_ifunc): Likewise.
1897         * tracepoint.c (info_scope_command): Likewise.
1898         * value.c (value_fn_field): Likewise.
1899
1900         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1901         in place of find_pc_partial_function.
1902         * blockframe.c (find_function_entry_range_from_pc): New function.
1903         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1904         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1905         for each range in a block.
1906
1907
1908 2018-08-23  Xavier Roirand  <roirand@adacore.com>
1909
1910         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1911         incrementation.
1912
1913 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1914
1915         * solib-svr4.c (read_program_headers_from_bfd): Return
1916         gdb::optional<gdb::byte_vector>.
1917         (svr4_exec_displacement): Adjust.
1918
1919 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1920
1921         * solib-svr4.c (read_program_header): Return
1922         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1923         (find_program_interpreter): Return
1924         gdb::optional<gdb::byte_vector>.
1925         (scan_dyntag_auxv): Adjust.
1926         (enable_break): Adjust.
1927         (svr4_exec_displacement): Adjust.
1928
1929 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1930
1931         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1932         * inf-child.c (inf_child_target::terminal_save_inferior): New.
1933
1934 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
1935
1936         * guile/scm-string.c (gdbscm_scm_from_printf): Use
1937         string_vprintf.
1938         * guile/scm-utils.c (gdbscm_printf): Likewise.
1939         * serial.c (serial_printf): Likewise.
1940         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1941
1942 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
1943
1944         * stack.c (print_frame): Print frame architecture when printing on
1945         an MI output.
1946         * NEWS: Mention new "arch" attribute in frame output.
1947
1948 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1949
1950         * arch/aarch64.h (aarch64_regnum): Update comment.
1951
1952 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
1953
1954         * NEWS: Add SVE to 8.2 section.
1955
1956 2018-08-21  Pedro Alves  <palves@redhat.com>
1957
1958         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1959         out from gdbscm_parse_function_args.
1960         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1961         gdbscm_parse_function_args_1.
1962
1963 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
1964
1965         PR gdb/17816
1966         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1967         operator.
1968
1969 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
1970
1971         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1972
1973 2018-08-19  Michael Spang  <spang@google.com>
1974
1975         PR gdb/11786
1976         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1977         for PT_TLS segments.
1978
1979 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
1980
1981         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1982         dwarf_variable_value.
1983         * dwarf2-frame.c (class dwarf_expr_executor):
1984         Add override for dwarf_variable_value.
1985         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1986         (class symbol_needs_eval_context): Likewise.
1987         (indirect_synthetic_pointer): Add forward declaration.
1988         (sect_variable_value): New function.
1989         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1990         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1991         for DW_OP_GNU_variable_value.
1992
1993 2018-08-16  Tom Tromey  <tom@tromey.com>
1994
1995         * top.c (read_command_file): Update.
1996         (command_line_input): Remove "repeat" argument.
1997         * ada-lang.c (get_selections): Update.
1998         * linespec.c (decode_line_2): Update.
1999         * defs.h (command_line_input): Remove argument.
2000         * cli/cli-script.c (read_next_line): Update.
2001         * python/py-gdb-readline.c: Update.
2002
2003 2018-08-17  Tom Tromey  <tom@tromey.com>
2004
2005         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2006         command_line_input.
2007
2008 2018-08-15  Tom Tromey  <tom@tromey.com>
2009
2010         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2011
2012 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
2013
2014         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2015         If used, use find_pc_partial_function to find address range
2016         to disassemble.
2017         * mi/mi-main.c (mi_cmd_list_features): Report
2018         "data-disassemble-a-option" feature.
2019         * NEWS: Mention new -data-disassemble option -a.
2020
2021 2018-08-13  Tom Tromey  <tom@tromey.com>
2022
2023         * common/common-defs.h (_FORTIFY_SOURCE): Define.
2024
2025 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2026
2027         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2028         (aarch64_linux_collect_sve_regset): Likewise.
2029         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2030         * regcache.h (regcache_map_entry_size): New function.
2031
2032 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2033
2034         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2035         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2036         (SVE_HEADER_VL_LENGTH): Likewise.
2037         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2038         (SVE_HEADER_FLAGS_LENGTH): Likewise.
2039         (SVE_HEADER_RESERVED_LENGTH): Likewise.
2040         (SVE_HEADER_SIZE_OFFSET): Likewise.
2041         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2042         (SVE_HEADER_VL_OFFSET): Likewise.
2043         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2044         (SVE_HEADER_FLAGS_OFFSET): Likewise.
2045         (SVE_HEADER_RESERVED_OFFSET): Likewise.
2046         (SVE_HEADER_SIZE): Likewise.
2047         (aarch64_linux_core_read_vq): Add function.
2048         (aarch64_linux_core_read_description): Check for SVE section.
2049
2050 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2051
2052         * aarch64-fbsd-tdep.c
2053         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2054         collect_size.
2055         * aarch64-linux-tdep.c
2056         (aarch64_linux_iterate_over_regset_sections): Likewise.
2057         * alpha-linux-tdep.c
2058         (alpha_linux_iterate_over_regset_sections):
2059         * alpha-nbsd-tdep.c
2060         (alphanbsd_iterate_over_regset_sections): Likewise.
2061         * amd64-fbsd-tdep.c
2062         (amd64fbsd_iterate_over_regset_sections): Likewise.
2063         * amd64-linux-tdep.c
2064         (amd64_linux_iterate_over_regset_sections): Likewise.
2065         * arm-bsd-tdep.c
2066         (armbsd_iterate_over_regset_sections): Likewise.
2067         * arm-fbsd-tdep.c
2068         (arm_fbsd_iterate_over_regset_sections): Likewise.
2069         * arm-linux-tdep.c
2070         (arm_linux_iterate_over_regset_sections): Likewise.
2071         * corelow.c (get_core_registers_cb): Likewise.
2072         (core_target::fetch_registers): Likewise.
2073         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2074         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2075         * gdbarch.h (void): Regenerate.
2076         * gdbarch.sh: Add supply_size and collect_size.
2077         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2078         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2079         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2080         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2081         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2082         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2083         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2084         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2085         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2086         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2087         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2088         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2089         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2090         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2091         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2092         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2093         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2094         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2095         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2096         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2097         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2098         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2099         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2100         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2101         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2102         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2103         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2104         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2105         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2106         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2107
2108 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
2109
2110         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2111         with string_printf.
2112
2113 2018-08-10  Keith Seitz  <keiths@redhat.com>
2114
2115         * compile/compile-c-support.c (add_code_header, add_code_footer):
2116         Move into policy class.
2117         (c_push_user_expression, pop_user_expression_nop)
2118         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2119         (compile_program): New host class.
2120         (c_compile_program): New typedef.
2121         (c_compute_porgram): Use c_compile_program.
2122
2123 2018-08-10  Keith Seitz  <keiths@redhat.com>
2124
2125         * compile/compile-internal.h (compile_instance::~compile_instance):
2126         Remove calls to htab_delete.
2127         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2128         * compile.c (compile_instance::compile_instance): Initialize
2129         htab unique pointers.
2130         (compile_instance::get_cached_type, compile_instance::insert_type)
2131         (compile_instance::error_symbol_once): Update for unique_ptr.
2132
2133 2018-08-10  Keith Seitz  <keiths@redhat.com>
2134
2135         * compile/compile-c-symbols.c (struct symbol_error)
2136         (hash_symbol_error, eq_symbol_error, del_symbol_error)
2137         (compile_instance::insert_symbol_error)
2138         (compile_instance::error_symbol_once): Move to ...
2139         * compile/compile.c: ... here.
2140
2141 2018-08-10  Keith Seitz  <keiths@redhat.com>
2142
2143         * compile/compile-c-support.c (c_get_compile_context): Use `new'
2144         instead of `new_compile_instance'.
2145         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2146         Update description.
2147         If the symbol error map is not initialized, create it.
2148         (generate_c_for_for_one_symbol): Do not check/initialize
2149         the symbol error map.
2150         * compile/compile-c-types.c (compile_c_instance): Make a class.
2151         Update all callers.
2152         (compile_instance::compile_instance): Initialize the type cache.
2153         (get_cached_type): New function.
2154         (insert_type): Update description.
2155         (compile_c_instance::m_default_cflags): Define.
2156         (convert_type): Update description.  Use get_cached_type.
2157         (delete_instance): Moved to destructor.
2158         (new_compile_instance): Moved to constructor.
2159         * compile/compile-c.h (compile_c_instance): Make class inheriting
2160         from compile_instance.
2161         <base>: Remove field.
2162         <type_map, symbol_err_map>: Move to base class.
2163         <c_plugin>: Rename to `m_plugin' and remove pointer type.
2164         * compile/compile-internal.h (compile_instance): Make class.
2165         <type_map_t, symbol_err_map_t>: Define.
2166         <fe>: Rename to `m_gcc_fe'.
2167         <scope, block, gcc_target_options>: Add `m_' prefix.
2168         <m_type_map, m_symbol_err_map>: New fields, moved from
2169         compile_c_instance.
2170         <destroy>: Remove.
2171         (convert_type, new_compile_instance): Remove.
2172         * compile/compile.c (cleanup_compile_instance): Remove.
2173         (compile_to_object): Use unique_ptr to eliminate cleanups.
2174         (compile_instance::set_print_callback, compile_instance::version)
2175         (compile_instance::set_verbose)
2176         (compile_instance::set_driver_filename)
2177         (compile_instance::set_triplet_regexp)
2178         (compile_instance::set_arguments)
2179         (compile_instance::set_source_file)
2180         (compile_instance::compile): Define.
2181
2182 2018-08-10  Keith Seitz  <keiths@redhat.com>
2183
2184         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2185         * compile/compile-c-types.c: Define GCC_METHODN macros and include
2186         gcc-c-fe.def to define C plugin.
2187         (delete_instance): Delete `c_plugin'.
2188         (new_compile_instance): Initialize `c_plugin'.
2189         * compile/compile-c.h: Include gcc_c_plugin.h.
2190         (struct compile_c_instance) <c_plugin>: New member.
2191         * gcc-c-plugin.h: New file.
2192         Update all callers with API change.
2193
2194 2018-08-10  Keith Seitz  <keiths@redhat.com>
2195
2196         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2197         (HFILES_NO_SRCDIR): ... to here.
2198         Add compile-internal.h and compile-c.h.
2199         * compile/compile-c-support.c: Include compile-c.h.
2200         * compile/compile-c-symbols.c: Include compile-c.h.
2201         (generate_c_for_variable_locations): Update comment.
2202         * compile/compile-c-types.c: Include compile-c.h.
2203         * compile/compile-c.h: New file -- moved C language declarations
2204         from other files here.
2205         * compile/compile-internal.h: Do not include hashtab.h or
2206         common/enum-flags.h.
2207         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2208         (gcc_convert_symbol, gcc_symbol_address)
2209         (generate_c_for_variable_locations, c_get_mode_for_size)
2210         (c_get_range_decl_name): Definitions moved to compile-c.h.
2211         * compile/compile-loc2c.c: Include compile-c.h.
2212
2213 2018-08-10  Keith Seitz  <keiths@redhat.com>
2214
2215         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2216         (c_symbol_substitution_name): ... this.
2217         Update all callers.
2218
2219 2018-08-10  Keith Seitz  <keiths@redhat.com>
2220
2221         * compile/compile-c-support.c (c_compute_program): Use
2222         unique_xmalloc_ptr to eliminate cleanup.
2223         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2224         Return a unique_xmalloc_ptr and eliminate cleanup.
2225         * compile/compile-internal.h (generate_c_for_variable_locations):
2226         Return unique_xmalloc_ptr and update description.
2227
2228 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
2229
2230         * corelow.c (core_target::get_core_register_section): Rename
2231         min_size to section_min_size.
2232
2233 2018-08-09  Jim Wilson  <jimw@sifive.com>
2234
2235         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2236         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2237         * NEWS: Mention new GNU/Linux RISC-V target.
2238         * configure.host: Add riscv*-*-linux*.
2239         * configure.nat: Add riscv*.
2240         * configure.tgt: Add riscv*-*-linux*.
2241         * riscv-linux-nat.c: New file.
2242         * riscv-linux-tdep.c: New file.
2243
2244 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2245
2246         * infrun.c (resume): Make static, add forward declaration.
2247         (proceed): Update header comment.
2248         * infrun.h (resume): Delete declaration.
2249
2250 2018-08-09  Tom Tromey  <tom@tromey.com>
2251
2252         * riscv-tdep.h: Minor formatting fixes.
2253
2254 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
2255
2256         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2257         * dwarf-index-cache.c (create_dir_and_check): Likewise.
2258         (test_mkdir_recursive): Likewise.
2259         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2260
2261 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2262
2263         * valarith.c (value_subscripted_rvalue): If an array is not in
2264         memory, and we don't know the upper bound, then we can't know that
2265         the requested element exists or not.
2266
2267 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
2268
2269         * target.c (str_comma_list_concat_elem): Fix typo in comment.
2270         (target_options_to_string): Add comment.
2271
2272 2018-08-08  Tom Tromey  <tom@tromey.com>
2273
2274         * unittests/scoped_mmap-selftests.c: Check result of "write".
2275
2276 2018-08-08  Jim Wilson  <jimw@sifive.com>
2277
2278         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2279         (decode_register_index_short): New.
2280         (decode_j_type_insn, decode_cj_type_insn): New.
2281         (decode_b_type_insn, decode_cb_type_insn): New.
2282         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
2283         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
2284         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2285         is_c_sw_insn instead of is_sw_insn.
2286         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2287         (riscv_software_single_step): New.
2288         * riscv-tdep.h (riscv_software_single_step): Declare.
2289
2290         * riscv-tdep.c (riscv_isa_xlen): Drop static.
2291         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2292
2293 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2294
2295         PR gdb/18050:
2296         * target.c (dispose_inferior): Don't dispose of inferiors that are
2297         already killed.
2298
2299 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2300
2301         * remote.c (remote_target::download_tracepoint): Change char* to
2302         const char*.
2303
2304 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
2305
2306         * target.h (target_options_to_string): Return an std::string.
2307         * target.c (str_comma_list_concat_elem): Return void, use
2308         std::string.
2309         (do_option): Likewise.
2310         (target_options_to_string): Return an std::string.
2311         * linux-nat.c (linux_nat_target::wait): Adjust.
2312         * target-debug.h (target_debug_print_options): Adjust.
2313
2314 2018-08-07  Tom Tromey  <tom@tromey.com>
2315
2316         * Makefile.in (CPPFLAGS): New variable.
2317         (INTERNAL_CPPFLAGS): Use it.
2318
2319 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2320
2321         * NEWS: Mention the index cache.
2322
2323 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2324
2325         * common/pathstuff.h (get_standard_cache_dir): New.
2326         * common/pathstuff.c (get_standard_cache_dir): New.
2327         * build-id.h (build_id_to_string): New.
2328         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2329         DEBUG_STR_SUFFIX): Move to here.
2330         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2331         DEBUG_STR_SUFFIX): Move from there.
2332         (write_psymtabs_to_index): Make non-static, add basename
2333         parameter.  Write to temporary files, rename when done.
2334         (save_gdb_index_command): Adjust call to
2335         write_psymtabs_to_index.
2336         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2337         field.
2338         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2339         (get_gdb_index_contents_from_cache): New.
2340         (get_gdb_index_contents_from_cache_dwz): New.
2341         (dwarf2_initialize_objfile): Read index from cache.
2342         (dwarf2_build_psymtabs): Save to index.
2343         * dwarf-index-cache.h: New file.
2344         * dwarf-index-cache.c: New file.
2345         * dwarf-index-write.h: New file.
2346
2347 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2348
2349         * gnulib/aclocal.m4: Re-generate.
2350         * gnulib/config.in: Re-generate.
2351         * gnulib/configure: Re-generate.
2352         * gnulib/import/Makefile.am: Re-generate.
2353         * gnulib/import/Makefile.in: Re-generate.
2354         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2355         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2356         * gnulib/import/m4/mkdir.m4: New file.
2357         * gnulib/import/mkdir.c: New file.
2358         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2359         module.
2360
2361 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2362
2363         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2364         * common/scoped_mmap.c: New file.
2365         * common/scoped_mmap.h (destroy): New method.
2366         (~scoped_mmap, reset): Use destroy.
2367         (scoped_mmap): New move constructor.
2368         (mmap_file): New declaration.
2369         * unittests/scoped_mmap-selftests.c (test_normal,
2370         test_invalid_filename, run_tests): New functions.
2371         (_initialize_scoped_mmap_selftests): Register selftest.
2372
2373 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2374
2375         * dwarf2read.c (read_gdb_index_from_section): Rename to...
2376         (read_gdb_index_from_buffer): ... this.  Remove section
2377         parameter, add buffer parameter.
2378         (get_gdb_index_contents_ftype,
2379         get_gdb_index_contents_dwz_ftype): New typedefs.
2380         (dwarf2_read_gdb_index): Add callback parameters to get the
2381         index contents.
2382         (get_gdb_index_contents_from_section): New.
2383         (dwarf2_initialize_objfile): Update call to
2384         dwarf2_read_gdb_index.
2385
2386 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2387
2388         * common/filestuff.h (gdb_fopen_cloexec): New overload.
2389         (gdb_open_cloexec): Likewise.
2390         * nat/linux-osdata.c (command_from_pid): Use string_printf.
2391         (commandline_from_pid): Likewise.
2392         (linux_xfer_osdata_threads): Likewise.
2393         (linux_xfer_osdata_fds): Likewise.
2394         * ada-lang.c (is_package_name): Likewise.
2395         * auxv.c (procfs_xfer_auxv): Likewise.
2396         * breakpoint.c (print_one_breakpoint_location): Use
2397         uiout::field_fmt.
2398         (print_one_catch_solib): Use string_printf.
2399         * coff-pe-read.c (add_pe_exported_sym): Likewise.
2400         (add_pe_forwarded_sym): Likewise.
2401         * dwarf2read.c (create_type_unit_group): Likewise.
2402         (build_error_marker_type): Likewise.
2403         * infcall.c (get_function_name): Likewise.
2404         * valprint.c (print_converted_chars_to_obstack): Likewise.
2405         * xtensa-tdep.c (xtensa_register_type): Likewise.
2406
2407 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
2408
2409         * remote.c (remote_target::download_tracepoint): Fix format
2410         string errors.
2411
2412 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2413
2414         * tracefile.c: Include common/byte-vector.h.
2415         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
2416         with trace_regblock_size if needed.  Update uses of buf.
2417
2418 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2419
2420         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2421         std::vector<unsigned char>.
2422         * tracepoint.c (collection_list::collection_list): Remove
2423         m_regs_mask initializer from initializer list.  Resize
2424         m_regs_mask using the largest remote register number.
2425         (collection_list::add_remote_register): Remove size check on
2426         m_regs_mask.  Use at to access element.
2427         (collection_list::stringify): Change type of temp_buf to
2428         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
2429         stringify the register mask.  Use pack_hex_byte for the register
2430         mask.
2431
2432 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2433
2434         * tracepoint.h (class collection_list) <add_register>: Remove.
2435         <add_remote_register, add_ax_registers, add_local_register>:
2436         Declare.
2437         <add_memrange>: Add scope parameter.
2438         * tracepoint.c (encode_actions_1): Likewise.
2439         (collection_list::add_register): Rename to ...
2440         (collection_list::add_remote_register): ... this.  Update
2441         comment.
2442         (collection_list::add_ax_registers, add_local_register): New
2443         methods.
2444         (collection_list::add_memrange): Add scope parameter.  Call
2445         add_local_register instead of add_register.
2446         (finalize_tracepoint_aexpr): New function.
2447         (collection_list::collect_symbol): Update calls to add_memrange.
2448         Call add_local_register instead of add_register.  Call
2449         add_ax_registers.  Call finalize_tracepoint_aexpr.
2450         (encode_actions_1): Get remote regnos for $reg action.  Call
2451         add_remote_register, add_ax_registers, and add_local_register.
2452         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
2453         (validate_actionline): Call finalize_tracepoint_aexpr.
2454
2455 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2456
2457         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2458         Replace array buf with gdb::char_vector buf, of size
2459         get_remote_packet_size ().  Replace references to buf and
2460         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
2461         and xsnprintf with snprintf.  Raise errors if the buffer is too
2462         small.
2463
2464 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2465
2466         * remote.c (remote_target::download_tracepoint): Fix the has_more
2467         predicate in the QTDP action list iteration.
2468
2469 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2470
2471         * remote.c (remote_target::download_tracepoint): Fix indentation
2472         in for block.
2473
2474 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2475
2476         * proc-api.c (_initialize_proc_api): Remove c, unused.
2477         * procfs.c (procfs_init_inferior): Remove signals, unused.
2478         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2479         unused.
2480
2481 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
2482             Andrew Burgess  <andrew.burgess@embecosm.com>
2483
2484         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2485         'W_STOPCODE (0)' as this could be ambiguous.
2486
2487 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2488
2489         * ser-tcp.c (net_open): Fix thinko when deciding whether to
2490         disable TCP's Nagle algorithm (use "ai_protocol" instead of
2491         "ai_socktype").
2492
2493 2018-08-02  Tom Tromey  <tom@tromey.com>
2494
2495         PR symtab/16842.
2496         * dwarf2read.c (read_func_scope): Set symtab on template parameter
2497         symbols.
2498         (process_structure_scope): Likewise.
2499
2500 2018-08-02  Xavier Roirand  <roirand@adacore.com>
2501
2502         PR gdb/22629:
2503         * darwin-nat.c (darwin_kill_inferior): Fix handling of
2504         kill inferior.
2505
2506 2018-08-02  Tom Tromey  <tom@tromey.com>
2507
2508         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2509         (darwin_suspend_inferior, darwin_resume_inferior)
2510         (darwin_decode_notify_message, darwin_resume_inferior_threads)
2511         (darwin_check_new_threads): Check result of get_darwin_inferior.
2512
2513 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
2514
2515         GDB 8.1.1 released.
2516
2517 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
2518
2519         * varobj.c (varobj_get_path_expr_parent): Report an error if
2520         parent is a dynamic varobj.
2521
2522 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2523
2524         * gnulib/aclocal.m4: Re-generate.
2525         * gnulib/config.in: Re-generate.
2526         * gnulib/configure: Re-generate.
2527         * gnulib/import/Makefile.in: Re-generate.
2528         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2529         * gnulib/import/m4/onceonly.m4: Re-generate.
2530
2531 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2532
2533         * target-descriptions.c (struct xml_test_tdesc): New.
2534         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2535         (record_xml_tdesc): Update.
2536         (maintenance_check_xml_descriptions): Update.
2537         * target-descriptions.h (record_xml_tdesc): Update comment.
2538
2539 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2540
2541         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2542         checking array bounds are defined.
2543
2544 2018-07-30  Tom Tromey  <tom@tromey.com>
2545
2546         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2547         irreflexivity violation.
2548
2549 2018-07-30  Tom Tromey  <tom@tromey.com>
2550
2551         * cli/cli-decode.c (lookup_cmd): Remove lint code.
2552         * value.c (unpack_long): Remove lint code.
2553         * valops.c (value_ind): Remove lint code.
2554         * valarith.c (value_x_binop, value_x_unop, value_equal)
2555         (value_pos): Remove lint code.
2556
2557 2018-07-28  Tom de Vries  <tdevries@suse.de>
2558
2559         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2560         with undefined upper bound as <optimized out>.
2561
2562 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
2563
2564         * gcore.in: Rename variable "name" to "prefix".  Expand
2565         "usage" text.
2566
2567 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
2568
2569         * windows-nat.c (windows_nat_target::create_inferior): Update to
2570         call close() in global namespace.
2571
2572 2018-07-26  Tom Tromey  <tom@tromey.com>
2573
2574         * dwarf-index-write.c (add_address_entry): Don't add objfile
2575         offsets.
2576         * dbxread.c (find_stab_function): Rename from
2577         find_stab_function_addr.  Return a bound_minimal_symbol.
2578         (read_dbx_symtab): Use raw_text_low, raw_text_high.
2579         Don't add objfile offsets.
2580         (end_psymtab): Use raw_text_low, raw_text_high,
2581         MSYMBOL_VALUE_RAW_ADDRESS.
2582         (read_ofile_symtab): Update.
2583         (process_one_symbol): Update.
2584         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2585         offsets.
2586         (dw2_relocate): Remove.
2587         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2588         searching addrmap.
2589         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2590         Update.
2591         (process_psymtab_comp_unit_reader, add_partial_symbol)
2592         (add_partial_subprogram, dwarf2_ranges_read): Update.
2593         (load_partial_dies): Update.
2594         (add_address_entry): Don't add objfile offsets.
2595         (dwarf2_build_include_psymtabs): Update.
2596         (create_addrmap_from_aranges): Don't add objfile offsets.
2597         (dw2_find_pc_sect_compunit_symtab): Update.
2598         * mdebugread.c (parse_symbol): Don't add objfile offsets.
2599         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2600         Update.
2601         (parse_partial_symbols): Don't add objfile offsets.  Use
2602         raw_text_low, raw_text_high.  Update.
2603         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2604         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2605         or call 'relocate' quick function.  Clear psymbol_map.
2606         * psympriv.h (struct partial_symbol) <address>: Add section
2607         offset.
2608         <set_unrelocated_address>: Rename from set_address.
2609         <raw_text_low, raw_text_high>: New methods.
2610         <text_low, text_high>: Add objfile parameter.
2611         (add_psymbol_to_bcache): Add 'section' parameter.  Call
2612         set_unrelocated_address.
2613         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2614         (find_pc_psymbol): Update.
2615         (fixup_psymbol_section, relocate_psymtabs): Remove.
2616         (dump_psymtab, psym_functions): Update.
2617         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2618         parameter.
2619         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2620         (start_psymtab_common): Update.
2621         * symfile-debug.c (debug_qf_relocate): Remove.
2622         (debug_sym_quick_functions): Update.
2623         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2624         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2625         Update.
2626
2627 2018-07-26  Tom Tromey  <tromey@redhat.com>
2628
2629         * dbxread.c (end_psymtab): Use text_high_valid and
2630         text_low_valid.
2631         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2632         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2633         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2634         Update comment.
2635         <text_low_valid, text_high_valid>: New fields.
2636         <set_text_low, set_text_high>: Update.
2637         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2638
2639 2018-07-26  Tom Tromey  <tom@tromey.com>
2640
2641         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2642         Update.
2643         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2644         textlow and texthigh fields.
2645         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2646         Update.
2647         * mdebugread.c (parse_lines, parse_partial_symbols)
2648         (psymtab_to_symtab_1): Update.
2649         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2650         Rename fields.  Update comment.  Now private.
2651         <text_low, text_high, set_text_low, set_text_high>: New methods.
2652         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2653         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2654         (start_psymtab_common, maintenance_info_psymtabs)
2655         (maintenance_check_psymtabs): Update.
2656         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2657         texthigh fields.
2658         (scan_xcoff_symtab): Update.
2659
2660 2018-07-26  Tom Tromey  <tromey@redhat.com>
2661
2662         * psympriv.h (struct partial_symbol) <unrelocated_address,
2663         address, set_address>: New methods.
2664         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2665         (fixup_psymbol_section, relocate_psymtabs): Update.
2666         (print_partial_symbols): Add 'objfile' parameter.  Update.
2667         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2668         Update.
2669
2670 2018-07-26  Tom Tromey  <tom@tromey.com>
2671
2672         * dwarf-index-write.c (write_psymbols, debug_names::insert)
2673         (debug_names::write_psymbols): Update.
2674         * psympriv.h (struct partial_symbol): Derive from
2675         general_symbol_info.
2676         <obj_section>: New method.
2677         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2678         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2679         (find_pc_sect_psymbol, fixup_psymbol_section)
2680         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2681         (print_partial_symbols, recursively_search_psymtabs)
2682         (compare_psymbols, psymbol_hash, psymbol_compare)
2683         (add_psymbol_to_bcache, maintenance_check_psymtabs)
2684         (psymbol_name_matches, psym_fill_psymbol_map): Update.
2685
2686 2018-07-26  Tom Tromey  <tromey@redhat.com>
2687
2688         * dbxread.c (end_psymtab): Remove dead code.
2689
2690 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2691
2692         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2693         DWARF unwinders are disabled.
2694         * dwarf2-frame.c: Add dwarf2read.h include.
2695         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2696         disabled.
2697         (dwarf2_frame_unwinders_enabled_p): Define.
2698         (show_dwarf_unwinders_enabled_p): New function.
2699         (_initialize_dwarf2_frame): Register switch to control DWARF
2700         unwinder use.
2701         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2702         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2703         (show_dwarf_cmdlist): Remove static keyword.
2704         * dwarf2read.h (set_dwarf_cmdlist): Declare.
2705         (show_dwarf_cmdlist): Declare.
2706         * NEWS: Document new feature.
2707
2708 2018-07-26  Tom de Vries  <tdevries@suse.de>
2709
2710         PR breakpoints/23366
2711         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2712
2713 2018-07-26  Tom de Vries  <tdevries@suse.de>
2714
2715         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2716         DW_AT_count can't be translated to a dynamic prop.
2717
2718 2018-07-25  Tom de Vries  <tdevries@suse.de>
2719
2720         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2721         try/catch.
2722
2723 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
2724
2725         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2726
2727 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
2728
2729         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2730
2731 2018-07-24  Keith Seitz  <keiths@redhat.comt
2732
2733         PR symtab/23010
2734         * dwarf2read.c (dw2_add_symbol_to_list): New function.
2735         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2736         instead of add_symbol_to_list.
2737         (read_file_scope): Call prepare_one_comp_unit before reading
2738         any other DIEs.
2739
2740 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
2741
2742         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2743
2744 2018-07-24  Tom Tromey  <tom@tromey.com>
2745
2746         * utils.c (malloc, realloc, free): Don't declare.
2747         * configure, config.in: Rebuild.
2748         * configure.ac: Don't check for declarations of free, malloc, or
2749         realloc.
2750
2751 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2752
2753         * aarch64-linux-nat.c
2754         (aarch64_linux_nat_target::stopped_data_address): Remove unused
2755         variable.
2756         * arm-linux-nat.c (fetch_regs): Likewise.
2757         (store_regs): Likewise.
2758         (fetch_vfp_regs): Likewise.
2759         (store_vfp_regs): Likewise.
2760         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2761         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2762         (arm_linux_nat_target::insert_watchpoint): Likewise.
2763         (arm_linux_nat_target::remove_watchpoint): Likewise.
2764         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2765         Likewise.
2766         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2767         Likewise.
2768         * ppc-linux-nat.c (fetch_register): Likewise.
2769         (fetch_all_gp_regs): Likewise.
2770         (fetch_ppc_registers): Likewise.
2771         (store_all_gp_regs): Likewise.
2772         (store_ppc_registers): Likewise.
2773         (hwdebug_insert_point): Likewise.
2774         (can_use_watchpoint_cond_accel): Likewise.
2775         * remote-sim.c (gdb_os_write_stdout): Likewise.
2776
2777 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2778             Tom Tromey  <tom@tromey.com>
2779
2780         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2781         test for it.
2782         * configure: Rebuild.
2783
2784 2018-07-22  Tom Tromey  <tom@tromey.com>
2785
2786         * regformats/regdat.sh: Define xmltarget_${name} inside
2787         #ifndef IN_PROCESS_AGENT.
2788
2789 2018-07-22  Tom Tromey  <tom@tromey.com>
2790
2791         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2792
2793 2018-07-22  Tom Tromey  <tom@tromey.com>
2794
2795         * symfile.c (reread_symbols): Notify iter, not objfile.
2796
2797 2018-07-22  Tom Tromey  <tom@tromey.com>
2798
2799         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2800         Use arch_ops.
2801         (ravenscar_thread_target::prepare_to_store): Likewise.
2802
2803 2018-07-22  Tom Tromey  <tom@tromey.com>
2804
2805         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2806         unused variable.  Call value_fetch_lazy when needed.
2807         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2808         Remove unused variable.  Call value_fetch_lazy when needed.
2809
2810 2018-07-22  Tom Tromey  <tom@tromey.com>
2811
2812         * m32c-tdep.c (mark_dma): Return void.
2813         (make_regs): Remove unused declarations.
2814
2815 2018-07-22  Tom Tromey  <tom@tromey.com>
2816
2817         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2818         cmdscm_get_valid_command_smob_arg_unsafe for effect.
2819         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2820         bkscm_get_valid_block_smob_arg_unsafe for effect.
2821
2822 2018-07-22  Tom Tromey  <tom@tromey.com>
2823
2824         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2825         value_type.
2826
2827 2018-07-22  Tom Tromey  <tom@tromey.com>
2828
2829         * windows-nat.c (saved_context): Conditionally define.
2830         * remote.c (remote_target::remote_btrace_maybe_reopen):
2831         Conditionally declare "warned".
2832         * inflow.c (sigquit_ours): Conditionally define.
2833         (new_tty): Move "tty" declaration inside #if.
2834         * guile/guile.c (guile_datadir): Conditionally define.
2835         * charset.c (set_be_le_names): Move some declarations inside #if.
2836         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2837         #if.
2838         (parse_xml_btrace_conf): Likewise.
2839
2840 2018-07-22  Tom Tromey  <tom@tromey.com>
2841
2842         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2843
2844 2018-07-22  Tom Tromey  <tom@tromey.com>
2845
2846         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2847         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2848         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2849         * buildsym-legacy.c (get_macro_table): Remove unused variable.
2850         * stack.c (frame_apply_level_command): Remove unused variable.
2851         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2852         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2853         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2854         unused variable.
2855         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2856         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2857         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2858         variable.
2859         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2860         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2861         variable.
2862         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2863         Remove unused variable.
2864         * cli/cli-script.c (recurse_read_control_structure): Remove unused
2865         variable.
2866         * common/tdesc.c (print_xml_feature::visit): Remove unused
2867         variable.
2868         * compile/compile-object-load.c (store_regs): Remove unused
2869         variables.
2870         * complaints.c (clear_complaints): Remove unused variable.
2871         * corelow.c (core_target_open): Remove unused variable.
2872         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2873         variable.
2874         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2875         variable.
2876         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2877         variable.
2878         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2879         variable.
2880         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2881         variable.
2882         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2883         variable.
2884         * ia64-tdep.c (examine_prologue): Remove unused variable.
2885         * infcall.c (run_inferior_call): Remove unused variable.
2886         * inferior.c (exit_inferior): Remove unused variable.
2887         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2888         * linespec.c (decode_line_2): Remove unused variable.
2889         * linux-nat.c (super_close): Remove.
2890         * linux-tdep.c (linux_info_proc): Remove unused variable.
2891         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2892         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2893         Remove unused variable.
2894         * parse.c (find_minsym_type_and_address): Remove unused variable.
2895         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2896         variable.
2897         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2898         variable.
2899         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2900         variables.
2901         * record-btrace.c (record_btrace_target::store_registers): Remove
2902         unused variable.
2903         (cmd_show_record_btrace_cpu): Remove unused variable.
2904         * riscv-tdep.c (riscv_register_reggroup_p)
2905         (riscv_push_dummy_call, riscv_return_value): Remove unused
2906         variable.
2907         * rust-exp.y (literal): Remove unused variable.
2908         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2909         unused variable.
2910         <STRUCTOP_ANONYMOUS>: Likewise.
2911         * s390-linux-tdep.c (s390_linux_init_abi_31)
2912         (s390_linux_init_abi_64): Remove unused variable.
2913         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2914         (file_select_thread, net_windows_open, _initialize_ser_windows):
2915         Remove unused variables.
2916         * symtab.c (find_pc_sect_line): Remove unused variable.
2917         * target-memory.c (compute_garbled_blocks): Remove unused
2918         variable.
2919         (target_write_memory_blocks): Remove unused variable.
2920         * target.c (target_stack::unpush): Remove unused variables.
2921         * tracepoint.c (start_tracing, all_tracepoint_actions)
2922         (merge_uploaded_trace_state_variables)
2923         (print_one_static_tracepoint_marker): Remove unused variable.
2924         * unittests/basic_string_view/element_access/char/1.cc (test01):
2925         Remove unused variable.
2926         * windows-nat.c (windows_continue, windows_add_all_dlls)
2927         (do_initial_windows_stuff, windows_nat_target::create_inferior):
2928         Remove unused variables.
2929
2930 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
2931
2932         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2933         attr_profile in HAVE_ELF.
2934         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2935         HAVE_ELF.
2936
2937 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
2938
2939         * frame.c (frame_register_unwind): Change parameter name.
2940         (frame_unwind_register): Likewise.
2941         (frame_unwind_register_value): Likewise.
2942         (frame_unwind_register_signed): Likewise.
2943         (frame_unwind_register_unsigned): Likewise.
2944         * frame.h (frame_register_unwind): Likewise.
2945         (frame_unwind_register): Likewise.
2946         (frame_unwind_register_value): Likewise.
2947         (frame_unwind_register_signed): Likewise.
2948         (frame_unwind_register_unsigned): Likewise.
2949         (frame_unwind_arch): Likewise.
2950
2951 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2952
2953         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2954         ISA maintenance.
2955
2956 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
2957
2958         * mips-linux-nat.c (mips_linux_nat_target::read_description):
2959         Call `get_ptrace_pid' rather than extracting the ptrace PID by
2960         hand.
2961
2962 2018-07-20  Keith Seitz  <keiths@redhat.com>
2963
2964         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2965         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2966         m_compunit_symtab, m_language>: Add "m_" prefix.
2967         Update all uses.
2968         * buildsym.c: Update all uses.
2969
2970 2018-07-20  Tom Tromey  <tom@tromey.com>
2971
2972         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2973         * buildsym.h (record_line_ftype): Remove typedef.
2974
2975 2018-07-20  Tom Tromey  <tom@tromey.com>
2976
2977         * buildsym-legacy.h (augment_type_symtab): Don't declare.
2978         (end_expandable_symtab): Likewise.
2979         (end_symtab_get_static_block): Likewise.
2980         (end_symtab_from_static_block): Likewise.
2981         * buildsym-legacy.c (augment_type_symtab): Remove.
2982         (end_expandable_symtab): Remove.
2983         (end_symtab_get_static_block): Remove.
2984         (end_symtab_from_static_block): Remove.
2985
2986 2018-07-20  Tom Tromey  <tom@tromey.com>
2987
2988         * dwarf2read.c: Include buildsym.h.
2989         (struct dwarf2_cu) <builder>: New method.
2990         (fixup_go_packaging): Update.
2991         (process_full_comp_unit, process_full_type_unit): Update.  Don't
2992         use scoped_free_pendings.
2993         (using_directives): Add "cu" parameter, remove "language".
2994         (read_import_statement, setup_type_unit_groups, )
2995         (read_func_scope, read_lexical_block_scope)
2996         (dwarf2_record_block_ranges, read_namespace): Update.
2997         (lnp_state_machine::lnp_state_machine): Add cu parameter.
2998         (lnp_state_machine::handle_end_sequence): Update.
2999         (class lnp_state_machine) <m_cu>: New member.
3000         <m_record_line_callback>: Remove.
3001         <m_currently_recording_lines>: New member.
3002         (lnp_state_machine::handle_set_file): Update.
3003         (noop_record_line): Remove.
3004         (dwarf_record_line_p): Add cu parameter.
3005         (dwarf_record_line_1, dwarf_finish_line): Likewise.
3006         (lnp_state_machine::record_line)
3007         (lnp_state_machine::lnp_state_machine)
3008         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3009         (dwarf_decode_lines): Update.
3010         (dwarf2_start_subfile): Add cu parameter.
3011         (dwarf2_start_symtab, new_symbol): Update.
3012         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3013         Remove dwarf2_per_objfile parameter.
3014         (dwarf_decode_macros): Update.
3015
3016 2018-07-20  Tom Tromey  <tom@tromey.com>
3017
3018         * stabsread.c (define_symbol): Update.
3019         * buildsym-legacy.h (get_buildsym_compunit): Declare.
3020         * dwarf2read.c (new_symbol): Update.
3021         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3022         * cp-namespace.c: Include buildsym.h.
3023         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3024         * buildsym-legacy.c (get_buildsym_compunit): New function.
3025
3026 2018-07-20  Tom Tromey  <tom@tromey.com>
3027
3028         * xcoffread.c: Include buildsym-legacy.h.
3029         * windows-nat.c: Include buildsym-legacy.h.
3030         * stabsread.c: Include buildsym-legacy.h.
3031         * mdebugread.c: Include buildsym-legacy.h.
3032         * buildsym-legacy.h: New file.
3033         * buildsym-legacy.c: New file, from buildsym.c.
3034         * go32-nat.c: Include buildsym-legacy.h.
3035         * dwarf2read.c: Include buildsym-legacy.h.
3036         * dbxread.c: Include buildsym-legacy.h.
3037         * cp-namespace.c: Include buildsym-legacy.h.
3038         * coffread.c: Include buildsym-legacy.h.
3039         * buildsym.h: Move some contents to buildsym-legacy.h.
3040         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
3041         buildsym-legacy.c.
3042         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3043
3044 2018-07-20  Tom Tromey  <tom@tromey.com>
3045
3046         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3047         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3048         (buildsym_compunit::buildsym_compunit)
3049         (buildsym_compunit::~buildsym_compunit)
3050         (buildsym_compunit::get_macro_table): Define.
3051
3052 2018-07-20  Tom Tromey  <tom@tromey.com>
3053
3054         * buildsym.c (reset_symtab_globals): Remove.
3055         (buildsym_compunit::end_symtab_from_static_block): Update.
3056         (buildsym_compunit::augment_type_symtab): Update.
3057         (end_symtab_from_static_block): Call free_buildsym_compunit.
3058         (augment_type_symtab, end_symtab, end_expandable_symtab):
3059         Likewise.
3060
3061 2018-07-20  Tom Tromey  <tom@tromey.com>
3062
3063         * arch-utils.c: Do not include buildsym.h.
3064         * mipsread.c: Do not include buildsym.h.
3065         * machoread.c: Do not include buildsym.h.
3066         * elfread.c: Do not include buildsym.h.
3067
3068 2018-07-20  Tom Tromey  <tom@tromey.com>
3069
3070         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3071         initialization.
3072         (buildsym_compunit): Add new constructor.
3073         (struct buildsym_compunit) <get_last_source_file, finish_block,
3074         record_block_range, start_subfile, patch_subfile_names,
3075         push_subfile, pop_subfile, record_line, get_compunit_symtab,
3076         set_last_source_start_addr, get_last_source_start_addr,
3077         get_local_using_directives, set_local_using_directives,
3078         get_global_using_directives, outermost_context_p,
3079         get_current_context_stack, get_context_stack_depth,
3080         get_current_subfile, get_local_symbols, get_file_symbols,
3081         get_global_symbols, record_debugformat, record_producer,
3082         push_context, pop_context, end_symtab_get_static_block,
3083         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3084         New public methods.
3085         <record_pending_block, finish_block_internal, make_blockvector,
3086         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3087         private methods.
3088         Update all users.
3089
3090 2018-05-22  Tom Tromey  <tom@tromey.com>
3091
3092         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3093         parameter.
3094         (finish_block_internal): Update.
3095
3096 2018-07-20  Tom Tromey  <tom@tromey.com>
3097
3098         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3099         parameter.
3100         (finish_block_internal): Update.
3101
3102 2018-07-20  Tom Tromey  <tom@tromey.com>
3103
3104         * buildsym.h (EXTERN): Don't define or undef.
3105         * buildsym.c (EXTERN): Don't define.
3106
3107 2018-07-20  Tom Tromey  <tom@tromey.com>
3108
3109         * buildsym.c: Remove TODO comment.
3110
3111 2018-07-20  Tom Tromey  <tom@tromey.com>
3112
3113         * coffread.c (coff_symtab_read): Update.
3114         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3115         (xcoff_new_init): Update.
3116         * mipsread.c (mipscoff_new_init): Update.
3117         * mdebugread.c (mdebug_build_psymtabs): Update.
3118         * elfread.c (elf_new_init): Update.
3119         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3120         Update.
3121         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3122         (coffstab_build_psymtabs, elfstab_build_psymtabs)
3123         (stabsect_build_psymtabs): Update.
3124         * buildsym.h (buildsym_init): Don't declare.
3125         * buildsym.c: Update comment.
3126         (prepare_for_building): Remove.
3127         (start_symtab, restart_symtab): Update.
3128         (reset_symtab_globals): Update comment.
3129         (buildsym_init): Remove.
3130
3131 2018-07-20  Tom Tromey  <tom@tromey.com>
3132
3133         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3134         * stabsread.c (patch_block_stabs, define_symbol, read_type)
3135         (read_enum_type, common_block_start, common_block_end)
3136         (cleanup_undefined_types_1, finish_global_stabs): Update.
3137         * mdebugread.c (psymtab_to_symtab_1): Update.
3138         * dwarf2read.c (fixup_go_packaging, read_func_scope)
3139         (read_lexical_block_scope, new_symbol): Update.
3140         * dbxread.c (process_one_symbol): Update.
3141         * coffread.c (coff_symtab_read, process_coff_symbol)
3142         (coff_read_enum_type): Update.
3143         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3144         declare.
3145         (get_local_symbols, get_file_symbols, get_global_symbols): New
3146         functions.
3147         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3148         m_global_symbols.
3149         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3150         (~scoped_free_pendings): Update.
3151         (finish_block, prepare_for_building, reset_symtab_globals)
3152         (end_symtab_get_static_block, end_symtab_with_blockvector)
3153         (augment_type_symtab, push_context): Update.
3154         (get_local_symbols, get_file_symbols, get_global_symbols): New
3155         functions.
3156         (buildsym_init): Update.
3157
3158 2018-07-20  Tom Tromey  <tom@tromey.com>
3159
3160         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3161         (process_full_type_unit): Likewise.
3162         (dwarf2_start_symtab): Set list_in_scope.
3163
3164 2018-07-20  Tom Tromey  <tom@tromey.com>
3165
3166         * dwarf2read.c (process_psymtab_comp_unit_reader)
3167         (build_type_psymtabs_reader): Do not set list_in_scope.
3168
3169 2018-07-20  Tom Tromey  <tom@tromey.com>
3170
3171         * buildsym.c (free_pendings): Remove.
3172         (add_symbol_to_list, scoped_free_pendings)
3173         (finish_block_internal, buildsym_init): Update.
3174
3175 2018-07-20  Tom Tromey  <tom@tromey.com>
3176
3177         * xcoffread.c (read_xcoff_symtab): Update.
3178         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3179         Update.
3180         * dbxread.c (process_one_symbol): Update.
3181         * coffread.c (coff_symtab_read): Update.
3182         * buildsym.h (finish_block): Update.
3183         * buildsym.c (finish_block): Remove "listhead" argument.
3184         (end_symtab_get_static_block): Update.
3185
3186 2018-07-20  Tom Tromey  <tom@tromey.com>
3187
3188         * buildsym.h (class scoped_free_pendings): Remove constructor.
3189         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3190         method.
3191         <m_pending_block_obstack, m_pending_blocks>: New members.
3192         (pending_block_obstack, pending_blocks): Remove.
3193         (scoped_free_pendings::scoped_free_pendings): Default.
3194         (~scoped_free_pendings): Update.
3195         (free_pending_blocks): Remove.
3196         (finish_block_internal, record_pending_block, make_blockvector)
3197         (end_symtab_get_static_block, augment_type_symtab, push_context)
3198         (buildsym_init): Update.
3199
3200 2018-07-20  Tom Tromey  <tom@tromey.com>
3201
3202         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3203         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3204         members.
3205         (pending_addrmap, pending_addrmap_obstack)
3206         (pending_addrmap_interesting): Remove.
3207         (scoped_free_pendings, record_block_range, make_blockvector)
3208         (prepare_for_building, reset_symtab_globals, buildsym_init):
3209         Update.
3210
3211 2018-07-20  Tom Tromey  <tom@tromey.com>
3212
3213         * xcoffread.c (process_linenos): Update.
3214         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3215         * mdebugread.c (psymtab_to_symtab_1): Update.
3216         * dwarf2read.c (setup_type_unit_groups)
3217         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3218         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3219         * dbxread.c (process_one_symbol): Update.
3220         * coffread.c (coff_symtab_read, enter_linenos)
3221         (process_coff_symbol): Update.
3222         * buildsym.h (current_subfile): Don't declare.
3223         (get_current_subfile): Declare.
3224         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3225         member.
3226         (start_subfile, free_buildsym_compunit, push_subfile)
3227         (prepare_for_building, start_symtab): Update.
3228         (get_current_subfile): New function.
3229
3230 2018-07-20  Tom Tromey  <tom@tromey.com>
3231
3232         * coffread.c (coff_symtab_read): Update.
3233         * xcoffread.c (read_xcoff_symtab): Update.
3234         * dwarf2read.c (new_symbol): Update.
3235         (read_func_scope, read_lexical_block_scope): Update.
3236         * dbxread.c (process_one_symbol): Update.
3237         * buildsym.h (context_stack, context_stack_depth): Don't declare.
3238         (outermost_context_p): Remove macro.
3239         (outermost_context_p, get_current_context_stack)
3240         (get_context_stack_depth): Declare.
3241         (pop_context): Return struct context_stack.
3242         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3243         member.
3244         (context_stack_size): Remove.
3245         (INITIAL_CONTEXT_STACK_SIZE): Remove.
3246         (prepare_for_building, end_symtab_get_static_block)
3247         (augment_type_symtab, push_context): Update.
3248         (pop_context): Return struct context_stack.
3249         (outermost_context_p, get_current_context_stack)
3250         (get_context_stack_depth): New functions.
3251         (buildsym_init): Update.
3252
3253 2018-07-20  Tom Tromey  <tom@tromey.com>
3254
3255         * rust-exp.y: Now a pure parser.  Update all rules.
3256         (%union): Move earlier.
3257         (current_parser, work_obstack): Remove globals.
3258         (rust_parser, ~rust_parser): Update.
3259         (class rust_parser) <copy_name, concat3, crate_name, super_name,
3260         lex_character, lex_number, lex_string, lex_identifier,
3261         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3262         convert_name, convert_params_to_expression,
3263         convert_ast_to_expression, ast_basic_type, ast_operation,
3264         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3265         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3266         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3267         ast_array_type, ast_slice_type, ast_reference_type,
3268         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3269         (rust_parse): Update.
3270         (rustyyerror, rustyylex): Add parser parameter.
3271         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3272         (rust_lex_stringish_test, rust_lex_test_sequence)
3273         (rust_lex_test_trailing_dot, rust_lex_test_completion)
3274         (rust_lex_test_push_back, rust_lex_tests): Update.
3275
3276 2018-07-19  Pedro Alves  <palves@redhat.com>
3277
3278         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3279         gdb::unique_xmalloc_ptr.
3280         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3281         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3282         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3283         copy-initialization.
3284         * guile/scm-pretty-print.c (ppscm_print_children): Use
3285         gdb::unique_xmalloc_ptr instead of cleanups.
3286         (gdbscm_apply_val_pretty_printer): Remove cleanups.
3287         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3288         gdb::unique_xmalloc_ptr.
3289         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3290         Adjust to use gdb::unique_xmalloc_ptr.
3291         * guile/scm-utils.c (extract_arg): Adjust.
3292         * guile/scm-value.c (gdbscm_value_field): Adjust to use
3293         gdb::unique_xmalloc_ptr instead of a cleanup.
3294
3295 2018-07-19  Tom Tromey  <tom@tromey.com>
3296
3297         * utils.c (do_value_free_to_mark)
3298         (make_cleanup_value_free_to_mark): Remove.
3299         * utils.h (make_cleanup_value_free_to_mark): Remove.
3300
3301 2018-07-19  Pedro Alves  <palves@redhat.com>
3302
3303         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3304         forwarding reference.
3305
3306 2018-07-18  Pedro Alves  <palves@redhat.com>
3307
3308         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3309         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
3310         cleanup.
3311
3312 2018-07-18  Pedro Alves  <palves@redhat.com>
3313
3314         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3315         exceptions.
3316         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3317         (gdbscm_wrap): New.
3318         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3319         directly instead of a cleanup.
3320         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3321         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3322         (vlscm_binop_gdbthrow): New, factored out from ...
3323         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3324         (vlscm_rich_compare): Use gdbscm_wrap.
3325         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3326         instead of a cleanup.
3327         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3328         cleanup.
3329         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3330         Use xfree directly instead of a cleanup.
3331         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3332         Adjust to use gdbscm_wrap and scoped_value_mark.
3333         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3334         (gdbscm_value_address, gdbscm_value_dereference)
3335         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3336         scoped_value_mark.
3337         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3338         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3339         scoped_value_mark.
3340         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3341         gdbscm_wrap and scoped_value_mark.
3342         (gdbscm_value_to_string): Use xfree directly instead of a
3343         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3344         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3345         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3346         scoped_value_mark.
3347         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3348         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3349         scoped_value_mark.
3350         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3351         gdbscm_wrap.
3352
3353 2018-07-18  Tom de Vries  <tdevries@suse.de>
3354
3355         * findvar.c (default_read_var_value): Also resolve dynamic type for
3356         LOC_OPTIMIZED_OUT vars.
3357
3358 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
3359
3360         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3361         decoding.
3362
3363 2018-07-17  Tom Tromey  <tom@tromey.com>
3364
3365         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3366         (compute_enum_list, pascm_set_param_value_x)
3367         (gdbscm_parameter_value): Update.
3368         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3369         (gdbscm_scm_to_host_string): Update.
3370         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3371         Update.
3372         * guile/scm-cmd.c (cmdscm_add_completion): Update.
3373         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3374         * guile/scm-string.c (gdbscm_scm_to_string): Return
3375         unique_xmalloc_ptr.
3376         (gdbscm_scm_to_host_string): Likewise.
3377
3378 2018-07-17  Tom Tromey  <tom@tromey.com>
3379
3380         * guile/guile.c (gdbscm_eval_from_control_command): Update.
3381         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3382         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3383         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3384         unique_xmalloc_ptr.
3385
3386 2018-07-17  Tom Tromey  <tom@tromey.com>
3387
3388         * guile/scm-param.c (pascm_signal_setshow_error): Update.
3389         * guile/guile-internal.h (gdbscm_exception_message_to_string):
3390         Update.
3391         * guile/scm-cmd.c (cmdscm_function): Update.
3392         * guile/scm-pretty-print.c
3393         (ppscm_print_exception_unless_memory_error): Update.
3394         * guile/scm-exception.c (gdbscm_exception_message_to_string):
3395         Return unique_xmalloc_ptr.
3396
3397 2018-07-17  Tom Tromey  <tom@tromey.com>
3398
3399         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3400         Use string_printf.
3401
3402 2018-07-17  Jim Wilson  <jimw@sifive.com>
3403
3404         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3405         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
3406         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
3407         unecessary braces after EF_RISCV_RVC test.  Delete call to
3408         set_gdbarch_decr_pc_after_break.
3409
3410         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3411         RISCV_LAST_FP_REGNUM + 1.
3412         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3413
3414 2018-07-17  Tom Tromey  <tom@tromey.com>
3415
3416         * configure.ac: Remove --disable-gdbcli.
3417         * configure: Rebuild.
3418         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3419         (SUBDIR_CLI_CFLAGS): Remove.
3420         (SFILES): Use SUBDIR_CLI_SRCS.
3421         (COMMON_OBS): Use SUBDIR_CLI_OBS.
3422
3423 2018-07-17  Tom Tromey  <tom@tromey.com>
3424
3425         PR gdb/18624:
3426         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3427
3428 2018-07-16  Jim Wilson  <jimw@sifive.com>
3429
3430         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3431
3432 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3433
3434         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3435         variable.
3436         (libunwind_frame_sniffer): Likewise.
3437         (libunwind_frame_prev_register): Likewise.
3438         (libunwind_sigtramp_frame_sniffer): Likewise.
3439         * ia64-tdep.c (ia64_access_reg): Likewise.
3440         (ia64_access_rse_reg): Likewise.
3441         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3442         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3443
3444 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3445
3446         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3447
3448 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3449
3450         * remote-sim.c (gdbsim_target::close,
3451         gdbsim_target::mourn_inferior): Remove unused variables.
3452
3453 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
3454
3455         * ia64-tdep.c (ktab_buf): New global.
3456         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3457         (get_kernel_table): Adjust.
3458
3459 2018-07-16  Tom Tromey  <tom@tromey.com>
3460
3461         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3462         * dwarf2read.c (using_directives, new_symbol): Use
3463         outermost_context_p.
3464         * dbxread.c (process_one_symbol): Use outermost_context_p.
3465         * coffread.c (coff_symtab_read): Use outermost_context_p.
3466
3467 2018-07-16  Tom Tromey  <tom@tromey.com>
3468
3469         * dwarf2read.c (using_directives, read_func_scope)
3470         (read_lexical_block_scope): Update.
3471         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3472         * buildsym.h (local_using_directives, global_using_directives):
3473         Don't declare.
3474         (get_local_using_directives, set_local_using_directives)
3475         (get_global_using_directives): Declare.
3476         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3477         m_global_using_directives>: New members.
3478         (finish_block_internal, prepare_for_building)
3479         (reset_symtab_globals, end_symtab_get_static_block)
3480         (push_context): Update.
3481         (get_local_using_directives, set_local_using_directives)
3482         (get_global_using_directives): New functions.
3483         (buildsym_init): Update.
3484
3485 2018-07-16  Tom Tromey  <tom@tromey.com>
3486
3487         * xcoffread.c (xcoff_initial_scan): Don't call
3488         free_pending_blocks.
3489         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3490         * buildsym.h (class scoped_free_pendings): Add constructor.
3491         (free_pending_blocks): Don't declare.
3492         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3493         (free_pending_blocks): Now static.
3494
3495 2018-07-16  Tom Tromey  <tom@tromey.com>
3496
3497         * buildsym.h (push_subfile, pop_subfile): Update declarations.
3498         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3499         member.
3500         (struct subfile_stack): Remove.
3501         (subfile_stack): Remove.
3502         (push_subfile, pop_subfile, buildsym_init): Update.
3503
3504 2018-07-16  Tom Tromey  <tom@tromey.com>
3505
3506         * buildsym.c (push_subfile): Use gdb_assert.
3507         (pop_subfile): Use gdb_assert.
3508
3509 2018-07-16  Tom Tromey  <tom@tromey.com>
3510
3511         * buildsym.h (merge_symbol_lists): Remove.
3512         * buildsym.c (merge_symbol_lists): Remove.
3513
3514 2018-07-16  Tom Tromey  <tom@tromey.com>
3515
3516         * stabsread.c (scan_file_globals): Update comment.
3517         * stabsread.h (scan_file_globals): Move from buildsym.h.
3518         * buildsym.h (scan_file_globals): Move to stabsread.h.
3519
3520 2018-07-16  Tom Tromey  <tom@tromey.com>
3521
3522         * xcoffread.c (xcoff_new_init): Update.
3523         * mipsread.c (mipscoff_new_init): Update.
3524         * mdebugread.c (mdebug_build_psymtabs): Update.
3525         * elfread.c (elf_new_init): Update.
3526         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3527         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3528         * buildsym.h (buildsym_new_init): Don't declare.
3529         * buildsym.c (buildsym_new_init): Remove.
3530
3531 2018-07-16  Tom Tromey  <tom@tromey.com>
3532
3533         * stabsread.h (within_function): Move from buildsym.h.
3534         * stabsread.c (start_stabs): Clear within_function.
3535         * coffread.c (coff_start_symtab): Clear within_function.
3536         * buildsym.h (within_function): Move to stabsread.h.
3537         * buildsym.c (prepare_for_building): Update.
3538
3539 2018-07-16  Tom Tromey  <tom@tromey.com>
3540
3541         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3542         * dwarf2read.c (dwarf2_start_symtab): Don't set
3543         processing_gcc_compilation.
3544         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3545
3546 2018-07-16  Tom Tromey  <tom@tromey.com>
3547
3548         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3549         (next_symbol_text_func): Move from buildsym.h.
3550         * stabsread.c (hashname): Move from buildsym.c.
3551         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3552         (next_symbol_text_func, hashname): Move to stabsread.h.
3553         * buildsym.c: Don't include bcache.h
3554         (hashname): Move to stasbread.c.
3555
3556 2018-07-16  Tom Tromey  <tom@tromey.com>
3557
3558         * buildsym.h (context_stack_size): Don't declare.
3559         * buildsym.c (context_stack_size): New global.
3560
3561 2018-07-16  Tom Tromey  <tom@tromey.com>
3562
3563         * dbxread.c (processing_acc_compilation): New global.
3564         * buildsym.h (processing_acc_compilation): Don't declare.
3565
3566 2018-07-16  Tom Tromey  <tom@tromey.com>
3567
3568         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3569         * dbxread.c (read_ofile_symtab): Update.
3570         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3571         * buildsym.h (last_source_start_addr): Remove.
3572         (set_last_source_start_addr, get_last_source_start_addr):
3573         Declare.
3574         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3575         parameter.
3576         (struct buildsym_compunit) <m_last_source_start_addr>: New
3577         member.
3578         (prepare_for_building): Remove start_addr parameter.
3579         (start_symtab, restart_symtab, end_symtab_get_static_block)
3580         (end_symtab_with_blockvector): Update.
3581         (set_last_source_start_addr, get_last_source_start_addr): New
3582         functions.
3583
3584 2018-07-16  Tom Tromey  <tom@tromey.com>
3585
3586         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3587         member.
3588         (have_line_numbers): Remove.
3589         (record_line, prepare_for_building, end_symtab_get_static_block)
3590         (augment_type_symtab): Update.
3591
3592 2018-07-16  Tom Tromey  <tom@tromey.com>
3593
3594         * buildsym.c (~buildsym_compunit): Free the macro table.
3595         (struct buildsym_compunit) <get_macro_table, release_macros>: New
3596         methods.
3597         <m_pending_macros>: New member.
3598         (pending_macros): Remove.
3599         (~scoped_free_pendings, get_macro_table, prepare_for_building)
3600         (reset_symtab_globals, end_symtab_get_static_block)
3601         (end_symtab_with_blockvector, augment_type_symtab)
3602         (buildsym_init): Update.
3603
3604 2018-07-16  Tom Tromey  <tom@tromey.com>
3605
3606         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3607         parameter.
3608         (buildsym_compunit::set_last_source_file): New method.
3609         <m_last_source_file>: New member.
3610         (prepare_for_building): Remove "name" parameter.
3611         (start_symtab, restart_symtab, reset_symtab_globals): Update.
3612         (last_source_file): Remove.
3613         (set_last_source_file, get_last_source_file): Update.
3614
3615 2018-07-16  Tom Tromey  <tom@tromey.com>
3616
3617         * buildsym.c (prepare_for_building): Add assert.
3618
3619 2018-07-16  Tom Tromey  <tom@tromey.com>
3620
3621         * buildsym.c (~buildsym_compunit): Update.
3622         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3623         (start_subfile, patch_subfile_names)
3624         (end_symtab_with_blockvector): Update.
3625
3626 2018-07-16  Tom Tromey  <tom@tromey.com>
3627
3628         * buildsym.c (struct buildsym_compunit): Add constructor,
3629         destructor, initializers.
3630         (start_buildsym_compunit): Remove.
3631         (free_buildsym_compunit): Use "delete".
3632         (start_symtab, restart_symtab): Use "new".
3633
3634 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
3635
3636         * symfile.c (set_objfile_default_section_offset): Remove struct
3637         keyword.
3638
3639 2018-07-14  Stafford Horne  <shorne@gmail.com>
3640
3641         * (Responsible Maintainers): Add myself as or1k maintainer.
3642
3643 2018-07-13  Tom Tromey  <tom@tromey.com>
3644
3645         * symfile.c (set_objfile_default_section_offset): Use extra braces
3646         around initializer.
3647
3648 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3649
3650         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3651         non-branching basr.
3652
3653 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3654
3655         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3656         unittests/cli-utils-selftests.c
3657         * unittests/cli-utils-selftests.c: New file.
3658
3659 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3660
3661         * NEWS: Mention new commands. Mention change to 'thread apply'.
3662
3663 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3664
3665         * thread.c (thr_try_catch_cmd): New function.
3666         (thread_apply_all_command): Handle qcs flags.
3667         (thread_apply_command): Handle qcs flags.
3668         (taas_command): New function.
3669         (tfaas_command): New function.
3670         (_initialize_thread): Update to setup the new commands 'taas
3671         and 'tfaas'. Change doc string for 'thread apply'.
3672
3673 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3674
3675         * stack.c: (trailing_outermost_frame): New function, mostly
3676         extracted from backtrace_command_1.
3677         (leading_innermost_frame): New function.
3678         (backtrace_command_1): Update to call trailing_outermost_frame.
3679         (frame_apply_command_count): New function.
3680         (frame_apply_level_command): New function.
3681         (frame_apply_all_command): New function.
3682         (frame_apply_command): New function.
3683         (faas_command): New function.
3684         (frame_cmd_list): New variable.
3685         (_initialize_stack): Update to setup the new commands 'frame apply'
3686         and 'faas'.
3687
3688 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3689
3690         * cli-utils.c (number_or_range_parser::get_number): Only handle
3691         numbers or convenience var as numbers.
3692         (parse_flags): New function.
3693         (parse_flags_qcs): New function.
3694         (number_or_range_parser::finished): Ensure parsing end is detected
3695         before end of string.
3696         * cli-utils.h (parse_flags): New function.
3697         (parse_flags_qcs): New function.
3698         (number_or_range_parser): Remove m_finished bool.
3699         (number_or_range_parser::skip_range): Set m_in_range to false.
3700
3701 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3702
3703         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3704         on Windows.
3705
3706 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3707             Jan Kratochvil  <jan.kratochvil@redhat.com>
3708             Paul Fertser  <fercerpav@gmail.com>
3709             Tsutomu Seki  <sekiriki@gmail.com>
3710             Pedro Alves  <palves@redhat.com>
3711
3712         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3713         'unittests/parse-connection-spec-selftests.c'.
3714         (COMMON_SFILES): Add 'common/netstuff.c'.
3715         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3716         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3717         * common/netstuff.c: New file.
3718         * common/netstuff.h: New file.
3719         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3720         (wait_for_connect): Update comment.  New parameter
3721         'gdb::optional<int> sock' instead of 'struct serial *scb'.
3722         Use 'sock' directly instead of 'scb->fd'.
3723         (try_connect): New function, with code from 'net_open'.
3724         (net_open): Rewrite main loop to deal with multiple
3725         sockets/addresses.  Handle IPv6-style hostnames; implement
3726         support for IPv6 connections.
3727         * unittests/parse-connection-spec-selftests.c: New file.
3728
3729 2018-07-11  Pedro Alves  <palves@redhat.com>
3730
3731         PR gdb/23377
3732         * remote.c (remote_target::remote_detach_pid): Call
3733         set_current_process.
3734
3735 2018-07-11  Pedro Alves  <palves@redhat.com>
3736
3737         * h8300-tdep.c (h8300_gdbarch_init): Remove
3738         set_gdbarch_ecoff_reg_to_regnum calls.
3739
3740 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3741
3742         PR c++/23373
3743         * c-typeprint.c (c_type_print_base_struct_union): Don't print
3744         offsets/sizes for static members of a class/struct.
3745
3746 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
3747
3748         * target-descriptions.c (tdesc_register_bitsize): Rename.
3749         * target-descriptions.h (tdesc_register_bitsize): Likewise.
3750         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3751         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3752
3753 2018-07-10  Tom Tromey  <tom@tromey.com>
3754
3755         * breakpoint.c (moribund_locations): Now static and a
3756         std::vector.
3757         (breakpoint_init_inferior, moribund_breakpoint_here_p)
3758         (build_bpstat_chain, update_global_location_list)
3759         (breakpoint_retire_moribund): Update.
3760         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
3761         VEC.
3762
3763 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3764
3765         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3766         (riscv_register_reggroup_p): Use new function, remove unneeded
3767         parenthesis.
3768         (riscv_push_dummy_call): Extend assert to compare against xlen or
3769         flen based on register type.
3770
3771 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3772
3773         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3774
3775 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3776
3777         * remote.c (show_hardware_watchpoint_limit): New function.
3778         (show_hardware_watchpoint_length_limit): New function.
3779         (show_hardware_breakpoint_limit): New function.
3780         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3781         where appropriate, update help text.
3782
3783 2018-07-09  Tom Tromey  <tom@tromey.com>
3784
3785         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3786         (CLIBS): Don't mention NAT_CLIBS.
3787
3788 2018-07-09  Tom Tromey  <tom@tromey.com>
3789
3790         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3791         (LIBGDB_OBS, clean mostlyclean): Update.
3792         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3793
3794 2018-07-09  Tom Tromey  <tom@tromey.com>
3795
3796         * Makefile.in (%.c: %.y): Use ECHO_YACC.
3797         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
3798         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3799
3800 2018-07-09  Tom Tromey  <tom@tromey.com>
3801
3802         * Makefile.in (ALLDEPFILES): Remove exec.c.
3803         (COMMON_OBS): Remove exec.o.
3804         (COMMON_SFILES): Add exec.c.
3805
3806 2018-07-09  Tom Tromey  <tom@tromey.com>
3807
3808         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3809
3810 2018-07-09  Tom Tromey  <tom@tromey.com>
3811
3812         * Makefile.in (clean mostlyclean): Remove stamp-version.
3813         (version.c): Depend on stamp-version.
3814         (stamp-version): New rule, from version.c rule.
3815
3816 2018-07-09  Tom Tromey  <tom@tromey.com>
3817
3818         * Makefile.in (init.c): Depend on stamp-init.
3819         (stamp-init): New rule, from init.c rule.
3820         (clean mostlyclean): Remove stamp-init.
3821
3822 2018-07-09  Tom Tromey  <tom@tromey.com>
3823
3824         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3825         SUBDIR_GCC_COMPILE_SRCS.
3826
3827 2018-07-09  Tom Tromey  <tom@tromey.com>
3828
3829         * Makefile.in (init.c): Remove some unused sed rules.
3830
3831 2018-07-09  Tom Tromey  <tom@tromey.com>
3832
3833         * Makefile.in (TSOBS): Remove.
3834         (INIT_FILES): Update.
3835         (LIBGDB_OBS): Update.
3836         (COMMON_SFILES): Add inflow.c.
3837         (SFILES): Remove inflow.c.
3838
3839 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3840
3841         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3842
3843 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
3844
3845         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3846         get_saveloc_name, is_signal_frame_name, step_name,
3847         init_remote_name, create_addr_space_name,
3848         destroy_addr_space_name, search_unwind_table_name,
3849         find_dyn_list_name): Constify.
3850
3851 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
3852
3853         * darwin-nat.c (darwin_pthread_kill): New function.
3854         (darwin_resume_thread): Use darwin_pthread_kill.
3855
3856 2018-07-05  Tom de Vries  <tdevries@suse.de>
3857
3858         * macroexp.c (macro_buffer) <operator=>: New member function.
3859
3860 2018-07-04  Tom Tromey  <tom@tromey.com>
3861
3862         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3863
3864 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
3865
3866         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3867         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3868         * maint.c: Likewise.
3869         * top.c: Likewise.
3870
3871 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3872
3873         * NEWS: Create a new section for the next release branch.
3874         Rename the section of the current branch, now that it has
3875         been cut.
3876
3877 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3878
3879         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3880         * version.in: Bump version to 8.2.50.DATE-git.
3881
3882 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3883             Pedro Alves  <palves@redhat.com>
3884
3885         * linux-nat.c (linux_init_ptrace): Rename to ...
3886         (linux_init_ptrace_procfs): ... this.  Call
3887         linux_proc_init_warnings.
3888         (linux_nat_target::post_attach)
3889         (linux_nat_target::post_startup_inferior): Adjust.
3890         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3891         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3892
3893 2018-07-04  Tom de Vries  <tdevries@suse.de>
3894
3895         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3896         check ...
3897         (read_comp_unit_head): ... here.
3898
3899 2018-07-03  Tom Tromey  <tom@tromey.com>
3900
3901         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3902         (stop_tracing, tstatus_command)
3903         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3904         (print_one_static_tracepoint_marker): Update.
3905         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3906         std::vector.
3907         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
3908         VEC.
3909         (all_tracepoints, static_tracepoints_here): Return std::vector.
3910
3911 2018-07-03  Tom Tromey  <tom@tromey.com>
3912
3913         * common/ptid.c (ptid_equal): Remove.
3914         * common/ptid.h (ptid_equal): Don't declare.
3915         * ada-tasks.c: Update.
3916         * breakpoint.c: Update.
3917         * common/agent.c: Update.
3918         * corelow.c: Update.
3919         * darwin-nat-info.c: Update.
3920         * darwin-nat.c: Update.
3921         * dcache.c: Update.
3922         * dtrace-probe.c: Update.
3923         * dummy-frame.c: Update.
3924         * fbsd-nat.c: Update.
3925         * frame.c: Update.
3926         * gdbthread.h: Update.
3927         * gnu-nat.c: Update.
3928         * go32-nat.c: Update.
3929         * inf-loop.c: Update.
3930         * inf-ptrace.c: Update.
3931         * infcall.c: Update.
3932         * infcmd.c: Update.
3933         * inflow.c: Update.
3934         * infrun.c: Update.
3935         * linux-fork.c: Update.
3936         * linux-nat.c: Update.
3937         * linux-thread-db.c: Update.
3938         * mi/mi-cmd-var.c: Update.
3939         * mi/mi-interp.c: Update.
3940         * mi/mi-main.c: Update.
3941         * nto-procfs.c: Update.
3942         * ppc-linux-tdep.c: Update.
3943         * procfs.c: Update.
3944         * python/py-inferior.c: Update.
3945         * python/py-record-btrace.c: Update.
3946         * python/py-record.c: Update.
3947         * ravenscar-thread.c: Update.
3948         * regcache.c: Update.
3949         * remote-sim.c: Update.
3950         * remote.c: Update.
3951         * sol-thread.c: Update.
3952         * solib.c: Update.
3953         * target.c: Update.
3954         * tui/tui-stack.c: Update.
3955         * varobj.c: Update.
3956         * windows-nat.c: Update.
3957         * windows-tdep.c: Update.
3958
3959 2018-07-03  Tom Tromey  <tom@tromey.com>
3960
3961         * common/ptid.c (ptid_match): Remove.
3962         * common/ptid.h (ptid_match): Don't declare.
3963         * fbsd-nat.c: Update.
3964         * infcmd.c: Update.
3965         * infrun.c: Update.
3966         * linux-nat.c: Update.
3967         * record-btrace.c: Update.
3968         * regcache.c: Update.
3969         * remote.c: Update.
3970
3971 2018-07-03  Tom Tromey  <tom@tromey.com>
3972
3973         * common/ptid.c (ptid_tid_p): Remove.
3974         * common/ptid.h (ptid_tid_p): Don't declare.
3975         * sol-thread.c: Update.
3976
3977 2018-07-03  Tom Tromey  <tom@tromey.com>
3978
3979         * common/ptid.c (ptid_lwp_p): Remove.
3980         * common/ptid.h (ptid_lwp_p): Don't declare.
3981         * fbsd-nat.c: Update.
3982         * linux-nat.c: Update.
3983         * nat/linux-procfs.c: Update.
3984         * nat/x86-linux-dregs.c: Update.
3985         * sol-thread.c: Update.
3986
3987 2018-07-03  Tom Tromey  <tom@tromey.com>
3988
3989         * common/ptid.c (ptid_is_pid): Remove.
3990         * common/ptid.h (ptid_is_pid): Don't declare.
3991         * infrun.c: Update.
3992         * linux-nat.c: Update.
3993         * mi/mi-interp.c: Update.
3994         * remote.c: Update.
3995         * thread.c: Update.
3996
3997 2018-07-03  Tom Tromey  <tom@tromey.com>
3998
3999         * common/ptid.c (ptid_get_tid): Remove.
4000         * common/ptid.h (ptid_get_tid): Don't declare.
4001         * ada-tasks.c: Update.
4002         * aix-thread.c: Update.
4003         * bsd-uthread.c: Update.
4004         * darwin-nat.c: Update.
4005         * fbsd-nat.c: Update.
4006         * i386-darwin-nat.c: Update.
4007         * infrun.c: Update.
4008         * linux-tdep.c: Update.
4009         * nto-procfs.c: Update.
4010         * ppc-ravenscar-thread.c: Update.
4011         * python/py-infthread.c: Update.
4012         * ravenscar-thread.c: Update.
4013         * sol-thread.c: Update.
4014         * sparc-ravenscar-thread.c: Update.
4015         * windows-nat.c: Update.
4016
4017 2018-07-03  Tom Tromey  <tom@tromey.com>
4018
4019         * common/ptid.c (ptid_get_lwp): Remove.
4020         * common/ptid.h (ptid_get_lwp): Don't declare.
4021         * aarch64-linux-nat.c: Update.
4022         * ada-tasks.c: Update.
4023         * aix-thread.c: Update.
4024         * amd64-linux-nat.c: Update.
4025         * arm-linux-nat.c: Update.
4026         * corelow.c: Update.
4027         * fbsd-nat.c: Update.
4028         * fbsd-tdep.c: Update.
4029         * gnu-nat.c: Update.
4030         * i386-cygwin-tdep.c: Update.
4031         * i386-gnu-nat.c: Update.
4032         * i386-linux-nat.c: Update.
4033         * ia64-linux-nat.c: Update.
4034         * inf-ptrace.c: Update.
4035         * infrun.c: Update.
4036         * linux-fork.c: Update.
4037         * linux-nat.c: Update.
4038         * linux-tdep.c: Update.
4039         * linux-thread-db.c: Update.
4040         * mips-linux-nat.c: Update.
4041         * nat/aarch64-linux-hw-point.c: Update.
4042         * nat/aarch64-linux.c: Update.
4043         * nat/linux-btrace.c: Update.
4044         * nat/linux-osdata.c: Update.
4045         * nat/linux-procfs.c: Update.
4046         * nat/x86-linux-dregs.c: Update.
4047         * obsd-nat.c: Update.
4048         * ppc-fbsd-nat.c: Update.
4049         * ppc-linux-nat.c: Update.
4050         * procfs.c: Update.
4051         * python/py-infthread.c: Update.
4052         * ravenscar-thread.c: Update.
4053         * remote.c: Update.
4054         * s390-linux-nat.c: Update.
4055         * sol-thread.c: Update.
4056         * sol2-tdep.c: Update.
4057         * spu-linux-nat.c: Update.
4058         * x86-linux-nat.c: Update.
4059         * xtensa-linux-nat.c: Update.
4060
4061 2018-07-03  Tom Tromey  <tom@tromey.com>
4062
4063         * common/ptid.c (ptid_get_pid): Remove.
4064         * common/ptid.h (ptid_get_pid): Don't declare.
4065         * aarch64-linux-nat.c: Update.
4066         * ada-lang.c: Update.
4067         * aix-thread.c: Update.
4068         * alpha-bsd-nat.c: Update.
4069         * amd64-fbsd-nat.c: Update.
4070         * amd64-linux-nat.c: Update.
4071         * arm-linux-nat.c: Update.
4072         * arm-nbsd-nat.c: Update.
4073         * auxv.c: Update.
4074         * break-catch-syscall.c: Update.
4075         * breakpoint.c: Update.
4076         * bsd-uthread.c: Update.
4077         * corelow.c: Update.
4078         * ctf.c: Update.
4079         * darwin-nat.c: Update.
4080         * fbsd-nat.c: Update.
4081         * fbsd-tdep.c: Update.
4082         * gcore.c: Update.
4083         * gnu-nat.c: Update.
4084         * hppa-nbsd-nat.c: Update.
4085         * hppa-obsd-nat.c: Update.
4086         * i386-fbsd-nat.c: Update.
4087         * ia64-linux-nat.c: Update.
4088         * inf-ptrace.c: Update.
4089         * infcmd.c: Update.
4090         * inferior.c: Update.
4091         * inferior.h: Update.
4092         * inflow.c: Update.
4093         * infrun.c: Update.
4094         * linux-fork.c: Update.
4095         * linux-nat.c: Update.
4096         * linux-tdep.c: Update.
4097         * linux-thread-db.c: Update.
4098         * m68k-bsd-nat.c: Update.
4099         * mi/mi-interp.c: Update.
4100         * mi/mi-main.c: Update.
4101         * mips-linux-nat.c: Update.
4102         * mips-nbsd-nat.c: Update.
4103         * mips64-obsd-nat.c: Update.
4104         * nat/aarch64-linux-hw-point.c: Update.
4105         * nat/aarch64-linux.c: Update.
4106         * nat/linux-btrace.c: Update.
4107         * nat/linux-osdata.c: Update.
4108         * nat/linux-procfs.c: Update.
4109         * nat/x86-linux-dregs.c: Update.
4110         * nto-procfs.c: Update.
4111         * obsd-nat.c: Update.
4112         * ppc-linux-nat.c: Update.
4113         * ppc-nbsd-nat.c: Update.
4114         * ppc-obsd-nat.c: Update.
4115         * proc-service.c: Update.
4116         * procfs.c: Update.
4117         * python/py-inferior.c: Update.
4118         * python/py-infthread.c: Update.
4119         * ravenscar-thread.c: Update.
4120         * record.c: Update.
4121         * remote-sim.c: Update.
4122         * remote.c: Update.
4123         * rs6000-nat.c: Update.
4124         * s390-linux-nat.c: Update.
4125         * sh-nbsd-nat.c: Update.
4126         * sol-thread.c: Update.
4127         * sparc-nat.c: Update.
4128         * sparc64-tdep.c: Update.
4129         * spu-linux-nat.c: Update.
4130         * spu-tdep.c: Update.
4131         * target-debug.h: Update.
4132         * target.c: Update.
4133         * thread.c: Update.
4134         * tid-parse.c: Update.
4135         * tracefile-tfile.c: Update.
4136         * vax-bsd-nat.c: Update.
4137         * windows-nat.c: Update.
4138         * x86-linux-nat.c: Update.
4139         * x86-nat.c: Update.
4140
4141 2018-07-03  Tom Tromey  <tom@tromey.com>
4142
4143         * common/ptid.c (pid_to_ptid): Remove.
4144         * common/ptid.h (pid_to_ptid): Don't declare.
4145         * aix-thread.c: Update.
4146         * arm-linux-nat.c: Update.
4147         * common/ptid.c: Update.
4148         * common/ptid.h: Update.
4149         * corelow.c: Update.
4150         * ctf.c: Update.
4151         * darwin-nat.c: Update.
4152         * fbsd-nat.c: Update.
4153         * fork-child.c: Update.
4154         * gnu-nat.c: Update.
4155         * go32-nat.c: Update.
4156         * inf-ptrace.c: Update.
4157         * infcmd.c: Update.
4158         * inferior.c: Update.
4159         * infrun.c: Update.
4160         * linux-fork.c: Update.
4161         * linux-nat.c: Update.
4162         * nat/aarch64-linux-hw-point.c: Update.
4163         * nat/fork-inferior.c: Update.
4164         * nat/x86-linux-dregs.c: Update.
4165         * nto-procfs.c: Update.
4166         * obsd-nat.c: Update.
4167         * procfs.c: Update.
4168         * progspace.c: Update.
4169         * remote.c: Update.
4170         * rs6000-nat.c: Update.
4171         * s390-linux-nat.c: Update.
4172         * sol-thread.c: Update.
4173         * spu-linux-nat.c: Update.
4174         * target.c: Update.
4175         * top.c: Update.
4176         * tracefile-tfile.c: Update.
4177         * windows-nat.c: Update.
4178
4179 2018-07-03  Tom Tromey  <tom@tromey.com>
4180
4181         * common/ptid.h (ptid_build): Don't declare.
4182         * common/ptid.c (ptid_build): Remove.
4183         * aix-thread.c: Update.
4184         * bsd-kvm.c: Update.
4185         * bsd-uthread.c: Update.
4186         * common/agent.c: Update.
4187         * common/ptid.c: Update.
4188         * common/ptid.h: Update.
4189         * corelow.c: Update.
4190         * darwin-nat.c: Update.
4191         * fbsd-nat.c: Update.
4192         * gnu-nat.c: Update.
4193         * linux-fork.c: Update.
4194         * linux-nat.c: Update.
4195         * linux-thread-db.c: Update.
4196         * nat/linux-osdata.c: Update.
4197         * nat/linux-procfs.c: Update.
4198         * nto-procfs.c: Update.
4199         * obsd-nat.c: Update.
4200         * proc-service.c: Update.
4201         * procfs.c: Update.
4202         * ravenscar-thread.c: Update.
4203         * remote-sim.c: Update.
4204         * remote.c: Update.
4205         * sol-thread.c: Update.
4206         * target.c: Update.
4207         * windows-nat.c: Update.
4208
4209 2018-07-03  Tom Tromey  <tom@tromey.com>
4210
4211         * infrun.c (follow_exec): Use exit_inferior_silent.
4212         * inferior.c (exit_inferior_num_silent): Remove.
4213         * inferior.h (exit_inferior_num_silent): Don't declare.
4214
4215 2018-07-03  Tom Tromey  <tom@tromey.com>
4216
4217         PR cli/23340:
4218         * darwin-nat.c (darwin_attach_pid): Reset inferior and
4219         inferior_ptid on error.
4220
4221 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
4222             Simon Marchi  <simon.marchi@polymtl.ca>
4223
4224         PR tdep/8282
4225         * disasm.h (gdb_disassembler): Add
4226         `m_disassembler_options_holder'. member
4227         * disasm.c (get_all_disassembler_options): New function.
4228         (gdb_disassembler::gdb_disassembler): Use it.
4229         (gdb_buffered_insn_length_init_dis): Likewise.
4230         (gdb_buffered_insn_length): Adjust accordingly.
4231         (set_disassembler_options): Handle options with arguments.
4232         (show_disassembler_options_sfunc): Likewise.  Add a leading new
4233         line if showing options with descriptions.
4234         (disassembler_options_completer): Adapt to using the
4235         `disasm_options_and_args_t' structure.
4236         * mips-tdep.c (mips_disassembler_options): New variable.
4237         (mips_disassembler_options_o32): Likewise.
4238         (mips_disassembler_options_n32): Likewise.
4239         (mips_disassembler_options_n64): Likewise.
4240         (gdb_print_insn_mips): Don't set `disassembler_options'.
4241         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4242         functions.
4243         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4244         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
4245         `gdbarch_disassembler_options_implicit' and
4246         `gdbarch_valid_disassembler_options'.
4247         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4248         `disasm_options_and_args_t' structure.
4249         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4250         method.
4251         (valid_disassembler_options): Switch from `disasm_options_t' to
4252         the `disasm_options_and_args_t' structure.
4253         * NEWS: Document `set disassembler-options' support for the MIPS
4254         target.
4255         * gdbarch.h: Regenerate.
4256         * gdbarch.c: Regenerate.
4257
4258 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4259
4260         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4261
4262 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
4263
4264         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4265         parameter in call to amd64_target_description.
4266         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4267         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4268         (amd64fbsd_init_abi): Likewise.
4269         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4270         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4271         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4272         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4273
4274 2018-06-29  Pedro Alves  <palves@redhat.com>
4275
4276         * gdb/amd64-tdep.h (amd64_create_target_description): Add
4277         "segments" parameter.
4278         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4279         (_initialize_amd64_tdep): Update call to
4280         amd64_create_target_description.
4281         (amd64_target_description): Add "segments" parameter.  Adjust
4282         the implementation to use it.
4283         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4284         call to amd64_create_target_description.
4285         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4286         * gdb/arch/amd64.h (amd64_create_target_description): Add
4287         "segments" register.
4288         * gdb/arch/amd64.c (amd64_create_target_description): Add
4289         "segments" parameter.  Call create_feature_i386_64bit_segments
4290         only if SEGMENTS is true.
4291         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4292         call to amd64_create_target_description.
4293
4294 2018-06-29  Pedro Alves  <palves@redhat.com>
4295
4296         * thread.c (thread_target_id_str): New, factored out from ...
4297         (print_thread_info_1): ... here.  Use it to compute the max
4298         "Target Id" column width.
4299
4300 2018-06-29  Pedro Alves  <palves@redhat.com>
4301
4302         * remote.c (remote_target::extra_thread_info): Delete
4303         'display_buf' and 'n' locals.  from the cache, regardless of
4304         packet mechanims is in use.  Use cache for qThreadExtra and qP
4305         methods too.
4306
4307 2018-06-29  Pedro Alves  <palves@redhat.com>
4308
4309         * blockframe.c (find_pc_sect_containing_function): New function.
4310         * breakpoint.c (print_breakpoint_location): Don't call
4311         find_pc_sect_function.
4312         * linespec.c (create_sals_line_offset): Record the location's
4313         symbol in the sal.
4314         * linespec.c (convert_address_location_to_sals): Fill in sal's
4315         symbol with find_pc_sect_containing_function.
4316         * symtab.c (find_function_start_sal): Rename to ...
4317         (find_function_start_sal_1): ... this.
4318         (find_function_start_sal): Reimplement as wrapper around
4319         find_function_start_sal_1, and use
4320         find_pc_sect_containing_function to fill in the sal's symbol.
4321         (find_function_start_sal(symbol*, bool)): Adjust.
4322         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4323         comments.
4324         (find_pc_sect_containing_function): Declare.
4325
4326 2018-06-29  Pedro Alves  <palves@redhat.com>
4327
4328         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4329         true if the the location has no symbol.
4330
4331 2018-06-28  Tom Tromey  <tom@tromey.com>
4332
4333         * NEWS: Mention --enable-codesign.
4334         * silent-rules.mk (ECHO_SIGN): New variable.
4335         * configure.ac: Add --enable-codesign.
4336         * configure: Rebuild.
4337         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4338         (gdb$(EXEEXT)): Optionally invoke codesign.
4339
4340 2018-06-28  Pedro Alves  <palves@redhat.com>
4341
4342         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4343         comments.
4344         (switch_to_thread_no_regs): Adjust comment.
4345         * infcmd.c (stop_pc): Delete.
4346         (post_create_inferior, info_program_command): Replace references
4347         to stop_pc with references to thread_info->suspend.stop_pc.
4348         * inferior.h (stop_pc): Delete declaration.
4349         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4350         (handle_inferior_event_1, handle_signal_stop)
4351         (process_event_stop_test, keep_going_stepped_thread)
4352         (handle_step_into_function, handle_step_into_function_backward)
4353         (print_stop_location): Replace references to stop_pc with
4354         references to thread_info->suspend.stop_pc.
4355         (struct infcall_suspend_state) <stop_pc>: Delete field.
4356         (save_infcall_suspend_state, restore_infcall_suspend_state):
4357         Remove references to inf_stat->stop_pc.
4358         * linux-fork.c (fork_load_infrun_state): Likewise.
4359         * record-btrace.c (record_btrace_set_replay): Likewise.
4360         * record-full.c (record_full_goto_entry): Likewise.
4361         * remote.c (print_one_stopped_thread): Likewise.
4362         * target.c (target_resume): Extend comment.
4363         * thread.c (set_executing_thread): New.
4364         (set_executing): Use it.
4365         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4366         Remove references to stop_pc.
4367
4368 2018-06-28  Pedro Alves  <palves@redhat.com>
4369
4370         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4371         Moving fetching stop_pc until after ecs->event_thread is refreshed.
4372
4373 2018-06-28  Tom Tromey  <tom@tromey.com>
4374
4375         * coffread.c (coff_symfile_finish): Update.
4376         * xcoffread.c (xcoff_symfile_finish): Update.
4377         * elfread.c (elf_symfile_finish): Update.
4378         * symfile.h (dwarf2_free_objfile): Don't declare.
4379         * dwarf2read.c (_initialize_dwarf2_read): Use
4380         register_objfile_data_with_cleanup.
4381         (dwarf2_free_objfile): Now static.  Change signature.
4382
4383 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4384
4385         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4386         option "-o" to add-symbol-file-load to add an offset to each
4387         section's load address.
4388         * symfile.c (set_objfile_default_section_offset): New function.
4389
4390 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4391
4392         * symfile.c (add_symbol_file_command): Make sure that sections
4393         with the same name are sorted in the same order.
4394
4395 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4396
4397         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4398         require the second argument.  If omitted, load sections at the
4399         addresses specified in the file.
4400
4401 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4402
4403         * symfile.c (symbol_file_command, symbol_file_add_main_1)
4404         (_initialize_symfile): Add option "-o" to symbol-file to add an
4405         offset to each section of the symbol file.
4406
4407 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4408
4409         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4410
4411 2018-06-27  Tom Tromey  <tom@tromey.com>
4412
4413         * stack.c (_initialize_stack): Update "func" help text.
4414
4415 2018-06-27  Tom Tromey  <tom@tromey.com>
4416
4417         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4418         std::vector.
4419         (unwind_infopy_str, pyuw_create_unwind_info)
4420         (unwind_infopy_add_saved_register, pyuw_sniffer)
4421         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4422         Update.
4423         (struct saved_reg): Add constructor.
4424         <value>: Now a gdbpy_ref<>.
4425
4426 2018-06-27  Tom Tromey  <tom@tromey.com>
4427
4428         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4429
4430 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4431
4432         * gdb-gdb.py.in: Format using autopep8.
4433
4434 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4435
4436         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4437         (type_lookup_function): Recognize CORE_ADDR values.
4438
4439 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4440
4441         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4442         print tag_name.
4443
4444 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4445
4446         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4447         <__lt__>: Add.
4448
4449 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4450
4451         * gdb-gdb.py: Move to...
4452         * gdb-gdb.py.in: ... here.
4453         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4454         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4455         dependencies.
4456         (distclean): Remove gdb-gdb.py when cleaning.
4457         (gdb-gdb.py, gdb-gdb.gdb): New rules.
4458         * configure: Re-generate.
4459
4460 2018-06-27  Pedro Alves  <palves@redhat.com>
4461
4462         * proc-service.c (get_ps_regcache): New.
4463         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4464         (ps_lsetfpregs): Use it.
4465
4466 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
4467
4468         PR gdb/21695
4469         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4470         (dwarf_decode_lines_1): Adjust.
4471
4472 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4473
4474         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4475         override.
4476         <info_proc>: Likewise.
4477
4478 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
4479
4480         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4481         to windows_fetch_one_register, and only handle the case of
4482         fetching one register.  Move the code that reloads the context
4483         and iterates over all registers if R is negative to...
4484         (windows_nat_target::fetch_registers): ... here.
4485         (do_windows_store_inferior_registers): Rename to
4486         windows_store_one_register, and only handle the case of storing
4487         one register.  Move the code that handles the case where r is
4488         negative to...
4489         (windows_nat_target::store_registers) ... here.
4490
4491 2018-06-26  Tom Tromey  <tom@tromey.com>
4492
4493         PR rust/22574:
4494         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4495         * rust-lang.c (rust_print_struct_def): Add podata parameter.
4496         Update.
4497         (rust_internal_print_type): Add podata parameter.
4498         (rust_print_type): Update.
4499
4500 2018-06-26  Tom Tromey  <tom@tromey.com>
4501
4502         * typeprint.h (struct print_offset_data) <update, finish,
4503         maybe_print_hole>: New methods.
4504         <indentation>: New constant.
4505         * typeprint.c (print_offset_data::indentation): Define.
4506         (print_offset_data::maybe_print_hole, print_offset_data::update)
4507         (print_offset_data::finish): Move from c-typeprint.c and rename.
4508         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4509         (print_spaces_filtered_with_print_options): Update.
4510         (c_print_type_union_field_offset, maybe_print_hole)
4511         (c_print_type_struct_field_offset): Move to typeprint.c and
4512         rename.
4513         (c_type_print_base_struct_union): Update.
4514
4515 2018-06-25  Pedro Alves  <palves@redhat.com>
4516
4517         * gdbthread.h (thread_info_ref, delete_thread)
4518         (delete_thread_silent, first_thread_of_inferior)
4519         (any_thread_of_inferior, switch_to_thread)
4520         (enable_thread_stack_temporaries)
4521         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4522         (get_last_thread_stack_temporary)
4523         (value_in_thread_stack_temporaries, can_access_registers_thread):
4524         Spell out "struct thread_info" instead of just "thread_info".
4525         * inferior.h (notice_new_inferior): Likewise.
4526
4527 2018-06-25  Pedro Alves  <palves@redhat.com>
4528
4529         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4530         pass thread_info pointer to delete_thread.
4531         (windows_nat_target::detach): Pass inferior pointer to
4532         detach_inferior.
4533         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4534         delete_thread.
4535         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4536         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4537         and pass a thread_info pointer to delete_thread.
4538         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4539         pass thread_info pointer to delete_thread.
4540         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4541         delete_thread_silent call.
4542         * procfs.c (procfs_target::detach): Pass inferior pointer to
4543         detach_inferior.
4544         (procfs_target::wait): Pass thread_info pointer to delete_thread.
4545         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4546         delete_thread_silent call.
4547         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4548         pass thread_info pointer to delete_thread.
4549         (windows_nat_target::detach): Pass inferior pointer to
4550         delete_inferior.
4551
4552 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4553
4554         * regcache.c (readable_regcache::read_part): Fix asserts.
4555         (reg_buffer::raw_collect_part): New function.
4556         (regcache::write_part): Fix asserts.
4557         (reg_buffer::raw_supply_part): New function.
4558         (regcache::transfer_regset_register): New helper function.
4559         (regcache::transfer_regset): Call new functions.
4560         (regcache_supply_regset): Use gdb_byte*.
4561         (regcache::supply_regset): Likewise.
4562         (regcache_collect_regset): Likewise.
4563         (regcache::collect_regset): Likewise.
4564         * regcache.h (reg_buffer::raw_collect_part): New declaration.
4565         (reg_buffer::raw_supply_part): Likewise.
4566         (regcache::transfer_regset_register): Likewise.
4567         (regcache::transfer_regset): Use gdb_byte*.
4568
4569 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4570
4571         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4572
4573 2018-06-21  Pedro Alves  <palves@redhat.com>
4574
4575         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4576         instead of a ptid_t.  All callers adjusted.
4577         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
4578         adjusted.
4579         (print_ada_task_info, display_current_task_id, task_command_1):
4580         Adjust.
4581         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4582         inferior_thread.
4583         (breakpoint_kind): Adjust.
4584         (remove_breakpoints_pid): Rename to ...
4585         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
4586         pointer.  All callers adjusted.
4587         (bpstat_clear_actions): Use inferior_thread.
4588         (get_bpstat_thread): New.
4589         (bpstat_do_actions): Use it.
4590         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4591         to take a thread_info pointer.  All callers adjusted.
4592         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4593         (breakpoint_re_set_thread): Use inferior_thread.
4594         * breakpoint.h (struct inferior): Forward declare.
4595         (bpstat_stop_status): Update.
4596         (remove_breakpoints_pid): Delete.
4597         (remove_breakpoints_inf): New.
4598         * bsd-uthread.c (bsd_uthread_target::wait)
4599         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4600         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4601         (maint_btrace_packet_history_cmd)
4602         (maint_btrace_clear_packet_history_cmd): Adjust.
4603         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4604         inferior_thread.
4605         * cli/cli-interp.c: Include "inferior.h".
4606         * common/refcounted-object.h (struct
4607         refcounted_object_ref_policy): New.
4608         * compile/compile-object-load.c: Include gdbthread.h.
4609         (store_regs): Use inferior_thread.
4610         * corelow.c (core_target::close): Use current_inferior.
4611         (core_target_open): Adjust to use first_thread_of_inferior and use
4612         the current inferior.
4613         * ctf.c (ctf_target::close): Adjust to use current_inferior.
4614         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4615         <thread>: ... this new field.  All references adjusted.
4616         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4617         Take a thread_info pointer instead of a ptid_t.
4618         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4619         (dummy_frame_discard, register_dummy_frame_dtor): Take a
4620         thread_info pointer instead of a ptid_t.
4621         * elfread.c: Include "inferior.h".
4622         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4623         Use inferior_thread.
4624         * eval.c (evaluate_subexp): Likewise.
4625         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4626         inferior_thread.
4627         * gdb_proc_service.h (struct thread_info): Forward declare.
4628         (struct ps_prochandle) <ptid>: Delete, replaced by ...
4629         <thread>: ... this new field.  All references adjusted.
4630         * gdbarch.h, gdbarch.c: Regenerate.
4631         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4632         'thread' parameter.  All implementations and callers adjusted.
4633         * gdbthread.h (thread_info) <set_running>: New method.
4634         (delete_thread, delete_thread_silent): Take a thread_info pointer
4635         instead of a ptid.
4636         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4637         (first_thread_of_process): Delete, replaced by ...
4638         (first_thread_of_inferior): ... this new function.  All callers
4639         adjusted.
4640         (any_live_thread_of_process): Delete, replaced by ...
4641         (any_live_thread_of_inferior): ... this new function.  All callers
4642         adjusted.
4643         (switch_to_thread, switch_to_no_thread): Declare.
4644         (is_executing): Delete.
4645         (enable_thread_stack_temporaries): Update comment.
4646         <enable_thread_stack_temporaries>: Take a thread_info pointer
4647         instead of a ptid_t.  Incref the thread.
4648         <~enable_thread_stack_temporaries>: Decref the thread.
4649         <m_ptid>: Delete
4650         <m_thr>: New.
4651         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4652         (get_last_thread_stack_temporary)
4653         (value_in_thread_stack_temporaries, can_access_registers_thread):
4654         Take a thread_info pointer instead of a ptid_t.  All callers
4655         adjusted.
4656         * infcall.c (get_call_return_value): Use inferior_thread.
4657         (run_inferior_call): Work with thread pointers instead of ptid_t.
4658         (call_function_by_hand_dummy): Work with thread pointers instead
4659         of ptid_t.  Use thread_info_ref.
4660         * infcmd.c (proceed_thread_callback): Access thread's state
4661         directly.
4662         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4663         access thread's state directly.
4664         (continue_command): Use inferior_thread.
4665         (info_program_command): Use find_thread_ptid and access thread
4666         state directly.
4667         (proceed_after_attach_callback): Use thread state directly.
4668         (notice_new_inferior): Take a thread_info pointer instead of a
4669         ptid_t.  All callers adjusted.
4670         (exit_inferior): Take an inferior pointer instead of a pid.  All
4671         callers adjusted.
4672         (exit_inferior_silent): New.
4673         (detach_inferior): Delete.
4674         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4675         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4676         (detach_inferior_command, kill_inferior_command): Use
4677         find_inferior_id instead of valid_gdb_inferior_id and
4678         gdb_inferior_id_to_pid.
4679         (inferior_command): Use inferior and thread pointers.
4680         * inferior.h (struct thread_info): Forward declare.
4681         (notice_new_inferior): Take a thread_info pointer instead of a
4682         ptid_t.  All callers adjusted.
4683         (detach_inferior): Delete declaration.
4684         (exit_inferior, exit_inferior_silent): Take an inferior pointer
4685         instead of a pid.  All callers adjusted.
4686         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4687         (valid_gdb_inferior_id): Delete.
4688         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4689         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4690         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4691         ...
4692         <inf>: ... this new field.
4693         <step_ptid>: Delete, replaced by ...
4694         <step_thread>: ... this new field.
4695         (get_displaced_stepping_state): Take an inferior pointer instead
4696         of a pid.  All callers adjusted.
4697         (displaced_step_in_progress_any_inferior): Adjust.
4698         (displaced_step_in_progress_thread): Take a thread pointer instead
4699         of a ptid_t.  All callers adjusted.
4700         (displaced_step_in_progress, add_displaced_stepping_state): Take
4701         an inferior pointer instead of a pid.  All callers adjusted.
4702         (get_displaced_step_closure_by_addr): Adjust.
4703         (remove_displaced_stepping_state): Take an inferior pointer
4704         instead of a pid.  All callers adjusted.
4705         (displaced_step_prepare_throw, displaced_step_prepare)
4706         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4707         All callers adjusted.
4708         (start_step_over): Adjust.
4709         (infrun_thread_ptid_changed): Remove bit updating ptids in the
4710         displaced step queue.
4711         (do_target_resume): Adjust.
4712         (fetch_inferior_event): Use inferior_thread.
4713         (context_switch, get_inferior_stop_soon): Take an
4714         execution_control_state pointer instead of a ptid_t.  All callers
4715         adjusted.
4716         (switch_to_thread_cleanup): Delete.
4717         (stop_all_threads): Use scoped_restore_current_thread.
4718         * inline-frame.c: Include "gdbthread.h".
4719         (inline_state) <inline_state>: Take a thread pointer instead of a
4720         ptid_t.  All callers adjusted.
4721         <ptid>: Delete, replaced by ...
4722         <thread>: ... this new field.
4723         (find_inline_frame_state): Take a thread pointer instead of a
4724         ptid_t.  All callers adjusted.
4725         (skip_inline_frames, step_into_inline_frame)
4726         (inline_skipped_frames, inline_skipped_symbol): Take a thread
4727         pointer instead of a ptid_t.  All callers adjusted.
4728         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4729         (inline_skipped_frames, inline_skipped_symbol): Likewise.
4730         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4731         pointers directly.
4732         * linux-nat.c (get_detach_signal): Likewise.
4733         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4734         (thread_db_notice_clone): Adjust.
4735         (thread_db_find_new_threads_silently)
4736         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4737         a thread pointer instead of a ptid_t.  All callers adjusted.
4738         * mi/mi-cmd-var.c: Include "inferior.h".
4739         (mi_cmd_var_update_iter): Update to use thread pointers.
4740         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4741         inferior directly.
4742         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4743         out to ...
4744         (mi_output_running): ... this new function.
4745         (mi_on_resume_1): Adjust to use it.
4746         (mi_user_selected_context_changed): Adjust to use inferior_thread.
4747         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4748         directly.
4749         (interrupt_thread_callback): : Adjust to use thread and inferior
4750         pointers.
4751         * proc-service.c: Include "gdbthread.h".
4752         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4753         * progspace-and-thread.c: Include "inferior.h".
4754         * progspace.c: Include "inferior.h".
4755         * python/py-exitedevent.c (create_exited_event_object): Adjust to
4756         hold a reference to an inferior_object.
4757         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4758         inferior_thread.
4759         * python/py-inferior.c (struct inferior_object): Give the type a
4760         tag name instead of a typedef.
4761         (python_on_normal_stop): No need to check if the current thread is
4762         listed.
4763         (inferior_to_inferior_object): Change return type to
4764         inferior_object.  All callers adjusted.
4765         (find_thread_object): Delete, bits factored out to ...
4766         (thread_to_thread_object): ... this new function.
4767         * python/py-infthread.c (create_thread_object): Use
4768         inferior_to_inferior_object.
4769         (thpy_is_stopped): Use thread pointer directly.
4770         (gdbpy_selected_thread): Use inferior_thread.
4771         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4772         field, replaced with ...
4773         <thread>: ... this new field.  All users adjusted.
4774         (btpy_insn_or_gap_new): Drop const.
4775         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
4776         callers adjusted.
4777         * python/py-record.c: Include "gdbthread.h".
4778         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4779         a ptid_t.  All callers adjusted.
4780         (gdbpy_current_recording): Use inferior_thread.
4781         * python/py-record.h (recpy_record_object) <ptid>: Delete
4782         field, replaced with ...
4783         <thread>: ... this new field.  All users adjusted.
4784         (recpy_element_object) <ptid>: Delete
4785         field, replaced with ...
4786         <thread>: ... this new field.  All users adjusted.
4787         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4788         a ptid_t.  All callers adjusted.
4789         * python/py-threadevent.c: Include "gdbthread.h".
4790         (get_event_thread): Use thread_to_thread_object.
4791         * python/python-internal.h (struct inferior_object): Forward
4792         declare.
4793         (find_thread_object, find_inferior_object): Delete declarations.
4794         (thread_to_thread_object, inferior_to_inferior_object): New
4795         declarations.
4796         * record-btrace.c: Include "inferior.h".
4797         (require_btrace_thread): Use inferior_thread.
4798         (record_btrace_frame_sniffer)
4799         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4800         (get_thread_current_frame): Use scoped_restore_current_thread and
4801         switch_to_thread.
4802         (get_thread_current_frame): Use thread pointer directly.
4803         (record_btrace_replay_at_breakpoint): Use thread's inferior
4804         pointer directly.
4805         * record-full.c: Include "inferior.h".
4806         * regcache.c: Include "gdbthread.h".
4807         (get_thread_arch_regcache): Use the inferior's address space
4808         directly.
4809         (get_thread_regcache, registers_changed_thread): New.
4810         * regcache.h (get_thread_regcache(thread_info *thread)): New
4811         overload.
4812         (registers_changed_thread): New.
4813         (remote_target) <remote_detach_1>: Swap order of parameters.
4814         (remote_add_thread): <remote_add_thread>: Return the new thread.
4815         (get_remote_thread_info(ptid_t)): New overload.
4816         (remote_target::remote_notice_new_inferior): Use thread pointers
4817         directly.
4818         (remote_target::process_initial_stop_replies): Use
4819         thread_info::set_running.
4820         (remote_target::remote_detach_1, remote_target::detach)
4821         (extended_remote_target::detach): Adjust.
4822         * stack.c (frame_show_address): Use inferior_thread.
4823         * target-debug.h (target_debug_print_thread_info_pp): New.
4824         * target-delegates.c: Regenerate.
4825         * target.c (default_thread_address_space): Delete.
4826         (memory_xfer_partial_1): Use current_inferior.
4827         (target_detach): Use current_inferior.
4828         (target_thread_address_space): Delete.
4829         (generic_mourn_inferior): Use current_inferior.
4830         * target.h (struct target_ops) <thread_address_space>: Delete.
4831         (target_thread_address_space): Delete.
4832         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
4833         pointers directly.
4834         (delete_thread_1, delete_thread, delete_thread_silent): Take a
4835         thread pointer instead of a ptid_t.  Adjust all callers.
4836         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4837         (first_thread_of_process): Delete, replaced by ...
4838         (first_thread_of_inferior): ... this new function.  All callers
4839         adjusted.
4840         (any_thread_of_process): Rename to ...
4841         (any_thread_of_inferior): ... this, and take an inferior pointer.
4842         (any_live_thread_of_process): Rename to ...
4843         (any_live_thread_of_inferior): ... this, and take an inferior
4844         pointer.
4845         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4846         (value_in_thread_stack_temporaries)
4847         (get_last_thread_stack_temporary): Take a thread pointer instead
4848         of a ptid_t.  Adjust all callers.
4849         (thread_info::set_running): New.
4850         (validate_registers_access): Use inferior_thread.
4851         (can_access_registers_ptid): Rename to ...
4852         (can_access_registers_thread): ... this, and take a thread
4853         pointer.
4854         (print_thread_info_1): Adjust to compare thread pointers instead
4855         of ptids.
4856         (switch_to_no_thread, switch_to_thread): Make extern.
4857         (scoped_restore_current_thread::~scoped_restore_current_thread):
4858         Use m_thread pointer directly.
4859         (scoped_restore_current_thread::scoped_restore_current_thread):
4860         Use inferior_thread.
4861         (thread_command): Use thread pointer directly.
4862         (thread_num_make_value_helper): Use inferior_thread.
4863         * top.c (execute_command): Use inferior_thread.
4864         * tui/tui-interp.c: Include "inferior.h".
4865         * varobj.c (varobj_create): Use inferior_thread.
4866         (value_of_root_1): Use find_thread_global_id instead of
4867         global_thread_id_to_ptid.
4868
4869 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
4870
4871         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4872         possible.
4873         (regcache::write_part): Likewise.
4874         (readable_regcache::cooked_read_part): Update comment.
4875         (readable_regcache::cooked_write_part): Likewise.
4876         * regcache.h: (readable_regcache::read_part): Likewise.
4877         (regcache::write_part): Likewise.
4878
4879 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4880             Dirk Schubert  <dirk.schubert@arm.com>
4881
4882         * aarch64-linux-nat.c (post_attach): New.
4883         (aarch64_linux_nat_target::post_attach): Override post_attach to
4884         record the number of hardware debug registers.
4885
4886 2018-06-20  Tom Tromey  <tom@tromey.com>
4887
4888         * python/py-param.c (add_setshow_generic): Make parameters const.
4889         (parmpy_init): Update.
4890
4891 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4892
4893         * regcache.h (regcache_cooked_read_ftype): Rename to...
4894         (register_read_ftype): ...this, change type to function_view.
4895         (class reg_buffer) <save>: Remove src parameter.
4896         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4897         parameter non-const in first overload.  Remove src parameter in
4898         second overload.
4899         * regcache.c (do_cooked_read): Remove.
4900         (readonly_detached_regcache::readonly_detached_regcache): Make
4901         parameter non-const, adjust call to other constructor.
4902         (reg_buffer::save): Remove src parameter.
4903         * frame.c (do_frame_register_read): Remove.
4904         (frame_save_as_regcache): Use lambda function.
4905         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4906         parameter to ppu2spu_data *.
4907         (ppu2spu_sniffer): Use lambda function.
4908
4909 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4910
4911         * record-full.c (record_full_target::insert_breakpoint): Remove
4912         "struct" keyword, add const.
4913
4914 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
4915
4916         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4917         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4918         * configure.ac: Remove AC_PREREQ, add missing quoting.
4919         * gnulib/configure.ac: Modernize usage of
4920         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
4921         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4922         (AUTOMAKE_VERSION): Bump to 1.15.1.
4923         * configure: Re-generate.
4924         * config.in: Re-generate.
4925         * aclocal.m4: Re-generate.
4926         * gnulib/aclocal.m4: Re-generate.
4927         * gnulib/config.in: Re-generate.
4928         * gnulib/configure: Re-generate.
4929         * gnulib/import/Makefile.in: Re-generate.
4930
4931 2018-06-19  Pedro Alves  <palves@redhat.com>
4932
4933         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4934         (lookup_minimal_symbol_by_pc_section): ... here with
4935         gdb_assert_not_reached added.
4936
4937 2018-06-19  Pedro Alves  <palves@redhat.com>
4938
4939         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4940         parameter with a block parameter.  Compare location's block symbol
4941         with the frame's block instead of addresses.
4942         (skip_inline_frames): Pass the current block instead of the
4943         frame's address.  Break out as soon as we determine the frame
4944         should not be skipped.
4945
4946 2018-06-18  Tom Tromey  <tom@tromey.com>
4947
4948         * solib-aix.c (solib_aix_get_section_offsets): Return
4949         unique_xmalloc_ptr.
4950         (solib_aix_solib_create_inferior_hook): Update.
4951
4952 2018-06-18  Tom Tromey  <tom@tromey.com>
4953
4954         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4955
4956 2018-06-18  Tom Tromey  <tom@tromey.com>
4957
4958         * solib-frv.c (frv_relocate_main_executable): Use
4959         unique_xmalloc_ptr.
4960         * solib-dsbt.c (dsbt_relocate_main_executable): Use
4961         unique_xmalloc_ptr.
4962
4963 2018-06-18  Tom Tromey  <tom@tromey.com>
4964
4965         * objfiles.h (inhibit_section_map_updates): Update.
4966         (resume_section_map_updates, resume_section_map_updates_cleanup):
4967         Remove.
4968         * solib-svr4.c (svr4_handle_solib_event): Update.
4969         * objfiles.c (inhibit_section_map_updates): Return
4970         scoped_restore_tmpl<int>.
4971         (resume_section_map_updates, resume_section_map_updates_cleanup):
4972         Remove.
4973
4974 2018-06-18  Tom Tromey  <tom@tromey.com>
4975
4976         * valprint.h (read_string): Update.
4977         * valprint.c (read_string): Change type of "buffer".
4978         (val_print_string): Update.
4979         * python/py-value.c (valpy_string): Update.
4980         * language.h (struct language_defn) <la_get_string>: Change
4981         type of "buffer".
4982         (default_get_string, c_get_string): Update.
4983         * language.c (default_get_string): Change type of "buffer".
4984         * guile/scm-value.c (gdbscm_value_to_string): Update.
4985         * c-lang.c (c_get_string): Change type of "buffer".
4986
4987 2018-06-18  Tom Tromey  <tom@tromey.com>
4988
4989         * ser-mingw.c (struct pipe_state_destroyer): New.
4990         (pipe_state_up): New typedef.
4991         (cleanup_pipe_state): Remove.
4992         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
4993
4994 2018-06-18  Tom Tromey  <tom@tromey.com>
4995
4996         * rust-lang.h (rust_yyerror): Don't declare.
4997         * rust-lang.c (rust_language_defn): Update.
4998         * rust-exp.y (yyerror): Now static.
4999         * parse.c (parse_exp_in_context_1): Update.
5000         * p-lang.h (p_yyerror): Don't declare.
5001         * p-lang.c (p_language_defn): Update.
5002         * p-exp.y (yyerror): Now static.
5003         * opencl-lang.c (opencl_language_defn): Update.
5004         * objc-lang.c (objc_language_defn): Update.
5005         * m2-lang.h (m2_yyerror): Don't declare.
5006         * m2-lang.c (m2_language_defn): Update.
5007         * m2-exp.y (yyerror): Now static.
5008         * language.h (struct language_defn) <la_error>: Remove.
5009         * language.c (unk_lang_error): Remove.
5010         (unknown_language_defn, auto_language_defn): Remove.
5011         * go-lang.h (go_yyerror): Don't declare.
5012         * go-lang.c (go_language_defn): Update.
5013         * go-exp.y (yyerror): Now static.
5014         * f-lang.h (f_yyerror): Don't declare.
5015         * f-lang.c (f_language_defn): Update.
5016         * f-exp.y (yyerror): Now static.
5017         * d-lang.h (d_yyerror): Don't declare.
5018         * d-lang.c (d_language_defn): Update.
5019         * d-exp.y (yyerror): Now static.
5020         * c-lang.h (c_yyerror): Don't declare.
5021         * c-lang.c (c_language_defn, cplus_language_defn)
5022         (asm_language_defn, minimal_language_defn): Update.
5023         * c-exp.y (yyerror): Now static.
5024         * ada-lang.h (ada_yyerror): Don't declare.
5025         * ada-lang.c (ada_language_defn): Update.
5026         * ada-exp.y (yyerror): Now static.
5027
5028 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5029
5030         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5031         (store_sveregs_to_thread): Likewise.
5032         (aarch64_linux_fetch_inferior_registers): Check for SVE.
5033         (aarch64_linux_store_inferior_registers): Likewise.
5034         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5035         function.
5036         (aarch64_sve_regs_copy_to_regcache): Likewise.
5037         (aarch64_sve_regs_copy_from_regcache): Likewise.
5038         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5039         declaration.
5040         (aarch64_sve_regs_copy_to_regcache): Likewise.
5041         (aarch64_sve_regs_copy_from_regcache): Likewise.
5042         (sve_context): Structure from Linux headers.
5043         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5044         (SVE_SIG_ZREG_SIZE): Likewise.
5045         (SVE_SIG_PREG_SIZE): Likewise.
5046         (SVE_SIG_FFR_SIZE): Likewise.
5047         (SVE_SIG_REGS_OFFSET): Likewise.
5048         (SVE_SIG_ZREGS_OFFSET): Likewise.
5049         (SVE_SIG_ZREG_OFFSET): Likewise.
5050         (SVE_SIG_ZREGS_SIZE): Likewise.
5051         (SVE_SIG_PREGS_OFFSET): Likewise.
5052         (SVE_SIG_PREG_OFFSET): Likewise.
5053         (SVE_SIG_PREGS_SIZE): Likewise.
5054         (SVE_SIG_FFR_OFFSET): Likewise.
5055         (SVE_SIG_REGS_SIZE): Likewise.
5056         (SVE_SIG_CONTEXT_SIZE): Likewise.
5057         (SVE_PT_REGS_MASK): Likewise.
5058         (SVE_PT_REGS_FPSIMD): Likewise.
5059         (SVE_PT_REGS_SVE): Likewise.
5060         (SVE_PT_VL_INHERIT): Likewise.
5061         (SVE_PT_VL_ONEXEC): Likewise.
5062         (SVE_PT_REGS_OFFSET): Likewise.
5063         (SVE_PT_FPSIMD_OFFSET): Likewise.
5064         (SVE_PT_FPSIMD_SIZE): Likewise.
5065         (SVE_PT_SVE_ZREG_SIZE): Likewise.
5066         (SVE_PT_SVE_PREG_SIZE): Likewise.
5067         (SVE_PT_SVE_FFR_SIZE): Likewise.
5068         (SVE_PT_SVE_FPSR_SIZE): Likewise.
5069         (SVE_PT_SVE_FPCR_SIZE): Likewise.
5070         (__SVE_SIG_TO_PT): Likewise.
5071         (SVE_PT_SVE_OFFSET): Likewise.
5072         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5073         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5074         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5075         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5076         (SVE_PT_SVE_PREG_OFFSET): Likewise.
5077         (SVE_PT_SVE_PREGS_SIZE): Likewise.
5078         (SVE_PT_SVE_FFR_OFFSET): Likewise.
5079         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5080         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5081         (SVE_PT_SVE_SIZE): Likewise.
5082         (SVE_PT_SIZE): Likewise.
5083         (HAS_SVE_STATE): New define.
5084
5085 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5086
5087         * nat/aarch64-sve-linux-sigcontext.h: New file.
5088         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5089         new files.
5090         (SVE_VQ_MIN): Likewise.
5091         (SVE_VQ_MAX): Likewise.
5092         (SVE_VL_MIN): Likewise.
5093         (SVE_VL_MAX): Likewise.
5094         (SVE_NUM_ZREGS): Likewise.
5095         (SVE_NUM_PREGS): Likewise.
5096         (sve_vl_valid): Likewise.
5097         (struct user_sve_header): Likewise.
5098
5099 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
5100             Richard Bunt <Richard.Bunt@arm.com>
5101
5102         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5103         was requested by GDB.
5104
5105 2018-06-15  Tom de Vries  <tdevries@suse.de>
5106
5107         * MAINTAINERS (Write After Approval): Add Tom de Vries.
5108
5109 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
5110
5111         * gnulib/update-gnulib.sh: Print expected versions of
5112         autoconf/aclocal.
5113
5114 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
5115
5116         * arch-utils.c (default_type_align): Use type_length_units.
5117         * gdbtypes.c (type_align): Use type_length_units.
5118
5119 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5120
5121         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5122         of 'define' command.
5123
5124 2018-06-14  Tom de Vries  <tdevries@suse.de>
5125
5126         PR cli/22573
5127         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5128         get_no_prettyformat_print_options.
5129
5130 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5131
5132         * sparc-nat.h: Include target.h.
5133         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5134         <fetch_registers>: Remove this argument in function call.
5135         <store_registers>: Remove this argument in function call, remove
5136         extra semicolon.
5137         <low_forget_process>: Call sparc64_forget_process instead of
5138         sparc_forget_process.
5139
5140 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5141
5142         * procfs.c (_initialize_procfs): Use add_inf_child_target.
5143         (procfs_target::make_corefile_notes): Adjust to new
5144         target_read_alloc return type.
5145
5146 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5147             Stephen Roberts  <stephen.roberts@arm.com>
5148
5149         PR gdb/22882
5150         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5151         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5152         Move should_notify_stop local into more inner scope.
5153
5154 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5155             Stephen Roberts  <stephen.roberts@arm.com>
5156
5157         PR gdb/22882
5158         * infrun.c (resume_1): Add call to mark_async_event_handler.
5159
5160 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5161
5162         * infrun.c (do_target_wait): Change old version of $pc printed.
5163
5164 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5165
5166         * dwarf2read.c (read_index_from_section): Rename to...
5167         (read_gdb_index_from_section): ... this, update all callers.
5168         (dwarf2_read_index): Rename to...
5169         (dwarf2_read_gdb_index): ... this, update all callers.
5170
5171 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
5172
5173         * gdb/hppa-linux-nat.c
5174         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5175         hppa_linux_nat_target::fetch_registers.
5176
5177 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5178
5179         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5180         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5181         (AARCH64_DWARF_SVE_FFR): Likewise.
5182         (AARCH64_DWARF_SVE_P0): Likewise.
5183         (AARCH64_DWARF_SVE_Z0): Likewise.
5184
5185 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5186
5187         * common/common-regcache.h (raw_compare): New function.
5188         * regcache.c (regcache::raw_compare): Likewise.
5189         * regcache.h (regcache::raw_compare): New declaration.
5190
5191 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5192
5193         * common/common-regcache.h (reg_buffer_common): New structure.
5194         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5195         (reg_buffer::raw_supply): Likewise.
5196         (reg_buffer::raw_supply_integer): Likewise.
5197         (reg_buffer::raw_supply_zeroed): Likewise.
5198         (reg_buffer::raw_collect): Likewise.
5199         (reg_buffer::raw_collect_integer): Likewise.
5200         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5201         (reg_buffer::raw_supply): Likewise.
5202         (reg_buffer::raw_supply_integer): Likewise.
5203         (reg_buffer::raw_supply_zeroed): Likewise.
5204         (reg_buffer::raw_collect): Likewise.
5205         (reg_buffer::raw_collect_integer): Likewise.
5206
5207 2018-06-10  Tom Tromey  <tom@tromey.com>
5208
5209         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
5210         (class remote_state) <stop_reply_queue>: Now std::vector.
5211         (remote_state::~remote_state)
5212         (remote_target::stop_reply_queue_length): Update.
5213         (struct queue_iter_param, remove_child_of_pending_fork)
5214         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5215         (check_pending_event_prevents_wildcard_vcont_callback)
5216         (remove_stop_reply_for_inferior)
5217         (remove_stop_reply_of_remote_state)
5218         (remote_notif_remove_once_on_match)
5219         (stop_reply_match_ptid_and_ws)
5220         (remote_kill_child_of_pending_fork): Remove.
5221         (remote_target::remove_new_fork_children)
5222         (remote_target::check_pending_events_prevent_wildcard_vcont)
5223         (remote_target::discard_pending_stop_replies)
5224         (remote_target::discard_pending_stop_replies_in_queue)
5225         (remote_target::remote_notif_remove_queued_reply)
5226         (remote_target::queued_stop_reply)
5227         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5228         (remote_target::wait, remote_target::kill_new_fork_children)
5229         (remote_target::async): Update.
5230
5231 2018-06-10  Tom Tromey  <tom@tromey.com>
5232
5233         * record-full.c (record_full_arch_list_cleanups): Remove.
5234         (record_full_message): Use try/catch.
5235         (record_full_wait_cleanups): Remove.
5236         (record_full_wait_1): Use try/catch.
5237         (record_full_restore): Likewise.
5238
5239 2018-06-10  Tom Tromey  <tom@tromey.com>
5240
5241         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
5242         declare VEC.  Add constructor.
5243         <in_target_beneath>: Now bool.
5244         (record_full_breakpoints): Now a std::vector, static.
5245         (record_full_sync_record_breakpoints)
5246         (record_full_init_record_breakpoints)
5247         (record_full_target::insert_breakpoint)
5248         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
5249
5250 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5251
5252         * dwarf2read.c (process_cu_includes): Remove struct keyword.
5253         * serial.c (serial_interface_lookup): Remove struct keyword.
5254
5255 2018-06-10  Tom Tromey  <tom@tromey.com>
5256
5257         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5258         method.
5259         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5260         a method.
5261         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5262         method.
5263         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5264         "beneath" as a method.
5265         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5266         Use "beneath" as a method.
5267
5268 2018-06-10  Tom Tromey  <tom@tromey.com>
5269
5270         * tracefile.c (struct trace_file_writer_deleter): New.
5271         <operator()>: Rename from trace_file_writer_xfree.
5272         (trace_file_writer_up): New typedef.
5273         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5274
5275 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5276
5277         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5278         <m_registers, m_register_status>: Change type to
5279         std::unique_ptr.
5280         * regcache.c (reg_buffer::reg_buffer): Use new instead of
5281         XCNEWVEC.
5282
5283 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5284
5285         * common/common-regcache.h (enum register_status): Add
5286         underlying type "signed char".
5287         * regcache.h (reg_buffer) <m_register_status>: Change type to
5288         register_status *.
5289         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5290         register_status instead of signed char.
5291         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5292         (reg_buffer::get_register_status): Remove cast.
5293         (readable_regcache::raw_read): Remove cast.
5294         (readable_regcache::cooked_read): Remove cast.
5295
5296 2018-06-09  Tom Tromey  <tom@tromey.com>
5297
5298         * source.c (reverse_search_command, forward_search_command): Use
5299         scoped_fd.
5300
5301 2018-06-09  Tom Tromey  <tom@tromey.com>
5302
5303         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
5304         (serial_ops_list): Now static, std::vector.
5305         (serial_interface_lookup, serial_add_interface): Update.
5306
5307 2018-06-09  Tom Tromey  <tom@tromey.com>
5308
5309         * dwarf2read.c (process_cu_includes): Update.
5310         (process_full_comp_unit): Update.
5311         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5312         std::vector.
5313
5314 2018-06-08  Paul Koning  <paul_koning@dell.com>
5315
5316         PR gdb/23252
5317
5318         * python/python.c (do_start_initialization):
5319         Avoid call to internal Python API.
5320         (init__gdb_module): New function.
5321
5322 2018-06-08  Gary Benson <gbenson@redhat.com>
5323
5324         * linux-thread-db.c (valprint.h): New include.
5325         (struct check_thread_db_info): New structure.
5326         (check_thread_db_on_load, tdb_testinfo): New static globals.
5327         (check_thread_db, check_thread_db_callback): New functions.
5328         (try_thread_db_load_1): Run integrity checks if requested.
5329         (maintenance_check_libthread_db): New function.
5330         (_initialize_thread_db): Register "maint check libthread-db"
5331         and "maint set/show check-libthread-db".
5332         * NEWS: Mention the above new commands.
5333
5334 2018-06-08  Tom Tromey  <tom@tromey.com>
5335
5336         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5337         now a method.
5338
5339 2018-06-08  Tom Tromey  <tom@tromey.com>
5340
5341         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5342
5343 2018-06-08  Tom Tromey  <tom@tromey.com>
5344
5345         * common/btrace-common.h (struct btrace_data): Add constructor,
5346         destructor, move assignment operator.
5347         <empty, clear, fini>: New methods.
5348         <format>: Initialize.
5349         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5350         (btrace_data_empty): Don't declare.
5351         * common/btrace-common.c (btrace_data_init): Remove.
5352         (btrace_data::fini): Rename from btrace_data_fini.
5353         (btrace_data::empty): Rename from btrace_data_empty.
5354         (btrace_data::clear): Rename from btrace_data_clear.  Return
5355         bool.
5356         * btrace.h (make_cleanup_btrace_data): Don't declare.
5357         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5358         (parse_xml_btrace): Update.
5359         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5360         (maint_btrace_clear_packet_history_cmd): Update.
5361
5362 2018-06-07  Pedro Alves  <palves@redhat.com>
5363
5364         * target.h (target_ops) <beneath>: Now a method.  All references
5365         updated.
5366         (class target_stack): New.
5367         * target.c (g_target_stack): New.
5368         (g_current_top_target): Delete.
5369         (current_top_target): Get the top target out of g_target_stack.
5370         (target_stack::push, target_stack::unpush): New.
5371         (push_target, unpush_target): Reimplement.
5372         (target_is_pushed): Reimplement in terms of g_target_stack.
5373         (target_ops::beneath, target_stack::find_beneath): New.
5374
5375 2018-06-07  Pedro Alves  <palves@redhat.com>
5376
5377         * target.h (find_target_beneath): Delete declaration.
5378         * target.c (find_target_beneath): Delete definition.
5379         * aix-thread.c: All callers of find_target_beneath adjusted to
5380         call target_ops::beneath instead.
5381         * bsd-uthread.c: Likewise.
5382         * linux-thread-db.c: Likewise.
5383         * ravenscar-thread.c: Likewise.
5384         * sol-thread.c: Likewise.
5385         * spu-multiarch.c: Likewise.
5386
5387 2018-06-07  Pedro Alves  <palves@redhat.com>
5388
5389         * target.h (target_ops) <beneath>: Now a method.  All references
5390         updated.
5391         (target_ops) <m_beneath>: New.
5392         * target.c (target_ops::beneath): New.
5393         * corelow.c: Adjust all references to target_ops::beneath.
5394         * linux-thread-db.c: Likewise.
5395         * make-target-delegates: Likewise.
5396         * record-btrace.c: Likewise.
5397         * record-full.c: Likewise.
5398         * remote.c: Likewise.
5399         * target.c: Likewise.
5400         * target-delegates.c: Regenerate.
5401
5402 2018-06-07  Pedro Alves  <palves@redhat.com>
5403
5404         * target.h (target_stack): Delete.
5405         (current_top_target): Declare function.
5406         * target.c (target_stack): Delete.
5407         (g_current_top_target): New.
5408         (current_top_target): New function.
5409         * auxv.c: Use current_top_target instead of target_stack
5410         throughout.
5411         * avr-tdep.c: Likewise.
5412         * breakpoint.c: Likewise.
5413         * corefile.c: Likewise.
5414         * elfread.c: Likewise.
5415         * eval.c: Likewise.
5416         * exceptions.c: Likewise.
5417         * frame.c: Likewise.
5418         * gdbarch-selftests.c: Likewise.
5419         * gnu-v3-abi.c: Likewise.
5420         * ia64-tdep.c: Likewise.
5421         * ia64-vms-tdep.c: Likewise.
5422         * infcall.c: Likewise.
5423         * infcmd.c: Likewise.
5424         * infrun.c: Likewise.
5425         * linespec.c: Likewise.
5426         * linux-tdep.c: Likewise.
5427         * minsyms.c: Likewise.
5428         * ppc-linux-nat.c: Likewise.
5429         * ppc-linux-tdep.c: Likewise.
5430         * procfs.c: Likewise.
5431         * regcache.c: Likewise.
5432         * remote.c: Likewise.
5433         * rs6000-tdep.c: Likewise.
5434         * s390-linux-nat.c: Likewise.
5435         * s390-tdep.c: Likewise.
5436         * solib-aix.c: Likewise.
5437         * solib-darwin.c: Likewise.
5438         * solib-dsbt.c: Likewise.
5439         * solib-spu.c: Likewise.
5440         * solib-svr4.c: Likewise.
5441         * solib-target.c: Likewise.
5442         * sparc-tdep.c: Likewise.
5443         * sparc64-tdep.c: Likewise.
5444         * spu-tdep.c: Likewise.
5445         * symfile.c: Likewise.
5446         * symtab.c: Likewise.
5447         * target-descriptions.c: Likewise.
5448         * target-memory.c: Likewise.
5449         * target.c: Likewise.
5450         * target.h: Likewise.
5451         * tracefile-tfile.c: Likewise.
5452         * tracepoint.c: Likewise.
5453         * valops.c: Likewise.
5454         * valprint.c: Likewise.
5455         * value.c: Likewise.
5456         * windows-tdep.c: Likewise.
5457         * mi/mi-main.c: Likewise.
5458
5459 2018-06-07  Tom Tromey  <tom@tromey.com>
5460
5461         * valprint.h (build_address_symbolic): Declare.
5462         * printcmd.c (print_address_symbolic): Update.
5463         (build_address_symbolic): Change "name" and "filename" to
5464         std::string.
5465         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5466         Update.
5467         * defs.h (build_address_symbolic): Remove declaration.
5468
5469 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
5470
5471         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5472         (aarch64_vnv_type): Add function.
5473         (aarch64_pseudo_register_name): Add V regs for SVE.
5474         (aarch64_pseudo_register_type): Likewise.
5475         (aarch64_pseudo_register_reggroup_p): Likewise.
5476         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5477         (aarch64_pseudo_read_value): Add V regs for SVE.
5478         (aarch64_pseudo_write_2): Use V0 offset for SVE
5479         (aarch64_pseudo_write): Add V regs for SVE.
5480         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5481
5482 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5483
5484         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5485         (sve_vl_from_vq): Likewise.
5486
5487 2018-06-05  Tom Tromey  <tom@tromey.com>
5488
5489         * cli/cli-cmds.c (show_version): Update.
5490         * top.c (print_gdb_version): Add "interactive" parameter.
5491         Update.
5492         * main.c (captured_main_1): Update.
5493         * top.h (print_gdb_version): Add "interactive" parameter and a
5494         comment.
5495
5496 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
5497
5498         * common/enum-flags.h: Add trailing semicolon to example in
5499         comment.
5500
5501 2018-06-05  Tom Tromey  <tom@tromey.com>
5502
5503         PR cli/12326:
5504         * NEWS: Add entry about pager.
5505         * utils.c (pagination_disabled_for_command): New global.
5506         (prompt_for_continue): Allow "c" response to prompt.
5507         (reinitialize_more_filter): Clear
5508         pagination_disabled_for_command.
5509         (fputs_maybe_filtered): Check pagination_disabled_for_command.
5510
5511 2018-06-04  Tom Tromey  <tom@tromey.com>
5512
5513         * ada-lang.h (ada_lookup_symbol_list): Update.
5514         * ada-lang.c (resolve_subexp): Update.
5515         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
5516         parameter.
5517         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5518         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5519         results parameter to std::vector.
5520         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5521         Update.
5522         * ada-exp.y (block_lookup): Update.
5523         (select_possible_type_sym): Change type of syms.  Remove nsyms
5524         parameter.
5525         (write_var_or_type, write_name_assoc): Update.
5526
5527 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
5528
5529         * windows-nat.c (windows_nat_target::xfer_partial): Return
5530         TARGET_XFER_E_IO if we need to delegate to the target beneath
5531         but BENEATH is NULL.
5532
5533 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
5534
5535         * Makefile.in (config.status): Add configure.nat as a
5536         dependency.
5537
5538 2018-06-04  Tom Tromey  <tom@tromey.com>
5539
5540         * cp-name-parser.y (cpname_state): Add method declarations.
5541         (HANDLE_QUAL): Update.
5542         (cpname_state::d_grab, cpname_state::fill_comp)
5543         (cpname_state::make_operator, cpname_state::make_dtor)
5544         (cpname_state::make_builtin_type, cpname_state::make_name)
5545         (cpname_state::d_qualify, cpname_state::d_int_type)
5546         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5547         (%union): Move earlier.
5548
5549 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5550
5551         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5552
5553 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5554
5555         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5556         (aarch64_pseudo_write_1): Likewise.
5557         (aarch64_pseudo_read_value): Use helper.
5558         (aarch64_pseudo_write): Likewise.
5559
5560 2018-06-04  Pedro Alves  <palves@redhat.com>
5561
5562         * darwin-nat.c (darwin_ops): Delete.
5563         (darwin_attach_pid): Use get_native_target.
5564
5565 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5566
5567         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5568         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5569
5570 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5571
5572         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5573         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5574         (aarch64_gdbarch_init): Check for SVE.
5575         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5576
5577 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5578
5579         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5580         * aarch64-tdep.h (aarch64_read_description): Likewise.
5581         * arch/aarch64.c (aarch64_create_target_description): Likewise.
5582         * arch/aarch64.h (aarch64_create_target_description): Likewise.
5583         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5584         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5585         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5586
5587 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
5588
5589         * value.c (value_fetch_lazy_bitfield): New.
5590         (value_fetch_lazy_memory): New.
5591         (value_fetch_lazy_register): New.
5592         (value_fetch_lazy): Factor out to smaller functions.
5593
5594 2018-06-01  Tom Tromey  <tom@tromey.com>
5595
5596         * cp-name-parser.y (backslashable, represented): Now const.
5597
5598 2018-06-01  Tom Tromey  <tom@tromey.com>
5599
5600         * cp-name-parser.y: Include parser-defs.h.
5601         (parser_fprintf): Remove declaration.
5602
5603 2018-06-01  Tom Tromey  <tom@tromey.com>
5604
5605         * cp-name-parser.y: Use %pure-parser, %lex-param, and
5606         %parse-param.
5607         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5608         (global_result): Remove globals.
5609         (struct cpname_state): New.
5610         (yyparse): Don't declare.
5611         (yylex, yyerror): Move declarations after %union.
5612         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5613         (make_name): Add state parameter.
5614         Update all callers.
5615         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5616         parameter.
5617         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5618         Update.
5619         (yylex): Add lvalp, state parameters.
5620         (yyerror): Add state parameter.
5621         (cp_demangled_name_to_comp): Update.
5622
5623 2018-06-01  Tom Tromey  <tom@tromey.com>
5624
5625         * cp-name-parser.y (parser_fprintf): Declare.
5626         (GDB_YY_REMAP_PREFIX): Define.
5627         Include yy-remap.h.  Don't redefine yy* identifiers.
5628
5629 2018-06-01  Tom Tromey  <tom@tromey.com>
5630
5631         * python/py-type.c (typy_legacy_template_argument): Update.
5632         * cp-support.h (cp_demangled_name_to_comp): Update.
5633         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5634         parameter to be a "std::string *".
5635         (main): Update.
5636
5637 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
5638
5639         * ada-lex.l: Include "diagnostics.h" instead of
5640         "common/diagnostics.h".
5641         * unittests/environ-selftests.c: Likewise.
5642         * common/diagnostics.h: Moved to ../include.
5643
5644 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
5645
5646         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5647         to language_mode_manual while calling breakpoint_re_set_one.
5648
5649 2018-06-01  Tom Tromey  <tom@tromey.com>
5650
5651         * valops.c (value_cast_structs, destructor_name_p): Update.
5652         * symtab.c (gdb_mangle_name): Update.
5653         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5654         Update.
5655         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5656         (pascal_object_print_value_fields, pascal_object_print_value):
5657         Update.
5658         * p-typeprint.c (pascal_type_print_derivation_info): Update.
5659         * linespec.c (find_methods): Update.
5660         * gdbtypes.h (type_name_no_tag): Remove.
5661         (type_name_or_error): Rename from type_name_no_tag_or_error.
5662         * gdbtypes.c (type_name_no_tag): Remove.
5663         (type_name_or_error): Rename from type_name_no_tag_or_error.
5664         (lookup_struct_elt_type, check_typedef): Update.
5665         * expprint.c (print_subexp_standard): Update.
5666         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5667         * d-namespace.c (d_lookup_nested_symbol): Update.
5668         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5669         (cp_print_class_member): Update.
5670         * cp-namespace.c (cp_lookup_nested_symbol): Update.
5671         * completer.c (add_struct_fields): Update.
5672         * c-typeprint.c (cp_type_print_derivation_info)
5673         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5674         Update.
5675         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5676         (ada_prefer_type, ada_is_exception_sym): Update.
5677
5678 2018-06-01  Tom Tromey  <tom@tromey.com>
5679
5680         * valops.c (enum_constant_from_type, value_namespace_elt)
5681         (value_maybe_namespace_elt): Update.
5682         * valarith.c (find_size_for_pointer_math): Update.
5683         * target-descriptions.c (make_gdb_type): Update.
5684         * symmisc.c (print_symbol): Update.
5685         * stabsread.c (define_symbol, read_type)
5686         (complain_about_struct_wipeout, add_undefined_type)
5687         (cleanup_undefined_types_1): Update.
5688         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5689         (rust_range_type_p, val_print_struct, rust_print_struct_def)
5690         (rust_internal_print_type, rust_composite_type)
5691         (rust_evaluate_funcall, rust_evaluate_subexp)
5692         (rust_inclusive_range_type_p): Update.
5693         * python/py-type.c (typy_get_tag): Update.
5694         * p-typeprint.c (pascal_type_print_base): Update.
5695         * mdebugread.c (parse_symbol, parse_type): Update.
5696         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5697         Update.
5698         * guile/scm-type.c (gdbscm_type_tag): Update.
5699         * go-lang.c (sixg_string_p): Update.
5700         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5701         Update.
5702         * gdbtypes.h (struct main_type) <tag_name>: Remove.
5703         (TYPE_TAG_NAME): Remove.
5704         * gdbtypes.c (type_name_no_tag): Simplify.
5705         (check_typedef, check_types_equal, recursive_dump_type)
5706         (copy_type_recursive, arch_composite_type): Update.
5707         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
5708         in summary mode when needed.
5709         * eval.c (evaluate_funcall): Update.
5710         * dwarf2read.c (fixup_go_packaging, read_structure_type)
5711         (process_structure_scope, read_enumeration_type)
5712         (read_namespace_type, read_module_type, determine_prefix): Update.
5713         * cp-support.c (inspect_type): Update.
5714         * coffread.c (process_coff_symbol, decode_base_type): Update.
5715         * c-varobj.c (c_is_path_expr_parent): Update.
5716         * c-typeprint.c (c_type_print_base_struct_union): Update.
5717         (c_type_print_base_1): Update.  Print struct/class/union/enum in
5718         summary when using C language.
5719         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5720         (gen_maybe_namespace_elt): Update.
5721         * ada-lang.c (ada_type_name): Simplify.
5722         (empty_record, ada_template_to_fixed_record_type_1)
5723         (template_to_static_fixed_type)
5724         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5725
5726 2018-06-01  Tom Tromey  <tom@tromey.com>
5727
5728         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5729         c_print_type.
5730         * c-typeprint.c (c_print_type_1): Add "language" parameter.
5731         (c_print_type): Update.
5732         (c_print_type): New overload.
5733         (c_type_print_varspec_prefix, c_type_print_args)
5734         (c_type_print_varspec_suffix, c_print_type_no_offsets)
5735         (c_type_print_base_struct_union, c_type_print_base_1)
5736         (cp_type_print_method_args): Add "language" parameter.
5737         (c_type_print_base): Update.
5738         * c-lang.h (c_print_type): Add new overload.
5739
5740 2018-06-01  Tom Tromey  <tom@tromey.com>
5741
5742         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5743         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5744
5745 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
5746
5747         * aarch64-tdep.c (aarch64_sve_register_names): New const
5748         var.
5749         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5750         (AARCH64_SVE_Z_REGS_NUM): New define.
5751         (AARCH64_SVE_P_REGS_NUM): Likewise.
5752         (AARCH64_SVE_NUM_REGS): Likewise.
5753
5754 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
5755
5756         * nat/linux-ptrace.h [__alpha__]
5757         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5758         definitions.
5759
5760 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
5761
5762         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5763         the endianness selected.
5764         * NEWS: Document `set endian auto' mode operation update.
5765
5766 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5767
5768         * Makefile.in: Add new header.
5769         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5770         (sve_vl_from_vg): Likewise.
5771         (sve_vq_from_vl): Likewise.
5772         (sve_vl_from_vq): Likewise.
5773         (sve_vq_from_vg): Likewise.
5774         (sve_vg_from_vq): Likewise.
5775         * configure.nat: Add new c file.
5776         * nat/aarch64-sve-linux-ptrace.c: New file.
5777         * nat/aarch64-sve-linux-ptrace.h: New file.
5778
5779 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5780
5781         * aarch64-linux-nat.c (aarch64_linux_read_description):
5782         Add parmeter zero.
5783         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5784         Likewise.
5785         * aarch64-tdep.c (tdesc_aarch64_list): Add.
5786         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5787         (aarch64_gdbarch_init): Add parmeter zero.
5788         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5789         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5790         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5791         parmeter.
5792         * doc/gdb.texinfo: Describe SVE feature
5793         * features/aarch64-sve.c: New file.
5794
5795 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
5796
5797         PR gdb/23210
5798         * gdbarch.sh (significant_addr_bit): Default to zero when
5799         not set by target architecture.
5800         * gdbarch.c: Re-generated.
5801         * utils.c (address_significant): Update.
5802
5803 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
5804
5805         * stack.c (func_command): Remove trailing newline in call to error.
5806
5807 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5808
5809         * regcache.h (regcache_raw_collect): Remove, update callers to
5810         use regcache::raw_collect.
5811         * regcache.c (regcache_raw_collect): Remove.
5812
5813 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5814
5815         * regcache.h (regcache_raw_supply): Remove, update callers to
5816         use detached_regcache::raw_supply.
5817         * regcache.c (regcache_raw_supply): Remove.
5818
5819 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5820
5821         * regcache.h (regcache_cooked_write_part): Remove, update
5822         callers to use regcache::cooked_write_part.
5823         * regcache.c (regcache_cooked_write_part): Remove.
5824
5825 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5826
5827         * regcache.h (regcache_cooked_read_part): Remove, update callers
5828         to use readable_regcache::cooked_read_part.
5829         * regcache.c (regcache_cooked_read_part): Remove.
5830
5831 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5832
5833         * regcache.h (regcache_cooked_read_value): Remove, update
5834         callers to use readable_regcache::cooked_read_value.
5835         * regcache.c (regcache_cooked_read_value): Remove.
5836
5837 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5838
5839         * regcache.h (regcache_cooked_write): Remove, update callers to
5840         use regcache::cooked_write.
5841         * regcache.c (regcache_cooked_write): Remove.
5842
5843 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5844
5845         * regcache.h (regcache_invalidate): Remove, update callers to
5846         use detached_regcache::invalidate instead.
5847         * regcache.c (regcache_invalidate): Remove.
5848
5849 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5850
5851         * regcache.h (regcache_raw_write_part): Remove, update callers
5852         to use regcache::raw_write_part instead.
5853         * regcache.c (regcache_raw_write_part): Remove.
5854
5855 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5856
5857         * regcache.h (regcache_raw_read_part): Remove, update callers to
5858         use readable_regcache::raw_read_part instead.
5859         * regcache.c (regcache_raw_read_part): Remove.
5860
5861 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5862
5863         * regcache.h (regcache_cooked_read): Remove, update callers to
5864         use readable_regcache::cooked_read instead.
5865         * regcache.c (regcache_cooked_read): Remove.
5866
5867 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5868
5869         * regcache.h (regcache_raw_write): Remove, update callers to use
5870         regcache::raw_write instead.
5871         * regcache.c (regcache_raw_write): Remove.
5872
5873 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5874
5875         * regcache.h (regcache_raw_read): Remove, update callers to use
5876         readable_regcache::raw_read instead.
5877         * regcache.c (regcache_raw_read): Remove.
5878
5879 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5880
5881         * regcache.h (regcache_raw_update): Remove, update callers to
5882         use readable_regcache::raw_update instead.
5883         * regcache.c (regcache_raw_update): Remove.
5884
5885 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5886
5887         * regcache.h (regcache_register_status): Remove, update callers
5888         to use reg_buffer::get_register_status directly instead.
5889         * regcache.c (regcache_register_status): Remove.
5890
5891 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5892
5893         * regcache.h (regcache_get_ptid): Remove, update all callers to
5894         call regcache::ptid instead.
5895         * regcache.c (regcache_get_ptid): Remove.
5896
5897 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5898
5899         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5900
5901 2018-05-30  Pedro Alves  <palves@redhat.com>
5902
5903         * common/common-exceptions.h (exception_rethrow): Use
5904         ATTRIBUTE_NORETURN.
5905
5906 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
5907
5908         * breakpoint.c (print_solib_event, check_status_catch_solib):
5909         Remove struct keyword in range-based for loops.
5910         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5911         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5912         Likewise.
5913         * linespec.c (find_superclass_methods, search_minsyms_for_name):
5914         Likewise.
5915         * symfile.c (addr_info_make_relative): Likewise.
5916         * thread.c (value_in_thread_stack_temporaries): Likewise.
5917
5918 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
5919
5920         PR gdb/16841
5921         * valops.c (value_struct_elt_for_reference): Call check_typedef on
5922         aggregate type to get its real type before accessing it.
5923
5924 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
5925
5926         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5927         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5928         * coff-pe-read.c (add_pe_forwarded_sym): Replace
5929         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5930         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5931         * jit.c (jit_breakpoint_re_set_internal): Likewise.
5932         * printcmd.c (info_address_command): Likewise.
5933
5934 2018-05-29  Tom Tromey  <tom@tromey.com>
5935
5936         * windows-nat.c (handle_exception): Update fall-through comment.
5937
5938 2018-05-29  Tom Tromey  <tom@tromey.com>
5939
5940         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
5941         (struct program_space) <added_solibs>: Now a std::vector.
5942         * breakpoint.c (print_solib_event): Update.
5943         (check_status_catch_solib): Update.
5944         * progspace.c (clear_program_space_solib_cache): Update.
5945         * solib.c (update_solib_list): Update.
5946
5947 2018-05-29  Tom Tromey  <tom@tromey.com>
5948
5949         * python/py-type.c (typy_richcompare): Update.
5950         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5951         * gdbtypes.h (types_deeply_equal): Return bool.
5952         (types_equal): Likewise.
5953         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
5954         declare VEC.
5955         (check_types_equal): Change worklist to std::vector.  Return
5956         bool.
5957         (struct type_equality_entry): Add constructor.
5958         (compare_maybe_null_strings): Return bool.
5959         (check_types_worklist): Return bool.  Change worklist to
5960         std::vector.
5961         (types_deeply_equal): Use std::vector.
5962         (types_equal): Return bool.
5963         (compare_maybe_null_strings): Simplify.
5964
5965 2018-05-29  Tom Tromey  <tom@tromey.com>
5966
5967         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
5968
5969 2018-05-29  Tom Tromey  <tom@tromey.com>
5970
5971         * objc-lang.h: Don't include cp-support.h.
5972         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
5973         declare VEC.
5974
5975 2018-05-27  Tom Tromey  <tom@tromey.com>
5976
5977         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5978
5979 2018-05-25  Tom Tromey  <tom@tromey.com>
5980
5981         * value.c (value::location): Initialize.
5982
5983 2018-05-25  Tom Tromey  <tom@tromey.com>
5984
5985         * dbxread.c (init_bincl_list): Remove.
5986         (bincl_list): Now a std::vector.
5987         (bincls_allocated, next_bincl): Remove.
5988         (free_bincl_list, do_free_bincl_list_cleanup)
5989         (make_cleanup_free_bincl_list): Remove.
5990         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5991         unique_xmalloc_ptr.
5992         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5993         (struct header_file_location): Add constructor.
5994         (add_bincl_to_list): Remove.
5995
5996 2018-05-25  Tom Tromey  <tom@tromey.com>
5997
5998         * tui/tui.c (tui_enable): Update.
5999         * mi/mi-interp.c (mi_interp::init): Update.
6000         * interps.h (class interp) <name>: New method.
6001         <m_name>: Rename from name.
6002         (~scoped_restore_interp): Update.
6003         * interps.c (interp::interp): Update.
6004         (interp_add, interp_set, interp_lookup_existing)
6005         (current_interp_named_p): Update.
6006
6007 2018-05-25  Tom Tromey  <tom@tromey.com>
6008
6009         * interps.c (interp_name): Remove.
6010         * mi/mi-interp.c (mi_interp::init): Update.
6011         * interps.h (interp_name): Remove.
6012         (~scoped_restore_interp): Update.
6013         * tui/tui.c (tui_enable): Update.
6014
6015 2018-05-25  Tom Tromey  <tom@tromey.com>
6016
6017         * utils.c (fputs_maybe_filtered): Update.
6018         * linespec.c (decode_line_full): Update.
6019         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6020         (mi_print_breakpoint_for_event, mi_solib_loaded)
6021         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6022         (mi_user_selected_context_changed): Update.
6023         * mi/mi-main.c (mi_execute_command): Update.
6024         * cli/cli-script.c (execute_control_command): Update.
6025         * python/python.c (execute_gdb_command): Update.
6026         * solib.c (info_sharedlibrary_command): Update.
6027         * interps.c (interp_ui_out): Remove.
6028         * interps.h (interp_ui_out): Remove.
6029
6030 2018-05-25  Tom Tromey  <tom@tromey.com>
6031
6032         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6033         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6034         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6035
6036 2018-05-25  Tom Tromey  <tom@tromey.com>
6037
6038         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6039         * interps.c (interp_exec): Use scoped_restore.
6040
6041 2018-05-25  Tom Tromey  <tom@tromey.com>
6042
6043         * remote.c (remote_target::remote_file_get): Use
6044         gdb::byte_vector.
6045         (remote_target::remote_file_put): Likewise.
6046
6047 2018-05-25  Tom Tromey  <tom@tromey.com>
6048
6049         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6050         a std::string.
6051         (get_pe_section_index, add_pe_exported_sym): Update.
6052         (read_pe_exported_syms): Use gdb::def_vector.
6053
6054 2018-05-25  Tom Tromey  <tom@tromey.com>
6055
6056         * frame.c (remove_prev_frame): Remove.
6057         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6058
6059 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
6060
6061         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6062         Remove prototypes.
6063         * mips-linux-nat.c (supply_fpregset): Always call
6064         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6065         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6066         `mips_fill_fpregset'.
6067         * mips-linux-tdep.c (mips_supply_fpregset)
6068         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6069         (mips_fill_fpregset_wrapper): Remove functions.
6070         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6071         (mips_linux_fpregset): Remove variable.
6072         (mips_linux_iterate_over_regset_sections): Use
6073         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6074         (mips_linux_o32_sigframe_init): Remove comment.
6075
6076 2018-05-25  Pedro Alves  <palves@redhat.com>
6077
6078         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6079         (struct readahead_cache, struct packet_reg, struct
6080         remote_arch_state, class remote_state): Move higher up in the
6081         file.
6082         (remote_target::m_remote_state): Now an object instead of a pointer.
6083         (remote_target::get_remote_state): Adjust.
6084
6085 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6086
6087         * stack.c (select_and_print_frame): Delete.
6088         (struct function_bounds): Move struct within function.
6089         (func_command): Most content moved into new function
6090         find_frame_for_function, use new function, print result, add
6091         function comment.
6092         (find_frame_for_function): New function, now returns a result.
6093
6094 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6095
6096         * stack.c (iterate_over_block_arg_vars): Fix comment.
6097         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6098
6099 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6100
6101         PR gdb/23203
6102         * frame.c
6103         (scoped_restore_selected_frame::scoped_restore_selected_frame):
6104         Define.
6105         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6106         Define.
6107         * frame.h (class scoped_restore_selected_frame): New class.
6108         * stack.c (print_frame_local_vars): Remove catching and rethrowing
6109         of any exception, use scoped_restore_selected_frame to restore the
6110         frame instead.
6111
6112 2018-05-24  Pedro Alves  <palves@redhat.com>
6113
6114         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6115         override.
6116
6117 2018-05-23  Tom Tromey  <tom@tromey.com>
6118
6119         * complaints.c (struct complaints): Remove.
6120         (symfile_complaint_book): Remove.
6121         (series): New global.
6122         (complaint_internal): Update.
6123         (clear_complaints): Update.
6124
6125 2018-05-23  Tom Tromey  <tom@tromey.com>
6126
6127         * complaints.c (counters): New global.
6128         (struct complain): Remove.
6129         (struct complaints) <root>: Remove.
6130         (complaint_sentinel): Remove.
6131         (symfile_complaint_book): Update.
6132         (find_complaint) Remove.
6133         (complaint_internal, clear_complaints): Update.
6134
6135 2018-05-23  Tom Tromey  <tom@tromey.com>
6136
6137         * complaints.c (struct complain) <file, line>: Remove.
6138         (find_complaint): Remove file, line parameters.
6139         (complaint_internal): Update.
6140
6141 2018-05-23  Tom Tromey  <tom@tromey.com>
6142
6143         * complaints.c (vcomplaint): Remove.
6144         (complaint_internal) Merge in contents of vcomplaint.
6145
6146 2018-05-23  Tom Tromey  <tom@tromey.com>
6147
6148         * complaints.c (struct complaints) <explanation>: Remove.
6149         (symfile_explanations): Remove.
6150         (symfile_complaint_book): Update.
6151         (vcomplaint): Update.
6152         (struct explanation): Remove.
6153
6154 2018-05-23  Tom Tromey  <tom@tromey.com>
6155
6156         * complaints.c (symfile_complaints): Remove.
6157         (complaint_internal): Remove "complaints" parameter.
6158         (clear_complaints, vcomplaint): Remove "c" parameter.
6159         (get_complaints): Remove.
6160         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6161         (dwarf2_debug_line_missing_file_complaint)
6162         (dwarf2_debug_line_missing_end_sequence_complaint)
6163         (dwarf2_complex_location_expr_complaint)
6164         (dwarf2_const_value_length_mismatch_complaint)
6165         (dwarf2_section_buffer_overflow_complaint)
6166         (dwarf2_macro_malformed_definition_complaint)
6167         (dwarf2_invalid_attrib_class_complaint)
6168         (create_addrmap_from_index, dw2_symtab_iter_next)
6169         (dw2_expand_marked_cus)
6170         (dw2_debug_names_iterator::find_vec_in_debug_names)
6171         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6172         (create_debug_type_hash_table, init_cutu_and_read_dies)
6173         (partial_die_parent_scope, add_partial_enumeration)
6174         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6175         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6176         (read_import_statement, read_file_scope, create_dwo_cu_reader)
6177         (create_cus_hash_table, create_dwp_hash_table)
6178         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6179         (dwarf2_rnglists_process, dwarf2_ranges_process)
6180         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6181         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6182         (handle_struct_member_die, process_structure_scope)
6183         (read_array_type, read_common_block, read_module_type)
6184         (read_tag_pointer_type, read_typedef, read_base_type)
6185         (read_subrange_type, load_partial_dies, partial_die_info::read)
6186         (partial_die_info::read, partial_die_info::read)
6187         (partial_die_info::read, read_checked_initial_length_and_offset)
6188         (dwarf2_string_attr, read_formatted_entries)
6189         (dwarf_decode_line_header)
6190         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6191         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6192         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6193         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6194         (get_signatured_type, get_DW_AT_signature_type)
6195         (decode_locdesc, file_file_name, consume_improper_spaces)
6196         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6197         (dwarf_decode_macro_bytes, dwarf_decode_macros)
6198         (dwarf2_symbol_mark_computed, set_die_type)
6199         (read_attribute_value): Update.
6200         * stap-probe.c (handle_stap_probe, get_stap_base_address):
6201         Update.
6202         * dbxread.c (unknown_symtype_complaint)
6203         (lbrac_mismatch_complaint, repeated_header_complaint)
6204         (set_namestring, function_outside_compilation_unit_complaint)
6205         (read_dbx_symtab, process_one_symbol): Update.
6206         * gdbtypes.c (stub_noname_complaint): Update.
6207         * windows-nat.c (handle_unload_dll): Update.
6208         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6209         (decode_base_type): Update.
6210         * xcoffread.c (bf_notfound_complaint, ef_complaint)
6211         (eb_complaint, record_include_begin, record_include_end)
6212         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6213         (process_xcoff_symbol, read_symbol)
6214         (function_outside_compilation_unit_complaint)
6215         (scan_xcoff_symtab): Update.
6216         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6217         * buildsym.c (finish_block_internal, make_blockvector)
6218         (end_symtab_get_static_block, augment_type_symtab): Update.
6219         * dtrace-probe.c (dtrace_process_dof)
6220         (dtrace_static_probe_ops::get_probes): Update.
6221         * complaints.h (struct complaint): Don't declare.
6222         (symfile_complaints): Remove.
6223         (complaint_internal): Remove "complaints" parameter.
6224         (complaint): Likewise.
6225         (clear_complaints): Likewise.
6226         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6227         (reread_symbols): Update.
6228         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6229         (dwarf2_frame_cache, decode_frame_entry): Update.
6230         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6231         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6232         (info_selectors_command): Update.
6233         * macrotab.c (macro_include, check_for_redefinition)
6234         (macro_undef): Update.
6235         * objfiles.c (filter_overlapping_sections): Update.
6236         * stabsread.c (invalid_cpp_abbrev_complaint)
6237         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6238         (define_symbol, error_type, read_type, rs6000_builtin_type)
6239         (stabs_method_name_from_physname, read_member_functions)
6240         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6241         (attach_fields_to_type, complain_about_struct_wipeout)
6242         (read_range_type, read_args, common_block_start)
6243         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6244         Update.
6245         * mdebugread.c (index_complaint, unknown_ext_complaint)
6246         (basic_type_complaint, bad_tag_guess_complaint)
6247         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6248         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6249         (parse_procedure, parse_lines)
6250         (function_outside_compilation_unit_complaint)
6251         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6252         (bad_tag_guess_complaint, reg_value_complaint): Update.
6253         * cp-support.c (demangled_name_complaint): Update.
6254         * macroscope.c (sal_macro_scope): Update.
6255         * dwarf-index-write.c (class debug_names): Update.
6256
6257 2018-05-23  Tom Tromey  <tom@tromey.com>
6258
6259         * complaints.c (clear_complaints): Remove "noisy" parameter.
6260         * complaints.h (clear_complaints): Update.
6261         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6262         (reread_symbols): Update.
6263
6264 2018-05-23  Tom Tromey  <tom@tromey.com>
6265
6266         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6267         SUBSEQUENT_MESSAGE.
6268         (vcomplaint, clear_complaints): Update.
6269         (symfile_explanations): Remove some messages.
6270
6271 2018-05-23  Tom Tromey  <tom@tromey.com>
6272
6273         * complaints.c (internal_complaint): Remove.
6274         * complaints.h (internal_complaint): Remove.
6275
6276 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6277
6278         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6279
6280 2018-05-22  Pedro Alves  <palves@redhat.com>
6281
6282         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6283         (remote_fileio_badfd, remote_fileio_return_errno)
6284         (remote_fileio_return_success, remote_fileio_func_open)
6285         (remote_fileio_func_open, remote_fileio_func_close)
6286         (remote_fileio_func_read, remote_fileio_func_write)
6287         (remote_fileio_func_lseek, remote_fileio_func_rename)
6288         (remote_fileio_func_unlink, remote_fileio_func_stat)
6289         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6290         (remote_fileio_func_isatty, remote_fileio_func_system): Add
6291         remote_target parameter.
6292         (remote_fio_func_map) <func>: Add remote_target parameter.
6293         (do_remote_fileio_request, remote_fileio_request):
6294         * remote-fileio.h (remote_fileio_request):
6295         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6296         remote_target parameter.
6297         (remote_notif_process, handle_notification): Adjust to pass down
6298         the remote.
6299         (remote_notif_state_allocate): Add remote_target parameter.  Save
6300         it.
6301         * remote-notif.h (struct remote_target): Forward declare.
6302         (struct notif_client) <parse, ack, can_get_pending_events>: Add
6303         remote_target parameter.
6304         (struct remote_notif_state) <remote>: New field.
6305         (remote_notif_ack, remote_notif_parse): Add remote_target
6306         parameter.
6307         (remote_notif_state_allocate, remote_notif_state_allocate): Add
6308         remote_target parameter.
6309         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6310         (threads_listing_context, rmt_thread_action, protocol_feature)
6311         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6312         (packet_result, struct threads_listing_context, remote_state):
6313         Move definitions and declarations higher up.
6314         (remote_target) <~remote_target>: Declare.
6315         (remote_download_command_source, remote_file_put, remote_file_get)
6316         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6317         (remote_hostio_pread_vFile, remote_hostio_send_command)
6318         (remote_hostio_set_filesystem, remote_hostio_open)
6319         (remote_hostio_close, remote_hostio_unlink, remote_state)
6320         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6321         (get_memory_write_packet_size, get_memory_read_packet_size)
6322         (append_pending_thread_resumptions, remote_detach_1)
6323         (append_resumption, remote_resume_with_vcont)
6324         (add_current_inferior_and_thread, wait_ns, wait_as)
6325         (process_stop_reply, remote_notice_new_inferior)
6326         (process_initial_stop_replies, remote_add_thread)
6327         (btrace_sync_conf, remote_btrace_maybe_reopen)
6328         (remove_new_fork_children, kill_new_fork_children)
6329         (discard_pending_stop_replies, stop_reply_queue_length)
6330         (check_pending_events_prevent_wildcard_vcont)
6331         (discard_pending_stop_replies_in_queue, stop_reply)
6332         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6333         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6334         (remote_interrupt_as, remote_interrupt_ns)
6335         (remote_get_noisy_reply, remote_query_attached)
6336         (remote_add_inferior, remote_current_thread, get_current_thread)
6337         (set_thread, set_general_thread, set_continue_thread)
6338         (set_general_process, write_ptid)
6339         (remote_unpack_thread_info_response, remote_get_threadinfo)
6340         (parse_threadlist_response, remote_get_threadlist)
6341         (remote_threadlist_iterator, remote_get_threads_with_ql)
6342         (remote_get_threads_with_qxfer)
6343         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6344         (get_offsets, remote_check_symbols, remote_supported_packet)
6345         (remote_query_supported, remote_packet_size)
6346         (remote_serial_quit_handler, remote_detach_pid)
6347         (remote_vcont_probe, remote_resume_with_hc)
6348         (send_interrupt_sequence, interrupt_query)
6349         (remote_notif_get_pending_events, fetch_register_using_p)
6350         (send_g_packet, process_g_packet, fetch_registers_using_g)
6351         (store_register_using_P, store_registers_using_G)
6352         (set_remote_traceframe, check_binary_download)
6353         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6354         (remote_xfer_live_readonly_partial, remote_read_bytes)
6355         (remote_send_printf, remote_flash_write, readchar)
6356         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6357         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6358         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6359         (extended_remote_disable_randomization, extended_remote_run)
6360         (send_environment_packet, extended_remote_environment_support)
6361         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6362         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6363         (packet_command): Now methods of ...
6364         (remote_target): ... this class.
6365         (m_remote_state) <remote_target>: New field.
6366         (struct remote_state) <stop_reply_queue,
6367         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6368         fields.
6369         (remote_state::remote_state): Allocate stop_reply_queue.
6370         (remote_state): Delete global.
6371         (get_remote_state_raw): Delete.
6372         (remote_target::get_remote_state): Allocate m_remote_state on
6373         demand.
6374         (get_current_remote_target): New.
6375         (remote_ops, extended_remote_ops): Delete.
6376         (wait_forever_enabled_p, remote_async_inferior_event_token):
6377         Delete, moved to struct remote_state.
6378         (remote_target::close): Delete self.  Destruction bits split to
6379         ...
6380         (remote_target::~remote_target): ... this.
6381         (show_memory_packet_size): Adjust to use
6382         get_current_remote_target.
6383         (struct protocol_feature) <func>: Add remote_target parameter.
6384         All callers adjusted.
6385         (curr_quit_handler_target): New.
6386         (remote_serial_quit_handler): Reimplement.
6387         (remote_target::open_1): Adjust to use get_current_remote_target.
6388         Heap-allocate remote_target/extended_remote_target instances.
6389         (vcont_builder::vcont_builder): Add remote_target parameter, and
6390         save it in m_remote.  All callers adjusted.
6391         (vcont_builder::m_remote): New field.
6392         (vcont_builder::restart, vcont_builder::flush)
6393         (vcont_builder::push_action): Use it.
6394         (remote_target::commit_resume): Use it.
6395         (struct queue_iter_param) <remote>: New field.
6396         (remote_target::remove_new_fork_children): Fill in 'remote' field.
6397         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6398         (check_pending_event_prevents_wildcard_vcont_callback)
6399         (remote_target::check_pending_events_prevent_wildcard_vcont)
6400         (remote_target::discard_pending_stop_replies)
6401         (remote_target::discard_pending_stop_replies_in_queue)
6402         (remote_target::remote_notif_remove_queued_reply): Fill in
6403         'remote' field.
6404         (remote_notif_get_pending_events): New.
6405         (remote_target::readchar, remote_target::remote_serial_write):
6406         Save/restore curr_quit_handler_target.
6407         (putpkt): New.
6408         (kill_new_fork_children): Fill in 'remote' field.
6409         (packet_command): Use get_current_remote_target, defer to
6410         remote_target method of same name.
6411         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6412         parameter, and save it in m_remote.  All callers adjusted.
6413         (scoped_remote_fd::release): Use m_remote.
6414         (scoped_remote_fd::m_remote): New field.
6415         (remote_file_put, remote_file_get, remote_file_delete): Use
6416         get_current_remote_target, defer to remote_target method of same
6417         name.
6418         (remote_btrace_reset): Add remote_state paremeter.  Update all
6419         callers.
6420         (remote_async_inferior_event_handler). Pass down 'data'.
6421         (remote_new_objfile): Use get_current_remote_target.
6422         (remote_target::vcont_r_supported): New.
6423         (set_range_stepping): Use get_current_remote_target and
6424         remote_target::vcont_r_supported.
6425         (_initialize_remote): Don't allocate 'remote_state' and
6426         'stop_reply_queue' globals.
6427         * remote.h (struct remote_target): Forward declare.
6428         (getpkt, putpkt, remote_notif_get_pending_events): Add
6429         'remote_target' parameter.
6430
6431 2018-05-22  Pedro Alves  <palves@redhat.com>
6432
6433         * remote.c (vcont_builder): Now a class.  Make all data members
6434         private.
6435         (vcont_builder) <vcont_builder, restart, flush, push_action>:
6436         Declare methods.
6437         (vcont_builder_restart): Rename to ...
6438         (vcont_builder::restart): ... this.
6439         (vcont_builder_flush): Rename to ...
6440         (vcont_builder::flush): ... this.
6441         (vcont_builder_push_action): Rename to ...
6442         (vcont_builder::push_action): ... this.
6443         (remote_target::commit_resume): Adjust.
6444
6445 2018-05-22  Pedro Alves  <palves@redhat.com>
6446
6447         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6448         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6449         (get_fixed_memory_packet_size): New.
6450         (get_memory_packet_size): Use it.
6451         (set_memory_packet_size): Don't override the config size with
6452         DEFAULT_MAX_MEMORY_PACKET_SIZE.
6453         (show_memory_packet_size): Use get_fixed_memory_packet_size.
6454         Don't refer to get_memory_packet_size if not connected to a remote
6455         target.  Show "(default)" if configured size is 0.
6456
6457 2018-05-22  Pedro Alves  <palves@redhat.com>
6458
6459         * remote.c (remote_target::mourn_inferior): Move
6460         discard_pending_stop_replies call here from ...
6461         (_initialize_remote): ... here.
6462
6463 2018-05-22  Pedro Alves  <palves@redhat.com>
6464
6465         * remote.c (compare_section_command): Remove set_general_process
6466         call.
6467
6468 2018-05-22  Pedro Alves  <palves@redhat.com>
6469
6470         * remote.c (struct packet_reg, struct remote_arch_state):
6471         Move higher up in the file.
6472         (remote_state) <m_arch_states>: Store remote_arch_state values
6473         instead of remote_arch_state pointers.
6474         (remote_state::get_remote_arch_state): Adjust.
6475
6476 2018-05-22  Pedro Alves  <palves@redhat.com>
6477
6478         * remote.c: Include <unordered_map>.
6479         (remote_state): Now a class.
6480         (remote_state) <get_remote_arch_state>: Declare method.
6481         <get_remote_arch_state>: New field.
6482         (remote_arch_state) <remote_arch_state>: Declare ctor.
6483         <regs>: Now a unique_ptr.
6484         (remote_gdbarch_data_handle): Delete.
6485         (get_remote_arch_state): Delete.
6486         (remote_state::get_remote_arch_state): New.
6487         (get_remote_state): Adjust to call remote_state's
6488         get_remote_arch_state method.
6489         (init_remote_state): Delete, bits factored out to ...
6490         (remote_arch_state::remote_arch_state): ... this new method.
6491         (get_remote_packet_size, get_memory_packet_size)
6492         (process_g_packet, remote_target::fetch_registers)
6493         (remote_target::prepare_to_store, store_registers_using_G)
6494         (remote_target::store_registers, remote_target::get_trace_status):
6495         Adjust to call remote_state's method.
6496         (_initialize_remote): Remove reference to
6497         remote_gdbarch_data_handle.
6498
6499 2018-05-22  Pedro Alves  <palves@redhat.com>
6500
6501         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6502         pread>: New method declarations.
6503         (remote_target::open_1): Adjust.
6504         (readahead_cache_invalidate): Rename to ...
6505         (readahead_cache::invalidate): ... this, and adjust to be a class
6506         method.
6507         (readahead_cache_invalidate_fd): Rename to ...
6508         (readahead_cache::invalidate_fd): ... this, and adjust to be a
6509         class method.
6510         (remote_hostio_pwrite): Adjust.
6511         (remote_hostio_pread_from_cache): Rename to ...
6512         (readahead_cache::pread): ... this, and adjust to be a class
6513         method.
6514         (remote_hostio_close): Adjust.
6515
6516 2018-05-22  Pedro Alves  <palves@redhat.com>
6517
6518         * remote.c (remote_hostio_close_cleanup): Delete.
6519         (class scoped_remote_fd): New.
6520         (remote_file_put, remote_file_get): Use it.
6521
6522 2018-05-22  Pedro Alves  <palves@redhat.com>
6523
6524         (struct vCont_action_support): Use bool and initialize all fields.
6525         (struct readahead_cache): Initialize all fields.
6526         (remote_state): Use bool and initialize all fields.
6527         (remote_state::remote_state, remote_state::~remote_state): New.
6528         (new_remote_state): Delete.
6529         (_initialize_remote): Use new to allocate remote_state.
6530
6531 2018-05-22  Pedro Alves  <palves@redhat.com>
6532             張俊芝  <zjz@zjz.name>
6533
6534         PR gdb/22973
6535         * c-exp.y: Include "c-support.h".
6536         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6537         of tolower.  Use c_ident_is_alpha to scan names.
6538         * c-lang.c: Include "c-support.h".
6539         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6540         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6541         * c-support.h: New file, with bits factored out from ...
6542         * cp-name-parser.y: ... this file.
6543         Include "c-support.h".
6544         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6545         c-support.h and renamed.
6546         (symbol_end, yylex): Adjust.
6547
6548 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6549
6550         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6551         parameter type to CORE_ADDR.
6552         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6553         parameter type in declaration to CORE_ADDR.
6554         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6555         target_auxv_search to get AT_HWCAP and use the result to get the
6556         target description.
6557         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6558         to CORE_ADDR. Remove the cast of the return value to unsigned
6559         long. Fix error predicate of target_auxv_search.
6560         (ppc_linux_nat_target::read_description): Change the type of the
6561         hwcap variable to CORE_ADDR.
6562
6563 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6564
6565         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6566         if the size of fpscr is larger than 32 bits.
6567
6568 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6569
6570         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6571         (ppc32_linux_vsxregmap): New global.
6572         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6573         regcache_supply_regset, and regcache_collect_regset.
6574         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6575         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6576         (fetch_vsx_register, store_vsx_register): Remove.
6577         (fetch_vsx_registers): Add regno parameter. Get regset using
6578         ppc_linux_vsxregset. Use regset to supply registers.
6579         (store_vsx_registers): Add regno parameter. Get regset using
6580         ppc_linux_vsxregset. Use regset to collect registers.
6581         (fetch_register): Call fetch_vsx_registers instead of
6582         fetch_vsx_register.
6583         (store_register): Call store_vsx_registers instead of
6584         store_vsx_register.
6585         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6586         new regno parameter.
6587         (store_ppc_registers): Call store_vsx_registers with -1 for the
6588         new regno parameter.
6589         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6590         (ppc_collect_vsxregset): Remove.
6591
6592 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6593
6594         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6595         offset fields.
6596         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6597         for vector register offset fields.
6598         (ppc64_fbsd_reg_offsets): Likewise.
6599         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6600         to vector register offset fields.
6601         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6602         to vector register offset fields.
6603         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6604         vector register offset fields.
6605         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6606         initializers for vector register offset fields.
6607         (rs6000_aix64_reg_offsets): Likewise.
6608         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6609         (ppc_supply_vrregset): Remove.
6610         (ppc_collect_vrregset): Remove.
6611         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6612         (ppc_linux_vrregset) : New function.
6613         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6614         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6615         (ppc32_linux_vrregset): Remove.
6616         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6617         and use result instead of ppc32_linux_vrregset.
6618         (ppc32_linux_reg_offsets): Remove initializers for vector register
6619         offset fields.
6620         (ppc64_linux_reg_offsets): Likewise.
6621         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6622         * ppc-linux-nat.c: Include regset.h.
6623         (gdb_vrregset_t): Adjust comment to account for little-endian
6624         mode.
6625         (supply_vrregset, fill_vrregset): Remove.
6626         (fetch_altivec_register, store_altivec_register): Remove.
6627         (fetch_altivec_registers): Add regno parameter. Get regset using
6628         ppc_linux_vrregset. Use regset to supply registers.
6629         (store_altivec_registers): Add regno parameter. Get regset using
6630         ppc_linux_vrregset. Use regset to collect registers.
6631         (fetch_register): Call fetch_altivec_registers instead of
6632         fetch_altivec_register.
6633         (store_register): Call store_altivec_registers instead of
6634         store_altivec_register.
6635         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6636         the new regno parameter.
6637         (store_ppc_registers): Call store_altivec_registers with -1 for
6638         the new regno parameter.
6639
6640 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6641
6642         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6643         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6644         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6645         (gdb_vrregset_t): Change array type size to
6646         PPC_LINUX_SIZEOF_VRREGSET.
6647         (gdb_vsxregset_t): Change array type size to
6648         PPC_LINUX_SIZEOF_VSXREGSET.
6649         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6650         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6651         PPC_LINUX_SIZEOF_VSXREGSET.
6652
6653 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6654
6655         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6656         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6657         nat/ppc-linux.c.
6658         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6659         ppc_linux_target_wordsize with tid.
6660         (ppc_linux_nat_target::read_description): Call ppc_linux_target
6661         wordsize with tid.
6662         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6663         (ppc64_64bit_inferior_p): Add static and inline specifiers.
6664         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6665         tid parameter. Remove static specifier.
6666         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6667         (ppc_linux_target_wordsize): New declaration.
6668
6669 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6670
6671         * arch/ppc-linux-common.c: New file.
6672         * arch/ppc-linux-common.h: New file.
6673         * arch/ppc-linux-tdesc.h: New file.
6674         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6675         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6676         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6677         arch/ppc-linux-tdesc.h.
6678         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6679         arch/ppc-linux-tdesc.h.
6680         (ppc_linux_nat_target::read_description): Remove target
6681         description matching code. Fill a ppc_linux_features struct and
6682         call ppc_linux_match_description with it. Move comment about ISA
6683         2.05 to ppc-linux-common.c.
6684         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6685         arch/ppc-linux-tdesc.h.
6686         (ppc_linux_core_read_description): Remove target description
6687         matching code. Fill a ppc_linux_features struct and call
6688         ppc_linux_match_description with it.
6689         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6690         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6691         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6692         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6693         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6694         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6695         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6696         (tdesc_powerpc_e500l): Remove.
6697
6698 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
6699
6700         * ada-lang.c (catch_assert_command): Pass empty string instead
6701         of NULL for excep_string argument.
6702
6703 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6704
6705         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6706         the width of the requested register exceeds the width of the
6707         `ptrace' data type.
6708
6709 2018-05-21  Tom Tromey  <tom@tromey.com>
6710
6711         * printcmd.c (output_command): Remove.
6712         (output_command_const): Rename to output_command.
6713         * valprint.h (output_command): Rename from output_command_const.
6714         * tracepoint.c (trace_dump_actions): Call output_command.
6715
6716 2018-05-21  Tom Tromey  <tom@tromey.com>
6717
6718         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6719         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6720         * ada-lang.h (create_ada_exception_catchpoint): Update.
6721         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6722         std::string.
6723         (create_excep_cond_exprs, ~ada_catchpoint)
6724         (should_stop_exception, print_one_exception)
6725         (print_mention_exception, print_recreate_exception): Update.
6726         (ada_get_next_arg): Remove.
6727         (catch_ada_exception_command_split): Use std::string.  Change type
6728         of "excep_string", "cond_string".
6729         (catch_ada_exception_command): Update.
6730         (create_ada_exception_catchpoint): Change type of excep_string.
6731         (ada_exception_sal): Remove excep_string parameter.
6732         (~ada_catchpoint): Remove.
6733
6734 2018-05-21  Tom Tromey  <tom@tromey.com>
6735
6736         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6737         cleanup.
6738
6739 2018-05-21  Tom Tromey  <tom@tromey.com>
6740
6741         * ada-lang.c (ada_exception_message_1, ada_exception_message):
6742         Return unique_xmalloc_ptr.
6743         (print_it_exception): Update.
6744
6745 2018-05-21  Tom Tromey  <tom@tromey.com>
6746
6747         * tracepoint.c (trace_dump_actions): Use std::string.
6748
6749 2018-05-21  Tom Tromey  <tom@tromey.com>
6750
6751         * symfile.c (reread_symbols): Use std::string for original_name.
6752
6753 2018-05-21  Tom Tromey  <tom@tromey.com>
6754
6755         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6756         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
6757         constructor.
6758
6759 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
6760
6761         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6762         instance to...
6763         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6764         * objfiles.c (get_objfile_bfd_data): Allocate
6765         objfile_per_bfd_storage with obstack_new when allocating on
6766         obstack.
6767
6768 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6769
6770         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6771         OBSTACK_ZALLOC.
6772         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6773         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6774         * mdebugread.c (mdebug_build_psymtabs): Likewise.
6775         (add_pending): Likewise.
6776         (parse_symbol): Likewise.
6777         (parse_partial_symbols): Likewise.
6778         (psymtab_to_symtab_1): Likewise.
6779         (new_psymtab): Likewise.
6780         (elfmdebug_build_psymtabs): Likewise.
6781         * minsyms.c (terminate_minimal_symbol_table): Likewise.
6782         * objfiles.c (get_objfile_bfd_data): Likewise.
6783         (objfile_register_static_link): Likewise.
6784         * psymtab.c (allocate_psymtab): Likewise.
6785         * stabsread.c (read_member_functions): Likewise.
6786         * xcoffread.c (xcoff_end_psymtab): Likewise.
6787
6788 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6789
6790         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6791         compiler supports std::is_trivially_constructible.
6792         * common/poison.h: Include obstack.h.
6793         (IsMallocable): Define to is_trivially_constructible if the
6794         compiler supports it, define to true_type otherwise.
6795         (xobnew): New.
6796         (XOBNEW): Redefine.
6797         (xobnewvec): New.
6798         (XOBNEWVEC): Redefine.
6799         * gdb_obstack.h (obstack_zalloc): New.
6800         (OBSTACK_ZALLOC): Redefine.
6801         (obstack_calloc): New.
6802         (OBSTACK_CALLOC): Redefine.
6803         (obstack_new): New.
6804         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6805         (gdbarch_obstack): New declaration in gdbarch.h, definition in
6806         gdbarch.c.
6807         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6808         obstack_calloc/obstack_zalloc.
6809         (gdbarch_obstack_zalloc): Remove.
6810         * target-descriptions.c (tdesc_data_init): Use obstack_new.
6811
6812 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6813
6814         * stack.c (backtrace_command_1): Remove useless variable int i.
6815
6816 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6817
6818         * stack.c (print_frame_info): Fix comment.
6819
6820 2018-05-18  Tom Tromey  <tom@tromey.com>
6821
6822         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6823         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6824         (~dwarf2_per_objfile): Update
6825         (dwarf2_get_dwz_file): Use new.
6826         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6827         unique_ptr.
6828
6829 2018-05-18  Tom Tromey  <tom@tromey.com>
6830
6831         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6832         unique_ptr.
6833         * dwarf2read.c (struct dwp_file): Add constructor and
6834         initializers.
6835         (open_and_init_dwp_file): Return a unique_ptr.
6836         (dwarf2_per_objfile, create_dwp_hash_table)
6837         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6838         (lookup_dwo_unit_in_dwp): Update.
6839         (open_and_init_dwp_file, get_dwp_file): Update.
6840
6841 2018-05-18  Tom Tromey  <tom@tromey.com>
6842
6843         * dwarf2read.c (dwarf2_per_objfile): Update.
6844         (struct mapped_index): Add initializers.
6845         (dwarf2_read_index): Use new.
6846         (dw2_symtab_iter_init): Update.
6847         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6848         unique_ptr.
6849
6850 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6851
6852         * dwarf2read.c (mapped_index) <total_size>: Remove.
6853
6854 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6855
6856         * unittests/format_pieces-selftests.c (test_format_specifier):
6857         Add ARI comments.
6858
6859 2018-05-18  Tom Tromey  <tom@tromey.com>
6860
6861         * c-typeprint.c (maybe_print_hole): New function.
6862         (c_print_type_struct_field_offset): Update.
6863         (c_type_print_base_struct_union): Call maybe_print_hole.
6864
6865 2018-05-17  Keith Seitz  <keiths@redhat.com>
6866
6867         * breakpoint.c (build_bpstat_chain): New function, moved from
6868         bpstat_stop_status.
6869         (bpstat_stop_status): Add optional parameter, `stop_chain'.
6870         If no stop chain is passed, call build_bpstat_chain to build it.
6871         * breakpoint.h (build_bpstat_chain): Declare.
6872         (bpstat_stop_status): Move documentation here from breakpoint.c.
6873         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6874         build the stop chain and pass it to skip_inline_frames.
6875         Pass this stop chain to bpstat_stop_status.
6876         * inline-frame.c: Include breakpoint.h.
6877         (stopped_by_user_bp_inline_frame): New function.
6878         (skip_inline_frames): Add parameter `stop_chain'.
6879         Move documention to inline-frame.h.
6880         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6881         whether the frame should be elided.
6882         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6883         Add moved documentation and update for new parameter.
6884
6885 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6886
6887         PR cli/14975
6888         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6889         unittests/format_pieces-selftests.c.
6890         * common/format.h (format_piece) <operator==>: New.
6891         (format_pieces) <operator[]>: Remove.
6892         * common/format.c (format_pieces::format_pieces): Handle \e.
6893         * unittests/format_pieces-selftests.c: New.
6894
6895 2018-05-17  Tom Tromey  <tom@tromey.com>
6896
6897         PR symtab/23010:
6898         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6899         (dw2_instantiate_symtab): Add skip_partial parameter.
6900         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6901         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6902         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6903         (dw2_expand_symtabs_matching_one)
6904         (dw2_find_pc_sect_compunit_symtab)
6905         (dw2_debug_names_lookup_symbol)
6906         (dw2_debug_names_expand_symtabs_for_function): Update.
6907         (init_cutu_and_read_dies): Add skip_partial parameter.
6908         (process_psymtab_comp_unit, build_type_psymtabs_1)
6909         (process_skeletonless_type_unit, load_partial_comp_unit)
6910         (psymtab_to_symtab_1): Update.
6911         (load_full_comp_unit): Add skip_partial parameter.
6912         (process_imported_unit_die, dwarf2_read_addr_index)
6913         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6914         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6915         (read_signatured_type): Update.
6916
6917 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6918
6919         * value.c (release_value): Remove unused variable.
6920         (record_latest_value): Likewise.
6921         (access_value_history): Likewise.
6922         (preserve_values): Likewise.
6923
6924 2018-05-17  Tom Tromey  <tom@tromey.com>
6925
6926         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6927         Initialize.
6928
6929 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
6930
6931         PR gdb/22286
6932         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6933         Also handle registers whose width is not a multiple of
6934         PTRACE_TYPE_RET.
6935         (linux_nat_trad_target::store_register): Likewise.
6936
6937 2018-05-16  Tom Tromey  <tom@tromey.com>
6938
6939         * gdbcore.h (core_bfd): Redefine.
6940         * corelow.c (core_target::close): Update.
6941         (core_target_open): Update.
6942         * progspace.h (struct program_space) <cbfd>: Now a
6943         gdb_bfd_ref_ptr.
6944
6945 2018-05-16  Tom Tromey  <tom@tromey.com>
6946
6947         PR cli/19551:
6948         * symfile-add-flags.h (enum symfile_add_flags)
6949         <SYMFILE_NOT_FILENAME>: New constant.
6950         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
6951         objfile name from BFD.
6952         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6953         * minidebug.c (find_separate_debug_file_in_section): Put
6954         ".gnu_debugdata" into BFD's file name.
6955
6956 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
6957
6958         * regcache.c (regcache_read_ftype, regcache_write_ftype):
6959         Remove.
6960
6961 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
6962
6963         PR binutils/21446
6964         * aarch64-tdep.c (aarch64_analyze_prologue,
6965         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6966         Indicate not interested in errors.
6967
6968 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6969
6970         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6971         Supply the MIPS_ZERO_REGNUM register.
6972
6973 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
6974
6975         * mips-tdep.c (mask_address_var): Make variable static.
6976
6977 2018-05-14  Tom Tromey  <tom@tromey.com>
6978
6979         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6980
6981 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
6982
6983         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6984         FXSAVE_ADDR for the mxcsr register.
6985
6986 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
6987
6988         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6989
6990 2018-05-11  Pedro Alves  <palves@redhat.com>
6991
6992         * corelow.c (core_target) <core_target>: No longer inline.
6993         Initialize m_core_gdbarch, m_core_vec and build the section table
6994         here.
6995         <~core_target>: New.
6996         <core_gdbarch, get_core_register_section>: New methods.
6997         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6998         factored out from ...
6999         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7000         (core_ops): Delete.
7001         (sniff_core_bfd): Add gdbarch parameter.
7002         (core_close): Delete, merged into ...
7003         (core_target::close): ... here.  Delete self.
7004         (core_close_cleanup): Delete.
7005         (core_target_open): Allocate a core_target on the heap.  Use a
7006         unique_ptr instead of a cleanup.  Bits moved into the core_target
7007         ctor.  Adjust to use core_target methods instead of globals.
7008         (get_core_register_section): Rename to ...
7009         (core_target::get_core_register_section): ... this and adjust.
7010         (struct get_core_registers_cb_data): New.
7011         (get_core_registers_cb): Use it.  Use bool.
7012         (core_target::fetch_registers, core_target::files_info)
7013         (core_target::xfer_partial, core_target::read_description)
7014         (core_target::pid_to, core_target::thread_name): Adjust to
7015         reference class fields instead of globals.
7016         * target.h (struct target_ops_deleter, target_ops_up): New.
7017
7018 2018-05-11  Pedro Alves  <palves@redhat.com>
7019
7020         * corefile.c (core_file_command): Move to corelow.c.
7021         * corelow.c (the_core_target): Delete.
7022         (core_file_command): Moved from corefile.c.  Check exec_bfd
7023         instead of the_core_target.  Use target_detach instead of calling
7024         into the_core_target directly.
7025         (maybe_say_no_core_file_now): New.
7026         (core_target::detach): Use it.
7027         (_initialize_corelow): Remove references to the_core_target.
7028         * gdbcore.h (the_core_target): Delete.
7029
7030 2018-05-11  Tom Tromey  <tromey@redhat.com>
7031             Pedro Alves  <palves@redhat.com>
7032
7033         * corefile.c (core_bfd): Remove.
7034         * gdbcore.h (core_bfd): Now a macro.
7035         * progspace.h (struct program_space) <cbfd>: New field.
7036
7037 2018-05-11  Tom Tromey  <tom@tromey.com>
7038
7039         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7040         gdb::def_vector.
7041
7042 2018-05-10  Tom Tromey  <tom@tromey.com>
7043
7044         * configure: Rebuild.
7045         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7046
7047 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
7048
7049         PR server/23158:
7050         * regformats/regdat.sh: Adjust script, following the addition
7051         of the new expedite_regs parameter to init_target_desc.
7052
7053 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
7054     
7055         PR gdb/23127
7056         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7057         set_gdbarch_significant_addr_bit.
7058         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7059         set_gdbarch_significant_addr_bit.
7060         * utils.c (address_significant): Update to sign extend addr.
7061
7062 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
7063
7064         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7065         (xtensa_linux_init_abi): Limit tdep->num_regs by
7066         tdep->num_nopriv_regs.
7067         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7068         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7069         not initialized.
7070
7071 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
7072
7073         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7074
7075 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
7076
7077         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7078         (I387_MXCSR_INIT_VAL): New constant.
7079         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7080         buffer if it was supplied by the inferior.
7081         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7082         (i387_xsave_get_clear_bv): New function.
7083         (i387_supply_xsave): Only read x87 control registers from the
7084         xsave buffer if the feature is enabled, and the state will have
7085         been written, otherwise, provide a suitable default.
7086         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7087         including x87 control registers.  Update control registers if they
7088         have changed from the default value, and mark features as enabled
7089         as required.
7090         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7091
7092 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
7093
7094         * spu-tdep.c (info_spu_event_command): Fix output formatting.
7095
7096 2018-05-07  Tom Tromey  <tom@tromey.com>
7097
7098         * configure: Rebuild.
7099         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7100
7101 2018-05-07  Tom Tromey  <tom@tromey.com>
7102
7103         PR tdep/20362:
7104         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7105         bit.  Use correct value for VDIV.
7106
7107 2018-05-04  Tom Tromey  <tom@tromey.com>
7108
7109         * configure: Rebuild.
7110         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7111
7112 2018-05-04  Tom Tromey  <tom@tromey.com>
7113
7114         * linux-record.c (record_linux_system_call) <case
7115         RECORD_SYS_RECVFROM>: Add "break".
7116
7117 2018-05-04  Tom Tromey  <tom@tromey.com>
7118
7119         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7120         Add missing "break".
7121         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7122         Add missing "break".
7123
7124 2018-05-04  Tom Tromey  <tom@tromey.com>
7125
7126         * rs6000-tdep.c (ppc_process_record_op4)
7127         (ppc_process_record_op63): Add fall-through comment.
7128
7129 2018-05-04  Tom Tromey  <tom@tromey.com>
7130
7131         * i386-tdep.c (i386_process_record): Add fall-through comment.
7132
7133 2018-05-04  Tom Tromey  <tom@tromey.com>
7134
7135         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7136         comment.
7137
7138 2018-05-04  Tom Tromey  <tom@tromey.com>
7139
7140         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7141         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7142         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7143         comment.
7144         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7145         comment.
7146         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7147         comment.
7148
7149 2018-05-04  Tom Tromey  <tom@tromey.com>
7150
7151         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7152
7153 2018-05-04  Tom Tromey  <tom@tromey.com>
7154
7155         * s390-tdep.c (s390_process_record): Fix fall-through comments.
7156         * xcoffread.c (scan_xcoff_symtab): Move comment later.
7157         * symfile.c (section_is_mapped): Fix fall-through comment.
7158         * stabsread.c (define_symbol, read_member_functions): Fix
7159         fall-through comment.
7160         * s390-linux-tdep.c (s390_process_record): Fix fall-through
7161         comment.
7162         * remote.c (remote_wait_as): Fix fall-through comment.
7163         * p-exp.y (yylex): Fix fall-through comment.
7164         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7165         comment.
7166         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7167         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7168         * jv-exp.y (yylex): Fix fall-through comment.
7169         * go-exp.y (lex_one_token): Fix fall-through comment.
7170         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7171         fall-through comment.
7172         * f-exp.y (yylex): Fix fall-through comment.
7173         * dwarf2read.c (process_die): Fix fall-through comments.
7174         * dbxread.c (process_one_symbol): Fix fall-through comment.
7175         * d-exp.y (lex_one_token): Fix fall-through comment.
7176         * cp-name-parser.y (yylex): Fix fall-through comment.
7177         * coffread.c (coff_symtab_read): Fix fall-through comment.
7178         * c-exp.y (lex_one_token): Fix fall-through comment.
7179         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7180         comment.
7181         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7182         comment.
7183
7184 2018-05-04  Tom Tromey  <tom@tromey.com>
7185
7186         PR python/22730:
7187         * NEWS: Mention gdb.execute change.
7188         * gdbcmd.h (execute_control_command): Don't declare.
7189         * python/python.c (execute_gdb_command): Use read_command_lines_1,
7190         execute_control_commands, execute_control_commands_to_string.
7191         * cli/cli-script.h (execute_control_commands)
7192         (execute_control_commands_to_string): Declare.
7193         (execute_control_command): Add from_tty parameter.
7194         * cli/cli-script.c (execute_control_commands)
7195         (execute_control_commands_to_string): New functions.
7196         (execute_user_command): Use execute_control_commands.
7197         (execute_control_command_1): Add "from_tty" parameter.  Update.
7198         (execute_control_command): Likewise.
7199
7200 2018-05-04  Tom Tromey  <tom@tromey.com>
7201
7202         PR python/22731:
7203         * NEWS: Mention that breakpoint commands are writable.
7204         * python/py-breakpoint.c (bppy_set_commands): New function.
7205         (breakpoint_object_getset) <"commands">: Use it.
7206
7207 2018-05-04  Tom Tromey  <tom@tromey.com>
7208
7209         * tracepoint.c (actions_command): Update.
7210         * mi/mi-cmd-break.c (mi_command_line_array)
7211         (mi_command_line_array_cnt, mi_command_line_array_ptr)
7212         (mi_read_next_line): Remove.
7213         (mi_cmd_break_commands): Update.
7214         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7215         function_view.
7216         * cli/cli-script.c (get_command_line): Update.
7217         (process_next_line): Use function_view.  Constify.
7218         (recurse_read_control_structure, read_command_lines)
7219         (read_command_lines_1): Change argument types to function_view.
7220         (do_define_command, document_command): Update.
7221         * breakpoint.h (check_tracepoint_command): Don't declare.
7222         * breakpoint.c (check_tracepoint_command): Remove.
7223         (commands_command_1, create_tracepoint_from_upload): Update.
7224
7225 2018-05-04  Tom Tromey  <tom@tromey.com>
7226
7227         PR gdb/11750:
7228         * cli/cli-script.h (enum command_control_type) <define_control>:
7229         New constant.
7230         * cli/cli-script.c (multi_line_command_p): Handle define_control.
7231         (build_command_line, execute_control_command_1)
7232         (process_next_line): Likewise.
7233         (do_define_command): New function, extracted from define_command.
7234         (define_command): Use it.
7235
7236 2018-05-04  Tom Tromey  <tom@tromey.com>
7237
7238         * tracepoint.c (actions_command): Update.
7239         * cli/cli-script.h (read_command_lines): Update.
7240         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7241         (MAX_TMPBUF): Remove define.
7242         (define_command): Use string_printf.
7243         (document_command): Likewise.
7244         * breakpoint.c (commands_command_1): Update.
7245
7246 2018-05-04  Tom Tromey  <tom@tromey.com>
7247
7248         * top.c (execute_command): Update.
7249         * cli/cli-script.h (print_command_lines): Now varargs.
7250         * cli/cli-script.c (print_command_lines): Now varargs.
7251         (execute_control_command_1) <case while_control, case if_control>:
7252         Update.
7253
7254 2018-05-04  Tom Tromey  <tom@tromey.com>
7255
7256         * tracepoint.c (all_tracepoint_actions): Rename from
7257         all_tracepoint_actions_and_cleanup.  Change return type.
7258         (actions_command, encode_actions_1, encode_actions)
7259         (trace_dump_actions, tdump_command): Update.
7260         * remote.c (remote_download_command_source): Update.
7261         * python/python.c (gdbpy_eval_from_control_command)
7262         (python_command, python_interactive_command): Update.
7263         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7264         * guile/guile.c (guile_command)
7265         (gdbscm_eval_from_control_command, guile_command): Update.
7266         * compile/compile.c (compile_code_command)
7267         (compile_print_command, compile_to_object): Update.
7268         * cli/cli-script.h (struct command_lines_deleter): New.
7269         (counted_command_line): New typedef.
7270         (struct command_line): Add constructor, destructor.
7271         <body_list>: Remove.
7272         <body_list_0, body_list_1>: New members.
7273         (command_line_up): Remove typedef.
7274         (read_command_lines, read_command_lines_1, get_command_line):
7275         Update.
7276         (copy_command_lines): Don't declare.
7277         * cli/cli-script.c (build_command_line): Use "new".
7278         (get_command_line): Return counted_command_line.
7279         (print_command_lines, execute_user_command)
7280         (execute_control_command_1, while_command, if_command): Update.
7281         (realloc_body_list): Remove.
7282         (process_next_line, recurse_read_control_structure): Update.
7283         (read_command_lines, read_command_lines_1): Return counted_command_line.
7284         (free_command_lines): Use "delete".
7285         (copy_command_lines): Remove.
7286         (define_command, document_command, show_user_1): Update.
7287         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7288         a counted_command_line.
7289         * breakpoint.h (counted_command_line): Remove typedef.
7290         (breakpoint_set_commands): Update.
7291         * breakpoint.c (check_no_tracepoint_commands)
7292         (validate_commands_for_breakpoint): Update.
7293         (breakpoint_set_commands): Change commands to be a
7294         counted_command_line.
7295         (commands_command_1, update_dprintf_command_list)
7296         (create_tracepoint_from_upload): Update.
7297
7298 2018-05-04  Tom Tromey  <tom@tromey.com>
7299
7300         * cli/cli-decode.h (cmd_list_element): New constructor.
7301         (~cmd_list_element): New destructor.
7302         (struct cmd_list_element): Add initializers.
7303         * cli/cli-decode.c (do_add_cmd): Use "new".
7304         (delete_cmd): Use "delete".
7305
7306 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7307             Pedro Alves <palves@redhat.com>
7308
7309         PR breakpoints/19806 and support for PR external/20207.
7310         * NEWS: Mention Aarch64 watchpoint improvements.
7311         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7312         watchpoints and PR external/20207 watchpoints.
7313         * nat/aarch64-linux-hw-point.c
7314         (kernel_supports_any_contiguous_range): New.
7315         (aarch64_watchpoint_offset): New.
7316         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7317         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7318         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7319         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7320         next_addr_orig_p.  Support PR external/20207 watchpoints.
7321         (aarch64_downgrade_regs): New.
7322         (aarch64_dr_state_insert_one_point): New parameters offset and
7323         addr_orig.
7324         (aarch64_dr_state_remove_one_point): Likewise.
7325         (aarch64_handle_breakpoint): Update caller.
7326         (aarch64_handle_aligned_watchpoint): Likewise.
7327         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7328         aligned_offset.
7329         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7330         aarch64_downgrade_regs.
7331         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7332         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7333         (DR_CONTROL_MASK): ... this.
7334         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7335         (unsigned int aarch64_watchpoint_offset): New prototype.
7336         (aarch64_linux_set_debug_regs): Remove const from state.
7337         * utils.c (align_up, align_down): Move to ...
7338         * common/common-utils.c (align_up, align_down): ... here.
7339         * utils.h (align_up, align_down): Move to ...
7340         * common/common-utils.h (align_up, align_down): ... here.
7341
7342 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
7343
7344         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7345         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7346         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7347         Re-implement to match the ABI as summarized in GCC's
7348         gcc/config/sparc/sparc.c.  All callers updated.
7349         (sparc32_store_arguments): Remove assertion.
7350
7351 2018-05-04  Tom Tromey  <tom@tromey.com>
7352
7353         * printcmd.c: Don't include tui.h.
7354         (decode_format): Use skip_spaces.
7355
7356 2018-05-04  Tom Tromey  <tom@tromey.com>
7357
7358         PR gdb/22619:
7359         * printcmd.c (last_count): New global.
7360         (x_command): Use saved count when repeating.
7361
7362 2018-05-04  Tom Tromey  <tom@tromey.com>
7363
7364         * nto-procfs.c (do_closedir_cleanup): Remove.
7365         (procfs_pidlist): Use gdb_dir_up.
7366         * procfs.c (do_closedir_cleanup): Remove.
7367         (proc_update_threads): Use gdb_dir_up.
7368         * common/filestuff.h (struct gdb_dir_deleter): New.
7369         (gdb_dir_up): New typedef.
7370
7371 2018-05-04  Tom Tromey  <tom@tromey.com>
7372
7373         * ada-lang.c (print_mention_exception): Use std::string.
7374
7375 2018-05-04  Tom Tromey  <tom@tromey.com>
7376
7377         * ada-lang.c (create_excep_cond_exprs): Update.
7378         (ada_exception_catchpoint_cond_string): Use std::string.
7379
7380 2018-05-04  Tom Tromey  <tom@tromey.com>
7381
7382         * ada-lang.c (xget_renaming_scope): Return std::string.
7383         (old_renaming_is_invisible): Update.
7384
7385 2018-05-04  Tom Tromey  <tom@tromey.com>
7386
7387         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7388         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7389
7390 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7391
7392         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7393
7394 2018-05-04  Tom Tromey  <tom@tromey.com>
7395
7396         * remote.c (remote_query_supported_append): Change type.
7397         (remote_check_symbols): Update.
7398
7399 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
7400
7401         PR gdb/11420
7402         * configure.ac: Prepend libpython.
7403         * python/python-config.py: Likewise.
7404         * configure: Regenerate.
7405
7406 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7407
7408         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7409
7410 2018-05-03  Pedro Alves  <palves@redhat.com>
7411
7412         * s390-linux-nat.c
7413         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7414         override.  Write 'true' instead of '1'.
7415         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7416         declaration.
7417
7418 2018-05-02  Pedro Alves  <palves@redhat.com>
7419
7420         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7421         add_inf_child_target.
7422         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7423         add_inf_child_target.
7424         * aix-thread.c (aix_thread_target_info): New.
7425         (aix_thread_target) <shortname, longname, doc>: Delete.
7426         <info>: New.
7427         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7428         add_inf_child_target.
7429         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7430         add_inf_child_target.
7431         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7432         add_inf_child_target.
7433         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7434         add_inf_child_target.
7435         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7436         add_inf_child_target.
7437         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7438         add_inf_child_target.
7439         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7440         add_inf_child_target.
7441         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7442         add_inf_child_target.
7443         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7444         add_inf_child_target.
7445         * bfd-target.c (target_bfd_target_info): New.
7446         (target_bfd) <shortname, longname, doc>: Delete.
7447         <info>: New.
7448         * bsd-kvm.c (bsd_kvm_target_info): New.
7449         (bsd_kvm_target) <shortname, longname, doc>: Delete.
7450         <info>: New.
7451         (bsd_kvm_target::open): Rename to ...
7452         (bsd_kvm_target_open): ... this.  Adjust.
7453         * bsd-uthread.c (bsd_uthread_target_info): New.
7454         (bsd_uthread_target) <shortname, longname, doc>: Delete.
7455         <info>: New.
7456         * corefile.c (core_file_command): Adjust.
7457         * corelow.c (core_target_info): New.
7458         (core_target) <shortname, longname, doc>: Delete.
7459         <info>: New.
7460         (core_target::open): Rename to ...
7461         (core_target_open): ... this.  Adjust.
7462         * ctf.c (ctf_target_info): New.
7463         (ctf_target) <shortname, longname, doc>: Delete.
7464         <info>: New.
7465         (ctf_target::open): Rename to ...
7466         (ctf_target_open): ... this.
7467         (_initialize_ctf): Adjust.
7468         * exec.c (exec_target_info): New.
7469         (exec_target) <shortname, longname, doc>: Delete.
7470         <info>: New.
7471         (exec_target::open): Rename to ...
7472         (exec_target_open): ... this.
7473         * gdbcore.h (core_target_open): Declare.
7474         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7475         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7476         add_inf_child_target.
7477         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7478         add_inf_child_target.
7479         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7480         add_inf_child_target.
7481         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7482         add_inf_child_target.
7483         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7484         add_inf_child_target.
7485         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7486         add_inf_child_target.
7487         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7488         add_inf_child_target.
7489         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7490         add_inf_child_target.
7491         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7492         add_inf_child_target.
7493         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7494         add_inf_child_target.
7495         * inf-child.c (inf_child_target_info): New.
7496         (inf_child_target::info): New.
7497         (inf_child_open_target): Remove 'target' parameter.  Use
7498         get_native_target instead.
7499         (inf_child_target::open): Delete.
7500         (add_inf_child_target): New.
7501         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7502         Delete.
7503         <info>: New.
7504         (add_inf_child_target): Declare.
7505         (inf_child_open_target): Declare.
7506         * linux-thread-db.c (thread_db_target_info): New.
7507         (thread_db_target) <shortname, longname, doc>: Delete.
7508         <info>: New.
7509         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7510         add_inf_child_target.
7511         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7512         add_inf_child_target.
7513         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7514         add_inf_child_target.
7515         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7516         add_inf_child_target.
7517         * make-target-delegates (print_class): Adjust.
7518         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7519         add_inf_child_target.
7520         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7521         add_inf_child_target.
7522         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7523         add_inf_child_target.
7524         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7525         add_inf_child_target.
7526         * nto-procfs.c (nto_native_target_info): New.
7527         (nto_procfs_target_native) <shortname, longname, doc>:
7528         Delete.
7529         <info>: New.
7530         (nto_procfs_target_info): New.
7531         (nto_procfs_target_procfs) <shortname, longname, doc>:
7532         Delete.
7533         <info>: New.
7534         (init_procfs_targets): Adjust.
7535         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7536         add_inf_child_target.
7537         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7538         add_inf_child_target.
7539         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7540         add_inf_child_target.
7541         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7542         add_inf_child_target.
7543         * ravenscar-thread.c (ravenscar_target_info): New.
7544         (ravenscar_thread_target) <shortname, longname, doc>:
7545         Delete.
7546         <info>: New.
7547         * record-btrace.c (record_btrace_target_info):
7548         (record_btrace_target) <shortname, longname, doc>: Delete.
7549         <info>: New.
7550         (record_btrace_target::open): Rename to ...
7551         (record_btrace_target_open): ... this.  Adjust.
7552         * record-full.c (record_longname, record_doc): New.
7553         (record_full_base_target) <shortname, longname, doc>: Delete.
7554         <info>: New.
7555         (record_full_target_info): New.
7556         (record_full_target): <shortname>: Delete.
7557         <info>: New.
7558         (record_full_core_open_1, record_full_open_1): Update comments.
7559         (record_full_base_target::open): Rename to ...
7560         (record_full_open): ... this.
7561         (cmd_record_full_restore): Update.
7562         (_initialize_record_full): Update.
7563         * remote-sim.c (remote_sim_target_info): New.
7564         (gdbsim_target) <shortname, longname, doc>: Delete.
7565         <info>: New.
7566         (gdbsim_target::open): Rename to ...
7567         (gdbsim_target_open): ... this.
7568         (_initialize_remote_sim): Adjust.
7569         * remote.c (remote_doc): New.
7570         (remote_target_info): New.
7571         (remote_target) <shortname, longname, doc>: Delete.
7572         <info>: New.
7573         (extended_remote_target_info): New.
7574         (extended_remote_target) <shortname, longname, doc>: Delete.
7575         <info>: New.
7576         (remote_target::open_1): Make static.  Adjust.
7577         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7578         * s390-linux-nat.c (_initialize_s390_nat): Use
7579         add_inf_child_target.
7580         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7581         add_inf_child_target.
7582         * sol-thread.c (thread_db_target_info): New.
7583         (sol_thread_target) <shortname, longname, doc>: Delete.
7584         <info>: New.
7585         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7586         add_inf_child_target.
7587         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7588         add_inf_child_target.
7589         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7590         add_inf_child_target.
7591         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7592         add_inf_child_target.
7593         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7594         add_inf_child_target.
7595         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7596         add_inf_child_target.
7597         * spu-linux-nat.c (_initialize_spu_nat): Use
7598         add_inf_child_target.
7599         * spu-multiarch.c (spu_multiarch_target_info): New.
7600         (spu_multiarch_target) <shortname, longname, doc>: Delete.
7601         <info>: New.
7602         * target-delegates.c: Regenerate.
7603         * target.c: Include <unordered_map>.
7604         (target_ops_p): Delete.
7605         (DEF_VEC_P(target_ops_p)): Delete.
7606         (target_factories): New.
7607         (test_target_info): New.
7608         (test_target_ops::info): New.
7609         (open_target): Adjust to use target_factories.
7610         (add_target_with_completer): Rename to ...
7611         (add_target): ... this.  Change prototype.  Register target_info
7612         and open callback in target_factories.  Register target_info in
7613         command context instead of target_ops.
7614         (add_target): Delete old implementation.
7615         (add_deprecated_target_alias): Change prototype.  Adjust.
7616         (the_native_target): New.
7617         (set_native_target, get_native_target): New.
7618         (find_default_run_target): Use the_native_target.
7619         (find_attach_target, find_run_target): Simplify.
7620         (target_ops::open): Delete.
7621         (dummy_target_info): New.
7622         (dummy_target::shortname, dummy_target::longname)
7623         (dummy_target::doc): Delete.
7624         (dummy_target::info): New.
7625         (debug_target::shortname, debug_target::longname)
7626         (debug_target::doc): Delete.
7627         (debug_target::info): New.
7628         * target.h (struct target_info): New.
7629         (target_ops::~target_ops): Add comment.
7630         (target_ops::info): New.
7631         (target_ops::shortname, target_ops::longname, target_ops::doc): No
7632         longer virtual.  Implement in terms of target_info.
7633         (set_native_target, get_native_target): Declare.
7634         (target_open_ftype): New.
7635         (add_target, add_target_with_completer)
7636         (add_deprecated_target_alias): Change prototype.
7637         (test_target) <shortname, longname, doc>: Delete.
7638         <info>: New.
7639         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7640         add_inf_child_target.
7641         * tracefile-tfile.c (tfile_target_info): New.
7642         (tfile_target) <shortname, longname, doc>: Delete.
7643         <info>: New.
7644         (tfile_target::open): Rename to ...
7645         (tfile_target_open): ... this.
7646         (_initialize_tracefile_tfile): Adjust.
7647         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7648         add_inf_child_target.
7649         * windows-nat.c (_initialize_windows_nat): Use
7650         add_inf_child_target.
7651         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7652         add_inf_child_target.
7653
7654 2018-05-02  Pedro Alves  <palves@redhat.com>
7655
7656         * linux-nat.h (linux_nat_target) <low_new_thread,
7657         low_delete_thread, low_new_fork, low_forget_process,
7658         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7659         New virtual methods.
7660         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7661         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7662         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7663         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7664         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7665         Delete.
7666         * linux-fork.c (delete_fork): Adjust to call low method.
7667         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7668         (linux_nat_new_fork, linux_nat_forget_process_hook)
7669         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7670         (linux_nat_status_is_event):
7671         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7672         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7673         to call low method.
7674         (sigtrap_is_event): Rename to ...
7675         (linux_nat_target::low_status_is_event): ... this.
7676         (linux_nat_set_status_is_event): Delete.
7677         (save_stop_reason, linux_nat_wait_1)
7678         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7679         low methods.
7680         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7681         (linux_nat_set_new_fork, linux_nat_set_forget_process)
7682         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7683         (linux_nat_set_prepare_to_resume): Delete.
7684         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7685         low virtual methods.
7686         * amd64-linux-nat.c: Likewise.
7687         * arm-linux-nat.c: Likewise.
7688         * i386-linux-nat.c: Likewise.
7689         * ia64-linux-nat.c: Likewise.
7690         * mips-linux-nat.c: Likewise.
7691         * ppc-linux-nat.c: Likewise.
7692         * s390-linux-nat.c: Likewise.
7693         * sparc64-linux-nat.c: Likewise.
7694         * x86-linux-nat.c: Likewise.
7695         * x86-linux-nat.h: Include "nat/x86-linux.h".
7696         (x86_linux_nat_target) <low_new_fork, low_forget_process,
7697         low_prepare_to_resume, low_new_thread, low_delete_thread>:
7698         Override methods.
7699
7700 2018-05-02  Pedro Alves  <palves@redhat.com>
7701
7702         * target.h (target_ops)
7703         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7704         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7705         stopped_by_watchpoint, have_continuable_watchpoint,
7706         stopped_data_address, watchpoint_addr_within_range,
7707         can_accel_watchpoint_condition, can_run, thread_alive,
7708         has_all_memory, has_memory, has_stack, has_registers,
7709         has_execution, can_async_p, is_async_p, supports_non_stop,
7710         always_non_stop_p, can_execute_reverse, supports_multi_process,
7711         supports_enable_disable_tracepoint,
7712         supports_disable_randomization, supports_string_tracing,
7713         supports_evaluation_of_breakpoint_conditions,
7714         can_run_breakpoint_commands, filesystem_is_local,
7715         can_download_tracepoint, get_trace_state_variable_value,
7716         set_trace_notes, get_tib_address, use_agent, can_use_agent,
7717         record_is_replaying, record_will_replay,
7718         augmented_libraries_svr4_read>: Adjust to return bool.
7719         * aarch64-linux-nat.c: All implementations adjusted.
7720         * aix-thread.c: All implementations adjusted.
7721         * arm-linux-nat.c: All implementations adjusted.
7722         * breakpoint.c: All implementations adjusted.
7723         * bsd-kvm.c: All implementations adjusted.
7724         * bsd-uthread.c: All implementations adjusted.
7725         * corelow.c: All implementations adjusted.
7726         * ctf.c: All implementations adjusted.
7727         * darwin-nat.c: All implementations adjusted.
7728         * darwin-nat.h: All implementations adjusted.
7729         * exec.c: All implementations adjusted.
7730         * fbsd-nat.c: All implementations adjusted.
7731         * fbsd-nat.h: All implementations adjusted.
7732         * gnu-nat.c: All implementations adjusted.
7733         * gnu-nat.h: All implementations adjusted.
7734         * go32-nat.c: All implementations adjusted.
7735         * ia64-linux-nat.c: All implementations adjusted.
7736         * inf-child.c: All implementations adjusted.
7737         * inf-child.h: All implementations adjusted.
7738         * inf-ptrace.c: All implementations adjusted.
7739         * inf-ptrace.h: All implementations adjusted.
7740         * linux-nat.c: All implementations adjusted.
7741         * linux-nat.h: All implementations adjusted.
7742         * mips-linux-nat.c: All implementations adjusted.
7743         * nto-procfs.c: All implementations adjusted.
7744         * ppc-linux-nat.c: All implementations adjusted.
7745         * procfs.c: All implementations adjusted.
7746         * ravenscar-thread.c: All implementations adjusted.
7747         * record-btrace.c: All implementations adjusted.
7748         * record-full.c: All implementations adjusted.
7749         * remote-sim.c: All implementations adjusted.
7750         * remote.c: All implementations adjusted.
7751         * s390-linux-nat.c: All implementations adjusted.
7752         * sol-thread.c: All implementations adjusted.
7753         * spu-multiarch.c: All implementations adjusted.
7754         * target-delegates.c: All implementations adjusted.
7755         * target.c: All implementations adjusted.
7756         * target.h: All implementations adjusted.
7757         * tracefile-tfile.c: All implementations adjusted.
7758         * tracefile.c: All implementations adjusted.
7759         * tracefile.h: All implementations adjusted.
7760         * windows-nat.c: All implementations adjusted.
7761         * x86-linux-nat.h: All implementations adjusted.
7762         * x86-nat.h: All implementations adjusted.
7763
7764 2018-05-02  Pedro Alves  <palves@redhat.com>
7765
7766         * make-target-delegates (scan_target_h): Don't trim lines here.
7767         Replace sequences of tabs and/or whitespace with a single
7768         whitespace.
7769         (top level, parsing methods): Trim each line before processing it
7770         here.
7771
7772 2018-05-02  Pedro Alves  <palves@redhat.com>
7773             John Baldwin  <jhb@freebsd.org>
7774
7775         * target.h (enum strata) <debug_stratum>: New.
7776         (struct target_ops) <all delegation methods>: Replace by C++
7777         virtual methods, and drop "to_" prefix.  All references updated
7778         throughout.
7779         <to_shortname, to_longname, to_doc, to_data,
7780         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7781         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7782         virtual methods.  All references updated throughout.
7783         <can_attach, supports_terminal_ours, can_create_inferior,
7784         get_thread_control_capabilities, attach_no_wait>: New
7785         virtual methods.
7786         <insert_breakpoint, remove_breakpoint>: Now
7787         TARGET_DEFAULT_NORETURN methods.
7788         <info_proc>: Now returns bool.
7789         <to_magic>: Delete.
7790         (OPS_MAGIC): Delete.
7791         (current_target): Delete.  All references replaced by references
7792         to ...
7793         (target_stack): ... this.  New.
7794         (target_shortname, target_longname): Adjust.
7795         (target_can_run): Now a function declaration.
7796         (default_child_has_all_memory, default_child_has_memory)
7797         (default_child_has_stack, default_child_has_registers)
7798         (default_child_has_execution): Remove target_ops parameter.
7799         (complete_target_initialization): Delete.
7800         (memory_breakpoint_target): New template class.
7801         (test_target_ops): Refactor as a C++ class with virtual methods.
7802         * make-target-delegates (NAME_PART): Tighten.
7803         (POINTER_PART, CP_SYMBOL): New.
7804         (SIMPLE_RETURN_PART): Reimplement.
7805         (VEC_RETURN_PART): Expect less.
7806         (RETURN_PART, VIRTUAL_PART): New.
7807         (METHOD): Adjust to C++ virtual methods.
7808         (scan_target_h): Remove reference to C99.
7809         (dname): Output "target_ops::" prefix.
7810         (write_function_header): Adjust to output a C++ class method.
7811         (write_declaration): New.
7812         (write_delegator): Adjust to output a C++ class method.
7813         (tdname): Output "dummy_target::" prefix.
7814         (write_tdefault, write_debugmethod): Adjust to output a C++ class
7815         method.
7816         (tdefault_names, debug_names): Delete.
7817         (return_types, tdefaults, styles, argtypes_array): New.
7818         (top level): All methods are delegators.
7819         (print_class): New.
7820         (top level): Print dummy_target and debug_target classes.
7821         * target-delegates.c: Regenerate.
7822         * target-debug.h (target_debug_print_enum_info_proc_what)
7823         (target_debug_print_thread_control_capabilities)
7824         (target_debug_print_thread_info_p): New.
7825         * target.c (dummy_target): Delete.
7826         (the_dummy_target, the_debug_target): New.
7827         (target_stack): Now extern.
7828         (set_targetdebug): Push/unpush debug target.
7829         (default_child_has_all_memory, default_child_has_memory)
7830         (default_child_has_stack, default_child_has_registers)
7831         (default_child_has_execution): Remove target_ops parameter.
7832         (complete_target_initialization): Delete.
7833         (add_target_with_completer): No longer call
7834         complete_target_initialization.
7835         (target_supports_terminal_ours): Use regular delegation.
7836         (update_current_target): Delete.
7837         (push_target): No longer check magic number.  Don't call
7838         update_current_target.
7839         (unpush_target): Don't call update_current_target.
7840         (target_is_pushed): No longer check magic number.
7841         (target_require_runnable): Skip for all stratums over
7842         process_stratum.
7843         (target_ops::info_proc): New.
7844         (target_info_proc): Use find_target_at and
7845         find_default_run_target.
7846         (target_supports_disable_randomization): Use regular delegation.
7847         (target_get_osdata): Use find_target_at.
7848         (target_ops::open, target_ops::close, target_ops::can_attach)
7849         (target_ops::attach, target_ops::can_create_inferior)
7850         (target_ops::create_inferior, target_ops::can_run)
7851         (target_can_run): New.
7852         (default_fileio_target): Use regular delegation.
7853         (target_ops::fileio_open, target_ops::fileio_pwrite)
7854         (target_ops::fileio_pread, target_ops::fileio_fstat)
7855         (target_ops::fileio_close, target_ops::fileio_unlink)
7856         (target_ops::fileio_readlink): New.
7857         (target_fileio_open_1, target_fileio_unlink)
7858         (target_fileio_readlink): Always call the target method.  Handle
7859         FILEIO_ENOSYS.
7860         (return_zero, return_zero_has_execution): Delete.
7861         (init_dummy_target): Delete.
7862         (dummy_target::dummy_target, dummy_target::shortname)
7863         (dummy_target::longname, dummy_target::doc)
7864         (debug_target::debug_target, debug_target::shortname)
7865         (debug_target::longname, debug_target::doc): New.
7866         (target_supports_delete_record): Use regular delegation.
7867         (setup_target_debug): Delete.
7868         (maintenance_print_target_stack): Skip debug_stratum.
7869         (initialize_targets): Instantiate the_dummy_target and
7870         the_debug_target.
7871         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7872         use target_stack.
7873         (target_auxv_search, fprint_target_auxv): Adjust.
7874         (info_auxv_command): Adjust to use target_stack.
7875         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7876         * exceptions.c (print_flush): Handle a NULL target_stack.
7877         * regcache.c (target_ops_no_register): Refactor as class with
7878         virtual methods.
7879
7880         * exec.c (exec_target): New class.
7881         (exec_ops): Now an exec_target.
7882         (exec_open, exec_close_1, exec_get_section_table)
7883         (exec_xfer_partial, exec_files_info, exec_has_memory)
7884         (exec_make_note_section): Refactor as exec_target methods.
7885         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7886         Delete.
7887         (exec_target::find_memory_regions): New.
7888         (_initialize_exec): Don't call init_exec_ops.
7889         * gdbcore.h (exec_file_clear): Delete.
7890
7891         * corefile.c (core_target): Delete.
7892         (core_file_command): Adjust.
7893         * corelow.c (core_target): New class.
7894         (the_core_target): New.
7895         (core_close): Remove target_ops parameter.
7896         (core_close_cleanup): Adjust.
7897         (core_target::close): New.
7898         (core_open, core_detach, get_core_registers, core_files_info)
7899         (core_xfer_partial, core_thread_alive, core_read_description)
7900         (core_pid_to_str, core_thread_name, core_has_memory)
7901         (core_has_stack, core_has_registers, core_info_proc): Rework as
7902         core_target methods.
7903         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7904         (_initialize_corelow): Initialize the_core_target.
7905         * gdbcore.h (core_target): Delete.
7906         (the_core_target): New.
7907
7908         * ctf.c: (ctf_target): New class.
7909         (ctf_ops): Now a ctf_target.
7910         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7911         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7912         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7913         methods.
7914         (init_ctf_ops): Delete.
7915         (_initialize_ctf): Don't call it.
7916         * tracefile-tfile.c (tfile_target): New class.
7917         (tfile_ops): Now a tfile_target.
7918         (tfile_open, tfile_close, tfile_files_info)
7919         (tfile_get_tracepoint_status, tfile_trace_find)
7920         (tfile_fetch_registers, tfile_xfer_partial)
7921         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7922         Refactor as tfile_target methods.
7923         (tfile_xfer_partial_features): Remove target_ops parameter.
7924         (init_tfile_ops): Delete.
7925         (_initialize_tracefile_tfile): Don't call it.
7926         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7927         (tracefile_has_stack, tracefile_has_registers)
7928         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7929         tracefile_target methods.
7930         (init_tracefile_ops): Delete.
7931         (tracefile_target::tracefile_target): New.
7932         * tracefile.h: Include "target.h".
7933         (tracefile_target): New class.
7934         (init_tracefile_ops): Delete.
7935
7936         * spu-multiarch.c (spu_multiarch_target): New class.
7937         (spu_ops): Now a spu_multiarch_target.
7938         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7939         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7940         (spu_search_memory, spu_mourn_inferior): Refactor as
7941         spu_multiarch_target methods.
7942         (init_spu_ops): Delete.
7943         (_initialize_spu_multiarch): Remove references to init_spu_ops,
7944         complete_target_initialization.
7945
7946         * ravenscar-thread.c (ravenscar_thread_target): New class.
7947         (ravenscar_ops): Now a ravenscar_thread_target.
7948         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7949         (ravenscar_thread_alive, ravenscar_pid_to_str)
7950         (ravenscar_fetch_registers, ravenscar_store_registers)
7951         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7952         (ravenscar_stopped_by_hw_breakpoint)
7953         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7954         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7955         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7956         methods.
7957         (init_ravenscar_thread_ops): Delete.
7958         (_initialize_ravenscar): Remove references to
7959         init_ravenscar_thread_ops and complete_target_initialization.
7960
7961         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7962         (bsd_uthread_target): New class.
7963         (bsd_uthread_ops): Now a bsd_uthread_target.
7964         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7965         (bsd_uthread_close, bsd_uthread_mourn_inferior)
7966         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7967         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7968         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7969         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7970         (bsd_uthread_target): Delete function.
7971         (_initialize_bsd_uthread): Remove reference to
7972         complete_target_initialization.
7973
7974         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
7975         (target_bfd): ... this new class.
7976         (target_bfd_xfer_partial, target_bfd_get_section_table)
7977         (target_bfd_close): Refactor as target_bfd methods.
7978         (target_bfd::~target_bfd): New.
7979         (target_bfd_reopen): Adjust.
7980         (target_bfd::close): New.
7981
7982         * record-btrace.c (record_btrace_target): New class.
7983         (record_btrace_ops): Now a record_btrace_target.
7984         (record_btrace_open, record_btrace_stop_recording)
7985         (record_btrace_disconnect, record_btrace_close)
7986         (record_btrace_async, record_btrace_info)
7987         (record_btrace_insn_history, record_btrace_insn_history_range)
7988         (record_btrace_insn_history_from, record_btrace_call_history)
7989         (record_btrace_call_history_range)
7990         (record_btrace_call_history_from, record_btrace_record_method)
7991         (record_btrace_is_replaying, record_btrace_will_replay)
7992         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7993         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7994         (record_btrace_store_registers, record_btrace_prepare_to_store)
7995         (record_btrace_to_get_unwinder)
7996         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7997         (record_btrace_commit_resume, record_btrace_wait)
7998         (record_btrace_stop, record_btrace_can_execute_reverse)
7999         (record_btrace_stopped_by_sw_breakpoint)
8000         (record_btrace_supports_stopped_by_sw_breakpoint)
8001         (record_btrace_stopped_by_hw_breakpoint)
8002         (record_btrace_supports_stopped_by_hw_breakpoint)
8003         (record_btrace_update_thread_list, record_btrace_thread_alive)
8004         (record_btrace_goto_begin, record_btrace_goto_end)
8005         (record_btrace_goto, record_btrace_stop_replaying_all)
8006         (record_btrace_execution_direction)
8007         (record_btrace_prepare_to_generate_core)
8008         (record_btrace_done_generating_core): Refactor as
8009         record_btrace_target methods.
8010         (init_record_btrace_ops): Delete.
8011         (_initialize_record_btrace): Remove reference to
8012         init_record_btrace_ops.
8013         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8014         the execution_direction global.
8015         (record_full_base_target, record_full_target)
8016         (record_full_core_target): New classes.
8017         (record_full_ops): Now a record_full_target.
8018         (record_full_core_ops): Now a record_full_core_target.
8019         (record_full_target::detach, record_full_target::disconnect)
8020         (record_full_core_target::disconnect)
8021         (record_full_target::mourn_inferior, record_full_target::kill):
8022         New.
8023         (record_full_open, record_full_close, record_full_async): Refactor
8024         as methods of the record_full_base_target class.
8025         (record_full_resume, record_full_commit_resume): Refactor
8026         as methods of the record_full_target class.
8027         (record_full_wait, record_full_stopped_by_watchpoint)
8028         (record_full_stopped_data_address)
8029         (record_full_stopped_by_sw_breakpoint)
8030         (record_full_supports_stopped_by_sw_breakpoint)
8031         (record_full_stopped_by_hw_breakpoint)
8032         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8033         methods of the record_full_base_target class.
8034         (record_full_store_registers, record_full_xfer_partial)
8035         (record_full_insert_breakpoint, record_full_remove_breakpoint):
8036         Refactor as methods of the record_full_target class.
8037         (record_full_can_execute_reverse, record_full_get_bookmark)
8038         (record_full_goto_bookmark, record_full_execution_direction)
8039         (record_full_record_method, record_full_info, record_full_delete)
8040         (record_full_is_replaying, record_full_will_replay)
8041         (record_full_goto_begin, record_full_goto_end, record_full_goto)
8042         (record_full_stop_replaying): Refactor as methods of the
8043         record_full_base_target class.
8044         (record_full_core_resume, record_full_core_kill)
8045         (record_full_core_fetch_registers)
8046         (record_full_core_prepare_to_store)
8047         (record_full_core_store_registers, record_full_core_xfer_partial)
8048         (record_full_core_insert_breakpoint)
8049         (record_full_core_remove_breakpoint)
8050         (record_full_core_has_execution): Refactor
8051         as methods of the record_full_core_target class.
8052         (record_full_base_target::supports_delete_record): New.
8053         (init_record_full_ops): Delete.
8054         (init_record_full_core_ops): Delete.
8055         (record_full_save): Refactor as method of the
8056         record_full_base_target class.
8057         (_initialize_record_full): Remove references to
8058         init_record_full_ops and init_record_full_core_ops.
8059
8060         * remote.c (remote_target, extended_remote_target): New classes.
8061         (remote_ops): Now a remote_target.
8062         (extended_remote_ops): Now an extended_remote_target.
8063         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8064         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8065         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8066         (remote_pass_signals, remote_set_syscall_catchpoint)
8067         (remote_program_signals, )
8068         (remote_thread_always_alive): Remove target_ops parameter.
8069         (remote_thread_alive, remote_thread_name)
8070         (remote_update_thread_list, remote_threads_extra_info)
8071         (remote_static_tracepoint_marker_at)
8072         (remote_static_tracepoint_markers_by_strid)
8073         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8074         (remote_open): Refactor as methods of remote_target.
8075         (extended_remote_open, extended_remote_detach)
8076         (extended_remote_attach, extended_remote_post_attach):
8077         (extended_remote_supports_disable_randomization)
8078         (extended_remote_create_inferior): : Refactor as method of
8079         extended_remote_target.
8080         (remote_set_permissions, remote_open_1, remote_detach)
8081         (remote_follow_fork, remote_follow_exec, remote_disconnect)
8082         (remote_resume, remote_commit_resume, remote_stop)
8083         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8084         (remote_terminal_ours, remote_wait, remote_fetch_registers)
8085         (remote_prepare_to_store, remote_store_registers)
8086         (remote_flash_erase, remote_flash_done, remote_files_info)
8087         (remote_kill, remote_mourn, remote_insert_breakpoint)
8088         (remote_remove_breakpoint, remote_insert_watchpoint)
8089         (remote_watchpoint_addr_within_range)
8090         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8091         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8092         (remote_supports_stopped_by_sw_breakpoint)
8093         (remote_stopped_by_hw_breakpoint)
8094         (remote_supports_stopped_by_hw_breakpoint)
8095         (remote_stopped_by_watchpoint, remote_stopped_data_address)
8096         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8097         (remote_verify_memory): Refactor as methods of remote_target.
8098         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8099         parameter.
8100         (remote_xfer_partial, remote_get_memory_xfer_limit)
8101         (remote_search_memory, remote_rcmd, remote_memory_map)
8102         (remote_pid_to_str, remote_get_thread_local_address)
8103         (remote_get_tib_address, remote_read_description): Refactor as
8104         methods of remote_target.
8105         (remote_target::fileio_open, remote_target::fileio_pwrite)
8106         (remote_target::fileio_pread, remote_target::fileio_close): New.
8107         (remote_hostio_readlink, remote_hostio_fstat)
8108         (remote_filesystem_is_local, remote_can_execute_reverse)
8109         (remote_supports_non_stop, remote_supports_disable_randomization)
8110         (remote_supports_multi_process, remote_supports_cond_breakpoints)
8111         (remote_supports_enable_disable_tracepoint)
8112         (remote_supports_string_tracing)
8113         (remote_can_run_breakpoint_commands, remote_trace_init)
8114         (remote_download_tracepoint, remote_can_download_tracepoint)
8115         (remote_download_trace_state_variable, remote_enable_tracepoint)
8116         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8117         (remote_trace_start, remote_get_trace_status)
8118         (remote_get_tracepoint_status, remote_trace_stop)
8119         (remote_trace_find, remote_get_trace_state_variable_value)
8120         (remote_save_trace_data, remote_get_raw_trace_data)
8121         (remote_set_disconnected_tracing, remote_core_of_thread)
8122         (remote_set_circular_trace_buffer, remote_traceframe_info)
8123         (remote_get_min_fast_tracepoint_insn_len)
8124         (remote_set_trace_buffer_size, remote_set_trace_notes)
8125         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8126         (remote_disable_btrace, remote_teardown_btrace)
8127         (remote_read_btrace, remote_btrace_conf)
8128         (remote_augmented_libraries_svr4_read, remote_load)
8129         (remote_pid_to_exec_file, remote_can_do_single_step)
8130         (remote_execution_direction, remote_thread_handle_to_thread_info):
8131         Refactor as methods of remote_target.
8132         (init_remote_ops, init_extended_remote_ops): Delete.
8133         (remote_can_async_p, remote_is_async_p, remote_async)
8134         (remote_thread_events, remote_upload_tracepoints)
8135         (remote_upload_trace_state_variables): Refactor as methods of
8136         remote_target.
8137         (_initialize_remote): Remove references to init_remote_ops and
8138         init_extended_remote_ops.
8139
8140         * remote-sim.c (gdbsim_target): New class.
8141         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8142         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8143         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8144         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8145         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8146         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8147         Refactor as methods of gdbsim_target.
8148         (gdbsim_ops): Now a gdbsim_target.
8149         (init_gdbsim_ops): Delete.
8150         (gdbsim_cntrl_c): Adjust.
8151         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8152
8153         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8154         (the_amd64_linux_nat_target): New.
8155         (amd64_linux_fetch_inferior_registers)
8156         (amd64_linux_store_inferior_registers): Refactor as methods of
8157         amd64_linux_nat_target.
8158         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
8159         * i386-linux-nat.c: Don't include "linux-nat.h".
8160         (i386_linux_nat_target): New class.
8161         (the_i386_linux_nat_target): New.
8162         (i386_linux_fetch_inferior_registers)
8163         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8164         as methods of i386_linux_nat_target.
8165         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
8166         * inf-child.c (inf_child_ops): Delete.
8167         (inf_child_fetch_inferior_registers)
8168         (inf_child_store_inferior_registers): Delete.
8169         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8170         methods of inf_child_target.
8171         (inf_child_target::supports_terminal_ours)
8172         (inf_child_target::terminal_init)
8173         (inf_child_target::terminal_inferior)
8174         (inf_child_target::terminal_ours_for_output)
8175         (inf_child_target::terminal_ours, inf_child_target::interrupt)
8176         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8177         New.
8178         (inf_child_open, inf_child_disconnect, inf_child_close)
8179         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8180         (inf_child_post_startup_inferior, inf_child_can_run)
8181         (inf_child_pid_to_exec_file): Refactor as methods of
8182         inf_child_target.
8183         (inf_child_follow_fork): Delete.
8184         (inf_child_target::can_create_inferior)
8185         (inf_child_target::can_attach): New.
8186         (inf_child_target::has_all_memory, inf_child_target::has_memory)
8187         (inf_child_target::has_stack, inf_child_target::has_registers)
8188         (inf_child_target::has_execution): New.
8189         (inf_child_fileio_open, inf_child_fileio_pwrite)
8190         (inf_child_fileio_pread, inf_child_fileio_fstat)
8191         (inf_child_fileio_close, inf_child_fileio_unlink)
8192         (inf_child_fileio_readlink, inf_child_use_agent)
8193         (inf_child_can_use_agent): Refactor as methods of
8194         inf_child_target.
8195         (return_zero, inf_child_target): Delete.
8196         (inf_child_target::inf_child_target): New.
8197         * inf-child.h: Include "target.h".
8198         (inf_child_target): Delete function prototype.
8199         (inf_child_target): New class.
8200         (inf_child_open_target, inf_child_mourn_inferior)
8201         (inf_child_maybe_unpush_target): Delete.
8202         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8203         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8204         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8205         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8206         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8207         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8208         (inf_ptrace_wait, inf_ptrace_xfer_partial)
8209         (inf_ptrace_thread_alive, inf_ptrace_files_info)
8210         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8211         methods of inf_ptrace_target.
8212         (inf_ptrace_target): Delete function.
8213         * inf-ptrace.h: Include "inf-child.h".
8214         (inf_ptrace_target): Delete function declaration.
8215         (inf_ptrace_target): New class.
8216         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8217         * linux-nat.c (linux_target): New.
8218         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8219         (linux_nat_target::~linux_nat_target): New.
8220         (linux_child_post_attach, linux_child_post_startup_inferior)
8221         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8222         (linux_child_remove_fork_catchpoint)
8223         (linux_child_insert_vfork_catchpoint)
8224         (linux_child_remove_vfork_catchpoint)
8225         (linux_child_insert_exec_catchpoint)
8226         (linux_child_remove_exec_catchpoint)
8227         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8228         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8229         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8230         (linux_nat_stopped_data_address)
8231         (linux_nat_stopped_by_sw_breakpoint)
8232         (linux_nat_supports_stopped_by_sw_breakpoint)
8233         (linux_nat_stopped_by_hw_breakpoint)
8234         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8235         (linux_nat_kill, linux_nat_mourn_inferior)
8236         (linux_nat_xfer_partial, linux_nat_thread_alive)
8237         (linux_nat_update_thread_list, linux_nat_pid_to_str)
8238         (linux_nat_thread_name, linux_child_pid_to_exec_file)
8239         (linux_child_static_tracepoint_markers_by_strid)
8240         (linux_nat_is_async_p, linux_nat_can_async_p)
8241         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8242         (linux_nat_supports_multi_process)
8243         (linux_nat_supports_disable_randomization, linux_nat_async)
8244         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8245         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8246         (linux_nat_fileio_open, linux_nat_fileio_readlink)
8247         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8248         methods of linux_nat_target.
8249         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8250         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8251         parameter.
8252         (check_stopped_by_watchpoint): Adjust.
8253         (linux_xfer_partial): Delete.
8254         (linux_target_install_ops, linux_target, linux_nat_add_target):
8255         Delete.
8256         (linux_nat_target::linux_nat_target): New.
8257         * linux-nat.h: Include "inf-ptrace.h".
8258         (linux_nat_target): New.
8259         (linux_target, linux_target_install_ops, linux_nat_add_target):
8260         Delete function declarations.
8261         (linux_target): Declare global.
8262         * linux-thread-db.c (thread_db_target): New.
8263         (thread_db_target::thread_db_target): New.
8264         (thread_db_ops): Delete.
8265         (the_thread_db_target): New.
8266         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8267         (thread_db_update_thread_list, thread_db_pid_to_str)
8268         (thread_db_extra_thread_info)
8269         (thread_db_thread_handle_to_thread_info)
8270         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8271         (thread_db_resume): Refactor as methods of thread_db_target.
8272         (init_thread_db_ops): Delete.
8273         (_initialize_thread_db): Remove reference to init_thread_db_ops.
8274         * x86-linux-nat.c: Don't include "linux-nat.h".
8275         (super_post_startup_inferior): Delete.
8276         (x86_linux_nat_target::~x86_linux_nat_target): New.
8277         (x86_linux_child_post_startup_inferior)
8278         (x86_linux_read_description, x86_linux_enable_btrace)
8279         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8280         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8281         methods of x86_linux_nat_target.
8282         (x86_linux_create_target): Delete.  Bits folded ...
8283         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
8284         pointer.
8285         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8286         (x86_linux_nat_target): New class.
8287         (x86_linux_create_target): Delete.
8288         (x86_linux_add_target): Now takes a linux_nat_target pointer.
8289         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8290         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8291         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8292         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8293         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8294         make extern.
8295         (x86_use_watchpoints): Delete.
8296         * x86-nat.h: Include "breakpoint.h" and "target.h".
8297         (x86_use_watchpoints): Delete.
8298         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8299         (x86_stopped_by_watchpoint, x86_stopped_data_address)
8300         (x86_insert_watchpoint, x86_remove_watchpoint)
8301         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8302         (x86_stopped_by_hw_breakpoint): New declarations.
8303         (x86_nat_target): New template class.
8304
8305         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8306         (the_ppc_linux_nat_target): New.
8307         (ppc_linux_fetch_inferior_registers)
8308         (ppc_linux_can_use_hw_breakpoint)
8309         (ppc_linux_region_ok_for_hw_watchpoint)
8310         (ppc_linux_ranged_break_num_registers)
8311         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8312         (ppc_linux_insert_mask_watchpoint)
8313         (ppc_linux_remove_mask_watchpoint)
8314         (ppc_linux_can_accel_watchpoint_condition)
8315         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8316         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8317         (ppc_linux_watchpoint_addr_within_range)
8318         (ppc_linux_masked_watch_num_registers)
8319         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8320         (ppc_linux_read_description): Refactor as methods of
8321         ppc_linux_nat_target.
8322         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8323
8324         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8325         (procfs_target): New class.
8326         (the_procfs_target): New.
8327         (procfs_target): Delete function.
8328         (procfs_auxv_parse, procfs_attach, procfs_detach)
8329         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8330         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8331         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8332         (procfs_create_inferior, procfs_update_thread_list)
8333         (procfs_thread_alive, procfs_pid_to_str)
8334         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8335         (procfs_stopped_data_address, procfs_insert_watchpoint)
8336         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8337         (proc_find_memory_regions, procfs_info_proc)
8338         (procfs_make_note_section): Refactor as methods of procfs_target.
8339         (_initialize_procfs): Adjust.
8340         * sol-thread.c (sol_thread_target): New class.
8341         (sol_thread_ops): Now a sol_thread_target.
8342         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8343         (sol_thread_fetch_registers, sol_thread_store_registers)
8344         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8345         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8346         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8347         (init_sol_thread_ops): Delete.
8348         (_initialize_sol_thread): Adjust.  Remove references to
8349         init_sol_thread_ops and complete_target_initialization.
8350
8351         * windows-nat.c (windows_nat_target): New class.
8352         (windows_fetch_inferior_registers)
8353         (windows_store_inferior_registers, windows_resume, windows_wait)
8354         (windows_attach, windows_detach, windows_pid_to_exec_file)
8355         (windows_files_info, windows_create_inferior)
8356         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8357         (windows_close, windows_pid_to_str, windows_xfer_partial)
8358         (windows_get_tib_address, windows_get_ada_task_ptid)
8359         (windows_thread_name, windows_thread_alive): Refactor as
8360         windows_nat_target methods.
8361         (do_initial_windows_stuff): Adjust.
8362         (windows_target): Delete function.
8363         (_initialize_windows_nat): Adjust.
8364
8365         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8366         (darwin_mourn_inferior, darwin_kill_inferior)
8367         (darwin_create_inferior, darwin_attach, darwin_detach)
8368         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8369         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8370         (darwin_supports_multi_process): Refactor as darwin_nat_target
8371         methods.
8372         (darwin_resume_to, darwin_files_info): Delete.
8373         (_initialize_darwin_inferior): Rename to ...
8374         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
8375         * darwin-nat.h: Include "inf-child.h".
8376         (darwin_nat_target): New class.
8377         (darwin_complete_target): Delete.
8378         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8379         (darwin_target): New.
8380         (i386_darwin_fetch_inferior_registers)
8381         (i386_darwin_store_inferior_registers): Refactor as methods of
8382         darwin_nat_target.
8383         (darwin_complete_target): Delete, with ...
8384         (_initialize_i386_darwin_nat): ... bits factored out here.
8385
8386         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8387         (the_alpha_linux_nat_target): New.
8388         (alpha_linux_register_u_offset): Refactor as
8389         alpha_linux_nat_target method.
8390         (_initialize_alpha_linux_nat): Adjust.
8391         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8392         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8393         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8394         methods of linux_nat_trad_target.
8395         (linux_trad_target): Delete.
8396         * linux-nat-trad.h (linux_trad_target): Delete function.
8397         (linux_nat_trad_target): New class.
8398         * mips-linux-nat.c (mips_linux_nat_target): New class.
8399         (super_fetch_registers, super_store_registers, super_close):
8400         Delete.
8401         (the_mips_linux_nat_target): New.
8402         (mips64_linux_regsets_fetch_registers)
8403         (mips64_linux_regsets_store_registers)
8404         (mips64_linux_fetch_registers, mips64_linux_store_registers)
8405         (mips_linux_register_u_offset, mips_linux_read_description)
8406         (mips_linux_can_use_hw_breakpoint)
8407         (mips_linux_stopped_by_watchpoint)
8408         (mips_linux_stopped_data_address)
8409         (mips_linux_region_ok_for_hw_watchpoint)
8410         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8411         (mips_linux_close): Refactor as methods of mips_linux_nat.
8412         (_initialize_mips_linux_nat): Adjust to C++ification.
8413
8414         * aix-thread.c (aix_thread_target): New class.
8415         (aix_thread_ops): Now an aix_thread_target.
8416         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8417         (aix_thread_fetch_registers, aix_thread_store_registers)
8418         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8419         (aix_thread_thread_alive, aix_thread_pid_to_str)
8420         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8421         Refactor as methods of aix_thread_target.
8422         (init_aix_thread_ops): Delete.
8423         (_initialize_aix_thread): Remove references to init_aix_thread_ops
8424         and complete_target_initialization.
8425         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8426         (rs6000_nat_target): New class.
8427         (the_rs6000_nat_target): New.
8428         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8429         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8430         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8431         (super_create_inferior): Delete.
8432         (_initialize_rs6000_nat): Adjust to C++ification.
8433
8434         * arm-linux-nat.c (arm_linux_nat_target): New class.
8435         (the_arm_linux_nat_target): New.
8436         (arm_linux_fetch_inferior_registers)
8437         (arm_linux_store_inferior_registers, arm_linux_read_description)
8438         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8439         (arm_linux_remove_hw_breakpoint)
8440         (arm_linux_region_ok_for_hw_watchpoint)
8441         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8442         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8443         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8444         arm_linux_nat_target.
8445         (_initialize_arm_linux_nat): Adjust to C++ification.
8446
8447         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8448         (the_aarch64_linux_nat_target): New.
8449         (aarch64_linux_fetch_inferior_registers)
8450         (aarch64_linux_store_inferior_registers)
8451         (aarch64_linux_child_post_startup_inferior)
8452         (aarch64_linux_read_description)
8453         (aarch64_linux_can_use_hw_breakpoint)
8454         (aarch64_linux_insert_hw_breakpoint)
8455         (aarch64_linux_remove_hw_breakpoint)
8456         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8457         (aarch64_linux_region_ok_for_hw_watchpoint)
8458         (aarch64_linux_stopped_data_address)
8459         (aarch64_linux_stopped_by_watchpoint)
8460         (aarch64_linux_watchpoint_addr_within_range)
8461         (aarch64_linux_can_do_single_step): Refactor as methods of
8462         aarch64_linux_nat_target.
8463         (super_post_startup_inferior): Delete.
8464         (_initialize_aarch64_linux_nat): Adjust to C++ification.
8465
8466         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8467         (the_hppa_linux_nat_target): New.
8468         (hppa_linux_fetch_inferior_registers)
8469         (hppa_linux_store_inferior_registers): Refactor as methods of
8470         hppa_linux_nat_target.
8471         (_initialize_hppa_linux_nat): Adjust to C++ification.
8472
8473         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8474         (the_ia64_linux_nat_target): New.
8475         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8476         (ia64_linux_stopped_data_address)
8477         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8478         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8479         ia64_linux_nat_target methods.
8480         (super_xfer_partial): Delete.
8481         (_initialize_ia64_linux_nat): Adjust to C++ification.
8482
8483         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8484         (the_m32r_linux_nat_target): New.
8485         (m32r_linux_fetch_inferior_registers)
8486         (m32r_linux_store_inferior_registers): Refactor as
8487         m32r_linux_nat_target methods.
8488         (_initialize_m32r_linux_nat): Adjust to C++ification.
8489
8490         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8491         (the_m68k_linux_nat_target): New.
8492         (m68k_linux_fetch_inferior_registers)
8493         (m68k_linux_store_inferior_registers): Refactor as
8494         m68k_linux_nat_target methods.
8495         (_initialize_m68k_linux_nat): Adjust to C++ification.
8496
8497         * s390-linux-nat.c (s390_linux_nat_target): New class.
8498         (the_s390_linux_nat_target): New.
8499         (s390_linux_fetch_inferior_registers)
8500         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8501         (s390_insert_watchpoint, s390_remove_watchpoint)
8502         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8503         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8504         (s390_auxv_parse, s390_read_description): Refactor as methods of
8505         s390_linux_nat_target.
8506         (_initialize_s390_nat): Adjust to C++ification.
8507
8508         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8509         (the_sparc_linux_nat_target): New.
8510         (_initialize_sparc_linux_nat): Adjust to C++ification.
8511         * sparc-nat.c (sparc_fetch_inferior_registers)
8512         (sparc_store_inferior_registers): Remove target_ops parameter.
8513         * sparc-nat.h (sparc_fetch_inferior_registers)
8514         (sparc_store_inferior_registers): Remove target_ops parameter.
8515         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8516         (the_sparc64_linux_nat_target): New.
8517         (_initialize_sparc64_linux_nat): Adjust to C++ification.
8518
8519         * spu-linux-nat.c (spu_linux_nat_target): New class.
8520         (the_spu_linux_nat_target): New.
8521         (spu_child_post_startup_inferior, spu_child_post_attach)
8522         (spu_child_wait, spu_fetch_inferior_registers)
8523         (spu_store_inferior_registers, spu_xfer_partial)
8524         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8525         methods.
8526         (_initialize_spu_nat): Adjust to C++ification.
8527
8528         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8529         (the_tilegx_linux_nat_target): New.
8530         (fetch_inferior_registers, store_inferior_registers):
8531         Refactor as methods.
8532         (_initialize_tile_linux_nat): Adjust to C++ification.
8533
8534         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8535         (the_xtensa_linux_nat_target): New.
8536         (xtensa_linux_fetch_inferior_registers)
8537         (xtensa_linux_store_inferior_registers): Refactor as
8538         xtensa_linux_nat_target methods.
8539         (_initialize_xtensa_linux_nat): Adjust to C++ification.
8540
8541         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8542         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8543         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8544         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8545         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8546         (fbsd_stopped_by_sw_breakpoint)
8547         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8548         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8549         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8550         (fbsd_post_startup_inferior, fbsd_post_attach)
8551         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8552         (fbsd_set_syscall_catchpoint)
8553         (super_xfer_partial, super_resume, super_wait)
8554         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8555         (fbsd_handle_debug_trap): Remove target_ops parameter.
8556         (fbsd_nat_add_target): Delete.
8557         * fbsd-nat.h: Include "inf-ptrace.h".
8558         (fbsd_nat_add_target): Delete.
8559         (USE_SIGTRAP_SIGINFO): Define.
8560         (fbsd_nat_target): New class.
8561
8562         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8563         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8564         (amd64bsd_target): Delete.
8565         * amd64-bsd-nat.h: New file.
8566         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8567         "x86-bsd-nat.h".
8568         (amd64_fbsd_nat_target): New class.
8569         (the_amd64_fbsd_nat_target): New.
8570         (amd64fbsd_read_description): Refactor as method of
8571         amd64_fbsd_nat_target.
8572         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8573         (_initialize_amd64fbsd_nat): Adjust to C++ification.
8574         * amd64-nat.h (amd64bsd_target): Delete function declaration.
8575         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8576         (i386bsd_store_inferior_registers): Remove target_ops parameter.
8577         (i386bsd_target): Delete.
8578         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8579         (i386bsd_fetch_inferior_registers)
8580         (i386bsd_store_inferior_registers): Declare.
8581         (i386_bsd_nat_target): New class.
8582         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8583         (the_i386_fbsd_nat_target): New.
8584         (i386fbsd_resume, i386fbsd_read_description): Refactor as
8585         i386_fbsd_nat_target methods.
8586         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8587         (_initialize_i386fbsd_nat): Adjust to C++ification.
8588         * x86-bsd-nat.c (super_mourn_inferior): Delete.
8589         (x86bsd_mourn_inferior, x86bsd_target): Delete.
8590         (_initialize_x86_bsd_nat): Adjust to C++ification.
8591         * x86-bsd-nat.h: Include "x86-nat.h".
8592         (x86bsd_target): Delete declaration.
8593         (x86bsd_nat_target): New class.
8594
8595         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8596         (the_aarch64_fbsd_nat_target): New.
8597         (aarch64_fbsd_fetch_inferior_registers)
8598         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8599         aarch64_fbsd_nat_target.
8600         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8601         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8602         (the_alpha_bsd_nat_target): New.
8603         (alphabsd_fetch_inferior_registers)
8604         (alphabsd_store_inferior_registers): Refactor as
8605         alpha_bsd_nat_target methods.
8606         (_initialize_alphabsd_nat): Refactor as methods of
8607         alpha_bsd_nat_target.
8608         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8609         (the_amd64_nbsd_nat_target): New.
8610         (_initialize_amd64nbsd_nat): Adjust to C++ification.
8611         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8612         (the_amd64_obsd_nat_target): New.
8613         (_initialize_amd64obsd_nat): Adjust to C++ification.
8614         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8615         (the_arm_fbsd_nat_target): New.
8616         (arm_fbsd_fetch_inferior_registers)
8617         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8618         (_initialize_arm_fbsd_nat): Refactor as methods of
8619         arm_fbsd_nat_target.
8620         (_initialize_arm_fbsd_nat): Adjust to C++ification.
8621         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8622         (the_arm_netbsd_nat_target): New.
8623         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8624         arm_netbsd_nat_target.
8625         (_initialize_arm_netbsd_nat): Adjust to C++ification.
8626         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8627         (the_hppa_nbsd_nat_target): New.
8628         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8629         hppa_nbsd_nat_target methods.
8630         (_initialize_hppanbsd_nat): Adjust to C++ification.
8631         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8632         (the_hppa_obsd_nat_target): New.
8633         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8634         methods of hppa_obsd_nat_target.
8635         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
8636         add_target.
8637         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8638         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
8639         add_target.
8640         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8641         (_initialize_i386obsd_nat): Use add_target.
8642         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8643         (the_m68k_bsd_nat_target): New.
8644         (m68kbsd_fetch_inferior_registers)
8645         (m68kbsd_store_inferior_registers): Refactor as methods of
8646         m68k_bsd_nat_target.
8647         (_initialize_m68kbsd_nat): Adjust to C++ification.
8648         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8649         (the_mips_fbsd_nat_target): New.
8650         (mips_fbsd_fetch_inferior_registers)
8651         (mips_fbsd_store_inferior_registers): Refactor as methods of
8652         mips_fbsd_nat_target.
8653         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
8654         add_target.
8655         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8656         (the_mips_nbsd_nat_target): New.
8657         (mipsnbsd_fetch_inferior_registers)
8658         (mipsnbsd_store_inferior_registers): Refactor as methods of
8659         mips_nbsd_nat_target.
8660         (_initialize_mipsnbsd_nat): Adjust to C++ification.
8661         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8662         (the_mips64_obsd_nat_target): New.
8663         (mips64obsd_fetch_inferior_registers)
8664         (mips64obsd_store_inferior_registers): Refactor as methods of
8665         mips64_obsd_nat_target.
8666         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
8667         add_target.
8668         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8669         nbsd_nat_target.
8670         * nbsd-nat.h: Include "inf-ptrace.h".
8671         (nbsd_nat_target): New class.
8672         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8673         (obsd_wait): Refactor as methods of obsd_nat_target.
8674         (obsd_add_target): Delete.
8675         * obsd-nat.h: Include "inf-ptrace.h".
8676         (obsd_nat_target): New class.
8677         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8678         (the_ppc_fbsd_nat_target): New.
8679         (ppcfbsd_fetch_inferior_registers)
8680         (ppcfbsd_store_inferior_registers): Refactor as methods of
8681         ppc_fbsd_nat_target.
8682         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
8683         add_target.
8684         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8685         (the_ppc_nbsd_nat_target): New.
8686         (ppcnbsd_fetch_inferior_registers)
8687         (ppcnbsd_store_inferior_registers): Refactor as methods of
8688         ppc_nbsd_nat_target.
8689         (_initialize_ppcnbsd_nat): Adjust to C++ification.
8690         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8691         (the_ppc_obsd_nat_target): New.
8692         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8693         methods of ppc_obsd_nat_target.
8694         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
8695         add_target.
8696         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8697         (the_sh_nbsd_nat_target): New.
8698         (shnbsd_fetch_inferior_registers)
8699         (shnbsd_store_inferior_registers): Refactor as methods of
8700         sh_nbsd_nat_target.
8701         (_initialize_shnbsd_nat): Adjust to C++ification.
8702         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8703         (inf_ptrace_xfer_partial): Delete.
8704         (sparc_xfer_partial, sparc_target): Delete.
8705         * sparc-nat.h (sparc_fetch_inferior_registers)
8706         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8707         (sparc_target): Delete function declaration.
8708         (sparc_target): New template class.
8709         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8710         (_initialize_sparcnbsd_nat): Adjust to C++ification.
8711         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8712         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
8713         add_target.
8714         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8715         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8716         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8717         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
8718         add_target.
8719         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8720         (the_vax_bsd_nat_target): New.
8721         (vaxbsd_fetch_inferior_registers)
8722         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8723         methods.
8724         (_initialize_vaxbsd_nat): Adjust to C++ification.
8725
8726         * bsd-kvm.c (bsd_kvm_target): New class.
8727         (bsd_kvm_ops): Now a bsd_kvm_target.
8728         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8729         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8730         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8731         bsd_kvm_target.
8732         (bsd_kvm_return_one): Delete.
8733         (bsd_kvm_add_target): Adjust to C++ification.
8734
8735         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8736         (nto_procfs_target_procfs): New classes.
8737         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8738         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8739         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8740         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8741         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8742         (procfs_remove_hw_breakpoint, procfs_resume)
8743         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8744         (procfs_kill_inferior, procfs_store_registers)
8745         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8746         as methods of nto_procfs_target.
8747         (nto_procfs_ops): Now an nto_procfs_target_procfs.
8748         (nto_native_ops): Delete.
8749         (procfs_open, procfs_native_open): Delete.
8750         (nto_native_ops): Now an nto_procfs_target_native.
8751         (init_procfs_targets): Adjust to C++ification.
8752         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8753         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8754         Refactor as methods of nto_procfs_target.
8755
8756         * go32-nat.c (go32_nat_target): New class.
8757         (the_go32_nat_target): New.
8758         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8759         (go32_store_registers, go32_xfer_partial, go32_files_info)
8760         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8761         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8762         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8763         (go32_pid_to_str): Refactor as methods of go32_nat_target.
8764         (go32_target): Delete.
8765         (_initialize_go32_nat): Adjust to C++ification.
8766
8767         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8768         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8769         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8770         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8771         gnu_nat_target.
8772         (gnu_target): Delete.
8773         * gnu-nat.h (gnu_target): Delete.
8774         (gnu_nat_target): New class.
8775         * i386-gnu-nat.c (gnu_base_target): New.
8776         (i386_gnu_nat_target): New class.
8777         (the_i386_gnu_nat_target): New.
8778         (_initialize_i386gnu_nat): Adjust to C++ification.
8779
8780 2018-05-02  Pedro Alves  <palves@redhat.com>
8781
8782         * bfd-target.c (target_bfd_xclose): Rename to ...
8783         (target_bfd_close): ... this.
8784         (target_bfd_reopen): Adjust.
8785         * target.c (target_close): Remove references to to_xclose.
8786         * target.h (target_ops::to_xclose): Delete.
8787         (target_ops::to_close): Update comments.
8788
8789 2018-05-02  Pedro Alves  <palves@redhat.com>
8790
8791         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8792         "linux-nat.h".
8793         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8794         * inf-ptrace.c (inf_ptrace_register_u_offset)
8795         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8796         (inf_ptrace_store_register, inf_ptrace_store_registers)
8797         (inf_ptrace_trad_target): Move to ...
8798         * linux-nat-trad.c: ... this new file.
8799         * linux-nat-trad.h: New file.
8800         * linux-nat.c (linux_target_install_ops): Make extern.
8801         (linux_trad_target): Delete.
8802         * linux-nat.h (linux_trad_target): Delete declaration.
8803         (linux_target_install_ops): Declare.
8804         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8805         "linux-nat.h".
8806
8807 2018-05-02  Pedro Alves  <palves@redhat.com>
8808
8809         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8810         procfs_target/add_target here.
8811         * procfs.c (procfs_target): Make static.
8812         (_initialize_procfs): Call add_target here.
8813         * procfs.h (struct target_ops): Remove forward declaration.
8814         (procfs_target): Remove declaration.
8815         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8816
8817 2018-05-02  Pedro Alves  <palves@redhat.com>
8818
8819         * procfs.c (procfs_stopped_by_watchpoint)
8820         (procfs_insert_watchpoint, procfs_remove_watchpoint)
8821         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8822         Forward declare.
8823         (procfs_use_watchpoints): Delete, move contents...
8824         (procfs_target): ... here.
8825         * procfs.h (procfs_use_watchpoints): Delete declaration.
8826         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8827         procfs_use_watchpoints.
8828         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8829         procfs_use_watchpoints.
8830
8831 2018-05-02  Tom Tromey  <tom@tromey.com>
8832
8833         PR python/20084:
8834         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8835         and var_zuinteger_unlimited.
8836         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8837         and PARAM_ZUINTEGER_UNLIMITED.
8838         (set_parameter_value): Handle var_zuinteger and
8839         var_zuinteger_unlimited.
8840         (add_setshow_generic): Likewise.
8841         (parmpy_init): Likewise.
8842
8843 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
8844
8845         PR rust/23124
8846         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8847         pointer is not null before dereferencing it.
8848
8849 2018-04-30  Tom Tromey  <tom@tromey.com>
8850
8851         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8852         is_mi_like_p.
8853
8854 2018-04-30  Tom Tromey  <tom@tromey.com>
8855
8856         * breakpoint.c (mention): Remove use of is_mi_like_p.
8857         (print_mention_ranged_breakpoint): Likewise.
8858         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8859         of is_mi_like_p.
8860
8861 2018-04-30  Tom Tromey  <tom@tromey.com>
8862
8863         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8864
8865 2018-04-30  Tom Tromey  <tom@tromey.com>
8866
8867         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8868         (info_spu_event_command): Remove some uses of is_mi_like_p.
8869
8870 2018-04-30  Tom Tromey  <tom@tromey.com>
8871
8872         * python/py-framefilter.c (py_print_single_arg)
8873         (enumerate_locals, py_print_args, py_print_frame): Remove some
8874         uses of is_mi_like_p.
8875
8876 2018-04-30  Tom Tromey  <tom@tromey.com>
8877
8878         * ui-out.c: Update.
8879         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8880         * ui-out.h (ui_out::is_mi_like_p): Now const.
8881         (ui_out::do_is_mi_like_p): Now const.
8882         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8883
8884 2018-04-30  Tom Tromey  <tom@tromey.com>
8885
8886         * varobj.c (varobj_set_visualizer): Use new_reference.
8887         * python/python.c (gdbpy_decode_line): Use new_reference.
8888         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8889         new_reference.
8890
8891 2018-04-30  Tom Tromey  <tom@tromey.com>
8892
8893         * varobj.c (install_new_value): Use new_reference.
8894         * value.h (value_incref): Return void.  Swap intro comment with
8895         value_decref.
8896         * value.c (set_value_parent): Use new_reference.
8897         (value_incref): Return void.  Update intro comment.
8898         (release_value): Use new_reference.
8899         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8900
8901 2018-04-30  Tom Tromey  <tom@tromey.com>
8902
8903         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8904         * gdb_bfd.h (new_bfd_ref): Remove.
8905         (gdb_bfd_open): Update comment.
8906         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8907         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8908         (gdb_bfd_fdopenr): Use new_reference.
8909         * exec.c (exec_file_attach): Use new_reference.
8910
8911 2018-04-30  Tom Tromey  <tom@tromey.com>
8912
8913         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8914         method.
8915
8916 2018-04-30  Tom Tromey  <tom@tromey.com>
8917
8918         * jit.c (jit_read_code_entry): Use type_align.
8919         * i386-tdep.c (i386_gdbarch_init): Don't call
8920         set_gdbarch_long_long_align_bit.
8921         * gdbarch.sh: Remove long_long_align_bit.
8922         * gdbarch.c, gdbarch.h: Rebuild.
8923         * arc-tdep.c (arc_type_align): New function.
8924         (arc_gdbarch_init): Use arc_type_align.  Don't call
8925         set_gdbarch_long_long_align_bit.
8926
8927 2018-04-30  Tom Tromey  <tom@tromey.com>
8928
8929         * rust-lang.c (rust_type_alignment): Remove.
8930         (rust_composite_type): Use type_align.
8931
8932 2018-04-30  Tom Tromey  <tom@tromey.com>
8933
8934         * NEWS: Mention Type.align.
8935         * python/py-type.c (typy_get_alignof): New function.
8936         (type_object_getset): Add "alignof".
8937
8938 2018-04-30  Tom Tromey  <tom@tromey.com>
8939
8940         PR exp/17095:
8941         * NEWS: Update.
8942         * std-operator.def (UNOP_ALIGNOF): New operator.
8943         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8944         New.
8945         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8946         * c-lang.c (c_op_print_tab): Add alignof.
8947         * c-exp.y (ALIGNOF): New token.
8948         (exp): Add "ALIGNOF" production.
8949         (ident_tokens): Add _Alignof and alignof.
8950
8951 2018-04-30  Tom Tromey  <tom@tromey.com>
8952
8953         * i386-tdep.c (i386_type_align): New function.
8954         (i386_gdbarch_init): Update.
8955         * gdbarch.sh (type_align): New method.
8956         * gdbarch.c, gdbarch.h: Rebuild.
8957         * arch-utils.h (default_type_align): Declare.
8958         * arch-utils.c (default_type_align): New function.
8959         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8960         (struct type) <align_log2>: New field.
8961         <instance_flags>: Now a bitfield.
8962         (TYPE_RAW_ALIGN): New macro.
8963         (type_align, type_raw_align, set_type_align): Declare.
8964         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8965         functions.
8966         * dwarf2read.c (quirk_rust_enum): Set type alignment.
8967         (get_alignment, maybe_set_alignment): New functions.
8968         (read_structure_type, read_enumeration_type, read_array_type)
8969         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8970         (read_subrange_type, read_base_type): Set type alignment.
8971
8972 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
8973
8974         * dwarf2read.c (read_index_from_section): Use bool.
8975
8976 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
8977
8978         PR gdb/22950
8979         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8980         with #ifdef.
8981
8982 2018-04-29  John Reiser  <jreiser@BitWagon.com>
8983
8984         PR build/22873
8985         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8986         last step, and do it atomically.
8987
8988 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
8989
8990         * compile/compile-c-types.c (convert_int, convert_float):
8991         Update for C FE v1.
8992
8993 2018-04-27  Tom Tromey  <tom@tromey.com>
8994
8995         PR rust/22545:
8996         * rust-lang.c (rust_inclusive_range_type_p): New function.
8997         (rust_range): Handle inclusive ranges.
8998         (rust_compute_range): Likewise.
8999         * rust-exp.y (struct rust_op) <inclusive>: New field.
9000         (DOTDOTEQ): New constant.
9001         (range_expr): Add "..=" productions.
9002         (operator_tokens): Add "..=" token.
9003         (ast_range): Add "inclusive" parameter.
9004         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9005         ranges.
9006         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9007         bounds values.
9008         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9009         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9010         Update comments.
9011         * expprint.c (print_subexp_standard): Handle new bounds values.
9012         (dump_subexp_body_standard): Likewise.
9013
9014 2018-04-27  Tom Tromey  <tom@tromey.com>
9015
9016         * configure: Rebuild.
9017         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9018         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9019         "OVERRIDE".
9020         (class symbol_needs_eval_context): Likewise.
9021         * dwarf2read.c (mock_mapped_index::symbol_name_count)
9022         (mock_mapped_index::symbol_name_at): Use "override".  Remove
9023         "virtual".
9024         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9025         "override".
9026         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9027         * aarch64-tdep.c (instruction_reader::read): Use "override".
9028         (instruction_reader_test::read): Likewise.
9029         * arm-tdep.c (instruction_reader::read): Use "override".
9030         (instruction_reader_thumb::read): Likewise.
9031
9032 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
9033
9034         PR remote/9665
9035         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9036         instead of remote_send.
9037         (remote_send): Remove.
9038
9039 2018-04-26  Pedro Alves  <palves@redhat.com>
9040
9041         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9042         find_function_start_sal instead of find_pc_line.
9043
9044 2018-04-26  Pedro Alves  <palves@redhat.com>
9045
9046         * breakpoint.c (set_breakpoint_location_function): Handle
9047         mst_data_gnu_ifunc.
9048         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9049         * elfread.c (elf_symtab_read): Give data symbols with
9050         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9051         (elf_rel_plt_read): Update comment.
9052         * linespec.c (convert_linespec_to_sals): Handle
9053         mst_data_gnu_ifunc.
9054         (minsym_found): Handle mst_data_gnu_ifunc.
9055         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9056         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9057         * parse.c (find_minsym_type_and_address): Handle
9058         mst_data_gnu_ifunc.
9059         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9060         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9061         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9062         comment.
9063         <mst_data_gnu_ifunc>: New enumerator.
9064
9065 2018-04-26  Pedro Alves  <palves@redhat.com>
9066
9067         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9068         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
9069         'want_trampoline' parameter by a lookup_msym_prefer parameter.
9070         Handle it.
9071         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9072         (lookup_minimal_symbol_by_pc): Adjust.
9073         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9074         (lookup_solib_trampoline_symbol_by_pc): Adjust.
9075         * minsyms.h (lookup_msym_prefer): New enum.
9076         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9077         parameter by a lookup_msym_prefer parameter.
9078
9079 2018-04-26  Pedro Alves  <palves@redhat.com>
9080
9081         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9082         ends in "@plt" instead of looking at the symbol's section.
9083
9084 2018-04-26  Pedro Alves  <palves@redhat.com>
9085
9086         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
9087         all references.
9088         (find_pc_partial_function_gnu_ifunc): Rename to ...
9089         (find_pc_partial_function): ... this, and remove references to
9090         'is_gnu_ifunc_p'.
9091         (find_pc_partial_function): Delete old implementation.
9092         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9093
9094 2018-04-26  Pedro Alves  <palves@redhat.com>
9095
9096         * linespec.c (struct bound_minimal_symbol_search_key): New.
9097         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
9098         skip first line if we found a GNU ifunc minimal symbol by name.
9099         (compare_msymbols): Change parameters to work with a destructured
9100         lhs minsym.
9101         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9102         functions.
9103
9104 2018-04-26  Pedro Alves  <palves@redhat.com>
9105
9106         * breakpoint.c (set_breakpoint_location_function): Don't resolve
9107         ifunc targets here.  Instead, if we have an ifunc minsym, use its
9108         address/name.
9109         (add_location_to_breakpoint): Store the minsym and the objfile in
9110         the breakpoint location.
9111         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9112         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9113         Record the minsym in the sal.
9114         * symtab.h (symtab_and_line) <msymbol>: New field.
9115
9116 2018-04-26  Pedro Alves  <palves@redhat.com>
9117
9118         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9119         unless we actually resolved the ifunc.
9120
9121 2018-04-26  Pedro Alves  <palves@redhat.com>
9122
9123         * c-exp.y (variable production): Prefer ifunc minsyms over
9124         regular function symbols.
9125         * symtab.c (find_gnu_ifunc): New function.
9126         * minsyms.h (lookup_msym_prefer): New enum.
9127         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9128         parameter by a lookup_msym_prefer parameter.
9129         * symtab.h (find_gnu_ifunc): New declaration.
9130
9131 2018-04-26  Pedro Alves  <palves@redhat.com>
9132
9133         * blockframe.c (find_gnu_ifunc_target_type): New function.
9134         (find_function_type): New.
9135         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9136         return a value with a memory address.
9137         (eval_call): For calls to GNU ifunc functions, try to find the
9138         type of the target function from the type that the resolver
9139         returns.
9140         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9141         symbols.
9142         * infcall.c (find_function_return_type): Delete.
9143         (find_function_addr): Add 'function_type' parameter.  For calls to
9144         GNU ifunc functions, try to find the type of the target function
9145         from the type that the resolver returns, and return it via
9146         FUNCTION_TYPE.
9147         (call_function_by_hand_dummy): Adjust to use the function type
9148         returned by find_function_addr.
9149         (find_function_addr): Add 'function_type' parameter and move
9150         description here.
9151         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9152         declarations.
9153
9154 2018-04-26  Pedro Alves  <palves@redhat.com>
9155
9156         * c-exp.y (variable production): Skip finding an alias for ifunc
9157         symbols.
9158
9159 2018-04-26  Pedro Alves  <palves@redhat.com>
9160
9161         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9162
9163 2018-04-25  Pedro Alves  <palves@redhat.com>
9164
9165         * infcmd.c (kill_command): Print the pid as string, not the whole
9166         thread's ptid.  Add comment.  s/has been killed/killed/ in output
9167         message.
9168         * remote.c (remote_detach_1): Print the pid as string, not the
9169         whole thread's ptid.
9170
9171 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9172             Sergio Durigan Junior  <sergiodj@redhat.com>
9173             Pedro Alves  <palves@redhat.com>
9174
9175         * infcmd.c (kill_command): Print message when inferior has
9176         been killed.
9177         * inferior.c (print_inferior_events): Remove 'static'.  Set as
9178         '1'.
9179         (add_inferior): Improve message printed when
9180         'print_inferior_events' is on.
9181         (exit_inferior): Remove message printed when
9182         'print_inferior_events' is on.
9183         (detach_inferior): Improve message printed when
9184         'print_inferior_events' is on.
9185         (initialize_inferiors): Use 'add_inferior_silent' to set
9186         'current_inferior_'.
9187         * inferior.h (print_inferior_events): Declare here as
9188         'extern'.
9189         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9190         '[Detaching...]' messages when 'print_inferior_events' is on.
9191         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
9192         as prefix/suffix for messages.  Remove periods.  Fix erroneous
9193         'Detaching after fork from child...', replace it by '... from
9194         parent...'.
9195         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9196         prefix/suffix when printing 'Detaching...' messages.  Print
9197         them when 'print_inferior_events' is on.
9198         * remote.c (remote_detach_1): Print message when detaching
9199         from inferior and '!is_fork_parent'.
9200
9201 2018-04-24  Tom Tromey  <tom@tromey.com>
9202
9203         * cli-out.h: Reindent.
9204
9205 2018-04-24  Tom Tromey  <tom@tromey.com>
9206
9207         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9208         (cli_ui_out::do_field_string): Use fputs_filtered.
9209         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9210
9211 2018-04-23  Tom Tromey  <tom@tromey.com>
9212
9213         * guile/scm-frame.c (gdbscm_frame_read_var): Use
9214         gdb::unique_xmalloc_ptr.
9215
9216 2018-04-23  Tom Tromey  <tom@tromey.com>
9217
9218         * configure: Rebuild.
9219
9220 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
9221
9222         PR gdb/23095
9223         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9224         prepare_for_testing.  Set normal_bp to r_debug_state if target
9225         is bsd.
9226
9227 2018-04-21  Pedro Alves  <palves@redhat.com>
9228             Rajendra SY  <rajendra.sy@gmail.com>
9229
9230         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9231         * remote.c (extended_remote_attach): In all-stop mode, mark the
9232         thread as executing.
9233
9234 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9235
9236         * thread.c (thread_apply_all_command): Fix comment.
9237         (thread_command): Fix comment.
9238
9239 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
9240
9241         * common/tdesc.h (tdesc_create_feature): Remove xml filename
9242         parameter.
9243         * features/aarch64-core.c (create_feature_aarch64_core):
9244         Regenerate.
9245         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9246         Likewise.
9247         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9248         Likewise.
9249         * features/i386/32bit-avx512.c
9250         (create_feature_i386_32bit_avx512): Likewise.
9251         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9252         Likewise.
9253         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9254         Likewise.
9255         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9256         Likewise.
9257         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9258         Likewise.
9259         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9260         Likewise.
9261         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9262         Likewise.
9263         * features/i386/64bit-avx512.c
9264         (create_feature_i386_64bit_avx512): Likewise.
9265         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9266         Likewise.
9267         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9268         Likewise.
9269         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9270         Likewise.
9271         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9272         Likewise.
9273         * features/i386/64bit-segments.c
9274         (create_feature_i386_64bit_segments): Likewise.
9275         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9276         Likewise.
9277         * features/i386/x32-core.c
9278         (create_feature_i386_x32_core): Likewise.
9279         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9280         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9281         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9282         * target-descriptions.c: In generated code, don't pass xml
9283         filename.
9284
9285 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9286
9287         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9288         (print_xml_feature::visit_post): Likewise.
9289         (print_xml_feature::visit): Likewise.
9290         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9291         (print_xml_feature): Add new class.
9292         * regformats/regdat.sh: Null xmltarget on feature targets.
9293         * target-descriptions.c (struct target_desc): Add xmltarget.
9294         (maintenance_check_tdesc_xml_convert): Add unittest function.
9295         (tdesc_get_features_xml): Add function to get xml.
9296         (maintenance_check_xml_descriptions): Test xml generation.
9297         * xml-tdesc.c (string_read_description_xml): Add function.
9298         * xml-tdesc.h (string_read_description_xml): Add declaration.
9299
9300 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9301
9302         * features/Makefile: Add feature marker to targets with new style
9303         target descriptions.
9304         * regformats/aarch64.dat: Regenerate.
9305         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9306         * regformats/i386/amd64-avx-linux.dat: Likewise.
9307         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9308         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9309         * regformats/i386/amd64-linux.dat: Likewise.
9310         * regformats/i386/amd64-mpx-linux.dat: Likewise.
9311         * regformats/i386/amd64.dat: Likewise.
9312         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9313         * regformats/i386/i386-avx-linux.dat: Likewise.
9314         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9315         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9316         * regformats/i386/i386-linux.dat: Likewise.
9317         * regformats/i386/i386-mmx-linux.dat: Likewise.
9318         * regformats/i386/i386-mpx-linux.dat: Likewise.
9319         * regformats/i386/i386.dat: Likewise.
9320         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9321         * regformats/i386/x32-avx-linux.dat: Likewise.
9322         * regformats/i386/x32-linux.dat: Likewise.
9323         * regformats/tic6x-c62x-linux.dat: Likewise.
9324         * regformats/tic6x-c64x-linux.dat: Likewise.
9325         * regformats/tic6x-c64xp-linux.dat: Likewise.
9326         * regformats/regdat.sh: Parse feature marker.
9327
9328 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9329
9330         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9331         (tdesc_osabi_name): Likewise.
9332         * target-descriptions.c (tdesc_architecture_name): Add new
9333         function.
9334         (tdesc_osabi_name): Likewise.
9335
9336 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9337
9338         * common/tdesc.c (tdesc_predefined_type): Move to here.
9339         (tdesc_named_type): Likewise.
9340         (tdesc_create_vector): Likewise.
9341         (tdesc_create_struct): Likewise.
9342         (tdesc_set_struct_size): Likewise.
9343         (tdesc_create_union): Likewise.
9344         (tdesc_create_flags): Likewise.
9345         (tdesc_create_enum): Likewise.
9346         (tdesc_add_field): Likewise.
9347         (tdesc_add_typed_bitfield): Likewise.
9348         (tdesc_add_bitfield): Likewise.
9349         (tdesc_add_flag): Likewise.
9350         (tdesc_add_enum_value): Likewise.
9351         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9352         (struct tdesc_type_vector): Likewise.
9353         (struct tdesc_type_field): Likewise.
9354         (struct tdesc_type_with_fields): Likewise.
9355         (tdesc_create_enum): Add declaration.
9356         (tdesc_add_typed_bitfield): Likewise.
9357         (tdesc_add_enum_value): Likewise.
9358         * target-descriptions.c (tdesc_type_field): Move from here.
9359         (tdesc_type_builtin): Likewise.
9360         (tdesc_type_vector): Likewise.
9361         (tdesc_type_with_fields): Likewise.
9362         (tdesc_predefined_types): Likewise.
9363         (tdesc_named_type): Likewise.
9364         (tdesc_create_vector): Likewise.
9365         (tdesc_create_struct): Likewise.
9366         (tdesc_set_struct_size): Likewise.
9367         (tdesc_create_union): Likewise.
9368         (tdesc_create_flags): Likewise.
9369         (tdesc_create_enum): Likewise.
9370         (tdesc_add_field): Likewise.
9371         (tdesc_add_typed_bitfield): Likewise.
9372         (tdesc_add_bitfield): Likewise.
9373         (tdesc_add_flag): Likewise.
9374         (tdesc_add_enum_value): Likewise.
9375         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9376         (tdesc_add_typed_bitfield): Likewise.
9377         (tdesc_add_enum_value): Likewise.
9378
9379 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9380
9381         * common/tdesc.c (tdesc_feature::accept): Move to here.
9382         (tdesc_feature::operator==): Likewise.
9383         (tdesc_create_reg): Likewise.
9384         * common/tdesc.h (tdesc_type_kind): Likewise.
9385         (struct tdesc_type): Likewise.
9386         (struct tdesc_feature): Likewise.
9387         * regformats/regdat.sh: Create a feature.
9388         * target-descriptions.c (tdesc_type_kind): Move from here.
9389         (tdesc_type): Likewise.
9390         (tdesc_type_up): Likewise.
9391         (tdesc_feature): Likewise.
9392         (tdesc_create_reg): Likewise.
9393
9394 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9395
9396         * Makefile.in: Add arch/tdesc.c
9397         * common/tdesc.c: New file.
9398         * common/tdesc.h (tdesc_element_visitor): Move to here.
9399         (tdesc_element): Likewise.
9400         (tdesc_reg): Likewise.
9401         (tdesc_reg_up): Likewise.
9402         * regformats/regdef.h (reg): Add offset to constructors.
9403         * target-descriptions.c (tdesc_element_visitor): Move from here.
9404         (tdesc_element): Likewise.
9405         (tdesc_reg): Likewise.
9406         (tdesc_reg_up): Likewise.
9407
9408 2018-04-17  Tom Tromey  <tom@tromey.com>
9409
9410         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9411         discriminant field.
9412
9413 2018-04-17  Tom Tromey  <tom@tromey.com>
9414
9415         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9416
9417 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9418
9419         * symtab.c (print_symbol_info): Skip printing filename and line
9420         number when `last' is NULL.
9421         (symtab_symbol_info): Use empty string instead of NULL for first
9422         invocation of print_symbol_info.
9423         (rbreak_command): Pass NULL to `last' parameter of
9424         print_symbol_info.
9425
9426 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
9427
9428         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9429         instead of nullptr.
9430
9431 2018-04-16  Pedro Alves  <palves@redhat.com>
9432
9433         * MAINTAINERS (sh): Remove.
9434         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9435         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9436         (ALLDEPFILES): Remove sh64-tdep.c.
9437         * NEWS: Mentions that support for SH-5/SH64 is removed.
9438         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9439         (sh*-*-openbsd*): Ditto.
9440         (sh64-*-elf*): Remove.
9441         (sh*): Remove.
9442         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9443         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9444         * sh-tdep.c: No longer include "sh64-tdep.h".
9445         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9446         * sh64-tdep.c, sh64-tdep.h: Remove files.
9447
9448 2018-04-16  Pedro Alves  <palves@redhat.com>
9449
9450         * MAINTAINERS: Remove m88k.
9451         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9452         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9453         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9454         * NEWS: Mention that support for m88k was removed.
9455         * configure.host (m88*-*-*): Remove support.
9456         * configure.nat (m88k-*-*): Remove support.
9457         * configure.tgt (m88*-*-openbsd*): Remove.
9458         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9459
9460 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
9461
9462         * configure.tgt (x86_tobjs): New variable.
9463         (amd64_tobjs, i386_tobjs): Use it.
9464
9465 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9466
9467         * symtab.c (print_symbol_info): Precede the symbol definition by
9468         the line number when available.
9469         * NEWS: Advertise this enhancement.
9470
9471 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9472
9473         * NEWS (New options): announce set/show record btrace cpu.
9474         * btrace.c: Include record-btrace.h.
9475         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9476         the vendor is unknown.
9477         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
9478         Maybe overwrite the btrace configuration's cpu.
9479         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
9480         (btrace_fetch): Add cpu parameter.  Update callers.
9481         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9482         Maybe overwrite the btrace configuration's cpu.  Skip enabling
9483         errata workarounds if the vendor is unknown.
9484         * python/py-record-btrace.c: Include record-btrace.h.
9485         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9486         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9487         * record-btrace.c (record_btrace_cpu_state_kind): New.
9488         (record_btrace_cpu): New.
9489         (set_record_btrace_cpu_cmdlist): New.
9490         (record_btrace_get_cpu): New.
9491         (require_btrace_thread, record_btrace_info)
9492         (record_btrace_resume_thread): Call record_btrace_get_cpu.
9493         (cmd_set_record_btrace_cpu_none): New.
9494         (cmd_set_record_btrace_cpu_auto): New.
9495         (cmd_set_record_btrace_cpu): New.
9496         (cmd_show_record_btrace_cpu): New.
9497         (_initialize_record_btrace): Initialize set/show record btrace cpu
9498         commands.
9499         * record-btrace.h (record_btrace_get_cpu): New.
9500
9501 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9502
9503         * record.c (set_record_command): Fix typo in message.
9504
9505 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9506
9507         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9508
9509 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9510
9511         * infrun.c (process_event_stop_test): Call
9512         gdbarch_in_indirect_branch_thunk.
9513         * gdbarch.sh (in_indirect_branch_thunk): New.
9514         * gdbarch.c: Regenerated.
9515         * gdbarch.h: Regenerated.
9516         * x86-tdep.h: New.
9517         * x86-tdep.c: New.
9518         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9519         (HFILES_NO_SRCDIR): Add x86-tdep.h.
9520         (ALLDEPFILES): Add x86-tdep.c.
9521         * arch-utils.h (default_in_indirect_branch_thunk): New.
9522         * arch-utils.c (default_in_indirect_branch_thunk): New.
9523         * i386-tdep: Include x86-tdep.h.
9524         (i386_in_indirect_branch_thunk): New.
9525         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9526         function.
9527         * amd64-tdep: Include x86-tdep.h.
9528         (amd64_in_indirect_branch_thunk): New.
9529         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9530
9531 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9532
9533         PR gdb/23053
9534         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9535         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9536         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9537         regression.
9538
9539 2018-04-12  Tom Tromey  <tom@tromey.com>
9540
9541         * rust-lang.c (rust_print_struct_def): Remove univariant code.
9542         (rust_evaluate_subexp): Likewise.
9543
9544 2018-04-12  Pedro Alves  <palves@redhat.com>
9545
9546         * procfs.c (procfs_detach): Make forward declaration's prototype
9547         match definition's protototype.
9548         (proc_get_LDT_entry): Remove stale do_cleanups call.
9549
9550 2018-04-12  Pedro Alves  <palves@redhat.com>
9551
9552         * target.h (target_ops::to_has_exited): Delete.
9553         (target_has_exited): Delete.
9554         * target-delegates.c: Regenerate.
9555
9556 2018-04-11  Pedro Alves  <palves@redhat.com>
9557
9558         * target.c (fileio_fh_t::t): Add comment.
9559         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9560         (target_fileio_close): Handle a NULL target.
9561         (invalidate_fileio_fh): New.
9562         (target_close): Call it.
9563         * remote.c (remote_hostio_send_command): No longer check whether
9564         remote_desc is open.
9565
9566 2018-04-11  Pedro Alves  <palves@redhat.com>
9567
9568         * target.c (fileio_fh_t): Make it a named struct instead of a
9569         typedef.
9570         (fileio_fh_t::is_closed): New method.
9571         (DEF_VEC_O (fileio_fh_t)): Remove.
9572         (fileio_fhandles): Now a std::vector.
9573         (is_closed_fileio_fh): Delete.
9574         (acquire_fileio_fd): Adjust.  Rename parameters.
9575         (release_fileio_fd): Adjust.
9576         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9577         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9578         (target_fileio_close): Adjust.
9579
9580 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
9581
9582         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9583         index.
9584
9585 2018-04-10  Pedro Alves  <palves@redhat.com>
9586
9587         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9588         (scoped_finish_thread_state): New class.
9589         * infcmd.c (run_command_1): Use it instead of finish_thread_state
9590         cleanup.
9591         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9592         (fetch_inferior_event, normal_stop): Likewise.
9593         * thread.c (finish_thread_state_cleanup): Delete.
9594
9595 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9596             Pedro Alves  <palves@redhat.com>
9597
9598         * value.c: Include "selftest.h" and "common/array-view.h".
9599         (struct range) <operator ==>: New.
9600         (test_ranges_contain): New.
9601         (check_ranges_vector): New.
9602         (test_insert_into_bit_range_vector): New.
9603         (_initialize_values): Register selftests.
9604         * common/array-view.h (operator==, operator!=): New.
9605
9606 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9607
9608         * common/gdb_vecs.h (unordered_remove): Add overload that takes
9609         an iterator.
9610         * inline-frame.c: Include <algorithm>.
9611         (struct inline_state): Add constructor.
9612         (inline_state_s): Remove.
9613         (DEF_VEC_O(inline_state_s)): Remove.
9614         (inline_states): Change type to std::vector.
9615         (find_inline_frame_state): Adjust to std::vector.
9616         (allocate_inline_frame_state): Remove.
9617         (clear_inline_frame_state): Adjust to std::vector.
9618         (skip_inline_frames): Adjust to std::vector.
9619
9620 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9621
9622         * tracepoint.h (struct trace_state_variable): Add constructor.
9623         <name>: Change type to std::string.
9624         * tracepoint.c (tsv_s): Remove.
9625         (DEF_VEC_O(tsv_s)): Remove.
9626         (tvariables): Change to std::vector.
9627         (create_trace_state_variable): Adjust to std::vector.
9628         (find_trace_state_variable): Likewise.
9629         (find_trace_state_variable_by_number): Likewise.
9630         (delete_trace_state_variable): Likewise.
9631         (trace_variable_command): Adjust to std::string.
9632         (delete_trace_variable_command): Likewise.
9633         (tvariables_info_1): Adjust to std::vector.
9634         (save_trace_state_variables): Likewise.
9635         (start_tracing): Likewise.
9636         (merge_uploaded_trace_state_variables): Adjust to std::vector
9637         and std::string.
9638         * target.h (struct target_ops)
9639         <to_download_trace_state_variable>: Pass reference to
9640         trace_state_variable.
9641         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9642         * target-delegates.c: Re-generate.
9643         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9644         (mi_tsv_deleted): Likewise.
9645         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9646         * remote.c (remote_download_trace_state_variable): Change
9647         pointer to reference and adjust.
9648         * make-target-delegates (parse_argtypes): Handle references.
9649         (write_function_header): Likewise.
9650         (munge_type): Likewise.
9651
9652 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9653
9654         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9655         string_view-selftests.c.
9656         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9657         testsuite.
9658         * unittests/basic_string_view/cons/char/1.cc: Likewise.
9659         * unittests/basic_string_view/cons/char/2.cc: Likewise.
9660         * unittests/basic_string_view/cons/char/3.cc: Likewise.
9661         * unittests/basic_string_view/element_access/char/1.cc:
9662         Likewise.
9663         * unittests/basic_string_view/element_access/char/empty.cc:
9664         Likewise.
9665         * unittests/basic_string_view/element_access/char/front_back.cc:
9666         Likewise.
9667         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9668         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9669         Likewise.
9670         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9671         Likewise.
9672         * unittests/basic_string_view/modifiers/swap/char/1.cc:
9673         Likewise.
9674         * unittests/basic_string_view/operations/compare/char/1.cc:
9675         Likewise.
9676         * unittests/basic_string_view/operations/compare/char/13650.cc:
9677         Likewise.
9678         * unittests/basic_string_view/operations/copy/char/1.cc:
9679         Likewise.
9680         * unittests/basic_string_view/operations/data/char/1.cc:
9681         Likewise.
9682         * unittests/basic_string_view/operations/find/char/1.cc:
9683         Likewise.
9684         * unittests/basic_string_view/operations/find/char/2.cc:
9685         Likewise.
9686         * unittests/basic_string_view/operations/find/char/3.cc:
9687         Likewise.
9688         * unittests/basic_string_view/operations/find/char/4.cc:
9689         Likewise.
9690         * unittests/basic_string_view/operations/rfind/char/1.cc:
9691         Likewise.
9692         * unittests/basic_string_view/operations/rfind/char/2.cc:
9693         Likewise.
9694         * unittests/basic_string_view/operations/rfind/char/3.cc:
9695         Likewise.
9696         * unittests/basic_string_view/operations/substr/char/1.cc:
9697         Likewise.
9698         * unittests/basic_string_view/operators/char/2.cc: Likewise.
9699         * unittests/string_view-selftests.c: New file.
9700
9701 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9702
9703         * unittests/basic_string_view/capacity/1.cc: New file.
9704         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9705         * unittests/basic_string_view/cons/char/1.cc: New file.
9706         * unittests/basic_string_view/cons/char/2.cc: New file.
9707         * unittests/basic_string_view/cons/char/3.cc: New file.
9708         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9709         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9710         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9711         * unittests/basic_string_view/element_access/char/1.cc: New file.
9712         * unittests/basic_string_view/element_access/char/2.cc: New file.
9713         * unittests/basic_string_view/element_access/char/empty.cc: New file.
9714         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9715         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9716         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9717         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9718         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9719         * unittests/basic_string_view/include.cc: New file.
9720         * unittests/basic_string_view/inserters/char/1.cc: New file.
9721         * unittests/basic_string_view/inserters/char/2.cc: New file.
9722         * unittests/basic_string_view/inserters/char/3.cc: New file.
9723         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9724         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9725         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9726         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9727         * unittests/basic_string_view/literals/types.cc: New file.
9728         * unittests/basic_string_view/literals/values.cc: New file.
9729         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9730         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9731         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9732         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9733         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9734         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9735         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9736         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9737         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9738         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9739         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9740         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9741         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9742         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9743         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9744         * unittests/basic_string_view/operations/data/char/1.cc: New file.
9745         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9746         * unittests/basic_string_view/operations/find/char/1.cc: New file.
9747         * unittests/basic_string_view/operations/find/char/2.cc: New file.
9748         * unittests/basic_string_view/operations/find/char/3.cc: New file.
9749         * unittests/basic_string_view/operations/find/char/4.cc: New file.
9750         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9751         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9752         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9753         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9754         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9755         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9756         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9757         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9758         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9759         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9760         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9761         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9762         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9763         * unittests/basic_string_view/operators/char/2.cc: New file.
9764         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9765         * unittests/basic_string_view/range_access/char/1.cc: New file.
9766         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9767         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9768         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9769         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9770         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9771         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9772         * unittests/basic_string_view/requirements/typedefs.cc: New file.
9773         * unittests/basic_string_view/typedefs.cc: New file.
9774         * unittests/basic_string_view/types/1.cc: New file.
9775
9776 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9777
9778         * common/gdb_string_view.h: Remove libstdc++ implementation
9779         details, adjust to gdb reality.
9780         * common/gdb_string_view.tcc: Likewise.
9781         * cli/cli-script.c (struct string_view): Remove.
9782         (user_args) <m_args>: Change element type to gdb::string_view.
9783         (user_args::insert_args): Adjust.
9784
9785 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9786
9787         * common/gdb_string_view.h: New file.
9788         * common/gdb_string_view.tcc: New file.
9789
9790 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9791
9792         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9793         * configure: Re-generate.
9794
9795 2018-04-09  Pedro Alves  <palves@redhat.com>
9796
9797         * gdbarch.sh: Include "observable.h" instead of "observer.h".
9798         (set_target_gdbarch): Call
9799         gdb::observers::architecture_changed.notify instead of
9800         observer_notify_architecture_changed.
9801
9802 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9803
9804         * tracepoint.c (struct current_traceframe_cleanup): Remove.
9805         (do_restore_current_traceframe_cleanup): Remove.
9806         (restore_current_traceframe_cleanup_dtor): Remove.
9807         (make_cleanup_restore_current_traceframe): Remove.
9808         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9809         New.
9810         * tracepoint.h (struct scoped_restore_current_traceframe): New.
9811         * infrun.c (fetch_inferior_event): Use
9812         scoped_restore_current_traceframe.
9813
9814 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9815
9816         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9817         Remove.
9818         <n_allocated_type_units>: Remove.
9819         <all_type_units>: Change to std::vector.
9820         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9821         to std::vector change.
9822         (dwarf2_per_objfile::get_cutu): Likewise.
9823         (dwarf2_per_objfile::get_tu): Likewise.
9824         (create_signatured_type_table_from_index): Likewise.
9825         (create_signatured_type_table_from_debug_names): Likewise.
9826         (dw2_symtab_iter_next): Likewise.
9827         (dw2_print_stats): Likewise.
9828         (dw2_expand_all_symtabs): Likewise.
9829         (dw2_expand_marked_cus): Likewise.
9830         (dw2_debug_names_iterator::next): Likewise.
9831         (dwarf2_initialize_objfile): Likewise.
9832         (add_signatured_type_cu_to_table): Likewise.
9833         (create_all_type_units): Likewise.
9834         (add_type_unit): Likewise.
9835         (struct tu_abbrev_offset): Add constructor.
9836         (build_type_psymtabs_1): Adjust to std::vector change.
9837         (print_tu_stats): Likewise.
9838         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9839         (write_debug_names): Likewise.
9840
9841 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9842
9843         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9844         Make an std::vector.
9845         <n_comp_units>: Remove.
9846         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9847         to std::vector change.
9848         (dwarf2_per_objfile::get_cutu): Likewise.
9849         (dwarf2_per_objfile::get_cu): Likewise.
9850         (create_cus_from_index): Likewise.
9851         (create_addrmap_from_index): Likewise.
9852         (create_addrmap_from_aranges): Likewise.
9853         (dwarf2_read_index): Likewise.
9854         (dw2_find_last_source_symtab): Likewise.
9855         (dw2_map_symtabs_matching_filename): Likewise.
9856         (dw2_symtab_iter_next): Likewise.
9857         (dw2_print_stats): Likewise.
9858         (dw2_expand_all_symtabs): Likewise.
9859         (dw2_expand_symtabs_with_fullname): Likewise.
9860         (dw2_expand_marked_cus): Likewise.
9861         (dw2_map_symbol_filenames): Likewise.
9862         (create_cus_from_debug_names): Likewise.
9863         (dwarf2_read_debug_names): Likewise.
9864         (dw2_debug_names_iterator::next): Likewise.
9865         (dwarf2_initialize_objfile): Likewise.
9866         (set_partial_user): Likewise.
9867         (dwarf2_build_psymtabs_hard): Likewise.
9868         (read_comp_units_from_section): Remove arguments, adjust to
9869         std::vector change.
9870         (create_all_comp_units): Adjust to std::vector and
9871         read_comp_units_from_section changes.
9872         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9873         change.
9874         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9875         (psyms_seen_size): Likewise.
9876         (write_gdbindex): Likewise.
9877         (write_debug_names): Likewise.
9878
9879 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9880
9881         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9882         with dwarf2_per_objfile.
9883         (create_cus_from_index): Likewise.
9884         (create_signatured_type_table_from_index): Likewise.
9885         (dwarf2_read_index): Likewise.
9886         (dwarf2_initialize_objfile): Likewise.
9887         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9888         per_cu rather than get_dwarf2_per_objfile.
9889
9890 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9891
9892         * dwarf2read.h (struct signatured_type): Forward declare.
9893         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9894         New methods.
9895         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9896         (dw2_get_cutu): ...this.
9897         (dwarf2_per_objfile::get_cu): Rename from...
9898         (dw2_get_cu): ...this.
9899         (dwarf2_per_objfile::get_tu): New.
9900         (create_addrmap_from_index): Adjust.
9901         (create_addrmap_from_aranges): Adjust.
9902         (dw2_find_last_source_symtab): Adjust.
9903         (dw2_map_symtabs_matching_filename): Adjust.
9904         (dw2_symtab_iter_next): Adjust.
9905         (dw2_print_stats): Adjust.
9906         (dw2_expand_all_symtabs): Adjust.
9907         (dw2_expand_symtabs_with_fullname): Adjust.
9908         (dw2_expand_marked_cus): Adjust.
9909         (dw_expand_symtabs_matching_file_matcher): Adjust.
9910         (dw2_map_symbol_filenames): Adjust.
9911         (dw2_debug_names_iterator::next): Adjust.
9912         (dwarf2_initialize_objfile): Adjust.
9913         (set_partial_user): Adjust.
9914         (dwarf2_build_psymtabs_hard): Adjust.
9915
9916 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9917
9918         * dwarf2read.c (create_signatured_type_table_from_debug_names):
9919         Remove unused variables.
9920         (dw2_map_symtabs_matching_filename): Likewise.
9921         (dwarf2_record_block_ranges): Likewise.
9922         (dwarf2_read_addr_index): Likewise.
9923         (follow_die_offset): Likewise.
9924
9925 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9926
9927         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9928         to symbol_file_add_main.
9929
9930 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9931
9932         PR mi/22299
9933         * mi/mi-console.c (do_fputc_async_safe): New.
9934         (mi_console_file::write_async_safe): New.
9935         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9936         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9937         New.
9938         * ui-file.c (ui_file::putstrn): Adjust call to
9939         fputstrn_unfiltered.
9940         * utils.c (printchar): Replace do_fputs and do_fprintf
9941         parameters by do_fputc.
9942         (fputstr_filtered): Adjust call to printchar.
9943         (fputstr_unfiltered): Likewise.
9944         (fputstrn_filtered): Likewise.
9945         (fputstrn_unfiltered): Add do_fputc parameter, pass to
9946         printchar.
9947         * utils.h (do_fputc_ftype): New typedef.
9948         (fputstrn_unfiltered): Add do_fputc parameter.
9949
9950 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9951
9952         * regformats/i386/i386-avx.dat: Remove.
9953
9954 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9955
9956         PR gdb/22979
9957         * amd64-tdep.c (amd64_none_init_abi): New function.
9958         (amd64_x32_none_init_abi): New function.
9959         (_initialize_amd64_tdep): Register handlers for x86-64 and
9960         x64_32 with GDB_OSABI_NONE.
9961         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9962         GDB_OSABI_NONE osabi.
9963
9964 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9965
9966         PR gdb/22980
9967         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9968         GDB_OSABI_NONE.
9969         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9970         * osabi.c (gdb_osabi_names): Add "unknown" entry.
9971
9972 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
9973
9974         * common/byte-vector.h (char_vector): New type.
9975         * target.h (target_read_alloc): Return
9976         gdb::optional<byte_vector>.
9977         (target_read_stralloc): Return gdb::optional<char_vector>.
9978         (target_get_osdata): Return gdb::optional<char_vector>.
9979         * target.c (target_read_alloc_1): Templatize.  Replacement
9980         manual memory management with vector.
9981         (target_read_alloc): Change return type, adjust.
9982         (target_read_stralloc): Change return type, adjust.
9983         (target_get_osdata): Change return type, adjust.
9984         * auxv.c (struct auxv_info) <length>: Remove.
9985         <data>: Change type to gdb::optional<byte_vector>.
9986         (auxv_inferior_data_cleanup): Free auxv_info with delete.
9987         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9988         (target_auxv_search): Adjust.
9989         (fprint_target_auxv): Adjust.
9990         * avr-tdep.c (avr_io_reg_read_command): Adjust.
9991         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9992         (linux_make_corefile_notes): Adjust.
9993         * osdata.c (get_osdata): Adjust.
9994         * remote.c (remote_get_threads_with_qxfer): Adjust.
9995         (remote_memory_map): Adjust.
9996         (remote_traceframe_info): Adjust.
9997         (btrace_read_config): Adjust.
9998         (remote_read_btrace): Adjust.
9999         (remote_pid_to_exec_file): Adjust.
10000         * solib-aix.c (solib_aix_get_library_list): Adjust.
10001         * solib-dsbt.c (decode_loadmap): Don't free buf.
10002         (dsbt_get_initial_loadmaps): Adjust.
10003         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10004         * solib-target.c (solib_target_current_sos): Adjust.
10005         * tracepoint.c (sdata_make_value): Adjust.
10006         * xml-support.c (xinclude_start_include): Adjust.
10007         (xml_fetch_content_from_file): Adjust.
10008         * xml-support.h (xml_fetch_another): Change return type.
10009         (xml_fetch_content_from_file): Change return type.
10010         * xml-syscall.c (xml_init_syscalls_info): Adjust.
10011         * xml-tdesc.c (file_read_description_xml): Adjust.
10012         (fetch_available_features_from_target): Change return type.
10013         (target_fetch_description_xml): Adjust.
10014         (target_read_description_xml): Adjust.
10015
10016 2018-04-06  Tom Tromey  <tom@tromey.com>
10017
10018         * value.c (~value): Update.
10019         (struct value) <contents>: Now unique_xmalloc_ptr.
10020         (value_contents_bits_eq, allocate_value_contents)
10021         (value_contents_raw, value_contents_all_raw)
10022         (value_contents_for_printing, value_contents_for_printing_const)
10023         (set_value_enclosing_type): Update.
10024
10025 2018-04-06  Tom Tromey  <tom@tromey.com>
10026
10027         * value.c (range_s): Remove typedef, VEC.
10028         (struct range): Add operator<.
10029         (range_lessthan): Remove.
10030         (ranges_contain): Change type.
10031         (~value): Update.
10032         (struct value) <unavailable, optimized_out>: Now std::vector.
10033         (value_entirely_available)
10034         (value_entirely_covered_by_range_vector)
10035         (value_entirely_unavailable, value_entirely_optimized_out):
10036         Update.
10037         (insert_into_bit_range_vector): Change argument type.
10038         (find_first_range_overlap): Likewise.
10039         (struct ranges_and_idx, value_contents_bits_eq)
10040         (require_not_optimized_out, require_available): Update.
10041         (ranges_copy_adjusted): Change argument types.
10042         (value_optimized_out, value_copy, value_fetch_lazy): Update.
10043
10044 2018-04-06  Tom Tromey  <tom@tromey.com>
10045
10046         * value.c (~value): Update.
10047         (struct value) <parent>: Now a value_ref_ptr.
10048         (value_parent, set_value_parent, value_address, value_copy):
10049         Update.
10050
10051 2018-04-06  Tom Tromey  <tom@tromey.com>
10052
10053         * value.c (struct value): Add constructor, destructor, and member
10054         initializers.
10055         (allocate_value_lazy, value_decref): Update.
10056
10057 2018-04-06  Tom Tromey  <tom@tromey.com>
10058
10059         * value.c (struct value) <released, next>: Remove.
10060         (all_values): Now a std::vector.
10061         (allocate_value_lazy): Update.
10062         (value_next): Remove.
10063         (value_mark, value_free_to_mark, release_value)
10064         (value_release_to_mark): Update.
10065
10066 2018-04-06  Tom Tromey  <tom@tromey.com>
10067
10068         * value.h (fetch_subexp_value, value_release_to_mark): Update.
10069         (free_value_chain): Remove.
10070         * value.c (free_value_chain): Remove.
10071         (value_release_to_mark): Return a std::vector.
10072         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10073         std::vector.
10074         (check_condition): Update.
10075         * eval.c (fetch_subexp_value): Change "val_chain" to a
10076         std::vector.
10077         * breakpoint.c (update_watchpoint): Update.
10078         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10079
10080 2018-04-06  Tom Tromey  <tom@tromey.com>
10081
10082         * value.h (free_all_values): Remove.
10083         * value.c (free_all_values): Remove.
10084
10085 2018-04-06  Tom Tromey  <tom@tromey.com>
10086
10087         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10088         (value_history_chain, value_history_count): Remove.
10089         (value_history): New global.
10090         (record_latest_value, access_value_history, show_values)
10091         (preserve_values): Update.
10092
10093 2018-04-06  Tom Tromey  <tom@tromey.com>
10094
10095         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10096         * varobj.c (varobj_set_display_format, varobj_set_value)
10097         (install_default_visualizer, construct_visualizer)
10098         (install_new_value, ~varobj, varobj_get_value_type)
10099         (my_value_of_variable, varobj_editable_p): Update.
10100         * c-varobj.c (c_describe_child, c_value_of_variable)
10101         (cplus_number_of_children, cplus_describe_child): Update.
10102         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10103         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10104         (ada_value_of_variable, ada_value_is_changeable_p): Update.
10105
10106 2018-04-06  Tom Tromey  <tom@tromey.com>
10107
10108         * printcmd.c (last_examine_address): Change type to
10109         value_ref_ptr.
10110         (do_examine, x_command): Update.
10111
10112 2018-04-06  Tom Tromey  <tom@tromey.com>
10113
10114         * value.c (release_value): Update.
10115         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10116         (struct bpstats) <val>: Now a value_ref_ptr.
10117         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10118         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10119         (~watchpoint, print_it_watchpoint, watch_command_1)
10120         (invalidate_bp_value_on_memory_change): Update.
10121
10122 2018-04-06  Tom Tromey  <tom@tromey.com>
10123
10124         * varobj.c (varobj_clear_saved_item)
10125         (update_dynamic_varobj_children, install_new_value, ~varobj):
10126         Update.
10127         * value.h (value_incref): Move declaration earlier.
10128         (value_decref): Rename from value_free.
10129         (struct value_ref_policy): New.
10130         (value_ref_ptr): New typedef.
10131         (struct value_deleter): Remove.
10132         (gdb_value_up): Remove typedef.
10133         (release_value): Change return type.
10134         (release_value_or_incref): Remove.
10135         * value.c (set_value_parent): Update.
10136         (value_incref): Change return type.
10137         (value_decref): Rename from value_free.
10138         (value_free_to_mark, free_all_values, free_value_chain): Update.
10139         (release_value): Return value_ref_ptr.
10140         (release_value_or_incref): Remove.
10141         (record_latest_value, set_internalvar, clear_internalvar):
10142         Update.
10143         * stack.c (info_frame_command): Don't call value_free.
10144         * python/py-value.c (valpy_dealloc, valpy_new)
10145         (value_to_value_object): Update.
10146         * printcmd.c (do_examine): Update.
10147         * opencl-lang.c (lval_func_free_closure): Update.
10148         * mi/mi-main.c (register_changed_p): Don't call value_free.
10149         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10150         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10151         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10152         value_free.
10153         * guile/scm-value.c (vlscm_free_value_smob)
10154         (vlscm_scm_from_value): Update.
10155         * frame.c (frame_register_unwind, frame_unwind_register_signed)
10156         (frame_unwind_register_unsigned, get_frame_register_bytes)
10157         (put_frame_register_bytes): Don't call value_free.
10158         * findvar.c (address_from_register): Don't call value_free.
10159         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10160         * dwarf2loc.c (entry_data_value_free_closure)
10161         (value_of_dwarf_reg_entry, free_pieced_value_closure)
10162         (dwarf2_evaluate_loc_desc_full): Update.
10163         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10164         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10165         (~watchpoint, watch_command_1)
10166         (invalidate_bp_value_on_memory_change): Update.
10167         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10168
10169 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
10170
10171         PR gdb/23022
10172         * warning.m4: Add -Wno-error=deprecated-register.
10173         * configure: Re-generate.
10174
10175 2018-04-05  Tom Tromey  <tom@tromey.com>
10176
10177         * linespec.h: Remove include of "vec.h".
10178
10179 2018-04-05  Tom Tromey  <tom@tromey.com>
10180
10181         * linespec.c (typep): Remove typedef.
10182         (find_methods, find_superclass_methods): Take a std::vector.
10183         (find_method): Use std::vector.
10184
10185 2018-04-05  Tom Tromey  <tom@tromey.com>
10186
10187         * utils.c (compare_strings): Remove.
10188         * utils.h (compare_strings): Remove.
10189         * objc-lang.h (find_imps): Update.
10190         * objc-lang.c (find_methods): Take a std::vector.
10191         (uniquify_strings, find_imps): Likewise.
10192         * linespec.c (find_methods): Take a std::vector.
10193         (decode_objc): Use std::vector.
10194         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10195         a std::vector.
10196         (find_method, find_function_symbols): Use std::vector.
10197
10198 2018-04-05  Tom Tromey  <tom@tromey.com>
10199
10200         * completer.c (completion_tracker::completion_tracker): Remove
10201         cast.
10202         (completion_tracker::discard_completions): Likewise.
10203         * breakpoint.c (ambiguous_names_p): Remove cast.
10204         * ada-lang.c (_initialize_ada_language): Remove cast.
10205         * utils.h (streq): Update.
10206         (streq_hash): Add new declaration.
10207         * utils.c (streq): Return bool.
10208         (streq_hash): New function.
10209
10210 2018-04-05  Tom Tromey  <tom@tromey.com>
10211
10212         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10213         Remove a string copy.
10214
10215 2018-04-05  Tom Tromey  <tom@tromey.com>
10216
10217         * linespec.c (filter_results): Use std::vector.
10218         (decode_line_2, decode_line_full): Update.
10219
10220 2018-04-05  Tom Tromey  <tom@tromey.com>
10221
10222         * linespec.c (canonical_to_fullform): Return std::string.
10223         (filter_results): Update.
10224         (struct decode_line_2_item): Add constructor.
10225         <fullform, displayform>: Now std::string.
10226         (decode_line_2_compare_items): Now a std::sort comparator.
10227         (decode_line_2): Update.
10228
10229 2018-04-05  Tom Tromey  <tom@tromey.com>
10230
10231         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10232         (unexpected_linespec_error): Update.
10233         (linespec_parse_basic, parse_linespec): Update.
10234
10235 2018-04-05  Tom Tromey  <tom@tromey.com>
10236
10237         * linespec.c (linespec_parse_basic): Reindent.
10238
10239 2018-04-05  Tom Tromey  <tom@tromey.com>
10240
10241         * minsyms.h (iterate_over_minimal_symbols): Update.
10242         * minsyms.c (iterate_over_minimal_symbols): Take a
10243         gdb::function_view.
10244         * linespec.c (struct collect_minsyms): Remove.
10245         (compare_msyms): Now a std::sort comparator.
10246         (add_minsym): Add parameters.
10247         (search_minsyms_for_name): Update.  Use std::vector.
10248
10249 2018-04-03  Tom Tromey  <tom@tromey.com>
10250
10251         * mipsread.c (read_alphacoff_dynamic_symtab): Use
10252         gdb::byte_vector.
10253
10254 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10255
10256         * MAINTAINERS (Write After Approval): Add Weimin Pan.
10257
10258 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10259
10260         PR gdb/16959
10261         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
10262         printing static type.
10263
10264 2018-04-01  Tom Tromey  <tom@tromey.com>
10265
10266         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10267         (rs6000_xfer_shared_libraries): Update.
10268
10269 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
10270
10271         * common/gdb_vecs.h (char_ptr): Remove.
10272         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10273
10274 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10275
10276         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10277         with std::vector.
10278         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10279
10280 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10281
10282         * tracepoint.h (struct uploaded_tp): Initialize fields.
10283         <actions, step_actions, cmd_strings>: Change type to
10284         std::vector<char *>.
10285         * tracepoint.c (get_uploaded_tp): Allocate with new.
10286         (free_uploaded_tps): Free with delete.
10287         (parse_tracepoint_definition): Adjust to std::vector change.
10288         * breakpoint.c (read_uploaded_action): Likewise.
10289         (create_tracepoint_from_upload): Likewise.
10290         * ctf.c (ctf_write_uploaded_tp): Likewise.
10291         (SET_ARRAY_FIELD): Likewise.
10292         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10293
10294 2018-03-30  Tom Tromey  <tom@tromey.com>
10295
10296         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
10297         std::unique_ptr.
10298         (svr4_keep_data_in_core): Update.
10299         (svr4_read_so_list): Update.
10300
10301 2018-03-30  Tom Tromey  <tom@tromey.com>
10302
10303         * windows-nat.c (handle_output_debug_string, handle_exception):
10304         Update.
10305         * target.h (target_read_string): Update.
10306         * target.c (target_read_string): Change "string" to
10307         unique_xmalloc_ptr.
10308         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10309         Update.
10310         * solib-frv.c (frv_current_sos): Update.
10311         * solib-dsbt.c (dsbt_current_sos): Update.
10312         * solib-darwin.c (darwin_current_sos): Update.
10313         * linux-thread-db.c (inferior_has_bug): Update.
10314         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10315         Update.  Remove alloca.
10316         * ada-lang.c (ada_main_name): Update.
10317
10318 2018-03-30  Tom Tromey  <tom@tromey.com>
10319
10320         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10321         (struct dwo_file_deleter): New.
10322         (dwo_file_up): New typedef.
10323         (open_and_init_dwo_file): Use dwo_file_up.
10324         (free_dwo_file_cleanup): Remove.
10325
10326 2018-03-30  Tom Tromey  <tom@tromey.com>
10327
10328         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10329         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10330
10331 2018-03-30  Tom Tromey  <tom@tromey.com>
10332
10333         * dwarf2read.c (class free_cached_comp_units): New class.
10334         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10335         (free_cached_comp_units): Remove function.
10336
10337 2018-03-30  Tom Tromey  <tom@tromey.com>
10338
10339         * utils.h (make_cleanup_unpush_target): Remove.
10340         * inf-ptrace.c (struct target_unpusher): New.
10341         (target_unpush_up) New typedef.
10342         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10343         target_unpush_up.
10344         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10345
10346 2018-03-27  Tom Tromey  <tom@tromey.com>
10347
10348         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10349
10350 2018-03-27  Pedro Alves  <palves@redhat.com>
10351             Tom Tromey  <tom@tromey.com>
10352
10353         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10354         destructor.  Now a class.
10355         (gdb_readline_wrapper_cleanup): Remove function.
10356         (gdb_readline_wrapper): Remove cleanups.
10357
10358 2018-03-27  Tom Tromey  <tom@tromey.com>
10359
10360         * typeprint.h (struct type_print_options) <local_typedefs,
10361         global_typedefs>: Remove "struct" keyword.
10362         (class typedef_hash_table): New class.
10363         (recursively_update_typedef_hash, add_template_parameters)
10364         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10365         (find_typedef_in_hash): Don't declare.
10366         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10367         (typedef_hash_table::recursively_update): Rename from
10368         recursively_update_typedef_hash.  Now a member.
10369         (typedef_hash_table::add_template_parameters): Rename from
10370         add_template_parameters.  Now a member.
10371         (typedef_hash_table::typedef_hash_table): Now a constructor;
10372         rename from create_typedef_hash.
10373         (typedef_hash_table::~typedef_hash_table): Now a destructor;
10374         rename from free_typedef_hash.
10375         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10376         (do_free_global_table): Remove.
10377         (typedef_hash_table::typedef_hash_table): New constructor; renamed
10378         from copy_type_recursive.
10379         (create_global_typedef_table): Remove.
10380         (typedef_hash_table::find_global_typedef): Now a member of
10381         typedef_hash_table.
10382         (typedef_hash_table::find_typedef): Rename from
10383         find_typedef_in_hash; now a member.
10384         (whatis_exp): Update.
10385         * extension.h (struct ext_lang_type_printers): Add constructor and
10386         destructor.
10387         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10388         declare.
10389         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10390         Now a constructor; rename from start_ext_lang_type_printers.
10391         (ext_lang_type_printers): Now a destructor; rename from
10392         free_ext_lang_type_printers.
10393         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10394         Update.
10395         (c_type_print_base_struct_union): Update.  Remove cleanups.
10396
10397 2018-03-27  Tom Tromey  <tom@tromey.com>
10398
10399         * dwarf-index-write.c: Include <cmath>.
10400
10401 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10402
10403         * NEWS: Add entry describing new "set|show varsize-limit" command.
10404         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10405         command.
10406         * printcmd.c (_initialize_printcmd): Add "set var" alias of
10407         "set variable".
10408
10409 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
10410
10411         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10412         dwarf-index-write.c
10413         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10414         * dwarf-index-common.c: New file.
10415         * dwarf-index-common.h: New file.
10416         * dwarf-index-write.c: New file.
10417         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10418         (struct dwarf2_section_info): Move from here.
10419         (dwarf2_section_info_def): Likewise.
10420         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10421         (offset_type): Likewise.
10422         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10423         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10424         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10425         (byte_swap): Likewise.
10426         (MAYBE_SWAP): Likewise.
10427         (dwarf2_per_cu_ptr): Likewise.
10428         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10429         (struct tu_stats): Likewise.
10430         (struct dwarf2_per_objfile): Likewise.
10431         (struct dwarf2_per_cu_data): Likewise.
10432         (struct signatured_type): Likewise.
10433         (sig_type_ptr): Likewise.
10434         (DEF_VEC_P (sig_type_ptr)): Likewise.
10435         (INDEX4_SUFFIX): Likewise.
10436         (INDEX5_SUFFIX): Likewise.
10437         (DEBUG_STR_SUFFIX): Likewise.
10438         (dwarf2_read_section): Make non-static.
10439         (mapped_index_string_hash): Move from here.
10440         (dwarf5_djb_hash): Likewise.
10441         (file_write): Likewise.
10442         (class data_buf): Likewise.
10443         (struct symtab_index_entry): Likewise.
10444         (struct mapped_symtab): Likewise.
10445         (find_slot): Likewise.
10446         (hash_expand): Likewise.
10447         (add_index_entry): Likewise.
10448         (uniquify_cu_indices): Likewise.
10449         (class c_str_view): Likewise.
10450         (class c_str_view_hasher): Likewise.
10451         (class vector_hasher): Likewise.
10452         (write_hash_table): Likewise.
10453         (psym_index_map): Likewise.
10454         (struct addrmap_index_data): Likewise.
10455         (add_address_entry): Likewise.
10456         (add_address_entry_worker): Likewise.
10457         (write_address_map): Likewise.
10458         (symbol_kind): Likewise.
10459         (write_psymbols): Likewise.
10460         (struct signatured_type_index_data): Likewise.
10461         (write_one_signatured_type): Likewise.
10462         (recursively_count_psymbols): Likewise.
10463         (recursively_write_psymbols): Likewise.
10464         (class debug_names): Likewise.
10465         (check_dwarf64_offsets): Likewise.
10466         (psyms_seen_size): Likewise.
10467         (write_gdbindex): Likewise.
10468         (write_debug_names): Likewise.
10469         (assert_file_size): Likewise.
10470         (write_psymtabs_to_index): Likewise.
10471         (save_gdb_index_command): Likewise.
10472         (_initialize_dwarf2_read): Don't register the "save gdb-index"
10473         command.
10474         * dwarf2read.h: New file.
10475
10476 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10477
10478         PR gdb/22670
10479         * dwarf2read.c (dwarf2_physname): Do not return the demangled
10480         symbol name if the CU's language stores symbol names in linkage
10481         format.
10482         * language.h (struct language_defn)
10483         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
10484         all instances of this struct.
10485
10486 2018-03-26  Tom Tromey  <tom@tromey.com>
10487
10488         * stack.c (backtrace_command_1): Remove verbose code.
10489
10490 2018-03-26  Tom Tromey  <tom@tromey.com>
10491
10492         * python/py-framefilter.c (py_print_type): Don't catch
10493         exceptions.  Return void.
10494         (py_print_value): Likewise.
10495         (py_print_single_arg): Likewise.
10496         (enumerate_args): Don't catch exceptions.
10497         (py_print_args): Likewise.
10498         (py_print_frame): Likewise.
10499         (gdbpy_apply_frame_filter): Catch exceptions here.
10500
10501 2018-03-26  Tom Tromey  <tom@tromey.com>
10502
10503         * stack.c (_initialize_stack): Remove trailing newlines from help
10504         text.  Add "Usage" line to "backtrace" help.
10505
10506 2018-03-26  Tom Tromey  <tom@tromey.com>
10507
10508         PR python/16486:
10509         * python/py-framefilter.c (py_print_args): Call wrap_hint.
10510
10511 2018-03-26  Tom Tromey  <tom@tromey.com>
10512
10513         * python/py-framefilter.c (py_print_single_arg): Return
10514         EXT_LANG_BT_ERROR from catch.
10515
10516 2018-03-26  Tom Tromey  <tom@tromey.com>
10517
10518         PR backtrace/15584:
10519         * stack.c (backtrace_command_1): Move some code into no-filters
10520         "if".
10521
10522 2018-03-26  Tom Tromey  <tom@tromey.com>
10523
10524         * python/py-framefilter.c (throw_quit_or_print_exception): New
10525         function.
10526         (gdbpy_apply_frame_filter): Use it.
10527
10528 2018-03-26  Tom Tromey  <tom@tromey.com>
10529
10530         PR cli/17716:
10531         * python/py-framefilter.c (py_print_type, py_print_value)
10532         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10533         RETURN_MASK_ERROR.
10534
10535 2018-03-26  Tom Tromey  <tom@tromey.com>
10536
10537         * python/py-framefilter.c (enumerate_args): Use
10538         gdb::unique_xmalloc_ptr.
10539
10540 2018-03-26  Tom Tromey  <tom@tromey.com>
10541
10542         * python/py-framefilter.c (py_print_frame): Return
10543         EXT_LANG_BT_OK.
10544         (gdbpy_apply_frame_filter): Update comment.
10545         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10546         Remove.
10547         <EXT_LANG_BT_NO_FILTERS>: Change value.
10548
10549 2018-03-26  Tom Tromey  <tom@tromey.com>
10550
10551         PR backtrace/15582:
10552         * stack.c (backtrace_command): Parse "hide" argument.
10553         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10554         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10555         constant.
10556
10557 2018-03-26  Tom Tromey  <tom@tromey.com>
10558
10559         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10560         add "flags".
10561         (backtrace_command): Remove "fulltrace", add "flags".
10562
10563 2018-03-26  Tom Tromey  <tom@tromey.com>
10564
10565         * stack.c (backtrace_command): Rewrite command line parsing.
10566
10567 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10568
10569         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10570
10571 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10572
10573         * filename-seen-cache.h: Add include guard.
10574
10575 2018-03-26  Keith Seitz  <keiths@redhat.com>
10576
10577         * symfile.c (place_section): Remove "struct" from section_addr_info
10578         in comment.
10579         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10580         "struct" keyword from section_addr_info.
10581
10582 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
10583
10584         * regformats/regdef.h (reg): Add constructors.
10585
10586 2018-03-25  Pedro Alves  <palves@redhat.com>
10587
10588         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10589         if then/else bodies in var_func_name extraction.
10590
10591 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
10592
10593         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10594         lookup_minimal_symbol() to find symbol entry.
10595         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10596
10597 2018-03-23  Keith Seitz  <keiths@redhat.com>
10598
10599         PR c++/22968
10600         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10601         nested type definitions for C++, too.
10602
10603 2018-03-23  Tom Tromey  <tom@tromey.com>
10604
10605         * machoread.c (struct oso_el): Add a constructor.  Don't define as
10606         a typedef.
10607         (macho_register_oso): Remove.
10608         (macho_symtab_read): Take a std::vector.
10609         (oso_el_compare_name): Now a std::sort comparator.
10610         (macho_symfile_read_all_oso): Take a std::vector.
10611         (macho_symfile_read): Use std::vector.  Remove cleanups.
10612
10613 2018-03-22  Tom Tromey  <tom@tromey.com>
10614
10615         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10616         (record_full_goto_bookmark): Use std::string.
10617
10618 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10619
10620         PR tdep/18295
10621         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10622         a single mask.
10623
10624 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10625
10626         * rs6000-tdep.c (store_insn_p): New function.
10627         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10628         and cr_reg to their unshifted values. Use store_insn_p to
10629         match LR saves using either R1 or fdata->alloca_reg. Use
10630         store_insn_p to match CR saves. Set alloca_reg_offset
10631         when alloca_reg and framep are set. Remove lr_reg shift
10632         when assigning to fdata->lr_register.
10633
10634 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10635
10636         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10637         command line args instead of emitting a warning.
10638
10639 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10640
10641         * tracepoint.h (struct static_tracepoint_marker): Initialize
10642         fields, define default constructor, move constructor and move
10643         assignment, disable the rest.
10644         <str_id, extra>: Make std::string.
10645         (release_static_tracepoint_marker): Remove.
10646         (free_current_marker): Remove.
10647         * tracepoint.c (free_current_marker): Remove.
10648         (parse_static_tracepoint_marker_definition): Adjust to
10649         std::string, use new hex2str overload.
10650         (release_static_tracepoint_marker): Remove.
10651         (print_one_static_tracepoint_marker): Get marker by reference
10652         and adjust to std::string.
10653         (info_static_tracepoint_markers_command): Adjust to std::vector
10654         changes
10655         * target.h (static_tracepoint_marker_p): Remove typedef.
10656         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10657         (struct target_ops) <to_static_tracepoint_marker_at>: Return
10658         bool.
10659         <to_static_tracepoint_markers_by_strid>: Return std::vector.
10660         * target-debug.h
10661         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10662         (target_debug_print_std_vector_static_tracepoint_marker): New.
10663         (target_debug_print_struct_static_tracepoint_marker_p): Rename
10664         to...
10665         (target_debug_print_static_tracepoint_marker_p): ... this.
10666         * target-delegates.c: Re-generate.
10667         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10668         Make std::string.
10669         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10670         (decode_static_tracepoint_spec): Adjust to std::vector.
10671         (tracepoint_print_one_detail): Adjust to std::string.
10672         (strace_marker_decode_location): Adjust to std::string.
10673         (update_static_tracepoint): Adjust to std::string, remove call
10674         to release_static_tracepoint_marker.
10675         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10676         Adjust to std::vector.
10677         * remote.c (remote_static_tracepoint_marker_at): Return bool.
10678         (remote_static_tracepoint_markers_by_strid): Adjust to
10679         std::vector.
10680         * common/rsp-low.h (hex2str): New overload with explicit count
10681         of bytes.
10682         * common/rsp-low.c (hex2str): New overload with explicit count
10683         of bytes.
10684         * unittests/rsp-low-selftests.c (test_hex2str): New function.
10685         (_initialize_rsp_low_selftests): Add test_hex2str test.
10686         * unittests/tracepoint-selftests.c
10687         (test_parse_static_tracepoint_marker_definition): Adjust to
10688         std::string.
10689
10690 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10691
10692         * tracepoint.c (parse_static_tracepoint_marker_definition):
10693         Consider case where the definition is followed by more
10694         definitions.
10695         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10696         tracepoint-selftests.c.
10697         * unittests/tracepoint-selftests.c: New.
10698
10699 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10700
10701         * MAINTAINERS (Write After Approval): Add Pedro Franco de
10702         Carvalho.
10703
10704 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10705
10706         * symtab.c (find_pc_sect_line): fixed indentation.
10707
10708 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10709
10710         * symtab.c (find_pc_sect_line): now uses binary search.
10711
10712 2018-03-19  Tom Tromey  <tom@tromey.com>
10713
10714         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10715         "IDENT" production.
10716
10717 2018-03-19  Pedro Alves  <palves@redhat.com>
10718             Tom Tromey  <tom@tromey.com>
10719
10720         * unittests/observable-selftests.c: New file.
10721         * common/observable.h: New file.
10722         * observable.h: New file.
10723         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10724         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10725         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10726         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10727         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10728         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10729         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10730         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10731         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10732         python/py-breakpoint.c, python/py-finishbreakpoint.c,
10733         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10734         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10735         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10736         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10737         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10738         tui/tui-interp.c, valops.c: Update all users.
10739         * tui/tui-hooks.c (tui_bp_created_observer)
10740         (tui_bp_deleted_observer, tui_bp_modified_observer)
10741         (tui_inferior_exit_observer, tui_before_prompt_observer)
10742         (tui_normal_stop_observer, tui_register_changed_observer):
10743         Remove.
10744         (tui_observers_token): New global.
10745         (attach_or_detach, tui_attach_detach_observers): New functions.
10746         (tui_install_hooks, tui_remove_hooks): Use
10747         tui_attach_detach_observers.
10748         * record-btrace.c (record_btrace_thread_observer): Remove.
10749         (record_btrace_thread_observer_token): New global.
10750         * observer.sh: Remove.
10751         * observer.c: Rename to observable.c.
10752         * observable.c (namespace gdb_observers): Define new objects.
10753         (observer_debug): Move into gdb_observers namespace.
10754         (struct observer, struct observer_list, xalloc_observer_list_node)
10755         (xfree_observer_list_node, generic_observer_attach)
10756         (generic_observer_detach, generic_observer_notify): Remove.
10757         (_initialize_observer): Update.
10758         Don't include observer.inc.
10759         * Makefile.in (generated_files): Remove observer.h, observer.inc.
10760         (clean mostlyclean): Likewise.
10761         (observer.h, observer.inc): Remove targets.
10762         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10763         (COMMON_SFILES): Use observable.c, not observer.c.
10764         * .gitignore: Remove observer.h.
10765
10766 2018-03-18  Tom Tromey  <tom@tromey.com>
10767
10768         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10769         gdb::def_vector.
10770         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10771
10772 2018-03-17  Tom Tromey  <tom@tromey.com>
10773
10774         * auto-load.c (auto_load_objfile_script_1): Use std::string.
10775
10776 2018-03-17  Tom Tromey  <tom@tromey.com>
10777
10778         * target.c (class scoped_target_fd): New.
10779         (target_fileio_close_cleanup): Remove.
10780         (target_fileio_read_alloc_1): Use scoped_target_fd.
10781
10782 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
10783
10784         * silent-rules.mk: New.
10785         * Makefile.in: Include silent-rules.mk
10786         (srcdir, VPATH, top_srcdir): Move up.
10787         (COMPILE): Add ECHO_CXX.
10788         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10789         (init.c): Add ECHO_INIT_C.
10790         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10791         (version.c): Add ECHO_GEN.
10792         (printcmd.o): Add ECHO_CXX.
10793         (target-float.o): Add ECHO_CXX.
10794         (ada-exp.o): Add ECHO_CXX.
10795         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10796         (insight$(EXEEXT)): Add ECHO_CXXLD.
10797         * gnulib/configure.ac: Add AM_SILENT_RULES.
10798         * gnulib/aclocal.m4: Re-generate.
10799         * gnulib/configure: Re-generate.
10800         * gnulib/import/Makefile.in: Re-generate.
10801
10802 2018-03-16  Tom Tromey  <tom@tromey.com>
10803
10804         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10805         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10806         * utils.c (do_free_section_addr_info)
10807         (make_cleanup_free_section_addr_info): Remove.
10808         * symfile.h (struct other_sections): Add constructor.
10809         (struct section_addr_info): Remove.
10810         (section_addr_info): New typedef.
10811         (struct sym_fns) <sym_offsets>: Change type of parameter.
10812         (build_section_addr_info_from_objfile)
10813         (relative_addr_info_to_section_offsets, addr_info_make_relative)
10814         (default_symfile_offsets, symbol_file_add)
10815         (symbol_file_add_from_bfd)
10816         (build_section_addr_info_from_section_table): Update.
10817         (alloc_section_addr_info, free_section_addr_info): Don't declare.
10818         * symfile.c (alloc_section_addr_info): Remove.
10819         (build_section_addr_info_from_section_table): Change return type.
10820         Update.
10821         (build_section_addr_info_from_bfd)
10822         (build_section_addr_info_from_objfile): Likewise.
10823         (free_section_addr_info): Remove.
10824         (relative_addr_info_to_section_offsets): Change type of "addrs".
10825         (addrs_section_compar): Now a std::sort comparator.
10826         (addrs_section_sort): Change return type.
10827         (addr_info_make_relative): Change type of "addrs".  Update.
10828         (default_symfile_offsets, syms_from_objfile_1)
10829         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10830         (symbol_file_add_separate): Update.
10831         (symbol_file_add): Change type of "addrs".  Update.
10832         (add_symbol_file_command): Update.  Remove cleanups.
10833         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
10834         cleanups.
10835         * symfile-debug.c (debug_sym_offsets): Change type of "info".
10836         * solib.c (solib_read_symbols): Update.
10837         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
10838         * machoread.c (macho_symfile_offsets): Update.
10839         * jit.c (jit_bfd_try_read_symtab): Update.
10840
10841 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
10842
10843         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10844         unittests/utils-selftests.c.
10845         * unittests/utils-selftests.c: New file.
10846
10847 2018-03-14  Tom Tromey  <tom@tromey.com>
10848
10849         PR cli/14977:
10850         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10851         for NULL.
10852
10853 2018-03-14  Tom Tromey  <tom@tromey.com>
10854
10855         PR cli/19918:
10856         * printcmd.c (printf_pointer): Allow "-" in format.
10857
10858 2018-03-14  Tom Tromey  <tom@tromey.com>
10859
10860         * printcmd.c (_initialize_printcmd): Add usage to printf.
10861
10862 2018-03-14  Yao Qi  <qiyao@sourceware.org>
10863
10864         * MAINTAINERS: Update my email address.
10865
10866 2018-03-13  Tom Tromey  <tom@tromey.com>
10867
10868         * machoread.c (macho_check_dsym): Change filenamep to a
10869         std::string*.
10870         (macho_symfile_read): Update.
10871         * symfile.c (load_command): Use std::string.
10872
10873 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10874
10875         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10876         to error message string.
10877         (riscv_register_name): Use xsnprintf instead of sprintf.
10878         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10879         internal_error.
10880         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10881         error.
10882         (riscv_push_dummy_call): Likewise.
10883
10884 2018-03-12  Tom Tromey  <tom@tromey.com>
10885
10886         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10887         Use gdb::byte_vector.
10888         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10889
10890 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10891
10892         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10893         parameter type to readable_regcache.
10894         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10895         the declaration.
10896
10897 2018-03-11  Tom Tromey  <tom@tromey.com>
10898
10899         * dwarf2read.c (struct nextfield): Add initializers.
10900         (struct nextfnfield): Remove.
10901         (struct fnfieldlist): Add initializers.  Remove "length" and
10902         "head", use std::vector.
10903         (struct decl_field_list): Remove.
10904         (struct field_info): Add initializers.
10905         <fields, baseclasses>: Now std::vector.
10906         <nbaseclasses, nfnfields, typedef_field_list_count,
10907         nested_types_list_count>: Remove.
10908         (dwarf2_add_field, dwarf2_add_type_defn)
10909         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10910         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10911         (process_structure_scope): Update.
10912
10913 2018-03-11  Tom Tromey  <tom@tromey.com>
10914
10915         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10916         for use by std::sort.
10917         (build_type_psymtabs_1): Use std::vector.
10918
10919 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
10920
10921         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10922         and LIBMPFR in the printed configuration.
10923
10924 2018-03-08  Tom Tromey  <tom@tromey.com>
10925
10926         * source.c (get_filename_and_charpos): Use scoped_fd.
10927         * nto-procfs.c (procfs_open_1): Use scoped_fd.
10928         (procfs_pidlist): Likewise.
10929         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10930         (iterate_over_mappings): Likewise.
10931
10932 2018-03-08  Tom Tromey  <tom@tromey.com>
10933
10934         * infcall.c (struct call_return_meta_info)
10935         <stack_temporaries_enabled>: Remove.
10936         (get_call_return_value, call_function_by_hand_dummy): Update.
10937         * thread.c (disable_thread_stack_temporaries): Remove.
10938         (enable_thread_stack_temporaries): Remove.
10939         (thread_stack_temporaries_enabled_p): Return bool.
10940         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10941         (get_last_thread_stack_temporary): Update.
10942         * eval.c (evaluate_subexp): Update.
10943         * gdbthread.h (class enable_thread_stack_temporaries): Now a
10944         class, not a function.
10945         (value_ptr, value_vec): Remove typedefs.
10946         (class thread_info) <stack_temporaries_enabled>: Now bool.
10947         <stack_temporaries>: Now a std::vector.
10948         (thread_stack_temporaries_enabled_p)
10949         (value_in_thread_stack_temporaries): Return bool.
10950
10951 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
10952
10953         * remote.c (putpkt_binary): Fix omitted bytes reporting.
10954         (getpkt_or_notif_sane_1): Likewise.
10955
10956 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10957
10958         * build-id.c (build_id_to_debug_bfd): Use std::string.
10959
10960 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10961
10962         * build-id.c (find_separate_debug_file_by_buildid): Return
10963         std::string.
10964         * build-id.h (find_separate_debug_file_by_buildid): Return
10965         std::string.
10966         * coffread.c (coff_symfile_read): Adjust to std::string.
10967         * elfread.c (elf_symfile_read): Adjust to std::string.
10968         * symfile.c (separate_debug_file_exists): Change parameter to
10969         std::string.
10970         (find_separate_debug_file): Return std::string.
10971         (find_separate_debug_file_by_debuglink): Return std::string.
10972         * symfile.h (find_separate_debug_file_by_debuglink): Return
10973         std::string.
10974
10975 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
10976
10977         * common/xml-utils.c (xml_escape_text): Move code to...
10978         (xml_escape_text_append): ... this new function.
10979         * common/xml-utils.h (xml_escape_text_append): New declaration.
10980         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10981         New function.
10982         (_initialize_xml_utils): register test_xml_escape_text_append as
10983         a selftest.
10984
10985 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
10986
10987         * defs.h: Remove MAX_REGISTER_SIZE.
10988         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10989         asserts.
10990         * python/py-unwind.c (pyuw_sniffer): Likewise.
10991
10992 2018-03-07  Tom Tromey  <tom@tromey.com>
10993
10994         * linux-tdep.c (linux_info_proc): Update.
10995         * target.h (struct target_ops) <to_fileio_readlink>: Return
10996         optional<string>.
10997         (target_fileio_readlink): Return optional<string>.
10998         * remote.c (remote_hostio_readlink): Return optional<string>.
10999         * inf-child.c (inf_child_fileio_readlink): Return
11000         optional<string>.
11001         * target.c (target_fileio_readlink): Return optional<string>.
11002
11003 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
11004
11005         * regcache.c (cooked_read_test): Add riscv to the list of
11006         architectures that have a save_reggroup.
11007
11008 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11009
11010         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11011         value is not a dynamic class object.
11012
11013 2018-03-06  Tom Tromey  <tom@tromey.com>
11014
11015         * rust-exp.y: Formatting fixes.
11016
11017 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11018
11019         * riscv-tdep.c (riscv_register_name): Remove target description
11020         support.
11021         (riscv_gdbarch_init): Remove target description check.
11022
11023 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11024
11025         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11026         comment.
11027         * riscv-tdep.h: Likewise.
11028
11029 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11030
11031         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11032         (riscv_pseudo_register_write): Delete.
11033         (riscv_gdbarch_init): Remove all use of pseudo registers.
11034
11035 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11036
11037         * record-btrace.c (btrace_print_lines): Replace cleanup
11038         parameter with RAII equivalents.
11039         (btrace_insn_history): Replace cleanup with RAII equivalents.
11040         * ui-out.h (make_cleanup_ui_out_list_begin_end,
11041         make_cleanup_ui_out_tuple_begin_end): Remove.
11042         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11043         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11044         make_cleanup_ui_out_list_begin_end): Remove.
11045
11046 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11047
11048         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11049         parameter types to std::vector.  Use bool.
11050         (record_btrace_wait): Replace VEC(tp_t) with
11051         std::vector<thread_info *>.
11052         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11053
11054 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11055
11056         * record-btrace.c (record_btrace_disable_callback): Remove.
11057         (struct scoped_btrace_disable): New.
11058         (record_btrace_open): Use scoped_btrace_disable.
11059
11060 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11061
11062         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11063         reading values from registers.
11064
11065 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11066
11067         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11068         where appropriate.
11069
11070 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11071
11072         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11073         change parameter type.  Use GDB's print functions, and use
11074         core_addr_to_string where appropriate.
11075         (riscv_push_dummy_call): Use core_addr_to_string where
11076         appropriate, update call to riscv_print_arg_location, and reindent
11077         a few lines.
11078         (riscv_return_value): Update call to riscv_print_arg_location.
11079
11080 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11081             Tim Newsome <tim@sifive.com>
11082             Albert Ou <a0u@eecs.berkeley.edu>
11083             Darius Rad <darius@bluespec.com>
11084
11085         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11086         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11087         (ALLDEPFILES): Add riscv-tdep.c
11088         * configure.tgt: Add riscv support.
11089         * riscv-tdep.c: New file.
11090         * riscv-tdep.h: New file.
11091         * NEWS: Mention new target.
11092         * MAINTAINERS: Add entry for riscv.
11093
11094 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11095
11096         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11097         fields within aggregates.
11098
11099 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
11100
11101         * record-btrace.c (btrace_print_lines): Change type of flags to
11102         gdb_disassembly_flags.
11103
11104 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11105
11106         * fbsd-nat.c: Include "inf-ptrace.h".
11107         (USE_SIGTRAP_SIGINFO): Conditionally define.
11108         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11109         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11110         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11111         function.
11112         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11113         Likewise.
11114         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11115         Likewise.
11116         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11117         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11118         "supports_stopped_by_hw_breakpoint" target methods.
11119
11120 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11121
11122         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11123         * fbsd-nat.c (debug_fbsd_nat): New variable.
11124         (show_fbsd_nat_debug): New function.
11125         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11126         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11127
11128 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11129
11130         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11131         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11132         prototype.
11133         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11134         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11135         method.
11136
11137 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11138
11139         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11140         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11141
11142 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11143
11144         * charset.c (struct charset_vector): New.
11145         (charsets): Change type to charset_vector.
11146         (find_charset_names): Adjust.
11147         (add_one): Adjust.
11148         (_initialize_charset): Adjust.
11149
11150 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11151
11152         * progspace.h (struct program_space) <deleted_solibs>: Change
11153         type to std::vector<std::string>.
11154         * progspace.c (clear_program_space_solib_cache): Adjust.
11155         * breakpoint.c (print_solib_event): Adjust.
11156         (check_status_catch_solib): Adjust.
11157         * solib.c (update_solib_list): Adjust.
11158         * ui-out.h (class ui_out) <field_string>: New overload.
11159         * ui-out.c (ui_out::field_string): New overload.
11160
11161 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11162
11163         * progspace.h (struct program_space): Add constructor and
11164         destructor, initialize fields.
11165         (add_program_space): Remove.
11166         * progspace.c (add_program_space): Rename to...
11167         (program_space::program_space): ... this.
11168         (release_program_space): Rename to...
11169         (program_space::~program_space): ... this.
11170         (delete_program_space): Use delete to delete program_space.
11171         (initialize_progspace): Use new to allocate program_space.
11172         * inferior.c (add_inferior_with_spaces): Likewise.
11173         (clone_inferior_command): Likewise.
11174         * infrun.c (follow_fork_inferior): Likewise.
11175         (handle_vfork_child_exec_or_exit): Likewise.
11176
11177 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11178
11179         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11180         (delim_string_to_char_ptr_vec): Return std::vector of
11181         gdb::unique_xmalloc_ptr.
11182         (dirnames_to_char_ptr_vec_append): Take std::vector of
11183         gdb::unique_xmalloc_ptr.
11184         (dirnames_to_char_ptr_vec): Return std::vector of
11185         gdb::unique_xmalloc_ptr.
11186         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11187         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11188         (delim_string_to_char_ptr_vec): Return an std::vector of
11189         gdb::unique_xmalloc_ptr, adjust the code.
11190         (dirnames_to_char_ptr_vec_append): Take an std::vector of
11191         gdb::unique_xmalloc_ptr, adjust the code.
11192         (dirnames_to_char_ptr_vec): Return an std::vector of
11193         gdb::unique_xmalloc_ptr, adjust the code.
11194         * auto-load.c (auto_load_safe_path_vec): Change type to
11195         std::vector of gdb::unique_xmalloc_ptr.
11196         (auto_load_expand_dir_vars): Return an std::vector of
11197         gdb::unique_xmalloc_ptr, adjust the code.
11198         (auto_load_safe_path_vec_update): Adjust.
11199         (filename_is_in_auto_load_safe_path_vec): Adjust.
11200         (auto_load_objfile_script_1): Adjust.
11201         * build-id.c (build_id_to_debug_bfd): Adjust.
11202         * linux-thread-db.c (thread_db_load_search): Adjust.
11203         * source.c (add_path): Adjust.
11204         (openp): Adjust.
11205         * symfile.c (find_separate_debug_file): Adjust.
11206         * utils.c (do_free_char_ptr_vec): Remove.
11207         (make_cleanup_free_char_ptr_vec): Remove.
11208
11209 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
11210
11211         PR gdb/22907
11212         * common/pathstuff.c: Conditionally include "<windows.h>".
11213
11214 2018-03-01  Georg Sauthoff  <mail@georg.so>
11215
11216         PR gdb/22888
11217         * gcore.in: Quote variables and switch interpreter to bash.
11218
11219 2018-03-01  Tom Tromey  <tom@tromey.com>
11220
11221         * dwarf2read.c (alloc_discriminant_info): Fix default_index
11222         assertion.  Add assertion for discriminant_index.
11223         (quirk_rust_enum): Use correct base type name in univariant case.
11224
11225 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
11226
11227         * record.c (get_call_history_modifiers): Return a
11228         record_print_flags.
11229         (cmd_record_call_history): Adjust.
11230         * record-btrace.c (record_btrace_call_history): Adjust.
11231         (record_btrace_call_history_range): Adjust.
11232         (record_btrace_call_history_from): Adjust.
11233         * target-debug.h (target_debug_print_record_print_flags): New.
11234         * target-delegates.c: Re-generate.
11235         * target.c (target_call_history): Change flags type.
11236         (target_call_history_from): Likewise.
11237         (target_call_history_range): Likewise.
11238         * target.h (struct target_ops) <target_call_history>: Likewise.
11239         (target_call_history_from): Likewise.
11240         (target_call_history_range): Likewise.
11241
11242 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11243             Simon Marchi  <simon.marchi@polymtl.ca>
11244
11245         * common/common-utils.c: Include "sys/stat.h".
11246         (is_regular_file): Move here from "source.c"; change return
11247         type to "bool".
11248         * common/common-utils.h (is_regular_file): New prototype.
11249         * common/pathstuff.c (contains_dir_separator): New function.
11250         * common/pathstuff.h (contains_dir_separator): New prototype.
11251         * source.c: Don't include "sys/stat.h".
11252         (is_regular_file): Move to "common/common-utils.c".
11253
11254 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11255
11256         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11257         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11258         * auto-load.c: Include "common/pathstuff.h".
11259         * common/common-def.h (current_directory): Move here.
11260         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11261         function.
11262         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11263         prototype.
11264         * common/pathstuff.c: New file.
11265         * common/pathstuff.h: New file.
11266         * compile/compile.c: Include "common/pathstuff.h".
11267         * defs.h (current_directory): Move to "common/common-defs.h".
11268         * dwarf2read.c: Include "common/pathstuff.h".
11269         * exec.c: Likewise.
11270         * guile/scm-safe-call.c: Likewise.
11271         * linux-thread-db.c: Likewise.
11272         * main.c: Likewise.
11273         * nto-tdep.c: Likewise.
11274         * objfiles.c: Likewise.
11275         * source.c: Likewise.
11276         * symtab.c: Likewise.
11277         * utils.c: Include "common/pathstuff.h".
11278         (gdb_realpath): Move to "common/pathstuff.c".
11279         (gdb_realpath_keepfile): Likewise.
11280         (gdb_abspath): Likewise.
11281         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11282         (gdb_realpath_keepfile): Likewise.
11283         (gdb_abspath): Likewise.
11284
11285 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
11286
11287         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11288         wildcard process pid for super_resume for kernels with a
11289         specific bug.
11290
11291 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
11292
11293         * compile/compile.c (get_args): Add additional comments
11294         explaining function.
11295
11296 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
11297             Tom Tromey  <tom@tromey.com>
11298
11299         * target.h (memory_write_request_s): Remove typedef.  Don't define
11300         VEC.
11301         (target_write_memory_blocks): Change argument to std::vector.
11302         (struct memory_write_request): Add constructor.
11303         * target-memory.c (compare_block_starting_address): Return bool.
11304         Change argument types.
11305         (claim_memory): Change arguments to use std::vector.
11306         (split_regular_and_flash_blocks, blocks_to_erase)
11307         (compute_garbled_blocks): Likewise.
11308         (cleanup_request_data, cleanup_write_requests_vector): Remove.
11309         (target_write_memory_blocks): Change argument to std::vector.
11310         * symfile.c (struct load_section_data): Add constructor and
11311         destructor.  Use std::vector for "requests".
11312         (struct load_progress_data): Add initializers.
11313         (load_section_callback): Update.  Use "new".
11314         (clear_memory_write_data): Remove.
11315         (generic_load): Update.
11316
11317 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
11318
11319         * arch/aarch64.h: Use common/tdesc.h.
11320
11321 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11322
11323         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11324         architecture with a 64-bit ABI.
11325
11326 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11327
11328         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11329         ahead of target description loading.
11330
11331 2018-02-26  Tom Tromey  <tom@tromey.com>
11332
11333         * stack.c (backtrace_command_1): Update.
11334         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11335         of "flags".
11336         * python/py-framefilter.c (py_print_frame)
11337         (gdbpy_apply_frame_filter): Change type of "flags".
11338         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11339         of "flags".
11340         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11341         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11342         * extension.h (enum frame_filter_flag): Rename from
11343         frame_filter_flags.
11344         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11345         (apply_ext_lang_frame_filter): Change type of "flags".
11346         * extension.c (apply_ext_lang_frame_filter): Change type of
11347         "flags".
11348         * extension-priv.h (struct extension_language_ops)
11349         <apply_frame_filter>: Change type of "flags".
11350
11351 2018-02-26  Tom Tromey  <tom@tromey.com>
11352
11353         PR python/16497:
11354         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11355         off-by-one in py_end computation.
11356         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11357         PRINT_MORE_FRAMES.
11358         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11359         constant.
11360
11361 2018-02-26  Tom Tromey  <tom@tromey.com>
11362
11363         * dwarf2read.c (struct variant_field): New.
11364         (struct nextfield) <variant>: New field.
11365         (dwarf2_add_field): Handle DW_TAG_variant_part.
11366         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11367         discriminated union.
11368         (read_structure_type): Handle DW_TAG_variant_part.
11369         (handle_struct_member_die): New function, extracted from
11370         process_structure_scope.  Handle DW_TAG_variant.
11371         (process_structure_scope): Handle discriminated unions.  Call
11372         handle_struct_member_die.
11373
11374 2018-02-26  Tom Tromey  <tom@tromey.com>
11375
11376         * rust-lang.h (rust_last_path_segment): Declare.
11377         * rust-lang.c (rust_last_path_segment): Now public.  Change
11378         contract.
11379         (struct disr_info): Remove.
11380         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11381         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11382         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11383         (rust_enum_p, rust_enum_variant): New function.
11384         (rust_underscore_fields): Remove "offset" parameter.
11385         (rust_print_enum): New function.
11386         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11387         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11388         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
11389         enums.
11390         (rust_internal_print_type): New function, from rust_print_type.
11391         Remove enum code.
11392         (rust_print_type): Call rust_internal_print_type.
11393         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11394         Update enum handling.
11395         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11396         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11397         (rust_union_quirks): New functions.
11398         (process_full_comp_unit, process_full_type_unit): Call
11399         rust_union_quirks.
11400         (process_structure_scope): Update rust_unions if necessary.
11401
11402 2018-02-26  Tom Tromey  <tom@tromey.com>
11403
11404         * value.h (value_union_variant): Declare.
11405         * valops.c (value_union_variant): New function.
11406         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11407         (struct discriminant_info): New.
11408         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11409         enumerator.
11410         (struct main_type) <flag_discriminated_union>: New field.
11411
11412 2018-02-26  Tom Tromey  <tom@tromey.com>
11413
11414         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11415         unittests/unpack-selftests.c.
11416         * unittests/unpack-selftests.c: New file.
11417         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11418
11419 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11420
11421         * dwarf2read.c (struct partial_die_info) <read>: New method.
11422         (read_partial_die): Remove the declaration.
11423         (load_partial_dies): Update.
11424         (partial_die_info::partial_die_info):
11425         (read_partial_die): Change it to partial_die_info::read.
11426
11427 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11428
11429         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11430         (fixup_partial_die): Remove declaration.
11431         (scan_partial_symbols): Update.
11432         (partial_die_parent_scope): Likewise.
11433         (partial_die_full_name): Likewise.
11434         (fixup_partial_die): Change it to partial_die_info::fixup.
11435
11436 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11437
11438         * dwarf2read.c (read_partial_die): Update the declaration.
11439         (load_partial_dies): Caller update.
11440         (read_partial_die): Remove one argument abbrev_len.
11441
11442 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11443
11444         * dwarf2read.c (struct partial_die_info): Add ctor, delete
11445         assignment operator.
11446         (load_partial_dies): Use ctor and copy ctor.
11447         (read_partial_die): Update.
11448         (dwarf2_cu::find_partial_die): Use ctor.
11449
11450 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11451
11452         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11453         (find_partial_die_in_comp_unit): Change it to
11454         dwarf2_cu::find_partial_die.
11455         (find_partial_die): Update.
11456
11457 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11458
11459         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11460         is NULL.
11461
11462 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11463
11464         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11465
11466 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
11467
11468         * arch/amd64.h: Use common/tdesc.h.
11469         * arch/i386.c: Likewise.
11470         * arch/i386.h: Likewise.
11471         * arch/tic6x.c: Likewise.
11472         * arch/tdesc.h: Move file from here...
11473         * common/tdesc.h: ...to here.
11474         * features/aarch64-core.c: Regenerate.
11475         * features/aarch64-fpu.c: Regenerate.
11476         * features/i386/32bit-avx.c: Regenerate.
11477         * features/i386/32bit-avx512.c: Regenerate.
11478         * features/i386/32bit-core.c: Regenerate.
11479         * features/i386/32bit-linux.c: Regenerate.
11480         * features/i386/32bit-mpx.c: Regenerate.
11481         * features/i386/32bit-pkeys.c: Regenerate.
11482         * features/i386/32bit-sse.c: Regenerate.
11483         * features/i386/64bit-avx.c: Regenerate.
11484         * features/i386/64bit-avx512.c: Regenerate.
11485         * features/i386/64bit-core.c: Regenerate.
11486         * features/i386/64bit-linux.c: Regenerate.
11487         * features/i386/64bit-mpx.c: Regenerate.
11488         * features/i386/64bit-pkeys.c: Regenerate.
11489         * features/i386/64bit-segments.c: Regenerate.
11490         * features/i386/64bit-sse.c: Regenerate.
11491         * features/i386/x32-core.c: Regenerate.
11492         * features/tic6x-c6xp.c: Regenerate.
11493         * features/tic6x-core.c: Regenerate.
11494         * features/tic6x-gp.c: Regenerate.
11495         * target-descriptions.c: Use common/tdesc.h.
11496         * target-descriptions.h: Likewise.
11497
11498 2018-02-24  Tom Tromey  <tom@tromey.com>
11499
11500         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11501         (try_thread_db_load_from_dir, thread_db_load_search): Use
11502         std::string.
11503         (info_auto_load_libthread_db_compare): Return bool.  Change
11504         argument types.
11505         (info_auto_load_libthread_db): Use std::vector, std::string.
11506         Remove cleanups.
11507
11508 2018-02-24  Tom Tromey  <tom@tromey.com>
11509
11510         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11511         std::string.
11512         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11513         std::string*.
11514         * gdbarch.c: Rebuild.
11515         * gdbarch.h: Rebuild.
11516         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11517         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11518         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11519         std::string*.
11520
11521 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
11522
11523         * gdbtypes.h (sect_offset): Change type to uint64_t.
11524         (sect_offset_str): New function.
11525         * dwarf2read.c (create_addrmap_from_aranges): Use
11526         sect_offset_str.
11527         (error_check_comp_unit_head): Likewise.
11528         (create_debug_type_hash_table): Likewise.
11529         (read_cutu_die_from_dwo): Likewise.
11530         (init_cutu_and_read_dies): Likewise.
11531         (init_cutu_and_read_dies_no_follow): Likewise.
11532         (process_psymtab_comp_unit_reader): Likewise.
11533         (partial_die_parent_scope): Likewise.
11534         (peek_die_abbrev): Likewise.
11535         (process_queue): Likewise.
11536         (dwarf2_physname): Likewise.
11537         (read_namespace_alias): Likewise.
11538         (read_import_statement): Likewise.
11539         (create_dwo_cu_reader): Likewise.
11540         (create_cus_hash_table): Likewise.
11541         (lookup_dwo_cutu): Likewise.
11542         (inherit_abstract_dies): Likewise.
11543         (read_func_scope): Likewise.
11544         (read_call_site_scope): Likewise.
11545         (dwarf2_add_member_fn): Likewise.
11546         (read_common_block): Likewise.
11547         (read_module_type): Likewise.
11548         (read_typedef): Likewise.
11549         (read_subrange_type): Likewise.
11550         (load_partial_dies): Likewise.
11551         (read_partial_die): Likewise.
11552         (find_partial_die): Likewise.
11553         (read_str_index): Likewise.
11554         (dwarf2_string_attr): Likewise.
11555         (build_error_marker_type): Likewise.
11556         (lookup_die_type): Likewise.
11557         (dump_die_shallow): Likewise.
11558         (follow_die_ref): Likewise.
11559         (dwarf2_fetch_die_loc_sect_off): Likewise.
11560         (dwarf2_fetch_constant_bytes): Likewise.
11561         (follow_die_sig): Likewise.
11562         (get_signatured_type): Likewise.
11563         (get_DW_AT_signature_type): Likewise.
11564         (dwarf2_find_containing_comp_unit): Likewise.
11565         (set_die_type): Likewise.
11566
11567 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
11568
11569         * arch/aarch64.c: Include "common-defs.h".
11570         * arch/amd64.c: Likewise.
11571         * arch/i386.c: Likewise.
11572
11573 2018-02-21  Tom Tromey  <tom@tromey.com>
11574
11575         * value.h: (extract_field_op): Update.
11576         * eval.c (extract_field_op): Return a const char *.
11577         * expression.h (parse_expression_for_completion): Update.
11578         * completer.c (complete_expression): Update.
11579         (add_struct_fields): Make fieldname const.
11580         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11581         (mark_completion_tag, parse_exp_in_context_1): Update.
11582         (parse_expression_for_completion): Change "name" to
11583         unique_xmalloc_ptr*.
11584
11585 2018-02-21  Tom Tromey  <tom@tromey.com>
11586
11587         * infcall.c (call_function_by_hand_dummy): Use std::vector.
11588
11589 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11590
11591         * avr-tdep.c (avr_read_pc): Change parameter type to
11592         readable_regcache.
11593         * gdbarch.sh (read_pc): Likewise.
11594         * gdbarch.c: Re-generated.
11595         * gdbarch.h: Re-generated.
11596         * hppa-tdep.c (hppa_read_pc): Change parameter type to
11597         readable_regcache.
11598         * ia64-tdep.c (ia64_read_pc): Likewise.
11599         * mips-tdep.c (mips_read_pc): Likewise.
11600         * spu-tdep.c (spu_read_pc): Likewise.
11601
11602 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11603
11604         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11605         * regcache-dump.c: New file.
11606         * regcache.c: Move register_dump to regcache-dump.c.
11607         (maintenance_print_registers): Likewise.
11608         (maintenance_print_raw_registers): Likewise.
11609         (maintenance_print_cooked_registers): Likewise.
11610         (maintenance_print_register_groups): Likewise.
11611         (maintenance_print_remote_registers): Likewise.
11612         (_initialize_regcache): Likewise.
11613         * regcache.h (register_dump): Moved from regcache.c.
11614
11615 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11616
11617         * regcache.c (regcache::regcache): Update.
11618         (regcache::invalidate): Move it to detached_regcache::invalidate.
11619         (get_thread_arch_aspace_regcache): Update.
11620         (regcache::raw_update): Update.
11621         (regcache::cooked_read): Remove some code.
11622         (regcache::cooked_read_value): Likewise.
11623         (regcache::raw_write): Remove assert on m_readonly_p.
11624         (regcache::raw_supply_integer): Move it to
11625         detached_regcache::raw_supply_integer.
11626         (regcache::raw_supply_zeroed): Likewise.
11627         * regcache.h (detached_regcache) <raw_supply_integer>: New
11628         declaration.
11629         <raw_supply_zeroed, invalidate>: Likewise.
11630         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11631         <invalidate>: Likewise.
11632         <m_readonly_p>: Removed.
11633
11634 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11635
11636         * infcmd.c (get_return_value): Let stop_regs point to
11637         get_current_regcache.
11638         * regcache.c (regcache::regcache): Remove.
11639         (register_dump_reg_buffer): New class.
11640         (regcache_print): Adjust.
11641         * regcache.h (regcache): Remove constructors.
11642
11643 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11644
11645         * regcache.c (class register_dump): New class.
11646         (register_dump_regcache, register_dump_none): New class.
11647         (register_dump_remote, register_dump_groups): New class.
11648         (regcache_print): Update.
11649         * regcache.h (regcache_dump_what): Move it to regcache.c.
11650         (regcache) <dump>: Remove.
11651
11652 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11653
11654         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11655          reg_buffer_rw *.
11656         (jit_unwind_reg_set_impl): Call raw_supply.
11657         (jit_frame_sniffer): Use reg_buffer_rw.
11658         * record-full.c (record_full_core_regbuf): Change its type.
11659         (record_full_core_open_1): Use reg_buffer_rw.
11660         (record_full_close): Likewise.
11661         (record_full_core_fetch_registers): Use regcache->raw_supply.
11662         (record_full_core_store_registers): Likewise.
11663         * regcache.c (regcache::get_register_status): Move it to
11664         reg_buffer.
11665         (regcache_raw_set_cached_value): Remove.
11666         (regcache::raw_set_cached_value): Remove.
11667         (regcache::raw_write): Call raw_supply.
11668         (regcache::raw_supply): Move it to reg_buffer_rw.
11669         * regcache.h (regcache_raw_set_cached_value): Remove.
11670         (reg_buffer_rw): New class.
11671
11672 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11673
11674         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11675         readonly_detached_regcache.
11676         (dummy_frame_prev_register): Use regcache->cooked_read.
11677         * frame.c (frame_save_as_regcache): Change return type.
11678         (frame_pop): Update.
11679         * frame.h (frame_save_as_regcache): Update declaration.
11680         * inferior.h (get_infcall_suspend_state_regcache): Update
11681         declaration.
11682         * infrun.c (infcall_suspend_state) <registers>: use
11683         readonly_detached_regcache.
11684         (save_infcall_suspend_state): Don't use regcache_dup.
11685         (get_infcall_suspend_state_regcache): Change return type.
11686         * linux-fork.c (struct fork_info) <savedregs>: Change to
11687         readonly_detached_regcache.
11688         <pc>: New field.
11689         (fork_save_infrun_state): Don't use regcache_dup.
11690         (info_checkpoints_command): Adjust.
11691         * mi/mi-main.c (register_changed_p): Update declaration.
11692         (mi_cmd_data_list_changed_registers): Use
11693         readonly_detached_regcache.
11694         (register_changed_p): Change parameter type to
11695         readonly_detached_regcache.
11696         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11697         readonly_detached_regcache.
11698         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11699         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11700         New.
11701         (regcache::save): Move it to reg_buffer.
11702         (regcache::restore): Change parameter type.
11703         (regcache_dup): Remove.
11704         * regcache.h (reg_buffer) <save>: New method.
11705         (readonly_detached_regcache): New class.
11706         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11707         readonly_detached_regcache.
11708         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11709
11710 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11711
11712         * frame.c (frame_save_as_regcache): Use regcache method save.
11713         (frame_pop): Use regcache method restore.
11714         * infrun.c (restore_infcall_suspend_state): Likewise.
11715         * linux-fork.c (fork_load_infrun_state): Likewise.
11716         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11717         save.
11718         * regcache.c (regcache_save): Remove.
11719         (regcache::restore): More asserts.
11720         (regcache_cpy): Remove.
11721         * regcache.h (regcache_save): Remove the declaration.
11722         (regcache::restore): Move from private to public.
11723         Remove the friend declaration of regcache_cpy.
11724         (regcache_cpy): Remove declaration.
11725
11726 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11727
11728         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11729         parameter type to 'readable_regcache *'.
11730         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11731         * arm-tdep.c (arm_neon_quad_read): Likewise.
11732         (arm_pseudo_read): Likewise.
11733         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11734         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11735         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11736         * gdbarch.c: Re-generated.
11737         * gdbarch.h: Re-generated.
11738         * gdbarch.sh (pseudo_register_read): Change parameter type to
11739         'readable_regcache *'.
11740         (pseudo_register_read_value): Likewise.
11741         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11742         (h8300_pseudo_register_read): Likewise.
11743         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11744         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11745         (i386_pseudo_register_read_into_value): Likewise.
11746         (i386_pseudo_register_read_value): Likewise.
11747         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11748         declaration.
11749         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11750         * m32c-tdep.c (m32c_raw_read): Likewise.
11751         (m32c_read_flg): Likewise.
11752         (m32c_banked_register): Likewise.
11753         (m32c_banked_read): Likewise.
11754         (m32c_sb_read): Likewise.
11755         (m32c_part_read): Likewise.
11756         (m32c_cat_read): Likewise.
11757         (m32c_r3r2r1r0_read): Likewise.
11758         (m32c_pseudo_register_read): Likewise.
11759         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11760         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11761         (mep_pseudo_cr64_read): Likewise.
11762         (mep_pseudo_register_read): Likewise.
11763         * mips-tdep.c (mips_pseudo_register_read): Likewise.
11764         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11765         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11766         * regcache.c (regcache::raw_read): Move it to readable_regcache.
11767         (regcache::cooked_read): Likewise.
11768         (regcache::cooked_read_value): Likewise.
11769         (regcache_cooked_read_signed):
11770         (regcache::cooked_read): Likewise.
11771         * regcache.h (readable_regcache): New class.
11772         (regcache): Inherit readable_regcache.  Move some methods to
11773         readable_regcache.
11774         * rl78-tdep.c (rl78_pseudo_register_read): Change
11775         parameter type to 'readable_regcache *'.
11776         * rs6000-tdep.c (do_regcache_raw_read): Remove.
11777         (e500_pseudo_register_read): Change parameter type to
11778         'readable_regcache *'.
11779         (dfp_pseudo_register_read): Likewise.
11780         (vsx_pseudo_register_read): Likewise.
11781         (efpr_pseudo_register_read): Likewise.
11782         * s390-tdep.c (s390_pseudo_register_read): Likewise.
11783         * sh-tdep.c (sh_pseudo_register_read): Likewise.
11784         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11785         (sh64_pseudo_register_read): Likewise.
11786         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11787         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11788         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11789         (spu_pseudo_register_read): Likewise.
11790         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11791         (xtensa_pseudo_register_read): Likewise.
11792
11793 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11794
11795         * regcache.c (regcache::regcache): Call reg_buffer ctor.
11796         (regcache::arch): Move it to reg_buffer::arch.
11797         (regcache::register_buffer): Likewise.
11798         (regcache::assert_regnum): Likewise.
11799         (regcache::num_raw_registers): Likewise.
11800         * regcache.h (reg_buffer): New class.
11801         (regcache): Inherit reg_buffer.
11802
11803 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
11804
11805         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11806         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11807
11808 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
11809
11810         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11811
11812 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
11813
11814         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11815         (SFILES): Remove common/*.c files.
11816         (COMMON_OBS): Remove some *.o files built from common/*.c files.
11817         * common/common.host: Add common reference.
11818         * configure.ac: Likewise.
11819         * configure: Regenerate.
11820
11821 2018-02-16  Yao Qi  <yao.qi@linaro.org>
11822
11823         * block.c (block_namespace_info): Inherit allocate_on_obstack.
11824         (block_initialize_namespace): Use new.
11825         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11826         (dwarf2_free_objfile): Use delete.
11827         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11828         (copy_type_recursive): Use new.
11829         * gdb_obstack.h (allocate_on_obstack): New.
11830
11831 2018-02-15  Yao Qi  <yao.qi@linaro.org>
11832
11833         PR gdb/22849
11834         * inferior.c (exit_inferior_1): Reset inf->control.
11835
11836 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
11837
11838         * ada-lang.c (ada_to_fixed_value_create): Delete advance
11839         declaration.
11840
11841 2018-02-14  Pedro Alves  <palves@redhat.com>
11842
11843         * frame-unwind.c (frame_unwind_try_unwinder): Always call
11844         frame_cleanup_after_sniffer on exception.
11845
11846 2018-02-14  Tom Tromey  <tom@tromey.com>
11847
11848         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11849         const.
11850         (solib_bfd_open): Make pathname const.
11851         * solib.c (solib_bfd_open): Make pathname const.
11852         * solib-spu.c (spu_bfd_fopen): Make name const.
11853         (spu_bfd_open): Make pathname const.
11854         * solib-darwin.c (darwin_bfd_open): Make pathname const.
11855         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11856
11857 2018-02-14  Tom Tromey  <tom@tromey.com>
11858
11859         * symfile.c (symfile_bfd_open): Update.
11860         * source.h (openp, source_full_path_of, find_and_open_source):
11861         Change argument type to unique_xmalloc_ptr.
11862         * source.c (openp): Take a unique_xmalloc_ptr.
11863         (source_full_path_of, find_and_open_source): Likewise.
11864         (open_source_file, symtab_to_fullname): Update.
11865         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11866         unique_xmalloc_ptr.
11867         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11868         (exec_file_find): Update.
11869         * psymtab.c (psymtab_to_fullname): Update.
11870         * nto-tdep.h (nto_find_and_open_solib): Update.
11871         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11872         unique_xmalloc_ptr.
11873         * exec.c (exec_file_attach): Update.
11874         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11875         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11876
11877 2018-02-14  Tom Tromey  <tom@tromey.com>
11878
11879         * solib.c: Include source.h.
11880         * nto-tdep.c: Include source.h.
11881         * mi/mi-cmd-env.c: Include source.h.
11882         * infcmd.c: Include source.h.
11883         * exec.c: Include source.h.
11884         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11885         (add_path, directory_switch, source_path, init_source_path): Move
11886         declarations...
11887         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11888         (add_path, directory_switch, source_path, init_source_path):
11889         ...here.
11890
11891 2018-02-14  Tom Tromey  <tom@tromey.com>
11892
11893         * solist.h (exec_file_find, solib_find): Return
11894         unique_xmalloc_ptr.
11895         (solib_bfd_fopen): Take a const char *.
11896         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11897         (exec_file_find, solib_find): Likewise.
11898         (solib_bfd_fopen): Do not take ownership of "pathname".
11899         (solib_bfd_open): Use unique_xmalloc_ptr.
11900         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11901         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11902         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11903         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11904
11905 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
11906
11907         * ada-lang.c (name_match_type_from_name): Remove reference to
11908         ada_name_for_lookup in function's documentation.
11909         * ada-lang.h (ada_name_for_lookup): Delete declaration.
11910
11911 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11912
11913         * defs.h (enum openp_flags): New enum.
11914         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11915         Move to enum openp_flags.
11916         (openp_flags): New enum flags.
11917         (openp): Change parameter type to openp_flags.
11918         * source.c (openp): Change parameter type to openp_flags.
11919         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11920         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11921
11922 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
11923
11924         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11925         per-command.
11926
11927 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11928
11929         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11930         into...
11931         (class dwarf2_queue_guard): ...the destructor of this new class.
11932         (dw2_do_instantiate_symtab): Create instance of the new class
11933         dwarf2_queue_guard, remove cleanup.
11934
11935 2018-02-09  Tom Tromey  <tom@tromey.com>
11936
11937         * source.c (find_source_lines): Don't reference past the end of
11938         the vector.
11939
11940 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11941
11942         * remote.c (remote_btrace_maybe_reopen): Change error message.
11943         * btrace.c (btrace_enable): Likewise.
11944         (parse_xml_btrace): Likewise.
11945         (parse_xml_btrace_conf): Likewise.
11946
11947 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11948
11949         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11950         (linux_enable_pt, linux_enable_bts): Call
11951         diagnose_perf_event_open_fail.
11952
11953 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11954
11955         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11956         Remove parameter and change return type.  Update callers.  Move it.
11957         (linux_enable_bts, linux_enable_pt): Improve error message.
11958         (linux_enable_pt): Remove zero buffer size check.
11959         (linux_enable_btrace): Improve error messages.  Remove NULL return
11960         check.
11961
11962 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11963
11964         * btrace.c (btrace_enable): Remove target_supports_btrace call.
11965         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11966         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11967         (linux_supports_pt, linux_supports_btrace): Remove.
11968         (linux_enable_bts): Call cpu_supports_bts.
11969         * nat/linux-btrace.h (linux_supports_btrace): Remove.
11970         * remote.c (remote_supports_btrace): Remove.
11971         (init_remote_ops): Remove remote_supports_btrace.
11972         * target-delegates.c: Regenerated.
11973         * target.c (target_supports_btrace): Remove.
11974         * target.h (target_ops) <to_supports_btrace>: Remove
11975         (target_supports_btrace): Remove.
11976         * x86-linux-nat.c (x86_linux_create_target): Remove
11977         linux_supports_btrace.
11978
11979 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11980
11981         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11982         btrace failed.
11983         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11984         exception and use message in own exception.
11985
11986 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11987
11988         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11989         (perf_event_pt_event_type): Use gdb_file_up.
11990         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11991         scoped_fd, and scoped_mmap.
11992
11993 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11994
11995         * common/scoped_mmap.h: New.
11996         * unittests/scoped_mmap-selftest.c: New.
11997         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11998         unittests/scoped_mmap-selftest.c.
11999
12000 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12001
12002         * common/scoped_fd.h: New.
12003         * unittests/scoped_fd-selftest.c: New.
12004         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12005         unittests/scoped_fd-selftest.c.
12006
12007 2018-02-09  Tom Tromey  <tom@tromey.com>
12008
12009         * auto-load.c (auto_load_section_scripts): Use
12010         gdb::unique_xmalloc_ptr.
12011
12012 2018-02-09  Tom Tromey  <tom@tromey.com>
12013
12014         * auto-load.c (execute_script_contents): Use std::string.
12015
12016 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
12017
12018         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12019         Python function, rather than a new command.
12020
12021 2018-02-08  Tom Tromey  <tom@tromey.com>
12022
12023         * solib.c (solib_find_1): Use std::string.
12024         (solib_bfd_fopen): Use unique_xmalloc_ptr.
12025
12026 2018-02-08  Tom Tromey  <tom@tromey.com>
12027
12028         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12029
12030 2018-02-08  Tom Tromey  <tom@tromey.com>
12031
12032         * source.c (find_source_lines): Use gdb::def_vector.
12033
12034 2018-02-08  Tom Tromey  <tom@tromey.com>
12035
12036         * macrocmd.c (struct temporary_macro_definition): New.
12037         (macro_define_command): Use temporary_macro_definition.  Remove
12038         cleanups.
12039         (free_macro_definition_ptr): Remove.
12040
12041 2018-02-08  Tom Tromey  <tom@tromey.com>
12042
12043         * macroexp.c (maybe_expand): Use std::string.
12044
12045 2018-02-08  Tom Tromey  <tom@tromey.com>
12046
12047         * macroexp.c (struct macro_buffer): Add initializers for some
12048         members.
12049         (init_buffer, init_shared_buffer, free_buffer)
12050         (free_buffer_return_text): Remove.
12051         (macro_buffer): New constructors.
12052         (~macro_buffer): New destructor.
12053         (macro_buffer::set_shared): New method.
12054         (macro_buffer::resize_buffer, macro_buffer::appendc)
12055         (macro_buffer::appendmem): Now methods, not free functions.
12056         (set_token, append_tokens_without_splicing, stringify)
12057         (macro_stringify): Update.
12058         (gather_arguments): Change return type.  Remove argc_p argument,
12059         add args_ptr argument.  Use std::vector.
12060         (substitute_args): Remove argc argument.  Accept std::vector.
12061         (expand): Update.  Use std::vector.
12062         (scan, macro_expand, macro_expand_next): Update.
12063
12064 2018-02-08  Tom Tromey  <tom@tromey.com>
12065
12066         * symtab.c (default_collect_symbol_completion_matches_break_on):
12067         Use unique_xmalloc_ptr.
12068         * macroscope.h: (sal_macro_scope, user_macro_scope)
12069         (default_macro_scope): Return unique_xmalloc_ptr.
12070         * macroscope.c (sal_macro_scope, user_macro_scope)
12071         (default_macro_scope): Return unique_xmalloc_ptr.
12072         * macroexp.h (macro_expand, macro_expand_once): Return
12073         unique_xmalloc_ptr.
12074         * macroexp.c (macro_expand, macro_expand_once): Return
12075         unique_xmalloc_ptr.
12076         * macrocmd.c (macro_expand_command, macro_expand_once_command)
12077         (info_macro_command, info_macros_command): Use
12078         unique_xmalloc_ptr.
12079         * compile/compile-c-support.c (write_macro_definitions): Use
12080         unique_xmalloc_ptr.
12081         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12082
12083 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
12084
12085         * value.c (value_static_field): Assign field type instead of
12086         containing type when returning an optimized out value.
12087
12088 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12089
12090         * ft32-tdep.c (ft32_read_pc): Remove.
12091         (ft32_write_pc): Remove.
12092         (ft32_gdbarch_init): Update.
12093         * m32r-tdep.c (m32r_read_pc): Remove.
12094         (m32r_gdbarch_init): Update.
12095         * mep-tdep.c (mep_read_pc): Remove.
12096         (mep_gdbarch_init): Update.
12097         * microblaze-tdep.c (microblaze_write_pc): Remove.
12098         (microblaze_gdbarch_init): Update.
12099         * mn10300-tdep.c (mn10300_read_pc): Remove.
12100         (mn10300_write_pc): Remove.
12101         (mn10300_gdbarch_init): Update.
12102         * moxie-tdep.c (moxie_read_pc): Remove.
12103         (moxie_write_pc): Remove.
12104         (moxie_gdbarch_init): Update.
12105
12106 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12107
12108         * expprint.c (print_subexp_standard): Handle
12109         OP_F77_UNDETERMINED_ARGLIST.
12110         (dump_subexp_body_standard): Likewise.
12111
12112 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
12113
12114         * target-descriptions.c (tdesc_element_visitor) Add empty
12115         implementations.
12116         (tdesc_type): Move make_gdb_type from here.
12117         (tdesc_type_builtin): Likewise.
12118         (tdesc_type_vector): Likewise.
12119         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12120         (make_gdb_type_struct): Move from tdesc_type_with_fields.
12121         (make_gdb_type_union): Likewise.
12122         (make_gdb_type_flags): Likewise.
12123         (make_gdb_type_enum): Likewise.
12124         (make_gdb_type): New function.
12125         (tdesc_register_type): Use static make_gdb_type.
12126
12127 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
12128
12129         * infcmd.c (default_print_one_register_info): Align natural-format
12130         column values consistently one under another.
12131         (pad_to_column): New function.
12132
12133 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
12134
12135         * dwarf2read.c (dwarf2_physname): Move commment.
12136
12137 2018-02-01  Leszek Swirski  <leszeks@google.com>
12138
12139         * varobj.c (varobj_formatted_print_options): Allow recursive
12140         pretty printing if pretty printing is enabled.
12141
12142 2018-02-01  Leszek Swirski  <leszeks@google.com>
12143
12144         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12145         names after a structop as a filename.
12146
12147 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12148
12149         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12150         (arm_record_coproc_data_proc): Likewise.
12151
12152 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12153
12154         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12155
12156 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
12157
12158         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12159         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12160
12161 2018-01-31  Pedro Alves  <palves@redhat.com>
12162
12163         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12164         * inflow.c (child_terminal_save_inferior): Wrap reference to
12165         tcgetpgrp in HAVE_TERMIOS_H.
12166         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12167         _WIN32.
12168         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12169         always iterate over all inferiors.
12170         (gdbsim_cntrl_c): Adjust.
12171         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12172
12173 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12174
12175         * gdbtypes.c (lookup_array_range_type): Make sure the array's
12176         index type is objfile-owned if the element type is as well.
12177
12178 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12179
12180         GDB 8.1 released.
12181
12182 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12183
12184         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12185         "features/s390x-linux64.c".
12186         (_initialize_s390_linux_tdep): Remove initialization of tdescs
12187         s390_linux32 and s390x_linux64.
12188         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12189         default tdesc.
12190         * s390-tdep.c: Include "features/s390-linux32.c" and
12191         "features/s390x-linux64.c".
12192         (s390_tdesc_valid): Add check for tdesc_has_registers.
12193         (s390_gdbarch_init): Make sure there is always a valid tdesc.
12194         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12195         tdesc_s390x_linux64.
12196         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12197         tdesc_s390x_linux64 to...
12198         * s390-tdep.h: ...here.
12199
12200 2018-01-30  Pedro Alves  <palves@redhat.com>
12201
12202         PR gdb/13211
12203         * config.in, configure: Regenerate.
12204         * configure.ac: Check for getpgid.
12205         * go32-nat.c (go32_pass_ctrlc): New.
12206         (go32_target): Install it.
12207         * inf-child.c (inf_child_target): Install
12208         child_terminal_save_inferior, child_pass_ctrlc and
12209         child_interrupt.
12210         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12211         (inf_ptrace_target): No longer install it.
12212         * infcmd.c (interrupt_target_1): Adjust.
12213         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12214         (child_interrupt): Declare.
12215         (inferior::terminal_state): New.
12216         * inflow.c (struct terminal_info): Update comments.
12217         (inferior_process_group): Delete.
12218         (terminal_is_ours): Delete.
12219         (gdb_tty_state): New.
12220         (child_terminal_init): Adjust.
12221         (is_gdb_terminal, sharing_input_terminal_1)
12222         (sharing_input_terminal): New functions.
12223         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
12224         Set the process's actual process group in the foreground if
12225         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
12226         mark terminal as the inferior's if not sharing GDB's terminal.
12227         Don't check attach_flag.
12228         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12229         pass down a target_terminal_state.
12230         (child_terminal_save_inferior): New, factored out from ...
12231         (child_terminal_ours_1): ... this.  Handle
12232         target_terminal_state::is_ours_for_output.
12233         (child_interrupt, child_pass_ctrlc): New.
12234         (inflow_inferior_exit): Clear the inferior's terminal_state.
12235         (copy_terminal_info): Copy the inferior's terminal state.
12236         (_initialize_inflow): Remove reference to terminal_is_ours.
12237         * inflow.h (inferior_process_group): Delete.
12238         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12239         * procfs.c (procfs_target): Don't install procfs_interrupt.
12240         (procfs_interrupt): Delete.
12241         * remote.c (remote_serial_quit_handler): Adjust.
12242         (remote_interrupt): Remove ptid parameter.  Adjust.
12243         * target-delegates.c: Regenerate.
12244         * target.c: Include "terminal.h".
12245         (target_terminal::terminal_state): Rename to ...
12246         (target_terminal::m_terminal_state): ... this.
12247         (target_terminal::init): Adjust.
12248         (target_terminal::inferior): Adjust to per-inferior
12249         terminal_state.
12250         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12251         (target_terminal::ours, target_terminal::ours_for_output): Use
12252         target_terminal_is_ours_kind.
12253         (target_interrupt): Remove ptid parameter.  Adjust.
12254         (default_target_pass_ctrlc): Adjust.
12255         * target.h (target_ops::to_terminal_save_inferior): New field.
12256         (target_ops::to_interrupt): Remove ptid_t parameter.
12257         (target_interrupt): Remove ptid_t parameter.  Update comment.
12258         (target_pass_ctrlc): Update comment.
12259         * target/target.h (target_terminal_state): New scoped enum,
12260         factored out of ...
12261         (target_terminal::terminal_state): ... here.
12262         (target_terminal::inferior): Update comments.
12263         (target_terminal::restore_inferior): New.
12264         (target_terminal::is_inferior, target_terminal::is_ours)
12265         (target_terminal::is_ours_for_output): Adjust.
12266         (target_terminal::scoped_restore_terminal_state): Adjust to
12267         rename, and call restore_inferior() instead of inferior().
12268         (target_terminal::scoped_restore_terminal_state::m_state): Change
12269         type.
12270         (target_terminal::terminal_state): Rename to ...
12271         (target_terminal::m_terminal_state): ... this and change type.
12272
12273 2018-01-30  Pedro Alves  <palves@redhat.com>
12274
12275         * linux-nat.c (wait_for_signal): New function.
12276         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12277         directly.
12278         (async_terminal_is_ours)
12279         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12280         (linux_nat_add_target): Don't override
12281         to_terminal_inferior/to_terminal_ours.
12282
12283 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
12284
12285         * remote.c (remote_follow_fork): Don't call "detach_inferior".
12286
12287 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
12288
12289         * dwarf2read.c (free_dwo_files): Add forward-declaration.
12290         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12291         dwarf2_per_objfile_free here.
12292         (dwarf2_per_objfile_free): Remove.
12293         (_initialize_dwarf2_read): Don't register
12294         dwarf2_per_objfile_free as a registry cleanup.
12295
12296 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
12297
12298         Avoid compilation errors in MinGW native builds
12299
12300         The error is triggered by including python-internal.h, and the
12301         error message is:
12302
12303              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12304                       from build-gnulib/import/math.h:27,
12305                       from d:/usr/Python26/include/pyport.h:235,
12306                       from d:/usr/Python26/include/Python.h:58,
12307                       from python/python-internal.h:94,
12308                       from python/py-arch.c:24:
12309              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12310         using ::hypot;
12311                 ^~~~~
12312
12313         This happens because Python headers define 'hypot' to expand t
12314         '_hypot' in the Windows builds.
12315         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12316         'hypoth'.  This avoids a compilation error.
12317
12318 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12319
12320         * MAINTAINERS (Write After Approval): Fix ordering.
12321
12322 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12323
12324         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12325
12326 2018-01-26  Alan Modra  <amodra@gmail.com>
12327
12328         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12329         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12330         Remove nop.  Make const.  Comment.
12331         (powerpc32_plt_stub_so_2): New.
12332         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12333         Correct count.  Update uses.
12334         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12335         Move common code reading PLT entry word.  Correct
12336         powerpc32_plt_stub PLT address calculation.
12337         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12338         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12339         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12340         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12341         (ppc64_standard_linkage8): Likewise.
12342         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12343         Correct insns description.
12344         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12345
12346 2018-01-24  Pedro Alves  <palves@redhat.com>
12347
12348         GCC PR libstdc++/83906
12349         * gdbtypes.c (operator==(const dynamic_prop &,
12350         const dynamic_prop &)): New.
12351         (operator==(const range_bounds &, const range_bounds &)): New.
12352         (check_types_equal): Use them instead of memcmp.
12353         * gdbtypes.h (operator==(const dynamic_prop &,
12354         const dynamic_prop &)): Declare.
12355         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12356         (operator==(const range_bounds &, const range_bounds &)): Declare.
12357         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12358
12359 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12360
12361         * s390-linux-tdep.c (s390_record_address_mask)
12362         (s390_record_calc_disp_common, s390_record_calc_disp)
12363         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12364         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12365         (s390_process_record): Move to s390-tdep.c.
12366         (s390_linux_init_abi_any): Adjust.
12367         * s390-tdep.c (s390_record_address_mask)
12368         (s390_record_calc_disp_common, s390_record_calc_disp)
12369         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12370         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12371         (s390_process_record): Moved from s390-linux-tdep.c
12372         (s390_gdbarch_init): Adjust.
12373
12374 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12375
12376         * s390-linux-nat.c (s390-tdep.h): New include.
12377         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12378         (HFILES_NO_SRCDIR): Add s390-tdep.h.
12379         (ALLDEPFILES): Add s390-tdep.c.
12380         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12381         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12382         * s390-tdep.h: ...this.  New file.
12383         * s390-linux-tdep.c (s390-tdep.h): New include.
12384         (_initialize_s390_tdep): Rename to...
12385         (_initialize_s390_linux_tdep): ...this and adjust.
12386         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12387         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12388         s390-tdep.h.
12389         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12390         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12391         (s390_is_partial_instruction, s390_software_single_step)
12392         (is_non_branch_ril, s390_displaced_step_copy_insn)
12393         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12394         (s390_prologue_data, s390_addr, s390_store, s390_load)
12395         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12396         (s390_register_call_saved, s390_guess_tracepoint_registers)
12397         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12398         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12399         (s390_pseudo_register_name, s390_pseudo_register_type)
12400         (s390_pseudo_register_read, s390_pseudo_register_write)
12401         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12402         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12403         (s390_addr_bits_remove, s390_address_class_type_flags)
12404         (s390_address_class_type_flags_to_name)
12405         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12406         (s390_function_arg_float, s390_function_arg_vector)
12407         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12408         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12409         (s390_frame_align, s390_register_return_value, s390_return_value)
12410         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12411         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12412         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12413         (s390_trad_frame_prev_register, s390_unwind_cache)
12414         (s390_prologue_frame_unwind_cache)
12415         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12416         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12417         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12418         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12419         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12420         (s390_frame_base_address, s390_local_base_address)
12421         (s390_frame_base, s390_gcc_target_options)
12422         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12423         (s390_validate_reg_range, s390_tdesc_valid)
12424         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12425         * s390-tdep.c: ...this.  New file.
12426
12427 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12428
12429         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12430         (s390_process_record, s390_gdbarch_tdep_alloc)
12431         (s390_linux_init_abi_any): Use/set new hook.
12432
12433 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12434
12435         * s390-linux-tdep.c (osabi.h): New include.
12436         (s390_linux_init_abi_31, s390_linux_init_abi_64)
12437         (s390_linux_init_abi_any): New functions.
12438         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12439
12440 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12441
12442         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12443         tdesc_has_registers check
12444
12445 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12446
12447         * s390-linux-tdep.c (s390_tdesc_valid): New function.
12448         (s390_validate_reg_range): New macro.
12449         (s390_gdbarch_init): Adjust.
12450
12451 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12452
12453         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12454         (s390_gdbarch_tdep_alloc): Adjust.
12455         (s390_gdbarch_init): Adjust.
12456
12457 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12458
12459         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12460         <have_tdb>: Change type to bool.
12461         (s390_gdbarch_tdep_alloc): Adjust.
12462         (s390_gdbarch_init): Adjust.
12463
12464 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12465
12466         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12467         (gdbarch_tdep) <have_upper, have_vx>: New fields.
12468         (s390_gdbarch_tdep_alloc): New function.
12469         (s390_gdbarch_init): Allocate tdep at start and use its fields
12470         instead of separate variables.
12471
12472 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12473
12474         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12475         when looking for cached gdbarch and add comment for remaining.
12476
12477 2018-01-22  Pedro Alves  <palves@redhat.com>
12478             Sergio Durigan Junior  <sergiodj@redhat.com>
12479
12480         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12481         case.
12482
12483 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
12484
12485         * MAINTAINERS: Update my company e-mail address.
12486
12487 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12488
12489         * regcache.c (cooked_write_test): New function.
12490         (_initialize_regcache): Register the test.
12491
12492 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12493
12494         * ia64-tdep.c (ia64_pseudo_register_read): Call
12495         regcache->cooked_read instead of regcache_cooked_read_unsigned.
12496         * m32c-tdep.c (m32c_cat_read): Likewise.
12497         (m32c_r3r2r1r0_read): Likewise.
12498         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12499         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12500
12501 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12502
12503         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12504         method raw_read instead of regcache_raw_read.
12505         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12506         * arm-tdep.c (arm_neon_quad_read): Likewise.
12507         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12508         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12509         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12510         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12511         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12512         (i386_pseudo_register_read_into_value): Likewise.
12513         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12514         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12515         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12516         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12517         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12518         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
12519         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12520         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
12521         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12522
12523 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12524
12525         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12526         * configure.tgt: Remove target mt.
12527         * mt-tdep.c: Remove.
12528         * regcache.c (cooked_read_test): Remove the check for mt.
12529
12530 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12531
12532         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12533         instead of gdbarch_pseudo_register_read_value.
12534
12535 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12536
12537         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12538         language is Ada.
12539
12540 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12541
12542         * linespec.c (create_sals_line_offset): Remove code that preserved
12543         the symtab_and_line's line number.
12544
12545 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12546
12547         * varobj.c (varobj_create): Don't set valid_block when creating a
12548         floating varobj.
12549
12550 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12551
12552         * varobj.c (varobj_create): Remove out of date comment.
12553
12554 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12555
12556         PR mi/20395
12557         * ada-exp.y (write_var_from_sym): Pass extra parameter when
12558         updating innermost block.
12559         * parse.c (innermost_block_tracker::update): Take extra type
12560         parameter, and check types match before updating innermost block.
12561         (write_dollar_variable): Update innermost block for registers.
12562         * parser-defs.h (enum innermost_block_tracker_type): New enum.
12563         (innermost_block_tracker::innermost_block_tracker): Initialise
12564         m_types member.
12565         (innermost_block_tracker::reset): Take type parameter.
12566         (innermost_block_tracker::update): Take type parameter, and pass
12567         type through as needed.
12568         (innermost_block_tracker::m_types): New member.
12569         * varobj.c (varobj_create): Pass type when reseting innermost
12570         block.
12571
12572 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12573
12574         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12575         * ada-lang.c (resolve_subexp): Likewise.
12576         * breakpoint.c (set_breakpoint_condition) Likewise.
12577         (watch_command_1) Likewise.
12578         * c-exp.y (variable): Likewise.
12579         * d-exp.y (PrimaryExpression): Likewise.
12580         * f-exp.y (variable): Likewise.
12581         * go-exp.y (variable): Likewise.
12582         * m2-exp.y (variable): Likewise.
12583         * objfiles.c (objfile::~objfile): Likewise.
12584         * p-exp.y (variable): Likewise.
12585         * parse.c (innermost_block): Change type.
12586         * parser-defs.h (class innermost_block_tracker): New.
12587         (innermost_block): Change to innermost_block_tracker.
12588         * printcmd.c (display_command): Switch to innermost_block API.
12589         (do_one_display): Likewise.
12590         * rust-exp.y (do_one_display): Likewise.
12591         * symfile.c (clear_symtab_users): Likewise.
12592         * varobj.c (varobj_create): Switch to innermost_block API, replace
12593         use of innermost_block with block stored on varobj object.
12594
12595 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12596
12597         * expression.h (innermost_block): Remove declaration.
12598         * varobj.c: Add 'parser-defs.h' include.
12599
12600 2018-01-19  Tom Tromey  <tom@tromey.com>
12601
12602         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12603         symbols in the static and global blocks.
12604
12605 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
12606
12607         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12608         gdb_ptrace.h, and move including gdb_wait.h ...
12609         * nat/linux-ptrace.h: ... to here.
12610
12611 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12612
12613         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12614         inf_ptrace_detach_success.
12615         (inf_ptrace_detach_success): Add inferior parameter, use it
12616         instead of inferior_ptid, pass it to detach_inferior.
12617         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12618         parameter.
12619         * inferior.c (detach_inferior): Add overload that takes an
12620         inferior object.
12621         * inferior.h (detach_inferior): Likewise.
12622         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12623         use inferior_ptid, adjust call to inf_ptrace_detach_success.
12624         * linux-thread-db.c (thread_db_detach): Use inf parameter.
12625
12626 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12627
12628         * target.h (struct target_ops) <to_detach>: Add inferior
12629         parameter.
12630         (target_detach): Likewise.
12631         * target.c (dispose_inferior): Pass inferior down.
12632         (target_detach): Pass inferior down.  Assert that it is equal to
12633         the current inferior.
12634         * aix-thread.c (aix_thread_detach): Pass inferior down.
12635         * corefile.c (core_file_command): Pass current_inferior() down.
12636         * corelow.c (core_detach): Add inferior parameter.
12637         * darwin-nat.c (darwin_detach): Likewise.
12638         * gnu-nat.c (gnu_detach): Likewise.
12639         * inf-ptrace.c (inf_ptrace_detach): Likewise.
12640         * infcmd.c (detach_command): Pass current_inferior() down to
12641         target_detach.
12642         * infrun.c (follow_fork_inferior): Pass parent_inf to
12643         target_detach.
12644         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12645         target_detach.
12646         * linux-nat.c (linux_nat_detach): Add inferior parameter.
12647         * linux-thread-db.c (thread_db_detach): Likewise.
12648         * nto-procfs.c (procfs_detach): Likewise.
12649         * procfs.c (procfs_detach): Likewise.
12650         * record.c (record_detach): Likewise.
12651         * record.h (struct inferior): Forward-declare.
12652         (record_detach): Add inferior parameter.
12653         * remote-sim.c (gdbsim_detach): Likewise.
12654         * remote.c (remote_detach_1): Likewise.
12655         (remote_detach): Likewise.
12656         (extended_remote_detach): Likewise.
12657         * sol-thread.c (sol_thread_detach): Likewise.
12658         * target-debug.h (target_debug_print_inferior_p): New macro.
12659         * target-delegates.c: Re-generate.
12660         * top.c (kill_or_detach): Pass inferior down to target_detach.
12661         * windows-nat.c (windows_detach): Add inferior parameter.
12662
12663 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12664
12665         * target.h (struct target_ops) <to_detach>: Remove args
12666         parameter.
12667         (target_detach): Likewise.
12668         * target.c (dispose_inferior): Adjust.
12669         (target_detach): Remove args parameter, adjust.
12670         * aix-thread.c (aix_thread_detach): Adjust.
12671         * corefile.c (core_file_command): Adjust.
12672         * corelow.c (core_detach): Adjust.
12673         * darwin-nat.c (darwin_detach): Adjust.
12674         * gnu-nat.c (gnu_detach): Adjust.
12675         * inf-ptrace.c (inf_ptrace_detach): Adjust.
12676         * infcmd.c (detach_command): Adjust
12677         * infrun.c (follow_fork_inferior): Adjust.
12678         (handle_vfork_child_exec_or_exit): Adjust.
12679         * linux-fork.c (linux_fork_detach): Remove args parameter.
12680         * linux-fork.h (linux_fork_detach): Likewise.
12681         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12682         * linux-thread-db.c (thread_db_detach): Likewise.
12683         * nto-procfs.c (procfs_detach): Likewise.
12684         * procfs.c (procfs_detach): Likewise.
12685         (do_detach): Remove signo parameter.
12686         * record.c (record_detach): Remove args parameter.
12687         * record.h (record_detach): Likewise.
12688         * remote-sim.c (gdbsim_detach): Likewise.
12689         * remote.c (remote_detach_1): Likewise.
12690         (remote_detach): Likewise.
12691         (extended_remote_detach): Likewise.
12692         * sol-thread.c (sol_thread_detach): Likewise.
12693         * target-delegates.c: Re-generate.
12694         * top.c (struct qt_args) <args>: Remove field.
12695         (kill_or_detach): Don't pass args.
12696         (quit_force): Don't set args.
12697         * windows-nat.c (windows_detach): Remove args parameter.
12698
12699 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12700
12701         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12702         (arm_linux_init_abi): Install it.
12703
12704 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12705
12706         * osabi.c (gdb_osabi_names): Extend the regexp for
12707         arm-linux-gnueabihf.
12708
12709 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12710
12711         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12712         m_abbrevs.
12713         (abbrev_table::add_abbrev): Update.
12714         (abbrev_table::lookup_abbrev): Update.
12715
12716 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12717
12718         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12719
12720 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
12721
12722         * compile/compile.c (compile_to_object): Convert "triplet_rx"
12723         to "std::string".
12724
12725 2018-01-17  Tom Tromey  <tom@tromey.com>
12726
12727         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
12728
12729 2018-01-17  Tom Tromey  <tom@tromey.com>
12730
12731         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12732         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12733         (create_array_type_with_stride): Update.
12734         * dwarf2read.c (set_die_type): Update.
12735
12736 2018-01-17  Tom Tromey  <tom@tromey.com>
12737
12738         * dwarf2read.c (delayed_method_info): Remove typedef.
12739         (dwarf2_cu::method_info): Now a std::vector.
12740         (add_to_method_list): Update.
12741         (free_delayed_list): Remove.
12742         (compute_delayed_physnames): Update.
12743         (process_full_comp_unit, process_full_type_unit): Clear the method
12744         list.  Remove cleanups.
12745         (psymtab_include_file_name): Add name_holder parameter.  Use
12746         unique_xmalloc_ptr.
12747         (dwarf_decode_lines): Update.
12748
12749 2018-01-17  Tom Tromey  <tom@tromey.com>
12750             Simon Marchi  <simon.marchi@ericsson.com>
12751
12752         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12753         (dwarf2_per_objfile::free_cached_comp_units)
12754         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12755         (init_cutu_and_read_dies_no_follow): Update.
12756         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12757         (dwarf2_cu::~dwarf2_cu): New.
12758         (free_heap_comp_unit, free_stack_comp_unit): Remove.
12759         (age_cached_comp_units, free_one_cached_comp_unit): Update.
12760
12761 2018-01-17  Tom Tromey  <tom@tromey.com>
12762             Simon Marchi  <simon.marchi@ericsson.com>
12763
12764         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12765         (struct die_reader_specs) <abbrev_table>: New member.
12766         (struct abbrev_table): Add constructor.
12767         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12768         <abbrev_obstack>: Now an auto_obstack.
12769         (abbrev_table_up): New typedef.
12770         (init_cu_die_reader): Add abbrev_table parameter.
12771         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12772         Add result_dwo_abbrev_table.
12773         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12774         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12775         Update.
12776         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12777         parameter.
12778         (skip_children): Update.
12779         (abbrev_table::alloc_abbrev): Rename from
12780         abbrev_table_alloc_abbrev.
12781         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12782         (abbrev_table::lookup_abbrev): Rename from
12783         abbrev_table_lookup_abbrev.
12784         (abbrev_table_read_table): Return abbrev_table_up.
12785         (abbrev_table_free, abbrev_table_free_cleanup)
12786         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12787         (load_partial_dies): Update.
12788
12789 2018-01-17  Tom Tromey  <tom@tromey.com>
12790
12791         * dwarf2read.c (dwarf2_compute_name): Update comment.
12792         (read_func_scope, read_variable): Update.
12793         (new_symbol): Remove.
12794         (new_symbol_full): Rename to new_symbol.
12795
12796 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
12797
12798         PR gdb/16577
12799         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12800         a warning instead of throwing an error, set section size to 0 and return
12801         NULL.
12802         * gdb_bfd.h (gdb_bfd_map_section): Update description.
12803
12804 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12805
12806         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12807         std::string.
12808         (linux_ptrace_attach_fail_reason_string): Likewise.
12809         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12810         Likewise.
12811         (linux_ptrace_attach_fail_reason_string): Likewise.
12812         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12813
12814 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12815
12816         * linux-nat.c (linux_nat_attach): Remove xstrdup.
12817
12818 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
12819
12820         PR gdb/21559
12821         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12822         checking for fs_base/gs_base fields in struct user_regs_struct.
12823         * configure: Regenerate.
12824
12825 2018-01-17  Yao Qi  <yao.qi@linaro.org>
12826
12827         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12828         function.
12829         (aarch64_linux_init_abi): Install it to gdbarch hook
12830         gcc_target_options.
12831
12832 2018-01-15  Pedro Alves  <palves@redhat.com>
12833
12834         * common/signals-state-save-restore.c
12835         (save_original_signals_state): Fix typos.
12836
12837 2017-01-12  Tom Tromey  <tom@tromey.com>
12838             Sergio Durigan Junior  <sergiodj@redhat.com>
12839
12840         * Makefile.in (install-only): Install gdb-add-index.
12841
12842 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
12843
12844         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12845
12846 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12847
12848         * infrun.c (keep_going_pass_signal): Clear step-over info when
12849         insert_breakpoints fails.
12850
12851 2018-01-11  Pedro Alves  <palves@redhat.com>
12852
12853         PR gdb/22583
12854         * infrun.c (resume): Rename to ...
12855         (resume_1): ... this.
12856         (resume): Reimplement as wrapper around resume_1.
12857
12858 2018-01-11  Pedro Alves  <palves@redhat.com>
12859
12860         PR remote/22597
12861         * remote.c (remote_parse_stop_reply): Default to the last-set
12862         general thread instead of to 'magic_null_ptid'.
12863
12864 2018-01-10  Pedro Alves  <palves@redhat.com>
12865
12866         * language.h (language_get_symbol_name_matcher): Rename ...
12867         (get_symbol_name_matcher): ... this.
12868         * language.c (language_get_symbol_name_matcher): Ditto.
12869         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12870         callers adjusted.
12871
12872 2018-01-10  Pedro Alves  <palves@redhat.com>
12873
12874         PR gdb/22670
12875         * dwarf2read.c
12876         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12877         Adjust to use language_get_symbol_name_matcher instead of
12878         language_defn::la_get_symbol_name_matcher.
12879         * language.c (language_get_symbol_name_matcher): If in Ada mode
12880         and the lookup name is a verbatim match, return Ada's matcher.
12881         * language.h (language_get_symbol_name_matcher): Adjust comment.
12882         (ada_lookup_name_info::verbatim_p):: New method.
12883
12884 2018-01-10  Pedro Alves  <palves@redhat.com>
12885
12886         PR gdb/22670
12887         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12888         minsym's language is language_auto or language_cplus, pass down
12889         language_ada instead.
12890         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12891
12892 2018-01-10  Pedro Alves  <palves@redhat.com>
12893
12894         PR gdb/22670
12895         * minsyms.c (linkage_name_str): New function.
12896         (iterate_over_minimal_symbols): Use it.
12897
12898 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12899
12900         * NEWS: Document that 'info proc' now works on FreeBSD.
12901
12902 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12903
12904         * configure.ac: Check for kinfo_getfile in libutil.
12905         * configure: Regenerate.
12906         * config.in: Regenerate.
12907         * fbsd-nat.c: Include "fbsd-tdep.h".
12908         (fbsd_fetch_cmdline): New.
12909         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12910         rather than calling error.
12911         (fbsd_info_proc): New.
12912         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12913         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12914         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12915
12916 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12917
12918         * fbsd-nat.c (struct free_deleter): Remove.
12919         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12920
12921 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12922
12923         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12924         NULL for an empty pathname.
12925
12926 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12927
12928         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12929         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12930         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12931         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12932         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12933         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12934         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12935         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12936         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12937         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12938         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12939         (fbsd_core_fetch_timeval, fbsd_print_sigset)
12940         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12941         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
12942         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12943
12944 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
12945
12946         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12947         (gnu_xfer_auxv): New function.
12948         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12949         TARGET_OBJECT_AUXV.
12950
12951 2018-01-08  Yao Qi  <yao.qi@linaro.org>
12952             Simon Marchi  <simon.marchi@ericsson.com>
12953
12954         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12955         common/selftest.c.
12956         (COMMON_OBS): Remove selftest.o.
12957         * configure.ac: Append selftest-arch.c and common/selftest.c to
12958         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
12959         * configure: Re-generated.
12960         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12961         GDB_SELF_TEST.
12962         (maintenance_info_selftests): Likewise.
12963
12964 2018-01-08  Xavier Roirand  <roirand@adacore.com>
12965
12966         * ada-valprint.c (val_print_packed_array_elements): Use
12967         proper number of elements when printing an array indexed
12968         by an enumeration type.
12969
12970 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
12971
12972         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12973         (dw2_get_file_names_reader): Adjust.
12974         (lookup_dwo_signatured_type): Adjust.
12975         (lookup_dwp_signatured_type): Adjust.
12976         (lookup_signatured_type): Adjust.
12977         (create_type_unit_group): Adjust.
12978         (get_type_unit_group): Adjust.
12979         (process_psymtab_comp_unit_reader): Adjust.
12980         (build_type_psymtabs_reader): Adjust.
12981         (scan_partial_symbols): Adjust.
12982         (add_partial_symbol): Adjust.
12983         (add_partial_subprogram): Adjust.
12984         (peek_die_abbrev): Adjust.
12985         (fixup_go_packaging): Adjust.
12986         (process_imported_unit_die): Adjust.
12987         (dwarf2_compute_name): Adjust.
12988         (dwarf2_physname): Adjust.
12989         (read_import_statement): Adjust.
12990         (handle_DW_AT_stmt_list): Adjust.
12991         (read_file_scope): Adjust.
12992         (read_func_scope): Adjust.
12993         (read_lexical_block_scope): Adjust.
12994         (read_call_site_scope): Adjust.
12995         (read_variable): Adjust.
12996         (dwarf2_rnglists_process): Adjust.
12997         (dwarf2_ranges_process): Adjust.
12998         (dwarf2_ranges_read): Adjust.
12999         (dwarf2_get_pc_bounds): Adjust.
13000         (dwarf2_record_block_ranges): Adjust.
13001         (dwarf2_add_field): Adjust.
13002         (dwarf2_add_member_fn): Adjust.
13003         (read_structure_type): Adjust.
13004         (process_structure_scope): Adjust.
13005         (read_enumeration_type): Adjust.
13006         (read_array_type): Adjust.
13007         (mark_common_block_symbol_computed): Adjust.
13008         (read_common_block): Adjust.
13009         (read_namespace_type): Adjust.
13010         (read_namespace): Adjust.
13011         (read_module_type): Adjust.
13012         (read_tag_pointer_type): Adjust.
13013         (read_tag_ptr_to_member_type): Adjust.
13014         (read_tag_string_type): Adjust.
13015         (read_subroutine_type): Adjust.
13016         (read_typedef): Adjust.
13017         (read_base_type): Adjust.
13018         (attr_to_dynamic_prop): Adjust.
13019         (read_subrange_type): Adjust.
13020         (read_unspecified_type): Adjust.
13021         (dwarf2_read_abbrevs): Adjust.
13022         (load_partial_dies): Adjust.
13023         (read_partial_die): Adjust.
13024         (find_partial_die): Adjust.
13025         (guess_partial_die_structure_name): Adjust.
13026         (fixup_partial_die): Adjust.
13027         (read_attribute_value): Adjust.
13028         (read_addr_index): Adjust.
13029         (read_addr_index_from_leb128): Adjust.
13030         (read_str_index): Adjust.
13031         (dwarf2_string_attr): Adjust.
13032         (get_debug_line_section): Adjust.
13033         (dwarf_decode_line_header): Adjust.
13034         (lnp_state_machine::check_line_address): Adjust.
13035         (dwarf_decode_lines_1): Adjust.
13036         (dwarf_decode_lines): Adjust.
13037         (dwarf2_start_symtab): Adjust.
13038         (var_decode_location): Adjust.
13039         (new_symbol_full): Adjust.
13040         (dwarf2_const_value_data): Adjust.
13041         (dwarf2_const_value_attr): Adjust.
13042         (dwarf2_const_value): Adjust.
13043         (die_type): Adjust.
13044         (die_containing_type): Adjust.
13045         (build_error_marker_type): Adjust.
13046         (lookup_die_type): Adjust.
13047         (guess_full_die_structure_name): Adjust.
13048         (anonymous_struct_prefix): Adjust.
13049         (determine_prefix): Adjust.
13050         (dwarf2_name): Adjust.
13051         (follow_die_ref_or_sig): Adjust.
13052         (follow_die_offset): Adjust.
13053         (follow_die_ref): Adjust.
13054         (follow_die_sig_1): Adjust.
13055         (follow_die_sig): Adjust.
13056         (get_signatured_type): Adjust.
13057         (get_DW_AT_signature_type): Adjust.
13058         (decode_locdesc): Adjust.
13059         (dwarf_decode_macros): Adjust.
13060         (cu_debug_loc_section): Adjust.
13061         (fill_in_loclist_baton): Adjust.
13062         (dwarf2_symbol_mark_computed): Adjust.
13063         (init_one_comp_unit): Don't assign
13064         dwarf2_cu::dwarf2_per_objfile.
13065         (set_die_type): Adjust.
13066
13067 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13068
13069         * dwarf2read.c (struct mapped_debug_names): Add constructor.
13070         <dwarf2_per_objfile>: New field.
13071         (dwarf2_per_objfile): Remove global.
13072         (get_dwarf2_per_objfile): New function.
13073         (set_dwarf2_per_objfile): New function.
13074         (dwarf2_build_psymtabs_hard): Change objfile parameter to
13075         dwarf2_per_objfile.
13076         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13077         (read_abbrev_offset): Likewise.
13078         (read_indirect_string): Likewise.
13079         (read_indirect_line_string): Likewise.
13080         (read_indirect_string_at_offset): Likewise.
13081         (read_indirect_string_from_dwz): Likewise.
13082         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13083         dwarf2_per_objfile.
13084         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13085         (create_all_comp_units): Change objfile parameter to
13086         dwarf2_per_objfile.
13087         (create_all_type_units): Likewise.
13088         (process_queue): Add dwarf2_per_objfile parameter.
13089         (read_and_check_comp_unit_head): Likewise.
13090         (lookup_dwo_unit_in_dwp): Likewise.
13091         (get_dwp_file): Likewise.
13092         (process_cu_includes): Likewise.
13093         (struct free_dwo_file_cleanup_data): New struct.
13094         (dwarf2_has_info): Use get_dwarf2_per_objfile and
13095         set_dwarf2_per_objfile.
13096         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13097         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13098         context, adjust calls.
13099         (dw2_instantiate_symtab): Likewise.
13100         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13101         (dw2_get_cu): Likewise.
13102         (create_cu_from_index_list): Change objfile parameter to
13103         dwarf2_per_objfile.
13104         (create_cus_from_index_list): Get dwarf2_per_objfile from
13105         context, adjust calls.
13106         (create_cus_from_index): Likewise.
13107         (create_signatured_type_table_from_index): Change objfile
13108         parameter to dwarf2_per_objfile.
13109         (create_signatured_type_table_from_debug_names): Change objfile
13110         parameter to dwarf2_per_objfile.
13111         (create_addrmap_from_index): Likewise.
13112         (create_addrmap_from_aranges): Likewise.
13113         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13114         (dw2_setup): Remove.
13115         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13116         context.
13117         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13118         get_dwarf2_per_objfile.
13119         (dw2_forget_cached_source_info): Likewise.
13120         (dw2_map_symtabs_matching_filename): Likewise.
13121         (struct dw2_symtab_iterator) <index>: Remove.
13122         <dwarf2_per_objfile>: New field.
13123         (dw2_symtab_iter_init): Replace index parameter with
13124         dwarf2_per_objfile.
13125         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13126         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13127         (dw2_print_stats): Likewise.
13128         (dw2_dump): Likewise.
13129         (dw2_expand_symtabs_for_function): Likewise.
13130         (dw2_expand_all_symtabs): Likewise.
13131         (dw2_expand_symtabs_with_fullname): Likewise.
13132         (dw2_expand_marked_cus): Replace index and objfile parameters
13133         with dwarf2_per_objfile.
13134         (dw_expand_symtabs_matching_file_matcher): Add
13135         dwarf2_per_objfile parameter and adjust calls.
13136         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13137         adjust calls.
13138         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13139         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13140         adjust calls.
13141         (create_cus_from_debug_names_list): Replace objfile parameter
13142         with dwarf2_per_objfile and adjust calls.
13143         (create_cus_from_debug_names): Likewise.
13144         (dwarf2_read_debug_names): Likewise.
13145         (mapped_debug_names::namei_to_name): Adjust call.
13146         (dw2_debug_names_iterator::next): Likewise.
13147         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13148         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13149         (dw2_debug_names_dump): Likewise.
13150         (dw2_debug_names_expand_symtabs_for_function): Likewise.
13151         (dw2_debug_names_expand_symtabs_matching): Likewise.
13152         (dwarf2_initialize_objfile): Likewise.
13153         (dwarf2_build_psymtabs): Likewise.
13154         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13155         this_cu.
13156         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13157         (read_and_check_comp_unit_head): Likewise.
13158         (read_abbrev_offset): Likewise.
13159         (create_debug_type_hash_table): Likewise.
13160         (create_debug_types_hash_table): Likewise.
13161         (create_all_type_units): Replace objfile parameter with
13162         dwarf2_per_objfile.
13163         (add_type_unit): Add dwarf2_per_objfile parameter.
13164         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13165         with dwarf2_per_objfile.
13166         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13167         (lookup_dwp_signatured_type): Likewise.
13168         (lookup_signatured_type): Likewise.
13169         (read_cutu_die_from_dwo): Likewise.
13170         (init_tu_and_read_dwo_dies): Likewise.
13171         (init_cutu_and_read_dies): Likewise.
13172         (init_cutu_and_read_dies_no_follow): Likewise.
13173         (allocate_type_unit_groups_table): Add objfile parameter.
13174         (create_type_unit_group): Use dwarf2_per_objfile from cu.
13175         (get_type_unit_group): Likewise.
13176         (process_psymtab_comp_unit): Update call.
13177         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13178         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13179         (print_tu_stats): Likewise.
13180         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13181         in void* parameter.
13182         (build_type_psymtabs): Change objfile parameter to
13183         dwarf2_per_objfile.
13184         (process_skeletonless_type_unit): Use dwarf2_per_objfile
13185         passed in void* parameter.
13186         (process_skeletonless_type_units): Change objfile parameter to
13187         dwarf2_per_objfile.
13188         (set_partial_user): Likewise.
13189         (dwarf2_build_psymtabs_hard): Likewise.
13190         (read_comp_units_from_section): Likewise.
13191         (create_all_comp_units): Likewise.
13192         (scan_partial_symbols): Update calls.
13193         (add_partial_symbol): Likewise.
13194         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13195         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13196         (process_queue): Add dwarf2_per_objfile parameter.
13197         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13198         (compute_compunit_symtab_includes): Likewise.
13199         (process_cu_includes): Add dwarf2_per_objfile parameter.
13200         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13201         (process_full_type_unit): Likewise.
13202         (process_imported_unit_die): Update call.
13203         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13204         (read_file_scope): Likewise.
13205         (allocate_dwo_file_hash_table): Add objfile parameter.
13206         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13207         (create_cus_hash_table): Likewise.
13208         (create_dwp_hash_table): Likewise.
13209         (create_dwo_unit_in_dwp_v1): Likewise.
13210         (create_dwp_v2_section): Likewise.
13211         (create_dwo_unit_in_dwp_v2): Likewise.
13212         (lookup_dwo_unit_in_dwp): Likewise.
13213         (try_open_dwop_file): Likewise.
13214         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13215         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13216         cleanup to include a reference to dwarf2_per_objfile.
13217         (open_dwp_file): Add dwarf2_per_objfile parameter.
13218         (open_and_init_dwp_file): Likewise.
13219         (get_dwp_file): Likewise.
13220         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13221         (queue_and_load_all_dwo_tus): Update call.
13222         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13223         data.
13224         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13225         (dwarf2_ranges_process): Likewise.
13226         (dwarf2_get_pc_bounds): Likewise.
13227         (mark_common_block_symbol_computed): Likewise.
13228         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13229         (dwarf2_read_abbrevs): Update call.
13230         (read_partial_die): Use dwarf2_per_objfile from cu.
13231         (find_partial_die): Likewise.
13232         (fixup_partial_die): Likewise.
13233         (read_attribute_value): Likewise.
13234         (read_indirect_string_at_offset_from): Add objfile parameter.
13235         (read_indirect_string_at_offset): Add dwarf2_per_objfile
13236         parameter.
13237         (read_indirect_string_from_dwz): Add objfile parameter.
13238         (read_indirect_string): Add objfile parameter.
13239         (read_addr_index_1): Add dwarf2_per_objfile parameter.
13240         (read_addr_index): Use dwarf2_per_objfile from cu.
13241         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13242         call dw2_setup.
13243         (read_str_index): Use dwarf2_per_objfile from cu.
13244         (get_debug_line_section): Likewise.
13245         (read_formatted_entries): Add dwarf2_per_objfile parameter.
13246         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13247         (new_symbol_full): Use dwarf2_per_objfile from cu.
13248         (build_error_marker_type): Likewise.
13249         (lookup_die_type): Likewise.
13250         (determine_prefix): Likewise.
13251         (follow_die_offset): Likewise.
13252         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13253         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13254         (dwarf2_fetch_die_type_sect_off): Likewise.
13255         (dwarf2_get_die_type): Likewise.
13256         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13257         (get_signatured_type): Likewise.
13258         (get_DW_AT_signature_type): Likewise.
13259         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13260         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13261         (cu_debug_loc_section): Likewise.
13262         (fill_in_loclist_baton): Likewise.
13263         (dwarf2_symbol_mark_computed): Likewise.
13264         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13265         dwarf2_per_objfile.
13266         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13267         parameter.
13268         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13269         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13270         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13271         (set_die_type): Use dwarf2_free_objfile from cu.
13272         (get_die_type_at_offset): Likewise.
13273         (dwarf2_per_objfile_free): Don't assign global variable.
13274         (debug_names) <constructor>: Add dwarf2_per_objfile
13275         parameter, update m_debugstrlookup construction.
13276         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13277         parameter.
13278         <m_dwarf2_per_objfile>: New field.
13279         <lookup>: Use m_dwarf2_per_objfile.
13280         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13281         (psyms_seen_size): Likewise.
13282         (write_gdbindex): Replace objfile parameter with
13283         dwarf2_per_objfile.
13284         (write_debug_names): Likewise.
13285         (write_psymtabs_to_index): Likewise.
13286         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13287         calls.
13288
13289 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13290
13291         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13292         <dwarf2_per_objfile>: New field.
13293         (struct dwarf2_per_cu_data) <objfile>: Remove.
13294         <dwarf2_per_objfile>: New field.
13295         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13296         of objfile.
13297         (create_signatured_type_table_from_index): Likewise.
13298         (create_debug_type_hash_table): Likewise.
13299         (fill_in_sig_entry_from_dwo_entry): Likewise.
13300         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13301         (create_type_unit_group): Assign dwarf2_per_objfile instead of
13302         objfile.
13303         (create_partial_symtab): Access objfile through
13304         dwarf2_per_objfile.
13305         (process_psymtab_comp_unit_reader): Likewise.
13306         (read_comp_units_from_section): Likewise.
13307         (scan_partial_symbols): Likewise.
13308         (add_partial_symbol): Likewise.
13309         (add_partial_subprogram): Likewise.
13310         (peek_die_abbrev): Likewise.
13311         (fixup_go_packaging): Likewise.
13312         (process_full_comp_unit): Likewise.
13313         (process_full_type_unit): Likewise.
13314         (process_imported_unit_die): Likewise.
13315         (dwarf2_compute_name): Likewise.
13316         (dwarf2_physname): Likewise.
13317         (read_import_statement): Likewise.
13318         (create_cus_hash_table): Assign dwarf2_physname instead of
13319         objfile.
13320         (read_func_scope): Access objfile through dwarf2_per_objfile.
13321         (read_lexical_block_scope): Likewise.
13322         (read_call_site_scope): Likewise.
13323         (read_variable): Likewise.
13324         (dwarf2_rnglists_process): Likewise.
13325         (dwarf2_ranges_process): Likewise.
13326         (dwarf2_ranges_read): Likewise.
13327         (dwarf2_record_block_ranges): Likewise.
13328         (dwarf2_add_field): Likewise.
13329         (dwarf2_add_member_fn): Likewise.
13330         (read_structure_type): Likewise.
13331         (process_structure_scope): Likewise.
13332         (read_enumeration_type): Likewise.
13333         (read_array_type): Likewise.
13334         (read_common_block): Likewise.
13335         (read_namespace_type): Likewise.
13336         (read_namespace): Likewise.
13337         (read_module_type): Likewise.
13338         (read_tag_pointer_type): Likewise.
13339         (read_tag_ptr_to_member_type): Likewise.
13340         (read_tag_string_type): Likewise.
13341         (read_subroutine_type): Likewise.
13342         (read_typedef): Likewise.
13343         (read_base_type): Likewise.
13344         (attr_to_dynamic_prop): Likewise.
13345         (read_subrange_type): Likewise.
13346         (read_unspecified_type): Likewise.
13347         (load_partial_dies): Likewise.
13348         (read_partial_die): Likewise.
13349         (find_partial_die): Likewise.
13350         (guess_partial_die_structure_name): Likewise.
13351         (fixup_partial_die): Likewise.
13352         (read_attribute_value): Likewise.
13353         (read_addr_index_from_leb128): Likewise.
13354         (dwarf2_read_addr_index): Likewise.
13355         (dwarf2_string_attr): Likewise.
13356         (lnp_state_machine::check_line_address): Likewise.
13357         (dwarf_decode_lines_1): Likewise.
13358         (dwarf_decode_lines): Likewise.
13359         (dwarf2_start_symtab): Likewise.
13360         (var_decode_location): Likewise.
13361         (new_symbol_full): Likewise.
13362         (dwarf2_const_value_data): Likewise.
13363         (dwarf2_const_value_attr): Likewise.
13364         (dwarf2_const_value): Likewise.
13365         (die_type): Likewise.
13366         (die_containing_type): Likewise.
13367         (lookup_die_type): Likewise.
13368         (guess_full_die_structure_name): Likewise.
13369         (anonymous_struct_prefix): Likewise.
13370         (dwarf2_name): Likewise.
13371         (follow_die_ref_or_sig): Likewise.
13372         (follow_die_offset): Likewise.
13373         (follow_die_ref): Likewise.
13374         (dwarf2_fetch_die_loc_sect_off): Likewise.
13375         (dwarf2_fetch_constant_bytes): Likewise.
13376         (dwarf2_fetch_die_type_sect_off): Likewise.
13377         (dwarf2_get_die_type): Likewise.
13378         (follow_die_sig): Likewise.
13379         (decode_locdesc): Likewise.
13380         (dwarf2_per_cu_objfile): Likewise.
13381         (dwarf2_per_cu_text_offset): Likewise.
13382         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13383         objfile.
13384         (set_die_type): Access objfile through
13385         dwarf2_per_objfile.
13386
13387 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13388
13389         * valprint.c (converted_character_d): Remove typedef.
13390         (DEF_VEC_O (converted_character_d)): Remove.
13391         (count_next_character): Use std::vector.
13392         (print_converted_chars_to_obstack): Likewise.
13393         (generic_printstr): Likewise.
13394
13395 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13396
13397         * xml-support.h (struct gdb_xml_value): Add constructor.
13398         <value>: Change type to unique_xmalloc_ptr.
13399         (gdb_xml_value_s): Remove typedef.
13400         (DEF_VEC_O (gdb_xml_value_s)): Remove.
13401         (gdb_xml_element_start_handler): Change parameter type to
13402         std::vector.
13403         (xml_find_attribute): Likewise.
13404         * xml-support.c (xml_find_attribute): Change parameter type to
13405         std::vector and adjust.
13406         (gdb_xml_values_cleanup): Remove.
13407         (gdb_xml_parser::start_element): Adjust to std::vector.
13408         (xinclude_start_include): Change paraeter type to std::vector
13409         and adjust.
13410         * btrace.c (check_xml_btrace_version): Likewise.
13411         (parse_xml_btrace_block): Likewise.
13412         (parse_xml_btrace_pt_config_cpu): Likewise.
13413         (parse_xml_btrace_pt): Likewise.
13414         (parse_xml_btrace_conf_bts): Likewise.
13415         (parse_xml_btrace_conf_pt): Likewise.
13416         * memory-map.c (memory_map_start_memory): Likewise.
13417         (memory_map_start_property): Likewise.
13418         * osdata.c (osdata_start_osdata): Likewise.
13419         (osdata_start_item): Likewise.
13420         (osdata_start_column): Likewise.
13421         * remote.c (start_thread): Likewise.
13422         * solib-aix.c (library_list_start_library): Likewise.
13423         (library_list_start_list): Likewise.
13424         * solib-svr4.c (library_list_start_library): Likewise.
13425         (svr4_library_list_start_list): Likewise.
13426         * solib-target.c (library_list_start_segment): Likewise.
13427         (library_list_start_section): Likewise.
13428         (library_list_start_library): Likewise.
13429         (library_list_start_list): Likewise.
13430         * tracepoint.c (traceframe_info_start_memory): Likewise.
13431         (traceframe_info_start_tvar): Likewise.
13432         * xml-syscall.c (syscall_start_syscall): Likewise.
13433         * xml-tdesc.c (tdesc_start_target): Likewise.
13434         (tdesc_start_feature): Likewise.
13435         (tdesc_start_reg): Likewise.
13436         (tdesc_start_union): Likewise.
13437         (tdesc_start_struct): Likewise.
13438         (tdesc_start_flags): Likewise.
13439         (tdesc_start_enum): Likewise.
13440         (tdesc_start_field): Likewise.
13441         (tdesc_start_enum_value): Likewise.
13442         (tdesc_start_vector): Likewise.
13443
13444 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13445
13446         * extension.h (struct xmethod_worker) <clone>: Remove.
13447         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13448         Remove.
13449         (python_xmethod_worker::clone): Remove.
13450         * valops.c (find_overload_match): Use std::move instead of
13451         clone.
13452
13453 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13454
13455         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13456         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13457         <free_xmethod_worker_data>: Remove.
13458         <get_matching_xmethod_workers>: Chance VEC to std::vector.
13459         <get_xmethod_arg_types>: Remove.
13460         <get_xmethod_result_type>: Remove.
13461         <invoke_xmethod>: Remove.
13462         * extension.c (new_xmethod_worker): Remove.
13463         (clone_xmethod_worker): Remove.
13464         (get_matching_xmethod_workers): Return void, pass std::vector by
13465         pointer.
13466         (get_xmethod_arg_types): Rename to...
13467         (xmethod_worker::get_arg_types): ... this, and adjust.
13468         (get_xmethod_result_type): Rename to...
13469         (xmethod_worker::get_result_type): ... this, and adjust.
13470         (invoke_xmethod): Remove.
13471         (free_xmethod_worker): Remove.
13472         (free_xmethod_worker_vec): Remove.
13473         * extension.h (enum ext_lang_rc): Move here from
13474         extension-priv.h.
13475         (struct xmethod_worker): Add constructor and destructor.
13476         <data>: Remove.
13477         <value>: Remove.
13478         <invoke, clone, do_get_result_type, do_get_arg_types>: New
13479         virtual pure methods.
13480         <get_arg_types, get_result_type>: New methods.
13481         (xmethod_worker_ptr): Remove typedef.
13482         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13483         (xmethod_worker_vec): Remove typedef.
13484         (xmethod_worker_up): New typedef.
13485         (invoke_xmethod): Remove.
13486         (clone_xmethod_worker): Remove.
13487         (free_xmethod_worker): Remove.
13488         (free_xmethod_worker_vec): Remove.
13489         (get_xmethod_arg_types): Remove.
13490         (get_xmethod_result_type): Remove.
13491         * valops.c (find_method_list): Use std::vector, don't use
13492         intermediate vector.
13493         (value_find_oload_method_list): Use std::vector.
13494         (find_overload_match): Use std::vector.
13495         (find_oload_champ): Use std::vector.
13496         * value.c (value_free): Use operator delete.
13497         (value_of_xmethod): Rename to...
13498         (value_from_xmethod): ... this.  Don't assign
13499         xmethod_worker::value, take rvalue-reference.
13500         (result_type_of_xmethod): Adjust.
13501         (call_xmethod): Adjust.
13502         * value.h: Include extension.h.
13503         (struct xmethod_worker): Don't forward-declare.
13504         (value_of_xmethod): Rename to...
13505         (value_from_xmethod): ... this, take rvalue-reference.
13506         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13507         (struct python_xmethod_worker): ... this, add constructor and
13508         destructor.
13509         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13510         (gdbpy_free_xmethod_worker_data): Rename to...
13511         (python_xmethod_worker::~python_xmethod_worker): ... this and
13512         adjust.
13513         (gdbpy_clone_xmethod_worker_data): Rename to...
13514         (python_xmethod_worker::clone): ... this and adjust.
13515         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13516         temporary vector.
13517         (gdbpy_get_xmethod_arg_types): Rename to...
13518         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13519         (gdbpy_get_xmethod_result_type): Rename to...
13520         (python_xmethod_worker::do_get_result_type): ... this and
13521         adjust.
13522         (gdbpy_invoke_xmethod): Rename to...
13523         (python_xmethod_worker::invoke): ... this and adjust.
13524         (new_python_xmethod_worker): Rename to...
13525         (python_xmethod_worker::python_xmethod_worker): ... this and
13526         adjust.
13527         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13528         Remove.
13529         (gdbpy_free_xmethod_worker_data): Remove.
13530         (gdbpy_get_matching_xmethod_workers): Use std::vector.
13531         (gdbpy_get_xmethod_arg_types): Remove.
13532         (gdbpy_get_xmethod_result_type): Remove.
13533         (gdbpy_invoke_xmethod): Remove.
13534         * python/python.c (python_extension_ops): Remove obsolete
13535         callbacks.
13536
13537 2018-01-05  Pedro Alves  <palves@redhat.com>
13538
13539         PR gdb/18653
13540         * common/signals-state-save-restore.c
13541         (save_original_signals_state): New parameter 'quiet'.  Warn if we
13542         find a custom handler preinstalled, instead of internal erroring.
13543         But only warn if !quiet.
13544         * common/signals-state-save-restore.h
13545         (save_original_signals_state): New parameter 'quiet'.
13546         * main.c (captured_main_1): Move save_original_signals_state call
13547         after option handling, and pass QUIET.
13548
13549 2018-01-05  Pedro Alves  <palves@redhat.com>
13550
13551         * spu-tdep.c (spu_catch_start): Pass
13552         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13553
13554 2018-01-05  Pedro Alves  <palves@redhat.com>
13555
13556         PR gdb/22670
13557         * ada-lang.c (literal_symbol_name_matcher): New function.
13558         (ada_get_symbol_name_matcher): Use it for
13559         symbol_name_match_type::SEARCH_NAME.
13560         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
13561         it down instead of assuming symbol_name_match_type::FULL.
13562         * block.h (block_lookup_symbol): New parameter 'match_type'.
13563         * c-valprint.c (print_unpacked_pointer): Use
13564         lookup_symbol_search_name instead of lookup_symbol.
13565         * compile/compile-object-load.c (get_out_value_type): Pass down
13566         symbol_name_match_type::SEARCH_NAME.
13567         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13568         symbol_name_match_type::FULL.
13569         * cp-support.c (cp_get_symbol_name_matcher): Handle
13570         symbol_name_match_type::SEARCH_NAME.
13571         * infrun.c (insert_exception_resume_breakpoint): Use
13572         lookup_symbol_search_name.
13573         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13574         * psymtab.c (maintenance_check_psymtabs): Use
13575         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13576         * stack.c (print_frame_args): Use lookup_symbol_search_name and
13577         SYMBOL_SEARCH_NAME.
13578         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13579         if symbol_name_match_type::SEARCH_NAME.
13580         (lookup_symbol_in_language): Pass down
13581         symbol_name_match_type::FULL.
13582         (lookup_symbol_search_name): New.
13583         (lookup_language_this): Pass down
13584         symbol_name_match_type::SEARCH_NAME.
13585         (lookup_symbol_aux, lookup_local_symbol): New parameter
13586         'match_type'.  Pass it down.
13587         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13588         (lookup_symbol_search_name): New declaration.
13589         (lookup_symbol_in_block): New 'match_type' parameter.
13590
13591 2018-01-05  Pedro Alves  <palves@redhat.com>
13592
13593         PR gdb/22670
13594         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13595         ada_lookup_symbol.
13596         (ada_lookup_symbol): Reimplement in terms of
13597         ada_lookup_symbol_list, bits factored out from
13598         ada_lookup_encoded_symbol.
13599
13600 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13601
13602         * ada-exp.y (write_object_renaming): When subscripting an array
13603         using a symbol as the index, pass the block in call to
13604         ada_lookup_encoded_symbol when looking that symbol up.
13605
13606 2018-01-05  Jerome Guitton  <guitton@adacore.com>
13607
13608         * ada-lang.c (ada_array_length): Use ada_index_type instead of
13609         TYPE_INDEX_TYPE.
13610
13611 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13612
13613         * ada-lang.c (ada_to_fixed_value_create): Add handling of
13614         the case where VALUE_LVAL (val0) is not lval_memory.
13615
13616 2018-01-05  Xavier Roirand  <roirand@adacore.com>
13617
13618         * ada-valprint.c (print_optional_low_bound): Handle
13619         character-indexed array printing like boolean-indexed array
13620         printing.
13621
13622 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13623
13624         * NEWS: Create a new section for the next release branch.
13625         Rename the section of the current branch, now that it has
13626         been cut.
13627
13628 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13629
13630         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13631         * version.in: Bump version to 8.1.50.DATE-git.
13632
13633 2018-01-03  Xavier Roirand  <roirand@adacore.com>
13634
13635         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13636         Add field.
13637         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13638         Add field.
13639         (default_exception_support_info) <catch_handlers_sym>: Add field.
13640         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13641         (ada_exception_name_addr_1): Add "catch handlers" handling.
13642         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13643         Update all callers.
13644         (create_excep_cond_exprs) <ex>: Add parameter.
13645         (re_set_exception): Update create_excep_cond_exprs call.
13646         (print_it_exception, print_one_exception, print_mention_exception)
13647         (print_recreate_exception): Add "catch handler" handling.
13648         (allocate_location_catch_handlers, re_set_catch_handlers)
13649         (check_status_catch_handlers, print_it_catch_handlers)
13650         (print_one_catch_handlers, print_mention_catch_handlers)
13651         (print_recreate_catch_handlers): New function.
13652         (catch_handlers_breakpoint_ops): New variable.
13653         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13654         Add parameter.  Add "catch handler" handling.
13655         (ada_exception_sym_name, ada_exception_breakpoint_ops):
13656         Add "catch handler" handling.
13657         (ada_exception_catchpoint_cond_string): Add "catch handler"
13658         handling.
13659         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13660         call.
13661         (catch_ada_handlers_command): New function.
13662         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13663         operations structure.
13664         (_initialize_ada_language): Add "catch handlers" command entry.
13665         * NEWS: Document "catch handlers" feature.
13666
13667 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13668
13669         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13670         account when creating the array type of the slice.
13671         (ada_value_slice): Likewise.
13672
13673 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13674
13675         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13676         New enum value.
13677         (create_array_type_with_stride): Add byte_stride_prop parameter.
13678         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13679         New parameter.  Update all callers in this file.
13680         (array_type_has_dynamic_stride): New function.
13681         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13682         of arrays with dynamic byte strides.
13683         * dwarf2read.c (read_array_type): Add support for dynamic
13684         DW_AT_byte_stride attributes.
13685
13686 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13687
13688         * dwarf2read.c (read_unspecified_type): Treat
13689         DW_TAG_enumeration_type DIEs from Ada units as stubs.
13690
13691 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13692
13693         Update copyright year range in all GDB files.
13694
13695 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13696
13697         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13698         and gdb/testsuite/gdb.base/step-line.c.
13699
13700 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13701
13702         * copyright.py (main): Dump the contents of
13703         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13704         even if BY_HAND is empty.
13705
13706 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13707
13708         * top.c (print_gdb_version): Update Copyright year in version
13709         message.
13710
13711 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13712
13713         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13714
13715 For older changes see ChangeLog-2017.
13716 \f
13717 Local Variables:
13718 mode: change-log
13719 left-margin: 8
13720 fill-column: 74
13721 version-control: never
13722 coding: utf-8
13723 End: