Document the 'info proc files' command.
[external/binutils.git] / gdb / ChangeLog
1 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
2
3         * NEWS: Mention 'info proc files' command.
4
5 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
6
7         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
8         descriptors for IP_FILES and IP_ALL.
9
10 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
11
12         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
13         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
14         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
15         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
16         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
17         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
18         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
19         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
20         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
21         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
22         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
23         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
24         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
25         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
26         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
27         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
28         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
29         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
30         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
31         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
32         (struct fbsd_sockaddr_un): New types.
33         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
34         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
35         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
36         (fbsd_core_info_proc_files): New functions.
37         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
38         IP_ALL.
39         * fbsd-tdep.h (fbsd_info_proc_files_header)
40         (fbsd_info_proc_files_entry): New.
41
42 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
43
44         * defs.h (enum info_proc_what) [IP_FILES]: New value.
45         * infcmd.c (info_proc_cmd_files): New function.
46         (_initialize_infcmd): Register 'info proc files' command.
47
48 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
49
50         * gnulib/aclocal-m4-deps.mk: Re-generate.
51         * gnulib/aclocal.m4: Re-generate.
52         * gnulib/config.in: Re-generate.
53         * gnulib/configure: Re-generate.
54         * gnulib/import/Makefile.am: Re-generate.
55         * gnulib/import/Makefile.in: Re-generate.
56         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
57         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
58         * gnulib/import/arpa_inet.in.h: New file.
59         * gnulib/import/inet_ntop.c: New file.
60         * gnulib/import/m4/arpa_inet_h.m4: New file.
61         * gnulib/import/m4/inet_ntop.m4: New file.
62         * gnulib/import/m4/netinet_in_h.m4: New file.
63         * gnulib/import/m4/socklen.m4: New file.
64         * gnulib/import/m4/sockpfaf.m4: New file.
65         * gnulib/import/m4/stdalign.m4: New file.
66         * gnulib/import/m4/sys_uio_h.m4: New file.
67         * gnulib/import/netinet_in.in.h: New file.
68         * gnulib/import/stdalign.in.h: New file.
69         * gnulib/import/sys_socket.c: New file.
70         * gnulib/import/sys_socket.in.h: New file.
71         * gnulib/import/sys_uio.in.h: New file.
72         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
73         module.
74
75 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
76
77         * gnulib/aclocal-m4-deps.mk: New file.
78         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
79         deterministically.
80
81 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
82
83         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
84         KVE_PATH.
85
86 2018-09-18  Tom Tromey  <tom@tromey.com>
87
88         * compile/compile-object-load.c (struct
89         link_hash_table_cleanup_data): Add constructor and destructor.
90         Use DISABLE_COPY_AND_ASSIGN.
91         (~link_hash_table_cleanup_data): Rename from
92         link_hash_table_free.  Now a destructor.
93         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
94
95 2018-09-18  Tom Tromey  <tom@tromey.com>
96
97         * compile/compile-object-run.c (do_module_cleanup): Use delete.
98         * compile/compile-object-load.c (struct munmap_list): Move to
99         header file.
100         (munmap_list::add): Rename from munmap_list_add; rewrite.
101         (munmap_list::~munmap_list): Rename from munmap_list_free.
102         (munmap_listp_free_cleanup): Remove.
103         (compile_object_load): Update.
104         * compile/compile-object-load.h (struct munmap_list): Move from
105         compile-object-load.c.  Rewrite.
106
107 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
108
109         * aarch64-tdep.c (pass_in_v): Use register size.
110         (aarch64_extract_return_value): Likewise.
111         (aarch64_store_return_value): Likewise.
112
113 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
114
115         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
116         rlim_t.
117
118 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
119
120         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
121         Fix short help line.
122
123 2018-09-17  Tom Tromey  <tom@tromey.com>
124
125         PR python/20445:
126         * configure: Rebuild.
127         * configure.ac: Conditionally use -DNDEBUG for Python.
128
129 2018-09-17  Tom Tromey  <tom@tromey.com>
130
131         * configure: Rebuild.
132         * configure.ac: Use gmp as a library dependency when checking for
133         mpfr.
134
135 2018-09-17  Pedro Alves  <palves@redhat.com>
136
137         * python/py-inferior.c (find_inferior_object): Delete.
138
139 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
140
141         * compile/compile-cplus-types.c
142         (compile_cplus_instance::enter_scope): Don't use new_scope after
143         std::move.
144
145 2018-09-17  Tom Tromey  <tom@tromey.com>
146
147         * common/pathstuff.c (get_standard_cache_dir): Use
148         ~/Library/Caches on macOS.
149         * common/pathstuff.h (get_standard_cache_dir): Update comment.
150
151 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
152
153         PR python/23669
154         * breakpoint.c (commands_cmd_element): New.
155         (_initialize_breakpoint): Assign commands_cmd_element.
156         * breakpoint.h (commands_cmd_element): New.
157         * cli/cli-script.c (while_cmd_element, if_command,
158         define_cmd_element): New.
159         (command_name_equals): Remove.
160         (process_next_line): Compare commands by pointer, not by name.
161         (_initialize_cli_script): Assign the various cmd_list_element
162         variables.
163         * compile/compile.c (compile_cmd_element): New.
164         (_initialize_compile): Assign compile_cmd_element.
165         * compile/compile.h (compile_cmd_element): New.
166         * guile/guile.c (guile_cmd_element): New.
167         (install_gdb_commands): Assign guile_cmd_element.
168         * guile/guile.h (guile_cmd_element): New.
169         * python/python.c (python_cmd_element): New.
170         (_initialize_python): Assign python_cmd_element.
171         * python/python.h (python_cmd_element): New.
172         * tracepoint.c (while_stepping_cmd_element): New.
173         (_initialize_tracepoint): Assign while_stepping_cmd_element.
174         * tracepoint.h (while_stepping_cmd_element): New.
175
176 2018-09-17  Tom Tromey  <tom@tromey.com>
177
178         * infrun.c (save_infcall_suspend_state): Return
179         infcall_suspend_state_up.
180         (save_infcall_control_state): Return infcall_control_state_up.
181         * inferior.h (save_infcall_suspend_state)
182         (save_infcall_control_state): Declare later.  Return unique
183         pointers.
184
185 2018-09-17  Tom Tromey  <tom@tromey.com>
186
187         * infrun.c (struct stop_context): Declare constructor,
188         destructor, "changed" method.
189         (stop_context::stop_context): Rename from save_stop_context.
190         (stop_context::~stop_context): Rename from
191         release_stop_context_cleanup.
192         (normal_stop): Update.
193         (stop_context::changed): Rename from stop_context_changed.  Return
194         bool.
195
196 2018-09-17  Tom Tromey  <tom@tromey.com>
197
198         * inferior.h (struct infcall_suspend_state_deleter): New.
199         (infcall_suspend_state_up): New typedef.
200         (struct infcall_control_state_deleter): New.
201         (infcall_control_state_up): New typedef.
202         (make_cleanup_restore_infcall_suspend_state)
203         (make_cleanup_restore_infcall_control_state): Don't declare.
204         * infcall.c (call_function_by_hand_dummy): Update.
205         * infrun.c (do_restore_infcall_suspend_state_cleanup)
206         (make_cleanup_restore_infcall_suspend_state): Remove.
207         (do_restore_infcall_control_state_cleanup)
208         (make_cleanup_restore_infcall_control_state): Remove.
209
210 2018-09-17  Tom Tromey  <tom@tromey.com>
211
212         * gdbthread.h (struct thread_control_state): Add initializer.
213         (class thread_info) <control>: Remove initializer.
214         * inferior.h (struct inferior_control_state): Add initializer.
215         (class inferior) <control>: Remove initializer.
216         (exit_inferior_1): Update.
217         * infrun.c (struct infcall_control_state): Add constructors.
218         (save_infcall_control_state): Use new.
219         (restore_infcall_control_state, discard_infcall_control_state):
220         Use delete.
221
222 2018-09-17  Tom Tromey  <tom@tromey.com>
223
224         * infrun.c (struct infcall_suspend_state) <registers>: Now a
225         unique_ptr.
226         <siginfo_data>: Now a unique_xmalloc_ptr.
227         (save_infcall_suspend_state, restore_infcall_suspend_state)
228         (discard_infcall_suspend_state)
229         (get_infcall_suspend_state_regcache): Update.
230
231 2018-09-17  Tom Tromey  <tom@tromey.com>
232
233         * gdbthread.h (struct thread_suspend_state): Add initializers.
234         (class thread_info) <suspend>: Remove initializer.
235         * infrun.c (struct infcall_suspend_state): Add initializers.
236         (save_infcall_suspend_state): Use new.
237         (discard_infcall_suspend_state): Use delete.
238
239 2018-09-16  Tom Tromey  <tom@tromey.com>
240
241         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
242         Remove.
243         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
244         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
245         (py_varobj_iter_new): Likewise.
246         (py_varobj_get_iterator): Use gdbpy_ref.
247
248 2018-09-16  Tom Tromey  <tom@tromey.com>
249
250         * python/py-threadevent.c (py_get_event_thread): Simplify.
251         * python/py-inferior.c (infpy_thread_from_thread_handle):
252         Return immediately after calling thread_to_thread_object.  Use
253         Py_RETURN_NONE.
254         (thread_to_thread_object): Set the exception on a NULL return.
255
256 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
257
258         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
259
260 2018-09-16  Tom Tromey  <tom@tromey.com>
261
262         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
263         Remove.
264
265 2018-09-16  Tom Tromey  <tom@tromey.com>
266
267         * python/python-internal.h (thread_to_thread_object): Change
268         return type.
269         * python/py-inferior.c (thread_to_thread_object): Return a new
270         reference.
271         (infpy_thread_from_thread_handle): Update.
272         * python/py-infthread.c (gdbpy_selected_thread): Update.
273         * python/py-stopevent.c (create_stop_event_object): Update.
274         * python/py-threadevent.c (py_get_event_thread): Return a new
275         reference.
276         (py_get_event_thread): Update.
277         * python/py-event.h (py_get_event_thread): Change return type.
278         * python/py-continueevent.c (create_continue_event_object):
279         Update.
280
281 2018-09-16  Tom Tromey  <tom@tromey.com>
282
283         * python/py-progspace.c (pspy_get_objfiles): Update.
284         * python/python-internal.h (objfile_to_objfile_object): Change
285         return type.
286         * python/py-newobjfileevent.c (create_new_objfile_event_object):
287         Update.
288         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
289         Update.
290         * python/python.c (gdbpy_get_current_objfile): Update.
291         (gdbpy_objfiles): Update.
292         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
293         Update.
294         (objfile_to_objfile_object): Return a new reference.
295         * python/py-symtab.c (stpy_get_objfile): Update.
296         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
297         Update.
298
299 2018-09-16  Tom Tromey  <tom@tromey.com>
300
301         * python/py-inferior.c (infpy_get_progspace): Update.
302         * python/python-internal.h (pspace_to_pspace_object): Change
303         return type.
304         * python/py-newobjfileevent.c
305         (create_clear_objfiles_event_object): Update.
306         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
307         Update.
308         * python/python.c (gdbpy_get_current_progspace): Update.
309         (gdbpy_progspaces): Update.
310         * python/py-progspace.c (pspace_to_pspace_object): Return a new
311         reference.
312         * python/py-objfile.c (objfpy_get_progspace): Update.
313         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
314         Update.
315
316 2018-09-16  Tom Tromey  <tom@tromey.com>
317
318         * python/lib/gdb/__init__.py (current_progspace, objfiles)
319         (solib_name, block_for_pc, find_pc_line): New functions.
320         (execute_unwinders): Update.
321         * python/py-block.c (gdbpy_block_for_pc): Remove.
322         * python/py-inferior.c (infpy_get_progspace): New function.
323         (inferior_object_getset) <progspace>: Add.
324         * python/py-progspace.c (pspy_objfiles): Rewrite.
325         (pspy_solib_name, pspy_block_for_pc)
326         (pspy_find_pc_line, pspy_is_valid): New functions.
327         (progspace_object_methods): Add entries for solib_name,
328         block_for_pc, find_pc_line, is_valid.
329         * python/python-internal.h (gdbpy_block_for_pc)
330         (build_objfiles_list): Don't declare.
331         * python/python.c: Don't include solib.h.
332         (gdbpy_solib_name, gdbpy_find_pc_line)
333         (gdbpy_get_current_progspace, build_objfiles_list)
334         (gdbpy_objfiles): Remove.
335         (GdbMethods) <current_progspace, objfiles, block_for_pc,
336         solib_name, find_pc_line>: Remove entries.
337
338 2018-09-16  Tom Tromey  <tom@tromey.com>
339
340         * top.c (new_ui_command): Use GNU style for metasyntactic
341         variables.
342         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
343         variables.
344         * maint.c (maintenance_translate_address): Remove "<>" around
345         text.
346         * interps.c (interpreter_exec_cmd): Use GNU style for
347         metasyntactic variables.
348         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
349         metasyntactic variables.
350         * tracepoint.c (tfind_range_command): Use GNU style for
351         metasyntactic variables.
352         (tfind_outside_command): Likewise.
353         (_initialize_tracepoint): Likewise.
354         * remote.c (extended_remote_target::create_inferior): Use GNU
355         style for metasyntactic variables.
356         * sparc64-tdep.c (adi_examine_command): Use GNU style for
357         metasyntactic variables.
358         (adi_assign_command): Likewise.
359
360 2018-09-16  Tom Tromey  <tom@tromey.com>
361
362         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
363         metasyntactic variables.  Print message if no disassembler options
364         are available.
365
366 2018-09-15  Tom Tromey  <tom@tromey.com>
367
368         * infcmd.c (get_inferior_args): Return const char *.
369         * inferior.h (get_inferior_args): Return type now const.
370         * linux-tdep.c (linux_fill_prpsinfo): Update.
371         * procfs.c (procfs_target::make_corefile_notes): Update.
372
373 2018-09-07  Tom Tromey  <tom@tromey.com>
374
375         * python/python.c (execute_gdb_command): Call bpstat_do_actions
376         inside the TRY.
377
378 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
379
380         * nios2-tdep.c (nios2_type_align): New.
381         (nios2_gdb_arch_init): Install type_align hook.
382
383 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
384
385         * eval.c (fake_method::fake_method): Call xzalloc directly for a
386         type that is neither object file owned, nor gdbarch owned.
387         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
388         gdbarch is non-NULL.
389         (alloc_type_instance): Allocate non-objfile owned types on the
390         gdbarch obstack.
391         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
392         using TYPE_ALLOC to ensure memory is allocated on the correct
393         obstack.
394         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
395         obstack, or the gdbarch obstack.
396         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
397
398 2018-09-14  Tom Tromey  <tom@tromey.com>
399
400         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
401         block.
402
403 2018-09-14  Tom Tromey  <tom@tromey.com>
404
405         * nat/fork-inferior.c (get_startup_shell): Remove "static".
406
407 2018-09-13  Tom Tromey  <tom@tromey.com>
408
409         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
410         static.
411
412 2018-09-13  Tom Tromey  <tom@tromey.com>
413
414         * exec.c (try_open_exec_file): Use std::string.
415
416 2018-09-13  Tom Tromey  <tom@tromey.com>
417
418         * utils.h (gdb_bfd_errmsg): Return std::string.
419         * exec.c (exec_file_attach): Update.
420         * compile/compile-object-load.c (compile_object_load): Update.
421         * utils.c (gdb_bfd_errmsg): Return std::string.
422
423 2018-09-13  Tom Tromey  <tom@tromey.com>
424
425         * procfs.c (struct procinfo_deleter): New.
426         (procinfo_up): New typedef.
427         (do_destroy_procinfo_cleanup): Remove.
428         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
429
430 2018-09-13  Tom Tromey  <tom@tromey.com>
431
432         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
433
434 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
435 2018-09-13  Tom Tromey  <tom@tromey.com>
436
437         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
438         (pspy_get_objfiles): New function.
439         (progspace_object_methods): New.
440         (pspace_object_type): Add tp_methods callback.
441         * python/python-internal.h (build_objfiles_list): New
442         declaration.
443         * python/python.c (build_objfiles_list): New function.
444         (gdbpy_objfiles): Implement using build_objfiles_list.
445         * NEWS: Mention the Progspace.objfiles method.
446
447 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
448
449         * python/py-inferior.c (infpy_get_progspace): New function.
450         (inferior_object_getset): Add progspace property.
451         * NEWS: Mention the new property.
452
453 2018-09-13  Tom Tromey  <tom@tromey.com>
454
455         PR rust/23650:
456         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
457
458 2018-09-13  Tom Tromey  <tom@tromey.com>
459
460         PR rust/23626:
461         * rust-lang.c (rust_enum_variant): Now static.
462         (rust_empty_enum_p): New function.
463         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
464         Handle empty enum.
465
466 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
467
468         * python/py-inferior.c (infpy_repr): New.
469         (inferior_object_type): Register infpy_repr.
470         * python/py-objfile.c (objfpy_repr): New.
471         (objfile_object_type): Register objfpy_repr.
472
473 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
474
475         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
476
477 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
478
479         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
480         typo.
481
482 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
483
484         * common/common-utils.c: Don't include '<sys/stat.h>'.
485         (is_regular_file): Move to...
486         * common/filestuff.c (is_regular_file): ... here.
487         * common/common-utils.h (is_regular_file): Move to...
488         * common/filestuff.h (is_regular_file): ... here.
489
490 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
491
492         * skip.c (debug_skip): New variable.
493         (skiplist_entry::do_skip_file_p): Add debug output.
494         (skiplist_entry::do_skip_gfile_p): Likewise.
495         (skiplist_entry::skip_function_p): Likewise.
496         (_initialize_step_skip): Create debug command.
497         * NEWS: Mention set/show debug skip.
498
499 2018-09-11  Xavier Roirand  <roirand@adacore.com>
500
501         * darwin-nat.c (should_disable_startup_with_shell):
502         New function.
503         (darwin_nat_target::create_inferior): Add call.
504
505 2018-09-11  Xavier Roirand  <roirand@adacore.com>
506
507         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
508         inf_port, msg_state>: Initialize.
509         (struct darwin_thread_info) <signaled, single_step>: Change
510         type and initialize.
511         (struct darwin_thread_info) <event>: Initialize.
512
513 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
514
515         PR gdb/23555
516         PR gdb/23558
517         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
518         guesses.
519
520 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
521
522         Revert:
523         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
524
525         PR gdb/23555
526         PR gdb/23558
527         * gnulib/aclocal.m4: Regenerate.
528         * gnulib/config.in: Regenerate.
529         * gnulib/configure: Regenerate.
530         * gnulib/import/Makefile.am: Update.
531         * gnulib/import/Makefile.in: Update.
532         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
533         * gnulib/import/_Noreturn.h: ... this.
534         * gnulib/import/alloca.in.h: Update.
535         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
536         * gnulib/import/arg-nonnull.h: ... this.
537         * gnulib/import/assure.h: Update.
538         * gnulib/import/at-func.c: Update.
539         * gnulib/import/basename-lgpl.c: Update.
540         * gnulib/import/extra/snippet/c++defs.h: Rename to...
541         * gnulib/import/c++defs.h: ... this.
542         * gnulib/import/canonicalize-lgpl.c: Update.
543         * gnulib/import/cdefs.h: Update.
544         * gnulib/import/chdir-long.c: Update.
545         * gnulib/import/chdir-long.h: Update.
546         * gnulib/import/cloexec.c: Update.
547         * gnulib/import/cloexec.h: Update.
548         * gnulib/import/close.c: Update.
549         * gnulib/import/closedir.c: Update.
550         * gnulib/import/config.charset: Update.
551         * gnulib/import/dirent-private.h: Update.
552         * gnulib/import/dirent.in.h: Update.
553         * gnulib/import/dirfd.c: Update.
554         * gnulib/import/dirname-lgpl.c: Update.
555         * gnulib/import/dirname.h: Update.
556         * gnulib/import/dosname.h: Update.
557         * gnulib/import/dup-safer-flag.c: Update.
558         * gnulib/import/dup-safer.c: Update.
559         * gnulib/import/dup.c: Update.
560         * gnulib/import/dup2.c: Update.
561         * gnulib/import/errno.in.h: Update.
562         * gnulib/import/error.c: Update.
563         * gnulib/import/error.h: Update.
564         * gnulib/import/exitfail.c: Update.
565         * gnulib/import/exitfail.h: Update.
566         * gnulib/import/extra/update-copyright: Update.
567         * gnulib/import/fchdir.c: Update.
568         * gnulib/import/fcntl.c: Update.
569         * gnulib/import/fcntl.in.h: Update.
570         * gnulib/import/fd-hook.c: Update.
571         * gnulib/import/fd-hook.h: Update.
572         * gnulib/import/fd-safer-flag.c: Update.
573         * gnulib/import/fd-safer.c: Update.
574         * gnulib/import/fdopendir.c: Update.
575         * gnulib/import/filename.h: Update.
576         * gnulib/import/filenamecat-lgpl.c: Update.
577         * gnulib/import/filenamecat.h: Update.
578         * gnulib/import/flexmember.h: Update.
579         * gnulib/import/float+.h: Update.
580         * gnulib/import/float.c: Update.
581         * gnulib/import/float.in.h: Update.
582         * gnulib/import/fnmatch.c: Update.
583         * gnulib/import/fnmatch.in.h: Update.
584         * gnulib/import/fnmatch_loop.c: Update.
585         * gnulib/import/fpucw.h: Update.
586         * gnulib/import/frexp.c: Update.
587         * gnulib/import/frexpl.c: Update.
588         * gnulib/import/fstat.c: Update.
589         * gnulib/import/fstatat.c: Update.
590         * gnulib/import/getcwd-lgpl.c: Update.
591         * gnulib/import/getcwd.c: Update.
592         * gnulib/import/getdtablesize.c: Update.
593         * gnulib/import/getlogin_r.c: Update.
594         * gnulib/import/getprogname.c: Update.
595         * gnulib/import/getprogname.h: Update.
596         * gnulib/import/gettext.h: Update.
597         * gnulib/import/gettimeofday.c: Update.
598         * gnulib/import/glob-libc.h: Update.
599         * gnulib/import/glob.c: Update.
600         * gnulib/import/glob.in.h: Update.
601         * gnulib/import/glob_internal.h: Update.
602         * gnulib/import/glob_pattern_p.c: Update.
603         * gnulib/import/globfree.c: Update.
604         * gnulib/import/hard-locale.c: Update.
605         * gnulib/import/hard-locale.h: Update.
606         * gnulib/import/intprops.h: Update.
607         * gnulib/import/inttypes.in.h: Update.
608         * gnulib/import/isnan.c: Update.
609         * gnulib/import/isnand-nolibm.h: Update.
610         * gnulib/import/isnand.c: Update.
611         * gnulib/import/isnanl-nolibm.h: Update.
612         * gnulib/import/isnanl.c: Update.
613         * gnulib/import/itold.c: Update.
614         * gnulib/import/libc-config.h: Update.
615         * gnulib/import/limits.in.h: Update.
616         * gnulib/import/localcharset.c: Update.
617         * gnulib/import/localcharset.h: Update.
618         * gnulib/import/localtime-buffer.c: Update.
619         * gnulib/import/localtime-buffer.h: Update.
620         * gnulib/import/lstat.c: Update.
621         * gnulib/import/m4/00gnulib.m4: Update.
622         * gnulib/import/m4/__inline.m4: Update.
623         * gnulib/import/m4/absolute-header.m4: Update.
624         * gnulib/import/m4/alloca.m4: Update.
625         * gnulib/import/m4/builtin-expect.m4: Update.
626         * gnulib/import/m4/canonicalize.m4: Update.
627         * gnulib/import/m4/chdir-long.m4: Update.
628         * gnulib/import/m4/close.m4: Update.
629         * gnulib/import/m4/closedir.m4: Update.
630         * gnulib/import/m4/configmake.m4: Update.
631         * gnulib/import/m4/d-ino.m4: Update.
632         * gnulib/import/m4/d-type.m4: Update.
633         * gnulib/import/m4/dirent_h.m4: Update.
634         * gnulib/import/m4/dirfd.m4: Update.
635         * gnulib/import/m4/dirname.m4: Update.
636         * gnulib/import/m4/double-slash-root.m4: Update.
637         * gnulib/import/m4/dup.m4: Update.
638         * gnulib/import/m4/dup2.m4: Update.
639         * gnulib/import/m4/eealloc.m4: Update.
640         * gnulib/import/m4/environ.m4: Update.
641         * gnulib/import/m4/errno_h.m4: Update.
642         * gnulib/import/m4/error.m4: Update.
643         * gnulib/import/m4/exponentd.m4: Update.
644         * gnulib/import/m4/exponentl.m4: Update.
645         * gnulib/import/m4/extensions.m4: Update.
646         * gnulib/import/m4/extern-inline.m4: Update.
647         * gnulib/import/m4/fchdir.m4: Update.
648         * gnulib/import/m4/fcntl-o.m4: Update.
649         * gnulib/import/m4/fcntl.m4: Update.
650         * gnulib/import/m4/fcntl_h.m4: Update.
651         * gnulib/import/m4/fdopendir.m4: Update.
652         * gnulib/import/m4/filenamecat.m4: Update.
653         * gnulib/import/m4/flexmember.m4: Update.
654         * gnulib/import/m4/float_h.m4: Update.
655         * gnulib/import/m4/fnmatch.m4: Update.
656         * gnulib/import/m4/fnmatch_h.m4: Update.
657         * gnulib/import/m4/fpieee.m4: Update.
658         * gnulib/import/m4/frexp.m4: Update.
659         * gnulib/import/m4/frexpl.m4: Update.
660         * gnulib/import/m4/fstat.m4: Update.
661         * gnulib/import/m4/fstatat.m4: Update.
662         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
663         * gnulib/import/m4/getcwd-path-max.m4: Update.
664         * gnulib/import/m4/getcwd.m4: Update.
665         * gnulib/import/m4/getdtablesize.m4: Update.
666         * gnulib/import/m4/getlogin.m4: Update.
667         * gnulib/import/m4/getlogin_r.m4: Update.
668         * gnulib/import/m4/getpagesize.m4: Update.
669         * gnulib/import/m4/getprogname.m4: Update.
670         * gnulib/import/m4/gettimeofday.m4: Update.
671         * gnulib/import/m4/glibc21.m4: Update.
672         * gnulib/import/m4/glob.m4: Update.
673         * gnulib/import/m4/glob_h.m4: Update.
674         * gnulib/import/m4/gnulib-cache.m4: Update.
675         * gnulib/import/m4/gnulib-common.m4: Update.
676         * gnulib/import/m4/gnulib-comp.m4: Update.
677         * gnulib/import/m4/gnulib-tool.m4: Update.
678         * gnulib/import/m4/hard-locale.m4: Update.
679         * gnulib/import/m4/include_next.m4: Update.
680         * gnulib/import/m4/inttypes-pri.m4: Update.
681         * gnulib/import/m4/inttypes.m4: Update.
682         * gnulib/import/m4/isnand.m4: Update.
683         * gnulib/import/m4/isnanl.m4: Update.
684         * gnulib/import/m4/largefile.m4: Update.
685         * gnulib/import/m4/limits-h.m4: Update.
686         * gnulib/import/m4/localcharset.m4: Update.
687         * gnulib/import/m4/locale-fr.m4: Update.
688         * gnulib/import/m4/locale-ja.m4: Update.
689         * gnulib/import/m4/locale-zh.m4: Update.
690         * gnulib/import/m4/localtime-buffer.m4: Update.
691         * gnulib/import/m4/longlong.m4: Update.
692         * gnulib/import/m4/lstat.m4: Update.
693         * gnulib/import/m4/malloc.m4: Update.
694         * gnulib/import/m4/malloca.m4: Update.
695         * gnulib/import/m4/math_h.m4: Update.
696         * gnulib/import/m4/mbrtowc.m4: Update.
697         * gnulib/import/m4/mbsinit.m4: Update.
698         * gnulib/import/m4/mbsrtowcs.m4: Update.
699         * gnulib/import/m4/mbstate_t.m4: Update.
700         * gnulib/import/m4/memchr.m4: Update.
701         * gnulib/import/m4/memmem.m4: Update.
702         * gnulib/import/m4/mempcpy.m4: Update.
703         * gnulib/import/m4/memrchr.m4: Update.
704         * gnulib/import/m4/mkdir.m4: Update.
705         * gnulib/import/m4/mkstemp.m4: Update.
706         * gnulib/import/m4/mmap-anon.m4: Update.
707         * gnulib/import/m4/mode_t.m4: Update.
708         * gnulib/import/m4/msvc-inval.m4: Update.
709         * gnulib/import/m4/msvc-nothrow.m4: Update.
710         * gnulib/import/m4/multiarch.m4: Update.
711         * gnulib/import/m4/nocrash.m4: Update.
712         * gnulib/import/m4/off_t.m4: Update.
713         * gnulib/import/m4/onceonly.m4: Update.
714         * gnulib/import/m4/open-cloexec.m4: Update.
715         * gnulib/import/m4/open.m4: Update.
716         * gnulib/import/m4/openat.m4: Update.
717         * gnulib/import/m4/opendir.m4: Update.
718         * gnulib/import/m4/pathmax.m4: Update.
719         * gnulib/import/m4/rawmemchr.m4: Update.
720         * gnulib/import/m4/readdir.m4: Update.
721         * gnulib/import/m4/readlink.m4: Update.
722         * gnulib/import/m4/realloc.m4: Update.
723         * gnulib/import/m4/rename.m4: Update.
724         * gnulib/import/m4/rewinddir.m4: Update.
725         * gnulib/import/m4/rmdir.m4: Update.
726         * gnulib/import/m4/save-cwd.m4: Update.
727         * gnulib/import/m4/secure_getenv.m4: Update.
728         * gnulib/import/m4/setenv.m4: Update.
729         * gnulib/import/m4/signal_h.m4: Update.
730         * gnulib/import/m4/ssize_t.m4: Update.
731         * gnulib/import/m4/stat-time.m4: Update.
732         * gnulib/import/m4/stat.m4: Update.
733         * gnulib/import/m4/std-gnu11.m4: Update.
734         * gnulib/import/m4/stdbool.m4: Update.
735         * gnulib/import/m4/stddef_h.m4: Update.
736         * gnulib/import/m4/stdint.m4: Update.
737         * gnulib/import/m4/stdio_h.m4: Update.
738         * gnulib/import/m4/stdlib_h.m4: Update.
739         * gnulib/import/m4/strchrnul.m4: Update.
740         * gnulib/import/m4/strdup.m4: Update.
741         * gnulib/import/m4/strerror.m4: Update.
742         * gnulib/import/m4/string_h.m4: Update.
743         * gnulib/import/m4/strstr.m4: Update.
744         * gnulib/import/m4/strtok_r.m4: Update.
745         * gnulib/import/m4/sys_socket_h.m4: Update.
746         * gnulib/import/m4/sys_stat_h.m4: Update.
747         * gnulib/import/m4/sys_time_h.m4: Update.
748         * gnulib/import/m4/sys_types_h.m4: Update.
749         * gnulib/import/m4/tempname.m4: Update.
750         * gnulib/import/m4/time_h.m4: Update.
751         * gnulib/import/m4/unistd-safer.m4: Update.
752         * gnulib/import/m4/unistd_h.m4: Update.
753         * gnulib/import/m4/warn-on-use.m4: Update.
754         * gnulib/import/m4/wchar_h.m4: Update.
755         * gnulib/import/m4/wchar_t.m4: Update.
756         * gnulib/import/m4/wctype_h.m4: Update.
757         * gnulib/import/m4/wint_t.m4: Update.
758         * gnulib/import/malloc.c: Update.
759         * gnulib/import/malloc/scratch_buffer.h: Update.
760         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
761         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
762         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
763         * gnulib/import/malloca.c: Update.
764         * gnulib/import/malloca.h: Update.
765         * gnulib/import/malloca.valgrind: Update.
766         * gnulib/import/math.in.h: Update.
767         * gnulib/import/mbrtowc.c: Update.
768         * gnulib/import/mbsinit.c: Update.
769         * gnulib/import/mbsrtowcs-impl.h: Update.
770         * gnulib/import/mbsrtowcs-state.c: Update.
771         * gnulib/import/mbsrtowcs.c: Update.
772         * gnulib/import/memchr.c: Update.
773         * gnulib/import/memmem.c: Update.
774         * gnulib/import/mempcpy.c: Update.
775         * gnulib/import/memrchr.c: Update.
776         * gnulib/import/mkdir.c: Update.
777         * gnulib/import/mkstemp.c: Update.
778         * gnulib/import/msvc-inval.c: Update.
779         * gnulib/import/msvc-inval.h: Update.
780         * gnulib/import/msvc-nothrow.c: Update.
781         * gnulib/import/msvc-nothrow.h: Update.
782         * gnulib/import/open.c: Update.
783         * gnulib/import/openat-die.c: Update.
784         * gnulib/import/openat-priv.h: Update.
785         * gnulib/import/openat-proc.c: Update.
786         * gnulib/import/openat.c: Update.
787         * gnulib/import/openat.h: Update.
788         * gnulib/import/opendir.c: Update.
789         * gnulib/import/pathmax.h: Update.
790         * gnulib/import/pipe-safer.c: Update.
791         * gnulib/import/rawmemchr.c: Update.
792         * gnulib/import/readdir.c: Update.
793         * gnulib/import/readlink.c: Update.
794         * gnulib/import/realloc.c: Update.
795         * gnulib/import/ref-add.sin: Update.
796         * gnulib/import/ref-del.sin: Update.
797         * gnulib/import/rename.c: Update.
798         * gnulib/import/rewinddir.c: Update.
799         * gnulib/import/rmdir.c: Update.
800         * gnulib/import/same-inode.h: Update.
801         * gnulib/import/save-cwd.c: Update.
802         * gnulib/import/save-cwd.h: Update.
803         * gnulib/import/scratch_buffer.h: Update.
804         * gnulib/import/secure_getenv.c: Update.
805         * gnulib/import/setenv.c: Update.
806         * gnulib/import/signal.in.h: Update.
807         * gnulib/import/stat-time.c: Update.
808         * gnulib/import/stat-time.h: Update.
809         * gnulib/import/stat-w32.c: Update.
810         * gnulib/import/stat-w32.h: Update.
811         * gnulib/import/stat.c: Update.
812         * gnulib/import/stdbool.in.h: Update.
813         * gnulib/import/stddef.in.h: Update.
814         * gnulib/import/stdint.in.h: Update.
815         * gnulib/import/stdio.in.h: Update.
816         * gnulib/import/stdlib.in.h: Update.
817         * gnulib/import/str-two-way.h: Update.
818         * gnulib/import/strchrnul.c: Update.
819         * gnulib/import/strdup.c: Update.
820         * gnulib/import/streq.h: Update.
821         * gnulib/import/strerror-override.c: Update.
822         * gnulib/import/strerror-override.h: Update.
823         * gnulib/import/strerror.c: Update.
824         * gnulib/import/string.in.h: Update.
825         * gnulib/import/stripslash.c: Update.
826         * gnulib/import/strnlen1.c: Update.
827         * gnulib/import/strnlen1.h: Update.
828         * gnulib/import/strstr.c: Update.
829         * gnulib/import/strtok_r.c: Update.
830         * gnulib/import/sys_stat.in.h: Update.
831         * gnulib/import/sys_time.in.h: Update.
832         * gnulib/import/sys_types.in.h: Update.
833         * gnulib/import/tempname.c: Update.
834         * gnulib/import/tempname.h: Update.
835         * gnulib/import/time.in.h: Update.
836         * gnulib/import/unistd--.h: Update.
837         * gnulib/import/unistd-safer.h: Update.
838         * gnulib/import/unistd.in.h: Update.
839         * gnulib/import/unsetenv.c: Update.
840         * gnulib/import/verify.h: Update.
841         * gnulib/import/extra/snippet/warn-on-use.h: Update.
842         * gnulib/import/wchar.in.h: Update.
843         * gnulib/import/wctype.in.h: Update.
844         * gnulib/import/xalloc-oversized.h: Update.
845         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
846         "53e2c179f26a890fa6685af4b6c1397ee370433b".
847
848 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
849
850         * record-btrace.c (get_thread_current_frame): Remove
851         old_inferior_ptid.
852
853 2018-09-10  Jerome Guitton  <guitton@adacore.com>
854
855         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
856         with check_tag to 1 if and only if the type is tagged and the
857         component being searched cannot been found in the current
858         view. Otherwise, always call ada_to_fixed_type with
859         check_tag to 0.
860
861 2018-09-10  Xavier Roirand  <roirand@adacore.com>
862
863         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
864         declaration.
865         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
866         * ada-varobj.c (ada_varobj_get_number_of_children,
867         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
868
869 2018-09-10  Xavier Roirand  <roirand@adacore.com>
870
871         * ada-valprint.c (ada_value_print): Use type instead of
872         enclosing type.
873
874 2018-09-10  Xavier Roirand  <roirand@adacore.com>
875
876         * ada-lang.c (ada_value_subscript): Handle case when parameter is
877         an array of access to unconstrained array.
878
879 2018-09-10  Xavier Roirand  <roirand@adacore.com>
880
881         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
882         (ada_check_typedef): Use it.
883
884 2018-09-10  Xavier Roirand  <roirand@adacore.com>
885
886         * ada-varobj.c (ada_varobj_describe_struct_child)
887         (ada_varobj_describe_child): Handle union case like struct one.
888
889 2018-09-10  Tom Tromey  <tom@tromey.com>
890
891         PR python/18380:
892         * python/python.c (_initialize_python): Make example in "python"
893         help work in Python 3.
894
895 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
896
897         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
898         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
899         $(EXEEXT) to the script, as it is not a program.
900
901 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
902
903         * python/py-prettyprint.c (pretty_print_one_value): Return
904         gdbpy_ref<>.
905         (print_string_repr): Adjust.
906         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
907         * python/python-internal.h (apply_varobj_pretty_printer): Return
908         gdbpy_ref<>.
909         * varobj.c (varobj_value_get_print_value): Adjust.
910
911 2018-09-08  Tom Tromey  <tom@tromey.com>
912
913         PR python/16047:
914         * python/py-prettyprint.c (pretty_print_one_value): Check for
915         to_string method.
916
917 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
918
919         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
920         replace_operator_with_call.
921
922 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
923
924         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
925
926 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
927
928         * ada-typeprint.c (print_range): Print the bounds using TYPE
929         rather than its TYPE_TARGET_TYPE.
930
931 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
932
933         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
934         call to ada_to_fixed_value_create.
935
936 2018-09-08  Jerome Guitton  <guitton@adacore.com>
937
938         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
939
940 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
941
942         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
943         by calls to error.
944
945 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
946
947         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
948         Move update of loop variable "fi".
949
950 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
951
952         * ada-lang.c (value_assign_to_component): In the case of
953         big-endian targets, extract the bits of the given VAL
954         using an src_offset of zero if container is not a scalar.
955
956 2018-09-06  Simon Ser  <contact@emersion.fr>
957
958         PR gdb/23105
959         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
960         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
961         * fbsd-tdep.c (fbsd_make_note_desc): New.
962         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
963         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
964         * target.h (enum target_object) Add FreeBSD-specific
965         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
966
967 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
968
969         * compile/compile-c.h (generate_c_for_variable_locations):
970         Change reference to pointer.
971         * compile/compile-c-support.c (compile_program) <compute>:
972         Likewise.
973         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
974         (generate_c_for_for_one_variable): Likewise
975         (generate_c_for_variable_locations): Likewise
976         * compile/compile-c-types.c (compile_c_instance::convert_type):
977         Likewise
978         * compile/compile-cplus-symbols.c (convert_one_symbol):
979         std::move the scope passed to enter_scope.
980         * compile/compile-cplus-types.c
981         (compile_cplus_instance::enter_scope): Make parameter
982         rvalue-reference.
983         (compile_cplus_instance::new_scope): Change reference to
984         pointer.
985         (compile_cplus_instance::convert_type): Likewise
986         (compile_cplus_convert_typedef): std::move the scope passed to
987         enter_scope.
988         (compile_cplus_convert_struct_or_union): Likewise.
989         (compile_cplus_convert_enum): Likewise.
990         (compile_cplus_convert_namespace): Likewise.
991         * compile/compile-cplus.h (compile_cplus_instance)
992         <enter_scope>: Make parameter rvalue-reference.
993         * compile/compile-internal.h (compile_instance)
994         <get_cached_type>: Likewise
995         * compile/compile-loc2c.c (push): Likewise
996         (pushf): Likewise
997         (unary): Likewise
998         (binary): Likewise
999         (print_label): Likewise
1000         (pushf_register_address): Likewise
1001         (pushf_register): Likewise
1002         (do_compile_dwarf_expr_to_c): Likewise
1003         (compile_dwarf_expr_to_c): Likewise
1004         (compile_dwarf_bounds_to_c): Likewise
1005         * compile/compile.c (compile_instance::get_cached_type):
1006         Likewise
1007         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1008         (compile_dwarf_bounds_to_c): Likewise
1009         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1010         (dwarf2_compile_property_to_c): Likewise
1011         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1012         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1013         Likewise
1014
1015 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1016
1017         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1018         * tui/tui-data.c (init_content_element): Don't initialize it.
1019
1020 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1021
1022         * tui/tui-data.h (struct tui_win_info)
1023         <detail::opaque>: Remove.
1024         * tui/tui-data.c (init_win_info): Remove assignment.
1025
1026 2018-09-05  Tom Tromey  <tom@tromey.com>
1027
1028         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1029         -Wformat-nonliteral.
1030         * target-float.c (host_float_ops<T>::to_string)
1031         (host_float_ops<T>::from_string): Use
1032         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1033         * configure: Rebuild.
1034
1035 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1036
1037         * printcmd.c (printf_c_string): Use
1038         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1039         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1040
1041 2018-09-05  Tom Tromey  <tom@tromey.com>
1042
1043         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1044
1045 2018-09-05  Tom de Vries  <tdevries@suse.de>
1046
1047         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1048         with resolve_abstract_p == true.
1049         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1050         defaulting to false. Propagate resolve_abstract_p to
1051         dwarf2_fetch_die_loc_sect_off.
1052         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1053         parameter, defaulting to false.
1054         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1055         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1056         parameter.
1057         * dwarf2read.h (struct die_info): Forward-declare.
1058         (die_info_ptr): New typedef.
1059         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1060
1061 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
1062
1063         GDB 8.2 released.
1064
1065 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1066             Pedro Alves  <palves@redhat.com>
1067
1068         * gnulib/Makefile.in (aclocal_m4_deps): Move to
1069         "aclocal-m4-deps.mk".  Include file here.
1070         $(srcdir)/aclocal.m4: Add "configure.ac".
1071         * gnulib/aclocal-m4-deps.mk: New file.
1072         * gnulib/update-gnulib.sh: Automatically update
1073         "aclocal-m4-deps.mk".
1074
1075 2018-09-04  Tom Tromey  <tom@tromey.com>
1076
1077         * configure: Rebuild.
1078         * configure.ac: Remove multi-ice code.
1079
1080 2018-09-04  Tom Tromey  <tom@tromey.com>
1081
1082         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1083         (ada-exp.o): Update.
1084
1085 2018-09-04  Tom Tromey  <tom@tromey.com>
1086
1087         * Makefile.in (printcmd.o, target-float.o): Remove.
1088         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1089
1090 2018-09-04  Tom Tromey  <tom@tromey.com>
1091
1092         * gnulib/Makefile.in: Remove obsolete comment.
1093         * Makefile.in: Remove obsolete comment.
1094
1095 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
1096
1097         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1098         line with '+'.
1099
1100 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1101
1102         * riscv-tdep.c: Add 'prologue-value.h' include.
1103         (struct riscv_unwind_cache): New struct.
1104         (riscv_debug_unwinder): New global.
1105         (riscv_scan_prologue): Update arguments, capture register details
1106         from prologue scan.
1107         (riscv_skip_prologue): Reformat arguments line, move end of
1108         prologue calculation into riscv_scan_prologue.
1109         (riscv_frame_cache): Update return type, create
1110         riscv_unwind_cache, scan the prologue, and fill in remaining cache
1111         details.
1112         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1113         (riscv_frame_prev_register): Use the trad_frame within the
1114         riscv_unwind_cache.
1115         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1116         flag.
1117
1118 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1119
1120         * trad-frame.h (trad_frame_set_realreg): Declare.
1121         (trad_frame_set_addr): Declare.
1122         * trad-frame.c (trad_frame_set_realreg): Define new function.
1123         (trad_frame_set_addr): Define new function.
1124         (trad_frame_set_reg_realreg): Use new function.
1125         (trad_frame_set_reg_addr): Use new function.
1126
1127 2018-09-01  Keith Seitz  <keiths@redhat.com>
1128
1129         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1130         pulongest instead of "%lld".
1131         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1132         ATTRIBUTE_UNUSED.
1133
1134 2018-08-31  Tom Tromey  <tom@tromey.com>
1135
1136         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1137         variant part type.
1138
1139 2018-08-31  Pedro Alves  <palves@redhat.com>
1140
1141         * gdbarch.h: Regenerate.
1142
1143 2018-08-31  Pedro Alves  <palves@redhat.com>
1144
1145         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1146         * target.h (Hardware watchpoint interfaces): Describe
1147         continuable/steppable/non-steppable watchpoints.
1148         * gdbarch.h, gdbarch.c: Regenerate.
1149
1150 2018-08-31  Pedro Alves  <palves@redhat.com>
1151
1152         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1153         Delete.
1154         * s390-linux-nat.c
1155         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1156         * target.h (target_ops::have_continuable_watchpoint): Delete.
1157         (target_have_continuable_watchpoint): Delete.
1158         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1159         * target-delegates.c: Regenerate.
1160
1161 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1162
1163         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1164         the files present in "gnulib/import/m4/".
1165
1166 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1167
1168         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1169         c.sw, c.swsp, and c.sdsp.
1170
1171 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1172
1173         * riscv-tdep.c (struct riscv_inferior_data): Delete.
1174         (riscv_read_misa_reg): Don't cache value read into inferior data.
1175         (riscv_new_inferior_data): Delete.
1176         (riscv_inferior_data_cleanup): Delete.
1177         (riscv_inferior_data): Delete.
1178         (riscv_invalidate_inferior_data): Delete.
1179         (_initialize_riscv_tdep): Remove initialisation of inferior data.
1180
1181 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
1182
1183         * compile/compile-cplus-types.c
1184         (compile_cplus_instance::leave_scope): Take the address of scope
1185         object.
1186         (compile_cplus_instance::convert_qualified_base): Compare quals
1187         to 0.
1188
1189 2018-08-30  Keith Seitz  <keiths@redhat.com>
1190
1191         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1192         Use "%s" and host_address_to_string instead of "%p" in printf.
1193
1194 2018-08-29  Keith Seitz  <keiths@redhat.com>
1195
1196         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1197         and compile-cplus-types.c.
1198         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1199         * c-lang.c (cplus_language_defn): Set C++ compile functions.
1200         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1201         Declare.
1202         * compile/compile-c-support.c: Include compile-cplus.h.
1203         (load_libcompile): Templatize.
1204         (get_compile_context): "New" function.
1205         (c_get_compile_context): Use get_compile_context.
1206         (cplus_get_compile_context): New function.
1207         (cplus_push_user_expression, cplus_pop_user_expression)
1208         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1209         (cplus_compute_program): Define new structs/functions.
1210         * compile/compile-cplus-symmbols.c: New file.
1211         * compile/compile-cplus-types.c: New file.
1212         * compile/compile-cplus.h: New file.
1213         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1214         Declare.
1215         * compile/compile-object-load.c (get_out_value_type): Use
1216         strncmp_iw when comparing symbol names.
1217         (compile_object_load): Add mst_bss and mst_data.
1218         * compile/compile.c (_initialize_compile): Remove
1219         -Wno-implicit-function-declaration from `compile_args'.
1220         * compile/gcc-cp-plugin.h: New file.
1221         * NEWS: Mention C++ compile support and new debug options.
1222
1223 2018-08-29  Keith Seitz  <keiths@redhat.com>
1224
1225         * linespec.c (collect_info::add_symbol): Make virtual.
1226         (struct symbol_searcher_collect_info): New struct.
1227         (symbol_searcher::find_all_symbols): New method.
1228         * symtab.h (class symbol_searcher): New class.
1229
1230 2018-08-29  Keith Seitz  <keiths@redhat.com>
1231
1232         * linespec.c (struct linespec) <function_symbols, label_symbols>:
1233         Change to vector of block_symbol.  Update all users.
1234         (struct collect_info) <symbols>: Likewise.
1235         (collect_info::add_symbol): Take block_symbol as argument.
1236         Update all callers.
1237         (decode_compound_collector) <m_symbols>: Change type to vector
1238         of block_symbol.  Update all users.
1239         (decode_compound_collector::operator ()): Change parameter type
1240         to block_symbol.
1241         (find_method, find_function_symbols, find_linespec_symbols)
1242         (find_label_symbols_in_block, find_label_symbols): Change symbol
1243         vectors to block_symbol vectors.
1244         * symtab.h (symbol_found_callback_ftype): Change parameter type to
1245         block_symbol.
1246
1247 2018-08-29  Keith Seitz  <keiths@redhat.com>
1248
1249         * linespec.c (symbolp): Remove typedef and VEC definitions.
1250         (bound_minimal_symbol_d): Likewise.
1251
1252 2018-08-29  Keith Seitz  <keiths@redhat.com>
1253
1254         * linespec.c (decode_compound_collector::decode_compound_collector):
1255         Remove initialization for `m_symtabs'.
1256         (decode_compound_collector::release_symbols): Change return type
1257         to std::vector.  Update all callers.
1258         (class decode_compound_collector) <m_symbols>: Change type to
1259         std::vector.
1260         (lookup_prefix_sym): Change return type to std::vector.  Update all
1261         callers.
1262         (compare_symbols): Remove.
1263         (std_compare_symbols): Rename to `compare_symbols'.
1264         (find_method): Change `sym_classes' parameter to std::vector.
1265         Update all callers.  Use std::sort to sort sym_classes.
1266         (find_linespec_symbols): Remove cleanup.
1267
1268 2018-08-29  Keith Seitz  <keiths@redhat.com>
1269
1270         * linespec.c (struct linespec) <minimal_symbols>: Change type to
1271         std::vector.  Update all users.
1272         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1273         (struct collect_info) <minimal_symbols>: Likewise.
1274         (compare_msymbols): Return bool.  Change parameters to const
1275         bound_minimal_symbol references.
1276         (find_method, find_function_symbols, find_linespec_symbols): Change
1277         `minsyms' parameter to std::vector.  Update all callers.
1278
1279 2018-08-29  Keith Seitz  <keiths@redhat.com>
1280
1281         * linespec.c (struct linespec) <label_symbols>: Change type to
1282         std::vector.  Update all users.
1283         (find_label_symbols_in_block): Change `result' parameter to
1284         std::vector.  Update all callers.
1285         (find_label_symbols): Return std::vector.  Update all callers.
1286
1287 2018-08-29  Keith Seitz  <keiths@redhat.com>
1288
1289         * linespec.c (struct linespec) <function_symbols>: Change type to
1290         std::vector.  Update all users.
1291         (struct collect_info) <function_symbols>: Likewise.
1292         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1293         (std_compare_symbols): New function.
1294         (find_method, find_function_symbols, find_linespec_symbols)
1295         (find_label_symbols_in_block): Change `symbols' parameter to
1296         std::vector.  Update all callers.
1297         (find_label_symbols): Likewise for `function_symbols' and
1298         `label_funcs_ret'.
1299
1300 2018-08-29  Keith Seitz  <keiths@redhat.com>
1301
1302         * linespec.c (symtab_vector_up): Define.
1303         (struct linespec) <file_symtabs>: Change type to std::vector *.
1304         Update all uses.
1305         (struct collect_info) <file_symtabs>: Likewise.
1306         (collect_symtabs_from_filename): Return symtab_vector_up.
1307         Update all callers.
1308         (decode_objc): Remove cleanup.
1309         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1310         (symtab_collector::release_symtabs): Return symtab_vector_up.
1311         Update all callers.
1312         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1313         Update all users.
1314         (collect_symtabs_from_filename, symtabs_from_filename): Return
1315         symtab_vector_up.  Update all callers.
1316
1317 2018-08-29  Tom Tromey  <tom@tromey.com>
1318
1319         * csky-tdep.c (csky_analyze_prologue): Use
1320         core_addr_to_string_nz.
1321
1322 2018-08-29  Tom Tromey  <tom@tromey.com>
1323
1324         * windows-nat.c (struct xlate_exception) <them>: Change type to
1325         DWORD.
1326         (xlate): Fix formatting.  Remove last entry.
1327         (struct xlate_exception, xlate): Comment out.
1328         (windows_nat_target::resume): Use ranged for.
1329
1330 2018-08-29  Jim Wilson  <jimw@sifive.com>
1331
1332         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1333         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1334         of NT_PRFPREG.
1335         (riscv_linux_nat_target::store_registers): Likewise.
1336
1337 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1338
1339         PR gdb/23555
1340         PR gdb/23558
1341         * gnulib/aclocal.m4: Regenerate.
1342         * gnulib/config.in: Regenerate.
1343         * gnulib/configure: Regenerate.
1344         * gnulib/import/Makefile.am: Update.
1345         * gnulib/import/Makefile.in: Update.
1346         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1347         * gnulib/import/_Noreturn.h: ... this.
1348         * gnulib/import/alloca.in.h: Update.
1349         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1350         * gnulib/import/arg-nonnull.h: ... this.
1351         * gnulib/import/assure.h: Update.
1352         * gnulib/import/at-func.c: Update.
1353         * gnulib/import/basename-lgpl.c: Update.
1354         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1355         * gnulib/import/c++defs.h: ... this.
1356         * gnulib/import/canonicalize-lgpl.c: Update.
1357         * gnulib/import/cdefs.h: Update.
1358         * gnulib/import/chdir-long.c: Update.
1359         * gnulib/import/chdir-long.h: Update.
1360         * gnulib/import/cloexec.c: Update.
1361         * gnulib/import/cloexec.h: Update.
1362         * gnulib/import/close.c: Update.
1363         * gnulib/import/closedir.c: Update.
1364         * gnulib/import/config.charset: Update.
1365         * gnulib/import/dirent-private.h: Update.
1366         * gnulib/import/dirent.in.h: Update.
1367         * gnulib/import/dirfd.c: Update.
1368         * gnulib/import/dirname-lgpl.c: Update.
1369         * gnulib/import/dirname.h: Update.
1370         * gnulib/import/dosname.h: Update.
1371         * gnulib/import/dup-safer-flag.c: Update.
1372         * gnulib/import/dup-safer.c: Update.
1373         * gnulib/import/dup.c: Update.
1374         * gnulib/import/dup2.c: Update.
1375         * gnulib/import/errno.in.h: Update.
1376         * gnulib/import/error.c: Update.
1377         * gnulib/import/error.h: Update.
1378         * gnulib/import/exitfail.c: Update.
1379         * gnulib/import/exitfail.h: Update.
1380         * gnulib/import/extra/update-copyright: Update.
1381         * gnulib/import/fchdir.c: Update.
1382         * gnulib/import/fcntl.c: Update.
1383         * gnulib/import/fcntl.in.h: Update.
1384         * gnulib/import/fd-hook.c: Update.
1385         * gnulib/import/fd-hook.h: Update.
1386         * gnulib/import/fd-safer-flag.c: Update.
1387         * gnulib/import/fd-safer.c: Update.
1388         * gnulib/import/fdopendir.c: Update.
1389         * gnulib/import/filename.h: Update.
1390         * gnulib/import/filenamecat-lgpl.c: Update.
1391         * gnulib/import/filenamecat.h: Update.
1392         * gnulib/import/flexmember.h: Update.
1393         * gnulib/import/float+.h: Update.
1394         * gnulib/import/float.c: Update.
1395         * gnulib/import/float.in.h: Update.
1396         * gnulib/import/fnmatch.c: Update.
1397         * gnulib/import/fnmatch.in.h: Update.
1398         * gnulib/import/fnmatch_loop.c: Update.
1399         * gnulib/import/fpucw.h: Update.
1400         * gnulib/import/frexp.c: Update.
1401         * gnulib/import/frexpl.c: Update.
1402         * gnulib/import/fstat.c: Update.
1403         * gnulib/import/fstatat.c: Update.
1404         * gnulib/import/getcwd-lgpl.c: Update.
1405         * gnulib/import/getcwd.c: Update.
1406         * gnulib/import/getdtablesize.c: Update.
1407         * gnulib/import/getlogin_r.c: Update.
1408         * gnulib/import/getprogname.c: Update.
1409         * gnulib/import/getprogname.h: Update.
1410         * gnulib/import/gettext.h: Update.
1411         * gnulib/import/gettimeofday.c: Update.
1412         * gnulib/import/glob-libc.h: Update.
1413         * gnulib/import/glob.c: Update.
1414         * gnulib/import/glob.in.h: Update.
1415         * gnulib/import/glob_internal.h: Update.
1416         * gnulib/import/glob_pattern_p.c: Update.
1417         * gnulib/import/globfree.c: Update.
1418         * gnulib/import/hard-locale.c: Update.
1419         * gnulib/import/hard-locale.h: Update.
1420         * gnulib/import/intprops.h: Update.
1421         * gnulib/import/inttypes.in.h: Update.
1422         * gnulib/import/isnan.c: Update.
1423         * gnulib/import/isnand-nolibm.h: Update.
1424         * gnulib/import/isnand.c: Update.
1425         * gnulib/import/isnanl-nolibm.h: Update.
1426         * gnulib/import/isnanl.c: Update.
1427         * gnulib/import/itold.c: Update.
1428         * gnulib/import/libc-config.h: Update.
1429         * gnulib/import/limits.in.h: Update.
1430         * gnulib/import/localcharset.c: Update.
1431         * gnulib/import/localcharset.h: Update.
1432         * gnulib/import/localtime-buffer.c: Update.
1433         * gnulib/import/localtime-buffer.h: Update.
1434         * gnulib/import/lstat.c: Update.
1435         * gnulib/import/m4/00gnulib.m4: Update.
1436         * gnulib/import/m4/__inline.m4: Update.
1437         * gnulib/import/m4/absolute-header.m4: Update.
1438         * gnulib/import/m4/alloca.m4: Update.
1439         * gnulib/import/m4/builtin-expect.m4: Update.
1440         * gnulib/import/m4/canonicalize.m4: Update.
1441         * gnulib/import/m4/chdir-long.m4: Update.
1442         * gnulib/import/m4/close.m4: Update.
1443         * gnulib/import/m4/closedir.m4: Update.
1444         * gnulib/import/m4/configmake.m4: Update.
1445         * gnulib/import/m4/d-ino.m4: Update.
1446         * gnulib/import/m4/d-type.m4: Update.
1447         * gnulib/import/m4/dirent_h.m4: Update.
1448         * gnulib/import/m4/dirfd.m4: Update.
1449         * gnulib/import/m4/dirname.m4: Update.
1450         * gnulib/import/m4/double-slash-root.m4: Update.
1451         * gnulib/import/m4/dup.m4: Update.
1452         * gnulib/import/m4/dup2.m4: Update.
1453         * gnulib/import/m4/eealloc.m4: Update.
1454         * gnulib/import/m4/environ.m4: Update.
1455         * gnulib/import/m4/errno_h.m4: Update.
1456         * gnulib/import/m4/error.m4: Update.
1457         * gnulib/import/m4/exponentd.m4: Update.
1458         * gnulib/import/m4/exponentl.m4: Update.
1459         * gnulib/import/m4/extensions.m4: Update.
1460         * gnulib/import/m4/extern-inline.m4: Update.
1461         * gnulib/import/m4/fchdir.m4: Update.
1462         * gnulib/import/m4/fcntl-o.m4: Update.
1463         * gnulib/import/m4/fcntl.m4: Update.
1464         * gnulib/import/m4/fcntl_h.m4: Update.
1465         * gnulib/import/m4/fdopendir.m4: Update.
1466         * gnulib/import/m4/filenamecat.m4: Update.
1467         * gnulib/import/m4/flexmember.m4: Update.
1468         * gnulib/import/m4/float_h.m4: Update.
1469         * gnulib/import/m4/fnmatch.m4: Update.
1470         * gnulib/import/m4/fnmatch_h.m4: Update.
1471         * gnulib/import/m4/fpieee.m4: Update.
1472         * gnulib/import/m4/frexp.m4: Update.
1473         * gnulib/import/m4/frexpl.m4: Update.
1474         * gnulib/import/m4/fstat.m4: Update.
1475         * gnulib/import/m4/fstatat.m4: Update.
1476         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1477         * gnulib/import/m4/getcwd-path-max.m4: Update.
1478         * gnulib/import/m4/getcwd.m4: Update.
1479         * gnulib/import/m4/getdtablesize.m4: Update.
1480         * gnulib/import/m4/getlogin.m4: Update.
1481         * gnulib/import/m4/getlogin_r.m4: Update.
1482         * gnulib/import/m4/getpagesize.m4: Update.
1483         * gnulib/import/m4/getprogname.m4: Update.
1484         * gnulib/import/m4/gettimeofday.m4: Update.
1485         * gnulib/import/m4/glibc21.m4: Update.
1486         * gnulib/import/m4/glob.m4: Update.
1487         * gnulib/import/m4/glob_h.m4: Update.
1488         * gnulib/import/m4/gnulib-cache.m4: Update.
1489         * gnulib/import/m4/gnulib-common.m4: Update.
1490         * gnulib/import/m4/gnulib-comp.m4: Update.
1491         * gnulib/import/m4/gnulib-tool.m4: Update.
1492         * gnulib/import/m4/hard-locale.m4: Update.
1493         * gnulib/import/m4/include_next.m4: Update.
1494         * gnulib/import/m4/inttypes-pri.m4: Update.
1495         * gnulib/import/m4/inttypes.m4: Update.
1496         * gnulib/import/m4/isnand.m4: Update.
1497         * gnulib/import/m4/isnanl.m4: Update.
1498         * gnulib/import/m4/largefile.m4: Update.
1499         * gnulib/import/m4/limits-h.m4: Update.
1500         * gnulib/import/m4/localcharset.m4: Update.
1501         * gnulib/import/m4/locale-fr.m4: Update.
1502         * gnulib/import/m4/locale-ja.m4: Update.
1503         * gnulib/import/m4/locale-zh.m4: Update.
1504         * gnulib/import/m4/localtime-buffer.m4: Update.
1505         * gnulib/import/m4/longlong.m4: Update.
1506         * gnulib/import/m4/lstat.m4: Update.
1507         * gnulib/import/m4/malloc.m4: Update.
1508         * gnulib/import/m4/malloca.m4: Update.
1509         * gnulib/import/m4/math_h.m4: Update.
1510         * gnulib/import/m4/mbrtowc.m4: Update.
1511         * gnulib/import/m4/mbsinit.m4: Update.
1512         * gnulib/import/m4/mbsrtowcs.m4: Update.
1513         * gnulib/import/m4/mbstate_t.m4: Update.
1514         * gnulib/import/m4/memchr.m4: Update.
1515         * gnulib/import/m4/memmem.m4: Update.
1516         * gnulib/import/m4/mempcpy.m4: Update.
1517         * gnulib/import/m4/memrchr.m4: Update.
1518         * gnulib/import/m4/mkdir.m4: Update.
1519         * gnulib/import/m4/mkstemp.m4: Update.
1520         * gnulib/import/m4/mmap-anon.m4: Update.
1521         * gnulib/import/m4/mode_t.m4: Update.
1522         * gnulib/import/m4/msvc-inval.m4: Update.
1523         * gnulib/import/m4/msvc-nothrow.m4: Update.
1524         * gnulib/import/m4/multiarch.m4: Update.
1525         * gnulib/import/m4/nocrash.m4: Update.
1526         * gnulib/import/m4/off_t.m4: Update.
1527         * gnulib/import/m4/onceonly.m4: Update.
1528         * gnulib/import/m4/open-cloexec.m4: Update.
1529         * gnulib/import/m4/open.m4: Update.
1530         * gnulib/import/m4/openat.m4: Update.
1531         * gnulib/import/m4/opendir.m4: Update.
1532         * gnulib/import/m4/pathmax.m4: Update.
1533         * gnulib/import/m4/rawmemchr.m4: Update.
1534         * gnulib/import/m4/readdir.m4: Update.
1535         * gnulib/import/m4/readlink.m4: Update.
1536         * gnulib/import/m4/realloc.m4: Update.
1537         * gnulib/import/m4/rename.m4: Update.
1538         * gnulib/import/m4/rewinddir.m4: Update.
1539         * gnulib/import/m4/rmdir.m4: Update.
1540         * gnulib/import/m4/save-cwd.m4: Update.
1541         * gnulib/import/m4/secure_getenv.m4: Update.
1542         * gnulib/import/m4/setenv.m4: Update.
1543         * gnulib/import/m4/signal_h.m4: Update.
1544         * gnulib/import/m4/ssize_t.m4: Update.
1545         * gnulib/import/m4/stat-time.m4: Update.
1546         * gnulib/import/m4/stat.m4: Update.
1547         * gnulib/import/m4/std-gnu11.m4: Update.
1548         * gnulib/import/m4/stdbool.m4: Update.
1549         * gnulib/import/m4/stddef_h.m4: Update.
1550         * gnulib/import/m4/stdint.m4: Update.
1551         * gnulib/import/m4/stdio_h.m4: Update.
1552         * gnulib/import/m4/stdlib_h.m4: Update.
1553         * gnulib/import/m4/strchrnul.m4: Update.
1554         * gnulib/import/m4/strdup.m4: Update.
1555         * gnulib/import/m4/strerror.m4: Update.
1556         * gnulib/import/m4/string_h.m4: Update.
1557         * gnulib/import/m4/strstr.m4: Update.
1558         * gnulib/import/m4/strtok_r.m4: Update.
1559         * gnulib/import/m4/sys_socket_h.m4: Update.
1560         * gnulib/import/m4/sys_stat_h.m4: Update.
1561         * gnulib/import/m4/sys_time_h.m4: Update.
1562         * gnulib/import/m4/sys_types_h.m4: Update.
1563         * gnulib/import/m4/tempname.m4: Update.
1564         * gnulib/import/m4/time_h.m4: Update.
1565         * gnulib/import/m4/unistd-safer.m4: Update.
1566         * gnulib/import/m4/unistd_h.m4: Update.
1567         * gnulib/import/m4/warn-on-use.m4: Update.
1568         * gnulib/import/m4/wchar_h.m4: Update.
1569         * gnulib/import/m4/wchar_t.m4: Update.
1570         * gnulib/import/m4/wctype_h.m4: Update.
1571         * gnulib/import/m4/wint_t.m4: Update.
1572         * gnulib/import/malloc.c: Update.
1573         * gnulib/import/malloc/scratch_buffer.h: Update.
1574         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1575         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1576         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1577         * gnulib/import/malloca.c: Update.
1578         * gnulib/import/malloca.h: Update.
1579         * gnulib/import/malloca.valgrind: Update.
1580         * gnulib/import/math.in.h: Update.
1581         * gnulib/import/mbrtowc.c: Update.
1582         * gnulib/import/mbsinit.c: Update.
1583         * gnulib/import/mbsrtowcs-impl.h: Update.
1584         * gnulib/import/mbsrtowcs-state.c: Update.
1585         * gnulib/import/mbsrtowcs.c: Update.
1586         * gnulib/import/memchr.c: Update.
1587         * gnulib/import/memmem.c: Update.
1588         * gnulib/import/mempcpy.c: Update.
1589         * gnulib/import/memrchr.c: Update.
1590         * gnulib/import/mkdir.c: Update.
1591         * gnulib/import/mkstemp.c: Update.
1592         * gnulib/import/msvc-inval.c: Update.
1593         * gnulib/import/msvc-inval.h: Update.
1594         * gnulib/import/msvc-nothrow.c: Update.
1595         * gnulib/import/msvc-nothrow.h: Update.
1596         * gnulib/import/open.c: Update.
1597         * gnulib/import/openat-die.c: Update.
1598         * gnulib/import/openat-priv.h: Update.
1599         * gnulib/import/openat-proc.c: Update.
1600         * gnulib/import/openat.c: Update.
1601         * gnulib/import/openat.h: Update.
1602         * gnulib/import/opendir.c: Update.
1603         * gnulib/import/pathmax.h: Update.
1604         * gnulib/import/pipe-safer.c: Update.
1605         * gnulib/import/rawmemchr.c: Update.
1606         * gnulib/import/readdir.c: Update.
1607         * gnulib/import/readlink.c: Update.
1608         * gnulib/import/realloc.c: Update.
1609         * gnulib/import/ref-add.sin: Update.
1610         * gnulib/import/ref-del.sin: Update.
1611         * gnulib/import/rename.c: Update.
1612         * gnulib/import/rewinddir.c: Update.
1613         * gnulib/import/rmdir.c: Update.
1614         * gnulib/import/same-inode.h: Update.
1615         * gnulib/import/save-cwd.c: Update.
1616         * gnulib/import/save-cwd.h: Update.
1617         * gnulib/import/scratch_buffer.h: Update.
1618         * gnulib/import/secure_getenv.c: Update.
1619         * gnulib/import/setenv.c: Update.
1620         * gnulib/import/signal.in.h: Update.
1621         * gnulib/import/stat-time.c: Update.
1622         * gnulib/import/stat-time.h: Update.
1623         * gnulib/import/stat-w32.c: Update.
1624         * gnulib/import/stat-w32.h: Update.
1625         * gnulib/import/stat.c: Update.
1626         * gnulib/import/stdbool.in.h: Update.
1627         * gnulib/import/stddef.in.h: Update.
1628         * gnulib/import/stdint.in.h: Update.
1629         * gnulib/import/stdio.in.h: Update.
1630         * gnulib/import/stdlib.in.h: Update.
1631         * gnulib/import/str-two-way.h: Update.
1632         * gnulib/import/strchrnul.c: Update.
1633         * gnulib/import/strdup.c: Update.
1634         * gnulib/import/streq.h: Update.
1635         * gnulib/import/strerror-override.c: Update.
1636         * gnulib/import/strerror-override.h: Update.
1637         * gnulib/import/strerror.c: Update.
1638         * gnulib/import/string.in.h: Update.
1639         * gnulib/import/stripslash.c: Update.
1640         * gnulib/import/strnlen1.c: Update.
1641         * gnulib/import/strnlen1.h: Update.
1642         * gnulib/import/strstr.c: Update.
1643         * gnulib/import/strtok_r.c: Update.
1644         * gnulib/import/sys_stat.in.h: Update.
1645         * gnulib/import/sys_time.in.h: Update.
1646         * gnulib/import/sys_types.in.h: Update.
1647         * gnulib/import/tempname.c: Update.
1648         * gnulib/import/tempname.h: Update.
1649         * gnulib/import/time.in.h: Update.
1650         * gnulib/import/unistd--.h: Update.
1651         * gnulib/import/unistd-safer.h: Update.
1652         * gnulib/import/unistd.in.h: Update.
1653         * gnulib/import/unsetenv.c: Update.
1654         * gnulib/import/verify.h: Update.
1655         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1656         * gnulib/import/wchar.in.h: Update.
1657         * gnulib/import/wctype.in.h: Update.
1658         * gnulib/import/xalloc-oversized.h: Update.
1659         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1660         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1661
1662 2018-08-16  Gary Benson <gbenson@redhat.com>
1663
1664         PR gdb/13000:
1665         * gdb/main.c (captured_main_1): Exit with nonzero status
1666         in batch mode if the last command to be executed failed.
1667         * NEWS: Mention the above.
1668
1669 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
1670
1671         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1672         end of warning message.
1673
1674 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1675
1676         PR gdb/22943:
1677         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1678         (aarch64_extract_return_value): Use
1679         aapcs_is_vfp_call_or_return_candidate.
1680         (aarch64_return_in_memory): Likewise.
1681         (aarch64_store_return_value): Likewise.
1682
1683 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1684
1685         * aarch64-tdep.c
1686         (aapcs_is_vfp_call_or_return_candidate): Make static
1687         (pass_in_v_or_stack): Remove function.
1688         (pass_in_v_vfp_candidate): New function.
1689         (aarch64_push_dummy_call): Check for float register candidates.
1690
1691 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1692
1693         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1694         (aapcs_is_vfp_call_or_return_candidate_1): New function.
1695         (aapcs_is_vfp_call_or_return_candidate): Likewise.
1696
1697 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
1698
1699         PR build/23399
1700         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1701         (struct ipa_sym_addresses): Rename to...
1702         (struct ipa_sym_addresses_common): ... this.
1703         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1704
1705 2018-08-28  Tom Tromey  <tom@tromey.com>
1706
1707         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1708         (token_fifo): Now a std::vector.
1709         (yylex, c_parse): Update.
1710         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1711         (token_fifo): Now a std::vector.
1712         (yylex, d_parse): Update.
1713         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1714         (token_fifo): Now a std::vector.
1715         (yylex, go_parse): Update.
1716
1717 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
1718
1719         * parser-defs.h (struct type_stack) <elements>: Change type to
1720         std::vector<union type_stack_elt>.
1721         <depth, size>: Remove.
1722         * parse.c (parse_exp_in_context_1): Adjust.
1723         (type_stack_reserve): Remove.
1724         (check_type_stack_depth): Remove.
1725         (insert_into_type_stack): Adjust to std::vector.
1726         (insert_type): Likewise.
1727         (push_type): Likewise.
1728         (push_type_int): Likewise.
1729         (insert_type_address_space): Likewise.
1730         (pop_type): Likewise.
1731         (pop_type_int): Likewise.
1732         (pop_typelist): Likewise.
1733         (pop_type_stack): Likewise.
1734         (append_type_stack): Likewise.
1735         (push_type_stack): Likewise.
1736         (get_type_stack): Likewise.
1737         (type_stack_cleanup): Likewise.
1738         (push_typelist): Likewise.
1739         (follow_types): Likewise.
1740         (_initialize_parse): Likewise.
1741
1742 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1743
1744         * NEWS: Mention csky target.
1745
1746 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
1747             Hafiz Abid Qadeer  <abidh@codesourcery.com>
1748             Don Breazeal  <donb@codesourcery.com>
1749
1750         * csky-linux-tdep.c: New file.
1751         * csky-tdep.c: Likewise.
1752         * csky-tdep.h: Likewise.
1753         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1754         csky-tdep.o.
1755         (HFILES_NO_SRCDIR): Add csky-tdep.h.
1756         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1757         * configure.tgt: Add csky support.
1758
1759 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
1760
1761         * python/py-framefilter.c (py_print_frame): Print frame architecture
1762         when printing on an MI output.
1763
1764 2018-08-27  Tom Tromey  <tom@tromey.com>
1765
1766         PR build/23087:
1767         * configure: Rebuild.
1768         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1769
1770 2018-08-27  Tom Tromey  <tom@tromey.com>
1771
1772         * aarch64-linux-tdep.c
1773         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1774         casts to int.
1775
1776 2018-08-27  Tom Tromey  <tom@tromey.com>
1777
1778         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1779         unsigned.
1780         (ppc64_standard_linkage1, ppc64_standard_linkage2)
1781         (ppc64_standard_linkage3, ppc64_standard_linkage4)
1782         (ppc64_standard_linkage5, ppc64_standard_linkage6)
1783         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1784         unsigned.
1785
1786 2018-08-27  Tom Tromey  <tom@tromey.com>
1787
1788         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1789         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1790
1791 2018-08-27  Tom Tromey  <tom@tromey.com>
1792
1793         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1794         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1795         ULONGEST_MAX.
1796         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1797         ULONGEST_MAX.
1798         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1799         ULONGEST_MAX.
1800         * sparc-linux-tdep.c (sparc32_linux_sigframe)
1801         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1802         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1803         ULONGEST_MAX.
1804         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1805         (ppc64_linux_sigaction_tramp_frame)
1806         (ppc32_linux_sighandler_tramp_frame)
1807         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1808         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1809         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1810         * mn10300-linux-tdep.c (am33_linux_sigframe)
1811         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1812         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1813         * mips-linux-tdep.c (mips_linux_o32_sigframe)
1814         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1815         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1816         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1817         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1818         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1819         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1820         * microblaze-linux-tdep.c
1821         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1822         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1823         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1824         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1825         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1826         * common/common-types.h (ULONGEST_MAX): New define.
1827         (CORE_ADDR_MAX): Fix formatting.
1828         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1829         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1830         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1831         (arm_linux_rt_sigreturn_tramp_frame)
1832         (arm_eabi_linux_sigreturn_tramp_frame)
1833         (arm_eabi_linux_rt_sigreturn_tramp_frame)
1834         (thumb2_eabi_linux_sigreturn_tramp_frame)
1835         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1836         (arm_linux_restart_syscall_tramp_frame)
1837         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1838         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1839         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1840         ULONGEST_MAX.
1841         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1842
1843 2018-08-27  Tom Tromey  <tom@tromey.com>
1844
1845         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1846         CORE_ADDR_MAX.
1847         * mips-tdep.c (mips_deal_with_atomic_sequence)
1848         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1849         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1850         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1851         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1852         CORE_ADDR_MAX.
1853         * aarch64-tdep.c (aarch64_software_single_step): Use
1854         CORE_ADDR_MAX.
1855
1856 2018-08-27  Tom Tromey  <tom@tromey.com>
1857
1858         * linespec.c (complete_linespec_component): Add cast to "char".
1859         * completer.c (completion_tracker::build_completion_result): Add
1860         cast to "char".
1861
1862 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1863
1864         * solist.h (struct solist, struct target_so_ops): Fix
1865         indentation.
1866
1867 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1868
1869         * ada-tasks.c (ada_task_info_s): Remove typedef.
1870         (DEF_VEC_O(ada_task_info_s)): Remove.
1871         (struct ada_tasks_inferior_data): Initialize fields.
1872         <task_list>: Make an std::vector.
1873         (get_ada_tasks_inferior_data): Allocate with new.
1874         (ada_get_task_number): Adjust.
1875         (get_task_number_from_id): Likewise.
1876         (valid_task_id): Likewise.
1877         (ada_get_task_info_from_ptid): Likewise.
1878         (iterate_over_live_ada_tasks): Likewise.
1879         (add_ada_task): Likewise.
1880         (read_known_tasks): Likewise.
1881         (ada_build_task_list): Likewise.
1882         (print_ada_task_info): Likewise.
1883         (info_task): Likewise.
1884         (task_command_1): Likewise.
1885
1886 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1887
1888         * ada-lang.c (add_angle_brackets): Return std::string.
1889
1890 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
1891
1892         * python/py-threadevent.c (py_get_event_thread): Initialize
1893         pythread.
1894
1895 2018-08-24  Pedro Alves  <palves@redhat.com>
1896
1897         * python/py-bpevent.c (create_breakpoint_event_object): Use
1898         copy-initialization.
1899         * python/py-continueevent.c (emit_continue_event): Use
1900         copy-initialization.
1901         * python/py-exitedevent.c (create_exited_event_object): Return a
1902         gdbpy_ref<>.
1903         (emit_exited_event): Use copy-initialization.
1904         * python/py-inferior.c (python_new_inferior)
1905         (python_inferior_deleted, add_thread_object): Use
1906         copy-initialization.
1907         * python/py-infevents.c (create_inferior_call_event_object)
1908         (create_register_changed_event_object)
1909         (create_memory_changed_event_object): Return a gdbpy_ref<>.
1910         (emit_inferior_call_event, emit_memory_changed_event)
1911         (emit_register_changed_event): Use copy-initialization.
1912         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1913         Return a gdbpy_ref<>.
1914         (emit_new_objfile_event): Use copy-initialization.
1915         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1916         (emit_clear_objfiles_event): Use copy-initialization.
1917         * python/py-signalevent.c (create_signal_event_object): Use
1918         copy-initialization.
1919         * python/py-threadevent.c (create_thread_event_object): Use
1920         copy-initialization.
1921
1922 2018-08-24  Pedro Alves  <palves@redhat.com>
1923             Simon Marchi  <simon.marchi@ericsson.com>
1924
1925         PR gdb/23379
1926         * python/py-continueevent.c: Include "gdbthread.h".
1927         (create_continue_event_object): Add intro comment.  Add 'ptid'
1928         parameter.  Use it to find thread to pass to
1929         create_thread_event_object.
1930         (emit_continue_event): Pass PTID down to
1931         create_continue_event_object.
1932         * python/py-event.h (py_get_event_thread): Declare.
1933         (create_thread_event_object): Remove default from 'thread'
1934         parameter.
1935         * python/py-stopevent.c (create_stop_event_object): Use
1936         py_get_event_thread.
1937         * python/py-threadevent.c (get_event_thread): Rename to ...
1938         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1939         and use it to find the thread.
1940         (create_thread_event_object): Assert that THREAD isn't null.
1941         Don't find the event thread here.
1942
1943 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
1944
1945         * block.h (blockrange, blockranges): New struct declarations.
1946         (struct block): Add new field named `ranges'.
1947         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1948         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1949         macros for accessing ranges in struct block.
1950         (make_blockranges): New declaration.
1951         block.c (make_blockranges): New function.
1952         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1953         for block.
1954         * symtab.h (find_pc_partial_function): Add new parameter `block'.
1955         * blockframe.c (cache_pc_function_block): New static global.
1956         (clear_pc_function_cache): Clear cache_pc_function_block.
1957         (find_pc_partial_function): Move comment to symtab.h.  Add
1958         support for non-contiguous blocks.
1959         * cli/cli-cmds.c (block.h): Include.
1960         (print_disassembly): Handle printing of non-contiguous blocks.
1961         (disassemble_current_function): Likewise.
1962         (disassemble_command): Likewise.
1963
1964         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1965         BLOCK_START.
1966         * blockframe.c (get_pc_function_start): Likewise.
1967         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1968         (gcc_symbol_address): Likewise.
1969         * compile/compile-object-run.c (compile_object_run): Likewise.
1970         * compile/compile.c (get_expr_block_and_pc): Likewise.
1971         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1972         (func_addr_to_tail_call_list): Likewise.
1973         * findvar.c (default_read_var_value): Likewise.
1974         * inline-frame.c (inline_frame_this_id): Likewise.
1975         (skip-inline_frames): Likewise.
1976         * infcmd.c (until_next_command): Likewise.
1977         * linespec.c (convert_linespec_to_sals): Likewise.
1978         * parse.c (parse_exp_in_context_1): Likewise.
1979         * printcmd.c (build_address_symbolic): likewise.
1980         (info_address_command): Likewise.
1981         symtab.c (find_function_start_sal): Likewise.
1982         (skip_prologue_sal): Likewise.
1983         (find_function_alias_target): Likewise.
1984         (find_gnu_ifunc): Likewise.
1985         * stack.c (find_frame_funname): Likewise.
1986         * symtab.c (fixup_symbol_section): Likewise.
1987         (find_function_start_sal): Likewise.
1988         (skip_prologue_sal): Likewsie.
1989         (find_function_alias_target): Likewise.
1990         (find_gnu_ifunc): Likewise.
1991         * tracepoint.c (info_scope_command): Likewise.
1992         * value.c (value_fn_field): Likewise.
1993
1994         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1995         in place of find_pc_partial_function.
1996         * blockframe.c (find_function_entry_range_from_pc): New function.
1997         * symtab.h (find_function_entry_range_from_pc): Declare and document.
1998         * objfiles.c (objfile_relocate1): Relocate start and end addresses
1999         for each range in a block.
2000
2001
2002 2018-08-23  Xavier Roirand  <roirand@adacore.com>
2003
2004         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2005         incrementation.
2006
2007 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2008
2009         * solib-svr4.c (read_program_headers_from_bfd): Return
2010         gdb::optional<gdb::byte_vector>.
2011         (svr4_exec_displacement): Adjust.
2012
2013 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2014
2015         * solib-svr4.c (read_program_header): Return
2016         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2017         (find_program_interpreter): Return
2018         gdb::optional<gdb::byte_vector>.
2019         (scan_dyntag_auxv): Adjust.
2020         (enable_break): Adjust.
2021         (svr4_exec_displacement): Adjust.
2022
2023 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2024
2025         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2026         * inf-child.c (inf_child_target::terminal_save_inferior): New.
2027
2028 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2029
2030         * guile/scm-string.c (gdbscm_scm_from_printf): Use
2031         string_vprintf.
2032         * guile/scm-utils.c (gdbscm_printf): Likewise.
2033         * serial.c (serial_printf): Likewise.
2034         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2035
2036 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
2037
2038         * stack.c (print_frame): Print frame architecture when printing on
2039         an MI output.
2040         * NEWS: Mention new "arch" attribute in frame output.
2041
2042 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2043
2044         * arch/aarch64.h (aarch64_regnum): Update comment.
2045
2046 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2047
2048         * NEWS: Add SVE to 8.2 section.
2049
2050 2018-08-21  Pedro Alves  <palves@redhat.com>
2051
2052         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2053         out from gdbscm_parse_function_args.
2054         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2055         gdbscm_parse_function_args_1.
2056
2057 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
2058
2059         PR gdb/17816
2060         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2061         operator.
2062
2063 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
2064
2065         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2066
2067 2018-08-19  Michael Spang  <spang@google.com>
2068
2069         PR gdb/11786
2070         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2071         for PT_TLS segments.
2072
2073 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
2074
2075         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2076         dwarf_variable_value.
2077         * dwarf2-frame.c (class dwarf_expr_executor):
2078         Add override for dwarf_variable_value.
2079         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2080         (class symbol_needs_eval_context): Likewise.
2081         (indirect_synthetic_pointer): Add forward declaration.
2082         (sect_variable_value): New function.
2083         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2084         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2085         for DW_OP_GNU_variable_value.
2086
2087 2018-08-16  Tom Tromey  <tom@tromey.com>
2088
2089         * top.c (read_command_file): Update.
2090         (command_line_input): Remove "repeat" argument.
2091         * ada-lang.c (get_selections): Update.
2092         * linespec.c (decode_line_2): Update.
2093         * defs.h (command_line_input): Remove argument.
2094         * cli/cli-script.c (read_next_line): Update.
2095         * python/py-gdb-readline.c: Update.
2096
2097 2018-08-17  Tom Tromey  <tom@tromey.com>
2098
2099         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2100         command_line_input.
2101
2102 2018-08-15  Tom Tromey  <tom@tromey.com>
2103
2104         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2105
2106 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
2107
2108         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2109         If used, use find_pc_partial_function to find address range
2110         to disassemble.
2111         * mi/mi-main.c (mi_cmd_list_features): Report
2112         "data-disassemble-a-option" feature.
2113         * NEWS: Mention new -data-disassemble option -a.
2114
2115 2018-08-13  Tom Tromey  <tom@tromey.com>
2116
2117         * common/common-defs.h (_FORTIFY_SOURCE): Define.
2118
2119 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2120
2121         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2122         (aarch64_linux_collect_sve_regset): Likewise.
2123         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2124         * regcache.h (regcache_map_entry_size): New function.
2125
2126 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2127
2128         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2129         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2130         (SVE_HEADER_VL_LENGTH): Likewise.
2131         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2132         (SVE_HEADER_FLAGS_LENGTH): Likewise.
2133         (SVE_HEADER_RESERVED_LENGTH): Likewise.
2134         (SVE_HEADER_SIZE_OFFSET): Likewise.
2135         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2136         (SVE_HEADER_VL_OFFSET): Likewise.
2137         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2138         (SVE_HEADER_FLAGS_OFFSET): Likewise.
2139         (SVE_HEADER_RESERVED_OFFSET): Likewise.
2140         (SVE_HEADER_SIZE): Likewise.
2141         (aarch64_linux_core_read_vq): Add function.
2142         (aarch64_linux_core_read_description): Check for SVE section.
2143
2144 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2145
2146         * aarch64-fbsd-tdep.c
2147         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2148         collect_size.
2149         * aarch64-linux-tdep.c
2150         (aarch64_linux_iterate_over_regset_sections): Likewise.
2151         * alpha-linux-tdep.c
2152         (alpha_linux_iterate_over_regset_sections):
2153         * alpha-nbsd-tdep.c
2154         (alphanbsd_iterate_over_regset_sections): Likewise.
2155         * amd64-fbsd-tdep.c
2156         (amd64fbsd_iterate_over_regset_sections): Likewise.
2157         * amd64-linux-tdep.c
2158         (amd64_linux_iterate_over_regset_sections): Likewise.
2159         * arm-bsd-tdep.c
2160         (armbsd_iterate_over_regset_sections): Likewise.
2161         * arm-fbsd-tdep.c
2162         (arm_fbsd_iterate_over_regset_sections): Likewise.
2163         * arm-linux-tdep.c
2164         (arm_linux_iterate_over_regset_sections): Likewise.
2165         * corelow.c (get_core_registers_cb): Likewise.
2166         (core_target::fetch_registers): Likewise.
2167         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2168         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2169         * gdbarch.h (void): Regenerate.
2170         * gdbarch.sh: Add supply_size and collect_size.
2171         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2172         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2173         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2174         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2175         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2176         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2177         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2178         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2179         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2180         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2181         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2182         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2183         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2184         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2185         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2186         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2187         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2188         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2189         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2190         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2191         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2192         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2193         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2194         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2195         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2196         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2197         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2198         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2199         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2200         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2201
2202 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
2203
2204         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2205         with string_printf.
2206
2207 2018-08-10  Keith Seitz  <keiths@redhat.com>
2208
2209         * compile/compile-c-support.c (add_code_header, add_code_footer):
2210         Move into policy class.
2211         (c_push_user_expression, pop_user_expression_nop)
2212         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2213         (compile_program): New host class.
2214         (c_compile_program): New typedef.
2215         (c_compute_porgram): Use c_compile_program.
2216
2217 2018-08-10  Keith Seitz  <keiths@redhat.com>
2218
2219         * compile/compile-internal.h (compile_instance::~compile_instance):
2220         Remove calls to htab_delete.
2221         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2222         * compile.c (compile_instance::compile_instance): Initialize
2223         htab unique pointers.
2224         (compile_instance::get_cached_type, compile_instance::insert_type)
2225         (compile_instance::error_symbol_once): Update for unique_ptr.
2226
2227 2018-08-10  Keith Seitz  <keiths@redhat.com>
2228
2229         * compile/compile-c-symbols.c (struct symbol_error)
2230         (hash_symbol_error, eq_symbol_error, del_symbol_error)
2231         (compile_instance::insert_symbol_error)
2232         (compile_instance::error_symbol_once): Move to ...
2233         * compile/compile.c: ... here.
2234
2235 2018-08-10  Keith Seitz  <keiths@redhat.com>
2236
2237         * compile/compile-c-support.c (c_get_compile_context): Use `new'
2238         instead of `new_compile_instance'.
2239         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2240         Update description.
2241         If the symbol error map is not initialized, create it.
2242         (generate_c_for_for_one_symbol): Do not check/initialize
2243         the symbol error map.
2244         * compile/compile-c-types.c (compile_c_instance): Make a class.
2245         Update all callers.
2246         (compile_instance::compile_instance): Initialize the type cache.
2247         (get_cached_type): New function.
2248         (insert_type): Update description.
2249         (compile_c_instance::m_default_cflags): Define.
2250         (convert_type): Update description.  Use get_cached_type.
2251         (delete_instance): Moved to destructor.
2252         (new_compile_instance): Moved to constructor.
2253         * compile/compile-c.h (compile_c_instance): Make class inheriting
2254         from compile_instance.
2255         <base>: Remove field.
2256         <type_map, symbol_err_map>: Move to base class.
2257         <c_plugin>: Rename to `m_plugin' and remove pointer type.
2258         * compile/compile-internal.h (compile_instance): Make class.
2259         <type_map_t, symbol_err_map_t>: Define.
2260         <fe>: Rename to `m_gcc_fe'.
2261         <scope, block, gcc_target_options>: Add `m_' prefix.
2262         <m_type_map, m_symbol_err_map>: New fields, moved from
2263         compile_c_instance.
2264         <destroy>: Remove.
2265         (convert_type, new_compile_instance): Remove.
2266         * compile/compile.c (cleanup_compile_instance): Remove.
2267         (compile_to_object): Use unique_ptr to eliminate cleanups.
2268         (compile_instance::set_print_callback, compile_instance::version)
2269         (compile_instance::set_verbose)
2270         (compile_instance::set_driver_filename)
2271         (compile_instance::set_triplet_regexp)
2272         (compile_instance::set_arguments)
2273         (compile_instance::set_source_file)
2274         (compile_instance::compile): Define.
2275
2276 2018-08-10  Keith Seitz  <keiths@redhat.com>
2277
2278         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2279         * compile/compile-c-types.c: Define GCC_METHODN macros and include
2280         gcc-c-fe.def to define C plugin.
2281         (delete_instance): Delete `c_plugin'.
2282         (new_compile_instance): Initialize `c_plugin'.
2283         * compile/compile-c.h: Include gcc_c_plugin.h.
2284         (struct compile_c_instance) <c_plugin>: New member.
2285         * gcc-c-plugin.h: New file.
2286         Update all callers with API change.
2287
2288 2018-08-10  Keith Seitz  <keiths@redhat.com>
2289
2290         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2291         (HFILES_NO_SRCDIR): ... to here.
2292         Add compile-internal.h and compile-c.h.
2293         * compile/compile-c-support.c: Include compile-c.h.
2294         * compile/compile-c-symbols.c: Include compile-c.h.
2295         (generate_c_for_variable_locations): Update comment.
2296         * compile/compile-c-types.c: Include compile-c.h.
2297         * compile/compile-c.h: New file -- moved C language declarations
2298         from other files here.
2299         * compile/compile-internal.h: Do not include hashtab.h or
2300         common/enum-flags.h.
2301         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2302         (gcc_convert_symbol, gcc_symbol_address)
2303         (generate_c_for_variable_locations, c_get_mode_for_size)
2304         (c_get_range_decl_name): Definitions moved to compile-c.h.
2305         * compile/compile-loc2c.c: Include compile-c.h.
2306
2307 2018-08-10  Keith Seitz  <keiths@redhat.com>
2308
2309         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2310         (c_symbol_substitution_name): ... this.
2311         Update all callers.
2312
2313 2018-08-10  Keith Seitz  <keiths@redhat.com>
2314
2315         * compile/compile-c-support.c (c_compute_program): Use
2316         unique_xmalloc_ptr to eliminate cleanup.
2317         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2318         Return a unique_xmalloc_ptr and eliminate cleanup.
2319         * compile/compile-internal.h (generate_c_for_variable_locations):
2320         Return unique_xmalloc_ptr and update description.
2321
2322 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
2323
2324         * corelow.c (core_target::get_core_register_section): Rename
2325         min_size to section_min_size.
2326
2327 2018-08-09  Jim Wilson  <jimw@sifive.com>
2328
2329         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2330         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2331         * NEWS: Mention new GNU/Linux RISC-V target.
2332         * configure.host: Add riscv*-*-linux*.
2333         * configure.nat: Add riscv*.
2334         * configure.tgt: Add riscv*-*-linux*.
2335         * riscv-linux-nat.c: New file.
2336         * riscv-linux-tdep.c: New file.
2337
2338 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2339
2340         * infrun.c (resume): Make static, add forward declaration.
2341         (proceed): Update header comment.
2342         * infrun.h (resume): Delete declaration.
2343
2344 2018-08-09  Tom Tromey  <tom@tromey.com>
2345
2346         * riscv-tdep.h: Minor formatting fixes.
2347
2348 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
2349
2350         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2351         * dwarf-index-cache.c (create_dir_and_check): Likewise.
2352         (test_mkdir_recursive): Likewise.
2353         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2354
2355 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2356
2357         * valarith.c (value_subscripted_rvalue): If an array is not in
2358         memory, and we don't know the upper bound, then we can't know that
2359         the requested element exists or not.
2360
2361 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
2362
2363         * target.c (str_comma_list_concat_elem): Fix typo in comment.
2364         (target_options_to_string): Add comment.
2365
2366 2018-08-08  Tom Tromey  <tom@tromey.com>
2367
2368         * unittests/scoped_mmap-selftests.c: Check result of "write".
2369
2370 2018-08-08  Jim Wilson  <jimw@sifive.com>
2371
2372         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2373         (decode_register_index_short): New.
2374         (decode_j_type_insn, decode_cj_type_insn): New.
2375         (decode_b_type_insn, decode_cb_type_insn): New.
2376         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
2377         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
2378         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2379         is_c_sw_insn instead of is_sw_insn.
2380         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2381         (riscv_software_single_step): New.
2382         * riscv-tdep.h (riscv_software_single_step): Declare.
2383
2384         * riscv-tdep.c (riscv_isa_xlen): Drop static.
2385         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2386
2387 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2388
2389         PR gdb/18050:
2390         * target.c (dispose_inferior): Don't dispose of inferiors that are
2391         already killed.
2392
2393 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2394
2395         * remote.c (remote_target::download_tracepoint): Change char* to
2396         const char*.
2397
2398 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
2399
2400         * target.h (target_options_to_string): Return an std::string.
2401         * target.c (str_comma_list_concat_elem): Return void, use
2402         std::string.
2403         (do_option): Likewise.
2404         (target_options_to_string): Return an std::string.
2405         * linux-nat.c (linux_nat_target::wait): Adjust.
2406         * target-debug.h (target_debug_print_options): Adjust.
2407
2408 2018-08-07  Tom Tromey  <tom@tromey.com>
2409
2410         * Makefile.in (CPPFLAGS): New variable.
2411         (INTERNAL_CPPFLAGS): Use it.
2412
2413 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2414
2415         * NEWS: Mention the index cache.
2416
2417 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2418
2419         * common/pathstuff.h (get_standard_cache_dir): New.
2420         * common/pathstuff.c (get_standard_cache_dir): New.
2421         * build-id.h (build_id_to_string): New.
2422         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2423         DEBUG_STR_SUFFIX): Move to here.
2424         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2425         DEBUG_STR_SUFFIX): Move from there.
2426         (write_psymtabs_to_index): Make non-static, add basename
2427         parameter.  Write to temporary files, rename when done.
2428         (save_gdb_index_command): Adjust call to
2429         write_psymtabs_to_index.
2430         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2431         field.
2432         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2433         (get_gdb_index_contents_from_cache): New.
2434         (get_gdb_index_contents_from_cache_dwz): New.
2435         (dwarf2_initialize_objfile): Read index from cache.
2436         (dwarf2_build_psymtabs): Save to index.
2437         * dwarf-index-cache.h: New file.
2438         * dwarf-index-cache.c: New file.
2439         * dwarf-index-write.h: New file.
2440
2441 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2442
2443         * gnulib/aclocal.m4: Re-generate.
2444         * gnulib/config.in: Re-generate.
2445         * gnulib/configure: Re-generate.
2446         * gnulib/import/Makefile.am: Re-generate.
2447         * gnulib/import/Makefile.in: Re-generate.
2448         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2449         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2450         * gnulib/import/m4/mkdir.m4: New file.
2451         * gnulib/import/mkdir.c: New file.
2452         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2453         module.
2454
2455 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2456
2457         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2458         * common/scoped_mmap.c: New file.
2459         * common/scoped_mmap.h (destroy): New method.
2460         (~scoped_mmap, reset): Use destroy.
2461         (scoped_mmap): New move constructor.
2462         (mmap_file): New declaration.
2463         * unittests/scoped_mmap-selftests.c (test_normal,
2464         test_invalid_filename, run_tests): New functions.
2465         (_initialize_scoped_mmap_selftests): Register selftest.
2466
2467 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2468
2469         * dwarf2read.c (read_gdb_index_from_section): Rename to...
2470         (read_gdb_index_from_buffer): ... this.  Remove section
2471         parameter, add buffer parameter.
2472         (get_gdb_index_contents_ftype,
2473         get_gdb_index_contents_dwz_ftype): New typedefs.
2474         (dwarf2_read_gdb_index): Add callback parameters to get the
2475         index contents.
2476         (get_gdb_index_contents_from_section): New.
2477         (dwarf2_initialize_objfile): Update call to
2478         dwarf2_read_gdb_index.
2479
2480 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2481
2482         * common/filestuff.h (gdb_fopen_cloexec): New overload.
2483         (gdb_open_cloexec): Likewise.
2484         * nat/linux-osdata.c (command_from_pid): Use string_printf.
2485         (commandline_from_pid): Likewise.
2486         (linux_xfer_osdata_threads): Likewise.
2487         (linux_xfer_osdata_fds): Likewise.
2488         * ada-lang.c (is_package_name): Likewise.
2489         * auxv.c (procfs_xfer_auxv): Likewise.
2490         * breakpoint.c (print_one_breakpoint_location): Use
2491         uiout::field_fmt.
2492         (print_one_catch_solib): Use string_printf.
2493         * coff-pe-read.c (add_pe_exported_sym): Likewise.
2494         (add_pe_forwarded_sym): Likewise.
2495         * dwarf2read.c (create_type_unit_group): Likewise.
2496         (build_error_marker_type): Likewise.
2497         * infcall.c (get_function_name): Likewise.
2498         * valprint.c (print_converted_chars_to_obstack): Likewise.
2499         * xtensa-tdep.c (xtensa_register_type): Likewise.
2500
2501 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
2502
2503         * remote.c (remote_target::download_tracepoint): Fix format
2504         string errors.
2505
2506 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2507
2508         * tracefile.c: Include common/byte-vector.h.
2509         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
2510         with trace_regblock_size if needed.  Update uses of buf.
2511
2512 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2513
2514         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2515         std::vector<unsigned char>.
2516         * tracepoint.c (collection_list::collection_list): Remove
2517         m_regs_mask initializer from initializer list.  Resize
2518         m_regs_mask using the largest remote register number.
2519         (collection_list::add_remote_register): Remove size check on
2520         m_regs_mask.  Use at to access element.
2521         (collection_list::stringify): Change type of temp_buf to
2522         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
2523         stringify the register mask.  Use pack_hex_byte for the register
2524         mask.
2525
2526 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2527
2528         * tracepoint.h (class collection_list) <add_register>: Remove.
2529         <add_remote_register, add_ax_registers, add_local_register>:
2530         Declare.
2531         <add_memrange>: Add scope parameter.
2532         * tracepoint.c (encode_actions_1): Likewise.
2533         (collection_list::add_register): Rename to ...
2534         (collection_list::add_remote_register): ... this.  Update
2535         comment.
2536         (collection_list::add_ax_registers, add_local_register): New
2537         methods.
2538         (collection_list::add_memrange): Add scope parameter.  Call
2539         add_local_register instead of add_register.
2540         (finalize_tracepoint_aexpr): New function.
2541         (collection_list::collect_symbol): Update calls to add_memrange.
2542         Call add_local_register instead of add_register.  Call
2543         add_ax_registers.  Call finalize_tracepoint_aexpr.
2544         (encode_actions_1): Get remote regnos for $reg action.  Call
2545         add_remote_register, add_ax_registers, and add_local_register.
2546         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
2547         (validate_actionline): Call finalize_tracepoint_aexpr.
2548
2549 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2550
2551         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2552         Replace array buf with gdb::char_vector buf, of size
2553         get_remote_packet_size ().  Replace references to buf and
2554         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
2555         and xsnprintf with snprintf.  Raise errors if the buffer is too
2556         small.
2557
2558 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2559
2560         * remote.c (remote_target::download_tracepoint): Fix the has_more
2561         predicate in the QTDP action list iteration.
2562
2563 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2564
2565         * remote.c (remote_target::download_tracepoint): Fix indentation
2566         in for block.
2567
2568 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2569
2570         * proc-api.c (_initialize_proc_api): Remove c, unused.
2571         * procfs.c (procfs_init_inferior): Remove signals, unused.
2572         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2573         unused.
2574
2575 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
2576             Andrew Burgess  <andrew.burgess@embecosm.com>
2577
2578         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2579         'W_STOPCODE (0)' as this could be ambiguous.
2580
2581 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2582
2583         * ser-tcp.c (net_open): Fix thinko when deciding whether to
2584         disable TCP's Nagle algorithm (use "ai_protocol" instead of
2585         "ai_socktype").
2586
2587 2018-08-02  Tom Tromey  <tom@tromey.com>
2588
2589         PR symtab/16842.
2590         * dwarf2read.c (read_func_scope): Set symtab on template parameter
2591         symbols.
2592         (process_structure_scope): Likewise.
2593
2594 2018-08-02  Xavier Roirand  <roirand@adacore.com>
2595
2596         PR gdb/22629:
2597         * darwin-nat.c (darwin_kill_inferior): Fix handling of
2598         kill inferior.
2599
2600 2018-08-02  Tom Tromey  <tom@tromey.com>
2601
2602         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2603         (darwin_suspend_inferior, darwin_resume_inferior)
2604         (darwin_decode_notify_message, darwin_resume_inferior_threads)
2605         (darwin_check_new_threads): Check result of get_darwin_inferior.
2606
2607 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
2608
2609         GDB 8.1.1 released.
2610
2611 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
2612
2613         * varobj.c (varobj_get_path_expr_parent): Report an error if
2614         parent is a dynamic varobj.
2615
2616 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2617
2618         * gnulib/aclocal.m4: Re-generate.
2619         * gnulib/config.in: Re-generate.
2620         * gnulib/configure: Re-generate.
2621         * gnulib/import/Makefile.in: Re-generate.
2622         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2623         * gnulib/import/m4/onceonly.m4: Re-generate.
2624
2625 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2626
2627         * target-descriptions.c (struct xml_test_tdesc): New.
2628         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2629         (record_xml_tdesc): Update.
2630         (maintenance_check_xml_descriptions): Update.
2631         * target-descriptions.h (record_xml_tdesc): Update comment.
2632
2633 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2634
2635         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2636         checking array bounds are defined.
2637
2638 2018-07-30  Tom Tromey  <tom@tromey.com>
2639
2640         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2641         irreflexivity violation.
2642
2643 2018-07-30  Tom Tromey  <tom@tromey.com>
2644
2645         * cli/cli-decode.c (lookup_cmd): Remove lint code.
2646         * value.c (unpack_long): Remove lint code.
2647         * valops.c (value_ind): Remove lint code.
2648         * valarith.c (value_x_binop, value_x_unop, value_equal)
2649         (value_pos): Remove lint code.
2650
2651 2018-07-28  Tom de Vries  <tdevries@suse.de>
2652
2653         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2654         with undefined upper bound as <optimized out>.
2655
2656 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
2657
2658         * gcore.in: Rename variable "name" to "prefix".  Expand
2659         "usage" text.
2660
2661 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
2662
2663         * windows-nat.c (windows_nat_target::create_inferior): Update to
2664         call close() in global namespace.
2665
2666 2018-07-26  Tom Tromey  <tom@tromey.com>
2667
2668         * dwarf-index-write.c (add_address_entry): Don't add objfile
2669         offsets.
2670         * dbxread.c (find_stab_function): Rename from
2671         find_stab_function_addr.  Return a bound_minimal_symbol.
2672         (read_dbx_symtab): Use raw_text_low, raw_text_high.
2673         Don't add objfile offsets.
2674         (end_psymtab): Use raw_text_low, raw_text_high,
2675         MSYMBOL_VALUE_RAW_ADDRESS.
2676         (read_ofile_symtab): Update.
2677         (process_one_symbol): Update.
2678         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2679         offsets.
2680         (dw2_relocate): Remove.
2681         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2682         searching addrmap.
2683         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2684         Update.
2685         (process_psymtab_comp_unit_reader, add_partial_symbol)
2686         (add_partial_subprogram, dwarf2_ranges_read): Update.
2687         (load_partial_dies): Update.
2688         (add_address_entry): Don't add objfile offsets.
2689         (dwarf2_build_include_psymtabs): Update.
2690         (create_addrmap_from_aranges): Don't add objfile offsets.
2691         (dw2_find_pc_sect_compunit_symtab): Update.
2692         * mdebugread.c (parse_symbol): Don't add objfile offsets.
2693         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2694         Update.
2695         (parse_partial_symbols): Don't add objfile offsets.  Use
2696         raw_text_low, raw_text_high.  Update.
2697         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2698         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2699         or call 'relocate' quick function.  Clear psymbol_map.
2700         * psympriv.h (struct partial_symbol) <address>: Add section
2701         offset.
2702         <set_unrelocated_address>: Rename from set_address.
2703         <raw_text_low, raw_text_high>: New methods.
2704         <text_low, text_high>: Add objfile parameter.
2705         (add_psymbol_to_bcache): Add 'section' parameter.  Call
2706         set_unrelocated_address.
2707         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2708         (find_pc_psymbol): Update.
2709         (fixup_psymbol_section, relocate_psymtabs): Remove.
2710         (dump_psymtab, psym_functions): Update.
2711         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2712         parameter.
2713         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2714         (start_psymtab_common): Update.
2715         * symfile-debug.c (debug_qf_relocate): Remove.
2716         (debug_sym_quick_functions): Update.
2717         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2718         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2719         Update.
2720
2721 2018-07-26  Tom Tromey  <tromey@redhat.com>
2722
2723         * dbxread.c (end_psymtab): Use text_high_valid and
2724         text_low_valid.
2725         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2726         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2727         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2728         Update comment.
2729         <text_low_valid, text_high_valid>: New fields.
2730         <set_text_low, set_text_high>: Update.
2731         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2732
2733 2018-07-26  Tom Tromey  <tom@tromey.com>
2734
2735         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2736         Update.
2737         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2738         textlow and texthigh fields.
2739         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2740         Update.
2741         * mdebugread.c (parse_lines, parse_partial_symbols)
2742         (psymtab_to_symtab_1): Update.
2743         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2744         Rename fields.  Update comment.  Now private.
2745         <text_low, text_high, set_text_low, set_text_high>: New methods.
2746         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2747         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2748         (start_psymtab_common, maintenance_info_psymtabs)
2749         (maintenance_check_psymtabs): Update.
2750         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2751         texthigh fields.
2752         (scan_xcoff_symtab): Update.
2753
2754 2018-07-26  Tom Tromey  <tromey@redhat.com>
2755
2756         * psympriv.h (struct partial_symbol) <unrelocated_address,
2757         address, set_address>: New methods.
2758         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2759         (fixup_psymbol_section, relocate_psymtabs): Update.
2760         (print_partial_symbols): Add 'objfile' parameter.  Update.
2761         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2762         Update.
2763
2764 2018-07-26  Tom Tromey  <tom@tromey.com>
2765
2766         * dwarf-index-write.c (write_psymbols, debug_names::insert)
2767         (debug_names::write_psymbols): Update.
2768         * psympriv.h (struct partial_symbol): Derive from
2769         general_symbol_info.
2770         <obj_section>: New method.
2771         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2772         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2773         (find_pc_sect_psymbol, fixup_psymbol_section)
2774         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2775         (print_partial_symbols, recursively_search_psymtabs)
2776         (compare_psymbols, psymbol_hash, psymbol_compare)
2777         (add_psymbol_to_bcache, maintenance_check_psymtabs)
2778         (psymbol_name_matches, psym_fill_psymbol_map): Update.
2779
2780 2018-07-26  Tom Tromey  <tromey@redhat.com>
2781
2782         * dbxread.c (end_psymtab): Remove dead code.
2783
2784 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2785
2786         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2787         DWARF unwinders are disabled.
2788         * dwarf2-frame.c: Add dwarf2read.h include.
2789         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2790         disabled.
2791         (dwarf2_frame_unwinders_enabled_p): Define.
2792         (show_dwarf_unwinders_enabled_p): New function.
2793         (_initialize_dwarf2_frame): Register switch to control DWARF
2794         unwinder use.
2795         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2796         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2797         (show_dwarf_cmdlist): Remove static keyword.
2798         * dwarf2read.h (set_dwarf_cmdlist): Declare.
2799         (show_dwarf_cmdlist): Declare.
2800         * NEWS: Document new feature.
2801
2802 2018-07-26  Tom de Vries  <tdevries@suse.de>
2803
2804         PR breakpoints/23366
2805         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2806
2807 2018-07-26  Tom de Vries  <tdevries@suse.de>
2808
2809         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2810         DW_AT_count can't be translated to a dynamic prop.
2811
2812 2018-07-25  Tom de Vries  <tdevries@suse.de>
2813
2814         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2815         try/catch.
2816
2817 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
2818
2819         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2820
2821 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
2822
2823         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2824
2825 2018-07-24  Keith Seitz  <keiths@redhat.comt
2826
2827         PR symtab/23010
2828         * dwarf2read.c (dw2_add_symbol_to_list): New function.
2829         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2830         instead of add_symbol_to_list.
2831         (read_file_scope): Call prepare_one_comp_unit before reading
2832         any other DIEs.
2833
2834 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
2835
2836         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2837
2838 2018-07-24  Tom Tromey  <tom@tromey.com>
2839
2840         * utils.c (malloc, realloc, free): Don't declare.
2841         * configure, config.in: Rebuild.
2842         * configure.ac: Don't check for declarations of free, malloc, or
2843         realloc.
2844
2845 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2846
2847         * aarch64-linux-nat.c
2848         (aarch64_linux_nat_target::stopped_data_address): Remove unused
2849         variable.
2850         * arm-linux-nat.c (fetch_regs): Likewise.
2851         (store_regs): Likewise.
2852         (fetch_vfp_regs): Likewise.
2853         (store_vfp_regs): Likewise.
2854         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2855         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2856         (arm_linux_nat_target::insert_watchpoint): Likewise.
2857         (arm_linux_nat_target::remove_watchpoint): Likewise.
2858         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2859         Likewise.
2860         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2861         Likewise.
2862         * ppc-linux-nat.c (fetch_register): Likewise.
2863         (fetch_all_gp_regs): Likewise.
2864         (fetch_ppc_registers): Likewise.
2865         (store_all_gp_regs): Likewise.
2866         (store_ppc_registers): Likewise.
2867         (hwdebug_insert_point): Likewise.
2868         (can_use_watchpoint_cond_accel): Likewise.
2869         * remote-sim.c (gdb_os_write_stdout): Likewise.
2870
2871 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2872             Tom Tromey  <tom@tromey.com>
2873
2874         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
2875         test for it.
2876         * configure: Rebuild.
2877
2878 2018-07-22  Tom Tromey  <tom@tromey.com>
2879
2880         * regformats/regdat.sh: Define xmltarget_${name} inside
2881         #ifndef IN_PROCESS_AGENT.
2882
2883 2018-07-22  Tom Tromey  <tom@tromey.com>
2884
2885         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
2886
2887 2018-07-22  Tom Tromey  <tom@tromey.com>
2888
2889         * symfile.c (reread_symbols): Notify iter, not objfile.
2890
2891 2018-07-22  Tom Tromey  <tom@tromey.com>
2892
2893         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
2894         Use arch_ops.
2895         (ravenscar_thread_target::prepare_to_store): Likewise.
2896
2897 2018-07-22  Tom Tromey  <tom@tromey.com>
2898
2899         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
2900         unused variable.  Call value_fetch_lazy when needed.
2901         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
2902         Remove unused variable.  Call value_fetch_lazy when needed.
2903
2904 2018-07-22  Tom Tromey  <tom@tromey.com>
2905
2906         * m32c-tdep.c (mark_dma): Return void.
2907         (make_regs): Remove unused declarations.
2908
2909 2018-07-22  Tom Tromey  <tom@tromey.com>
2910
2911         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2912         cmdscm_get_valid_command_smob_arg_unsafe for effect.
2913         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2914         bkscm_get_valid_block_smob_arg_unsafe for effect.
2915
2916 2018-07-22  Tom Tromey  <tom@tromey.com>
2917
2918         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2919         value_type.
2920
2921 2018-07-22  Tom Tromey  <tom@tromey.com>
2922
2923         * windows-nat.c (saved_context): Conditionally define.
2924         * remote.c (remote_target::remote_btrace_maybe_reopen):
2925         Conditionally declare "warned".
2926         * inflow.c (sigquit_ours): Conditionally define.
2927         (new_tty): Move "tty" declaration inside #if.
2928         * guile/guile.c (guile_datadir): Conditionally define.
2929         * charset.c (set_be_le_names): Move some declarations inside #if.
2930         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2931         #if.
2932         (parse_xml_btrace_conf): Likewise.
2933
2934 2018-07-22  Tom Tromey  <tom@tromey.com>
2935
2936         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2937
2938 2018-07-22  Tom Tromey  <tom@tromey.com>
2939
2940         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2941         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2942         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2943         * buildsym-legacy.c (get_macro_table): Remove unused variable.
2944         * stack.c (frame_apply_level_command): Remove unused variable.
2945         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2946         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2947         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2948         unused variable.
2949         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2950         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2951         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2952         variable.
2953         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2954         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2955         variable.
2956         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2957         Remove unused variable.
2958         * cli/cli-script.c (recurse_read_control_structure): Remove unused
2959         variable.
2960         * common/tdesc.c (print_xml_feature::visit): Remove unused
2961         variable.
2962         * compile/compile-object-load.c (store_regs): Remove unused
2963         variables.
2964         * complaints.c (clear_complaints): Remove unused variable.
2965         * corelow.c (core_target_open): Remove unused variable.
2966         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2967         variable.
2968         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2969         variable.
2970         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2971         variable.
2972         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2973         variable.
2974         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2975         variable.
2976         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2977         variable.
2978         * ia64-tdep.c (examine_prologue): Remove unused variable.
2979         * infcall.c (run_inferior_call): Remove unused variable.
2980         * inferior.c (exit_inferior): Remove unused variable.
2981         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2982         * linespec.c (decode_line_2): Remove unused variable.
2983         * linux-nat.c (super_close): Remove.
2984         * linux-tdep.c (linux_info_proc): Remove unused variable.
2985         * mi/mi-main.c (mi_execute_command): Remove unused variable.
2986         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2987         Remove unused variable.
2988         * parse.c (find_minsym_type_and_address): Remove unused variable.
2989         * printcmd.c (info_symbol_command, printf_floating): Remove unused
2990         variable.
2991         * python/py-breakpoint.c (bppy_set_commands): Remove unused
2992         variable.
2993         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2994         variables.
2995         * record-btrace.c (record_btrace_target::store_registers): Remove
2996         unused variable.
2997         (cmd_show_record_btrace_cpu): Remove unused variable.
2998         * riscv-tdep.c (riscv_register_reggroup_p)
2999         (riscv_push_dummy_call, riscv_return_value): Remove unused
3000         variable.
3001         * rust-exp.y (literal): Remove unused variable.
3002         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3003         unused variable.
3004         <STRUCTOP_ANONYMOUS>: Likewise.
3005         * s390-linux-tdep.c (s390_linux_init_abi_31)
3006         (s390_linux_init_abi_64): Remove unused variable.
3007         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3008         (file_select_thread, net_windows_open, _initialize_ser_windows):
3009         Remove unused variables.
3010         * symtab.c (find_pc_sect_line): Remove unused variable.
3011         * target-memory.c (compute_garbled_blocks): Remove unused
3012         variable.
3013         (target_write_memory_blocks): Remove unused variable.
3014         * target.c (target_stack::unpush): Remove unused variables.
3015         * tracepoint.c (start_tracing, all_tracepoint_actions)
3016         (merge_uploaded_trace_state_variables)
3017         (print_one_static_tracepoint_marker): Remove unused variable.
3018         * unittests/basic_string_view/element_access/char/1.cc (test01):
3019         Remove unused variable.
3020         * windows-nat.c (windows_continue, windows_add_all_dlls)
3021         (do_initial_windows_stuff, windows_nat_target::create_inferior):
3022         Remove unused variables.
3023
3024 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
3025
3026         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3027         attr_profile in HAVE_ELF.
3028         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3029         HAVE_ELF.
3030
3031 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
3032
3033         * frame.c (frame_register_unwind): Change parameter name.
3034         (frame_unwind_register): Likewise.
3035         (frame_unwind_register_value): Likewise.
3036         (frame_unwind_register_signed): Likewise.
3037         (frame_unwind_register_unsigned): Likewise.
3038         * frame.h (frame_register_unwind): Likewise.
3039         (frame_unwind_register): Likewise.
3040         (frame_unwind_register_value): Likewise.
3041         (frame_unwind_register_signed): Likewise.
3042         (frame_unwind_register_unsigned): Likewise.
3043         (frame_unwind_arch): Likewise.
3044
3045 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3046
3047         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3048         ISA maintenance.
3049
3050 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3051
3052         * mips-linux-nat.c (mips_linux_nat_target::read_description):
3053         Call `get_ptrace_pid' rather than extracting the ptrace PID by
3054         hand.
3055
3056 2018-07-20  Keith Seitz  <keiths@redhat.com>
3057
3058         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3059         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3060         m_compunit_symtab, m_language>: Add "m_" prefix.
3061         Update all uses.
3062         * buildsym.c: Update all uses.
3063
3064 2018-07-20  Tom Tromey  <tom@tromey.com>
3065
3066         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3067         * buildsym.h (record_line_ftype): Remove typedef.
3068
3069 2018-07-20  Tom Tromey  <tom@tromey.com>
3070
3071         * buildsym-legacy.h (augment_type_symtab): Don't declare.
3072         (end_expandable_symtab): Likewise.
3073         (end_symtab_get_static_block): Likewise.
3074         (end_symtab_from_static_block): Likewise.
3075         * buildsym-legacy.c (augment_type_symtab): Remove.
3076         (end_expandable_symtab): Remove.
3077         (end_symtab_get_static_block): Remove.
3078         (end_symtab_from_static_block): Remove.
3079
3080 2018-07-20  Tom Tromey  <tom@tromey.com>
3081
3082         * dwarf2read.c: Include buildsym.h.
3083         (struct dwarf2_cu) <builder>: New method.
3084         (fixup_go_packaging): Update.
3085         (process_full_comp_unit, process_full_type_unit): Update.  Don't
3086         use scoped_free_pendings.
3087         (using_directives): Add "cu" parameter, remove "language".
3088         (read_import_statement, setup_type_unit_groups, )
3089         (read_func_scope, read_lexical_block_scope)
3090         (dwarf2_record_block_ranges, read_namespace): Update.
3091         (lnp_state_machine::lnp_state_machine): Add cu parameter.
3092         (lnp_state_machine::handle_end_sequence): Update.
3093         (class lnp_state_machine) <m_cu>: New member.
3094         <m_record_line_callback>: Remove.
3095         <m_currently_recording_lines>: New member.
3096         (lnp_state_machine::handle_set_file): Update.
3097         (noop_record_line): Remove.
3098         (dwarf_record_line_p): Add cu parameter.
3099         (dwarf_record_line_1, dwarf_finish_line): Likewise.
3100         (lnp_state_machine::record_line)
3101         (lnp_state_machine::lnp_state_machine)
3102         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3103         (dwarf_decode_lines): Update.
3104         (dwarf2_start_subfile): Add cu parameter.
3105         (dwarf2_start_symtab, new_symbol): Update.
3106         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3107         Remove dwarf2_per_objfile parameter.
3108         (dwarf_decode_macros): Update.
3109
3110 2018-07-20  Tom Tromey  <tom@tromey.com>
3111
3112         * stabsread.c (define_symbol): Update.
3113         * buildsym-legacy.h (get_buildsym_compunit): Declare.
3114         * dwarf2read.c (new_symbol): Update.
3115         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3116         * cp-namespace.c: Include buildsym.h.
3117         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3118         * buildsym-legacy.c (get_buildsym_compunit): New function.
3119
3120 2018-07-20  Tom Tromey  <tom@tromey.com>
3121
3122         * xcoffread.c: Include buildsym-legacy.h.
3123         * windows-nat.c: Include buildsym-legacy.h.
3124         * stabsread.c: Include buildsym-legacy.h.
3125         * mdebugread.c: Include buildsym-legacy.h.
3126         * buildsym-legacy.h: New file.
3127         * buildsym-legacy.c: New file, from buildsym.c.
3128         * go32-nat.c: Include buildsym-legacy.h.
3129         * dwarf2read.c: Include buildsym-legacy.h.
3130         * dbxread.c: Include buildsym-legacy.h.
3131         * cp-namespace.c: Include buildsym-legacy.h.
3132         * coffread.c: Include buildsym-legacy.h.
3133         * buildsym.h: Move some contents to buildsym-legacy.h.
3134         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
3135         buildsym-legacy.c.
3136         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3137
3138 2018-07-20  Tom Tromey  <tom@tromey.com>
3139
3140         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3141         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3142         (buildsym_compunit::buildsym_compunit)
3143         (buildsym_compunit::~buildsym_compunit)
3144         (buildsym_compunit::get_macro_table): Define.
3145
3146 2018-07-20  Tom Tromey  <tom@tromey.com>
3147
3148         * buildsym.c (reset_symtab_globals): Remove.
3149         (buildsym_compunit::end_symtab_from_static_block): Update.
3150         (buildsym_compunit::augment_type_symtab): Update.
3151         (end_symtab_from_static_block): Call free_buildsym_compunit.
3152         (augment_type_symtab, end_symtab, end_expandable_symtab):
3153         Likewise.
3154
3155 2018-07-20  Tom Tromey  <tom@tromey.com>
3156
3157         * arch-utils.c: Do not include buildsym.h.
3158         * mipsread.c: Do not include buildsym.h.
3159         * machoread.c: Do not include buildsym.h.
3160         * elfread.c: Do not include buildsym.h.
3161
3162 2018-07-20  Tom Tromey  <tom@tromey.com>
3163
3164         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3165         initialization.
3166         (buildsym_compunit): Add new constructor.
3167         (struct buildsym_compunit) <get_last_source_file, finish_block,
3168         record_block_range, start_subfile, patch_subfile_names,
3169         push_subfile, pop_subfile, record_line, get_compunit_symtab,
3170         set_last_source_start_addr, get_last_source_start_addr,
3171         get_local_using_directives, set_local_using_directives,
3172         get_global_using_directives, outermost_context_p,
3173         get_current_context_stack, get_context_stack_depth,
3174         get_current_subfile, get_local_symbols, get_file_symbols,
3175         get_global_symbols, record_debugformat, record_producer,
3176         push_context, pop_context, end_symtab_get_static_block,
3177         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3178         New public methods.
3179         <record_pending_block, finish_block_internal, make_blockvector,
3180         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3181         private methods.
3182         Update all users.
3183
3184 2018-05-22  Tom Tromey  <tom@tromey.com>
3185
3186         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3187         parameter.
3188         (finish_block_internal): Update.
3189
3190 2018-07-20  Tom Tromey  <tom@tromey.com>
3191
3192         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3193         parameter.
3194         (finish_block_internal): Update.
3195
3196 2018-07-20  Tom Tromey  <tom@tromey.com>
3197
3198         * buildsym.h (EXTERN): Don't define or undef.
3199         * buildsym.c (EXTERN): Don't define.
3200
3201 2018-07-20  Tom Tromey  <tom@tromey.com>
3202
3203         * buildsym.c: Remove TODO comment.
3204
3205 2018-07-20  Tom Tromey  <tom@tromey.com>
3206
3207         * coffread.c (coff_symtab_read): Update.
3208         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3209         (xcoff_new_init): Update.
3210         * mipsread.c (mipscoff_new_init): Update.
3211         * mdebugread.c (mdebug_build_psymtabs): Update.
3212         * elfread.c (elf_new_init): Update.
3213         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3214         Update.
3215         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3216         (coffstab_build_psymtabs, elfstab_build_psymtabs)
3217         (stabsect_build_psymtabs): Update.
3218         * buildsym.h (buildsym_init): Don't declare.
3219         * buildsym.c: Update comment.
3220         (prepare_for_building): Remove.
3221         (start_symtab, restart_symtab): Update.
3222         (reset_symtab_globals): Update comment.
3223         (buildsym_init): Remove.
3224
3225 2018-07-20  Tom Tromey  <tom@tromey.com>
3226
3227         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3228         * stabsread.c (patch_block_stabs, define_symbol, read_type)
3229         (read_enum_type, common_block_start, common_block_end)
3230         (cleanup_undefined_types_1, finish_global_stabs): Update.
3231         * mdebugread.c (psymtab_to_symtab_1): Update.
3232         * dwarf2read.c (fixup_go_packaging, read_func_scope)
3233         (read_lexical_block_scope, new_symbol): Update.
3234         * dbxread.c (process_one_symbol): Update.
3235         * coffread.c (coff_symtab_read, process_coff_symbol)
3236         (coff_read_enum_type): Update.
3237         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3238         declare.
3239         (get_local_symbols, get_file_symbols, get_global_symbols): New
3240         functions.
3241         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3242         m_global_symbols.
3243         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3244         (~scoped_free_pendings): Update.
3245         (finish_block, prepare_for_building, reset_symtab_globals)
3246         (end_symtab_get_static_block, end_symtab_with_blockvector)
3247         (augment_type_symtab, push_context): Update.
3248         (get_local_symbols, get_file_symbols, get_global_symbols): New
3249         functions.
3250         (buildsym_init): Update.
3251
3252 2018-07-20  Tom Tromey  <tom@tromey.com>
3253
3254         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3255         (process_full_type_unit): Likewise.
3256         (dwarf2_start_symtab): Set list_in_scope.
3257
3258 2018-07-20  Tom Tromey  <tom@tromey.com>
3259
3260         * dwarf2read.c (process_psymtab_comp_unit_reader)
3261         (build_type_psymtabs_reader): Do not set list_in_scope.
3262
3263 2018-07-20  Tom Tromey  <tom@tromey.com>
3264
3265         * buildsym.c (free_pendings): Remove.
3266         (add_symbol_to_list, scoped_free_pendings)
3267         (finish_block_internal, buildsym_init): Update.
3268
3269 2018-07-20  Tom Tromey  <tom@tromey.com>
3270
3271         * xcoffread.c (read_xcoff_symtab): Update.
3272         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3273         Update.
3274         * dbxread.c (process_one_symbol): Update.
3275         * coffread.c (coff_symtab_read): Update.
3276         * buildsym.h (finish_block): Update.
3277         * buildsym.c (finish_block): Remove "listhead" argument.
3278         (end_symtab_get_static_block): Update.
3279
3280 2018-07-20  Tom Tromey  <tom@tromey.com>
3281
3282         * buildsym.h (class scoped_free_pendings): Remove constructor.
3283         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3284         method.
3285         <m_pending_block_obstack, m_pending_blocks>: New members.
3286         (pending_block_obstack, pending_blocks): Remove.
3287         (scoped_free_pendings::scoped_free_pendings): Default.
3288         (~scoped_free_pendings): Update.
3289         (free_pending_blocks): Remove.
3290         (finish_block_internal, record_pending_block, make_blockvector)
3291         (end_symtab_get_static_block, augment_type_symtab, push_context)
3292         (buildsym_init): Update.
3293
3294 2018-07-20  Tom Tromey  <tom@tromey.com>
3295
3296         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3297         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3298         members.
3299         (pending_addrmap, pending_addrmap_obstack)
3300         (pending_addrmap_interesting): Remove.
3301         (scoped_free_pendings, record_block_range, make_blockvector)
3302         (prepare_for_building, reset_symtab_globals, buildsym_init):
3303         Update.
3304
3305 2018-07-20  Tom Tromey  <tom@tromey.com>
3306
3307         * xcoffread.c (process_linenos): Update.
3308         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3309         * mdebugread.c (psymtab_to_symtab_1): Update.
3310         * dwarf2read.c (setup_type_unit_groups)
3311         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3312         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3313         * dbxread.c (process_one_symbol): Update.
3314         * coffread.c (coff_symtab_read, enter_linenos)
3315         (process_coff_symbol): Update.
3316         * buildsym.h (current_subfile): Don't declare.
3317         (get_current_subfile): Declare.
3318         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3319         member.
3320         (start_subfile, free_buildsym_compunit, push_subfile)
3321         (prepare_for_building, start_symtab): Update.
3322         (get_current_subfile): New function.
3323
3324 2018-07-20  Tom Tromey  <tom@tromey.com>
3325
3326         * coffread.c (coff_symtab_read): Update.
3327         * xcoffread.c (read_xcoff_symtab): Update.
3328         * dwarf2read.c (new_symbol): Update.
3329         (read_func_scope, read_lexical_block_scope): Update.
3330         * dbxread.c (process_one_symbol): Update.
3331         * buildsym.h (context_stack, context_stack_depth): Don't declare.
3332         (outermost_context_p): Remove macro.
3333         (outermost_context_p, get_current_context_stack)
3334         (get_context_stack_depth): Declare.
3335         (pop_context): Return struct context_stack.
3336         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3337         member.
3338         (context_stack_size): Remove.
3339         (INITIAL_CONTEXT_STACK_SIZE): Remove.
3340         (prepare_for_building, end_symtab_get_static_block)
3341         (augment_type_symtab, push_context): Update.
3342         (pop_context): Return struct context_stack.
3343         (outermost_context_p, get_current_context_stack)
3344         (get_context_stack_depth): New functions.
3345         (buildsym_init): Update.
3346
3347 2018-07-20  Tom Tromey  <tom@tromey.com>
3348
3349         * rust-exp.y: Now a pure parser.  Update all rules.
3350         (%union): Move earlier.
3351         (current_parser, work_obstack): Remove globals.
3352         (rust_parser, ~rust_parser): Update.
3353         (class rust_parser) <copy_name, concat3, crate_name, super_name,
3354         lex_character, lex_number, lex_string, lex_identifier,
3355         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3356         convert_name, convert_params_to_expression,
3357         convert_ast_to_expression, ast_basic_type, ast_operation,
3358         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3359         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3360         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3361         ast_array_type, ast_slice_type, ast_reference_type,
3362         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3363         (rust_parse): Update.
3364         (rustyyerror, rustyylex): Add parser parameter.
3365         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3366         (rust_lex_stringish_test, rust_lex_test_sequence)
3367         (rust_lex_test_trailing_dot, rust_lex_test_completion)
3368         (rust_lex_test_push_back, rust_lex_tests): Update.
3369
3370 2018-07-19  Pedro Alves  <palves@redhat.com>
3371
3372         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3373         gdb::unique_xmalloc_ptr.
3374         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3375         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3376         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3377         copy-initialization.
3378         * guile/scm-pretty-print.c (ppscm_print_children): Use
3379         gdb::unique_xmalloc_ptr instead of cleanups.
3380         (gdbscm_apply_val_pretty_printer): Remove cleanups.
3381         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3382         gdb::unique_xmalloc_ptr.
3383         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3384         Adjust to use gdb::unique_xmalloc_ptr.
3385         * guile/scm-utils.c (extract_arg): Adjust.
3386         * guile/scm-value.c (gdbscm_value_field): Adjust to use
3387         gdb::unique_xmalloc_ptr instead of a cleanup.
3388
3389 2018-07-19  Tom Tromey  <tom@tromey.com>
3390
3391         * utils.c (do_value_free_to_mark)
3392         (make_cleanup_value_free_to_mark): Remove.
3393         * utils.h (make_cleanup_value_free_to_mark): Remove.
3394
3395 2018-07-19  Pedro Alves  <palves@redhat.com>
3396
3397         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3398         forwarding reference.
3399
3400 2018-07-18  Pedro Alves  <palves@redhat.com>
3401
3402         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3403         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
3404         cleanup.
3405
3406 2018-07-18  Pedro Alves  <palves@redhat.com>
3407
3408         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3409         exceptions.
3410         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3411         (gdbscm_wrap): New.
3412         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3413         directly instead of a cleanup.
3414         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3415         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3416         (vlscm_binop_gdbthrow): New, factored out from ...
3417         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3418         (vlscm_rich_compare): Use gdbscm_wrap.
3419         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3420         instead of a cleanup.
3421         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3422         cleanup.
3423         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3424         Use xfree directly instead of a cleanup.
3425         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3426         Adjust to use gdbscm_wrap and scoped_value_mark.
3427         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3428         (gdbscm_value_address, gdbscm_value_dereference)
3429         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3430         scoped_value_mark.
3431         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3432         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3433         scoped_value_mark.
3434         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3435         gdbscm_wrap and scoped_value_mark.
3436         (gdbscm_value_to_string): Use xfree directly instead of a
3437         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3438         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3439         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3440         scoped_value_mark.
3441         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3442         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3443         scoped_value_mark.
3444         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3445         gdbscm_wrap.
3446
3447 2018-07-18  Tom de Vries  <tdevries@suse.de>
3448
3449         * findvar.c (default_read_var_value): Also resolve dynamic type for
3450         LOC_OPTIMIZED_OUT vars.
3451
3452 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
3453
3454         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3455         decoding.
3456
3457 2018-07-17  Tom Tromey  <tom@tromey.com>
3458
3459         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3460         (compute_enum_list, pascm_set_param_value_x)
3461         (gdbscm_parameter_value): Update.
3462         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3463         (gdbscm_scm_to_host_string): Update.
3464         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3465         Update.
3466         * guile/scm-cmd.c (cmdscm_add_completion): Update.
3467         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3468         * guile/scm-string.c (gdbscm_scm_to_string): Return
3469         unique_xmalloc_ptr.
3470         (gdbscm_scm_to_host_string): Likewise.
3471
3472 2018-07-17  Tom Tromey  <tom@tromey.com>
3473
3474         * guile/guile.c (gdbscm_eval_from_control_command): Update.
3475         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3476         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3477         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3478         unique_xmalloc_ptr.
3479
3480 2018-07-17  Tom Tromey  <tom@tromey.com>
3481
3482         * guile/scm-param.c (pascm_signal_setshow_error): Update.
3483         * guile/guile-internal.h (gdbscm_exception_message_to_string):
3484         Update.
3485         * guile/scm-cmd.c (cmdscm_function): Update.
3486         * guile/scm-pretty-print.c
3487         (ppscm_print_exception_unless_memory_error): Update.
3488         * guile/scm-exception.c (gdbscm_exception_message_to_string):
3489         Return unique_xmalloc_ptr.
3490
3491 2018-07-17  Tom Tromey  <tom@tromey.com>
3492
3493         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3494         Use string_printf.
3495
3496 2018-07-17  Jim Wilson  <jimw@sifive.com>
3497
3498         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3499         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
3500         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
3501         unecessary braces after EF_RISCV_RVC test.  Delete call to
3502         set_gdbarch_decr_pc_after_break.
3503
3504         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3505         RISCV_LAST_FP_REGNUM + 1.
3506         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3507
3508 2018-07-17  Tom Tromey  <tom@tromey.com>
3509
3510         * configure.ac: Remove --disable-gdbcli.
3511         * configure: Rebuild.
3512         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3513         (SUBDIR_CLI_CFLAGS): Remove.
3514         (SFILES): Use SUBDIR_CLI_SRCS.
3515         (COMMON_OBS): Use SUBDIR_CLI_OBS.
3516
3517 2018-07-17  Tom Tromey  <tom@tromey.com>
3518
3519         PR gdb/18624:
3520         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3521
3522 2018-07-16  Jim Wilson  <jimw@sifive.com>
3523
3524         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3525
3526 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3527
3528         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3529         variable.
3530         (libunwind_frame_sniffer): Likewise.
3531         (libunwind_frame_prev_register): Likewise.
3532         (libunwind_sigtramp_frame_sniffer): Likewise.
3533         * ia64-tdep.c (ia64_access_reg): Likewise.
3534         (ia64_access_rse_reg): Likewise.
3535         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3536         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3537
3538 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3539
3540         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3541
3542 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3543
3544         * remote-sim.c (gdbsim_target::close,
3545         gdbsim_target::mourn_inferior): Remove unused variables.
3546
3547 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
3548
3549         * ia64-tdep.c (ktab_buf): New global.
3550         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3551         (get_kernel_table): Adjust.
3552
3553 2018-07-16  Tom Tromey  <tom@tromey.com>
3554
3555         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3556         * dwarf2read.c (using_directives, new_symbol): Use
3557         outermost_context_p.
3558         * dbxread.c (process_one_symbol): Use outermost_context_p.
3559         * coffread.c (coff_symtab_read): Use outermost_context_p.
3560
3561 2018-07-16  Tom Tromey  <tom@tromey.com>
3562
3563         * dwarf2read.c (using_directives, read_func_scope)
3564         (read_lexical_block_scope): Update.
3565         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3566         * buildsym.h (local_using_directives, global_using_directives):
3567         Don't declare.
3568         (get_local_using_directives, set_local_using_directives)
3569         (get_global_using_directives): Declare.
3570         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3571         m_global_using_directives>: New members.
3572         (finish_block_internal, prepare_for_building)
3573         (reset_symtab_globals, end_symtab_get_static_block)
3574         (push_context): Update.
3575         (get_local_using_directives, set_local_using_directives)
3576         (get_global_using_directives): New functions.
3577         (buildsym_init): Update.
3578
3579 2018-07-16  Tom Tromey  <tom@tromey.com>
3580
3581         * xcoffread.c (xcoff_initial_scan): Don't call
3582         free_pending_blocks.
3583         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3584         * buildsym.h (class scoped_free_pendings): Add constructor.
3585         (free_pending_blocks): Don't declare.
3586         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3587         (free_pending_blocks): Now static.
3588
3589 2018-07-16  Tom Tromey  <tom@tromey.com>
3590
3591         * buildsym.h (push_subfile, pop_subfile): Update declarations.
3592         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3593         member.
3594         (struct subfile_stack): Remove.
3595         (subfile_stack): Remove.
3596         (push_subfile, pop_subfile, buildsym_init): Update.
3597
3598 2018-07-16  Tom Tromey  <tom@tromey.com>
3599
3600         * buildsym.c (push_subfile): Use gdb_assert.
3601         (pop_subfile): Use gdb_assert.
3602
3603 2018-07-16  Tom Tromey  <tom@tromey.com>
3604
3605         * buildsym.h (merge_symbol_lists): Remove.
3606         * buildsym.c (merge_symbol_lists): Remove.
3607
3608 2018-07-16  Tom Tromey  <tom@tromey.com>
3609
3610         * stabsread.c (scan_file_globals): Update comment.
3611         * stabsread.h (scan_file_globals): Move from buildsym.h.
3612         * buildsym.h (scan_file_globals): Move to stabsread.h.
3613
3614 2018-07-16  Tom Tromey  <tom@tromey.com>
3615
3616         * xcoffread.c (xcoff_new_init): Update.
3617         * mipsread.c (mipscoff_new_init): Update.
3618         * mdebugread.c (mdebug_build_psymtabs): Update.
3619         * elfread.c (elf_new_init): Update.
3620         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3621         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3622         * buildsym.h (buildsym_new_init): Don't declare.
3623         * buildsym.c (buildsym_new_init): Remove.
3624
3625 2018-07-16  Tom Tromey  <tom@tromey.com>
3626
3627         * stabsread.h (within_function): Move from buildsym.h.
3628         * stabsread.c (start_stabs): Clear within_function.
3629         * coffread.c (coff_start_symtab): Clear within_function.
3630         * buildsym.h (within_function): Move to stabsread.h.
3631         * buildsym.c (prepare_for_building): Update.
3632
3633 2018-07-16  Tom Tromey  <tom@tromey.com>
3634
3635         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3636         * dwarf2read.c (dwarf2_start_symtab): Don't set
3637         processing_gcc_compilation.
3638         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3639
3640 2018-07-16  Tom Tromey  <tom@tromey.com>
3641
3642         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3643         (next_symbol_text_func): Move from buildsym.h.
3644         * stabsread.c (hashname): Move from buildsym.c.
3645         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3646         (next_symbol_text_func, hashname): Move to stabsread.h.
3647         * buildsym.c: Don't include bcache.h
3648         (hashname): Move to stasbread.c.
3649
3650 2018-07-16  Tom Tromey  <tom@tromey.com>
3651
3652         * buildsym.h (context_stack_size): Don't declare.
3653         * buildsym.c (context_stack_size): New global.
3654
3655 2018-07-16  Tom Tromey  <tom@tromey.com>
3656
3657         * dbxread.c (processing_acc_compilation): New global.
3658         * buildsym.h (processing_acc_compilation): Don't declare.
3659
3660 2018-07-16  Tom Tromey  <tom@tromey.com>
3661
3662         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3663         * dbxread.c (read_ofile_symtab): Update.
3664         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3665         * buildsym.h (last_source_start_addr): Remove.
3666         (set_last_source_start_addr, get_last_source_start_addr):
3667         Declare.
3668         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3669         parameter.
3670         (struct buildsym_compunit) <m_last_source_start_addr>: New
3671         member.
3672         (prepare_for_building): Remove start_addr parameter.
3673         (start_symtab, restart_symtab, end_symtab_get_static_block)
3674         (end_symtab_with_blockvector): Update.
3675         (set_last_source_start_addr, get_last_source_start_addr): New
3676         functions.
3677
3678 2018-07-16  Tom Tromey  <tom@tromey.com>
3679
3680         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3681         member.
3682         (have_line_numbers): Remove.
3683         (record_line, prepare_for_building, end_symtab_get_static_block)
3684         (augment_type_symtab): Update.
3685
3686 2018-07-16  Tom Tromey  <tom@tromey.com>
3687
3688         * buildsym.c (~buildsym_compunit): Free the macro table.
3689         (struct buildsym_compunit) <get_macro_table, release_macros>: New
3690         methods.
3691         <m_pending_macros>: New member.
3692         (pending_macros): Remove.
3693         (~scoped_free_pendings, get_macro_table, prepare_for_building)
3694         (reset_symtab_globals, end_symtab_get_static_block)
3695         (end_symtab_with_blockvector, augment_type_symtab)
3696         (buildsym_init): Update.
3697
3698 2018-07-16  Tom Tromey  <tom@tromey.com>
3699
3700         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3701         parameter.
3702         (buildsym_compunit::set_last_source_file): New method.
3703         <m_last_source_file>: New member.
3704         (prepare_for_building): Remove "name" parameter.
3705         (start_symtab, restart_symtab, reset_symtab_globals): Update.
3706         (last_source_file): Remove.
3707         (set_last_source_file, get_last_source_file): Update.
3708
3709 2018-07-16  Tom Tromey  <tom@tromey.com>
3710
3711         * buildsym.c (prepare_for_building): Add assert.
3712
3713 2018-07-16  Tom Tromey  <tom@tromey.com>
3714
3715         * buildsym.c (~buildsym_compunit): Update.
3716         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3717         (start_subfile, patch_subfile_names)
3718         (end_symtab_with_blockvector): Update.
3719
3720 2018-07-16  Tom Tromey  <tom@tromey.com>
3721
3722         * buildsym.c (struct buildsym_compunit): Add constructor,
3723         destructor, initializers.
3724         (start_buildsym_compunit): Remove.
3725         (free_buildsym_compunit): Use "delete".
3726         (start_symtab, restart_symtab): Use "new".
3727
3728 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
3729
3730         * symfile.c (set_objfile_default_section_offset): Remove struct
3731         keyword.
3732
3733 2018-07-14  Stafford Horne  <shorne@gmail.com>
3734
3735         * (Responsible Maintainers): Add myself as or1k maintainer.
3736
3737 2018-07-13  Tom Tromey  <tom@tromey.com>
3738
3739         * symfile.c (set_objfile_default_section_offset): Use extra braces
3740         around initializer.
3741
3742 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3743
3744         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3745         non-branching basr.
3746
3747 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3748
3749         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3750         unittests/cli-utils-selftests.c
3751         * unittests/cli-utils-selftests.c: New file.
3752
3753 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3754
3755         * NEWS: Mention new commands. Mention change to 'thread apply'.
3756
3757 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3758
3759         * thread.c (thr_try_catch_cmd): New function.
3760         (thread_apply_all_command): Handle qcs flags.
3761         (thread_apply_command): Handle qcs flags.
3762         (taas_command): New function.
3763         (tfaas_command): New function.
3764         (_initialize_thread): Update to setup the new commands 'taas
3765         and 'tfaas'. Change doc string for 'thread apply'.
3766
3767 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3768
3769         * stack.c: (trailing_outermost_frame): New function, mostly
3770         extracted from backtrace_command_1.
3771         (leading_innermost_frame): New function.
3772         (backtrace_command_1): Update to call trailing_outermost_frame.
3773         (frame_apply_command_count): New function.
3774         (frame_apply_level_command): New function.
3775         (frame_apply_all_command): New function.
3776         (frame_apply_command): New function.
3777         (faas_command): New function.
3778         (frame_cmd_list): New variable.
3779         (_initialize_stack): Update to setup the new commands 'frame apply'
3780         and 'faas'.
3781
3782 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3783
3784         * cli-utils.c (number_or_range_parser::get_number): Only handle
3785         numbers or convenience var as numbers.
3786         (parse_flags): New function.
3787         (parse_flags_qcs): New function.
3788         (number_or_range_parser::finished): Ensure parsing end is detected
3789         before end of string.
3790         * cli-utils.h (parse_flags): New function.
3791         (parse_flags_qcs): New function.
3792         (number_or_range_parser): Remove m_finished bool.
3793         (number_or_range_parser::skip_range): Set m_in_range to false.
3794
3795 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3796
3797         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3798         on Windows.
3799
3800 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3801             Jan Kratochvil  <jan.kratochvil@redhat.com>
3802             Paul Fertser  <fercerpav@gmail.com>
3803             Tsutomu Seki  <sekiriki@gmail.com>
3804             Pedro Alves  <palves@redhat.com>
3805
3806         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3807         'unittests/parse-connection-spec-selftests.c'.
3808         (COMMON_SFILES): Add 'common/netstuff.c'.
3809         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3810         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3811         * common/netstuff.c: New file.
3812         * common/netstuff.h: New file.
3813         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3814         (wait_for_connect): Update comment.  New parameter
3815         'gdb::optional<int> sock' instead of 'struct serial *scb'.
3816         Use 'sock' directly instead of 'scb->fd'.
3817         (try_connect): New function, with code from 'net_open'.
3818         (net_open): Rewrite main loop to deal with multiple
3819         sockets/addresses.  Handle IPv6-style hostnames; implement
3820         support for IPv6 connections.
3821         * unittests/parse-connection-spec-selftests.c: New file.
3822
3823 2018-07-11  Pedro Alves  <palves@redhat.com>
3824
3825         PR gdb/23377
3826         * remote.c (remote_target::remote_detach_pid): Call
3827         set_current_process.
3828
3829 2018-07-11  Pedro Alves  <palves@redhat.com>
3830
3831         * h8300-tdep.c (h8300_gdbarch_init): Remove
3832         set_gdbarch_ecoff_reg_to_regnum calls.
3833
3834 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3835
3836         PR c++/23373
3837         * c-typeprint.c (c_type_print_base_struct_union): Don't print
3838         offsets/sizes for static members of a class/struct.
3839
3840 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
3841
3842         * target-descriptions.c (tdesc_register_bitsize): Rename.
3843         * target-descriptions.h (tdesc_register_bitsize): Likewise.
3844         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3845         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3846
3847 2018-07-10  Tom Tromey  <tom@tromey.com>
3848
3849         * breakpoint.c (moribund_locations): Now static and a
3850         std::vector.
3851         (breakpoint_init_inferior, moribund_breakpoint_here_p)
3852         (build_bpstat_chain, update_global_location_list)
3853         (breakpoint_retire_moribund): Update.
3854         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
3855         VEC.
3856
3857 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3858
3859         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3860         (riscv_register_reggroup_p): Use new function, remove unneeded
3861         parenthesis.
3862         (riscv_push_dummy_call): Extend assert to compare against xlen or
3863         flen based on register type.
3864
3865 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3866
3867         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
3868
3869 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3870
3871         * remote.c (show_hardware_watchpoint_limit): New function.
3872         (show_hardware_watchpoint_length_limit): New function.
3873         (show_hardware_breakpoint_limit): New function.
3874         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
3875         where appropriate, update help text.
3876
3877 2018-07-09  Tom Tromey  <tom@tromey.com>
3878
3879         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
3880         (CLIBS): Don't mention NAT_CLIBS.
3881
3882 2018-07-09  Tom Tromey  <tom@tromey.com>
3883
3884         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
3885         (LIBGDB_OBS, clean mostlyclean): Update.
3886         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
3887
3888 2018-07-09  Tom Tromey  <tom@tromey.com>
3889
3890         * Makefile.in (%.c: %.y): Use ECHO_YACC.
3891         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
3892         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
3893
3894 2018-07-09  Tom Tromey  <tom@tromey.com>
3895
3896         * Makefile.in (ALLDEPFILES): Remove exec.c.
3897         (COMMON_OBS): Remove exec.o.
3898         (COMMON_SFILES): Add exec.c.
3899
3900 2018-07-09  Tom Tromey  <tom@tromey.com>
3901
3902         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
3903
3904 2018-07-09  Tom Tromey  <tom@tromey.com>
3905
3906         * Makefile.in (clean mostlyclean): Remove stamp-version.
3907         (version.c): Depend on stamp-version.
3908         (stamp-version): New rule, from version.c rule.
3909
3910 2018-07-09  Tom Tromey  <tom@tromey.com>
3911
3912         * Makefile.in (init.c): Depend on stamp-init.
3913         (stamp-init): New rule, from init.c rule.
3914         (clean mostlyclean): Remove stamp-init.
3915
3916 2018-07-09  Tom Tromey  <tom@tromey.com>
3917
3918         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3919         SUBDIR_GCC_COMPILE_SRCS.
3920
3921 2018-07-09  Tom Tromey  <tom@tromey.com>
3922
3923         * Makefile.in (init.c): Remove some unused sed rules.
3924
3925 2018-07-09  Tom Tromey  <tom@tromey.com>
3926
3927         * Makefile.in (TSOBS): Remove.
3928         (INIT_FILES): Update.
3929         (LIBGDB_OBS): Update.
3930         (COMMON_SFILES): Add inflow.c.
3931         (SFILES): Remove inflow.c.
3932
3933 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
3934
3935         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3936
3937 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
3938
3939         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3940         get_saveloc_name, is_signal_frame_name, step_name,
3941         init_remote_name, create_addr_space_name,
3942         destroy_addr_space_name, search_unwind_table_name,
3943         find_dyn_list_name): Constify.
3944
3945 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
3946
3947         * darwin-nat.c (darwin_pthread_kill): New function.
3948         (darwin_resume_thread): Use darwin_pthread_kill.
3949
3950 2018-07-05  Tom de Vries  <tdevries@suse.de>
3951
3952         * macroexp.c (macro_buffer) <operator=>: New member function.
3953
3954 2018-07-04  Tom Tromey  <tom@tromey.com>
3955
3956         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3957
3958 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
3959
3960         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3961         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3962         * maint.c: Likewise.
3963         * top.c: Likewise.
3964
3965 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3966
3967         * NEWS: Create a new section for the next release branch.
3968         Rename the section of the current branch, now that it has
3969         been cut.
3970
3971 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
3972
3973         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3974         * version.in: Bump version to 8.2.50.DATE-git.
3975
3976 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
3977             Pedro Alves  <palves@redhat.com>
3978
3979         * linux-nat.c (linux_init_ptrace): Rename to ...
3980         (linux_init_ptrace_procfs): ... this.  Call
3981         linux_proc_init_warnings.
3982         (linux_nat_target::post_attach)
3983         (linux_nat_target::post_startup_inferior): Adjust.
3984         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3985         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3986
3987 2018-07-04  Tom de Vries  <tdevries@suse.de>
3988
3989         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3990         check ...
3991         (read_comp_unit_head): ... here.
3992
3993 2018-07-03  Tom Tromey  <tom@tromey.com>
3994
3995         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3996         (stop_tracing, tstatus_command)
3997         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3998         (print_one_static_tracepoint_marker): Update.
3999         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4000         std::vector.
4001         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
4002         VEC.
4003         (all_tracepoints, static_tracepoints_here): Return std::vector.
4004
4005 2018-07-03  Tom Tromey  <tom@tromey.com>
4006
4007         * common/ptid.c (ptid_equal): Remove.
4008         * common/ptid.h (ptid_equal): Don't declare.
4009         * ada-tasks.c: Update.
4010         * breakpoint.c: Update.
4011         * common/agent.c: Update.
4012         * corelow.c: Update.
4013         * darwin-nat-info.c: Update.
4014         * darwin-nat.c: Update.
4015         * dcache.c: Update.
4016         * dtrace-probe.c: Update.
4017         * dummy-frame.c: Update.
4018         * fbsd-nat.c: Update.
4019         * frame.c: Update.
4020         * gdbthread.h: Update.
4021         * gnu-nat.c: Update.
4022         * go32-nat.c: Update.
4023         * inf-loop.c: Update.
4024         * inf-ptrace.c: Update.
4025         * infcall.c: Update.
4026         * infcmd.c: Update.
4027         * inflow.c: Update.
4028         * infrun.c: Update.
4029         * linux-fork.c: Update.
4030         * linux-nat.c: Update.
4031         * linux-thread-db.c: Update.
4032         * mi/mi-cmd-var.c: Update.
4033         * mi/mi-interp.c: Update.
4034         * mi/mi-main.c: Update.
4035         * nto-procfs.c: Update.
4036         * ppc-linux-tdep.c: Update.
4037         * procfs.c: Update.
4038         * python/py-inferior.c: Update.
4039         * python/py-record-btrace.c: Update.
4040         * python/py-record.c: Update.
4041         * ravenscar-thread.c: Update.
4042         * regcache.c: Update.
4043         * remote-sim.c: Update.
4044         * remote.c: Update.
4045         * sol-thread.c: Update.
4046         * solib.c: Update.
4047         * target.c: Update.
4048         * tui/tui-stack.c: Update.
4049         * varobj.c: Update.
4050         * windows-nat.c: Update.
4051         * windows-tdep.c: Update.
4052
4053 2018-07-03  Tom Tromey  <tom@tromey.com>
4054
4055         * common/ptid.c (ptid_match): Remove.
4056         * common/ptid.h (ptid_match): Don't declare.
4057         * fbsd-nat.c: Update.
4058         * infcmd.c: Update.
4059         * infrun.c: Update.
4060         * linux-nat.c: Update.
4061         * record-btrace.c: Update.
4062         * regcache.c: Update.
4063         * remote.c: Update.
4064
4065 2018-07-03  Tom Tromey  <tom@tromey.com>
4066
4067         * common/ptid.c (ptid_tid_p): Remove.
4068         * common/ptid.h (ptid_tid_p): Don't declare.
4069         * sol-thread.c: Update.
4070
4071 2018-07-03  Tom Tromey  <tom@tromey.com>
4072
4073         * common/ptid.c (ptid_lwp_p): Remove.
4074         * common/ptid.h (ptid_lwp_p): Don't declare.
4075         * fbsd-nat.c: Update.
4076         * linux-nat.c: Update.
4077         * nat/linux-procfs.c: Update.
4078         * nat/x86-linux-dregs.c: Update.
4079         * sol-thread.c: Update.
4080
4081 2018-07-03  Tom Tromey  <tom@tromey.com>
4082
4083         * common/ptid.c (ptid_is_pid): Remove.
4084         * common/ptid.h (ptid_is_pid): Don't declare.
4085         * infrun.c: Update.
4086         * linux-nat.c: Update.
4087         * mi/mi-interp.c: Update.
4088         * remote.c: Update.
4089         * thread.c: Update.
4090
4091 2018-07-03  Tom Tromey  <tom@tromey.com>
4092
4093         * common/ptid.c (ptid_get_tid): Remove.
4094         * common/ptid.h (ptid_get_tid): Don't declare.
4095         * ada-tasks.c: Update.
4096         * aix-thread.c: Update.
4097         * bsd-uthread.c: Update.
4098         * darwin-nat.c: Update.
4099         * fbsd-nat.c: Update.
4100         * i386-darwin-nat.c: Update.
4101         * infrun.c: Update.
4102         * linux-tdep.c: Update.
4103         * nto-procfs.c: Update.
4104         * ppc-ravenscar-thread.c: Update.
4105         * python/py-infthread.c: Update.
4106         * ravenscar-thread.c: Update.
4107         * sol-thread.c: Update.
4108         * sparc-ravenscar-thread.c: Update.
4109         * windows-nat.c: Update.
4110
4111 2018-07-03  Tom Tromey  <tom@tromey.com>
4112
4113         * common/ptid.c (ptid_get_lwp): Remove.
4114         * common/ptid.h (ptid_get_lwp): Don't declare.
4115         * aarch64-linux-nat.c: Update.
4116         * ada-tasks.c: Update.
4117         * aix-thread.c: Update.
4118         * amd64-linux-nat.c: Update.
4119         * arm-linux-nat.c: Update.
4120         * corelow.c: Update.
4121         * fbsd-nat.c: Update.
4122         * fbsd-tdep.c: Update.
4123         * gnu-nat.c: Update.
4124         * i386-cygwin-tdep.c: Update.
4125         * i386-gnu-nat.c: Update.
4126         * i386-linux-nat.c: Update.
4127         * ia64-linux-nat.c: Update.
4128         * inf-ptrace.c: Update.
4129         * infrun.c: Update.
4130         * linux-fork.c: Update.
4131         * linux-nat.c: Update.
4132         * linux-tdep.c: Update.
4133         * linux-thread-db.c: Update.
4134         * mips-linux-nat.c: Update.
4135         * nat/aarch64-linux-hw-point.c: Update.
4136         * nat/aarch64-linux.c: Update.
4137         * nat/linux-btrace.c: Update.
4138         * nat/linux-osdata.c: Update.
4139         * nat/linux-procfs.c: Update.
4140         * nat/x86-linux-dregs.c: Update.
4141         * obsd-nat.c: Update.
4142         * ppc-fbsd-nat.c: Update.
4143         * ppc-linux-nat.c: Update.
4144         * procfs.c: Update.
4145         * python/py-infthread.c: Update.
4146         * ravenscar-thread.c: Update.
4147         * remote.c: Update.
4148         * s390-linux-nat.c: Update.
4149         * sol-thread.c: Update.
4150         * sol2-tdep.c: Update.
4151         * spu-linux-nat.c: Update.
4152         * x86-linux-nat.c: Update.
4153         * xtensa-linux-nat.c: Update.
4154
4155 2018-07-03  Tom Tromey  <tom@tromey.com>
4156
4157         * common/ptid.c (ptid_get_pid): Remove.
4158         * common/ptid.h (ptid_get_pid): Don't declare.
4159         * aarch64-linux-nat.c: Update.
4160         * ada-lang.c: Update.
4161         * aix-thread.c: Update.
4162         * alpha-bsd-nat.c: Update.
4163         * amd64-fbsd-nat.c: Update.
4164         * amd64-linux-nat.c: Update.
4165         * arm-linux-nat.c: Update.
4166         * arm-nbsd-nat.c: Update.
4167         * auxv.c: Update.
4168         * break-catch-syscall.c: Update.
4169         * breakpoint.c: Update.
4170         * bsd-uthread.c: Update.
4171         * corelow.c: Update.
4172         * ctf.c: Update.
4173         * darwin-nat.c: Update.
4174         * fbsd-nat.c: Update.
4175         * fbsd-tdep.c: Update.
4176         * gcore.c: Update.
4177         * gnu-nat.c: Update.
4178         * hppa-nbsd-nat.c: Update.
4179         * hppa-obsd-nat.c: Update.
4180         * i386-fbsd-nat.c: Update.
4181         * ia64-linux-nat.c: Update.
4182         * inf-ptrace.c: Update.
4183         * infcmd.c: Update.
4184         * inferior.c: Update.
4185         * inferior.h: Update.
4186         * inflow.c: Update.
4187         * infrun.c: Update.
4188         * linux-fork.c: Update.
4189         * linux-nat.c: Update.
4190         * linux-tdep.c: Update.
4191         * linux-thread-db.c: Update.
4192         * m68k-bsd-nat.c: Update.
4193         * mi/mi-interp.c: Update.
4194         * mi/mi-main.c: Update.
4195         * mips-linux-nat.c: Update.
4196         * mips-nbsd-nat.c: Update.
4197         * mips64-obsd-nat.c: Update.
4198         * nat/aarch64-linux-hw-point.c: Update.
4199         * nat/aarch64-linux.c: Update.
4200         * nat/linux-btrace.c: Update.
4201         * nat/linux-osdata.c: Update.
4202         * nat/linux-procfs.c: Update.
4203         * nat/x86-linux-dregs.c: Update.
4204         * nto-procfs.c: Update.
4205         * obsd-nat.c: Update.
4206         * ppc-linux-nat.c: Update.
4207         * ppc-nbsd-nat.c: Update.
4208         * ppc-obsd-nat.c: Update.
4209         * proc-service.c: Update.
4210         * procfs.c: Update.
4211         * python/py-inferior.c: Update.
4212         * python/py-infthread.c: Update.
4213         * ravenscar-thread.c: Update.
4214         * record.c: Update.
4215         * remote-sim.c: Update.
4216         * remote.c: Update.
4217         * rs6000-nat.c: Update.
4218         * s390-linux-nat.c: Update.
4219         * sh-nbsd-nat.c: Update.
4220         * sol-thread.c: Update.
4221         * sparc-nat.c: Update.
4222         * sparc64-tdep.c: Update.
4223         * spu-linux-nat.c: Update.
4224         * spu-tdep.c: Update.
4225         * target-debug.h: Update.
4226         * target.c: Update.
4227         * thread.c: Update.
4228         * tid-parse.c: Update.
4229         * tracefile-tfile.c: Update.
4230         * vax-bsd-nat.c: Update.
4231         * windows-nat.c: Update.
4232         * x86-linux-nat.c: Update.
4233         * x86-nat.c: Update.
4234
4235 2018-07-03  Tom Tromey  <tom@tromey.com>
4236
4237         * common/ptid.c (pid_to_ptid): Remove.
4238         * common/ptid.h (pid_to_ptid): Don't declare.
4239         * aix-thread.c: Update.
4240         * arm-linux-nat.c: Update.
4241         * common/ptid.c: Update.
4242         * common/ptid.h: Update.
4243         * corelow.c: Update.
4244         * ctf.c: Update.
4245         * darwin-nat.c: Update.
4246         * fbsd-nat.c: Update.
4247         * fork-child.c: Update.
4248         * gnu-nat.c: Update.
4249         * go32-nat.c: Update.
4250         * inf-ptrace.c: Update.
4251         * infcmd.c: Update.
4252         * inferior.c: Update.
4253         * infrun.c: Update.
4254         * linux-fork.c: Update.
4255         * linux-nat.c: Update.
4256         * nat/aarch64-linux-hw-point.c: Update.
4257         * nat/fork-inferior.c: Update.
4258         * nat/x86-linux-dregs.c: Update.
4259         * nto-procfs.c: Update.
4260         * obsd-nat.c: Update.
4261         * procfs.c: Update.
4262         * progspace.c: Update.
4263         * remote.c: Update.
4264         * rs6000-nat.c: Update.
4265         * s390-linux-nat.c: Update.
4266         * sol-thread.c: Update.
4267         * spu-linux-nat.c: Update.
4268         * target.c: Update.
4269         * top.c: Update.
4270         * tracefile-tfile.c: Update.
4271         * windows-nat.c: Update.
4272
4273 2018-07-03  Tom Tromey  <tom@tromey.com>
4274
4275         * common/ptid.h (ptid_build): Don't declare.
4276         * common/ptid.c (ptid_build): Remove.
4277         * aix-thread.c: Update.
4278         * bsd-kvm.c: Update.
4279         * bsd-uthread.c: Update.
4280         * common/agent.c: Update.
4281         * common/ptid.c: Update.
4282         * common/ptid.h: Update.
4283         * corelow.c: Update.
4284         * darwin-nat.c: Update.
4285         * fbsd-nat.c: Update.
4286         * gnu-nat.c: Update.
4287         * linux-fork.c: Update.
4288         * linux-nat.c: Update.
4289         * linux-thread-db.c: Update.
4290         * nat/linux-osdata.c: Update.
4291         * nat/linux-procfs.c: Update.
4292         * nto-procfs.c: Update.
4293         * obsd-nat.c: Update.
4294         * proc-service.c: Update.
4295         * procfs.c: Update.
4296         * ravenscar-thread.c: Update.
4297         * remote-sim.c: Update.
4298         * remote.c: Update.
4299         * sol-thread.c: Update.
4300         * target.c: Update.
4301         * windows-nat.c: Update.
4302
4303 2018-07-03  Tom Tromey  <tom@tromey.com>
4304
4305         * infrun.c (follow_exec): Use exit_inferior_silent.
4306         * inferior.c (exit_inferior_num_silent): Remove.
4307         * inferior.h (exit_inferior_num_silent): Don't declare.
4308
4309 2018-07-03  Tom Tromey  <tom@tromey.com>
4310
4311         PR cli/23340:
4312         * darwin-nat.c (darwin_attach_pid): Reset inferior and
4313         inferior_ptid on error.
4314
4315 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
4316             Simon Marchi  <simon.marchi@polymtl.ca>
4317
4318         PR tdep/8282
4319         * disasm.h (gdb_disassembler): Add
4320         `m_disassembler_options_holder'. member
4321         * disasm.c (get_all_disassembler_options): New function.
4322         (gdb_disassembler::gdb_disassembler): Use it.
4323         (gdb_buffered_insn_length_init_dis): Likewise.
4324         (gdb_buffered_insn_length): Adjust accordingly.
4325         (set_disassembler_options): Handle options with arguments.
4326         (show_disassembler_options_sfunc): Likewise.  Add a leading new
4327         line if showing options with descriptions.
4328         (disassembler_options_completer): Adapt to using the
4329         `disasm_options_and_args_t' structure.
4330         * mips-tdep.c (mips_disassembler_options): New variable.
4331         (mips_disassembler_options_o32): Likewise.
4332         (mips_disassembler_options_n32): Likewise.
4333         (mips_disassembler_options_n64): Likewise.
4334         (gdb_print_insn_mips): Don't set `disassembler_options'.
4335         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4336         functions.
4337         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4338         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
4339         `gdbarch_disassembler_options_implicit' and
4340         `gdbarch_valid_disassembler_options'.
4341         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4342         `disasm_options_and_args_t' structure.
4343         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4344         method.
4345         (valid_disassembler_options): Switch from `disasm_options_t' to
4346         the `disasm_options_and_args_t' structure.
4347         * NEWS: Document `set disassembler-options' support for the MIPS
4348         target.
4349         * gdbarch.h: Regenerate.
4350         * gdbarch.c: Regenerate.
4351
4352 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4353
4354         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4355
4356 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
4357
4358         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4359         parameter in call to amd64_target_description.
4360         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4361         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4362         (amd64fbsd_init_abi): Likewise.
4363         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4364         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4365         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4366         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4367
4368 2018-06-29  Pedro Alves  <palves@redhat.com>
4369
4370         * gdb/amd64-tdep.h (amd64_create_target_description): Add
4371         "segments" parameter.
4372         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4373         (_initialize_amd64_tdep): Update call to
4374         amd64_create_target_description.
4375         (amd64_target_description): Add "segments" parameter.  Adjust
4376         the implementation to use it.
4377         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4378         call to amd64_create_target_description.
4379         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4380         * gdb/arch/amd64.h (amd64_create_target_description): Add
4381         "segments" register.
4382         * gdb/arch/amd64.c (amd64_create_target_description): Add
4383         "segments" parameter.  Call create_feature_i386_64bit_segments
4384         only if SEGMENTS is true.
4385         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4386         call to amd64_create_target_description.
4387
4388 2018-06-29  Pedro Alves  <palves@redhat.com>
4389
4390         * thread.c (thread_target_id_str): New, factored out from ...
4391         (print_thread_info_1): ... here.  Use it to compute the max
4392         "Target Id" column width.
4393
4394 2018-06-29  Pedro Alves  <palves@redhat.com>
4395
4396         * remote.c (remote_target::extra_thread_info): Delete
4397         'display_buf' and 'n' locals.  from the cache, regardless of
4398         packet mechanims is in use.  Use cache for qThreadExtra and qP
4399         methods too.
4400
4401 2018-06-29  Pedro Alves  <palves@redhat.com>
4402
4403         * blockframe.c (find_pc_sect_containing_function): New function.
4404         * breakpoint.c (print_breakpoint_location): Don't call
4405         find_pc_sect_function.
4406         * linespec.c (create_sals_line_offset): Record the location's
4407         symbol in the sal.
4408         * linespec.c (convert_address_location_to_sals): Fill in sal's
4409         symbol with find_pc_sect_containing_function.
4410         * symtab.c (find_function_start_sal): Rename to ...
4411         (find_function_start_sal_1): ... this.
4412         (find_function_start_sal): Reimplement as wrapper around
4413         find_function_start_sal_1, and use
4414         find_pc_sect_containing_function to fill in the sal's symbol.
4415         (find_function_start_sal(symbol*, bool)): Adjust.
4416         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4417         comments.
4418         (find_pc_sect_containing_function): Declare.
4419
4420 2018-06-29  Pedro Alves  <palves@redhat.com>
4421
4422         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4423         true if the the location has no symbol.
4424
4425 2018-06-28  Tom Tromey  <tom@tromey.com>
4426
4427         * NEWS: Mention --enable-codesign.
4428         * silent-rules.mk (ECHO_SIGN): New variable.
4429         * configure.ac: Add --enable-codesign.
4430         * configure: Rebuild.
4431         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4432         (gdb$(EXEEXT)): Optionally invoke codesign.
4433
4434 2018-06-28  Pedro Alves  <palves@redhat.com>
4435
4436         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4437         comments.
4438         (switch_to_thread_no_regs): Adjust comment.
4439         * infcmd.c (stop_pc): Delete.
4440         (post_create_inferior, info_program_command): Replace references
4441         to stop_pc with references to thread_info->suspend.stop_pc.
4442         * inferior.h (stop_pc): Delete declaration.
4443         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4444         (handle_inferior_event_1, handle_signal_stop)
4445         (process_event_stop_test, keep_going_stepped_thread)
4446         (handle_step_into_function, handle_step_into_function_backward)
4447         (print_stop_location): Replace references to stop_pc with
4448         references to thread_info->suspend.stop_pc.
4449         (struct infcall_suspend_state) <stop_pc>: Delete field.
4450         (save_infcall_suspend_state, restore_infcall_suspend_state):
4451         Remove references to inf_stat->stop_pc.
4452         * linux-fork.c (fork_load_infrun_state): Likewise.
4453         * record-btrace.c (record_btrace_set_replay): Likewise.
4454         * record-full.c (record_full_goto_entry): Likewise.
4455         * remote.c (print_one_stopped_thread): Likewise.
4456         * target.c (target_resume): Extend comment.
4457         * thread.c (set_executing_thread): New.
4458         (set_executing): Use it.
4459         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4460         Remove references to stop_pc.
4461
4462 2018-06-28  Pedro Alves  <palves@redhat.com>
4463
4464         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4465         Moving fetching stop_pc until after ecs->event_thread is refreshed.
4466
4467 2018-06-28  Tom Tromey  <tom@tromey.com>
4468
4469         * coffread.c (coff_symfile_finish): Update.
4470         * xcoffread.c (xcoff_symfile_finish): Update.
4471         * elfread.c (elf_symfile_finish): Update.
4472         * symfile.h (dwarf2_free_objfile): Don't declare.
4473         * dwarf2read.c (_initialize_dwarf2_read): Use
4474         register_objfile_data_with_cleanup.
4475         (dwarf2_free_objfile): Now static.  Change signature.
4476
4477 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4478
4479         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4480         option "-o" to add-symbol-file-load to add an offset to each
4481         section's load address.
4482         * symfile.c (set_objfile_default_section_offset): New function.
4483
4484 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4485
4486         * symfile.c (add_symbol_file_command): Make sure that sections
4487         with the same name are sorted in the same order.
4488
4489 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4490
4491         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4492         require the second argument.  If omitted, load sections at the
4493         addresses specified in the file.
4494
4495 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4496
4497         * symfile.c (symbol_file_command, symbol_file_add_main_1)
4498         (_initialize_symfile): Add option "-o" to symbol-file to add an
4499         offset to each section of the symbol file.
4500
4501 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4502
4503         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4504
4505 2018-06-27  Tom Tromey  <tom@tromey.com>
4506
4507         * stack.c (_initialize_stack): Update "func" help text.
4508
4509 2018-06-27  Tom Tromey  <tom@tromey.com>
4510
4511         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4512         std::vector.
4513         (unwind_infopy_str, pyuw_create_unwind_info)
4514         (unwind_infopy_add_saved_register, pyuw_sniffer)
4515         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4516         Update.
4517         (struct saved_reg): Add constructor.
4518         <value>: Now a gdbpy_ref<>.
4519
4520 2018-06-27  Tom Tromey  <tom@tromey.com>
4521
4522         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4523
4524 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4525
4526         * gdb-gdb.py.in: Format using autopep8.
4527
4528 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4529
4530         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4531         (type_lookup_function): Recognize CORE_ADDR values.
4532
4533 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4534
4535         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4536         print tag_name.
4537
4538 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4539
4540         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4541         <__lt__>: Add.
4542
4543 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4544
4545         * gdb-gdb.py: Move to...
4546         * gdb-gdb.py.in: ... here.
4547         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4548         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4549         dependencies.
4550         (distclean): Remove gdb-gdb.py when cleaning.
4551         (gdb-gdb.py, gdb-gdb.gdb): New rules.
4552         * configure: Re-generate.
4553
4554 2018-06-27  Pedro Alves  <palves@redhat.com>
4555
4556         * proc-service.c (get_ps_regcache): New.
4557         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4558         (ps_lsetfpregs): Use it.
4559
4560 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
4561
4562         PR gdb/21695
4563         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4564         (dwarf_decode_lines_1): Adjust.
4565
4566 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4567
4568         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4569         override.
4570         <info_proc>: Likewise.
4571
4572 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
4573
4574         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4575         to windows_fetch_one_register, and only handle the case of
4576         fetching one register.  Move the code that reloads the context
4577         and iterates over all registers if R is negative to...
4578         (windows_nat_target::fetch_registers): ... here.
4579         (do_windows_store_inferior_registers): Rename to
4580         windows_store_one_register, and only handle the case of storing
4581         one register.  Move the code that handles the case where r is
4582         negative to...
4583         (windows_nat_target::store_registers) ... here.
4584
4585 2018-06-26  Tom Tromey  <tom@tromey.com>
4586
4587         PR rust/22574:
4588         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4589         * rust-lang.c (rust_print_struct_def): Add podata parameter.
4590         Update.
4591         (rust_internal_print_type): Add podata parameter.
4592         (rust_print_type): Update.
4593
4594 2018-06-26  Tom Tromey  <tom@tromey.com>
4595
4596         * typeprint.h (struct print_offset_data) <update, finish,
4597         maybe_print_hole>: New methods.
4598         <indentation>: New constant.
4599         * typeprint.c (print_offset_data::indentation): Define.
4600         (print_offset_data::maybe_print_hole, print_offset_data::update)
4601         (print_offset_data::finish): Move from c-typeprint.c and rename.
4602         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4603         (print_spaces_filtered_with_print_options): Update.
4604         (c_print_type_union_field_offset, maybe_print_hole)
4605         (c_print_type_struct_field_offset): Move to typeprint.c and
4606         rename.
4607         (c_type_print_base_struct_union): Update.
4608
4609 2018-06-25  Pedro Alves  <palves@redhat.com>
4610
4611         * gdbthread.h (thread_info_ref, delete_thread)
4612         (delete_thread_silent, first_thread_of_inferior)
4613         (any_thread_of_inferior, switch_to_thread)
4614         (enable_thread_stack_temporaries)
4615         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4616         (get_last_thread_stack_temporary)
4617         (value_in_thread_stack_temporaries, can_access_registers_thread):
4618         Spell out "struct thread_info" instead of just "thread_info".
4619         * inferior.h (notice_new_inferior): Likewise.
4620
4621 2018-06-25  Pedro Alves  <palves@redhat.com>
4622
4623         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4624         pass thread_info pointer to delete_thread.
4625         (windows_nat_target::detach): Pass inferior pointer to
4626         detach_inferior.
4627         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4628         delete_thread.
4629         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4630         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4631         and pass a thread_info pointer to delete_thread.
4632         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4633         pass thread_info pointer to delete_thread.
4634         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4635         delete_thread_silent call.
4636         * procfs.c (procfs_target::detach): Pass inferior pointer to
4637         detach_inferior.
4638         (procfs_target::wait): Pass thread_info pointer to delete_thread.
4639         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4640         delete_thread_silent call.
4641         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4642         pass thread_info pointer to delete_thread.
4643         (windows_nat_target::detach): Pass inferior pointer to
4644         delete_inferior.
4645
4646 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4647
4648         * regcache.c (readable_regcache::read_part): Fix asserts.
4649         (reg_buffer::raw_collect_part): New function.
4650         (regcache::write_part): Fix asserts.
4651         (reg_buffer::raw_supply_part): New function.
4652         (regcache::transfer_regset_register): New helper function.
4653         (regcache::transfer_regset): Call new functions.
4654         (regcache_supply_regset): Use gdb_byte*.
4655         (regcache::supply_regset): Likewise.
4656         (regcache_collect_regset): Likewise.
4657         (regcache::collect_regset): Likewise.
4658         * regcache.h (reg_buffer::raw_collect_part): New declaration.
4659         (reg_buffer::raw_supply_part): Likewise.
4660         (regcache::transfer_regset_register): Likewise.
4661         (regcache::transfer_regset): Use gdb_byte*.
4662
4663 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4664
4665         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4666
4667 2018-06-21  Pedro Alves  <palves@redhat.com>
4668
4669         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4670         instead of a ptid_t.  All callers adjusted.
4671         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
4672         adjusted.
4673         (print_ada_task_info, display_current_task_id, task_command_1):
4674         Adjust.
4675         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4676         inferior_thread.
4677         (breakpoint_kind): Adjust.
4678         (remove_breakpoints_pid): Rename to ...
4679         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
4680         pointer.  All callers adjusted.
4681         (bpstat_clear_actions): Use inferior_thread.
4682         (get_bpstat_thread): New.
4683         (bpstat_do_actions): Use it.
4684         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4685         to take a thread_info pointer.  All callers adjusted.
4686         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4687         (breakpoint_re_set_thread): Use inferior_thread.
4688         * breakpoint.h (struct inferior): Forward declare.
4689         (bpstat_stop_status): Update.
4690         (remove_breakpoints_pid): Delete.
4691         (remove_breakpoints_inf): New.
4692         * bsd-uthread.c (bsd_uthread_target::wait)
4693         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4694         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4695         (maint_btrace_packet_history_cmd)
4696         (maint_btrace_clear_packet_history_cmd): Adjust.
4697         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4698         inferior_thread.
4699         * cli/cli-interp.c: Include "inferior.h".
4700         * common/refcounted-object.h (struct
4701         refcounted_object_ref_policy): New.
4702         * compile/compile-object-load.c: Include gdbthread.h.
4703         (store_regs): Use inferior_thread.
4704         * corelow.c (core_target::close): Use current_inferior.
4705         (core_target_open): Adjust to use first_thread_of_inferior and use
4706         the current inferior.
4707         * ctf.c (ctf_target::close): Adjust to use current_inferior.
4708         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4709         <thread>: ... this new field.  All references adjusted.
4710         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4711         Take a thread_info pointer instead of a ptid_t.
4712         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4713         (dummy_frame_discard, register_dummy_frame_dtor): Take a
4714         thread_info pointer instead of a ptid_t.
4715         * elfread.c: Include "inferior.h".
4716         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4717         Use inferior_thread.
4718         * eval.c (evaluate_subexp): Likewise.
4719         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4720         inferior_thread.
4721         * gdb_proc_service.h (struct thread_info): Forward declare.
4722         (struct ps_prochandle) <ptid>: Delete, replaced by ...
4723         <thread>: ... this new field.  All references adjusted.
4724         * gdbarch.h, gdbarch.c: Regenerate.
4725         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4726         'thread' parameter.  All implementations and callers adjusted.
4727         * gdbthread.h (thread_info) <set_running>: New method.
4728         (delete_thread, delete_thread_silent): Take a thread_info pointer
4729         instead of a ptid.
4730         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4731         (first_thread_of_process): Delete, replaced by ...
4732         (first_thread_of_inferior): ... this new function.  All callers
4733         adjusted.
4734         (any_live_thread_of_process): Delete, replaced by ...
4735         (any_live_thread_of_inferior): ... this new function.  All callers
4736         adjusted.
4737         (switch_to_thread, switch_to_no_thread): Declare.
4738         (is_executing): Delete.
4739         (enable_thread_stack_temporaries): Update comment.
4740         <enable_thread_stack_temporaries>: Take a thread_info pointer
4741         instead of a ptid_t.  Incref the thread.
4742         <~enable_thread_stack_temporaries>: Decref the thread.
4743         <m_ptid>: Delete
4744         <m_thr>: New.
4745         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4746         (get_last_thread_stack_temporary)
4747         (value_in_thread_stack_temporaries, can_access_registers_thread):
4748         Take a thread_info pointer instead of a ptid_t.  All callers
4749         adjusted.
4750         * infcall.c (get_call_return_value): Use inferior_thread.
4751         (run_inferior_call): Work with thread pointers instead of ptid_t.
4752         (call_function_by_hand_dummy): Work with thread pointers instead
4753         of ptid_t.  Use thread_info_ref.
4754         * infcmd.c (proceed_thread_callback): Access thread's state
4755         directly.
4756         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4757         access thread's state directly.
4758         (continue_command): Use inferior_thread.
4759         (info_program_command): Use find_thread_ptid and access thread
4760         state directly.
4761         (proceed_after_attach_callback): Use thread state directly.
4762         (notice_new_inferior): Take a thread_info pointer instead of a
4763         ptid_t.  All callers adjusted.
4764         (exit_inferior): Take an inferior pointer instead of a pid.  All
4765         callers adjusted.
4766         (exit_inferior_silent): New.
4767         (detach_inferior): Delete.
4768         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4769         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4770         (detach_inferior_command, kill_inferior_command): Use
4771         find_inferior_id instead of valid_gdb_inferior_id and
4772         gdb_inferior_id_to_pid.
4773         (inferior_command): Use inferior and thread pointers.
4774         * inferior.h (struct thread_info): Forward declare.
4775         (notice_new_inferior): Take a thread_info pointer instead of a
4776         ptid_t.  All callers adjusted.
4777         (detach_inferior): Delete declaration.
4778         (exit_inferior, exit_inferior_silent): Take an inferior pointer
4779         instead of a pid.  All callers adjusted.
4780         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4781         (valid_gdb_inferior_id): Delete.
4782         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4783         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4784         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4785         ...
4786         <inf>: ... this new field.
4787         <step_ptid>: Delete, replaced by ...
4788         <step_thread>: ... this new field.
4789         (get_displaced_stepping_state): Take an inferior pointer instead
4790         of a pid.  All callers adjusted.
4791         (displaced_step_in_progress_any_inferior): Adjust.
4792         (displaced_step_in_progress_thread): Take a thread pointer instead
4793         of a ptid_t.  All callers adjusted.
4794         (displaced_step_in_progress, add_displaced_stepping_state): Take
4795         an inferior pointer instead of a pid.  All callers adjusted.
4796         (get_displaced_step_closure_by_addr): Adjust.
4797         (remove_displaced_stepping_state): Take an inferior pointer
4798         instead of a pid.  All callers adjusted.
4799         (displaced_step_prepare_throw, displaced_step_prepare)
4800         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4801         All callers adjusted.
4802         (start_step_over): Adjust.
4803         (infrun_thread_ptid_changed): Remove bit updating ptids in the
4804         displaced step queue.
4805         (do_target_resume): Adjust.
4806         (fetch_inferior_event): Use inferior_thread.
4807         (context_switch, get_inferior_stop_soon): Take an
4808         execution_control_state pointer instead of a ptid_t.  All callers
4809         adjusted.
4810         (switch_to_thread_cleanup): Delete.
4811         (stop_all_threads): Use scoped_restore_current_thread.
4812         * inline-frame.c: Include "gdbthread.h".
4813         (inline_state) <inline_state>: Take a thread pointer instead of a
4814         ptid_t.  All callers adjusted.
4815         <ptid>: Delete, replaced by ...
4816         <thread>: ... this new field.
4817         (find_inline_frame_state): Take a thread pointer instead of a
4818         ptid_t.  All callers adjusted.
4819         (skip_inline_frames, step_into_inline_frame)
4820         (inline_skipped_frames, inline_skipped_symbol): Take a thread
4821         pointer instead of a ptid_t.  All callers adjusted.
4822         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4823         (inline_skipped_frames, inline_skipped_symbol): Likewise.
4824         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4825         pointers directly.
4826         * linux-nat.c (get_detach_signal): Likewise.
4827         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4828         (thread_db_notice_clone): Adjust.
4829         (thread_db_find_new_threads_silently)
4830         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4831         a thread pointer instead of a ptid_t.  All callers adjusted.
4832         * mi/mi-cmd-var.c: Include "inferior.h".
4833         (mi_cmd_var_update_iter): Update to use thread pointers.
4834         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4835         inferior directly.
4836         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4837         out to ...
4838         (mi_output_running): ... this new function.
4839         (mi_on_resume_1): Adjust to use it.
4840         (mi_user_selected_context_changed): Adjust to use inferior_thread.
4841         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4842         directly.
4843         (interrupt_thread_callback): : Adjust to use thread and inferior
4844         pointers.
4845         * proc-service.c: Include "gdbthread.h".
4846         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4847         * progspace-and-thread.c: Include "inferior.h".
4848         * progspace.c: Include "inferior.h".
4849         * python/py-exitedevent.c (create_exited_event_object): Adjust to
4850         hold a reference to an inferior_object.
4851         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4852         inferior_thread.
4853         * python/py-inferior.c (struct inferior_object): Give the type a
4854         tag name instead of a typedef.
4855         (python_on_normal_stop): No need to check if the current thread is
4856         listed.
4857         (inferior_to_inferior_object): Change return type to
4858         inferior_object.  All callers adjusted.
4859         (find_thread_object): Delete, bits factored out to ...
4860         (thread_to_thread_object): ... this new function.
4861         * python/py-infthread.c (create_thread_object): Use
4862         inferior_to_inferior_object.
4863         (thpy_is_stopped): Use thread pointer directly.
4864         (gdbpy_selected_thread): Use inferior_thread.
4865         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4866         field, replaced with ...
4867         <thread>: ... this new field.  All users adjusted.
4868         (btpy_insn_or_gap_new): Drop const.
4869         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
4870         callers adjusted.
4871         * python/py-record.c: Include "gdbthread.h".
4872         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4873         a ptid_t.  All callers adjusted.
4874         (gdbpy_current_recording): Use inferior_thread.
4875         * python/py-record.h (recpy_record_object) <ptid>: Delete
4876         field, replaced with ...
4877         <thread>: ... this new field.  All users adjusted.
4878         (recpy_element_object) <ptid>: Delete
4879         field, replaced with ...
4880         <thread>: ... this new field.  All users adjusted.
4881         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
4882         a ptid_t.  All callers adjusted.
4883         * python/py-threadevent.c: Include "gdbthread.h".
4884         (get_event_thread): Use thread_to_thread_object.
4885         * python/python-internal.h (struct inferior_object): Forward
4886         declare.
4887         (find_thread_object, find_inferior_object): Delete declarations.
4888         (thread_to_thread_object, inferior_to_inferior_object): New
4889         declarations.
4890         * record-btrace.c: Include "inferior.h".
4891         (require_btrace_thread): Use inferior_thread.
4892         (record_btrace_frame_sniffer)
4893         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
4894         (get_thread_current_frame): Use scoped_restore_current_thread and
4895         switch_to_thread.
4896         (get_thread_current_frame): Use thread pointer directly.
4897         (record_btrace_replay_at_breakpoint): Use thread's inferior
4898         pointer directly.
4899         * record-full.c: Include "inferior.h".
4900         * regcache.c: Include "gdbthread.h".
4901         (get_thread_arch_regcache): Use the inferior's address space
4902         directly.
4903         (get_thread_regcache, registers_changed_thread): New.
4904         * regcache.h (get_thread_regcache(thread_info *thread)): New
4905         overload.
4906         (registers_changed_thread): New.
4907         (remote_target) <remote_detach_1>: Swap order of parameters.
4908         (remote_add_thread): <remote_add_thread>: Return the new thread.
4909         (get_remote_thread_info(ptid_t)): New overload.
4910         (remote_target::remote_notice_new_inferior): Use thread pointers
4911         directly.
4912         (remote_target::process_initial_stop_replies): Use
4913         thread_info::set_running.
4914         (remote_target::remote_detach_1, remote_target::detach)
4915         (extended_remote_target::detach): Adjust.
4916         * stack.c (frame_show_address): Use inferior_thread.
4917         * target-debug.h (target_debug_print_thread_info_pp): New.
4918         * target-delegates.c: Regenerate.
4919         * target.c (default_thread_address_space): Delete.
4920         (memory_xfer_partial_1): Use current_inferior.
4921         (target_detach): Use current_inferior.
4922         (target_thread_address_space): Delete.
4923         (generic_mourn_inferior): Use current_inferior.
4924         * target.h (struct target_ops) <thread_address_space>: Delete.
4925         (target_thread_address_space): Delete.
4926         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
4927         pointers directly.
4928         (delete_thread_1, delete_thread, delete_thread_silent): Take a
4929         thread pointer instead of a ptid_t.  Adjust all callers.
4930         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4931         (first_thread_of_process): Delete, replaced by ...
4932         (first_thread_of_inferior): ... this new function.  All callers
4933         adjusted.
4934         (any_thread_of_process): Rename to ...
4935         (any_thread_of_inferior): ... this, and take an inferior pointer.
4936         (any_live_thread_of_process): Rename to ...
4937         (any_live_thread_of_inferior): ... this, and take an inferior
4938         pointer.
4939         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4940         (value_in_thread_stack_temporaries)
4941         (get_last_thread_stack_temporary): Take a thread pointer instead
4942         of a ptid_t.  Adjust all callers.
4943         (thread_info::set_running): New.
4944         (validate_registers_access): Use inferior_thread.
4945         (can_access_registers_ptid): Rename to ...
4946         (can_access_registers_thread): ... this, and take a thread
4947         pointer.
4948         (print_thread_info_1): Adjust to compare thread pointers instead
4949         of ptids.
4950         (switch_to_no_thread, switch_to_thread): Make extern.
4951         (scoped_restore_current_thread::~scoped_restore_current_thread):
4952         Use m_thread pointer directly.
4953         (scoped_restore_current_thread::scoped_restore_current_thread):
4954         Use inferior_thread.
4955         (thread_command): Use thread pointer directly.
4956         (thread_num_make_value_helper): Use inferior_thread.
4957         * top.c (execute_command): Use inferior_thread.
4958         * tui/tui-interp.c: Include "inferior.h".
4959         * varobj.c (varobj_create): Use inferior_thread.
4960         (value_of_root_1): Use find_thread_global_id instead of
4961         global_thread_id_to_ptid.
4962
4963 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
4964
4965         * regcache.c (readable_regcache::read_part): Avoid memcpy when
4966         possible.
4967         (regcache::write_part): Likewise.
4968         (readable_regcache::cooked_read_part): Update comment.
4969         (readable_regcache::cooked_write_part): Likewise.
4970         * regcache.h: (readable_regcache::read_part): Likewise.
4971         (regcache::write_part): Likewise.
4972
4973 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
4974             Dirk Schubert  <dirk.schubert@arm.com>
4975
4976         * aarch64-linux-nat.c (post_attach): New.
4977         (aarch64_linux_nat_target::post_attach): Override post_attach to
4978         record the number of hardware debug registers.
4979
4980 2018-06-20  Tom Tromey  <tom@tromey.com>
4981
4982         * python/py-param.c (add_setshow_generic): Make parameters const.
4983         (parmpy_init): Update.
4984
4985 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
4986
4987         * regcache.h (regcache_cooked_read_ftype): Rename to...
4988         (register_read_ftype): ...this, change type to function_view.
4989         (class reg_buffer) <save>: Remove src parameter.
4990         (readonly_detached_regcache) <readonly_detached_regcache>: Make
4991         parameter non-const in first overload.  Remove src parameter in
4992         second overload.
4993         * regcache.c (do_cooked_read): Remove.
4994         (readonly_detached_regcache::readonly_detached_regcache): Make
4995         parameter non-const, adjust call to other constructor.
4996         (reg_buffer::save): Remove src parameter.
4997         * frame.c (do_frame_register_read): Remove.
4998         (frame_save_as_regcache): Use lambda function.
4999         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5000         parameter to ppu2spu_data *.
5001         (ppu2spu_sniffer): Use lambda function.
5002
5003 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5004
5005         * record-full.c (record_full_target::insert_breakpoint): Remove
5006         "struct" keyword, add const.
5007
5008 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
5009
5010         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5011         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5012         * configure.ac: Remove AC_PREREQ, add missing quoting.
5013         * gnulib/configure.ac: Modernize usage of
5014         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
5015         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5016         (AUTOMAKE_VERSION): Bump to 1.15.1.
5017         * configure: Re-generate.
5018         * config.in: Re-generate.
5019         * aclocal.m4: Re-generate.
5020         * gnulib/aclocal.m4: Re-generate.
5021         * gnulib/config.in: Re-generate.
5022         * gnulib/configure: Re-generate.
5023         * gnulib/import/Makefile.in: Re-generate.
5024
5025 2018-06-19  Pedro Alves  <palves@redhat.com>
5026
5027         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5028         (lookup_minimal_symbol_by_pc_section): ... here with
5029         gdb_assert_not_reached added.
5030
5031 2018-06-19  Pedro Alves  <palves@redhat.com>
5032
5033         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5034         parameter with a block parameter.  Compare location's block symbol
5035         with the frame's block instead of addresses.
5036         (skip_inline_frames): Pass the current block instead of the
5037         frame's address.  Break out as soon as we determine the frame
5038         should not be skipped.
5039
5040 2018-06-18  Tom Tromey  <tom@tromey.com>
5041
5042         * solib-aix.c (solib_aix_get_section_offsets): Return
5043         unique_xmalloc_ptr.
5044         (solib_aix_solib_create_inferior_hook): Update.
5045
5046 2018-06-18  Tom Tromey  <tom@tromey.com>
5047
5048         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5049
5050 2018-06-18  Tom Tromey  <tom@tromey.com>
5051
5052         * solib-frv.c (frv_relocate_main_executable): Use
5053         unique_xmalloc_ptr.
5054         * solib-dsbt.c (dsbt_relocate_main_executable): Use
5055         unique_xmalloc_ptr.
5056
5057 2018-06-18  Tom Tromey  <tom@tromey.com>
5058
5059         * objfiles.h (inhibit_section_map_updates): Update.
5060         (resume_section_map_updates, resume_section_map_updates_cleanup):
5061         Remove.
5062         * solib-svr4.c (svr4_handle_solib_event): Update.
5063         * objfiles.c (inhibit_section_map_updates): Return
5064         scoped_restore_tmpl<int>.
5065         (resume_section_map_updates, resume_section_map_updates_cleanup):
5066         Remove.
5067
5068 2018-06-18  Tom Tromey  <tom@tromey.com>
5069
5070         * valprint.h (read_string): Update.
5071         * valprint.c (read_string): Change type of "buffer".
5072         (val_print_string): Update.
5073         * python/py-value.c (valpy_string): Update.
5074         * language.h (struct language_defn) <la_get_string>: Change
5075         type of "buffer".
5076         (default_get_string, c_get_string): Update.
5077         * language.c (default_get_string): Change type of "buffer".
5078         * guile/scm-value.c (gdbscm_value_to_string): Update.
5079         * c-lang.c (c_get_string): Change type of "buffer".
5080
5081 2018-06-18  Tom Tromey  <tom@tromey.com>
5082
5083         * ser-mingw.c (struct pipe_state_destroyer): New.
5084         (pipe_state_up): New typedef.
5085         (cleanup_pipe_state): Remove.
5086         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
5087
5088 2018-06-18  Tom Tromey  <tom@tromey.com>
5089
5090         * rust-lang.h (rust_yyerror): Don't declare.
5091         * rust-lang.c (rust_language_defn): Update.
5092         * rust-exp.y (yyerror): Now static.
5093         * parse.c (parse_exp_in_context_1): Update.
5094         * p-lang.h (p_yyerror): Don't declare.
5095         * p-lang.c (p_language_defn): Update.
5096         * p-exp.y (yyerror): Now static.
5097         * opencl-lang.c (opencl_language_defn): Update.
5098         * objc-lang.c (objc_language_defn): Update.
5099         * m2-lang.h (m2_yyerror): Don't declare.
5100         * m2-lang.c (m2_language_defn): Update.
5101         * m2-exp.y (yyerror): Now static.
5102         * language.h (struct language_defn) <la_error>: Remove.
5103         * language.c (unk_lang_error): Remove.
5104         (unknown_language_defn, auto_language_defn): Remove.
5105         * go-lang.h (go_yyerror): Don't declare.
5106         * go-lang.c (go_language_defn): Update.
5107         * go-exp.y (yyerror): Now static.
5108         * f-lang.h (f_yyerror): Don't declare.
5109         * f-lang.c (f_language_defn): Update.
5110         * f-exp.y (yyerror): Now static.
5111         * d-lang.h (d_yyerror): Don't declare.
5112         * d-lang.c (d_language_defn): Update.
5113         * d-exp.y (yyerror): Now static.
5114         * c-lang.h (c_yyerror): Don't declare.
5115         * c-lang.c (c_language_defn, cplus_language_defn)
5116         (asm_language_defn, minimal_language_defn): Update.
5117         * c-exp.y (yyerror): Now static.
5118         * ada-lang.h (ada_yyerror): Don't declare.
5119         * ada-lang.c (ada_language_defn): Update.
5120         * ada-exp.y (yyerror): Now static.
5121
5122 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5123
5124         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5125         (store_sveregs_to_thread): Likewise.
5126         (aarch64_linux_fetch_inferior_registers): Check for SVE.
5127         (aarch64_linux_store_inferior_registers): Likewise.
5128         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5129         function.
5130         (aarch64_sve_regs_copy_to_regcache): Likewise.
5131         (aarch64_sve_regs_copy_from_regcache): Likewise.
5132         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5133         declaration.
5134         (aarch64_sve_regs_copy_to_regcache): Likewise.
5135         (aarch64_sve_regs_copy_from_regcache): Likewise.
5136         (sve_context): Structure from Linux headers.
5137         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5138         (SVE_SIG_ZREG_SIZE): Likewise.
5139         (SVE_SIG_PREG_SIZE): Likewise.
5140         (SVE_SIG_FFR_SIZE): Likewise.
5141         (SVE_SIG_REGS_OFFSET): Likewise.
5142         (SVE_SIG_ZREGS_OFFSET): Likewise.
5143         (SVE_SIG_ZREG_OFFSET): Likewise.
5144         (SVE_SIG_ZREGS_SIZE): Likewise.
5145         (SVE_SIG_PREGS_OFFSET): Likewise.
5146         (SVE_SIG_PREG_OFFSET): Likewise.
5147         (SVE_SIG_PREGS_SIZE): Likewise.
5148         (SVE_SIG_FFR_OFFSET): Likewise.
5149         (SVE_SIG_REGS_SIZE): Likewise.
5150         (SVE_SIG_CONTEXT_SIZE): Likewise.
5151         (SVE_PT_REGS_MASK): Likewise.
5152         (SVE_PT_REGS_FPSIMD): Likewise.
5153         (SVE_PT_REGS_SVE): Likewise.
5154         (SVE_PT_VL_INHERIT): Likewise.
5155         (SVE_PT_VL_ONEXEC): Likewise.
5156         (SVE_PT_REGS_OFFSET): Likewise.
5157         (SVE_PT_FPSIMD_OFFSET): Likewise.
5158         (SVE_PT_FPSIMD_SIZE): Likewise.
5159         (SVE_PT_SVE_ZREG_SIZE): Likewise.
5160         (SVE_PT_SVE_PREG_SIZE): Likewise.
5161         (SVE_PT_SVE_FFR_SIZE): Likewise.
5162         (SVE_PT_SVE_FPSR_SIZE): Likewise.
5163         (SVE_PT_SVE_FPCR_SIZE): Likewise.
5164         (__SVE_SIG_TO_PT): Likewise.
5165         (SVE_PT_SVE_OFFSET): Likewise.
5166         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5167         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5168         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5169         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5170         (SVE_PT_SVE_PREG_OFFSET): Likewise.
5171         (SVE_PT_SVE_PREGS_SIZE): Likewise.
5172         (SVE_PT_SVE_FFR_OFFSET): Likewise.
5173         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5174         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5175         (SVE_PT_SVE_SIZE): Likewise.
5176         (SVE_PT_SIZE): Likewise.
5177         (HAS_SVE_STATE): New define.
5178
5179 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5180
5181         * nat/aarch64-sve-linux-sigcontext.h: New file.
5182         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5183         new files.
5184         (SVE_VQ_MIN): Likewise.
5185         (SVE_VQ_MAX): Likewise.
5186         (SVE_VL_MIN): Likewise.
5187         (SVE_VL_MAX): Likewise.
5188         (SVE_NUM_ZREGS): Likewise.
5189         (SVE_NUM_PREGS): Likewise.
5190         (sve_vl_valid): Likewise.
5191         (struct user_sve_header): Likewise.
5192
5193 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
5194             Richard Bunt <Richard.Bunt@arm.com>
5195
5196         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5197         was requested by GDB.
5198
5199 2018-06-15  Tom de Vries  <tdevries@suse.de>
5200
5201         * MAINTAINERS (Write After Approval): Add Tom de Vries.
5202
5203 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
5204
5205         * gnulib/update-gnulib.sh: Print expected versions of
5206         autoconf/aclocal.
5207
5208 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
5209
5210         * arch-utils.c (default_type_align): Use type_length_units.
5211         * gdbtypes.c (type_align): Use type_length_units.
5212
5213 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5214
5215         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5216         of 'define' command.
5217
5218 2018-06-14  Tom de Vries  <tdevries@suse.de>
5219
5220         PR cli/22573
5221         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5222         get_no_prettyformat_print_options.
5223
5224 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5225
5226         * sparc-nat.h: Include target.h.
5227         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5228         <fetch_registers>: Remove this argument in function call.
5229         <store_registers>: Remove this argument in function call, remove
5230         extra semicolon.
5231         <low_forget_process>: Call sparc64_forget_process instead of
5232         sparc_forget_process.
5233
5234 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5235
5236         * procfs.c (_initialize_procfs): Use add_inf_child_target.
5237         (procfs_target::make_corefile_notes): Adjust to new
5238         target_read_alloc return type.
5239
5240 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5241             Stephen Roberts  <stephen.roberts@arm.com>
5242
5243         PR gdb/22882
5244         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5245         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5246         Move should_notify_stop local into more inner scope.
5247
5248 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5249             Stephen Roberts  <stephen.roberts@arm.com>
5250
5251         PR gdb/22882
5252         * infrun.c (resume_1): Add call to mark_async_event_handler.
5253
5254 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5255
5256         * infrun.c (do_target_wait): Change old version of $pc printed.
5257
5258 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5259
5260         * dwarf2read.c (read_index_from_section): Rename to...
5261         (read_gdb_index_from_section): ... this, update all callers.
5262         (dwarf2_read_index): Rename to...
5263         (dwarf2_read_gdb_index): ... this, update all callers.
5264
5265 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
5266
5267         * gdb/hppa-linux-nat.c
5268         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5269         hppa_linux_nat_target::fetch_registers.
5270
5271 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5272
5273         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5274         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5275         (AARCH64_DWARF_SVE_FFR): Likewise.
5276         (AARCH64_DWARF_SVE_P0): Likewise.
5277         (AARCH64_DWARF_SVE_Z0): Likewise.
5278
5279 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5280
5281         * common/common-regcache.h (raw_compare): New function.
5282         * regcache.c (regcache::raw_compare): Likewise.
5283         * regcache.h (regcache::raw_compare): New declaration.
5284
5285 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5286
5287         * common/common-regcache.h (reg_buffer_common): New structure.
5288         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5289         (reg_buffer::raw_supply): Likewise.
5290         (reg_buffer::raw_supply_integer): Likewise.
5291         (reg_buffer::raw_supply_zeroed): Likewise.
5292         (reg_buffer::raw_collect): Likewise.
5293         (reg_buffer::raw_collect_integer): Likewise.
5294         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5295         (reg_buffer::raw_supply): Likewise.
5296         (reg_buffer::raw_supply_integer): Likewise.
5297         (reg_buffer::raw_supply_zeroed): Likewise.
5298         (reg_buffer::raw_collect): Likewise.
5299         (reg_buffer::raw_collect_integer): Likewise.
5300
5301 2018-06-10  Tom Tromey  <tom@tromey.com>
5302
5303         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
5304         (class remote_state) <stop_reply_queue>: Now std::vector.
5305         (remote_state::~remote_state)
5306         (remote_target::stop_reply_queue_length): Update.
5307         (struct queue_iter_param, remove_child_of_pending_fork)
5308         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5309         (check_pending_event_prevents_wildcard_vcont_callback)
5310         (remove_stop_reply_for_inferior)
5311         (remove_stop_reply_of_remote_state)
5312         (remote_notif_remove_once_on_match)
5313         (stop_reply_match_ptid_and_ws)
5314         (remote_kill_child_of_pending_fork): Remove.
5315         (remote_target::remove_new_fork_children)
5316         (remote_target::check_pending_events_prevent_wildcard_vcont)
5317         (remote_target::discard_pending_stop_replies)
5318         (remote_target::discard_pending_stop_replies_in_queue)
5319         (remote_target::remote_notif_remove_queued_reply)
5320         (remote_target::queued_stop_reply)
5321         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5322         (remote_target::wait, remote_target::kill_new_fork_children)
5323         (remote_target::async): Update.
5324
5325 2018-06-10  Tom Tromey  <tom@tromey.com>
5326
5327         * record-full.c (record_full_arch_list_cleanups): Remove.
5328         (record_full_message): Use try/catch.
5329         (record_full_wait_cleanups): Remove.
5330         (record_full_wait_1): Use try/catch.
5331         (record_full_restore): Likewise.
5332
5333 2018-06-10  Tom Tromey  <tom@tromey.com>
5334
5335         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
5336         declare VEC.  Add constructor.
5337         <in_target_beneath>: Now bool.
5338         (record_full_breakpoints): Now a std::vector, static.
5339         (record_full_sync_record_breakpoints)
5340         (record_full_init_record_breakpoints)
5341         (record_full_target::insert_breakpoint)
5342         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
5343
5344 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5345
5346         * dwarf2read.c (process_cu_includes): Remove struct keyword.
5347         * serial.c (serial_interface_lookup): Remove struct keyword.
5348
5349 2018-06-10  Tom Tromey  <tom@tromey.com>
5350
5351         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5352         method.
5353         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5354         a method.
5355         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5356         method.
5357         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5358         "beneath" as a method.
5359         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5360         Use "beneath" as a method.
5361
5362 2018-06-10  Tom Tromey  <tom@tromey.com>
5363
5364         * tracefile.c (struct trace_file_writer_deleter): New.
5365         <operator()>: Rename from trace_file_writer_xfree.
5366         (trace_file_writer_up): New typedef.
5367         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5368
5369 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5370
5371         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5372         <m_registers, m_register_status>: Change type to
5373         std::unique_ptr.
5374         * regcache.c (reg_buffer::reg_buffer): Use new instead of
5375         XCNEWVEC.
5376
5377 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5378
5379         * common/common-regcache.h (enum register_status): Add
5380         underlying type "signed char".
5381         * regcache.h (reg_buffer) <m_register_status>: Change type to
5382         register_status *.
5383         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5384         register_status instead of signed char.
5385         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5386         (reg_buffer::get_register_status): Remove cast.
5387         (readable_regcache::raw_read): Remove cast.
5388         (readable_regcache::cooked_read): Remove cast.
5389
5390 2018-06-09  Tom Tromey  <tom@tromey.com>
5391
5392         * source.c (reverse_search_command, forward_search_command): Use
5393         scoped_fd.
5394
5395 2018-06-09  Tom Tromey  <tom@tromey.com>
5396
5397         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
5398         (serial_ops_list): Now static, std::vector.
5399         (serial_interface_lookup, serial_add_interface): Update.
5400
5401 2018-06-09  Tom Tromey  <tom@tromey.com>
5402
5403         * dwarf2read.c (process_cu_includes): Update.
5404         (process_full_comp_unit): Update.
5405         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5406         std::vector.
5407
5408 2018-06-08  Paul Koning  <paul_koning@dell.com>
5409
5410         PR gdb/23252
5411
5412         * python/python.c (do_start_initialization):
5413         Avoid call to internal Python API.
5414         (init__gdb_module): New function.
5415
5416 2018-06-08  Gary Benson <gbenson@redhat.com>
5417
5418         * linux-thread-db.c (valprint.h): New include.
5419         (struct check_thread_db_info): New structure.
5420         (check_thread_db_on_load, tdb_testinfo): New static globals.
5421         (check_thread_db, check_thread_db_callback): New functions.
5422         (try_thread_db_load_1): Run integrity checks if requested.
5423         (maintenance_check_libthread_db): New function.
5424         (_initialize_thread_db): Register "maint check libthread-db"
5425         and "maint set/show check-libthread-db".
5426         * NEWS: Mention the above new commands.
5427
5428 2018-06-08  Tom Tromey  <tom@tromey.com>
5429
5430         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5431         now a method.
5432
5433 2018-06-08  Tom Tromey  <tom@tromey.com>
5434
5435         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5436
5437 2018-06-08  Tom Tromey  <tom@tromey.com>
5438
5439         * common/btrace-common.h (struct btrace_data): Add constructor,
5440         destructor, move assignment operator.
5441         <empty, clear, fini>: New methods.
5442         <format>: Initialize.
5443         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5444         (btrace_data_empty): Don't declare.
5445         * common/btrace-common.c (btrace_data_init): Remove.
5446         (btrace_data::fini): Rename from btrace_data_fini.
5447         (btrace_data::empty): Rename from btrace_data_empty.
5448         (btrace_data::clear): Rename from btrace_data_clear.  Return
5449         bool.
5450         * btrace.h (make_cleanup_btrace_data): Don't declare.
5451         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5452         (parse_xml_btrace): Update.
5453         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5454         (maint_btrace_clear_packet_history_cmd): Update.
5455
5456 2018-06-07  Pedro Alves  <palves@redhat.com>
5457
5458         * target.h (target_ops) <beneath>: Now a method.  All references
5459         updated.
5460         (class target_stack): New.
5461         * target.c (g_target_stack): New.
5462         (g_current_top_target): Delete.
5463         (current_top_target): Get the top target out of g_target_stack.
5464         (target_stack::push, target_stack::unpush): New.
5465         (push_target, unpush_target): Reimplement.
5466         (target_is_pushed): Reimplement in terms of g_target_stack.
5467         (target_ops::beneath, target_stack::find_beneath): New.
5468
5469 2018-06-07  Pedro Alves  <palves@redhat.com>
5470
5471         * target.h (find_target_beneath): Delete declaration.
5472         * target.c (find_target_beneath): Delete definition.
5473         * aix-thread.c: All callers of find_target_beneath adjusted to
5474         call target_ops::beneath instead.
5475         * bsd-uthread.c: Likewise.
5476         * linux-thread-db.c: Likewise.
5477         * ravenscar-thread.c: Likewise.
5478         * sol-thread.c: Likewise.
5479         * spu-multiarch.c: Likewise.
5480
5481 2018-06-07  Pedro Alves  <palves@redhat.com>
5482
5483         * target.h (target_ops) <beneath>: Now a method.  All references
5484         updated.
5485         (target_ops) <m_beneath>: New.
5486         * target.c (target_ops::beneath): New.
5487         * corelow.c: Adjust all references to target_ops::beneath.
5488         * linux-thread-db.c: Likewise.
5489         * make-target-delegates: Likewise.
5490         * record-btrace.c: Likewise.
5491         * record-full.c: Likewise.
5492         * remote.c: Likewise.
5493         * target.c: Likewise.
5494         * target-delegates.c: Regenerate.
5495
5496 2018-06-07  Pedro Alves  <palves@redhat.com>
5497
5498         * target.h (target_stack): Delete.
5499         (current_top_target): Declare function.
5500         * target.c (target_stack): Delete.
5501         (g_current_top_target): New.
5502         (current_top_target): New function.
5503         * auxv.c: Use current_top_target instead of target_stack
5504         throughout.
5505         * avr-tdep.c: Likewise.
5506         * breakpoint.c: Likewise.
5507         * corefile.c: Likewise.
5508         * elfread.c: Likewise.
5509         * eval.c: Likewise.
5510         * exceptions.c: Likewise.
5511         * frame.c: Likewise.
5512         * gdbarch-selftests.c: Likewise.
5513         * gnu-v3-abi.c: Likewise.
5514         * ia64-tdep.c: Likewise.
5515         * ia64-vms-tdep.c: Likewise.
5516         * infcall.c: Likewise.
5517         * infcmd.c: Likewise.
5518         * infrun.c: Likewise.
5519         * linespec.c: Likewise.
5520         * linux-tdep.c: Likewise.
5521         * minsyms.c: Likewise.
5522         * ppc-linux-nat.c: Likewise.
5523         * ppc-linux-tdep.c: Likewise.
5524         * procfs.c: Likewise.
5525         * regcache.c: Likewise.
5526         * remote.c: Likewise.
5527         * rs6000-tdep.c: Likewise.
5528         * s390-linux-nat.c: Likewise.
5529         * s390-tdep.c: Likewise.
5530         * solib-aix.c: Likewise.
5531         * solib-darwin.c: Likewise.
5532         * solib-dsbt.c: Likewise.
5533         * solib-spu.c: Likewise.
5534         * solib-svr4.c: Likewise.
5535         * solib-target.c: Likewise.
5536         * sparc-tdep.c: Likewise.
5537         * sparc64-tdep.c: Likewise.
5538         * spu-tdep.c: Likewise.
5539         * symfile.c: Likewise.
5540         * symtab.c: Likewise.
5541         * target-descriptions.c: Likewise.
5542         * target-memory.c: Likewise.
5543         * target.c: Likewise.
5544         * target.h: Likewise.
5545         * tracefile-tfile.c: Likewise.
5546         * tracepoint.c: Likewise.
5547         * valops.c: Likewise.
5548         * valprint.c: Likewise.
5549         * value.c: Likewise.
5550         * windows-tdep.c: Likewise.
5551         * mi/mi-main.c: Likewise.
5552
5553 2018-06-07  Tom Tromey  <tom@tromey.com>
5554
5555         * valprint.h (build_address_symbolic): Declare.
5556         * printcmd.c (print_address_symbolic): Update.
5557         (build_address_symbolic): Change "name" and "filename" to
5558         std::string.
5559         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5560         Update.
5561         * defs.h (build_address_symbolic): Remove declaration.
5562
5563 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
5564
5565         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5566         (aarch64_vnv_type): Add function.
5567         (aarch64_pseudo_register_name): Add V regs for SVE.
5568         (aarch64_pseudo_register_type): Likewise.
5569         (aarch64_pseudo_register_reggroup_p): Likewise.
5570         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5571         (aarch64_pseudo_read_value): Add V regs for SVE.
5572         (aarch64_pseudo_write_2): Use V0 offset for SVE
5573         (aarch64_pseudo_write): Add V regs for SVE.
5574         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5575
5576 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5577
5578         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5579         (sve_vl_from_vq): Likewise.
5580
5581 2018-06-05  Tom Tromey  <tom@tromey.com>
5582
5583         * cli/cli-cmds.c (show_version): Update.
5584         * top.c (print_gdb_version): Add "interactive" parameter.
5585         Update.
5586         * main.c (captured_main_1): Update.
5587         * top.h (print_gdb_version): Add "interactive" parameter and a
5588         comment.
5589
5590 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
5591
5592         * common/enum-flags.h: Add trailing semicolon to example in
5593         comment.
5594
5595 2018-06-05  Tom Tromey  <tom@tromey.com>
5596
5597         PR cli/12326:
5598         * NEWS: Add entry about pager.
5599         * utils.c (pagination_disabled_for_command): New global.
5600         (prompt_for_continue): Allow "c" response to prompt.
5601         (reinitialize_more_filter): Clear
5602         pagination_disabled_for_command.
5603         (fputs_maybe_filtered): Check pagination_disabled_for_command.
5604
5605 2018-06-04  Tom Tromey  <tom@tromey.com>
5606
5607         * ada-lang.h (ada_lookup_symbol_list): Update.
5608         * ada-lang.c (resolve_subexp): Update.
5609         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
5610         parameter.
5611         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5612         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5613         results parameter to std::vector.
5614         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5615         Update.
5616         * ada-exp.y (block_lookup): Update.
5617         (select_possible_type_sym): Change type of syms.  Remove nsyms
5618         parameter.
5619         (write_var_or_type, write_name_assoc): Update.
5620
5621 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
5622
5623         * windows-nat.c (windows_nat_target::xfer_partial): Return
5624         TARGET_XFER_E_IO if we need to delegate to the target beneath
5625         but BENEATH is NULL.
5626
5627 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
5628
5629         * Makefile.in (config.status): Add configure.nat as a
5630         dependency.
5631
5632 2018-06-04  Tom Tromey  <tom@tromey.com>
5633
5634         * cp-name-parser.y (cpname_state): Add method declarations.
5635         (HANDLE_QUAL): Update.
5636         (cpname_state::d_grab, cpname_state::fill_comp)
5637         (cpname_state::make_operator, cpname_state::make_dtor)
5638         (cpname_state::make_builtin_type, cpname_state::make_name)
5639         (cpname_state::d_qualify, cpname_state::d_int_type)
5640         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5641         (%union): Move earlier.
5642
5643 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5644
5645         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5646
5647 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5648
5649         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5650         (aarch64_pseudo_write_1): Likewise.
5651         (aarch64_pseudo_read_value): Use helper.
5652         (aarch64_pseudo_write): Likewise.
5653
5654 2018-06-04  Pedro Alves  <palves@redhat.com>
5655
5656         * darwin-nat.c (darwin_ops): Delete.
5657         (darwin_attach_pid): Use get_native_target.
5658
5659 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5660
5661         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5662         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5663
5664 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5665
5666         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5667         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5668         (aarch64_gdbarch_init): Check for SVE.
5669         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5670
5671 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5672
5673         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5674         * aarch64-tdep.h (aarch64_read_description): Likewise.
5675         * arch/aarch64.c (aarch64_create_target_description): Likewise.
5676         * arch/aarch64.h (aarch64_create_target_description): Likewise.
5677         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5678         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5679         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5680
5681 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
5682
5683         * value.c (value_fetch_lazy_bitfield): New.
5684         (value_fetch_lazy_memory): New.
5685         (value_fetch_lazy_register): New.
5686         (value_fetch_lazy): Factor out to smaller functions.
5687
5688 2018-06-01  Tom Tromey  <tom@tromey.com>
5689
5690         * cp-name-parser.y (backslashable, represented): Now const.
5691
5692 2018-06-01  Tom Tromey  <tom@tromey.com>
5693
5694         * cp-name-parser.y: Include parser-defs.h.
5695         (parser_fprintf): Remove declaration.
5696
5697 2018-06-01  Tom Tromey  <tom@tromey.com>
5698
5699         * cp-name-parser.y: Use %pure-parser, %lex-param, and
5700         %parse-param.
5701         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5702         (global_result): Remove globals.
5703         (struct cpname_state): New.
5704         (yyparse): Don't declare.
5705         (yylex, yyerror): Move declarations after %union.
5706         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5707         (make_name): Add state parameter.
5708         Update all callers.
5709         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5710         parameter.
5711         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5712         Update.
5713         (yylex): Add lvalp, state parameters.
5714         (yyerror): Add state parameter.
5715         (cp_demangled_name_to_comp): Update.
5716
5717 2018-06-01  Tom Tromey  <tom@tromey.com>
5718
5719         * cp-name-parser.y (parser_fprintf): Declare.
5720         (GDB_YY_REMAP_PREFIX): Define.
5721         Include yy-remap.h.  Don't redefine yy* identifiers.
5722
5723 2018-06-01  Tom Tromey  <tom@tromey.com>
5724
5725         * python/py-type.c (typy_legacy_template_argument): Update.
5726         * cp-support.h (cp_demangled_name_to_comp): Update.
5727         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5728         parameter to be a "std::string *".
5729         (main): Update.
5730
5731 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
5732
5733         * ada-lex.l: Include "diagnostics.h" instead of
5734         "common/diagnostics.h".
5735         * unittests/environ-selftests.c: Likewise.
5736         * common/diagnostics.h: Moved to ../include.
5737
5738 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
5739
5740         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5741         to language_mode_manual while calling breakpoint_re_set_one.
5742
5743 2018-06-01  Tom Tromey  <tom@tromey.com>
5744
5745         * valops.c (value_cast_structs, destructor_name_p): Update.
5746         * symtab.c (gdb_mangle_name): Update.
5747         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5748         Update.
5749         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5750         (pascal_object_print_value_fields, pascal_object_print_value):
5751         Update.
5752         * p-typeprint.c (pascal_type_print_derivation_info): Update.
5753         * linespec.c (find_methods): Update.
5754         * gdbtypes.h (type_name_no_tag): Remove.
5755         (type_name_or_error): Rename from type_name_no_tag_or_error.
5756         * gdbtypes.c (type_name_no_tag): Remove.
5757         (type_name_or_error): Rename from type_name_no_tag_or_error.
5758         (lookup_struct_elt_type, check_typedef): Update.
5759         * expprint.c (print_subexp_standard): Update.
5760         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5761         * d-namespace.c (d_lookup_nested_symbol): Update.
5762         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5763         (cp_print_class_member): Update.
5764         * cp-namespace.c (cp_lookup_nested_symbol): Update.
5765         * completer.c (add_struct_fields): Update.
5766         * c-typeprint.c (cp_type_print_derivation_info)
5767         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5768         Update.
5769         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5770         (ada_prefer_type, ada_is_exception_sym): Update.
5771
5772 2018-06-01  Tom Tromey  <tom@tromey.com>
5773
5774         * valops.c (enum_constant_from_type, value_namespace_elt)
5775         (value_maybe_namespace_elt): Update.
5776         * valarith.c (find_size_for_pointer_math): Update.
5777         * target-descriptions.c (make_gdb_type): Update.
5778         * symmisc.c (print_symbol): Update.
5779         * stabsread.c (define_symbol, read_type)
5780         (complain_about_struct_wipeout, add_undefined_type)
5781         (cleanup_undefined_types_1): Update.
5782         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5783         (rust_range_type_p, val_print_struct, rust_print_struct_def)
5784         (rust_internal_print_type, rust_composite_type)
5785         (rust_evaluate_funcall, rust_evaluate_subexp)
5786         (rust_inclusive_range_type_p): Update.
5787         * python/py-type.c (typy_get_tag): Update.
5788         * p-typeprint.c (pascal_type_print_base): Update.
5789         * mdebugread.c (parse_symbol, parse_type): Update.
5790         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5791         Update.
5792         * guile/scm-type.c (gdbscm_type_tag): Update.
5793         * go-lang.c (sixg_string_p): Update.
5794         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5795         Update.
5796         * gdbtypes.h (struct main_type) <tag_name>: Remove.
5797         (TYPE_TAG_NAME): Remove.
5798         * gdbtypes.c (type_name_no_tag): Simplify.
5799         (check_typedef, check_types_equal, recursive_dump_type)
5800         (copy_type_recursive, arch_composite_type): Update.
5801         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
5802         in summary mode when needed.
5803         * eval.c (evaluate_funcall): Update.
5804         * dwarf2read.c (fixup_go_packaging, read_structure_type)
5805         (process_structure_scope, read_enumeration_type)
5806         (read_namespace_type, read_module_type, determine_prefix): Update.
5807         * cp-support.c (inspect_type): Update.
5808         * coffread.c (process_coff_symbol, decode_base_type): Update.
5809         * c-varobj.c (c_is_path_expr_parent): Update.
5810         * c-typeprint.c (c_type_print_base_struct_union): Update.
5811         (c_type_print_base_1): Update.  Print struct/class/union/enum in
5812         summary when using C language.
5813         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5814         (gen_maybe_namespace_elt): Update.
5815         * ada-lang.c (ada_type_name): Simplify.
5816         (empty_record, ada_template_to_fixed_record_type_1)
5817         (template_to_static_fixed_type)
5818         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5819
5820 2018-06-01  Tom Tromey  <tom@tromey.com>
5821
5822         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5823         c_print_type.
5824         * c-typeprint.c (c_print_type_1): Add "language" parameter.
5825         (c_print_type): Update.
5826         (c_print_type): New overload.
5827         (c_type_print_varspec_prefix, c_type_print_args)
5828         (c_type_print_varspec_suffix, c_print_type_no_offsets)
5829         (c_type_print_base_struct_union, c_type_print_base_1)
5830         (cp_type_print_method_args): Add "language" parameter.
5831         (c_type_print_base): Update.
5832         * c-lang.h (c_print_type): Add new overload.
5833
5834 2018-06-01  Tom Tromey  <tom@tromey.com>
5835
5836         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5837         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5838
5839 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
5840
5841         * aarch64-tdep.c (aarch64_sve_register_names): New const
5842         var.
5843         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5844         (AARCH64_SVE_Z_REGS_NUM): New define.
5845         (AARCH64_SVE_P_REGS_NUM): Likewise.
5846         (AARCH64_SVE_NUM_REGS): Likewise.
5847
5848 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
5849
5850         * nat/linux-ptrace.h [__alpha__]
5851         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5852         definitions.
5853
5854 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
5855
5856         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5857         the endianness selected.
5858         * NEWS: Document `set endian auto' mode operation update.
5859
5860 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5861
5862         * Makefile.in: Add new header.
5863         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5864         (sve_vl_from_vg): Likewise.
5865         (sve_vq_from_vl): Likewise.
5866         (sve_vl_from_vq): Likewise.
5867         (sve_vq_from_vg): Likewise.
5868         (sve_vg_from_vq): Likewise.
5869         * configure.nat: Add new c file.
5870         * nat/aarch64-sve-linux-ptrace.c: New file.
5871         * nat/aarch64-sve-linux-ptrace.h: New file.
5872
5873 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5874
5875         * aarch64-linux-nat.c (aarch64_linux_read_description):
5876         Add parmeter zero.
5877         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
5878         Likewise.
5879         * aarch64-tdep.c (tdesc_aarch64_list): Add.
5880         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
5881         (aarch64_gdbarch_init): Add parmeter zero.
5882         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
5883         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
5884         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
5885         parmeter.
5886         * doc/gdb.texinfo: Describe SVE feature
5887         * features/aarch64-sve.c: New file.
5888
5889 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
5890
5891         PR gdb/23210
5892         * gdbarch.sh (significant_addr_bit): Default to zero when
5893         not set by target architecture.
5894         * gdbarch.c: Re-generated.
5895         * utils.c (address_significant): Update.
5896
5897 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
5898
5899         * stack.c (func_command): Remove trailing newline in call to error.
5900
5901 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5902
5903         * regcache.h (regcache_raw_collect): Remove, update callers to
5904         use regcache::raw_collect.
5905         * regcache.c (regcache_raw_collect): Remove.
5906
5907 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5908
5909         * regcache.h (regcache_raw_supply): Remove, update callers to
5910         use detached_regcache::raw_supply.
5911         * regcache.c (regcache_raw_supply): Remove.
5912
5913 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5914
5915         * regcache.h (regcache_cooked_write_part): Remove, update
5916         callers to use regcache::cooked_write_part.
5917         * regcache.c (regcache_cooked_write_part): Remove.
5918
5919 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5920
5921         * regcache.h (regcache_cooked_read_part): Remove, update callers
5922         to use readable_regcache::cooked_read_part.
5923         * regcache.c (regcache_cooked_read_part): Remove.
5924
5925 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5926
5927         * regcache.h (regcache_cooked_read_value): Remove, update
5928         callers to use readable_regcache::cooked_read_value.
5929         * regcache.c (regcache_cooked_read_value): Remove.
5930
5931 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5932
5933         * regcache.h (regcache_cooked_write): Remove, update callers to
5934         use regcache::cooked_write.
5935         * regcache.c (regcache_cooked_write): Remove.
5936
5937 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5938
5939         * regcache.h (regcache_invalidate): Remove, update callers to
5940         use detached_regcache::invalidate instead.
5941         * regcache.c (regcache_invalidate): Remove.
5942
5943 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5944
5945         * regcache.h (regcache_raw_write_part): Remove, update callers
5946         to use regcache::raw_write_part instead.
5947         * regcache.c (regcache_raw_write_part): Remove.
5948
5949 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5950
5951         * regcache.h (regcache_raw_read_part): Remove, update callers to
5952         use readable_regcache::raw_read_part instead.
5953         * regcache.c (regcache_raw_read_part): Remove.
5954
5955 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5956
5957         * regcache.h (regcache_cooked_read): Remove, update callers to
5958         use readable_regcache::cooked_read instead.
5959         * regcache.c (regcache_cooked_read): Remove.
5960
5961 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5962
5963         * regcache.h (regcache_raw_write): Remove, update callers to use
5964         regcache::raw_write instead.
5965         * regcache.c (regcache_raw_write): Remove.
5966
5967 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5968
5969         * regcache.h (regcache_raw_read): Remove, update callers to use
5970         readable_regcache::raw_read instead.
5971         * regcache.c (regcache_raw_read): Remove.
5972
5973 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5974
5975         * regcache.h (regcache_raw_update): Remove, update callers to
5976         use readable_regcache::raw_update instead.
5977         * regcache.c (regcache_raw_update): Remove.
5978
5979 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5980
5981         * regcache.h (regcache_register_status): Remove, update callers
5982         to use reg_buffer::get_register_status directly instead.
5983         * regcache.c (regcache_register_status): Remove.
5984
5985 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5986
5987         * regcache.h (regcache_get_ptid): Remove, update all callers to
5988         call regcache::ptid instead.
5989         * regcache.c (regcache_get_ptid): Remove.
5990
5991 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
5992
5993         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5994
5995 2018-05-30  Pedro Alves  <palves@redhat.com>
5996
5997         * common/common-exceptions.h (exception_rethrow): Use
5998         ATTRIBUTE_NORETURN.
5999
6000 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
6001
6002         * breakpoint.c (print_solib_event, check_status_catch_solib):
6003         Remove struct keyword in range-based for loops.
6004         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6005         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6006         Likewise.
6007         * linespec.c (find_superclass_methods, search_minsyms_for_name):
6008         Likewise.
6009         * symfile.c (addr_info_make_relative): Likewise.
6010         * thread.c (value_in_thread_stack_temporaries): Likewise.
6011
6012 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
6013
6014         PR gdb/16841
6015         * valops.c (value_struct_elt_for_reference): Call check_typedef on
6016         aggregate type to get its real type before accessing it.
6017
6018 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
6019
6020         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6021         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6022         * coff-pe-read.c (add_pe_forwarded_sym): Replace
6023         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6024         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6025         * jit.c (jit_breakpoint_re_set_internal): Likewise.
6026         * printcmd.c (info_address_command): Likewise.
6027
6028 2018-05-29  Tom Tromey  <tom@tromey.com>
6029
6030         * windows-nat.c (handle_exception): Update fall-through comment.
6031
6032 2018-05-29  Tom Tromey  <tom@tromey.com>
6033
6034         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
6035         (struct program_space) <added_solibs>: Now a std::vector.
6036         * breakpoint.c (print_solib_event): Update.
6037         (check_status_catch_solib): Update.
6038         * progspace.c (clear_program_space_solib_cache): Update.
6039         * solib.c (update_solib_list): Update.
6040
6041 2018-05-29  Tom Tromey  <tom@tromey.com>
6042
6043         * python/py-type.c (typy_richcompare): Update.
6044         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6045         * gdbtypes.h (types_deeply_equal): Return bool.
6046         (types_equal): Likewise.
6047         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
6048         declare VEC.
6049         (check_types_equal): Change worklist to std::vector.  Return
6050         bool.
6051         (struct type_equality_entry): Add constructor.
6052         (compare_maybe_null_strings): Return bool.
6053         (check_types_worklist): Return bool.  Change worklist to
6054         std::vector.
6055         (types_deeply_equal): Use std::vector.
6056         (types_equal): Return bool.
6057         (compare_maybe_null_strings): Simplify.
6058
6059 2018-05-29  Tom Tromey  <tom@tromey.com>
6060
6061         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
6062
6063 2018-05-29  Tom Tromey  <tom@tromey.com>
6064
6065         * objc-lang.h: Don't include cp-support.h.
6066         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
6067         declare VEC.
6068
6069 2018-05-27  Tom Tromey  <tom@tromey.com>
6070
6071         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6072
6073 2018-05-25  Tom Tromey  <tom@tromey.com>
6074
6075         * value.c (value::location): Initialize.
6076
6077 2018-05-25  Tom Tromey  <tom@tromey.com>
6078
6079         * dbxread.c (init_bincl_list): Remove.
6080         (bincl_list): Now a std::vector.
6081         (bincls_allocated, next_bincl): Remove.
6082         (free_bincl_list, do_free_bincl_list_cleanup)
6083         (make_cleanup_free_bincl_list): Remove.
6084         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6085         unique_xmalloc_ptr.
6086         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6087         (struct header_file_location): Add constructor.
6088         (add_bincl_to_list): Remove.
6089
6090 2018-05-25  Tom Tromey  <tom@tromey.com>
6091
6092         * tui/tui.c (tui_enable): Update.
6093         * mi/mi-interp.c (mi_interp::init): Update.
6094         * interps.h (class interp) <name>: New method.
6095         <m_name>: Rename from name.
6096         (~scoped_restore_interp): Update.
6097         * interps.c (interp::interp): Update.
6098         (interp_add, interp_set, interp_lookup_existing)
6099         (current_interp_named_p): Update.
6100
6101 2018-05-25  Tom Tromey  <tom@tromey.com>
6102
6103         * interps.c (interp_name): Remove.
6104         * mi/mi-interp.c (mi_interp::init): Update.
6105         * interps.h (interp_name): Remove.
6106         (~scoped_restore_interp): Update.
6107         * tui/tui.c (tui_enable): Update.
6108
6109 2018-05-25  Tom Tromey  <tom@tromey.com>
6110
6111         * utils.c (fputs_maybe_filtered): Update.
6112         * linespec.c (decode_line_full): Update.
6113         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6114         (mi_print_breakpoint_for_event, mi_solib_loaded)
6115         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6116         (mi_user_selected_context_changed): Update.
6117         * mi/mi-main.c (mi_execute_command): Update.
6118         * cli/cli-script.c (execute_control_command): Update.
6119         * python/python.c (execute_gdb_command): Update.
6120         * solib.c (info_sharedlibrary_command): Update.
6121         * interps.c (interp_ui_out): Remove.
6122         * interps.h (interp_ui_out): Remove.
6123
6124 2018-05-25  Tom Tromey  <tom@tromey.com>
6125
6126         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6127         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6128         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6129
6130 2018-05-25  Tom Tromey  <tom@tromey.com>
6131
6132         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6133         * interps.c (interp_exec): Use scoped_restore.
6134
6135 2018-05-25  Tom Tromey  <tom@tromey.com>
6136
6137         * remote.c (remote_target::remote_file_get): Use
6138         gdb::byte_vector.
6139         (remote_target::remote_file_put): Likewise.
6140
6141 2018-05-25  Tom Tromey  <tom@tromey.com>
6142
6143         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6144         a std::string.
6145         (get_pe_section_index, add_pe_exported_sym): Update.
6146         (read_pe_exported_syms): Use gdb::def_vector.
6147
6148 2018-05-25  Tom Tromey  <tom@tromey.com>
6149
6150         * frame.c (remove_prev_frame): Remove.
6151         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6152
6153 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
6154
6155         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6156         Remove prototypes.
6157         * mips-linux-nat.c (supply_fpregset): Always call
6158         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6159         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6160         `mips_fill_fpregset'.
6161         * mips-linux-tdep.c (mips_supply_fpregset)
6162         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6163         (mips_fill_fpregset_wrapper): Remove functions.
6164         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6165         (mips_linux_fpregset): Remove variable.
6166         (mips_linux_iterate_over_regset_sections): Use
6167         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6168         (mips_linux_o32_sigframe_init): Remove comment.
6169
6170 2018-05-25  Pedro Alves  <palves@redhat.com>
6171
6172         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6173         (struct readahead_cache, struct packet_reg, struct
6174         remote_arch_state, class remote_state): Move higher up in the
6175         file.
6176         (remote_target::m_remote_state): Now an object instead of a pointer.
6177         (remote_target::get_remote_state): Adjust.
6178
6179 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6180
6181         * stack.c (select_and_print_frame): Delete.
6182         (struct function_bounds): Move struct within function.
6183         (func_command): Most content moved into new function
6184         find_frame_for_function, use new function, print result, add
6185         function comment.
6186         (find_frame_for_function): New function, now returns a result.
6187
6188 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6189
6190         * stack.c (iterate_over_block_arg_vars): Fix comment.
6191         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6192
6193 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6194
6195         PR gdb/23203
6196         * frame.c
6197         (scoped_restore_selected_frame::scoped_restore_selected_frame):
6198         Define.
6199         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6200         Define.
6201         * frame.h (class scoped_restore_selected_frame): New class.
6202         * stack.c (print_frame_local_vars): Remove catching and rethrowing
6203         of any exception, use scoped_restore_selected_frame to restore the
6204         frame instead.
6205
6206 2018-05-24  Pedro Alves  <palves@redhat.com>
6207
6208         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6209         override.
6210
6211 2018-05-23  Tom Tromey  <tom@tromey.com>
6212
6213         * complaints.c (struct complaints): Remove.
6214         (symfile_complaint_book): Remove.
6215         (series): New global.
6216         (complaint_internal): Update.
6217         (clear_complaints): Update.
6218
6219 2018-05-23  Tom Tromey  <tom@tromey.com>
6220
6221         * complaints.c (counters): New global.
6222         (struct complain): Remove.
6223         (struct complaints) <root>: Remove.
6224         (complaint_sentinel): Remove.
6225         (symfile_complaint_book): Update.
6226         (find_complaint) Remove.
6227         (complaint_internal, clear_complaints): Update.
6228
6229 2018-05-23  Tom Tromey  <tom@tromey.com>
6230
6231         * complaints.c (struct complain) <file, line>: Remove.
6232         (find_complaint): Remove file, line parameters.
6233         (complaint_internal): Update.
6234
6235 2018-05-23  Tom Tromey  <tom@tromey.com>
6236
6237         * complaints.c (vcomplaint): Remove.
6238         (complaint_internal) Merge in contents of vcomplaint.
6239
6240 2018-05-23  Tom Tromey  <tom@tromey.com>
6241
6242         * complaints.c (struct complaints) <explanation>: Remove.
6243         (symfile_explanations): Remove.
6244         (symfile_complaint_book): Update.
6245         (vcomplaint): Update.
6246         (struct explanation): Remove.
6247
6248 2018-05-23  Tom Tromey  <tom@tromey.com>
6249
6250         * complaints.c (symfile_complaints): Remove.
6251         (complaint_internal): Remove "complaints" parameter.
6252         (clear_complaints, vcomplaint): Remove "c" parameter.
6253         (get_complaints): Remove.
6254         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6255         (dwarf2_debug_line_missing_file_complaint)
6256         (dwarf2_debug_line_missing_end_sequence_complaint)
6257         (dwarf2_complex_location_expr_complaint)
6258         (dwarf2_const_value_length_mismatch_complaint)
6259         (dwarf2_section_buffer_overflow_complaint)
6260         (dwarf2_macro_malformed_definition_complaint)
6261         (dwarf2_invalid_attrib_class_complaint)
6262         (create_addrmap_from_index, dw2_symtab_iter_next)
6263         (dw2_expand_marked_cus)
6264         (dw2_debug_names_iterator::find_vec_in_debug_names)
6265         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6266         (create_debug_type_hash_table, init_cutu_and_read_dies)
6267         (partial_die_parent_scope, add_partial_enumeration)
6268         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6269         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6270         (read_import_statement, read_file_scope, create_dwo_cu_reader)
6271         (create_cus_hash_table, create_dwp_hash_table)
6272         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6273         (dwarf2_rnglists_process, dwarf2_ranges_process)
6274         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6275         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6276         (handle_struct_member_die, process_structure_scope)
6277         (read_array_type, read_common_block, read_module_type)
6278         (read_tag_pointer_type, read_typedef, read_base_type)
6279         (read_subrange_type, load_partial_dies, partial_die_info::read)
6280         (partial_die_info::read, partial_die_info::read)
6281         (partial_die_info::read, read_checked_initial_length_and_offset)
6282         (dwarf2_string_attr, read_formatted_entries)
6283         (dwarf_decode_line_header)
6284         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6285         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6286         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6287         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6288         (get_signatured_type, get_DW_AT_signature_type)
6289         (decode_locdesc, file_file_name, consume_improper_spaces)
6290         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6291         (dwarf_decode_macro_bytes, dwarf_decode_macros)
6292         (dwarf2_symbol_mark_computed, set_die_type)
6293         (read_attribute_value): Update.
6294         * stap-probe.c (handle_stap_probe, get_stap_base_address):
6295         Update.
6296         * dbxread.c (unknown_symtype_complaint)
6297         (lbrac_mismatch_complaint, repeated_header_complaint)
6298         (set_namestring, function_outside_compilation_unit_complaint)
6299         (read_dbx_symtab, process_one_symbol): Update.
6300         * gdbtypes.c (stub_noname_complaint): Update.
6301         * windows-nat.c (handle_unload_dll): Update.
6302         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6303         (decode_base_type): Update.
6304         * xcoffread.c (bf_notfound_complaint, ef_complaint)
6305         (eb_complaint, record_include_begin, record_include_end)
6306         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6307         (process_xcoff_symbol, read_symbol)
6308         (function_outside_compilation_unit_complaint)
6309         (scan_xcoff_symtab): Update.
6310         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6311         * buildsym.c (finish_block_internal, make_blockvector)
6312         (end_symtab_get_static_block, augment_type_symtab): Update.
6313         * dtrace-probe.c (dtrace_process_dof)
6314         (dtrace_static_probe_ops::get_probes): Update.
6315         * complaints.h (struct complaint): Don't declare.
6316         (symfile_complaints): Remove.
6317         (complaint_internal): Remove "complaints" parameter.
6318         (complaint): Likewise.
6319         (clear_complaints): Likewise.
6320         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6321         (reread_symbols): Update.
6322         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6323         (dwarf2_frame_cache, decode_frame_entry): Update.
6324         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6325         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6326         (info_selectors_command): Update.
6327         * macrotab.c (macro_include, check_for_redefinition)
6328         (macro_undef): Update.
6329         * objfiles.c (filter_overlapping_sections): Update.
6330         * stabsread.c (invalid_cpp_abbrev_complaint)
6331         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6332         (define_symbol, error_type, read_type, rs6000_builtin_type)
6333         (stabs_method_name_from_physname, read_member_functions)
6334         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6335         (attach_fields_to_type, complain_about_struct_wipeout)
6336         (read_range_type, read_args, common_block_start)
6337         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6338         Update.
6339         * mdebugread.c (index_complaint, unknown_ext_complaint)
6340         (basic_type_complaint, bad_tag_guess_complaint)
6341         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6342         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6343         (parse_procedure, parse_lines)
6344         (function_outside_compilation_unit_complaint)
6345         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6346         (bad_tag_guess_complaint, reg_value_complaint): Update.
6347         * cp-support.c (demangled_name_complaint): Update.
6348         * macroscope.c (sal_macro_scope): Update.
6349         * dwarf-index-write.c (class debug_names): Update.
6350
6351 2018-05-23  Tom Tromey  <tom@tromey.com>
6352
6353         * complaints.c (clear_complaints): Remove "noisy" parameter.
6354         * complaints.h (clear_complaints): Update.
6355         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6356         (reread_symbols): Update.
6357
6358 2018-05-23  Tom Tromey  <tom@tromey.com>
6359
6360         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6361         SUBSEQUENT_MESSAGE.
6362         (vcomplaint, clear_complaints): Update.
6363         (symfile_explanations): Remove some messages.
6364
6365 2018-05-23  Tom Tromey  <tom@tromey.com>
6366
6367         * complaints.c (internal_complaint): Remove.
6368         * complaints.h (internal_complaint): Remove.
6369
6370 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6371
6372         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6373
6374 2018-05-22  Pedro Alves  <palves@redhat.com>
6375
6376         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6377         (remote_fileio_badfd, remote_fileio_return_errno)
6378         (remote_fileio_return_success, remote_fileio_func_open)
6379         (remote_fileio_func_open, remote_fileio_func_close)
6380         (remote_fileio_func_read, remote_fileio_func_write)
6381         (remote_fileio_func_lseek, remote_fileio_func_rename)
6382         (remote_fileio_func_unlink, remote_fileio_func_stat)
6383         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6384         (remote_fileio_func_isatty, remote_fileio_func_system): Add
6385         remote_target parameter.
6386         (remote_fio_func_map) <func>: Add remote_target parameter.
6387         (do_remote_fileio_request, remote_fileio_request):
6388         * remote-fileio.h (remote_fileio_request):
6389         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6390         remote_target parameter.
6391         (remote_notif_process, handle_notification): Adjust to pass down
6392         the remote.
6393         (remote_notif_state_allocate): Add remote_target parameter.  Save
6394         it.
6395         * remote-notif.h (struct remote_target): Forward declare.
6396         (struct notif_client) <parse, ack, can_get_pending_events>: Add
6397         remote_target parameter.
6398         (struct remote_notif_state) <remote>: New field.
6399         (remote_notif_ack, remote_notif_parse): Add remote_target
6400         parameter.
6401         (remote_notif_state_allocate, remote_notif_state_allocate): Add
6402         remote_target parameter.
6403         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6404         (threads_listing_context, rmt_thread_action, protocol_feature)
6405         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6406         (packet_result, struct threads_listing_context, remote_state):
6407         Move definitions and declarations higher up.
6408         (remote_target) <~remote_target>: Declare.
6409         (remote_download_command_source, remote_file_put, remote_file_get)
6410         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6411         (remote_hostio_pread_vFile, remote_hostio_send_command)
6412         (remote_hostio_set_filesystem, remote_hostio_open)
6413         (remote_hostio_close, remote_hostio_unlink, remote_state)
6414         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6415         (get_memory_write_packet_size, get_memory_read_packet_size)
6416         (append_pending_thread_resumptions, remote_detach_1)
6417         (append_resumption, remote_resume_with_vcont)
6418         (add_current_inferior_and_thread, wait_ns, wait_as)
6419         (process_stop_reply, remote_notice_new_inferior)
6420         (process_initial_stop_replies, remote_add_thread)
6421         (btrace_sync_conf, remote_btrace_maybe_reopen)
6422         (remove_new_fork_children, kill_new_fork_children)
6423         (discard_pending_stop_replies, stop_reply_queue_length)
6424         (check_pending_events_prevent_wildcard_vcont)
6425         (discard_pending_stop_replies_in_queue, stop_reply)
6426         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6427         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6428         (remote_interrupt_as, remote_interrupt_ns)
6429         (remote_get_noisy_reply, remote_query_attached)
6430         (remote_add_inferior, remote_current_thread, get_current_thread)
6431         (set_thread, set_general_thread, set_continue_thread)
6432         (set_general_process, write_ptid)
6433         (remote_unpack_thread_info_response, remote_get_threadinfo)
6434         (parse_threadlist_response, remote_get_threadlist)
6435         (remote_threadlist_iterator, remote_get_threads_with_ql)
6436         (remote_get_threads_with_qxfer)
6437         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6438         (get_offsets, remote_check_symbols, remote_supported_packet)
6439         (remote_query_supported, remote_packet_size)
6440         (remote_serial_quit_handler, remote_detach_pid)
6441         (remote_vcont_probe, remote_resume_with_hc)
6442         (send_interrupt_sequence, interrupt_query)
6443         (remote_notif_get_pending_events, fetch_register_using_p)
6444         (send_g_packet, process_g_packet, fetch_registers_using_g)
6445         (store_register_using_P, store_registers_using_G)
6446         (set_remote_traceframe, check_binary_download)
6447         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6448         (remote_xfer_live_readonly_partial, remote_read_bytes)
6449         (remote_send_printf, remote_flash_write, readchar)
6450         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6451         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6452         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6453         (extended_remote_disable_randomization, extended_remote_run)
6454         (send_environment_packet, extended_remote_environment_support)
6455         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6456         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6457         (packet_command): Now methods of ...
6458         (remote_target): ... this class.
6459         (m_remote_state) <remote_target>: New field.
6460         (struct remote_state) <stop_reply_queue,
6461         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6462         fields.
6463         (remote_state::remote_state): Allocate stop_reply_queue.
6464         (remote_state): Delete global.
6465         (get_remote_state_raw): Delete.
6466         (remote_target::get_remote_state): Allocate m_remote_state on
6467         demand.
6468         (get_current_remote_target): New.
6469         (remote_ops, extended_remote_ops): Delete.
6470         (wait_forever_enabled_p, remote_async_inferior_event_token):
6471         Delete, moved to struct remote_state.
6472         (remote_target::close): Delete self.  Destruction bits split to
6473         ...
6474         (remote_target::~remote_target): ... this.
6475         (show_memory_packet_size): Adjust to use
6476         get_current_remote_target.
6477         (struct protocol_feature) <func>: Add remote_target parameter.
6478         All callers adjusted.
6479         (curr_quit_handler_target): New.
6480         (remote_serial_quit_handler): Reimplement.
6481         (remote_target::open_1): Adjust to use get_current_remote_target.
6482         Heap-allocate remote_target/extended_remote_target instances.
6483         (vcont_builder::vcont_builder): Add remote_target parameter, and
6484         save it in m_remote.  All callers adjusted.
6485         (vcont_builder::m_remote): New field.
6486         (vcont_builder::restart, vcont_builder::flush)
6487         (vcont_builder::push_action): Use it.
6488         (remote_target::commit_resume): Use it.
6489         (struct queue_iter_param) <remote>: New field.
6490         (remote_target::remove_new_fork_children): Fill in 'remote' field.
6491         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6492         (check_pending_event_prevents_wildcard_vcont_callback)
6493         (remote_target::check_pending_events_prevent_wildcard_vcont)
6494         (remote_target::discard_pending_stop_replies)
6495         (remote_target::discard_pending_stop_replies_in_queue)
6496         (remote_target::remote_notif_remove_queued_reply): Fill in
6497         'remote' field.
6498         (remote_notif_get_pending_events): New.
6499         (remote_target::readchar, remote_target::remote_serial_write):
6500         Save/restore curr_quit_handler_target.
6501         (putpkt): New.
6502         (kill_new_fork_children): Fill in 'remote' field.
6503         (packet_command): Use get_current_remote_target, defer to
6504         remote_target method of same name.
6505         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6506         parameter, and save it in m_remote.  All callers adjusted.
6507         (scoped_remote_fd::release): Use m_remote.
6508         (scoped_remote_fd::m_remote): New field.
6509         (remote_file_put, remote_file_get, remote_file_delete): Use
6510         get_current_remote_target, defer to remote_target method of same
6511         name.
6512         (remote_btrace_reset): Add remote_state paremeter.  Update all
6513         callers.
6514         (remote_async_inferior_event_handler). Pass down 'data'.
6515         (remote_new_objfile): Use get_current_remote_target.
6516         (remote_target::vcont_r_supported): New.
6517         (set_range_stepping): Use get_current_remote_target and
6518         remote_target::vcont_r_supported.
6519         (_initialize_remote): Don't allocate 'remote_state' and
6520         'stop_reply_queue' globals.
6521         * remote.h (struct remote_target): Forward declare.
6522         (getpkt, putpkt, remote_notif_get_pending_events): Add
6523         'remote_target' parameter.
6524
6525 2018-05-22  Pedro Alves  <palves@redhat.com>
6526
6527         * remote.c (vcont_builder): Now a class.  Make all data members
6528         private.
6529         (vcont_builder) <vcont_builder, restart, flush, push_action>:
6530         Declare methods.
6531         (vcont_builder_restart): Rename to ...
6532         (vcont_builder::restart): ... this.
6533         (vcont_builder_flush): Rename to ...
6534         (vcont_builder::flush): ... this.
6535         (vcont_builder_push_action): Rename to ...
6536         (vcont_builder::push_action): ... this.
6537         (remote_target::commit_resume): Adjust.
6538
6539 2018-05-22  Pedro Alves  <palves@redhat.com>
6540
6541         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6542         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6543         (get_fixed_memory_packet_size): New.
6544         (get_memory_packet_size): Use it.
6545         (set_memory_packet_size): Don't override the config size with
6546         DEFAULT_MAX_MEMORY_PACKET_SIZE.
6547         (show_memory_packet_size): Use get_fixed_memory_packet_size.
6548         Don't refer to get_memory_packet_size if not connected to a remote
6549         target.  Show "(default)" if configured size is 0.
6550
6551 2018-05-22  Pedro Alves  <palves@redhat.com>
6552
6553         * remote.c (remote_target::mourn_inferior): Move
6554         discard_pending_stop_replies call here from ...
6555         (_initialize_remote): ... here.
6556
6557 2018-05-22  Pedro Alves  <palves@redhat.com>
6558
6559         * remote.c (compare_section_command): Remove set_general_process
6560         call.
6561
6562 2018-05-22  Pedro Alves  <palves@redhat.com>
6563
6564         * remote.c (struct packet_reg, struct remote_arch_state):
6565         Move higher up in the file.
6566         (remote_state) <m_arch_states>: Store remote_arch_state values
6567         instead of remote_arch_state pointers.
6568         (remote_state::get_remote_arch_state): Adjust.
6569
6570 2018-05-22  Pedro Alves  <palves@redhat.com>
6571
6572         * remote.c: Include <unordered_map>.
6573         (remote_state): Now a class.
6574         (remote_state) <get_remote_arch_state>: Declare method.
6575         <get_remote_arch_state>: New field.
6576         (remote_arch_state) <remote_arch_state>: Declare ctor.
6577         <regs>: Now a unique_ptr.
6578         (remote_gdbarch_data_handle): Delete.
6579         (get_remote_arch_state): Delete.
6580         (remote_state::get_remote_arch_state): New.
6581         (get_remote_state): Adjust to call remote_state's
6582         get_remote_arch_state method.
6583         (init_remote_state): Delete, bits factored out to ...
6584         (remote_arch_state::remote_arch_state): ... this new method.
6585         (get_remote_packet_size, get_memory_packet_size)
6586         (process_g_packet, remote_target::fetch_registers)
6587         (remote_target::prepare_to_store, store_registers_using_G)
6588         (remote_target::store_registers, remote_target::get_trace_status):
6589         Adjust to call remote_state's method.
6590         (_initialize_remote): Remove reference to
6591         remote_gdbarch_data_handle.
6592
6593 2018-05-22  Pedro Alves  <palves@redhat.com>
6594
6595         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6596         pread>: New method declarations.
6597         (remote_target::open_1): Adjust.
6598         (readahead_cache_invalidate): Rename to ...
6599         (readahead_cache::invalidate): ... this, and adjust to be a class
6600         method.
6601         (readahead_cache_invalidate_fd): Rename to ...
6602         (readahead_cache::invalidate_fd): ... this, and adjust to be a
6603         class method.
6604         (remote_hostio_pwrite): Adjust.
6605         (remote_hostio_pread_from_cache): Rename to ...
6606         (readahead_cache::pread): ... this, and adjust to be a class
6607         method.
6608         (remote_hostio_close): Adjust.
6609
6610 2018-05-22  Pedro Alves  <palves@redhat.com>
6611
6612         * remote.c (remote_hostio_close_cleanup): Delete.
6613         (class scoped_remote_fd): New.
6614         (remote_file_put, remote_file_get): Use it.
6615
6616 2018-05-22  Pedro Alves  <palves@redhat.com>
6617
6618         (struct vCont_action_support): Use bool and initialize all fields.
6619         (struct readahead_cache): Initialize all fields.
6620         (remote_state): Use bool and initialize all fields.
6621         (remote_state::remote_state, remote_state::~remote_state): New.
6622         (new_remote_state): Delete.
6623         (_initialize_remote): Use new to allocate remote_state.
6624
6625 2018-05-22  Pedro Alves  <palves@redhat.com>
6626             張俊芝  <zjz@zjz.name>
6627
6628         PR gdb/22973
6629         * c-exp.y: Include "c-support.h".
6630         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6631         of tolower.  Use c_ident_is_alpha to scan names.
6632         * c-lang.c: Include "c-support.h".
6633         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6634         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6635         * c-support.h: New file, with bits factored out from ...
6636         * cp-name-parser.y: ... this file.
6637         Include "c-support.h".
6638         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6639         c-support.h and renamed.
6640         (symbol_end, yylex): Adjust.
6641
6642 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6643
6644         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6645         parameter type to CORE_ADDR.
6646         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6647         parameter type in declaration to CORE_ADDR.
6648         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6649         target_auxv_search to get AT_HWCAP and use the result to get the
6650         target description.
6651         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6652         to CORE_ADDR. Remove the cast of the return value to unsigned
6653         long. Fix error predicate of target_auxv_search.
6654         (ppc_linux_nat_target::read_description): Change the type of the
6655         hwcap variable to CORE_ADDR.
6656
6657 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6658
6659         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6660         if the size of fpscr is larger than 32 bits.
6661
6662 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6663
6664         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6665         (ppc32_linux_vsxregmap): New global.
6666         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6667         regcache_supply_regset, and regcache_collect_regset.
6668         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6669         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6670         (fetch_vsx_register, store_vsx_register): Remove.
6671         (fetch_vsx_registers): Add regno parameter. Get regset using
6672         ppc_linux_vsxregset. Use regset to supply registers.
6673         (store_vsx_registers): Add regno parameter. Get regset using
6674         ppc_linux_vsxregset. Use regset to collect registers.
6675         (fetch_register): Call fetch_vsx_registers instead of
6676         fetch_vsx_register.
6677         (store_register): Call store_vsx_registers instead of
6678         store_vsx_register.
6679         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6680         new regno parameter.
6681         (store_ppc_registers): Call store_vsx_registers with -1 for the
6682         new regno parameter.
6683         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6684         (ppc_collect_vsxregset): Remove.
6685
6686 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6687
6688         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6689         offset fields.
6690         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6691         for vector register offset fields.
6692         (ppc64_fbsd_reg_offsets): Likewise.
6693         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6694         to vector register offset fields.
6695         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6696         to vector register offset fields.
6697         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6698         vector register offset fields.
6699         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6700         initializers for vector register offset fields.
6701         (rs6000_aix64_reg_offsets): Likewise.
6702         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6703         (ppc_supply_vrregset): Remove.
6704         (ppc_collect_vrregset): Remove.
6705         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6706         (ppc_linux_vrregset) : New function.
6707         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6708         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6709         (ppc32_linux_vrregset): Remove.
6710         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6711         and use result instead of ppc32_linux_vrregset.
6712         (ppc32_linux_reg_offsets): Remove initializers for vector register
6713         offset fields.
6714         (ppc64_linux_reg_offsets): Likewise.
6715         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6716         * ppc-linux-nat.c: Include regset.h.
6717         (gdb_vrregset_t): Adjust comment to account for little-endian
6718         mode.
6719         (supply_vrregset, fill_vrregset): Remove.
6720         (fetch_altivec_register, store_altivec_register): Remove.
6721         (fetch_altivec_registers): Add regno parameter. Get regset using
6722         ppc_linux_vrregset. Use regset to supply registers.
6723         (store_altivec_registers): Add regno parameter. Get regset using
6724         ppc_linux_vrregset. Use regset to collect registers.
6725         (fetch_register): Call fetch_altivec_registers instead of
6726         fetch_altivec_register.
6727         (store_register): Call store_altivec_registers instead of
6728         store_altivec_register.
6729         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6730         the new regno parameter.
6731         (store_ppc_registers): Call store_altivec_registers with -1 for
6732         the new regno parameter.
6733
6734 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6735
6736         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6737         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6738         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6739         (gdb_vrregset_t): Change array type size to
6740         PPC_LINUX_SIZEOF_VRREGSET.
6741         (gdb_vsxregset_t): Change array type size to
6742         PPC_LINUX_SIZEOF_VSXREGSET.
6743         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6744         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6745         PPC_LINUX_SIZEOF_VSXREGSET.
6746
6747 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6748
6749         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6750         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6751         nat/ppc-linux.c.
6752         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6753         ppc_linux_target_wordsize with tid.
6754         (ppc_linux_nat_target::read_description): Call ppc_linux_target
6755         wordsize with tid.
6756         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6757         (ppc64_64bit_inferior_p): Add static and inline specifiers.
6758         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6759         tid parameter. Remove static specifier.
6760         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6761         (ppc_linux_target_wordsize): New declaration.
6762
6763 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6764
6765         * arch/ppc-linux-common.c: New file.
6766         * arch/ppc-linux-common.h: New file.
6767         * arch/ppc-linux-tdesc.h: New file.
6768         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6769         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6770         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6771         arch/ppc-linux-tdesc.h.
6772         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6773         arch/ppc-linux-tdesc.h.
6774         (ppc_linux_nat_target::read_description): Remove target
6775         description matching code. Fill a ppc_linux_features struct and
6776         call ppc_linux_match_description with it. Move comment about ISA
6777         2.05 to ppc-linux-common.c.
6778         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6779         arch/ppc-linux-tdesc.h.
6780         (ppc_linux_core_read_description): Remove target description
6781         matching code. Fill a ppc_linux_features struct and call
6782         ppc_linux_match_description with it.
6783         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6784         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6785         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6786         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6787         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6788         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6789         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6790         (tdesc_powerpc_e500l): Remove.
6791
6792 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
6793
6794         * ada-lang.c (catch_assert_command): Pass empty string instead
6795         of NULL for excep_string argument.
6796
6797 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6798
6799         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6800         the width of the requested register exceeds the width of the
6801         `ptrace' data type.
6802
6803 2018-05-21  Tom Tromey  <tom@tromey.com>
6804
6805         * printcmd.c (output_command): Remove.
6806         (output_command_const): Rename to output_command.
6807         * valprint.h (output_command): Rename from output_command_const.
6808         * tracepoint.c (trace_dump_actions): Call output_command.
6809
6810 2018-05-21  Tom Tromey  <tom@tromey.com>
6811
6812         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6813         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6814         * ada-lang.h (create_ada_exception_catchpoint): Update.
6815         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6816         std::string.
6817         (create_excep_cond_exprs, ~ada_catchpoint)
6818         (should_stop_exception, print_one_exception)
6819         (print_mention_exception, print_recreate_exception): Update.
6820         (ada_get_next_arg): Remove.
6821         (catch_ada_exception_command_split): Use std::string.  Change type
6822         of "excep_string", "cond_string".
6823         (catch_ada_exception_command): Update.
6824         (create_ada_exception_catchpoint): Change type of excep_string.
6825         (ada_exception_sal): Remove excep_string parameter.
6826         (~ada_catchpoint): Remove.
6827
6828 2018-05-21  Tom Tromey  <tom@tromey.com>
6829
6830         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6831         cleanup.
6832
6833 2018-05-21  Tom Tromey  <tom@tromey.com>
6834
6835         * ada-lang.c (ada_exception_message_1, ada_exception_message):
6836         Return unique_xmalloc_ptr.
6837         (print_it_exception): Update.
6838
6839 2018-05-21  Tom Tromey  <tom@tromey.com>
6840
6841         * tracepoint.c (trace_dump_actions): Use std::string.
6842
6843 2018-05-21  Tom Tromey  <tom@tromey.com>
6844
6845         * symfile.c (reread_symbols): Use std::string for original_name.
6846
6847 2018-05-21  Tom Tromey  <tom@tromey.com>
6848
6849         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6850         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
6851         constructor.
6852
6853 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
6854
6855         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6856         instance to...
6857         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6858         * objfiles.c (get_objfile_bfd_data): Allocate
6859         objfile_per_bfd_storage with obstack_new when allocating on
6860         obstack.
6861
6862 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6863
6864         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6865         OBSTACK_ZALLOC.
6866         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6867         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
6868         * mdebugread.c (mdebug_build_psymtabs): Likewise.
6869         (add_pending): Likewise.
6870         (parse_symbol): Likewise.
6871         (parse_partial_symbols): Likewise.
6872         (psymtab_to_symtab_1): Likewise.
6873         (new_psymtab): Likewise.
6874         (elfmdebug_build_psymtabs): Likewise.
6875         * minsyms.c (terminate_minimal_symbol_table): Likewise.
6876         * objfiles.c (get_objfile_bfd_data): Likewise.
6877         (objfile_register_static_link): Likewise.
6878         * psymtab.c (allocate_psymtab): Likewise.
6879         * stabsread.c (read_member_functions): Likewise.
6880         * xcoffread.c (xcoff_end_psymtab): Likewise.
6881
6882 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6883
6884         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
6885         compiler supports std::is_trivially_constructible.
6886         * common/poison.h: Include obstack.h.
6887         (IsMallocable): Define to is_trivially_constructible if the
6888         compiler supports it, define to true_type otherwise.
6889         (xobnew): New.
6890         (XOBNEW): Redefine.
6891         (xobnewvec): New.
6892         (XOBNEWVEC): Redefine.
6893         * gdb_obstack.h (obstack_zalloc): New.
6894         (OBSTACK_ZALLOC): Redefine.
6895         (obstack_calloc): New.
6896         (OBSTACK_CALLOC): Redefine.
6897         (obstack_new): New.
6898         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
6899         (gdbarch_obstack): New declaration in gdbarch.h, definition in
6900         gdbarch.c.
6901         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
6902         obstack_calloc/obstack_zalloc.
6903         (gdbarch_obstack_zalloc): Remove.
6904         * target-descriptions.c (tdesc_data_init): Use obstack_new.
6905
6906 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6907
6908         * stack.c (backtrace_command_1): Remove useless variable int i.
6909
6910 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6911
6912         * stack.c (print_frame_info): Fix comment.
6913
6914 2018-05-18  Tom Tromey  <tom@tromey.com>
6915
6916         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6917         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6918         (~dwarf2_per_objfile): Update
6919         (dwarf2_get_dwz_file): Use new.
6920         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6921         unique_ptr.
6922
6923 2018-05-18  Tom Tromey  <tom@tromey.com>
6924
6925         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6926         unique_ptr.
6927         * dwarf2read.c (struct dwp_file): Add constructor and
6928         initializers.
6929         (open_and_init_dwp_file): Return a unique_ptr.
6930         (dwarf2_per_objfile, create_dwp_hash_table)
6931         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6932         (lookup_dwo_unit_in_dwp): Update.
6933         (open_and_init_dwp_file, get_dwp_file): Update.
6934
6935 2018-05-18  Tom Tromey  <tom@tromey.com>
6936
6937         * dwarf2read.c (dwarf2_per_objfile): Update.
6938         (struct mapped_index): Add initializers.
6939         (dwarf2_read_index): Use new.
6940         (dw2_symtab_iter_init): Update.
6941         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6942         unique_ptr.
6943
6944 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6945
6946         * dwarf2read.c (mapped_index) <total_size>: Remove.
6947
6948 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
6949
6950         * unittests/format_pieces-selftests.c (test_format_specifier):
6951         Add ARI comments.
6952
6953 2018-05-18  Tom Tromey  <tom@tromey.com>
6954
6955         * c-typeprint.c (maybe_print_hole): New function.
6956         (c_print_type_struct_field_offset): Update.
6957         (c_type_print_base_struct_union): Call maybe_print_hole.
6958
6959 2018-05-17  Keith Seitz  <keiths@redhat.com>
6960
6961         * breakpoint.c (build_bpstat_chain): New function, moved from
6962         bpstat_stop_status.
6963         (bpstat_stop_status): Add optional parameter, `stop_chain'.
6964         If no stop chain is passed, call build_bpstat_chain to build it.
6965         * breakpoint.h (build_bpstat_chain): Declare.
6966         (bpstat_stop_status): Move documentation here from breakpoint.c.
6967         * infrun.c (handle_signal_stop): Before eliding inlined frames,
6968         build the stop chain and pass it to skip_inline_frames.
6969         Pass this stop chain to bpstat_stop_status.
6970         * inline-frame.c: Include breakpoint.h.
6971         (stopped_by_user_bp_inline_frame): New function.
6972         (skip_inline_frames): Add parameter `stop_chain'.
6973         Move documention to inline-frame.h.
6974         If non-NULL, use stopped_by_user_bp_inline_frame to determine
6975         whether the frame should be elided.
6976         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6977         Add moved documentation and update for new parameter.
6978
6979 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
6980
6981         PR cli/14975
6982         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6983         unittests/format_pieces-selftests.c.
6984         * common/format.h (format_piece) <operator==>: New.
6985         (format_pieces) <operator[]>: Remove.
6986         * common/format.c (format_pieces::format_pieces): Handle \e.
6987         * unittests/format_pieces-selftests.c: New.
6988
6989 2018-05-17  Tom Tromey  <tom@tromey.com>
6990
6991         PR symtab/23010:
6992         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6993         (dw2_instantiate_symtab): Add skip_partial parameter.
6994         (dw2_find_last_source_symtab, dw2_map_expand_apply)
6995         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6996         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6997         (dw2_expand_symtabs_matching_one)
6998         (dw2_find_pc_sect_compunit_symtab)
6999         (dw2_debug_names_lookup_symbol)
7000         (dw2_debug_names_expand_symtabs_for_function): Update.
7001         (init_cutu_and_read_dies): Add skip_partial parameter.
7002         (process_psymtab_comp_unit, build_type_psymtabs_1)
7003         (process_skeletonless_type_unit, load_partial_comp_unit)
7004         (psymtab_to_symtab_1): Update.
7005         (load_full_comp_unit): Add skip_partial parameter.
7006         (process_imported_unit_die, dwarf2_read_addr_index)
7007         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7008         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7009         (read_signatured_type): Update.
7010
7011 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7012
7013         * value.c (release_value): Remove unused variable.
7014         (record_latest_value): Likewise.
7015         (access_value_history): Likewise.
7016         (preserve_values): Likewise.
7017
7018 2018-05-17  Tom Tromey  <tom@tromey.com>
7019
7020         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7021         Initialize.
7022
7023 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
7024
7025         PR gdb/22286
7026         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7027         Also handle registers whose width is not a multiple of
7028         PTRACE_TYPE_RET.
7029         (linux_nat_trad_target::store_register): Likewise.
7030
7031 2018-05-16  Tom Tromey  <tom@tromey.com>
7032
7033         * gdbcore.h (core_bfd): Redefine.
7034         * corelow.c (core_target::close): Update.
7035         (core_target_open): Update.
7036         * progspace.h (struct program_space) <cbfd>: Now a
7037         gdb_bfd_ref_ptr.
7038
7039 2018-05-16  Tom Tromey  <tom@tromey.com>
7040
7041         PR cli/19551:
7042         * symfile-add-flags.h (enum symfile_add_flags)
7043         <SYMFILE_NOT_FILENAME>: New constant.
7044         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
7045         objfile name from BFD.
7046         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7047         * minidebug.c (find_separate_debug_file_in_section): Put
7048         ".gnu_debugdata" into BFD's file name.
7049
7050 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
7051
7052         * regcache.c (regcache_read_ftype, regcache_write_ftype):
7053         Remove.
7054
7055 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
7056
7057         PR binutils/21446
7058         * aarch64-tdep.c (aarch64_analyze_prologue,
7059         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7060         Indicate not interested in errors.
7061
7062 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7063
7064         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7065         Supply the MIPS_ZERO_REGNUM register.
7066
7067 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7068
7069         * mips-tdep.c (mask_address_var): Make variable static.
7070
7071 2018-05-14  Tom Tromey  <tom@tromey.com>
7072
7073         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7074
7075 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
7076
7077         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7078         FXSAVE_ADDR for the mxcsr register.
7079
7080 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
7081
7082         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7083
7084 2018-05-11  Pedro Alves  <palves@redhat.com>
7085
7086         * corelow.c (core_target) <core_target>: No longer inline.
7087         Initialize m_core_gdbarch, m_core_vec and build the section table
7088         here.
7089         <~core_target>: New.
7090         <core_gdbarch, get_core_register_section>: New methods.
7091         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7092         factored out from ...
7093         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7094         (core_ops): Delete.
7095         (sniff_core_bfd): Add gdbarch parameter.
7096         (core_close): Delete, merged into ...
7097         (core_target::close): ... here.  Delete self.
7098         (core_close_cleanup): Delete.
7099         (core_target_open): Allocate a core_target on the heap.  Use a
7100         unique_ptr instead of a cleanup.  Bits moved into the core_target
7101         ctor.  Adjust to use core_target methods instead of globals.
7102         (get_core_register_section): Rename to ...
7103         (core_target::get_core_register_section): ... this and adjust.
7104         (struct get_core_registers_cb_data): New.
7105         (get_core_registers_cb): Use it.  Use bool.
7106         (core_target::fetch_registers, core_target::files_info)
7107         (core_target::xfer_partial, core_target::read_description)
7108         (core_target::pid_to, core_target::thread_name): Adjust to
7109         reference class fields instead of globals.
7110         * target.h (struct target_ops_deleter, target_ops_up): New.
7111
7112 2018-05-11  Pedro Alves  <palves@redhat.com>
7113
7114         * corefile.c (core_file_command): Move to corelow.c.
7115         * corelow.c (the_core_target): Delete.
7116         (core_file_command): Moved from corefile.c.  Check exec_bfd
7117         instead of the_core_target.  Use target_detach instead of calling
7118         into the_core_target directly.
7119         (maybe_say_no_core_file_now): New.
7120         (core_target::detach): Use it.
7121         (_initialize_corelow): Remove references to the_core_target.
7122         * gdbcore.h (the_core_target): Delete.
7123
7124 2018-05-11  Tom Tromey  <tromey@redhat.com>
7125             Pedro Alves  <palves@redhat.com>
7126
7127         * corefile.c (core_bfd): Remove.
7128         * gdbcore.h (core_bfd): Now a macro.
7129         * progspace.h (struct program_space) <cbfd>: New field.
7130
7131 2018-05-11  Tom Tromey  <tom@tromey.com>
7132
7133         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7134         gdb::def_vector.
7135
7136 2018-05-10  Tom Tromey  <tom@tromey.com>
7137
7138         * configure: Rebuild.
7139         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7140
7141 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
7142
7143         PR server/23158:
7144         * regformats/regdat.sh: Adjust script, following the addition
7145         of the new expedite_regs parameter to init_target_desc.
7146
7147 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
7148     
7149         PR gdb/23127
7150         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7151         set_gdbarch_significant_addr_bit.
7152         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7153         set_gdbarch_significant_addr_bit.
7154         * utils.c (address_significant): Update to sign extend addr.
7155
7156 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
7157
7158         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7159         (xtensa_linux_init_abi): Limit tdep->num_regs by
7160         tdep->num_nopriv_regs.
7161         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7162         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7163         not initialized.
7164
7165 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
7166
7167         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7168
7169 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
7170
7171         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7172         (I387_MXCSR_INIT_VAL): New constant.
7173         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7174         buffer if it was supplied by the inferior.
7175         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7176         (i387_xsave_get_clear_bv): New function.
7177         (i387_supply_xsave): Only read x87 control registers from the
7178         xsave buffer if the feature is enabled, and the state will have
7179         been written, otherwise, provide a suitable default.
7180         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7181         including x87 control registers.  Update control registers if they
7182         have changed from the default value, and mark features as enabled
7183         as required.
7184         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7185
7186 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
7187
7188         * spu-tdep.c (info_spu_event_command): Fix output formatting.
7189
7190 2018-05-07  Tom Tromey  <tom@tromey.com>
7191
7192         * configure: Rebuild.
7193         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7194
7195 2018-05-07  Tom Tromey  <tom@tromey.com>
7196
7197         PR tdep/20362:
7198         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7199         bit.  Use correct value for VDIV.
7200
7201 2018-05-04  Tom Tromey  <tom@tromey.com>
7202
7203         * configure: Rebuild.
7204         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7205
7206 2018-05-04  Tom Tromey  <tom@tromey.com>
7207
7208         * linux-record.c (record_linux_system_call) <case
7209         RECORD_SYS_RECVFROM>: Add "break".
7210
7211 2018-05-04  Tom Tromey  <tom@tromey.com>
7212
7213         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7214         Add missing "break".
7215         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7216         Add missing "break".
7217
7218 2018-05-04  Tom Tromey  <tom@tromey.com>
7219
7220         * rs6000-tdep.c (ppc_process_record_op4)
7221         (ppc_process_record_op63): Add fall-through comment.
7222
7223 2018-05-04  Tom Tromey  <tom@tromey.com>
7224
7225         * i386-tdep.c (i386_process_record): Add fall-through comment.
7226
7227 2018-05-04  Tom Tromey  <tom@tromey.com>
7228
7229         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7230         comment.
7231
7232 2018-05-04  Tom Tromey  <tom@tromey.com>
7233
7234         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7235         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7236         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7237         comment.
7238         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7239         comment.
7240         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7241         comment.
7242
7243 2018-05-04  Tom Tromey  <tom@tromey.com>
7244
7245         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7246
7247 2018-05-04  Tom Tromey  <tom@tromey.com>
7248
7249         * s390-tdep.c (s390_process_record): Fix fall-through comments.
7250         * xcoffread.c (scan_xcoff_symtab): Move comment later.
7251         * symfile.c (section_is_mapped): Fix fall-through comment.
7252         * stabsread.c (define_symbol, read_member_functions): Fix
7253         fall-through comment.
7254         * s390-linux-tdep.c (s390_process_record): Fix fall-through
7255         comment.
7256         * remote.c (remote_wait_as): Fix fall-through comment.
7257         * p-exp.y (yylex): Fix fall-through comment.
7258         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7259         comment.
7260         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7261         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7262         * jv-exp.y (yylex): Fix fall-through comment.
7263         * go-exp.y (lex_one_token): Fix fall-through comment.
7264         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7265         fall-through comment.
7266         * f-exp.y (yylex): Fix fall-through comment.
7267         * dwarf2read.c (process_die): Fix fall-through comments.
7268         * dbxread.c (process_one_symbol): Fix fall-through comment.
7269         * d-exp.y (lex_one_token): Fix fall-through comment.
7270         * cp-name-parser.y (yylex): Fix fall-through comment.
7271         * coffread.c (coff_symtab_read): Fix fall-through comment.
7272         * c-exp.y (lex_one_token): Fix fall-through comment.
7273         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7274         comment.
7275         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7276         comment.
7277
7278 2018-05-04  Tom Tromey  <tom@tromey.com>
7279
7280         PR python/22730:
7281         * NEWS: Mention gdb.execute change.
7282         * gdbcmd.h (execute_control_command): Don't declare.
7283         * python/python.c (execute_gdb_command): Use read_command_lines_1,
7284         execute_control_commands, execute_control_commands_to_string.
7285         * cli/cli-script.h (execute_control_commands)
7286         (execute_control_commands_to_string): Declare.
7287         (execute_control_command): Add from_tty parameter.
7288         * cli/cli-script.c (execute_control_commands)
7289         (execute_control_commands_to_string): New functions.
7290         (execute_user_command): Use execute_control_commands.
7291         (execute_control_command_1): Add "from_tty" parameter.  Update.
7292         (execute_control_command): Likewise.
7293
7294 2018-05-04  Tom Tromey  <tom@tromey.com>
7295
7296         PR python/22731:
7297         * NEWS: Mention that breakpoint commands are writable.
7298         * python/py-breakpoint.c (bppy_set_commands): New function.
7299         (breakpoint_object_getset) <"commands">: Use it.
7300
7301 2018-05-04  Tom Tromey  <tom@tromey.com>
7302
7303         * tracepoint.c (actions_command): Update.
7304         * mi/mi-cmd-break.c (mi_command_line_array)
7305         (mi_command_line_array_cnt, mi_command_line_array_ptr)
7306         (mi_read_next_line): Remove.
7307         (mi_cmd_break_commands): Update.
7308         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7309         function_view.
7310         * cli/cli-script.c (get_command_line): Update.
7311         (process_next_line): Use function_view.  Constify.
7312         (recurse_read_control_structure, read_command_lines)
7313         (read_command_lines_1): Change argument types to function_view.
7314         (do_define_command, document_command): Update.
7315         * breakpoint.h (check_tracepoint_command): Don't declare.
7316         * breakpoint.c (check_tracepoint_command): Remove.
7317         (commands_command_1, create_tracepoint_from_upload): Update.
7318
7319 2018-05-04  Tom Tromey  <tom@tromey.com>
7320
7321         PR gdb/11750:
7322         * cli/cli-script.h (enum command_control_type) <define_control>:
7323         New constant.
7324         * cli/cli-script.c (multi_line_command_p): Handle define_control.
7325         (build_command_line, execute_control_command_1)
7326         (process_next_line): Likewise.
7327         (do_define_command): New function, extracted from define_command.
7328         (define_command): Use it.
7329
7330 2018-05-04  Tom Tromey  <tom@tromey.com>
7331
7332         * tracepoint.c (actions_command): Update.
7333         * cli/cli-script.h (read_command_lines): Update.
7334         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7335         (MAX_TMPBUF): Remove define.
7336         (define_command): Use string_printf.
7337         (document_command): Likewise.
7338         * breakpoint.c (commands_command_1): Update.
7339
7340 2018-05-04  Tom Tromey  <tom@tromey.com>
7341
7342         * top.c (execute_command): Update.
7343         * cli/cli-script.h (print_command_lines): Now varargs.
7344         * cli/cli-script.c (print_command_lines): Now varargs.
7345         (execute_control_command_1) <case while_control, case if_control>:
7346         Update.
7347
7348 2018-05-04  Tom Tromey  <tom@tromey.com>
7349
7350         * tracepoint.c (all_tracepoint_actions): Rename from
7351         all_tracepoint_actions_and_cleanup.  Change return type.
7352         (actions_command, encode_actions_1, encode_actions)
7353         (trace_dump_actions, tdump_command): Update.
7354         * remote.c (remote_download_command_source): Update.
7355         * python/python.c (gdbpy_eval_from_control_command)
7356         (python_command, python_interactive_command): Update.
7357         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7358         * guile/guile.c (guile_command)
7359         (gdbscm_eval_from_control_command, guile_command): Update.
7360         * compile/compile.c (compile_code_command)
7361         (compile_print_command, compile_to_object): Update.
7362         * cli/cli-script.h (struct command_lines_deleter): New.
7363         (counted_command_line): New typedef.
7364         (struct command_line): Add constructor, destructor.
7365         <body_list>: Remove.
7366         <body_list_0, body_list_1>: New members.
7367         (command_line_up): Remove typedef.
7368         (read_command_lines, read_command_lines_1, get_command_line):
7369         Update.
7370         (copy_command_lines): Don't declare.
7371         * cli/cli-script.c (build_command_line): Use "new".
7372         (get_command_line): Return counted_command_line.
7373         (print_command_lines, execute_user_command)
7374         (execute_control_command_1, while_command, if_command): Update.
7375         (realloc_body_list): Remove.
7376         (process_next_line, recurse_read_control_structure): Update.
7377         (read_command_lines, read_command_lines_1): Return counted_command_line.
7378         (free_command_lines): Use "delete".
7379         (copy_command_lines): Remove.
7380         (define_command, document_command, show_user_1): Update.
7381         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7382         a counted_command_line.
7383         * breakpoint.h (counted_command_line): Remove typedef.
7384         (breakpoint_set_commands): Update.
7385         * breakpoint.c (check_no_tracepoint_commands)
7386         (validate_commands_for_breakpoint): Update.
7387         (breakpoint_set_commands): Change commands to be a
7388         counted_command_line.
7389         (commands_command_1, update_dprintf_command_list)
7390         (create_tracepoint_from_upload): Update.
7391
7392 2018-05-04  Tom Tromey  <tom@tromey.com>
7393
7394         * cli/cli-decode.h (cmd_list_element): New constructor.
7395         (~cmd_list_element): New destructor.
7396         (struct cmd_list_element): Add initializers.
7397         * cli/cli-decode.c (do_add_cmd): Use "new".
7398         (delete_cmd): Use "delete".
7399
7400 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7401             Pedro Alves <palves@redhat.com>
7402
7403         PR breakpoints/19806 and support for PR external/20207.
7404         * NEWS: Mention Aarch64 watchpoint improvements.
7405         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7406         watchpoints and PR external/20207 watchpoints.
7407         * nat/aarch64-linux-hw-point.c
7408         (kernel_supports_any_contiguous_range): New.
7409         (aarch64_watchpoint_offset): New.
7410         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7411         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7412         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7413         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7414         next_addr_orig_p.  Support PR external/20207 watchpoints.
7415         (aarch64_downgrade_regs): New.
7416         (aarch64_dr_state_insert_one_point): New parameters offset and
7417         addr_orig.
7418         (aarch64_dr_state_remove_one_point): Likewise.
7419         (aarch64_handle_breakpoint): Update caller.
7420         (aarch64_handle_aligned_watchpoint): Likewise.
7421         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7422         aligned_offset.
7423         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7424         aarch64_downgrade_regs.
7425         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7426         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7427         (DR_CONTROL_MASK): ... this.
7428         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7429         (unsigned int aarch64_watchpoint_offset): New prototype.
7430         (aarch64_linux_set_debug_regs): Remove const from state.
7431         * utils.c (align_up, align_down): Move to ...
7432         * common/common-utils.c (align_up, align_down): ... here.
7433         * utils.h (align_up, align_down): Move to ...
7434         * common/common-utils.h (align_up, align_down): ... here.
7435
7436 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
7437
7438         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7439         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7440         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7441         Re-implement to match the ABI as summarized in GCC's
7442         gcc/config/sparc/sparc.c.  All callers updated.
7443         (sparc32_store_arguments): Remove assertion.
7444
7445 2018-05-04  Tom Tromey  <tom@tromey.com>
7446
7447         * printcmd.c: Don't include tui.h.
7448         (decode_format): Use skip_spaces.
7449
7450 2018-05-04  Tom Tromey  <tom@tromey.com>
7451
7452         PR gdb/22619:
7453         * printcmd.c (last_count): New global.
7454         (x_command): Use saved count when repeating.
7455
7456 2018-05-04  Tom Tromey  <tom@tromey.com>
7457
7458         * nto-procfs.c (do_closedir_cleanup): Remove.
7459         (procfs_pidlist): Use gdb_dir_up.
7460         * procfs.c (do_closedir_cleanup): Remove.
7461         (proc_update_threads): Use gdb_dir_up.
7462         * common/filestuff.h (struct gdb_dir_deleter): New.
7463         (gdb_dir_up): New typedef.
7464
7465 2018-05-04  Tom Tromey  <tom@tromey.com>
7466
7467         * ada-lang.c (print_mention_exception): Use std::string.
7468
7469 2018-05-04  Tom Tromey  <tom@tromey.com>
7470
7471         * ada-lang.c (create_excep_cond_exprs): Update.
7472         (ada_exception_catchpoint_cond_string): Use std::string.
7473
7474 2018-05-04  Tom Tromey  <tom@tromey.com>
7475
7476         * ada-lang.c (xget_renaming_scope): Return std::string.
7477         (old_renaming_is_invisible): Update.
7478
7479 2018-05-04  Tom Tromey  <tom@tromey.com>
7480
7481         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7482         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7483
7484 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7485
7486         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7487
7488 2018-05-04  Tom Tromey  <tom@tromey.com>
7489
7490         * remote.c (remote_query_supported_append): Change type.
7491         (remote_check_symbols): Update.
7492
7493 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
7494
7495         PR gdb/11420
7496         * configure.ac: Prepend libpython.
7497         * python/python-config.py: Likewise.
7498         * configure: Regenerate.
7499
7500 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7501
7502         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7503
7504 2018-05-03  Pedro Alves  <palves@redhat.com>
7505
7506         * s390-linux-nat.c
7507         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7508         override.  Write 'true' instead of '1'.
7509         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7510         declaration.
7511
7512 2018-05-02  Pedro Alves  <palves@redhat.com>
7513
7514         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7515         add_inf_child_target.
7516         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7517         add_inf_child_target.
7518         * aix-thread.c (aix_thread_target_info): New.
7519         (aix_thread_target) <shortname, longname, doc>: Delete.
7520         <info>: New.
7521         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7522         add_inf_child_target.
7523         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7524         add_inf_child_target.
7525         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7526         add_inf_child_target.
7527         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7528         add_inf_child_target.
7529         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7530         add_inf_child_target.
7531         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7532         add_inf_child_target.
7533         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7534         add_inf_child_target.
7535         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7536         add_inf_child_target.
7537         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7538         add_inf_child_target.
7539         * bfd-target.c (target_bfd_target_info): New.
7540         (target_bfd) <shortname, longname, doc>: Delete.
7541         <info>: New.
7542         * bsd-kvm.c (bsd_kvm_target_info): New.
7543         (bsd_kvm_target) <shortname, longname, doc>: Delete.
7544         <info>: New.
7545         (bsd_kvm_target::open): Rename to ...
7546         (bsd_kvm_target_open): ... this.  Adjust.
7547         * bsd-uthread.c (bsd_uthread_target_info): New.
7548         (bsd_uthread_target) <shortname, longname, doc>: Delete.
7549         <info>: New.
7550         * corefile.c (core_file_command): Adjust.
7551         * corelow.c (core_target_info): New.
7552         (core_target) <shortname, longname, doc>: Delete.
7553         <info>: New.
7554         (core_target::open): Rename to ...
7555         (core_target_open): ... this.  Adjust.
7556         * ctf.c (ctf_target_info): New.
7557         (ctf_target) <shortname, longname, doc>: Delete.
7558         <info>: New.
7559         (ctf_target::open): Rename to ...
7560         (ctf_target_open): ... this.
7561         (_initialize_ctf): Adjust.
7562         * exec.c (exec_target_info): New.
7563         (exec_target) <shortname, longname, doc>: Delete.
7564         <info>: New.
7565         (exec_target::open): Rename to ...
7566         (exec_target_open): ... this.
7567         * gdbcore.h (core_target_open): Declare.
7568         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7569         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7570         add_inf_child_target.
7571         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7572         add_inf_child_target.
7573         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7574         add_inf_child_target.
7575         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7576         add_inf_child_target.
7577         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7578         add_inf_child_target.
7579         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7580         add_inf_child_target.
7581         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7582         add_inf_child_target.
7583         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7584         add_inf_child_target.
7585         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7586         add_inf_child_target.
7587         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7588         add_inf_child_target.
7589         * inf-child.c (inf_child_target_info): New.
7590         (inf_child_target::info): New.
7591         (inf_child_open_target): Remove 'target' parameter.  Use
7592         get_native_target instead.
7593         (inf_child_target::open): Delete.
7594         (add_inf_child_target): New.
7595         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7596         Delete.
7597         <info>: New.
7598         (add_inf_child_target): Declare.
7599         (inf_child_open_target): Declare.
7600         * linux-thread-db.c (thread_db_target_info): New.
7601         (thread_db_target) <shortname, longname, doc>: Delete.
7602         <info>: New.
7603         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7604         add_inf_child_target.
7605         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7606         add_inf_child_target.
7607         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7608         add_inf_child_target.
7609         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7610         add_inf_child_target.
7611         * make-target-delegates (print_class): Adjust.
7612         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7613         add_inf_child_target.
7614         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7615         add_inf_child_target.
7616         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7617         add_inf_child_target.
7618         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7619         add_inf_child_target.
7620         * nto-procfs.c (nto_native_target_info): New.
7621         (nto_procfs_target_native) <shortname, longname, doc>:
7622         Delete.
7623         <info>: New.
7624         (nto_procfs_target_info): New.
7625         (nto_procfs_target_procfs) <shortname, longname, doc>:
7626         Delete.
7627         <info>: New.
7628         (init_procfs_targets): Adjust.
7629         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7630         add_inf_child_target.
7631         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7632         add_inf_child_target.
7633         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7634         add_inf_child_target.
7635         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7636         add_inf_child_target.
7637         * ravenscar-thread.c (ravenscar_target_info): New.
7638         (ravenscar_thread_target) <shortname, longname, doc>:
7639         Delete.
7640         <info>: New.
7641         * record-btrace.c (record_btrace_target_info):
7642         (record_btrace_target) <shortname, longname, doc>: Delete.
7643         <info>: New.
7644         (record_btrace_target::open): Rename to ...
7645         (record_btrace_target_open): ... this.  Adjust.
7646         * record-full.c (record_longname, record_doc): New.
7647         (record_full_base_target) <shortname, longname, doc>: Delete.
7648         <info>: New.
7649         (record_full_target_info): New.
7650         (record_full_target): <shortname>: Delete.
7651         <info>: New.
7652         (record_full_core_open_1, record_full_open_1): Update comments.
7653         (record_full_base_target::open): Rename to ...
7654         (record_full_open): ... this.
7655         (cmd_record_full_restore): Update.
7656         (_initialize_record_full): Update.
7657         * remote-sim.c (remote_sim_target_info): New.
7658         (gdbsim_target) <shortname, longname, doc>: Delete.
7659         <info>: New.
7660         (gdbsim_target::open): Rename to ...
7661         (gdbsim_target_open): ... this.
7662         (_initialize_remote_sim): Adjust.
7663         * remote.c (remote_doc): New.
7664         (remote_target_info): New.
7665         (remote_target) <shortname, longname, doc>: Delete.
7666         <info>: New.
7667         (extended_remote_target_info): New.
7668         (extended_remote_target) <shortname, longname, doc>: Delete.
7669         <info>: New.
7670         (remote_target::open_1): Make static.  Adjust.
7671         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7672         * s390-linux-nat.c (_initialize_s390_nat): Use
7673         add_inf_child_target.
7674         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7675         add_inf_child_target.
7676         * sol-thread.c (thread_db_target_info): New.
7677         (sol_thread_target) <shortname, longname, doc>: Delete.
7678         <info>: New.
7679         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7680         add_inf_child_target.
7681         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7682         add_inf_child_target.
7683         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7684         add_inf_child_target.
7685         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7686         add_inf_child_target.
7687         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7688         add_inf_child_target.
7689         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7690         add_inf_child_target.
7691         * spu-linux-nat.c (_initialize_spu_nat): Use
7692         add_inf_child_target.
7693         * spu-multiarch.c (spu_multiarch_target_info): New.
7694         (spu_multiarch_target) <shortname, longname, doc>: Delete.
7695         <info>: New.
7696         * target-delegates.c: Regenerate.
7697         * target.c: Include <unordered_map>.
7698         (target_ops_p): Delete.
7699         (DEF_VEC_P(target_ops_p)): Delete.
7700         (target_factories): New.
7701         (test_target_info): New.
7702         (test_target_ops::info): New.
7703         (open_target): Adjust to use target_factories.
7704         (add_target_with_completer): Rename to ...
7705         (add_target): ... this.  Change prototype.  Register target_info
7706         and open callback in target_factories.  Register target_info in
7707         command context instead of target_ops.
7708         (add_target): Delete old implementation.
7709         (add_deprecated_target_alias): Change prototype.  Adjust.
7710         (the_native_target): New.
7711         (set_native_target, get_native_target): New.
7712         (find_default_run_target): Use the_native_target.
7713         (find_attach_target, find_run_target): Simplify.
7714         (target_ops::open): Delete.
7715         (dummy_target_info): New.
7716         (dummy_target::shortname, dummy_target::longname)
7717         (dummy_target::doc): Delete.
7718         (dummy_target::info): New.
7719         (debug_target::shortname, debug_target::longname)
7720         (debug_target::doc): Delete.
7721         (debug_target::info): New.
7722         * target.h (struct target_info): New.
7723         (target_ops::~target_ops): Add comment.
7724         (target_ops::info): New.
7725         (target_ops::shortname, target_ops::longname, target_ops::doc): No
7726         longer virtual.  Implement in terms of target_info.
7727         (set_native_target, get_native_target): Declare.
7728         (target_open_ftype): New.
7729         (add_target, add_target_with_completer)
7730         (add_deprecated_target_alias): Change prototype.
7731         (test_target) <shortname, longname, doc>: Delete.
7732         <info>: New.
7733         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7734         add_inf_child_target.
7735         * tracefile-tfile.c (tfile_target_info): New.
7736         (tfile_target) <shortname, longname, doc>: Delete.
7737         <info>: New.
7738         (tfile_target::open): Rename to ...
7739         (tfile_target_open): ... this.
7740         (_initialize_tracefile_tfile): Adjust.
7741         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7742         add_inf_child_target.
7743         * windows-nat.c (_initialize_windows_nat): Use
7744         add_inf_child_target.
7745         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7746         add_inf_child_target.
7747
7748 2018-05-02  Pedro Alves  <palves@redhat.com>
7749
7750         * linux-nat.h (linux_nat_target) <low_new_thread,
7751         low_delete_thread, low_new_fork, low_forget_process,
7752         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7753         New virtual methods.
7754         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7755         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7756         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7757         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7758         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7759         Delete.
7760         * linux-fork.c (delete_fork): Adjust to call low method.
7761         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7762         (linux_nat_new_fork, linux_nat_forget_process_hook)
7763         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7764         (linux_nat_status_is_event):
7765         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7766         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7767         to call low method.
7768         (sigtrap_is_event): Rename to ...
7769         (linux_nat_target::low_status_is_event): ... this.
7770         (linux_nat_set_status_is_event): Delete.
7771         (save_stop_reason, linux_nat_wait_1)
7772         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7773         low methods.
7774         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7775         (linux_nat_set_new_fork, linux_nat_set_forget_process)
7776         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7777         (linux_nat_set_prepare_to_resume): Delete.
7778         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7779         low virtual methods.
7780         * amd64-linux-nat.c: Likewise.
7781         * arm-linux-nat.c: Likewise.
7782         * i386-linux-nat.c: Likewise.
7783         * ia64-linux-nat.c: Likewise.
7784         * mips-linux-nat.c: Likewise.
7785         * ppc-linux-nat.c: Likewise.
7786         * s390-linux-nat.c: Likewise.
7787         * sparc64-linux-nat.c: Likewise.
7788         * x86-linux-nat.c: Likewise.
7789         * x86-linux-nat.h: Include "nat/x86-linux.h".
7790         (x86_linux_nat_target) <low_new_fork, low_forget_process,
7791         low_prepare_to_resume, low_new_thread, low_delete_thread>:
7792         Override methods.
7793
7794 2018-05-02  Pedro Alves  <palves@redhat.com>
7795
7796         * target.h (target_ops)
7797         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7798         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7799         stopped_by_watchpoint, have_continuable_watchpoint,
7800         stopped_data_address, watchpoint_addr_within_range,
7801         can_accel_watchpoint_condition, can_run, thread_alive,
7802         has_all_memory, has_memory, has_stack, has_registers,
7803         has_execution, can_async_p, is_async_p, supports_non_stop,
7804         always_non_stop_p, can_execute_reverse, supports_multi_process,
7805         supports_enable_disable_tracepoint,
7806         supports_disable_randomization, supports_string_tracing,
7807         supports_evaluation_of_breakpoint_conditions,
7808         can_run_breakpoint_commands, filesystem_is_local,
7809         can_download_tracepoint, get_trace_state_variable_value,
7810         set_trace_notes, get_tib_address, use_agent, can_use_agent,
7811         record_is_replaying, record_will_replay,
7812         augmented_libraries_svr4_read>: Adjust to return bool.
7813         * aarch64-linux-nat.c: All implementations adjusted.
7814         * aix-thread.c: All implementations adjusted.
7815         * arm-linux-nat.c: All implementations adjusted.
7816         * breakpoint.c: All implementations adjusted.
7817         * bsd-kvm.c: All implementations adjusted.
7818         * bsd-uthread.c: All implementations adjusted.
7819         * corelow.c: All implementations adjusted.
7820         * ctf.c: All implementations adjusted.
7821         * darwin-nat.c: All implementations adjusted.
7822         * darwin-nat.h: All implementations adjusted.
7823         * exec.c: All implementations adjusted.
7824         * fbsd-nat.c: All implementations adjusted.
7825         * fbsd-nat.h: All implementations adjusted.
7826         * gnu-nat.c: All implementations adjusted.
7827         * gnu-nat.h: All implementations adjusted.
7828         * go32-nat.c: All implementations adjusted.
7829         * ia64-linux-nat.c: All implementations adjusted.
7830         * inf-child.c: All implementations adjusted.
7831         * inf-child.h: All implementations adjusted.
7832         * inf-ptrace.c: All implementations adjusted.
7833         * inf-ptrace.h: All implementations adjusted.
7834         * linux-nat.c: All implementations adjusted.
7835         * linux-nat.h: All implementations adjusted.
7836         * mips-linux-nat.c: All implementations adjusted.
7837         * nto-procfs.c: All implementations adjusted.
7838         * ppc-linux-nat.c: All implementations adjusted.
7839         * procfs.c: All implementations adjusted.
7840         * ravenscar-thread.c: All implementations adjusted.
7841         * record-btrace.c: All implementations adjusted.
7842         * record-full.c: All implementations adjusted.
7843         * remote-sim.c: All implementations adjusted.
7844         * remote.c: All implementations adjusted.
7845         * s390-linux-nat.c: All implementations adjusted.
7846         * sol-thread.c: All implementations adjusted.
7847         * spu-multiarch.c: All implementations adjusted.
7848         * target-delegates.c: All implementations adjusted.
7849         * target.c: All implementations adjusted.
7850         * target.h: All implementations adjusted.
7851         * tracefile-tfile.c: All implementations adjusted.
7852         * tracefile.c: All implementations adjusted.
7853         * tracefile.h: All implementations adjusted.
7854         * windows-nat.c: All implementations adjusted.
7855         * x86-linux-nat.h: All implementations adjusted.
7856         * x86-nat.h: All implementations adjusted.
7857
7858 2018-05-02  Pedro Alves  <palves@redhat.com>
7859
7860         * make-target-delegates (scan_target_h): Don't trim lines here.
7861         Replace sequences of tabs and/or whitespace with a single
7862         whitespace.
7863         (top level, parsing methods): Trim each line before processing it
7864         here.
7865
7866 2018-05-02  Pedro Alves  <palves@redhat.com>
7867             John Baldwin  <jhb@freebsd.org>
7868
7869         * target.h (enum strata) <debug_stratum>: New.
7870         (struct target_ops) <all delegation methods>: Replace by C++
7871         virtual methods, and drop "to_" prefix.  All references updated
7872         throughout.
7873         <to_shortname, to_longname, to_doc, to_data,
7874         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
7875         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
7876         virtual methods.  All references updated throughout.
7877         <can_attach, supports_terminal_ours, can_create_inferior,
7878         get_thread_control_capabilities, attach_no_wait>: New
7879         virtual methods.
7880         <insert_breakpoint, remove_breakpoint>: Now
7881         TARGET_DEFAULT_NORETURN methods.
7882         <info_proc>: Now returns bool.
7883         <to_magic>: Delete.
7884         (OPS_MAGIC): Delete.
7885         (current_target): Delete.  All references replaced by references
7886         to ...
7887         (target_stack): ... this.  New.
7888         (target_shortname, target_longname): Adjust.
7889         (target_can_run): Now a function declaration.
7890         (default_child_has_all_memory, default_child_has_memory)
7891         (default_child_has_stack, default_child_has_registers)
7892         (default_child_has_execution): Remove target_ops parameter.
7893         (complete_target_initialization): Delete.
7894         (memory_breakpoint_target): New template class.
7895         (test_target_ops): Refactor as a C++ class with virtual methods.
7896         * make-target-delegates (NAME_PART): Tighten.
7897         (POINTER_PART, CP_SYMBOL): New.
7898         (SIMPLE_RETURN_PART): Reimplement.
7899         (VEC_RETURN_PART): Expect less.
7900         (RETURN_PART, VIRTUAL_PART): New.
7901         (METHOD): Adjust to C++ virtual methods.
7902         (scan_target_h): Remove reference to C99.
7903         (dname): Output "target_ops::" prefix.
7904         (write_function_header): Adjust to output a C++ class method.
7905         (write_declaration): New.
7906         (write_delegator): Adjust to output a C++ class method.
7907         (tdname): Output "dummy_target::" prefix.
7908         (write_tdefault, write_debugmethod): Adjust to output a C++ class
7909         method.
7910         (tdefault_names, debug_names): Delete.
7911         (return_types, tdefaults, styles, argtypes_array): New.
7912         (top level): All methods are delegators.
7913         (print_class): New.
7914         (top level): Print dummy_target and debug_target classes.
7915         * target-delegates.c: Regenerate.
7916         * target-debug.h (target_debug_print_enum_info_proc_what)
7917         (target_debug_print_thread_control_capabilities)
7918         (target_debug_print_thread_info_p): New.
7919         * target.c (dummy_target): Delete.
7920         (the_dummy_target, the_debug_target): New.
7921         (target_stack): Now extern.
7922         (set_targetdebug): Push/unpush debug target.
7923         (default_child_has_all_memory, default_child_has_memory)
7924         (default_child_has_stack, default_child_has_registers)
7925         (default_child_has_execution): Remove target_ops parameter.
7926         (complete_target_initialization): Delete.
7927         (add_target_with_completer): No longer call
7928         complete_target_initialization.
7929         (target_supports_terminal_ours): Use regular delegation.
7930         (update_current_target): Delete.
7931         (push_target): No longer check magic number.  Don't call
7932         update_current_target.
7933         (unpush_target): Don't call update_current_target.
7934         (target_is_pushed): No longer check magic number.
7935         (target_require_runnable): Skip for all stratums over
7936         process_stratum.
7937         (target_ops::info_proc): New.
7938         (target_info_proc): Use find_target_at and
7939         find_default_run_target.
7940         (target_supports_disable_randomization): Use regular delegation.
7941         (target_get_osdata): Use find_target_at.
7942         (target_ops::open, target_ops::close, target_ops::can_attach)
7943         (target_ops::attach, target_ops::can_create_inferior)
7944         (target_ops::create_inferior, target_ops::can_run)
7945         (target_can_run): New.
7946         (default_fileio_target): Use regular delegation.
7947         (target_ops::fileio_open, target_ops::fileio_pwrite)
7948         (target_ops::fileio_pread, target_ops::fileio_fstat)
7949         (target_ops::fileio_close, target_ops::fileio_unlink)
7950         (target_ops::fileio_readlink): New.
7951         (target_fileio_open_1, target_fileio_unlink)
7952         (target_fileio_readlink): Always call the target method.  Handle
7953         FILEIO_ENOSYS.
7954         (return_zero, return_zero_has_execution): Delete.
7955         (init_dummy_target): Delete.
7956         (dummy_target::dummy_target, dummy_target::shortname)
7957         (dummy_target::longname, dummy_target::doc)
7958         (debug_target::debug_target, debug_target::shortname)
7959         (debug_target::longname, debug_target::doc): New.
7960         (target_supports_delete_record): Use regular delegation.
7961         (setup_target_debug): Delete.
7962         (maintenance_print_target_stack): Skip debug_stratum.
7963         (initialize_targets): Instantiate the_dummy_target and
7964         the_debug_target.
7965         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
7966         use target_stack.
7967         (target_auxv_search, fprint_target_auxv): Adjust.
7968         (info_auxv_command): Adjust to use target_stack.
7969         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7970         * exceptions.c (print_flush): Handle a NULL target_stack.
7971         * regcache.c (target_ops_no_register): Refactor as class with
7972         virtual methods.
7973
7974         * exec.c (exec_target): New class.
7975         (exec_ops): Now an exec_target.
7976         (exec_open, exec_close_1, exec_get_section_table)
7977         (exec_xfer_partial, exec_files_info, exec_has_memory)
7978         (exec_make_note_section): Refactor as exec_target methods.
7979         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7980         Delete.
7981         (exec_target::find_memory_regions): New.
7982         (_initialize_exec): Don't call init_exec_ops.
7983         * gdbcore.h (exec_file_clear): Delete.
7984
7985         * corefile.c (core_target): Delete.
7986         (core_file_command): Adjust.
7987         * corelow.c (core_target): New class.
7988         (the_core_target): New.
7989         (core_close): Remove target_ops parameter.
7990         (core_close_cleanup): Adjust.
7991         (core_target::close): New.
7992         (core_open, core_detach, get_core_registers, core_files_info)
7993         (core_xfer_partial, core_thread_alive, core_read_description)
7994         (core_pid_to_str, core_thread_name, core_has_memory)
7995         (core_has_stack, core_has_registers, core_info_proc): Rework as
7996         core_target methods.
7997         (ignore, core_remove_breakpoint, init_core_ops): Delete.
7998         (_initialize_corelow): Initialize the_core_target.
7999         * gdbcore.h (core_target): Delete.
8000         (the_core_target): New.
8001
8002         * ctf.c: (ctf_target): New class.
8003         (ctf_ops): Now a ctf_target.
8004         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8005         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8006         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8007         methods.
8008         (init_ctf_ops): Delete.
8009         (_initialize_ctf): Don't call it.
8010         * tracefile-tfile.c (tfile_target): New class.
8011         (tfile_ops): Now a tfile_target.
8012         (tfile_open, tfile_close, tfile_files_info)
8013         (tfile_get_tracepoint_status, tfile_trace_find)
8014         (tfile_fetch_registers, tfile_xfer_partial)
8015         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8016         Refactor as tfile_target methods.
8017         (tfile_xfer_partial_features): Remove target_ops parameter.
8018         (init_tfile_ops): Delete.
8019         (_initialize_tracefile_tfile): Don't call it.
8020         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8021         (tracefile_has_stack, tracefile_has_registers)
8022         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8023         tracefile_target methods.
8024         (init_tracefile_ops): Delete.
8025         (tracefile_target::tracefile_target): New.
8026         * tracefile.h: Include "target.h".
8027         (tracefile_target): New class.
8028         (init_tracefile_ops): Delete.
8029
8030         * spu-multiarch.c (spu_multiarch_target): New class.
8031         (spu_ops): Now a spu_multiarch_target.
8032         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8033         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8034         (spu_search_memory, spu_mourn_inferior): Refactor as
8035         spu_multiarch_target methods.
8036         (init_spu_ops): Delete.
8037         (_initialize_spu_multiarch): Remove references to init_spu_ops,
8038         complete_target_initialization.
8039
8040         * ravenscar-thread.c (ravenscar_thread_target): New class.
8041         (ravenscar_ops): Now a ravenscar_thread_target.
8042         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8043         (ravenscar_thread_alive, ravenscar_pid_to_str)
8044         (ravenscar_fetch_registers, ravenscar_store_registers)
8045         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8046         (ravenscar_stopped_by_hw_breakpoint)
8047         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8048         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8049         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8050         methods.
8051         (init_ravenscar_thread_ops): Delete.
8052         (_initialize_ravenscar): Remove references to
8053         init_ravenscar_thread_ops and complete_target_initialization.
8054
8055         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8056         (bsd_uthread_target): New class.
8057         (bsd_uthread_ops): Now a bsd_uthread_target.
8058         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8059         (bsd_uthread_close, bsd_uthread_mourn_inferior)
8060         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8061         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8062         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8063         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8064         (bsd_uthread_target): Delete function.
8065         (_initialize_bsd_uthread): Remove reference to
8066         complete_target_initialization.
8067
8068         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
8069         (target_bfd): ... this new class.
8070         (target_bfd_xfer_partial, target_bfd_get_section_table)
8071         (target_bfd_close): Refactor as target_bfd methods.
8072         (target_bfd::~target_bfd): New.
8073         (target_bfd_reopen): Adjust.
8074         (target_bfd::close): New.
8075
8076         * record-btrace.c (record_btrace_target): New class.
8077         (record_btrace_ops): Now a record_btrace_target.
8078         (record_btrace_open, record_btrace_stop_recording)
8079         (record_btrace_disconnect, record_btrace_close)
8080         (record_btrace_async, record_btrace_info)
8081         (record_btrace_insn_history, record_btrace_insn_history_range)
8082         (record_btrace_insn_history_from, record_btrace_call_history)
8083         (record_btrace_call_history_range)
8084         (record_btrace_call_history_from, record_btrace_record_method)
8085         (record_btrace_is_replaying, record_btrace_will_replay)
8086         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8087         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8088         (record_btrace_store_registers, record_btrace_prepare_to_store)
8089         (record_btrace_to_get_unwinder)
8090         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8091         (record_btrace_commit_resume, record_btrace_wait)
8092         (record_btrace_stop, record_btrace_can_execute_reverse)
8093         (record_btrace_stopped_by_sw_breakpoint)
8094         (record_btrace_supports_stopped_by_sw_breakpoint)
8095         (record_btrace_stopped_by_hw_breakpoint)
8096         (record_btrace_supports_stopped_by_hw_breakpoint)
8097         (record_btrace_update_thread_list, record_btrace_thread_alive)
8098         (record_btrace_goto_begin, record_btrace_goto_end)
8099         (record_btrace_goto, record_btrace_stop_replaying_all)
8100         (record_btrace_execution_direction)
8101         (record_btrace_prepare_to_generate_core)
8102         (record_btrace_done_generating_core): Refactor as
8103         record_btrace_target methods.
8104         (init_record_btrace_ops): Delete.
8105         (_initialize_record_btrace): Remove reference to
8106         init_record_btrace_ops.
8107         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8108         the execution_direction global.
8109         (record_full_base_target, record_full_target)
8110         (record_full_core_target): New classes.
8111         (record_full_ops): Now a record_full_target.
8112         (record_full_core_ops): Now a record_full_core_target.
8113         (record_full_target::detach, record_full_target::disconnect)
8114         (record_full_core_target::disconnect)
8115         (record_full_target::mourn_inferior, record_full_target::kill):
8116         New.
8117         (record_full_open, record_full_close, record_full_async): Refactor
8118         as methods of the record_full_base_target class.
8119         (record_full_resume, record_full_commit_resume): Refactor
8120         as methods of the record_full_target class.
8121         (record_full_wait, record_full_stopped_by_watchpoint)
8122         (record_full_stopped_data_address)
8123         (record_full_stopped_by_sw_breakpoint)
8124         (record_full_supports_stopped_by_sw_breakpoint)
8125         (record_full_stopped_by_hw_breakpoint)
8126         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8127         methods of the record_full_base_target class.
8128         (record_full_store_registers, record_full_xfer_partial)
8129         (record_full_insert_breakpoint, record_full_remove_breakpoint):
8130         Refactor as methods of the record_full_target class.
8131         (record_full_can_execute_reverse, record_full_get_bookmark)
8132         (record_full_goto_bookmark, record_full_execution_direction)
8133         (record_full_record_method, record_full_info, record_full_delete)
8134         (record_full_is_replaying, record_full_will_replay)
8135         (record_full_goto_begin, record_full_goto_end, record_full_goto)
8136         (record_full_stop_replaying): Refactor as methods of the
8137         record_full_base_target class.
8138         (record_full_core_resume, record_full_core_kill)
8139         (record_full_core_fetch_registers)
8140         (record_full_core_prepare_to_store)
8141         (record_full_core_store_registers, record_full_core_xfer_partial)
8142         (record_full_core_insert_breakpoint)
8143         (record_full_core_remove_breakpoint)
8144         (record_full_core_has_execution): Refactor
8145         as methods of the record_full_core_target class.
8146         (record_full_base_target::supports_delete_record): New.
8147         (init_record_full_ops): Delete.
8148         (init_record_full_core_ops): Delete.
8149         (record_full_save): Refactor as method of the
8150         record_full_base_target class.
8151         (_initialize_record_full): Remove references to
8152         init_record_full_ops and init_record_full_core_ops.
8153
8154         * remote.c (remote_target, extended_remote_target): New classes.
8155         (remote_ops): Now a remote_target.
8156         (extended_remote_ops): Now an extended_remote_target.
8157         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8158         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8159         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8160         (remote_pass_signals, remote_set_syscall_catchpoint)
8161         (remote_program_signals, )
8162         (remote_thread_always_alive): Remove target_ops parameter.
8163         (remote_thread_alive, remote_thread_name)
8164         (remote_update_thread_list, remote_threads_extra_info)
8165         (remote_static_tracepoint_marker_at)
8166         (remote_static_tracepoint_markers_by_strid)
8167         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8168         (remote_open): Refactor as methods of remote_target.
8169         (extended_remote_open, extended_remote_detach)
8170         (extended_remote_attach, extended_remote_post_attach):
8171         (extended_remote_supports_disable_randomization)
8172         (extended_remote_create_inferior): : Refactor as method of
8173         extended_remote_target.
8174         (remote_set_permissions, remote_open_1, remote_detach)
8175         (remote_follow_fork, remote_follow_exec, remote_disconnect)
8176         (remote_resume, remote_commit_resume, remote_stop)
8177         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8178         (remote_terminal_ours, remote_wait, remote_fetch_registers)
8179         (remote_prepare_to_store, remote_store_registers)
8180         (remote_flash_erase, remote_flash_done, remote_files_info)
8181         (remote_kill, remote_mourn, remote_insert_breakpoint)
8182         (remote_remove_breakpoint, remote_insert_watchpoint)
8183         (remote_watchpoint_addr_within_range)
8184         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8185         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8186         (remote_supports_stopped_by_sw_breakpoint)
8187         (remote_stopped_by_hw_breakpoint)
8188         (remote_supports_stopped_by_hw_breakpoint)
8189         (remote_stopped_by_watchpoint, remote_stopped_data_address)
8190         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8191         (remote_verify_memory): Refactor as methods of remote_target.
8192         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8193         parameter.
8194         (remote_xfer_partial, remote_get_memory_xfer_limit)
8195         (remote_search_memory, remote_rcmd, remote_memory_map)
8196         (remote_pid_to_str, remote_get_thread_local_address)
8197         (remote_get_tib_address, remote_read_description): Refactor as
8198         methods of remote_target.
8199         (remote_target::fileio_open, remote_target::fileio_pwrite)
8200         (remote_target::fileio_pread, remote_target::fileio_close): New.
8201         (remote_hostio_readlink, remote_hostio_fstat)
8202         (remote_filesystem_is_local, remote_can_execute_reverse)
8203         (remote_supports_non_stop, remote_supports_disable_randomization)
8204         (remote_supports_multi_process, remote_supports_cond_breakpoints)
8205         (remote_supports_enable_disable_tracepoint)
8206         (remote_supports_string_tracing)
8207         (remote_can_run_breakpoint_commands, remote_trace_init)
8208         (remote_download_tracepoint, remote_can_download_tracepoint)
8209         (remote_download_trace_state_variable, remote_enable_tracepoint)
8210         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8211         (remote_trace_start, remote_get_trace_status)
8212         (remote_get_tracepoint_status, remote_trace_stop)
8213         (remote_trace_find, remote_get_trace_state_variable_value)
8214         (remote_save_trace_data, remote_get_raw_trace_data)
8215         (remote_set_disconnected_tracing, remote_core_of_thread)
8216         (remote_set_circular_trace_buffer, remote_traceframe_info)
8217         (remote_get_min_fast_tracepoint_insn_len)
8218         (remote_set_trace_buffer_size, remote_set_trace_notes)
8219         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8220         (remote_disable_btrace, remote_teardown_btrace)
8221         (remote_read_btrace, remote_btrace_conf)
8222         (remote_augmented_libraries_svr4_read, remote_load)
8223         (remote_pid_to_exec_file, remote_can_do_single_step)
8224         (remote_execution_direction, remote_thread_handle_to_thread_info):
8225         Refactor as methods of remote_target.
8226         (init_remote_ops, init_extended_remote_ops): Delete.
8227         (remote_can_async_p, remote_is_async_p, remote_async)
8228         (remote_thread_events, remote_upload_tracepoints)
8229         (remote_upload_trace_state_variables): Refactor as methods of
8230         remote_target.
8231         (_initialize_remote): Remove references to init_remote_ops and
8232         init_extended_remote_ops.
8233
8234         * remote-sim.c (gdbsim_target): New class.
8235         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8236         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8237         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8238         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8239         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8240         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8241         Refactor as methods of gdbsim_target.
8242         (gdbsim_ops): Now a gdbsim_target.
8243         (init_gdbsim_ops): Delete.
8244         (gdbsim_cntrl_c): Adjust.
8245         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8246
8247         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8248         (the_amd64_linux_nat_target): New.
8249         (amd64_linux_fetch_inferior_registers)
8250         (amd64_linux_store_inferior_registers): Refactor as methods of
8251         amd64_linux_nat_target.
8252         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
8253         * i386-linux-nat.c: Don't include "linux-nat.h".
8254         (i386_linux_nat_target): New class.
8255         (the_i386_linux_nat_target): New.
8256         (i386_linux_fetch_inferior_registers)
8257         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8258         as methods of i386_linux_nat_target.
8259         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
8260         * inf-child.c (inf_child_ops): Delete.
8261         (inf_child_fetch_inferior_registers)
8262         (inf_child_store_inferior_registers): Delete.
8263         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8264         methods of inf_child_target.
8265         (inf_child_target::supports_terminal_ours)
8266         (inf_child_target::terminal_init)
8267         (inf_child_target::terminal_inferior)
8268         (inf_child_target::terminal_ours_for_output)
8269         (inf_child_target::terminal_ours, inf_child_target::interrupt)
8270         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8271         New.
8272         (inf_child_open, inf_child_disconnect, inf_child_close)
8273         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8274         (inf_child_post_startup_inferior, inf_child_can_run)
8275         (inf_child_pid_to_exec_file): Refactor as methods of
8276         inf_child_target.
8277         (inf_child_follow_fork): Delete.
8278         (inf_child_target::can_create_inferior)
8279         (inf_child_target::can_attach): New.
8280         (inf_child_target::has_all_memory, inf_child_target::has_memory)
8281         (inf_child_target::has_stack, inf_child_target::has_registers)
8282         (inf_child_target::has_execution): New.
8283         (inf_child_fileio_open, inf_child_fileio_pwrite)
8284         (inf_child_fileio_pread, inf_child_fileio_fstat)
8285         (inf_child_fileio_close, inf_child_fileio_unlink)
8286         (inf_child_fileio_readlink, inf_child_use_agent)
8287         (inf_child_can_use_agent): Refactor as methods of
8288         inf_child_target.
8289         (return_zero, inf_child_target): Delete.
8290         (inf_child_target::inf_child_target): New.
8291         * inf-child.h: Include "target.h".
8292         (inf_child_target): Delete function prototype.
8293         (inf_child_target): New class.
8294         (inf_child_open_target, inf_child_mourn_inferior)
8295         (inf_child_maybe_unpush_target): Delete.
8296         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8297         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8298         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8299         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8300         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8301         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8302         (inf_ptrace_wait, inf_ptrace_xfer_partial)
8303         (inf_ptrace_thread_alive, inf_ptrace_files_info)
8304         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8305         methods of inf_ptrace_target.
8306         (inf_ptrace_target): Delete function.
8307         * inf-ptrace.h: Include "inf-child.h".
8308         (inf_ptrace_target): Delete function declaration.
8309         (inf_ptrace_target): New class.
8310         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8311         * linux-nat.c (linux_target): New.
8312         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8313         (linux_nat_target::~linux_nat_target): New.
8314         (linux_child_post_attach, linux_child_post_startup_inferior)
8315         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8316         (linux_child_remove_fork_catchpoint)
8317         (linux_child_insert_vfork_catchpoint)
8318         (linux_child_remove_vfork_catchpoint)
8319         (linux_child_insert_exec_catchpoint)
8320         (linux_child_remove_exec_catchpoint)
8321         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8322         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8323         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8324         (linux_nat_stopped_data_address)
8325         (linux_nat_stopped_by_sw_breakpoint)
8326         (linux_nat_supports_stopped_by_sw_breakpoint)
8327         (linux_nat_stopped_by_hw_breakpoint)
8328         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8329         (linux_nat_kill, linux_nat_mourn_inferior)
8330         (linux_nat_xfer_partial, linux_nat_thread_alive)
8331         (linux_nat_update_thread_list, linux_nat_pid_to_str)
8332         (linux_nat_thread_name, linux_child_pid_to_exec_file)
8333         (linux_child_static_tracepoint_markers_by_strid)
8334         (linux_nat_is_async_p, linux_nat_can_async_p)
8335         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8336         (linux_nat_supports_multi_process)
8337         (linux_nat_supports_disable_randomization, linux_nat_async)
8338         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8339         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8340         (linux_nat_fileio_open, linux_nat_fileio_readlink)
8341         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8342         methods of linux_nat_target.
8343         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8344         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8345         parameter.
8346         (check_stopped_by_watchpoint): Adjust.
8347         (linux_xfer_partial): Delete.
8348         (linux_target_install_ops, linux_target, linux_nat_add_target):
8349         Delete.
8350         (linux_nat_target::linux_nat_target): New.
8351         * linux-nat.h: Include "inf-ptrace.h".
8352         (linux_nat_target): New.
8353         (linux_target, linux_target_install_ops, linux_nat_add_target):
8354         Delete function declarations.
8355         (linux_target): Declare global.
8356         * linux-thread-db.c (thread_db_target): New.
8357         (thread_db_target::thread_db_target): New.
8358         (thread_db_ops): Delete.
8359         (the_thread_db_target): New.
8360         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8361         (thread_db_update_thread_list, thread_db_pid_to_str)
8362         (thread_db_extra_thread_info)
8363         (thread_db_thread_handle_to_thread_info)
8364         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8365         (thread_db_resume): Refactor as methods of thread_db_target.
8366         (init_thread_db_ops): Delete.
8367         (_initialize_thread_db): Remove reference to init_thread_db_ops.
8368         * x86-linux-nat.c: Don't include "linux-nat.h".
8369         (super_post_startup_inferior): Delete.
8370         (x86_linux_nat_target::~x86_linux_nat_target): New.
8371         (x86_linux_child_post_startup_inferior)
8372         (x86_linux_read_description, x86_linux_enable_btrace)
8373         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8374         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8375         methods of x86_linux_nat_target.
8376         (x86_linux_create_target): Delete.  Bits folded ...
8377         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
8378         pointer.
8379         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8380         (x86_linux_nat_target): New class.
8381         (x86_linux_create_target): Delete.
8382         (x86_linux_add_target): Now takes a linux_nat_target pointer.
8383         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8384         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8385         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8386         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8387         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8388         make extern.
8389         (x86_use_watchpoints): Delete.
8390         * x86-nat.h: Include "breakpoint.h" and "target.h".
8391         (x86_use_watchpoints): Delete.
8392         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8393         (x86_stopped_by_watchpoint, x86_stopped_data_address)
8394         (x86_insert_watchpoint, x86_remove_watchpoint)
8395         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8396         (x86_stopped_by_hw_breakpoint): New declarations.
8397         (x86_nat_target): New template class.
8398
8399         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8400         (the_ppc_linux_nat_target): New.
8401         (ppc_linux_fetch_inferior_registers)
8402         (ppc_linux_can_use_hw_breakpoint)
8403         (ppc_linux_region_ok_for_hw_watchpoint)
8404         (ppc_linux_ranged_break_num_registers)
8405         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8406         (ppc_linux_insert_mask_watchpoint)
8407         (ppc_linux_remove_mask_watchpoint)
8408         (ppc_linux_can_accel_watchpoint_condition)
8409         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8410         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8411         (ppc_linux_watchpoint_addr_within_range)
8412         (ppc_linux_masked_watch_num_registers)
8413         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8414         (ppc_linux_read_description): Refactor as methods of
8415         ppc_linux_nat_target.
8416         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8417
8418         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8419         (procfs_target): New class.
8420         (the_procfs_target): New.
8421         (procfs_target): Delete function.
8422         (procfs_auxv_parse, procfs_attach, procfs_detach)
8423         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8424         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8425         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8426         (procfs_create_inferior, procfs_update_thread_list)
8427         (procfs_thread_alive, procfs_pid_to_str)
8428         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8429         (procfs_stopped_data_address, procfs_insert_watchpoint)
8430         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8431         (proc_find_memory_regions, procfs_info_proc)
8432         (procfs_make_note_section): Refactor as methods of procfs_target.
8433         (_initialize_procfs): Adjust.
8434         * sol-thread.c (sol_thread_target): New class.
8435         (sol_thread_ops): Now a sol_thread_target.
8436         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8437         (sol_thread_fetch_registers, sol_thread_store_registers)
8438         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8439         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8440         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8441         (init_sol_thread_ops): Delete.
8442         (_initialize_sol_thread): Adjust.  Remove references to
8443         init_sol_thread_ops and complete_target_initialization.
8444
8445         * windows-nat.c (windows_nat_target): New class.
8446         (windows_fetch_inferior_registers)
8447         (windows_store_inferior_registers, windows_resume, windows_wait)
8448         (windows_attach, windows_detach, windows_pid_to_exec_file)
8449         (windows_files_info, windows_create_inferior)
8450         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8451         (windows_close, windows_pid_to_str, windows_xfer_partial)
8452         (windows_get_tib_address, windows_get_ada_task_ptid)
8453         (windows_thread_name, windows_thread_alive): Refactor as
8454         windows_nat_target methods.
8455         (do_initial_windows_stuff): Adjust.
8456         (windows_target): Delete function.
8457         (_initialize_windows_nat): Adjust.
8458
8459         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8460         (darwin_mourn_inferior, darwin_kill_inferior)
8461         (darwin_create_inferior, darwin_attach, darwin_detach)
8462         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8463         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8464         (darwin_supports_multi_process): Refactor as darwin_nat_target
8465         methods.
8466         (darwin_resume_to, darwin_files_info): Delete.
8467         (_initialize_darwin_inferior): Rename to ...
8468         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
8469         * darwin-nat.h: Include "inf-child.h".
8470         (darwin_nat_target): New class.
8471         (darwin_complete_target): Delete.
8472         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8473         (darwin_target): New.
8474         (i386_darwin_fetch_inferior_registers)
8475         (i386_darwin_store_inferior_registers): Refactor as methods of
8476         darwin_nat_target.
8477         (darwin_complete_target): Delete, with ...
8478         (_initialize_i386_darwin_nat): ... bits factored out here.
8479
8480         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8481         (the_alpha_linux_nat_target): New.
8482         (alpha_linux_register_u_offset): Refactor as
8483         alpha_linux_nat_target method.
8484         (_initialize_alpha_linux_nat): Adjust.
8485         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8486         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8487         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8488         methods of linux_nat_trad_target.
8489         (linux_trad_target): Delete.
8490         * linux-nat-trad.h (linux_trad_target): Delete function.
8491         (linux_nat_trad_target): New class.
8492         * mips-linux-nat.c (mips_linux_nat_target): New class.
8493         (super_fetch_registers, super_store_registers, super_close):
8494         Delete.
8495         (the_mips_linux_nat_target): New.
8496         (mips64_linux_regsets_fetch_registers)
8497         (mips64_linux_regsets_store_registers)
8498         (mips64_linux_fetch_registers, mips64_linux_store_registers)
8499         (mips_linux_register_u_offset, mips_linux_read_description)
8500         (mips_linux_can_use_hw_breakpoint)
8501         (mips_linux_stopped_by_watchpoint)
8502         (mips_linux_stopped_data_address)
8503         (mips_linux_region_ok_for_hw_watchpoint)
8504         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8505         (mips_linux_close): Refactor as methods of mips_linux_nat.
8506         (_initialize_mips_linux_nat): Adjust to C++ification.
8507
8508         * aix-thread.c (aix_thread_target): New class.
8509         (aix_thread_ops): Now an aix_thread_target.
8510         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8511         (aix_thread_fetch_registers, aix_thread_store_registers)
8512         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8513         (aix_thread_thread_alive, aix_thread_pid_to_str)
8514         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8515         Refactor as methods of aix_thread_target.
8516         (init_aix_thread_ops): Delete.
8517         (_initialize_aix_thread): Remove references to init_aix_thread_ops
8518         and complete_target_initialization.
8519         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8520         (rs6000_nat_target): New class.
8521         (the_rs6000_nat_target): New.
8522         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8523         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8524         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8525         (super_create_inferior): Delete.
8526         (_initialize_rs6000_nat): Adjust to C++ification.
8527
8528         * arm-linux-nat.c (arm_linux_nat_target): New class.
8529         (the_arm_linux_nat_target): New.
8530         (arm_linux_fetch_inferior_registers)
8531         (arm_linux_store_inferior_registers, arm_linux_read_description)
8532         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8533         (arm_linux_remove_hw_breakpoint)
8534         (arm_linux_region_ok_for_hw_watchpoint)
8535         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8536         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8537         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8538         arm_linux_nat_target.
8539         (_initialize_arm_linux_nat): Adjust to C++ification.
8540
8541         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8542         (the_aarch64_linux_nat_target): New.
8543         (aarch64_linux_fetch_inferior_registers)
8544         (aarch64_linux_store_inferior_registers)
8545         (aarch64_linux_child_post_startup_inferior)
8546         (aarch64_linux_read_description)
8547         (aarch64_linux_can_use_hw_breakpoint)
8548         (aarch64_linux_insert_hw_breakpoint)
8549         (aarch64_linux_remove_hw_breakpoint)
8550         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8551         (aarch64_linux_region_ok_for_hw_watchpoint)
8552         (aarch64_linux_stopped_data_address)
8553         (aarch64_linux_stopped_by_watchpoint)
8554         (aarch64_linux_watchpoint_addr_within_range)
8555         (aarch64_linux_can_do_single_step): Refactor as methods of
8556         aarch64_linux_nat_target.
8557         (super_post_startup_inferior): Delete.
8558         (_initialize_aarch64_linux_nat): Adjust to C++ification.
8559
8560         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8561         (the_hppa_linux_nat_target): New.
8562         (hppa_linux_fetch_inferior_registers)
8563         (hppa_linux_store_inferior_registers): Refactor as methods of
8564         hppa_linux_nat_target.
8565         (_initialize_hppa_linux_nat): Adjust to C++ification.
8566
8567         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8568         (the_ia64_linux_nat_target): New.
8569         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8570         (ia64_linux_stopped_data_address)
8571         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8572         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8573         ia64_linux_nat_target methods.
8574         (super_xfer_partial): Delete.
8575         (_initialize_ia64_linux_nat): Adjust to C++ification.
8576
8577         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8578         (the_m32r_linux_nat_target): New.
8579         (m32r_linux_fetch_inferior_registers)
8580         (m32r_linux_store_inferior_registers): Refactor as
8581         m32r_linux_nat_target methods.
8582         (_initialize_m32r_linux_nat): Adjust to C++ification.
8583
8584         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8585         (the_m68k_linux_nat_target): New.
8586         (m68k_linux_fetch_inferior_registers)
8587         (m68k_linux_store_inferior_registers): Refactor as
8588         m68k_linux_nat_target methods.
8589         (_initialize_m68k_linux_nat): Adjust to C++ification.
8590
8591         * s390-linux-nat.c (s390_linux_nat_target): New class.
8592         (the_s390_linux_nat_target): New.
8593         (s390_linux_fetch_inferior_registers)
8594         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8595         (s390_insert_watchpoint, s390_remove_watchpoint)
8596         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8597         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8598         (s390_auxv_parse, s390_read_description): Refactor as methods of
8599         s390_linux_nat_target.
8600         (_initialize_s390_nat): Adjust to C++ification.
8601
8602         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8603         (the_sparc_linux_nat_target): New.
8604         (_initialize_sparc_linux_nat): Adjust to C++ification.
8605         * sparc-nat.c (sparc_fetch_inferior_registers)
8606         (sparc_store_inferior_registers): Remove target_ops parameter.
8607         * sparc-nat.h (sparc_fetch_inferior_registers)
8608         (sparc_store_inferior_registers): Remove target_ops parameter.
8609         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8610         (the_sparc64_linux_nat_target): New.
8611         (_initialize_sparc64_linux_nat): Adjust to C++ification.
8612
8613         * spu-linux-nat.c (spu_linux_nat_target): New class.
8614         (the_spu_linux_nat_target): New.
8615         (spu_child_post_startup_inferior, spu_child_post_attach)
8616         (spu_child_wait, spu_fetch_inferior_registers)
8617         (spu_store_inferior_registers, spu_xfer_partial)
8618         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8619         methods.
8620         (_initialize_spu_nat): Adjust to C++ification.
8621
8622         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8623         (the_tilegx_linux_nat_target): New.
8624         (fetch_inferior_registers, store_inferior_registers):
8625         Refactor as methods.
8626         (_initialize_tile_linux_nat): Adjust to C++ification.
8627
8628         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8629         (the_xtensa_linux_nat_target): New.
8630         (xtensa_linux_fetch_inferior_registers)
8631         (xtensa_linux_store_inferior_registers): Refactor as
8632         xtensa_linux_nat_target methods.
8633         (_initialize_xtensa_linux_nat): Adjust to C++ification.
8634
8635         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8636         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8637         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8638         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8639         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8640         (fbsd_stopped_by_sw_breakpoint)
8641         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8642         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8643         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8644         (fbsd_post_startup_inferior, fbsd_post_attach)
8645         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8646         (fbsd_set_syscall_catchpoint)
8647         (super_xfer_partial, super_resume, super_wait)
8648         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8649         (fbsd_handle_debug_trap): Remove target_ops parameter.
8650         (fbsd_nat_add_target): Delete.
8651         * fbsd-nat.h: Include "inf-ptrace.h".
8652         (fbsd_nat_add_target): Delete.
8653         (USE_SIGTRAP_SIGINFO): Define.
8654         (fbsd_nat_target): New class.
8655
8656         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8657         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8658         (amd64bsd_target): Delete.
8659         * amd64-bsd-nat.h: New file.
8660         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8661         "x86-bsd-nat.h".
8662         (amd64_fbsd_nat_target): New class.
8663         (the_amd64_fbsd_nat_target): New.
8664         (amd64fbsd_read_description): Refactor as method of
8665         amd64_fbsd_nat_target.
8666         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8667         (_initialize_amd64fbsd_nat): Adjust to C++ification.
8668         * amd64-nat.h (amd64bsd_target): Delete function declaration.
8669         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8670         (i386bsd_store_inferior_registers): Remove target_ops parameter.
8671         (i386bsd_target): Delete.
8672         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8673         (i386bsd_fetch_inferior_registers)
8674         (i386bsd_store_inferior_registers): Declare.
8675         (i386_bsd_nat_target): New class.
8676         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8677         (the_i386_fbsd_nat_target): New.
8678         (i386fbsd_resume, i386fbsd_read_description): Refactor as
8679         i386_fbsd_nat_target methods.
8680         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8681         (_initialize_i386fbsd_nat): Adjust to C++ification.
8682         * x86-bsd-nat.c (super_mourn_inferior): Delete.
8683         (x86bsd_mourn_inferior, x86bsd_target): Delete.
8684         (_initialize_x86_bsd_nat): Adjust to C++ification.
8685         * x86-bsd-nat.h: Include "x86-nat.h".
8686         (x86bsd_target): Delete declaration.
8687         (x86bsd_nat_target): New class.
8688
8689         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8690         (the_aarch64_fbsd_nat_target): New.
8691         (aarch64_fbsd_fetch_inferior_registers)
8692         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8693         aarch64_fbsd_nat_target.
8694         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8695         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8696         (the_alpha_bsd_nat_target): New.
8697         (alphabsd_fetch_inferior_registers)
8698         (alphabsd_store_inferior_registers): Refactor as
8699         alpha_bsd_nat_target methods.
8700         (_initialize_alphabsd_nat): Refactor as methods of
8701         alpha_bsd_nat_target.
8702         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8703         (the_amd64_nbsd_nat_target): New.
8704         (_initialize_amd64nbsd_nat): Adjust to C++ification.
8705         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8706         (the_amd64_obsd_nat_target): New.
8707         (_initialize_amd64obsd_nat): Adjust to C++ification.
8708         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8709         (the_arm_fbsd_nat_target): New.
8710         (arm_fbsd_fetch_inferior_registers)
8711         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8712         (_initialize_arm_fbsd_nat): Refactor as methods of
8713         arm_fbsd_nat_target.
8714         (_initialize_arm_fbsd_nat): Adjust to C++ification.
8715         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8716         (the_arm_netbsd_nat_target): New.
8717         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8718         arm_netbsd_nat_target.
8719         (_initialize_arm_netbsd_nat): Adjust to C++ification.
8720         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8721         (the_hppa_nbsd_nat_target): New.
8722         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8723         hppa_nbsd_nat_target methods.
8724         (_initialize_hppanbsd_nat): Adjust to C++ification.
8725         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8726         (the_hppa_obsd_nat_target): New.
8727         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8728         methods of hppa_obsd_nat_target.
8729         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
8730         add_target.
8731         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8732         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
8733         add_target.
8734         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8735         (_initialize_i386obsd_nat): Use add_target.
8736         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8737         (the_m68k_bsd_nat_target): New.
8738         (m68kbsd_fetch_inferior_registers)
8739         (m68kbsd_store_inferior_registers): Refactor as methods of
8740         m68k_bsd_nat_target.
8741         (_initialize_m68kbsd_nat): Adjust to C++ification.
8742         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8743         (the_mips_fbsd_nat_target): New.
8744         (mips_fbsd_fetch_inferior_registers)
8745         (mips_fbsd_store_inferior_registers): Refactor as methods of
8746         mips_fbsd_nat_target.
8747         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
8748         add_target.
8749         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8750         (the_mips_nbsd_nat_target): New.
8751         (mipsnbsd_fetch_inferior_registers)
8752         (mipsnbsd_store_inferior_registers): Refactor as methods of
8753         mips_nbsd_nat_target.
8754         (_initialize_mipsnbsd_nat): Adjust to C++ification.
8755         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8756         (the_mips64_obsd_nat_target): New.
8757         (mips64obsd_fetch_inferior_registers)
8758         (mips64obsd_store_inferior_registers): Refactor as methods of
8759         mips64_obsd_nat_target.
8760         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
8761         add_target.
8762         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8763         nbsd_nat_target.
8764         * nbsd-nat.h: Include "inf-ptrace.h".
8765         (nbsd_nat_target): New class.
8766         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8767         (obsd_wait): Refactor as methods of obsd_nat_target.
8768         (obsd_add_target): Delete.
8769         * obsd-nat.h: Include "inf-ptrace.h".
8770         (obsd_nat_target): New class.
8771         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8772         (the_ppc_fbsd_nat_target): New.
8773         (ppcfbsd_fetch_inferior_registers)
8774         (ppcfbsd_store_inferior_registers): Refactor as methods of
8775         ppc_fbsd_nat_target.
8776         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
8777         add_target.
8778         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8779         (the_ppc_nbsd_nat_target): New.
8780         (ppcnbsd_fetch_inferior_registers)
8781         (ppcnbsd_store_inferior_registers): Refactor as methods of
8782         ppc_nbsd_nat_target.
8783         (_initialize_ppcnbsd_nat): Adjust to C++ification.
8784         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8785         (the_ppc_obsd_nat_target): New.
8786         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8787         methods of ppc_obsd_nat_target.
8788         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
8789         add_target.
8790         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8791         (the_sh_nbsd_nat_target): New.
8792         (shnbsd_fetch_inferior_registers)
8793         (shnbsd_store_inferior_registers): Refactor as methods of
8794         sh_nbsd_nat_target.
8795         (_initialize_shnbsd_nat): Adjust to C++ification.
8796         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8797         (inf_ptrace_xfer_partial): Delete.
8798         (sparc_xfer_partial, sparc_target): Delete.
8799         * sparc-nat.h (sparc_fetch_inferior_registers)
8800         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8801         (sparc_target): Delete function declaration.
8802         (sparc_target): New template class.
8803         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8804         (_initialize_sparcnbsd_nat): Adjust to C++ification.
8805         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8806         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
8807         add_target.
8808         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8809         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8810         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8811         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
8812         add_target.
8813         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8814         (the_vax_bsd_nat_target): New.
8815         (vaxbsd_fetch_inferior_registers)
8816         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8817         methods.
8818         (_initialize_vaxbsd_nat): Adjust to C++ification.
8819
8820         * bsd-kvm.c (bsd_kvm_target): New class.
8821         (bsd_kvm_ops): Now a bsd_kvm_target.
8822         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8823         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8824         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8825         bsd_kvm_target.
8826         (bsd_kvm_return_one): Delete.
8827         (bsd_kvm_add_target): Adjust to C++ification.
8828
8829         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8830         (nto_procfs_target_procfs): New classes.
8831         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8832         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8833         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8834         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8835         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8836         (procfs_remove_hw_breakpoint, procfs_resume)
8837         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8838         (procfs_kill_inferior, procfs_store_registers)
8839         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8840         as methods of nto_procfs_target.
8841         (nto_procfs_ops): Now an nto_procfs_target_procfs.
8842         (nto_native_ops): Delete.
8843         (procfs_open, procfs_native_open): Delete.
8844         (nto_native_ops): Now an nto_procfs_target_native.
8845         (init_procfs_targets): Adjust to C++ification.
8846         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8847         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8848         Refactor as methods of nto_procfs_target.
8849
8850         * go32-nat.c (go32_nat_target): New class.
8851         (the_go32_nat_target): New.
8852         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8853         (go32_store_registers, go32_xfer_partial, go32_files_info)
8854         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8855         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8856         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8857         (go32_pid_to_str): Refactor as methods of go32_nat_target.
8858         (go32_target): Delete.
8859         (_initialize_go32_nat): Adjust to C++ification.
8860
8861         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8862         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8863         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8864         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8865         gnu_nat_target.
8866         (gnu_target): Delete.
8867         * gnu-nat.h (gnu_target): Delete.
8868         (gnu_nat_target): New class.
8869         * i386-gnu-nat.c (gnu_base_target): New.
8870         (i386_gnu_nat_target): New class.
8871         (the_i386_gnu_nat_target): New.
8872         (_initialize_i386gnu_nat): Adjust to C++ification.
8873
8874 2018-05-02  Pedro Alves  <palves@redhat.com>
8875
8876         * bfd-target.c (target_bfd_xclose): Rename to ...
8877         (target_bfd_close): ... this.
8878         (target_bfd_reopen): Adjust.
8879         * target.c (target_close): Remove references to to_xclose.
8880         * target.h (target_ops::to_xclose): Delete.
8881         (target_ops::to_close): Update comments.
8882
8883 2018-05-02  Pedro Alves  <palves@redhat.com>
8884
8885         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
8886         "linux-nat.h".
8887         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
8888         * inf-ptrace.c (inf_ptrace_register_u_offset)
8889         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8890         (inf_ptrace_store_register, inf_ptrace_store_registers)
8891         (inf_ptrace_trad_target): Move to ...
8892         * linux-nat-trad.c: ... this new file.
8893         * linux-nat-trad.h: New file.
8894         * linux-nat.c (linux_target_install_ops): Make extern.
8895         (linux_trad_target): Delete.
8896         * linux-nat.h (linux_trad_target): Delete declaration.
8897         (linux_target_install_ops): Declare.
8898         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
8899         "linux-nat.h".
8900
8901 2018-05-02  Pedro Alves  <palves@redhat.com>
8902
8903         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8904         procfs_target/add_target here.
8905         * procfs.c (procfs_target): Make static.
8906         (_initialize_procfs): Call add_target here.
8907         * procfs.h (struct target_ops): Remove forward declaration.
8908         (procfs_target): Remove declaration.
8909         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8910
8911 2018-05-02  Pedro Alves  <palves@redhat.com>
8912
8913         * procfs.c (procfs_stopped_by_watchpoint)
8914         (procfs_insert_watchpoint, procfs_remove_watchpoint)
8915         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8916         Forward declare.
8917         (procfs_use_watchpoints): Delete, move contents...
8918         (procfs_target): ... here.
8919         * procfs.h (procfs_use_watchpoints): Delete declaration.
8920         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8921         procfs_use_watchpoints.
8922         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8923         procfs_use_watchpoints.
8924
8925 2018-05-02  Tom Tromey  <tom@tromey.com>
8926
8927         PR python/20084:
8928         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8929         and var_zuinteger_unlimited.
8930         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8931         and PARAM_ZUINTEGER_UNLIMITED.
8932         (set_parameter_value): Handle var_zuinteger and
8933         var_zuinteger_unlimited.
8934         (add_setshow_generic): Likewise.
8935         (parmpy_init): Likewise.
8936
8937 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
8938
8939         PR rust/23124
8940         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8941         pointer is not null before dereferencing it.
8942
8943 2018-04-30  Tom Tromey  <tom@tromey.com>
8944
8945         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8946         is_mi_like_p.
8947
8948 2018-04-30  Tom Tromey  <tom@tromey.com>
8949
8950         * breakpoint.c (mention): Remove use of is_mi_like_p.
8951         (print_mention_ranged_breakpoint): Likewise.
8952         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8953         of is_mi_like_p.
8954
8955 2018-04-30  Tom Tromey  <tom@tromey.com>
8956
8957         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8958
8959 2018-04-30  Tom Tromey  <tom@tromey.com>
8960
8961         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8962         (info_spu_event_command): Remove some uses of is_mi_like_p.
8963
8964 2018-04-30  Tom Tromey  <tom@tromey.com>
8965
8966         * python/py-framefilter.c (py_print_single_arg)
8967         (enumerate_locals, py_print_args, py_print_frame): Remove some
8968         uses of is_mi_like_p.
8969
8970 2018-04-30  Tom Tromey  <tom@tromey.com>
8971
8972         * ui-out.c: Update.
8973         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8974         * ui-out.h (ui_out::is_mi_like_p): Now const.
8975         (ui_out::do_is_mi_like_p): Now const.
8976         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8977
8978 2018-04-30  Tom Tromey  <tom@tromey.com>
8979
8980         * varobj.c (varobj_set_visualizer): Use new_reference.
8981         * python/python.c (gdbpy_decode_line): Use new_reference.
8982         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8983         new_reference.
8984
8985 2018-04-30  Tom Tromey  <tom@tromey.com>
8986
8987         * varobj.c (install_new_value): Use new_reference.
8988         * value.h (value_incref): Return void.  Swap intro comment with
8989         value_decref.
8990         * value.c (set_value_parent): Use new_reference.
8991         (value_incref): Return void.  Update intro comment.
8992         (release_value): Use new_reference.
8993         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8994
8995 2018-04-30  Tom Tromey  <tom@tromey.com>
8996
8997         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8998         * gdb_bfd.h (new_bfd_ref): Remove.
8999         (gdb_bfd_open): Update comment.
9000         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9001         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9002         (gdb_bfd_fdopenr): Use new_reference.
9003         * exec.c (exec_file_attach): Use new_reference.
9004
9005 2018-04-30  Tom Tromey  <tom@tromey.com>
9006
9007         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9008         method.
9009
9010 2018-04-30  Tom Tromey  <tom@tromey.com>
9011
9012         * jit.c (jit_read_code_entry): Use type_align.
9013         * i386-tdep.c (i386_gdbarch_init): Don't call
9014         set_gdbarch_long_long_align_bit.
9015         * gdbarch.sh: Remove long_long_align_bit.
9016         * gdbarch.c, gdbarch.h: Rebuild.
9017         * arc-tdep.c (arc_type_align): New function.
9018         (arc_gdbarch_init): Use arc_type_align.  Don't call
9019         set_gdbarch_long_long_align_bit.
9020
9021 2018-04-30  Tom Tromey  <tom@tromey.com>
9022
9023         * rust-lang.c (rust_type_alignment): Remove.
9024         (rust_composite_type): Use type_align.
9025
9026 2018-04-30  Tom Tromey  <tom@tromey.com>
9027
9028         * NEWS: Mention Type.align.
9029         * python/py-type.c (typy_get_alignof): New function.
9030         (type_object_getset): Add "alignof".
9031
9032 2018-04-30  Tom Tromey  <tom@tromey.com>
9033
9034         PR exp/17095:
9035         * NEWS: Update.
9036         * std-operator.def (UNOP_ALIGNOF): New operator.
9037         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9038         New.
9039         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9040         * c-lang.c (c_op_print_tab): Add alignof.
9041         * c-exp.y (ALIGNOF): New token.
9042         (exp): Add "ALIGNOF" production.
9043         (ident_tokens): Add _Alignof and alignof.
9044
9045 2018-04-30  Tom Tromey  <tom@tromey.com>
9046
9047         * i386-tdep.c (i386_type_align): New function.
9048         (i386_gdbarch_init): Update.
9049         * gdbarch.sh (type_align): New method.
9050         * gdbarch.c, gdbarch.h: Rebuild.
9051         * arch-utils.h (default_type_align): Declare.
9052         * arch-utils.c (default_type_align): New function.
9053         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9054         (struct type) <align_log2>: New field.
9055         <instance_flags>: Now a bitfield.
9056         (TYPE_RAW_ALIGN): New macro.
9057         (type_align, type_raw_align, set_type_align): Declare.
9058         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9059         functions.
9060         * dwarf2read.c (quirk_rust_enum): Set type alignment.
9061         (get_alignment, maybe_set_alignment): New functions.
9062         (read_structure_type, read_enumeration_type, read_array_type)
9063         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9064         (read_subrange_type, read_base_type): Set type alignment.
9065
9066 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
9067
9068         * dwarf2read.c (read_index_from_section): Use bool.
9069
9070 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
9071
9072         PR gdb/22950
9073         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9074         with #ifdef.
9075
9076 2018-04-29  John Reiser  <jreiser@BitWagon.com>
9077
9078         PR build/22873
9079         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9080         last step, and do it atomically.
9081
9082 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
9083
9084         * compile/compile-c-types.c (convert_int, convert_float):
9085         Update for C FE v1.
9086
9087 2018-04-27  Tom Tromey  <tom@tromey.com>
9088
9089         PR rust/22545:
9090         * rust-lang.c (rust_inclusive_range_type_p): New function.
9091         (rust_range): Handle inclusive ranges.
9092         (rust_compute_range): Likewise.
9093         * rust-exp.y (struct rust_op) <inclusive>: New field.
9094         (DOTDOTEQ): New constant.
9095         (range_expr): Add "..=" productions.
9096         (operator_tokens): Add "..=" token.
9097         (ast_range): Add "inclusive" parameter.
9098         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9099         ranges.
9100         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9101         bounds values.
9102         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9103         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9104         Update comments.
9105         * expprint.c (print_subexp_standard): Handle new bounds values.
9106         (dump_subexp_body_standard): Likewise.
9107
9108 2018-04-27  Tom Tromey  <tom@tromey.com>
9109
9110         * configure: Rebuild.
9111         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9112         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9113         "OVERRIDE".
9114         (class symbol_needs_eval_context): Likewise.
9115         * dwarf2read.c (mock_mapped_index::symbol_name_count)
9116         (mock_mapped_index::symbol_name_at): Use "override".  Remove
9117         "virtual".
9118         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9119         "override".
9120         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9121         * aarch64-tdep.c (instruction_reader::read): Use "override".
9122         (instruction_reader_test::read): Likewise.
9123         * arm-tdep.c (instruction_reader::read): Use "override".
9124         (instruction_reader_thumb::read): Likewise.
9125
9126 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
9127
9128         PR remote/9665
9129         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9130         instead of remote_send.
9131         (remote_send): Remove.
9132
9133 2018-04-26  Pedro Alves  <palves@redhat.com>
9134
9135         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9136         find_function_start_sal instead of find_pc_line.
9137
9138 2018-04-26  Pedro Alves  <palves@redhat.com>
9139
9140         * breakpoint.c (set_breakpoint_location_function): Handle
9141         mst_data_gnu_ifunc.
9142         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9143         * elfread.c (elf_symtab_read): Give data symbols with
9144         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9145         (elf_rel_plt_read): Update comment.
9146         * linespec.c (convert_linespec_to_sals): Handle
9147         mst_data_gnu_ifunc.
9148         (minsym_found): Handle mst_data_gnu_ifunc.
9149         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9150         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9151         * parse.c (find_minsym_type_and_address): Handle
9152         mst_data_gnu_ifunc.
9153         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9154         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9155         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9156         comment.
9157         <mst_data_gnu_ifunc>: New enumerator.
9158
9159 2018-04-26  Pedro Alves  <palves@redhat.com>
9160
9161         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9162         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
9163         'want_trampoline' parameter by a lookup_msym_prefer parameter.
9164         Handle it.
9165         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9166         (lookup_minimal_symbol_by_pc): Adjust.
9167         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9168         (lookup_solib_trampoline_symbol_by_pc): Adjust.
9169         * minsyms.h (lookup_msym_prefer): New enum.
9170         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9171         parameter by a lookup_msym_prefer parameter.
9172
9173 2018-04-26  Pedro Alves  <palves@redhat.com>
9174
9175         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9176         ends in "@plt" instead of looking at the symbol's section.
9177
9178 2018-04-26  Pedro Alves  <palves@redhat.com>
9179
9180         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
9181         all references.
9182         (find_pc_partial_function_gnu_ifunc): Rename to ...
9183         (find_pc_partial_function): ... this, and remove references to
9184         'is_gnu_ifunc_p'.
9185         (find_pc_partial_function): Delete old implementation.
9186         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9187
9188 2018-04-26  Pedro Alves  <palves@redhat.com>
9189
9190         * linespec.c (struct bound_minimal_symbol_search_key): New.
9191         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
9192         skip first line if we found a GNU ifunc minimal symbol by name.
9193         (compare_msymbols): Change parameters to work with a destructured
9194         lhs minsym.
9195         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9196         functions.
9197
9198 2018-04-26  Pedro Alves  <palves@redhat.com>
9199
9200         * breakpoint.c (set_breakpoint_location_function): Don't resolve
9201         ifunc targets here.  Instead, if we have an ifunc minsym, use its
9202         address/name.
9203         (add_location_to_breakpoint): Store the minsym and the objfile in
9204         the breakpoint location.
9205         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9206         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9207         Record the minsym in the sal.
9208         * symtab.h (symtab_and_line) <msymbol>: New field.
9209
9210 2018-04-26  Pedro Alves  <palves@redhat.com>
9211
9212         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9213         unless we actually resolved the ifunc.
9214
9215 2018-04-26  Pedro Alves  <palves@redhat.com>
9216
9217         * c-exp.y (variable production): Prefer ifunc minsyms over
9218         regular function symbols.
9219         * symtab.c (find_gnu_ifunc): New function.
9220         * minsyms.h (lookup_msym_prefer): New enum.
9221         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9222         parameter by a lookup_msym_prefer parameter.
9223         * symtab.h (find_gnu_ifunc): New declaration.
9224
9225 2018-04-26  Pedro Alves  <palves@redhat.com>
9226
9227         * blockframe.c (find_gnu_ifunc_target_type): New function.
9228         (find_function_type): New.
9229         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9230         return a value with a memory address.
9231         (eval_call): For calls to GNU ifunc functions, try to find the
9232         type of the target function from the type that the resolver
9233         returns.
9234         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9235         symbols.
9236         * infcall.c (find_function_return_type): Delete.
9237         (find_function_addr): Add 'function_type' parameter.  For calls to
9238         GNU ifunc functions, try to find the type of the target function
9239         from the type that the resolver returns, and return it via
9240         FUNCTION_TYPE.
9241         (call_function_by_hand_dummy): Adjust to use the function type
9242         returned by find_function_addr.
9243         (find_function_addr): Add 'function_type' parameter and move
9244         description here.
9245         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9246         declarations.
9247
9248 2018-04-26  Pedro Alves  <palves@redhat.com>
9249
9250         * c-exp.y (variable production): Skip finding an alias for ifunc
9251         symbols.
9252
9253 2018-04-26  Pedro Alves  <palves@redhat.com>
9254
9255         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9256
9257 2018-04-25  Pedro Alves  <palves@redhat.com>
9258
9259         * infcmd.c (kill_command): Print the pid as string, not the whole
9260         thread's ptid.  Add comment.  s/has been killed/killed/ in output
9261         message.
9262         * remote.c (remote_detach_1): Print the pid as string, not the
9263         whole thread's ptid.
9264
9265 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9266             Sergio Durigan Junior  <sergiodj@redhat.com>
9267             Pedro Alves  <palves@redhat.com>
9268
9269         * infcmd.c (kill_command): Print message when inferior has
9270         been killed.
9271         * inferior.c (print_inferior_events): Remove 'static'.  Set as
9272         '1'.
9273         (add_inferior): Improve message printed when
9274         'print_inferior_events' is on.
9275         (exit_inferior): Remove message printed when
9276         'print_inferior_events' is on.
9277         (detach_inferior): Improve message printed when
9278         'print_inferior_events' is on.
9279         (initialize_inferiors): Use 'add_inferior_silent' to set
9280         'current_inferior_'.
9281         * inferior.h (print_inferior_events): Declare here as
9282         'extern'.
9283         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9284         '[Detaching...]' messages when 'print_inferior_events' is on.
9285         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
9286         as prefix/suffix for messages.  Remove periods.  Fix erroneous
9287         'Detaching after fork from child...', replace it by '... from
9288         parent...'.
9289         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9290         prefix/suffix when printing 'Detaching...' messages.  Print
9291         them when 'print_inferior_events' is on.
9292         * remote.c (remote_detach_1): Print message when detaching
9293         from inferior and '!is_fork_parent'.
9294
9295 2018-04-24  Tom Tromey  <tom@tromey.com>
9296
9297         * cli-out.h: Reindent.
9298
9299 2018-04-24  Tom Tromey  <tom@tromey.com>
9300
9301         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9302         (cli_ui_out::do_field_string): Use fputs_filtered.
9303         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9304
9305 2018-04-23  Tom Tromey  <tom@tromey.com>
9306
9307         * guile/scm-frame.c (gdbscm_frame_read_var): Use
9308         gdb::unique_xmalloc_ptr.
9309
9310 2018-04-23  Tom Tromey  <tom@tromey.com>
9311
9312         * configure: Rebuild.
9313
9314 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
9315
9316         PR gdb/23095
9317         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9318         prepare_for_testing.  Set normal_bp to r_debug_state if target
9319         is bsd.
9320
9321 2018-04-21  Pedro Alves  <palves@redhat.com>
9322             Rajendra SY  <rajendra.sy@gmail.com>
9323
9324         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9325         * remote.c (extended_remote_attach): In all-stop mode, mark the
9326         thread as executing.
9327
9328 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9329
9330         * thread.c (thread_apply_all_command): Fix comment.
9331         (thread_command): Fix comment.
9332
9333 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
9334
9335         * common/tdesc.h (tdesc_create_feature): Remove xml filename
9336         parameter.
9337         * features/aarch64-core.c (create_feature_aarch64_core):
9338         Regenerate.
9339         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9340         Likewise.
9341         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9342         Likewise.
9343         * features/i386/32bit-avx512.c
9344         (create_feature_i386_32bit_avx512): Likewise.
9345         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9346         Likewise.
9347         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9348         Likewise.
9349         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9350         Likewise.
9351         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9352         Likewise.
9353         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9354         Likewise.
9355         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9356         Likewise.
9357         * features/i386/64bit-avx512.c
9358         (create_feature_i386_64bit_avx512): Likewise.
9359         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9360         Likewise.
9361         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9362         Likewise.
9363         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9364         Likewise.
9365         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9366         Likewise.
9367         * features/i386/64bit-segments.c
9368         (create_feature_i386_64bit_segments): Likewise.
9369         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9370         Likewise.
9371         * features/i386/x32-core.c
9372         (create_feature_i386_x32_core): Likewise.
9373         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9374         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9375         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9376         * target-descriptions.c: In generated code, don't pass xml
9377         filename.
9378
9379 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9380
9381         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9382         (print_xml_feature::visit_post): Likewise.
9383         (print_xml_feature::visit): Likewise.
9384         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9385         (print_xml_feature): Add new class.
9386         * regformats/regdat.sh: Null xmltarget on feature targets.
9387         * target-descriptions.c (struct target_desc): Add xmltarget.
9388         (maintenance_check_tdesc_xml_convert): Add unittest function.
9389         (tdesc_get_features_xml): Add function to get xml.
9390         (maintenance_check_xml_descriptions): Test xml generation.
9391         * xml-tdesc.c (string_read_description_xml): Add function.
9392         * xml-tdesc.h (string_read_description_xml): Add declaration.
9393
9394 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9395
9396         * features/Makefile: Add feature marker to targets with new style
9397         target descriptions.
9398         * regformats/aarch64.dat: Regenerate.
9399         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9400         * regformats/i386/amd64-avx-linux.dat: Likewise.
9401         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9402         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9403         * regformats/i386/amd64-linux.dat: Likewise.
9404         * regformats/i386/amd64-mpx-linux.dat: Likewise.
9405         * regformats/i386/amd64.dat: Likewise.
9406         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9407         * regformats/i386/i386-avx-linux.dat: Likewise.
9408         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9409         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9410         * regformats/i386/i386-linux.dat: Likewise.
9411         * regformats/i386/i386-mmx-linux.dat: Likewise.
9412         * regformats/i386/i386-mpx-linux.dat: Likewise.
9413         * regformats/i386/i386.dat: Likewise.
9414         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9415         * regformats/i386/x32-avx-linux.dat: Likewise.
9416         * regformats/i386/x32-linux.dat: Likewise.
9417         * regformats/tic6x-c62x-linux.dat: Likewise.
9418         * regformats/tic6x-c64x-linux.dat: Likewise.
9419         * regformats/tic6x-c64xp-linux.dat: Likewise.
9420         * regformats/regdat.sh: Parse feature marker.
9421
9422 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9423
9424         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9425         (tdesc_osabi_name): Likewise.
9426         * target-descriptions.c (tdesc_architecture_name): Add new
9427         function.
9428         (tdesc_osabi_name): Likewise.
9429
9430 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9431
9432         * common/tdesc.c (tdesc_predefined_type): Move to here.
9433         (tdesc_named_type): Likewise.
9434         (tdesc_create_vector): Likewise.
9435         (tdesc_create_struct): Likewise.
9436         (tdesc_set_struct_size): Likewise.
9437         (tdesc_create_union): Likewise.
9438         (tdesc_create_flags): Likewise.
9439         (tdesc_create_enum): Likewise.
9440         (tdesc_add_field): Likewise.
9441         (tdesc_add_typed_bitfield): Likewise.
9442         (tdesc_add_bitfield): Likewise.
9443         (tdesc_add_flag): Likewise.
9444         (tdesc_add_enum_value): Likewise.
9445         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9446         (struct tdesc_type_vector): Likewise.
9447         (struct tdesc_type_field): Likewise.
9448         (struct tdesc_type_with_fields): Likewise.
9449         (tdesc_create_enum): Add declaration.
9450         (tdesc_add_typed_bitfield): Likewise.
9451         (tdesc_add_enum_value): Likewise.
9452         * target-descriptions.c (tdesc_type_field): Move from here.
9453         (tdesc_type_builtin): Likewise.
9454         (tdesc_type_vector): Likewise.
9455         (tdesc_type_with_fields): Likewise.
9456         (tdesc_predefined_types): Likewise.
9457         (tdesc_named_type): Likewise.
9458         (tdesc_create_vector): Likewise.
9459         (tdesc_create_struct): Likewise.
9460         (tdesc_set_struct_size): Likewise.
9461         (tdesc_create_union): Likewise.
9462         (tdesc_create_flags): Likewise.
9463         (tdesc_create_enum): Likewise.
9464         (tdesc_add_field): Likewise.
9465         (tdesc_add_typed_bitfield): Likewise.
9466         (tdesc_add_bitfield): Likewise.
9467         (tdesc_add_flag): Likewise.
9468         (tdesc_add_enum_value): Likewise.
9469         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9470         (tdesc_add_typed_bitfield): Likewise.
9471         (tdesc_add_enum_value): Likewise.
9472
9473 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9474
9475         * common/tdesc.c (tdesc_feature::accept): Move to here.
9476         (tdesc_feature::operator==): Likewise.
9477         (tdesc_create_reg): Likewise.
9478         * common/tdesc.h (tdesc_type_kind): Likewise.
9479         (struct tdesc_type): Likewise.
9480         (struct tdesc_feature): Likewise.
9481         * regformats/regdat.sh: Create a feature.
9482         * target-descriptions.c (tdesc_type_kind): Move from here.
9483         (tdesc_type): Likewise.
9484         (tdesc_type_up): Likewise.
9485         (tdesc_feature): Likewise.
9486         (tdesc_create_reg): Likewise.
9487
9488 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9489
9490         * Makefile.in: Add arch/tdesc.c
9491         * common/tdesc.c: New file.
9492         * common/tdesc.h (tdesc_element_visitor): Move to here.
9493         (tdesc_element): Likewise.
9494         (tdesc_reg): Likewise.
9495         (tdesc_reg_up): Likewise.
9496         * regformats/regdef.h (reg): Add offset to constructors.
9497         * target-descriptions.c (tdesc_element_visitor): Move from here.
9498         (tdesc_element): Likewise.
9499         (tdesc_reg): Likewise.
9500         (tdesc_reg_up): Likewise.
9501
9502 2018-04-17  Tom Tromey  <tom@tromey.com>
9503
9504         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9505         discriminant field.
9506
9507 2018-04-17  Tom Tromey  <tom@tromey.com>
9508
9509         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9510
9511 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9512
9513         * symtab.c (print_symbol_info): Skip printing filename and line
9514         number when `last' is NULL.
9515         (symtab_symbol_info): Use empty string instead of NULL for first
9516         invocation of print_symbol_info.
9517         (rbreak_command): Pass NULL to `last' parameter of
9518         print_symbol_info.
9519
9520 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
9521
9522         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9523         instead of nullptr.
9524
9525 2018-04-16  Pedro Alves  <palves@redhat.com>
9526
9527         * MAINTAINERS (sh): Remove.
9528         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9529         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9530         (ALLDEPFILES): Remove sh64-tdep.c.
9531         * NEWS: Mentions that support for SH-5/SH64 is removed.
9532         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9533         (sh*-*-openbsd*): Ditto.
9534         (sh64-*-elf*): Remove.
9535         (sh*): Remove.
9536         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9537         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9538         * sh-tdep.c: No longer include "sh64-tdep.h".
9539         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9540         * sh64-tdep.c, sh64-tdep.h: Remove files.
9541
9542 2018-04-16  Pedro Alves  <palves@redhat.com>
9543
9544         * MAINTAINERS: Remove m88k.
9545         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9546         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9547         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9548         * NEWS: Mention that support for m88k was removed.
9549         * configure.host (m88*-*-*): Remove support.
9550         * configure.nat (m88k-*-*): Remove support.
9551         * configure.tgt (m88*-*-openbsd*): Remove.
9552         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9553
9554 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
9555
9556         * configure.tgt (x86_tobjs): New variable.
9557         (amd64_tobjs, i386_tobjs): Use it.
9558
9559 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9560
9561         * symtab.c (print_symbol_info): Precede the symbol definition by
9562         the line number when available.
9563         * NEWS: Advertise this enhancement.
9564
9565 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9566
9567         * NEWS (New options): announce set/show record btrace cpu.
9568         * btrace.c: Include record-btrace.h.
9569         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9570         the vendor is unknown.
9571         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
9572         Maybe overwrite the btrace configuration's cpu.
9573         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
9574         (btrace_fetch): Add cpu parameter.  Update callers.
9575         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9576         Maybe overwrite the btrace configuration's cpu.  Skip enabling
9577         errata workarounds if the vendor is unknown.
9578         * python/py-record-btrace.c: Include record-btrace.h.
9579         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9580         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9581         * record-btrace.c (record_btrace_cpu_state_kind): New.
9582         (record_btrace_cpu): New.
9583         (set_record_btrace_cpu_cmdlist): New.
9584         (record_btrace_get_cpu): New.
9585         (require_btrace_thread, record_btrace_info)
9586         (record_btrace_resume_thread): Call record_btrace_get_cpu.
9587         (cmd_set_record_btrace_cpu_none): New.
9588         (cmd_set_record_btrace_cpu_auto): New.
9589         (cmd_set_record_btrace_cpu): New.
9590         (cmd_show_record_btrace_cpu): New.
9591         (_initialize_record_btrace): Initialize set/show record btrace cpu
9592         commands.
9593         * record-btrace.h (record_btrace_get_cpu): New.
9594
9595 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9596
9597         * record.c (set_record_command): Fix typo in message.
9598
9599 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9600
9601         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9602
9603 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9604
9605         * infrun.c (process_event_stop_test): Call
9606         gdbarch_in_indirect_branch_thunk.
9607         * gdbarch.sh (in_indirect_branch_thunk): New.
9608         * gdbarch.c: Regenerated.
9609         * gdbarch.h: Regenerated.
9610         * x86-tdep.h: New.
9611         * x86-tdep.c: New.
9612         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9613         (HFILES_NO_SRCDIR): Add x86-tdep.h.
9614         (ALLDEPFILES): Add x86-tdep.c.
9615         * arch-utils.h (default_in_indirect_branch_thunk): New.
9616         * arch-utils.c (default_in_indirect_branch_thunk): New.
9617         * i386-tdep: Include x86-tdep.h.
9618         (i386_in_indirect_branch_thunk): New.
9619         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9620         function.
9621         * amd64-tdep: Include x86-tdep.h.
9622         (amd64_in_indirect_branch_thunk): New.
9623         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9624
9625 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9626
9627         PR gdb/23053
9628         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9629         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9630         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9631         regression.
9632
9633 2018-04-12  Tom Tromey  <tom@tromey.com>
9634
9635         * rust-lang.c (rust_print_struct_def): Remove univariant code.
9636         (rust_evaluate_subexp): Likewise.
9637
9638 2018-04-12  Pedro Alves  <palves@redhat.com>
9639
9640         * procfs.c (procfs_detach): Make forward declaration's prototype
9641         match definition's protototype.
9642         (proc_get_LDT_entry): Remove stale do_cleanups call.
9643
9644 2018-04-12  Pedro Alves  <palves@redhat.com>
9645
9646         * target.h (target_ops::to_has_exited): Delete.
9647         (target_has_exited): Delete.
9648         * target-delegates.c: Regenerate.
9649
9650 2018-04-11  Pedro Alves  <palves@redhat.com>
9651
9652         * target.c (fileio_fh_t::t): Add comment.
9653         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9654         (target_fileio_close): Handle a NULL target.
9655         (invalidate_fileio_fh): New.
9656         (target_close): Call it.
9657         * remote.c (remote_hostio_send_command): No longer check whether
9658         remote_desc is open.
9659
9660 2018-04-11  Pedro Alves  <palves@redhat.com>
9661
9662         * target.c (fileio_fh_t): Make it a named struct instead of a
9663         typedef.
9664         (fileio_fh_t::is_closed): New method.
9665         (DEF_VEC_O (fileio_fh_t)): Remove.
9666         (fileio_fhandles): Now a std::vector.
9667         (is_closed_fileio_fh): Delete.
9668         (acquire_fileio_fd): Adjust.  Rename parameters.
9669         (release_fileio_fd): Adjust.
9670         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9671         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9672         (target_fileio_close): Adjust.
9673
9674 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
9675
9676         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9677         index.
9678
9679 2018-04-10  Pedro Alves  <palves@redhat.com>
9680
9681         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9682         (scoped_finish_thread_state): New class.
9683         * infcmd.c (run_command_1): Use it instead of finish_thread_state
9684         cleanup.
9685         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9686         (fetch_inferior_event, normal_stop): Likewise.
9687         * thread.c (finish_thread_state_cleanup): Delete.
9688
9689 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9690             Pedro Alves  <palves@redhat.com>
9691
9692         * value.c: Include "selftest.h" and "common/array-view.h".
9693         (struct range) <operator ==>: New.
9694         (test_ranges_contain): New.
9695         (check_ranges_vector): New.
9696         (test_insert_into_bit_range_vector): New.
9697         (_initialize_values): Register selftests.
9698         * common/array-view.h (operator==, operator!=): New.
9699
9700 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9701
9702         * common/gdb_vecs.h (unordered_remove): Add overload that takes
9703         an iterator.
9704         * inline-frame.c: Include <algorithm>.
9705         (struct inline_state): Add constructor.
9706         (inline_state_s): Remove.
9707         (DEF_VEC_O(inline_state_s)): Remove.
9708         (inline_states): Change type to std::vector.
9709         (find_inline_frame_state): Adjust to std::vector.
9710         (allocate_inline_frame_state): Remove.
9711         (clear_inline_frame_state): Adjust to std::vector.
9712         (skip_inline_frames): Adjust to std::vector.
9713
9714 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9715
9716         * tracepoint.h (struct trace_state_variable): Add constructor.
9717         <name>: Change type to std::string.
9718         * tracepoint.c (tsv_s): Remove.
9719         (DEF_VEC_O(tsv_s)): Remove.
9720         (tvariables): Change to std::vector.
9721         (create_trace_state_variable): Adjust to std::vector.
9722         (find_trace_state_variable): Likewise.
9723         (find_trace_state_variable_by_number): Likewise.
9724         (delete_trace_state_variable): Likewise.
9725         (trace_variable_command): Adjust to std::string.
9726         (delete_trace_variable_command): Likewise.
9727         (tvariables_info_1): Adjust to std::vector.
9728         (save_trace_state_variables): Likewise.
9729         (start_tracing): Likewise.
9730         (merge_uploaded_trace_state_variables): Adjust to std::vector
9731         and std::string.
9732         * target.h (struct target_ops)
9733         <to_download_trace_state_variable>: Pass reference to
9734         trace_state_variable.
9735         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9736         * target-delegates.c: Re-generate.
9737         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9738         (mi_tsv_deleted): Likewise.
9739         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9740         * remote.c (remote_download_trace_state_variable): Change
9741         pointer to reference and adjust.
9742         * make-target-delegates (parse_argtypes): Handle references.
9743         (write_function_header): Likewise.
9744         (munge_type): Likewise.
9745
9746 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9747
9748         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9749         string_view-selftests.c.
9750         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9751         testsuite.
9752         * unittests/basic_string_view/cons/char/1.cc: Likewise.
9753         * unittests/basic_string_view/cons/char/2.cc: Likewise.
9754         * unittests/basic_string_view/cons/char/3.cc: Likewise.
9755         * unittests/basic_string_view/element_access/char/1.cc:
9756         Likewise.
9757         * unittests/basic_string_view/element_access/char/empty.cc:
9758         Likewise.
9759         * unittests/basic_string_view/element_access/char/front_back.cc:
9760         Likewise.
9761         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9762         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9763         Likewise.
9764         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9765         Likewise.
9766         * unittests/basic_string_view/modifiers/swap/char/1.cc:
9767         Likewise.
9768         * unittests/basic_string_view/operations/compare/char/1.cc:
9769         Likewise.
9770         * unittests/basic_string_view/operations/compare/char/13650.cc:
9771         Likewise.
9772         * unittests/basic_string_view/operations/copy/char/1.cc:
9773         Likewise.
9774         * unittests/basic_string_view/operations/data/char/1.cc:
9775         Likewise.
9776         * unittests/basic_string_view/operations/find/char/1.cc:
9777         Likewise.
9778         * unittests/basic_string_view/operations/find/char/2.cc:
9779         Likewise.
9780         * unittests/basic_string_view/operations/find/char/3.cc:
9781         Likewise.
9782         * unittests/basic_string_view/operations/find/char/4.cc:
9783         Likewise.
9784         * unittests/basic_string_view/operations/rfind/char/1.cc:
9785         Likewise.
9786         * unittests/basic_string_view/operations/rfind/char/2.cc:
9787         Likewise.
9788         * unittests/basic_string_view/operations/rfind/char/3.cc:
9789         Likewise.
9790         * unittests/basic_string_view/operations/substr/char/1.cc:
9791         Likewise.
9792         * unittests/basic_string_view/operators/char/2.cc: Likewise.
9793         * unittests/string_view-selftests.c: New file.
9794
9795 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9796
9797         * unittests/basic_string_view/capacity/1.cc: New file.
9798         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9799         * unittests/basic_string_view/cons/char/1.cc: New file.
9800         * unittests/basic_string_view/cons/char/2.cc: New file.
9801         * unittests/basic_string_view/cons/char/3.cc: New file.
9802         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9803         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9804         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9805         * unittests/basic_string_view/element_access/char/1.cc: New file.
9806         * unittests/basic_string_view/element_access/char/2.cc: New file.
9807         * unittests/basic_string_view/element_access/char/empty.cc: New file.
9808         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9809         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9810         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9811         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9812         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9813         * unittests/basic_string_view/include.cc: New file.
9814         * unittests/basic_string_view/inserters/char/1.cc: New file.
9815         * unittests/basic_string_view/inserters/char/2.cc: New file.
9816         * unittests/basic_string_view/inserters/char/3.cc: New file.
9817         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9818         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9819         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9820         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9821         * unittests/basic_string_view/literals/types.cc: New file.
9822         * unittests/basic_string_view/literals/values.cc: New file.
9823         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9824         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9825         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9826         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9827         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9828         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9829         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9830         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9831         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9832         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9833         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9834         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9835         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9836         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9837         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9838         * unittests/basic_string_view/operations/data/char/1.cc: New file.
9839         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9840         * unittests/basic_string_view/operations/find/char/1.cc: New file.
9841         * unittests/basic_string_view/operations/find/char/2.cc: New file.
9842         * unittests/basic_string_view/operations/find/char/3.cc: New file.
9843         * unittests/basic_string_view/operations/find/char/4.cc: New file.
9844         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9845         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9846         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9847         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9848         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9849         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9850         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9851         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9852         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9853         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9854         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9855         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9856         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9857         * unittests/basic_string_view/operators/char/2.cc: New file.
9858         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9859         * unittests/basic_string_view/range_access/char/1.cc: New file.
9860         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9861         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9862         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9863         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9864         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9865         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9866         * unittests/basic_string_view/requirements/typedefs.cc: New file.
9867         * unittests/basic_string_view/typedefs.cc: New file.
9868         * unittests/basic_string_view/types/1.cc: New file.
9869
9870 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9871
9872         * common/gdb_string_view.h: Remove libstdc++ implementation
9873         details, adjust to gdb reality.
9874         * common/gdb_string_view.tcc: Likewise.
9875         * cli/cli-script.c (struct string_view): Remove.
9876         (user_args) <m_args>: Change element type to gdb::string_view.
9877         (user_args::insert_args): Adjust.
9878
9879 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9880
9881         * common/gdb_string_view.h: New file.
9882         * common/gdb_string_view.tcc: New file.
9883
9884 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9885
9886         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
9887         * configure: Re-generate.
9888
9889 2018-04-09  Pedro Alves  <palves@redhat.com>
9890
9891         * gdbarch.sh: Include "observable.h" instead of "observer.h".
9892         (set_target_gdbarch): Call
9893         gdb::observers::architecture_changed.notify instead of
9894         observer_notify_architecture_changed.
9895
9896 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9897
9898         * tracepoint.c (struct current_traceframe_cleanup): Remove.
9899         (do_restore_current_traceframe_cleanup): Remove.
9900         (restore_current_traceframe_cleanup_dtor): Remove.
9901         (make_cleanup_restore_current_traceframe): Remove.
9902         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
9903         New.
9904         * tracepoint.h (struct scoped_restore_current_traceframe): New.
9905         * infrun.c (fetch_inferior_event): Use
9906         scoped_restore_current_traceframe.
9907
9908 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9909
9910         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9911         Remove.
9912         <n_allocated_type_units>: Remove.
9913         <all_type_units>: Change to std::vector.
9914         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9915         to std::vector change.
9916         (dwarf2_per_objfile::get_cutu): Likewise.
9917         (dwarf2_per_objfile::get_tu): Likewise.
9918         (create_signatured_type_table_from_index): Likewise.
9919         (create_signatured_type_table_from_debug_names): Likewise.
9920         (dw2_symtab_iter_next): Likewise.
9921         (dw2_print_stats): Likewise.
9922         (dw2_expand_all_symtabs): Likewise.
9923         (dw2_expand_marked_cus): Likewise.
9924         (dw2_debug_names_iterator::next): Likewise.
9925         (dwarf2_initialize_objfile): Likewise.
9926         (add_signatured_type_cu_to_table): Likewise.
9927         (create_all_type_units): Likewise.
9928         (add_type_unit): Likewise.
9929         (struct tu_abbrev_offset): Add constructor.
9930         (build_type_psymtabs_1): Adjust to std::vector change.
9931         (print_tu_stats): Likewise.
9932         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9933         (write_debug_names): Likewise.
9934
9935 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9936
9937         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9938         Make an std::vector.
9939         <n_comp_units>: Remove.
9940         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9941         to std::vector change.
9942         (dwarf2_per_objfile::get_cutu): Likewise.
9943         (dwarf2_per_objfile::get_cu): Likewise.
9944         (create_cus_from_index): Likewise.
9945         (create_addrmap_from_index): Likewise.
9946         (create_addrmap_from_aranges): Likewise.
9947         (dwarf2_read_index): Likewise.
9948         (dw2_find_last_source_symtab): Likewise.
9949         (dw2_map_symtabs_matching_filename): Likewise.
9950         (dw2_symtab_iter_next): Likewise.
9951         (dw2_print_stats): Likewise.
9952         (dw2_expand_all_symtabs): Likewise.
9953         (dw2_expand_symtabs_with_fullname): Likewise.
9954         (dw2_expand_marked_cus): Likewise.
9955         (dw2_map_symbol_filenames): Likewise.
9956         (create_cus_from_debug_names): Likewise.
9957         (dwarf2_read_debug_names): Likewise.
9958         (dw2_debug_names_iterator::next): Likewise.
9959         (dwarf2_initialize_objfile): Likewise.
9960         (set_partial_user): Likewise.
9961         (dwarf2_build_psymtabs_hard): Likewise.
9962         (read_comp_units_from_section): Remove arguments, adjust to
9963         std::vector change.
9964         (create_all_comp_units): Adjust to std::vector and
9965         read_comp_units_from_section changes.
9966         (dwarf2_find_containing_comp_unit): Adjust to std::vector
9967         change.
9968         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9969         (psyms_seen_size): Likewise.
9970         (write_gdbindex): Likewise.
9971         (write_debug_names): Likewise.
9972
9973 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9974
9975         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9976         with dwarf2_per_objfile.
9977         (create_cus_from_index): Likewise.
9978         (create_signatured_type_table_from_index): Likewise.
9979         (dwarf2_read_index): Likewise.
9980         (dwarf2_initialize_objfile): Likewise.
9981         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
9982         per_cu rather than get_dwarf2_per_objfile.
9983
9984 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
9985
9986         * dwarf2read.h (struct signatured_type): Forward declare.
9987         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9988         New methods.
9989         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9990         (dw2_get_cutu): ...this.
9991         (dwarf2_per_objfile::get_cu): Rename from...
9992         (dw2_get_cu): ...this.
9993         (dwarf2_per_objfile::get_tu): New.
9994         (create_addrmap_from_index): Adjust.
9995         (create_addrmap_from_aranges): Adjust.
9996         (dw2_find_last_source_symtab): Adjust.
9997         (dw2_map_symtabs_matching_filename): Adjust.
9998         (dw2_symtab_iter_next): Adjust.
9999         (dw2_print_stats): Adjust.
10000         (dw2_expand_all_symtabs): Adjust.
10001         (dw2_expand_symtabs_with_fullname): Adjust.
10002         (dw2_expand_marked_cus): Adjust.
10003         (dw_expand_symtabs_matching_file_matcher): Adjust.
10004         (dw2_map_symbol_filenames): Adjust.
10005         (dw2_debug_names_iterator::next): Adjust.
10006         (dwarf2_initialize_objfile): Adjust.
10007         (set_partial_user): Adjust.
10008         (dwarf2_build_psymtabs_hard): Adjust.
10009
10010 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10011
10012         * dwarf2read.c (create_signatured_type_table_from_debug_names):
10013         Remove unused variables.
10014         (dw2_map_symtabs_matching_filename): Likewise.
10015         (dwarf2_record_block_ranges): Likewise.
10016         (dwarf2_read_addr_index): Likewise.
10017         (follow_die_offset): Likewise.
10018
10019 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10020
10021         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10022         to symbol_file_add_main.
10023
10024 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10025
10026         PR mi/22299
10027         * mi/mi-console.c (do_fputc_async_safe): New.
10028         (mi_console_file::write_async_safe): New.
10029         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10030         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10031         New.
10032         * ui-file.c (ui_file::putstrn): Adjust call to
10033         fputstrn_unfiltered.
10034         * utils.c (printchar): Replace do_fputs and do_fprintf
10035         parameters by do_fputc.
10036         (fputstr_filtered): Adjust call to printchar.
10037         (fputstr_unfiltered): Likewise.
10038         (fputstrn_filtered): Likewise.
10039         (fputstrn_unfiltered): Add do_fputc parameter, pass to
10040         printchar.
10041         * utils.h (do_fputc_ftype): New typedef.
10042         (fputstrn_unfiltered): Add do_fputc parameter.
10043
10044 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10045
10046         * regformats/i386/i386-avx.dat: Remove.
10047
10048 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10049
10050         PR gdb/22979
10051         * amd64-tdep.c (amd64_none_init_abi): New function.
10052         (amd64_x32_none_init_abi): New function.
10053         (_initialize_amd64_tdep): Register handlers for x86-64 and
10054         x64_32 with GDB_OSABI_NONE.
10055         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10056         GDB_OSABI_NONE osabi.
10057
10058 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10059
10060         PR gdb/22980
10061         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10062         GDB_OSABI_NONE.
10063         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10064         * osabi.c (gdb_osabi_names): Add "unknown" entry.
10065
10066 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10067
10068         * common/byte-vector.h (char_vector): New type.
10069         * target.h (target_read_alloc): Return
10070         gdb::optional<byte_vector>.
10071         (target_read_stralloc): Return gdb::optional<char_vector>.
10072         (target_get_osdata): Return gdb::optional<char_vector>.
10073         * target.c (target_read_alloc_1): Templatize.  Replacement
10074         manual memory management with vector.
10075         (target_read_alloc): Change return type, adjust.
10076         (target_read_stralloc): Change return type, adjust.
10077         (target_get_osdata): Change return type, adjust.
10078         * auxv.c (struct auxv_info) <length>: Remove.
10079         <data>: Change type to gdb::optional<byte_vector>.
10080         (auxv_inferior_data_cleanup): Free auxv_info with delete.
10081         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10082         (target_auxv_search): Adjust.
10083         (fprint_target_auxv): Adjust.
10084         * avr-tdep.c (avr_io_reg_read_command): Adjust.
10085         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10086         (linux_make_corefile_notes): Adjust.
10087         * osdata.c (get_osdata): Adjust.
10088         * remote.c (remote_get_threads_with_qxfer): Adjust.
10089         (remote_memory_map): Adjust.
10090         (remote_traceframe_info): Adjust.
10091         (btrace_read_config): Adjust.
10092         (remote_read_btrace): Adjust.
10093         (remote_pid_to_exec_file): Adjust.
10094         * solib-aix.c (solib_aix_get_library_list): Adjust.
10095         * solib-dsbt.c (decode_loadmap): Don't free buf.
10096         (dsbt_get_initial_loadmaps): Adjust.
10097         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10098         * solib-target.c (solib_target_current_sos): Adjust.
10099         * tracepoint.c (sdata_make_value): Adjust.
10100         * xml-support.c (xinclude_start_include): Adjust.
10101         (xml_fetch_content_from_file): Adjust.
10102         * xml-support.h (xml_fetch_another): Change return type.
10103         (xml_fetch_content_from_file): Change return type.
10104         * xml-syscall.c (xml_init_syscalls_info): Adjust.
10105         * xml-tdesc.c (file_read_description_xml): Adjust.
10106         (fetch_available_features_from_target): Change return type.
10107         (target_fetch_description_xml): Adjust.
10108         (target_read_description_xml): Adjust.
10109
10110 2018-04-06  Tom Tromey  <tom@tromey.com>
10111
10112         * value.c (~value): Update.
10113         (struct value) <contents>: Now unique_xmalloc_ptr.
10114         (value_contents_bits_eq, allocate_value_contents)
10115         (value_contents_raw, value_contents_all_raw)
10116         (value_contents_for_printing, value_contents_for_printing_const)
10117         (set_value_enclosing_type): Update.
10118
10119 2018-04-06  Tom Tromey  <tom@tromey.com>
10120
10121         * value.c (range_s): Remove typedef, VEC.
10122         (struct range): Add operator<.
10123         (range_lessthan): Remove.
10124         (ranges_contain): Change type.
10125         (~value): Update.
10126         (struct value) <unavailable, optimized_out>: Now std::vector.
10127         (value_entirely_available)
10128         (value_entirely_covered_by_range_vector)
10129         (value_entirely_unavailable, value_entirely_optimized_out):
10130         Update.
10131         (insert_into_bit_range_vector): Change argument type.
10132         (find_first_range_overlap): Likewise.
10133         (struct ranges_and_idx, value_contents_bits_eq)
10134         (require_not_optimized_out, require_available): Update.
10135         (ranges_copy_adjusted): Change argument types.
10136         (value_optimized_out, value_copy, value_fetch_lazy): Update.
10137
10138 2018-04-06  Tom Tromey  <tom@tromey.com>
10139
10140         * value.c (~value): Update.
10141         (struct value) <parent>: Now a value_ref_ptr.
10142         (value_parent, set_value_parent, value_address, value_copy):
10143         Update.
10144
10145 2018-04-06  Tom Tromey  <tom@tromey.com>
10146
10147         * value.c (struct value): Add constructor, destructor, and member
10148         initializers.
10149         (allocate_value_lazy, value_decref): Update.
10150
10151 2018-04-06  Tom Tromey  <tom@tromey.com>
10152
10153         * value.c (struct value) <released, next>: Remove.
10154         (all_values): Now a std::vector.
10155         (allocate_value_lazy): Update.
10156         (value_next): Remove.
10157         (value_mark, value_free_to_mark, release_value)
10158         (value_release_to_mark): Update.
10159
10160 2018-04-06  Tom Tromey  <tom@tromey.com>
10161
10162         * value.h (fetch_subexp_value, value_release_to_mark): Update.
10163         (free_value_chain): Remove.
10164         * value.c (free_value_chain): Remove.
10165         (value_release_to_mark): Return a std::vector.
10166         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10167         std::vector.
10168         (check_condition): Update.
10169         * eval.c (fetch_subexp_value): Change "val_chain" to a
10170         std::vector.
10171         * breakpoint.c (update_watchpoint): Update.
10172         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10173
10174 2018-04-06  Tom Tromey  <tom@tromey.com>
10175
10176         * value.h (free_all_values): Remove.
10177         * value.c (free_all_values): Remove.
10178
10179 2018-04-06  Tom Tromey  <tom@tromey.com>
10180
10181         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10182         (value_history_chain, value_history_count): Remove.
10183         (value_history): New global.
10184         (record_latest_value, access_value_history, show_values)
10185         (preserve_values): Update.
10186
10187 2018-04-06  Tom Tromey  <tom@tromey.com>
10188
10189         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10190         * varobj.c (varobj_set_display_format, varobj_set_value)
10191         (install_default_visualizer, construct_visualizer)
10192         (install_new_value, ~varobj, varobj_get_value_type)
10193         (my_value_of_variable, varobj_editable_p): Update.
10194         * c-varobj.c (c_describe_child, c_value_of_variable)
10195         (cplus_number_of_children, cplus_describe_child): Update.
10196         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10197         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10198         (ada_value_of_variable, ada_value_is_changeable_p): Update.
10199
10200 2018-04-06  Tom Tromey  <tom@tromey.com>
10201
10202         * printcmd.c (last_examine_address): Change type to
10203         value_ref_ptr.
10204         (do_examine, x_command): Update.
10205
10206 2018-04-06  Tom Tromey  <tom@tromey.com>
10207
10208         * value.c (release_value): Update.
10209         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10210         (struct bpstats) <val>: Now a value_ref_ptr.
10211         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10212         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10213         (~watchpoint, print_it_watchpoint, watch_command_1)
10214         (invalidate_bp_value_on_memory_change): Update.
10215
10216 2018-04-06  Tom Tromey  <tom@tromey.com>
10217
10218         * varobj.c (varobj_clear_saved_item)
10219         (update_dynamic_varobj_children, install_new_value, ~varobj):
10220         Update.
10221         * value.h (value_incref): Move declaration earlier.
10222         (value_decref): Rename from value_free.
10223         (struct value_ref_policy): New.
10224         (value_ref_ptr): New typedef.
10225         (struct value_deleter): Remove.
10226         (gdb_value_up): Remove typedef.
10227         (release_value): Change return type.
10228         (release_value_or_incref): Remove.
10229         * value.c (set_value_parent): Update.
10230         (value_incref): Change return type.
10231         (value_decref): Rename from value_free.
10232         (value_free_to_mark, free_all_values, free_value_chain): Update.
10233         (release_value): Return value_ref_ptr.
10234         (release_value_or_incref): Remove.
10235         (record_latest_value, set_internalvar, clear_internalvar):
10236         Update.
10237         * stack.c (info_frame_command): Don't call value_free.
10238         * python/py-value.c (valpy_dealloc, valpy_new)
10239         (value_to_value_object): Update.
10240         * printcmd.c (do_examine): Update.
10241         * opencl-lang.c (lval_func_free_closure): Update.
10242         * mi/mi-main.c (register_changed_p): Don't call value_free.
10243         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10244         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10245         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10246         value_free.
10247         * guile/scm-value.c (vlscm_free_value_smob)
10248         (vlscm_scm_from_value): Update.
10249         * frame.c (frame_register_unwind, frame_unwind_register_signed)
10250         (frame_unwind_register_unsigned, get_frame_register_bytes)
10251         (put_frame_register_bytes): Don't call value_free.
10252         * findvar.c (address_from_register): Don't call value_free.
10253         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10254         * dwarf2loc.c (entry_data_value_free_closure)
10255         (value_of_dwarf_reg_entry, free_pieced_value_closure)
10256         (dwarf2_evaluate_loc_desc_full): Update.
10257         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10258         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10259         (~watchpoint, watch_command_1)
10260         (invalidate_bp_value_on_memory_change): Update.
10261         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10262
10263 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
10264
10265         PR gdb/23022
10266         * warning.m4: Add -Wno-error=deprecated-register.
10267         * configure: Re-generate.
10268
10269 2018-04-05  Tom Tromey  <tom@tromey.com>
10270
10271         * linespec.h: Remove include of "vec.h".
10272
10273 2018-04-05  Tom Tromey  <tom@tromey.com>
10274
10275         * linespec.c (typep): Remove typedef.
10276         (find_methods, find_superclass_methods): Take a std::vector.
10277         (find_method): Use std::vector.
10278
10279 2018-04-05  Tom Tromey  <tom@tromey.com>
10280
10281         * utils.c (compare_strings): Remove.
10282         * utils.h (compare_strings): Remove.
10283         * objc-lang.h (find_imps): Update.
10284         * objc-lang.c (find_methods): Take a std::vector.
10285         (uniquify_strings, find_imps): Likewise.
10286         * linespec.c (find_methods): Take a std::vector.
10287         (decode_objc): Use std::vector.
10288         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10289         a std::vector.
10290         (find_method, find_function_symbols): Use std::vector.
10291
10292 2018-04-05  Tom Tromey  <tom@tromey.com>
10293
10294         * completer.c (completion_tracker::completion_tracker): Remove
10295         cast.
10296         (completion_tracker::discard_completions): Likewise.
10297         * breakpoint.c (ambiguous_names_p): Remove cast.
10298         * ada-lang.c (_initialize_ada_language): Remove cast.
10299         * utils.h (streq): Update.
10300         (streq_hash): Add new declaration.
10301         * utils.c (streq): Return bool.
10302         (streq_hash): New function.
10303
10304 2018-04-05  Tom Tromey  <tom@tromey.com>
10305
10306         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10307         Remove a string copy.
10308
10309 2018-04-05  Tom Tromey  <tom@tromey.com>
10310
10311         * linespec.c (filter_results): Use std::vector.
10312         (decode_line_2, decode_line_full): Update.
10313
10314 2018-04-05  Tom Tromey  <tom@tromey.com>
10315
10316         * linespec.c (canonical_to_fullform): Return std::string.
10317         (filter_results): Update.
10318         (struct decode_line_2_item): Add constructor.
10319         <fullform, displayform>: Now std::string.
10320         (decode_line_2_compare_items): Now a std::sort comparator.
10321         (decode_line_2): Update.
10322
10323 2018-04-05  Tom Tromey  <tom@tromey.com>
10324
10325         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10326         (unexpected_linespec_error): Update.
10327         (linespec_parse_basic, parse_linespec): Update.
10328
10329 2018-04-05  Tom Tromey  <tom@tromey.com>
10330
10331         * linespec.c (linespec_parse_basic): Reindent.
10332
10333 2018-04-05  Tom Tromey  <tom@tromey.com>
10334
10335         * minsyms.h (iterate_over_minimal_symbols): Update.
10336         * minsyms.c (iterate_over_minimal_symbols): Take a
10337         gdb::function_view.
10338         * linespec.c (struct collect_minsyms): Remove.
10339         (compare_msyms): Now a std::sort comparator.
10340         (add_minsym): Add parameters.
10341         (search_minsyms_for_name): Update.  Use std::vector.
10342
10343 2018-04-03  Tom Tromey  <tom@tromey.com>
10344
10345         * mipsread.c (read_alphacoff_dynamic_symtab): Use
10346         gdb::byte_vector.
10347
10348 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10349
10350         * MAINTAINERS (Write After Approval): Add Weimin Pan.
10351
10352 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10353
10354         PR gdb/16959
10355         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
10356         printing static type.
10357
10358 2018-04-01  Tom Tromey  <tom@tromey.com>
10359
10360         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10361         (rs6000_xfer_shared_libraries): Update.
10362
10363 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
10364
10365         * common/gdb_vecs.h (char_ptr): Remove.
10366         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10367
10368 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10369
10370         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10371         with std::vector.
10372         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10373
10374 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10375
10376         * tracepoint.h (struct uploaded_tp): Initialize fields.
10377         <actions, step_actions, cmd_strings>: Change type to
10378         std::vector<char *>.
10379         * tracepoint.c (get_uploaded_tp): Allocate with new.
10380         (free_uploaded_tps): Free with delete.
10381         (parse_tracepoint_definition): Adjust to std::vector change.
10382         * breakpoint.c (read_uploaded_action): Likewise.
10383         (create_tracepoint_from_upload): Likewise.
10384         * ctf.c (ctf_write_uploaded_tp): Likewise.
10385         (SET_ARRAY_FIELD): Likewise.
10386         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10387
10388 2018-03-30  Tom Tromey  <tom@tromey.com>
10389
10390         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
10391         std::unique_ptr.
10392         (svr4_keep_data_in_core): Update.
10393         (svr4_read_so_list): Update.
10394
10395 2018-03-30  Tom Tromey  <tom@tromey.com>
10396
10397         * windows-nat.c (handle_output_debug_string, handle_exception):
10398         Update.
10399         * target.h (target_read_string): Update.
10400         * target.c (target_read_string): Change "string" to
10401         unique_xmalloc_ptr.
10402         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10403         Update.
10404         * solib-frv.c (frv_current_sos): Update.
10405         * solib-dsbt.c (dsbt_current_sos): Update.
10406         * solib-darwin.c (darwin_current_sos): Update.
10407         * linux-thread-db.c (inferior_has_bug): Update.
10408         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10409         Update.  Remove alloca.
10410         * ada-lang.c (ada_main_name): Update.
10411
10412 2018-03-30  Tom Tromey  <tom@tromey.com>
10413
10414         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10415         (struct dwo_file_deleter): New.
10416         (dwo_file_up): New typedef.
10417         (open_and_init_dwo_file): Use dwo_file_up.
10418         (free_dwo_file_cleanup): Remove.
10419
10420 2018-03-30  Tom Tromey  <tom@tromey.com>
10421
10422         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10423         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10424
10425 2018-03-30  Tom Tromey  <tom@tromey.com>
10426
10427         * dwarf2read.c (class free_cached_comp_units): New class.
10428         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10429         (free_cached_comp_units): Remove function.
10430
10431 2018-03-30  Tom Tromey  <tom@tromey.com>
10432
10433         * utils.h (make_cleanup_unpush_target): Remove.
10434         * inf-ptrace.c (struct target_unpusher): New.
10435         (target_unpush_up) New typedef.
10436         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10437         target_unpush_up.
10438         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10439
10440 2018-03-27  Tom Tromey  <tom@tromey.com>
10441
10442         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10443
10444 2018-03-27  Pedro Alves  <palves@redhat.com>
10445             Tom Tromey  <tom@tromey.com>
10446
10447         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10448         destructor.  Now a class.
10449         (gdb_readline_wrapper_cleanup): Remove function.
10450         (gdb_readline_wrapper): Remove cleanups.
10451
10452 2018-03-27  Tom Tromey  <tom@tromey.com>
10453
10454         * typeprint.h (struct type_print_options) <local_typedefs,
10455         global_typedefs>: Remove "struct" keyword.
10456         (class typedef_hash_table): New class.
10457         (recursively_update_typedef_hash, add_template_parameters)
10458         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10459         (find_typedef_in_hash): Don't declare.
10460         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10461         (typedef_hash_table::recursively_update): Rename from
10462         recursively_update_typedef_hash.  Now a member.
10463         (typedef_hash_table::add_template_parameters): Rename from
10464         add_template_parameters.  Now a member.
10465         (typedef_hash_table::typedef_hash_table): Now a constructor;
10466         rename from create_typedef_hash.
10467         (typedef_hash_table::~typedef_hash_table): Now a destructor;
10468         rename from free_typedef_hash.
10469         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10470         (do_free_global_table): Remove.
10471         (typedef_hash_table::typedef_hash_table): New constructor; renamed
10472         from copy_type_recursive.
10473         (create_global_typedef_table): Remove.
10474         (typedef_hash_table::find_global_typedef): Now a member of
10475         typedef_hash_table.
10476         (typedef_hash_table::find_typedef): Rename from
10477         find_typedef_in_hash; now a member.
10478         (whatis_exp): Update.
10479         * extension.h (struct ext_lang_type_printers): Add constructor and
10480         destructor.
10481         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10482         declare.
10483         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10484         Now a constructor; rename from start_ext_lang_type_printers.
10485         (ext_lang_type_printers): Now a destructor; rename from
10486         free_ext_lang_type_printers.
10487         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10488         Update.
10489         (c_type_print_base_struct_union): Update.  Remove cleanups.
10490
10491 2018-03-27  Tom Tromey  <tom@tromey.com>
10492
10493         * dwarf-index-write.c: Include <cmath>.
10494
10495 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10496
10497         * NEWS: Add entry describing new "set|show varsize-limit" command.
10498         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10499         command.
10500         * printcmd.c (_initialize_printcmd): Add "set var" alias of
10501         "set variable".
10502
10503 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
10504
10505         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10506         dwarf-index-write.c
10507         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10508         * dwarf-index-common.c: New file.
10509         * dwarf-index-common.h: New file.
10510         * dwarf-index-write.c: New file.
10511         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10512         (struct dwarf2_section_info): Move from here.
10513         (dwarf2_section_info_def): Likewise.
10514         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10515         (offset_type): Likewise.
10516         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10517         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10518         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10519         (byte_swap): Likewise.
10520         (MAYBE_SWAP): Likewise.
10521         (dwarf2_per_cu_ptr): Likewise.
10522         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10523         (struct tu_stats): Likewise.
10524         (struct dwarf2_per_objfile): Likewise.
10525         (struct dwarf2_per_cu_data): Likewise.
10526         (struct signatured_type): Likewise.
10527         (sig_type_ptr): Likewise.
10528         (DEF_VEC_P (sig_type_ptr)): Likewise.
10529         (INDEX4_SUFFIX): Likewise.
10530         (INDEX5_SUFFIX): Likewise.
10531         (DEBUG_STR_SUFFIX): Likewise.
10532         (dwarf2_read_section): Make non-static.
10533         (mapped_index_string_hash): Move from here.
10534         (dwarf5_djb_hash): Likewise.
10535         (file_write): Likewise.
10536         (class data_buf): Likewise.
10537         (struct symtab_index_entry): Likewise.
10538         (struct mapped_symtab): Likewise.
10539         (find_slot): Likewise.
10540         (hash_expand): Likewise.
10541         (add_index_entry): Likewise.
10542         (uniquify_cu_indices): Likewise.
10543         (class c_str_view): Likewise.
10544         (class c_str_view_hasher): Likewise.
10545         (class vector_hasher): Likewise.
10546         (write_hash_table): Likewise.
10547         (psym_index_map): Likewise.
10548         (struct addrmap_index_data): Likewise.
10549         (add_address_entry): Likewise.
10550         (add_address_entry_worker): Likewise.
10551         (write_address_map): Likewise.
10552         (symbol_kind): Likewise.
10553         (write_psymbols): Likewise.
10554         (struct signatured_type_index_data): Likewise.
10555         (write_one_signatured_type): Likewise.
10556         (recursively_count_psymbols): Likewise.
10557         (recursively_write_psymbols): Likewise.
10558         (class debug_names): Likewise.
10559         (check_dwarf64_offsets): Likewise.
10560         (psyms_seen_size): Likewise.
10561         (write_gdbindex): Likewise.
10562         (write_debug_names): Likewise.
10563         (assert_file_size): Likewise.
10564         (write_psymtabs_to_index): Likewise.
10565         (save_gdb_index_command): Likewise.
10566         (_initialize_dwarf2_read): Don't register the "save gdb-index"
10567         command.
10568         * dwarf2read.h: New file.
10569
10570 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10571
10572         PR gdb/22670
10573         * dwarf2read.c (dwarf2_physname): Do not return the demangled
10574         symbol name if the CU's language stores symbol names in linkage
10575         format.
10576         * language.h (struct language_defn)
10577         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
10578         all instances of this struct.
10579
10580 2018-03-26  Tom Tromey  <tom@tromey.com>
10581
10582         * stack.c (backtrace_command_1): Remove verbose code.
10583
10584 2018-03-26  Tom Tromey  <tom@tromey.com>
10585
10586         * python/py-framefilter.c (py_print_type): Don't catch
10587         exceptions.  Return void.
10588         (py_print_value): Likewise.
10589         (py_print_single_arg): Likewise.
10590         (enumerate_args): Don't catch exceptions.
10591         (py_print_args): Likewise.
10592         (py_print_frame): Likewise.
10593         (gdbpy_apply_frame_filter): Catch exceptions here.
10594
10595 2018-03-26  Tom Tromey  <tom@tromey.com>
10596
10597         * stack.c (_initialize_stack): Remove trailing newlines from help
10598         text.  Add "Usage" line to "backtrace" help.
10599
10600 2018-03-26  Tom Tromey  <tom@tromey.com>
10601
10602         PR python/16486:
10603         * python/py-framefilter.c (py_print_args): Call wrap_hint.
10604
10605 2018-03-26  Tom Tromey  <tom@tromey.com>
10606
10607         * python/py-framefilter.c (py_print_single_arg): Return
10608         EXT_LANG_BT_ERROR from catch.
10609
10610 2018-03-26  Tom Tromey  <tom@tromey.com>
10611
10612         PR backtrace/15584:
10613         * stack.c (backtrace_command_1): Move some code into no-filters
10614         "if".
10615
10616 2018-03-26  Tom Tromey  <tom@tromey.com>
10617
10618         * python/py-framefilter.c (throw_quit_or_print_exception): New
10619         function.
10620         (gdbpy_apply_frame_filter): Use it.
10621
10622 2018-03-26  Tom Tromey  <tom@tromey.com>
10623
10624         PR cli/17716:
10625         * python/py-framefilter.c (py_print_type, py_print_value)
10626         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10627         RETURN_MASK_ERROR.
10628
10629 2018-03-26  Tom Tromey  <tom@tromey.com>
10630
10631         * python/py-framefilter.c (enumerate_args): Use
10632         gdb::unique_xmalloc_ptr.
10633
10634 2018-03-26  Tom Tromey  <tom@tromey.com>
10635
10636         * python/py-framefilter.c (py_print_frame): Return
10637         EXT_LANG_BT_OK.
10638         (gdbpy_apply_frame_filter): Update comment.
10639         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10640         Remove.
10641         <EXT_LANG_BT_NO_FILTERS>: Change value.
10642
10643 2018-03-26  Tom Tromey  <tom@tromey.com>
10644
10645         PR backtrace/15582:
10646         * stack.c (backtrace_command): Parse "hide" argument.
10647         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10648         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10649         constant.
10650
10651 2018-03-26  Tom Tromey  <tom@tromey.com>
10652
10653         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10654         add "flags".
10655         (backtrace_command): Remove "fulltrace", add "flags".
10656
10657 2018-03-26  Tom Tromey  <tom@tromey.com>
10658
10659         * stack.c (backtrace_command): Rewrite command line parsing.
10660
10661 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10662
10663         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10664
10665 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10666
10667         * filename-seen-cache.h: Add include guard.
10668
10669 2018-03-26  Keith Seitz  <keiths@redhat.com>
10670
10671         * symfile.c (place_section): Remove "struct" from section_addr_info
10672         in comment.
10673         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10674         "struct" keyword from section_addr_info.
10675
10676 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
10677
10678         * regformats/regdef.h (reg): Add constructors.
10679
10680 2018-03-25  Pedro Alves  <palves@redhat.com>
10681
10682         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10683         if then/else bodies in var_func_name extraction.
10684
10685 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
10686
10687         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10688         lookup_minimal_symbol() to find symbol entry.
10689         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10690
10691 2018-03-23  Keith Seitz  <keiths@redhat.com>
10692
10693         PR c++/22968
10694         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10695         nested type definitions for C++, too.
10696
10697 2018-03-23  Tom Tromey  <tom@tromey.com>
10698
10699         * machoread.c (struct oso_el): Add a constructor.  Don't define as
10700         a typedef.
10701         (macho_register_oso): Remove.
10702         (macho_symtab_read): Take a std::vector.
10703         (oso_el_compare_name): Now a std::sort comparator.
10704         (macho_symfile_read_all_oso): Take a std::vector.
10705         (macho_symfile_read): Use std::vector.  Remove cleanups.
10706
10707 2018-03-22  Tom Tromey  <tom@tromey.com>
10708
10709         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10710         (record_full_goto_bookmark): Use std::string.
10711
10712 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10713
10714         PR tdep/18295
10715         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10716         a single mask.
10717
10718 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10719
10720         * rs6000-tdep.c (store_insn_p): New function.
10721         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10722         and cr_reg to their unshifted values. Use store_insn_p to
10723         match LR saves using either R1 or fdata->alloca_reg. Use
10724         store_insn_p to match CR saves. Set alloca_reg_offset
10725         when alloca_reg and framep are set. Remove lr_reg shift
10726         when assigning to fdata->lr_register.
10727
10728 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10729
10730         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10731         command line args instead of emitting a warning.
10732
10733 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10734
10735         * tracepoint.h (struct static_tracepoint_marker): Initialize
10736         fields, define default constructor, move constructor and move
10737         assignment, disable the rest.
10738         <str_id, extra>: Make std::string.
10739         (release_static_tracepoint_marker): Remove.
10740         (free_current_marker): Remove.
10741         * tracepoint.c (free_current_marker): Remove.
10742         (parse_static_tracepoint_marker_definition): Adjust to
10743         std::string, use new hex2str overload.
10744         (release_static_tracepoint_marker): Remove.
10745         (print_one_static_tracepoint_marker): Get marker by reference
10746         and adjust to std::string.
10747         (info_static_tracepoint_markers_command): Adjust to std::vector
10748         changes
10749         * target.h (static_tracepoint_marker_p): Remove typedef.
10750         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10751         (struct target_ops) <to_static_tracepoint_marker_at>: Return
10752         bool.
10753         <to_static_tracepoint_markers_by_strid>: Return std::vector.
10754         * target-debug.h
10755         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10756         (target_debug_print_std_vector_static_tracepoint_marker): New.
10757         (target_debug_print_struct_static_tracepoint_marker_p): Rename
10758         to...
10759         (target_debug_print_static_tracepoint_marker_p): ... this.
10760         * target-delegates.c: Re-generate.
10761         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10762         Make std::string.
10763         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10764         (decode_static_tracepoint_spec): Adjust to std::vector.
10765         (tracepoint_print_one_detail): Adjust to std::string.
10766         (strace_marker_decode_location): Adjust to std::string.
10767         (update_static_tracepoint): Adjust to std::string, remove call
10768         to release_static_tracepoint_marker.
10769         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10770         Adjust to std::vector.
10771         * remote.c (remote_static_tracepoint_marker_at): Return bool.
10772         (remote_static_tracepoint_markers_by_strid): Adjust to
10773         std::vector.
10774         * common/rsp-low.h (hex2str): New overload with explicit count
10775         of bytes.
10776         * common/rsp-low.c (hex2str): New overload with explicit count
10777         of bytes.
10778         * unittests/rsp-low-selftests.c (test_hex2str): New function.
10779         (_initialize_rsp_low_selftests): Add test_hex2str test.
10780         * unittests/tracepoint-selftests.c
10781         (test_parse_static_tracepoint_marker_definition): Adjust to
10782         std::string.
10783
10784 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10785
10786         * tracepoint.c (parse_static_tracepoint_marker_definition):
10787         Consider case where the definition is followed by more
10788         definitions.
10789         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10790         tracepoint-selftests.c.
10791         * unittests/tracepoint-selftests.c: New.
10792
10793 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10794
10795         * MAINTAINERS (Write After Approval): Add Pedro Franco de
10796         Carvalho.
10797
10798 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10799
10800         * symtab.c (find_pc_sect_line): fixed indentation.
10801
10802 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10803
10804         * symtab.c (find_pc_sect_line): now uses binary search.
10805
10806 2018-03-19  Tom Tromey  <tom@tromey.com>
10807
10808         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10809         "IDENT" production.
10810
10811 2018-03-19  Pedro Alves  <palves@redhat.com>
10812             Tom Tromey  <tom@tromey.com>
10813
10814         * unittests/observable-selftests.c: New file.
10815         * common/observable.h: New file.
10816         * observable.h: New file.
10817         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10818         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10819         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10820         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10821         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10822         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10823         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10824         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10825         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10826         python/py-breakpoint.c, python/py-finishbreakpoint.c,
10827         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10828         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10829         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10830         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10831         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10832         tui/tui-interp.c, valops.c: Update all users.
10833         * tui/tui-hooks.c (tui_bp_created_observer)
10834         (tui_bp_deleted_observer, tui_bp_modified_observer)
10835         (tui_inferior_exit_observer, tui_before_prompt_observer)
10836         (tui_normal_stop_observer, tui_register_changed_observer):
10837         Remove.
10838         (tui_observers_token): New global.
10839         (attach_or_detach, tui_attach_detach_observers): New functions.
10840         (tui_install_hooks, tui_remove_hooks): Use
10841         tui_attach_detach_observers.
10842         * record-btrace.c (record_btrace_thread_observer): Remove.
10843         (record_btrace_thread_observer_token): New global.
10844         * observer.sh: Remove.
10845         * observer.c: Rename to observable.c.
10846         * observable.c (namespace gdb_observers): Define new objects.
10847         (observer_debug): Move into gdb_observers namespace.
10848         (struct observer, struct observer_list, xalloc_observer_list_node)
10849         (xfree_observer_list_node, generic_observer_attach)
10850         (generic_observer_detach, generic_observer_notify): Remove.
10851         (_initialize_observer): Update.
10852         Don't include observer.inc.
10853         * Makefile.in (generated_files): Remove observer.h, observer.inc.
10854         (clean mostlyclean): Likewise.
10855         (observer.h, observer.inc): Remove targets.
10856         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10857         (COMMON_SFILES): Use observable.c, not observer.c.
10858         * .gitignore: Remove observer.h.
10859
10860 2018-03-18  Tom Tromey  <tom@tromey.com>
10861
10862         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10863         gdb::def_vector.
10864         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10865
10866 2018-03-17  Tom Tromey  <tom@tromey.com>
10867
10868         * auto-load.c (auto_load_objfile_script_1): Use std::string.
10869
10870 2018-03-17  Tom Tromey  <tom@tromey.com>
10871
10872         * target.c (class scoped_target_fd): New.
10873         (target_fileio_close_cleanup): Remove.
10874         (target_fileio_read_alloc_1): Use scoped_target_fd.
10875
10876 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
10877
10878         * silent-rules.mk: New.
10879         * Makefile.in: Include silent-rules.mk
10880         (srcdir, VPATH, top_srcdir): Move up.
10881         (COMPILE): Add ECHO_CXX.
10882         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
10883         (init.c): Add ECHO_INIT_C.
10884         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
10885         (version.c): Add ECHO_GEN.
10886         (printcmd.o): Add ECHO_CXX.
10887         (target-float.o): Add ECHO_CXX.
10888         (ada-exp.o): Add ECHO_CXX.
10889         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
10890         (insight$(EXEEXT)): Add ECHO_CXXLD.
10891         * gnulib/configure.ac: Add AM_SILENT_RULES.
10892         * gnulib/aclocal.m4: Re-generate.
10893         * gnulib/configure: Re-generate.
10894         * gnulib/import/Makefile.in: Re-generate.
10895
10896 2018-03-16  Tom Tromey  <tom@tromey.com>
10897
10898         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
10899         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
10900         * utils.c (do_free_section_addr_info)
10901         (make_cleanup_free_section_addr_info): Remove.
10902         * symfile.h (struct other_sections): Add constructor.
10903         (struct section_addr_info): Remove.
10904         (section_addr_info): New typedef.
10905         (struct sym_fns) <sym_offsets>: Change type of parameter.
10906         (build_section_addr_info_from_objfile)
10907         (relative_addr_info_to_section_offsets, addr_info_make_relative)
10908         (default_symfile_offsets, symbol_file_add)
10909         (symbol_file_add_from_bfd)
10910         (build_section_addr_info_from_section_table): Update.
10911         (alloc_section_addr_info, free_section_addr_info): Don't declare.
10912         * symfile.c (alloc_section_addr_info): Remove.
10913         (build_section_addr_info_from_section_table): Change return type.
10914         Update.
10915         (build_section_addr_info_from_bfd)
10916         (build_section_addr_info_from_objfile): Likewise.
10917         (free_section_addr_info): Remove.
10918         (relative_addr_info_to_section_offsets): Change type of "addrs".
10919         (addrs_section_compar): Now a std::sort comparator.
10920         (addrs_section_sort): Change return type.
10921         (addr_info_make_relative): Change type of "addrs".  Update.
10922         (default_symfile_offsets, syms_from_objfile_1)
10923         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10924         (symbol_file_add_separate): Update.
10925         (symbol_file_add): Change type of "addrs".  Update.
10926         (add_symbol_file_command): Update.  Remove cleanups.
10927         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
10928         cleanups.
10929         * symfile-debug.c (debug_sym_offsets): Change type of "info".
10930         * solib.c (solib_read_symbols): Update.
10931         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
10932         * machoread.c (macho_symfile_offsets): Update.
10933         * jit.c (jit_bfd_try_read_symtab): Update.
10934
10935 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
10936
10937         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10938         unittests/utils-selftests.c.
10939         * unittests/utils-selftests.c: New file.
10940
10941 2018-03-14  Tom Tromey  <tom@tromey.com>
10942
10943         PR cli/14977:
10944         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10945         for NULL.
10946
10947 2018-03-14  Tom Tromey  <tom@tromey.com>
10948
10949         PR cli/19918:
10950         * printcmd.c (printf_pointer): Allow "-" in format.
10951
10952 2018-03-14  Tom Tromey  <tom@tromey.com>
10953
10954         * printcmd.c (_initialize_printcmd): Add usage to printf.
10955
10956 2018-03-14  Yao Qi  <qiyao@sourceware.org>
10957
10958         * MAINTAINERS: Update my email address.
10959
10960 2018-03-13  Tom Tromey  <tom@tromey.com>
10961
10962         * machoread.c (macho_check_dsym): Change filenamep to a
10963         std::string*.
10964         (macho_symfile_read): Update.
10965         * symfile.c (load_command): Use std::string.
10966
10967 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
10968
10969         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10970         to error message string.
10971         (riscv_register_name): Use xsnprintf instead of sprintf.
10972         (riscv_insn::fetch_instruction): Use gdb_assert instead of
10973         internal_error.
10974         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10975         error.
10976         (riscv_push_dummy_call): Likewise.
10977
10978 2018-03-12  Tom Tromey  <tom@tromey.com>
10979
10980         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10981         Use gdb::byte_vector.
10982         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10983
10984 2018-03-12  Yao Qi  <yao.qi@linaro.org>
10985
10986         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10987         parameter type to readable_regcache.
10988         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10989         the declaration.
10990
10991 2018-03-11  Tom Tromey  <tom@tromey.com>
10992
10993         * dwarf2read.c (struct nextfield): Add initializers.
10994         (struct nextfnfield): Remove.
10995         (struct fnfieldlist): Add initializers.  Remove "length" and
10996         "head", use std::vector.
10997         (struct decl_field_list): Remove.
10998         (struct field_info): Add initializers.
10999         <fields, baseclasses>: Now std::vector.
11000         <nbaseclasses, nfnfields, typedef_field_list_count,
11001         nested_types_list_count>: Remove.
11002         (dwarf2_add_field, dwarf2_add_type_defn)
11003         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11004         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11005         (process_structure_scope): Update.
11006
11007 2018-03-11  Tom Tromey  <tom@tromey.com>
11008
11009         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11010         for use by std::sort.
11011         (build_type_psymtabs_1): Use std::vector.
11012
11013 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
11014
11015         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11016         and LIBMPFR in the printed configuration.
11017
11018 2018-03-08  Tom Tromey  <tom@tromey.com>
11019
11020         * source.c (get_filename_and_charpos): Use scoped_fd.
11021         * nto-procfs.c (procfs_open_1): Use scoped_fd.
11022         (procfs_pidlist): Likewise.
11023         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11024         (iterate_over_mappings): Likewise.
11025
11026 2018-03-08  Tom Tromey  <tom@tromey.com>
11027
11028         * infcall.c (struct call_return_meta_info)
11029         <stack_temporaries_enabled>: Remove.
11030         (get_call_return_value, call_function_by_hand_dummy): Update.
11031         * thread.c (disable_thread_stack_temporaries): Remove.
11032         (enable_thread_stack_temporaries): Remove.
11033         (thread_stack_temporaries_enabled_p): Return bool.
11034         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11035         (get_last_thread_stack_temporary): Update.
11036         * eval.c (evaluate_subexp): Update.
11037         * gdbthread.h (class enable_thread_stack_temporaries): Now a
11038         class, not a function.
11039         (value_ptr, value_vec): Remove typedefs.
11040         (class thread_info) <stack_temporaries_enabled>: Now bool.
11041         <stack_temporaries>: Now a std::vector.
11042         (thread_stack_temporaries_enabled_p)
11043         (value_in_thread_stack_temporaries): Return bool.
11044
11045 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
11046
11047         * remote.c (putpkt_binary): Fix omitted bytes reporting.
11048         (getpkt_or_notif_sane_1): Likewise.
11049
11050 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11051
11052         * build-id.c (build_id_to_debug_bfd): Use std::string.
11053
11054 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11055
11056         * build-id.c (find_separate_debug_file_by_buildid): Return
11057         std::string.
11058         * build-id.h (find_separate_debug_file_by_buildid): Return
11059         std::string.
11060         * coffread.c (coff_symfile_read): Adjust to std::string.
11061         * elfread.c (elf_symfile_read): Adjust to std::string.
11062         * symfile.c (separate_debug_file_exists): Change parameter to
11063         std::string.
11064         (find_separate_debug_file): Return std::string.
11065         (find_separate_debug_file_by_debuglink): Return std::string.
11066         * symfile.h (find_separate_debug_file_by_debuglink): Return
11067         std::string.
11068
11069 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11070
11071         * common/xml-utils.c (xml_escape_text): Move code to...
11072         (xml_escape_text_append): ... this new function.
11073         * common/xml-utils.h (xml_escape_text_append): New declaration.
11074         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11075         New function.
11076         (_initialize_xml_utils): register test_xml_escape_text_append as
11077         a selftest.
11078
11079 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
11080
11081         * defs.h: Remove MAX_REGISTER_SIZE.
11082         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11083         asserts.
11084         * python/py-unwind.c (pyuw_sniffer): Likewise.
11085
11086 2018-03-07  Tom Tromey  <tom@tromey.com>
11087
11088         * linux-tdep.c (linux_info_proc): Update.
11089         * target.h (struct target_ops) <to_fileio_readlink>: Return
11090         optional<string>.
11091         (target_fileio_readlink): Return optional<string>.
11092         * remote.c (remote_hostio_readlink): Return optional<string>.
11093         * inf-child.c (inf_child_fileio_readlink): Return
11094         optional<string>.
11095         * target.c (target_fileio_readlink): Return optional<string>.
11096
11097 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
11098
11099         * regcache.c (cooked_read_test): Add riscv to the list of
11100         architectures that have a save_reggroup.
11101
11102 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11103
11104         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11105         value is not a dynamic class object.
11106
11107 2018-03-06  Tom Tromey  <tom@tromey.com>
11108
11109         * rust-exp.y: Formatting fixes.
11110
11111 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11112
11113         * riscv-tdep.c (riscv_register_name): Remove target description
11114         support.
11115         (riscv_gdbarch_init): Remove target description check.
11116
11117 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11118
11119         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11120         comment.
11121         * riscv-tdep.h: Likewise.
11122
11123 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11124
11125         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11126         (riscv_pseudo_register_write): Delete.
11127         (riscv_gdbarch_init): Remove all use of pseudo registers.
11128
11129 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11130
11131         * record-btrace.c (btrace_print_lines): Replace cleanup
11132         parameter with RAII equivalents.
11133         (btrace_insn_history): Replace cleanup with RAII equivalents.
11134         * ui-out.h (make_cleanup_ui_out_list_begin_end,
11135         make_cleanup_ui_out_tuple_begin_end): Remove.
11136         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11137         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11138         make_cleanup_ui_out_list_begin_end): Remove.
11139
11140 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11141
11142         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11143         parameter types to std::vector.  Use bool.
11144         (record_btrace_wait): Replace VEC(tp_t) with
11145         std::vector<thread_info *>.
11146         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11147
11148 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11149
11150         * record-btrace.c (record_btrace_disable_callback): Remove.
11151         (struct scoped_btrace_disable): New.
11152         (record_btrace_open): Use scoped_btrace_disable.
11153
11154 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11155
11156         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11157         reading values from registers.
11158
11159 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11160
11161         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11162         where appropriate.
11163
11164 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11165
11166         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11167         change parameter type.  Use GDB's print functions, and use
11168         core_addr_to_string where appropriate.
11169         (riscv_push_dummy_call): Use core_addr_to_string where
11170         appropriate, update call to riscv_print_arg_location, and reindent
11171         a few lines.
11172         (riscv_return_value): Update call to riscv_print_arg_location.
11173
11174 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11175             Tim Newsome <tim@sifive.com>
11176             Albert Ou <a0u@eecs.berkeley.edu>
11177             Darius Rad <darius@bluespec.com>
11178
11179         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11180         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11181         (ALLDEPFILES): Add riscv-tdep.c
11182         * configure.tgt: Add riscv support.
11183         * riscv-tdep.c: New file.
11184         * riscv-tdep.h: New file.
11185         * NEWS: Mention new target.
11186         * MAINTAINERS: Add entry for riscv.
11187
11188 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11189
11190         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11191         fields within aggregates.
11192
11193 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
11194
11195         * record-btrace.c (btrace_print_lines): Change type of flags to
11196         gdb_disassembly_flags.
11197
11198 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11199
11200         * fbsd-nat.c: Include "inf-ptrace.h".
11201         (USE_SIGTRAP_SIGINFO): Conditionally define.
11202         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11203         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11204         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11205         function.
11206         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11207         Likewise.
11208         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11209         Likewise.
11210         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11211         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11212         "supports_stopped_by_hw_breakpoint" target methods.
11213
11214 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11215
11216         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11217         * fbsd-nat.c (debug_fbsd_nat): New variable.
11218         (show_fbsd_nat_debug): New function.
11219         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11220         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11221
11222 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11223
11224         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11225         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11226         prototype.
11227         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11228         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11229         method.
11230
11231 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11232
11233         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11234         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11235
11236 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11237
11238         * charset.c (struct charset_vector): New.
11239         (charsets): Change type to charset_vector.
11240         (find_charset_names): Adjust.
11241         (add_one): Adjust.
11242         (_initialize_charset): Adjust.
11243
11244 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11245
11246         * progspace.h (struct program_space) <deleted_solibs>: Change
11247         type to std::vector<std::string>.
11248         * progspace.c (clear_program_space_solib_cache): Adjust.
11249         * breakpoint.c (print_solib_event): Adjust.
11250         (check_status_catch_solib): Adjust.
11251         * solib.c (update_solib_list): Adjust.
11252         * ui-out.h (class ui_out) <field_string>: New overload.
11253         * ui-out.c (ui_out::field_string): New overload.
11254
11255 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11256
11257         * progspace.h (struct program_space): Add constructor and
11258         destructor, initialize fields.
11259         (add_program_space): Remove.
11260         * progspace.c (add_program_space): Rename to...
11261         (program_space::program_space): ... this.
11262         (release_program_space): Rename to...
11263         (program_space::~program_space): ... this.
11264         (delete_program_space): Use delete to delete program_space.
11265         (initialize_progspace): Use new to allocate program_space.
11266         * inferior.c (add_inferior_with_spaces): Likewise.
11267         (clone_inferior_command): Likewise.
11268         * infrun.c (follow_fork_inferior): Likewise.
11269         (handle_vfork_child_exec_or_exit): Likewise.
11270
11271 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11272
11273         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11274         (delim_string_to_char_ptr_vec): Return std::vector of
11275         gdb::unique_xmalloc_ptr.
11276         (dirnames_to_char_ptr_vec_append): Take std::vector of
11277         gdb::unique_xmalloc_ptr.
11278         (dirnames_to_char_ptr_vec): Return std::vector of
11279         gdb::unique_xmalloc_ptr.
11280         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11281         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11282         (delim_string_to_char_ptr_vec): Return an std::vector of
11283         gdb::unique_xmalloc_ptr, adjust the code.
11284         (dirnames_to_char_ptr_vec_append): Take an std::vector of
11285         gdb::unique_xmalloc_ptr, adjust the code.
11286         (dirnames_to_char_ptr_vec): Return an std::vector of
11287         gdb::unique_xmalloc_ptr, adjust the code.
11288         * auto-load.c (auto_load_safe_path_vec): Change type to
11289         std::vector of gdb::unique_xmalloc_ptr.
11290         (auto_load_expand_dir_vars): Return an std::vector of
11291         gdb::unique_xmalloc_ptr, adjust the code.
11292         (auto_load_safe_path_vec_update): Adjust.
11293         (filename_is_in_auto_load_safe_path_vec): Adjust.
11294         (auto_load_objfile_script_1): Adjust.
11295         * build-id.c (build_id_to_debug_bfd): Adjust.
11296         * linux-thread-db.c (thread_db_load_search): Adjust.
11297         * source.c (add_path): Adjust.
11298         (openp): Adjust.
11299         * symfile.c (find_separate_debug_file): Adjust.
11300         * utils.c (do_free_char_ptr_vec): Remove.
11301         (make_cleanup_free_char_ptr_vec): Remove.
11302
11303 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
11304
11305         PR gdb/22907
11306         * common/pathstuff.c: Conditionally include "<windows.h>".
11307
11308 2018-03-01  Georg Sauthoff  <mail@georg.so>
11309
11310         PR gdb/22888
11311         * gcore.in: Quote variables and switch interpreter to bash.
11312
11313 2018-03-01  Tom Tromey  <tom@tromey.com>
11314
11315         * dwarf2read.c (alloc_discriminant_info): Fix default_index
11316         assertion.  Add assertion for discriminant_index.
11317         (quirk_rust_enum): Use correct base type name in univariant case.
11318
11319 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
11320
11321         * record.c (get_call_history_modifiers): Return a
11322         record_print_flags.
11323         (cmd_record_call_history): Adjust.
11324         * record-btrace.c (record_btrace_call_history): Adjust.
11325         (record_btrace_call_history_range): Adjust.
11326         (record_btrace_call_history_from): Adjust.
11327         * target-debug.h (target_debug_print_record_print_flags): New.
11328         * target-delegates.c: Re-generate.
11329         * target.c (target_call_history): Change flags type.
11330         (target_call_history_from): Likewise.
11331         (target_call_history_range): Likewise.
11332         * target.h (struct target_ops) <target_call_history>: Likewise.
11333         (target_call_history_from): Likewise.
11334         (target_call_history_range): Likewise.
11335
11336 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11337             Simon Marchi  <simon.marchi@polymtl.ca>
11338
11339         * common/common-utils.c: Include "sys/stat.h".
11340         (is_regular_file): Move here from "source.c"; change return
11341         type to "bool".
11342         * common/common-utils.h (is_regular_file): New prototype.
11343         * common/pathstuff.c (contains_dir_separator): New function.
11344         * common/pathstuff.h (contains_dir_separator): New prototype.
11345         * source.c: Don't include "sys/stat.h".
11346         (is_regular_file): Move to "common/common-utils.c".
11347
11348 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11349
11350         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11351         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11352         * auto-load.c: Include "common/pathstuff.h".
11353         * common/common-def.h (current_directory): Move here.
11354         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11355         function.
11356         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11357         prototype.
11358         * common/pathstuff.c: New file.
11359         * common/pathstuff.h: New file.
11360         * compile/compile.c: Include "common/pathstuff.h".
11361         * defs.h (current_directory): Move to "common/common-defs.h".
11362         * dwarf2read.c: Include "common/pathstuff.h".
11363         * exec.c: Likewise.
11364         * guile/scm-safe-call.c: Likewise.
11365         * linux-thread-db.c: Likewise.
11366         * main.c: Likewise.
11367         * nto-tdep.c: Likewise.
11368         * objfiles.c: Likewise.
11369         * source.c: Likewise.
11370         * symtab.c: Likewise.
11371         * utils.c: Include "common/pathstuff.h".
11372         (gdb_realpath): Move to "common/pathstuff.c".
11373         (gdb_realpath_keepfile): Likewise.
11374         (gdb_abspath): Likewise.
11375         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11376         (gdb_realpath_keepfile): Likewise.
11377         (gdb_abspath): Likewise.
11378
11379 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
11380
11381         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11382         wildcard process pid for super_resume for kernels with a
11383         specific bug.
11384
11385 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
11386
11387         * compile/compile.c (get_args): Add additional comments
11388         explaining function.
11389
11390 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
11391             Tom Tromey  <tom@tromey.com>
11392
11393         * target.h (memory_write_request_s): Remove typedef.  Don't define
11394         VEC.
11395         (target_write_memory_blocks): Change argument to std::vector.
11396         (struct memory_write_request): Add constructor.
11397         * target-memory.c (compare_block_starting_address): Return bool.
11398         Change argument types.
11399         (claim_memory): Change arguments to use std::vector.
11400         (split_regular_and_flash_blocks, blocks_to_erase)
11401         (compute_garbled_blocks): Likewise.
11402         (cleanup_request_data, cleanup_write_requests_vector): Remove.
11403         (target_write_memory_blocks): Change argument to std::vector.
11404         * symfile.c (struct load_section_data): Add constructor and
11405         destructor.  Use std::vector for "requests".
11406         (struct load_progress_data): Add initializers.
11407         (load_section_callback): Update.  Use "new".
11408         (clear_memory_write_data): Remove.
11409         (generic_load): Update.
11410
11411 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
11412
11413         * arch/aarch64.h: Use common/tdesc.h.
11414
11415 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11416
11417         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11418         architecture with a 64-bit ABI.
11419
11420 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11421
11422         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11423         ahead of target description loading.
11424
11425 2018-02-26  Tom Tromey  <tom@tromey.com>
11426
11427         * stack.c (backtrace_command_1): Update.
11428         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11429         of "flags".
11430         * python/py-framefilter.c (py_print_frame)
11431         (gdbpy_apply_frame_filter): Change type of "flags".
11432         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11433         of "flags".
11434         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11435         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11436         * extension.h (enum frame_filter_flag): Rename from
11437         frame_filter_flags.
11438         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11439         (apply_ext_lang_frame_filter): Change type of "flags".
11440         * extension.c (apply_ext_lang_frame_filter): Change type of
11441         "flags".
11442         * extension-priv.h (struct extension_language_ops)
11443         <apply_frame_filter>: Change type of "flags".
11444
11445 2018-02-26  Tom Tromey  <tom@tromey.com>
11446
11447         PR python/16497:
11448         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11449         off-by-one in py_end computation.
11450         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11451         PRINT_MORE_FRAMES.
11452         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11453         constant.
11454
11455 2018-02-26  Tom Tromey  <tom@tromey.com>
11456
11457         * dwarf2read.c (struct variant_field): New.
11458         (struct nextfield) <variant>: New field.
11459         (dwarf2_add_field): Handle DW_TAG_variant_part.
11460         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11461         discriminated union.
11462         (read_structure_type): Handle DW_TAG_variant_part.
11463         (handle_struct_member_die): New function, extracted from
11464         process_structure_scope.  Handle DW_TAG_variant.
11465         (process_structure_scope): Handle discriminated unions.  Call
11466         handle_struct_member_die.
11467
11468 2018-02-26  Tom Tromey  <tom@tromey.com>
11469
11470         * rust-lang.h (rust_last_path_segment): Declare.
11471         * rust-lang.c (rust_last_path_segment): Now public.  Change
11472         contract.
11473         (struct disr_info): Remove.
11474         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11475         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11476         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11477         (rust_enum_p, rust_enum_variant): New function.
11478         (rust_underscore_fields): Remove "offset" parameter.
11479         (rust_print_enum): New function.
11480         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11481         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11482         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
11483         enums.
11484         (rust_internal_print_type): New function, from rust_print_type.
11485         Remove enum code.
11486         (rust_print_type): Call rust_internal_print_type.
11487         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11488         Update enum handling.
11489         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11490         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11491         (rust_union_quirks): New functions.
11492         (process_full_comp_unit, process_full_type_unit): Call
11493         rust_union_quirks.
11494         (process_structure_scope): Update rust_unions if necessary.
11495
11496 2018-02-26  Tom Tromey  <tom@tromey.com>
11497
11498         * value.h (value_union_variant): Declare.
11499         * valops.c (value_union_variant): New function.
11500         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11501         (struct discriminant_info): New.
11502         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11503         enumerator.
11504         (struct main_type) <flag_discriminated_union>: New field.
11505
11506 2018-02-26  Tom Tromey  <tom@tromey.com>
11507
11508         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11509         unittests/unpack-selftests.c.
11510         * unittests/unpack-selftests.c: New file.
11511         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11512
11513 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11514
11515         * dwarf2read.c (struct partial_die_info) <read>: New method.
11516         (read_partial_die): Remove the declaration.
11517         (load_partial_dies): Update.
11518         (partial_die_info::partial_die_info):
11519         (read_partial_die): Change it to partial_die_info::read.
11520
11521 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11522
11523         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11524         (fixup_partial_die): Remove declaration.
11525         (scan_partial_symbols): Update.
11526         (partial_die_parent_scope): Likewise.
11527         (partial_die_full_name): Likewise.
11528         (fixup_partial_die): Change it to partial_die_info::fixup.
11529
11530 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11531
11532         * dwarf2read.c (read_partial_die): Update the declaration.
11533         (load_partial_dies): Caller update.
11534         (read_partial_die): Remove one argument abbrev_len.
11535
11536 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11537
11538         * dwarf2read.c (struct partial_die_info): Add ctor, delete
11539         assignment operator.
11540         (load_partial_dies): Use ctor and copy ctor.
11541         (read_partial_die): Update.
11542         (dwarf2_cu::find_partial_die): Use ctor.
11543
11544 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11545
11546         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11547         (find_partial_die_in_comp_unit): Change it to
11548         dwarf2_cu::find_partial_die.
11549         (find_partial_die): Update.
11550
11551 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11552
11553         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11554         is NULL.
11555
11556 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11557
11558         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11559
11560 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
11561
11562         * arch/amd64.h: Use common/tdesc.h.
11563         * arch/i386.c: Likewise.
11564         * arch/i386.h: Likewise.
11565         * arch/tic6x.c: Likewise.
11566         * arch/tdesc.h: Move file from here...
11567         * common/tdesc.h: ...to here.
11568         * features/aarch64-core.c: Regenerate.
11569         * features/aarch64-fpu.c: Regenerate.
11570         * features/i386/32bit-avx.c: Regenerate.
11571         * features/i386/32bit-avx512.c: Regenerate.
11572         * features/i386/32bit-core.c: Regenerate.
11573         * features/i386/32bit-linux.c: Regenerate.
11574         * features/i386/32bit-mpx.c: Regenerate.
11575         * features/i386/32bit-pkeys.c: Regenerate.
11576         * features/i386/32bit-sse.c: Regenerate.
11577         * features/i386/64bit-avx.c: Regenerate.
11578         * features/i386/64bit-avx512.c: Regenerate.
11579         * features/i386/64bit-core.c: Regenerate.
11580         * features/i386/64bit-linux.c: Regenerate.
11581         * features/i386/64bit-mpx.c: Regenerate.
11582         * features/i386/64bit-pkeys.c: Regenerate.
11583         * features/i386/64bit-segments.c: Regenerate.
11584         * features/i386/64bit-sse.c: Regenerate.
11585         * features/i386/x32-core.c: Regenerate.
11586         * features/tic6x-c6xp.c: Regenerate.
11587         * features/tic6x-core.c: Regenerate.
11588         * features/tic6x-gp.c: Regenerate.
11589         * target-descriptions.c: Use common/tdesc.h.
11590         * target-descriptions.h: Likewise.
11591
11592 2018-02-24  Tom Tromey  <tom@tromey.com>
11593
11594         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11595         (try_thread_db_load_from_dir, thread_db_load_search): Use
11596         std::string.
11597         (info_auto_load_libthread_db_compare): Return bool.  Change
11598         argument types.
11599         (info_auto_load_libthread_db): Use std::vector, std::string.
11600         Remove cleanups.
11601
11602 2018-02-24  Tom Tromey  <tom@tromey.com>
11603
11604         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11605         std::string.
11606         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11607         std::string*.
11608         * gdbarch.c: Rebuild.
11609         * gdbarch.h: Rebuild.
11610         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11611         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11612         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11613         std::string*.
11614
11615 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
11616
11617         * gdbtypes.h (sect_offset): Change type to uint64_t.
11618         (sect_offset_str): New function.
11619         * dwarf2read.c (create_addrmap_from_aranges): Use
11620         sect_offset_str.
11621         (error_check_comp_unit_head): Likewise.
11622         (create_debug_type_hash_table): Likewise.
11623         (read_cutu_die_from_dwo): Likewise.
11624         (init_cutu_and_read_dies): Likewise.
11625         (init_cutu_and_read_dies_no_follow): Likewise.
11626         (process_psymtab_comp_unit_reader): Likewise.
11627         (partial_die_parent_scope): Likewise.
11628         (peek_die_abbrev): Likewise.
11629         (process_queue): Likewise.
11630         (dwarf2_physname): Likewise.
11631         (read_namespace_alias): Likewise.
11632         (read_import_statement): Likewise.
11633         (create_dwo_cu_reader): Likewise.
11634         (create_cus_hash_table): Likewise.
11635         (lookup_dwo_cutu): Likewise.
11636         (inherit_abstract_dies): Likewise.
11637         (read_func_scope): Likewise.
11638         (read_call_site_scope): Likewise.
11639         (dwarf2_add_member_fn): Likewise.
11640         (read_common_block): Likewise.
11641         (read_module_type): Likewise.
11642         (read_typedef): Likewise.
11643         (read_subrange_type): Likewise.
11644         (load_partial_dies): Likewise.
11645         (read_partial_die): Likewise.
11646         (find_partial_die): Likewise.
11647         (read_str_index): Likewise.
11648         (dwarf2_string_attr): Likewise.
11649         (build_error_marker_type): Likewise.
11650         (lookup_die_type): Likewise.
11651         (dump_die_shallow): Likewise.
11652         (follow_die_ref): Likewise.
11653         (dwarf2_fetch_die_loc_sect_off): Likewise.
11654         (dwarf2_fetch_constant_bytes): Likewise.
11655         (follow_die_sig): Likewise.
11656         (get_signatured_type): Likewise.
11657         (get_DW_AT_signature_type): Likewise.
11658         (dwarf2_find_containing_comp_unit): Likewise.
11659         (set_die_type): Likewise.
11660
11661 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
11662
11663         * arch/aarch64.c: Include "common-defs.h".
11664         * arch/amd64.c: Likewise.
11665         * arch/i386.c: Likewise.
11666
11667 2018-02-21  Tom Tromey  <tom@tromey.com>
11668
11669         * value.h: (extract_field_op): Update.
11670         * eval.c (extract_field_op): Return a const char *.
11671         * expression.h (parse_expression_for_completion): Update.
11672         * completer.c (complete_expression): Update.
11673         (add_struct_fields): Make fieldname const.
11674         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11675         (mark_completion_tag, parse_exp_in_context_1): Update.
11676         (parse_expression_for_completion): Change "name" to
11677         unique_xmalloc_ptr*.
11678
11679 2018-02-21  Tom Tromey  <tom@tromey.com>
11680
11681         * infcall.c (call_function_by_hand_dummy): Use std::vector.
11682
11683 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11684
11685         * avr-tdep.c (avr_read_pc): Change parameter type to
11686         readable_regcache.
11687         * gdbarch.sh (read_pc): Likewise.
11688         * gdbarch.c: Re-generated.
11689         * gdbarch.h: Re-generated.
11690         * hppa-tdep.c (hppa_read_pc): Change parameter type to
11691         readable_regcache.
11692         * ia64-tdep.c (ia64_read_pc): Likewise.
11693         * mips-tdep.c (mips_read_pc): Likewise.
11694         * spu-tdep.c (spu_read_pc): Likewise.
11695
11696 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11697
11698         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11699         * regcache-dump.c: New file.
11700         * regcache.c: Move register_dump to regcache-dump.c.
11701         (maintenance_print_registers): Likewise.
11702         (maintenance_print_raw_registers): Likewise.
11703         (maintenance_print_cooked_registers): Likewise.
11704         (maintenance_print_register_groups): Likewise.
11705         (maintenance_print_remote_registers): Likewise.
11706         (_initialize_regcache): Likewise.
11707         * regcache.h (register_dump): Moved from regcache.c.
11708
11709 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11710
11711         * regcache.c (regcache::regcache): Update.
11712         (regcache::invalidate): Move it to detached_regcache::invalidate.
11713         (get_thread_arch_aspace_regcache): Update.
11714         (regcache::raw_update): Update.
11715         (regcache::cooked_read): Remove some code.
11716         (regcache::cooked_read_value): Likewise.
11717         (regcache::raw_write): Remove assert on m_readonly_p.
11718         (regcache::raw_supply_integer): Move it to
11719         detached_regcache::raw_supply_integer.
11720         (regcache::raw_supply_zeroed): Likewise.
11721         * regcache.h (detached_regcache) <raw_supply_integer>: New
11722         declaration.
11723         <raw_supply_zeroed, invalidate>: Likewise.
11724         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11725         <invalidate>: Likewise.
11726         <m_readonly_p>: Removed.
11727
11728 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11729
11730         * infcmd.c (get_return_value): Let stop_regs point to
11731         get_current_regcache.
11732         * regcache.c (regcache::regcache): Remove.
11733         (register_dump_reg_buffer): New class.
11734         (regcache_print): Adjust.
11735         * regcache.h (regcache): Remove constructors.
11736
11737 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11738
11739         * regcache.c (class register_dump): New class.
11740         (register_dump_regcache, register_dump_none): New class.
11741         (register_dump_remote, register_dump_groups): New class.
11742         (regcache_print): Update.
11743         * regcache.h (regcache_dump_what): Move it to regcache.c.
11744         (regcache) <dump>: Remove.
11745
11746 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11747
11748         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11749          reg_buffer_rw *.
11750         (jit_unwind_reg_set_impl): Call raw_supply.
11751         (jit_frame_sniffer): Use reg_buffer_rw.
11752         * record-full.c (record_full_core_regbuf): Change its type.
11753         (record_full_core_open_1): Use reg_buffer_rw.
11754         (record_full_close): Likewise.
11755         (record_full_core_fetch_registers): Use regcache->raw_supply.
11756         (record_full_core_store_registers): Likewise.
11757         * regcache.c (regcache::get_register_status): Move it to
11758         reg_buffer.
11759         (regcache_raw_set_cached_value): Remove.
11760         (regcache::raw_set_cached_value): Remove.
11761         (regcache::raw_write): Call raw_supply.
11762         (regcache::raw_supply): Move it to reg_buffer_rw.
11763         * regcache.h (regcache_raw_set_cached_value): Remove.
11764         (reg_buffer_rw): New class.
11765
11766 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11767
11768         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11769         readonly_detached_regcache.
11770         (dummy_frame_prev_register): Use regcache->cooked_read.
11771         * frame.c (frame_save_as_regcache): Change return type.
11772         (frame_pop): Update.
11773         * frame.h (frame_save_as_regcache): Update declaration.
11774         * inferior.h (get_infcall_suspend_state_regcache): Update
11775         declaration.
11776         * infrun.c (infcall_suspend_state) <registers>: use
11777         readonly_detached_regcache.
11778         (save_infcall_suspend_state): Don't use regcache_dup.
11779         (get_infcall_suspend_state_regcache): Change return type.
11780         * linux-fork.c (struct fork_info) <savedregs>: Change to
11781         readonly_detached_regcache.
11782         <pc>: New field.
11783         (fork_save_infrun_state): Don't use regcache_dup.
11784         (info_checkpoints_command): Adjust.
11785         * mi/mi-main.c (register_changed_p): Update declaration.
11786         (mi_cmd_data_list_changed_registers): Use
11787         readonly_detached_regcache.
11788         (register_changed_p): Change parameter type to
11789         readonly_detached_regcache.
11790         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11791         readonly_detached_regcache.
11792         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11793         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11794         New.
11795         (regcache::save): Move it to reg_buffer.
11796         (regcache::restore): Change parameter type.
11797         (regcache_dup): Remove.
11798         * regcache.h (reg_buffer) <save>: New method.
11799         (readonly_detached_regcache): New class.
11800         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11801         readonly_detached_regcache.
11802         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11803
11804 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11805
11806         * frame.c (frame_save_as_regcache): Use regcache method save.
11807         (frame_pop): Use regcache method restore.
11808         * infrun.c (restore_infcall_suspend_state): Likewise.
11809         * linux-fork.c (fork_load_infrun_state): Likewise.
11810         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11811         save.
11812         * regcache.c (regcache_save): Remove.
11813         (regcache::restore): More asserts.
11814         (regcache_cpy): Remove.
11815         * regcache.h (regcache_save): Remove the declaration.
11816         (regcache::restore): Move from private to public.
11817         Remove the friend declaration of regcache_cpy.
11818         (regcache_cpy): Remove declaration.
11819
11820 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11821
11822         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11823         parameter type to 'readable_regcache *'.
11824         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11825         * arm-tdep.c (arm_neon_quad_read): Likewise.
11826         (arm_pseudo_read): Likewise.
11827         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11828         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11829         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11830         * gdbarch.c: Re-generated.
11831         * gdbarch.h: Re-generated.
11832         * gdbarch.sh (pseudo_register_read): Change parameter type to
11833         'readable_regcache *'.
11834         (pseudo_register_read_value): Likewise.
11835         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11836         (h8300_pseudo_register_read): Likewise.
11837         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11838         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11839         (i386_pseudo_register_read_into_value): Likewise.
11840         (i386_pseudo_register_read_value): Likewise.
11841         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11842         declaration.
11843         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11844         * m32c-tdep.c (m32c_raw_read): Likewise.
11845         (m32c_read_flg): Likewise.
11846         (m32c_banked_register): Likewise.
11847         (m32c_banked_read): Likewise.
11848         (m32c_sb_read): Likewise.
11849         (m32c_part_read): Likewise.
11850         (m32c_cat_read): Likewise.
11851         (m32c_r3r2r1r0_read): Likewise.
11852         (m32c_pseudo_register_read): Likewise.
11853         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11854         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11855         (mep_pseudo_cr64_read): Likewise.
11856         (mep_pseudo_register_read): Likewise.
11857         * mips-tdep.c (mips_pseudo_register_read): Likewise.
11858         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11859         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11860         * regcache.c (regcache::raw_read): Move it to readable_regcache.
11861         (regcache::cooked_read): Likewise.
11862         (regcache::cooked_read_value): Likewise.
11863         (regcache_cooked_read_signed):
11864         (regcache::cooked_read): Likewise.
11865         * regcache.h (readable_regcache): New class.
11866         (regcache): Inherit readable_regcache.  Move some methods to
11867         readable_regcache.
11868         * rl78-tdep.c (rl78_pseudo_register_read): Change
11869         parameter type to 'readable_regcache *'.
11870         * rs6000-tdep.c (do_regcache_raw_read): Remove.
11871         (e500_pseudo_register_read): Change parameter type to
11872         'readable_regcache *'.
11873         (dfp_pseudo_register_read): Likewise.
11874         (vsx_pseudo_register_read): Likewise.
11875         (efpr_pseudo_register_read): Likewise.
11876         * s390-tdep.c (s390_pseudo_register_read): Likewise.
11877         * sh-tdep.c (sh_pseudo_register_read): Likewise.
11878         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
11879         (sh64_pseudo_register_read): Likewise.
11880         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11881         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11882         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11883         (spu_pseudo_register_read): Likewise.
11884         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11885         (xtensa_pseudo_register_read): Likewise.
11886
11887 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11888
11889         * regcache.c (regcache::regcache): Call reg_buffer ctor.
11890         (regcache::arch): Move it to reg_buffer::arch.
11891         (regcache::register_buffer): Likewise.
11892         (regcache::assert_regnum): Likewise.
11893         (regcache::num_raw_registers): Likewise.
11894         * regcache.h (reg_buffer): New class.
11895         (regcache): Inherit reg_buffer.
11896
11897 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
11898
11899         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
11900         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
11901
11902 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
11903
11904         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
11905
11906 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
11907
11908         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
11909         (SFILES): Remove common/*.c files.
11910         (COMMON_OBS): Remove some *.o files built from common/*.c files.
11911         * common/common.host: Add common reference.
11912         * configure.ac: Likewise.
11913         * configure: Regenerate.
11914
11915 2018-02-16  Yao Qi  <yao.qi@linaro.org>
11916
11917         * block.c (block_namespace_info): Inherit allocate_on_obstack.
11918         (block_initialize_namespace): Use new.
11919         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11920         (dwarf2_free_objfile): Use delete.
11921         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11922         (copy_type_recursive): Use new.
11923         * gdb_obstack.h (allocate_on_obstack): New.
11924
11925 2018-02-15  Yao Qi  <yao.qi@linaro.org>
11926
11927         PR gdb/22849
11928         * inferior.c (exit_inferior_1): Reset inf->control.
11929
11930 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
11931
11932         * ada-lang.c (ada_to_fixed_value_create): Delete advance
11933         declaration.
11934
11935 2018-02-14  Pedro Alves  <palves@redhat.com>
11936
11937         * frame-unwind.c (frame_unwind_try_unwinder): Always call
11938         frame_cleanup_after_sniffer on exception.
11939
11940 2018-02-14  Tom Tromey  <tom@tromey.com>
11941
11942         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11943         const.
11944         (solib_bfd_open): Make pathname const.
11945         * solib.c (solib_bfd_open): Make pathname const.
11946         * solib-spu.c (spu_bfd_fopen): Make name const.
11947         (spu_bfd_open): Make pathname const.
11948         * solib-darwin.c (darwin_bfd_open): Make pathname const.
11949         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11950
11951 2018-02-14  Tom Tromey  <tom@tromey.com>
11952
11953         * symfile.c (symfile_bfd_open): Update.
11954         * source.h (openp, source_full_path_of, find_and_open_source):
11955         Change argument type to unique_xmalloc_ptr.
11956         * source.c (openp): Take a unique_xmalloc_ptr.
11957         (source_full_path_of, find_and_open_source): Likewise.
11958         (open_source_file, symtab_to_fullname): Update.
11959         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11960         unique_xmalloc_ptr.
11961         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11962         (exec_file_find): Update.
11963         * psymtab.c (psymtab_to_fullname): Update.
11964         * nto-tdep.h (nto_find_and_open_solib): Update.
11965         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11966         unique_xmalloc_ptr.
11967         * exec.c (exec_file_attach): Update.
11968         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11969         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11970
11971 2018-02-14  Tom Tromey  <tom@tromey.com>
11972
11973         * solib.c: Include source.h.
11974         * nto-tdep.c: Include source.h.
11975         * mi/mi-cmd-env.c: Include source.h.
11976         * infcmd.c: Include source.h.
11977         * exec.c: Include source.h.
11978         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11979         (add_path, directory_switch, source_path, init_source_path): Move
11980         declarations...
11981         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11982         (add_path, directory_switch, source_path, init_source_path):
11983         ...here.
11984
11985 2018-02-14  Tom Tromey  <tom@tromey.com>
11986
11987         * solist.h (exec_file_find, solib_find): Return
11988         unique_xmalloc_ptr.
11989         (solib_bfd_fopen): Take a const char *.
11990         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11991         (exec_file_find, solib_find): Likewise.
11992         (solib_bfd_fopen): Do not take ownership of "pathname".
11993         (solib_bfd_open): Use unique_xmalloc_ptr.
11994         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11995         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11996         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11997         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11998
11999 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
12000
12001         * ada-lang.c (name_match_type_from_name): Remove reference to
12002         ada_name_for_lookup in function's documentation.
12003         * ada-lang.h (ada_name_for_lookup): Delete declaration.
12004
12005 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12006
12007         * defs.h (enum openp_flags): New enum.
12008         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12009         Move to enum openp_flags.
12010         (openp_flags): New enum flags.
12011         (openp): Change parameter type to openp_flags.
12012         * source.c (openp): Change parameter type to openp_flags.
12013         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12014         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12015
12016 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12017
12018         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12019         per-command.
12020
12021 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12022
12023         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12024         into...
12025         (class dwarf2_queue_guard): ...the destructor of this new class.
12026         (dw2_do_instantiate_symtab): Create instance of the new class
12027         dwarf2_queue_guard, remove cleanup.
12028
12029 2018-02-09  Tom Tromey  <tom@tromey.com>
12030
12031         * source.c (find_source_lines): Don't reference past the end of
12032         the vector.
12033
12034 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12035
12036         * remote.c (remote_btrace_maybe_reopen): Change error message.
12037         * btrace.c (btrace_enable): Likewise.
12038         (parse_xml_btrace): Likewise.
12039         (parse_xml_btrace_conf): Likewise.
12040
12041 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12042
12043         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12044         (linux_enable_pt, linux_enable_bts): Call
12045         diagnose_perf_event_open_fail.
12046
12047 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12048
12049         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12050         Remove parameter and change return type.  Update callers.  Move it.
12051         (linux_enable_bts, linux_enable_pt): Improve error message.
12052         (linux_enable_pt): Remove zero buffer size check.
12053         (linux_enable_btrace): Improve error messages.  Remove NULL return
12054         check.
12055
12056 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12057
12058         * btrace.c (btrace_enable): Remove target_supports_btrace call.
12059         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12060         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12061         (linux_supports_pt, linux_supports_btrace): Remove.
12062         (linux_enable_bts): Call cpu_supports_bts.
12063         * nat/linux-btrace.h (linux_supports_btrace): Remove.
12064         * remote.c (remote_supports_btrace): Remove.
12065         (init_remote_ops): Remove remote_supports_btrace.
12066         * target-delegates.c: Regenerated.
12067         * target.c (target_supports_btrace): Remove.
12068         * target.h (target_ops) <to_supports_btrace>: Remove
12069         (target_supports_btrace): Remove.
12070         * x86-linux-nat.c (x86_linux_create_target): Remove
12071         linux_supports_btrace.
12072
12073 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12074
12075         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12076         btrace failed.
12077         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12078         exception and use message in own exception.
12079
12080 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12081
12082         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12083         (perf_event_pt_event_type): Use gdb_file_up.
12084         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12085         scoped_fd, and scoped_mmap.
12086
12087 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12088
12089         * common/scoped_mmap.h: New.
12090         * unittests/scoped_mmap-selftest.c: New.
12091         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12092         unittests/scoped_mmap-selftest.c.
12093
12094 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12095
12096         * common/scoped_fd.h: New.
12097         * unittests/scoped_fd-selftest.c: New.
12098         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12099         unittests/scoped_fd-selftest.c.
12100
12101 2018-02-09  Tom Tromey  <tom@tromey.com>
12102
12103         * auto-load.c (auto_load_section_scripts): Use
12104         gdb::unique_xmalloc_ptr.
12105
12106 2018-02-09  Tom Tromey  <tom@tromey.com>
12107
12108         * auto-load.c (execute_script_contents): Use std::string.
12109
12110 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
12111
12112         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12113         Python function, rather than a new command.
12114
12115 2018-02-08  Tom Tromey  <tom@tromey.com>
12116
12117         * solib.c (solib_find_1): Use std::string.
12118         (solib_bfd_fopen): Use unique_xmalloc_ptr.
12119
12120 2018-02-08  Tom Tromey  <tom@tromey.com>
12121
12122         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12123
12124 2018-02-08  Tom Tromey  <tom@tromey.com>
12125
12126         * source.c (find_source_lines): Use gdb::def_vector.
12127
12128 2018-02-08  Tom Tromey  <tom@tromey.com>
12129
12130         * macrocmd.c (struct temporary_macro_definition): New.
12131         (macro_define_command): Use temporary_macro_definition.  Remove
12132         cleanups.
12133         (free_macro_definition_ptr): Remove.
12134
12135 2018-02-08  Tom Tromey  <tom@tromey.com>
12136
12137         * macroexp.c (maybe_expand): Use std::string.
12138
12139 2018-02-08  Tom Tromey  <tom@tromey.com>
12140
12141         * macroexp.c (struct macro_buffer): Add initializers for some
12142         members.
12143         (init_buffer, init_shared_buffer, free_buffer)
12144         (free_buffer_return_text): Remove.
12145         (macro_buffer): New constructors.
12146         (~macro_buffer): New destructor.
12147         (macro_buffer::set_shared): New method.
12148         (macro_buffer::resize_buffer, macro_buffer::appendc)
12149         (macro_buffer::appendmem): Now methods, not free functions.
12150         (set_token, append_tokens_without_splicing, stringify)
12151         (macro_stringify): Update.
12152         (gather_arguments): Change return type.  Remove argc_p argument,
12153         add args_ptr argument.  Use std::vector.
12154         (substitute_args): Remove argc argument.  Accept std::vector.
12155         (expand): Update.  Use std::vector.
12156         (scan, macro_expand, macro_expand_next): Update.
12157
12158 2018-02-08  Tom Tromey  <tom@tromey.com>
12159
12160         * symtab.c (default_collect_symbol_completion_matches_break_on):
12161         Use unique_xmalloc_ptr.
12162         * macroscope.h: (sal_macro_scope, user_macro_scope)
12163         (default_macro_scope): Return unique_xmalloc_ptr.
12164         * macroscope.c (sal_macro_scope, user_macro_scope)
12165         (default_macro_scope): Return unique_xmalloc_ptr.
12166         * macroexp.h (macro_expand, macro_expand_once): Return
12167         unique_xmalloc_ptr.
12168         * macroexp.c (macro_expand, macro_expand_once): Return
12169         unique_xmalloc_ptr.
12170         * macrocmd.c (macro_expand_command, macro_expand_once_command)
12171         (info_macro_command, info_macros_command): Use
12172         unique_xmalloc_ptr.
12173         * compile/compile-c-support.c (write_macro_definitions): Use
12174         unique_xmalloc_ptr.
12175         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12176
12177 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
12178
12179         * value.c (value_static_field): Assign field type instead of
12180         containing type when returning an optimized out value.
12181
12182 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12183
12184         * ft32-tdep.c (ft32_read_pc): Remove.
12185         (ft32_write_pc): Remove.
12186         (ft32_gdbarch_init): Update.
12187         * m32r-tdep.c (m32r_read_pc): Remove.
12188         (m32r_gdbarch_init): Update.
12189         * mep-tdep.c (mep_read_pc): Remove.
12190         (mep_gdbarch_init): Update.
12191         * microblaze-tdep.c (microblaze_write_pc): Remove.
12192         (microblaze_gdbarch_init): Update.
12193         * mn10300-tdep.c (mn10300_read_pc): Remove.
12194         (mn10300_write_pc): Remove.
12195         (mn10300_gdbarch_init): Update.
12196         * moxie-tdep.c (moxie_read_pc): Remove.
12197         (moxie_write_pc): Remove.
12198         (moxie_gdbarch_init): Update.
12199
12200 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12201
12202         * expprint.c (print_subexp_standard): Handle
12203         OP_F77_UNDETERMINED_ARGLIST.
12204         (dump_subexp_body_standard): Likewise.
12205
12206 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
12207
12208         * target-descriptions.c (tdesc_element_visitor) Add empty
12209         implementations.
12210         (tdesc_type): Move make_gdb_type from here.
12211         (tdesc_type_builtin): Likewise.
12212         (tdesc_type_vector): Likewise.
12213         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12214         (make_gdb_type_struct): Move from tdesc_type_with_fields.
12215         (make_gdb_type_union): Likewise.
12216         (make_gdb_type_flags): Likewise.
12217         (make_gdb_type_enum): Likewise.
12218         (make_gdb_type): New function.
12219         (tdesc_register_type): Use static make_gdb_type.
12220
12221 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
12222
12223         * infcmd.c (default_print_one_register_info): Align natural-format
12224         column values consistently one under another.
12225         (pad_to_column): New function.
12226
12227 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
12228
12229         * dwarf2read.c (dwarf2_physname): Move commment.
12230
12231 2018-02-01  Leszek Swirski  <leszeks@google.com>
12232
12233         * varobj.c (varobj_formatted_print_options): Allow recursive
12234         pretty printing if pretty printing is enabled.
12235
12236 2018-02-01  Leszek Swirski  <leszeks@google.com>
12237
12238         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12239         names after a structop as a filename.
12240
12241 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12242
12243         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12244         (arm_record_coproc_data_proc): Likewise.
12245
12246 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12247
12248         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12249
12250 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
12251
12252         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12253         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12254
12255 2018-01-31  Pedro Alves  <palves@redhat.com>
12256
12257         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12258         * inflow.c (child_terminal_save_inferior): Wrap reference to
12259         tcgetpgrp in HAVE_TERMIOS_H.
12260         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12261         _WIN32.
12262         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12263         always iterate over all inferiors.
12264         (gdbsim_cntrl_c): Adjust.
12265         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12266
12267 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12268
12269         * gdbtypes.c (lookup_array_range_type): Make sure the array's
12270         index type is objfile-owned if the element type is as well.
12271
12272 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12273
12274         GDB 8.1 released.
12275
12276 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12277
12278         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12279         "features/s390x-linux64.c".
12280         (_initialize_s390_linux_tdep): Remove initialization of tdescs
12281         s390_linux32 and s390x_linux64.
12282         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12283         default tdesc.
12284         * s390-tdep.c: Include "features/s390-linux32.c" and
12285         "features/s390x-linux64.c".
12286         (s390_tdesc_valid): Add check for tdesc_has_registers.
12287         (s390_gdbarch_init): Make sure there is always a valid tdesc.
12288         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12289         tdesc_s390x_linux64.
12290         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12291         tdesc_s390x_linux64 to...
12292         * s390-tdep.h: ...here.
12293
12294 2018-01-30  Pedro Alves  <palves@redhat.com>
12295
12296         PR gdb/13211
12297         * config.in, configure: Regenerate.
12298         * configure.ac: Check for getpgid.
12299         * go32-nat.c (go32_pass_ctrlc): New.
12300         (go32_target): Install it.
12301         * inf-child.c (inf_child_target): Install
12302         child_terminal_save_inferior, child_pass_ctrlc and
12303         child_interrupt.
12304         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12305         (inf_ptrace_target): No longer install it.
12306         * infcmd.c (interrupt_target_1): Adjust.
12307         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12308         (child_interrupt): Declare.
12309         (inferior::terminal_state): New.
12310         * inflow.c (struct terminal_info): Update comments.
12311         (inferior_process_group): Delete.
12312         (terminal_is_ours): Delete.
12313         (gdb_tty_state): New.
12314         (child_terminal_init): Adjust.
12315         (is_gdb_terminal, sharing_input_terminal_1)
12316         (sharing_input_terminal): New functions.
12317         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
12318         Set the process's actual process group in the foreground if
12319         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
12320         mark terminal as the inferior's if not sharing GDB's terminal.
12321         Don't check attach_flag.
12322         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12323         pass down a target_terminal_state.
12324         (child_terminal_save_inferior): New, factored out from ...
12325         (child_terminal_ours_1): ... this.  Handle
12326         target_terminal_state::is_ours_for_output.
12327         (child_interrupt, child_pass_ctrlc): New.
12328         (inflow_inferior_exit): Clear the inferior's terminal_state.
12329         (copy_terminal_info): Copy the inferior's terminal state.
12330         (_initialize_inflow): Remove reference to terminal_is_ours.
12331         * inflow.h (inferior_process_group): Delete.
12332         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12333         * procfs.c (procfs_target): Don't install procfs_interrupt.
12334         (procfs_interrupt): Delete.
12335         * remote.c (remote_serial_quit_handler): Adjust.
12336         (remote_interrupt): Remove ptid parameter.  Adjust.
12337         * target-delegates.c: Regenerate.
12338         * target.c: Include "terminal.h".
12339         (target_terminal::terminal_state): Rename to ...
12340         (target_terminal::m_terminal_state): ... this.
12341         (target_terminal::init): Adjust.
12342         (target_terminal::inferior): Adjust to per-inferior
12343         terminal_state.
12344         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12345         (target_terminal::ours, target_terminal::ours_for_output): Use
12346         target_terminal_is_ours_kind.
12347         (target_interrupt): Remove ptid parameter.  Adjust.
12348         (default_target_pass_ctrlc): Adjust.
12349         * target.h (target_ops::to_terminal_save_inferior): New field.
12350         (target_ops::to_interrupt): Remove ptid_t parameter.
12351         (target_interrupt): Remove ptid_t parameter.  Update comment.
12352         (target_pass_ctrlc): Update comment.
12353         * target/target.h (target_terminal_state): New scoped enum,
12354         factored out of ...
12355         (target_terminal::terminal_state): ... here.
12356         (target_terminal::inferior): Update comments.
12357         (target_terminal::restore_inferior): New.
12358         (target_terminal::is_inferior, target_terminal::is_ours)
12359         (target_terminal::is_ours_for_output): Adjust.
12360         (target_terminal::scoped_restore_terminal_state): Adjust to
12361         rename, and call restore_inferior() instead of inferior().
12362         (target_terminal::scoped_restore_terminal_state::m_state): Change
12363         type.
12364         (target_terminal::terminal_state): Rename to ...
12365         (target_terminal::m_terminal_state): ... this and change type.
12366
12367 2018-01-30  Pedro Alves  <palves@redhat.com>
12368
12369         * linux-nat.c (wait_for_signal): New function.
12370         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12371         directly.
12372         (async_terminal_is_ours)
12373         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12374         (linux_nat_add_target): Don't override
12375         to_terminal_inferior/to_terminal_ours.
12376
12377 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
12378
12379         * remote.c (remote_follow_fork): Don't call "detach_inferior".
12380
12381 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
12382
12383         * dwarf2read.c (free_dwo_files): Add forward-declaration.
12384         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12385         dwarf2_per_objfile_free here.
12386         (dwarf2_per_objfile_free): Remove.
12387         (_initialize_dwarf2_read): Don't register
12388         dwarf2_per_objfile_free as a registry cleanup.
12389
12390 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
12391
12392         Avoid compilation errors in MinGW native builds
12393
12394         The error is triggered by including python-internal.h, and the
12395         error message is:
12396
12397              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12398                       from build-gnulib/import/math.h:27,
12399                       from d:/usr/Python26/include/pyport.h:235,
12400                       from d:/usr/Python26/include/Python.h:58,
12401                       from python/python-internal.h:94,
12402                       from python/py-arch.c:24:
12403              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12404         using ::hypot;
12405                 ^~~~~
12406
12407         This happens because Python headers define 'hypot' to expand t
12408         '_hypot' in the Windows builds.
12409         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12410         'hypoth'.  This avoids a compilation error.
12411
12412 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12413
12414         * MAINTAINERS (Write After Approval): Fix ordering.
12415
12416 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12417
12418         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12419
12420 2018-01-26  Alan Modra  <amodra@gmail.com>
12421
12422         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12423         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12424         Remove nop.  Make const.  Comment.
12425         (powerpc32_plt_stub_so_2): New.
12426         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12427         Correct count.  Update uses.
12428         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12429         Move common code reading PLT entry word.  Correct
12430         powerpc32_plt_stub PLT address calculation.
12431         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12432         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12433         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12434         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12435         (ppc64_standard_linkage8): Likewise.
12436         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12437         Correct insns description.
12438         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12439
12440 2018-01-24  Pedro Alves  <palves@redhat.com>
12441
12442         GCC PR libstdc++/83906
12443         * gdbtypes.c (operator==(const dynamic_prop &,
12444         const dynamic_prop &)): New.
12445         (operator==(const range_bounds &, const range_bounds &)): New.
12446         (check_types_equal): Use them instead of memcmp.
12447         * gdbtypes.h (operator==(const dynamic_prop &,
12448         const dynamic_prop &)): Declare.
12449         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12450         (operator==(const range_bounds &, const range_bounds &)): Declare.
12451         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12452
12453 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12454
12455         * s390-linux-tdep.c (s390_record_address_mask)
12456         (s390_record_calc_disp_common, s390_record_calc_disp)
12457         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12458         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12459         (s390_process_record): Move to s390-tdep.c.
12460         (s390_linux_init_abi_any): Adjust.
12461         * s390-tdep.c (s390_record_address_mask)
12462         (s390_record_calc_disp_common, s390_record_calc_disp)
12463         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12464         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12465         (s390_process_record): Moved from s390-linux-tdep.c
12466         (s390_gdbarch_init): Adjust.
12467
12468 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12469
12470         * s390-linux-nat.c (s390-tdep.h): New include.
12471         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12472         (HFILES_NO_SRCDIR): Add s390-tdep.h.
12473         (ALLDEPFILES): Add s390-tdep.c.
12474         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12475         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12476         * s390-tdep.h: ...this.  New file.
12477         * s390-linux-tdep.c (s390-tdep.h): New include.
12478         (_initialize_s390_tdep): Rename to...
12479         (_initialize_s390_linux_tdep): ...this and adjust.
12480         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12481         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12482         s390-tdep.h.
12483         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12484         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12485         (s390_is_partial_instruction, s390_software_single_step)
12486         (is_non_branch_ril, s390_displaced_step_copy_insn)
12487         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12488         (s390_prologue_data, s390_addr, s390_store, s390_load)
12489         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12490         (s390_register_call_saved, s390_guess_tracepoint_registers)
12491         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12492         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12493         (s390_pseudo_register_name, s390_pseudo_register_type)
12494         (s390_pseudo_register_read, s390_pseudo_register_write)
12495         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12496         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12497         (s390_addr_bits_remove, s390_address_class_type_flags)
12498         (s390_address_class_type_flags_to_name)
12499         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12500         (s390_function_arg_float, s390_function_arg_vector)
12501         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12502         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12503         (s390_frame_align, s390_register_return_value, s390_return_value)
12504         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12505         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12506         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12507         (s390_trad_frame_prev_register, s390_unwind_cache)
12508         (s390_prologue_frame_unwind_cache)
12509         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12510         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12511         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12512         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12513         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12514         (s390_frame_base_address, s390_local_base_address)
12515         (s390_frame_base, s390_gcc_target_options)
12516         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12517         (s390_validate_reg_range, s390_tdesc_valid)
12518         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12519         * s390-tdep.c: ...this.  New file.
12520
12521 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12522
12523         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12524         (s390_process_record, s390_gdbarch_tdep_alloc)
12525         (s390_linux_init_abi_any): Use/set new hook.
12526
12527 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12528
12529         * s390-linux-tdep.c (osabi.h): New include.
12530         (s390_linux_init_abi_31, s390_linux_init_abi_64)
12531         (s390_linux_init_abi_any): New functions.
12532         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12533
12534 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12535
12536         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12537         tdesc_has_registers check
12538
12539 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12540
12541         * s390-linux-tdep.c (s390_tdesc_valid): New function.
12542         (s390_validate_reg_range): New macro.
12543         (s390_gdbarch_init): Adjust.
12544
12545 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12546
12547         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12548         (s390_gdbarch_tdep_alloc): Adjust.
12549         (s390_gdbarch_init): Adjust.
12550
12551 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12552
12553         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12554         <have_tdb>: Change type to bool.
12555         (s390_gdbarch_tdep_alloc): Adjust.
12556         (s390_gdbarch_init): Adjust.
12557
12558 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12559
12560         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12561         (gdbarch_tdep) <have_upper, have_vx>: New fields.
12562         (s390_gdbarch_tdep_alloc): New function.
12563         (s390_gdbarch_init): Allocate tdep at start and use its fields
12564         instead of separate variables.
12565
12566 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12567
12568         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12569         when looking for cached gdbarch and add comment for remaining.
12570
12571 2018-01-22  Pedro Alves  <palves@redhat.com>
12572             Sergio Durigan Junior  <sergiodj@redhat.com>
12573
12574         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12575         case.
12576
12577 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
12578
12579         * MAINTAINERS: Update my company e-mail address.
12580
12581 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12582
12583         * regcache.c (cooked_write_test): New function.
12584         (_initialize_regcache): Register the test.
12585
12586 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12587
12588         * ia64-tdep.c (ia64_pseudo_register_read): Call
12589         regcache->cooked_read instead of regcache_cooked_read_unsigned.
12590         * m32c-tdep.c (m32c_cat_read): Likewise.
12591         (m32c_r3r2r1r0_read): Likewise.
12592         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12593         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12594
12595 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12596
12597         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12598         method raw_read instead of regcache_raw_read.
12599         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12600         * arm-tdep.c (arm_neon_quad_read): Likewise.
12601         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12602         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12603         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12604         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12605         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12606         (i386_pseudo_register_read_into_value): Likewise.
12607         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12608         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12609         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12610         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12611         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12612         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
12613         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12614         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
12615         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12616
12617 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12618
12619         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12620         * configure.tgt: Remove target mt.
12621         * mt-tdep.c: Remove.
12622         * regcache.c (cooked_read_test): Remove the check for mt.
12623
12624 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12625
12626         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12627         instead of gdbarch_pseudo_register_read_value.
12628
12629 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12630
12631         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12632         language is Ada.
12633
12634 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12635
12636         * linespec.c (create_sals_line_offset): Remove code that preserved
12637         the symtab_and_line's line number.
12638
12639 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12640
12641         * varobj.c (varobj_create): Don't set valid_block when creating a
12642         floating varobj.
12643
12644 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12645
12646         * varobj.c (varobj_create): Remove out of date comment.
12647
12648 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12649
12650         PR mi/20395
12651         * ada-exp.y (write_var_from_sym): Pass extra parameter when
12652         updating innermost block.
12653         * parse.c (innermost_block_tracker::update): Take extra type
12654         parameter, and check types match before updating innermost block.
12655         (write_dollar_variable): Update innermost block for registers.
12656         * parser-defs.h (enum innermost_block_tracker_type): New enum.
12657         (innermost_block_tracker::innermost_block_tracker): Initialise
12658         m_types member.
12659         (innermost_block_tracker::reset): Take type parameter.
12660         (innermost_block_tracker::update): Take type parameter, and pass
12661         type through as needed.
12662         (innermost_block_tracker::m_types): New member.
12663         * varobj.c (varobj_create): Pass type when reseting innermost
12664         block.
12665
12666 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12667
12668         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12669         * ada-lang.c (resolve_subexp): Likewise.
12670         * breakpoint.c (set_breakpoint_condition) Likewise.
12671         (watch_command_1) Likewise.
12672         * c-exp.y (variable): Likewise.
12673         * d-exp.y (PrimaryExpression): Likewise.
12674         * f-exp.y (variable): Likewise.
12675         * go-exp.y (variable): Likewise.
12676         * m2-exp.y (variable): Likewise.
12677         * objfiles.c (objfile::~objfile): Likewise.
12678         * p-exp.y (variable): Likewise.
12679         * parse.c (innermost_block): Change type.
12680         * parser-defs.h (class innermost_block_tracker): New.
12681         (innermost_block): Change to innermost_block_tracker.
12682         * printcmd.c (display_command): Switch to innermost_block API.
12683         (do_one_display): Likewise.
12684         * rust-exp.y (do_one_display): Likewise.
12685         * symfile.c (clear_symtab_users): Likewise.
12686         * varobj.c (varobj_create): Switch to innermost_block API, replace
12687         use of innermost_block with block stored on varobj object.
12688
12689 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12690
12691         * expression.h (innermost_block): Remove declaration.
12692         * varobj.c: Add 'parser-defs.h' include.
12693
12694 2018-01-19  Tom Tromey  <tom@tromey.com>
12695
12696         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12697         symbols in the static and global blocks.
12698
12699 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
12700
12701         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12702         gdb_ptrace.h, and move including gdb_wait.h ...
12703         * nat/linux-ptrace.h: ... to here.
12704
12705 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12706
12707         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12708         inf_ptrace_detach_success.
12709         (inf_ptrace_detach_success): Add inferior parameter, use it
12710         instead of inferior_ptid, pass it to detach_inferior.
12711         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12712         parameter.
12713         * inferior.c (detach_inferior): Add overload that takes an
12714         inferior object.
12715         * inferior.h (detach_inferior): Likewise.
12716         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12717         use inferior_ptid, adjust call to inf_ptrace_detach_success.
12718         * linux-thread-db.c (thread_db_detach): Use inf parameter.
12719
12720 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12721
12722         * target.h (struct target_ops) <to_detach>: Add inferior
12723         parameter.
12724         (target_detach): Likewise.
12725         * target.c (dispose_inferior): Pass inferior down.
12726         (target_detach): Pass inferior down.  Assert that it is equal to
12727         the current inferior.
12728         * aix-thread.c (aix_thread_detach): Pass inferior down.
12729         * corefile.c (core_file_command): Pass current_inferior() down.
12730         * corelow.c (core_detach): Add inferior parameter.
12731         * darwin-nat.c (darwin_detach): Likewise.
12732         * gnu-nat.c (gnu_detach): Likewise.
12733         * inf-ptrace.c (inf_ptrace_detach): Likewise.
12734         * infcmd.c (detach_command): Pass current_inferior() down to
12735         target_detach.
12736         * infrun.c (follow_fork_inferior): Pass parent_inf to
12737         target_detach.
12738         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12739         target_detach.
12740         * linux-nat.c (linux_nat_detach): Add inferior parameter.
12741         * linux-thread-db.c (thread_db_detach): Likewise.
12742         * nto-procfs.c (procfs_detach): Likewise.
12743         * procfs.c (procfs_detach): Likewise.
12744         * record.c (record_detach): Likewise.
12745         * record.h (struct inferior): Forward-declare.
12746         (record_detach): Add inferior parameter.
12747         * remote-sim.c (gdbsim_detach): Likewise.
12748         * remote.c (remote_detach_1): Likewise.
12749         (remote_detach): Likewise.
12750         (extended_remote_detach): Likewise.
12751         * sol-thread.c (sol_thread_detach): Likewise.
12752         * target-debug.h (target_debug_print_inferior_p): New macro.
12753         * target-delegates.c: Re-generate.
12754         * top.c (kill_or_detach): Pass inferior down to target_detach.
12755         * windows-nat.c (windows_detach): Add inferior parameter.
12756
12757 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12758
12759         * target.h (struct target_ops) <to_detach>: Remove args
12760         parameter.
12761         (target_detach): Likewise.
12762         * target.c (dispose_inferior): Adjust.
12763         (target_detach): Remove args parameter, adjust.
12764         * aix-thread.c (aix_thread_detach): Adjust.
12765         * corefile.c (core_file_command): Adjust.
12766         * corelow.c (core_detach): Adjust.
12767         * darwin-nat.c (darwin_detach): Adjust.
12768         * gnu-nat.c (gnu_detach): Adjust.
12769         * inf-ptrace.c (inf_ptrace_detach): Adjust.
12770         * infcmd.c (detach_command): Adjust
12771         * infrun.c (follow_fork_inferior): Adjust.
12772         (handle_vfork_child_exec_or_exit): Adjust.
12773         * linux-fork.c (linux_fork_detach): Remove args parameter.
12774         * linux-fork.h (linux_fork_detach): Likewise.
12775         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12776         * linux-thread-db.c (thread_db_detach): Likewise.
12777         * nto-procfs.c (procfs_detach): Likewise.
12778         * procfs.c (procfs_detach): Likewise.
12779         (do_detach): Remove signo parameter.
12780         * record.c (record_detach): Remove args parameter.
12781         * record.h (record_detach): Likewise.
12782         * remote-sim.c (gdbsim_detach): Likewise.
12783         * remote.c (remote_detach_1): Likewise.
12784         (remote_detach): Likewise.
12785         (extended_remote_detach): Likewise.
12786         * sol-thread.c (sol_thread_detach): Likewise.
12787         * target-delegates.c: Re-generate.
12788         * top.c (struct qt_args) <args>: Remove field.
12789         (kill_or_detach): Don't pass args.
12790         (quit_force): Don't set args.
12791         * windows-nat.c (windows_detach): Remove args parameter.
12792
12793 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12794
12795         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12796         (arm_linux_init_abi): Install it.
12797
12798 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12799
12800         * osabi.c (gdb_osabi_names): Extend the regexp for
12801         arm-linux-gnueabihf.
12802
12803 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12804
12805         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12806         m_abbrevs.
12807         (abbrev_table::add_abbrev): Update.
12808         (abbrev_table::lookup_abbrev): Update.
12809
12810 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12811
12812         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12813
12814 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
12815
12816         * compile/compile.c (compile_to_object): Convert "triplet_rx"
12817         to "std::string".
12818
12819 2018-01-17  Tom Tromey  <tom@tromey.com>
12820
12821         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
12822
12823 2018-01-17  Tom Tromey  <tom@tromey.com>
12824
12825         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12826         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12827         (create_array_type_with_stride): Update.
12828         * dwarf2read.c (set_die_type): Update.
12829
12830 2018-01-17  Tom Tromey  <tom@tromey.com>
12831
12832         * dwarf2read.c (delayed_method_info): Remove typedef.
12833         (dwarf2_cu::method_info): Now a std::vector.
12834         (add_to_method_list): Update.
12835         (free_delayed_list): Remove.
12836         (compute_delayed_physnames): Update.
12837         (process_full_comp_unit, process_full_type_unit): Clear the method
12838         list.  Remove cleanups.
12839         (psymtab_include_file_name): Add name_holder parameter.  Use
12840         unique_xmalloc_ptr.
12841         (dwarf_decode_lines): Update.
12842
12843 2018-01-17  Tom Tromey  <tom@tromey.com>
12844             Simon Marchi  <simon.marchi@ericsson.com>
12845
12846         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12847         (dwarf2_per_objfile::free_cached_comp_units)
12848         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12849         (init_cutu_and_read_dies_no_follow): Update.
12850         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12851         (dwarf2_cu::~dwarf2_cu): New.
12852         (free_heap_comp_unit, free_stack_comp_unit): Remove.
12853         (age_cached_comp_units, free_one_cached_comp_unit): Update.
12854
12855 2018-01-17  Tom Tromey  <tom@tromey.com>
12856             Simon Marchi  <simon.marchi@ericsson.com>
12857
12858         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12859         (struct die_reader_specs) <abbrev_table>: New member.
12860         (struct abbrev_table): Add constructor.
12861         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12862         <abbrev_obstack>: Now an auto_obstack.
12863         (abbrev_table_up): New typedef.
12864         (init_cu_die_reader): Add abbrev_table parameter.
12865         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12866         Add result_dwo_abbrev_table.
12867         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12868         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
12869         Update.
12870         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
12871         parameter.
12872         (skip_children): Update.
12873         (abbrev_table::alloc_abbrev): Rename from
12874         abbrev_table_alloc_abbrev.
12875         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
12876         (abbrev_table::lookup_abbrev): Rename from
12877         abbrev_table_lookup_abbrev.
12878         (abbrev_table_read_table): Return abbrev_table_up.
12879         (abbrev_table_free, abbrev_table_free_cleanup)
12880         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
12881         (load_partial_dies): Update.
12882
12883 2018-01-17  Tom Tromey  <tom@tromey.com>
12884
12885         * dwarf2read.c (dwarf2_compute_name): Update comment.
12886         (read_func_scope, read_variable): Update.
12887         (new_symbol): Remove.
12888         (new_symbol_full): Rename to new_symbol.
12889
12890 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
12891
12892         PR gdb/16577
12893         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
12894         a warning instead of throwing an error, set section size to 0 and return
12895         NULL.
12896         * gdb_bfd.h (gdb_bfd_map_section): Update description.
12897
12898 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12899
12900         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
12901         std::string.
12902         (linux_ptrace_attach_fail_reason_string): Likewise.
12903         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
12904         Likewise.
12905         (linux_ptrace_attach_fail_reason_string): Likewise.
12906         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
12907
12908 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
12909
12910         * linux-nat.c (linux_nat_attach): Remove xstrdup.
12911
12912 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
12913
12914         PR gdb/21559
12915         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12916         checking for fs_base/gs_base fields in struct user_regs_struct.
12917         * configure: Regenerate.
12918
12919 2018-01-17  Yao Qi  <yao.qi@linaro.org>
12920
12921         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12922         function.
12923         (aarch64_linux_init_abi): Install it to gdbarch hook
12924         gcc_target_options.
12925
12926 2018-01-15  Pedro Alves  <palves@redhat.com>
12927
12928         * common/signals-state-save-restore.c
12929         (save_original_signals_state): Fix typos.
12930
12931 2017-01-12  Tom Tromey  <tom@tromey.com>
12932             Sergio Durigan Junior  <sergiodj@redhat.com>
12933
12934         * Makefile.in (install-only): Install gdb-add-index.
12935
12936 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
12937
12938         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12939
12940 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12941
12942         * infrun.c (keep_going_pass_signal): Clear step-over info when
12943         insert_breakpoints fails.
12944
12945 2018-01-11  Pedro Alves  <palves@redhat.com>
12946
12947         PR gdb/22583
12948         * infrun.c (resume): Rename to ...
12949         (resume_1): ... this.
12950         (resume): Reimplement as wrapper around resume_1.
12951
12952 2018-01-11  Pedro Alves  <palves@redhat.com>
12953
12954         PR remote/22597
12955         * remote.c (remote_parse_stop_reply): Default to the last-set
12956         general thread instead of to 'magic_null_ptid'.
12957
12958 2018-01-10  Pedro Alves  <palves@redhat.com>
12959
12960         * language.h (language_get_symbol_name_matcher): Rename ...
12961         (get_symbol_name_matcher): ... this.
12962         * language.c (language_get_symbol_name_matcher): Ditto.
12963         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12964         callers adjusted.
12965
12966 2018-01-10  Pedro Alves  <palves@redhat.com>
12967
12968         PR gdb/22670
12969         * dwarf2read.c
12970         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12971         Adjust to use language_get_symbol_name_matcher instead of
12972         language_defn::la_get_symbol_name_matcher.
12973         * language.c (language_get_symbol_name_matcher): If in Ada mode
12974         and the lookup name is a verbatim match, return Ada's matcher.
12975         * language.h (language_get_symbol_name_matcher): Adjust comment.
12976         (ada_lookup_name_info::verbatim_p):: New method.
12977
12978 2018-01-10  Pedro Alves  <palves@redhat.com>
12979
12980         PR gdb/22670
12981         * ada-lang.c (ada_collect_symbol_completion_matches): If the
12982         minsym's language is language_auto or language_cplus, pass down
12983         language_ada instead.
12984         * symtab.c (compare_symbol_name): Don't frob symbol language here.
12985
12986 2018-01-10  Pedro Alves  <palves@redhat.com>
12987
12988         PR gdb/22670
12989         * minsyms.c (linkage_name_str): New function.
12990         (iterate_over_minimal_symbols): Use it.
12991
12992 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12993
12994         * NEWS: Document that 'info proc' now works on FreeBSD.
12995
12996 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
12997
12998         * configure.ac: Check for kinfo_getfile in libutil.
12999         * configure: Regenerate.
13000         * config.in: Regenerate.
13001         * fbsd-nat.c: Include "fbsd-tdep.h".
13002         (fbsd_fetch_cmdline): New.
13003         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13004         rather than calling error.
13005         (fbsd_info_proc): New.
13006         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13007         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13008         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13009
13010 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13011
13012         * fbsd-nat.c (struct free_deleter): Remove.
13013         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13014
13015 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13016
13017         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13018         NULL for an empty pathname.
13019
13020 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13021
13022         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13023         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13024         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13025         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13026         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13027         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13028         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13029         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13030         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13031         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13032         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13033         (fbsd_core_fetch_timeval, fbsd_print_sigset)
13034         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13035         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
13036         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13037
13038 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
13039
13040         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13041         (gnu_xfer_auxv): New function.
13042         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13043         TARGET_OBJECT_AUXV.
13044
13045 2018-01-08  Yao Qi  <yao.qi@linaro.org>
13046             Simon Marchi  <simon.marchi@ericsson.com>
13047
13048         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13049         common/selftest.c.
13050         (COMMON_OBS): Remove selftest.o.
13051         * configure.ac: Append selftest-arch.c and common/selftest.c to
13052         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
13053         * configure: Re-generated.
13054         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13055         GDB_SELF_TEST.
13056         (maintenance_info_selftests): Likewise.
13057
13058 2018-01-08  Xavier Roirand  <roirand@adacore.com>
13059
13060         * ada-valprint.c (val_print_packed_array_elements): Use
13061         proper number of elements when printing an array indexed
13062         by an enumeration type.
13063
13064 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13065
13066         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13067         (dw2_get_file_names_reader): Adjust.
13068         (lookup_dwo_signatured_type): Adjust.
13069         (lookup_dwp_signatured_type): Adjust.
13070         (lookup_signatured_type): Adjust.
13071         (create_type_unit_group): Adjust.
13072         (get_type_unit_group): Adjust.
13073         (process_psymtab_comp_unit_reader): Adjust.
13074         (build_type_psymtabs_reader): Adjust.
13075         (scan_partial_symbols): Adjust.
13076         (add_partial_symbol): Adjust.
13077         (add_partial_subprogram): Adjust.
13078         (peek_die_abbrev): Adjust.
13079         (fixup_go_packaging): Adjust.
13080         (process_imported_unit_die): Adjust.
13081         (dwarf2_compute_name): Adjust.
13082         (dwarf2_physname): Adjust.
13083         (read_import_statement): Adjust.
13084         (handle_DW_AT_stmt_list): Adjust.
13085         (read_file_scope): Adjust.
13086         (read_func_scope): Adjust.
13087         (read_lexical_block_scope): Adjust.
13088         (read_call_site_scope): Adjust.
13089         (read_variable): Adjust.
13090         (dwarf2_rnglists_process): Adjust.
13091         (dwarf2_ranges_process): Adjust.
13092         (dwarf2_ranges_read): Adjust.
13093         (dwarf2_get_pc_bounds): Adjust.
13094         (dwarf2_record_block_ranges): Adjust.
13095         (dwarf2_add_field): Adjust.
13096         (dwarf2_add_member_fn): Adjust.
13097         (read_structure_type): Adjust.
13098         (process_structure_scope): Adjust.
13099         (read_enumeration_type): Adjust.
13100         (read_array_type): Adjust.
13101         (mark_common_block_symbol_computed): Adjust.
13102         (read_common_block): Adjust.
13103         (read_namespace_type): Adjust.
13104         (read_namespace): Adjust.
13105         (read_module_type): Adjust.
13106         (read_tag_pointer_type): Adjust.
13107         (read_tag_ptr_to_member_type): Adjust.
13108         (read_tag_string_type): Adjust.
13109         (read_subroutine_type): Adjust.
13110         (read_typedef): Adjust.
13111         (read_base_type): Adjust.
13112         (attr_to_dynamic_prop): Adjust.
13113         (read_subrange_type): Adjust.
13114         (read_unspecified_type): Adjust.
13115         (dwarf2_read_abbrevs): Adjust.
13116         (load_partial_dies): Adjust.
13117         (read_partial_die): Adjust.
13118         (find_partial_die): Adjust.
13119         (guess_partial_die_structure_name): Adjust.
13120         (fixup_partial_die): Adjust.
13121         (read_attribute_value): Adjust.
13122         (read_addr_index): Adjust.
13123         (read_addr_index_from_leb128): Adjust.
13124         (read_str_index): Adjust.
13125         (dwarf2_string_attr): Adjust.
13126         (get_debug_line_section): Adjust.
13127         (dwarf_decode_line_header): Adjust.
13128         (lnp_state_machine::check_line_address): Adjust.
13129         (dwarf_decode_lines_1): Adjust.
13130         (dwarf_decode_lines): Adjust.
13131         (dwarf2_start_symtab): Adjust.
13132         (var_decode_location): Adjust.
13133         (new_symbol_full): Adjust.
13134         (dwarf2_const_value_data): Adjust.
13135         (dwarf2_const_value_attr): Adjust.
13136         (dwarf2_const_value): Adjust.
13137         (die_type): Adjust.
13138         (die_containing_type): Adjust.
13139         (build_error_marker_type): Adjust.
13140         (lookup_die_type): Adjust.
13141         (guess_full_die_structure_name): Adjust.
13142         (anonymous_struct_prefix): Adjust.
13143         (determine_prefix): Adjust.
13144         (dwarf2_name): Adjust.
13145         (follow_die_ref_or_sig): Adjust.
13146         (follow_die_offset): Adjust.
13147         (follow_die_ref): Adjust.
13148         (follow_die_sig_1): Adjust.
13149         (follow_die_sig): Adjust.
13150         (get_signatured_type): Adjust.
13151         (get_DW_AT_signature_type): Adjust.
13152         (decode_locdesc): Adjust.
13153         (dwarf_decode_macros): Adjust.
13154         (cu_debug_loc_section): Adjust.
13155         (fill_in_loclist_baton): Adjust.
13156         (dwarf2_symbol_mark_computed): Adjust.
13157         (init_one_comp_unit): Don't assign
13158         dwarf2_cu::dwarf2_per_objfile.
13159         (set_die_type): Adjust.
13160
13161 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13162
13163         * dwarf2read.c (struct mapped_debug_names): Add constructor.
13164         <dwarf2_per_objfile>: New field.
13165         (dwarf2_per_objfile): Remove global.
13166         (get_dwarf2_per_objfile): New function.
13167         (set_dwarf2_per_objfile): New function.
13168         (dwarf2_build_psymtabs_hard): Change objfile parameter to
13169         dwarf2_per_objfile.
13170         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13171         (read_abbrev_offset): Likewise.
13172         (read_indirect_string): Likewise.
13173         (read_indirect_line_string): Likewise.
13174         (read_indirect_string_at_offset): Likewise.
13175         (read_indirect_string_from_dwz): Likewise.
13176         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13177         dwarf2_per_objfile.
13178         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13179         (create_all_comp_units): Change objfile parameter to
13180         dwarf2_per_objfile.
13181         (create_all_type_units): Likewise.
13182         (process_queue): Add dwarf2_per_objfile parameter.
13183         (read_and_check_comp_unit_head): Likewise.
13184         (lookup_dwo_unit_in_dwp): Likewise.
13185         (get_dwp_file): Likewise.
13186         (process_cu_includes): Likewise.
13187         (struct free_dwo_file_cleanup_data): New struct.
13188         (dwarf2_has_info): Use get_dwarf2_per_objfile and
13189         set_dwarf2_per_objfile.
13190         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13191         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13192         context, adjust calls.
13193         (dw2_instantiate_symtab): Likewise.
13194         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13195         (dw2_get_cu): Likewise.
13196         (create_cu_from_index_list): Change objfile parameter to
13197         dwarf2_per_objfile.
13198         (create_cus_from_index_list): Get dwarf2_per_objfile from
13199         context, adjust calls.
13200         (create_cus_from_index): Likewise.
13201         (create_signatured_type_table_from_index): Change objfile
13202         parameter to dwarf2_per_objfile.
13203         (create_signatured_type_table_from_debug_names): Change objfile
13204         parameter to dwarf2_per_objfile.
13205         (create_addrmap_from_index): Likewise.
13206         (create_addrmap_from_aranges): Likewise.
13207         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13208         (dw2_setup): Remove.
13209         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13210         context.
13211         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13212         get_dwarf2_per_objfile.
13213         (dw2_forget_cached_source_info): Likewise.
13214         (dw2_map_symtabs_matching_filename): Likewise.
13215         (struct dw2_symtab_iterator) <index>: Remove.
13216         <dwarf2_per_objfile>: New field.
13217         (dw2_symtab_iter_init): Replace index parameter with
13218         dwarf2_per_objfile.
13219         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13220         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13221         (dw2_print_stats): Likewise.
13222         (dw2_dump): Likewise.
13223         (dw2_expand_symtabs_for_function): Likewise.
13224         (dw2_expand_all_symtabs): Likewise.
13225         (dw2_expand_symtabs_with_fullname): Likewise.
13226         (dw2_expand_marked_cus): Replace index and objfile parameters
13227         with dwarf2_per_objfile.
13228         (dw_expand_symtabs_matching_file_matcher): Add
13229         dwarf2_per_objfile parameter and adjust calls.
13230         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13231         adjust calls.
13232         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13233         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13234         adjust calls.
13235         (create_cus_from_debug_names_list): Replace objfile parameter
13236         with dwarf2_per_objfile and adjust calls.
13237         (create_cus_from_debug_names): Likewise.
13238         (dwarf2_read_debug_names): Likewise.
13239         (mapped_debug_names::namei_to_name): Adjust call.
13240         (dw2_debug_names_iterator::next): Likewise.
13241         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13242         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13243         (dw2_debug_names_dump): Likewise.
13244         (dw2_debug_names_expand_symtabs_for_function): Likewise.
13245         (dw2_debug_names_expand_symtabs_matching): Likewise.
13246         (dwarf2_initialize_objfile): Likewise.
13247         (dwarf2_build_psymtabs): Likewise.
13248         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13249         this_cu.
13250         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13251         (read_and_check_comp_unit_head): Likewise.
13252         (read_abbrev_offset): Likewise.
13253         (create_debug_type_hash_table): Likewise.
13254         (create_debug_types_hash_table): Likewise.
13255         (create_all_type_units): Replace objfile parameter with
13256         dwarf2_per_objfile.
13257         (add_type_unit): Add dwarf2_per_objfile parameter.
13258         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13259         with dwarf2_per_objfile.
13260         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13261         (lookup_dwp_signatured_type): Likewise.
13262         (lookup_signatured_type): Likewise.
13263         (read_cutu_die_from_dwo): Likewise.
13264         (init_tu_and_read_dwo_dies): Likewise.
13265         (init_cutu_and_read_dies): Likewise.
13266         (init_cutu_and_read_dies_no_follow): Likewise.
13267         (allocate_type_unit_groups_table): Add objfile parameter.
13268         (create_type_unit_group): Use dwarf2_per_objfile from cu.
13269         (get_type_unit_group): Likewise.
13270         (process_psymtab_comp_unit): Update call.
13271         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13272         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13273         (print_tu_stats): Likewise.
13274         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13275         in void* parameter.
13276         (build_type_psymtabs): Change objfile parameter to
13277         dwarf2_per_objfile.
13278         (process_skeletonless_type_unit): Use dwarf2_per_objfile
13279         passed in void* parameter.
13280         (process_skeletonless_type_units): Change objfile parameter to
13281         dwarf2_per_objfile.
13282         (set_partial_user): Likewise.
13283         (dwarf2_build_psymtabs_hard): Likewise.
13284         (read_comp_units_from_section): Likewise.
13285         (create_all_comp_units): Likewise.
13286         (scan_partial_symbols): Update calls.
13287         (add_partial_symbol): Likewise.
13288         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13289         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13290         (process_queue): Add dwarf2_per_objfile parameter.
13291         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13292         (compute_compunit_symtab_includes): Likewise.
13293         (process_cu_includes): Add dwarf2_per_objfile parameter.
13294         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13295         (process_full_type_unit): Likewise.
13296         (process_imported_unit_die): Update call.
13297         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13298         (read_file_scope): Likewise.
13299         (allocate_dwo_file_hash_table): Add objfile parameter.
13300         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13301         (create_cus_hash_table): Likewise.
13302         (create_dwp_hash_table): Likewise.
13303         (create_dwo_unit_in_dwp_v1): Likewise.
13304         (create_dwp_v2_section): Likewise.
13305         (create_dwo_unit_in_dwp_v2): Likewise.
13306         (lookup_dwo_unit_in_dwp): Likewise.
13307         (try_open_dwop_file): Likewise.
13308         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13309         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13310         cleanup to include a reference to dwarf2_per_objfile.
13311         (open_dwp_file): Add dwarf2_per_objfile parameter.
13312         (open_and_init_dwp_file): Likewise.
13313         (get_dwp_file): Likewise.
13314         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13315         (queue_and_load_all_dwo_tus): Update call.
13316         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13317         data.
13318         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13319         (dwarf2_ranges_process): Likewise.
13320         (dwarf2_get_pc_bounds): Likewise.
13321         (mark_common_block_symbol_computed): Likewise.
13322         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13323         (dwarf2_read_abbrevs): Update call.
13324         (read_partial_die): Use dwarf2_per_objfile from cu.
13325         (find_partial_die): Likewise.
13326         (fixup_partial_die): Likewise.
13327         (read_attribute_value): Likewise.
13328         (read_indirect_string_at_offset_from): Add objfile parameter.
13329         (read_indirect_string_at_offset): Add dwarf2_per_objfile
13330         parameter.
13331         (read_indirect_string_from_dwz): Add objfile parameter.
13332         (read_indirect_string): Add objfile parameter.
13333         (read_addr_index_1): Add dwarf2_per_objfile parameter.
13334         (read_addr_index): Use dwarf2_per_objfile from cu.
13335         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13336         call dw2_setup.
13337         (read_str_index): Use dwarf2_per_objfile from cu.
13338         (get_debug_line_section): Likewise.
13339         (read_formatted_entries): Add dwarf2_per_objfile parameter.
13340         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13341         (new_symbol_full): Use dwarf2_per_objfile from cu.
13342         (build_error_marker_type): Likewise.
13343         (lookup_die_type): Likewise.
13344         (determine_prefix): Likewise.
13345         (follow_die_offset): Likewise.
13346         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13347         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13348         (dwarf2_fetch_die_type_sect_off): Likewise.
13349         (dwarf2_get_die_type): Likewise.
13350         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13351         (get_signatured_type): Likewise.
13352         (get_DW_AT_signature_type): Likewise.
13353         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13354         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13355         (cu_debug_loc_section): Likewise.
13356         (fill_in_loclist_baton): Likewise.
13357         (dwarf2_symbol_mark_computed): Likewise.
13358         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13359         dwarf2_per_objfile.
13360         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13361         parameter.
13362         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13363         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13364         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13365         (set_die_type): Use dwarf2_free_objfile from cu.
13366         (get_die_type_at_offset): Likewise.
13367         (dwarf2_per_objfile_free): Don't assign global variable.
13368         (debug_names) <constructor>: Add dwarf2_per_objfile
13369         parameter, update m_debugstrlookup construction.
13370         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13371         parameter.
13372         <m_dwarf2_per_objfile>: New field.
13373         <lookup>: Use m_dwarf2_per_objfile.
13374         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13375         (psyms_seen_size): Likewise.
13376         (write_gdbindex): Replace objfile parameter with
13377         dwarf2_per_objfile.
13378         (write_debug_names): Likewise.
13379         (write_psymtabs_to_index): Likewise.
13380         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13381         calls.
13382
13383 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13384
13385         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13386         <dwarf2_per_objfile>: New field.
13387         (struct dwarf2_per_cu_data) <objfile>: Remove.
13388         <dwarf2_per_objfile>: New field.
13389         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13390         of objfile.
13391         (create_signatured_type_table_from_index): Likewise.
13392         (create_debug_type_hash_table): Likewise.
13393         (fill_in_sig_entry_from_dwo_entry): Likewise.
13394         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13395         (create_type_unit_group): Assign dwarf2_per_objfile instead of
13396         objfile.
13397         (create_partial_symtab): Access objfile through
13398         dwarf2_per_objfile.
13399         (process_psymtab_comp_unit_reader): Likewise.
13400         (read_comp_units_from_section): Likewise.
13401         (scan_partial_symbols): Likewise.
13402         (add_partial_symbol): Likewise.
13403         (add_partial_subprogram): Likewise.
13404         (peek_die_abbrev): Likewise.
13405         (fixup_go_packaging): Likewise.
13406         (process_full_comp_unit): Likewise.
13407         (process_full_type_unit): Likewise.
13408         (process_imported_unit_die): Likewise.
13409         (dwarf2_compute_name): Likewise.
13410         (dwarf2_physname): Likewise.
13411         (read_import_statement): Likewise.
13412         (create_cus_hash_table): Assign dwarf2_physname instead of
13413         objfile.
13414         (read_func_scope): Access objfile through dwarf2_per_objfile.
13415         (read_lexical_block_scope): Likewise.
13416         (read_call_site_scope): Likewise.
13417         (read_variable): Likewise.
13418         (dwarf2_rnglists_process): Likewise.
13419         (dwarf2_ranges_process): Likewise.
13420         (dwarf2_ranges_read): Likewise.
13421         (dwarf2_record_block_ranges): Likewise.
13422         (dwarf2_add_field): Likewise.
13423         (dwarf2_add_member_fn): Likewise.
13424         (read_structure_type): Likewise.
13425         (process_structure_scope): Likewise.
13426         (read_enumeration_type): Likewise.
13427         (read_array_type): Likewise.
13428         (read_common_block): Likewise.
13429         (read_namespace_type): Likewise.
13430         (read_namespace): Likewise.
13431         (read_module_type): Likewise.
13432         (read_tag_pointer_type): Likewise.
13433         (read_tag_ptr_to_member_type): Likewise.
13434         (read_tag_string_type): Likewise.
13435         (read_subroutine_type): Likewise.
13436         (read_typedef): Likewise.
13437         (read_base_type): Likewise.
13438         (attr_to_dynamic_prop): Likewise.
13439         (read_subrange_type): Likewise.
13440         (read_unspecified_type): Likewise.
13441         (load_partial_dies): Likewise.
13442         (read_partial_die): Likewise.
13443         (find_partial_die): Likewise.
13444         (guess_partial_die_structure_name): Likewise.
13445         (fixup_partial_die): Likewise.
13446         (read_attribute_value): Likewise.
13447         (read_addr_index_from_leb128): Likewise.
13448         (dwarf2_read_addr_index): Likewise.
13449         (dwarf2_string_attr): Likewise.
13450         (lnp_state_machine::check_line_address): Likewise.
13451         (dwarf_decode_lines_1): Likewise.
13452         (dwarf_decode_lines): Likewise.
13453         (dwarf2_start_symtab): Likewise.
13454         (var_decode_location): Likewise.
13455         (new_symbol_full): Likewise.
13456         (dwarf2_const_value_data): Likewise.
13457         (dwarf2_const_value_attr): Likewise.
13458         (dwarf2_const_value): Likewise.
13459         (die_type): Likewise.
13460         (die_containing_type): Likewise.
13461         (lookup_die_type): Likewise.
13462         (guess_full_die_structure_name): Likewise.
13463         (anonymous_struct_prefix): Likewise.
13464         (dwarf2_name): Likewise.
13465         (follow_die_ref_or_sig): Likewise.
13466         (follow_die_offset): Likewise.
13467         (follow_die_ref): Likewise.
13468         (dwarf2_fetch_die_loc_sect_off): Likewise.
13469         (dwarf2_fetch_constant_bytes): Likewise.
13470         (dwarf2_fetch_die_type_sect_off): Likewise.
13471         (dwarf2_get_die_type): Likewise.
13472         (follow_die_sig): Likewise.
13473         (decode_locdesc): Likewise.
13474         (dwarf2_per_cu_objfile): Likewise.
13475         (dwarf2_per_cu_text_offset): Likewise.
13476         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13477         objfile.
13478         (set_die_type): Access objfile through
13479         dwarf2_per_objfile.
13480
13481 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13482
13483         * valprint.c (converted_character_d): Remove typedef.
13484         (DEF_VEC_O (converted_character_d)): Remove.
13485         (count_next_character): Use std::vector.
13486         (print_converted_chars_to_obstack): Likewise.
13487         (generic_printstr): Likewise.
13488
13489 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13490
13491         * xml-support.h (struct gdb_xml_value): Add constructor.
13492         <value>: Change type to unique_xmalloc_ptr.
13493         (gdb_xml_value_s): Remove typedef.
13494         (DEF_VEC_O (gdb_xml_value_s)): Remove.
13495         (gdb_xml_element_start_handler): Change parameter type to
13496         std::vector.
13497         (xml_find_attribute): Likewise.
13498         * xml-support.c (xml_find_attribute): Change parameter type to
13499         std::vector and adjust.
13500         (gdb_xml_values_cleanup): Remove.
13501         (gdb_xml_parser::start_element): Adjust to std::vector.
13502         (xinclude_start_include): Change paraeter type to std::vector
13503         and adjust.
13504         * btrace.c (check_xml_btrace_version): Likewise.
13505         (parse_xml_btrace_block): Likewise.
13506         (parse_xml_btrace_pt_config_cpu): Likewise.
13507         (parse_xml_btrace_pt): Likewise.
13508         (parse_xml_btrace_conf_bts): Likewise.
13509         (parse_xml_btrace_conf_pt): Likewise.
13510         * memory-map.c (memory_map_start_memory): Likewise.
13511         (memory_map_start_property): Likewise.
13512         * osdata.c (osdata_start_osdata): Likewise.
13513         (osdata_start_item): Likewise.
13514         (osdata_start_column): Likewise.
13515         * remote.c (start_thread): Likewise.
13516         * solib-aix.c (library_list_start_library): Likewise.
13517         (library_list_start_list): Likewise.
13518         * solib-svr4.c (library_list_start_library): Likewise.
13519         (svr4_library_list_start_list): Likewise.
13520         * solib-target.c (library_list_start_segment): Likewise.
13521         (library_list_start_section): Likewise.
13522         (library_list_start_library): Likewise.
13523         (library_list_start_list): Likewise.
13524         * tracepoint.c (traceframe_info_start_memory): Likewise.
13525         (traceframe_info_start_tvar): Likewise.
13526         * xml-syscall.c (syscall_start_syscall): Likewise.
13527         * xml-tdesc.c (tdesc_start_target): Likewise.
13528         (tdesc_start_feature): Likewise.
13529         (tdesc_start_reg): Likewise.
13530         (tdesc_start_union): Likewise.
13531         (tdesc_start_struct): Likewise.
13532         (tdesc_start_flags): Likewise.
13533         (tdesc_start_enum): Likewise.
13534         (tdesc_start_field): Likewise.
13535         (tdesc_start_enum_value): Likewise.
13536         (tdesc_start_vector): Likewise.
13537
13538 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13539
13540         * extension.h (struct xmethod_worker) <clone>: Remove.
13541         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13542         Remove.
13543         (python_xmethod_worker::clone): Remove.
13544         * valops.c (find_overload_match): Use std::move instead of
13545         clone.
13546
13547 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13548
13549         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13550         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13551         <free_xmethod_worker_data>: Remove.
13552         <get_matching_xmethod_workers>: Chance VEC to std::vector.
13553         <get_xmethod_arg_types>: Remove.
13554         <get_xmethod_result_type>: Remove.
13555         <invoke_xmethod>: Remove.
13556         * extension.c (new_xmethod_worker): Remove.
13557         (clone_xmethod_worker): Remove.
13558         (get_matching_xmethod_workers): Return void, pass std::vector by
13559         pointer.
13560         (get_xmethod_arg_types): Rename to...
13561         (xmethod_worker::get_arg_types): ... this, and adjust.
13562         (get_xmethod_result_type): Rename to...
13563         (xmethod_worker::get_result_type): ... this, and adjust.
13564         (invoke_xmethod): Remove.
13565         (free_xmethod_worker): Remove.
13566         (free_xmethod_worker_vec): Remove.
13567         * extension.h (enum ext_lang_rc): Move here from
13568         extension-priv.h.
13569         (struct xmethod_worker): Add constructor and destructor.
13570         <data>: Remove.
13571         <value>: Remove.
13572         <invoke, clone, do_get_result_type, do_get_arg_types>: New
13573         virtual pure methods.
13574         <get_arg_types, get_result_type>: New methods.
13575         (xmethod_worker_ptr): Remove typedef.
13576         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13577         (xmethod_worker_vec): Remove typedef.
13578         (xmethod_worker_up): New typedef.
13579         (invoke_xmethod): Remove.
13580         (clone_xmethod_worker): Remove.
13581         (free_xmethod_worker): Remove.
13582         (free_xmethod_worker_vec): Remove.
13583         (get_xmethod_arg_types): Remove.
13584         (get_xmethod_result_type): Remove.
13585         * valops.c (find_method_list): Use std::vector, don't use
13586         intermediate vector.
13587         (value_find_oload_method_list): Use std::vector.
13588         (find_overload_match): Use std::vector.
13589         (find_oload_champ): Use std::vector.
13590         * value.c (value_free): Use operator delete.
13591         (value_of_xmethod): Rename to...
13592         (value_from_xmethod): ... this.  Don't assign
13593         xmethod_worker::value, take rvalue-reference.
13594         (result_type_of_xmethod): Adjust.
13595         (call_xmethod): Adjust.
13596         * value.h: Include extension.h.
13597         (struct xmethod_worker): Don't forward-declare.
13598         (value_of_xmethod): Rename to...
13599         (value_from_xmethod): ... this, take rvalue-reference.
13600         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13601         (struct python_xmethod_worker): ... this, add constructor and
13602         destructor.
13603         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13604         (gdbpy_free_xmethod_worker_data): Rename to...
13605         (python_xmethod_worker::~python_xmethod_worker): ... this and
13606         adjust.
13607         (gdbpy_clone_xmethod_worker_data): Rename to...
13608         (python_xmethod_worker::clone): ... this and adjust.
13609         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13610         temporary vector.
13611         (gdbpy_get_xmethod_arg_types): Rename to...
13612         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13613         (gdbpy_get_xmethod_result_type): Rename to...
13614         (python_xmethod_worker::do_get_result_type): ... this and
13615         adjust.
13616         (gdbpy_invoke_xmethod): Rename to...
13617         (python_xmethod_worker::invoke): ... this and adjust.
13618         (new_python_xmethod_worker): Rename to...
13619         (python_xmethod_worker::python_xmethod_worker): ... this and
13620         adjust.
13621         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13622         Remove.
13623         (gdbpy_free_xmethod_worker_data): Remove.
13624         (gdbpy_get_matching_xmethod_workers): Use std::vector.
13625         (gdbpy_get_xmethod_arg_types): Remove.
13626         (gdbpy_get_xmethod_result_type): Remove.
13627         (gdbpy_invoke_xmethod): Remove.
13628         * python/python.c (python_extension_ops): Remove obsolete
13629         callbacks.
13630
13631 2018-01-05  Pedro Alves  <palves@redhat.com>
13632
13633         PR gdb/18653
13634         * common/signals-state-save-restore.c
13635         (save_original_signals_state): New parameter 'quiet'.  Warn if we
13636         find a custom handler preinstalled, instead of internal erroring.
13637         But only warn if !quiet.
13638         * common/signals-state-save-restore.h
13639         (save_original_signals_state): New parameter 'quiet'.
13640         * main.c (captured_main_1): Move save_original_signals_state call
13641         after option handling, and pass QUIET.
13642
13643 2018-01-05  Pedro Alves  <palves@redhat.com>
13644
13645         * spu-tdep.c (spu_catch_start): Pass
13646         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13647
13648 2018-01-05  Pedro Alves  <palves@redhat.com>
13649
13650         PR gdb/22670
13651         * ada-lang.c (literal_symbol_name_matcher): New function.
13652         (ada_get_symbol_name_matcher): Use it for
13653         symbol_name_match_type::SEARCH_NAME.
13654         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
13655         it down instead of assuming symbol_name_match_type::FULL.
13656         * block.h (block_lookup_symbol): New parameter 'match_type'.
13657         * c-valprint.c (print_unpacked_pointer): Use
13658         lookup_symbol_search_name instead of lookup_symbol.
13659         * compile/compile-object-load.c (get_out_value_type): Pass down
13660         symbol_name_match_type::SEARCH_NAME.
13661         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13662         symbol_name_match_type::FULL.
13663         * cp-support.c (cp_get_symbol_name_matcher): Handle
13664         symbol_name_match_type::SEARCH_NAME.
13665         * infrun.c (insert_exception_resume_breakpoint): Use
13666         lookup_symbol_search_name.
13667         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13668         * psymtab.c (maintenance_check_psymtabs): Use
13669         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13670         * stack.c (print_frame_args): Use lookup_symbol_search_name and
13671         SYMBOL_SEARCH_NAME.
13672         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13673         if symbol_name_match_type::SEARCH_NAME.
13674         (lookup_symbol_in_language): Pass down
13675         symbol_name_match_type::FULL.
13676         (lookup_symbol_search_name): New.
13677         (lookup_language_this): Pass down
13678         symbol_name_match_type::SEARCH_NAME.
13679         (lookup_symbol_aux, lookup_local_symbol): New parameter
13680         'match_type'.  Pass it down.
13681         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13682         (lookup_symbol_search_name): New declaration.
13683         (lookup_symbol_in_block): New 'match_type' parameter.
13684
13685 2018-01-05  Pedro Alves  <palves@redhat.com>
13686
13687         PR gdb/22670
13688         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13689         ada_lookup_symbol.
13690         (ada_lookup_symbol): Reimplement in terms of
13691         ada_lookup_symbol_list, bits factored out from
13692         ada_lookup_encoded_symbol.
13693
13694 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13695
13696         * ada-exp.y (write_object_renaming): When subscripting an array
13697         using a symbol as the index, pass the block in call to
13698         ada_lookup_encoded_symbol when looking that symbol up.
13699
13700 2018-01-05  Jerome Guitton  <guitton@adacore.com>
13701
13702         * ada-lang.c (ada_array_length): Use ada_index_type instead of
13703         TYPE_INDEX_TYPE.
13704
13705 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13706
13707         * ada-lang.c (ada_to_fixed_value_create): Add handling of
13708         the case where VALUE_LVAL (val0) is not lval_memory.
13709
13710 2018-01-05  Xavier Roirand  <roirand@adacore.com>
13711
13712         * ada-valprint.c (print_optional_low_bound): Handle
13713         character-indexed array printing like boolean-indexed array
13714         printing.
13715
13716 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13717
13718         * NEWS: Create a new section for the next release branch.
13719         Rename the section of the current branch, now that it has
13720         been cut.
13721
13722 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13723
13724         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13725         * version.in: Bump version to 8.1.50.DATE-git.
13726
13727 2018-01-03  Xavier Roirand  <roirand@adacore.com>
13728
13729         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13730         Add field.
13731         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13732         Add field.
13733         (default_exception_support_info) <catch_handlers_sym>: Add field.
13734         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13735         (ada_exception_name_addr_1): Add "catch handlers" handling.
13736         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13737         Update all callers.
13738         (create_excep_cond_exprs) <ex>: Add parameter.
13739         (re_set_exception): Update create_excep_cond_exprs call.
13740         (print_it_exception, print_one_exception, print_mention_exception)
13741         (print_recreate_exception): Add "catch handler" handling.
13742         (allocate_location_catch_handlers, re_set_catch_handlers)
13743         (check_status_catch_handlers, print_it_catch_handlers)
13744         (print_one_catch_handlers, print_mention_catch_handlers)
13745         (print_recreate_catch_handlers): New function.
13746         (catch_handlers_breakpoint_ops): New variable.
13747         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13748         Add parameter.  Add "catch handler" handling.
13749         (ada_exception_sym_name, ada_exception_breakpoint_ops):
13750         Add "catch handler" handling.
13751         (ada_exception_catchpoint_cond_string): Add "catch handler"
13752         handling.
13753         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13754         call.
13755         (catch_ada_handlers_command): New function.
13756         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13757         operations structure.
13758         (_initialize_ada_language): Add "catch handlers" command entry.
13759         * NEWS: Document "catch handlers" feature.
13760
13761 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13762
13763         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13764         account when creating the array type of the slice.
13765         (ada_value_slice): Likewise.
13766
13767 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13768
13769         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13770         New enum value.
13771         (create_array_type_with_stride): Add byte_stride_prop parameter.
13772         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13773         New parameter.  Update all callers in this file.
13774         (array_type_has_dynamic_stride): New function.
13775         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13776         of arrays with dynamic byte strides.
13777         * dwarf2read.c (read_array_type): Add support for dynamic
13778         DW_AT_byte_stride attributes.
13779
13780 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13781
13782         * dwarf2read.c (read_unspecified_type): Treat
13783         DW_TAG_enumeration_type DIEs from Ada units as stubs.
13784
13785 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13786
13787         Update copyright year range in all GDB files.
13788
13789 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13790
13791         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13792         and gdb/testsuite/gdb.base/step-line.c.
13793
13794 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13795
13796         * copyright.py (main): Dump the contents of
13797         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13798         even if BY_HAND is empty.
13799
13800 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13801
13802         * top.c (print_gdb_version): Update Copyright year in version
13803         message.
13804
13805 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13806
13807         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13808
13809 For older changes see ChangeLog-2017.
13810 \f
13811 Local Variables:
13812 mode: change-log
13813 left-margin: 8
13814 fill-column: 74
13815 version-control: never
13816 coding: utf-8
13817 End: