Support 'info proc files' on live FreeBSD processes.
[external/binutils.git] / gdb / ChangeLog
1 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2
3         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
4         descriptors for IP_FILES and IP_ALL.
5
6 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
7
8         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
9         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
10         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
11         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
12         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
13         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
14         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
15         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
16         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
17         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
18         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
19         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
20         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
21         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
22         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
23         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
24         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
25         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
26         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
27         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
28         (struct fbsd_sockaddr_un): New types.
29         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
30         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
31         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
32         (fbsd_core_info_proc_files): New functions.
33         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
34         IP_ALL.
35         * fbsd-tdep.h (fbsd_info_proc_files_header)
36         (fbsd_info_proc_files_entry): New.
37
38 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
39
40         * defs.h (enum info_proc_what) [IP_FILES]: New value.
41         * infcmd.c (info_proc_cmd_files): New function.
42         (_initialize_infcmd): Register 'info proc files' command.
43
44 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
45
46         * gnulib/aclocal-m4-deps.mk: Re-generate.
47         * gnulib/aclocal.m4: Re-generate.
48         * gnulib/config.in: Re-generate.
49         * gnulib/configure: Re-generate.
50         * gnulib/import/Makefile.am: Re-generate.
51         * gnulib/import/Makefile.in: Re-generate.
52         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
53         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
54         * gnulib/import/arpa_inet.in.h: New file.
55         * gnulib/import/inet_ntop.c: New file.
56         * gnulib/import/m4/arpa_inet_h.m4: New file.
57         * gnulib/import/m4/inet_ntop.m4: New file.
58         * gnulib/import/m4/netinet_in_h.m4: New file.
59         * gnulib/import/m4/socklen.m4: New file.
60         * gnulib/import/m4/sockpfaf.m4: New file.
61         * gnulib/import/m4/stdalign.m4: New file.
62         * gnulib/import/m4/sys_uio_h.m4: New file.
63         * gnulib/import/netinet_in.in.h: New file.
64         * gnulib/import/stdalign.in.h: New file.
65         * gnulib/import/sys_socket.c: New file.
66         * gnulib/import/sys_socket.in.h: New file.
67         * gnulib/import/sys_uio.in.h: New file.
68         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
69         module.
70
71 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
72
73         * gnulib/aclocal-m4-deps.mk: New file.
74         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
75         deterministically.
76
77 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
78
79         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
80         KVE_PATH.
81
82 2018-09-18  Tom Tromey  <tom@tromey.com>
83
84         * compile/compile-object-load.c (struct
85         link_hash_table_cleanup_data): Add constructor and destructor.
86         Use DISABLE_COPY_AND_ASSIGN.
87         (~link_hash_table_cleanup_data): Rename from
88         link_hash_table_free.  Now a destructor.
89         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
90
91 2018-09-18  Tom Tromey  <tom@tromey.com>
92
93         * compile/compile-object-run.c (do_module_cleanup): Use delete.
94         * compile/compile-object-load.c (struct munmap_list): Move to
95         header file.
96         (munmap_list::add): Rename from munmap_list_add; rewrite.
97         (munmap_list::~munmap_list): Rename from munmap_list_free.
98         (munmap_listp_free_cleanup): Remove.
99         (compile_object_load): Update.
100         * compile/compile-object-load.h (struct munmap_list): Move from
101         compile-object-load.c.  Rewrite.
102
103 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
104
105         * aarch64-tdep.c (pass_in_v): Use register size.
106         (aarch64_extract_return_value): Likewise.
107         (aarch64_store_return_value): Likewise.
108
109 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
110
111         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
112         rlim_t.
113
114 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
115
116         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
117         Fix short help line.
118
119 2018-09-17  Tom Tromey  <tom@tromey.com>
120
121         PR python/20445:
122         * configure: Rebuild.
123         * configure.ac: Conditionally use -DNDEBUG for Python.
124
125 2018-09-17  Tom Tromey  <tom@tromey.com>
126
127         * configure: Rebuild.
128         * configure.ac: Use gmp as a library dependency when checking for
129         mpfr.
130
131 2018-09-17  Pedro Alves  <palves@redhat.com>
132
133         * python/py-inferior.c (find_inferior_object): Delete.
134
135 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
136
137         * compile/compile-cplus-types.c
138         (compile_cplus_instance::enter_scope): Don't use new_scope after
139         std::move.
140
141 2018-09-17  Tom Tromey  <tom@tromey.com>
142
143         * common/pathstuff.c (get_standard_cache_dir): Use
144         ~/Library/Caches on macOS.
145         * common/pathstuff.h (get_standard_cache_dir): Update comment.
146
147 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
148
149         PR python/23669
150         * breakpoint.c (commands_cmd_element): New.
151         (_initialize_breakpoint): Assign commands_cmd_element.
152         * breakpoint.h (commands_cmd_element): New.
153         * cli/cli-script.c (while_cmd_element, if_command,
154         define_cmd_element): New.
155         (command_name_equals): Remove.
156         (process_next_line): Compare commands by pointer, not by name.
157         (_initialize_cli_script): Assign the various cmd_list_element
158         variables.
159         * compile/compile.c (compile_cmd_element): New.
160         (_initialize_compile): Assign compile_cmd_element.
161         * compile/compile.h (compile_cmd_element): New.
162         * guile/guile.c (guile_cmd_element): New.
163         (install_gdb_commands): Assign guile_cmd_element.
164         * guile/guile.h (guile_cmd_element): New.
165         * python/python.c (python_cmd_element): New.
166         (_initialize_python): Assign python_cmd_element.
167         * python/python.h (python_cmd_element): New.
168         * tracepoint.c (while_stepping_cmd_element): New.
169         (_initialize_tracepoint): Assign while_stepping_cmd_element.
170         * tracepoint.h (while_stepping_cmd_element): New.
171
172 2018-09-17  Tom Tromey  <tom@tromey.com>
173
174         * infrun.c (save_infcall_suspend_state): Return
175         infcall_suspend_state_up.
176         (save_infcall_control_state): Return infcall_control_state_up.
177         * inferior.h (save_infcall_suspend_state)
178         (save_infcall_control_state): Declare later.  Return unique
179         pointers.
180
181 2018-09-17  Tom Tromey  <tom@tromey.com>
182
183         * infrun.c (struct stop_context): Declare constructor,
184         destructor, "changed" method.
185         (stop_context::stop_context): Rename from save_stop_context.
186         (stop_context::~stop_context): Rename from
187         release_stop_context_cleanup.
188         (normal_stop): Update.
189         (stop_context::changed): Rename from stop_context_changed.  Return
190         bool.
191
192 2018-09-17  Tom Tromey  <tom@tromey.com>
193
194         * inferior.h (struct infcall_suspend_state_deleter): New.
195         (infcall_suspend_state_up): New typedef.
196         (struct infcall_control_state_deleter): New.
197         (infcall_control_state_up): New typedef.
198         (make_cleanup_restore_infcall_suspend_state)
199         (make_cleanup_restore_infcall_control_state): Don't declare.
200         * infcall.c (call_function_by_hand_dummy): Update.
201         * infrun.c (do_restore_infcall_suspend_state_cleanup)
202         (make_cleanup_restore_infcall_suspend_state): Remove.
203         (do_restore_infcall_control_state_cleanup)
204         (make_cleanup_restore_infcall_control_state): Remove.
205
206 2018-09-17  Tom Tromey  <tom@tromey.com>
207
208         * gdbthread.h (struct thread_control_state): Add initializer.
209         (class thread_info) <control>: Remove initializer.
210         * inferior.h (struct inferior_control_state): Add initializer.
211         (class inferior) <control>: Remove initializer.
212         (exit_inferior_1): Update.
213         * infrun.c (struct infcall_control_state): Add constructors.
214         (save_infcall_control_state): Use new.
215         (restore_infcall_control_state, discard_infcall_control_state):
216         Use delete.
217
218 2018-09-17  Tom Tromey  <tom@tromey.com>
219
220         * infrun.c (struct infcall_suspend_state) <registers>: Now a
221         unique_ptr.
222         <siginfo_data>: Now a unique_xmalloc_ptr.
223         (save_infcall_suspend_state, restore_infcall_suspend_state)
224         (discard_infcall_suspend_state)
225         (get_infcall_suspend_state_regcache): Update.
226
227 2018-09-17  Tom Tromey  <tom@tromey.com>
228
229         * gdbthread.h (struct thread_suspend_state): Add initializers.
230         (class thread_info) <suspend>: Remove initializer.
231         * infrun.c (struct infcall_suspend_state): Add initializers.
232         (save_infcall_suspend_state): Use new.
233         (discard_infcall_suspend_state): Use delete.
234
235 2018-09-16  Tom Tromey  <tom@tromey.com>
236
237         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
238         Remove.
239         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
240         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
241         (py_varobj_iter_new): Likewise.
242         (py_varobj_get_iterator): Use gdbpy_ref.
243
244 2018-09-16  Tom Tromey  <tom@tromey.com>
245
246         * python/py-threadevent.c (py_get_event_thread): Simplify.
247         * python/py-inferior.c (infpy_thread_from_thread_handle):
248         Return immediately after calling thread_to_thread_object.  Use
249         Py_RETURN_NONE.
250         (thread_to_thread_object): Set the exception on a NULL return.
251
252 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
253
254         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
255
256 2018-09-16  Tom Tromey  <tom@tromey.com>
257
258         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
259         Remove.
260
261 2018-09-16  Tom Tromey  <tom@tromey.com>
262
263         * python/python-internal.h (thread_to_thread_object): Change
264         return type.
265         * python/py-inferior.c (thread_to_thread_object): Return a new
266         reference.
267         (infpy_thread_from_thread_handle): Update.
268         * python/py-infthread.c (gdbpy_selected_thread): Update.
269         * python/py-stopevent.c (create_stop_event_object): Update.
270         * python/py-threadevent.c (py_get_event_thread): Return a new
271         reference.
272         (py_get_event_thread): Update.
273         * python/py-event.h (py_get_event_thread): Change return type.
274         * python/py-continueevent.c (create_continue_event_object):
275         Update.
276
277 2018-09-16  Tom Tromey  <tom@tromey.com>
278
279         * python/py-progspace.c (pspy_get_objfiles): Update.
280         * python/python-internal.h (objfile_to_objfile_object): Change
281         return type.
282         * python/py-newobjfileevent.c (create_new_objfile_event_object):
283         Update.
284         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
285         Update.
286         * python/python.c (gdbpy_get_current_objfile): Update.
287         (gdbpy_objfiles): Update.
288         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
289         Update.
290         (objfile_to_objfile_object): Return a new reference.
291         * python/py-symtab.c (stpy_get_objfile): Update.
292         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
293         Update.
294
295 2018-09-16  Tom Tromey  <tom@tromey.com>
296
297         * python/py-inferior.c (infpy_get_progspace): Update.
298         * python/python-internal.h (pspace_to_pspace_object): Change
299         return type.
300         * python/py-newobjfileevent.c
301         (create_clear_objfiles_event_object): Update.
302         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
303         Update.
304         * python/python.c (gdbpy_get_current_progspace): Update.
305         (gdbpy_progspaces): Update.
306         * python/py-progspace.c (pspace_to_pspace_object): Return a new
307         reference.
308         * python/py-objfile.c (objfpy_get_progspace): Update.
309         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
310         Update.
311
312 2018-09-16  Tom Tromey  <tom@tromey.com>
313
314         * python/lib/gdb/__init__.py (current_progspace, objfiles)
315         (solib_name, block_for_pc, find_pc_line): New functions.
316         (execute_unwinders): Update.
317         * python/py-block.c (gdbpy_block_for_pc): Remove.
318         * python/py-inferior.c (infpy_get_progspace): New function.
319         (inferior_object_getset) <progspace>: Add.
320         * python/py-progspace.c (pspy_objfiles): Rewrite.
321         (pspy_solib_name, pspy_block_for_pc)
322         (pspy_find_pc_line, pspy_is_valid): New functions.
323         (progspace_object_methods): Add entries for solib_name,
324         block_for_pc, find_pc_line, is_valid.
325         * python/python-internal.h (gdbpy_block_for_pc)
326         (build_objfiles_list): Don't declare.
327         * python/python.c: Don't include solib.h.
328         (gdbpy_solib_name, gdbpy_find_pc_line)
329         (gdbpy_get_current_progspace, build_objfiles_list)
330         (gdbpy_objfiles): Remove.
331         (GdbMethods) <current_progspace, objfiles, block_for_pc,
332         solib_name, find_pc_line>: Remove entries.
333
334 2018-09-16  Tom Tromey  <tom@tromey.com>
335
336         * top.c (new_ui_command): Use GNU style for metasyntactic
337         variables.
338         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
339         variables.
340         * maint.c (maintenance_translate_address): Remove "<>" around
341         text.
342         * interps.c (interpreter_exec_cmd): Use GNU style for
343         metasyntactic variables.
344         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
345         metasyntactic variables.
346         * tracepoint.c (tfind_range_command): Use GNU style for
347         metasyntactic variables.
348         (tfind_outside_command): Likewise.
349         (_initialize_tracepoint): Likewise.
350         * remote.c (extended_remote_target::create_inferior): Use GNU
351         style for metasyntactic variables.
352         * sparc64-tdep.c (adi_examine_command): Use GNU style for
353         metasyntactic variables.
354         (adi_assign_command): Likewise.
355
356 2018-09-16  Tom Tromey  <tom@tromey.com>
357
358         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
359         metasyntactic variables.  Print message if no disassembler options
360         are available.
361
362 2018-09-15  Tom Tromey  <tom@tromey.com>
363
364         * infcmd.c (get_inferior_args): Return const char *.
365         * inferior.h (get_inferior_args): Return type now const.
366         * linux-tdep.c (linux_fill_prpsinfo): Update.
367         * procfs.c (procfs_target::make_corefile_notes): Update.
368
369 2018-09-07  Tom Tromey  <tom@tromey.com>
370
371         * python/python.c (execute_gdb_command): Call bpstat_do_actions
372         inside the TRY.
373
374 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
375
376         * nios2-tdep.c (nios2_type_align): New.
377         (nios2_gdb_arch_init): Install type_align hook.
378
379 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
380
381         * eval.c (fake_method::fake_method): Call xzalloc directly for a
382         type that is neither object file owned, nor gdbarch owned.
383         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
384         gdbarch is non-NULL.
385         (alloc_type_instance): Allocate non-objfile owned types on the
386         gdbarch obstack.
387         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
388         using TYPE_ALLOC to ensure memory is allocated on the correct
389         obstack.
390         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
391         obstack, or the gdbarch obstack.
392         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
393
394 2018-09-14  Tom Tromey  <tom@tromey.com>
395
396         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
397         block.
398
399 2018-09-14  Tom Tromey  <tom@tromey.com>
400
401         * nat/fork-inferior.c (get_startup_shell): Remove "static".
402
403 2018-09-13  Tom Tromey  <tom@tromey.com>
404
405         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
406         static.
407
408 2018-09-13  Tom Tromey  <tom@tromey.com>
409
410         * exec.c (try_open_exec_file): Use std::string.
411
412 2018-09-13  Tom Tromey  <tom@tromey.com>
413
414         * utils.h (gdb_bfd_errmsg): Return std::string.
415         * exec.c (exec_file_attach): Update.
416         * compile/compile-object-load.c (compile_object_load): Update.
417         * utils.c (gdb_bfd_errmsg): Return std::string.
418
419 2018-09-13  Tom Tromey  <tom@tromey.com>
420
421         * procfs.c (struct procinfo_deleter): New.
422         (procinfo_up): New typedef.
423         (do_destroy_procinfo_cleanup): Remove.
424         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
425
426 2018-09-13  Tom Tromey  <tom@tromey.com>
427
428         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
429
430 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
431 2018-09-13  Tom Tromey  <tom@tromey.com>
432
433         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
434         (pspy_get_objfiles): New function.
435         (progspace_object_methods): New.
436         (pspace_object_type): Add tp_methods callback.
437         * python/python-internal.h (build_objfiles_list): New
438         declaration.
439         * python/python.c (build_objfiles_list): New function.
440         (gdbpy_objfiles): Implement using build_objfiles_list.
441         * NEWS: Mention the Progspace.objfiles method.
442
443 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
444
445         * python/py-inferior.c (infpy_get_progspace): New function.
446         (inferior_object_getset): Add progspace property.
447         * NEWS: Mention the new property.
448
449 2018-09-13  Tom Tromey  <tom@tromey.com>
450
451         PR rust/23650:
452         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
453
454 2018-09-13  Tom Tromey  <tom@tromey.com>
455
456         PR rust/23626:
457         * rust-lang.c (rust_enum_variant): Now static.
458         (rust_empty_enum_p): New function.
459         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
460         Handle empty enum.
461
462 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
463
464         * python/py-inferior.c (infpy_repr): New.
465         (inferior_object_type): Register infpy_repr.
466         * python/py-objfile.c (objfpy_repr): New.
467         (objfile_object_type): Register objfpy_repr.
468
469 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
470
471         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
472
473 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
474
475         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
476         typo.
477
478 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
479
480         * common/common-utils.c: Don't include '<sys/stat.h>'.
481         (is_regular_file): Move to...
482         * common/filestuff.c (is_regular_file): ... here.
483         * common/common-utils.h (is_regular_file): Move to...
484         * common/filestuff.h (is_regular_file): ... here.
485
486 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
487
488         * skip.c (debug_skip): New variable.
489         (skiplist_entry::do_skip_file_p): Add debug output.
490         (skiplist_entry::do_skip_gfile_p): Likewise.
491         (skiplist_entry::skip_function_p): Likewise.
492         (_initialize_step_skip): Create debug command.
493         * NEWS: Mention set/show debug skip.
494
495 2018-09-11  Xavier Roirand  <roirand@adacore.com>
496
497         * darwin-nat.c (should_disable_startup_with_shell):
498         New function.
499         (darwin_nat_target::create_inferior): Add call.
500
501 2018-09-11  Xavier Roirand  <roirand@adacore.com>
502
503         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
504         inf_port, msg_state>: Initialize.
505         (struct darwin_thread_info) <signaled, single_step>: Change
506         type and initialize.
507         (struct darwin_thread_info) <event>: Initialize.
508
509 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
510
511         PR gdb/23555
512         PR gdb/23558
513         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
514         guesses.
515
516 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
517
518         Revert:
519         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
520
521         PR gdb/23555
522         PR gdb/23558
523         * gnulib/aclocal.m4: Regenerate.
524         * gnulib/config.in: Regenerate.
525         * gnulib/configure: Regenerate.
526         * gnulib/import/Makefile.am: Update.
527         * gnulib/import/Makefile.in: Update.
528         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
529         * gnulib/import/_Noreturn.h: ... this.
530         * gnulib/import/alloca.in.h: Update.
531         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
532         * gnulib/import/arg-nonnull.h: ... this.
533         * gnulib/import/assure.h: Update.
534         * gnulib/import/at-func.c: Update.
535         * gnulib/import/basename-lgpl.c: Update.
536         * gnulib/import/extra/snippet/c++defs.h: Rename to...
537         * gnulib/import/c++defs.h: ... this.
538         * gnulib/import/canonicalize-lgpl.c: Update.
539         * gnulib/import/cdefs.h: Update.
540         * gnulib/import/chdir-long.c: Update.
541         * gnulib/import/chdir-long.h: Update.
542         * gnulib/import/cloexec.c: Update.
543         * gnulib/import/cloexec.h: Update.
544         * gnulib/import/close.c: Update.
545         * gnulib/import/closedir.c: Update.
546         * gnulib/import/config.charset: Update.
547         * gnulib/import/dirent-private.h: Update.
548         * gnulib/import/dirent.in.h: Update.
549         * gnulib/import/dirfd.c: Update.
550         * gnulib/import/dirname-lgpl.c: Update.
551         * gnulib/import/dirname.h: Update.
552         * gnulib/import/dosname.h: Update.
553         * gnulib/import/dup-safer-flag.c: Update.
554         * gnulib/import/dup-safer.c: Update.
555         * gnulib/import/dup.c: Update.
556         * gnulib/import/dup2.c: Update.
557         * gnulib/import/errno.in.h: Update.
558         * gnulib/import/error.c: Update.
559         * gnulib/import/error.h: Update.
560         * gnulib/import/exitfail.c: Update.
561         * gnulib/import/exitfail.h: Update.
562         * gnulib/import/extra/update-copyright: Update.
563         * gnulib/import/fchdir.c: Update.
564         * gnulib/import/fcntl.c: Update.
565         * gnulib/import/fcntl.in.h: Update.
566         * gnulib/import/fd-hook.c: Update.
567         * gnulib/import/fd-hook.h: Update.
568         * gnulib/import/fd-safer-flag.c: Update.
569         * gnulib/import/fd-safer.c: Update.
570         * gnulib/import/fdopendir.c: Update.
571         * gnulib/import/filename.h: Update.
572         * gnulib/import/filenamecat-lgpl.c: Update.
573         * gnulib/import/filenamecat.h: Update.
574         * gnulib/import/flexmember.h: Update.
575         * gnulib/import/float+.h: Update.
576         * gnulib/import/float.c: Update.
577         * gnulib/import/float.in.h: Update.
578         * gnulib/import/fnmatch.c: Update.
579         * gnulib/import/fnmatch.in.h: Update.
580         * gnulib/import/fnmatch_loop.c: Update.
581         * gnulib/import/fpucw.h: Update.
582         * gnulib/import/frexp.c: Update.
583         * gnulib/import/frexpl.c: Update.
584         * gnulib/import/fstat.c: Update.
585         * gnulib/import/fstatat.c: Update.
586         * gnulib/import/getcwd-lgpl.c: Update.
587         * gnulib/import/getcwd.c: Update.
588         * gnulib/import/getdtablesize.c: Update.
589         * gnulib/import/getlogin_r.c: Update.
590         * gnulib/import/getprogname.c: Update.
591         * gnulib/import/getprogname.h: Update.
592         * gnulib/import/gettext.h: Update.
593         * gnulib/import/gettimeofday.c: Update.
594         * gnulib/import/glob-libc.h: Update.
595         * gnulib/import/glob.c: Update.
596         * gnulib/import/glob.in.h: Update.
597         * gnulib/import/glob_internal.h: Update.
598         * gnulib/import/glob_pattern_p.c: Update.
599         * gnulib/import/globfree.c: Update.
600         * gnulib/import/hard-locale.c: Update.
601         * gnulib/import/hard-locale.h: Update.
602         * gnulib/import/intprops.h: Update.
603         * gnulib/import/inttypes.in.h: Update.
604         * gnulib/import/isnan.c: Update.
605         * gnulib/import/isnand-nolibm.h: Update.
606         * gnulib/import/isnand.c: Update.
607         * gnulib/import/isnanl-nolibm.h: Update.
608         * gnulib/import/isnanl.c: Update.
609         * gnulib/import/itold.c: Update.
610         * gnulib/import/libc-config.h: Update.
611         * gnulib/import/limits.in.h: Update.
612         * gnulib/import/localcharset.c: Update.
613         * gnulib/import/localcharset.h: Update.
614         * gnulib/import/localtime-buffer.c: Update.
615         * gnulib/import/localtime-buffer.h: Update.
616         * gnulib/import/lstat.c: Update.
617         * gnulib/import/m4/00gnulib.m4: Update.
618         * gnulib/import/m4/__inline.m4: Update.
619         * gnulib/import/m4/absolute-header.m4: Update.
620         * gnulib/import/m4/alloca.m4: Update.
621         * gnulib/import/m4/builtin-expect.m4: Update.
622         * gnulib/import/m4/canonicalize.m4: Update.
623         * gnulib/import/m4/chdir-long.m4: Update.
624         * gnulib/import/m4/close.m4: Update.
625         * gnulib/import/m4/closedir.m4: Update.
626         * gnulib/import/m4/configmake.m4: Update.
627         * gnulib/import/m4/d-ino.m4: Update.
628         * gnulib/import/m4/d-type.m4: Update.
629         * gnulib/import/m4/dirent_h.m4: Update.
630         * gnulib/import/m4/dirfd.m4: Update.
631         * gnulib/import/m4/dirname.m4: Update.
632         * gnulib/import/m4/double-slash-root.m4: Update.
633         * gnulib/import/m4/dup.m4: Update.
634         * gnulib/import/m4/dup2.m4: Update.
635         * gnulib/import/m4/eealloc.m4: Update.
636         * gnulib/import/m4/environ.m4: Update.
637         * gnulib/import/m4/errno_h.m4: Update.
638         * gnulib/import/m4/error.m4: Update.
639         * gnulib/import/m4/exponentd.m4: Update.
640         * gnulib/import/m4/exponentl.m4: Update.
641         * gnulib/import/m4/extensions.m4: Update.
642         * gnulib/import/m4/extern-inline.m4: Update.
643         * gnulib/import/m4/fchdir.m4: Update.
644         * gnulib/import/m4/fcntl-o.m4: Update.
645         * gnulib/import/m4/fcntl.m4: Update.
646         * gnulib/import/m4/fcntl_h.m4: Update.
647         * gnulib/import/m4/fdopendir.m4: Update.
648         * gnulib/import/m4/filenamecat.m4: Update.
649         * gnulib/import/m4/flexmember.m4: Update.
650         * gnulib/import/m4/float_h.m4: Update.
651         * gnulib/import/m4/fnmatch.m4: Update.
652         * gnulib/import/m4/fnmatch_h.m4: Update.
653         * gnulib/import/m4/fpieee.m4: Update.
654         * gnulib/import/m4/frexp.m4: Update.
655         * gnulib/import/m4/frexpl.m4: Update.
656         * gnulib/import/m4/fstat.m4: Update.
657         * gnulib/import/m4/fstatat.m4: Update.
658         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
659         * gnulib/import/m4/getcwd-path-max.m4: Update.
660         * gnulib/import/m4/getcwd.m4: Update.
661         * gnulib/import/m4/getdtablesize.m4: Update.
662         * gnulib/import/m4/getlogin.m4: Update.
663         * gnulib/import/m4/getlogin_r.m4: Update.
664         * gnulib/import/m4/getpagesize.m4: Update.
665         * gnulib/import/m4/getprogname.m4: Update.
666         * gnulib/import/m4/gettimeofday.m4: Update.
667         * gnulib/import/m4/glibc21.m4: Update.
668         * gnulib/import/m4/glob.m4: Update.
669         * gnulib/import/m4/glob_h.m4: Update.
670         * gnulib/import/m4/gnulib-cache.m4: Update.
671         * gnulib/import/m4/gnulib-common.m4: Update.
672         * gnulib/import/m4/gnulib-comp.m4: Update.
673         * gnulib/import/m4/gnulib-tool.m4: Update.
674         * gnulib/import/m4/hard-locale.m4: Update.
675         * gnulib/import/m4/include_next.m4: Update.
676         * gnulib/import/m4/inttypes-pri.m4: Update.
677         * gnulib/import/m4/inttypes.m4: Update.
678         * gnulib/import/m4/isnand.m4: Update.
679         * gnulib/import/m4/isnanl.m4: Update.
680         * gnulib/import/m4/largefile.m4: Update.
681         * gnulib/import/m4/limits-h.m4: Update.
682         * gnulib/import/m4/localcharset.m4: Update.
683         * gnulib/import/m4/locale-fr.m4: Update.
684         * gnulib/import/m4/locale-ja.m4: Update.
685         * gnulib/import/m4/locale-zh.m4: Update.
686         * gnulib/import/m4/localtime-buffer.m4: Update.
687         * gnulib/import/m4/longlong.m4: Update.
688         * gnulib/import/m4/lstat.m4: Update.
689         * gnulib/import/m4/malloc.m4: Update.
690         * gnulib/import/m4/malloca.m4: Update.
691         * gnulib/import/m4/math_h.m4: Update.
692         * gnulib/import/m4/mbrtowc.m4: Update.
693         * gnulib/import/m4/mbsinit.m4: Update.
694         * gnulib/import/m4/mbsrtowcs.m4: Update.
695         * gnulib/import/m4/mbstate_t.m4: Update.
696         * gnulib/import/m4/memchr.m4: Update.
697         * gnulib/import/m4/memmem.m4: Update.
698         * gnulib/import/m4/mempcpy.m4: Update.
699         * gnulib/import/m4/memrchr.m4: Update.
700         * gnulib/import/m4/mkdir.m4: Update.
701         * gnulib/import/m4/mkstemp.m4: Update.
702         * gnulib/import/m4/mmap-anon.m4: Update.
703         * gnulib/import/m4/mode_t.m4: Update.
704         * gnulib/import/m4/msvc-inval.m4: Update.
705         * gnulib/import/m4/msvc-nothrow.m4: Update.
706         * gnulib/import/m4/multiarch.m4: Update.
707         * gnulib/import/m4/nocrash.m4: Update.
708         * gnulib/import/m4/off_t.m4: Update.
709         * gnulib/import/m4/onceonly.m4: Update.
710         * gnulib/import/m4/open-cloexec.m4: Update.
711         * gnulib/import/m4/open.m4: Update.
712         * gnulib/import/m4/openat.m4: Update.
713         * gnulib/import/m4/opendir.m4: Update.
714         * gnulib/import/m4/pathmax.m4: Update.
715         * gnulib/import/m4/rawmemchr.m4: Update.
716         * gnulib/import/m4/readdir.m4: Update.
717         * gnulib/import/m4/readlink.m4: Update.
718         * gnulib/import/m4/realloc.m4: Update.
719         * gnulib/import/m4/rename.m4: Update.
720         * gnulib/import/m4/rewinddir.m4: Update.
721         * gnulib/import/m4/rmdir.m4: Update.
722         * gnulib/import/m4/save-cwd.m4: Update.
723         * gnulib/import/m4/secure_getenv.m4: Update.
724         * gnulib/import/m4/setenv.m4: Update.
725         * gnulib/import/m4/signal_h.m4: Update.
726         * gnulib/import/m4/ssize_t.m4: Update.
727         * gnulib/import/m4/stat-time.m4: Update.
728         * gnulib/import/m4/stat.m4: Update.
729         * gnulib/import/m4/std-gnu11.m4: Update.
730         * gnulib/import/m4/stdbool.m4: Update.
731         * gnulib/import/m4/stddef_h.m4: Update.
732         * gnulib/import/m4/stdint.m4: Update.
733         * gnulib/import/m4/stdio_h.m4: Update.
734         * gnulib/import/m4/stdlib_h.m4: Update.
735         * gnulib/import/m4/strchrnul.m4: Update.
736         * gnulib/import/m4/strdup.m4: Update.
737         * gnulib/import/m4/strerror.m4: Update.
738         * gnulib/import/m4/string_h.m4: Update.
739         * gnulib/import/m4/strstr.m4: Update.
740         * gnulib/import/m4/strtok_r.m4: Update.
741         * gnulib/import/m4/sys_socket_h.m4: Update.
742         * gnulib/import/m4/sys_stat_h.m4: Update.
743         * gnulib/import/m4/sys_time_h.m4: Update.
744         * gnulib/import/m4/sys_types_h.m4: Update.
745         * gnulib/import/m4/tempname.m4: Update.
746         * gnulib/import/m4/time_h.m4: Update.
747         * gnulib/import/m4/unistd-safer.m4: Update.
748         * gnulib/import/m4/unistd_h.m4: Update.
749         * gnulib/import/m4/warn-on-use.m4: Update.
750         * gnulib/import/m4/wchar_h.m4: Update.
751         * gnulib/import/m4/wchar_t.m4: Update.
752         * gnulib/import/m4/wctype_h.m4: Update.
753         * gnulib/import/m4/wint_t.m4: Update.
754         * gnulib/import/malloc.c: Update.
755         * gnulib/import/malloc/scratch_buffer.h: Update.
756         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
757         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
758         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
759         * gnulib/import/malloca.c: Update.
760         * gnulib/import/malloca.h: Update.
761         * gnulib/import/malloca.valgrind: Update.
762         * gnulib/import/math.in.h: Update.
763         * gnulib/import/mbrtowc.c: Update.
764         * gnulib/import/mbsinit.c: Update.
765         * gnulib/import/mbsrtowcs-impl.h: Update.
766         * gnulib/import/mbsrtowcs-state.c: Update.
767         * gnulib/import/mbsrtowcs.c: Update.
768         * gnulib/import/memchr.c: Update.
769         * gnulib/import/memmem.c: Update.
770         * gnulib/import/mempcpy.c: Update.
771         * gnulib/import/memrchr.c: Update.
772         * gnulib/import/mkdir.c: Update.
773         * gnulib/import/mkstemp.c: Update.
774         * gnulib/import/msvc-inval.c: Update.
775         * gnulib/import/msvc-inval.h: Update.
776         * gnulib/import/msvc-nothrow.c: Update.
777         * gnulib/import/msvc-nothrow.h: Update.
778         * gnulib/import/open.c: Update.
779         * gnulib/import/openat-die.c: Update.
780         * gnulib/import/openat-priv.h: Update.
781         * gnulib/import/openat-proc.c: Update.
782         * gnulib/import/openat.c: Update.
783         * gnulib/import/openat.h: Update.
784         * gnulib/import/opendir.c: Update.
785         * gnulib/import/pathmax.h: Update.
786         * gnulib/import/pipe-safer.c: Update.
787         * gnulib/import/rawmemchr.c: Update.
788         * gnulib/import/readdir.c: Update.
789         * gnulib/import/readlink.c: Update.
790         * gnulib/import/realloc.c: Update.
791         * gnulib/import/ref-add.sin: Update.
792         * gnulib/import/ref-del.sin: Update.
793         * gnulib/import/rename.c: Update.
794         * gnulib/import/rewinddir.c: Update.
795         * gnulib/import/rmdir.c: Update.
796         * gnulib/import/same-inode.h: Update.
797         * gnulib/import/save-cwd.c: Update.
798         * gnulib/import/save-cwd.h: Update.
799         * gnulib/import/scratch_buffer.h: Update.
800         * gnulib/import/secure_getenv.c: Update.
801         * gnulib/import/setenv.c: Update.
802         * gnulib/import/signal.in.h: Update.
803         * gnulib/import/stat-time.c: Update.
804         * gnulib/import/stat-time.h: Update.
805         * gnulib/import/stat-w32.c: Update.
806         * gnulib/import/stat-w32.h: Update.
807         * gnulib/import/stat.c: Update.
808         * gnulib/import/stdbool.in.h: Update.
809         * gnulib/import/stddef.in.h: Update.
810         * gnulib/import/stdint.in.h: Update.
811         * gnulib/import/stdio.in.h: Update.
812         * gnulib/import/stdlib.in.h: Update.
813         * gnulib/import/str-two-way.h: Update.
814         * gnulib/import/strchrnul.c: Update.
815         * gnulib/import/strdup.c: Update.
816         * gnulib/import/streq.h: Update.
817         * gnulib/import/strerror-override.c: Update.
818         * gnulib/import/strerror-override.h: Update.
819         * gnulib/import/strerror.c: Update.
820         * gnulib/import/string.in.h: Update.
821         * gnulib/import/stripslash.c: Update.
822         * gnulib/import/strnlen1.c: Update.
823         * gnulib/import/strnlen1.h: Update.
824         * gnulib/import/strstr.c: Update.
825         * gnulib/import/strtok_r.c: Update.
826         * gnulib/import/sys_stat.in.h: Update.
827         * gnulib/import/sys_time.in.h: Update.
828         * gnulib/import/sys_types.in.h: Update.
829         * gnulib/import/tempname.c: Update.
830         * gnulib/import/tempname.h: Update.
831         * gnulib/import/time.in.h: Update.
832         * gnulib/import/unistd--.h: Update.
833         * gnulib/import/unistd-safer.h: Update.
834         * gnulib/import/unistd.in.h: Update.
835         * gnulib/import/unsetenv.c: Update.
836         * gnulib/import/verify.h: Update.
837         * gnulib/import/extra/snippet/warn-on-use.h: Update.
838         * gnulib/import/wchar.in.h: Update.
839         * gnulib/import/wctype.in.h: Update.
840         * gnulib/import/xalloc-oversized.h: Update.
841         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
842         "53e2c179f26a890fa6685af4b6c1397ee370433b".
843
844 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
845
846         * record-btrace.c (get_thread_current_frame): Remove
847         old_inferior_ptid.
848
849 2018-09-10  Jerome Guitton  <guitton@adacore.com>
850
851         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
852         with check_tag to 1 if and only if the type is tagged and the
853         component being searched cannot been found in the current
854         view. Otherwise, always call ada_to_fixed_type with
855         check_tag to 0.
856
857 2018-09-10  Xavier Roirand  <roirand@adacore.com>
858
859         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
860         declaration.
861         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
862         * ada-varobj.c (ada_varobj_get_number_of_children,
863         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
864
865 2018-09-10  Xavier Roirand  <roirand@adacore.com>
866
867         * ada-valprint.c (ada_value_print): Use type instead of
868         enclosing type.
869
870 2018-09-10  Xavier Roirand  <roirand@adacore.com>
871
872         * ada-lang.c (ada_value_subscript): Handle case when parameter is
873         an array of access to unconstrained array.
874
875 2018-09-10  Xavier Roirand  <roirand@adacore.com>
876
877         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
878         (ada_check_typedef): Use it.
879
880 2018-09-10  Xavier Roirand  <roirand@adacore.com>
881
882         * ada-varobj.c (ada_varobj_describe_struct_child)
883         (ada_varobj_describe_child): Handle union case like struct one.
884
885 2018-09-10  Tom Tromey  <tom@tromey.com>
886
887         PR python/18380:
888         * python/python.c (_initialize_python): Make example in "python"
889         help work in Python 3.
890
891 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
892
893         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
894         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
895         $(EXEEXT) to the script, as it is not a program.
896
897 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
898
899         * python/py-prettyprint.c (pretty_print_one_value): Return
900         gdbpy_ref<>.
901         (print_string_repr): Adjust.
902         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
903         * python/python-internal.h (apply_varobj_pretty_printer): Return
904         gdbpy_ref<>.
905         * varobj.c (varobj_value_get_print_value): Adjust.
906
907 2018-09-08  Tom Tromey  <tom@tromey.com>
908
909         PR python/16047:
910         * python/py-prettyprint.c (pretty_print_one_value): Check for
911         to_string method.
912
913 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
914
915         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
916         replace_operator_with_call.
917
918 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
919
920         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
921
922 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
923
924         * ada-typeprint.c (print_range): Print the bounds using TYPE
925         rather than its TYPE_TARGET_TYPE.
926
927 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
928
929         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
930         call to ada_to_fixed_value_create.
931
932 2018-09-08  Jerome Guitton  <guitton@adacore.com>
933
934         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
935
936 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
937
938         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
939         by calls to error.
940
941 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
942
943         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
944         Move update of loop variable "fi".
945
946 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
947
948         * ada-lang.c (value_assign_to_component): In the case of
949         big-endian targets, extract the bits of the given VAL
950         using an src_offset of zero if container is not a scalar.
951
952 2018-09-06  Simon Ser  <contact@emersion.fr>
953
954         PR gdb/23105
955         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
956         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
957         * fbsd-tdep.c (fbsd_make_note_desc): New.
958         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
959         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
960         * target.h (enum target_object) Add FreeBSD-specific
961         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
962
963 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
964
965         * compile/compile-c.h (generate_c_for_variable_locations):
966         Change reference to pointer.
967         * compile/compile-c-support.c (compile_program) <compute>:
968         Likewise.
969         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
970         (generate_c_for_for_one_variable): Likewise
971         (generate_c_for_variable_locations): Likewise
972         * compile/compile-c-types.c (compile_c_instance::convert_type):
973         Likewise
974         * compile/compile-cplus-symbols.c (convert_one_symbol):
975         std::move the scope passed to enter_scope.
976         * compile/compile-cplus-types.c
977         (compile_cplus_instance::enter_scope): Make parameter
978         rvalue-reference.
979         (compile_cplus_instance::new_scope): Change reference to
980         pointer.
981         (compile_cplus_instance::convert_type): Likewise
982         (compile_cplus_convert_typedef): std::move the scope passed to
983         enter_scope.
984         (compile_cplus_convert_struct_or_union): Likewise.
985         (compile_cplus_convert_enum): Likewise.
986         (compile_cplus_convert_namespace): Likewise.
987         * compile/compile-cplus.h (compile_cplus_instance)
988         <enter_scope>: Make parameter rvalue-reference.
989         * compile/compile-internal.h (compile_instance)
990         <get_cached_type>: Likewise
991         * compile/compile-loc2c.c (push): Likewise
992         (pushf): Likewise
993         (unary): Likewise
994         (binary): Likewise
995         (print_label): Likewise
996         (pushf_register_address): Likewise
997         (pushf_register): Likewise
998         (do_compile_dwarf_expr_to_c): Likewise
999         (compile_dwarf_expr_to_c): Likewise
1000         (compile_dwarf_bounds_to_c): Likewise
1001         * compile/compile.c (compile_instance::get_cached_type):
1002         Likewise
1003         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1004         (compile_dwarf_bounds_to_c): Likewise
1005         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1006         (dwarf2_compile_property_to_c): Likewise
1007         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1008         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1009         Likewise
1010
1011 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1012
1013         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1014         * tui/tui-data.c (init_content_element): Don't initialize it.
1015
1016 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1017
1018         * tui/tui-data.h (struct tui_win_info)
1019         <detail::opaque>: Remove.
1020         * tui/tui-data.c (init_win_info): Remove assignment.
1021
1022 2018-09-05  Tom Tromey  <tom@tromey.com>
1023
1024         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1025         -Wformat-nonliteral.
1026         * target-float.c (host_float_ops<T>::to_string)
1027         (host_float_ops<T>::from_string): Use
1028         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1029         * configure: Rebuild.
1030
1031 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1032
1033         * printcmd.c (printf_c_string): Use
1034         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1035         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1036
1037 2018-09-05  Tom Tromey  <tom@tromey.com>
1038
1039         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1040
1041 2018-09-05  Tom de Vries  <tdevries@suse.de>
1042
1043         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1044         with resolve_abstract_p == true.
1045         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1046         defaulting to false. Propagate resolve_abstract_p to
1047         dwarf2_fetch_die_loc_sect_off.
1048         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1049         parameter, defaulting to false.
1050         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1051         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1052         parameter.
1053         * dwarf2read.h (struct die_info): Forward-declare.
1054         (die_info_ptr): New typedef.
1055         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1056
1057 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
1058
1059         GDB 8.2 released.
1060
1061 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1062             Pedro Alves  <palves@redhat.com>
1063
1064         * gnulib/Makefile.in (aclocal_m4_deps): Move to
1065         "aclocal-m4-deps.mk".  Include file here.
1066         $(srcdir)/aclocal.m4: Add "configure.ac".
1067         * gnulib/aclocal-m4-deps.mk: New file.
1068         * gnulib/update-gnulib.sh: Automatically update
1069         "aclocal-m4-deps.mk".
1070
1071 2018-09-04  Tom Tromey  <tom@tromey.com>
1072
1073         * configure: Rebuild.
1074         * configure.ac: Remove multi-ice code.
1075
1076 2018-09-04  Tom Tromey  <tom@tromey.com>
1077
1078         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1079         (ada-exp.o): Update.
1080
1081 2018-09-04  Tom Tromey  <tom@tromey.com>
1082
1083         * Makefile.in (printcmd.o, target-float.o): Remove.
1084         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1085
1086 2018-09-04  Tom Tromey  <tom@tromey.com>
1087
1088         * gnulib/Makefile.in: Remove obsolete comment.
1089         * Makefile.in: Remove obsolete comment.
1090
1091 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
1092
1093         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1094         line with '+'.
1095
1096 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1097
1098         * riscv-tdep.c: Add 'prologue-value.h' include.
1099         (struct riscv_unwind_cache): New struct.
1100         (riscv_debug_unwinder): New global.
1101         (riscv_scan_prologue): Update arguments, capture register details
1102         from prologue scan.
1103         (riscv_skip_prologue): Reformat arguments line, move end of
1104         prologue calculation into riscv_scan_prologue.
1105         (riscv_frame_cache): Update return type, create
1106         riscv_unwind_cache, scan the prologue, and fill in remaining cache
1107         details.
1108         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1109         (riscv_frame_prev_register): Use the trad_frame within the
1110         riscv_unwind_cache.
1111         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1112         flag.
1113
1114 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1115
1116         * trad-frame.h (trad_frame_set_realreg): Declare.
1117         (trad_frame_set_addr): Declare.
1118         * trad-frame.c (trad_frame_set_realreg): Define new function.
1119         (trad_frame_set_addr): Define new function.
1120         (trad_frame_set_reg_realreg): Use new function.
1121         (trad_frame_set_reg_addr): Use new function.
1122
1123 2018-09-01  Keith Seitz  <keiths@redhat.com>
1124
1125         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1126         pulongest instead of "%lld".
1127         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1128         ATTRIBUTE_UNUSED.
1129
1130 2018-08-31  Tom Tromey  <tom@tromey.com>
1131
1132         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1133         variant part type.
1134
1135 2018-08-31  Pedro Alves  <palves@redhat.com>
1136
1137         * gdbarch.h: Regenerate.
1138
1139 2018-08-31  Pedro Alves  <palves@redhat.com>
1140
1141         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1142         * target.h (Hardware watchpoint interfaces): Describe
1143         continuable/steppable/non-steppable watchpoints.
1144         * gdbarch.h, gdbarch.c: Regenerate.
1145
1146 2018-08-31  Pedro Alves  <palves@redhat.com>
1147
1148         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1149         Delete.
1150         * s390-linux-nat.c
1151         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1152         * target.h (target_ops::have_continuable_watchpoint): Delete.
1153         (target_have_continuable_watchpoint): Delete.
1154         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1155         * target-delegates.c: Regenerate.
1156
1157 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1158
1159         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1160         the files present in "gnulib/import/m4/".
1161
1162 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1163
1164         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1165         c.sw, c.swsp, and c.sdsp.
1166
1167 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1168
1169         * riscv-tdep.c (struct riscv_inferior_data): Delete.
1170         (riscv_read_misa_reg): Don't cache value read into inferior data.
1171         (riscv_new_inferior_data): Delete.
1172         (riscv_inferior_data_cleanup): Delete.
1173         (riscv_inferior_data): Delete.
1174         (riscv_invalidate_inferior_data): Delete.
1175         (_initialize_riscv_tdep): Remove initialisation of inferior data.
1176
1177 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
1178
1179         * compile/compile-cplus-types.c
1180         (compile_cplus_instance::leave_scope): Take the address of scope
1181         object.
1182         (compile_cplus_instance::convert_qualified_base): Compare quals
1183         to 0.
1184
1185 2018-08-30  Keith Seitz  <keiths@redhat.com>
1186
1187         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1188         Use "%s" and host_address_to_string instead of "%p" in printf.
1189
1190 2018-08-29  Keith Seitz  <keiths@redhat.com>
1191
1192         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1193         and compile-cplus-types.c.
1194         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1195         * c-lang.c (cplus_language_defn): Set C++ compile functions.
1196         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1197         Declare.
1198         * compile/compile-c-support.c: Include compile-cplus.h.
1199         (load_libcompile): Templatize.
1200         (get_compile_context): "New" function.
1201         (c_get_compile_context): Use get_compile_context.
1202         (cplus_get_compile_context): New function.
1203         (cplus_push_user_expression, cplus_pop_user_expression)
1204         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1205         (cplus_compute_program): Define new structs/functions.
1206         * compile/compile-cplus-symmbols.c: New file.
1207         * compile/compile-cplus-types.c: New file.
1208         * compile/compile-cplus.h: New file.
1209         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1210         Declare.
1211         * compile/compile-object-load.c (get_out_value_type): Use
1212         strncmp_iw when comparing symbol names.
1213         (compile_object_load): Add mst_bss and mst_data.
1214         * compile/compile.c (_initialize_compile): Remove
1215         -Wno-implicit-function-declaration from `compile_args'.
1216         * compile/gcc-cp-plugin.h: New file.
1217         * NEWS: Mention C++ compile support and new debug options.
1218
1219 2018-08-29  Keith Seitz  <keiths@redhat.com>
1220
1221         * linespec.c (collect_info::add_symbol): Make virtual.
1222         (struct symbol_searcher_collect_info): New struct.
1223         (symbol_searcher::find_all_symbols): New method.
1224         * symtab.h (class symbol_searcher): New class.
1225
1226 2018-08-29  Keith Seitz  <keiths@redhat.com>
1227
1228         * linespec.c (struct linespec) <function_symbols, label_symbols>:
1229         Change to vector of block_symbol.  Update all users.
1230         (struct collect_info) <symbols>: Likewise.
1231         (collect_info::add_symbol): Take block_symbol as argument.
1232         Update all callers.
1233         (decode_compound_collector) <m_symbols>: Change type to vector
1234         of block_symbol.  Update all users.
1235         (decode_compound_collector::operator ()): Change parameter type
1236         to block_symbol.
1237         (find_method, find_function_symbols, find_linespec_symbols)
1238         (find_label_symbols_in_block, find_label_symbols): Change symbol
1239         vectors to block_symbol vectors.
1240         * symtab.h (symbol_found_callback_ftype): Change parameter type to
1241         block_symbol.
1242
1243 2018-08-29  Keith Seitz  <keiths@redhat.com>
1244
1245         * linespec.c (symbolp): Remove typedef and VEC definitions.
1246         (bound_minimal_symbol_d): Likewise.
1247
1248 2018-08-29  Keith Seitz  <keiths@redhat.com>
1249
1250         * linespec.c (decode_compound_collector::decode_compound_collector):
1251         Remove initialization for `m_symtabs'.
1252         (decode_compound_collector::release_symbols): Change return type
1253         to std::vector.  Update all callers.
1254         (class decode_compound_collector) <m_symbols>: Change type to
1255         std::vector.
1256         (lookup_prefix_sym): Change return type to std::vector.  Update all
1257         callers.
1258         (compare_symbols): Remove.
1259         (std_compare_symbols): Rename to `compare_symbols'.
1260         (find_method): Change `sym_classes' parameter to std::vector.
1261         Update all callers.  Use std::sort to sort sym_classes.
1262         (find_linespec_symbols): Remove cleanup.
1263
1264 2018-08-29  Keith Seitz  <keiths@redhat.com>
1265
1266         * linespec.c (struct linespec) <minimal_symbols>: Change type to
1267         std::vector.  Update all users.
1268         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1269         (struct collect_info) <minimal_symbols>: Likewise.
1270         (compare_msymbols): Return bool.  Change parameters to const
1271         bound_minimal_symbol references.
1272         (find_method, find_function_symbols, find_linespec_symbols): Change
1273         `minsyms' parameter to std::vector.  Update all callers.
1274
1275 2018-08-29  Keith Seitz  <keiths@redhat.com>
1276
1277         * linespec.c (struct linespec) <label_symbols>: Change type to
1278         std::vector.  Update all users.
1279         (find_label_symbols_in_block): Change `result' parameter to
1280         std::vector.  Update all callers.
1281         (find_label_symbols): Return std::vector.  Update all callers.
1282
1283 2018-08-29  Keith Seitz  <keiths@redhat.com>
1284
1285         * linespec.c (struct linespec) <function_symbols>: Change type to
1286         std::vector.  Update all users.
1287         (struct collect_info) <function_symbols>: Likewise.
1288         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1289         (std_compare_symbols): New function.
1290         (find_method, find_function_symbols, find_linespec_symbols)
1291         (find_label_symbols_in_block): Change `symbols' parameter to
1292         std::vector.  Update all callers.
1293         (find_label_symbols): Likewise for `function_symbols' and
1294         `label_funcs_ret'.
1295
1296 2018-08-29  Keith Seitz  <keiths@redhat.com>
1297
1298         * linespec.c (symtab_vector_up): Define.
1299         (struct linespec) <file_symtabs>: Change type to std::vector *.
1300         Update all uses.
1301         (struct collect_info) <file_symtabs>: Likewise.
1302         (collect_symtabs_from_filename): Return symtab_vector_up.
1303         Update all callers.
1304         (decode_objc): Remove cleanup.
1305         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1306         (symtab_collector::release_symtabs): Return symtab_vector_up.
1307         Update all callers.
1308         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1309         Update all users.
1310         (collect_symtabs_from_filename, symtabs_from_filename): Return
1311         symtab_vector_up.  Update all callers.
1312
1313 2018-08-29  Tom Tromey  <tom@tromey.com>
1314
1315         * csky-tdep.c (csky_analyze_prologue): Use
1316         core_addr_to_string_nz.
1317
1318 2018-08-29  Tom Tromey  <tom@tromey.com>
1319
1320         * windows-nat.c (struct xlate_exception) <them>: Change type to
1321         DWORD.
1322         (xlate): Fix formatting.  Remove last entry.
1323         (struct xlate_exception, xlate): Comment out.
1324         (windows_nat_target::resume): Use ranged for.
1325
1326 2018-08-29  Jim Wilson  <jimw@sifive.com>
1327
1328         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1329         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1330         of NT_PRFPREG.
1331         (riscv_linux_nat_target::store_registers): Likewise.
1332
1333 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1334
1335         PR gdb/23555
1336         PR gdb/23558
1337         * gnulib/aclocal.m4: Regenerate.
1338         * gnulib/config.in: Regenerate.
1339         * gnulib/configure: Regenerate.
1340         * gnulib/import/Makefile.am: Update.
1341         * gnulib/import/Makefile.in: Update.
1342         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1343         * gnulib/import/_Noreturn.h: ... this.
1344         * gnulib/import/alloca.in.h: Update.
1345         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1346         * gnulib/import/arg-nonnull.h: ... this.
1347         * gnulib/import/assure.h: Update.
1348         * gnulib/import/at-func.c: Update.
1349         * gnulib/import/basename-lgpl.c: Update.
1350         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1351         * gnulib/import/c++defs.h: ... this.
1352         * gnulib/import/canonicalize-lgpl.c: Update.
1353         * gnulib/import/cdefs.h: Update.
1354         * gnulib/import/chdir-long.c: Update.
1355         * gnulib/import/chdir-long.h: Update.
1356         * gnulib/import/cloexec.c: Update.
1357         * gnulib/import/cloexec.h: Update.
1358         * gnulib/import/close.c: Update.
1359         * gnulib/import/closedir.c: Update.
1360         * gnulib/import/config.charset: Update.
1361         * gnulib/import/dirent-private.h: Update.
1362         * gnulib/import/dirent.in.h: Update.
1363         * gnulib/import/dirfd.c: Update.
1364         * gnulib/import/dirname-lgpl.c: Update.
1365         * gnulib/import/dirname.h: Update.
1366         * gnulib/import/dosname.h: Update.
1367         * gnulib/import/dup-safer-flag.c: Update.
1368         * gnulib/import/dup-safer.c: Update.
1369         * gnulib/import/dup.c: Update.
1370         * gnulib/import/dup2.c: Update.
1371         * gnulib/import/errno.in.h: Update.
1372         * gnulib/import/error.c: Update.
1373         * gnulib/import/error.h: Update.
1374         * gnulib/import/exitfail.c: Update.
1375         * gnulib/import/exitfail.h: Update.
1376         * gnulib/import/extra/update-copyright: Update.
1377         * gnulib/import/fchdir.c: Update.
1378         * gnulib/import/fcntl.c: Update.
1379         * gnulib/import/fcntl.in.h: Update.
1380         * gnulib/import/fd-hook.c: Update.
1381         * gnulib/import/fd-hook.h: Update.
1382         * gnulib/import/fd-safer-flag.c: Update.
1383         * gnulib/import/fd-safer.c: Update.
1384         * gnulib/import/fdopendir.c: Update.
1385         * gnulib/import/filename.h: Update.
1386         * gnulib/import/filenamecat-lgpl.c: Update.
1387         * gnulib/import/filenamecat.h: Update.
1388         * gnulib/import/flexmember.h: Update.
1389         * gnulib/import/float+.h: Update.
1390         * gnulib/import/float.c: Update.
1391         * gnulib/import/float.in.h: Update.
1392         * gnulib/import/fnmatch.c: Update.
1393         * gnulib/import/fnmatch.in.h: Update.
1394         * gnulib/import/fnmatch_loop.c: Update.
1395         * gnulib/import/fpucw.h: Update.
1396         * gnulib/import/frexp.c: Update.
1397         * gnulib/import/frexpl.c: Update.
1398         * gnulib/import/fstat.c: Update.
1399         * gnulib/import/fstatat.c: Update.
1400         * gnulib/import/getcwd-lgpl.c: Update.
1401         * gnulib/import/getcwd.c: Update.
1402         * gnulib/import/getdtablesize.c: Update.
1403         * gnulib/import/getlogin_r.c: Update.
1404         * gnulib/import/getprogname.c: Update.
1405         * gnulib/import/getprogname.h: Update.
1406         * gnulib/import/gettext.h: Update.
1407         * gnulib/import/gettimeofday.c: Update.
1408         * gnulib/import/glob-libc.h: Update.
1409         * gnulib/import/glob.c: Update.
1410         * gnulib/import/glob.in.h: Update.
1411         * gnulib/import/glob_internal.h: Update.
1412         * gnulib/import/glob_pattern_p.c: Update.
1413         * gnulib/import/globfree.c: Update.
1414         * gnulib/import/hard-locale.c: Update.
1415         * gnulib/import/hard-locale.h: Update.
1416         * gnulib/import/intprops.h: Update.
1417         * gnulib/import/inttypes.in.h: Update.
1418         * gnulib/import/isnan.c: Update.
1419         * gnulib/import/isnand-nolibm.h: Update.
1420         * gnulib/import/isnand.c: Update.
1421         * gnulib/import/isnanl-nolibm.h: Update.
1422         * gnulib/import/isnanl.c: Update.
1423         * gnulib/import/itold.c: Update.
1424         * gnulib/import/libc-config.h: Update.
1425         * gnulib/import/limits.in.h: Update.
1426         * gnulib/import/localcharset.c: Update.
1427         * gnulib/import/localcharset.h: Update.
1428         * gnulib/import/localtime-buffer.c: Update.
1429         * gnulib/import/localtime-buffer.h: Update.
1430         * gnulib/import/lstat.c: Update.
1431         * gnulib/import/m4/00gnulib.m4: Update.
1432         * gnulib/import/m4/__inline.m4: Update.
1433         * gnulib/import/m4/absolute-header.m4: Update.
1434         * gnulib/import/m4/alloca.m4: Update.
1435         * gnulib/import/m4/builtin-expect.m4: Update.
1436         * gnulib/import/m4/canonicalize.m4: Update.
1437         * gnulib/import/m4/chdir-long.m4: Update.
1438         * gnulib/import/m4/close.m4: Update.
1439         * gnulib/import/m4/closedir.m4: Update.
1440         * gnulib/import/m4/configmake.m4: Update.
1441         * gnulib/import/m4/d-ino.m4: Update.
1442         * gnulib/import/m4/d-type.m4: Update.
1443         * gnulib/import/m4/dirent_h.m4: Update.
1444         * gnulib/import/m4/dirfd.m4: Update.
1445         * gnulib/import/m4/dirname.m4: Update.
1446         * gnulib/import/m4/double-slash-root.m4: Update.
1447         * gnulib/import/m4/dup.m4: Update.
1448         * gnulib/import/m4/dup2.m4: Update.
1449         * gnulib/import/m4/eealloc.m4: Update.
1450         * gnulib/import/m4/environ.m4: Update.
1451         * gnulib/import/m4/errno_h.m4: Update.
1452         * gnulib/import/m4/error.m4: Update.
1453         * gnulib/import/m4/exponentd.m4: Update.
1454         * gnulib/import/m4/exponentl.m4: Update.
1455         * gnulib/import/m4/extensions.m4: Update.
1456         * gnulib/import/m4/extern-inline.m4: Update.
1457         * gnulib/import/m4/fchdir.m4: Update.
1458         * gnulib/import/m4/fcntl-o.m4: Update.
1459         * gnulib/import/m4/fcntl.m4: Update.
1460         * gnulib/import/m4/fcntl_h.m4: Update.
1461         * gnulib/import/m4/fdopendir.m4: Update.
1462         * gnulib/import/m4/filenamecat.m4: Update.
1463         * gnulib/import/m4/flexmember.m4: Update.
1464         * gnulib/import/m4/float_h.m4: Update.
1465         * gnulib/import/m4/fnmatch.m4: Update.
1466         * gnulib/import/m4/fnmatch_h.m4: Update.
1467         * gnulib/import/m4/fpieee.m4: Update.
1468         * gnulib/import/m4/frexp.m4: Update.
1469         * gnulib/import/m4/frexpl.m4: Update.
1470         * gnulib/import/m4/fstat.m4: Update.
1471         * gnulib/import/m4/fstatat.m4: Update.
1472         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1473         * gnulib/import/m4/getcwd-path-max.m4: Update.
1474         * gnulib/import/m4/getcwd.m4: Update.
1475         * gnulib/import/m4/getdtablesize.m4: Update.
1476         * gnulib/import/m4/getlogin.m4: Update.
1477         * gnulib/import/m4/getlogin_r.m4: Update.
1478         * gnulib/import/m4/getpagesize.m4: Update.
1479         * gnulib/import/m4/getprogname.m4: Update.
1480         * gnulib/import/m4/gettimeofday.m4: Update.
1481         * gnulib/import/m4/glibc21.m4: Update.
1482         * gnulib/import/m4/glob.m4: Update.
1483         * gnulib/import/m4/glob_h.m4: Update.
1484         * gnulib/import/m4/gnulib-cache.m4: Update.
1485         * gnulib/import/m4/gnulib-common.m4: Update.
1486         * gnulib/import/m4/gnulib-comp.m4: Update.
1487         * gnulib/import/m4/gnulib-tool.m4: Update.
1488         * gnulib/import/m4/hard-locale.m4: Update.
1489         * gnulib/import/m4/include_next.m4: Update.
1490         * gnulib/import/m4/inttypes-pri.m4: Update.
1491         * gnulib/import/m4/inttypes.m4: Update.
1492         * gnulib/import/m4/isnand.m4: Update.
1493         * gnulib/import/m4/isnanl.m4: Update.
1494         * gnulib/import/m4/largefile.m4: Update.
1495         * gnulib/import/m4/limits-h.m4: Update.
1496         * gnulib/import/m4/localcharset.m4: Update.
1497         * gnulib/import/m4/locale-fr.m4: Update.
1498         * gnulib/import/m4/locale-ja.m4: Update.
1499         * gnulib/import/m4/locale-zh.m4: Update.
1500         * gnulib/import/m4/localtime-buffer.m4: Update.
1501         * gnulib/import/m4/longlong.m4: Update.
1502         * gnulib/import/m4/lstat.m4: Update.
1503         * gnulib/import/m4/malloc.m4: Update.
1504         * gnulib/import/m4/malloca.m4: Update.
1505         * gnulib/import/m4/math_h.m4: Update.
1506         * gnulib/import/m4/mbrtowc.m4: Update.
1507         * gnulib/import/m4/mbsinit.m4: Update.
1508         * gnulib/import/m4/mbsrtowcs.m4: Update.
1509         * gnulib/import/m4/mbstate_t.m4: Update.
1510         * gnulib/import/m4/memchr.m4: Update.
1511         * gnulib/import/m4/memmem.m4: Update.
1512         * gnulib/import/m4/mempcpy.m4: Update.
1513         * gnulib/import/m4/memrchr.m4: Update.
1514         * gnulib/import/m4/mkdir.m4: Update.
1515         * gnulib/import/m4/mkstemp.m4: Update.
1516         * gnulib/import/m4/mmap-anon.m4: Update.
1517         * gnulib/import/m4/mode_t.m4: Update.
1518         * gnulib/import/m4/msvc-inval.m4: Update.
1519         * gnulib/import/m4/msvc-nothrow.m4: Update.
1520         * gnulib/import/m4/multiarch.m4: Update.
1521         * gnulib/import/m4/nocrash.m4: Update.
1522         * gnulib/import/m4/off_t.m4: Update.
1523         * gnulib/import/m4/onceonly.m4: Update.
1524         * gnulib/import/m4/open-cloexec.m4: Update.
1525         * gnulib/import/m4/open.m4: Update.
1526         * gnulib/import/m4/openat.m4: Update.
1527         * gnulib/import/m4/opendir.m4: Update.
1528         * gnulib/import/m4/pathmax.m4: Update.
1529         * gnulib/import/m4/rawmemchr.m4: Update.
1530         * gnulib/import/m4/readdir.m4: Update.
1531         * gnulib/import/m4/readlink.m4: Update.
1532         * gnulib/import/m4/realloc.m4: Update.
1533         * gnulib/import/m4/rename.m4: Update.
1534         * gnulib/import/m4/rewinddir.m4: Update.
1535         * gnulib/import/m4/rmdir.m4: Update.
1536         * gnulib/import/m4/save-cwd.m4: Update.
1537         * gnulib/import/m4/secure_getenv.m4: Update.
1538         * gnulib/import/m4/setenv.m4: Update.
1539         * gnulib/import/m4/signal_h.m4: Update.
1540         * gnulib/import/m4/ssize_t.m4: Update.
1541         * gnulib/import/m4/stat-time.m4: Update.
1542         * gnulib/import/m4/stat.m4: Update.
1543         * gnulib/import/m4/std-gnu11.m4: Update.
1544         * gnulib/import/m4/stdbool.m4: Update.
1545         * gnulib/import/m4/stddef_h.m4: Update.
1546         * gnulib/import/m4/stdint.m4: Update.
1547         * gnulib/import/m4/stdio_h.m4: Update.
1548         * gnulib/import/m4/stdlib_h.m4: Update.
1549         * gnulib/import/m4/strchrnul.m4: Update.
1550         * gnulib/import/m4/strdup.m4: Update.
1551         * gnulib/import/m4/strerror.m4: Update.
1552         * gnulib/import/m4/string_h.m4: Update.
1553         * gnulib/import/m4/strstr.m4: Update.
1554         * gnulib/import/m4/strtok_r.m4: Update.
1555         * gnulib/import/m4/sys_socket_h.m4: Update.
1556         * gnulib/import/m4/sys_stat_h.m4: Update.
1557         * gnulib/import/m4/sys_time_h.m4: Update.
1558         * gnulib/import/m4/sys_types_h.m4: Update.
1559         * gnulib/import/m4/tempname.m4: Update.
1560         * gnulib/import/m4/time_h.m4: Update.
1561         * gnulib/import/m4/unistd-safer.m4: Update.
1562         * gnulib/import/m4/unistd_h.m4: Update.
1563         * gnulib/import/m4/warn-on-use.m4: Update.
1564         * gnulib/import/m4/wchar_h.m4: Update.
1565         * gnulib/import/m4/wchar_t.m4: Update.
1566         * gnulib/import/m4/wctype_h.m4: Update.
1567         * gnulib/import/m4/wint_t.m4: Update.
1568         * gnulib/import/malloc.c: Update.
1569         * gnulib/import/malloc/scratch_buffer.h: Update.
1570         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1571         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1572         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1573         * gnulib/import/malloca.c: Update.
1574         * gnulib/import/malloca.h: Update.
1575         * gnulib/import/malloca.valgrind: Update.
1576         * gnulib/import/math.in.h: Update.
1577         * gnulib/import/mbrtowc.c: Update.
1578         * gnulib/import/mbsinit.c: Update.
1579         * gnulib/import/mbsrtowcs-impl.h: Update.
1580         * gnulib/import/mbsrtowcs-state.c: Update.
1581         * gnulib/import/mbsrtowcs.c: Update.
1582         * gnulib/import/memchr.c: Update.
1583         * gnulib/import/memmem.c: Update.
1584         * gnulib/import/mempcpy.c: Update.
1585         * gnulib/import/memrchr.c: Update.
1586         * gnulib/import/mkdir.c: Update.
1587         * gnulib/import/mkstemp.c: Update.
1588         * gnulib/import/msvc-inval.c: Update.
1589         * gnulib/import/msvc-inval.h: Update.
1590         * gnulib/import/msvc-nothrow.c: Update.
1591         * gnulib/import/msvc-nothrow.h: Update.
1592         * gnulib/import/open.c: Update.
1593         * gnulib/import/openat-die.c: Update.
1594         * gnulib/import/openat-priv.h: Update.
1595         * gnulib/import/openat-proc.c: Update.
1596         * gnulib/import/openat.c: Update.
1597         * gnulib/import/openat.h: Update.
1598         * gnulib/import/opendir.c: Update.
1599         * gnulib/import/pathmax.h: Update.
1600         * gnulib/import/pipe-safer.c: Update.
1601         * gnulib/import/rawmemchr.c: Update.
1602         * gnulib/import/readdir.c: Update.
1603         * gnulib/import/readlink.c: Update.
1604         * gnulib/import/realloc.c: Update.
1605         * gnulib/import/ref-add.sin: Update.
1606         * gnulib/import/ref-del.sin: Update.
1607         * gnulib/import/rename.c: Update.
1608         * gnulib/import/rewinddir.c: Update.
1609         * gnulib/import/rmdir.c: Update.
1610         * gnulib/import/same-inode.h: Update.
1611         * gnulib/import/save-cwd.c: Update.
1612         * gnulib/import/save-cwd.h: Update.
1613         * gnulib/import/scratch_buffer.h: Update.
1614         * gnulib/import/secure_getenv.c: Update.
1615         * gnulib/import/setenv.c: Update.
1616         * gnulib/import/signal.in.h: Update.
1617         * gnulib/import/stat-time.c: Update.
1618         * gnulib/import/stat-time.h: Update.
1619         * gnulib/import/stat-w32.c: Update.
1620         * gnulib/import/stat-w32.h: Update.
1621         * gnulib/import/stat.c: Update.
1622         * gnulib/import/stdbool.in.h: Update.
1623         * gnulib/import/stddef.in.h: Update.
1624         * gnulib/import/stdint.in.h: Update.
1625         * gnulib/import/stdio.in.h: Update.
1626         * gnulib/import/stdlib.in.h: Update.
1627         * gnulib/import/str-two-way.h: Update.
1628         * gnulib/import/strchrnul.c: Update.
1629         * gnulib/import/strdup.c: Update.
1630         * gnulib/import/streq.h: Update.
1631         * gnulib/import/strerror-override.c: Update.
1632         * gnulib/import/strerror-override.h: Update.
1633         * gnulib/import/strerror.c: Update.
1634         * gnulib/import/string.in.h: Update.
1635         * gnulib/import/stripslash.c: Update.
1636         * gnulib/import/strnlen1.c: Update.
1637         * gnulib/import/strnlen1.h: Update.
1638         * gnulib/import/strstr.c: Update.
1639         * gnulib/import/strtok_r.c: Update.
1640         * gnulib/import/sys_stat.in.h: Update.
1641         * gnulib/import/sys_time.in.h: Update.
1642         * gnulib/import/sys_types.in.h: Update.
1643         * gnulib/import/tempname.c: Update.
1644         * gnulib/import/tempname.h: Update.
1645         * gnulib/import/time.in.h: Update.
1646         * gnulib/import/unistd--.h: Update.
1647         * gnulib/import/unistd-safer.h: Update.
1648         * gnulib/import/unistd.in.h: Update.
1649         * gnulib/import/unsetenv.c: Update.
1650         * gnulib/import/verify.h: Update.
1651         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1652         * gnulib/import/wchar.in.h: Update.
1653         * gnulib/import/wctype.in.h: Update.
1654         * gnulib/import/xalloc-oversized.h: Update.
1655         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1656         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1657
1658 2018-08-16  Gary Benson <gbenson@redhat.com>
1659
1660         PR gdb/13000:
1661         * gdb/main.c (captured_main_1): Exit with nonzero status
1662         in batch mode if the last command to be executed failed.
1663         * NEWS: Mention the above.
1664
1665 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
1666
1667         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1668         end of warning message.
1669
1670 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1671
1672         PR gdb/22943:
1673         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1674         (aarch64_extract_return_value): Use
1675         aapcs_is_vfp_call_or_return_candidate.
1676         (aarch64_return_in_memory): Likewise.
1677         (aarch64_store_return_value): Likewise.
1678
1679 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1680
1681         * aarch64-tdep.c
1682         (aapcs_is_vfp_call_or_return_candidate): Make static
1683         (pass_in_v_or_stack): Remove function.
1684         (pass_in_v_vfp_candidate): New function.
1685         (aarch64_push_dummy_call): Check for float register candidates.
1686
1687 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1688
1689         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1690         (aapcs_is_vfp_call_or_return_candidate_1): New function.
1691         (aapcs_is_vfp_call_or_return_candidate): Likewise.
1692
1693 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
1694
1695         PR build/23399
1696         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1697         (struct ipa_sym_addresses): Rename to...
1698         (struct ipa_sym_addresses_common): ... this.
1699         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1700
1701 2018-08-28  Tom Tromey  <tom@tromey.com>
1702
1703         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1704         (token_fifo): Now a std::vector.
1705         (yylex, c_parse): Update.
1706         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1707         (token_fifo): Now a std::vector.
1708         (yylex, d_parse): Update.
1709         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1710         (token_fifo): Now a std::vector.
1711         (yylex, go_parse): Update.
1712
1713 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
1714
1715         * parser-defs.h (struct type_stack) <elements>: Change type to
1716         std::vector<union type_stack_elt>.
1717         <depth, size>: Remove.
1718         * parse.c (parse_exp_in_context_1): Adjust.
1719         (type_stack_reserve): Remove.
1720         (check_type_stack_depth): Remove.
1721         (insert_into_type_stack): Adjust to std::vector.
1722         (insert_type): Likewise.
1723         (push_type): Likewise.
1724         (push_type_int): Likewise.
1725         (insert_type_address_space): Likewise.
1726         (pop_type): Likewise.
1727         (pop_type_int): Likewise.
1728         (pop_typelist): Likewise.
1729         (pop_type_stack): Likewise.
1730         (append_type_stack): Likewise.
1731         (push_type_stack): Likewise.
1732         (get_type_stack): Likewise.
1733         (type_stack_cleanup): Likewise.
1734         (push_typelist): Likewise.
1735         (follow_types): Likewise.
1736         (_initialize_parse): Likewise.
1737
1738 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1739
1740         * NEWS: Mention csky target.
1741
1742 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
1743             Hafiz Abid Qadeer  <abidh@codesourcery.com>
1744             Don Breazeal  <donb@codesourcery.com>
1745
1746         * csky-linux-tdep.c: New file.
1747         * csky-tdep.c: Likewise.
1748         * csky-tdep.h: Likewise.
1749         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1750         csky-tdep.o.
1751         (HFILES_NO_SRCDIR): Add csky-tdep.h.
1752         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1753         * configure.tgt: Add csky support.
1754
1755 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
1756
1757         * python/py-framefilter.c (py_print_frame): Print frame architecture
1758         when printing on an MI output.
1759
1760 2018-08-27  Tom Tromey  <tom@tromey.com>
1761
1762         PR build/23087:
1763         * configure: Rebuild.
1764         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1765
1766 2018-08-27  Tom Tromey  <tom@tromey.com>
1767
1768         * aarch64-linux-tdep.c
1769         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1770         casts to int.
1771
1772 2018-08-27  Tom Tromey  <tom@tromey.com>
1773
1774         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1775         unsigned.
1776         (ppc64_standard_linkage1, ppc64_standard_linkage2)
1777         (ppc64_standard_linkage3, ppc64_standard_linkage4)
1778         (ppc64_standard_linkage5, ppc64_standard_linkage6)
1779         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1780         unsigned.
1781
1782 2018-08-27  Tom Tromey  <tom@tromey.com>
1783
1784         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1785         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1786
1787 2018-08-27  Tom Tromey  <tom@tromey.com>
1788
1789         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1790         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1791         ULONGEST_MAX.
1792         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1793         ULONGEST_MAX.
1794         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1795         ULONGEST_MAX.
1796         * sparc-linux-tdep.c (sparc32_linux_sigframe)
1797         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1798         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1799         ULONGEST_MAX.
1800         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1801         (ppc64_linux_sigaction_tramp_frame)
1802         (ppc32_linux_sighandler_tramp_frame)
1803         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1804         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1805         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1806         * mn10300-linux-tdep.c (am33_linux_sigframe)
1807         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1808         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1809         * mips-linux-tdep.c (mips_linux_o32_sigframe)
1810         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1811         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1812         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1813         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1814         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1815         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1816         * microblaze-linux-tdep.c
1817         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1818         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1819         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1820         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1821         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1822         * common/common-types.h (ULONGEST_MAX): New define.
1823         (CORE_ADDR_MAX): Fix formatting.
1824         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1825         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1826         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1827         (arm_linux_rt_sigreturn_tramp_frame)
1828         (arm_eabi_linux_sigreturn_tramp_frame)
1829         (arm_eabi_linux_rt_sigreturn_tramp_frame)
1830         (thumb2_eabi_linux_sigreturn_tramp_frame)
1831         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1832         (arm_linux_restart_syscall_tramp_frame)
1833         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1834         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1835         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1836         ULONGEST_MAX.
1837         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1838
1839 2018-08-27  Tom Tromey  <tom@tromey.com>
1840
1841         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1842         CORE_ADDR_MAX.
1843         * mips-tdep.c (mips_deal_with_atomic_sequence)
1844         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1845         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1846         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1847         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1848         CORE_ADDR_MAX.
1849         * aarch64-tdep.c (aarch64_software_single_step): Use
1850         CORE_ADDR_MAX.
1851
1852 2018-08-27  Tom Tromey  <tom@tromey.com>
1853
1854         * linespec.c (complete_linespec_component): Add cast to "char".
1855         * completer.c (completion_tracker::build_completion_result): Add
1856         cast to "char".
1857
1858 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1859
1860         * solist.h (struct solist, struct target_so_ops): Fix
1861         indentation.
1862
1863 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1864
1865         * ada-tasks.c (ada_task_info_s): Remove typedef.
1866         (DEF_VEC_O(ada_task_info_s)): Remove.
1867         (struct ada_tasks_inferior_data): Initialize fields.
1868         <task_list>: Make an std::vector.
1869         (get_ada_tasks_inferior_data): Allocate with new.
1870         (ada_get_task_number): Adjust.
1871         (get_task_number_from_id): Likewise.
1872         (valid_task_id): Likewise.
1873         (ada_get_task_info_from_ptid): Likewise.
1874         (iterate_over_live_ada_tasks): Likewise.
1875         (add_ada_task): Likewise.
1876         (read_known_tasks): Likewise.
1877         (ada_build_task_list): Likewise.
1878         (print_ada_task_info): Likewise.
1879         (info_task): Likewise.
1880         (task_command_1): Likewise.
1881
1882 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1883
1884         * ada-lang.c (add_angle_brackets): Return std::string.
1885
1886 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
1887
1888         * python/py-threadevent.c (py_get_event_thread): Initialize
1889         pythread.
1890
1891 2018-08-24  Pedro Alves  <palves@redhat.com>
1892
1893         * python/py-bpevent.c (create_breakpoint_event_object): Use
1894         copy-initialization.
1895         * python/py-continueevent.c (emit_continue_event): Use
1896         copy-initialization.
1897         * python/py-exitedevent.c (create_exited_event_object): Return a
1898         gdbpy_ref<>.
1899         (emit_exited_event): Use copy-initialization.
1900         * python/py-inferior.c (python_new_inferior)
1901         (python_inferior_deleted, add_thread_object): Use
1902         copy-initialization.
1903         * python/py-infevents.c (create_inferior_call_event_object)
1904         (create_register_changed_event_object)
1905         (create_memory_changed_event_object): Return a gdbpy_ref<>.
1906         (emit_inferior_call_event, emit_memory_changed_event)
1907         (emit_register_changed_event): Use copy-initialization.
1908         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1909         Return a gdbpy_ref<>.
1910         (emit_new_objfile_event): Use copy-initialization.
1911         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1912         (emit_clear_objfiles_event): Use copy-initialization.
1913         * python/py-signalevent.c (create_signal_event_object): Use
1914         copy-initialization.
1915         * python/py-threadevent.c (create_thread_event_object): Use
1916         copy-initialization.
1917
1918 2018-08-24  Pedro Alves  <palves@redhat.com>
1919             Simon Marchi  <simon.marchi@ericsson.com>
1920
1921         PR gdb/23379
1922         * python/py-continueevent.c: Include "gdbthread.h".
1923         (create_continue_event_object): Add intro comment.  Add 'ptid'
1924         parameter.  Use it to find thread to pass to
1925         create_thread_event_object.
1926         (emit_continue_event): Pass PTID down to
1927         create_continue_event_object.
1928         * python/py-event.h (py_get_event_thread): Declare.
1929         (create_thread_event_object): Remove default from 'thread'
1930         parameter.
1931         * python/py-stopevent.c (create_stop_event_object): Use
1932         py_get_event_thread.
1933         * python/py-threadevent.c (get_event_thread): Rename to ...
1934         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1935         and use it to find the thread.
1936         (create_thread_event_object): Assert that THREAD isn't null.
1937         Don't find the event thread here.
1938
1939 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
1940
1941         * block.h (blockrange, blockranges): New struct declarations.
1942         (struct block): Add new field named `ranges'.
1943         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1944         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1945         macros for accessing ranges in struct block.
1946         (make_blockranges): New declaration.
1947         block.c (make_blockranges): New function.
1948         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1949         for block.
1950         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1951         * blockframe.c (cache_pc_function_block): New static global.
1952         (clear_pc_function_cache): Clear cache_pc_function_block.
1953         (find_pc_partial_function): Move comment to symtab.h.  Add
1954         support for non-contiguous blocks.
1955         * cli/cli-cmds.c (block.h): Include.
1956         (print_disassembly): Handle printing of non-contiguous blocks.
1957         (disassemble_current_function): Likewise.
1958         (disassemble_command): Likewise.
1959
1960         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1961         BLOCK_START.
1962         * blockframe.c (get_pc_function_start): Likewise.
1963         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1964         (gcc_symbol_address): Likewise.
1965         * compile/compile-object-run.c (compile_object_run): Likewise.
1966         * compile/compile.c (get_expr_block_and_pc): Likewise.
1967         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1968         (func_addr_to_tail_call_list): Likewise.
1969         * findvar.c (default_read_var_value): Likewise.
1970         * inline-frame.c (inline_frame_this_id): Likewise.
1971         (skip-inline_frames): Likewise.
1972         * infcmd.c (until_next_command): Likewise.
1973         * linespec.c (convert_linespec_to_sals): Likewise.
1974         * parse.c (parse_exp_in_context_1): Likewise.
1975         * printcmd.c (build_address_symbolic): likewise.
1976         (info_address_command): Likewise.
1977         symtab.c (find_function_start_sal): Likewise.
1978         (skip_prologue_sal): Likewise.
1979         (find_function_alias_target): Likewise.
1980         (find_gnu_ifunc): Likewise.
1981         * stack.c (find_frame_funname): Likewise.
1982         * symtab.c (fixup_symbol_section): Likewise.
1983         (find_function_start_sal): Likewise.
1984         (skip_prologue_sal): Likewsie.
1985         (find_function_alias_target): Likewise.
1986         (find_gnu_ifunc): Likewise.
1987         * tracepoint.c (info_scope_command): Likewise.
1988         * value.c (value_fn_field): Likewise.
1989
1990         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1991         in place of find_pc_partial_function.
1992         * blockframe.c (find_function_entry_range_from_pc): New function.
1993         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1994         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1995         for each range in a block.
1996
1997
1998 2018-08-23  Xavier Roirand  <roirand@adacore.com>
1999
2000         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2001         incrementation.
2002
2003 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2004
2005         * solib-svr4.c (read_program_headers_from_bfd): Return
2006         gdb::optional<gdb::byte_vector>.
2007         (svr4_exec_displacement): Adjust.
2008
2009 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2010
2011         * solib-svr4.c (read_program_header): Return
2012         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2013         (find_program_interpreter): Return
2014         gdb::optional<gdb::byte_vector>.
2015         (scan_dyntag_auxv): Adjust.
2016         (enable_break): Adjust.
2017         (svr4_exec_displacement): Adjust.
2018
2019 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2020
2021         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2022         * inf-child.c (inf_child_target::terminal_save_inferior): New.
2023
2024 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2025
2026         * guile/scm-string.c (gdbscm_scm_from_printf): Use
2027         string_vprintf.
2028         * guile/scm-utils.c (gdbscm_printf): Likewise.
2029         * serial.c (serial_printf): Likewise.
2030         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2031
2032 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
2033
2034         * stack.c (print_frame): Print frame architecture when printing on
2035         an MI output.
2036         * NEWS: Mention new "arch" attribute in frame output.
2037
2038 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2039
2040         * arch/aarch64.h (aarch64_regnum): Update comment.
2041
2042 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2043
2044         * NEWS: Add SVE to 8.2 section.
2045
2046 2018-08-21  Pedro Alves  <palves@redhat.com>
2047
2048         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2049         out from gdbscm_parse_function_args.
2050         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2051         gdbscm_parse_function_args_1.
2052
2053 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
2054
2055         PR gdb/17816
2056         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2057         operator.
2058
2059 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
2060
2061         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2062
2063 2018-08-19  Michael Spang  <spang@google.com>
2064
2065         PR gdb/11786
2066         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2067         for PT_TLS segments.
2068
2069 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
2070
2071         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2072         dwarf_variable_value.
2073         * dwarf2-frame.c (class dwarf_expr_executor):
2074         Add override for dwarf_variable_value.
2075         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2076         (class symbol_needs_eval_context): Likewise.
2077         (indirect_synthetic_pointer): Add forward declaration.
2078         (sect_variable_value): New function.
2079         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2080         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2081         for DW_OP_GNU_variable_value.
2082
2083 2018-08-16  Tom Tromey  <tom@tromey.com>
2084
2085         * top.c (read_command_file): Update.
2086         (command_line_input): Remove "repeat" argument.
2087         * ada-lang.c (get_selections): Update.
2088         * linespec.c (decode_line_2): Update.
2089         * defs.h (command_line_input): Remove argument.
2090         * cli/cli-script.c (read_next_line): Update.
2091         * python/py-gdb-readline.c: Update.
2092
2093 2018-08-17  Tom Tromey  <tom@tromey.com>
2094
2095         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2096         command_line_input.
2097
2098 2018-08-15  Tom Tromey  <tom@tromey.com>
2099
2100         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2101
2102 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
2103
2104         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2105         If used, use find_pc_partial_function to find address range
2106         to disassemble.
2107         * mi/mi-main.c (mi_cmd_list_features): Report
2108         "data-disassemble-a-option" feature.
2109         * NEWS: Mention new -data-disassemble option -a.
2110
2111 2018-08-13  Tom Tromey  <tom@tromey.com>
2112
2113         * common/common-defs.h (_FORTIFY_SOURCE): Define.
2114
2115 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2116
2117         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2118         (aarch64_linux_collect_sve_regset): Likewise.
2119         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2120         * regcache.h (regcache_map_entry_size): New function.
2121
2122 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2123
2124         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2125         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2126         (SVE_HEADER_VL_LENGTH): Likewise.
2127         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2128         (SVE_HEADER_FLAGS_LENGTH): Likewise.
2129         (SVE_HEADER_RESERVED_LENGTH): Likewise.
2130         (SVE_HEADER_SIZE_OFFSET): Likewise.
2131         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2132         (SVE_HEADER_VL_OFFSET): Likewise.
2133         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2134         (SVE_HEADER_FLAGS_OFFSET): Likewise.
2135         (SVE_HEADER_RESERVED_OFFSET): Likewise.
2136         (SVE_HEADER_SIZE): Likewise.
2137         (aarch64_linux_core_read_vq): Add function.
2138         (aarch64_linux_core_read_description): Check for SVE section.
2139
2140 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2141
2142         * aarch64-fbsd-tdep.c
2143         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2144         collect_size.
2145         * aarch64-linux-tdep.c
2146         (aarch64_linux_iterate_over_regset_sections): Likewise.
2147         * alpha-linux-tdep.c
2148         (alpha_linux_iterate_over_regset_sections):
2149         * alpha-nbsd-tdep.c
2150         (alphanbsd_iterate_over_regset_sections): Likewise.
2151         * amd64-fbsd-tdep.c
2152         (amd64fbsd_iterate_over_regset_sections): Likewise.
2153         * amd64-linux-tdep.c
2154         (amd64_linux_iterate_over_regset_sections): Likewise.
2155         * arm-bsd-tdep.c
2156         (armbsd_iterate_over_regset_sections): Likewise.
2157         * arm-fbsd-tdep.c
2158         (arm_fbsd_iterate_over_regset_sections): Likewise.
2159         * arm-linux-tdep.c
2160         (arm_linux_iterate_over_regset_sections): Likewise.
2161         * corelow.c (get_core_registers_cb): Likewise.
2162         (core_target::fetch_registers): Likewise.
2163         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2164         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2165         * gdbarch.h (void): Regenerate.
2166         * gdbarch.sh: Add supply_size and collect_size.
2167         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2168         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2169         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2170         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2171         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2172         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2173         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2174         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2175         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2176         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2177         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2178         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2179         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2180         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2181         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2182         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2183         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2184         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2185         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2186         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2187         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2188         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2189         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2190         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2191         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2192         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2193         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2194         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2195         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2196         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2197
2198 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
2199
2200         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2201         with string_printf.
2202
2203 2018-08-10  Keith Seitz  <keiths@redhat.com>
2204
2205         * compile/compile-c-support.c (add_code_header, add_code_footer):
2206         Move into policy class.
2207         (c_push_user_expression, pop_user_expression_nop)
2208         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2209         (compile_program): New host class.
2210         (c_compile_program): New typedef.
2211         (c_compute_porgram): Use c_compile_program.
2212
2213 2018-08-10  Keith Seitz  <keiths@redhat.com>
2214
2215         * compile/compile-internal.h (compile_instance::~compile_instance):
2216         Remove calls to htab_delete.
2217         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2218         * compile.c (compile_instance::compile_instance): Initialize
2219         htab unique pointers.
2220         (compile_instance::get_cached_type, compile_instance::insert_type)
2221         (compile_instance::error_symbol_once): Update for unique_ptr.
2222
2223 2018-08-10  Keith Seitz  <keiths@redhat.com>
2224
2225         * compile/compile-c-symbols.c (struct symbol_error)
2226         (hash_symbol_error, eq_symbol_error, del_symbol_error)
2227         (compile_instance::insert_symbol_error)
2228         (compile_instance::error_symbol_once): Move to ...
2229         * compile/compile.c: ... here.
2230
2231 2018-08-10  Keith Seitz  <keiths@redhat.com>
2232
2233         * compile/compile-c-support.c (c_get_compile_context): Use `new'
2234         instead of `new_compile_instance'.
2235         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2236         Update description.
2237         If the symbol error map is not initialized, create it.
2238         (generate_c_for_for_one_symbol): Do not check/initialize
2239         the symbol error map.
2240         * compile/compile-c-types.c (compile_c_instance): Make a class.
2241         Update all callers.
2242         (compile_instance::compile_instance): Initialize the type cache.
2243         (get_cached_type): New function.
2244         (insert_type): Update description.
2245         (compile_c_instance::m_default_cflags): Define.
2246         (convert_type): Update description.  Use get_cached_type.
2247         (delete_instance): Moved to destructor.
2248         (new_compile_instance): Moved to constructor.
2249         * compile/compile-c.h (compile_c_instance): Make class inheriting
2250         from compile_instance.
2251         <base>: Remove field.
2252         <type_map, symbol_err_map>: Move to base class.
2253         <c_plugin>: Rename to `m_plugin' and remove pointer type.
2254         * compile/compile-internal.h (compile_instance): Make class.
2255         <type_map_t, symbol_err_map_t>: Define.
2256         <fe>: Rename to `m_gcc_fe'.
2257         <scope, block, gcc_target_options>: Add `m_' prefix.
2258         <m_type_map, m_symbol_err_map>: New fields, moved from
2259         compile_c_instance.
2260         <destroy>: Remove.
2261         (convert_type, new_compile_instance): Remove.
2262         * compile/compile.c (cleanup_compile_instance): Remove.
2263         (compile_to_object): Use unique_ptr to eliminate cleanups.
2264         (compile_instance::set_print_callback, compile_instance::version)
2265         (compile_instance::set_verbose)
2266         (compile_instance::set_driver_filename)
2267         (compile_instance::set_triplet_regexp)
2268         (compile_instance::set_arguments)
2269         (compile_instance::set_source_file)
2270         (compile_instance::compile): Define.
2271
2272 2018-08-10  Keith Seitz  <keiths@redhat.com>
2273
2274         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2275         * compile/compile-c-types.c: Define GCC_METHODN macros and include
2276         gcc-c-fe.def to define C plugin.
2277         (delete_instance): Delete `c_plugin'.
2278         (new_compile_instance): Initialize `c_plugin'.
2279         * compile/compile-c.h: Include gcc_c_plugin.h.
2280         (struct compile_c_instance) <c_plugin>: New member.
2281         * gcc-c-plugin.h: New file.
2282         Update all callers with API change.
2283
2284 2018-08-10  Keith Seitz  <keiths@redhat.com>
2285
2286         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2287         (HFILES_NO_SRCDIR): ... to here.
2288         Add compile-internal.h and compile-c.h.
2289         * compile/compile-c-support.c: Include compile-c.h.
2290         * compile/compile-c-symbols.c: Include compile-c.h.
2291         (generate_c_for_variable_locations): Update comment.
2292         * compile/compile-c-types.c: Include compile-c.h.
2293         * compile/compile-c.h: New file -- moved C language declarations
2294         from other files here.
2295         * compile/compile-internal.h: Do not include hashtab.h or
2296         common/enum-flags.h.
2297         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2298         (gcc_convert_symbol, gcc_symbol_address)
2299         (generate_c_for_variable_locations, c_get_mode_for_size)
2300         (c_get_range_decl_name): Definitions moved to compile-c.h.
2301         * compile/compile-loc2c.c: Include compile-c.h.
2302
2303 2018-08-10  Keith Seitz  <keiths@redhat.com>
2304
2305         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2306         (c_symbol_substitution_name): ... this.
2307         Update all callers.
2308
2309 2018-08-10  Keith Seitz  <keiths@redhat.com>
2310
2311         * compile/compile-c-support.c (c_compute_program): Use
2312         unique_xmalloc_ptr to eliminate cleanup.
2313         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2314         Return a unique_xmalloc_ptr and eliminate cleanup.
2315         * compile/compile-internal.h (generate_c_for_variable_locations):
2316         Return unique_xmalloc_ptr and update description.
2317
2318 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
2319
2320         * corelow.c (core_target::get_core_register_section): Rename
2321         min_size to section_min_size.
2322
2323 2018-08-09  Jim Wilson  <jimw@sifive.com>
2324
2325         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2326         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2327         * NEWS: Mention new GNU/Linux RISC-V target.
2328         * configure.host: Add riscv*-*-linux*.
2329         * configure.nat: Add riscv*.
2330         * configure.tgt: Add riscv*-*-linux*.
2331         * riscv-linux-nat.c: New file.
2332         * riscv-linux-tdep.c: New file.
2333
2334 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2335
2336         * infrun.c (resume): Make static, add forward declaration.
2337         (proceed): Update header comment.
2338         * infrun.h (resume): Delete declaration.
2339
2340 2018-08-09  Tom Tromey  <tom@tromey.com>
2341
2342         * riscv-tdep.h: Minor formatting fixes.
2343
2344 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
2345
2346         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2347         * dwarf-index-cache.c (create_dir_and_check): Likewise.
2348         (test_mkdir_recursive): Likewise.
2349         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2350
2351 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2352
2353         * valarith.c (value_subscripted_rvalue): If an array is not in
2354         memory, and we don't know the upper bound, then we can't know that
2355         the requested element exists or not.
2356
2357 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
2358
2359         * target.c (str_comma_list_concat_elem): Fix typo in comment.
2360         (target_options_to_string): Add comment.
2361
2362 2018-08-08  Tom Tromey  <tom@tromey.com>
2363
2364         * unittests/scoped_mmap-selftests.c: Check result of "write".
2365
2366 2018-08-08  Jim Wilson  <jimw@sifive.com>
2367
2368         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2369         (decode_register_index_short): New.
2370         (decode_j_type_insn, decode_cj_type_insn): New.
2371         (decode_b_type_insn, decode_cb_type_insn): New.
2372         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
2373         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
2374         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2375         is_c_sw_insn instead of is_sw_insn.
2376         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2377         (riscv_software_single_step): New.
2378         * riscv-tdep.h (riscv_software_single_step): Declare.
2379
2380         * riscv-tdep.c (riscv_isa_xlen): Drop static.
2381         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2382
2383 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2384
2385         PR gdb/18050:
2386         * target.c (dispose_inferior): Don't dispose of inferiors that are
2387         already killed.
2388
2389 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2390
2391         * remote.c (remote_target::download_tracepoint): Change char* to
2392         const char*.
2393
2394 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
2395
2396         * target.h (target_options_to_string): Return an std::string.
2397         * target.c (str_comma_list_concat_elem): Return void, use
2398         std::string.
2399         (do_option): Likewise.
2400         (target_options_to_string): Return an std::string.
2401         * linux-nat.c (linux_nat_target::wait): Adjust.
2402         * target-debug.h (target_debug_print_options): Adjust.
2403
2404 2018-08-07  Tom Tromey  <tom@tromey.com>
2405
2406         * Makefile.in (CPPFLAGS): New variable.
2407         (INTERNAL_CPPFLAGS): Use it.
2408
2409 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2410
2411         * NEWS: Mention the index cache.
2412
2413 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2414
2415         * common/pathstuff.h (get_standard_cache_dir): New.
2416         * common/pathstuff.c (get_standard_cache_dir): New.
2417         * build-id.h (build_id_to_string): New.
2418         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2419         DEBUG_STR_SUFFIX): Move to here.
2420         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2421         DEBUG_STR_SUFFIX): Move from there.
2422         (write_psymtabs_to_index): Make non-static, add basename
2423         parameter.  Write to temporary files, rename when done.
2424         (save_gdb_index_command): Adjust call to
2425         write_psymtabs_to_index.
2426         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2427         field.
2428         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2429         (get_gdb_index_contents_from_cache): New.
2430         (get_gdb_index_contents_from_cache_dwz): New.
2431         (dwarf2_initialize_objfile): Read index from cache.
2432         (dwarf2_build_psymtabs): Save to index.
2433         * dwarf-index-cache.h: New file.
2434         * dwarf-index-cache.c: New file.
2435         * dwarf-index-write.h: New file.
2436
2437 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2438
2439         * gnulib/aclocal.m4: Re-generate.
2440         * gnulib/config.in: Re-generate.
2441         * gnulib/configure: Re-generate.
2442         * gnulib/import/Makefile.am: Re-generate.
2443         * gnulib/import/Makefile.in: Re-generate.
2444         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2445         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2446         * gnulib/import/m4/mkdir.m4: New file.
2447         * gnulib/import/mkdir.c: New file.
2448         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2449         module.
2450
2451 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2452
2453         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2454         * common/scoped_mmap.c: New file.
2455         * common/scoped_mmap.h (destroy): New method.
2456         (~scoped_mmap, reset): Use destroy.
2457         (scoped_mmap): New move constructor.
2458         (mmap_file): New declaration.
2459         * unittests/scoped_mmap-selftests.c (test_normal,
2460         test_invalid_filename, run_tests): New functions.
2461         (_initialize_scoped_mmap_selftests): Register selftest.
2462
2463 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2464
2465         * dwarf2read.c (read_gdb_index_from_section): Rename to...
2466         (read_gdb_index_from_buffer): ... this.  Remove section
2467         parameter, add buffer parameter.
2468         (get_gdb_index_contents_ftype,
2469         get_gdb_index_contents_dwz_ftype): New typedefs.
2470         (dwarf2_read_gdb_index): Add callback parameters to get the
2471         index contents.
2472         (get_gdb_index_contents_from_section): New.
2473         (dwarf2_initialize_objfile): Update call to
2474         dwarf2_read_gdb_index.
2475
2476 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2477
2478         * common/filestuff.h (gdb_fopen_cloexec): New overload.
2479         (gdb_open_cloexec): Likewise.
2480         * nat/linux-osdata.c (command_from_pid): Use string_printf.
2481         (commandline_from_pid): Likewise.
2482         (linux_xfer_osdata_threads): Likewise.
2483         (linux_xfer_osdata_fds): Likewise.
2484         * ada-lang.c (is_package_name): Likewise.
2485         * auxv.c (procfs_xfer_auxv): Likewise.
2486         * breakpoint.c (print_one_breakpoint_location): Use
2487         uiout::field_fmt.
2488         (print_one_catch_solib): Use string_printf.
2489         * coff-pe-read.c (add_pe_exported_sym): Likewise.
2490         (add_pe_forwarded_sym): Likewise.
2491         * dwarf2read.c (create_type_unit_group): Likewise.
2492         (build_error_marker_type): Likewise.
2493         * infcall.c (get_function_name): Likewise.
2494         * valprint.c (print_converted_chars_to_obstack): Likewise.
2495         * xtensa-tdep.c (xtensa_register_type): Likewise.
2496
2497 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
2498
2499         * remote.c (remote_target::download_tracepoint): Fix format
2500         string errors.
2501
2502 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2503
2504         * tracefile.c: Include common/byte-vector.h.
2505         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
2506         with trace_regblock_size if needed.  Update uses of buf.
2507
2508 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2509
2510         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2511         std::vector<unsigned char>.
2512         * tracepoint.c (collection_list::collection_list): Remove
2513         m_regs_mask initializer from initializer list.  Resize
2514         m_regs_mask using the largest remote register number.
2515         (collection_list::add_remote_register): Remove size check on
2516         m_regs_mask.  Use at to access element.
2517         (collection_list::stringify): Change type of temp_buf to
2518         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
2519         stringify the register mask.  Use pack_hex_byte for the register
2520         mask.
2521
2522 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2523
2524         * tracepoint.h (class collection_list) <add_register>: Remove.
2525         <add_remote_register, add_ax_registers, add_local_register>:
2526         Declare.
2527         <add_memrange>: Add scope parameter.
2528         * tracepoint.c (encode_actions_1): Likewise.
2529         (collection_list::add_register): Rename to ...
2530         (collection_list::add_remote_register): ... this.  Update
2531         comment.
2532         (collection_list::add_ax_registers, add_local_register): New
2533         methods.
2534         (collection_list::add_memrange): Add scope parameter.  Call
2535         add_local_register instead of add_register.
2536         (finalize_tracepoint_aexpr): New function.
2537         (collection_list::collect_symbol): Update calls to add_memrange.
2538         Call add_local_register instead of add_register.  Call
2539         add_ax_registers.  Call finalize_tracepoint_aexpr.
2540         (encode_actions_1): Get remote regnos for $reg action.  Call
2541         add_remote_register, add_ax_registers, and add_local_register.
2542         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
2543         (validate_actionline): Call finalize_tracepoint_aexpr.
2544
2545 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2546
2547         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2548         Replace array buf with gdb::char_vector buf, of size
2549         get_remote_packet_size ().  Replace references to buf and
2550         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
2551         and xsnprintf with snprintf.  Raise errors if the buffer is too
2552         small.
2553
2554 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2555
2556         * remote.c (remote_target::download_tracepoint): Fix the has_more
2557         predicate in the QTDP action list iteration.
2558
2559 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2560
2561         * remote.c (remote_target::download_tracepoint): Fix indentation
2562         in for block.
2563
2564 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2565
2566         * proc-api.c (_initialize_proc_api): Remove c, unused.
2567         * procfs.c (procfs_init_inferior): Remove signals, unused.
2568         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2569         unused.
2570
2571 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
2572             Andrew Burgess  <andrew.burgess@embecosm.com>
2573
2574         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2575         'W_STOPCODE (0)' as this could be ambiguous.
2576
2577 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2578
2579         * ser-tcp.c (net_open): Fix thinko when deciding whether to
2580         disable TCP's Nagle algorithm (use "ai_protocol" instead of
2581         "ai_socktype").
2582
2583 2018-08-02  Tom Tromey  <tom@tromey.com>
2584
2585         PR symtab/16842.
2586         * dwarf2read.c (read_func_scope): Set symtab on template parameter
2587         symbols.
2588         (process_structure_scope): Likewise.
2589
2590 2018-08-02  Xavier Roirand  <roirand@adacore.com>
2591
2592         PR gdb/22629:
2593         * darwin-nat.c (darwin_kill_inferior): Fix handling of
2594         kill inferior.
2595
2596 2018-08-02  Tom Tromey  <tom@tromey.com>
2597
2598         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2599         (darwin_suspend_inferior, darwin_resume_inferior)
2600         (darwin_decode_notify_message, darwin_resume_inferior_threads)
2601         (darwin_check_new_threads): Check result of get_darwin_inferior.
2602
2603 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
2604
2605         GDB 8.1.1 released.
2606
2607 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
2608
2609         * varobj.c (varobj_get_path_expr_parent): Report an error if
2610         parent is a dynamic varobj.
2611
2612 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2613
2614         * gnulib/aclocal.m4: Re-generate.
2615         * gnulib/config.in: Re-generate.
2616         * gnulib/configure: Re-generate.
2617         * gnulib/import/Makefile.in: Re-generate.
2618         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2619         * gnulib/import/m4/onceonly.m4: Re-generate.
2620
2621 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2622
2623         * target-descriptions.c (struct xml_test_tdesc): New.
2624         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2625         (record_xml_tdesc): Update.
2626         (maintenance_check_xml_descriptions): Update.
2627         * target-descriptions.h (record_xml_tdesc): Update comment.
2628
2629 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2630
2631         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2632         checking array bounds are defined.
2633
2634 2018-07-30  Tom Tromey  <tom@tromey.com>
2635
2636         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2637         irreflexivity violation.
2638
2639 2018-07-30  Tom Tromey  <tom@tromey.com>
2640
2641         * cli/cli-decode.c (lookup_cmd): Remove lint code.
2642         * value.c (unpack_long): Remove lint code.
2643         * valops.c (value_ind): Remove lint code.
2644         * valarith.c (value_x_binop, value_x_unop, value_equal)
2645         (value_pos): Remove lint code.
2646
2647 2018-07-28  Tom de Vries  <tdevries@suse.de>
2648
2649         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2650         with undefined upper bound as <optimized out>.
2651
2652 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
2653
2654         * gcore.in: Rename variable "name" to "prefix".  Expand
2655         "usage" text.
2656
2657 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
2658
2659         * windows-nat.c (windows_nat_target::create_inferior): Update to
2660         call close() in global namespace.
2661
2662 2018-07-26  Tom Tromey  <tom@tromey.com>
2663
2664         * dwarf-index-write.c (add_address_entry): Don't add objfile
2665         offsets.
2666         * dbxread.c (find_stab_function): Rename from
2667         find_stab_function_addr.  Return a bound_minimal_symbol.
2668         (read_dbx_symtab): Use raw_text_low, raw_text_high.
2669         Don't add objfile offsets.
2670         (end_psymtab): Use raw_text_low, raw_text_high,
2671         MSYMBOL_VALUE_RAW_ADDRESS.
2672         (read_ofile_symtab): Update.
2673         (process_one_symbol): Update.
2674         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2675         offsets.
2676         (dw2_relocate): Remove.
2677         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2678         searching addrmap.
2679         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2680         Update.
2681         (process_psymtab_comp_unit_reader, add_partial_symbol)
2682         (add_partial_subprogram, dwarf2_ranges_read): Update.
2683         (load_partial_dies): Update.
2684         (add_address_entry): Don't add objfile offsets.
2685         (dwarf2_build_include_psymtabs): Update.
2686         (create_addrmap_from_aranges): Don't add objfile offsets.
2687         (dw2_find_pc_sect_compunit_symtab): Update.
2688         * mdebugread.c (parse_symbol): Don't add objfile offsets.
2689         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2690         Update.
2691         (parse_partial_symbols): Don't add objfile offsets.  Use
2692         raw_text_low, raw_text_high.  Update.
2693         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2694         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2695         or call 'relocate' quick function.  Clear psymbol_map.
2696         * psympriv.h (struct partial_symbol) <address>: Add section
2697         offset.
2698         <set_unrelocated_address>: Rename from set_address.
2699         <raw_text_low, raw_text_high>: New methods.
2700         <text_low, text_high>: Add objfile parameter.
2701         (add_psymbol_to_bcache): Add 'section' parameter.  Call
2702         set_unrelocated_address.
2703         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2704         (find_pc_psymbol): Update.
2705         (fixup_psymbol_section, relocate_psymtabs): Remove.
2706         (dump_psymtab, psym_functions): Update.
2707         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2708         parameter.
2709         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2710         (start_psymtab_common): Update.
2711         * symfile-debug.c (debug_qf_relocate): Remove.
2712         (debug_sym_quick_functions): Update.
2713         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2714         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2715         Update.
2716
2717 2018-07-26  Tom Tromey  <tromey@redhat.com>
2718
2719         * dbxread.c (end_psymtab): Use text_high_valid and
2720         text_low_valid.
2721         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2722         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2723         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2724         Update comment.
2725         <text_low_valid, text_high_valid>: New fields.
2726         <set_text_low, set_text_high>: Update.
2727         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2728
2729 2018-07-26  Tom Tromey  <tom@tromey.com>
2730
2731         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2732         Update.
2733         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2734         textlow and texthigh fields.
2735         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2736         Update.
2737         * mdebugread.c (parse_lines, parse_partial_symbols)
2738         (psymtab_to_symtab_1): Update.
2739         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2740         Rename fields.  Update comment.  Now private.
2741         <text_low, text_high, set_text_low, set_text_high>: New methods.
2742         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2743         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2744         (start_psymtab_common, maintenance_info_psymtabs)
2745         (maintenance_check_psymtabs): Update.
2746         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2747         texthigh fields.
2748         (scan_xcoff_symtab): Update.
2749
2750 2018-07-26  Tom Tromey  <tromey@redhat.com>
2751
2752         * psympriv.h (struct partial_symbol) <unrelocated_address,
2753         address, set_address>: New methods.
2754         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2755         (fixup_psymbol_section, relocate_psymtabs): Update.
2756         (print_partial_symbols): Add 'objfile' parameter.  Update.
2757         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2758         Update.
2759
2760 2018-07-26  Tom Tromey  <tom@tromey.com>
2761
2762         * dwarf-index-write.c (write_psymbols, debug_names::insert)
2763         (debug_names::write_psymbols): Update.
2764         * psympriv.h (struct partial_symbol): Derive from
2765         general_symbol_info.
2766         <obj_section>: New method.
2767         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2768         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2769         (find_pc_sect_psymbol, fixup_psymbol_section)
2770         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2771         (print_partial_symbols, recursively_search_psymtabs)
2772         (compare_psymbols, psymbol_hash, psymbol_compare)
2773         (add_psymbol_to_bcache, maintenance_check_psymtabs)
2774         (psymbol_name_matches, psym_fill_psymbol_map): Update.
2775
2776 2018-07-26  Tom Tromey  <tromey@redhat.com>
2777
2778         * dbxread.c (end_psymtab): Remove dead code.
2779
2780 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2781
2782         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2783         DWARF unwinders are disabled.
2784         * dwarf2-frame.c: Add dwarf2read.h include.
2785         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2786         disabled.
2787         (dwarf2_frame_unwinders_enabled_p): Define.
2788         (show_dwarf_unwinders_enabled_p): New function.
2789         (_initialize_dwarf2_frame): Register switch to control DWARF
2790         unwinder use.
2791         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2792         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2793         (show_dwarf_cmdlist): Remove static keyword.
2794         * dwarf2read.h (set_dwarf_cmdlist): Declare.
2795         (show_dwarf_cmdlist): Declare.
2796         * NEWS: Document new feature.
2797
2798 2018-07-26  Tom de Vries  <tdevries@suse.de>
2799
2800         PR breakpoints/23366
2801         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2802
2803 2018-07-26  Tom de Vries  <tdevries@suse.de>
2804
2805         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2806         DW_AT_count can't be translated to a dynamic prop.
2807
2808 2018-07-25  Tom de Vries  <tdevries@suse.de>
2809
2810         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2811         try/catch.
2812
2813 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
2814
2815         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2816
2817 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
2818
2819         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2820
2821 2018-07-24  Keith Seitz  <keiths@redhat.comt
2822
2823         PR symtab/23010
2824         * dwarf2read.c (dw2_add_symbol_to_list): New function.
2825         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2826         instead of add_symbol_to_list.
2827         (read_file_scope): Call prepare_one_comp_unit before reading
2828         any other DIEs.
2829
2830 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
2831
2832         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2833
2834 2018-07-24  Tom Tromey  <tom@tromey.com>
2835
2836         * utils.c (malloc, realloc, free): Don't declare.
2837         * configure, config.in: Rebuild.
2838         * configure.ac: Don't check for declarations of free, malloc, or
2839         realloc.
2840
2841 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2842
2843         * aarch64-linux-nat.c
2844         (aarch64_linux_nat_target::stopped_data_address): Remove unused
2845         variable.
2846         * arm-linux-nat.c (fetch_regs): Likewise.
2847         (store_regs): Likewise.
2848         (fetch_vfp_regs): Likewise.
2849         (store_vfp_regs): Likewise.
2850         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2851         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2852         (arm_linux_nat_target::insert_watchpoint): Likewise.
2853         (arm_linux_nat_target::remove_watchpoint): Likewise.
2854         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2855         Likewise.
2856         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2857         Likewise.
2858         * ppc-linux-nat.c (fetch_register): Likewise.
2859         (fetch_all_gp_regs): Likewise.
2860         (fetch_ppc_registers): Likewise.
2861         (store_all_gp_regs): Likewise.
2862         (store_ppc_registers): Likewise.
2863         (hwdebug_insert_point): Likewise.
2864         (can_use_watchpoint_cond_accel): Likewise.
2865         * remote-sim.c (gdb_os_write_stdout): Likewise.
2866
2867 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2868             Tom Tromey  <tom@tromey.com>
2869
2870         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2871         test for it.
2872         * configure: Rebuild.
2873
2874 2018-07-22  Tom Tromey  <tom@tromey.com>
2875
2876         * regformats/regdat.sh: Define xmltarget_${name} inside
2877         #ifndef IN_PROCESS_AGENT.
2878
2879 2018-07-22  Tom Tromey  <tom@tromey.com>
2880
2881         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2882
2883 2018-07-22  Tom Tromey  <tom@tromey.com>
2884
2885         * symfile.c (reread_symbols): Notify iter, not objfile.
2886
2887 2018-07-22  Tom Tromey  <tom@tromey.com>
2888
2889         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2890         Use arch_ops.
2891         (ravenscar_thread_target::prepare_to_store): Likewise.
2892
2893 2018-07-22  Tom Tromey  <tom@tromey.com>
2894
2895         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2896         unused variable.  Call value_fetch_lazy when needed.
2897         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2898         Remove unused variable.  Call value_fetch_lazy when needed.
2899
2900 2018-07-22  Tom Tromey  <tom@tromey.com>
2901
2902         * m32c-tdep.c (mark_dma): Return void.
2903         (make_regs): Remove unused declarations.
2904
2905 2018-07-22  Tom Tromey  <tom@tromey.com>
2906
2907         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2908         cmdscm_get_valid_command_smob_arg_unsafe for effect.
2909         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2910         bkscm_get_valid_block_smob_arg_unsafe for effect.
2911
2912 2018-07-22  Tom Tromey  <tom@tromey.com>
2913
2914         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2915         value_type.
2916
2917 2018-07-22  Tom Tromey  <tom@tromey.com>
2918
2919         * windows-nat.c (saved_context): Conditionally define.
2920         * remote.c (remote_target::remote_btrace_maybe_reopen):
2921         Conditionally declare "warned".
2922         * inflow.c (sigquit_ours): Conditionally define.
2923         (new_tty): Move "tty" declaration inside #if.
2924         * guile/guile.c (guile_datadir): Conditionally define.
2925         * charset.c (set_be_le_names): Move some declarations inside #if.
2926         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2927         #if.
2928         (parse_xml_btrace_conf): Likewise.
2929
2930 2018-07-22  Tom Tromey  <tom@tromey.com>
2931
2932         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2933
2934 2018-07-22  Tom Tromey  <tom@tromey.com>
2935
2936         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2937         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2938         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2939         * buildsym-legacy.c (get_macro_table): Remove unused variable.
2940         * stack.c (frame_apply_level_command): Remove unused variable.
2941         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2942         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2943         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2944         unused variable.
2945         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2946         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2947         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2948         variable.
2949         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2950         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2951         variable.
2952         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2953         Remove unused variable.
2954         * cli/cli-script.c (recurse_read_control_structure): Remove unused
2955         variable.
2956         * common/tdesc.c (print_xml_feature::visit): Remove unused
2957         variable.
2958         * compile/compile-object-load.c (store_regs): Remove unused
2959         variables.
2960         * complaints.c (clear_complaints): Remove unused variable.
2961         * corelow.c (core_target_open): Remove unused variable.
2962         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2963         variable.
2964         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2965         variable.
2966         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2967         variable.
2968         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2969         variable.
2970         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2971         variable.
2972         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2973         variable.
2974         * ia64-tdep.c (examine_prologue): Remove unused variable.
2975         * infcall.c (run_inferior_call): Remove unused variable.
2976         * inferior.c (exit_inferior): Remove unused variable.
2977         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2978         * linespec.c (decode_line_2): Remove unused variable.
2979         * linux-nat.c (super_close): Remove.
2980         * linux-tdep.c (linux_info_proc): Remove unused variable.
2981         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2982         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2983         Remove unused variable.
2984         * parse.c (find_minsym_type_and_address): Remove unused variable.
2985         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2986         variable.
2987         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2988         variable.
2989         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2990         variables.
2991         * record-btrace.c (record_btrace_target::store_registers): Remove
2992         unused variable.
2993         (cmd_show_record_btrace_cpu): Remove unused variable.
2994         * riscv-tdep.c (riscv_register_reggroup_p)
2995         (riscv_push_dummy_call, riscv_return_value): Remove unused
2996         variable.
2997         * rust-exp.y (literal): Remove unused variable.
2998         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2999         unused variable.
3000         <STRUCTOP_ANONYMOUS>: Likewise.
3001         * s390-linux-tdep.c (s390_linux_init_abi_31)
3002         (s390_linux_init_abi_64): Remove unused variable.
3003         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3004         (file_select_thread, net_windows_open, _initialize_ser_windows):
3005         Remove unused variables.
3006         * symtab.c (find_pc_sect_line): Remove unused variable.
3007         * target-memory.c (compute_garbled_blocks): Remove unused
3008         variable.
3009         (target_write_memory_blocks): Remove unused variable.
3010         * target.c (target_stack::unpush): Remove unused variables.
3011         * tracepoint.c (start_tracing, all_tracepoint_actions)
3012         (merge_uploaded_trace_state_variables)
3013         (print_one_static_tracepoint_marker): Remove unused variable.
3014         * unittests/basic_string_view/element_access/char/1.cc (test01):
3015         Remove unused variable.
3016         * windows-nat.c (windows_continue, windows_add_all_dlls)
3017         (do_initial_windows_stuff, windows_nat_target::create_inferior):
3018         Remove unused variables.
3019
3020 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
3021
3022         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3023         attr_profile in HAVE_ELF.
3024         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3025         HAVE_ELF.
3026
3027 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
3028
3029         * frame.c (frame_register_unwind): Change parameter name.
3030         (frame_unwind_register): Likewise.
3031         (frame_unwind_register_value): Likewise.
3032         (frame_unwind_register_signed): Likewise.
3033         (frame_unwind_register_unsigned): Likewise.
3034         * frame.h (frame_register_unwind): Likewise.
3035         (frame_unwind_register): Likewise.
3036         (frame_unwind_register_value): Likewise.
3037         (frame_unwind_register_signed): Likewise.
3038         (frame_unwind_register_unsigned): Likewise.
3039         (frame_unwind_arch): Likewise.
3040
3041 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3042
3043         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3044         ISA maintenance.
3045
3046 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3047
3048         * mips-linux-nat.c (mips_linux_nat_target::read_description):
3049         Call `get_ptrace_pid' rather than extracting the ptrace PID by
3050         hand.
3051
3052 2018-07-20  Keith Seitz  <keiths@redhat.com>
3053
3054         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3055         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3056         m_compunit_symtab, m_language>: Add "m_" prefix.
3057         Update all uses.
3058         * buildsym.c: Update all uses.
3059
3060 2018-07-20  Tom Tromey  <tom@tromey.com>
3061
3062         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3063         * buildsym.h (record_line_ftype): Remove typedef.
3064
3065 2018-07-20  Tom Tromey  <tom@tromey.com>
3066
3067         * buildsym-legacy.h (augment_type_symtab): Don't declare.
3068         (end_expandable_symtab): Likewise.
3069         (end_symtab_get_static_block): Likewise.
3070         (end_symtab_from_static_block): Likewise.
3071         * buildsym-legacy.c (augment_type_symtab): Remove.
3072         (end_expandable_symtab): Remove.
3073         (end_symtab_get_static_block): Remove.
3074         (end_symtab_from_static_block): Remove.
3075
3076 2018-07-20  Tom Tromey  <tom@tromey.com>
3077
3078         * dwarf2read.c: Include buildsym.h.
3079         (struct dwarf2_cu) <builder>: New method.
3080         (fixup_go_packaging): Update.
3081         (process_full_comp_unit, process_full_type_unit): Update.  Don't
3082         use scoped_free_pendings.
3083         (using_directives): Add "cu" parameter, remove "language".
3084         (read_import_statement, setup_type_unit_groups, )
3085         (read_func_scope, read_lexical_block_scope)
3086         (dwarf2_record_block_ranges, read_namespace): Update.
3087         (lnp_state_machine::lnp_state_machine): Add cu parameter.
3088         (lnp_state_machine::handle_end_sequence): Update.
3089         (class lnp_state_machine) <m_cu>: New member.
3090         <m_record_line_callback>: Remove.
3091         <m_currently_recording_lines>: New member.
3092         (lnp_state_machine::handle_set_file): Update.
3093         (noop_record_line): Remove.
3094         (dwarf_record_line_p): Add cu parameter.
3095         (dwarf_record_line_1, dwarf_finish_line): Likewise.
3096         (lnp_state_machine::record_line)
3097         (lnp_state_machine::lnp_state_machine)
3098         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3099         (dwarf_decode_lines): Update.
3100         (dwarf2_start_subfile): Add cu parameter.
3101         (dwarf2_start_symtab, new_symbol): Update.
3102         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3103         Remove dwarf2_per_objfile parameter.
3104         (dwarf_decode_macros): Update.
3105
3106 2018-07-20  Tom Tromey  <tom@tromey.com>
3107
3108         * stabsread.c (define_symbol): Update.
3109         * buildsym-legacy.h (get_buildsym_compunit): Declare.
3110         * dwarf2read.c (new_symbol): Update.
3111         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3112         * cp-namespace.c: Include buildsym.h.
3113         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3114         * buildsym-legacy.c (get_buildsym_compunit): New function.
3115
3116 2018-07-20  Tom Tromey  <tom@tromey.com>
3117
3118         * xcoffread.c: Include buildsym-legacy.h.
3119         * windows-nat.c: Include buildsym-legacy.h.
3120         * stabsread.c: Include buildsym-legacy.h.
3121         * mdebugread.c: Include buildsym-legacy.h.
3122         * buildsym-legacy.h: New file.
3123         * buildsym-legacy.c: New file, from buildsym.c.
3124         * go32-nat.c: Include buildsym-legacy.h.
3125         * dwarf2read.c: Include buildsym-legacy.h.
3126         * dbxread.c: Include buildsym-legacy.h.
3127         * cp-namespace.c: Include buildsym-legacy.h.
3128         * coffread.c: Include buildsym-legacy.h.
3129         * buildsym.h: Move some contents to buildsym-legacy.h.
3130         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
3131         buildsym-legacy.c.
3132         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3133
3134 2018-07-20  Tom Tromey  <tom@tromey.com>
3135
3136         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3137         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3138         (buildsym_compunit::buildsym_compunit)
3139         (buildsym_compunit::~buildsym_compunit)
3140         (buildsym_compunit::get_macro_table): Define.
3141
3142 2018-07-20  Tom Tromey  <tom@tromey.com>
3143
3144         * buildsym.c (reset_symtab_globals): Remove.
3145         (buildsym_compunit::end_symtab_from_static_block): Update.
3146         (buildsym_compunit::augment_type_symtab): Update.
3147         (end_symtab_from_static_block): Call free_buildsym_compunit.
3148         (augment_type_symtab, end_symtab, end_expandable_symtab):
3149         Likewise.
3150
3151 2018-07-20  Tom Tromey  <tom@tromey.com>
3152
3153         * arch-utils.c: Do not include buildsym.h.
3154         * mipsread.c: Do not include buildsym.h.
3155         * machoread.c: Do not include buildsym.h.
3156         * elfread.c: Do not include buildsym.h.
3157
3158 2018-07-20  Tom Tromey  <tom@tromey.com>
3159
3160         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3161         initialization.
3162         (buildsym_compunit): Add new constructor.
3163         (struct buildsym_compunit) <get_last_source_file, finish_block,
3164         record_block_range, start_subfile, patch_subfile_names,
3165         push_subfile, pop_subfile, record_line, get_compunit_symtab,
3166         set_last_source_start_addr, get_last_source_start_addr,
3167         get_local_using_directives, set_local_using_directives,
3168         get_global_using_directives, outermost_context_p,
3169         get_current_context_stack, get_context_stack_depth,
3170         get_current_subfile, get_local_symbols, get_file_symbols,
3171         get_global_symbols, record_debugformat, record_producer,
3172         push_context, pop_context, end_symtab_get_static_block,
3173         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3174         New public methods.
3175         <record_pending_block, finish_block_internal, make_blockvector,
3176         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3177         private methods.
3178         Update all users.
3179
3180 2018-05-22  Tom Tromey  <tom@tromey.com>
3181
3182         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3183         parameter.
3184         (finish_block_internal): Update.
3185
3186 2018-07-20  Tom Tromey  <tom@tromey.com>
3187
3188         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3189         parameter.
3190         (finish_block_internal): Update.
3191
3192 2018-07-20  Tom Tromey  <tom@tromey.com>
3193
3194         * buildsym.h (EXTERN): Don't define or undef.
3195         * buildsym.c (EXTERN): Don't define.
3196
3197 2018-07-20  Tom Tromey  <tom@tromey.com>
3198
3199         * buildsym.c: Remove TODO comment.
3200
3201 2018-07-20  Tom Tromey  <tom@tromey.com>
3202
3203         * coffread.c (coff_symtab_read): Update.
3204         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3205         (xcoff_new_init): Update.
3206         * mipsread.c (mipscoff_new_init): Update.
3207         * mdebugread.c (mdebug_build_psymtabs): Update.
3208         * elfread.c (elf_new_init): Update.
3209         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3210         Update.
3211         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3212         (coffstab_build_psymtabs, elfstab_build_psymtabs)
3213         (stabsect_build_psymtabs): Update.
3214         * buildsym.h (buildsym_init): Don't declare.
3215         * buildsym.c: Update comment.
3216         (prepare_for_building): Remove.
3217         (start_symtab, restart_symtab): Update.
3218         (reset_symtab_globals): Update comment.
3219         (buildsym_init): Remove.
3220
3221 2018-07-20  Tom Tromey  <tom@tromey.com>
3222
3223         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3224         * stabsread.c (patch_block_stabs, define_symbol, read_type)
3225         (read_enum_type, common_block_start, common_block_end)
3226         (cleanup_undefined_types_1, finish_global_stabs): Update.
3227         * mdebugread.c (psymtab_to_symtab_1): Update.
3228         * dwarf2read.c (fixup_go_packaging, read_func_scope)
3229         (read_lexical_block_scope, new_symbol): Update.
3230         * dbxread.c (process_one_symbol): Update.
3231         * coffread.c (coff_symtab_read, process_coff_symbol)
3232         (coff_read_enum_type): Update.
3233         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3234         declare.
3235         (get_local_symbols, get_file_symbols, get_global_symbols): New
3236         functions.
3237         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3238         m_global_symbols.
3239         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3240         (~scoped_free_pendings): Update.
3241         (finish_block, prepare_for_building, reset_symtab_globals)
3242         (end_symtab_get_static_block, end_symtab_with_blockvector)
3243         (augment_type_symtab, push_context): Update.
3244         (get_local_symbols, get_file_symbols, get_global_symbols): New
3245         functions.
3246         (buildsym_init): Update.
3247
3248 2018-07-20  Tom Tromey  <tom@tromey.com>
3249
3250         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3251         (process_full_type_unit): Likewise.
3252         (dwarf2_start_symtab): Set list_in_scope.
3253
3254 2018-07-20  Tom Tromey  <tom@tromey.com>
3255
3256         * dwarf2read.c (process_psymtab_comp_unit_reader)
3257         (build_type_psymtabs_reader): Do not set list_in_scope.
3258
3259 2018-07-20  Tom Tromey  <tom@tromey.com>
3260
3261         * buildsym.c (free_pendings): Remove.
3262         (add_symbol_to_list, scoped_free_pendings)
3263         (finish_block_internal, buildsym_init): Update.
3264
3265 2018-07-20  Tom Tromey  <tom@tromey.com>
3266
3267         * xcoffread.c (read_xcoff_symtab): Update.
3268         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3269         Update.
3270         * dbxread.c (process_one_symbol): Update.
3271         * coffread.c (coff_symtab_read): Update.
3272         * buildsym.h (finish_block): Update.
3273         * buildsym.c (finish_block): Remove "listhead" argument.
3274         (end_symtab_get_static_block): Update.
3275
3276 2018-07-20  Tom Tromey  <tom@tromey.com>
3277
3278         * buildsym.h (class scoped_free_pendings): Remove constructor.
3279         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3280         method.
3281         <m_pending_block_obstack, m_pending_blocks>: New members.
3282         (pending_block_obstack, pending_blocks): Remove.
3283         (scoped_free_pendings::scoped_free_pendings): Default.
3284         (~scoped_free_pendings): Update.
3285         (free_pending_blocks): Remove.
3286         (finish_block_internal, record_pending_block, make_blockvector)
3287         (end_symtab_get_static_block, augment_type_symtab, push_context)
3288         (buildsym_init): Update.
3289
3290 2018-07-20  Tom Tromey  <tom@tromey.com>
3291
3292         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3293         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3294         members.
3295         (pending_addrmap, pending_addrmap_obstack)
3296         (pending_addrmap_interesting): Remove.
3297         (scoped_free_pendings, record_block_range, make_blockvector)
3298         (prepare_for_building, reset_symtab_globals, buildsym_init):
3299         Update.
3300
3301 2018-07-20  Tom Tromey  <tom@tromey.com>
3302
3303         * xcoffread.c (process_linenos): Update.
3304         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3305         * mdebugread.c (psymtab_to_symtab_1): Update.
3306         * dwarf2read.c (setup_type_unit_groups)
3307         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3308         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3309         * dbxread.c (process_one_symbol): Update.
3310         * coffread.c (coff_symtab_read, enter_linenos)
3311         (process_coff_symbol): Update.
3312         * buildsym.h (current_subfile): Don't declare.
3313         (get_current_subfile): Declare.
3314         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3315         member.
3316         (start_subfile, free_buildsym_compunit, push_subfile)
3317         (prepare_for_building, start_symtab): Update.
3318         (get_current_subfile): New function.
3319
3320 2018-07-20  Tom Tromey  <tom@tromey.com>
3321
3322         * coffread.c (coff_symtab_read): Update.
3323         * xcoffread.c (read_xcoff_symtab): Update.
3324         * dwarf2read.c (new_symbol): Update.
3325         (read_func_scope, read_lexical_block_scope): Update.
3326         * dbxread.c (process_one_symbol): Update.
3327         * buildsym.h (context_stack, context_stack_depth): Don't declare.
3328         (outermost_context_p): Remove macro.
3329         (outermost_context_p, get_current_context_stack)
3330         (get_context_stack_depth): Declare.
3331         (pop_context): Return struct context_stack.
3332         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3333         member.
3334         (context_stack_size): Remove.
3335         (INITIAL_CONTEXT_STACK_SIZE): Remove.
3336         (prepare_for_building, end_symtab_get_static_block)
3337         (augment_type_symtab, push_context): Update.
3338         (pop_context): Return struct context_stack.
3339         (outermost_context_p, get_current_context_stack)
3340         (get_context_stack_depth): New functions.
3341         (buildsym_init): Update.
3342
3343 2018-07-20  Tom Tromey  <tom@tromey.com>
3344
3345         * rust-exp.y: Now a pure parser.  Update all rules.
3346         (%union): Move earlier.
3347         (current_parser, work_obstack): Remove globals.
3348         (rust_parser, ~rust_parser): Update.
3349         (class rust_parser) <copy_name, concat3, crate_name, super_name,
3350         lex_character, lex_number, lex_string, lex_identifier,
3351         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3352         convert_name, convert_params_to_expression,
3353         convert_ast_to_expression, ast_basic_type, ast_operation,
3354         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3355         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3356         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3357         ast_array_type, ast_slice_type, ast_reference_type,
3358         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3359         (rust_parse): Update.
3360         (rustyyerror, rustyylex): Add parser parameter.
3361         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3362         (rust_lex_stringish_test, rust_lex_test_sequence)
3363         (rust_lex_test_trailing_dot, rust_lex_test_completion)
3364         (rust_lex_test_push_back, rust_lex_tests): Update.
3365
3366 2018-07-19  Pedro Alves  <palves@redhat.com>
3367
3368         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3369         gdb::unique_xmalloc_ptr.
3370         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3371         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3372         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3373         copy-initialization.
3374         * guile/scm-pretty-print.c (ppscm_print_children): Use
3375         gdb::unique_xmalloc_ptr instead of cleanups.
3376         (gdbscm_apply_val_pretty_printer): Remove cleanups.
3377         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3378         gdb::unique_xmalloc_ptr.
3379         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3380         Adjust to use gdb::unique_xmalloc_ptr.
3381         * guile/scm-utils.c (extract_arg): Adjust.
3382         * guile/scm-value.c (gdbscm_value_field): Adjust to use
3383         gdb::unique_xmalloc_ptr instead of a cleanup.
3384
3385 2018-07-19  Tom Tromey  <tom@tromey.com>
3386
3387         * utils.c (do_value_free_to_mark)
3388         (make_cleanup_value_free_to_mark): Remove.
3389         * utils.h (make_cleanup_value_free_to_mark): Remove.
3390
3391 2018-07-19  Pedro Alves  <palves@redhat.com>
3392
3393         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3394         forwarding reference.
3395
3396 2018-07-18  Pedro Alves  <palves@redhat.com>
3397
3398         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3399         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
3400         cleanup.
3401
3402 2018-07-18  Pedro Alves  <palves@redhat.com>
3403
3404         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3405         exceptions.
3406         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3407         (gdbscm_wrap): New.
3408         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3409         directly instead of a cleanup.
3410         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3411         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3412         (vlscm_binop_gdbthrow): New, factored out from ...
3413         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3414         (vlscm_rich_compare): Use gdbscm_wrap.
3415         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3416         instead of a cleanup.
3417         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3418         cleanup.
3419         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3420         Use xfree directly instead of a cleanup.
3421         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3422         Adjust to use gdbscm_wrap and scoped_value_mark.
3423         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3424         (gdbscm_value_address, gdbscm_value_dereference)
3425         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3426         scoped_value_mark.
3427         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3428         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3429         scoped_value_mark.
3430         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3431         gdbscm_wrap and scoped_value_mark.
3432         (gdbscm_value_to_string): Use xfree directly instead of a
3433         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3434         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3435         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3436         scoped_value_mark.
3437         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3438         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3439         scoped_value_mark.
3440         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3441         gdbscm_wrap.
3442
3443 2018-07-18  Tom de Vries  <tdevries@suse.de>
3444
3445         * findvar.c (default_read_var_value): Also resolve dynamic type for
3446         LOC_OPTIMIZED_OUT vars.
3447
3448 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
3449
3450         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3451         decoding.
3452
3453 2018-07-17  Tom Tromey  <tom@tromey.com>
3454
3455         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3456         (compute_enum_list, pascm_set_param_value_x)
3457         (gdbscm_parameter_value): Update.
3458         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3459         (gdbscm_scm_to_host_string): Update.
3460         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3461         Update.
3462         * guile/scm-cmd.c (cmdscm_add_completion): Update.
3463         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3464         * guile/scm-string.c (gdbscm_scm_to_string): Return
3465         unique_xmalloc_ptr.
3466         (gdbscm_scm_to_host_string): Likewise.
3467
3468 2018-07-17  Tom Tromey  <tom@tromey.com>
3469
3470         * guile/guile.c (gdbscm_eval_from_control_command): Update.
3471         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3472         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3473         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3474         unique_xmalloc_ptr.
3475
3476 2018-07-17  Tom Tromey  <tom@tromey.com>
3477
3478         * guile/scm-param.c (pascm_signal_setshow_error): Update.
3479         * guile/guile-internal.h (gdbscm_exception_message_to_string):
3480         Update.
3481         * guile/scm-cmd.c (cmdscm_function): Update.
3482         * guile/scm-pretty-print.c
3483         (ppscm_print_exception_unless_memory_error): Update.
3484         * guile/scm-exception.c (gdbscm_exception_message_to_string):
3485         Return unique_xmalloc_ptr.
3486
3487 2018-07-17  Tom Tromey  <tom@tromey.com>
3488
3489         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3490         Use string_printf.
3491
3492 2018-07-17  Jim Wilson  <jimw@sifive.com>
3493
3494         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3495         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
3496         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
3497         unecessary braces after EF_RISCV_RVC test.  Delete call to
3498         set_gdbarch_decr_pc_after_break.
3499
3500         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3501         RISCV_LAST_FP_REGNUM + 1.
3502         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3503
3504 2018-07-17  Tom Tromey  <tom@tromey.com>
3505
3506         * configure.ac: Remove --disable-gdbcli.
3507         * configure: Rebuild.
3508         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3509         (SUBDIR_CLI_CFLAGS): Remove.
3510         (SFILES): Use SUBDIR_CLI_SRCS.
3511         (COMMON_OBS): Use SUBDIR_CLI_OBS.
3512
3513 2018-07-17  Tom Tromey  <tom@tromey.com>
3514
3515         PR gdb/18624:
3516         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3517
3518 2018-07-16  Jim Wilson  <jimw@sifive.com>
3519
3520         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3521
3522 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3523
3524         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3525         variable.
3526         (libunwind_frame_sniffer): Likewise.
3527         (libunwind_frame_prev_register): Likewise.
3528         (libunwind_sigtramp_frame_sniffer): Likewise.
3529         * ia64-tdep.c (ia64_access_reg): Likewise.
3530         (ia64_access_rse_reg): Likewise.
3531         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3532         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3533
3534 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3535
3536         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3537
3538 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3539
3540         * remote-sim.c (gdbsim_target::close,
3541         gdbsim_target::mourn_inferior): Remove unused variables.
3542
3543 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
3544
3545         * ia64-tdep.c (ktab_buf): New global.
3546         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3547         (get_kernel_table): Adjust.
3548
3549 2018-07-16  Tom Tromey  <tom@tromey.com>
3550
3551         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3552         * dwarf2read.c (using_directives, new_symbol): Use
3553         outermost_context_p.
3554         * dbxread.c (process_one_symbol): Use outermost_context_p.
3555         * coffread.c (coff_symtab_read): Use outermost_context_p.
3556
3557 2018-07-16  Tom Tromey  <tom@tromey.com>
3558
3559         * dwarf2read.c (using_directives, read_func_scope)
3560         (read_lexical_block_scope): Update.
3561         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3562         * buildsym.h (local_using_directives, global_using_directives):
3563         Don't declare.
3564         (get_local_using_directives, set_local_using_directives)
3565         (get_global_using_directives): Declare.
3566         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3567         m_global_using_directives>: New members.
3568         (finish_block_internal, prepare_for_building)
3569         (reset_symtab_globals, end_symtab_get_static_block)
3570         (push_context): Update.
3571         (get_local_using_directives, set_local_using_directives)
3572         (get_global_using_directives): New functions.
3573         (buildsym_init): Update.
3574
3575 2018-07-16  Tom Tromey  <tom@tromey.com>
3576
3577         * xcoffread.c (xcoff_initial_scan): Don't call
3578         free_pending_blocks.
3579         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3580         * buildsym.h (class scoped_free_pendings): Add constructor.
3581         (free_pending_blocks): Don't declare.
3582         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3583         (free_pending_blocks): Now static.
3584
3585 2018-07-16  Tom Tromey  <tom@tromey.com>
3586
3587         * buildsym.h (push_subfile, pop_subfile): Update declarations.
3588         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3589         member.
3590         (struct subfile_stack): Remove.
3591         (subfile_stack): Remove.
3592         (push_subfile, pop_subfile, buildsym_init): Update.
3593
3594 2018-07-16  Tom Tromey  <tom@tromey.com>
3595
3596         * buildsym.c (push_subfile): Use gdb_assert.
3597         (pop_subfile): Use gdb_assert.
3598
3599 2018-07-16  Tom Tromey  <tom@tromey.com>
3600
3601         * buildsym.h (merge_symbol_lists): Remove.
3602         * buildsym.c (merge_symbol_lists): Remove.
3603
3604 2018-07-16  Tom Tromey  <tom@tromey.com>
3605
3606         * stabsread.c (scan_file_globals): Update comment.
3607         * stabsread.h (scan_file_globals): Move from buildsym.h.
3608         * buildsym.h (scan_file_globals): Move to stabsread.h.
3609
3610 2018-07-16  Tom Tromey  <tom@tromey.com>
3611
3612         * xcoffread.c (xcoff_new_init): Update.
3613         * mipsread.c (mipscoff_new_init): Update.
3614         * mdebugread.c (mdebug_build_psymtabs): Update.
3615         * elfread.c (elf_new_init): Update.
3616         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3617         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3618         * buildsym.h (buildsym_new_init): Don't declare.
3619         * buildsym.c (buildsym_new_init): Remove.
3620
3621 2018-07-16  Tom Tromey  <tom@tromey.com>
3622
3623         * stabsread.h (within_function): Move from buildsym.h.
3624         * stabsread.c (start_stabs): Clear within_function.
3625         * coffread.c (coff_start_symtab): Clear within_function.
3626         * buildsym.h (within_function): Move to stabsread.h.
3627         * buildsym.c (prepare_for_building): Update.
3628
3629 2018-07-16  Tom Tromey  <tom@tromey.com>
3630
3631         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3632         * dwarf2read.c (dwarf2_start_symtab): Don't set
3633         processing_gcc_compilation.
3634         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3635
3636 2018-07-16  Tom Tromey  <tom@tromey.com>
3637
3638         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3639         (next_symbol_text_func): Move from buildsym.h.
3640         * stabsread.c (hashname): Move from buildsym.c.
3641         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3642         (next_symbol_text_func, hashname): Move to stabsread.h.
3643         * buildsym.c: Don't include bcache.h
3644         (hashname): Move to stasbread.c.
3645
3646 2018-07-16  Tom Tromey  <tom@tromey.com>
3647
3648         * buildsym.h (context_stack_size): Don't declare.
3649         * buildsym.c (context_stack_size): New global.
3650
3651 2018-07-16  Tom Tromey  <tom@tromey.com>
3652
3653         * dbxread.c (processing_acc_compilation): New global.
3654         * buildsym.h (processing_acc_compilation): Don't declare.
3655
3656 2018-07-16  Tom Tromey  <tom@tromey.com>
3657
3658         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3659         * dbxread.c (read_ofile_symtab): Update.
3660         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3661         * buildsym.h (last_source_start_addr): Remove.
3662         (set_last_source_start_addr, get_last_source_start_addr):
3663         Declare.
3664         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3665         parameter.
3666         (struct buildsym_compunit) <m_last_source_start_addr>: New
3667         member.
3668         (prepare_for_building): Remove start_addr parameter.
3669         (start_symtab, restart_symtab, end_symtab_get_static_block)
3670         (end_symtab_with_blockvector): Update.
3671         (set_last_source_start_addr, get_last_source_start_addr): New
3672         functions.
3673
3674 2018-07-16  Tom Tromey  <tom@tromey.com>
3675
3676         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3677         member.
3678         (have_line_numbers): Remove.
3679         (record_line, prepare_for_building, end_symtab_get_static_block)
3680         (augment_type_symtab): Update.
3681
3682 2018-07-16  Tom Tromey  <tom@tromey.com>
3683
3684         * buildsym.c (~buildsym_compunit): Free the macro table.
3685         (struct buildsym_compunit) <get_macro_table, release_macros>: New
3686         methods.
3687         <m_pending_macros>: New member.
3688         (pending_macros): Remove.
3689         (~scoped_free_pendings, get_macro_table, prepare_for_building)
3690         (reset_symtab_globals, end_symtab_get_static_block)
3691         (end_symtab_with_blockvector, augment_type_symtab)
3692         (buildsym_init): Update.
3693
3694 2018-07-16  Tom Tromey  <tom@tromey.com>
3695
3696         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3697         parameter.
3698         (buildsym_compunit::set_last_source_file): New method.
3699         <m_last_source_file>: New member.
3700         (prepare_for_building): Remove "name" parameter.
3701         (start_symtab, restart_symtab, reset_symtab_globals): Update.
3702         (last_source_file): Remove.
3703         (set_last_source_file, get_last_source_file): Update.
3704
3705 2018-07-16  Tom Tromey  <tom@tromey.com>
3706
3707         * buildsym.c (prepare_for_building): Add assert.
3708
3709 2018-07-16  Tom Tromey  <tom@tromey.com>
3710
3711         * buildsym.c (~buildsym_compunit): Update.
3712         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3713         (start_subfile, patch_subfile_names)
3714         (end_symtab_with_blockvector): Update.
3715
3716 2018-07-16  Tom Tromey  <tom@tromey.com>
3717
3718         * buildsym.c (struct buildsym_compunit): Add constructor,
3719         destructor, initializers.
3720         (start_buildsym_compunit): Remove.
3721         (free_buildsym_compunit): Use "delete".
3722         (start_symtab, restart_symtab): Use "new".
3723
3724 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
3725
3726         * symfile.c (set_objfile_default_section_offset): Remove struct
3727         keyword.
3728
3729 2018-07-14  Stafford Horne  <shorne@gmail.com>
3730
3731         * (Responsible Maintainers): Add myself as or1k maintainer.
3732
3733 2018-07-13  Tom Tromey  <tom@tromey.com>
3734
3735         * symfile.c (set_objfile_default_section_offset): Use extra braces
3736         around initializer.
3737
3738 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3739
3740         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3741         non-branching basr.
3742
3743 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3744
3745         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3746         unittests/cli-utils-selftests.c
3747         * unittests/cli-utils-selftests.c: New file.
3748
3749 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3750
3751         * NEWS: Mention new commands. Mention change to 'thread apply'.
3752
3753 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3754
3755         * thread.c (thr_try_catch_cmd): New function.
3756         (thread_apply_all_command): Handle qcs flags.
3757         (thread_apply_command): Handle qcs flags.
3758         (taas_command): New function.
3759         (tfaas_command): New function.
3760         (_initialize_thread): Update to setup the new commands 'taas
3761         and 'tfaas'. Change doc string for 'thread apply'.
3762
3763 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3764
3765         * stack.c: (trailing_outermost_frame): New function, mostly
3766         extracted from backtrace_command_1.
3767         (leading_innermost_frame): New function.
3768         (backtrace_command_1): Update to call trailing_outermost_frame.
3769         (frame_apply_command_count): New function.
3770         (frame_apply_level_command): New function.
3771         (frame_apply_all_command): New function.
3772         (frame_apply_command): New function.
3773         (faas_command): New function.
3774         (frame_cmd_list): New variable.
3775         (_initialize_stack): Update to setup the new commands 'frame apply'
3776         and 'faas'.
3777
3778 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3779
3780         * cli-utils.c (number_or_range_parser::get_number): Only handle
3781         numbers or convenience var as numbers.
3782         (parse_flags): New function.
3783         (parse_flags_qcs): New function.
3784         (number_or_range_parser::finished): Ensure parsing end is detected
3785         before end of string.
3786         * cli-utils.h (parse_flags): New function.
3787         (parse_flags_qcs): New function.
3788         (number_or_range_parser): Remove m_finished bool.
3789         (number_or_range_parser::skip_range): Set m_in_range to false.
3790
3791 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3792
3793         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3794         on Windows.
3795
3796 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3797             Jan Kratochvil  <jan.kratochvil@redhat.com>
3798             Paul Fertser  <fercerpav@gmail.com>
3799             Tsutomu Seki  <sekiriki@gmail.com>
3800             Pedro Alves  <palves@redhat.com>
3801
3802         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3803         'unittests/parse-connection-spec-selftests.c'.
3804         (COMMON_SFILES): Add 'common/netstuff.c'.
3805         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3806         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3807         * common/netstuff.c: New file.
3808         * common/netstuff.h: New file.
3809         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3810         (wait_for_connect): Update comment.  New parameter
3811         'gdb::optional<int> sock' instead of 'struct serial *scb'.
3812         Use 'sock' directly instead of 'scb->fd'.
3813         (try_connect): New function, with code from 'net_open'.
3814         (net_open): Rewrite main loop to deal with multiple
3815         sockets/addresses.  Handle IPv6-style hostnames; implement
3816         support for IPv6 connections.
3817         * unittests/parse-connection-spec-selftests.c: New file.
3818
3819 2018-07-11  Pedro Alves  <palves@redhat.com>
3820
3821         PR gdb/23377
3822         * remote.c (remote_target::remote_detach_pid): Call
3823         set_current_process.
3824
3825 2018-07-11  Pedro Alves  <palves@redhat.com>
3826
3827         * h8300-tdep.c (h8300_gdbarch_init): Remove
3828         set_gdbarch_ecoff_reg_to_regnum calls.
3829
3830 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3831
3832         PR c++/23373
3833         * c-typeprint.c (c_type_print_base_struct_union): Don't print
3834         offsets/sizes for static members of a class/struct.
3835
3836 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
3837
3838         * target-descriptions.c (tdesc_register_bitsize): Rename.
3839         * target-descriptions.h (tdesc_register_bitsize): Likewise.
3840         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3841         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3842
3843 2018-07-10  Tom Tromey  <tom@tromey.com>
3844
3845         * breakpoint.c (moribund_locations): Now static and a
3846         std::vector.
3847         (breakpoint_init_inferior, moribund_breakpoint_here_p)
3848         (build_bpstat_chain, update_global_location_list)
3849         (breakpoint_retire_moribund): Update.
3850         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
3851         VEC.
3852
3853 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3854
3855         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3856         (riscv_register_reggroup_p): Use new function, remove unneeded
3857         parenthesis.
3858         (riscv_push_dummy_call): Extend assert to compare against xlen or
3859         flen based on register type.
3860
3861 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3862
3863         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3864
3865 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3866
3867         * remote.c (show_hardware_watchpoint_limit): New function.
3868         (show_hardware_watchpoint_length_limit): New function.
3869         (show_hardware_breakpoint_limit): New function.
3870         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3871         where appropriate, update help text.
3872
3873 2018-07-09  Tom Tromey  <tom@tromey.com>
3874
3875         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3876         (CLIBS): Don't mention NAT_CLIBS.
3877
3878 2018-07-09  Tom Tromey  <tom@tromey.com>
3879
3880         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3881         (LIBGDB_OBS, clean mostlyclean): Update.
3882         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3883
3884 2018-07-09  Tom Tromey  <tom@tromey.com>
3885
3886         * Makefile.in (%.c: %.y): Use ECHO_YACC.
3887         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
3888         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3889
3890 2018-07-09  Tom Tromey  <tom@tromey.com>
3891
3892         * Makefile.in (ALLDEPFILES): Remove exec.c.
3893         (COMMON_OBS): Remove exec.o.
3894         (COMMON_SFILES): Add exec.c.
3895
3896 2018-07-09  Tom Tromey  <tom@tromey.com>
3897
3898         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3899
3900 2018-07-09  Tom Tromey  <tom@tromey.com>
3901
3902         * Makefile.in (clean mostlyclean): Remove stamp-version.
3903         (version.c): Depend on stamp-version.
3904         (stamp-version): New rule, from version.c rule.
3905
3906 2018-07-09  Tom Tromey  <tom@tromey.com>
3907
3908         * Makefile.in (init.c): Depend on stamp-init.
3909         (stamp-init): New rule, from init.c rule.
3910         (clean mostlyclean): Remove stamp-init.
3911
3912 2018-07-09  Tom Tromey  <tom@tromey.com>
3913
3914         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3915         SUBDIR_GCC_COMPILE_SRCS.
3916
3917 2018-07-09  Tom Tromey  <tom@tromey.com>
3918
3919         * Makefile.in (init.c): Remove some unused sed rules.
3920
3921 2018-07-09  Tom Tromey  <tom@tromey.com>
3922
3923         * Makefile.in (TSOBS): Remove.
3924         (INIT_FILES): Update.
3925         (LIBGDB_OBS): Update.
3926         (COMMON_SFILES): Add inflow.c.
3927         (SFILES): Remove inflow.c.
3928
3929 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3930
3931         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3932
3933 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
3934
3935         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3936         get_saveloc_name, is_signal_frame_name, step_name,
3937         init_remote_name, create_addr_space_name,
3938         destroy_addr_space_name, search_unwind_table_name,
3939         find_dyn_list_name): Constify.
3940
3941 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
3942
3943         * darwin-nat.c (darwin_pthread_kill): New function.
3944         (darwin_resume_thread): Use darwin_pthread_kill.
3945
3946 2018-07-05  Tom de Vries  <tdevries@suse.de>
3947
3948         * macroexp.c (macro_buffer) <operator=>: New member function.
3949
3950 2018-07-04  Tom Tromey  <tom@tromey.com>
3951
3952         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3953
3954 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
3955
3956         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3957         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3958         * maint.c: Likewise.
3959         * top.c: Likewise.
3960
3961 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3962
3963         * NEWS: Create a new section for the next release branch.
3964         Rename the section of the current branch, now that it has
3965         been cut.
3966
3967 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3968
3969         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3970         * version.in: Bump version to 8.2.50.DATE-git.
3971
3972 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3973             Pedro Alves  <palves@redhat.com>
3974
3975         * linux-nat.c (linux_init_ptrace): Rename to ...
3976         (linux_init_ptrace_procfs): ... this.  Call
3977         linux_proc_init_warnings.
3978         (linux_nat_target::post_attach)
3979         (linux_nat_target::post_startup_inferior): Adjust.
3980         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3981         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3982
3983 2018-07-04  Tom de Vries  <tdevries@suse.de>
3984
3985         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3986         check ...
3987         (read_comp_unit_head): ... here.
3988
3989 2018-07-03  Tom Tromey  <tom@tromey.com>
3990
3991         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3992         (stop_tracing, tstatus_command)
3993         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3994         (print_one_static_tracepoint_marker): Update.
3995         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3996         std::vector.
3997         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
3998         VEC.
3999         (all_tracepoints, static_tracepoints_here): Return std::vector.
4000
4001 2018-07-03  Tom Tromey  <tom@tromey.com>
4002
4003         * common/ptid.c (ptid_equal): Remove.
4004         * common/ptid.h (ptid_equal): Don't declare.
4005         * ada-tasks.c: Update.
4006         * breakpoint.c: Update.
4007         * common/agent.c: Update.
4008         * corelow.c: Update.
4009         * darwin-nat-info.c: Update.
4010         * darwin-nat.c: Update.
4011         * dcache.c: Update.
4012         * dtrace-probe.c: Update.
4013         * dummy-frame.c: Update.
4014         * fbsd-nat.c: Update.
4015         * frame.c: Update.
4016         * gdbthread.h: Update.
4017         * gnu-nat.c: Update.
4018         * go32-nat.c: Update.
4019         * inf-loop.c: Update.
4020         * inf-ptrace.c: Update.
4021         * infcall.c: Update.
4022         * infcmd.c: Update.
4023         * inflow.c: Update.
4024         * infrun.c: Update.
4025         * linux-fork.c: Update.
4026         * linux-nat.c: Update.
4027         * linux-thread-db.c: Update.
4028         * mi/mi-cmd-var.c: Update.
4029         * mi/mi-interp.c: Update.
4030         * mi/mi-main.c: Update.
4031         * nto-procfs.c: Update.
4032         * ppc-linux-tdep.c: Update.
4033         * procfs.c: Update.
4034         * python/py-inferior.c: Update.
4035         * python/py-record-btrace.c: Update.
4036         * python/py-record.c: Update.
4037         * ravenscar-thread.c: Update.
4038         * regcache.c: Update.
4039         * remote-sim.c: Update.
4040         * remote.c: Update.
4041         * sol-thread.c: Update.
4042         * solib.c: Update.
4043         * target.c: Update.
4044         * tui/tui-stack.c: Update.
4045         * varobj.c: Update.
4046         * windows-nat.c: Update.
4047         * windows-tdep.c: Update.
4048
4049 2018-07-03  Tom Tromey  <tom@tromey.com>
4050
4051         * common/ptid.c (ptid_match): Remove.
4052         * common/ptid.h (ptid_match): Don't declare.
4053         * fbsd-nat.c: Update.
4054         * infcmd.c: Update.
4055         * infrun.c: Update.
4056         * linux-nat.c: Update.
4057         * record-btrace.c: Update.
4058         * regcache.c: Update.
4059         * remote.c: Update.
4060
4061 2018-07-03  Tom Tromey  <tom@tromey.com>
4062
4063         * common/ptid.c (ptid_tid_p): Remove.
4064         * common/ptid.h (ptid_tid_p): Don't declare.
4065         * sol-thread.c: Update.
4066
4067 2018-07-03  Tom Tromey  <tom@tromey.com>
4068
4069         * common/ptid.c (ptid_lwp_p): Remove.
4070         * common/ptid.h (ptid_lwp_p): Don't declare.
4071         * fbsd-nat.c: Update.
4072         * linux-nat.c: Update.
4073         * nat/linux-procfs.c: Update.
4074         * nat/x86-linux-dregs.c: Update.
4075         * sol-thread.c: Update.
4076
4077 2018-07-03  Tom Tromey  <tom@tromey.com>
4078
4079         * common/ptid.c (ptid_is_pid): Remove.
4080         * common/ptid.h (ptid_is_pid): Don't declare.
4081         * infrun.c: Update.
4082         * linux-nat.c: Update.
4083         * mi/mi-interp.c: Update.
4084         * remote.c: Update.
4085         * thread.c: Update.
4086
4087 2018-07-03  Tom Tromey  <tom@tromey.com>
4088
4089         * common/ptid.c (ptid_get_tid): Remove.
4090         * common/ptid.h (ptid_get_tid): Don't declare.
4091         * ada-tasks.c: Update.
4092         * aix-thread.c: Update.
4093         * bsd-uthread.c: Update.
4094         * darwin-nat.c: Update.
4095         * fbsd-nat.c: Update.
4096         * i386-darwin-nat.c: Update.
4097         * infrun.c: Update.
4098         * linux-tdep.c: Update.
4099         * nto-procfs.c: Update.
4100         * ppc-ravenscar-thread.c: Update.
4101         * python/py-infthread.c: Update.
4102         * ravenscar-thread.c: Update.
4103         * sol-thread.c: Update.
4104         * sparc-ravenscar-thread.c: Update.
4105         * windows-nat.c: Update.
4106
4107 2018-07-03  Tom Tromey  <tom@tromey.com>
4108
4109         * common/ptid.c (ptid_get_lwp): Remove.
4110         * common/ptid.h (ptid_get_lwp): Don't declare.
4111         * aarch64-linux-nat.c: Update.
4112         * ada-tasks.c: Update.
4113         * aix-thread.c: Update.
4114         * amd64-linux-nat.c: Update.
4115         * arm-linux-nat.c: Update.
4116         * corelow.c: Update.
4117         * fbsd-nat.c: Update.
4118         * fbsd-tdep.c: Update.
4119         * gnu-nat.c: Update.
4120         * i386-cygwin-tdep.c: Update.
4121         * i386-gnu-nat.c: Update.
4122         * i386-linux-nat.c: Update.
4123         * ia64-linux-nat.c: Update.
4124         * inf-ptrace.c: Update.
4125         * infrun.c: Update.
4126         * linux-fork.c: Update.
4127         * linux-nat.c: Update.
4128         * linux-tdep.c: Update.
4129         * linux-thread-db.c: Update.
4130         * mips-linux-nat.c: Update.
4131         * nat/aarch64-linux-hw-point.c: Update.
4132         * nat/aarch64-linux.c: Update.
4133         * nat/linux-btrace.c: Update.
4134         * nat/linux-osdata.c: Update.
4135         * nat/linux-procfs.c: Update.
4136         * nat/x86-linux-dregs.c: Update.
4137         * obsd-nat.c: Update.
4138         * ppc-fbsd-nat.c: Update.
4139         * ppc-linux-nat.c: Update.
4140         * procfs.c: Update.
4141         * python/py-infthread.c: Update.
4142         * ravenscar-thread.c: Update.
4143         * remote.c: Update.
4144         * s390-linux-nat.c: Update.
4145         * sol-thread.c: Update.
4146         * sol2-tdep.c: Update.
4147         * spu-linux-nat.c: Update.
4148         * x86-linux-nat.c: Update.
4149         * xtensa-linux-nat.c: Update.
4150
4151 2018-07-03  Tom Tromey  <tom@tromey.com>
4152
4153         * common/ptid.c (ptid_get_pid): Remove.
4154         * common/ptid.h (ptid_get_pid): Don't declare.
4155         * aarch64-linux-nat.c: Update.
4156         * ada-lang.c: Update.
4157         * aix-thread.c: Update.
4158         * alpha-bsd-nat.c: Update.
4159         * amd64-fbsd-nat.c: Update.
4160         * amd64-linux-nat.c: Update.
4161         * arm-linux-nat.c: Update.
4162         * arm-nbsd-nat.c: Update.
4163         * auxv.c: Update.
4164         * break-catch-syscall.c: Update.
4165         * breakpoint.c: Update.
4166         * bsd-uthread.c: Update.
4167         * corelow.c: Update.
4168         * ctf.c: Update.
4169         * darwin-nat.c: Update.
4170         * fbsd-nat.c: Update.
4171         * fbsd-tdep.c: Update.
4172         * gcore.c: Update.
4173         * gnu-nat.c: Update.
4174         * hppa-nbsd-nat.c: Update.
4175         * hppa-obsd-nat.c: Update.
4176         * i386-fbsd-nat.c: Update.
4177         * ia64-linux-nat.c: Update.
4178         * inf-ptrace.c: Update.
4179         * infcmd.c: Update.
4180         * inferior.c: Update.
4181         * inferior.h: Update.
4182         * inflow.c: Update.
4183         * infrun.c: Update.
4184         * linux-fork.c: Update.
4185         * linux-nat.c: Update.
4186         * linux-tdep.c: Update.
4187         * linux-thread-db.c: Update.
4188         * m68k-bsd-nat.c: Update.
4189         * mi/mi-interp.c: Update.
4190         * mi/mi-main.c: Update.
4191         * mips-linux-nat.c: Update.
4192         * mips-nbsd-nat.c: Update.
4193         * mips64-obsd-nat.c: Update.
4194         * nat/aarch64-linux-hw-point.c: Update.
4195         * nat/aarch64-linux.c: Update.
4196         * nat/linux-btrace.c: Update.
4197         * nat/linux-osdata.c: Update.
4198         * nat/linux-procfs.c: Update.
4199         * nat/x86-linux-dregs.c: Update.
4200         * nto-procfs.c: Update.
4201         * obsd-nat.c: Update.
4202         * ppc-linux-nat.c: Update.
4203         * ppc-nbsd-nat.c: Update.
4204         * ppc-obsd-nat.c: Update.
4205         * proc-service.c: Update.
4206         * procfs.c: Update.
4207         * python/py-inferior.c: Update.
4208         * python/py-infthread.c: Update.
4209         * ravenscar-thread.c: Update.
4210         * record.c: Update.
4211         * remote-sim.c: Update.
4212         * remote.c: Update.
4213         * rs6000-nat.c: Update.
4214         * s390-linux-nat.c: Update.
4215         * sh-nbsd-nat.c: Update.
4216         * sol-thread.c: Update.
4217         * sparc-nat.c: Update.
4218         * sparc64-tdep.c: Update.
4219         * spu-linux-nat.c: Update.
4220         * spu-tdep.c: Update.
4221         * target-debug.h: Update.
4222         * target.c: Update.
4223         * thread.c: Update.
4224         * tid-parse.c: Update.
4225         * tracefile-tfile.c: Update.
4226         * vax-bsd-nat.c: Update.
4227         * windows-nat.c: Update.
4228         * x86-linux-nat.c: Update.
4229         * x86-nat.c: Update.
4230
4231 2018-07-03  Tom Tromey  <tom@tromey.com>
4232
4233         * common/ptid.c (pid_to_ptid): Remove.
4234         * common/ptid.h (pid_to_ptid): Don't declare.
4235         * aix-thread.c: Update.
4236         * arm-linux-nat.c: Update.
4237         * common/ptid.c: Update.
4238         * common/ptid.h: Update.
4239         * corelow.c: Update.
4240         * ctf.c: Update.
4241         * darwin-nat.c: Update.
4242         * fbsd-nat.c: Update.
4243         * fork-child.c: Update.
4244         * gnu-nat.c: Update.
4245         * go32-nat.c: Update.
4246         * inf-ptrace.c: Update.
4247         * infcmd.c: Update.
4248         * inferior.c: Update.
4249         * infrun.c: Update.
4250         * linux-fork.c: Update.
4251         * linux-nat.c: Update.
4252         * nat/aarch64-linux-hw-point.c: Update.
4253         * nat/fork-inferior.c: Update.
4254         * nat/x86-linux-dregs.c: Update.
4255         * nto-procfs.c: Update.
4256         * obsd-nat.c: Update.
4257         * procfs.c: Update.
4258         * progspace.c: Update.
4259         * remote.c: Update.
4260         * rs6000-nat.c: Update.
4261         * s390-linux-nat.c: Update.
4262         * sol-thread.c: Update.
4263         * spu-linux-nat.c: Update.
4264         * target.c: Update.
4265         * top.c: Update.
4266         * tracefile-tfile.c: Update.
4267         * windows-nat.c: Update.
4268
4269 2018-07-03  Tom Tromey  <tom@tromey.com>
4270
4271         * common/ptid.h (ptid_build): Don't declare.
4272         * common/ptid.c (ptid_build): Remove.
4273         * aix-thread.c: Update.
4274         * bsd-kvm.c: Update.
4275         * bsd-uthread.c: Update.
4276         * common/agent.c: Update.
4277         * common/ptid.c: Update.
4278         * common/ptid.h: Update.
4279         * corelow.c: Update.
4280         * darwin-nat.c: Update.
4281         * fbsd-nat.c: Update.
4282         * gnu-nat.c: Update.
4283         * linux-fork.c: Update.
4284         * linux-nat.c: Update.
4285         * linux-thread-db.c: Update.
4286         * nat/linux-osdata.c: Update.
4287         * nat/linux-procfs.c: Update.
4288         * nto-procfs.c: Update.
4289         * obsd-nat.c: Update.
4290         * proc-service.c: Update.
4291         * procfs.c: Update.
4292         * ravenscar-thread.c: Update.
4293         * remote-sim.c: Update.
4294         * remote.c: Update.
4295         * sol-thread.c: Update.
4296         * target.c: Update.
4297         * windows-nat.c: Update.
4298
4299 2018-07-03  Tom Tromey  <tom@tromey.com>
4300
4301         * infrun.c (follow_exec): Use exit_inferior_silent.
4302         * inferior.c (exit_inferior_num_silent): Remove.
4303         * inferior.h (exit_inferior_num_silent): Don't declare.
4304
4305 2018-07-03  Tom Tromey  <tom@tromey.com>
4306
4307         PR cli/23340:
4308         * darwin-nat.c (darwin_attach_pid): Reset inferior and
4309         inferior_ptid on error.
4310
4311 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
4312             Simon Marchi  <simon.marchi@polymtl.ca>
4313
4314         PR tdep/8282
4315         * disasm.h (gdb_disassembler): Add
4316         `m_disassembler_options_holder'. member
4317         * disasm.c (get_all_disassembler_options): New function.
4318         (gdb_disassembler::gdb_disassembler): Use it.
4319         (gdb_buffered_insn_length_init_dis): Likewise.
4320         (gdb_buffered_insn_length): Adjust accordingly.
4321         (set_disassembler_options): Handle options with arguments.
4322         (show_disassembler_options_sfunc): Likewise.  Add a leading new
4323         line if showing options with descriptions.
4324         (disassembler_options_completer): Adapt to using the
4325         `disasm_options_and_args_t' structure.
4326         * mips-tdep.c (mips_disassembler_options): New variable.
4327         (mips_disassembler_options_o32): Likewise.
4328         (mips_disassembler_options_n32): Likewise.
4329         (mips_disassembler_options_n64): Likewise.
4330         (gdb_print_insn_mips): Don't set `disassembler_options'.
4331         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4332         functions.
4333         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4334         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
4335         `gdbarch_disassembler_options_implicit' and
4336         `gdbarch_valid_disassembler_options'.
4337         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4338         `disasm_options_and_args_t' structure.
4339         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4340         method.
4341         (valid_disassembler_options): Switch from `disasm_options_t' to
4342         the `disasm_options_and_args_t' structure.
4343         * NEWS: Document `set disassembler-options' support for the MIPS
4344         target.
4345         * gdbarch.h: Regenerate.
4346         * gdbarch.c: Regenerate.
4347
4348 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4349
4350         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4351
4352 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
4353
4354         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4355         parameter in call to amd64_target_description.
4356         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4357         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4358         (amd64fbsd_init_abi): Likewise.
4359         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4360         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4361         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4362         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4363
4364 2018-06-29  Pedro Alves  <palves@redhat.com>
4365
4366         * gdb/amd64-tdep.h (amd64_create_target_description): Add
4367         "segments" parameter.
4368         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4369         (_initialize_amd64_tdep): Update call to
4370         amd64_create_target_description.
4371         (amd64_target_description): Add "segments" parameter.  Adjust
4372         the implementation to use it.
4373         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4374         call to amd64_create_target_description.
4375         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4376         * gdb/arch/amd64.h (amd64_create_target_description): Add
4377         "segments" register.
4378         * gdb/arch/amd64.c (amd64_create_target_description): Add
4379         "segments" parameter.  Call create_feature_i386_64bit_segments
4380         only if SEGMENTS is true.
4381         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4382         call to amd64_create_target_description.
4383
4384 2018-06-29  Pedro Alves  <palves@redhat.com>
4385
4386         * thread.c (thread_target_id_str): New, factored out from ...
4387         (print_thread_info_1): ... here.  Use it to compute the max
4388         "Target Id" column width.
4389
4390 2018-06-29  Pedro Alves  <palves@redhat.com>
4391
4392         * remote.c (remote_target::extra_thread_info): Delete
4393         'display_buf' and 'n' locals.  from the cache, regardless of
4394         packet mechanims is in use.  Use cache for qThreadExtra and qP
4395         methods too.
4396
4397 2018-06-29  Pedro Alves  <palves@redhat.com>
4398
4399         * blockframe.c (find_pc_sect_containing_function): New function.
4400         * breakpoint.c (print_breakpoint_location): Don't call
4401         find_pc_sect_function.
4402         * linespec.c (create_sals_line_offset): Record the location's
4403         symbol in the sal.
4404         * linespec.c (convert_address_location_to_sals): Fill in sal's
4405         symbol with find_pc_sect_containing_function.
4406         * symtab.c (find_function_start_sal): Rename to ...
4407         (find_function_start_sal_1): ... this.
4408         (find_function_start_sal): Reimplement as wrapper around
4409         find_function_start_sal_1, and use
4410         find_pc_sect_containing_function to fill in the sal's symbol.
4411         (find_function_start_sal(symbol*, bool)): Adjust.
4412         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4413         comments.
4414         (find_pc_sect_containing_function): Declare.
4415
4416 2018-06-29  Pedro Alves  <palves@redhat.com>
4417
4418         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4419         true if the the location has no symbol.
4420
4421 2018-06-28  Tom Tromey  <tom@tromey.com>
4422
4423         * NEWS: Mention --enable-codesign.
4424         * silent-rules.mk (ECHO_SIGN): New variable.
4425         * configure.ac: Add --enable-codesign.
4426         * configure: Rebuild.
4427         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4428         (gdb$(EXEEXT)): Optionally invoke codesign.
4429
4430 2018-06-28  Pedro Alves  <palves@redhat.com>
4431
4432         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4433         comments.
4434         (switch_to_thread_no_regs): Adjust comment.
4435         * infcmd.c (stop_pc): Delete.
4436         (post_create_inferior, info_program_command): Replace references
4437         to stop_pc with references to thread_info->suspend.stop_pc.
4438         * inferior.h (stop_pc): Delete declaration.
4439         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4440         (handle_inferior_event_1, handle_signal_stop)
4441         (process_event_stop_test, keep_going_stepped_thread)
4442         (handle_step_into_function, handle_step_into_function_backward)
4443         (print_stop_location): Replace references to stop_pc with
4444         references to thread_info->suspend.stop_pc.
4445         (struct infcall_suspend_state) <stop_pc>: Delete field.
4446         (save_infcall_suspend_state, restore_infcall_suspend_state):
4447         Remove references to inf_stat->stop_pc.
4448         * linux-fork.c (fork_load_infrun_state): Likewise.
4449         * record-btrace.c (record_btrace_set_replay): Likewise.
4450         * record-full.c (record_full_goto_entry): Likewise.
4451         * remote.c (print_one_stopped_thread): Likewise.
4452         * target.c (target_resume): Extend comment.
4453         * thread.c (set_executing_thread): New.
4454         (set_executing): Use it.
4455         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4456         Remove references to stop_pc.
4457
4458 2018-06-28  Pedro Alves  <palves@redhat.com>
4459
4460         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4461         Moving fetching stop_pc until after ecs->event_thread is refreshed.
4462
4463 2018-06-28  Tom Tromey  <tom@tromey.com>
4464
4465         * coffread.c (coff_symfile_finish): Update.
4466         * xcoffread.c (xcoff_symfile_finish): Update.
4467         * elfread.c (elf_symfile_finish): Update.
4468         * symfile.h (dwarf2_free_objfile): Don't declare.
4469         * dwarf2read.c (_initialize_dwarf2_read): Use
4470         register_objfile_data_with_cleanup.
4471         (dwarf2_free_objfile): Now static.  Change signature.
4472
4473 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4474
4475         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4476         option "-o" to add-symbol-file-load to add an offset to each
4477         section's load address.
4478         * symfile.c (set_objfile_default_section_offset): New function.
4479
4480 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4481
4482         * symfile.c (add_symbol_file_command): Make sure that sections
4483         with the same name are sorted in the same order.
4484
4485 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4486
4487         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4488         require the second argument.  If omitted, load sections at the
4489         addresses specified in the file.
4490
4491 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4492
4493         * symfile.c (symbol_file_command, symbol_file_add_main_1)
4494         (_initialize_symfile): Add option "-o" to symbol-file to add an
4495         offset to each section of the symbol file.
4496
4497 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4498
4499         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4500
4501 2018-06-27  Tom Tromey  <tom@tromey.com>
4502
4503         * stack.c (_initialize_stack): Update "func" help text.
4504
4505 2018-06-27  Tom Tromey  <tom@tromey.com>
4506
4507         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4508         std::vector.
4509         (unwind_infopy_str, pyuw_create_unwind_info)
4510         (unwind_infopy_add_saved_register, pyuw_sniffer)
4511         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4512         Update.
4513         (struct saved_reg): Add constructor.
4514         <value>: Now a gdbpy_ref<>.
4515
4516 2018-06-27  Tom Tromey  <tom@tromey.com>
4517
4518         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4519
4520 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4521
4522         * gdb-gdb.py.in: Format using autopep8.
4523
4524 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4525
4526         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4527         (type_lookup_function): Recognize CORE_ADDR values.
4528
4529 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4530
4531         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4532         print tag_name.
4533
4534 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4535
4536         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4537         <__lt__>: Add.
4538
4539 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4540
4541         * gdb-gdb.py: Move to...
4542         * gdb-gdb.py.in: ... here.
4543         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4544         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4545         dependencies.
4546         (distclean): Remove gdb-gdb.py when cleaning.
4547         (gdb-gdb.py, gdb-gdb.gdb): New rules.
4548         * configure: Re-generate.
4549
4550 2018-06-27  Pedro Alves  <palves@redhat.com>
4551
4552         * proc-service.c (get_ps_regcache): New.
4553         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4554         (ps_lsetfpregs): Use it.
4555
4556 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
4557
4558         PR gdb/21695
4559         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4560         (dwarf_decode_lines_1): Adjust.
4561
4562 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4563
4564         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4565         override.
4566         <info_proc>: Likewise.
4567
4568 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
4569
4570         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4571         to windows_fetch_one_register, and only handle the case of
4572         fetching one register.  Move the code that reloads the context
4573         and iterates over all registers if R is negative to...
4574         (windows_nat_target::fetch_registers): ... here.
4575         (do_windows_store_inferior_registers): Rename to
4576         windows_store_one_register, and only handle the case of storing
4577         one register.  Move the code that handles the case where r is
4578         negative to...
4579         (windows_nat_target::store_registers) ... here.
4580
4581 2018-06-26  Tom Tromey  <tom@tromey.com>
4582
4583         PR rust/22574:
4584         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4585         * rust-lang.c (rust_print_struct_def): Add podata parameter.
4586         Update.
4587         (rust_internal_print_type): Add podata parameter.
4588         (rust_print_type): Update.
4589
4590 2018-06-26  Tom Tromey  <tom@tromey.com>
4591
4592         * typeprint.h (struct print_offset_data) <update, finish,
4593         maybe_print_hole>: New methods.
4594         <indentation>: New constant.
4595         * typeprint.c (print_offset_data::indentation): Define.
4596         (print_offset_data::maybe_print_hole, print_offset_data::update)
4597         (print_offset_data::finish): Move from c-typeprint.c and rename.
4598         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4599         (print_spaces_filtered_with_print_options): Update.
4600         (c_print_type_union_field_offset, maybe_print_hole)
4601         (c_print_type_struct_field_offset): Move to typeprint.c and
4602         rename.
4603         (c_type_print_base_struct_union): Update.
4604
4605 2018-06-25  Pedro Alves  <palves@redhat.com>
4606
4607         * gdbthread.h (thread_info_ref, delete_thread)
4608         (delete_thread_silent, first_thread_of_inferior)
4609         (any_thread_of_inferior, switch_to_thread)
4610         (enable_thread_stack_temporaries)
4611         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4612         (get_last_thread_stack_temporary)
4613         (value_in_thread_stack_temporaries, can_access_registers_thread):
4614         Spell out "struct thread_info" instead of just "thread_info".
4615         * inferior.h (notice_new_inferior): Likewise.
4616
4617 2018-06-25  Pedro Alves  <palves@redhat.com>
4618
4619         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4620         pass thread_info pointer to delete_thread.
4621         (windows_nat_target::detach): Pass inferior pointer to
4622         detach_inferior.
4623         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4624         delete_thread.
4625         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4626         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4627         and pass a thread_info pointer to delete_thread.
4628         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4629         pass thread_info pointer to delete_thread.
4630         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4631         delete_thread_silent call.
4632         * procfs.c (procfs_target::detach): Pass inferior pointer to
4633         detach_inferior.
4634         (procfs_target::wait): Pass thread_info pointer to delete_thread.
4635         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4636         delete_thread_silent call.
4637         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4638         pass thread_info pointer to delete_thread.
4639         (windows_nat_target::detach): Pass inferior pointer to
4640         delete_inferior.
4641
4642 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4643
4644         * regcache.c (readable_regcache::read_part): Fix asserts.
4645         (reg_buffer::raw_collect_part): New function.
4646         (regcache::write_part): Fix asserts.
4647         (reg_buffer::raw_supply_part): New function.
4648         (regcache::transfer_regset_register): New helper function.
4649         (regcache::transfer_regset): Call new functions.
4650         (regcache_supply_regset): Use gdb_byte*.
4651         (regcache::supply_regset): Likewise.
4652         (regcache_collect_regset): Likewise.
4653         (regcache::collect_regset): Likewise.
4654         * regcache.h (reg_buffer::raw_collect_part): New declaration.
4655         (reg_buffer::raw_supply_part): Likewise.
4656         (regcache::transfer_regset_register): Likewise.
4657         (regcache::transfer_regset): Use gdb_byte*.
4658
4659 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4660
4661         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4662
4663 2018-06-21  Pedro Alves  <palves@redhat.com>
4664
4665         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4666         instead of a ptid_t.  All callers adjusted.
4667         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
4668         adjusted.
4669         (print_ada_task_info, display_current_task_id, task_command_1):
4670         Adjust.
4671         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4672         inferior_thread.
4673         (breakpoint_kind): Adjust.
4674         (remove_breakpoints_pid): Rename to ...
4675         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
4676         pointer.  All callers adjusted.
4677         (bpstat_clear_actions): Use inferior_thread.
4678         (get_bpstat_thread): New.
4679         (bpstat_do_actions): Use it.
4680         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4681         to take a thread_info pointer.  All callers adjusted.
4682         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4683         (breakpoint_re_set_thread): Use inferior_thread.
4684         * breakpoint.h (struct inferior): Forward declare.
4685         (bpstat_stop_status): Update.
4686         (remove_breakpoints_pid): Delete.
4687         (remove_breakpoints_inf): New.
4688         * bsd-uthread.c (bsd_uthread_target::wait)
4689         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4690         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4691         (maint_btrace_packet_history_cmd)
4692         (maint_btrace_clear_packet_history_cmd): Adjust.
4693         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4694         inferior_thread.
4695         * cli/cli-interp.c: Include "inferior.h".
4696         * common/refcounted-object.h (struct
4697         refcounted_object_ref_policy): New.
4698         * compile/compile-object-load.c: Include gdbthread.h.
4699         (store_regs): Use inferior_thread.
4700         * corelow.c (core_target::close): Use current_inferior.
4701         (core_target_open): Adjust to use first_thread_of_inferior and use
4702         the current inferior.
4703         * ctf.c (ctf_target::close): Adjust to use current_inferior.
4704         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4705         <thread>: ... this new field.  All references adjusted.
4706         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4707         Take a thread_info pointer instead of a ptid_t.
4708         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4709         (dummy_frame_discard, register_dummy_frame_dtor): Take a
4710         thread_info pointer instead of a ptid_t.
4711         * elfread.c: Include "inferior.h".
4712         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4713         Use inferior_thread.
4714         * eval.c (evaluate_subexp): Likewise.
4715         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4716         inferior_thread.
4717         * gdb_proc_service.h (struct thread_info): Forward declare.
4718         (struct ps_prochandle) <ptid>: Delete, replaced by ...
4719         <thread>: ... this new field.  All references adjusted.
4720         * gdbarch.h, gdbarch.c: Regenerate.
4721         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4722         'thread' parameter.  All implementations and callers adjusted.
4723         * gdbthread.h (thread_info) <set_running>: New method.
4724         (delete_thread, delete_thread_silent): Take a thread_info pointer
4725         instead of a ptid.
4726         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4727         (first_thread_of_process): Delete, replaced by ...
4728         (first_thread_of_inferior): ... this new function.  All callers
4729         adjusted.
4730         (any_live_thread_of_process): Delete, replaced by ...
4731         (any_live_thread_of_inferior): ... this new function.  All callers
4732         adjusted.
4733         (switch_to_thread, switch_to_no_thread): Declare.
4734         (is_executing): Delete.
4735         (enable_thread_stack_temporaries): Update comment.
4736         <enable_thread_stack_temporaries>: Take a thread_info pointer
4737         instead of a ptid_t.  Incref the thread.
4738         <~enable_thread_stack_temporaries>: Decref the thread.
4739         <m_ptid>: Delete
4740         <m_thr>: New.
4741         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4742         (get_last_thread_stack_temporary)
4743         (value_in_thread_stack_temporaries, can_access_registers_thread):
4744         Take a thread_info pointer instead of a ptid_t.  All callers
4745         adjusted.
4746         * infcall.c (get_call_return_value): Use inferior_thread.
4747         (run_inferior_call): Work with thread pointers instead of ptid_t.
4748         (call_function_by_hand_dummy): Work with thread pointers instead
4749         of ptid_t.  Use thread_info_ref.
4750         * infcmd.c (proceed_thread_callback): Access thread's state
4751         directly.
4752         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4753         access thread's state directly.
4754         (continue_command): Use inferior_thread.
4755         (info_program_command): Use find_thread_ptid and access thread
4756         state directly.
4757         (proceed_after_attach_callback): Use thread state directly.
4758         (notice_new_inferior): Take a thread_info pointer instead of a
4759         ptid_t.  All callers adjusted.
4760         (exit_inferior): Take an inferior pointer instead of a pid.  All
4761         callers adjusted.
4762         (exit_inferior_silent): New.
4763         (detach_inferior): Delete.
4764         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4765         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4766         (detach_inferior_command, kill_inferior_command): Use
4767         find_inferior_id instead of valid_gdb_inferior_id and
4768         gdb_inferior_id_to_pid.
4769         (inferior_command): Use inferior and thread pointers.
4770         * inferior.h (struct thread_info): Forward declare.
4771         (notice_new_inferior): Take a thread_info pointer instead of a
4772         ptid_t.  All callers adjusted.
4773         (detach_inferior): Delete declaration.
4774         (exit_inferior, exit_inferior_silent): Take an inferior pointer
4775         instead of a pid.  All callers adjusted.
4776         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4777         (valid_gdb_inferior_id): Delete.
4778         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4779         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4780         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4781         ...
4782         <inf>: ... this new field.
4783         <step_ptid>: Delete, replaced by ...
4784         <step_thread>: ... this new field.
4785         (get_displaced_stepping_state): Take an inferior pointer instead
4786         of a pid.  All callers adjusted.
4787         (displaced_step_in_progress_any_inferior): Adjust.
4788         (displaced_step_in_progress_thread): Take a thread pointer instead
4789         of a ptid_t.  All callers adjusted.
4790         (displaced_step_in_progress, add_displaced_stepping_state): Take
4791         an inferior pointer instead of a pid.  All callers adjusted.
4792         (get_displaced_step_closure_by_addr): Adjust.
4793         (remove_displaced_stepping_state): Take an inferior pointer
4794         instead of a pid.  All callers adjusted.
4795         (displaced_step_prepare_throw, displaced_step_prepare)
4796         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4797         All callers adjusted.
4798         (start_step_over): Adjust.
4799         (infrun_thread_ptid_changed): Remove bit updating ptids in the
4800         displaced step queue.
4801         (do_target_resume): Adjust.
4802         (fetch_inferior_event): Use inferior_thread.
4803         (context_switch, get_inferior_stop_soon): Take an
4804         execution_control_state pointer instead of a ptid_t.  All callers
4805         adjusted.
4806         (switch_to_thread_cleanup): Delete.
4807         (stop_all_threads): Use scoped_restore_current_thread.
4808         * inline-frame.c: Include "gdbthread.h".
4809         (inline_state) <inline_state>: Take a thread pointer instead of a
4810         ptid_t.  All callers adjusted.
4811         <ptid>: Delete, replaced by ...
4812         <thread>: ... this new field.
4813         (find_inline_frame_state): Take a thread pointer instead of a
4814         ptid_t.  All callers adjusted.
4815         (skip_inline_frames, step_into_inline_frame)
4816         (inline_skipped_frames, inline_skipped_symbol): Take a thread
4817         pointer instead of a ptid_t.  All callers adjusted.
4818         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4819         (inline_skipped_frames, inline_skipped_symbol): Likewise.
4820         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4821         pointers directly.
4822         * linux-nat.c (get_detach_signal): Likewise.
4823         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4824         (thread_db_notice_clone): Adjust.
4825         (thread_db_find_new_threads_silently)
4826         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4827         a thread pointer instead of a ptid_t.  All callers adjusted.
4828         * mi/mi-cmd-var.c: Include "inferior.h".
4829         (mi_cmd_var_update_iter): Update to use thread pointers.
4830         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4831         inferior directly.
4832         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4833         out to ...
4834         (mi_output_running): ... this new function.
4835         (mi_on_resume_1): Adjust to use it.
4836         (mi_user_selected_context_changed): Adjust to use inferior_thread.
4837         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4838         directly.
4839         (interrupt_thread_callback): : Adjust to use thread and inferior
4840         pointers.
4841         * proc-service.c: Include "gdbthread.h".
4842         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4843         * progspace-and-thread.c: Include "inferior.h".
4844         * progspace.c: Include "inferior.h".
4845         * python/py-exitedevent.c (create_exited_event_object): Adjust to
4846         hold a reference to an inferior_object.
4847         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4848         inferior_thread.
4849         * python/py-inferior.c (struct inferior_object): Give the type a
4850         tag name instead of a typedef.
4851         (python_on_normal_stop): No need to check if the current thread is
4852         listed.
4853         (inferior_to_inferior_object): Change return type to
4854         inferior_object.  All callers adjusted.
4855         (find_thread_object): Delete, bits factored out to ...
4856         (thread_to_thread_object): ... this new function.
4857         * python/py-infthread.c (create_thread_object): Use
4858         inferior_to_inferior_object.
4859         (thpy_is_stopped): Use thread pointer directly.
4860         (gdbpy_selected_thread): Use inferior_thread.
4861         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4862         field, replaced with ...
4863         <thread>: ... this new field.  All users adjusted.
4864         (btpy_insn_or_gap_new): Drop const.
4865         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
4866         callers adjusted.
4867         * python/py-record.c: Include "gdbthread.h".
4868         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4869         a ptid_t.  All callers adjusted.
4870         (gdbpy_current_recording): Use inferior_thread.
4871         * python/py-record.h (recpy_record_object) <ptid>: Delete
4872         field, replaced with ...
4873         <thread>: ... this new field.  All users adjusted.
4874         (recpy_element_object) <ptid>: Delete
4875         field, replaced with ...
4876         <thread>: ... this new field.  All users adjusted.
4877         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4878         a ptid_t.  All callers adjusted.
4879         * python/py-threadevent.c: Include "gdbthread.h".
4880         (get_event_thread): Use thread_to_thread_object.
4881         * python/python-internal.h (struct inferior_object): Forward
4882         declare.
4883         (find_thread_object, find_inferior_object): Delete declarations.
4884         (thread_to_thread_object, inferior_to_inferior_object): New
4885         declarations.
4886         * record-btrace.c: Include "inferior.h".
4887         (require_btrace_thread): Use inferior_thread.
4888         (record_btrace_frame_sniffer)
4889         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4890         (get_thread_current_frame): Use scoped_restore_current_thread and
4891         switch_to_thread.
4892         (get_thread_current_frame): Use thread pointer directly.
4893         (record_btrace_replay_at_breakpoint): Use thread's inferior
4894         pointer directly.
4895         * record-full.c: Include "inferior.h".
4896         * regcache.c: Include "gdbthread.h".
4897         (get_thread_arch_regcache): Use the inferior's address space
4898         directly.
4899         (get_thread_regcache, registers_changed_thread): New.
4900         * regcache.h (get_thread_regcache(thread_info *thread)): New
4901         overload.
4902         (registers_changed_thread): New.
4903         (remote_target) <remote_detach_1>: Swap order of parameters.
4904         (remote_add_thread): <remote_add_thread>: Return the new thread.
4905         (get_remote_thread_info(ptid_t)): New overload.
4906         (remote_target::remote_notice_new_inferior): Use thread pointers
4907         directly.
4908         (remote_target::process_initial_stop_replies): Use
4909         thread_info::set_running.
4910         (remote_target::remote_detach_1, remote_target::detach)
4911         (extended_remote_target::detach): Adjust.
4912         * stack.c (frame_show_address): Use inferior_thread.
4913         * target-debug.h (target_debug_print_thread_info_pp): New.
4914         * target-delegates.c: Regenerate.
4915         * target.c (default_thread_address_space): Delete.
4916         (memory_xfer_partial_1): Use current_inferior.
4917         (target_detach): Use current_inferior.
4918         (target_thread_address_space): Delete.
4919         (generic_mourn_inferior): Use current_inferior.
4920         * target.h (struct target_ops) <thread_address_space>: Delete.
4921         (target_thread_address_space): Delete.
4922         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
4923         pointers directly.
4924         (delete_thread_1, delete_thread, delete_thread_silent): Take a
4925         thread pointer instead of a ptid_t.  Adjust all callers.
4926         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4927         (first_thread_of_process): Delete, replaced by ...
4928         (first_thread_of_inferior): ... this new function.  All callers
4929         adjusted.
4930         (any_thread_of_process): Rename to ...
4931         (any_thread_of_inferior): ... this, and take an inferior pointer.
4932         (any_live_thread_of_process): Rename to ...
4933         (any_live_thread_of_inferior): ... this, and take an inferior
4934         pointer.
4935         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4936         (value_in_thread_stack_temporaries)
4937         (get_last_thread_stack_temporary): Take a thread pointer instead
4938         of a ptid_t.  Adjust all callers.
4939         (thread_info::set_running): New.
4940         (validate_registers_access): Use inferior_thread.
4941         (can_access_registers_ptid): Rename to ...
4942         (can_access_registers_thread): ... this, and take a thread
4943         pointer.
4944         (print_thread_info_1): Adjust to compare thread pointers instead
4945         of ptids.
4946         (switch_to_no_thread, switch_to_thread): Make extern.
4947         (scoped_restore_current_thread::~scoped_restore_current_thread):
4948         Use m_thread pointer directly.
4949         (scoped_restore_current_thread::scoped_restore_current_thread):
4950         Use inferior_thread.
4951         (thread_command): Use thread pointer directly.
4952         (thread_num_make_value_helper): Use inferior_thread.
4953         * top.c (execute_command): Use inferior_thread.
4954         * tui/tui-interp.c: Include "inferior.h".
4955         * varobj.c (varobj_create): Use inferior_thread.
4956         (value_of_root_1): Use find_thread_global_id instead of
4957         global_thread_id_to_ptid.
4958
4959 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
4960
4961         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4962         possible.
4963         (regcache::write_part): Likewise.
4964         (readable_regcache::cooked_read_part): Update comment.
4965         (readable_regcache::cooked_write_part): Likewise.
4966         * regcache.h: (readable_regcache::read_part): Likewise.
4967         (regcache::write_part): Likewise.
4968
4969 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4970             Dirk Schubert  <dirk.schubert@arm.com>
4971
4972         * aarch64-linux-nat.c (post_attach): New.
4973         (aarch64_linux_nat_target::post_attach): Override post_attach to
4974         record the number of hardware debug registers.
4975
4976 2018-06-20  Tom Tromey  <tom@tromey.com>
4977
4978         * python/py-param.c (add_setshow_generic): Make parameters const.
4979         (parmpy_init): Update.
4980
4981 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4982
4983         * regcache.h (regcache_cooked_read_ftype): Rename to...
4984         (register_read_ftype): ...this, change type to function_view.
4985         (class reg_buffer) <save>: Remove src parameter.
4986         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4987         parameter non-const in first overload.  Remove src parameter in
4988         second overload.
4989         * regcache.c (do_cooked_read): Remove.
4990         (readonly_detached_regcache::readonly_detached_regcache): Make
4991         parameter non-const, adjust call to other constructor.
4992         (reg_buffer::save): Remove src parameter.
4993         * frame.c (do_frame_register_read): Remove.
4994         (frame_save_as_regcache): Use lambda function.
4995         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4996         parameter to ppu2spu_data *.
4997         (ppu2spu_sniffer): Use lambda function.
4998
4999 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5000
5001         * record-full.c (record_full_target::insert_breakpoint): Remove
5002         "struct" keyword, add const.
5003
5004 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
5005
5006         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5007         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5008         * configure.ac: Remove AC_PREREQ, add missing quoting.
5009         * gnulib/configure.ac: Modernize usage of
5010         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
5011         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5012         (AUTOMAKE_VERSION): Bump to 1.15.1.
5013         * configure: Re-generate.
5014         * config.in: Re-generate.
5015         * aclocal.m4: Re-generate.
5016         * gnulib/aclocal.m4: Re-generate.
5017         * gnulib/config.in: Re-generate.
5018         * gnulib/configure: Re-generate.
5019         * gnulib/import/Makefile.in: Re-generate.
5020
5021 2018-06-19  Pedro Alves  <palves@redhat.com>
5022
5023         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5024         (lookup_minimal_symbol_by_pc_section): ... here with
5025         gdb_assert_not_reached added.
5026
5027 2018-06-19  Pedro Alves  <palves@redhat.com>
5028
5029         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5030         parameter with a block parameter.  Compare location's block symbol
5031         with the frame's block instead of addresses.
5032         (skip_inline_frames): Pass the current block instead of the
5033         frame's address.  Break out as soon as we determine the frame
5034         should not be skipped.
5035
5036 2018-06-18  Tom Tromey  <tom@tromey.com>
5037
5038         * solib-aix.c (solib_aix_get_section_offsets): Return
5039         unique_xmalloc_ptr.
5040         (solib_aix_solib_create_inferior_hook): Update.
5041
5042 2018-06-18  Tom Tromey  <tom@tromey.com>
5043
5044         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5045
5046 2018-06-18  Tom Tromey  <tom@tromey.com>
5047
5048         * solib-frv.c (frv_relocate_main_executable): Use
5049         unique_xmalloc_ptr.
5050         * solib-dsbt.c (dsbt_relocate_main_executable): Use
5051         unique_xmalloc_ptr.
5052
5053 2018-06-18  Tom Tromey  <tom@tromey.com>
5054
5055         * objfiles.h (inhibit_section_map_updates): Update.
5056         (resume_section_map_updates, resume_section_map_updates_cleanup):
5057         Remove.
5058         * solib-svr4.c (svr4_handle_solib_event): Update.
5059         * objfiles.c (inhibit_section_map_updates): Return
5060         scoped_restore_tmpl<int>.
5061         (resume_section_map_updates, resume_section_map_updates_cleanup):
5062         Remove.
5063
5064 2018-06-18  Tom Tromey  <tom@tromey.com>
5065
5066         * valprint.h (read_string): Update.
5067         * valprint.c (read_string): Change type of "buffer".
5068         (val_print_string): Update.
5069         * python/py-value.c (valpy_string): Update.
5070         * language.h (struct language_defn) <la_get_string>: Change
5071         type of "buffer".
5072         (default_get_string, c_get_string): Update.
5073         * language.c (default_get_string): Change type of "buffer".
5074         * guile/scm-value.c (gdbscm_value_to_string): Update.
5075         * c-lang.c (c_get_string): Change type of "buffer".
5076
5077 2018-06-18  Tom Tromey  <tom@tromey.com>
5078
5079         * ser-mingw.c (struct pipe_state_destroyer): New.
5080         (pipe_state_up): New typedef.
5081         (cleanup_pipe_state): Remove.
5082         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
5083
5084 2018-06-18  Tom Tromey  <tom@tromey.com>
5085
5086         * rust-lang.h (rust_yyerror): Don't declare.
5087         * rust-lang.c (rust_language_defn): Update.
5088         * rust-exp.y (yyerror): Now static.
5089         * parse.c (parse_exp_in_context_1): Update.
5090         * p-lang.h (p_yyerror): Don't declare.
5091         * p-lang.c (p_language_defn): Update.
5092         * p-exp.y (yyerror): Now static.
5093         * opencl-lang.c (opencl_language_defn): Update.
5094         * objc-lang.c (objc_language_defn): Update.
5095         * m2-lang.h (m2_yyerror): Don't declare.
5096         * m2-lang.c (m2_language_defn): Update.
5097         * m2-exp.y (yyerror): Now static.
5098         * language.h (struct language_defn) <la_error>: Remove.
5099         * language.c (unk_lang_error): Remove.
5100         (unknown_language_defn, auto_language_defn): Remove.
5101         * go-lang.h (go_yyerror): Don't declare.
5102         * go-lang.c (go_language_defn): Update.
5103         * go-exp.y (yyerror): Now static.
5104         * f-lang.h (f_yyerror): Don't declare.
5105         * f-lang.c (f_language_defn): Update.
5106         * f-exp.y (yyerror): Now static.
5107         * d-lang.h (d_yyerror): Don't declare.
5108         * d-lang.c (d_language_defn): Update.
5109         * d-exp.y (yyerror): Now static.
5110         * c-lang.h (c_yyerror): Don't declare.
5111         * c-lang.c (c_language_defn, cplus_language_defn)
5112         (asm_language_defn, minimal_language_defn): Update.
5113         * c-exp.y (yyerror): Now static.
5114         * ada-lang.h (ada_yyerror): Don't declare.
5115         * ada-lang.c (ada_language_defn): Update.
5116         * ada-exp.y (yyerror): Now static.
5117
5118 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5119
5120         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5121         (store_sveregs_to_thread): Likewise.
5122         (aarch64_linux_fetch_inferior_registers): Check for SVE.
5123         (aarch64_linux_store_inferior_registers): Likewise.
5124         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5125         function.
5126         (aarch64_sve_regs_copy_to_regcache): Likewise.
5127         (aarch64_sve_regs_copy_from_regcache): Likewise.
5128         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5129         declaration.
5130         (aarch64_sve_regs_copy_to_regcache): Likewise.
5131         (aarch64_sve_regs_copy_from_regcache): Likewise.
5132         (sve_context): Structure from Linux headers.
5133         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5134         (SVE_SIG_ZREG_SIZE): Likewise.
5135         (SVE_SIG_PREG_SIZE): Likewise.
5136         (SVE_SIG_FFR_SIZE): Likewise.
5137         (SVE_SIG_REGS_OFFSET): Likewise.
5138         (SVE_SIG_ZREGS_OFFSET): Likewise.
5139         (SVE_SIG_ZREG_OFFSET): Likewise.
5140         (SVE_SIG_ZREGS_SIZE): Likewise.
5141         (SVE_SIG_PREGS_OFFSET): Likewise.
5142         (SVE_SIG_PREG_OFFSET): Likewise.
5143         (SVE_SIG_PREGS_SIZE): Likewise.
5144         (SVE_SIG_FFR_OFFSET): Likewise.
5145         (SVE_SIG_REGS_SIZE): Likewise.
5146         (SVE_SIG_CONTEXT_SIZE): Likewise.
5147         (SVE_PT_REGS_MASK): Likewise.
5148         (SVE_PT_REGS_FPSIMD): Likewise.
5149         (SVE_PT_REGS_SVE): Likewise.
5150         (SVE_PT_VL_INHERIT): Likewise.
5151         (SVE_PT_VL_ONEXEC): Likewise.
5152         (SVE_PT_REGS_OFFSET): Likewise.
5153         (SVE_PT_FPSIMD_OFFSET): Likewise.
5154         (SVE_PT_FPSIMD_SIZE): Likewise.
5155         (SVE_PT_SVE_ZREG_SIZE): Likewise.
5156         (SVE_PT_SVE_PREG_SIZE): Likewise.
5157         (SVE_PT_SVE_FFR_SIZE): Likewise.
5158         (SVE_PT_SVE_FPSR_SIZE): Likewise.
5159         (SVE_PT_SVE_FPCR_SIZE): Likewise.
5160         (__SVE_SIG_TO_PT): Likewise.
5161         (SVE_PT_SVE_OFFSET): Likewise.
5162         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5163         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5164         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5165         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5166         (SVE_PT_SVE_PREG_OFFSET): Likewise.
5167         (SVE_PT_SVE_PREGS_SIZE): Likewise.
5168         (SVE_PT_SVE_FFR_OFFSET): Likewise.
5169         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5170         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5171         (SVE_PT_SVE_SIZE): Likewise.
5172         (SVE_PT_SIZE): Likewise.
5173         (HAS_SVE_STATE): New define.
5174
5175 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5176
5177         * nat/aarch64-sve-linux-sigcontext.h: New file.
5178         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5179         new files.
5180         (SVE_VQ_MIN): Likewise.
5181         (SVE_VQ_MAX): Likewise.
5182         (SVE_VL_MIN): Likewise.
5183         (SVE_VL_MAX): Likewise.
5184         (SVE_NUM_ZREGS): Likewise.
5185         (SVE_NUM_PREGS): Likewise.
5186         (sve_vl_valid): Likewise.
5187         (struct user_sve_header): Likewise.
5188
5189 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
5190             Richard Bunt <Richard.Bunt@arm.com>
5191
5192         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5193         was requested by GDB.
5194
5195 2018-06-15  Tom de Vries  <tdevries@suse.de>
5196
5197         * MAINTAINERS (Write After Approval): Add Tom de Vries.
5198
5199 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
5200
5201         * gnulib/update-gnulib.sh: Print expected versions of
5202         autoconf/aclocal.
5203
5204 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
5205
5206         * arch-utils.c (default_type_align): Use type_length_units.
5207         * gdbtypes.c (type_align): Use type_length_units.
5208
5209 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5210
5211         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5212         of 'define' command.
5213
5214 2018-06-14  Tom de Vries  <tdevries@suse.de>
5215
5216         PR cli/22573
5217         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5218         get_no_prettyformat_print_options.
5219
5220 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5221
5222         * sparc-nat.h: Include target.h.
5223         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5224         <fetch_registers>: Remove this argument in function call.
5225         <store_registers>: Remove this argument in function call, remove
5226         extra semicolon.
5227         <low_forget_process>: Call sparc64_forget_process instead of
5228         sparc_forget_process.
5229
5230 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5231
5232         * procfs.c (_initialize_procfs): Use add_inf_child_target.
5233         (procfs_target::make_corefile_notes): Adjust to new
5234         target_read_alloc return type.
5235
5236 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5237             Stephen Roberts  <stephen.roberts@arm.com>
5238
5239         PR gdb/22882
5240         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5241         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5242         Move should_notify_stop local into more inner scope.
5243
5244 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5245             Stephen Roberts  <stephen.roberts@arm.com>
5246
5247         PR gdb/22882
5248         * infrun.c (resume_1): Add call to mark_async_event_handler.
5249
5250 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5251
5252         * infrun.c (do_target_wait): Change old version of $pc printed.
5253
5254 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5255
5256         * dwarf2read.c (read_index_from_section): Rename to...
5257         (read_gdb_index_from_section): ... this, update all callers.
5258         (dwarf2_read_index): Rename to...
5259         (dwarf2_read_gdb_index): ... this, update all callers.
5260
5261 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
5262
5263         * gdb/hppa-linux-nat.c
5264         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5265         hppa_linux_nat_target::fetch_registers.
5266
5267 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5268
5269         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5270         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5271         (AARCH64_DWARF_SVE_FFR): Likewise.
5272         (AARCH64_DWARF_SVE_P0): Likewise.
5273         (AARCH64_DWARF_SVE_Z0): Likewise.
5274
5275 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5276
5277         * common/common-regcache.h (raw_compare): New function.
5278         * regcache.c (regcache::raw_compare): Likewise.
5279         * regcache.h (regcache::raw_compare): New declaration.
5280
5281 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5282
5283         * common/common-regcache.h (reg_buffer_common): New structure.
5284         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5285         (reg_buffer::raw_supply): Likewise.
5286         (reg_buffer::raw_supply_integer): Likewise.
5287         (reg_buffer::raw_supply_zeroed): Likewise.
5288         (reg_buffer::raw_collect): Likewise.
5289         (reg_buffer::raw_collect_integer): Likewise.
5290         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5291         (reg_buffer::raw_supply): Likewise.
5292         (reg_buffer::raw_supply_integer): Likewise.
5293         (reg_buffer::raw_supply_zeroed): Likewise.
5294         (reg_buffer::raw_collect): Likewise.
5295         (reg_buffer::raw_collect_integer): Likewise.
5296
5297 2018-06-10  Tom Tromey  <tom@tromey.com>
5298
5299         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
5300         (class remote_state) <stop_reply_queue>: Now std::vector.
5301         (remote_state::~remote_state)
5302         (remote_target::stop_reply_queue_length): Update.
5303         (struct queue_iter_param, remove_child_of_pending_fork)
5304         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5305         (check_pending_event_prevents_wildcard_vcont_callback)
5306         (remove_stop_reply_for_inferior)
5307         (remove_stop_reply_of_remote_state)
5308         (remote_notif_remove_once_on_match)
5309         (stop_reply_match_ptid_and_ws)
5310         (remote_kill_child_of_pending_fork): Remove.
5311         (remote_target::remove_new_fork_children)
5312         (remote_target::check_pending_events_prevent_wildcard_vcont)
5313         (remote_target::discard_pending_stop_replies)
5314         (remote_target::discard_pending_stop_replies_in_queue)
5315         (remote_target::remote_notif_remove_queued_reply)
5316         (remote_target::queued_stop_reply)
5317         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5318         (remote_target::wait, remote_target::kill_new_fork_children)
5319         (remote_target::async): Update.
5320
5321 2018-06-10  Tom Tromey  <tom@tromey.com>
5322
5323         * record-full.c (record_full_arch_list_cleanups): Remove.
5324         (record_full_message): Use try/catch.
5325         (record_full_wait_cleanups): Remove.
5326         (record_full_wait_1): Use try/catch.
5327         (record_full_restore): Likewise.
5328
5329 2018-06-10  Tom Tromey  <tom@tromey.com>
5330
5331         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
5332         declare VEC.  Add constructor.
5333         <in_target_beneath>: Now bool.
5334         (record_full_breakpoints): Now a std::vector, static.
5335         (record_full_sync_record_breakpoints)
5336         (record_full_init_record_breakpoints)
5337         (record_full_target::insert_breakpoint)
5338         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
5339
5340 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5341
5342         * dwarf2read.c (process_cu_includes): Remove struct keyword.
5343         * serial.c (serial_interface_lookup): Remove struct keyword.
5344
5345 2018-06-10  Tom Tromey  <tom@tromey.com>
5346
5347         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5348         method.
5349         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5350         a method.
5351         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5352         method.
5353         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5354         "beneath" as a method.
5355         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5356         Use "beneath" as a method.
5357
5358 2018-06-10  Tom Tromey  <tom@tromey.com>
5359
5360         * tracefile.c (struct trace_file_writer_deleter): New.
5361         <operator()>: Rename from trace_file_writer_xfree.
5362         (trace_file_writer_up): New typedef.
5363         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5364
5365 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5366
5367         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5368         <m_registers, m_register_status>: Change type to
5369         std::unique_ptr.
5370         * regcache.c (reg_buffer::reg_buffer): Use new instead of
5371         XCNEWVEC.
5372
5373 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5374
5375         * common/common-regcache.h (enum register_status): Add
5376         underlying type "signed char".
5377         * regcache.h (reg_buffer) <m_register_status>: Change type to
5378         register_status *.
5379         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5380         register_status instead of signed char.
5381         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5382         (reg_buffer::get_register_status): Remove cast.
5383         (readable_regcache::raw_read): Remove cast.
5384         (readable_regcache::cooked_read): Remove cast.
5385
5386 2018-06-09  Tom Tromey  <tom@tromey.com>
5387
5388         * source.c (reverse_search_command, forward_search_command): Use
5389         scoped_fd.
5390
5391 2018-06-09  Tom Tromey  <tom@tromey.com>
5392
5393         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
5394         (serial_ops_list): Now static, std::vector.
5395         (serial_interface_lookup, serial_add_interface): Update.
5396
5397 2018-06-09  Tom Tromey  <tom@tromey.com>
5398
5399         * dwarf2read.c (process_cu_includes): Update.
5400         (process_full_comp_unit): Update.
5401         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5402         std::vector.
5403
5404 2018-06-08  Paul Koning  <paul_koning@dell.com>
5405
5406         PR gdb/23252
5407
5408         * python/python.c (do_start_initialization):
5409         Avoid call to internal Python API.
5410         (init__gdb_module): New function.
5411
5412 2018-06-08  Gary Benson <gbenson@redhat.com>
5413
5414         * linux-thread-db.c (valprint.h): New include.
5415         (struct check_thread_db_info): New structure.
5416         (check_thread_db_on_load, tdb_testinfo): New static globals.
5417         (check_thread_db, check_thread_db_callback): New functions.
5418         (try_thread_db_load_1): Run integrity checks if requested.
5419         (maintenance_check_libthread_db): New function.
5420         (_initialize_thread_db): Register "maint check libthread-db"
5421         and "maint set/show check-libthread-db".
5422         * NEWS: Mention the above new commands.
5423
5424 2018-06-08  Tom Tromey  <tom@tromey.com>
5425
5426         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5427         now a method.
5428
5429 2018-06-08  Tom Tromey  <tom@tromey.com>
5430
5431         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5432
5433 2018-06-08  Tom Tromey  <tom@tromey.com>
5434
5435         * common/btrace-common.h (struct btrace_data): Add constructor,
5436         destructor, move assignment operator.
5437         <empty, clear, fini>: New methods.
5438         <format>: Initialize.
5439         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5440         (btrace_data_empty): Don't declare.
5441         * common/btrace-common.c (btrace_data_init): Remove.
5442         (btrace_data::fini): Rename from btrace_data_fini.
5443         (btrace_data::empty): Rename from btrace_data_empty.
5444         (btrace_data::clear): Rename from btrace_data_clear.  Return
5445         bool.
5446         * btrace.h (make_cleanup_btrace_data): Don't declare.
5447         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5448         (parse_xml_btrace): Update.
5449         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5450         (maint_btrace_clear_packet_history_cmd): Update.
5451
5452 2018-06-07  Pedro Alves  <palves@redhat.com>
5453
5454         * target.h (target_ops) <beneath>: Now a method.  All references
5455         updated.
5456         (class target_stack): New.
5457         * target.c (g_target_stack): New.
5458         (g_current_top_target): Delete.
5459         (current_top_target): Get the top target out of g_target_stack.
5460         (target_stack::push, target_stack::unpush): New.
5461         (push_target, unpush_target): Reimplement.
5462         (target_is_pushed): Reimplement in terms of g_target_stack.
5463         (target_ops::beneath, target_stack::find_beneath): New.
5464
5465 2018-06-07  Pedro Alves  <palves@redhat.com>
5466
5467         * target.h (find_target_beneath): Delete declaration.
5468         * target.c (find_target_beneath): Delete definition.
5469         * aix-thread.c: All callers of find_target_beneath adjusted to
5470         call target_ops::beneath instead.
5471         * bsd-uthread.c: Likewise.
5472         * linux-thread-db.c: Likewise.
5473         * ravenscar-thread.c: Likewise.
5474         * sol-thread.c: Likewise.
5475         * spu-multiarch.c: Likewise.
5476
5477 2018-06-07  Pedro Alves  <palves@redhat.com>
5478
5479         * target.h (target_ops) <beneath>: Now a method.  All references
5480         updated.
5481         (target_ops) <m_beneath>: New.
5482         * target.c (target_ops::beneath): New.
5483         * corelow.c: Adjust all references to target_ops::beneath.
5484         * linux-thread-db.c: Likewise.
5485         * make-target-delegates: Likewise.
5486         * record-btrace.c: Likewise.
5487         * record-full.c: Likewise.
5488         * remote.c: Likewise.
5489         * target.c: Likewise.
5490         * target-delegates.c: Regenerate.
5491
5492 2018-06-07  Pedro Alves  <palves@redhat.com>
5493
5494         * target.h (target_stack): Delete.
5495         (current_top_target): Declare function.
5496         * target.c (target_stack): Delete.
5497         (g_current_top_target): New.
5498         (current_top_target): New function.
5499         * auxv.c: Use current_top_target instead of target_stack
5500         throughout.
5501         * avr-tdep.c: Likewise.
5502         * breakpoint.c: Likewise.
5503         * corefile.c: Likewise.
5504         * elfread.c: Likewise.
5505         * eval.c: Likewise.
5506         * exceptions.c: Likewise.
5507         * frame.c: Likewise.
5508         * gdbarch-selftests.c: Likewise.
5509         * gnu-v3-abi.c: Likewise.
5510         * ia64-tdep.c: Likewise.
5511         * ia64-vms-tdep.c: Likewise.
5512         * infcall.c: Likewise.
5513         * infcmd.c: Likewise.
5514         * infrun.c: Likewise.
5515         * linespec.c: Likewise.
5516         * linux-tdep.c: Likewise.
5517         * minsyms.c: Likewise.
5518         * ppc-linux-nat.c: Likewise.
5519         * ppc-linux-tdep.c: Likewise.
5520         * procfs.c: Likewise.
5521         * regcache.c: Likewise.
5522         * remote.c: Likewise.
5523         * rs6000-tdep.c: Likewise.
5524         * s390-linux-nat.c: Likewise.
5525         * s390-tdep.c: Likewise.
5526         * solib-aix.c: Likewise.
5527         * solib-darwin.c: Likewise.
5528         * solib-dsbt.c: Likewise.
5529         * solib-spu.c: Likewise.
5530         * solib-svr4.c: Likewise.
5531         * solib-target.c: Likewise.
5532         * sparc-tdep.c: Likewise.
5533         * sparc64-tdep.c: Likewise.
5534         * spu-tdep.c: Likewise.
5535         * symfile.c: Likewise.
5536         * symtab.c: Likewise.
5537         * target-descriptions.c: Likewise.
5538         * target-memory.c: Likewise.
5539         * target.c: Likewise.
5540         * target.h: Likewise.
5541         * tracefile-tfile.c: Likewise.
5542         * tracepoint.c: Likewise.
5543         * valops.c: Likewise.
5544         * valprint.c: Likewise.
5545         * value.c: Likewise.
5546         * windows-tdep.c: Likewise.
5547         * mi/mi-main.c: Likewise.
5548
5549 2018-06-07  Tom Tromey  <tom@tromey.com>
5550
5551         * valprint.h (build_address_symbolic): Declare.
5552         * printcmd.c (print_address_symbolic): Update.
5553         (build_address_symbolic): Change "name" and "filename" to
5554         std::string.
5555         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5556         Update.
5557         * defs.h (build_address_symbolic): Remove declaration.
5558
5559 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
5560
5561         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5562         (aarch64_vnv_type): Add function.
5563         (aarch64_pseudo_register_name): Add V regs for SVE.
5564         (aarch64_pseudo_register_type): Likewise.
5565         (aarch64_pseudo_register_reggroup_p): Likewise.
5566         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5567         (aarch64_pseudo_read_value): Add V regs for SVE.
5568         (aarch64_pseudo_write_2): Use V0 offset for SVE
5569         (aarch64_pseudo_write): Add V regs for SVE.
5570         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5571
5572 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5573
5574         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5575         (sve_vl_from_vq): Likewise.
5576
5577 2018-06-05  Tom Tromey  <tom@tromey.com>
5578
5579         * cli/cli-cmds.c (show_version): Update.
5580         * top.c (print_gdb_version): Add "interactive" parameter.
5581         Update.
5582         * main.c (captured_main_1): Update.
5583         * top.h (print_gdb_version): Add "interactive" parameter and a
5584         comment.
5585
5586 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
5587
5588         * common/enum-flags.h: Add trailing semicolon to example in
5589         comment.
5590
5591 2018-06-05  Tom Tromey  <tom@tromey.com>
5592
5593         PR cli/12326:
5594         * NEWS: Add entry about pager.
5595         * utils.c (pagination_disabled_for_command): New global.
5596         (prompt_for_continue): Allow "c" response to prompt.
5597         (reinitialize_more_filter): Clear
5598         pagination_disabled_for_command.
5599         (fputs_maybe_filtered): Check pagination_disabled_for_command.
5600
5601 2018-06-04  Tom Tromey  <tom@tromey.com>
5602
5603         * ada-lang.h (ada_lookup_symbol_list): Update.
5604         * ada-lang.c (resolve_subexp): Update.
5605         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
5606         parameter.
5607         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5608         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5609         results parameter to std::vector.
5610         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5611         Update.
5612         * ada-exp.y (block_lookup): Update.
5613         (select_possible_type_sym): Change type of syms.  Remove nsyms
5614         parameter.
5615         (write_var_or_type, write_name_assoc): Update.
5616
5617 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
5618
5619         * windows-nat.c (windows_nat_target::xfer_partial): Return
5620         TARGET_XFER_E_IO if we need to delegate to the target beneath
5621         but BENEATH is NULL.
5622
5623 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
5624
5625         * Makefile.in (config.status): Add configure.nat as a
5626         dependency.
5627
5628 2018-06-04  Tom Tromey  <tom@tromey.com>
5629
5630         * cp-name-parser.y (cpname_state): Add method declarations.
5631         (HANDLE_QUAL): Update.
5632         (cpname_state::d_grab, cpname_state::fill_comp)
5633         (cpname_state::make_operator, cpname_state::make_dtor)
5634         (cpname_state::make_builtin_type, cpname_state::make_name)
5635         (cpname_state::d_qualify, cpname_state::d_int_type)
5636         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5637         (%union): Move earlier.
5638
5639 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5640
5641         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5642
5643 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5644
5645         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5646         (aarch64_pseudo_write_1): Likewise.
5647         (aarch64_pseudo_read_value): Use helper.
5648         (aarch64_pseudo_write): Likewise.
5649
5650 2018-06-04  Pedro Alves  <palves@redhat.com>
5651
5652         * darwin-nat.c (darwin_ops): Delete.
5653         (darwin_attach_pid): Use get_native_target.
5654
5655 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5656
5657         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5658         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5659
5660 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5661
5662         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5663         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5664         (aarch64_gdbarch_init): Check for SVE.
5665         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5666
5667 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5668
5669         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5670         * aarch64-tdep.h (aarch64_read_description): Likewise.
5671         * arch/aarch64.c (aarch64_create_target_description): Likewise.
5672         * arch/aarch64.h (aarch64_create_target_description): Likewise.
5673         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5674         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5675         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5676
5677 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
5678
5679         * value.c (value_fetch_lazy_bitfield): New.
5680         (value_fetch_lazy_memory): New.
5681         (value_fetch_lazy_register): New.
5682         (value_fetch_lazy): Factor out to smaller functions.
5683
5684 2018-06-01  Tom Tromey  <tom@tromey.com>
5685
5686         * cp-name-parser.y (backslashable, represented): Now const.
5687
5688 2018-06-01  Tom Tromey  <tom@tromey.com>
5689
5690         * cp-name-parser.y: Include parser-defs.h.
5691         (parser_fprintf): Remove declaration.
5692
5693 2018-06-01  Tom Tromey  <tom@tromey.com>
5694
5695         * cp-name-parser.y: Use %pure-parser, %lex-param, and
5696         %parse-param.
5697         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5698         (global_result): Remove globals.
5699         (struct cpname_state): New.
5700         (yyparse): Don't declare.
5701         (yylex, yyerror): Move declarations after %union.
5702         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5703         (make_name): Add state parameter.
5704         Update all callers.
5705         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5706         parameter.
5707         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5708         Update.
5709         (yylex): Add lvalp, state parameters.
5710         (yyerror): Add state parameter.
5711         (cp_demangled_name_to_comp): Update.
5712
5713 2018-06-01  Tom Tromey  <tom@tromey.com>
5714
5715         * cp-name-parser.y (parser_fprintf): Declare.
5716         (GDB_YY_REMAP_PREFIX): Define.
5717         Include yy-remap.h.  Don't redefine yy* identifiers.
5718
5719 2018-06-01  Tom Tromey  <tom@tromey.com>
5720
5721         * python/py-type.c (typy_legacy_template_argument): Update.
5722         * cp-support.h (cp_demangled_name_to_comp): Update.
5723         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5724         parameter to be a "std::string *".
5725         (main): Update.
5726
5727 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
5728
5729         * ada-lex.l: Include "diagnostics.h" instead of
5730         "common/diagnostics.h".
5731         * unittests/environ-selftests.c: Likewise.
5732         * common/diagnostics.h: Moved to ../include.
5733
5734 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
5735
5736         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5737         to language_mode_manual while calling breakpoint_re_set_one.
5738
5739 2018-06-01  Tom Tromey  <tom@tromey.com>
5740
5741         * valops.c (value_cast_structs, destructor_name_p): Update.
5742         * symtab.c (gdb_mangle_name): Update.
5743         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5744         Update.
5745         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5746         (pascal_object_print_value_fields, pascal_object_print_value):
5747         Update.
5748         * p-typeprint.c (pascal_type_print_derivation_info): Update.
5749         * linespec.c (find_methods): Update.
5750         * gdbtypes.h (type_name_no_tag): Remove.
5751         (type_name_or_error): Rename from type_name_no_tag_or_error.
5752         * gdbtypes.c (type_name_no_tag): Remove.
5753         (type_name_or_error): Rename from type_name_no_tag_or_error.
5754         (lookup_struct_elt_type, check_typedef): Update.
5755         * expprint.c (print_subexp_standard): Update.
5756         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5757         * d-namespace.c (d_lookup_nested_symbol): Update.
5758         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5759         (cp_print_class_member): Update.
5760         * cp-namespace.c (cp_lookup_nested_symbol): Update.
5761         * completer.c (add_struct_fields): Update.
5762         * c-typeprint.c (cp_type_print_derivation_info)
5763         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5764         Update.
5765         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5766         (ada_prefer_type, ada_is_exception_sym): Update.
5767
5768 2018-06-01  Tom Tromey  <tom@tromey.com>
5769
5770         * valops.c (enum_constant_from_type, value_namespace_elt)
5771         (value_maybe_namespace_elt): Update.
5772         * valarith.c (find_size_for_pointer_math): Update.
5773         * target-descriptions.c (make_gdb_type): Update.
5774         * symmisc.c (print_symbol): Update.
5775         * stabsread.c (define_symbol, read_type)
5776         (complain_about_struct_wipeout, add_undefined_type)
5777         (cleanup_undefined_types_1): Update.
5778         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5779         (rust_range_type_p, val_print_struct, rust_print_struct_def)
5780         (rust_internal_print_type, rust_composite_type)
5781         (rust_evaluate_funcall, rust_evaluate_subexp)
5782         (rust_inclusive_range_type_p): Update.
5783         * python/py-type.c (typy_get_tag): Update.
5784         * p-typeprint.c (pascal_type_print_base): Update.
5785         * mdebugread.c (parse_symbol, parse_type): Update.
5786         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5787         Update.
5788         * guile/scm-type.c (gdbscm_type_tag): Update.
5789         * go-lang.c (sixg_string_p): Update.
5790         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5791         Update.
5792         * gdbtypes.h (struct main_type) <tag_name>: Remove.
5793         (TYPE_TAG_NAME): Remove.
5794         * gdbtypes.c (type_name_no_tag): Simplify.
5795         (check_typedef, check_types_equal, recursive_dump_type)
5796         (copy_type_recursive, arch_composite_type): Update.
5797         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
5798         in summary mode when needed.
5799         * eval.c (evaluate_funcall): Update.
5800         * dwarf2read.c (fixup_go_packaging, read_structure_type)
5801         (process_structure_scope, read_enumeration_type)
5802         (read_namespace_type, read_module_type, determine_prefix): Update.
5803         * cp-support.c (inspect_type): Update.
5804         * coffread.c (process_coff_symbol, decode_base_type): Update.
5805         * c-varobj.c (c_is_path_expr_parent): Update.
5806         * c-typeprint.c (c_type_print_base_struct_union): Update.
5807         (c_type_print_base_1): Update.  Print struct/class/union/enum in
5808         summary when using C language.
5809         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5810         (gen_maybe_namespace_elt): Update.
5811         * ada-lang.c (ada_type_name): Simplify.
5812         (empty_record, ada_template_to_fixed_record_type_1)
5813         (template_to_static_fixed_type)
5814         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5815
5816 2018-06-01  Tom Tromey  <tom@tromey.com>
5817
5818         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5819         c_print_type.
5820         * c-typeprint.c (c_print_type_1): Add "language" parameter.
5821         (c_print_type): Update.
5822         (c_print_type): New overload.
5823         (c_type_print_varspec_prefix, c_type_print_args)
5824         (c_type_print_varspec_suffix, c_print_type_no_offsets)
5825         (c_type_print_base_struct_union, c_type_print_base_1)
5826         (cp_type_print_method_args): Add "language" parameter.
5827         (c_type_print_base): Update.
5828         * c-lang.h (c_print_type): Add new overload.
5829
5830 2018-06-01  Tom Tromey  <tom@tromey.com>
5831
5832         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5833         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5834
5835 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
5836
5837         * aarch64-tdep.c (aarch64_sve_register_names): New const
5838         var.
5839         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5840         (AARCH64_SVE_Z_REGS_NUM): New define.
5841         (AARCH64_SVE_P_REGS_NUM): Likewise.
5842         (AARCH64_SVE_NUM_REGS): Likewise.
5843
5844 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
5845
5846         * nat/linux-ptrace.h [__alpha__]
5847         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5848         definitions.
5849
5850 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
5851
5852         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5853         the endianness selected.
5854         * NEWS: Document `set endian auto' mode operation update.
5855
5856 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5857
5858         * Makefile.in: Add new header.
5859         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5860         (sve_vl_from_vg): Likewise.
5861         (sve_vq_from_vl): Likewise.
5862         (sve_vl_from_vq): Likewise.
5863         (sve_vq_from_vg): Likewise.
5864         (sve_vg_from_vq): Likewise.
5865         * configure.nat: Add new c file.
5866         * nat/aarch64-sve-linux-ptrace.c: New file.
5867         * nat/aarch64-sve-linux-ptrace.h: New file.
5868
5869 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5870
5871         * aarch64-linux-nat.c (aarch64_linux_read_description):
5872         Add parmeter zero.
5873         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5874         Likewise.
5875         * aarch64-tdep.c (tdesc_aarch64_list): Add.
5876         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5877         (aarch64_gdbarch_init): Add parmeter zero.
5878         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5879         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5880         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5881         parmeter.
5882         * doc/gdb.texinfo: Describe SVE feature
5883         * features/aarch64-sve.c: New file.
5884
5885 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
5886
5887         PR gdb/23210
5888         * gdbarch.sh (significant_addr_bit): Default to zero when
5889         not set by target architecture.
5890         * gdbarch.c: Re-generated.
5891         * utils.c (address_significant): Update.
5892
5893 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
5894
5895         * stack.c (func_command): Remove trailing newline in call to error.
5896
5897 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5898
5899         * regcache.h (regcache_raw_collect): Remove, update callers to
5900         use regcache::raw_collect.
5901         * regcache.c (regcache_raw_collect): Remove.
5902
5903 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5904
5905         * regcache.h (regcache_raw_supply): Remove, update callers to
5906         use detached_regcache::raw_supply.
5907         * regcache.c (regcache_raw_supply): Remove.
5908
5909 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5910
5911         * regcache.h (regcache_cooked_write_part): Remove, update
5912         callers to use regcache::cooked_write_part.
5913         * regcache.c (regcache_cooked_write_part): Remove.
5914
5915 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5916
5917         * regcache.h (regcache_cooked_read_part): Remove, update callers
5918         to use readable_regcache::cooked_read_part.
5919         * regcache.c (regcache_cooked_read_part): Remove.
5920
5921 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5922
5923         * regcache.h (regcache_cooked_read_value): Remove, update
5924         callers to use readable_regcache::cooked_read_value.
5925         * regcache.c (regcache_cooked_read_value): Remove.
5926
5927 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5928
5929         * regcache.h (regcache_cooked_write): Remove, update callers to
5930         use regcache::cooked_write.
5931         * regcache.c (regcache_cooked_write): Remove.
5932
5933 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5934
5935         * regcache.h (regcache_invalidate): Remove, update callers to
5936         use detached_regcache::invalidate instead.
5937         * regcache.c (regcache_invalidate): Remove.
5938
5939 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5940
5941         * regcache.h (regcache_raw_write_part): Remove, update callers
5942         to use regcache::raw_write_part instead.
5943         * regcache.c (regcache_raw_write_part): Remove.
5944
5945 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5946
5947         * regcache.h (regcache_raw_read_part): Remove, update callers to
5948         use readable_regcache::raw_read_part instead.
5949         * regcache.c (regcache_raw_read_part): Remove.
5950
5951 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5952
5953         * regcache.h (regcache_cooked_read): Remove, update callers to
5954         use readable_regcache::cooked_read instead.
5955         * regcache.c (regcache_cooked_read): Remove.
5956
5957 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5958
5959         * regcache.h (regcache_raw_write): Remove, update callers to use
5960         regcache::raw_write instead.
5961         * regcache.c (regcache_raw_write): Remove.
5962
5963 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5964
5965         * regcache.h (regcache_raw_read): Remove, update callers to use
5966         readable_regcache::raw_read instead.
5967         * regcache.c (regcache_raw_read): Remove.
5968
5969 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5970
5971         * regcache.h (regcache_raw_update): Remove, update callers to
5972         use readable_regcache::raw_update instead.
5973         * regcache.c (regcache_raw_update): Remove.
5974
5975 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5976
5977         * regcache.h (regcache_register_status): Remove, update callers
5978         to use reg_buffer::get_register_status directly instead.
5979         * regcache.c (regcache_register_status): Remove.
5980
5981 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5982
5983         * regcache.h (regcache_get_ptid): Remove, update all callers to
5984         call regcache::ptid instead.
5985         * regcache.c (regcache_get_ptid): Remove.
5986
5987 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5988
5989         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5990
5991 2018-05-30  Pedro Alves  <palves@redhat.com>
5992
5993         * common/common-exceptions.h (exception_rethrow): Use
5994         ATTRIBUTE_NORETURN.
5995
5996 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
5997
5998         * breakpoint.c (print_solib_event, check_status_catch_solib):
5999         Remove struct keyword in range-based for loops.
6000         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6001         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6002         Likewise.
6003         * linespec.c (find_superclass_methods, search_minsyms_for_name):
6004         Likewise.
6005         * symfile.c (addr_info_make_relative): Likewise.
6006         * thread.c (value_in_thread_stack_temporaries): Likewise.
6007
6008 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
6009
6010         PR gdb/16841
6011         * valops.c (value_struct_elt_for_reference): Call check_typedef on
6012         aggregate type to get its real type before accessing it.
6013
6014 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
6015
6016         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6017         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6018         * coff-pe-read.c (add_pe_forwarded_sym): Replace
6019         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6020         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6021         * jit.c (jit_breakpoint_re_set_internal): Likewise.
6022         * printcmd.c (info_address_command): Likewise.
6023
6024 2018-05-29  Tom Tromey  <tom@tromey.com>
6025
6026         * windows-nat.c (handle_exception): Update fall-through comment.
6027
6028 2018-05-29  Tom Tromey  <tom@tromey.com>
6029
6030         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
6031         (struct program_space) <added_solibs>: Now a std::vector.
6032         * breakpoint.c (print_solib_event): Update.
6033         (check_status_catch_solib): Update.
6034         * progspace.c (clear_program_space_solib_cache): Update.
6035         * solib.c (update_solib_list): Update.
6036
6037 2018-05-29  Tom Tromey  <tom@tromey.com>
6038
6039         * python/py-type.c (typy_richcompare): Update.
6040         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6041         * gdbtypes.h (types_deeply_equal): Return bool.
6042         (types_equal): Likewise.
6043         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
6044         declare VEC.
6045         (check_types_equal): Change worklist to std::vector.  Return
6046         bool.
6047         (struct type_equality_entry): Add constructor.
6048         (compare_maybe_null_strings): Return bool.
6049         (check_types_worklist): Return bool.  Change worklist to
6050         std::vector.
6051         (types_deeply_equal): Use std::vector.
6052         (types_equal): Return bool.
6053         (compare_maybe_null_strings): Simplify.
6054
6055 2018-05-29  Tom Tromey  <tom@tromey.com>
6056
6057         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
6058
6059 2018-05-29  Tom Tromey  <tom@tromey.com>
6060
6061         * objc-lang.h: Don't include cp-support.h.
6062         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
6063         declare VEC.
6064
6065 2018-05-27  Tom Tromey  <tom@tromey.com>
6066
6067         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6068
6069 2018-05-25  Tom Tromey  <tom@tromey.com>
6070
6071         * value.c (value::location): Initialize.
6072
6073 2018-05-25  Tom Tromey  <tom@tromey.com>
6074
6075         * dbxread.c (init_bincl_list): Remove.
6076         (bincl_list): Now a std::vector.
6077         (bincls_allocated, next_bincl): Remove.
6078         (free_bincl_list, do_free_bincl_list_cleanup)
6079         (make_cleanup_free_bincl_list): Remove.
6080         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6081         unique_xmalloc_ptr.
6082         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6083         (struct header_file_location): Add constructor.
6084         (add_bincl_to_list): Remove.
6085
6086 2018-05-25  Tom Tromey  <tom@tromey.com>
6087
6088         * tui/tui.c (tui_enable): Update.
6089         * mi/mi-interp.c (mi_interp::init): Update.
6090         * interps.h (class interp) <name>: New method.
6091         <m_name>: Rename from name.
6092         (~scoped_restore_interp): Update.
6093         * interps.c (interp::interp): Update.
6094         (interp_add, interp_set, interp_lookup_existing)
6095         (current_interp_named_p): Update.
6096
6097 2018-05-25  Tom Tromey  <tom@tromey.com>
6098
6099         * interps.c (interp_name): Remove.
6100         * mi/mi-interp.c (mi_interp::init): Update.
6101         * interps.h (interp_name): Remove.
6102         (~scoped_restore_interp): Update.
6103         * tui/tui.c (tui_enable): Update.
6104
6105 2018-05-25  Tom Tromey  <tom@tromey.com>
6106
6107         * utils.c (fputs_maybe_filtered): Update.
6108         * linespec.c (decode_line_full): Update.
6109         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6110         (mi_print_breakpoint_for_event, mi_solib_loaded)
6111         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6112         (mi_user_selected_context_changed): Update.
6113         * mi/mi-main.c (mi_execute_command): Update.
6114         * cli/cli-script.c (execute_control_command): Update.
6115         * python/python.c (execute_gdb_command): Update.
6116         * solib.c (info_sharedlibrary_command): Update.
6117         * interps.c (interp_ui_out): Remove.
6118         * interps.h (interp_ui_out): Remove.
6119
6120 2018-05-25  Tom Tromey  <tom@tromey.com>
6121
6122         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6123         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6124         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6125
6126 2018-05-25  Tom Tromey  <tom@tromey.com>
6127
6128         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6129         * interps.c (interp_exec): Use scoped_restore.
6130
6131 2018-05-25  Tom Tromey  <tom@tromey.com>
6132
6133         * remote.c (remote_target::remote_file_get): Use
6134         gdb::byte_vector.
6135         (remote_target::remote_file_put): Likewise.
6136
6137 2018-05-25  Tom Tromey  <tom@tromey.com>
6138
6139         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6140         a std::string.
6141         (get_pe_section_index, add_pe_exported_sym): Update.
6142         (read_pe_exported_syms): Use gdb::def_vector.
6143
6144 2018-05-25  Tom Tromey  <tom@tromey.com>
6145
6146         * frame.c (remove_prev_frame): Remove.
6147         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6148
6149 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
6150
6151         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6152         Remove prototypes.
6153         * mips-linux-nat.c (supply_fpregset): Always call
6154         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6155         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6156         `mips_fill_fpregset'.
6157         * mips-linux-tdep.c (mips_supply_fpregset)
6158         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6159         (mips_fill_fpregset_wrapper): Remove functions.
6160         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6161         (mips_linux_fpregset): Remove variable.
6162         (mips_linux_iterate_over_regset_sections): Use
6163         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6164         (mips_linux_o32_sigframe_init): Remove comment.
6165
6166 2018-05-25  Pedro Alves  <palves@redhat.com>
6167
6168         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6169         (struct readahead_cache, struct packet_reg, struct
6170         remote_arch_state, class remote_state): Move higher up in the
6171         file.
6172         (remote_target::m_remote_state): Now an object instead of a pointer.
6173         (remote_target::get_remote_state): Adjust.
6174
6175 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6176
6177         * stack.c (select_and_print_frame): Delete.
6178         (struct function_bounds): Move struct within function.
6179         (func_command): Most content moved into new function
6180         find_frame_for_function, use new function, print result, add
6181         function comment.
6182         (find_frame_for_function): New function, now returns a result.
6183
6184 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6185
6186         * stack.c (iterate_over_block_arg_vars): Fix comment.
6187         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6188
6189 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6190
6191         PR gdb/23203
6192         * frame.c
6193         (scoped_restore_selected_frame::scoped_restore_selected_frame):
6194         Define.
6195         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6196         Define.
6197         * frame.h (class scoped_restore_selected_frame): New class.
6198         * stack.c (print_frame_local_vars): Remove catching and rethrowing
6199         of any exception, use scoped_restore_selected_frame to restore the
6200         frame instead.
6201
6202 2018-05-24  Pedro Alves  <palves@redhat.com>
6203
6204         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6205         override.
6206
6207 2018-05-23  Tom Tromey  <tom@tromey.com>
6208
6209         * complaints.c (struct complaints): Remove.
6210         (symfile_complaint_book): Remove.
6211         (series): New global.
6212         (complaint_internal): Update.
6213         (clear_complaints): Update.
6214
6215 2018-05-23  Tom Tromey  <tom@tromey.com>
6216
6217         * complaints.c (counters): New global.
6218         (struct complain): Remove.
6219         (struct complaints) <root>: Remove.
6220         (complaint_sentinel): Remove.
6221         (symfile_complaint_book): Update.
6222         (find_complaint) Remove.
6223         (complaint_internal, clear_complaints): Update.
6224
6225 2018-05-23  Tom Tromey  <tom@tromey.com>
6226
6227         * complaints.c (struct complain) <file, line>: Remove.
6228         (find_complaint): Remove file, line parameters.
6229         (complaint_internal): Update.
6230
6231 2018-05-23  Tom Tromey  <tom@tromey.com>
6232
6233         * complaints.c (vcomplaint): Remove.
6234         (complaint_internal) Merge in contents of vcomplaint.
6235
6236 2018-05-23  Tom Tromey  <tom@tromey.com>
6237
6238         * complaints.c (struct complaints) <explanation>: Remove.
6239         (symfile_explanations): Remove.
6240         (symfile_complaint_book): Update.
6241         (vcomplaint): Update.
6242         (struct explanation): Remove.
6243
6244 2018-05-23  Tom Tromey  <tom@tromey.com>
6245
6246         * complaints.c (symfile_complaints): Remove.
6247         (complaint_internal): Remove "complaints" parameter.
6248         (clear_complaints, vcomplaint): Remove "c" parameter.
6249         (get_complaints): Remove.
6250         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6251         (dwarf2_debug_line_missing_file_complaint)
6252         (dwarf2_debug_line_missing_end_sequence_complaint)
6253         (dwarf2_complex_location_expr_complaint)
6254         (dwarf2_const_value_length_mismatch_complaint)
6255         (dwarf2_section_buffer_overflow_complaint)
6256         (dwarf2_macro_malformed_definition_complaint)
6257         (dwarf2_invalid_attrib_class_complaint)
6258         (create_addrmap_from_index, dw2_symtab_iter_next)
6259         (dw2_expand_marked_cus)
6260         (dw2_debug_names_iterator::find_vec_in_debug_names)
6261         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6262         (create_debug_type_hash_table, init_cutu_and_read_dies)
6263         (partial_die_parent_scope, add_partial_enumeration)
6264         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6265         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6266         (read_import_statement, read_file_scope, create_dwo_cu_reader)
6267         (create_cus_hash_table, create_dwp_hash_table)
6268         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6269         (dwarf2_rnglists_process, dwarf2_ranges_process)
6270         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6271         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6272         (handle_struct_member_die, process_structure_scope)
6273         (read_array_type, read_common_block, read_module_type)
6274         (read_tag_pointer_type, read_typedef, read_base_type)
6275         (read_subrange_type, load_partial_dies, partial_die_info::read)
6276         (partial_die_info::read, partial_die_info::read)
6277         (partial_die_info::read, read_checked_initial_length_and_offset)
6278         (dwarf2_string_attr, read_formatted_entries)
6279         (dwarf_decode_line_header)
6280         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6281         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6282         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6283         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6284         (get_signatured_type, get_DW_AT_signature_type)
6285         (decode_locdesc, file_file_name, consume_improper_spaces)
6286         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6287         (dwarf_decode_macro_bytes, dwarf_decode_macros)
6288         (dwarf2_symbol_mark_computed, set_die_type)
6289         (read_attribute_value): Update.
6290         * stap-probe.c (handle_stap_probe, get_stap_base_address):
6291         Update.
6292         * dbxread.c (unknown_symtype_complaint)
6293         (lbrac_mismatch_complaint, repeated_header_complaint)
6294         (set_namestring, function_outside_compilation_unit_complaint)
6295         (read_dbx_symtab, process_one_symbol): Update.
6296         * gdbtypes.c (stub_noname_complaint): Update.
6297         * windows-nat.c (handle_unload_dll): Update.
6298         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6299         (decode_base_type): Update.
6300         * xcoffread.c (bf_notfound_complaint, ef_complaint)
6301         (eb_complaint, record_include_begin, record_include_end)
6302         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6303         (process_xcoff_symbol, read_symbol)
6304         (function_outside_compilation_unit_complaint)
6305         (scan_xcoff_symtab): Update.
6306         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6307         * buildsym.c (finish_block_internal, make_blockvector)
6308         (end_symtab_get_static_block, augment_type_symtab): Update.
6309         * dtrace-probe.c (dtrace_process_dof)
6310         (dtrace_static_probe_ops::get_probes): Update.
6311         * complaints.h (struct complaint): Don't declare.
6312         (symfile_complaints): Remove.
6313         (complaint_internal): Remove "complaints" parameter.
6314         (complaint): Likewise.
6315         (clear_complaints): Likewise.
6316         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6317         (reread_symbols): Update.
6318         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6319         (dwarf2_frame_cache, decode_frame_entry): Update.
6320         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6321         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6322         (info_selectors_command): Update.
6323         * macrotab.c (macro_include, check_for_redefinition)
6324         (macro_undef): Update.
6325         * objfiles.c (filter_overlapping_sections): Update.
6326         * stabsread.c (invalid_cpp_abbrev_complaint)
6327         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6328         (define_symbol, error_type, read_type, rs6000_builtin_type)
6329         (stabs_method_name_from_physname, read_member_functions)
6330         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6331         (attach_fields_to_type, complain_about_struct_wipeout)
6332         (read_range_type, read_args, common_block_start)
6333         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6334         Update.
6335         * mdebugread.c (index_complaint, unknown_ext_complaint)
6336         (basic_type_complaint, bad_tag_guess_complaint)
6337         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6338         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6339         (parse_procedure, parse_lines)
6340         (function_outside_compilation_unit_complaint)
6341         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6342         (bad_tag_guess_complaint, reg_value_complaint): Update.
6343         * cp-support.c (demangled_name_complaint): Update.
6344         * macroscope.c (sal_macro_scope): Update.
6345         * dwarf-index-write.c (class debug_names): Update.
6346
6347 2018-05-23  Tom Tromey  <tom@tromey.com>
6348
6349         * complaints.c (clear_complaints): Remove "noisy" parameter.
6350         * complaints.h (clear_complaints): Update.
6351         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6352         (reread_symbols): Update.
6353
6354 2018-05-23  Tom Tromey  <tom@tromey.com>
6355
6356         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6357         SUBSEQUENT_MESSAGE.
6358         (vcomplaint, clear_complaints): Update.
6359         (symfile_explanations): Remove some messages.
6360
6361 2018-05-23  Tom Tromey  <tom@tromey.com>
6362
6363         * complaints.c (internal_complaint): Remove.
6364         * complaints.h (internal_complaint): Remove.
6365
6366 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6367
6368         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6369
6370 2018-05-22  Pedro Alves  <palves@redhat.com>
6371
6372         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6373         (remote_fileio_badfd, remote_fileio_return_errno)
6374         (remote_fileio_return_success, remote_fileio_func_open)
6375         (remote_fileio_func_open, remote_fileio_func_close)
6376         (remote_fileio_func_read, remote_fileio_func_write)
6377         (remote_fileio_func_lseek, remote_fileio_func_rename)
6378         (remote_fileio_func_unlink, remote_fileio_func_stat)
6379         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6380         (remote_fileio_func_isatty, remote_fileio_func_system): Add
6381         remote_target parameter.
6382         (remote_fio_func_map) <func>: Add remote_target parameter.
6383         (do_remote_fileio_request, remote_fileio_request):
6384         * remote-fileio.h (remote_fileio_request):
6385         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6386         remote_target parameter.
6387         (remote_notif_process, handle_notification): Adjust to pass down
6388         the remote.
6389         (remote_notif_state_allocate): Add remote_target parameter.  Save
6390         it.
6391         * remote-notif.h (struct remote_target): Forward declare.
6392         (struct notif_client) <parse, ack, can_get_pending_events>: Add
6393         remote_target parameter.
6394         (struct remote_notif_state) <remote>: New field.
6395         (remote_notif_ack, remote_notif_parse): Add remote_target
6396         parameter.
6397         (remote_notif_state_allocate, remote_notif_state_allocate): Add
6398         remote_target parameter.
6399         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6400         (threads_listing_context, rmt_thread_action, protocol_feature)
6401         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6402         (packet_result, struct threads_listing_context, remote_state):
6403         Move definitions and declarations higher up.
6404         (remote_target) <~remote_target>: Declare.
6405         (remote_download_command_source, remote_file_put, remote_file_get)
6406         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6407         (remote_hostio_pread_vFile, remote_hostio_send_command)
6408         (remote_hostio_set_filesystem, remote_hostio_open)
6409         (remote_hostio_close, remote_hostio_unlink, remote_state)
6410         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6411         (get_memory_write_packet_size, get_memory_read_packet_size)
6412         (append_pending_thread_resumptions, remote_detach_1)
6413         (append_resumption, remote_resume_with_vcont)
6414         (add_current_inferior_and_thread, wait_ns, wait_as)
6415         (process_stop_reply, remote_notice_new_inferior)
6416         (process_initial_stop_replies, remote_add_thread)
6417         (btrace_sync_conf, remote_btrace_maybe_reopen)
6418         (remove_new_fork_children, kill_new_fork_children)
6419         (discard_pending_stop_replies, stop_reply_queue_length)
6420         (check_pending_events_prevent_wildcard_vcont)
6421         (discard_pending_stop_replies_in_queue, stop_reply)
6422         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6423         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6424         (remote_interrupt_as, remote_interrupt_ns)
6425         (remote_get_noisy_reply, remote_query_attached)
6426         (remote_add_inferior, remote_current_thread, get_current_thread)
6427         (set_thread, set_general_thread, set_continue_thread)
6428         (set_general_process, write_ptid)
6429         (remote_unpack_thread_info_response, remote_get_threadinfo)
6430         (parse_threadlist_response, remote_get_threadlist)
6431         (remote_threadlist_iterator, remote_get_threads_with_ql)
6432         (remote_get_threads_with_qxfer)
6433         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6434         (get_offsets, remote_check_symbols, remote_supported_packet)
6435         (remote_query_supported, remote_packet_size)
6436         (remote_serial_quit_handler, remote_detach_pid)
6437         (remote_vcont_probe, remote_resume_with_hc)
6438         (send_interrupt_sequence, interrupt_query)
6439         (remote_notif_get_pending_events, fetch_register_using_p)
6440         (send_g_packet, process_g_packet, fetch_registers_using_g)
6441         (store_register_using_P, store_registers_using_G)
6442         (set_remote_traceframe, check_binary_download)
6443         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6444         (remote_xfer_live_readonly_partial, remote_read_bytes)
6445         (remote_send_printf, remote_flash_write, readchar)
6446         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6447         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6448         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6449         (extended_remote_disable_randomization, extended_remote_run)
6450         (send_environment_packet, extended_remote_environment_support)
6451         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6452         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6453         (packet_command): Now methods of ...
6454         (remote_target): ... this class.
6455         (m_remote_state) <remote_target>: New field.
6456         (struct remote_state) <stop_reply_queue,
6457         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6458         fields.
6459         (remote_state::remote_state): Allocate stop_reply_queue.
6460         (remote_state): Delete global.
6461         (get_remote_state_raw): Delete.
6462         (remote_target::get_remote_state): Allocate m_remote_state on
6463         demand.
6464         (get_current_remote_target): New.
6465         (remote_ops, extended_remote_ops): Delete.
6466         (wait_forever_enabled_p, remote_async_inferior_event_token):
6467         Delete, moved to struct remote_state.
6468         (remote_target::close): Delete self.  Destruction bits split to
6469         ...
6470         (remote_target::~remote_target): ... this.
6471         (show_memory_packet_size): Adjust to use
6472         get_current_remote_target.
6473         (struct protocol_feature) <func>: Add remote_target parameter.
6474         All callers adjusted.
6475         (curr_quit_handler_target): New.
6476         (remote_serial_quit_handler): Reimplement.
6477         (remote_target::open_1): Adjust to use get_current_remote_target.
6478         Heap-allocate remote_target/extended_remote_target instances.
6479         (vcont_builder::vcont_builder): Add remote_target parameter, and
6480         save it in m_remote.  All callers adjusted.
6481         (vcont_builder::m_remote): New field.
6482         (vcont_builder::restart, vcont_builder::flush)
6483         (vcont_builder::push_action): Use it.
6484         (remote_target::commit_resume): Use it.
6485         (struct queue_iter_param) <remote>: New field.
6486         (remote_target::remove_new_fork_children): Fill in 'remote' field.
6487         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6488         (check_pending_event_prevents_wildcard_vcont_callback)
6489         (remote_target::check_pending_events_prevent_wildcard_vcont)
6490         (remote_target::discard_pending_stop_replies)
6491         (remote_target::discard_pending_stop_replies_in_queue)
6492         (remote_target::remote_notif_remove_queued_reply): Fill in
6493         'remote' field.
6494         (remote_notif_get_pending_events): New.
6495         (remote_target::readchar, remote_target::remote_serial_write):
6496         Save/restore curr_quit_handler_target.
6497         (putpkt): New.
6498         (kill_new_fork_children): Fill in 'remote' field.
6499         (packet_command): Use get_current_remote_target, defer to
6500         remote_target method of same name.
6501         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6502         parameter, and save it in m_remote.  All callers adjusted.
6503         (scoped_remote_fd::release): Use m_remote.
6504         (scoped_remote_fd::m_remote): New field.
6505         (remote_file_put, remote_file_get, remote_file_delete): Use
6506         get_current_remote_target, defer to remote_target method of same
6507         name.
6508         (remote_btrace_reset): Add remote_state paremeter.  Update all
6509         callers.
6510         (remote_async_inferior_event_handler). Pass down 'data'.
6511         (remote_new_objfile): Use get_current_remote_target.
6512         (remote_target::vcont_r_supported): New.
6513         (set_range_stepping): Use get_current_remote_target and
6514         remote_target::vcont_r_supported.
6515         (_initialize_remote): Don't allocate 'remote_state' and
6516         'stop_reply_queue' globals.
6517         * remote.h (struct remote_target): Forward declare.
6518         (getpkt, putpkt, remote_notif_get_pending_events): Add
6519         'remote_target' parameter.
6520
6521 2018-05-22  Pedro Alves  <palves@redhat.com>
6522
6523         * remote.c (vcont_builder): Now a class.  Make all data members
6524         private.
6525         (vcont_builder) <vcont_builder, restart, flush, push_action>:
6526         Declare methods.
6527         (vcont_builder_restart): Rename to ...
6528         (vcont_builder::restart): ... this.
6529         (vcont_builder_flush): Rename to ...
6530         (vcont_builder::flush): ... this.
6531         (vcont_builder_push_action): Rename to ...
6532         (vcont_builder::push_action): ... this.
6533         (remote_target::commit_resume): Adjust.
6534
6535 2018-05-22  Pedro Alves  <palves@redhat.com>
6536
6537         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6538         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6539         (get_fixed_memory_packet_size): New.
6540         (get_memory_packet_size): Use it.
6541         (set_memory_packet_size): Don't override the config size with
6542         DEFAULT_MAX_MEMORY_PACKET_SIZE.
6543         (show_memory_packet_size): Use get_fixed_memory_packet_size.
6544         Don't refer to get_memory_packet_size if not connected to a remote
6545         target.  Show "(default)" if configured size is 0.
6546
6547 2018-05-22  Pedro Alves  <palves@redhat.com>
6548
6549         * remote.c (remote_target::mourn_inferior): Move
6550         discard_pending_stop_replies call here from ...
6551         (_initialize_remote): ... here.
6552
6553 2018-05-22  Pedro Alves  <palves@redhat.com>
6554
6555         * remote.c (compare_section_command): Remove set_general_process
6556         call.
6557
6558 2018-05-22  Pedro Alves  <palves@redhat.com>
6559
6560         * remote.c (struct packet_reg, struct remote_arch_state):
6561         Move higher up in the file.
6562         (remote_state) <m_arch_states>: Store remote_arch_state values
6563         instead of remote_arch_state pointers.
6564         (remote_state::get_remote_arch_state): Adjust.
6565
6566 2018-05-22  Pedro Alves  <palves@redhat.com>
6567
6568         * remote.c: Include <unordered_map>.
6569         (remote_state): Now a class.
6570         (remote_state) <get_remote_arch_state>: Declare method.
6571         <get_remote_arch_state>: New field.
6572         (remote_arch_state) <remote_arch_state>: Declare ctor.
6573         <regs>: Now a unique_ptr.
6574         (remote_gdbarch_data_handle): Delete.
6575         (get_remote_arch_state): Delete.
6576         (remote_state::get_remote_arch_state): New.
6577         (get_remote_state): Adjust to call remote_state's
6578         get_remote_arch_state method.
6579         (init_remote_state): Delete, bits factored out to ...
6580         (remote_arch_state::remote_arch_state): ... this new method.
6581         (get_remote_packet_size, get_memory_packet_size)
6582         (process_g_packet, remote_target::fetch_registers)
6583         (remote_target::prepare_to_store, store_registers_using_G)
6584         (remote_target::store_registers, remote_target::get_trace_status):
6585         Adjust to call remote_state's method.
6586         (_initialize_remote): Remove reference to
6587         remote_gdbarch_data_handle.
6588
6589 2018-05-22  Pedro Alves  <palves@redhat.com>
6590
6591         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6592         pread>: New method declarations.
6593         (remote_target::open_1): Adjust.
6594         (readahead_cache_invalidate): Rename to ...
6595         (readahead_cache::invalidate): ... this, and adjust to be a class
6596         method.
6597         (readahead_cache_invalidate_fd): Rename to ...
6598         (readahead_cache::invalidate_fd): ... this, and adjust to be a
6599         class method.
6600         (remote_hostio_pwrite): Adjust.
6601         (remote_hostio_pread_from_cache): Rename to ...
6602         (readahead_cache::pread): ... this, and adjust to be a class
6603         method.
6604         (remote_hostio_close): Adjust.
6605
6606 2018-05-22  Pedro Alves  <palves@redhat.com>
6607
6608         * remote.c (remote_hostio_close_cleanup): Delete.
6609         (class scoped_remote_fd): New.
6610         (remote_file_put, remote_file_get): Use it.
6611
6612 2018-05-22  Pedro Alves  <palves@redhat.com>
6613
6614         (struct vCont_action_support): Use bool and initialize all fields.
6615         (struct readahead_cache): Initialize all fields.
6616         (remote_state): Use bool and initialize all fields.
6617         (remote_state::remote_state, remote_state::~remote_state): New.
6618         (new_remote_state): Delete.
6619         (_initialize_remote): Use new to allocate remote_state.
6620
6621 2018-05-22  Pedro Alves  <palves@redhat.com>
6622             張俊芝  <zjz@zjz.name>
6623
6624         PR gdb/22973
6625         * c-exp.y: Include "c-support.h".
6626         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6627         of tolower.  Use c_ident_is_alpha to scan names.
6628         * c-lang.c: Include "c-support.h".
6629         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6630         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6631         * c-support.h: New file, with bits factored out from ...
6632         * cp-name-parser.y: ... this file.
6633         Include "c-support.h".
6634         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6635         c-support.h and renamed.
6636         (symbol_end, yylex): Adjust.
6637
6638 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6639
6640         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6641         parameter type to CORE_ADDR.
6642         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6643         parameter type in declaration to CORE_ADDR.
6644         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6645         target_auxv_search to get AT_HWCAP and use the result to get the
6646         target description.
6647         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6648         to CORE_ADDR. Remove the cast of the return value to unsigned
6649         long. Fix error predicate of target_auxv_search.
6650         (ppc_linux_nat_target::read_description): Change the type of the
6651         hwcap variable to CORE_ADDR.
6652
6653 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6654
6655         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6656         if the size of fpscr is larger than 32 bits.
6657
6658 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6659
6660         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6661         (ppc32_linux_vsxregmap): New global.
6662         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6663         regcache_supply_regset, and regcache_collect_regset.
6664         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6665         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6666         (fetch_vsx_register, store_vsx_register): Remove.
6667         (fetch_vsx_registers): Add regno parameter. Get regset using
6668         ppc_linux_vsxregset. Use regset to supply registers.
6669         (store_vsx_registers): Add regno parameter. Get regset using
6670         ppc_linux_vsxregset. Use regset to collect registers.
6671         (fetch_register): Call fetch_vsx_registers instead of
6672         fetch_vsx_register.
6673         (store_register): Call store_vsx_registers instead of
6674         store_vsx_register.
6675         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6676         new regno parameter.
6677         (store_ppc_registers): Call store_vsx_registers with -1 for the
6678         new regno parameter.
6679         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6680         (ppc_collect_vsxregset): Remove.
6681
6682 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6683
6684         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6685         offset fields.
6686         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6687         for vector register offset fields.
6688         (ppc64_fbsd_reg_offsets): Likewise.
6689         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6690         to vector register offset fields.
6691         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6692         to vector register offset fields.
6693         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6694         vector register offset fields.
6695         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6696         initializers for vector register offset fields.
6697         (rs6000_aix64_reg_offsets): Likewise.
6698         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6699         (ppc_supply_vrregset): Remove.
6700         (ppc_collect_vrregset): Remove.
6701         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6702         (ppc_linux_vrregset) : New function.
6703         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6704         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6705         (ppc32_linux_vrregset): Remove.
6706         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6707         and use result instead of ppc32_linux_vrregset.
6708         (ppc32_linux_reg_offsets): Remove initializers for vector register
6709         offset fields.
6710         (ppc64_linux_reg_offsets): Likewise.
6711         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6712         * ppc-linux-nat.c: Include regset.h.
6713         (gdb_vrregset_t): Adjust comment to account for little-endian
6714         mode.
6715         (supply_vrregset, fill_vrregset): Remove.
6716         (fetch_altivec_register, store_altivec_register): Remove.
6717         (fetch_altivec_registers): Add regno parameter. Get regset using
6718         ppc_linux_vrregset. Use regset to supply registers.
6719         (store_altivec_registers): Add regno parameter. Get regset using
6720         ppc_linux_vrregset. Use regset to collect registers.
6721         (fetch_register): Call fetch_altivec_registers instead of
6722         fetch_altivec_register.
6723         (store_register): Call store_altivec_registers instead of
6724         store_altivec_register.
6725         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6726         the new regno parameter.
6727         (store_ppc_registers): Call store_altivec_registers with -1 for
6728         the new regno parameter.
6729
6730 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6731
6732         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6733         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6734         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6735         (gdb_vrregset_t): Change array type size to
6736         PPC_LINUX_SIZEOF_VRREGSET.
6737         (gdb_vsxregset_t): Change array type size to
6738         PPC_LINUX_SIZEOF_VSXREGSET.
6739         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6740         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6741         PPC_LINUX_SIZEOF_VSXREGSET.
6742
6743 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6744
6745         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6746         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6747         nat/ppc-linux.c.
6748         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6749         ppc_linux_target_wordsize with tid.
6750         (ppc_linux_nat_target::read_description): Call ppc_linux_target
6751         wordsize with tid.
6752         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6753         (ppc64_64bit_inferior_p): Add static and inline specifiers.
6754         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6755         tid parameter. Remove static specifier.
6756         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6757         (ppc_linux_target_wordsize): New declaration.
6758
6759 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6760
6761         * arch/ppc-linux-common.c: New file.
6762         * arch/ppc-linux-common.h: New file.
6763         * arch/ppc-linux-tdesc.h: New file.
6764         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6765         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6766         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6767         arch/ppc-linux-tdesc.h.
6768         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6769         arch/ppc-linux-tdesc.h.
6770         (ppc_linux_nat_target::read_description): Remove target
6771         description matching code. Fill a ppc_linux_features struct and
6772         call ppc_linux_match_description with it. Move comment about ISA
6773         2.05 to ppc-linux-common.c.
6774         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6775         arch/ppc-linux-tdesc.h.
6776         (ppc_linux_core_read_description): Remove target description
6777         matching code. Fill a ppc_linux_features struct and call
6778         ppc_linux_match_description with it.
6779         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6780         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6781         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6782         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6783         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6784         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6785         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6786         (tdesc_powerpc_e500l): Remove.
6787
6788 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
6789
6790         * ada-lang.c (catch_assert_command): Pass empty string instead
6791         of NULL for excep_string argument.
6792
6793 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6794
6795         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6796         the width of the requested register exceeds the width of the
6797         `ptrace' data type.
6798
6799 2018-05-21  Tom Tromey  <tom@tromey.com>
6800
6801         * printcmd.c (output_command): Remove.
6802         (output_command_const): Rename to output_command.
6803         * valprint.h (output_command): Rename from output_command_const.
6804         * tracepoint.c (trace_dump_actions): Call output_command.
6805
6806 2018-05-21  Tom Tromey  <tom@tromey.com>
6807
6808         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6809         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6810         * ada-lang.h (create_ada_exception_catchpoint): Update.
6811         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6812         std::string.
6813         (create_excep_cond_exprs, ~ada_catchpoint)
6814         (should_stop_exception, print_one_exception)
6815         (print_mention_exception, print_recreate_exception): Update.
6816         (ada_get_next_arg): Remove.
6817         (catch_ada_exception_command_split): Use std::string.  Change type
6818         of "excep_string", "cond_string".
6819         (catch_ada_exception_command): Update.
6820         (create_ada_exception_catchpoint): Change type of excep_string.
6821         (ada_exception_sal): Remove excep_string parameter.
6822         (~ada_catchpoint): Remove.
6823
6824 2018-05-21  Tom Tromey  <tom@tromey.com>
6825
6826         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6827         cleanup.
6828
6829 2018-05-21  Tom Tromey  <tom@tromey.com>
6830
6831         * ada-lang.c (ada_exception_message_1, ada_exception_message):
6832         Return unique_xmalloc_ptr.
6833         (print_it_exception): Update.
6834
6835 2018-05-21  Tom Tromey  <tom@tromey.com>
6836
6837         * tracepoint.c (trace_dump_actions): Use std::string.
6838
6839 2018-05-21  Tom Tromey  <tom@tromey.com>
6840
6841         * symfile.c (reread_symbols): Use std::string for original_name.
6842
6843 2018-05-21  Tom Tromey  <tom@tromey.com>
6844
6845         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6846         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
6847         constructor.
6848
6849 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
6850
6851         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6852         instance to...
6853         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6854         * objfiles.c (get_objfile_bfd_data): Allocate
6855         objfile_per_bfd_storage with obstack_new when allocating on
6856         obstack.
6857
6858 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6859
6860         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6861         OBSTACK_ZALLOC.
6862         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6863         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6864         * mdebugread.c (mdebug_build_psymtabs): Likewise.
6865         (add_pending): Likewise.
6866         (parse_symbol): Likewise.
6867         (parse_partial_symbols): Likewise.
6868         (psymtab_to_symtab_1): Likewise.
6869         (new_psymtab): Likewise.
6870         (elfmdebug_build_psymtabs): Likewise.
6871         * minsyms.c (terminate_minimal_symbol_table): Likewise.
6872         * objfiles.c (get_objfile_bfd_data): Likewise.
6873         (objfile_register_static_link): Likewise.
6874         * psymtab.c (allocate_psymtab): Likewise.
6875         * stabsread.c (read_member_functions): Likewise.
6876         * xcoffread.c (xcoff_end_psymtab): Likewise.
6877
6878 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6879
6880         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6881         compiler supports std::is_trivially_constructible.
6882         * common/poison.h: Include obstack.h.
6883         (IsMallocable): Define to is_trivially_constructible if the
6884         compiler supports it, define to true_type otherwise.
6885         (xobnew): New.
6886         (XOBNEW): Redefine.
6887         (xobnewvec): New.
6888         (XOBNEWVEC): Redefine.
6889         * gdb_obstack.h (obstack_zalloc): New.
6890         (OBSTACK_ZALLOC): Redefine.
6891         (obstack_calloc): New.
6892         (OBSTACK_CALLOC): Redefine.
6893         (obstack_new): New.
6894         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6895         (gdbarch_obstack): New declaration in gdbarch.h, definition in
6896         gdbarch.c.
6897         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6898         obstack_calloc/obstack_zalloc.
6899         (gdbarch_obstack_zalloc): Remove.
6900         * target-descriptions.c (tdesc_data_init): Use obstack_new.
6901
6902 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6903
6904         * stack.c (backtrace_command_1): Remove useless variable int i.
6905
6906 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6907
6908         * stack.c (print_frame_info): Fix comment.
6909
6910 2018-05-18  Tom Tromey  <tom@tromey.com>
6911
6912         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6913         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6914         (~dwarf2_per_objfile): Update
6915         (dwarf2_get_dwz_file): Use new.
6916         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6917         unique_ptr.
6918
6919 2018-05-18  Tom Tromey  <tom@tromey.com>
6920
6921         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6922         unique_ptr.
6923         * dwarf2read.c (struct dwp_file): Add constructor and
6924         initializers.
6925         (open_and_init_dwp_file): Return a unique_ptr.
6926         (dwarf2_per_objfile, create_dwp_hash_table)
6927         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6928         (lookup_dwo_unit_in_dwp): Update.
6929         (open_and_init_dwp_file, get_dwp_file): Update.
6930
6931 2018-05-18  Tom Tromey  <tom@tromey.com>
6932
6933         * dwarf2read.c (dwarf2_per_objfile): Update.
6934         (struct mapped_index): Add initializers.
6935         (dwarf2_read_index): Use new.
6936         (dw2_symtab_iter_init): Update.
6937         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6938         unique_ptr.
6939
6940 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6941
6942         * dwarf2read.c (mapped_index) <total_size>: Remove.
6943
6944 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6945
6946         * unittests/format_pieces-selftests.c (test_format_specifier):
6947         Add ARI comments.
6948
6949 2018-05-18  Tom Tromey  <tom@tromey.com>
6950
6951         * c-typeprint.c (maybe_print_hole): New function.
6952         (c_print_type_struct_field_offset): Update.
6953         (c_type_print_base_struct_union): Call maybe_print_hole.
6954
6955 2018-05-17  Keith Seitz  <keiths@redhat.com>
6956
6957         * breakpoint.c (build_bpstat_chain): New function, moved from
6958         bpstat_stop_status.
6959         (bpstat_stop_status): Add optional parameter, `stop_chain'.
6960         If no stop chain is passed, call build_bpstat_chain to build it.
6961         * breakpoint.h (build_bpstat_chain): Declare.
6962         (bpstat_stop_status): Move documentation here from breakpoint.c.
6963         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6964         build the stop chain and pass it to skip_inline_frames.
6965         Pass this stop chain to bpstat_stop_status.
6966         * inline-frame.c: Include breakpoint.h.
6967         (stopped_by_user_bp_inline_frame): New function.
6968         (skip_inline_frames): Add parameter `stop_chain'.
6969         Move documention to inline-frame.h.
6970         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6971         whether the frame should be elided.
6972         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6973         Add moved documentation and update for new parameter.
6974
6975 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6976
6977         PR cli/14975
6978         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6979         unittests/format_pieces-selftests.c.
6980         * common/format.h (format_piece) <operator==>: New.
6981         (format_pieces) <operator[]>: Remove.
6982         * common/format.c (format_pieces::format_pieces): Handle \e.
6983         * unittests/format_pieces-selftests.c: New.
6984
6985 2018-05-17  Tom Tromey  <tom@tromey.com>
6986
6987         PR symtab/23010:
6988         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6989         (dw2_instantiate_symtab): Add skip_partial parameter.
6990         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6991         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6992         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6993         (dw2_expand_symtabs_matching_one)
6994         (dw2_find_pc_sect_compunit_symtab)
6995         (dw2_debug_names_lookup_symbol)
6996         (dw2_debug_names_expand_symtabs_for_function): Update.
6997         (init_cutu_and_read_dies): Add skip_partial parameter.
6998         (process_psymtab_comp_unit, build_type_psymtabs_1)
6999         (process_skeletonless_type_unit, load_partial_comp_unit)
7000         (psymtab_to_symtab_1): Update.
7001         (load_full_comp_unit): Add skip_partial parameter.
7002         (process_imported_unit_die, dwarf2_read_addr_index)
7003         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7004         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7005         (read_signatured_type): Update.
7006
7007 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7008
7009         * value.c (release_value): Remove unused variable.
7010         (record_latest_value): Likewise.
7011         (access_value_history): Likewise.
7012         (preserve_values): Likewise.
7013
7014 2018-05-17  Tom Tromey  <tom@tromey.com>
7015
7016         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7017         Initialize.
7018
7019 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
7020
7021         PR gdb/22286
7022         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7023         Also handle registers whose width is not a multiple of
7024         PTRACE_TYPE_RET.
7025         (linux_nat_trad_target::store_register): Likewise.
7026
7027 2018-05-16  Tom Tromey  <tom@tromey.com>
7028
7029         * gdbcore.h (core_bfd): Redefine.
7030         * corelow.c (core_target::close): Update.
7031         (core_target_open): Update.
7032         * progspace.h (struct program_space) <cbfd>: Now a
7033         gdb_bfd_ref_ptr.
7034
7035 2018-05-16  Tom Tromey  <tom@tromey.com>
7036
7037         PR cli/19551:
7038         * symfile-add-flags.h (enum symfile_add_flags)
7039         <SYMFILE_NOT_FILENAME>: New constant.
7040         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
7041         objfile name from BFD.
7042         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7043         * minidebug.c (find_separate_debug_file_in_section): Put
7044         ".gnu_debugdata" into BFD's file name.
7045
7046 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
7047
7048         * regcache.c (regcache_read_ftype, regcache_write_ftype):
7049         Remove.
7050
7051 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
7052
7053         PR binutils/21446
7054         * aarch64-tdep.c (aarch64_analyze_prologue,
7055         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7056         Indicate not interested in errors.
7057
7058 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7059
7060         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7061         Supply the MIPS_ZERO_REGNUM register.
7062
7063 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7064
7065         * mips-tdep.c (mask_address_var): Make variable static.
7066
7067 2018-05-14  Tom Tromey  <tom@tromey.com>
7068
7069         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7070
7071 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
7072
7073         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7074         FXSAVE_ADDR for the mxcsr register.
7075
7076 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
7077
7078         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7079
7080 2018-05-11  Pedro Alves  <palves@redhat.com>
7081
7082         * corelow.c (core_target) <core_target>: No longer inline.
7083         Initialize m_core_gdbarch, m_core_vec and build the section table
7084         here.
7085         <~core_target>: New.
7086         <core_gdbarch, get_core_register_section>: New methods.
7087         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7088         factored out from ...
7089         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7090         (core_ops): Delete.
7091         (sniff_core_bfd): Add gdbarch parameter.
7092         (core_close): Delete, merged into ...
7093         (core_target::close): ... here.  Delete self.
7094         (core_close_cleanup): Delete.
7095         (core_target_open): Allocate a core_target on the heap.  Use a
7096         unique_ptr instead of a cleanup.  Bits moved into the core_target
7097         ctor.  Adjust to use core_target methods instead of globals.
7098         (get_core_register_section): Rename to ...
7099         (core_target::get_core_register_section): ... this and adjust.
7100         (struct get_core_registers_cb_data): New.
7101         (get_core_registers_cb): Use it.  Use bool.
7102         (core_target::fetch_registers, core_target::files_info)
7103         (core_target::xfer_partial, core_target::read_description)
7104         (core_target::pid_to, core_target::thread_name): Adjust to
7105         reference class fields instead of globals.
7106         * target.h (struct target_ops_deleter, target_ops_up): New.
7107
7108 2018-05-11  Pedro Alves  <palves@redhat.com>
7109
7110         * corefile.c (core_file_command): Move to corelow.c.
7111         * corelow.c (the_core_target): Delete.
7112         (core_file_command): Moved from corefile.c.  Check exec_bfd
7113         instead of the_core_target.  Use target_detach instead of calling
7114         into the_core_target directly.
7115         (maybe_say_no_core_file_now): New.
7116         (core_target::detach): Use it.
7117         (_initialize_corelow): Remove references to the_core_target.
7118         * gdbcore.h (the_core_target): Delete.
7119
7120 2018-05-11  Tom Tromey  <tromey@redhat.com>
7121             Pedro Alves  <palves@redhat.com>
7122
7123         * corefile.c (core_bfd): Remove.
7124         * gdbcore.h (core_bfd): Now a macro.
7125         * progspace.h (struct program_space) <cbfd>: New field.
7126
7127 2018-05-11  Tom Tromey  <tom@tromey.com>
7128
7129         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7130         gdb::def_vector.
7131
7132 2018-05-10  Tom Tromey  <tom@tromey.com>
7133
7134         * configure: Rebuild.
7135         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7136
7137 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
7138
7139         PR server/23158:
7140         * regformats/regdat.sh: Adjust script, following the addition
7141         of the new expedite_regs parameter to init_target_desc.
7142
7143 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
7144     
7145         PR gdb/23127
7146         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7147         set_gdbarch_significant_addr_bit.
7148         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7149         set_gdbarch_significant_addr_bit.
7150         * utils.c (address_significant): Update to sign extend addr.
7151
7152 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
7153
7154         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7155         (xtensa_linux_init_abi): Limit tdep->num_regs by
7156         tdep->num_nopriv_regs.
7157         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7158         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7159         not initialized.
7160
7161 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
7162
7163         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7164
7165 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
7166
7167         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7168         (I387_MXCSR_INIT_VAL): New constant.
7169         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7170         buffer if it was supplied by the inferior.
7171         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7172         (i387_xsave_get_clear_bv): New function.
7173         (i387_supply_xsave): Only read x87 control registers from the
7174         xsave buffer if the feature is enabled, and the state will have
7175         been written, otherwise, provide a suitable default.
7176         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7177         including x87 control registers.  Update control registers if they
7178         have changed from the default value, and mark features as enabled
7179         as required.
7180         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7181
7182 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
7183
7184         * spu-tdep.c (info_spu_event_command): Fix output formatting.
7185
7186 2018-05-07  Tom Tromey  <tom@tromey.com>
7187
7188         * configure: Rebuild.
7189         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7190
7191 2018-05-07  Tom Tromey  <tom@tromey.com>
7192
7193         PR tdep/20362:
7194         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7195         bit.  Use correct value for VDIV.
7196
7197 2018-05-04  Tom Tromey  <tom@tromey.com>
7198
7199         * configure: Rebuild.
7200         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7201
7202 2018-05-04  Tom Tromey  <tom@tromey.com>
7203
7204         * linux-record.c (record_linux_system_call) <case
7205         RECORD_SYS_RECVFROM>: Add "break".
7206
7207 2018-05-04  Tom Tromey  <tom@tromey.com>
7208
7209         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7210         Add missing "break".
7211         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7212         Add missing "break".
7213
7214 2018-05-04  Tom Tromey  <tom@tromey.com>
7215
7216         * rs6000-tdep.c (ppc_process_record_op4)
7217         (ppc_process_record_op63): Add fall-through comment.
7218
7219 2018-05-04  Tom Tromey  <tom@tromey.com>
7220
7221         * i386-tdep.c (i386_process_record): Add fall-through comment.
7222
7223 2018-05-04  Tom Tromey  <tom@tromey.com>
7224
7225         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7226         comment.
7227
7228 2018-05-04  Tom Tromey  <tom@tromey.com>
7229
7230         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7231         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7232         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7233         comment.
7234         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7235         comment.
7236         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7237         comment.
7238
7239 2018-05-04  Tom Tromey  <tom@tromey.com>
7240
7241         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7242
7243 2018-05-04  Tom Tromey  <tom@tromey.com>
7244
7245         * s390-tdep.c (s390_process_record): Fix fall-through comments.
7246         * xcoffread.c (scan_xcoff_symtab): Move comment later.
7247         * symfile.c (section_is_mapped): Fix fall-through comment.
7248         * stabsread.c (define_symbol, read_member_functions): Fix
7249         fall-through comment.
7250         * s390-linux-tdep.c (s390_process_record): Fix fall-through
7251         comment.
7252         * remote.c (remote_wait_as): Fix fall-through comment.
7253         * p-exp.y (yylex): Fix fall-through comment.
7254         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7255         comment.
7256         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7257         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7258         * jv-exp.y (yylex): Fix fall-through comment.
7259         * go-exp.y (lex_one_token): Fix fall-through comment.
7260         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7261         fall-through comment.
7262         * f-exp.y (yylex): Fix fall-through comment.
7263         * dwarf2read.c (process_die): Fix fall-through comments.
7264         * dbxread.c (process_one_symbol): Fix fall-through comment.
7265         * d-exp.y (lex_one_token): Fix fall-through comment.
7266         * cp-name-parser.y (yylex): Fix fall-through comment.
7267         * coffread.c (coff_symtab_read): Fix fall-through comment.
7268         * c-exp.y (lex_one_token): Fix fall-through comment.
7269         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7270         comment.
7271         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7272         comment.
7273
7274 2018-05-04  Tom Tromey  <tom@tromey.com>
7275
7276         PR python/22730:
7277         * NEWS: Mention gdb.execute change.
7278         * gdbcmd.h (execute_control_command): Don't declare.
7279         * python/python.c (execute_gdb_command): Use read_command_lines_1,
7280         execute_control_commands, execute_control_commands_to_string.
7281         * cli/cli-script.h (execute_control_commands)
7282         (execute_control_commands_to_string): Declare.
7283         (execute_control_command): Add from_tty parameter.
7284         * cli/cli-script.c (execute_control_commands)
7285         (execute_control_commands_to_string): New functions.
7286         (execute_user_command): Use execute_control_commands.
7287         (execute_control_command_1): Add "from_tty" parameter.  Update.
7288         (execute_control_command): Likewise.
7289
7290 2018-05-04  Tom Tromey  <tom@tromey.com>
7291
7292         PR python/22731:
7293         * NEWS: Mention that breakpoint commands are writable.
7294         * python/py-breakpoint.c (bppy_set_commands): New function.
7295         (breakpoint_object_getset) <"commands">: Use it.
7296
7297 2018-05-04  Tom Tromey  <tom@tromey.com>
7298
7299         * tracepoint.c (actions_command): Update.
7300         * mi/mi-cmd-break.c (mi_command_line_array)
7301         (mi_command_line_array_cnt, mi_command_line_array_ptr)
7302         (mi_read_next_line): Remove.
7303         (mi_cmd_break_commands): Update.
7304         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7305         function_view.
7306         * cli/cli-script.c (get_command_line): Update.
7307         (process_next_line): Use function_view.  Constify.
7308         (recurse_read_control_structure, read_command_lines)
7309         (read_command_lines_1): Change argument types to function_view.
7310         (do_define_command, document_command): Update.
7311         * breakpoint.h (check_tracepoint_command): Don't declare.
7312         * breakpoint.c (check_tracepoint_command): Remove.
7313         (commands_command_1, create_tracepoint_from_upload): Update.
7314
7315 2018-05-04  Tom Tromey  <tom@tromey.com>
7316
7317         PR gdb/11750:
7318         * cli/cli-script.h (enum command_control_type) <define_control>:
7319         New constant.
7320         * cli/cli-script.c (multi_line_command_p): Handle define_control.
7321         (build_command_line, execute_control_command_1)
7322         (process_next_line): Likewise.
7323         (do_define_command): New function, extracted from define_command.
7324         (define_command): Use it.
7325
7326 2018-05-04  Tom Tromey  <tom@tromey.com>
7327
7328         * tracepoint.c (actions_command): Update.
7329         * cli/cli-script.h (read_command_lines): Update.
7330         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7331         (MAX_TMPBUF): Remove define.
7332         (define_command): Use string_printf.
7333         (document_command): Likewise.
7334         * breakpoint.c (commands_command_1): Update.
7335
7336 2018-05-04  Tom Tromey  <tom@tromey.com>
7337
7338         * top.c (execute_command): Update.
7339         * cli/cli-script.h (print_command_lines): Now varargs.
7340         * cli/cli-script.c (print_command_lines): Now varargs.
7341         (execute_control_command_1) <case while_control, case if_control>:
7342         Update.
7343
7344 2018-05-04  Tom Tromey  <tom@tromey.com>
7345
7346         * tracepoint.c (all_tracepoint_actions): Rename from
7347         all_tracepoint_actions_and_cleanup.  Change return type.
7348         (actions_command, encode_actions_1, encode_actions)
7349         (trace_dump_actions, tdump_command): Update.
7350         * remote.c (remote_download_command_source): Update.
7351         * python/python.c (gdbpy_eval_from_control_command)
7352         (python_command, python_interactive_command): Update.
7353         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7354         * guile/guile.c (guile_command)
7355         (gdbscm_eval_from_control_command, guile_command): Update.
7356         * compile/compile.c (compile_code_command)
7357         (compile_print_command, compile_to_object): Update.
7358         * cli/cli-script.h (struct command_lines_deleter): New.
7359         (counted_command_line): New typedef.
7360         (struct command_line): Add constructor, destructor.
7361         <body_list>: Remove.
7362         <body_list_0, body_list_1>: New members.
7363         (command_line_up): Remove typedef.
7364         (read_command_lines, read_command_lines_1, get_command_line):
7365         Update.
7366         (copy_command_lines): Don't declare.
7367         * cli/cli-script.c (build_command_line): Use "new".
7368         (get_command_line): Return counted_command_line.
7369         (print_command_lines, execute_user_command)
7370         (execute_control_command_1, while_command, if_command): Update.
7371         (realloc_body_list): Remove.
7372         (process_next_line, recurse_read_control_structure): Update.
7373         (read_command_lines, read_command_lines_1): Return counted_command_line.
7374         (free_command_lines): Use "delete".
7375         (copy_command_lines): Remove.
7376         (define_command, document_command, show_user_1): Update.
7377         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7378         a counted_command_line.
7379         * breakpoint.h (counted_command_line): Remove typedef.
7380         (breakpoint_set_commands): Update.
7381         * breakpoint.c (check_no_tracepoint_commands)
7382         (validate_commands_for_breakpoint): Update.
7383         (breakpoint_set_commands): Change commands to be a
7384         counted_command_line.
7385         (commands_command_1, update_dprintf_command_list)
7386         (create_tracepoint_from_upload): Update.
7387
7388 2018-05-04  Tom Tromey  <tom@tromey.com>
7389
7390         * cli/cli-decode.h (cmd_list_element): New constructor.
7391         (~cmd_list_element): New destructor.
7392         (struct cmd_list_element): Add initializers.
7393         * cli/cli-decode.c (do_add_cmd): Use "new".
7394         (delete_cmd): Use "delete".
7395
7396 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7397             Pedro Alves <palves@redhat.com>
7398
7399         PR breakpoints/19806 and support for PR external/20207.
7400         * NEWS: Mention Aarch64 watchpoint improvements.
7401         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7402         watchpoints and PR external/20207 watchpoints.
7403         * nat/aarch64-linux-hw-point.c
7404         (kernel_supports_any_contiguous_range): New.
7405         (aarch64_watchpoint_offset): New.
7406         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7407         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7408         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7409         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7410         next_addr_orig_p.  Support PR external/20207 watchpoints.
7411         (aarch64_downgrade_regs): New.
7412         (aarch64_dr_state_insert_one_point): New parameters offset and
7413         addr_orig.
7414         (aarch64_dr_state_remove_one_point): Likewise.
7415         (aarch64_handle_breakpoint): Update caller.
7416         (aarch64_handle_aligned_watchpoint): Likewise.
7417         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7418         aligned_offset.
7419         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7420         aarch64_downgrade_regs.
7421         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7422         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7423         (DR_CONTROL_MASK): ... this.
7424         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7425         (unsigned int aarch64_watchpoint_offset): New prototype.
7426         (aarch64_linux_set_debug_regs): Remove const from state.
7427         * utils.c (align_up, align_down): Move to ...
7428         * common/common-utils.c (align_up, align_down): ... here.
7429         * utils.h (align_up, align_down): Move to ...
7430         * common/common-utils.h (align_up, align_down): ... here.
7431
7432 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
7433
7434         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7435         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7436         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7437         Re-implement to match the ABI as summarized in GCC's
7438         gcc/config/sparc/sparc.c.  All callers updated.
7439         (sparc32_store_arguments): Remove assertion.
7440
7441 2018-05-04  Tom Tromey  <tom@tromey.com>
7442
7443         * printcmd.c: Don't include tui.h.
7444         (decode_format): Use skip_spaces.
7445
7446 2018-05-04  Tom Tromey  <tom@tromey.com>
7447
7448         PR gdb/22619:
7449         * printcmd.c (last_count): New global.
7450         (x_command): Use saved count when repeating.
7451
7452 2018-05-04  Tom Tromey  <tom@tromey.com>
7453
7454         * nto-procfs.c (do_closedir_cleanup): Remove.
7455         (procfs_pidlist): Use gdb_dir_up.
7456         * procfs.c (do_closedir_cleanup): Remove.
7457         (proc_update_threads): Use gdb_dir_up.
7458         * common/filestuff.h (struct gdb_dir_deleter): New.
7459         (gdb_dir_up): New typedef.
7460
7461 2018-05-04  Tom Tromey  <tom@tromey.com>
7462
7463         * ada-lang.c (print_mention_exception): Use std::string.
7464
7465 2018-05-04  Tom Tromey  <tom@tromey.com>
7466
7467         * ada-lang.c (create_excep_cond_exprs): Update.
7468         (ada_exception_catchpoint_cond_string): Use std::string.
7469
7470 2018-05-04  Tom Tromey  <tom@tromey.com>
7471
7472         * ada-lang.c (xget_renaming_scope): Return std::string.
7473         (old_renaming_is_invisible): Update.
7474
7475 2018-05-04  Tom Tromey  <tom@tromey.com>
7476
7477         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7478         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7479
7480 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7481
7482         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7483
7484 2018-05-04  Tom Tromey  <tom@tromey.com>
7485
7486         * remote.c (remote_query_supported_append): Change type.
7487         (remote_check_symbols): Update.
7488
7489 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
7490
7491         PR gdb/11420
7492         * configure.ac: Prepend libpython.
7493         * python/python-config.py: Likewise.
7494         * configure: Regenerate.
7495
7496 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7497
7498         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7499
7500 2018-05-03  Pedro Alves  <palves@redhat.com>
7501
7502         * s390-linux-nat.c
7503         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7504         override.  Write 'true' instead of '1'.
7505         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7506         declaration.
7507
7508 2018-05-02  Pedro Alves  <palves@redhat.com>
7509
7510         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7511         add_inf_child_target.
7512         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7513         add_inf_child_target.
7514         * aix-thread.c (aix_thread_target_info): New.
7515         (aix_thread_target) <shortname, longname, doc>: Delete.
7516         <info>: New.
7517         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7518         add_inf_child_target.
7519         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7520         add_inf_child_target.
7521         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7522         add_inf_child_target.
7523         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7524         add_inf_child_target.
7525         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7526         add_inf_child_target.
7527         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7528         add_inf_child_target.
7529         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7530         add_inf_child_target.
7531         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7532         add_inf_child_target.
7533         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7534         add_inf_child_target.
7535         * bfd-target.c (target_bfd_target_info): New.
7536         (target_bfd) <shortname, longname, doc>: Delete.
7537         <info>: New.
7538         * bsd-kvm.c (bsd_kvm_target_info): New.
7539         (bsd_kvm_target) <shortname, longname, doc>: Delete.
7540         <info>: New.
7541         (bsd_kvm_target::open): Rename to ...
7542         (bsd_kvm_target_open): ... this.  Adjust.
7543         * bsd-uthread.c (bsd_uthread_target_info): New.
7544         (bsd_uthread_target) <shortname, longname, doc>: Delete.
7545         <info>: New.
7546         * corefile.c (core_file_command): Adjust.
7547         * corelow.c (core_target_info): New.
7548         (core_target) <shortname, longname, doc>: Delete.
7549         <info>: New.
7550         (core_target::open): Rename to ...
7551         (core_target_open): ... this.  Adjust.
7552         * ctf.c (ctf_target_info): New.
7553         (ctf_target) <shortname, longname, doc>: Delete.
7554         <info>: New.
7555         (ctf_target::open): Rename to ...
7556         (ctf_target_open): ... this.
7557         (_initialize_ctf): Adjust.
7558         * exec.c (exec_target_info): New.
7559         (exec_target) <shortname, longname, doc>: Delete.
7560         <info>: New.
7561         (exec_target::open): Rename to ...
7562         (exec_target_open): ... this.
7563         * gdbcore.h (core_target_open): Declare.
7564         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7565         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7566         add_inf_child_target.
7567         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7568         add_inf_child_target.
7569         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7570         add_inf_child_target.
7571         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7572         add_inf_child_target.
7573         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7574         add_inf_child_target.
7575         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7576         add_inf_child_target.
7577         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7578         add_inf_child_target.
7579         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7580         add_inf_child_target.
7581         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7582         add_inf_child_target.
7583         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7584         add_inf_child_target.
7585         * inf-child.c (inf_child_target_info): New.
7586         (inf_child_target::info): New.
7587         (inf_child_open_target): Remove 'target' parameter.  Use
7588         get_native_target instead.
7589         (inf_child_target::open): Delete.
7590         (add_inf_child_target): New.
7591         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7592         Delete.
7593         <info>: New.
7594         (add_inf_child_target): Declare.
7595         (inf_child_open_target): Declare.
7596         * linux-thread-db.c (thread_db_target_info): New.
7597         (thread_db_target) <shortname, longname, doc>: Delete.
7598         <info>: New.
7599         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7600         add_inf_child_target.
7601         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7602         add_inf_child_target.
7603         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7604         add_inf_child_target.
7605         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7606         add_inf_child_target.
7607         * make-target-delegates (print_class): Adjust.
7608         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7609         add_inf_child_target.
7610         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7611         add_inf_child_target.
7612         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7613         add_inf_child_target.
7614         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7615         add_inf_child_target.
7616         * nto-procfs.c (nto_native_target_info): New.
7617         (nto_procfs_target_native) <shortname, longname, doc>:
7618         Delete.
7619         <info>: New.
7620         (nto_procfs_target_info): New.
7621         (nto_procfs_target_procfs) <shortname, longname, doc>:
7622         Delete.
7623         <info>: New.
7624         (init_procfs_targets): Adjust.
7625         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7626         add_inf_child_target.
7627         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7628         add_inf_child_target.
7629         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7630         add_inf_child_target.
7631         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7632         add_inf_child_target.
7633         * ravenscar-thread.c (ravenscar_target_info): New.
7634         (ravenscar_thread_target) <shortname, longname, doc>:
7635         Delete.
7636         <info>: New.
7637         * record-btrace.c (record_btrace_target_info):
7638         (record_btrace_target) <shortname, longname, doc>: Delete.
7639         <info>: New.
7640         (record_btrace_target::open): Rename to ...
7641         (record_btrace_target_open): ... this.  Adjust.
7642         * record-full.c (record_longname, record_doc): New.
7643         (record_full_base_target) <shortname, longname, doc>: Delete.
7644         <info>: New.
7645         (record_full_target_info): New.
7646         (record_full_target): <shortname>: Delete.
7647         <info>: New.
7648         (record_full_core_open_1, record_full_open_1): Update comments.
7649         (record_full_base_target::open): Rename to ...
7650         (record_full_open): ... this.
7651         (cmd_record_full_restore): Update.
7652         (_initialize_record_full): Update.
7653         * remote-sim.c (remote_sim_target_info): New.
7654         (gdbsim_target) <shortname, longname, doc>: Delete.
7655         <info>: New.
7656         (gdbsim_target::open): Rename to ...
7657         (gdbsim_target_open): ... this.
7658         (_initialize_remote_sim): Adjust.
7659         * remote.c (remote_doc): New.
7660         (remote_target_info): New.
7661         (remote_target) <shortname, longname, doc>: Delete.
7662         <info>: New.
7663         (extended_remote_target_info): New.
7664         (extended_remote_target) <shortname, longname, doc>: Delete.
7665         <info>: New.
7666         (remote_target::open_1): Make static.  Adjust.
7667         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7668         * s390-linux-nat.c (_initialize_s390_nat): Use
7669         add_inf_child_target.
7670         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7671         add_inf_child_target.
7672         * sol-thread.c (thread_db_target_info): New.
7673         (sol_thread_target) <shortname, longname, doc>: Delete.
7674         <info>: New.
7675         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7676         add_inf_child_target.
7677         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7678         add_inf_child_target.
7679         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7680         add_inf_child_target.
7681         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7682         add_inf_child_target.
7683         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7684         add_inf_child_target.
7685         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7686         add_inf_child_target.
7687         * spu-linux-nat.c (_initialize_spu_nat): Use
7688         add_inf_child_target.
7689         * spu-multiarch.c (spu_multiarch_target_info): New.
7690         (spu_multiarch_target) <shortname, longname, doc>: Delete.
7691         <info>: New.
7692         * target-delegates.c: Regenerate.
7693         * target.c: Include <unordered_map>.
7694         (target_ops_p): Delete.
7695         (DEF_VEC_P(target_ops_p)): Delete.
7696         (target_factories): New.
7697         (test_target_info): New.
7698         (test_target_ops::info): New.
7699         (open_target): Adjust to use target_factories.
7700         (add_target_with_completer): Rename to ...
7701         (add_target): ... this.  Change prototype.  Register target_info
7702         and open callback in target_factories.  Register target_info in
7703         command context instead of target_ops.
7704         (add_target): Delete old implementation.
7705         (add_deprecated_target_alias): Change prototype.  Adjust.
7706         (the_native_target): New.
7707         (set_native_target, get_native_target): New.
7708         (find_default_run_target): Use the_native_target.
7709         (find_attach_target, find_run_target): Simplify.
7710         (target_ops::open): Delete.
7711         (dummy_target_info): New.
7712         (dummy_target::shortname, dummy_target::longname)
7713         (dummy_target::doc): Delete.
7714         (dummy_target::info): New.
7715         (debug_target::shortname, debug_target::longname)
7716         (debug_target::doc): Delete.
7717         (debug_target::info): New.
7718         * target.h (struct target_info): New.
7719         (target_ops::~target_ops): Add comment.
7720         (target_ops::info): New.
7721         (target_ops::shortname, target_ops::longname, target_ops::doc): No
7722         longer virtual.  Implement in terms of target_info.
7723         (set_native_target, get_native_target): Declare.
7724         (target_open_ftype): New.
7725         (add_target, add_target_with_completer)
7726         (add_deprecated_target_alias): Change prototype.
7727         (test_target) <shortname, longname, doc>: Delete.
7728         <info>: New.
7729         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7730         add_inf_child_target.
7731         * tracefile-tfile.c (tfile_target_info): New.
7732         (tfile_target) <shortname, longname, doc>: Delete.
7733         <info>: New.
7734         (tfile_target::open): Rename to ...
7735         (tfile_target_open): ... this.
7736         (_initialize_tracefile_tfile): Adjust.
7737         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7738         add_inf_child_target.
7739         * windows-nat.c (_initialize_windows_nat): Use
7740         add_inf_child_target.
7741         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7742         add_inf_child_target.
7743
7744 2018-05-02  Pedro Alves  <palves@redhat.com>
7745
7746         * linux-nat.h (linux_nat_target) <low_new_thread,
7747         low_delete_thread, low_new_fork, low_forget_process,
7748         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7749         New virtual methods.
7750         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7751         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7752         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7753         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7754         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7755         Delete.
7756         * linux-fork.c (delete_fork): Adjust to call low method.
7757         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7758         (linux_nat_new_fork, linux_nat_forget_process_hook)
7759         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7760         (linux_nat_status_is_event):
7761         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7762         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7763         to call low method.
7764         (sigtrap_is_event): Rename to ...
7765         (linux_nat_target::low_status_is_event): ... this.
7766         (linux_nat_set_status_is_event): Delete.
7767         (save_stop_reason, linux_nat_wait_1)
7768         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7769         low methods.
7770         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7771         (linux_nat_set_new_fork, linux_nat_set_forget_process)
7772         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7773         (linux_nat_set_prepare_to_resume): Delete.
7774         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7775         low virtual methods.
7776         * amd64-linux-nat.c: Likewise.
7777         * arm-linux-nat.c: Likewise.
7778         * i386-linux-nat.c: Likewise.
7779         * ia64-linux-nat.c: Likewise.
7780         * mips-linux-nat.c: Likewise.
7781         * ppc-linux-nat.c: Likewise.
7782         * s390-linux-nat.c: Likewise.
7783         * sparc64-linux-nat.c: Likewise.
7784         * x86-linux-nat.c: Likewise.
7785         * x86-linux-nat.h: Include "nat/x86-linux.h".
7786         (x86_linux_nat_target) <low_new_fork, low_forget_process,
7787         low_prepare_to_resume, low_new_thread, low_delete_thread>:
7788         Override methods.
7789
7790 2018-05-02  Pedro Alves  <palves@redhat.com>
7791
7792         * target.h (target_ops)
7793         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7794         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7795         stopped_by_watchpoint, have_continuable_watchpoint,
7796         stopped_data_address, watchpoint_addr_within_range,
7797         can_accel_watchpoint_condition, can_run, thread_alive,
7798         has_all_memory, has_memory, has_stack, has_registers,
7799         has_execution, can_async_p, is_async_p, supports_non_stop,
7800         always_non_stop_p, can_execute_reverse, supports_multi_process,
7801         supports_enable_disable_tracepoint,
7802         supports_disable_randomization, supports_string_tracing,
7803         supports_evaluation_of_breakpoint_conditions,
7804         can_run_breakpoint_commands, filesystem_is_local,
7805         can_download_tracepoint, get_trace_state_variable_value,
7806         set_trace_notes, get_tib_address, use_agent, can_use_agent,
7807         record_is_replaying, record_will_replay,
7808         augmented_libraries_svr4_read>: Adjust to return bool.
7809         * aarch64-linux-nat.c: All implementations adjusted.
7810         * aix-thread.c: All implementations adjusted.
7811         * arm-linux-nat.c: All implementations adjusted.
7812         * breakpoint.c: All implementations adjusted.
7813         * bsd-kvm.c: All implementations adjusted.
7814         * bsd-uthread.c: All implementations adjusted.
7815         * corelow.c: All implementations adjusted.
7816         * ctf.c: All implementations adjusted.
7817         * darwin-nat.c: All implementations adjusted.
7818         * darwin-nat.h: All implementations adjusted.
7819         * exec.c: All implementations adjusted.
7820         * fbsd-nat.c: All implementations adjusted.
7821         * fbsd-nat.h: All implementations adjusted.
7822         * gnu-nat.c: All implementations adjusted.
7823         * gnu-nat.h: All implementations adjusted.
7824         * go32-nat.c: All implementations adjusted.
7825         * ia64-linux-nat.c: All implementations adjusted.
7826         * inf-child.c: All implementations adjusted.
7827         * inf-child.h: All implementations adjusted.
7828         * inf-ptrace.c: All implementations adjusted.
7829         * inf-ptrace.h: All implementations adjusted.
7830         * linux-nat.c: All implementations adjusted.
7831         * linux-nat.h: All implementations adjusted.
7832         * mips-linux-nat.c: All implementations adjusted.
7833         * nto-procfs.c: All implementations adjusted.
7834         * ppc-linux-nat.c: All implementations adjusted.
7835         * procfs.c: All implementations adjusted.
7836         * ravenscar-thread.c: All implementations adjusted.
7837         * record-btrace.c: All implementations adjusted.
7838         * record-full.c: All implementations adjusted.
7839         * remote-sim.c: All implementations adjusted.
7840         * remote.c: All implementations adjusted.
7841         * s390-linux-nat.c: All implementations adjusted.
7842         * sol-thread.c: All implementations adjusted.
7843         * spu-multiarch.c: All implementations adjusted.
7844         * target-delegates.c: All implementations adjusted.
7845         * target.c: All implementations adjusted.
7846         * target.h: All implementations adjusted.
7847         * tracefile-tfile.c: All implementations adjusted.
7848         * tracefile.c: All implementations adjusted.
7849         * tracefile.h: All implementations adjusted.
7850         * windows-nat.c: All implementations adjusted.
7851         * x86-linux-nat.h: All implementations adjusted.
7852         * x86-nat.h: All implementations adjusted.
7853
7854 2018-05-02  Pedro Alves  <palves@redhat.com>
7855
7856         * make-target-delegates (scan_target_h): Don't trim lines here.
7857         Replace sequences of tabs and/or whitespace with a single
7858         whitespace.
7859         (top level, parsing methods): Trim each line before processing it
7860         here.
7861
7862 2018-05-02  Pedro Alves  <palves@redhat.com>
7863             John Baldwin  <jhb@freebsd.org>
7864
7865         * target.h (enum strata) <debug_stratum>: New.
7866         (struct target_ops) <all delegation methods>: Replace by C++
7867         virtual methods, and drop "to_" prefix.  All references updated
7868         throughout.
7869         <to_shortname, to_longname, to_doc, to_data,
7870         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7871         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7872         virtual methods.  All references updated throughout.
7873         <can_attach, supports_terminal_ours, can_create_inferior,
7874         get_thread_control_capabilities, attach_no_wait>: New
7875         virtual methods.
7876         <insert_breakpoint, remove_breakpoint>: Now
7877         TARGET_DEFAULT_NORETURN methods.
7878         <info_proc>: Now returns bool.
7879         <to_magic>: Delete.
7880         (OPS_MAGIC): Delete.
7881         (current_target): Delete.  All references replaced by references
7882         to ...
7883         (target_stack): ... this.  New.
7884         (target_shortname, target_longname): Adjust.
7885         (target_can_run): Now a function declaration.
7886         (default_child_has_all_memory, default_child_has_memory)
7887         (default_child_has_stack, default_child_has_registers)
7888         (default_child_has_execution): Remove target_ops parameter.
7889         (complete_target_initialization): Delete.
7890         (memory_breakpoint_target): New template class.
7891         (test_target_ops): Refactor as a C++ class with virtual methods.
7892         * make-target-delegates (NAME_PART): Tighten.
7893         (POINTER_PART, CP_SYMBOL): New.
7894         (SIMPLE_RETURN_PART): Reimplement.
7895         (VEC_RETURN_PART): Expect less.
7896         (RETURN_PART, VIRTUAL_PART): New.
7897         (METHOD): Adjust to C++ virtual methods.
7898         (scan_target_h): Remove reference to C99.
7899         (dname): Output "target_ops::" prefix.
7900         (write_function_header): Adjust to output a C++ class method.
7901         (write_declaration): New.
7902         (write_delegator): Adjust to output a C++ class method.
7903         (tdname): Output "dummy_target::" prefix.
7904         (write_tdefault, write_debugmethod): Adjust to output a C++ class
7905         method.
7906         (tdefault_names, debug_names): Delete.
7907         (return_types, tdefaults, styles, argtypes_array): New.
7908         (top level): All methods are delegators.
7909         (print_class): New.
7910         (top level): Print dummy_target and debug_target classes.
7911         * target-delegates.c: Regenerate.
7912         * target-debug.h (target_debug_print_enum_info_proc_what)
7913         (target_debug_print_thread_control_capabilities)
7914         (target_debug_print_thread_info_p): New.
7915         * target.c (dummy_target): Delete.
7916         (the_dummy_target, the_debug_target): New.
7917         (target_stack): Now extern.
7918         (set_targetdebug): Push/unpush debug target.
7919         (default_child_has_all_memory, default_child_has_memory)
7920         (default_child_has_stack, default_child_has_registers)
7921         (default_child_has_execution): Remove target_ops parameter.
7922         (complete_target_initialization): Delete.
7923         (add_target_with_completer): No longer call
7924         complete_target_initialization.
7925         (target_supports_terminal_ours): Use regular delegation.
7926         (update_current_target): Delete.
7927         (push_target): No longer check magic number.  Don't call
7928         update_current_target.
7929         (unpush_target): Don't call update_current_target.
7930         (target_is_pushed): No longer check magic number.
7931         (target_require_runnable): Skip for all stratums over
7932         process_stratum.
7933         (target_ops::info_proc): New.
7934         (target_info_proc): Use find_target_at and
7935         find_default_run_target.
7936         (target_supports_disable_randomization): Use regular delegation.
7937         (target_get_osdata): Use find_target_at.
7938         (target_ops::open, target_ops::close, target_ops::can_attach)
7939         (target_ops::attach, target_ops::can_create_inferior)
7940         (target_ops::create_inferior, target_ops::can_run)
7941         (target_can_run): New.
7942         (default_fileio_target): Use regular delegation.
7943         (target_ops::fileio_open, target_ops::fileio_pwrite)
7944         (target_ops::fileio_pread, target_ops::fileio_fstat)
7945         (target_ops::fileio_close, target_ops::fileio_unlink)
7946         (target_ops::fileio_readlink): New.
7947         (target_fileio_open_1, target_fileio_unlink)
7948         (target_fileio_readlink): Always call the target method.  Handle
7949         FILEIO_ENOSYS.
7950         (return_zero, return_zero_has_execution): Delete.
7951         (init_dummy_target): Delete.
7952         (dummy_target::dummy_target, dummy_target::shortname)
7953         (dummy_target::longname, dummy_target::doc)
7954         (debug_target::debug_target, debug_target::shortname)
7955         (debug_target::longname, debug_target::doc): New.
7956         (target_supports_delete_record): Use regular delegation.
7957         (setup_target_debug): Delete.
7958         (maintenance_print_target_stack): Skip debug_stratum.
7959         (initialize_targets): Instantiate the_dummy_target and
7960         the_debug_target.
7961         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7962         use target_stack.
7963         (target_auxv_search, fprint_target_auxv): Adjust.
7964         (info_auxv_command): Adjust to use target_stack.
7965         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7966         * exceptions.c (print_flush): Handle a NULL target_stack.
7967         * regcache.c (target_ops_no_register): Refactor as class with
7968         virtual methods.
7969
7970         * exec.c (exec_target): New class.
7971         (exec_ops): Now an exec_target.
7972         (exec_open, exec_close_1, exec_get_section_table)
7973         (exec_xfer_partial, exec_files_info, exec_has_memory)
7974         (exec_make_note_section): Refactor as exec_target methods.
7975         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7976         Delete.
7977         (exec_target::find_memory_regions): New.
7978         (_initialize_exec): Don't call init_exec_ops.
7979         * gdbcore.h (exec_file_clear): Delete.
7980
7981         * corefile.c (core_target): Delete.
7982         (core_file_command): Adjust.
7983         * corelow.c (core_target): New class.
7984         (the_core_target): New.
7985         (core_close): Remove target_ops parameter.
7986         (core_close_cleanup): Adjust.
7987         (core_target::close): New.
7988         (core_open, core_detach, get_core_registers, core_files_info)
7989         (core_xfer_partial, core_thread_alive, core_read_description)
7990         (core_pid_to_str, core_thread_name, core_has_memory)
7991         (core_has_stack, core_has_registers, core_info_proc): Rework as
7992         core_target methods.
7993         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7994         (_initialize_corelow): Initialize the_core_target.
7995         * gdbcore.h (core_target): Delete.
7996         (the_core_target): New.
7997
7998         * ctf.c: (ctf_target): New class.
7999         (ctf_ops): Now a ctf_target.
8000         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8001         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8002         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8003         methods.
8004         (init_ctf_ops): Delete.
8005         (_initialize_ctf): Don't call it.
8006         * tracefile-tfile.c (tfile_target): New class.
8007         (tfile_ops): Now a tfile_target.
8008         (tfile_open, tfile_close, tfile_files_info)
8009         (tfile_get_tracepoint_status, tfile_trace_find)
8010         (tfile_fetch_registers, tfile_xfer_partial)
8011         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8012         Refactor as tfile_target methods.
8013         (tfile_xfer_partial_features): Remove target_ops parameter.
8014         (init_tfile_ops): Delete.
8015         (_initialize_tracefile_tfile): Don't call it.
8016         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8017         (tracefile_has_stack, tracefile_has_registers)
8018         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8019         tracefile_target methods.
8020         (init_tracefile_ops): Delete.
8021         (tracefile_target::tracefile_target): New.
8022         * tracefile.h: Include "target.h".
8023         (tracefile_target): New class.
8024         (init_tracefile_ops): Delete.
8025
8026         * spu-multiarch.c (spu_multiarch_target): New class.
8027         (spu_ops): Now a spu_multiarch_target.
8028         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8029         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8030         (spu_search_memory, spu_mourn_inferior): Refactor as
8031         spu_multiarch_target methods.
8032         (init_spu_ops): Delete.
8033         (_initialize_spu_multiarch): Remove references to init_spu_ops,
8034         complete_target_initialization.
8035
8036         * ravenscar-thread.c (ravenscar_thread_target): New class.
8037         (ravenscar_ops): Now a ravenscar_thread_target.
8038         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8039         (ravenscar_thread_alive, ravenscar_pid_to_str)
8040         (ravenscar_fetch_registers, ravenscar_store_registers)
8041         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8042         (ravenscar_stopped_by_hw_breakpoint)
8043         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8044         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8045         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8046         methods.
8047         (init_ravenscar_thread_ops): Delete.
8048         (_initialize_ravenscar): Remove references to
8049         init_ravenscar_thread_ops and complete_target_initialization.
8050
8051         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8052         (bsd_uthread_target): New class.
8053         (bsd_uthread_ops): Now a bsd_uthread_target.
8054         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8055         (bsd_uthread_close, bsd_uthread_mourn_inferior)
8056         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8057         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8058         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8059         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8060         (bsd_uthread_target): Delete function.
8061         (_initialize_bsd_uthread): Remove reference to
8062         complete_target_initialization.
8063
8064         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
8065         (target_bfd): ... this new class.
8066         (target_bfd_xfer_partial, target_bfd_get_section_table)
8067         (target_bfd_close): Refactor as target_bfd methods.
8068         (target_bfd::~target_bfd): New.
8069         (target_bfd_reopen): Adjust.
8070         (target_bfd::close): New.
8071
8072         * record-btrace.c (record_btrace_target): New class.
8073         (record_btrace_ops): Now a record_btrace_target.
8074         (record_btrace_open, record_btrace_stop_recording)
8075         (record_btrace_disconnect, record_btrace_close)
8076         (record_btrace_async, record_btrace_info)
8077         (record_btrace_insn_history, record_btrace_insn_history_range)
8078         (record_btrace_insn_history_from, record_btrace_call_history)
8079         (record_btrace_call_history_range)
8080         (record_btrace_call_history_from, record_btrace_record_method)
8081         (record_btrace_is_replaying, record_btrace_will_replay)
8082         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8083         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8084         (record_btrace_store_registers, record_btrace_prepare_to_store)
8085         (record_btrace_to_get_unwinder)
8086         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8087         (record_btrace_commit_resume, record_btrace_wait)
8088         (record_btrace_stop, record_btrace_can_execute_reverse)
8089         (record_btrace_stopped_by_sw_breakpoint)
8090         (record_btrace_supports_stopped_by_sw_breakpoint)
8091         (record_btrace_stopped_by_hw_breakpoint)
8092         (record_btrace_supports_stopped_by_hw_breakpoint)
8093         (record_btrace_update_thread_list, record_btrace_thread_alive)
8094         (record_btrace_goto_begin, record_btrace_goto_end)
8095         (record_btrace_goto, record_btrace_stop_replaying_all)
8096         (record_btrace_execution_direction)
8097         (record_btrace_prepare_to_generate_core)
8098         (record_btrace_done_generating_core): Refactor as
8099         record_btrace_target methods.
8100         (init_record_btrace_ops): Delete.
8101         (_initialize_record_btrace): Remove reference to
8102         init_record_btrace_ops.
8103         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8104         the execution_direction global.
8105         (record_full_base_target, record_full_target)
8106         (record_full_core_target): New classes.
8107         (record_full_ops): Now a record_full_target.
8108         (record_full_core_ops): Now a record_full_core_target.
8109         (record_full_target::detach, record_full_target::disconnect)
8110         (record_full_core_target::disconnect)
8111         (record_full_target::mourn_inferior, record_full_target::kill):
8112         New.
8113         (record_full_open, record_full_close, record_full_async): Refactor
8114         as methods of the record_full_base_target class.
8115         (record_full_resume, record_full_commit_resume): Refactor
8116         as methods of the record_full_target class.
8117         (record_full_wait, record_full_stopped_by_watchpoint)
8118         (record_full_stopped_data_address)
8119         (record_full_stopped_by_sw_breakpoint)
8120         (record_full_supports_stopped_by_sw_breakpoint)
8121         (record_full_stopped_by_hw_breakpoint)
8122         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8123         methods of the record_full_base_target class.
8124         (record_full_store_registers, record_full_xfer_partial)
8125         (record_full_insert_breakpoint, record_full_remove_breakpoint):
8126         Refactor as methods of the record_full_target class.
8127         (record_full_can_execute_reverse, record_full_get_bookmark)
8128         (record_full_goto_bookmark, record_full_execution_direction)
8129         (record_full_record_method, record_full_info, record_full_delete)
8130         (record_full_is_replaying, record_full_will_replay)
8131         (record_full_goto_begin, record_full_goto_end, record_full_goto)
8132         (record_full_stop_replaying): Refactor as methods of the
8133         record_full_base_target class.
8134         (record_full_core_resume, record_full_core_kill)
8135         (record_full_core_fetch_registers)
8136         (record_full_core_prepare_to_store)
8137         (record_full_core_store_registers, record_full_core_xfer_partial)
8138         (record_full_core_insert_breakpoint)
8139         (record_full_core_remove_breakpoint)
8140         (record_full_core_has_execution): Refactor
8141         as methods of the record_full_core_target class.
8142         (record_full_base_target::supports_delete_record): New.
8143         (init_record_full_ops): Delete.
8144         (init_record_full_core_ops): Delete.
8145         (record_full_save): Refactor as method of the
8146         record_full_base_target class.
8147         (_initialize_record_full): Remove references to
8148         init_record_full_ops and init_record_full_core_ops.
8149
8150         * remote.c (remote_target, extended_remote_target): New classes.
8151         (remote_ops): Now a remote_target.
8152         (extended_remote_ops): Now an extended_remote_target.
8153         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8154         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8155         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8156         (remote_pass_signals, remote_set_syscall_catchpoint)
8157         (remote_program_signals, )
8158         (remote_thread_always_alive): Remove target_ops parameter.
8159         (remote_thread_alive, remote_thread_name)
8160         (remote_update_thread_list, remote_threads_extra_info)
8161         (remote_static_tracepoint_marker_at)
8162         (remote_static_tracepoint_markers_by_strid)
8163         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8164         (remote_open): Refactor as methods of remote_target.
8165         (extended_remote_open, extended_remote_detach)
8166         (extended_remote_attach, extended_remote_post_attach):
8167         (extended_remote_supports_disable_randomization)
8168         (extended_remote_create_inferior): : Refactor as method of
8169         extended_remote_target.
8170         (remote_set_permissions, remote_open_1, remote_detach)
8171         (remote_follow_fork, remote_follow_exec, remote_disconnect)
8172         (remote_resume, remote_commit_resume, remote_stop)
8173         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8174         (remote_terminal_ours, remote_wait, remote_fetch_registers)
8175         (remote_prepare_to_store, remote_store_registers)
8176         (remote_flash_erase, remote_flash_done, remote_files_info)
8177         (remote_kill, remote_mourn, remote_insert_breakpoint)
8178         (remote_remove_breakpoint, remote_insert_watchpoint)
8179         (remote_watchpoint_addr_within_range)
8180         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8181         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8182         (remote_supports_stopped_by_sw_breakpoint)
8183         (remote_stopped_by_hw_breakpoint)
8184         (remote_supports_stopped_by_hw_breakpoint)
8185         (remote_stopped_by_watchpoint, remote_stopped_data_address)
8186         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8187         (remote_verify_memory): Refactor as methods of remote_target.
8188         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8189         parameter.
8190         (remote_xfer_partial, remote_get_memory_xfer_limit)
8191         (remote_search_memory, remote_rcmd, remote_memory_map)
8192         (remote_pid_to_str, remote_get_thread_local_address)
8193         (remote_get_tib_address, remote_read_description): Refactor as
8194         methods of remote_target.
8195         (remote_target::fileio_open, remote_target::fileio_pwrite)
8196         (remote_target::fileio_pread, remote_target::fileio_close): New.
8197         (remote_hostio_readlink, remote_hostio_fstat)
8198         (remote_filesystem_is_local, remote_can_execute_reverse)
8199         (remote_supports_non_stop, remote_supports_disable_randomization)
8200         (remote_supports_multi_process, remote_supports_cond_breakpoints)
8201         (remote_supports_enable_disable_tracepoint)
8202         (remote_supports_string_tracing)
8203         (remote_can_run_breakpoint_commands, remote_trace_init)
8204         (remote_download_tracepoint, remote_can_download_tracepoint)
8205         (remote_download_trace_state_variable, remote_enable_tracepoint)
8206         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8207         (remote_trace_start, remote_get_trace_status)
8208         (remote_get_tracepoint_status, remote_trace_stop)
8209         (remote_trace_find, remote_get_trace_state_variable_value)
8210         (remote_save_trace_data, remote_get_raw_trace_data)
8211         (remote_set_disconnected_tracing, remote_core_of_thread)
8212         (remote_set_circular_trace_buffer, remote_traceframe_info)
8213         (remote_get_min_fast_tracepoint_insn_len)
8214         (remote_set_trace_buffer_size, remote_set_trace_notes)
8215         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8216         (remote_disable_btrace, remote_teardown_btrace)
8217         (remote_read_btrace, remote_btrace_conf)
8218         (remote_augmented_libraries_svr4_read, remote_load)
8219         (remote_pid_to_exec_file, remote_can_do_single_step)
8220         (remote_execution_direction, remote_thread_handle_to_thread_info):
8221         Refactor as methods of remote_target.
8222         (init_remote_ops, init_extended_remote_ops): Delete.
8223         (remote_can_async_p, remote_is_async_p, remote_async)
8224         (remote_thread_events, remote_upload_tracepoints)
8225         (remote_upload_trace_state_variables): Refactor as methods of
8226         remote_target.
8227         (_initialize_remote): Remove references to init_remote_ops and
8228         init_extended_remote_ops.
8229
8230         * remote-sim.c (gdbsim_target): New class.
8231         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8232         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8233         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8234         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8235         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8236         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8237         Refactor as methods of gdbsim_target.
8238         (gdbsim_ops): Now a gdbsim_target.
8239         (init_gdbsim_ops): Delete.
8240         (gdbsim_cntrl_c): Adjust.
8241         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8242
8243         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8244         (the_amd64_linux_nat_target): New.
8245         (amd64_linux_fetch_inferior_registers)
8246         (amd64_linux_store_inferior_registers): Refactor as methods of
8247         amd64_linux_nat_target.
8248         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
8249         * i386-linux-nat.c: Don't include "linux-nat.h".
8250         (i386_linux_nat_target): New class.
8251         (the_i386_linux_nat_target): New.
8252         (i386_linux_fetch_inferior_registers)
8253         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8254         as methods of i386_linux_nat_target.
8255         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
8256         * inf-child.c (inf_child_ops): Delete.
8257         (inf_child_fetch_inferior_registers)
8258         (inf_child_store_inferior_registers): Delete.
8259         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8260         methods of inf_child_target.
8261         (inf_child_target::supports_terminal_ours)
8262         (inf_child_target::terminal_init)
8263         (inf_child_target::terminal_inferior)
8264         (inf_child_target::terminal_ours_for_output)
8265         (inf_child_target::terminal_ours, inf_child_target::interrupt)
8266         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8267         New.
8268         (inf_child_open, inf_child_disconnect, inf_child_close)
8269         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8270         (inf_child_post_startup_inferior, inf_child_can_run)
8271         (inf_child_pid_to_exec_file): Refactor as methods of
8272         inf_child_target.
8273         (inf_child_follow_fork): Delete.
8274         (inf_child_target::can_create_inferior)
8275         (inf_child_target::can_attach): New.
8276         (inf_child_target::has_all_memory, inf_child_target::has_memory)
8277         (inf_child_target::has_stack, inf_child_target::has_registers)
8278         (inf_child_target::has_execution): New.
8279         (inf_child_fileio_open, inf_child_fileio_pwrite)
8280         (inf_child_fileio_pread, inf_child_fileio_fstat)
8281         (inf_child_fileio_close, inf_child_fileio_unlink)
8282         (inf_child_fileio_readlink, inf_child_use_agent)
8283         (inf_child_can_use_agent): Refactor as methods of
8284         inf_child_target.
8285         (return_zero, inf_child_target): Delete.
8286         (inf_child_target::inf_child_target): New.
8287         * inf-child.h: Include "target.h".
8288         (inf_child_target): Delete function prototype.
8289         (inf_child_target): New class.
8290         (inf_child_open_target, inf_child_mourn_inferior)
8291         (inf_child_maybe_unpush_target): Delete.
8292         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8293         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8294         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8295         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8296         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8297         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8298         (inf_ptrace_wait, inf_ptrace_xfer_partial)
8299         (inf_ptrace_thread_alive, inf_ptrace_files_info)
8300         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8301         methods of inf_ptrace_target.
8302         (inf_ptrace_target): Delete function.
8303         * inf-ptrace.h: Include "inf-child.h".
8304         (inf_ptrace_target): Delete function declaration.
8305         (inf_ptrace_target): New class.
8306         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8307         * linux-nat.c (linux_target): New.
8308         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8309         (linux_nat_target::~linux_nat_target): New.
8310         (linux_child_post_attach, linux_child_post_startup_inferior)
8311         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8312         (linux_child_remove_fork_catchpoint)
8313         (linux_child_insert_vfork_catchpoint)
8314         (linux_child_remove_vfork_catchpoint)
8315         (linux_child_insert_exec_catchpoint)
8316         (linux_child_remove_exec_catchpoint)
8317         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8318         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8319         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8320         (linux_nat_stopped_data_address)
8321         (linux_nat_stopped_by_sw_breakpoint)
8322         (linux_nat_supports_stopped_by_sw_breakpoint)
8323         (linux_nat_stopped_by_hw_breakpoint)
8324         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8325         (linux_nat_kill, linux_nat_mourn_inferior)
8326         (linux_nat_xfer_partial, linux_nat_thread_alive)
8327         (linux_nat_update_thread_list, linux_nat_pid_to_str)
8328         (linux_nat_thread_name, linux_child_pid_to_exec_file)
8329         (linux_child_static_tracepoint_markers_by_strid)
8330         (linux_nat_is_async_p, linux_nat_can_async_p)
8331         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8332         (linux_nat_supports_multi_process)
8333         (linux_nat_supports_disable_randomization, linux_nat_async)
8334         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8335         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8336         (linux_nat_fileio_open, linux_nat_fileio_readlink)
8337         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8338         methods of linux_nat_target.
8339         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8340         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8341         parameter.
8342         (check_stopped_by_watchpoint): Adjust.
8343         (linux_xfer_partial): Delete.
8344         (linux_target_install_ops, linux_target, linux_nat_add_target):
8345         Delete.
8346         (linux_nat_target::linux_nat_target): New.
8347         * linux-nat.h: Include "inf-ptrace.h".
8348         (linux_nat_target): New.
8349         (linux_target, linux_target_install_ops, linux_nat_add_target):
8350         Delete function declarations.
8351         (linux_target): Declare global.
8352         * linux-thread-db.c (thread_db_target): New.
8353         (thread_db_target::thread_db_target): New.
8354         (thread_db_ops): Delete.
8355         (the_thread_db_target): New.
8356         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8357         (thread_db_update_thread_list, thread_db_pid_to_str)
8358         (thread_db_extra_thread_info)
8359         (thread_db_thread_handle_to_thread_info)
8360         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8361         (thread_db_resume): Refactor as methods of thread_db_target.
8362         (init_thread_db_ops): Delete.
8363         (_initialize_thread_db): Remove reference to init_thread_db_ops.
8364         * x86-linux-nat.c: Don't include "linux-nat.h".
8365         (super_post_startup_inferior): Delete.
8366         (x86_linux_nat_target::~x86_linux_nat_target): New.
8367         (x86_linux_child_post_startup_inferior)
8368         (x86_linux_read_description, x86_linux_enable_btrace)
8369         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8370         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8371         methods of x86_linux_nat_target.
8372         (x86_linux_create_target): Delete.  Bits folded ...
8373         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
8374         pointer.
8375         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8376         (x86_linux_nat_target): New class.
8377         (x86_linux_create_target): Delete.
8378         (x86_linux_add_target): Now takes a linux_nat_target pointer.
8379         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8380         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8381         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8382         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8383         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8384         make extern.
8385         (x86_use_watchpoints): Delete.
8386         * x86-nat.h: Include "breakpoint.h" and "target.h".
8387         (x86_use_watchpoints): Delete.
8388         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8389         (x86_stopped_by_watchpoint, x86_stopped_data_address)
8390         (x86_insert_watchpoint, x86_remove_watchpoint)
8391         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8392         (x86_stopped_by_hw_breakpoint): New declarations.
8393         (x86_nat_target): New template class.
8394
8395         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8396         (the_ppc_linux_nat_target): New.
8397         (ppc_linux_fetch_inferior_registers)
8398         (ppc_linux_can_use_hw_breakpoint)
8399         (ppc_linux_region_ok_for_hw_watchpoint)
8400         (ppc_linux_ranged_break_num_registers)
8401         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8402         (ppc_linux_insert_mask_watchpoint)
8403         (ppc_linux_remove_mask_watchpoint)
8404         (ppc_linux_can_accel_watchpoint_condition)
8405         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8406         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8407         (ppc_linux_watchpoint_addr_within_range)
8408         (ppc_linux_masked_watch_num_registers)
8409         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8410         (ppc_linux_read_description): Refactor as methods of
8411         ppc_linux_nat_target.
8412         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8413
8414         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8415         (procfs_target): New class.
8416         (the_procfs_target): New.
8417         (procfs_target): Delete function.
8418         (procfs_auxv_parse, procfs_attach, procfs_detach)
8419         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8420         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8421         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8422         (procfs_create_inferior, procfs_update_thread_list)
8423         (procfs_thread_alive, procfs_pid_to_str)
8424         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8425         (procfs_stopped_data_address, procfs_insert_watchpoint)
8426         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8427         (proc_find_memory_regions, procfs_info_proc)
8428         (procfs_make_note_section): Refactor as methods of procfs_target.
8429         (_initialize_procfs): Adjust.
8430         * sol-thread.c (sol_thread_target): New class.
8431         (sol_thread_ops): Now a sol_thread_target.
8432         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8433         (sol_thread_fetch_registers, sol_thread_store_registers)
8434         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8435         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8436         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8437         (init_sol_thread_ops): Delete.
8438         (_initialize_sol_thread): Adjust.  Remove references to
8439         init_sol_thread_ops and complete_target_initialization.
8440
8441         * windows-nat.c (windows_nat_target): New class.
8442         (windows_fetch_inferior_registers)
8443         (windows_store_inferior_registers, windows_resume, windows_wait)
8444         (windows_attach, windows_detach, windows_pid_to_exec_file)
8445         (windows_files_info, windows_create_inferior)
8446         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8447         (windows_close, windows_pid_to_str, windows_xfer_partial)
8448         (windows_get_tib_address, windows_get_ada_task_ptid)
8449         (windows_thread_name, windows_thread_alive): Refactor as
8450         windows_nat_target methods.
8451         (do_initial_windows_stuff): Adjust.
8452         (windows_target): Delete function.
8453         (_initialize_windows_nat): Adjust.
8454
8455         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8456         (darwin_mourn_inferior, darwin_kill_inferior)
8457         (darwin_create_inferior, darwin_attach, darwin_detach)
8458         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8459         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8460         (darwin_supports_multi_process): Refactor as darwin_nat_target
8461         methods.
8462         (darwin_resume_to, darwin_files_info): Delete.
8463         (_initialize_darwin_inferior): Rename to ...
8464         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
8465         * darwin-nat.h: Include "inf-child.h".
8466         (darwin_nat_target): New class.
8467         (darwin_complete_target): Delete.
8468         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8469         (darwin_target): New.
8470         (i386_darwin_fetch_inferior_registers)
8471         (i386_darwin_store_inferior_registers): Refactor as methods of
8472         darwin_nat_target.
8473         (darwin_complete_target): Delete, with ...
8474         (_initialize_i386_darwin_nat): ... bits factored out here.
8475
8476         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8477         (the_alpha_linux_nat_target): New.
8478         (alpha_linux_register_u_offset): Refactor as
8479         alpha_linux_nat_target method.
8480         (_initialize_alpha_linux_nat): Adjust.
8481         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8482         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8483         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8484         methods of linux_nat_trad_target.
8485         (linux_trad_target): Delete.
8486         * linux-nat-trad.h (linux_trad_target): Delete function.
8487         (linux_nat_trad_target): New class.
8488         * mips-linux-nat.c (mips_linux_nat_target): New class.
8489         (super_fetch_registers, super_store_registers, super_close):
8490         Delete.
8491         (the_mips_linux_nat_target): New.
8492         (mips64_linux_regsets_fetch_registers)
8493         (mips64_linux_regsets_store_registers)
8494         (mips64_linux_fetch_registers, mips64_linux_store_registers)
8495         (mips_linux_register_u_offset, mips_linux_read_description)
8496         (mips_linux_can_use_hw_breakpoint)
8497         (mips_linux_stopped_by_watchpoint)
8498         (mips_linux_stopped_data_address)
8499         (mips_linux_region_ok_for_hw_watchpoint)
8500         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8501         (mips_linux_close): Refactor as methods of mips_linux_nat.
8502         (_initialize_mips_linux_nat): Adjust to C++ification.
8503
8504         * aix-thread.c (aix_thread_target): New class.
8505         (aix_thread_ops): Now an aix_thread_target.
8506         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8507         (aix_thread_fetch_registers, aix_thread_store_registers)
8508         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8509         (aix_thread_thread_alive, aix_thread_pid_to_str)
8510         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8511         Refactor as methods of aix_thread_target.
8512         (init_aix_thread_ops): Delete.
8513         (_initialize_aix_thread): Remove references to init_aix_thread_ops
8514         and complete_target_initialization.
8515         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8516         (rs6000_nat_target): New class.
8517         (the_rs6000_nat_target): New.
8518         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8519         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8520         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8521         (super_create_inferior): Delete.
8522         (_initialize_rs6000_nat): Adjust to C++ification.
8523
8524         * arm-linux-nat.c (arm_linux_nat_target): New class.
8525         (the_arm_linux_nat_target): New.
8526         (arm_linux_fetch_inferior_registers)
8527         (arm_linux_store_inferior_registers, arm_linux_read_description)
8528         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8529         (arm_linux_remove_hw_breakpoint)
8530         (arm_linux_region_ok_for_hw_watchpoint)
8531         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8532         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8533         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8534         arm_linux_nat_target.
8535         (_initialize_arm_linux_nat): Adjust to C++ification.
8536
8537         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8538         (the_aarch64_linux_nat_target): New.
8539         (aarch64_linux_fetch_inferior_registers)
8540         (aarch64_linux_store_inferior_registers)
8541         (aarch64_linux_child_post_startup_inferior)
8542         (aarch64_linux_read_description)
8543         (aarch64_linux_can_use_hw_breakpoint)
8544         (aarch64_linux_insert_hw_breakpoint)
8545         (aarch64_linux_remove_hw_breakpoint)
8546         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8547         (aarch64_linux_region_ok_for_hw_watchpoint)
8548         (aarch64_linux_stopped_data_address)
8549         (aarch64_linux_stopped_by_watchpoint)
8550         (aarch64_linux_watchpoint_addr_within_range)
8551         (aarch64_linux_can_do_single_step): Refactor as methods of
8552         aarch64_linux_nat_target.
8553         (super_post_startup_inferior): Delete.
8554         (_initialize_aarch64_linux_nat): Adjust to C++ification.
8555
8556         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8557         (the_hppa_linux_nat_target): New.
8558         (hppa_linux_fetch_inferior_registers)
8559         (hppa_linux_store_inferior_registers): Refactor as methods of
8560         hppa_linux_nat_target.
8561         (_initialize_hppa_linux_nat): Adjust to C++ification.
8562
8563         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8564         (the_ia64_linux_nat_target): New.
8565         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8566         (ia64_linux_stopped_data_address)
8567         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8568         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8569         ia64_linux_nat_target methods.
8570         (super_xfer_partial): Delete.
8571         (_initialize_ia64_linux_nat): Adjust to C++ification.
8572
8573         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8574         (the_m32r_linux_nat_target): New.
8575         (m32r_linux_fetch_inferior_registers)
8576         (m32r_linux_store_inferior_registers): Refactor as
8577         m32r_linux_nat_target methods.
8578         (_initialize_m32r_linux_nat): Adjust to C++ification.
8579
8580         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8581         (the_m68k_linux_nat_target): New.
8582         (m68k_linux_fetch_inferior_registers)
8583         (m68k_linux_store_inferior_registers): Refactor as
8584         m68k_linux_nat_target methods.
8585         (_initialize_m68k_linux_nat): Adjust to C++ification.
8586
8587         * s390-linux-nat.c (s390_linux_nat_target): New class.
8588         (the_s390_linux_nat_target): New.
8589         (s390_linux_fetch_inferior_registers)
8590         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8591         (s390_insert_watchpoint, s390_remove_watchpoint)
8592         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8593         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8594         (s390_auxv_parse, s390_read_description): Refactor as methods of
8595         s390_linux_nat_target.
8596         (_initialize_s390_nat): Adjust to C++ification.
8597
8598         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8599         (the_sparc_linux_nat_target): New.
8600         (_initialize_sparc_linux_nat): Adjust to C++ification.
8601         * sparc-nat.c (sparc_fetch_inferior_registers)
8602         (sparc_store_inferior_registers): Remove target_ops parameter.
8603         * sparc-nat.h (sparc_fetch_inferior_registers)
8604         (sparc_store_inferior_registers): Remove target_ops parameter.
8605         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8606         (the_sparc64_linux_nat_target): New.
8607         (_initialize_sparc64_linux_nat): Adjust to C++ification.
8608
8609         * spu-linux-nat.c (spu_linux_nat_target): New class.
8610         (the_spu_linux_nat_target): New.
8611         (spu_child_post_startup_inferior, spu_child_post_attach)
8612         (spu_child_wait, spu_fetch_inferior_registers)
8613         (spu_store_inferior_registers, spu_xfer_partial)
8614         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8615         methods.
8616         (_initialize_spu_nat): Adjust to C++ification.
8617
8618         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8619         (the_tilegx_linux_nat_target): New.
8620         (fetch_inferior_registers, store_inferior_registers):
8621         Refactor as methods.
8622         (_initialize_tile_linux_nat): Adjust to C++ification.
8623
8624         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8625         (the_xtensa_linux_nat_target): New.
8626         (xtensa_linux_fetch_inferior_registers)
8627         (xtensa_linux_store_inferior_registers): Refactor as
8628         xtensa_linux_nat_target methods.
8629         (_initialize_xtensa_linux_nat): Adjust to C++ification.
8630
8631         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8632         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8633         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8634         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8635         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8636         (fbsd_stopped_by_sw_breakpoint)
8637         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8638         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8639         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8640         (fbsd_post_startup_inferior, fbsd_post_attach)
8641         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8642         (fbsd_set_syscall_catchpoint)
8643         (super_xfer_partial, super_resume, super_wait)
8644         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8645         (fbsd_handle_debug_trap): Remove target_ops parameter.
8646         (fbsd_nat_add_target): Delete.
8647         * fbsd-nat.h: Include "inf-ptrace.h".
8648         (fbsd_nat_add_target): Delete.
8649         (USE_SIGTRAP_SIGINFO): Define.
8650         (fbsd_nat_target): New class.
8651
8652         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8653         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8654         (amd64bsd_target): Delete.
8655         * amd64-bsd-nat.h: New file.
8656         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8657         "x86-bsd-nat.h".
8658         (amd64_fbsd_nat_target): New class.
8659         (the_amd64_fbsd_nat_target): New.
8660         (amd64fbsd_read_description): Refactor as method of
8661         amd64_fbsd_nat_target.
8662         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8663         (_initialize_amd64fbsd_nat): Adjust to C++ification.
8664         * amd64-nat.h (amd64bsd_target): Delete function declaration.
8665         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8666         (i386bsd_store_inferior_registers): Remove target_ops parameter.
8667         (i386bsd_target): Delete.
8668         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8669         (i386bsd_fetch_inferior_registers)
8670         (i386bsd_store_inferior_registers): Declare.
8671         (i386_bsd_nat_target): New class.
8672         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8673         (the_i386_fbsd_nat_target): New.
8674         (i386fbsd_resume, i386fbsd_read_description): Refactor as
8675         i386_fbsd_nat_target methods.
8676         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8677         (_initialize_i386fbsd_nat): Adjust to C++ification.
8678         * x86-bsd-nat.c (super_mourn_inferior): Delete.
8679         (x86bsd_mourn_inferior, x86bsd_target): Delete.
8680         (_initialize_x86_bsd_nat): Adjust to C++ification.
8681         * x86-bsd-nat.h: Include "x86-nat.h".
8682         (x86bsd_target): Delete declaration.
8683         (x86bsd_nat_target): New class.
8684
8685         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8686         (the_aarch64_fbsd_nat_target): New.
8687         (aarch64_fbsd_fetch_inferior_registers)
8688         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8689         aarch64_fbsd_nat_target.
8690         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8691         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8692         (the_alpha_bsd_nat_target): New.
8693         (alphabsd_fetch_inferior_registers)
8694         (alphabsd_store_inferior_registers): Refactor as
8695         alpha_bsd_nat_target methods.
8696         (_initialize_alphabsd_nat): Refactor as methods of
8697         alpha_bsd_nat_target.
8698         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8699         (the_amd64_nbsd_nat_target): New.
8700         (_initialize_amd64nbsd_nat): Adjust to C++ification.
8701         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8702         (the_amd64_obsd_nat_target): New.
8703         (_initialize_amd64obsd_nat): Adjust to C++ification.
8704         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8705         (the_arm_fbsd_nat_target): New.
8706         (arm_fbsd_fetch_inferior_registers)
8707         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8708         (_initialize_arm_fbsd_nat): Refactor as methods of
8709         arm_fbsd_nat_target.
8710         (_initialize_arm_fbsd_nat): Adjust to C++ification.
8711         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8712         (the_arm_netbsd_nat_target): New.
8713         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8714         arm_netbsd_nat_target.
8715         (_initialize_arm_netbsd_nat): Adjust to C++ification.
8716         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8717         (the_hppa_nbsd_nat_target): New.
8718         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8719         hppa_nbsd_nat_target methods.
8720         (_initialize_hppanbsd_nat): Adjust to C++ification.
8721         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8722         (the_hppa_obsd_nat_target): New.
8723         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8724         methods of hppa_obsd_nat_target.
8725         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
8726         add_target.
8727         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8728         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
8729         add_target.
8730         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8731         (_initialize_i386obsd_nat): Use add_target.
8732         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8733         (the_m68k_bsd_nat_target): New.
8734         (m68kbsd_fetch_inferior_registers)
8735         (m68kbsd_store_inferior_registers): Refactor as methods of
8736         m68k_bsd_nat_target.
8737         (_initialize_m68kbsd_nat): Adjust to C++ification.
8738         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8739         (the_mips_fbsd_nat_target): New.
8740         (mips_fbsd_fetch_inferior_registers)
8741         (mips_fbsd_store_inferior_registers): Refactor as methods of
8742         mips_fbsd_nat_target.
8743         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
8744         add_target.
8745         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8746         (the_mips_nbsd_nat_target): New.
8747         (mipsnbsd_fetch_inferior_registers)
8748         (mipsnbsd_store_inferior_registers): Refactor as methods of
8749         mips_nbsd_nat_target.
8750         (_initialize_mipsnbsd_nat): Adjust to C++ification.
8751         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8752         (the_mips64_obsd_nat_target): New.
8753         (mips64obsd_fetch_inferior_registers)
8754         (mips64obsd_store_inferior_registers): Refactor as methods of
8755         mips64_obsd_nat_target.
8756         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
8757         add_target.
8758         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8759         nbsd_nat_target.
8760         * nbsd-nat.h: Include "inf-ptrace.h".
8761         (nbsd_nat_target): New class.
8762         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8763         (obsd_wait): Refactor as methods of obsd_nat_target.
8764         (obsd_add_target): Delete.
8765         * obsd-nat.h: Include "inf-ptrace.h".
8766         (obsd_nat_target): New class.
8767         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8768         (the_ppc_fbsd_nat_target): New.
8769         (ppcfbsd_fetch_inferior_registers)
8770         (ppcfbsd_store_inferior_registers): Refactor as methods of
8771         ppc_fbsd_nat_target.
8772         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
8773         add_target.
8774         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8775         (the_ppc_nbsd_nat_target): New.
8776         (ppcnbsd_fetch_inferior_registers)
8777         (ppcnbsd_store_inferior_registers): Refactor as methods of
8778         ppc_nbsd_nat_target.
8779         (_initialize_ppcnbsd_nat): Adjust to C++ification.
8780         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8781         (the_ppc_obsd_nat_target): New.
8782         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8783         methods of ppc_obsd_nat_target.
8784         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
8785         add_target.
8786         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8787         (the_sh_nbsd_nat_target): New.
8788         (shnbsd_fetch_inferior_registers)
8789         (shnbsd_store_inferior_registers): Refactor as methods of
8790         sh_nbsd_nat_target.
8791         (_initialize_shnbsd_nat): Adjust to C++ification.
8792         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8793         (inf_ptrace_xfer_partial): Delete.
8794         (sparc_xfer_partial, sparc_target): Delete.
8795         * sparc-nat.h (sparc_fetch_inferior_registers)
8796         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8797         (sparc_target): Delete function declaration.
8798         (sparc_target): New template class.
8799         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8800         (_initialize_sparcnbsd_nat): Adjust to C++ification.
8801         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8802         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
8803         add_target.
8804         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8805         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8806         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8807         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
8808         add_target.
8809         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8810         (the_vax_bsd_nat_target): New.
8811         (vaxbsd_fetch_inferior_registers)
8812         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8813         methods.
8814         (_initialize_vaxbsd_nat): Adjust to C++ification.
8815
8816         * bsd-kvm.c (bsd_kvm_target): New class.
8817         (bsd_kvm_ops): Now a bsd_kvm_target.
8818         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8819         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8820         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8821         bsd_kvm_target.
8822         (bsd_kvm_return_one): Delete.
8823         (bsd_kvm_add_target): Adjust to C++ification.
8824
8825         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8826         (nto_procfs_target_procfs): New classes.
8827         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8828         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8829         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8830         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8831         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8832         (procfs_remove_hw_breakpoint, procfs_resume)
8833         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8834         (procfs_kill_inferior, procfs_store_registers)
8835         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8836         as methods of nto_procfs_target.
8837         (nto_procfs_ops): Now an nto_procfs_target_procfs.
8838         (nto_native_ops): Delete.
8839         (procfs_open, procfs_native_open): Delete.
8840         (nto_native_ops): Now an nto_procfs_target_native.
8841         (init_procfs_targets): Adjust to C++ification.
8842         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8843         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8844         Refactor as methods of nto_procfs_target.
8845
8846         * go32-nat.c (go32_nat_target): New class.
8847         (the_go32_nat_target): New.
8848         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8849         (go32_store_registers, go32_xfer_partial, go32_files_info)
8850         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8851         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8852         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8853         (go32_pid_to_str): Refactor as methods of go32_nat_target.
8854         (go32_target): Delete.
8855         (_initialize_go32_nat): Adjust to C++ification.
8856
8857         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8858         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8859         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8860         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8861         gnu_nat_target.
8862         (gnu_target): Delete.
8863         * gnu-nat.h (gnu_target): Delete.
8864         (gnu_nat_target): New class.
8865         * i386-gnu-nat.c (gnu_base_target): New.
8866         (i386_gnu_nat_target): New class.
8867         (the_i386_gnu_nat_target): New.
8868         (_initialize_i386gnu_nat): Adjust to C++ification.
8869
8870 2018-05-02  Pedro Alves  <palves@redhat.com>
8871
8872         * bfd-target.c (target_bfd_xclose): Rename to ...
8873         (target_bfd_close): ... this.
8874         (target_bfd_reopen): Adjust.
8875         * target.c (target_close): Remove references to to_xclose.
8876         * target.h (target_ops::to_xclose): Delete.
8877         (target_ops::to_close): Update comments.
8878
8879 2018-05-02  Pedro Alves  <palves@redhat.com>
8880
8881         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8882         "linux-nat.h".
8883         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8884         * inf-ptrace.c (inf_ptrace_register_u_offset)
8885         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8886         (inf_ptrace_store_register, inf_ptrace_store_registers)
8887         (inf_ptrace_trad_target): Move to ...
8888         * linux-nat-trad.c: ... this new file.
8889         * linux-nat-trad.h: New file.
8890         * linux-nat.c (linux_target_install_ops): Make extern.
8891         (linux_trad_target): Delete.
8892         * linux-nat.h (linux_trad_target): Delete declaration.
8893         (linux_target_install_ops): Declare.
8894         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8895         "linux-nat.h".
8896
8897 2018-05-02  Pedro Alves  <palves@redhat.com>
8898
8899         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8900         procfs_target/add_target here.
8901         * procfs.c (procfs_target): Make static.
8902         (_initialize_procfs): Call add_target here.
8903         * procfs.h (struct target_ops): Remove forward declaration.
8904         (procfs_target): Remove declaration.
8905         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8906
8907 2018-05-02  Pedro Alves  <palves@redhat.com>
8908
8909         * procfs.c (procfs_stopped_by_watchpoint)
8910         (procfs_insert_watchpoint, procfs_remove_watchpoint)
8911         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8912         Forward declare.
8913         (procfs_use_watchpoints): Delete, move contents...
8914         (procfs_target): ... here.
8915         * procfs.h (procfs_use_watchpoints): Delete declaration.
8916         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8917         procfs_use_watchpoints.
8918         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8919         procfs_use_watchpoints.
8920
8921 2018-05-02  Tom Tromey  <tom@tromey.com>
8922
8923         PR python/20084:
8924         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8925         and var_zuinteger_unlimited.
8926         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8927         and PARAM_ZUINTEGER_UNLIMITED.
8928         (set_parameter_value): Handle var_zuinteger and
8929         var_zuinteger_unlimited.
8930         (add_setshow_generic): Likewise.
8931         (parmpy_init): Likewise.
8932
8933 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
8934
8935         PR rust/23124
8936         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8937         pointer is not null before dereferencing it.
8938
8939 2018-04-30  Tom Tromey  <tom@tromey.com>
8940
8941         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8942         is_mi_like_p.
8943
8944 2018-04-30  Tom Tromey  <tom@tromey.com>
8945
8946         * breakpoint.c (mention): Remove use of is_mi_like_p.
8947         (print_mention_ranged_breakpoint): Likewise.
8948         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8949         of is_mi_like_p.
8950
8951 2018-04-30  Tom Tromey  <tom@tromey.com>
8952
8953         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8954
8955 2018-04-30  Tom Tromey  <tom@tromey.com>
8956
8957         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8958         (info_spu_event_command): Remove some uses of is_mi_like_p.
8959
8960 2018-04-30  Tom Tromey  <tom@tromey.com>
8961
8962         * python/py-framefilter.c (py_print_single_arg)
8963         (enumerate_locals, py_print_args, py_print_frame): Remove some
8964         uses of is_mi_like_p.
8965
8966 2018-04-30  Tom Tromey  <tom@tromey.com>
8967
8968         * ui-out.c: Update.
8969         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8970         * ui-out.h (ui_out::is_mi_like_p): Now const.
8971         (ui_out::do_is_mi_like_p): Now const.
8972         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8973
8974 2018-04-30  Tom Tromey  <tom@tromey.com>
8975
8976         * varobj.c (varobj_set_visualizer): Use new_reference.
8977         * python/python.c (gdbpy_decode_line): Use new_reference.
8978         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8979         new_reference.
8980
8981 2018-04-30  Tom Tromey  <tom@tromey.com>
8982
8983         * varobj.c (install_new_value): Use new_reference.
8984         * value.h (value_incref): Return void.  Swap intro comment with
8985         value_decref.
8986         * value.c (set_value_parent): Use new_reference.
8987         (value_incref): Return void.  Update intro comment.
8988         (release_value): Use new_reference.
8989         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8990
8991 2018-04-30  Tom Tromey  <tom@tromey.com>
8992
8993         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8994         * gdb_bfd.h (new_bfd_ref): Remove.
8995         (gdb_bfd_open): Update comment.
8996         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8997         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8998         (gdb_bfd_fdopenr): Use new_reference.
8999         * exec.c (exec_file_attach): Use new_reference.
9000
9001 2018-04-30  Tom Tromey  <tom@tromey.com>
9002
9003         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9004         method.
9005
9006 2018-04-30  Tom Tromey  <tom@tromey.com>
9007
9008         * jit.c (jit_read_code_entry): Use type_align.
9009         * i386-tdep.c (i386_gdbarch_init): Don't call
9010         set_gdbarch_long_long_align_bit.
9011         * gdbarch.sh: Remove long_long_align_bit.
9012         * gdbarch.c, gdbarch.h: Rebuild.
9013         * arc-tdep.c (arc_type_align): New function.
9014         (arc_gdbarch_init): Use arc_type_align.  Don't call
9015         set_gdbarch_long_long_align_bit.
9016
9017 2018-04-30  Tom Tromey  <tom@tromey.com>
9018
9019         * rust-lang.c (rust_type_alignment): Remove.
9020         (rust_composite_type): Use type_align.
9021
9022 2018-04-30  Tom Tromey  <tom@tromey.com>
9023
9024         * NEWS: Mention Type.align.
9025         * python/py-type.c (typy_get_alignof): New function.
9026         (type_object_getset): Add "alignof".
9027
9028 2018-04-30  Tom Tromey  <tom@tromey.com>
9029
9030         PR exp/17095:
9031         * NEWS: Update.
9032         * std-operator.def (UNOP_ALIGNOF): New operator.
9033         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9034         New.
9035         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9036         * c-lang.c (c_op_print_tab): Add alignof.
9037         * c-exp.y (ALIGNOF): New token.
9038         (exp): Add "ALIGNOF" production.
9039         (ident_tokens): Add _Alignof and alignof.
9040
9041 2018-04-30  Tom Tromey  <tom@tromey.com>
9042
9043         * i386-tdep.c (i386_type_align): New function.
9044         (i386_gdbarch_init): Update.
9045         * gdbarch.sh (type_align): New method.
9046         * gdbarch.c, gdbarch.h: Rebuild.
9047         * arch-utils.h (default_type_align): Declare.
9048         * arch-utils.c (default_type_align): New function.
9049         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9050         (struct type) <align_log2>: New field.
9051         <instance_flags>: Now a bitfield.
9052         (TYPE_RAW_ALIGN): New macro.
9053         (type_align, type_raw_align, set_type_align): Declare.
9054         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9055         functions.
9056         * dwarf2read.c (quirk_rust_enum): Set type alignment.
9057         (get_alignment, maybe_set_alignment): New functions.
9058         (read_structure_type, read_enumeration_type, read_array_type)
9059         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9060         (read_subrange_type, read_base_type): Set type alignment.
9061
9062 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
9063
9064         * dwarf2read.c (read_index_from_section): Use bool.
9065
9066 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
9067
9068         PR gdb/22950
9069         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9070         with #ifdef.
9071
9072 2018-04-29  John Reiser  <jreiser@BitWagon.com>
9073
9074         PR build/22873
9075         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9076         last step, and do it atomically.
9077
9078 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
9079
9080         * compile/compile-c-types.c (convert_int, convert_float):
9081         Update for C FE v1.
9082
9083 2018-04-27  Tom Tromey  <tom@tromey.com>
9084
9085         PR rust/22545:
9086         * rust-lang.c (rust_inclusive_range_type_p): New function.
9087         (rust_range): Handle inclusive ranges.
9088         (rust_compute_range): Likewise.
9089         * rust-exp.y (struct rust_op) <inclusive>: New field.
9090         (DOTDOTEQ): New constant.
9091         (range_expr): Add "..=" productions.
9092         (operator_tokens): Add "..=" token.
9093         (ast_range): Add "inclusive" parameter.
9094         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9095         ranges.
9096         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9097         bounds values.
9098         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9099         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9100         Update comments.
9101         * expprint.c (print_subexp_standard): Handle new bounds values.
9102         (dump_subexp_body_standard): Likewise.
9103
9104 2018-04-27  Tom Tromey  <tom@tromey.com>
9105
9106         * configure: Rebuild.
9107         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9108         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9109         "OVERRIDE".
9110         (class symbol_needs_eval_context): Likewise.
9111         * dwarf2read.c (mock_mapped_index::symbol_name_count)
9112         (mock_mapped_index::symbol_name_at): Use "override".  Remove
9113         "virtual".
9114         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9115         "override".
9116         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9117         * aarch64-tdep.c (instruction_reader::read): Use "override".
9118         (instruction_reader_test::read): Likewise.
9119         * arm-tdep.c (instruction_reader::read): Use "override".
9120         (instruction_reader_thumb::read): Likewise.
9121
9122 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
9123
9124         PR remote/9665
9125         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9126         instead of remote_send.
9127         (remote_send): Remove.
9128
9129 2018-04-26  Pedro Alves  <palves@redhat.com>
9130
9131         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9132         find_function_start_sal instead of find_pc_line.
9133
9134 2018-04-26  Pedro Alves  <palves@redhat.com>
9135
9136         * breakpoint.c (set_breakpoint_location_function): Handle
9137         mst_data_gnu_ifunc.
9138         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9139         * elfread.c (elf_symtab_read): Give data symbols with
9140         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9141         (elf_rel_plt_read): Update comment.
9142         * linespec.c (convert_linespec_to_sals): Handle
9143         mst_data_gnu_ifunc.
9144         (minsym_found): Handle mst_data_gnu_ifunc.
9145         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9146         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9147         * parse.c (find_minsym_type_and_address): Handle
9148         mst_data_gnu_ifunc.
9149         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9150         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9151         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9152         comment.
9153         <mst_data_gnu_ifunc>: New enumerator.
9154
9155 2018-04-26  Pedro Alves  <palves@redhat.com>
9156
9157         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9158         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
9159         'want_trampoline' parameter by a lookup_msym_prefer parameter.
9160         Handle it.
9161         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9162         (lookup_minimal_symbol_by_pc): Adjust.
9163         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9164         (lookup_solib_trampoline_symbol_by_pc): Adjust.
9165         * minsyms.h (lookup_msym_prefer): New enum.
9166         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9167         parameter by a lookup_msym_prefer parameter.
9168
9169 2018-04-26  Pedro Alves  <palves@redhat.com>
9170
9171         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9172         ends in "@plt" instead of looking at the symbol's section.
9173
9174 2018-04-26  Pedro Alves  <palves@redhat.com>
9175
9176         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
9177         all references.
9178         (find_pc_partial_function_gnu_ifunc): Rename to ...
9179         (find_pc_partial_function): ... this, and remove references to
9180         'is_gnu_ifunc_p'.
9181         (find_pc_partial_function): Delete old implementation.
9182         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9183
9184 2018-04-26  Pedro Alves  <palves@redhat.com>
9185
9186         * linespec.c (struct bound_minimal_symbol_search_key): New.
9187         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
9188         skip first line if we found a GNU ifunc minimal symbol by name.
9189         (compare_msymbols): Change parameters to work with a destructured
9190         lhs minsym.
9191         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9192         functions.
9193
9194 2018-04-26  Pedro Alves  <palves@redhat.com>
9195
9196         * breakpoint.c (set_breakpoint_location_function): Don't resolve
9197         ifunc targets here.  Instead, if we have an ifunc minsym, use its
9198         address/name.
9199         (add_location_to_breakpoint): Store the minsym and the objfile in
9200         the breakpoint location.
9201         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9202         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9203         Record the minsym in the sal.
9204         * symtab.h (symtab_and_line) <msymbol>: New field.
9205
9206 2018-04-26  Pedro Alves  <palves@redhat.com>
9207
9208         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9209         unless we actually resolved the ifunc.
9210
9211 2018-04-26  Pedro Alves  <palves@redhat.com>
9212
9213         * c-exp.y (variable production): Prefer ifunc minsyms over
9214         regular function symbols.
9215         * symtab.c (find_gnu_ifunc): New function.
9216         * minsyms.h (lookup_msym_prefer): New enum.
9217         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9218         parameter by a lookup_msym_prefer parameter.
9219         * symtab.h (find_gnu_ifunc): New declaration.
9220
9221 2018-04-26  Pedro Alves  <palves@redhat.com>
9222
9223         * blockframe.c (find_gnu_ifunc_target_type): New function.
9224         (find_function_type): New.
9225         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9226         return a value with a memory address.
9227         (eval_call): For calls to GNU ifunc functions, try to find the
9228         type of the target function from the type that the resolver
9229         returns.
9230         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9231         symbols.
9232         * infcall.c (find_function_return_type): Delete.
9233         (find_function_addr): Add 'function_type' parameter.  For calls to
9234         GNU ifunc functions, try to find the type of the target function
9235         from the type that the resolver returns, and return it via
9236         FUNCTION_TYPE.
9237         (call_function_by_hand_dummy): Adjust to use the function type
9238         returned by find_function_addr.
9239         (find_function_addr): Add 'function_type' parameter and move
9240         description here.
9241         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9242         declarations.
9243
9244 2018-04-26  Pedro Alves  <palves@redhat.com>
9245
9246         * c-exp.y (variable production): Skip finding an alias for ifunc
9247         symbols.
9248
9249 2018-04-26  Pedro Alves  <palves@redhat.com>
9250
9251         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9252
9253 2018-04-25  Pedro Alves  <palves@redhat.com>
9254
9255         * infcmd.c (kill_command): Print the pid as string, not the whole
9256         thread's ptid.  Add comment.  s/has been killed/killed/ in output
9257         message.
9258         * remote.c (remote_detach_1): Print the pid as string, not the
9259         whole thread's ptid.
9260
9261 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9262             Sergio Durigan Junior  <sergiodj@redhat.com>
9263             Pedro Alves  <palves@redhat.com>
9264
9265         * infcmd.c (kill_command): Print message when inferior has
9266         been killed.
9267         * inferior.c (print_inferior_events): Remove 'static'.  Set as
9268         '1'.
9269         (add_inferior): Improve message printed when
9270         'print_inferior_events' is on.
9271         (exit_inferior): Remove message printed when
9272         'print_inferior_events' is on.
9273         (detach_inferior): Improve message printed when
9274         'print_inferior_events' is on.
9275         (initialize_inferiors): Use 'add_inferior_silent' to set
9276         'current_inferior_'.
9277         * inferior.h (print_inferior_events): Declare here as
9278         'extern'.
9279         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9280         '[Detaching...]' messages when 'print_inferior_events' is on.
9281         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
9282         as prefix/suffix for messages.  Remove periods.  Fix erroneous
9283         'Detaching after fork from child...', replace it by '... from
9284         parent...'.
9285         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9286         prefix/suffix when printing 'Detaching...' messages.  Print
9287         them when 'print_inferior_events' is on.
9288         * remote.c (remote_detach_1): Print message when detaching
9289         from inferior and '!is_fork_parent'.
9290
9291 2018-04-24  Tom Tromey  <tom@tromey.com>
9292
9293         * cli-out.h: Reindent.
9294
9295 2018-04-24  Tom Tromey  <tom@tromey.com>
9296
9297         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9298         (cli_ui_out::do_field_string): Use fputs_filtered.
9299         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9300
9301 2018-04-23  Tom Tromey  <tom@tromey.com>
9302
9303         * guile/scm-frame.c (gdbscm_frame_read_var): Use
9304         gdb::unique_xmalloc_ptr.
9305
9306 2018-04-23  Tom Tromey  <tom@tromey.com>
9307
9308         * configure: Rebuild.
9309
9310 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
9311
9312         PR gdb/23095
9313         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9314         prepare_for_testing.  Set normal_bp to r_debug_state if target
9315         is bsd.
9316
9317 2018-04-21  Pedro Alves  <palves@redhat.com>
9318             Rajendra SY  <rajendra.sy@gmail.com>
9319
9320         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9321         * remote.c (extended_remote_attach): In all-stop mode, mark the
9322         thread as executing.
9323
9324 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9325
9326         * thread.c (thread_apply_all_command): Fix comment.
9327         (thread_command): Fix comment.
9328
9329 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
9330
9331         * common/tdesc.h (tdesc_create_feature): Remove xml filename
9332         parameter.
9333         * features/aarch64-core.c (create_feature_aarch64_core):
9334         Regenerate.
9335         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9336         Likewise.
9337         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9338         Likewise.
9339         * features/i386/32bit-avx512.c
9340         (create_feature_i386_32bit_avx512): Likewise.
9341         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9342         Likewise.
9343         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9344         Likewise.
9345         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9346         Likewise.
9347         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9348         Likewise.
9349         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9350         Likewise.
9351         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9352         Likewise.
9353         * features/i386/64bit-avx512.c
9354         (create_feature_i386_64bit_avx512): Likewise.
9355         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9356         Likewise.
9357         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9358         Likewise.
9359         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9360         Likewise.
9361         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9362         Likewise.
9363         * features/i386/64bit-segments.c
9364         (create_feature_i386_64bit_segments): Likewise.
9365         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9366         Likewise.
9367         * features/i386/x32-core.c
9368         (create_feature_i386_x32_core): Likewise.
9369         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9370         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9371         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9372         * target-descriptions.c: In generated code, don't pass xml
9373         filename.
9374
9375 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9376
9377         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9378         (print_xml_feature::visit_post): Likewise.
9379         (print_xml_feature::visit): Likewise.
9380         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9381         (print_xml_feature): Add new class.
9382         * regformats/regdat.sh: Null xmltarget on feature targets.
9383         * target-descriptions.c (struct target_desc): Add xmltarget.
9384         (maintenance_check_tdesc_xml_convert): Add unittest function.
9385         (tdesc_get_features_xml): Add function to get xml.
9386         (maintenance_check_xml_descriptions): Test xml generation.
9387         * xml-tdesc.c (string_read_description_xml): Add function.
9388         * xml-tdesc.h (string_read_description_xml): Add declaration.
9389
9390 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9391
9392         * features/Makefile: Add feature marker to targets with new style
9393         target descriptions.
9394         * regformats/aarch64.dat: Regenerate.
9395         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9396         * regformats/i386/amd64-avx-linux.dat: Likewise.
9397         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9398         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9399         * regformats/i386/amd64-linux.dat: Likewise.
9400         * regformats/i386/amd64-mpx-linux.dat: Likewise.
9401         * regformats/i386/amd64.dat: Likewise.
9402         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9403         * regformats/i386/i386-avx-linux.dat: Likewise.
9404         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9405         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9406         * regformats/i386/i386-linux.dat: Likewise.
9407         * regformats/i386/i386-mmx-linux.dat: Likewise.
9408         * regformats/i386/i386-mpx-linux.dat: Likewise.
9409         * regformats/i386/i386.dat: Likewise.
9410         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9411         * regformats/i386/x32-avx-linux.dat: Likewise.
9412         * regformats/i386/x32-linux.dat: Likewise.
9413         * regformats/tic6x-c62x-linux.dat: Likewise.
9414         * regformats/tic6x-c64x-linux.dat: Likewise.
9415         * regformats/tic6x-c64xp-linux.dat: Likewise.
9416         * regformats/regdat.sh: Parse feature marker.
9417
9418 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9419
9420         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9421         (tdesc_osabi_name): Likewise.
9422         * target-descriptions.c (tdesc_architecture_name): Add new
9423         function.
9424         (tdesc_osabi_name): Likewise.
9425
9426 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9427
9428         * common/tdesc.c (tdesc_predefined_type): Move to here.
9429         (tdesc_named_type): Likewise.
9430         (tdesc_create_vector): Likewise.
9431         (tdesc_create_struct): Likewise.
9432         (tdesc_set_struct_size): Likewise.
9433         (tdesc_create_union): Likewise.
9434         (tdesc_create_flags): Likewise.
9435         (tdesc_create_enum): Likewise.
9436         (tdesc_add_field): Likewise.
9437         (tdesc_add_typed_bitfield): Likewise.
9438         (tdesc_add_bitfield): Likewise.
9439         (tdesc_add_flag): Likewise.
9440         (tdesc_add_enum_value): Likewise.
9441         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9442         (struct tdesc_type_vector): Likewise.
9443         (struct tdesc_type_field): Likewise.
9444         (struct tdesc_type_with_fields): Likewise.
9445         (tdesc_create_enum): Add declaration.
9446         (tdesc_add_typed_bitfield): Likewise.
9447         (tdesc_add_enum_value): Likewise.
9448         * target-descriptions.c (tdesc_type_field): Move from here.
9449         (tdesc_type_builtin): Likewise.
9450         (tdesc_type_vector): Likewise.
9451         (tdesc_type_with_fields): Likewise.
9452         (tdesc_predefined_types): Likewise.
9453         (tdesc_named_type): Likewise.
9454         (tdesc_create_vector): Likewise.
9455         (tdesc_create_struct): Likewise.
9456         (tdesc_set_struct_size): Likewise.
9457         (tdesc_create_union): Likewise.
9458         (tdesc_create_flags): Likewise.
9459         (tdesc_create_enum): Likewise.
9460         (tdesc_add_field): Likewise.
9461         (tdesc_add_typed_bitfield): Likewise.
9462         (tdesc_add_bitfield): Likewise.
9463         (tdesc_add_flag): Likewise.
9464         (tdesc_add_enum_value): Likewise.
9465         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9466         (tdesc_add_typed_bitfield): Likewise.
9467         (tdesc_add_enum_value): Likewise.
9468
9469 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9470
9471         * common/tdesc.c (tdesc_feature::accept): Move to here.
9472         (tdesc_feature::operator==): Likewise.
9473         (tdesc_create_reg): Likewise.
9474         * common/tdesc.h (tdesc_type_kind): Likewise.
9475         (struct tdesc_type): Likewise.
9476         (struct tdesc_feature): Likewise.
9477         * regformats/regdat.sh: Create a feature.
9478         * target-descriptions.c (tdesc_type_kind): Move from here.
9479         (tdesc_type): Likewise.
9480         (tdesc_type_up): Likewise.
9481         (tdesc_feature): Likewise.
9482         (tdesc_create_reg): Likewise.
9483
9484 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9485
9486         * Makefile.in: Add arch/tdesc.c
9487         * common/tdesc.c: New file.
9488         * common/tdesc.h (tdesc_element_visitor): Move to here.
9489         (tdesc_element): Likewise.
9490         (tdesc_reg): Likewise.
9491         (tdesc_reg_up): Likewise.
9492         * regformats/regdef.h (reg): Add offset to constructors.
9493         * target-descriptions.c (tdesc_element_visitor): Move from here.
9494         (tdesc_element): Likewise.
9495         (tdesc_reg): Likewise.
9496         (tdesc_reg_up): Likewise.
9497
9498 2018-04-17  Tom Tromey  <tom@tromey.com>
9499
9500         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9501         discriminant field.
9502
9503 2018-04-17  Tom Tromey  <tom@tromey.com>
9504
9505         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9506
9507 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9508
9509         * symtab.c (print_symbol_info): Skip printing filename and line
9510         number when `last' is NULL.
9511         (symtab_symbol_info): Use empty string instead of NULL for first
9512         invocation of print_symbol_info.
9513         (rbreak_command): Pass NULL to `last' parameter of
9514         print_symbol_info.
9515
9516 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
9517
9518         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9519         instead of nullptr.
9520
9521 2018-04-16  Pedro Alves  <palves@redhat.com>
9522
9523         * MAINTAINERS (sh): Remove.
9524         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9525         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9526         (ALLDEPFILES): Remove sh64-tdep.c.
9527         * NEWS: Mentions that support for SH-5/SH64 is removed.
9528         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9529         (sh*-*-openbsd*): Ditto.
9530         (sh64-*-elf*): Remove.
9531         (sh*): Remove.
9532         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9533         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9534         * sh-tdep.c: No longer include "sh64-tdep.h".
9535         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9536         * sh64-tdep.c, sh64-tdep.h: Remove files.
9537
9538 2018-04-16  Pedro Alves  <palves@redhat.com>
9539
9540         * MAINTAINERS: Remove m88k.
9541         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9542         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9543         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9544         * NEWS: Mention that support for m88k was removed.
9545         * configure.host (m88*-*-*): Remove support.
9546         * configure.nat (m88k-*-*): Remove support.
9547         * configure.tgt (m88*-*-openbsd*): Remove.
9548         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9549
9550 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
9551
9552         * configure.tgt (x86_tobjs): New variable.
9553         (amd64_tobjs, i386_tobjs): Use it.
9554
9555 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9556
9557         * symtab.c (print_symbol_info): Precede the symbol definition by
9558         the line number when available.
9559         * NEWS: Advertise this enhancement.
9560
9561 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9562
9563         * NEWS (New options): announce set/show record btrace cpu.
9564         * btrace.c: Include record-btrace.h.
9565         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9566         the vendor is unknown.
9567         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
9568         Maybe overwrite the btrace configuration's cpu.
9569         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
9570         (btrace_fetch): Add cpu parameter.  Update callers.
9571         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9572         Maybe overwrite the btrace configuration's cpu.  Skip enabling
9573         errata workarounds if the vendor is unknown.
9574         * python/py-record-btrace.c: Include record-btrace.h.
9575         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9576         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9577         * record-btrace.c (record_btrace_cpu_state_kind): New.
9578         (record_btrace_cpu): New.
9579         (set_record_btrace_cpu_cmdlist): New.
9580         (record_btrace_get_cpu): New.
9581         (require_btrace_thread, record_btrace_info)
9582         (record_btrace_resume_thread): Call record_btrace_get_cpu.
9583         (cmd_set_record_btrace_cpu_none): New.
9584         (cmd_set_record_btrace_cpu_auto): New.
9585         (cmd_set_record_btrace_cpu): New.
9586         (cmd_show_record_btrace_cpu): New.
9587         (_initialize_record_btrace): Initialize set/show record btrace cpu
9588         commands.
9589         * record-btrace.h (record_btrace_get_cpu): New.
9590
9591 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9592
9593         * record.c (set_record_command): Fix typo in message.
9594
9595 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9596
9597         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9598
9599 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9600
9601         * infrun.c (process_event_stop_test): Call
9602         gdbarch_in_indirect_branch_thunk.
9603         * gdbarch.sh (in_indirect_branch_thunk): New.
9604         * gdbarch.c: Regenerated.
9605         * gdbarch.h: Regenerated.
9606         * x86-tdep.h: New.
9607         * x86-tdep.c: New.
9608         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9609         (HFILES_NO_SRCDIR): Add x86-tdep.h.
9610         (ALLDEPFILES): Add x86-tdep.c.
9611         * arch-utils.h (default_in_indirect_branch_thunk): New.
9612         * arch-utils.c (default_in_indirect_branch_thunk): New.
9613         * i386-tdep: Include x86-tdep.h.
9614         (i386_in_indirect_branch_thunk): New.
9615         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9616         function.
9617         * amd64-tdep: Include x86-tdep.h.
9618         (amd64_in_indirect_branch_thunk): New.
9619         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9620
9621 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9622
9623         PR gdb/23053
9624         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9625         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9626         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9627         regression.
9628
9629 2018-04-12  Tom Tromey  <tom@tromey.com>
9630
9631         * rust-lang.c (rust_print_struct_def): Remove univariant code.
9632         (rust_evaluate_subexp): Likewise.
9633
9634 2018-04-12  Pedro Alves  <palves@redhat.com>
9635
9636         * procfs.c (procfs_detach): Make forward declaration's prototype
9637         match definition's protototype.
9638         (proc_get_LDT_entry): Remove stale do_cleanups call.
9639
9640 2018-04-12  Pedro Alves  <palves@redhat.com>
9641
9642         * target.h (target_ops::to_has_exited): Delete.
9643         (target_has_exited): Delete.
9644         * target-delegates.c: Regenerate.
9645
9646 2018-04-11  Pedro Alves  <palves@redhat.com>
9647
9648         * target.c (fileio_fh_t::t): Add comment.
9649         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9650         (target_fileio_close): Handle a NULL target.
9651         (invalidate_fileio_fh): New.
9652         (target_close): Call it.
9653         * remote.c (remote_hostio_send_command): No longer check whether
9654         remote_desc is open.
9655
9656 2018-04-11  Pedro Alves  <palves@redhat.com>
9657
9658         * target.c (fileio_fh_t): Make it a named struct instead of a
9659         typedef.
9660         (fileio_fh_t::is_closed): New method.
9661         (DEF_VEC_O (fileio_fh_t)): Remove.
9662         (fileio_fhandles): Now a std::vector.
9663         (is_closed_fileio_fh): Delete.
9664         (acquire_fileio_fd): Adjust.  Rename parameters.
9665         (release_fileio_fd): Adjust.
9666         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9667         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9668         (target_fileio_close): Adjust.
9669
9670 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
9671
9672         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9673         index.
9674
9675 2018-04-10  Pedro Alves  <palves@redhat.com>
9676
9677         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9678         (scoped_finish_thread_state): New class.
9679         * infcmd.c (run_command_1): Use it instead of finish_thread_state
9680         cleanup.
9681         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9682         (fetch_inferior_event, normal_stop): Likewise.
9683         * thread.c (finish_thread_state_cleanup): Delete.
9684
9685 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9686             Pedro Alves  <palves@redhat.com>
9687
9688         * value.c: Include "selftest.h" and "common/array-view.h".
9689         (struct range) <operator ==>: New.
9690         (test_ranges_contain): New.
9691         (check_ranges_vector): New.
9692         (test_insert_into_bit_range_vector): New.
9693         (_initialize_values): Register selftests.
9694         * common/array-view.h (operator==, operator!=): New.
9695
9696 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9697
9698         * common/gdb_vecs.h (unordered_remove): Add overload that takes
9699         an iterator.
9700         * inline-frame.c: Include <algorithm>.
9701         (struct inline_state): Add constructor.
9702         (inline_state_s): Remove.
9703         (DEF_VEC_O(inline_state_s)): Remove.
9704         (inline_states): Change type to std::vector.
9705         (find_inline_frame_state): Adjust to std::vector.
9706         (allocate_inline_frame_state): Remove.
9707         (clear_inline_frame_state): Adjust to std::vector.
9708         (skip_inline_frames): Adjust to std::vector.
9709
9710 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9711
9712         * tracepoint.h (struct trace_state_variable): Add constructor.
9713         <name>: Change type to std::string.
9714         * tracepoint.c (tsv_s): Remove.
9715         (DEF_VEC_O(tsv_s)): Remove.
9716         (tvariables): Change to std::vector.
9717         (create_trace_state_variable): Adjust to std::vector.
9718         (find_trace_state_variable): Likewise.
9719         (find_trace_state_variable_by_number): Likewise.
9720         (delete_trace_state_variable): Likewise.
9721         (trace_variable_command): Adjust to std::string.
9722         (delete_trace_variable_command): Likewise.
9723         (tvariables_info_1): Adjust to std::vector.
9724         (save_trace_state_variables): Likewise.
9725         (start_tracing): Likewise.
9726         (merge_uploaded_trace_state_variables): Adjust to std::vector
9727         and std::string.
9728         * target.h (struct target_ops)
9729         <to_download_trace_state_variable>: Pass reference to
9730         trace_state_variable.
9731         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9732         * target-delegates.c: Re-generate.
9733         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9734         (mi_tsv_deleted): Likewise.
9735         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9736         * remote.c (remote_download_trace_state_variable): Change
9737         pointer to reference and adjust.
9738         * make-target-delegates (parse_argtypes): Handle references.
9739         (write_function_header): Likewise.
9740         (munge_type): Likewise.
9741
9742 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9743
9744         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9745         string_view-selftests.c.
9746         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9747         testsuite.
9748         * unittests/basic_string_view/cons/char/1.cc: Likewise.
9749         * unittests/basic_string_view/cons/char/2.cc: Likewise.
9750         * unittests/basic_string_view/cons/char/3.cc: Likewise.
9751         * unittests/basic_string_view/element_access/char/1.cc:
9752         Likewise.
9753         * unittests/basic_string_view/element_access/char/empty.cc:
9754         Likewise.
9755         * unittests/basic_string_view/element_access/char/front_back.cc:
9756         Likewise.
9757         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9758         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9759         Likewise.
9760         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9761         Likewise.
9762         * unittests/basic_string_view/modifiers/swap/char/1.cc:
9763         Likewise.
9764         * unittests/basic_string_view/operations/compare/char/1.cc:
9765         Likewise.
9766         * unittests/basic_string_view/operations/compare/char/13650.cc:
9767         Likewise.
9768         * unittests/basic_string_view/operations/copy/char/1.cc:
9769         Likewise.
9770         * unittests/basic_string_view/operations/data/char/1.cc:
9771         Likewise.
9772         * unittests/basic_string_view/operations/find/char/1.cc:
9773         Likewise.
9774         * unittests/basic_string_view/operations/find/char/2.cc:
9775         Likewise.
9776         * unittests/basic_string_view/operations/find/char/3.cc:
9777         Likewise.
9778         * unittests/basic_string_view/operations/find/char/4.cc:
9779         Likewise.
9780         * unittests/basic_string_view/operations/rfind/char/1.cc:
9781         Likewise.
9782         * unittests/basic_string_view/operations/rfind/char/2.cc:
9783         Likewise.
9784         * unittests/basic_string_view/operations/rfind/char/3.cc:
9785         Likewise.
9786         * unittests/basic_string_view/operations/substr/char/1.cc:
9787         Likewise.
9788         * unittests/basic_string_view/operators/char/2.cc: Likewise.
9789         * unittests/string_view-selftests.c: New file.
9790
9791 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9792
9793         * unittests/basic_string_view/capacity/1.cc: New file.
9794         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9795         * unittests/basic_string_view/cons/char/1.cc: New file.
9796         * unittests/basic_string_view/cons/char/2.cc: New file.
9797         * unittests/basic_string_view/cons/char/3.cc: New file.
9798         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9799         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9800         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9801         * unittests/basic_string_view/element_access/char/1.cc: New file.
9802         * unittests/basic_string_view/element_access/char/2.cc: New file.
9803         * unittests/basic_string_view/element_access/char/empty.cc: New file.
9804         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9805         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9806         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9807         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9808         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9809         * unittests/basic_string_view/include.cc: New file.
9810         * unittests/basic_string_view/inserters/char/1.cc: New file.
9811         * unittests/basic_string_view/inserters/char/2.cc: New file.
9812         * unittests/basic_string_view/inserters/char/3.cc: New file.
9813         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9814         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9815         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9816         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9817         * unittests/basic_string_view/literals/types.cc: New file.
9818         * unittests/basic_string_view/literals/values.cc: New file.
9819         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9820         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9821         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9822         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9823         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9824         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9825         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9826         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9827         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9828         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9829         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9830         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9831         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9832         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9833         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9834         * unittests/basic_string_view/operations/data/char/1.cc: New file.
9835         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9836         * unittests/basic_string_view/operations/find/char/1.cc: New file.
9837         * unittests/basic_string_view/operations/find/char/2.cc: New file.
9838         * unittests/basic_string_view/operations/find/char/3.cc: New file.
9839         * unittests/basic_string_view/operations/find/char/4.cc: New file.
9840         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9841         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9842         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9843         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9844         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9845         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9846         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9847         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9848         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9849         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9850         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9851         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9852         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9853         * unittests/basic_string_view/operators/char/2.cc: New file.
9854         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9855         * unittests/basic_string_view/range_access/char/1.cc: New file.
9856         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9857         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9858         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9859         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9860         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9861         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9862         * unittests/basic_string_view/requirements/typedefs.cc: New file.
9863         * unittests/basic_string_view/typedefs.cc: New file.
9864         * unittests/basic_string_view/types/1.cc: New file.
9865
9866 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9867
9868         * common/gdb_string_view.h: Remove libstdc++ implementation
9869         details, adjust to gdb reality.
9870         * common/gdb_string_view.tcc: Likewise.
9871         * cli/cli-script.c (struct string_view): Remove.
9872         (user_args) <m_args>: Change element type to gdb::string_view.
9873         (user_args::insert_args): Adjust.
9874
9875 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9876
9877         * common/gdb_string_view.h: New file.
9878         * common/gdb_string_view.tcc: New file.
9879
9880 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9881
9882         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9883         * configure: Re-generate.
9884
9885 2018-04-09  Pedro Alves  <palves@redhat.com>
9886
9887         * gdbarch.sh: Include "observable.h" instead of "observer.h".
9888         (set_target_gdbarch): Call
9889         gdb::observers::architecture_changed.notify instead of
9890         observer_notify_architecture_changed.
9891
9892 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9893
9894         * tracepoint.c (struct current_traceframe_cleanup): Remove.
9895         (do_restore_current_traceframe_cleanup): Remove.
9896         (restore_current_traceframe_cleanup_dtor): Remove.
9897         (make_cleanup_restore_current_traceframe): Remove.
9898         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9899         New.
9900         * tracepoint.h (struct scoped_restore_current_traceframe): New.
9901         * infrun.c (fetch_inferior_event): Use
9902         scoped_restore_current_traceframe.
9903
9904 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9905
9906         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9907         Remove.
9908         <n_allocated_type_units>: Remove.
9909         <all_type_units>: Change to std::vector.
9910         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9911         to std::vector change.
9912         (dwarf2_per_objfile::get_cutu): Likewise.
9913         (dwarf2_per_objfile::get_tu): Likewise.
9914         (create_signatured_type_table_from_index): Likewise.
9915         (create_signatured_type_table_from_debug_names): Likewise.
9916         (dw2_symtab_iter_next): Likewise.
9917         (dw2_print_stats): Likewise.
9918         (dw2_expand_all_symtabs): Likewise.
9919         (dw2_expand_marked_cus): Likewise.
9920         (dw2_debug_names_iterator::next): Likewise.
9921         (dwarf2_initialize_objfile): Likewise.
9922         (add_signatured_type_cu_to_table): Likewise.
9923         (create_all_type_units): Likewise.
9924         (add_type_unit): Likewise.
9925         (struct tu_abbrev_offset): Add constructor.
9926         (build_type_psymtabs_1): Adjust to std::vector change.
9927         (print_tu_stats): Likewise.
9928         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9929         (write_debug_names): Likewise.
9930
9931 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9932
9933         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9934         Make an std::vector.
9935         <n_comp_units>: Remove.
9936         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9937         to std::vector change.
9938         (dwarf2_per_objfile::get_cutu): Likewise.
9939         (dwarf2_per_objfile::get_cu): Likewise.
9940         (create_cus_from_index): Likewise.
9941         (create_addrmap_from_index): Likewise.
9942         (create_addrmap_from_aranges): Likewise.
9943         (dwarf2_read_index): Likewise.
9944         (dw2_find_last_source_symtab): Likewise.
9945         (dw2_map_symtabs_matching_filename): Likewise.
9946         (dw2_symtab_iter_next): Likewise.
9947         (dw2_print_stats): Likewise.
9948         (dw2_expand_all_symtabs): Likewise.
9949         (dw2_expand_symtabs_with_fullname): Likewise.
9950         (dw2_expand_marked_cus): Likewise.
9951         (dw2_map_symbol_filenames): Likewise.
9952         (create_cus_from_debug_names): Likewise.
9953         (dwarf2_read_debug_names): Likewise.
9954         (dw2_debug_names_iterator::next): Likewise.
9955         (dwarf2_initialize_objfile): Likewise.
9956         (set_partial_user): Likewise.
9957         (dwarf2_build_psymtabs_hard): Likewise.
9958         (read_comp_units_from_section): Remove arguments, adjust to
9959         std::vector change.
9960         (create_all_comp_units): Adjust to std::vector and
9961         read_comp_units_from_section changes.
9962         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9963         change.
9964         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9965         (psyms_seen_size): Likewise.
9966         (write_gdbindex): Likewise.
9967         (write_debug_names): Likewise.
9968
9969 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9970
9971         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9972         with dwarf2_per_objfile.
9973         (create_cus_from_index): Likewise.
9974         (create_signatured_type_table_from_index): Likewise.
9975         (dwarf2_read_index): Likewise.
9976         (dwarf2_initialize_objfile): Likewise.
9977         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9978         per_cu rather than get_dwarf2_per_objfile.
9979
9980 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9981
9982         * dwarf2read.h (struct signatured_type): Forward declare.
9983         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9984         New methods.
9985         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9986         (dw2_get_cutu): ...this.
9987         (dwarf2_per_objfile::get_cu): Rename from...
9988         (dw2_get_cu): ...this.
9989         (dwarf2_per_objfile::get_tu): New.
9990         (create_addrmap_from_index): Adjust.
9991         (create_addrmap_from_aranges): Adjust.
9992         (dw2_find_last_source_symtab): Adjust.
9993         (dw2_map_symtabs_matching_filename): Adjust.
9994         (dw2_symtab_iter_next): Adjust.
9995         (dw2_print_stats): Adjust.
9996         (dw2_expand_all_symtabs): Adjust.
9997         (dw2_expand_symtabs_with_fullname): Adjust.
9998         (dw2_expand_marked_cus): Adjust.
9999         (dw_expand_symtabs_matching_file_matcher): Adjust.
10000         (dw2_map_symbol_filenames): Adjust.
10001         (dw2_debug_names_iterator::next): Adjust.
10002         (dwarf2_initialize_objfile): Adjust.
10003         (set_partial_user): Adjust.
10004         (dwarf2_build_psymtabs_hard): Adjust.
10005
10006 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10007
10008         * dwarf2read.c (create_signatured_type_table_from_debug_names):
10009         Remove unused variables.
10010         (dw2_map_symtabs_matching_filename): Likewise.
10011         (dwarf2_record_block_ranges): Likewise.
10012         (dwarf2_read_addr_index): Likewise.
10013         (follow_die_offset): Likewise.
10014
10015 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10016
10017         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10018         to symbol_file_add_main.
10019
10020 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10021
10022         PR mi/22299
10023         * mi/mi-console.c (do_fputc_async_safe): New.
10024         (mi_console_file::write_async_safe): New.
10025         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10026         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10027         New.
10028         * ui-file.c (ui_file::putstrn): Adjust call to
10029         fputstrn_unfiltered.
10030         * utils.c (printchar): Replace do_fputs and do_fprintf
10031         parameters by do_fputc.
10032         (fputstr_filtered): Adjust call to printchar.
10033         (fputstr_unfiltered): Likewise.
10034         (fputstrn_filtered): Likewise.
10035         (fputstrn_unfiltered): Add do_fputc parameter, pass to
10036         printchar.
10037         * utils.h (do_fputc_ftype): New typedef.
10038         (fputstrn_unfiltered): Add do_fputc parameter.
10039
10040 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10041
10042         * regformats/i386/i386-avx.dat: Remove.
10043
10044 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10045
10046         PR gdb/22979
10047         * amd64-tdep.c (amd64_none_init_abi): New function.
10048         (amd64_x32_none_init_abi): New function.
10049         (_initialize_amd64_tdep): Register handlers for x86-64 and
10050         x64_32 with GDB_OSABI_NONE.
10051         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10052         GDB_OSABI_NONE osabi.
10053
10054 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10055
10056         PR gdb/22980
10057         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10058         GDB_OSABI_NONE.
10059         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10060         * osabi.c (gdb_osabi_names): Add "unknown" entry.
10061
10062 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10063
10064         * common/byte-vector.h (char_vector): New type.
10065         * target.h (target_read_alloc): Return
10066         gdb::optional<byte_vector>.
10067         (target_read_stralloc): Return gdb::optional<char_vector>.
10068         (target_get_osdata): Return gdb::optional<char_vector>.
10069         * target.c (target_read_alloc_1): Templatize.  Replacement
10070         manual memory management with vector.
10071         (target_read_alloc): Change return type, adjust.
10072         (target_read_stralloc): Change return type, adjust.
10073         (target_get_osdata): Change return type, adjust.
10074         * auxv.c (struct auxv_info) <length>: Remove.
10075         <data>: Change type to gdb::optional<byte_vector>.
10076         (auxv_inferior_data_cleanup): Free auxv_info with delete.
10077         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10078         (target_auxv_search): Adjust.
10079         (fprint_target_auxv): Adjust.
10080         * avr-tdep.c (avr_io_reg_read_command): Adjust.
10081         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10082         (linux_make_corefile_notes): Adjust.
10083         * osdata.c (get_osdata): Adjust.
10084         * remote.c (remote_get_threads_with_qxfer): Adjust.
10085         (remote_memory_map): Adjust.
10086         (remote_traceframe_info): Adjust.
10087         (btrace_read_config): Adjust.
10088         (remote_read_btrace): Adjust.
10089         (remote_pid_to_exec_file): Adjust.
10090         * solib-aix.c (solib_aix_get_library_list): Adjust.
10091         * solib-dsbt.c (decode_loadmap): Don't free buf.
10092         (dsbt_get_initial_loadmaps): Adjust.
10093         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10094         * solib-target.c (solib_target_current_sos): Adjust.
10095         * tracepoint.c (sdata_make_value): Adjust.
10096         * xml-support.c (xinclude_start_include): Adjust.
10097         (xml_fetch_content_from_file): Adjust.
10098         * xml-support.h (xml_fetch_another): Change return type.
10099         (xml_fetch_content_from_file): Change return type.
10100         * xml-syscall.c (xml_init_syscalls_info): Adjust.
10101         * xml-tdesc.c (file_read_description_xml): Adjust.
10102         (fetch_available_features_from_target): Change return type.
10103         (target_fetch_description_xml): Adjust.
10104         (target_read_description_xml): Adjust.
10105
10106 2018-04-06  Tom Tromey  <tom@tromey.com>
10107
10108         * value.c (~value): Update.
10109         (struct value) <contents>: Now unique_xmalloc_ptr.
10110         (value_contents_bits_eq, allocate_value_contents)
10111         (value_contents_raw, value_contents_all_raw)
10112         (value_contents_for_printing, value_contents_for_printing_const)
10113         (set_value_enclosing_type): Update.
10114
10115 2018-04-06  Tom Tromey  <tom@tromey.com>
10116
10117         * value.c (range_s): Remove typedef, VEC.
10118         (struct range): Add operator<.
10119         (range_lessthan): Remove.
10120         (ranges_contain): Change type.
10121         (~value): Update.
10122         (struct value) <unavailable, optimized_out>: Now std::vector.
10123         (value_entirely_available)
10124         (value_entirely_covered_by_range_vector)
10125         (value_entirely_unavailable, value_entirely_optimized_out):
10126         Update.
10127         (insert_into_bit_range_vector): Change argument type.
10128         (find_first_range_overlap): Likewise.
10129         (struct ranges_and_idx, value_contents_bits_eq)
10130         (require_not_optimized_out, require_available): Update.
10131         (ranges_copy_adjusted): Change argument types.
10132         (value_optimized_out, value_copy, value_fetch_lazy): Update.
10133
10134 2018-04-06  Tom Tromey  <tom@tromey.com>
10135
10136         * value.c (~value): Update.
10137         (struct value) <parent>: Now a value_ref_ptr.
10138         (value_parent, set_value_parent, value_address, value_copy):
10139         Update.
10140
10141 2018-04-06  Tom Tromey  <tom@tromey.com>
10142
10143         * value.c (struct value): Add constructor, destructor, and member
10144         initializers.
10145         (allocate_value_lazy, value_decref): Update.
10146
10147 2018-04-06  Tom Tromey  <tom@tromey.com>
10148
10149         * value.c (struct value) <released, next>: Remove.
10150         (all_values): Now a std::vector.
10151         (allocate_value_lazy): Update.
10152         (value_next): Remove.
10153         (value_mark, value_free_to_mark, release_value)
10154         (value_release_to_mark): Update.
10155
10156 2018-04-06  Tom Tromey  <tom@tromey.com>
10157
10158         * value.h (fetch_subexp_value, value_release_to_mark): Update.
10159         (free_value_chain): Remove.
10160         * value.c (free_value_chain): Remove.
10161         (value_release_to_mark): Return a std::vector.
10162         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10163         std::vector.
10164         (check_condition): Update.
10165         * eval.c (fetch_subexp_value): Change "val_chain" to a
10166         std::vector.
10167         * breakpoint.c (update_watchpoint): Update.
10168         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10169
10170 2018-04-06  Tom Tromey  <tom@tromey.com>
10171
10172         * value.h (free_all_values): Remove.
10173         * value.c (free_all_values): Remove.
10174
10175 2018-04-06  Tom Tromey  <tom@tromey.com>
10176
10177         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10178         (value_history_chain, value_history_count): Remove.
10179         (value_history): New global.
10180         (record_latest_value, access_value_history, show_values)
10181         (preserve_values): Update.
10182
10183 2018-04-06  Tom Tromey  <tom@tromey.com>
10184
10185         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10186         * varobj.c (varobj_set_display_format, varobj_set_value)
10187         (install_default_visualizer, construct_visualizer)
10188         (install_new_value, ~varobj, varobj_get_value_type)
10189         (my_value_of_variable, varobj_editable_p): Update.
10190         * c-varobj.c (c_describe_child, c_value_of_variable)
10191         (cplus_number_of_children, cplus_describe_child): Update.
10192         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10193         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10194         (ada_value_of_variable, ada_value_is_changeable_p): Update.
10195
10196 2018-04-06  Tom Tromey  <tom@tromey.com>
10197
10198         * printcmd.c (last_examine_address): Change type to
10199         value_ref_ptr.
10200         (do_examine, x_command): Update.
10201
10202 2018-04-06  Tom Tromey  <tom@tromey.com>
10203
10204         * value.c (release_value): Update.
10205         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10206         (struct bpstats) <val>: Now a value_ref_ptr.
10207         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10208         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10209         (~watchpoint, print_it_watchpoint, watch_command_1)
10210         (invalidate_bp_value_on_memory_change): Update.
10211
10212 2018-04-06  Tom Tromey  <tom@tromey.com>
10213
10214         * varobj.c (varobj_clear_saved_item)
10215         (update_dynamic_varobj_children, install_new_value, ~varobj):
10216         Update.
10217         * value.h (value_incref): Move declaration earlier.
10218         (value_decref): Rename from value_free.
10219         (struct value_ref_policy): New.
10220         (value_ref_ptr): New typedef.
10221         (struct value_deleter): Remove.
10222         (gdb_value_up): Remove typedef.
10223         (release_value): Change return type.
10224         (release_value_or_incref): Remove.
10225         * value.c (set_value_parent): Update.
10226         (value_incref): Change return type.
10227         (value_decref): Rename from value_free.
10228         (value_free_to_mark, free_all_values, free_value_chain): Update.
10229         (release_value): Return value_ref_ptr.
10230         (release_value_or_incref): Remove.
10231         (record_latest_value, set_internalvar, clear_internalvar):
10232         Update.
10233         * stack.c (info_frame_command): Don't call value_free.
10234         * python/py-value.c (valpy_dealloc, valpy_new)
10235         (value_to_value_object): Update.
10236         * printcmd.c (do_examine): Update.
10237         * opencl-lang.c (lval_func_free_closure): Update.
10238         * mi/mi-main.c (register_changed_p): Don't call value_free.
10239         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10240         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10241         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10242         value_free.
10243         * guile/scm-value.c (vlscm_free_value_smob)
10244         (vlscm_scm_from_value): Update.
10245         * frame.c (frame_register_unwind, frame_unwind_register_signed)
10246         (frame_unwind_register_unsigned, get_frame_register_bytes)
10247         (put_frame_register_bytes): Don't call value_free.
10248         * findvar.c (address_from_register): Don't call value_free.
10249         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10250         * dwarf2loc.c (entry_data_value_free_closure)
10251         (value_of_dwarf_reg_entry, free_pieced_value_closure)
10252         (dwarf2_evaluate_loc_desc_full): Update.
10253         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10254         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10255         (~watchpoint, watch_command_1)
10256         (invalidate_bp_value_on_memory_change): Update.
10257         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10258
10259 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
10260
10261         PR gdb/23022
10262         * warning.m4: Add -Wno-error=deprecated-register.
10263         * configure: Re-generate.
10264
10265 2018-04-05  Tom Tromey  <tom@tromey.com>
10266
10267         * linespec.h: Remove include of "vec.h".
10268
10269 2018-04-05  Tom Tromey  <tom@tromey.com>
10270
10271         * linespec.c (typep): Remove typedef.
10272         (find_methods, find_superclass_methods): Take a std::vector.
10273         (find_method): Use std::vector.
10274
10275 2018-04-05  Tom Tromey  <tom@tromey.com>
10276
10277         * utils.c (compare_strings): Remove.
10278         * utils.h (compare_strings): Remove.
10279         * objc-lang.h (find_imps): Update.
10280         * objc-lang.c (find_methods): Take a std::vector.
10281         (uniquify_strings, find_imps): Likewise.
10282         * linespec.c (find_methods): Take a std::vector.
10283         (decode_objc): Use std::vector.
10284         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10285         a std::vector.
10286         (find_method, find_function_symbols): Use std::vector.
10287
10288 2018-04-05  Tom Tromey  <tom@tromey.com>
10289
10290         * completer.c (completion_tracker::completion_tracker): Remove
10291         cast.
10292         (completion_tracker::discard_completions): Likewise.
10293         * breakpoint.c (ambiguous_names_p): Remove cast.
10294         * ada-lang.c (_initialize_ada_language): Remove cast.
10295         * utils.h (streq): Update.
10296         (streq_hash): Add new declaration.
10297         * utils.c (streq): Return bool.
10298         (streq_hash): New function.
10299
10300 2018-04-05  Tom Tromey  <tom@tromey.com>
10301
10302         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10303         Remove a string copy.
10304
10305 2018-04-05  Tom Tromey  <tom@tromey.com>
10306
10307         * linespec.c (filter_results): Use std::vector.
10308         (decode_line_2, decode_line_full): Update.
10309
10310 2018-04-05  Tom Tromey  <tom@tromey.com>
10311
10312         * linespec.c (canonical_to_fullform): Return std::string.
10313         (filter_results): Update.
10314         (struct decode_line_2_item): Add constructor.
10315         <fullform, displayform>: Now std::string.
10316         (decode_line_2_compare_items): Now a std::sort comparator.
10317         (decode_line_2): Update.
10318
10319 2018-04-05  Tom Tromey  <tom@tromey.com>
10320
10321         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10322         (unexpected_linespec_error): Update.
10323         (linespec_parse_basic, parse_linespec): Update.
10324
10325 2018-04-05  Tom Tromey  <tom@tromey.com>
10326
10327         * linespec.c (linespec_parse_basic): Reindent.
10328
10329 2018-04-05  Tom Tromey  <tom@tromey.com>
10330
10331         * minsyms.h (iterate_over_minimal_symbols): Update.
10332         * minsyms.c (iterate_over_minimal_symbols): Take a
10333         gdb::function_view.
10334         * linespec.c (struct collect_minsyms): Remove.
10335         (compare_msyms): Now a std::sort comparator.
10336         (add_minsym): Add parameters.
10337         (search_minsyms_for_name): Update.  Use std::vector.
10338
10339 2018-04-03  Tom Tromey  <tom@tromey.com>
10340
10341         * mipsread.c (read_alphacoff_dynamic_symtab): Use
10342         gdb::byte_vector.
10343
10344 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10345
10346         * MAINTAINERS (Write After Approval): Add Weimin Pan.
10347
10348 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10349
10350         PR gdb/16959
10351         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
10352         printing static type.
10353
10354 2018-04-01  Tom Tromey  <tom@tromey.com>
10355
10356         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10357         (rs6000_xfer_shared_libraries): Update.
10358
10359 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
10360
10361         * common/gdb_vecs.h (char_ptr): Remove.
10362         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10363
10364 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10365
10366         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10367         with std::vector.
10368         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10369
10370 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10371
10372         * tracepoint.h (struct uploaded_tp): Initialize fields.
10373         <actions, step_actions, cmd_strings>: Change type to
10374         std::vector<char *>.
10375         * tracepoint.c (get_uploaded_tp): Allocate with new.
10376         (free_uploaded_tps): Free with delete.
10377         (parse_tracepoint_definition): Adjust to std::vector change.
10378         * breakpoint.c (read_uploaded_action): Likewise.
10379         (create_tracepoint_from_upload): Likewise.
10380         * ctf.c (ctf_write_uploaded_tp): Likewise.
10381         (SET_ARRAY_FIELD): Likewise.
10382         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10383
10384 2018-03-30  Tom Tromey  <tom@tromey.com>
10385
10386         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
10387         std::unique_ptr.
10388         (svr4_keep_data_in_core): Update.
10389         (svr4_read_so_list): Update.
10390
10391 2018-03-30  Tom Tromey  <tom@tromey.com>
10392
10393         * windows-nat.c (handle_output_debug_string, handle_exception):
10394         Update.
10395         * target.h (target_read_string): Update.
10396         * target.c (target_read_string): Change "string" to
10397         unique_xmalloc_ptr.
10398         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10399         Update.
10400         * solib-frv.c (frv_current_sos): Update.
10401         * solib-dsbt.c (dsbt_current_sos): Update.
10402         * solib-darwin.c (darwin_current_sos): Update.
10403         * linux-thread-db.c (inferior_has_bug): Update.
10404         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10405         Update.  Remove alloca.
10406         * ada-lang.c (ada_main_name): Update.
10407
10408 2018-03-30  Tom Tromey  <tom@tromey.com>
10409
10410         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10411         (struct dwo_file_deleter): New.
10412         (dwo_file_up): New typedef.
10413         (open_and_init_dwo_file): Use dwo_file_up.
10414         (free_dwo_file_cleanup): Remove.
10415
10416 2018-03-30  Tom Tromey  <tom@tromey.com>
10417
10418         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10419         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10420
10421 2018-03-30  Tom Tromey  <tom@tromey.com>
10422
10423         * dwarf2read.c (class free_cached_comp_units): New class.
10424         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10425         (free_cached_comp_units): Remove function.
10426
10427 2018-03-30  Tom Tromey  <tom@tromey.com>
10428
10429         * utils.h (make_cleanup_unpush_target): Remove.
10430         * inf-ptrace.c (struct target_unpusher): New.
10431         (target_unpush_up) New typedef.
10432         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10433         target_unpush_up.
10434         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10435
10436 2018-03-27  Tom Tromey  <tom@tromey.com>
10437
10438         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10439
10440 2018-03-27  Pedro Alves  <palves@redhat.com>
10441             Tom Tromey  <tom@tromey.com>
10442
10443         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10444         destructor.  Now a class.
10445         (gdb_readline_wrapper_cleanup): Remove function.
10446         (gdb_readline_wrapper): Remove cleanups.
10447
10448 2018-03-27  Tom Tromey  <tom@tromey.com>
10449
10450         * typeprint.h (struct type_print_options) <local_typedefs,
10451         global_typedefs>: Remove "struct" keyword.
10452         (class typedef_hash_table): New class.
10453         (recursively_update_typedef_hash, add_template_parameters)
10454         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10455         (find_typedef_in_hash): Don't declare.
10456         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10457         (typedef_hash_table::recursively_update): Rename from
10458         recursively_update_typedef_hash.  Now a member.
10459         (typedef_hash_table::add_template_parameters): Rename from
10460         add_template_parameters.  Now a member.
10461         (typedef_hash_table::typedef_hash_table): Now a constructor;
10462         rename from create_typedef_hash.
10463         (typedef_hash_table::~typedef_hash_table): Now a destructor;
10464         rename from free_typedef_hash.
10465         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10466         (do_free_global_table): Remove.
10467         (typedef_hash_table::typedef_hash_table): New constructor; renamed
10468         from copy_type_recursive.
10469         (create_global_typedef_table): Remove.
10470         (typedef_hash_table::find_global_typedef): Now a member of
10471         typedef_hash_table.
10472         (typedef_hash_table::find_typedef): Rename from
10473         find_typedef_in_hash; now a member.
10474         (whatis_exp): Update.
10475         * extension.h (struct ext_lang_type_printers): Add constructor and
10476         destructor.
10477         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10478         declare.
10479         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10480         Now a constructor; rename from start_ext_lang_type_printers.
10481         (ext_lang_type_printers): Now a destructor; rename from
10482         free_ext_lang_type_printers.
10483         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10484         Update.
10485         (c_type_print_base_struct_union): Update.  Remove cleanups.
10486
10487 2018-03-27  Tom Tromey  <tom@tromey.com>
10488
10489         * dwarf-index-write.c: Include <cmath>.
10490
10491 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10492
10493         * NEWS: Add entry describing new "set|show varsize-limit" command.
10494         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10495         command.
10496         * printcmd.c (_initialize_printcmd): Add "set var" alias of
10497         "set variable".
10498
10499 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
10500
10501         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10502         dwarf-index-write.c
10503         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10504         * dwarf-index-common.c: New file.
10505         * dwarf-index-common.h: New file.
10506         * dwarf-index-write.c: New file.
10507         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10508         (struct dwarf2_section_info): Move from here.
10509         (dwarf2_section_info_def): Likewise.
10510         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10511         (offset_type): Likewise.
10512         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10513         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10514         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10515         (byte_swap): Likewise.
10516         (MAYBE_SWAP): Likewise.
10517         (dwarf2_per_cu_ptr): Likewise.
10518         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10519         (struct tu_stats): Likewise.
10520         (struct dwarf2_per_objfile): Likewise.
10521         (struct dwarf2_per_cu_data): Likewise.
10522         (struct signatured_type): Likewise.
10523         (sig_type_ptr): Likewise.
10524         (DEF_VEC_P (sig_type_ptr)): Likewise.
10525         (INDEX4_SUFFIX): Likewise.
10526         (INDEX5_SUFFIX): Likewise.
10527         (DEBUG_STR_SUFFIX): Likewise.
10528         (dwarf2_read_section): Make non-static.
10529         (mapped_index_string_hash): Move from here.
10530         (dwarf5_djb_hash): Likewise.
10531         (file_write): Likewise.
10532         (class data_buf): Likewise.
10533         (struct symtab_index_entry): Likewise.
10534         (struct mapped_symtab): Likewise.
10535         (find_slot): Likewise.
10536         (hash_expand): Likewise.
10537         (add_index_entry): Likewise.
10538         (uniquify_cu_indices): Likewise.
10539         (class c_str_view): Likewise.
10540         (class c_str_view_hasher): Likewise.
10541         (class vector_hasher): Likewise.
10542         (write_hash_table): Likewise.
10543         (psym_index_map): Likewise.
10544         (struct addrmap_index_data): Likewise.
10545         (add_address_entry): Likewise.
10546         (add_address_entry_worker): Likewise.
10547         (write_address_map): Likewise.
10548         (symbol_kind): Likewise.
10549         (write_psymbols): Likewise.
10550         (struct signatured_type_index_data): Likewise.
10551         (write_one_signatured_type): Likewise.
10552         (recursively_count_psymbols): Likewise.
10553         (recursively_write_psymbols): Likewise.
10554         (class debug_names): Likewise.
10555         (check_dwarf64_offsets): Likewise.
10556         (psyms_seen_size): Likewise.
10557         (write_gdbindex): Likewise.
10558         (write_debug_names): Likewise.
10559         (assert_file_size): Likewise.
10560         (write_psymtabs_to_index): Likewise.
10561         (save_gdb_index_command): Likewise.
10562         (_initialize_dwarf2_read): Don't register the "save gdb-index"
10563         command.
10564         * dwarf2read.h: New file.
10565
10566 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10567
10568         PR gdb/22670
10569         * dwarf2read.c (dwarf2_physname): Do not return the demangled
10570         symbol name if the CU's language stores symbol names in linkage
10571         format.
10572         * language.h (struct language_defn)
10573         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
10574         all instances of this struct.
10575
10576 2018-03-26  Tom Tromey  <tom@tromey.com>
10577
10578         * stack.c (backtrace_command_1): Remove verbose code.
10579
10580 2018-03-26  Tom Tromey  <tom@tromey.com>
10581
10582         * python/py-framefilter.c (py_print_type): Don't catch
10583         exceptions.  Return void.
10584         (py_print_value): Likewise.
10585         (py_print_single_arg): Likewise.
10586         (enumerate_args): Don't catch exceptions.
10587         (py_print_args): Likewise.
10588         (py_print_frame): Likewise.
10589         (gdbpy_apply_frame_filter): Catch exceptions here.
10590
10591 2018-03-26  Tom Tromey  <tom@tromey.com>
10592
10593         * stack.c (_initialize_stack): Remove trailing newlines from help
10594         text.  Add "Usage" line to "backtrace" help.
10595
10596 2018-03-26  Tom Tromey  <tom@tromey.com>
10597
10598         PR python/16486:
10599         * python/py-framefilter.c (py_print_args): Call wrap_hint.
10600
10601 2018-03-26  Tom Tromey  <tom@tromey.com>
10602
10603         * python/py-framefilter.c (py_print_single_arg): Return
10604         EXT_LANG_BT_ERROR from catch.
10605
10606 2018-03-26  Tom Tromey  <tom@tromey.com>
10607
10608         PR backtrace/15584:
10609         * stack.c (backtrace_command_1): Move some code into no-filters
10610         "if".
10611
10612 2018-03-26  Tom Tromey  <tom@tromey.com>
10613
10614         * python/py-framefilter.c (throw_quit_or_print_exception): New
10615         function.
10616         (gdbpy_apply_frame_filter): Use it.
10617
10618 2018-03-26  Tom Tromey  <tom@tromey.com>
10619
10620         PR cli/17716:
10621         * python/py-framefilter.c (py_print_type, py_print_value)
10622         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10623         RETURN_MASK_ERROR.
10624
10625 2018-03-26  Tom Tromey  <tom@tromey.com>
10626
10627         * python/py-framefilter.c (enumerate_args): Use
10628         gdb::unique_xmalloc_ptr.
10629
10630 2018-03-26  Tom Tromey  <tom@tromey.com>
10631
10632         * python/py-framefilter.c (py_print_frame): Return
10633         EXT_LANG_BT_OK.
10634         (gdbpy_apply_frame_filter): Update comment.
10635         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10636         Remove.
10637         <EXT_LANG_BT_NO_FILTERS>: Change value.
10638
10639 2018-03-26  Tom Tromey  <tom@tromey.com>
10640
10641         PR backtrace/15582:
10642         * stack.c (backtrace_command): Parse "hide" argument.
10643         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10644         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10645         constant.
10646
10647 2018-03-26  Tom Tromey  <tom@tromey.com>
10648
10649         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10650         add "flags".
10651         (backtrace_command): Remove "fulltrace", add "flags".
10652
10653 2018-03-26  Tom Tromey  <tom@tromey.com>
10654
10655         * stack.c (backtrace_command): Rewrite command line parsing.
10656
10657 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10658
10659         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10660
10661 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10662
10663         * filename-seen-cache.h: Add include guard.
10664
10665 2018-03-26  Keith Seitz  <keiths@redhat.com>
10666
10667         * symfile.c (place_section): Remove "struct" from section_addr_info
10668         in comment.
10669         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10670         "struct" keyword from section_addr_info.
10671
10672 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
10673
10674         * regformats/regdef.h (reg): Add constructors.
10675
10676 2018-03-25  Pedro Alves  <palves@redhat.com>
10677
10678         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10679         if then/else bodies in var_func_name extraction.
10680
10681 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
10682
10683         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10684         lookup_minimal_symbol() to find symbol entry.
10685         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10686
10687 2018-03-23  Keith Seitz  <keiths@redhat.com>
10688
10689         PR c++/22968
10690         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10691         nested type definitions for C++, too.
10692
10693 2018-03-23  Tom Tromey  <tom@tromey.com>
10694
10695         * machoread.c (struct oso_el): Add a constructor.  Don't define as
10696         a typedef.
10697         (macho_register_oso): Remove.
10698         (macho_symtab_read): Take a std::vector.
10699         (oso_el_compare_name): Now a std::sort comparator.
10700         (macho_symfile_read_all_oso): Take a std::vector.
10701         (macho_symfile_read): Use std::vector.  Remove cleanups.
10702
10703 2018-03-22  Tom Tromey  <tom@tromey.com>
10704
10705         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10706         (record_full_goto_bookmark): Use std::string.
10707
10708 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10709
10710         PR tdep/18295
10711         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10712         a single mask.
10713
10714 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10715
10716         * rs6000-tdep.c (store_insn_p): New function.
10717         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10718         and cr_reg to their unshifted values. Use store_insn_p to
10719         match LR saves using either R1 or fdata->alloca_reg. Use
10720         store_insn_p to match CR saves. Set alloca_reg_offset
10721         when alloca_reg and framep are set. Remove lr_reg shift
10722         when assigning to fdata->lr_register.
10723
10724 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10725
10726         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10727         command line args instead of emitting a warning.
10728
10729 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10730
10731         * tracepoint.h (struct static_tracepoint_marker): Initialize
10732         fields, define default constructor, move constructor and move
10733         assignment, disable the rest.
10734         <str_id, extra>: Make std::string.
10735         (release_static_tracepoint_marker): Remove.
10736         (free_current_marker): Remove.
10737         * tracepoint.c (free_current_marker): Remove.
10738         (parse_static_tracepoint_marker_definition): Adjust to
10739         std::string, use new hex2str overload.
10740         (release_static_tracepoint_marker): Remove.
10741         (print_one_static_tracepoint_marker): Get marker by reference
10742         and adjust to std::string.
10743         (info_static_tracepoint_markers_command): Adjust to std::vector
10744         changes
10745         * target.h (static_tracepoint_marker_p): Remove typedef.
10746         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10747         (struct target_ops) <to_static_tracepoint_marker_at>: Return
10748         bool.
10749         <to_static_tracepoint_markers_by_strid>: Return std::vector.
10750         * target-debug.h
10751         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10752         (target_debug_print_std_vector_static_tracepoint_marker): New.
10753         (target_debug_print_struct_static_tracepoint_marker_p): Rename
10754         to...
10755         (target_debug_print_static_tracepoint_marker_p): ... this.
10756         * target-delegates.c: Re-generate.
10757         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10758         Make std::string.
10759         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10760         (decode_static_tracepoint_spec): Adjust to std::vector.
10761         (tracepoint_print_one_detail): Adjust to std::string.
10762         (strace_marker_decode_location): Adjust to std::string.
10763         (update_static_tracepoint): Adjust to std::string, remove call
10764         to release_static_tracepoint_marker.
10765         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10766         Adjust to std::vector.
10767         * remote.c (remote_static_tracepoint_marker_at): Return bool.
10768         (remote_static_tracepoint_markers_by_strid): Adjust to
10769         std::vector.
10770         * common/rsp-low.h (hex2str): New overload with explicit count
10771         of bytes.
10772         * common/rsp-low.c (hex2str): New overload with explicit count
10773         of bytes.
10774         * unittests/rsp-low-selftests.c (test_hex2str): New function.
10775         (_initialize_rsp_low_selftests): Add test_hex2str test.
10776         * unittests/tracepoint-selftests.c
10777         (test_parse_static_tracepoint_marker_definition): Adjust to
10778         std::string.
10779
10780 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10781
10782         * tracepoint.c (parse_static_tracepoint_marker_definition):
10783         Consider case where the definition is followed by more
10784         definitions.
10785         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10786         tracepoint-selftests.c.
10787         * unittests/tracepoint-selftests.c: New.
10788
10789 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10790
10791         * MAINTAINERS (Write After Approval): Add Pedro Franco de
10792         Carvalho.
10793
10794 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10795
10796         * symtab.c (find_pc_sect_line): fixed indentation.
10797
10798 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10799
10800         * symtab.c (find_pc_sect_line): now uses binary search.
10801
10802 2018-03-19  Tom Tromey  <tom@tromey.com>
10803
10804         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10805         "IDENT" production.
10806
10807 2018-03-19  Pedro Alves  <palves@redhat.com>
10808             Tom Tromey  <tom@tromey.com>
10809
10810         * unittests/observable-selftests.c: New file.
10811         * common/observable.h: New file.
10812         * observable.h: New file.
10813         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10814         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10815         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10816         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10817         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10818         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10819         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10820         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10821         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10822         python/py-breakpoint.c, python/py-finishbreakpoint.c,
10823         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10824         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10825         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10826         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10827         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10828         tui/tui-interp.c, valops.c: Update all users.
10829         * tui/tui-hooks.c (tui_bp_created_observer)
10830         (tui_bp_deleted_observer, tui_bp_modified_observer)
10831         (tui_inferior_exit_observer, tui_before_prompt_observer)
10832         (tui_normal_stop_observer, tui_register_changed_observer):
10833         Remove.
10834         (tui_observers_token): New global.
10835         (attach_or_detach, tui_attach_detach_observers): New functions.
10836         (tui_install_hooks, tui_remove_hooks): Use
10837         tui_attach_detach_observers.
10838         * record-btrace.c (record_btrace_thread_observer): Remove.
10839         (record_btrace_thread_observer_token): New global.
10840         * observer.sh: Remove.
10841         * observer.c: Rename to observable.c.
10842         * observable.c (namespace gdb_observers): Define new objects.
10843         (observer_debug): Move into gdb_observers namespace.
10844         (struct observer, struct observer_list, xalloc_observer_list_node)
10845         (xfree_observer_list_node, generic_observer_attach)
10846         (generic_observer_detach, generic_observer_notify): Remove.
10847         (_initialize_observer): Update.
10848         Don't include observer.inc.
10849         * Makefile.in (generated_files): Remove observer.h, observer.inc.
10850         (clean mostlyclean): Likewise.
10851         (observer.h, observer.inc): Remove targets.
10852         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10853         (COMMON_SFILES): Use observable.c, not observer.c.
10854         * .gitignore: Remove observer.h.
10855
10856 2018-03-18  Tom Tromey  <tom@tromey.com>
10857
10858         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10859         gdb::def_vector.
10860         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10861
10862 2018-03-17  Tom Tromey  <tom@tromey.com>
10863
10864         * auto-load.c (auto_load_objfile_script_1): Use std::string.
10865
10866 2018-03-17  Tom Tromey  <tom@tromey.com>
10867
10868         * target.c (class scoped_target_fd): New.
10869         (target_fileio_close_cleanup): Remove.
10870         (target_fileio_read_alloc_1): Use scoped_target_fd.
10871
10872 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
10873
10874         * silent-rules.mk: New.
10875         * Makefile.in: Include silent-rules.mk
10876         (srcdir, VPATH, top_srcdir): Move up.
10877         (COMPILE): Add ECHO_CXX.
10878         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10879         (init.c): Add ECHO_INIT_C.
10880         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10881         (version.c): Add ECHO_GEN.
10882         (printcmd.o): Add ECHO_CXX.
10883         (target-float.o): Add ECHO_CXX.
10884         (ada-exp.o): Add ECHO_CXX.
10885         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10886         (insight$(EXEEXT)): Add ECHO_CXXLD.
10887         * gnulib/configure.ac: Add AM_SILENT_RULES.
10888         * gnulib/aclocal.m4: Re-generate.
10889         * gnulib/configure: Re-generate.
10890         * gnulib/import/Makefile.in: Re-generate.
10891
10892 2018-03-16  Tom Tromey  <tom@tromey.com>
10893
10894         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10895         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10896         * utils.c (do_free_section_addr_info)
10897         (make_cleanup_free_section_addr_info): Remove.
10898         * symfile.h (struct other_sections): Add constructor.
10899         (struct section_addr_info): Remove.
10900         (section_addr_info): New typedef.
10901         (struct sym_fns) <sym_offsets>: Change type of parameter.
10902         (build_section_addr_info_from_objfile)
10903         (relative_addr_info_to_section_offsets, addr_info_make_relative)
10904         (default_symfile_offsets, symbol_file_add)
10905         (symbol_file_add_from_bfd)
10906         (build_section_addr_info_from_section_table): Update.
10907         (alloc_section_addr_info, free_section_addr_info): Don't declare.
10908         * symfile.c (alloc_section_addr_info): Remove.
10909         (build_section_addr_info_from_section_table): Change return type.
10910         Update.
10911         (build_section_addr_info_from_bfd)
10912         (build_section_addr_info_from_objfile): Likewise.
10913         (free_section_addr_info): Remove.
10914         (relative_addr_info_to_section_offsets): Change type of "addrs".
10915         (addrs_section_compar): Now a std::sort comparator.
10916         (addrs_section_sort): Change return type.
10917         (addr_info_make_relative): Change type of "addrs".  Update.
10918         (default_symfile_offsets, syms_from_objfile_1)
10919         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10920         (symbol_file_add_separate): Update.
10921         (symbol_file_add): Change type of "addrs".  Update.
10922         (add_symbol_file_command): Update.  Remove cleanups.
10923         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
10924         cleanups.
10925         * symfile-debug.c (debug_sym_offsets): Change type of "info".
10926         * solib.c (solib_read_symbols): Update.
10927         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
10928         * machoread.c (macho_symfile_offsets): Update.
10929         * jit.c (jit_bfd_try_read_symtab): Update.
10930
10931 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
10932
10933         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10934         unittests/utils-selftests.c.
10935         * unittests/utils-selftests.c: New file.
10936
10937 2018-03-14  Tom Tromey  <tom@tromey.com>
10938
10939         PR cli/14977:
10940         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10941         for NULL.
10942
10943 2018-03-14  Tom Tromey  <tom@tromey.com>
10944
10945         PR cli/19918:
10946         * printcmd.c (printf_pointer): Allow "-" in format.
10947
10948 2018-03-14  Tom Tromey  <tom@tromey.com>
10949
10950         * printcmd.c (_initialize_printcmd): Add usage to printf.
10951
10952 2018-03-14  Yao Qi  <qiyao@sourceware.org>
10953
10954         * MAINTAINERS: Update my email address.
10955
10956 2018-03-13  Tom Tromey  <tom@tromey.com>
10957
10958         * machoread.c (macho_check_dsym): Change filenamep to a
10959         std::string*.
10960         (macho_symfile_read): Update.
10961         * symfile.c (load_command): Use std::string.
10962
10963 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10964
10965         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10966         to error message string.
10967         (riscv_register_name): Use xsnprintf instead of sprintf.
10968         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10969         internal_error.
10970         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10971         error.
10972         (riscv_push_dummy_call): Likewise.
10973
10974 2018-03-12  Tom Tromey  <tom@tromey.com>
10975
10976         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10977         Use gdb::byte_vector.
10978         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10979
10980 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10981
10982         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10983         parameter type to readable_regcache.
10984         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10985         the declaration.
10986
10987 2018-03-11  Tom Tromey  <tom@tromey.com>
10988
10989         * dwarf2read.c (struct nextfield): Add initializers.
10990         (struct nextfnfield): Remove.
10991         (struct fnfieldlist): Add initializers.  Remove "length" and
10992         "head", use std::vector.
10993         (struct decl_field_list): Remove.
10994         (struct field_info): Add initializers.
10995         <fields, baseclasses>: Now std::vector.
10996         <nbaseclasses, nfnfields, typedef_field_list_count,
10997         nested_types_list_count>: Remove.
10998         (dwarf2_add_field, dwarf2_add_type_defn)
10999         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11000         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11001         (process_structure_scope): Update.
11002
11003 2018-03-11  Tom Tromey  <tom@tromey.com>
11004
11005         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11006         for use by std::sort.
11007         (build_type_psymtabs_1): Use std::vector.
11008
11009 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
11010
11011         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11012         and LIBMPFR in the printed configuration.
11013
11014 2018-03-08  Tom Tromey  <tom@tromey.com>
11015
11016         * source.c (get_filename_and_charpos): Use scoped_fd.
11017         * nto-procfs.c (procfs_open_1): Use scoped_fd.
11018         (procfs_pidlist): Likewise.
11019         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11020         (iterate_over_mappings): Likewise.
11021
11022 2018-03-08  Tom Tromey  <tom@tromey.com>
11023
11024         * infcall.c (struct call_return_meta_info)
11025         <stack_temporaries_enabled>: Remove.
11026         (get_call_return_value, call_function_by_hand_dummy): Update.
11027         * thread.c (disable_thread_stack_temporaries): Remove.
11028         (enable_thread_stack_temporaries): Remove.
11029         (thread_stack_temporaries_enabled_p): Return bool.
11030         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11031         (get_last_thread_stack_temporary): Update.
11032         * eval.c (evaluate_subexp): Update.
11033         * gdbthread.h (class enable_thread_stack_temporaries): Now a
11034         class, not a function.
11035         (value_ptr, value_vec): Remove typedefs.
11036         (class thread_info) <stack_temporaries_enabled>: Now bool.
11037         <stack_temporaries>: Now a std::vector.
11038         (thread_stack_temporaries_enabled_p)
11039         (value_in_thread_stack_temporaries): Return bool.
11040
11041 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
11042
11043         * remote.c (putpkt_binary): Fix omitted bytes reporting.
11044         (getpkt_or_notif_sane_1): Likewise.
11045
11046 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11047
11048         * build-id.c (build_id_to_debug_bfd): Use std::string.
11049
11050 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11051
11052         * build-id.c (find_separate_debug_file_by_buildid): Return
11053         std::string.
11054         * build-id.h (find_separate_debug_file_by_buildid): Return
11055         std::string.
11056         * coffread.c (coff_symfile_read): Adjust to std::string.
11057         * elfread.c (elf_symfile_read): Adjust to std::string.
11058         * symfile.c (separate_debug_file_exists): Change parameter to
11059         std::string.
11060         (find_separate_debug_file): Return std::string.
11061         (find_separate_debug_file_by_debuglink): Return std::string.
11062         * symfile.h (find_separate_debug_file_by_debuglink): Return
11063         std::string.
11064
11065 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11066
11067         * common/xml-utils.c (xml_escape_text): Move code to...
11068         (xml_escape_text_append): ... this new function.
11069         * common/xml-utils.h (xml_escape_text_append): New declaration.
11070         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11071         New function.
11072         (_initialize_xml_utils): register test_xml_escape_text_append as
11073         a selftest.
11074
11075 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
11076
11077         * defs.h: Remove MAX_REGISTER_SIZE.
11078         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11079         asserts.
11080         * python/py-unwind.c (pyuw_sniffer): Likewise.
11081
11082 2018-03-07  Tom Tromey  <tom@tromey.com>
11083
11084         * linux-tdep.c (linux_info_proc): Update.
11085         * target.h (struct target_ops) <to_fileio_readlink>: Return
11086         optional<string>.
11087         (target_fileio_readlink): Return optional<string>.
11088         * remote.c (remote_hostio_readlink): Return optional<string>.
11089         * inf-child.c (inf_child_fileio_readlink): Return
11090         optional<string>.
11091         * target.c (target_fileio_readlink): Return optional<string>.
11092
11093 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
11094
11095         * regcache.c (cooked_read_test): Add riscv to the list of
11096         architectures that have a save_reggroup.
11097
11098 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11099
11100         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11101         value is not a dynamic class object.
11102
11103 2018-03-06  Tom Tromey  <tom@tromey.com>
11104
11105         * rust-exp.y: Formatting fixes.
11106
11107 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11108
11109         * riscv-tdep.c (riscv_register_name): Remove target description
11110         support.
11111         (riscv_gdbarch_init): Remove target description check.
11112
11113 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11114
11115         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11116         comment.
11117         * riscv-tdep.h: Likewise.
11118
11119 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11120
11121         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11122         (riscv_pseudo_register_write): Delete.
11123         (riscv_gdbarch_init): Remove all use of pseudo registers.
11124
11125 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11126
11127         * record-btrace.c (btrace_print_lines): Replace cleanup
11128         parameter with RAII equivalents.
11129         (btrace_insn_history): Replace cleanup with RAII equivalents.
11130         * ui-out.h (make_cleanup_ui_out_list_begin_end,
11131         make_cleanup_ui_out_tuple_begin_end): Remove.
11132         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11133         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11134         make_cleanup_ui_out_list_begin_end): Remove.
11135
11136 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11137
11138         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11139         parameter types to std::vector.  Use bool.
11140         (record_btrace_wait): Replace VEC(tp_t) with
11141         std::vector<thread_info *>.
11142         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11143
11144 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11145
11146         * record-btrace.c (record_btrace_disable_callback): Remove.
11147         (struct scoped_btrace_disable): New.
11148         (record_btrace_open): Use scoped_btrace_disable.
11149
11150 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11151
11152         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11153         reading values from registers.
11154
11155 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11156
11157         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11158         where appropriate.
11159
11160 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11161
11162         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11163         change parameter type.  Use GDB's print functions, and use
11164         core_addr_to_string where appropriate.
11165         (riscv_push_dummy_call): Use core_addr_to_string where
11166         appropriate, update call to riscv_print_arg_location, and reindent
11167         a few lines.
11168         (riscv_return_value): Update call to riscv_print_arg_location.
11169
11170 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11171             Tim Newsome <tim@sifive.com>
11172             Albert Ou <a0u@eecs.berkeley.edu>
11173             Darius Rad <darius@bluespec.com>
11174
11175         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11176         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11177         (ALLDEPFILES): Add riscv-tdep.c
11178         * configure.tgt: Add riscv support.
11179         * riscv-tdep.c: New file.
11180         * riscv-tdep.h: New file.
11181         * NEWS: Mention new target.
11182         * MAINTAINERS: Add entry for riscv.
11183
11184 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11185
11186         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11187         fields within aggregates.
11188
11189 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
11190
11191         * record-btrace.c (btrace_print_lines): Change type of flags to
11192         gdb_disassembly_flags.
11193
11194 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11195
11196         * fbsd-nat.c: Include "inf-ptrace.h".
11197         (USE_SIGTRAP_SIGINFO): Conditionally define.
11198         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11199         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11200         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11201         function.
11202         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11203         Likewise.
11204         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11205         Likewise.
11206         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11207         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11208         "supports_stopped_by_hw_breakpoint" target methods.
11209
11210 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11211
11212         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11213         * fbsd-nat.c (debug_fbsd_nat): New variable.
11214         (show_fbsd_nat_debug): New function.
11215         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11216         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11217
11218 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11219
11220         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11221         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11222         prototype.
11223         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11224         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11225         method.
11226
11227 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11228
11229         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11230         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11231
11232 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11233
11234         * charset.c (struct charset_vector): New.
11235         (charsets): Change type to charset_vector.
11236         (find_charset_names): Adjust.
11237         (add_one): Adjust.
11238         (_initialize_charset): Adjust.
11239
11240 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11241
11242         * progspace.h (struct program_space) <deleted_solibs>: Change
11243         type to std::vector<std::string>.
11244         * progspace.c (clear_program_space_solib_cache): Adjust.
11245         * breakpoint.c (print_solib_event): Adjust.
11246         (check_status_catch_solib): Adjust.
11247         * solib.c (update_solib_list): Adjust.
11248         * ui-out.h (class ui_out) <field_string>: New overload.
11249         * ui-out.c (ui_out::field_string): New overload.
11250
11251 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11252
11253         * progspace.h (struct program_space): Add constructor and
11254         destructor, initialize fields.
11255         (add_program_space): Remove.
11256         * progspace.c (add_program_space): Rename to...
11257         (program_space::program_space): ... this.
11258         (release_program_space): Rename to...
11259         (program_space::~program_space): ... this.
11260         (delete_program_space): Use delete to delete program_space.
11261         (initialize_progspace): Use new to allocate program_space.
11262         * inferior.c (add_inferior_with_spaces): Likewise.
11263         (clone_inferior_command): Likewise.
11264         * infrun.c (follow_fork_inferior): Likewise.
11265         (handle_vfork_child_exec_or_exit): Likewise.
11266
11267 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11268
11269         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11270         (delim_string_to_char_ptr_vec): Return std::vector of
11271         gdb::unique_xmalloc_ptr.
11272         (dirnames_to_char_ptr_vec_append): Take std::vector of
11273         gdb::unique_xmalloc_ptr.
11274         (dirnames_to_char_ptr_vec): Return std::vector of
11275         gdb::unique_xmalloc_ptr.
11276         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11277         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11278         (delim_string_to_char_ptr_vec): Return an std::vector of
11279         gdb::unique_xmalloc_ptr, adjust the code.
11280         (dirnames_to_char_ptr_vec_append): Take an std::vector of
11281         gdb::unique_xmalloc_ptr, adjust the code.
11282         (dirnames_to_char_ptr_vec): Return an std::vector of
11283         gdb::unique_xmalloc_ptr, adjust the code.
11284         * auto-load.c (auto_load_safe_path_vec): Change type to
11285         std::vector of gdb::unique_xmalloc_ptr.
11286         (auto_load_expand_dir_vars): Return an std::vector of
11287         gdb::unique_xmalloc_ptr, adjust the code.
11288         (auto_load_safe_path_vec_update): Adjust.
11289         (filename_is_in_auto_load_safe_path_vec): Adjust.
11290         (auto_load_objfile_script_1): Adjust.
11291         * build-id.c (build_id_to_debug_bfd): Adjust.
11292         * linux-thread-db.c (thread_db_load_search): Adjust.
11293         * source.c (add_path): Adjust.
11294         (openp): Adjust.
11295         * symfile.c (find_separate_debug_file): Adjust.
11296         * utils.c (do_free_char_ptr_vec): Remove.
11297         (make_cleanup_free_char_ptr_vec): Remove.
11298
11299 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
11300
11301         PR gdb/22907
11302         * common/pathstuff.c: Conditionally include "<windows.h>".
11303
11304 2018-03-01  Georg Sauthoff  <mail@georg.so>
11305
11306         PR gdb/22888
11307         * gcore.in: Quote variables and switch interpreter to bash.
11308
11309 2018-03-01  Tom Tromey  <tom@tromey.com>
11310
11311         * dwarf2read.c (alloc_discriminant_info): Fix default_index
11312         assertion.  Add assertion for discriminant_index.
11313         (quirk_rust_enum): Use correct base type name in univariant case.
11314
11315 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
11316
11317         * record.c (get_call_history_modifiers): Return a
11318         record_print_flags.
11319         (cmd_record_call_history): Adjust.
11320         * record-btrace.c (record_btrace_call_history): Adjust.
11321         (record_btrace_call_history_range): Adjust.
11322         (record_btrace_call_history_from): Adjust.
11323         * target-debug.h (target_debug_print_record_print_flags): New.
11324         * target-delegates.c: Re-generate.
11325         * target.c (target_call_history): Change flags type.
11326         (target_call_history_from): Likewise.
11327         (target_call_history_range): Likewise.
11328         * target.h (struct target_ops) <target_call_history>: Likewise.
11329         (target_call_history_from): Likewise.
11330         (target_call_history_range): Likewise.
11331
11332 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11333             Simon Marchi  <simon.marchi@polymtl.ca>
11334
11335         * common/common-utils.c: Include "sys/stat.h".
11336         (is_regular_file): Move here from "source.c"; change return
11337         type to "bool".
11338         * common/common-utils.h (is_regular_file): New prototype.
11339         * common/pathstuff.c (contains_dir_separator): New function.
11340         * common/pathstuff.h (contains_dir_separator): New prototype.
11341         * source.c: Don't include "sys/stat.h".
11342         (is_regular_file): Move to "common/common-utils.c".
11343
11344 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11345
11346         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11347         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11348         * auto-load.c: Include "common/pathstuff.h".
11349         * common/common-def.h (current_directory): Move here.
11350         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11351         function.
11352         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11353         prototype.
11354         * common/pathstuff.c: New file.
11355         * common/pathstuff.h: New file.
11356         * compile/compile.c: Include "common/pathstuff.h".
11357         * defs.h (current_directory): Move to "common/common-defs.h".
11358         * dwarf2read.c: Include "common/pathstuff.h".
11359         * exec.c: Likewise.
11360         * guile/scm-safe-call.c: Likewise.
11361         * linux-thread-db.c: Likewise.
11362         * main.c: Likewise.
11363         * nto-tdep.c: Likewise.
11364         * objfiles.c: Likewise.
11365         * source.c: Likewise.
11366         * symtab.c: Likewise.
11367         * utils.c: Include "common/pathstuff.h".
11368         (gdb_realpath): Move to "common/pathstuff.c".
11369         (gdb_realpath_keepfile): Likewise.
11370         (gdb_abspath): Likewise.
11371         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11372         (gdb_realpath_keepfile): Likewise.
11373         (gdb_abspath): Likewise.
11374
11375 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
11376
11377         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11378         wildcard process pid for super_resume for kernels with a
11379         specific bug.
11380
11381 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
11382
11383         * compile/compile.c (get_args): Add additional comments
11384         explaining function.
11385
11386 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
11387             Tom Tromey  <tom@tromey.com>
11388
11389         * target.h (memory_write_request_s): Remove typedef.  Don't define
11390         VEC.
11391         (target_write_memory_blocks): Change argument to std::vector.
11392         (struct memory_write_request): Add constructor.
11393         * target-memory.c (compare_block_starting_address): Return bool.
11394         Change argument types.
11395         (claim_memory): Change arguments to use std::vector.
11396         (split_regular_and_flash_blocks, blocks_to_erase)
11397         (compute_garbled_blocks): Likewise.
11398         (cleanup_request_data, cleanup_write_requests_vector): Remove.
11399         (target_write_memory_blocks): Change argument to std::vector.
11400         * symfile.c (struct load_section_data): Add constructor and
11401         destructor.  Use std::vector for "requests".
11402         (struct load_progress_data): Add initializers.
11403         (load_section_callback): Update.  Use "new".
11404         (clear_memory_write_data): Remove.
11405         (generic_load): Update.
11406
11407 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
11408
11409         * arch/aarch64.h: Use common/tdesc.h.
11410
11411 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11412
11413         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11414         architecture with a 64-bit ABI.
11415
11416 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11417
11418         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11419         ahead of target description loading.
11420
11421 2018-02-26  Tom Tromey  <tom@tromey.com>
11422
11423         * stack.c (backtrace_command_1): Update.
11424         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11425         of "flags".
11426         * python/py-framefilter.c (py_print_frame)
11427         (gdbpy_apply_frame_filter): Change type of "flags".
11428         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11429         of "flags".
11430         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11431         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11432         * extension.h (enum frame_filter_flag): Rename from
11433         frame_filter_flags.
11434         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11435         (apply_ext_lang_frame_filter): Change type of "flags".
11436         * extension.c (apply_ext_lang_frame_filter): Change type of
11437         "flags".
11438         * extension-priv.h (struct extension_language_ops)
11439         <apply_frame_filter>: Change type of "flags".
11440
11441 2018-02-26  Tom Tromey  <tom@tromey.com>
11442
11443         PR python/16497:
11444         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11445         off-by-one in py_end computation.
11446         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11447         PRINT_MORE_FRAMES.
11448         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11449         constant.
11450
11451 2018-02-26  Tom Tromey  <tom@tromey.com>
11452
11453         * dwarf2read.c (struct variant_field): New.
11454         (struct nextfield) <variant>: New field.
11455         (dwarf2_add_field): Handle DW_TAG_variant_part.
11456         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11457         discriminated union.
11458         (read_structure_type): Handle DW_TAG_variant_part.
11459         (handle_struct_member_die): New function, extracted from
11460         process_structure_scope.  Handle DW_TAG_variant.
11461         (process_structure_scope): Handle discriminated unions.  Call
11462         handle_struct_member_die.
11463
11464 2018-02-26  Tom Tromey  <tom@tromey.com>
11465
11466         * rust-lang.h (rust_last_path_segment): Declare.
11467         * rust-lang.c (rust_last_path_segment): Now public.  Change
11468         contract.
11469         (struct disr_info): Remove.
11470         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11471         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11472         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11473         (rust_enum_p, rust_enum_variant): New function.
11474         (rust_underscore_fields): Remove "offset" parameter.
11475         (rust_print_enum): New function.
11476         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11477         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11478         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
11479         enums.
11480         (rust_internal_print_type): New function, from rust_print_type.
11481         Remove enum code.
11482         (rust_print_type): Call rust_internal_print_type.
11483         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11484         Update enum handling.
11485         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11486         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11487         (rust_union_quirks): New functions.
11488         (process_full_comp_unit, process_full_type_unit): Call
11489         rust_union_quirks.
11490         (process_structure_scope): Update rust_unions if necessary.
11491
11492 2018-02-26  Tom Tromey  <tom@tromey.com>
11493
11494         * value.h (value_union_variant): Declare.
11495         * valops.c (value_union_variant): New function.
11496         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11497         (struct discriminant_info): New.
11498         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11499         enumerator.
11500         (struct main_type) <flag_discriminated_union>: New field.
11501
11502 2018-02-26  Tom Tromey  <tom@tromey.com>
11503
11504         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11505         unittests/unpack-selftests.c.
11506         * unittests/unpack-selftests.c: New file.
11507         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11508
11509 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11510
11511         * dwarf2read.c (struct partial_die_info) <read>: New method.
11512         (read_partial_die): Remove the declaration.
11513         (load_partial_dies): Update.
11514         (partial_die_info::partial_die_info):
11515         (read_partial_die): Change it to partial_die_info::read.
11516
11517 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11518
11519         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11520         (fixup_partial_die): Remove declaration.
11521         (scan_partial_symbols): Update.
11522         (partial_die_parent_scope): Likewise.
11523         (partial_die_full_name): Likewise.
11524         (fixup_partial_die): Change it to partial_die_info::fixup.
11525
11526 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11527
11528         * dwarf2read.c (read_partial_die): Update the declaration.
11529         (load_partial_dies): Caller update.
11530         (read_partial_die): Remove one argument abbrev_len.
11531
11532 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11533
11534         * dwarf2read.c (struct partial_die_info): Add ctor, delete
11535         assignment operator.
11536         (load_partial_dies): Use ctor and copy ctor.
11537         (read_partial_die): Update.
11538         (dwarf2_cu::find_partial_die): Use ctor.
11539
11540 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11541
11542         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11543         (find_partial_die_in_comp_unit): Change it to
11544         dwarf2_cu::find_partial_die.
11545         (find_partial_die): Update.
11546
11547 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11548
11549         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11550         is NULL.
11551
11552 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11553
11554         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11555
11556 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
11557
11558         * arch/amd64.h: Use common/tdesc.h.
11559         * arch/i386.c: Likewise.
11560         * arch/i386.h: Likewise.
11561         * arch/tic6x.c: Likewise.
11562         * arch/tdesc.h: Move file from here...
11563         * common/tdesc.h: ...to here.
11564         * features/aarch64-core.c: Regenerate.
11565         * features/aarch64-fpu.c: Regenerate.
11566         * features/i386/32bit-avx.c: Regenerate.
11567         * features/i386/32bit-avx512.c: Regenerate.
11568         * features/i386/32bit-core.c: Regenerate.
11569         * features/i386/32bit-linux.c: Regenerate.
11570         * features/i386/32bit-mpx.c: Regenerate.
11571         * features/i386/32bit-pkeys.c: Regenerate.
11572         * features/i386/32bit-sse.c: Regenerate.
11573         * features/i386/64bit-avx.c: Regenerate.
11574         * features/i386/64bit-avx512.c: Regenerate.
11575         * features/i386/64bit-core.c: Regenerate.
11576         * features/i386/64bit-linux.c: Regenerate.
11577         * features/i386/64bit-mpx.c: Regenerate.
11578         * features/i386/64bit-pkeys.c: Regenerate.
11579         * features/i386/64bit-segments.c: Regenerate.
11580         * features/i386/64bit-sse.c: Regenerate.
11581         * features/i386/x32-core.c: Regenerate.
11582         * features/tic6x-c6xp.c: Regenerate.
11583         * features/tic6x-core.c: Regenerate.
11584         * features/tic6x-gp.c: Regenerate.
11585         * target-descriptions.c: Use common/tdesc.h.
11586         * target-descriptions.h: Likewise.
11587
11588 2018-02-24  Tom Tromey  <tom@tromey.com>
11589
11590         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11591         (try_thread_db_load_from_dir, thread_db_load_search): Use
11592         std::string.
11593         (info_auto_load_libthread_db_compare): Return bool.  Change
11594         argument types.
11595         (info_auto_load_libthread_db): Use std::vector, std::string.
11596         Remove cleanups.
11597
11598 2018-02-24  Tom Tromey  <tom@tromey.com>
11599
11600         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11601         std::string.
11602         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11603         std::string*.
11604         * gdbarch.c: Rebuild.
11605         * gdbarch.h: Rebuild.
11606         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11607         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11608         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11609         std::string*.
11610
11611 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
11612
11613         * gdbtypes.h (sect_offset): Change type to uint64_t.
11614         (sect_offset_str): New function.
11615         * dwarf2read.c (create_addrmap_from_aranges): Use
11616         sect_offset_str.
11617         (error_check_comp_unit_head): Likewise.
11618         (create_debug_type_hash_table): Likewise.
11619         (read_cutu_die_from_dwo): Likewise.
11620         (init_cutu_and_read_dies): Likewise.
11621         (init_cutu_and_read_dies_no_follow): Likewise.
11622         (process_psymtab_comp_unit_reader): Likewise.
11623         (partial_die_parent_scope): Likewise.
11624         (peek_die_abbrev): Likewise.
11625         (process_queue): Likewise.
11626         (dwarf2_physname): Likewise.
11627         (read_namespace_alias): Likewise.
11628         (read_import_statement): Likewise.
11629         (create_dwo_cu_reader): Likewise.
11630         (create_cus_hash_table): Likewise.
11631         (lookup_dwo_cutu): Likewise.
11632         (inherit_abstract_dies): Likewise.
11633         (read_func_scope): Likewise.
11634         (read_call_site_scope): Likewise.
11635         (dwarf2_add_member_fn): Likewise.
11636         (read_common_block): Likewise.
11637         (read_module_type): Likewise.
11638         (read_typedef): Likewise.
11639         (read_subrange_type): Likewise.
11640         (load_partial_dies): Likewise.
11641         (read_partial_die): Likewise.
11642         (find_partial_die): Likewise.
11643         (read_str_index): Likewise.
11644         (dwarf2_string_attr): Likewise.
11645         (build_error_marker_type): Likewise.
11646         (lookup_die_type): Likewise.
11647         (dump_die_shallow): Likewise.
11648         (follow_die_ref): Likewise.
11649         (dwarf2_fetch_die_loc_sect_off): Likewise.
11650         (dwarf2_fetch_constant_bytes): Likewise.
11651         (follow_die_sig): Likewise.
11652         (get_signatured_type): Likewise.
11653         (get_DW_AT_signature_type): Likewise.
11654         (dwarf2_find_containing_comp_unit): Likewise.
11655         (set_die_type): Likewise.
11656
11657 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
11658
11659         * arch/aarch64.c: Include "common-defs.h".
11660         * arch/amd64.c: Likewise.
11661         * arch/i386.c: Likewise.
11662
11663 2018-02-21  Tom Tromey  <tom@tromey.com>
11664
11665         * value.h: (extract_field_op): Update.
11666         * eval.c (extract_field_op): Return a const char *.
11667         * expression.h (parse_expression_for_completion): Update.
11668         * completer.c (complete_expression): Update.
11669         (add_struct_fields): Make fieldname const.
11670         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11671         (mark_completion_tag, parse_exp_in_context_1): Update.
11672         (parse_expression_for_completion): Change "name" to
11673         unique_xmalloc_ptr*.
11674
11675 2018-02-21  Tom Tromey  <tom@tromey.com>
11676
11677         * infcall.c (call_function_by_hand_dummy): Use std::vector.
11678
11679 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11680
11681         * avr-tdep.c (avr_read_pc): Change parameter type to
11682         readable_regcache.
11683         * gdbarch.sh (read_pc): Likewise.
11684         * gdbarch.c: Re-generated.
11685         * gdbarch.h: Re-generated.
11686         * hppa-tdep.c (hppa_read_pc): Change parameter type to
11687         readable_regcache.
11688         * ia64-tdep.c (ia64_read_pc): Likewise.
11689         * mips-tdep.c (mips_read_pc): Likewise.
11690         * spu-tdep.c (spu_read_pc): Likewise.
11691
11692 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11693
11694         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11695         * regcache-dump.c: New file.
11696         * regcache.c: Move register_dump to regcache-dump.c.
11697         (maintenance_print_registers): Likewise.
11698         (maintenance_print_raw_registers): Likewise.
11699         (maintenance_print_cooked_registers): Likewise.
11700         (maintenance_print_register_groups): Likewise.
11701         (maintenance_print_remote_registers): Likewise.
11702         (_initialize_regcache): Likewise.
11703         * regcache.h (register_dump): Moved from regcache.c.
11704
11705 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11706
11707         * regcache.c (regcache::regcache): Update.
11708         (regcache::invalidate): Move it to detached_regcache::invalidate.
11709         (get_thread_arch_aspace_regcache): Update.
11710         (regcache::raw_update): Update.
11711         (regcache::cooked_read): Remove some code.
11712         (regcache::cooked_read_value): Likewise.
11713         (regcache::raw_write): Remove assert on m_readonly_p.
11714         (regcache::raw_supply_integer): Move it to
11715         detached_regcache::raw_supply_integer.
11716         (regcache::raw_supply_zeroed): Likewise.
11717         * regcache.h (detached_regcache) <raw_supply_integer>: New
11718         declaration.
11719         <raw_supply_zeroed, invalidate>: Likewise.
11720         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11721         <invalidate>: Likewise.
11722         <m_readonly_p>: Removed.
11723
11724 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11725
11726         * infcmd.c (get_return_value): Let stop_regs point to
11727         get_current_regcache.
11728         * regcache.c (regcache::regcache): Remove.
11729         (register_dump_reg_buffer): New class.
11730         (regcache_print): Adjust.
11731         * regcache.h (regcache): Remove constructors.
11732
11733 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11734
11735         * regcache.c (class register_dump): New class.
11736         (register_dump_regcache, register_dump_none): New class.
11737         (register_dump_remote, register_dump_groups): New class.
11738         (regcache_print): Update.
11739         * regcache.h (regcache_dump_what): Move it to regcache.c.
11740         (regcache) <dump>: Remove.
11741
11742 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11743
11744         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11745          reg_buffer_rw *.
11746         (jit_unwind_reg_set_impl): Call raw_supply.
11747         (jit_frame_sniffer): Use reg_buffer_rw.
11748         * record-full.c (record_full_core_regbuf): Change its type.
11749         (record_full_core_open_1): Use reg_buffer_rw.
11750         (record_full_close): Likewise.
11751         (record_full_core_fetch_registers): Use regcache->raw_supply.
11752         (record_full_core_store_registers): Likewise.
11753         * regcache.c (regcache::get_register_status): Move it to
11754         reg_buffer.
11755         (regcache_raw_set_cached_value): Remove.
11756         (regcache::raw_set_cached_value): Remove.
11757         (regcache::raw_write): Call raw_supply.
11758         (regcache::raw_supply): Move it to reg_buffer_rw.
11759         * regcache.h (regcache_raw_set_cached_value): Remove.
11760         (reg_buffer_rw): New class.
11761
11762 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11763
11764         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11765         readonly_detached_regcache.
11766         (dummy_frame_prev_register): Use regcache->cooked_read.
11767         * frame.c (frame_save_as_regcache): Change return type.
11768         (frame_pop): Update.
11769         * frame.h (frame_save_as_regcache): Update declaration.
11770         * inferior.h (get_infcall_suspend_state_regcache): Update
11771         declaration.
11772         * infrun.c (infcall_suspend_state) <registers>: use
11773         readonly_detached_regcache.
11774         (save_infcall_suspend_state): Don't use regcache_dup.
11775         (get_infcall_suspend_state_regcache): Change return type.
11776         * linux-fork.c (struct fork_info) <savedregs>: Change to
11777         readonly_detached_regcache.
11778         <pc>: New field.
11779         (fork_save_infrun_state): Don't use regcache_dup.
11780         (info_checkpoints_command): Adjust.
11781         * mi/mi-main.c (register_changed_p): Update declaration.
11782         (mi_cmd_data_list_changed_registers): Use
11783         readonly_detached_regcache.
11784         (register_changed_p): Change parameter type to
11785         readonly_detached_regcache.
11786         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11787         readonly_detached_regcache.
11788         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11789         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11790         New.
11791         (regcache::save): Move it to reg_buffer.
11792         (regcache::restore): Change parameter type.
11793         (regcache_dup): Remove.
11794         * regcache.h (reg_buffer) <save>: New method.
11795         (readonly_detached_regcache): New class.
11796         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11797         readonly_detached_regcache.
11798         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11799
11800 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11801
11802         * frame.c (frame_save_as_regcache): Use regcache method save.
11803         (frame_pop): Use regcache method restore.
11804         * infrun.c (restore_infcall_suspend_state): Likewise.
11805         * linux-fork.c (fork_load_infrun_state): Likewise.
11806         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11807         save.
11808         * regcache.c (regcache_save): Remove.
11809         (regcache::restore): More asserts.
11810         (regcache_cpy): Remove.
11811         * regcache.h (regcache_save): Remove the declaration.
11812         (regcache::restore): Move from private to public.
11813         Remove the friend declaration of regcache_cpy.
11814         (regcache_cpy): Remove declaration.
11815
11816 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11817
11818         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11819         parameter type to 'readable_regcache *'.
11820         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11821         * arm-tdep.c (arm_neon_quad_read): Likewise.
11822         (arm_pseudo_read): Likewise.
11823         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11824         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11825         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11826         * gdbarch.c: Re-generated.
11827         * gdbarch.h: Re-generated.
11828         * gdbarch.sh (pseudo_register_read): Change parameter type to
11829         'readable_regcache *'.
11830         (pseudo_register_read_value): Likewise.
11831         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11832         (h8300_pseudo_register_read): Likewise.
11833         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11834         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11835         (i386_pseudo_register_read_into_value): Likewise.
11836         (i386_pseudo_register_read_value): Likewise.
11837         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11838         declaration.
11839         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11840         * m32c-tdep.c (m32c_raw_read): Likewise.
11841         (m32c_read_flg): Likewise.
11842         (m32c_banked_register): Likewise.
11843         (m32c_banked_read): Likewise.
11844         (m32c_sb_read): Likewise.
11845         (m32c_part_read): Likewise.
11846         (m32c_cat_read): Likewise.
11847         (m32c_r3r2r1r0_read): Likewise.
11848         (m32c_pseudo_register_read): Likewise.
11849         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11850         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11851         (mep_pseudo_cr64_read): Likewise.
11852         (mep_pseudo_register_read): Likewise.
11853         * mips-tdep.c (mips_pseudo_register_read): Likewise.
11854         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11855         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11856         * regcache.c (regcache::raw_read): Move it to readable_regcache.
11857         (regcache::cooked_read): Likewise.
11858         (regcache::cooked_read_value): Likewise.
11859         (regcache_cooked_read_signed):
11860         (regcache::cooked_read): Likewise.
11861         * regcache.h (readable_regcache): New class.
11862         (regcache): Inherit readable_regcache.  Move some methods to
11863         readable_regcache.
11864         * rl78-tdep.c (rl78_pseudo_register_read): Change
11865         parameter type to 'readable_regcache *'.
11866         * rs6000-tdep.c (do_regcache_raw_read): Remove.
11867         (e500_pseudo_register_read): Change parameter type to
11868         'readable_regcache *'.
11869         (dfp_pseudo_register_read): Likewise.
11870         (vsx_pseudo_register_read): Likewise.
11871         (efpr_pseudo_register_read): Likewise.
11872         * s390-tdep.c (s390_pseudo_register_read): Likewise.
11873         * sh-tdep.c (sh_pseudo_register_read): Likewise.
11874         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11875         (sh64_pseudo_register_read): Likewise.
11876         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11877         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11878         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11879         (spu_pseudo_register_read): Likewise.
11880         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11881         (xtensa_pseudo_register_read): Likewise.
11882
11883 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11884
11885         * regcache.c (regcache::regcache): Call reg_buffer ctor.
11886         (regcache::arch): Move it to reg_buffer::arch.
11887         (regcache::register_buffer): Likewise.
11888         (regcache::assert_regnum): Likewise.
11889         (regcache::num_raw_registers): Likewise.
11890         * regcache.h (reg_buffer): New class.
11891         (regcache): Inherit reg_buffer.
11892
11893 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
11894
11895         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11896         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11897
11898 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
11899
11900         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11901
11902 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
11903
11904         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11905         (SFILES): Remove common/*.c files.
11906         (COMMON_OBS): Remove some *.o files built from common/*.c files.
11907         * common/common.host: Add common reference.
11908         * configure.ac: Likewise.
11909         * configure: Regenerate.
11910
11911 2018-02-16  Yao Qi  <yao.qi@linaro.org>
11912
11913         * block.c (block_namespace_info): Inherit allocate_on_obstack.
11914         (block_initialize_namespace): Use new.
11915         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11916         (dwarf2_free_objfile): Use delete.
11917         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11918         (copy_type_recursive): Use new.
11919         * gdb_obstack.h (allocate_on_obstack): New.
11920
11921 2018-02-15  Yao Qi  <yao.qi@linaro.org>
11922
11923         PR gdb/22849
11924         * inferior.c (exit_inferior_1): Reset inf->control.
11925
11926 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
11927
11928         * ada-lang.c (ada_to_fixed_value_create): Delete advance
11929         declaration.
11930
11931 2018-02-14  Pedro Alves  <palves@redhat.com>
11932
11933         * frame-unwind.c (frame_unwind_try_unwinder): Always call
11934         frame_cleanup_after_sniffer on exception.
11935
11936 2018-02-14  Tom Tromey  <tom@tromey.com>
11937
11938         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11939         const.
11940         (solib_bfd_open): Make pathname const.
11941         * solib.c (solib_bfd_open): Make pathname const.
11942         * solib-spu.c (spu_bfd_fopen): Make name const.
11943         (spu_bfd_open): Make pathname const.
11944         * solib-darwin.c (darwin_bfd_open): Make pathname const.
11945         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11946
11947 2018-02-14  Tom Tromey  <tom@tromey.com>
11948
11949         * symfile.c (symfile_bfd_open): Update.
11950         * source.h (openp, source_full_path_of, find_and_open_source):
11951         Change argument type to unique_xmalloc_ptr.
11952         * source.c (openp): Take a unique_xmalloc_ptr.
11953         (source_full_path_of, find_and_open_source): Likewise.
11954         (open_source_file, symtab_to_fullname): Update.
11955         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11956         unique_xmalloc_ptr.
11957         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11958         (exec_file_find): Update.
11959         * psymtab.c (psymtab_to_fullname): Update.
11960         * nto-tdep.h (nto_find_and_open_solib): Update.
11961         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11962         unique_xmalloc_ptr.
11963         * exec.c (exec_file_attach): Update.
11964         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11965         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11966
11967 2018-02-14  Tom Tromey  <tom@tromey.com>
11968
11969         * solib.c: Include source.h.
11970         * nto-tdep.c: Include source.h.
11971         * mi/mi-cmd-env.c: Include source.h.
11972         * infcmd.c: Include source.h.
11973         * exec.c: Include source.h.
11974         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11975         (add_path, directory_switch, source_path, init_source_path): Move
11976         declarations...
11977         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11978         (add_path, directory_switch, source_path, init_source_path):
11979         ...here.
11980
11981 2018-02-14  Tom Tromey  <tom@tromey.com>
11982
11983         * solist.h (exec_file_find, solib_find): Return
11984         unique_xmalloc_ptr.
11985         (solib_bfd_fopen): Take a const char *.
11986         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11987         (exec_file_find, solib_find): Likewise.
11988         (solib_bfd_fopen): Do not take ownership of "pathname".
11989         (solib_bfd_open): Use unique_xmalloc_ptr.
11990         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11991         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11992         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11993         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11994
11995 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
11996
11997         * ada-lang.c (name_match_type_from_name): Remove reference to
11998         ada_name_for_lookup in function's documentation.
11999         * ada-lang.h (ada_name_for_lookup): Delete declaration.
12000
12001 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12002
12003         * defs.h (enum openp_flags): New enum.
12004         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12005         Move to enum openp_flags.
12006         (openp_flags): New enum flags.
12007         (openp): Change parameter type to openp_flags.
12008         * source.c (openp): Change parameter type to openp_flags.
12009         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12010         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12011
12012 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12013
12014         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12015         per-command.
12016
12017 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12018
12019         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12020         into...
12021         (class dwarf2_queue_guard): ...the destructor of this new class.
12022         (dw2_do_instantiate_symtab): Create instance of the new class
12023         dwarf2_queue_guard, remove cleanup.
12024
12025 2018-02-09  Tom Tromey  <tom@tromey.com>
12026
12027         * source.c (find_source_lines): Don't reference past the end of
12028         the vector.
12029
12030 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12031
12032         * remote.c (remote_btrace_maybe_reopen): Change error message.
12033         * btrace.c (btrace_enable): Likewise.
12034         (parse_xml_btrace): Likewise.
12035         (parse_xml_btrace_conf): Likewise.
12036
12037 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12038
12039         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12040         (linux_enable_pt, linux_enable_bts): Call
12041         diagnose_perf_event_open_fail.
12042
12043 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12044
12045         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12046         Remove parameter and change return type.  Update callers.  Move it.
12047         (linux_enable_bts, linux_enable_pt): Improve error message.
12048         (linux_enable_pt): Remove zero buffer size check.
12049         (linux_enable_btrace): Improve error messages.  Remove NULL return
12050         check.
12051
12052 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12053
12054         * btrace.c (btrace_enable): Remove target_supports_btrace call.
12055         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12056         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12057         (linux_supports_pt, linux_supports_btrace): Remove.
12058         (linux_enable_bts): Call cpu_supports_bts.
12059         * nat/linux-btrace.h (linux_supports_btrace): Remove.
12060         * remote.c (remote_supports_btrace): Remove.
12061         (init_remote_ops): Remove remote_supports_btrace.
12062         * target-delegates.c: Regenerated.
12063         * target.c (target_supports_btrace): Remove.
12064         * target.h (target_ops) <to_supports_btrace>: Remove
12065         (target_supports_btrace): Remove.
12066         * x86-linux-nat.c (x86_linux_create_target): Remove
12067         linux_supports_btrace.
12068
12069 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12070
12071         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12072         btrace failed.
12073         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12074         exception and use message in own exception.
12075
12076 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12077
12078         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12079         (perf_event_pt_event_type): Use gdb_file_up.
12080         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12081         scoped_fd, and scoped_mmap.
12082
12083 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12084
12085         * common/scoped_mmap.h: New.
12086         * unittests/scoped_mmap-selftest.c: New.
12087         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12088         unittests/scoped_mmap-selftest.c.
12089
12090 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12091
12092         * common/scoped_fd.h: New.
12093         * unittests/scoped_fd-selftest.c: New.
12094         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12095         unittests/scoped_fd-selftest.c.
12096
12097 2018-02-09  Tom Tromey  <tom@tromey.com>
12098
12099         * auto-load.c (auto_load_section_scripts): Use
12100         gdb::unique_xmalloc_ptr.
12101
12102 2018-02-09  Tom Tromey  <tom@tromey.com>
12103
12104         * auto-load.c (execute_script_contents): Use std::string.
12105
12106 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
12107
12108         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12109         Python function, rather than a new command.
12110
12111 2018-02-08  Tom Tromey  <tom@tromey.com>
12112
12113         * solib.c (solib_find_1): Use std::string.
12114         (solib_bfd_fopen): Use unique_xmalloc_ptr.
12115
12116 2018-02-08  Tom Tromey  <tom@tromey.com>
12117
12118         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12119
12120 2018-02-08  Tom Tromey  <tom@tromey.com>
12121
12122         * source.c (find_source_lines): Use gdb::def_vector.
12123
12124 2018-02-08  Tom Tromey  <tom@tromey.com>
12125
12126         * macrocmd.c (struct temporary_macro_definition): New.
12127         (macro_define_command): Use temporary_macro_definition.  Remove
12128         cleanups.
12129         (free_macro_definition_ptr): Remove.
12130
12131 2018-02-08  Tom Tromey  <tom@tromey.com>
12132
12133         * macroexp.c (maybe_expand): Use std::string.
12134
12135 2018-02-08  Tom Tromey  <tom@tromey.com>
12136
12137         * macroexp.c (struct macro_buffer): Add initializers for some
12138         members.
12139         (init_buffer, init_shared_buffer, free_buffer)
12140         (free_buffer_return_text): Remove.
12141         (macro_buffer): New constructors.
12142         (~macro_buffer): New destructor.
12143         (macro_buffer::set_shared): New method.
12144         (macro_buffer::resize_buffer, macro_buffer::appendc)
12145         (macro_buffer::appendmem): Now methods, not free functions.
12146         (set_token, append_tokens_without_splicing, stringify)
12147         (macro_stringify): Update.
12148         (gather_arguments): Change return type.  Remove argc_p argument,
12149         add args_ptr argument.  Use std::vector.
12150         (substitute_args): Remove argc argument.  Accept std::vector.
12151         (expand): Update.  Use std::vector.
12152         (scan, macro_expand, macro_expand_next): Update.
12153
12154 2018-02-08  Tom Tromey  <tom@tromey.com>
12155
12156         * symtab.c (default_collect_symbol_completion_matches_break_on):
12157         Use unique_xmalloc_ptr.
12158         * macroscope.h: (sal_macro_scope, user_macro_scope)
12159         (default_macro_scope): Return unique_xmalloc_ptr.
12160         * macroscope.c (sal_macro_scope, user_macro_scope)
12161         (default_macro_scope): Return unique_xmalloc_ptr.
12162         * macroexp.h (macro_expand, macro_expand_once): Return
12163         unique_xmalloc_ptr.
12164         * macroexp.c (macro_expand, macro_expand_once): Return
12165         unique_xmalloc_ptr.
12166         * macrocmd.c (macro_expand_command, macro_expand_once_command)
12167         (info_macro_command, info_macros_command): Use
12168         unique_xmalloc_ptr.
12169         * compile/compile-c-support.c (write_macro_definitions): Use
12170         unique_xmalloc_ptr.
12171         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12172
12173 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
12174
12175         * value.c (value_static_field): Assign field type instead of
12176         containing type when returning an optimized out value.
12177
12178 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12179
12180         * ft32-tdep.c (ft32_read_pc): Remove.
12181         (ft32_write_pc): Remove.
12182         (ft32_gdbarch_init): Update.
12183         * m32r-tdep.c (m32r_read_pc): Remove.
12184         (m32r_gdbarch_init): Update.
12185         * mep-tdep.c (mep_read_pc): Remove.
12186         (mep_gdbarch_init): Update.
12187         * microblaze-tdep.c (microblaze_write_pc): Remove.
12188         (microblaze_gdbarch_init): Update.
12189         * mn10300-tdep.c (mn10300_read_pc): Remove.
12190         (mn10300_write_pc): Remove.
12191         (mn10300_gdbarch_init): Update.
12192         * moxie-tdep.c (moxie_read_pc): Remove.
12193         (moxie_write_pc): Remove.
12194         (moxie_gdbarch_init): Update.
12195
12196 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12197
12198         * expprint.c (print_subexp_standard): Handle
12199         OP_F77_UNDETERMINED_ARGLIST.
12200         (dump_subexp_body_standard): Likewise.
12201
12202 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
12203
12204         * target-descriptions.c (tdesc_element_visitor) Add empty
12205         implementations.
12206         (tdesc_type): Move make_gdb_type from here.
12207         (tdesc_type_builtin): Likewise.
12208         (tdesc_type_vector): Likewise.
12209         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12210         (make_gdb_type_struct): Move from tdesc_type_with_fields.
12211         (make_gdb_type_union): Likewise.
12212         (make_gdb_type_flags): Likewise.
12213         (make_gdb_type_enum): Likewise.
12214         (make_gdb_type): New function.
12215         (tdesc_register_type): Use static make_gdb_type.
12216
12217 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
12218
12219         * infcmd.c (default_print_one_register_info): Align natural-format
12220         column values consistently one under another.
12221         (pad_to_column): New function.
12222
12223 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
12224
12225         * dwarf2read.c (dwarf2_physname): Move commment.
12226
12227 2018-02-01  Leszek Swirski  <leszeks@google.com>
12228
12229         * varobj.c (varobj_formatted_print_options): Allow recursive
12230         pretty printing if pretty printing is enabled.
12231
12232 2018-02-01  Leszek Swirski  <leszeks@google.com>
12233
12234         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12235         names after a structop as a filename.
12236
12237 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12238
12239         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12240         (arm_record_coproc_data_proc): Likewise.
12241
12242 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12243
12244         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12245
12246 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
12247
12248         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12249         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12250
12251 2018-01-31  Pedro Alves  <palves@redhat.com>
12252
12253         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12254         * inflow.c (child_terminal_save_inferior): Wrap reference to
12255         tcgetpgrp in HAVE_TERMIOS_H.
12256         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12257         _WIN32.
12258         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12259         always iterate over all inferiors.
12260         (gdbsim_cntrl_c): Adjust.
12261         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12262
12263 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12264
12265         * gdbtypes.c (lookup_array_range_type): Make sure the array's
12266         index type is objfile-owned if the element type is as well.
12267
12268 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12269
12270         GDB 8.1 released.
12271
12272 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12273
12274         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12275         "features/s390x-linux64.c".
12276         (_initialize_s390_linux_tdep): Remove initialization of tdescs
12277         s390_linux32 and s390x_linux64.
12278         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12279         default tdesc.
12280         * s390-tdep.c: Include "features/s390-linux32.c" and
12281         "features/s390x-linux64.c".
12282         (s390_tdesc_valid): Add check for tdesc_has_registers.
12283         (s390_gdbarch_init): Make sure there is always a valid tdesc.
12284         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12285         tdesc_s390x_linux64.
12286         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12287         tdesc_s390x_linux64 to...
12288         * s390-tdep.h: ...here.
12289
12290 2018-01-30  Pedro Alves  <palves@redhat.com>
12291
12292         PR gdb/13211
12293         * config.in, configure: Regenerate.
12294         * configure.ac: Check for getpgid.
12295         * go32-nat.c (go32_pass_ctrlc): New.
12296         (go32_target): Install it.
12297         * inf-child.c (inf_child_target): Install
12298         child_terminal_save_inferior, child_pass_ctrlc and
12299         child_interrupt.
12300         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12301         (inf_ptrace_target): No longer install it.
12302         * infcmd.c (interrupt_target_1): Adjust.
12303         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12304         (child_interrupt): Declare.
12305         (inferior::terminal_state): New.
12306         * inflow.c (struct terminal_info): Update comments.
12307         (inferior_process_group): Delete.
12308         (terminal_is_ours): Delete.
12309         (gdb_tty_state): New.
12310         (child_terminal_init): Adjust.
12311         (is_gdb_terminal, sharing_input_terminal_1)
12312         (sharing_input_terminal): New functions.
12313         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
12314         Set the process's actual process group in the foreground if
12315         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
12316         mark terminal as the inferior's if not sharing GDB's terminal.
12317         Don't check attach_flag.
12318         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12319         pass down a target_terminal_state.
12320         (child_terminal_save_inferior): New, factored out from ...
12321         (child_terminal_ours_1): ... this.  Handle
12322         target_terminal_state::is_ours_for_output.
12323         (child_interrupt, child_pass_ctrlc): New.
12324         (inflow_inferior_exit): Clear the inferior's terminal_state.
12325         (copy_terminal_info): Copy the inferior's terminal state.
12326         (_initialize_inflow): Remove reference to terminal_is_ours.
12327         * inflow.h (inferior_process_group): Delete.
12328         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12329         * procfs.c (procfs_target): Don't install procfs_interrupt.
12330         (procfs_interrupt): Delete.
12331         * remote.c (remote_serial_quit_handler): Adjust.
12332         (remote_interrupt): Remove ptid parameter.  Adjust.
12333         * target-delegates.c: Regenerate.
12334         * target.c: Include "terminal.h".
12335         (target_terminal::terminal_state): Rename to ...
12336         (target_terminal::m_terminal_state): ... this.
12337         (target_terminal::init): Adjust.
12338         (target_terminal::inferior): Adjust to per-inferior
12339         terminal_state.
12340         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12341         (target_terminal::ours, target_terminal::ours_for_output): Use
12342         target_terminal_is_ours_kind.
12343         (target_interrupt): Remove ptid parameter.  Adjust.
12344         (default_target_pass_ctrlc): Adjust.
12345         * target.h (target_ops::to_terminal_save_inferior): New field.
12346         (target_ops::to_interrupt): Remove ptid_t parameter.
12347         (target_interrupt): Remove ptid_t parameter.  Update comment.
12348         (target_pass_ctrlc): Update comment.
12349         * target/target.h (target_terminal_state): New scoped enum,
12350         factored out of ...
12351         (target_terminal::terminal_state): ... here.
12352         (target_terminal::inferior): Update comments.
12353         (target_terminal::restore_inferior): New.
12354         (target_terminal::is_inferior, target_terminal::is_ours)
12355         (target_terminal::is_ours_for_output): Adjust.
12356         (target_terminal::scoped_restore_terminal_state): Adjust to
12357         rename, and call restore_inferior() instead of inferior().
12358         (target_terminal::scoped_restore_terminal_state::m_state): Change
12359         type.
12360         (target_terminal::terminal_state): Rename to ...
12361         (target_terminal::m_terminal_state): ... this and change type.
12362
12363 2018-01-30  Pedro Alves  <palves@redhat.com>
12364
12365         * linux-nat.c (wait_for_signal): New function.
12366         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12367         directly.
12368         (async_terminal_is_ours)
12369         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12370         (linux_nat_add_target): Don't override
12371         to_terminal_inferior/to_terminal_ours.
12372
12373 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
12374
12375         * remote.c (remote_follow_fork): Don't call "detach_inferior".
12376
12377 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
12378
12379         * dwarf2read.c (free_dwo_files): Add forward-declaration.
12380         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12381         dwarf2_per_objfile_free here.
12382         (dwarf2_per_objfile_free): Remove.
12383         (_initialize_dwarf2_read): Don't register
12384         dwarf2_per_objfile_free as a registry cleanup.
12385
12386 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
12387
12388         Avoid compilation errors in MinGW native builds
12389
12390         The error is triggered by including python-internal.h, and the
12391         error message is:
12392
12393              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12394                       from build-gnulib/import/math.h:27,
12395                       from d:/usr/Python26/include/pyport.h:235,
12396                       from d:/usr/Python26/include/Python.h:58,
12397                       from python/python-internal.h:94,
12398                       from python/py-arch.c:24:
12399              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12400         using ::hypot;
12401                 ^~~~~
12402
12403         This happens because Python headers define 'hypot' to expand t
12404         '_hypot' in the Windows builds.
12405         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12406         'hypoth'.  This avoids a compilation error.
12407
12408 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12409
12410         * MAINTAINERS (Write After Approval): Fix ordering.
12411
12412 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12413
12414         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12415
12416 2018-01-26  Alan Modra  <amodra@gmail.com>
12417
12418         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12419         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12420         Remove nop.  Make const.  Comment.
12421         (powerpc32_plt_stub_so_2): New.
12422         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12423         Correct count.  Update uses.
12424         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12425         Move common code reading PLT entry word.  Correct
12426         powerpc32_plt_stub PLT address calculation.
12427         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12428         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12429         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12430         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12431         (ppc64_standard_linkage8): Likewise.
12432         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12433         Correct insns description.
12434         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12435
12436 2018-01-24  Pedro Alves  <palves@redhat.com>
12437
12438         GCC PR libstdc++/83906
12439         * gdbtypes.c (operator==(const dynamic_prop &,
12440         const dynamic_prop &)): New.
12441         (operator==(const range_bounds &, const range_bounds &)): New.
12442         (check_types_equal): Use them instead of memcmp.
12443         * gdbtypes.h (operator==(const dynamic_prop &,
12444         const dynamic_prop &)): Declare.
12445         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12446         (operator==(const range_bounds &, const range_bounds &)): Declare.
12447         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12448
12449 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12450
12451         * s390-linux-tdep.c (s390_record_address_mask)
12452         (s390_record_calc_disp_common, s390_record_calc_disp)
12453         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12454         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12455         (s390_process_record): Move to s390-tdep.c.
12456         (s390_linux_init_abi_any): Adjust.
12457         * s390-tdep.c (s390_record_address_mask)
12458         (s390_record_calc_disp_common, s390_record_calc_disp)
12459         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12460         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12461         (s390_process_record): Moved from s390-linux-tdep.c
12462         (s390_gdbarch_init): Adjust.
12463
12464 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12465
12466         * s390-linux-nat.c (s390-tdep.h): New include.
12467         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12468         (HFILES_NO_SRCDIR): Add s390-tdep.h.
12469         (ALLDEPFILES): Add s390-tdep.c.
12470         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12471         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12472         * s390-tdep.h: ...this.  New file.
12473         * s390-linux-tdep.c (s390-tdep.h): New include.
12474         (_initialize_s390_tdep): Rename to...
12475         (_initialize_s390_linux_tdep): ...this and adjust.
12476         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12477         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12478         s390-tdep.h.
12479         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12480         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12481         (s390_is_partial_instruction, s390_software_single_step)
12482         (is_non_branch_ril, s390_displaced_step_copy_insn)
12483         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12484         (s390_prologue_data, s390_addr, s390_store, s390_load)
12485         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12486         (s390_register_call_saved, s390_guess_tracepoint_registers)
12487         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12488         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12489         (s390_pseudo_register_name, s390_pseudo_register_type)
12490         (s390_pseudo_register_read, s390_pseudo_register_write)
12491         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12492         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12493         (s390_addr_bits_remove, s390_address_class_type_flags)
12494         (s390_address_class_type_flags_to_name)
12495         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12496         (s390_function_arg_float, s390_function_arg_vector)
12497         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12498         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12499         (s390_frame_align, s390_register_return_value, s390_return_value)
12500         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12501         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12502         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12503         (s390_trad_frame_prev_register, s390_unwind_cache)
12504         (s390_prologue_frame_unwind_cache)
12505         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12506         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12507         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12508         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12509         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12510         (s390_frame_base_address, s390_local_base_address)
12511         (s390_frame_base, s390_gcc_target_options)
12512         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12513         (s390_validate_reg_range, s390_tdesc_valid)
12514         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12515         * s390-tdep.c: ...this.  New file.
12516
12517 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12518
12519         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12520         (s390_process_record, s390_gdbarch_tdep_alloc)
12521         (s390_linux_init_abi_any): Use/set new hook.
12522
12523 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12524
12525         * s390-linux-tdep.c (osabi.h): New include.
12526         (s390_linux_init_abi_31, s390_linux_init_abi_64)
12527         (s390_linux_init_abi_any): New functions.
12528         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12529
12530 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12531
12532         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12533         tdesc_has_registers check
12534
12535 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12536
12537         * s390-linux-tdep.c (s390_tdesc_valid): New function.
12538         (s390_validate_reg_range): New macro.
12539         (s390_gdbarch_init): Adjust.
12540
12541 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12542
12543         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12544         (s390_gdbarch_tdep_alloc): Adjust.
12545         (s390_gdbarch_init): Adjust.
12546
12547 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12548
12549         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12550         <have_tdb>: Change type to bool.
12551         (s390_gdbarch_tdep_alloc): Adjust.
12552         (s390_gdbarch_init): Adjust.
12553
12554 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12555
12556         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12557         (gdbarch_tdep) <have_upper, have_vx>: New fields.
12558         (s390_gdbarch_tdep_alloc): New function.
12559         (s390_gdbarch_init): Allocate tdep at start and use its fields
12560         instead of separate variables.
12561
12562 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12563
12564         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12565         when looking for cached gdbarch and add comment for remaining.
12566
12567 2018-01-22  Pedro Alves  <palves@redhat.com>
12568             Sergio Durigan Junior  <sergiodj@redhat.com>
12569
12570         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12571         case.
12572
12573 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
12574
12575         * MAINTAINERS: Update my company e-mail address.
12576
12577 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12578
12579         * regcache.c (cooked_write_test): New function.
12580         (_initialize_regcache): Register the test.
12581
12582 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12583
12584         * ia64-tdep.c (ia64_pseudo_register_read): Call
12585         regcache->cooked_read instead of regcache_cooked_read_unsigned.
12586         * m32c-tdep.c (m32c_cat_read): Likewise.
12587         (m32c_r3r2r1r0_read): Likewise.
12588         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12589         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12590
12591 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12592
12593         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12594         method raw_read instead of regcache_raw_read.
12595         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12596         * arm-tdep.c (arm_neon_quad_read): Likewise.
12597         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12598         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12599         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12600         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12601         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12602         (i386_pseudo_register_read_into_value): Likewise.
12603         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12604         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12605         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12606         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12607         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12608         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
12609         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12610         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
12611         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12612
12613 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12614
12615         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12616         * configure.tgt: Remove target mt.
12617         * mt-tdep.c: Remove.
12618         * regcache.c (cooked_read_test): Remove the check for mt.
12619
12620 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12621
12622         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12623         instead of gdbarch_pseudo_register_read_value.
12624
12625 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12626
12627         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12628         language is Ada.
12629
12630 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12631
12632         * linespec.c (create_sals_line_offset): Remove code that preserved
12633         the symtab_and_line's line number.
12634
12635 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12636
12637         * varobj.c (varobj_create): Don't set valid_block when creating a
12638         floating varobj.
12639
12640 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12641
12642         * varobj.c (varobj_create): Remove out of date comment.
12643
12644 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12645
12646         PR mi/20395
12647         * ada-exp.y (write_var_from_sym): Pass extra parameter when
12648         updating innermost block.
12649         * parse.c (innermost_block_tracker::update): Take extra type
12650         parameter, and check types match before updating innermost block.
12651         (write_dollar_variable): Update innermost block for registers.
12652         * parser-defs.h (enum innermost_block_tracker_type): New enum.
12653         (innermost_block_tracker::innermost_block_tracker): Initialise
12654         m_types member.
12655         (innermost_block_tracker::reset): Take type parameter.
12656         (innermost_block_tracker::update): Take type parameter, and pass
12657         type through as needed.
12658         (innermost_block_tracker::m_types): New member.
12659         * varobj.c (varobj_create): Pass type when reseting innermost
12660         block.
12661
12662 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12663
12664         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12665         * ada-lang.c (resolve_subexp): Likewise.
12666         * breakpoint.c (set_breakpoint_condition) Likewise.
12667         (watch_command_1) Likewise.
12668         * c-exp.y (variable): Likewise.
12669         * d-exp.y (PrimaryExpression): Likewise.
12670         * f-exp.y (variable): Likewise.
12671         * go-exp.y (variable): Likewise.
12672         * m2-exp.y (variable): Likewise.
12673         * objfiles.c (objfile::~objfile): Likewise.
12674         * p-exp.y (variable): Likewise.
12675         * parse.c (innermost_block): Change type.
12676         * parser-defs.h (class innermost_block_tracker): New.
12677         (innermost_block): Change to innermost_block_tracker.
12678         * printcmd.c (display_command): Switch to innermost_block API.
12679         (do_one_display): Likewise.
12680         * rust-exp.y (do_one_display): Likewise.
12681         * symfile.c (clear_symtab_users): Likewise.
12682         * varobj.c (varobj_create): Switch to innermost_block API, replace
12683         use of innermost_block with block stored on varobj object.
12684
12685 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12686
12687         * expression.h (innermost_block): Remove declaration.
12688         * varobj.c: Add 'parser-defs.h' include.
12689
12690 2018-01-19  Tom Tromey  <tom@tromey.com>
12691
12692         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12693         symbols in the static and global blocks.
12694
12695 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
12696
12697         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12698         gdb_ptrace.h, and move including gdb_wait.h ...
12699         * nat/linux-ptrace.h: ... to here.
12700
12701 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12702
12703         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12704         inf_ptrace_detach_success.
12705         (inf_ptrace_detach_success): Add inferior parameter, use it
12706         instead of inferior_ptid, pass it to detach_inferior.
12707         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12708         parameter.
12709         * inferior.c (detach_inferior): Add overload that takes an
12710         inferior object.
12711         * inferior.h (detach_inferior): Likewise.
12712         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12713         use inferior_ptid, adjust call to inf_ptrace_detach_success.
12714         * linux-thread-db.c (thread_db_detach): Use inf parameter.
12715
12716 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12717
12718         * target.h (struct target_ops) <to_detach>: Add inferior
12719         parameter.
12720         (target_detach): Likewise.
12721         * target.c (dispose_inferior): Pass inferior down.
12722         (target_detach): Pass inferior down.  Assert that it is equal to
12723         the current inferior.
12724         * aix-thread.c (aix_thread_detach): Pass inferior down.
12725         * corefile.c (core_file_command): Pass current_inferior() down.
12726         * corelow.c (core_detach): Add inferior parameter.
12727         * darwin-nat.c (darwin_detach): Likewise.
12728         * gnu-nat.c (gnu_detach): Likewise.
12729         * inf-ptrace.c (inf_ptrace_detach): Likewise.
12730         * infcmd.c (detach_command): Pass current_inferior() down to
12731         target_detach.
12732         * infrun.c (follow_fork_inferior): Pass parent_inf to
12733         target_detach.
12734         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12735         target_detach.
12736         * linux-nat.c (linux_nat_detach): Add inferior parameter.
12737         * linux-thread-db.c (thread_db_detach): Likewise.
12738         * nto-procfs.c (procfs_detach): Likewise.
12739         * procfs.c (procfs_detach): Likewise.
12740         * record.c (record_detach): Likewise.
12741         * record.h (struct inferior): Forward-declare.
12742         (record_detach): Add inferior parameter.
12743         * remote-sim.c (gdbsim_detach): Likewise.
12744         * remote.c (remote_detach_1): Likewise.
12745         (remote_detach): Likewise.
12746         (extended_remote_detach): Likewise.
12747         * sol-thread.c (sol_thread_detach): Likewise.
12748         * target-debug.h (target_debug_print_inferior_p): New macro.
12749         * target-delegates.c: Re-generate.
12750         * top.c (kill_or_detach): Pass inferior down to target_detach.
12751         * windows-nat.c (windows_detach): Add inferior parameter.
12752
12753 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12754
12755         * target.h (struct target_ops) <to_detach>: Remove args
12756         parameter.
12757         (target_detach): Likewise.
12758         * target.c (dispose_inferior): Adjust.
12759         (target_detach): Remove args parameter, adjust.
12760         * aix-thread.c (aix_thread_detach): Adjust.
12761         * corefile.c (core_file_command): Adjust.
12762         * corelow.c (core_detach): Adjust.
12763         * darwin-nat.c (darwin_detach): Adjust.
12764         * gnu-nat.c (gnu_detach): Adjust.
12765         * inf-ptrace.c (inf_ptrace_detach): Adjust.
12766         * infcmd.c (detach_command): Adjust
12767         * infrun.c (follow_fork_inferior): Adjust.
12768         (handle_vfork_child_exec_or_exit): Adjust.
12769         * linux-fork.c (linux_fork_detach): Remove args parameter.
12770         * linux-fork.h (linux_fork_detach): Likewise.
12771         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12772         * linux-thread-db.c (thread_db_detach): Likewise.
12773         * nto-procfs.c (procfs_detach): Likewise.
12774         * procfs.c (procfs_detach): Likewise.
12775         (do_detach): Remove signo parameter.
12776         * record.c (record_detach): Remove args parameter.
12777         * record.h (record_detach): Likewise.
12778         * remote-sim.c (gdbsim_detach): Likewise.
12779         * remote.c (remote_detach_1): Likewise.
12780         (remote_detach): Likewise.
12781         (extended_remote_detach): Likewise.
12782         * sol-thread.c (sol_thread_detach): Likewise.
12783         * target-delegates.c: Re-generate.
12784         * top.c (struct qt_args) <args>: Remove field.
12785         (kill_or_detach): Don't pass args.
12786         (quit_force): Don't set args.
12787         * windows-nat.c (windows_detach): Remove args parameter.
12788
12789 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12790
12791         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12792         (arm_linux_init_abi): Install it.
12793
12794 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12795
12796         * osabi.c (gdb_osabi_names): Extend the regexp for
12797         arm-linux-gnueabihf.
12798
12799 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12800
12801         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12802         m_abbrevs.
12803         (abbrev_table::add_abbrev): Update.
12804         (abbrev_table::lookup_abbrev): Update.
12805
12806 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12807
12808         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12809
12810 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
12811
12812         * compile/compile.c (compile_to_object): Convert "triplet_rx"
12813         to "std::string".
12814
12815 2018-01-17  Tom Tromey  <tom@tromey.com>
12816
12817         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
12818
12819 2018-01-17  Tom Tromey  <tom@tromey.com>
12820
12821         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12822         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12823         (create_array_type_with_stride): Update.
12824         * dwarf2read.c (set_die_type): Update.
12825
12826 2018-01-17  Tom Tromey  <tom@tromey.com>
12827
12828         * dwarf2read.c (delayed_method_info): Remove typedef.
12829         (dwarf2_cu::method_info): Now a std::vector.
12830         (add_to_method_list): Update.
12831         (free_delayed_list): Remove.
12832         (compute_delayed_physnames): Update.
12833         (process_full_comp_unit, process_full_type_unit): Clear the method
12834         list.  Remove cleanups.
12835         (psymtab_include_file_name): Add name_holder parameter.  Use
12836         unique_xmalloc_ptr.
12837         (dwarf_decode_lines): Update.
12838
12839 2018-01-17  Tom Tromey  <tom@tromey.com>
12840             Simon Marchi  <simon.marchi@ericsson.com>
12841
12842         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12843         (dwarf2_per_objfile::free_cached_comp_units)
12844         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12845         (init_cutu_and_read_dies_no_follow): Update.
12846         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12847         (dwarf2_cu::~dwarf2_cu): New.
12848         (free_heap_comp_unit, free_stack_comp_unit): Remove.
12849         (age_cached_comp_units, free_one_cached_comp_unit): Update.
12850
12851 2018-01-17  Tom Tromey  <tom@tromey.com>
12852             Simon Marchi  <simon.marchi@ericsson.com>
12853
12854         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12855         (struct die_reader_specs) <abbrev_table>: New member.
12856         (struct abbrev_table): Add constructor.
12857         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12858         <abbrev_obstack>: Now an auto_obstack.
12859         (abbrev_table_up): New typedef.
12860         (init_cu_die_reader): Add abbrev_table parameter.
12861         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12862         Add result_dwo_abbrev_table.
12863         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12864         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12865         Update.
12866         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12867         parameter.
12868         (skip_children): Update.
12869         (abbrev_table::alloc_abbrev): Rename from
12870         abbrev_table_alloc_abbrev.
12871         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12872         (abbrev_table::lookup_abbrev): Rename from
12873         abbrev_table_lookup_abbrev.
12874         (abbrev_table_read_table): Return abbrev_table_up.
12875         (abbrev_table_free, abbrev_table_free_cleanup)
12876         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12877         (load_partial_dies): Update.
12878
12879 2018-01-17  Tom Tromey  <tom@tromey.com>
12880
12881         * dwarf2read.c (dwarf2_compute_name): Update comment.
12882         (read_func_scope, read_variable): Update.
12883         (new_symbol): Remove.
12884         (new_symbol_full): Rename to new_symbol.
12885
12886 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
12887
12888         PR gdb/16577
12889         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12890         a warning instead of throwing an error, set section size to 0 and return
12891         NULL.
12892         * gdb_bfd.h (gdb_bfd_map_section): Update description.
12893
12894 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12895
12896         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12897         std::string.
12898         (linux_ptrace_attach_fail_reason_string): Likewise.
12899         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12900         Likewise.
12901         (linux_ptrace_attach_fail_reason_string): Likewise.
12902         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12903
12904 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12905
12906         * linux-nat.c (linux_nat_attach): Remove xstrdup.
12907
12908 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
12909
12910         PR gdb/21559
12911         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12912         checking for fs_base/gs_base fields in struct user_regs_struct.
12913         * configure: Regenerate.
12914
12915 2018-01-17  Yao Qi  <yao.qi@linaro.org>
12916
12917         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12918         function.
12919         (aarch64_linux_init_abi): Install it to gdbarch hook
12920         gcc_target_options.
12921
12922 2018-01-15  Pedro Alves  <palves@redhat.com>
12923
12924         * common/signals-state-save-restore.c
12925         (save_original_signals_state): Fix typos.
12926
12927 2017-01-12  Tom Tromey  <tom@tromey.com>
12928             Sergio Durigan Junior  <sergiodj@redhat.com>
12929
12930         * Makefile.in (install-only): Install gdb-add-index.
12931
12932 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
12933
12934         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12935
12936 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12937
12938         * infrun.c (keep_going_pass_signal): Clear step-over info when
12939         insert_breakpoints fails.
12940
12941 2018-01-11  Pedro Alves  <palves@redhat.com>
12942
12943         PR gdb/22583
12944         * infrun.c (resume): Rename to ...
12945         (resume_1): ... this.
12946         (resume): Reimplement as wrapper around resume_1.
12947
12948 2018-01-11  Pedro Alves  <palves@redhat.com>
12949
12950         PR remote/22597
12951         * remote.c (remote_parse_stop_reply): Default to the last-set
12952         general thread instead of to 'magic_null_ptid'.
12953
12954 2018-01-10  Pedro Alves  <palves@redhat.com>
12955
12956         * language.h (language_get_symbol_name_matcher): Rename ...
12957         (get_symbol_name_matcher): ... this.
12958         * language.c (language_get_symbol_name_matcher): Ditto.
12959         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12960         callers adjusted.
12961
12962 2018-01-10  Pedro Alves  <palves@redhat.com>
12963
12964         PR gdb/22670
12965         * dwarf2read.c
12966         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12967         Adjust to use language_get_symbol_name_matcher instead of
12968         language_defn::la_get_symbol_name_matcher.
12969         * language.c (language_get_symbol_name_matcher): If in Ada mode
12970         and the lookup name is a verbatim match, return Ada's matcher.
12971         * language.h (language_get_symbol_name_matcher): Adjust comment.
12972         (ada_lookup_name_info::verbatim_p):: New method.
12973
12974 2018-01-10  Pedro Alves  <palves@redhat.com>
12975
12976         PR gdb/22670
12977         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12978         minsym's language is language_auto or language_cplus, pass down
12979         language_ada instead.
12980         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12981
12982 2018-01-10  Pedro Alves  <palves@redhat.com>
12983
12984         PR gdb/22670
12985         * minsyms.c (linkage_name_str): New function.
12986         (iterate_over_minimal_symbols): Use it.
12987
12988 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12989
12990         * NEWS: Document that 'info proc' now works on FreeBSD.
12991
12992 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12993
12994         * configure.ac: Check for kinfo_getfile in libutil.
12995         * configure: Regenerate.
12996         * config.in: Regenerate.
12997         * fbsd-nat.c: Include "fbsd-tdep.h".
12998         (fbsd_fetch_cmdline): New.
12999         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13000         rather than calling error.
13001         (fbsd_info_proc): New.
13002         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13003         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13004         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13005
13006 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13007
13008         * fbsd-nat.c (struct free_deleter): Remove.
13009         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13010
13011 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13012
13013         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13014         NULL for an empty pathname.
13015
13016 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13017
13018         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13019         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13020         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13021         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13022         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13023         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13024         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13025         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13026         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13027         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13028         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13029         (fbsd_core_fetch_timeval, fbsd_print_sigset)
13030         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13031         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
13032         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13033
13034 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
13035
13036         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13037         (gnu_xfer_auxv): New function.
13038         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13039         TARGET_OBJECT_AUXV.
13040
13041 2018-01-08  Yao Qi  <yao.qi@linaro.org>
13042             Simon Marchi  <simon.marchi@ericsson.com>
13043
13044         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13045         common/selftest.c.
13046         (COMMON_OBS): Remove selftest.o.
13047         * configure.ac: Append selftest-arch.c and common/selftest.c to
13048         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
13049         * configure: Re-generated.
13050         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13051         GDB_SELF_TEST.
13052         (maintenance_info_selftests): Likewise.
13053
13054 2018-01-08  Xavier Roirand  <roirand@adacore.com>
13055
13056         * ada-valprint.c (val_print_packed_array_elements): Use
13057         proper number of elements when printing an array indexed
13058         by an enumeration type.
13059
13060 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13061
13062         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13063         (dw2_get_file_names_reader): Adjust.
13064         (lookup_dwo_signatured_type): Adjust.
13065         (lookup_dwp_signatured_type): Adjust.
13066         (lookup_signatured_type): Adjust.
13067         (create_type_unit_group): Adjust.
13068         (get_type_unit_group): Adjust.
13069         (process_psymtab_comp_unit_reader): Adjust.
13070         (build_type_psymtabs_reader): Adjust.
13071         (scan_partial_symbols): Adjust.
13072         (add_partial_symbol): Adjust.
13073         (add_partial_subprogram): Adjust.
13074         (peek_die_abbrev): Adjust.
13075         (fixup_go_packaging): Adjust.
13076         (process_imported_unit_die): Adjust.
13077         (dwarf2_compute_name): Adjust.
13078         (dwarf2_physname): Adjust.
13079         (read_import_statement): Adjust.
13080         (handle_DW_AT_stmt_list): Adjust.
13081         (read_file_scope): Adjust.
13082         (read_func_scope): Adjust.
13083         (read_lexical_block_scope): Adjust.
13084         (read_call_site_scope): Adjust.
13085         (read_variable): Adjust.
13086         (dwarf2_rnglists_process): Adjust.
13087         (dwarf2_ranges_process): Adjust.
13088         (dwarf2_ranges_read): Adjust.
13089         (dwarf2_get_pc_bounds): Adjust.
13090         (dwarf2_record_block_ranges): Adjust.
13091         (dwarf2_add_field): Adjust.
13092         (dwarf2_add_member_fn): Adjust.
13093         (read_structure_type): Adjust.
13094         (process_structure_scope): Adjust.
13095         (read_enumeration_type): Adjust.
13096         (read_array_type): Adjust.
13097         (mark_common_block_symbol_computed): Adjust.
13098         (read_common_block): Adjust.
13099         (read_namespace_type): Adjust.
13100         (read_namespace): Adjust.
13101         (read_module_type): Adjust.
13102         (read_tag_pointer_type): Adjust.
13103         (read_tag_ptr_to_member_type): Adjust.
13104         (read_tag_string_type): Adjust.
13105         (read_subroutine_type): Adjust.
13106         (read_typedef): Adjust.
13107         (read_base_type): Adjust.
13108         (attr_to_dynamic_prop): Adjust.
13109         (read_subrange_type): Adjust.
13110         (read_unspecified_type): Adjust.
13111         (dwarf2_read_abbrevs): Adjust.
13112         (load_partial_dies): Adjust.
13113         (read_partial_die): Adjust.
13114         (find_partial_die): Adjust.
13115         (guess_partial_die_structure_name): Adjust.
13116         (fixup_partial_die): Adjust.
13117         (read_attribute_value): Adjust.
13118         (read_addr_index): Adjust.
13119         (read_addr_index_from_leb128): Adjust.
13120         (read_str_index): Adjust.
13121         (dwarf2_string_attr): Adjust.
13122         (get_debug_line_section): Adjust.
13123         (dwarf_decode_line_header): Adjust.
13124         (lnp_state_machine::check_line_address): Adjust.
13125         (dwarf_decode_lines_1): Adjust.
13126         (dwarf_decode_lines): Adjust.
13127         (dwarf2_start_symtab): Adjust.
13128         (var_decode_location): Adjust.
13129         (new_symbol_full): Adjust.
13130         (dwarf2_const_value_data): Adjust.
13131         (dwarf2_const_value_attr): Adjust.
13132         (dwarf2_const_value): Adjust.
13133         (die_type): Adjust.
13134         (die_containing_type): Adjust.
13135         (build_error_marker_type): Adjust.
13136         (lookup_die_type): Adjust.
13137         (guess_full_die_structure_name): Adjust.
13138         (anonymous_struct_prefix): Adjust.
13139         (determine_prefix): Adjust.
13140         (dwarf2_name): Adjust.
13141         (follow_die_ref_or_sig): Adjust.
13142         (follow_die_offset): Adjust.
13143         (follow_die_ref): Adjust.
13144         (follow_die_sig_1): Adjust.
13145         (follow_die_sig): Adjust.
13146         (get_signatured_type): Adjust.
13147         (get_DW_AT_signature_type): Adjust.
13148         (decode_locdesc): Adjust.
13149         (dwarf_decode_macros): Adjust.
13150         (cu_debug_loc_section): Adjust.
13151         (fill_in_loclist_baton): Adjust.
13152         (dwarf2_symbol_mark_computed): Adjust.
13153         (init_one_comp_unit): Don't assign
13154         dwarf2_cu::dwarf2_per_objfile.
13155         (set_die_type): Adjust.
13156
13157 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13158
13159         * dwarf2read.c (struct mapped_debug_names): Add constructor.
13160         <dwarf2_per_objfile>: New field.
13161         (dwarf2_per_objfile): Remove global.
13162         (get_dwarf2_per_objfile): New function.
13163         (set_dwarf2_per_objfile): New function.
13164         (dwarf2_build_psymtabs_hard): Change objfile parameter to
13165         dwarf2_per_objfile.
13166         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13167         (read_abbrev_offset): Likewise.
13168         (read_indirect_string): Likewise.
13169         (read_indirect_line_string): Likewise.
13170         (read_indirect_string_at_offset): Likewise.
13171         (read_indirect_string_from_dwz): Likewise.
13172         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13173         dwarf2_per_objfile.
13174         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13175         (create_all_comp_units): Change objfile parameter to
13176         dwarf2_per_objfile.
13177         (create_all_type_units): Likewise.
13178         (process_queue): Add dwarf2_per_objfile parameter.
13179         (read_and_check_comp_unit_head): Likewise.
13180         (lookup_dwo_unit_in_dwp): Likewise.
13181         (get_dwp_file): Likewise.
13182         (process_cu_includes): Likewise.
13183         (struct free_dwo_file_cleanup_data): New struct.
13184         (dwarf2_has_info): Use get_dwarf2_per_objfile and
13185         set_dwarf2_per_objfile.
13186         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13187         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13188         context, adjust calls.
13189         (dw2_instantiate_symtab): Likewise.
13190         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13191         (dw2_get_cu): Likewise.
13192         (create_cu_from_index_list): Change objfile parameter to
13193         dwarf2_per_objfile.
13194         (create_cus_from_index_list): Get dwarf2_per_objfile from
13195         context, adjust calls.
13196         (create_cus_from_index): Likewise.
13197         (create_signatured_type_table_from_index): Change objfile
13198         parameter to dwarf2_per_objfile.
13199         (create_signatured_type_table_from_debug_names): Change objfile
13200         parameter to dwarf2_per_objfile.
13201         (create_addrmap_from_index): Likewise.
13202         (create_addrmap_from_aranges): Likewise.
13203         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13204         (dw2_setup): Remove.
13205         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13206         context.
13207         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13208         get_dwarf2_per_objfile.
13209         (dw2_forget_cached_source_info): Likewise.
13210         (dw2_map_symtabs_matching_filename): Likewise.
13211         (struct dw2_symtab_iterator) <index>: Remove.
13212         <dwarf2_per_objfile>: New field.
13213         (dw2_symtab_iter_init): Replace index parameter with
13214         dwarf2_per_objfile.
13215         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13216         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13217         (dw2_print_stats): Likewise.
13218         (dw2_dump): Likewise.
13219         (dw2_expand_symtabs_for_function): Likewise.
13220         (dw2_expand_all_symtabs): Likewise.
13221         (dw2_expand_symtabs_with_fullname): Likewise.
13222         (dw2_expand_marked_cus): Replace index and objfile parameters
13223         with dwarf2_per_objfile.
13224         (dw_expand_symtabs_matching_file_matcher): Add
13225         dwarf2_per_objfile parameter and adjust calls.
13226         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13227         adjust calls.
13228         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13229         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13230         adjust calls.
13231         (create_cus_from_debug_names_list): Replace objfile parameter
13232         with dwarf2_per_objfile and adjust calls.
13233         (create_cus_from_debug_names): Likewise.
13234         (dwarf2_read_debug_names): Likewise.
13235         (mapped_debug_names::namei_to_name): Adjust call.
13236         (dw2_debug_names_iterator::next): Likewise.
13237         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13238         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13239         (dw2_debug_names_dump): Likewise.
13240         (dw2_debug_names_expand_symtabs_for_function): Likewise.
13241         (dw2_debug_names_expand_symtabs_matching): Likewise.
13242         (dwarf2_initialize_objfile): Likewise.
13243         (dwarf2_build_psymtabs): Likewise.
13244         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13245         this_cu.
13246         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13247         (read_and_check_comp_unit_head): Likewise.
13248         (read_abbrev_offset): Likewise.
13249         (create_debug_type_hash_table): Likewise.
13250         (create_debug_types_hash_table): Likewise.
13251         (create_all_type_units): Replace objfile parameter with
13252         dwarf2_per_objfile.
13253         (add_type_unit): Add dwarf2_per_objfile parameter.
13254         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13255         with dwarf2_per_objfile.
13256         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13257         (lookup_dwp_signatured_type): Likewise.
13258         (lookup_signatured_type): Likewise.
13259         (read_cutu_die_from_dwo): Likewise.
13260         (init_tu_and_read_dwo_dies): Likewise.
13261         (init_cutu_and_read_dies): Likewise.
13262         (init_cutu_and_read_dies_no_follow): Likewise.
13263         (allocate_type_unit_groups_table): Add objfile parameter.
13264         (create_type_unit_group): Use dwarf2_per_objfile from cu.
13265         (get_type_unit_group): Likewise.
13266         (process_psymtab_comp_unit): Update call.
13267         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13268         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13269         (print_tu_stats): Likewise.
13270         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13271         in void* parameter.
13272         (build_type_psymtabs): Change objfile parameter to
13273         dwarf2_per_objfile.
13274         (process_skeletonless_type_unit): Use dwarf2_per_objfile
13275         passed in void* parameter.
13276         (process_skeletonless_type_units): Change objfile parameter to
13277         dwarf2_per_objfile.
13278         (set_partial_user): Likewise.
13279         (dwarf2_build_psymtabs_hard): Likewise.
13280         (read_comp_units_from_section): Likewise.
13281         (create_all_comp_units): Likewise.
13282         (scan_partial_symbols): Update calls.
13283         (add_partial_symbol): Likewise.
13284         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13285         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13286         (process_queue): Add dwarf2_per_objfile parameter.
13287         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13288         (compute_compunit_symtab_includes): Likewise.
13289         (process_cu_includes): Add dwarf2_per_objfile parameter.
13290         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13291         (process_full_type_unit): Likewise.
13292         (process_imported_unit_die): Update call.
13293         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13294         (read_file_scope): Likewise.
13295         (allocate_dwo_file_hash_table): Add objfile parameter.
13296         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13297         (create_cus_hash_table): Likewise.
13298         (create_dwp_hash_table): Likewise.
13299         (create_dwo_unit_in_dwp_v1): Likewise.
13300         (create_dwp_v2_section): Likewise.
13301         (create_dwo_unit_in_dwp_v2): Likewise.
13302         (lookup_dwo_unit_in_dwp): Likewise.
13303         (try_open_dwop_file): Likewise.
13304         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13305         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13306         cleanup to include a reference to dwarf2_per_objfile.
13307         (open_dwp_file): Add dwarf2_per_objfile parameter.
13308         (open_and_init_dwp_file): Likewise.
13309         (get_dwp_file): Likewise.
13310         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13311         (queue_and_load_all_dwo_tus): Update call.
13312         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13313         data.
13314         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13315         (dwarf2_ranges_process): Likewise.
13316         (dwarf2_get_pc_bounds): Likewise.
13317         (mark_common_block_symbol_computed): Likewise.
13318         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13319         (dwarf2_read_abbrevs): Update call.
13320         (read_partial_die): Use dwarf2_per_objfile from cu.
13321         (find_partial_die): Likewise.
13322         (fixup_partial_die): Likewise.
13323         (read_attribute_value): Likewise.
13324         (read_indirect_string_at_offset_from): Add objfile parameter.
13325         (read_indirect_string_at_offset): Add dwarf2_per_objfile
13326         parameter.
13327         (read_indirect_string_from_dwz): Add objfile parameter.
13328         (read_indirect_string): Add objfile parameter.
13329         (read_addr_index_1): Add dwarf2_per_objfile parameter.
13330         (read_addr_index): Use dwarf2_per_objfile from cu.
13331         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13332         call dw2_setup.
13333         (read_str_index): Use dwarf2_per_objfile from cu.
13334         (get_debug_line_section): Likewise.
13335         (read_formatted_entries): Add dwarf2_per_objfile parameter.
13336         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13337         (new_symbol_full): Use dwarf2_per_objfile from cu.
13338         (build_error_marker_type): Likewise.
13339         (lookup_die_type): Likewise.
13340         (determine_prefix): Likewise.
13341         (follow_die_offset): Likewise.
13342         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13343         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13344         (dwarf2_fetch_die_type_sect_off): Likewise.
13345         (dwarf2_get_die_type): Likewise.
13346         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13347         (get_signatured_type): Likewise.
13348         (get_DW_AT_signature_type): Likewise.
13349         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13350         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13351         (cu_debug_loc_section): Likewise.
13352         (fill_in_loclist_baton): Likewise.
13353         (dwarf2_symbol_mark_computed): Likewise.
13354         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13355         dwarf2_per_objfile.
13356         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13357         parameter.
13358         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13359         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13360         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13361         (set_die_type): Use dwarf2_free_objfile from cu.
13362         (get_die_type_at_offset): Likewise.
13363         (dwarf2_per_objfile_free): Don't assign global variable.
13364         (debug_names) <constructor>: Add dwarf2_per_objfile
13365         parameter, update m_debugstrlookup construction.
13366         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13367         parameter.
13368         <m_dwarf2_per_objfile>: New field.
13369         <lookup>: Use m_dwarf2_per_objfile.
13370         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13371         (psyms_seen_size): Likewise.
13372         (write_gdbindex): Replace objfile parameter with
13373         dwarf2_per_objfile.
13374         (write_debug_names): Likewise.
13375         (write_psymtabs_to_index): Likewise.
13376         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13377         calls.
13378
13379 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13380
13381         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13382         <dwarf2_per_objfile>: New field.
13383         (struct dwarf2_per_cu_data) <objfile>: Remove.
13384         <dwarf2_per_objfile>: New field.
13385         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13386         of objfile.
13387         (create_signatured_type_table_from_index): Likewise.
13388         (create_debug_type_hash_table): Likewise.
13389         (fill_in_sig_entry_from_dwo_entry): Likewise.
13390         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13391         (create_type_unit_group): Assign dwarf2_per_objfile instead of
13392         objfile.
13393         (create_partial_symtab): Access objfile through
13394         dwarf2_per_objfile.
13395         (process_psymtab_comp_unit_reader): Likewise.
13396         (read_comp_units_from_section): Likewise.
13397         (scan_partial_symbols): Likewise.
13398         (add_partial_symbol): Likewise.
13399         (add_partial_subprogram): Likewise.
13400         (peek_die_abbrev): Likewise.
13401         (fixup_go_packaging): Likewise.
13402         (process_full_comp_unit): Likewise.
13403         (process_full_type_unit): Likewise.
13404         (process_imported_unit_die): Likewise.
13405         (dwarf2_compute_name): Likewise.
13406         (dwarf2_physname): Likewise.
13407         (read_import_statement): Likewise.
13408         (create_cus_hash_table): Assign dwarf2_physname instead of
13409         objfile.
13410         (read_func_scope): Access objfile through dwarf2_per_objfile.
13411         (read_lexical_block_scope): Likewise.
13412         (read_call_site_scope): Likewise.
13413         (read_variable): Likewise.
13414         (dwarf2_rnglists_process): Likewise.
13415         (dwarf2_ranges_process): Likewise.
13416         (dwarf2_ranges_read): Likewise.
13417         (dwarf2_record_block_ranges): Likewise.
13418         (dwarf2_add_field): Likewise.
13419         (dwarf2_add_member_fn): Likewise.
13420         (read_structure_type): Likewise.
13421         (process_structure_scope): Likewise.
13422         (read_enumeration_type): Likewise.
13423         (read_array_type): Likewise.
13424         (read_common_block): Likewise.
13425         (read_namespace_type): Likewise.
13426         (read_namespace): Likewise.
13427         (read_module_type): Likewise.
13428         (read_tag_pointer_type): Likewise.
13429         (read_tag_ptr_to_member_type): Likewise.
13430         (read_tag_string_type): Likewise.
13431         (read_subroutine_type): Likewise.
13432         (read_typedef): Likewise.
13433         (read_base_type): Likewise.
13434         (attr_to_dynamic_prop): Likewise.
13435         (read_subrange_type): Likewise.
13436         (read_unspecified_type): Likewise.
13437         (load_partial_dies): Likewise.
13438         (read_partial_die): Likewise.
13439         (find_partial_die): Likewise.
13440         (guess_partial_die_structure_name): Likewise.
13441         (fixup_partial_die): Likewise.
13442         (read_attribute_value): Likewise.
13443         (read_addr_index_from_leb128): Likewise.
13444         (dwarf2_read_addr_index): Likewise.
13445         (dwarf2_string_attr): Likewise.
13446         (lnp_state_machine::check_line_address): Likewise.
13447         (dwarf_decode_lines_1): Likewise.
13448         (dwarf_decode_lines): Likewise.
13449         (dwarf2_start_symtab): Likewise.
13450         (var_decode_location): Likewise.
13451         (new_symbol_full): Likewise.
13452         (dwarf2_const_value_data): Likewise.
13453         (dwarf2_const_value_attr): Likewise.
13454         (dwarf2_const_value): Likewise.
13455         (die_type): Likewise.
13456         (die_containing_type): Likewise.
13457         (lookup_die_type): Likewise.
13458         (guess_full_die_structure_name): Likewise.
13459         (anonymous_struct_prefix): Likewise.
13460         (dwarf2_name): Likewise.
13461         (follow_die_ref_or_sig): Likewise.
13462         (follow_die_offset): Likewise.
13463         (follow_die_ref): Likewise.
13464         (dwarf2_fetch_die_loc_sect_off): Likewise.
13465         (dwarf2_fetch_constant_bytes): Likewise.
13466         (dwarf2_fetch_die_type_sect_off): Likewise.
13467         (dwarf2_get_die_type): Likewise.
13468         (follow_die_sig): Likewise.
13469         (decode_locdesc): Likewise.
13470         (dwarf2_per_cu_objfile): Likewise.
13471         (dwarf2_per_cu_text_offset): Likewise.
13472         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13473         objfile.
13474         (set_die_type): Access objfile through
13475         dwarf2_per_objfile.
13476
13477 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13478
13479         * valprint.c (converted_character_d): Remove typedef.
13480         (DEF_VEC_O (converted_character_d)): Remove.
13481         (count_next_character): Use std::vector.
13482         (print_converted_chars_to_obstack): Likewise.
13483         (generic_printstr): Likewise.
13484
13485 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13486
13487         * xml-support.h (struct gdb_xml_value): Add constructor.
13488         <value>: Change type to unique_xmalloc_ptr.
13489         (gdb_xml_value_s): Remove typedef.
13490         (DEF_VEC_O (gdb_xml_value_s)): Remove.
13491         (gdb_xml_element_start_handler): Change parameter type to
13492         std::vector.
13493         (xml_find_attribute): Likewise.
13494         * xml-support.c (xml_find_attribute): Change parameter type to
13495         std::vector and adjust.
13496         (gdb_xml_values_cleanup): Remove.
13497         (gdb_xml_parser::start_element): Adjust to std::vector.
13498         (xinclude_start_include): Change paraeter type to std::vector
13499         and adjust.
13500         * btrace.c (check_xml_btrace_version): Likewise.
13501         (parse_xml_btrace_block): Likewise.
13502         (parse_xml_btrace_pt_config_cpu): Likewise.
13503         (parse_xml_btrace_pt): Likewise.
13504         (parse_xml_btrace_conf_bts): Likewise.
13505         (parse_xml_btrace_conf_pt): Likewise.
13506         * memory-map.c (memory_map_start_memory): Likewise.
13507         (memory_map_start_property): Likewise.
13508         * osdata.c (osdata_start_osdata): Likewise.
13509         (osdata_start_item): Likewise.
13510         (osdata_start_column): Likewise.
13511         * remote.c (start_thread): Likewise.
13512         * solib-aix.c (library_list_start_library): Likewise.
13513         (library_list_start_list): Likewise.
13514         * solib-svr4.c (library_list_start_library): Likewise.
13515         (svr4_library_list_start_list): Likewise.
13516         * solib-target.c (library_list_start_segment): Likewise.
13517         (library_list_start_section): Likewise.
13518         (library_list_start_library): Likewise.
13519         (library_list_start_list): Likewise.
13520         * tracepoint.c (traceframe_info_start_memory): Likewise.
13521         (traceframe_info_start_tvar): Likewise.
13522         * xml-syscall.c (syscall_start_syscall): Likewise.
13523         * xml-tdesc.c (tdesc_start_target): Likewise.
13524         (tdesc_start_feature): Likewise.
13525         (tdesc_start_reg): Likewise.
13526         (tdesc_start_union): Likewise.
13527         (tdesc_start_struct): Likewise.
13528         (tdesc_start_flags): Likewise.
13529         (tdesc_start_enum): Likewise.
13530         (tdesc_start_field): Likewise.
13531         (tdesc_start_enum_value): Likewise.
13532         (tdesc_start_vector): Likewise.
13533
13534 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13535
13536         * extension.h (struct xmethod_worker) <clone>: Remove.
13537         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13538         Remove.
13539         (python_xmethod_worker::clone): Remove.
13540         * valops.c (find_overload_match): Use std::move instead of
13541         clone.
13542
13543 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13544
13545         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13546         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13547         <free_xmethod_worker_data>: Remove.
13548         <get_matching_xmethod_workers>: Chance VEC to std::vector.
13549         <get_xmethod_arg_types>: Remove.
13550         <get_xmethod_result_type>: Remove.
13551         <invoke_xmethod>: Remove.
13552         * extension.c (new_xmethod_worker): Remove.
13553         (clone_xmethod_worker): Remove.
13554         (get_matching_xmethod_workers): Return void, pass std::vector by
13555         pointer.
13556         (get_xmethod_arg_types): Rename to...
13557         (xmethod_worker::get_arg_types): ... this, and adjust.
13558         (get_xmethod_result_type): Rename to...
13559         (xmethod_worker::get_result_type): ... this, and adjust.
13560         (invoke_xmethod): Remove.
13561         (free_xmethod_worker): Remove.
13562         (free_xmethod_worker_vec): Remove.
13563         * extension.h (enum ext_lang_rc): Move here from
13564         extension-priv.h.
13565         (struct xmethod_worker): Add constructor and destructor.
13566         <data>: Remove.
13567         <value>: Remove.
13568         <invoke, clone, do_get_result_type, do_get_arg_types>: New
13569         virtual pure methods.
13570         <get_arg_types, get_result_type>: New methods.
13571         (xmethod_worker_ptr): Remove typedef.
13572         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13573         (xmethod_worker_vec): Remove typedef.
13574         (xmethod_worker_up): New typedef.
13575         (invoke_xmethod): Remove.
13576         (clone_xmethod_worker): Remove.
13577         (free_xmethod_worker): Remove.
13578         (free_xmethod_worker_vec): Remove.
13579         (get_xmethod_arg_types): Remove.
13580         (get_xmethod_result_type): Remove.
13581         * valops.c (find_method_list): Use std::vector, don't use
13582         intermediate vector.
13583         (value_find_oload_method_list): Use std::vector.
13584         (find_overload_match): Use std::vector.
13585         (find_oload_champ): Use std::vector.
13586         * value.c (value_free): Use operator delete.
13587         (value_of_xmethod): Rename to...
13588         (value_from_xmethod): ... this.  Don't assign
13589         xmethod_worker::value, take rvalue-reference.
13590         (result_type_of_xmethod): Adjust.
13591         (call_xmethod): Adjust.
13592         * value.h: Include extension.h.
13593         (struct xmethod_worker): Don't forward-declare.
13594         (value_of_xmethod): Rename to...
13595         (value_from_xmethod): ... this, take rvalue-reference.
13596         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13597         (struct python_xmethod_worker): ... this, add constructor and
13598         destructor.
13599         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13600         (gdbpy_free_xmethod_worker_data): Rename to...
13601         (python_xmethod_worker::~python_xmethod_worker): ... this and
13602         adjust.
13603         (gdbpy_clone_xmethod_worker_data): Rename to...
13604         (python_xmethod_worker::clone): ... this and adjust.
13605         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13606         temporary vector.
13607         (gdbpy_get_xmethod_arg_types): Rename to...
13608         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13609         (gdbpy_get_xmethod_result_type): Rename to...
13610         (python_xmethod_worker::do_get_result_type): ... this and
13611         adjust.
13612         (gdbpy_invoke_xmethod): Rename to...
13613         (python_xmethod_worker::invoke): ... this and adjust.
13614         (new_python_xmethod_worker): Rename to...
13615         (python_xmethod_worker::python_xmethod_worker): ... this and
13616         adjust.
13617         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13618         Remove.
13619         (gdbpy_free_xmethod_worker_data): Remove.
13620         (gdbpy_get_matching_xmethod_workers): Use std::vector.
13621         (gdbpy_get_xmethod_arg_types): Remove.
13622         (gdbpy_get_xmethod_result_type): Remove.
13623         (gdbpy_invoke_xmethod): Remove.
13624         * python/python.c (python_extension_ops): Remove obsolete
13625         callbacks.
13626
13627 2018-01-05  Pedro Alves  <palves@redhat.com>
13628
13629         PR gdb/18653
13630         * common/signals-state-save-restore.c
13631         (save_original_signals_state): New parameter 'quiet'.  Warn if we
13632         find a custom handler preinstalled, instead of internal erroring.
13633         But only warn if !quiet.
13634         * common/signals-state-save-restore.h
13635         (save_original_signals_state): New parameter 'quiet'.
13636         * main.c (captured_main_1): Move save_original_signals_state call
13637         after option handling, and pass QUIET.
13638
13639 2018-01-05  Pedro Alves  <palves@redhat.com>
13640
13641         * spu-tdep.c (spu_catch_start): Pass
13642         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13643
13644 2018-01-05  Pedro Alves  <palves@redhat.com>
13645
13646         PR gdb/22670
13647         * ada-lang.c (literal_symbol_name_matcher): New function.
13648         (ada_get_symbol_name_matcher): Use it for
13649         symbol_name_match_type::SEARCH_NAME.
13650         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
13651         it down instead of assuming symbol_name_match_type::FULL.
13652         * block.h (block_lookup_symbol): New parameter 'match_type'.
13653         * c-valprint.c (print_unpacked_pointer): Use
13654         lookup_symbol_search_name instead of lookup_symbol.
13655         * compile/compile-object-load.c (get_out_value_type): Pass down
13656         symbol_name_match_type::SEARCH_NAME.
13657         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13658         symbol_name_match_type::FULL.
13659         * cp-support.c (cp_get_symbol_name_matcher): Handle
13660         symbol_name_match_type::SEARCH_NAME.
13661         * infrun.c (insert_exception_resume_breakpoint): Use
13662         lookup_symbol_search_name.
13663         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13664         * psymtab.c (maintenance_check_psymtabs): Use
13665         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13666         * stack.c (print_frame_args): Use lookup_symbol_search_name and
13667         SYMBOL_SEARCH_NAME.
13668         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13669         if symbol_name_match_type::SEARCH_NAME.
13670         (lookup_symbol_in_language): Pass down
13671         symbol_name_match_type::FULL.
13672         (lookup_symbol_search_name): New.
13673         (lookup_language_this): Pass down
13674         symbol_name_match_type::SEARCH_NAME.
13675         (lookup_symbol_aux, lookup_local_symbol): New parameter
13676         'match_type'.  Pass it down.
13677         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13678         (lookup_symbol_search_name): New declaration.
13679         (lookup_symbol_in_block): New 'match_type' parameter.
13680
13681 2018-01-05  Pedro Alves  <palves@redhat.com>
13682
13683         PR gdb/22670
13684         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13685         ada_lookup_symbol.
13686         (ada_lookup_symbol): Reimplement in terms of
13687         ada_lookup_symbol_list, bits factored out from
13688         ada_lookup_encoded_symbol.
13689
13690 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13691
13692         * ada-exp.y (write_object_renaming): When subscripting an array
13693         using a symbol as the index, pass the block in call to
13694         ada_lookup_encoded_symbol when looking that symbol up.
13695
13696 2018-01-05  Jerome Guitton  <guitton@adacore.com>
13697
13698         * ada-lang.c (ada_array_length): Use ada_index_type instead of
13699         TYPE_INDEX_TYPE.
13700
13701 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13702
13703         * ada-lang.c (ada_to_fixed_value_create): Add handling of
13704         the case where VALUE_LVAL (val0) is not lval_memory.
13705
13706 2018-01-05  Xavier Roirand  <roirand@adacore.com>
13707
13708         * ada-valprint.c (print_optional_low_bound): Handle
13709         character-indexed array printing like boolean-indexed array
13710         printing.
13711
13712 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13713
13714         * NEWS: Create a new section for the next release branch.
13715         Rename the section of the current branch, now that it has
13716         been cut.
13717
13718 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13719
13720         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13721         * version.in: Bump version to 8.1.50.DATE-git.
13722
13723 2018-01-03  Xavier Roirand  <roirand@adacore.com>
13724
13725         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13726         Add field.
13727         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13728         Add field.
13729         (default_exception_support_info) <catch_handlers_sym>: Add field.
13730         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13731         (ada_exception_name_addr_1): Add "catch handlers" handling.
13732         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13733         Update all callers.
13734         (create_excep_cond_exprs) <ex>: Add parameter.
13735         (re_set_exception): Update create_excep_cond_exprs call.
13736         (print_it_exception, print_one_exception, print_mention_exception)
13737         (print_recreate_exception): Add "catch handler" handling.
13738         (allocate_location_catch_handlers, re_set_catch_handlers)
13739         (check_status_catch_handlers, print_it_catch_handlers)
13740         (print_one_catch_handlers, print_mention_catch_handlers)
13741         (print_recreate_catch_handlers): New function.
13742         (catch_handlers_breakpoint_ops): New variable.
13743         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13744         Add parameter.  Add "catch handler" handling.
13745         (ada_exception_sym_name, ada_exception_breakpoint_ops):
13746         Add "catch handler" handling.
13747         (ada_exception_catchpoint_cond_string): Add "catch handler"
13748         handling.
13749         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13750         call.
13751         (catch_ada_handlers_command): New function.
13752         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13753         operations structure.
13754         (_initialize_ada_language): Add "catch handlers" command entry.
13755         * NEWS: Document "catch handlers" feature.
13756
13757 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13758
13759         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13760         account when creating the array type of the slice.
13761         (ada_value_slice): Likewise.
13762
13763 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13764
13765         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13766         New enum value.
13767         (create_array_type_with_stride): Add byte_stride_prop parameter.
13768         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13769         New parameter.  Update all callers in this file.
13770         (array_type_has_dynamic_stride): New function.
13771         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13772         of arrays with dynamic byte strides.
13773         * dwarf2read.c (read_array_type): Add support for dynamic
13774         DW_AT_byte_stride attributes.
13775
13776 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13777
13778         * dwarf2read.c (read_unspecified_type): Treat
13779         DW_TAG_enumeration_type DIEs from Ada units as stubs.
13780
13781 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13782
13783         Update copyright year range in all GDB files.
13784
13785 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13786
13787         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13788         and gdb/testsuite/gdb.base/step-line.c.
13789
13790 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13791
13792         * copyright.py (main): Dump the contents of
13793         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13794         even if BY_HAND is empty.
13795
13796 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13797
13798         * top.c (print_gdb_version): Update Copyright year in version
13799         message.
13800
13801 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13802
13803         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13804
13805 For older changes see ChangeLog-2017.
13806 \f
13807 Local Variables:
13808 mode: change-log
13809 left-margin: 8
13810 fill-column: 74
13811 version-control: never
13812 coding: utf-8
13813 End: