2d824bd94ae87b6d96c1a707ef2d4e0539721f36
[external/binutils.git] / gdb / ChangeLog
1 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
2
3         * breakpoint.c (update_inserted_breakpoint_locations): Remove
4         redundant condition.
5
6 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7
8         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
9
10         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
11         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
12         * sol-thread.c (ps_pdmodel): Don't guard definition.
13
14         * procfs.c: Fix formatting.
15
16         * procfs.c (sysset_t_alloc): Remove.
17         (create_procinfo): Use XNEW instead of sysset_t_alloc.
18         (procfs_debug_inferior): Likewise.
19         (procfs_set_exec_trap): Likewise.
20         (proc_set_traced_sysentry): Don't allocate argp dynamically.
21         (proc_set_traced_sysexit): Likewise.
22
23         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
24         (dead_procinfo): Likewise.
25         (proc_warn): Likewise.
26         (proc_error): Likewise.
27         (proc_get_LDT_entry): Likewise.
28         (do_attach): Likewise.
29         (procfs_target::pid_to_str): Likewise.
30         (iterate_over_mappings): Likewise.
31
32         * procfs.c (create_procinfo): Fix ARI warning.
33         (proc_get_status): Likewise.
34         (proc_stop_process): Likewise.
35         (proc_run_process): Likewise.
36         (proc_kill): Likewise.
37         (proc_get_LDT_entry): Likewise.
38         (procfs_find_LDT_entry): Likewise.
39         (proc_update_threads): Likewise.
40         (proc_iterate_over_threads): Likewise.
41         (do_attach): Likewise.
42         (procfs_xfer_memory): Likewise.
43         (invalidate_cache): Likewise.
44         (procfs_target::resume): Likewise.
45         (procfs_init_inferior): Likewise.
46         (procfs_set_exec_trap): Likewise.
47         (procfs_target::thread_alive): Likewise.
48         (procfs_target::pid_to_exec_file): Likewise.
49         (iterate_over_mappings): Likewise.
50         (procfs_target::make_corefile_notes): Likewise.
51         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
52
53         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
54         (procfs_find_LDT_entry): Likewise.
55         * sol-thread.c (ps_lgetLDT): Likewise.
56
57 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
58
59         PR tdep/17903
60         * procfs.c (procfs_target): Declare pid_to_exec_file.
61         (procfs_target::pid_to_exec_file): New.
62
63 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
64
65         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
66         renaming.
67         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
68         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
69
70 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
71
72         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
73         (supply_fpregset, fill_fpregset): Move ...
74         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
75         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
76         Remove references to ioctl-based procfs.
77         Include <sys/reg.h>.
78         Remove PR_MODEL_NATIVE guards.
79         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
80         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
81
82 2018-09-19  Xavier Roirand  <roirand@adacore.com>
83
84         PR gdb/20981:
85         * solib-darwin.c (darwin_get_dyld_bfd): New function.
86         (darwin_solib_get_all_image_info_addr_at_init): Update call.
87         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
88
89 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
90
91         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
92         (fbsd_print_sockaddr_in6): Likewise.
93
94 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
95             Chris January  <chris.january@arm.com>
96
97         * eval.c (skip_undetermined_arglist): Skip argument list helper.
98         (evaluate_subexp_standard): Return a dummy type when
99         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
100         OP_F77_UNDETERMINED_ARGLIST case.
101         * expression.h (enum noside): Update comment.
102
103 2018-09-19  George Vasick <george.vasick@oracle.com>
104
105         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
106
107 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
108             April Chin <april.chin@oracle.com>
109             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
110
111         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
112         uint_t lwpid_t.
113         (create_procinfo): Print pids in /proc without leading zeros.
114
115 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
116
117         * nios2-tdep.c (nios2_gcc_target_options): New.
118         (nios2_gdb_arch_init): Install new hook.
119
120 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
121
122         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
123         New file.
124         * update-gnulib.sh: Apply patch.
125         * configure: Re-generate.
126
127 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
128
129         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
130         description.  Make "info proc" command descriptions more
131         consistent.
132
133 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
134
135         * NEWS: Mention 'info proc files' command.
136
137 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
138
139         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
140         descriptors for IP_FILES and IP_ALL.
141
142 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
143
144         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
145         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
146         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
147         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
148         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
149         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
150         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
151         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
152         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
153         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
154         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
155         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
156         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
157         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
158         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
159         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
160         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
161         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
162         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
163         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
164         (struct fbsd_sockaddr_un): New types.
165         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
166         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
167         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
168         (fbsd_core_info_proc_files): New functions.
169         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
170         IP_ALL.
171         * fbsd-tdep.h (fbsd_info_proc_files_header)
172         (fbsd_info_proc_files_entry): New.
173
174 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
175
176         * defs.h (enum info_proc_what) [IP_FILES]: New value.
177         * infcmd.c (info_proc_cmd_files): New function.
178         (_initialize_infcmd): Register 'info proc files' command.
179
180 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
181
182         * gnulib/aclocal-m4-deps.mk: Re-generate.
183         * gnulib/aclocal.m4: Re-generate.
184         * gnulib/config.in: Re-generate.
185         * gnulib/configure: Re-generate.
186         * gnulib/import/Makefile.am: Re-generate.
187         * gnulib/import/Makefile.in: Re-generate.
188         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
189         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
190         * gnulib/import/arpa_inet.in.h: New file.
191         * gnulib/import/inet_ntop.c: New file.
192         * gnulib/import/m4/arpa_inet_h.m4: New file.
193         * gnulib/import/m4/inet_ntop.m4: New file.
194         * gnulib/import/m4/netinet_in_h.m4: New file.
195         * gnulib/import/m4/socklen.m4: New file.
196         * gnulib/import/m4/sockpfaf.m4: New file.
197         * gnulib/import/m4/stdalign.m4: New file.
198         * gnulib/import/m4/sys_uio_h.m4: New file.
199         * gnulib/import/netinet_in.in.h: New file.
200         * gnulib/import/stdalign.in.h: New file.
201         * gnulib/import/sys_socket.c: New file.
202         * gnulib/import/sys_socket.in.h: New file.
203         * gnulib/import/sys_uio.in.h: New file.
204         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
205         module.
206
207 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
208
209         * gnulib/aclocal-m4-deps.mk: New file.
210         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
211         deterministically.
212
213 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
214
215         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
216         KVE_PATH.
217
218 2018-09-18  Tom Tromey  <tom@tromey.com>
219
220         * compile/compile-object-load.c (struct
221         link_hash_table_cleanup_data): Add constructor and destructor.
222         Use DISABLE_COPY_AND_ASSIGN.
223         (~link_hash_table_cleanup_data): Rename from
224         link_hash_table_free.  Now a destructor.
225         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
226
227 2018-09-18  Tom Tromey  <tom@tromey.com>
228
229         * compile/compile-object-run.c (do_module_cleanup): Use delete.
230         * compile/compile-object-load.c (struct munmap_list): Move to
231         header file.
232         (munmap_list::add): Rename from munmap_list_add; rewrite.
233         (munmap_list::~munmap_list): Rename from munmap_list_free.
234         (munmap_listp_free_cleanup): Remove.
235         (compile_object_load): Update.
236         * compile/compile-object-load.h (struct munmap_list): Move from
237         compile-object-load.c.  Rewrite.
238
239 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
240
241         * aarch64-tdep.c (pass_in_v): Use register size.
242         (aarch64_extract_return_value): Likewise.
243         (aarch64_store_return_value): Likewise.
244
245 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
246
247         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
248         rlim_t.
249
250 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
251
252         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
253         Fix short help line.
254
255 2018-09-17  Tom Tromey  <tom@tromey.com>
256
257         PR python/20445:
258         * configure: Rebuild.
259         * configure.ac: Conditionally use -DNDEBUG for Python.
260
261 2018-09-17  Tom Tromey  <tom@tromey.com>
262
263         * configure: Rebuild.
264         * configure.ac: Use gmp as a library dependency when checking for
265         mpfr.
266
267 2018-09-17  Pedro Alves  <palves@redhat.com>
268
269         * python/py-inferior.c (find_inferior_object): Delete.
270
271 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
272
273         * compile/compile-cplus-types.c
274         (compile_cplus_instance::enter_scope): Don't use new_scope after
275         std::move.
276
277 2018-09-17  Tom Tromey  <tom@tromey.com>
278
279         * common/pathstuff.c (get_standard_cache_dir): Use
280         ~/Library/Caches on macOS.
281         * common/pathstuff.h (get_standard_cache_dir): Update comment.
282
283 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
284
285         PR python/23669
286         * breakpoint.c (commands_cmd_element): New.
287         (_initialize_breakpoint): Assign commands_cmd_element.
288         * breakpoint.h (commands_cmd_element): New.
289         * cli/cli-script.c (while_cmd_element, if_command,
290         define_cmd_element): New.
291         (command_name_equals): Remove.
292         (process_next_line): Compare commands by pointer, not by name.
293         (_initialize_cli_script): Assign the various cmd_list_element
294         variables.
295         * compile/compile.c (compile_cmd_element): New.
296         (_initialize_compile): Assign compile_cmd_element.
297         * compile/compile.h (compile_cmd_element): New.
298         * guile/guile.c (guile_cmd_element): New.
299         (install_gdb_commands): Assign guile_cmd_element.
300         * guile/guile.h (guile_cmd_element): New.
301         * python/python.c (python_cmd_element): New.
302         (_initialize_python): Assign python_cmd_element.
303         * python/python.h (python_cmd_element): New.
304         * tracepoint.c (while_stepping_cmd_element): New.
305         (_initialize_tracepoint): Assign while_stepping_cmd_element.
306         * tracepoint.h (while_stepping_cmd_element): New.
307
308 2018-09-17  Tom Tromey  <tom@tromey.com>
309
310         * infrun.c (save_infcall_suspend_state): Return
311         infcall_suspend_state_up.
312         (save_infcall_control_state): Return infcall_control_state_up.
313         * inferior.h (save_infcall_suspend_state)
314         (save_infcall_control_state): Declare later.  Return unique
315         pointers.
316
317 2018-09-17  Tom Tromey  <tom@tromey.com>
318
319         * infrun.c (struct stop_context): Declare constructor,
320         destructor, "changed" method.
321         (stop_context::stop_context): Rename from save_stop_context.
322         (stop_context::~stop_context): Rename from
323         release_stop_context_cleanup.
324         (normal_stop): Update.
325         (stop_context::changed): Rename from stop_context_changed.  Return
326         bool.
327
328 2018-09-17  Tom Tromey  <tom@tromey.com>
329
330         * inferior.h (struct infcall_suspend_state_deleter): New.
331         (infcall_suspend_state_up): New typedef.
332         (struct infcall_control_state_deleter): New.
333         (infcall_control_state_up): New typedef.
334         (make_cleanup_restore_infcall_suspend_state)
335         (make_cleanup_restore_infcall_control_state): Don't declare.
336         * infcall.c (call_function_by_hand_dummy): Update.
337         * infrun.c (do_restore_infcall_suspend_state_cleanup)
338         (make_cleanup_restore_infcall_suspend_state): Remove.
339         (do_restore_infcall_control_state_cleanup)
340         (make_cleanup_restore_infcall_control_state): Remove.
341
342 2018-09-17  Tom Tromey  <tom@tromey.com>
343
344         * gdbthread.h (struct thread_control_state): Add initializer.
345         (class thread_info) <control>: Remove initializer.
346         * inferior.h (struct inferior_control_state): Add initializer.
347         (class inferior) <control>: Remove initializer.
348         (exit_inferior_1): Update.
349         * infrun.c (struct infcall_control_state): Add constructors.
350         (save_infcall_control_state): Use new.
351         (restore_infcall_control_state, discard_infcall_control_state):
352         Use delete.
353
354 2018-09-17  Tom Tromey  <tom@tromey.com>
355
356         * infrun.c (struct infcall_suspend_state) <registers>: Now a
357         unique_ptr.
358         <siginfo_data>: Now a unique_xmalloc_ptr.
359         (save_infcall_suspend_state, restore_infcall_suspend_state)
360         (discard_infcall_suspend_state)
361         (get_infcall_suspend_state_regcache): Update.
362
363 2018-09-17  Tom Tromey  <tom@tromey.com>
364
365         * gdbthread.h (struct thread_suspend_state): Add initializers.
366         (class thread_info) <suspend>: Remove initializer.
367         * infrun.c (struct infcall_suspend_state): Add initializers.
368         (save_infcall_suspend_state): Use new.
369         (discard_infcall_suspend_state): Use delete.
370
371 2018-09-16  Tom Tromey  <tom@tromey.com>
372
373         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
374         Remove.
375         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
376         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
377         (py_varobj_iter_new): Likewise.
378         (py_varobj_get_iterator): Use gdbpy_ref.
379
380 2018-09-16  Tom Tromey  <tom@tromey.com>
381
382         * python/py-threadevent.c (py_get_event_thread): Simplify.
383         * python/py-inferior.c (infpy_thread_from_thread_handle):
384         Return immediately after calling thread_to_thread_object.  Use
385         Py_RETURN_NONE.
386         (thread_to_thread_object): Set the exception on a NULL return.
387
388 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
389
390         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
391
392 2018-09-16  Tom Tromey  <tom@tromey.com>
393
394         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
395         Remove.
396
397 2018-09-16  Tom Tromey  <tom@tromey.com>
398
399         * python/python-internal.h (thread_to_thread_object): Change
400         return type.
401         * python/py-inferior.c (thread_to_thread_object): Return a new
402         reference.
403         (infpy_thread_from_thread_handle): Update.
404         * python/py-infthread.c (gdbpy_selected_thread): Update.
405         * python/py-stopevent.c (create_stop_event_object): Update.
406         * python/py-threadevent.c (py_get_event_thread): Return a new
407         reference.
408         (py_get_event_thread): Update.
409         * python/py-event.h (py_get_event_thread): Change return type.
410         * python/py-continueevent.c (create_continue_event_object):
411         Update.
412
413 2018-09-16  Tom Tromey  <tom@tromey.com>
414
415         * python/py-progspace.c (pspy_get_objfiles): Update.
416         * python/python-internal.h (objfile_to_objfile_object): Change
417         return type.
418         * python/py-newobjfileevent.c (create_new_objfile_event_object):
419         Update.
420         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
421         Update.
422         * python/python.c (gdbpy_get_current_objfile): Update.
423         (gdbpy_objfiles): Update.
424         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
425         Update.
426         (objfile_to_objfile_object): Return a new reference.
427         * python/py-symtab.c (stpy_get_objfile): Update.
428         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
429         Update.
430
431 2018-09-16  Tom Tromey  <tom@tromey.com>
432
433         * python/py-inferior.c (infpy_get_progspace): Update.
434         * python/python-internal.h (pspace_to_pspace_object): Change
435         return type.
436         * python/py-newobjfileevent.c
437         (create_clear_objfiles_event_object): Update.
438         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
439         Update.
440         * python/python.c (gdbpy_get_current_progspace): Update.
441         (gdbpy_progspaces): Update.
442         * python/py-progspace.c (pspace_to_pspace_object): Return a new
443         reference.
444         * python/py-objfile.c (objfpy_get_progspace): Update.
445         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
446         Update.
447
448 2018-09-16  Tom Tromey  <tom@tromey.com>
449
450         * python/lib/gdb/__init__.py (current_progspace, objfiles)
451         (solib_name, block_for_pc, find_pc_line): New functions.
452         (execute_unwinders): Update.
453         * python/py-block.c (gdbpy_block_for_pc): Remove.
454         * python/py-inferior.c (infpy_get_progspace): New function.
455         (inferior_object_getset) <progspace>: Add.
456         * python/py-progspace.c (pspy_objfiles): Rewrite.
457         (pspy_solib_name, pspy_block_for_pc)
458         (pspy_find_pc_line, pspy_is_valid): New functions.
459         (progspace_object_methods): Add entries for solib_name,
460         block_for_pc, find_pc_line, is_valid.
461         * python/python-internal.h (gdbpy_block_for_pc)
462         (build_objfiles_list): Don't declare.
463         * python/python.c: Don't include solib.h.
464         (gdbpy_solib_name, gdbpy_find_pc_line)
465         (gdbpy_get_current_progspace, build_objfiles_list)
466         (gdbpy_objfiles): Remove.
467         (GdbMethods) <current_progspace, objfiles, block_for_pc,
468         solib_name, find_pc_line>: Remove entries.
469
470 2018-09-16  Tom Tromey  <tom@tromey.com>
471
472         * top.c (new_ui_command): Use GNU style for metasyntactic
473         variables.
474         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
475         variables.
476         * maint.c (maintenance_translate_address): Remove "<>" around
477         text.
478         * interps.c (interpreter_exec_cmd): Use GNU style for
479         metasyntactic variables.
480         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
481         metasyntactic variables.
482         * tracepoint.c (tfind_range_command): Use GNU style for
483         metasyntactic variables.
484         (tfind_outside_command): Likewise.
485         (_initialize_tracepoint): Likewise.
486         * remote.c (extended_remote_target::create_inferior): Use GNU
487         style for metasyntactic variables.
488         * sparc64-tdep.c (adi_examine_command): Use GNU style for
489         metasyntactic variables.
490         (adi_assign_command): Likewise.
491
492 2018-09-16  Tom Tromey  <tom@tromey.com>
493
494         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
495         metasyntactic variables.  Print message if no disassembler options
496         are available.
497
498 2018-09-15  Tom Tromey  <tom@tromey.com>
499
500         * infcmd.c (get_inferior_args): Return const char *.
501         * inferior.h (get_inferior_args): Return type now const.
502         * linux-tdep.c (linux_fill_prpsinfo): Update.
503         * procfs.c (procfs_target::make_corefile_notes): Update.
504
505 2018-09-07  Tom Tromey  <tom@tromey.com>
506
507         * python/python.c (execute_gdb_command): Call bpstat_do_actions
508         inside the TRY.
509
510 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
511
512         * nios2-tdep.c (nios2_type_align): New.
513         (nios2_gdb_arch_init): Install type_align hook.
514
515 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
516
517         * eval.c (fake_method::fake_method): Call xzalloc directly for a
518         type that is neither object file owned, nor gdbarch owned.
519         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
520         gdbarch is non-NULL.
521         (alloc_type_instance): Allocate non-objfile owned types on the
522         gdbarch obstack.
523         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
524         using TYPE_ALLOC to ensure memory is allocated on the correct
525         obstack.
526         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
527         obstack, or the gdbarch obstack.
528         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
529
530 2018-09-14  Tom Tromey  <tom@tromey.com>
531
532         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
533         block.
534
535 2018-09-14  Tom Tromey  <tom@tromey.com>
536
537         * nat/fork-inferior.c (get_startup_shell): Remove "static".
538
539 2018-09-13  Tom Tromey  <tom@tromey.com>
540
541         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
542         static.
543
544 2018-09-13  Tom Tromey  <tom@tromey.com>
545
546         * exec.c (try_open_exec_file): Use std::string.
547
548 2018-09-13  Tom Tromey  <tom@tromey.com>
549
550         * utils.h (gdb_bfd_errmsg): Return std::string.
551         * exec.c (exec_file_attach): Update.
552         * compile/compile-object-load.c (compile_object_load): Update.
553         * utils.c (gdb_bfd_errmsg): Return std::string.
554
555 2018-09-13  Tom Tromey  <tom@tromey.com>
556
557         * procfs.c (struct procinfo_deleter): New.
558         (procinfo_up): New typedef.
559         (do_destroy_procinfo_cleanup): Remove.
560         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
561
562 2018-09-13  Tom Tromey  <tom@tromey.com>
563
564         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
565
566 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
567 2018-09-13  Tom Tromey  <tom@tromey.com>
568
569         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
570         (pspy_get_objfiles): New function.
571         (progspace_object_methods): New.
572         (pspace_object_type): Add tp_methods callback.
573         * python/python-internal.h (build_objfiles_list): New
574         declaration.
575         * python/python.c (build_objfiles_list): New function.
576         (gdbpy_objfiles): Implement using build_objfiles_list.
577         * NEWS: Mention the Progspace.objfiles method.
578
579 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
580
581         * python/py-inferior.c (infpy_get_progspace): New function.
582         (inferior_object_getset): Add progspace property.
583         * NEWS: Mention the new property.
584
585 2018-09-13  Tom Tromey  <tom@tromey.com>
586
587         PR rust/23650:
588         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
589
590 2018-09-13  Tom Tromey  <tom@tromey.com>
591
592         PR rust/23626:
593         * rust-lang.c (rust_enum_variant): Now static.
594         (rust_empty_enum_p): New function.
595         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
596         Handle empty enum.
597
598 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
599
600         * python/py-inferior.c (infpy_repr): New.
601         (inferior_object_type): Register infpy_repr.
602         * python/py-objfile.c (objfpy_repr): New.
603         (objfile_object_type): Register objfpy_repr.
604
605 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
606
607         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
608
609 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
610
611         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
612         typo.
613
614 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
615
616         * common/common-utils.c: Don't include '<sys/stat.h>'.
617         (is_regular_file): Move to...
618         * common/filestuff.c (is_regular_file): ... here.
619         * common/common-utils.h (is_regular_file): Move to...
620         * common/filestuff.h (is_regular_file): ... here.
621
622 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
623
624         * skip.c (debug_skip): New variable.
625         (skiplist_entry::do_skip_file_p): Add debug output.
626         (skiplist_entry::do_skip_gfile_p): Likewise.
627         (skiplist_entry::skip_function_p): Likewise.
628         (_initialize_step_skip): Create debug command.
629         * NEWS: Mention set/show debug skip.
630
631 2018-09-11  Xavier Roirand  <roirand@adacore.com>
632
633         * darwin-nat.c (should_disable_startup_with_shell):
634         New function.
635         (darwin_nat_target::create_inferior): Add call.
636
637 2018-09-11  Xavier Roirand  <roirand@adacore.com>
638
639         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
640         inf_port, msg_state>: Initialize.
641         (struct darwin_thread_info) <signaled, single_step>: Change
642         type and initialize.
643         (struct darwin_thread_info) <event>: Initialize.
644
645 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
646
647         PR gdb/23555
648         PR gdb/23558
649         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
650         guesses.
651
652 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
653
654         Revert:
655         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
656
657         PR gdb/23555
658         PR gdb/23558
659         * gnulib/aclocal.m4: Regenerate.
660         * gnulib/config.in: Regenerate.
661         * gnulib/configure: Regenerate.
662         * gnulib/import/Makefile.am: Update.
663         * gnulib/import/Makefile.in: Update.
664         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
665         * gnulib/import/_Noreturn.h: ... this.
666         * gnulib/import/alloca.in.h: Update.
667         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
668         * gnulib/import/arg-nonnull.h: ... this.
669         * gnulib/import/assure.h: Update.
670         * gnulib/import/at-func.c: Update.
671         * gnulib/import/basename-lgpl.c: Update.
672         * gnulib/import/extra/snippet/c++defs.h: Rename to...
673         * gnulib/import/c++defs.h: ... this.
674         * gnulib/import/canonicalize-lgpl.c: Update.
675         * gnulib/import/cdefs.h: Update.
676         * gnulib/import/chdir-long.c: Update.
677         * gnulib/import/chdir-long.h: Update.
678         * gnulib/import/cloexec.c: Update.
679         * gnulib/import/cloexec.h: Update.
680         * gnulib/import/close.c: Update.
681         * gnulib/import/closedir.c: Update.
682         * gnulib/import/config.charset: Update.
683         * gnulib/import/dirent-private.h: Update.
684         * gnulib/import/dirent.in.h: Update.
685         * gnulib/import/dirfd.c: Update.
686         * gnulib/import/dirname-lgpl.c: Update.
687         * gnulib/import/dirname.h: Update.
688         * gnulib/import/dosname.h: Update.
689         * gnulib/import/dup-safer-flag.c: Update.
690         * gnulib/import/dup-safer.c: Update.
691         * gnulib/import/dup.c: Update.
692         * gnulib/import/dup2.c: Update.
693         * gnulib/import/errno.in.h: Update.
694         * gnulib/import/error.c: Update.
695         * gnulib/import/error.h: Update.
696         * gnulib/import/exitfail.c: Update.
697         * gnulib/import/exitfail.h: Update.
698         * gnulib/import/extra/update-copyright: Update.
699         * gnulib/import/fchdir.c: Update.
700         * gnulib/import/fcntl.c: Update.
701         * gnulib/import/fcntl.in.h: Update.
702         * gnulib/import/fd-hook.c: Update.
703         * gnulib/import/fd-hook.h: Update.
704         * gnulib/import/fd-safer-flag.c: Update.
705         * gnulib/import/fd-safer.c: Update.
706         * gnulib/import/fdopendir.c: Update.
707         * gnulib/import/filename.h: Update.
708         * gnulib/import/filenamecat-lgpl.c: Update.
709         * gnulib/import/filenamecat.h: Update.
710         * gnulib/import/flexmember.h: Update.
711         * gnulib/import/float+.h: Update.
712         * gnulib/import/float.c: Update.
713         * gnulib/import/float.in.h: Update.
714         * gnulib/import/fnmatch.c: Update.
715         * gnulib/import/fnmatch.in.h: Update.
716         * gnulib/import/fnmatch_loop.c: Update.
717         * gnulib/import/fpucw.h: Update.
718         * gnulib/import/frexp.c: Update.
719         * gnulib/import/frexpl.c: Update.
720         * gnulib/import/fstat.c: Update.
721         * gnulib/import/fstatat.c: Update.
722         * gnulib/import/getcwd-lgpl.c: Update.
723         * gnulib/import/getcwd.c: Update.
724         * gnulib/import/getdtablesize.c: Update.
725         * gnulib/import/getlogin_r.c: Update.
726         * gnulib/import/getprogname.c: Update.
727         * gnulib/import/getprogname.h: Update.
728         * gnulib/import/gettext.h: Update.
729         * gnulib/import/gettimeofday.c: Update.
730         * gnulib/import/glob-libc.h: Update.
731         * gnulib/import/glob.c: Update.
732         * gnulib/import/glob.in.h: Update.
733         * gnulib/import/glob_internal.h: Update.
734         * gnulib/import/glob_pattern_p.c: Update.
735         * gnulib/import/globfree.c: Update.
736         * gnulib/import/hard-locale.c: Update.
737         * gnulib/import/hard-locale.h: Update.
738         * gnulib/import/intprops.h: Update.
739         * gnulib/import/inttypes.in.h: Update.
740         * gnulib/import/isnan.c: Update.
741         * gnulib/import/isnand-nolibm.h: Update.
742         * gnulib/import/isnand.c: Update.
743         * gnulib/import/isnanl-nolibm.h: Update.
744         * gnulib/import/isnanl.c: Update.
745         * gnulib/import/itold.c: Update.
746         * gnulib/import/libc-config.h: Update.
747         * gnulib/import/limits.in.h: Update.
748         * gnulib/import/localcharset.c: Update.
749         * gnulib/import/localcharset.h: Update.
750         * gnulib/import/localtime-buffer.c: Update.
751         * gnulib/import/localtime-buffer.h: Update.
752         * gnulib/import/lstat.c: Update.
753         * gnulib/import/m4/00gnulib.m4: Update.
754         * gnulib/import/m4/__inline.m4: Update.
755         * gnulib/import/m4/absolute-header.m4: Update.
756         * gnulib/import/m4/alloca.m4: Update.
757         * gnulib/import/m4/builtin-expect.m4: Update.
758         * gnulib/import/m4/canonicalize.m4: Update.
759         * gnulib/import/m4/chdir-long.m4: Update.
760         * gnulib/import/m4/close.m4: Update.
761         * gnulib/import/m4/closedir.m4: Update.
762         * gnulib/import/m4/configmake.m4: Update.
763         * gnulib/import/m4/d-ino.m4: Update.
764         * gnulib/import/m4/d-type.m4: Update.
765         * gnulib/import/m4/dirent_h.m4: Update.
766         * gnulib/import/m4/dirfd.m4: Update.
767         * gnulib/import/m4/dirname.m4: Update.
768         * gnulib/import/m4/double-slash-root.m4: Update.
769         * gnulib/import/m4/dup.m4: Update.
770         * gnulib/import/m4/dup2.m4: Update.
771         * gnulib/import/m4/eealloc.m4: Update.
772         * gnulib/import/m4/environ.m4: Update.
773         * gnulib/import/m4/errno_h.m4: Update.
774         * gnulib/import/m4/error.m4: Update.
775         * gnulib/import/m4/exponentd.m4: Update.
776         * gnulib/import/m4/exponentl.m4: Update.
777         * gnulib/import/m4/extensions.m4: Update.
778         * gnulib/import/m4/extern-inline.m4: Update.
779         * gnulib/import/m4/fchdir.m4: Update.
780         * gnulib/import/m4/fcntl-o.m4: Update.
781         * gnulib/import/m4/fcntl.m4: Update.
782         * gnulib/import/m4/fcntl_h.m4: Update.
783         * gnulib/import/m4/fdopendir.m4: Update.
784         * gnulib/import/m4/filenamecat.m4: Update.
785         * gnulib/import/m4/flexmember.m4: Update.
786         * gnulib/import/m4/float_h.m4: Update.
787         * gnulib/import/m4/fnmatch.m4: Update.
788         * gnulib/import/m4/fnmatch_h.m4: Update.
789         * gnulib/import/m4/fpieee.m4: Update.
790         * gnulib/import/m4/frexp.m4: Update.
791         * gnulib/import/m4/frexpl.m4: Update.
792         * gnulib/import/m4/fstat.m4: Update.
793         * gnulib/import/m4/fstatat.m4: Update.
794         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
795         * gnulib/import/m4/getcwd-path-max.m4: Update.
796         * gnulib/import/m4/getcwd.m4: Update.
797         * gnulib/import/m4/getdtablesize.m4: Update.
798         * gnulib/import/m4/getlogin.m4: Update.
799         * gnulib/import/m4/getlogin_r.m4: Update.
800         * gnulib/import/m4/getpagesize.m4: Update.
801         * gnulib/import/m4/getprogname.m4: Update.
802         * gnulib/import/m4/gettimeofday.m4: Update.
803         * gnulib/import/m4/glibc21.m4: Update.
804         * gnulib/import/m4/glob.m4: Update.
805         * gnulib/import/m4/glob_h.m4: Update.
806         * gnulib/import/m4/gnulib-cache.m4: Update.
807         * gnulib/import/m4/gnulib-common.m4: Update.
808         * gnulib/import/m4/gnulib-comp.m4: Update.
809         * gnulib/import/m4/gnulib-tool.m4: Update.
810         * gnulib/import/m4/hard-locale.m4: Update.
811         * gnulib/import/m4/include_next.m4: Update.
812         * gnulib/import/m4/inttypes-pri.m4: Update.
813         * gnulib/import/m4/inttypes.m4: Update.
814         * gnulib/import/m4/isnand.m4: Update.
815         * gnulib/import/m4/isnanl.m4: Update.
816         * gnulib/import/m4/largefile.m4: Update.
817         * gnulib/import/m4/limits-h.m4: Update.
818         * gnulib/import/m4/localcharset.m4: Update.
819         * gnulib/import/m4/locale-fr.m4: Update.
820         * gnulib/import/m4/locale-ja.m4: Update.
821         * gnulib/import/m4/locale-zh.m4: Update.
822         * gnulib/import/m4/localtime-buffer.m4: Update.
823         * gnulib/import/m4/longlong.m4: Update.
824         * gnulib/import/m4/lstat.m4: Update.
825         * gnulib/import/m4/malloc.m4: Update.
826         * gnulib/import/m4/malloca.m4: Update.
827         * gnulib/import/m4/math_h.m4: Update.
828         * gnulib/import/m4/mbrtowc.m4: Update.
829         * gnulib/import/m4/mbsinit.m4: Update.
830         * gnulib/import/m4/mbsrtowcs.m4: Update.
831         * gnulib/import/m4/mbstate_t.m4: Update.
832         * gnulib/import/m4/memchr.m4: Update.
833         * gnulib/import/m4/memmem.m4: Update.
834         * gnulib/import/m4/mempcpy.m4: Update.
835         * gnulib/import/m4/memrchr.m4: Update.
836         * gnulib/import/m4/mkdir.m4: Update.
837         * gnulib/import/m4/mkstemp.m4: Update.
838         * gnulib/import/m4/mmap-anon.m4: Update.
839         * gnulib/import/m4/mode_t.m4: Update.
840         * gnulib/import/m4/msvc-inval.m4: Update.
841         * gnulib/import/m4/msvc-nothrow.m4: Update.
842         * gnulib/import/m4/multiarch.m4: Update.
843         * gnulib/import/m4/nocrash.m4: Update.
844         * gnulib/import/m4/off_t.m4: Update.
845         * gnulib/import/m4/onceonly.m4: Update.
846         * gnulib/import/m4/open-cloexec.m4: Update.
847         * gnulib/import/m4/open.m4: Update.
848         * gnulib/import/m4/openat.m4: Update.
849         * gnulib/import/m4/opendir.m4: Update.
850         * gnulib/import/m4/pathmax.m4: Update.
851         * gnulib/import/m4/rawmemchr.m4: Update.
852         * gnulib/import/m4/readdir.m4: Update.
853         * gnulib/import/m4/readlink.m4: Update.
854         * gnulib/import/m4/realloc.m4: Update.
855         * gnulib/import/m4/rename.m4: Update.
856         * gnulib/import/m4/rewinddir.m4: Update.
857         * gnulib/import/m4/rmdir.m4: Update.
858         * gnulib/import/m4/save-cwd.m4: Update.
859         * gnulib/import/m4/secure_getenv.m4: Update.
860         * gnulib/import/m4/setenv.m4: Update.
861         * gnulib/import/m4/signal_h.m4: Update.
862         * gnulib/import/m4/ssize_t.m4: Update.
863         * gnulib/import/m4/stat-time.m4: Update.
864         * gnulib/import/m4/stat.m4: Update.
865         * gnulib/import/m4/std-gnu11.m4: Update.
866         * gnulib/import/m4/stdbool.m4: Update.
867         * gnulib/import/m4/stddef_h.m4: Update.
868         * gnulib/import/m4/stdint.m4: Update.
869         * gnulib/import/m4/stdio_h.m4: Update.
870         * gnulib/import/m4/stdlib_h.m4: Update.
871         * gnulib/import/m4/strchrnul.m4: Update.
872         * gnulib/import/m4/strdup.m4: Update.
873         * gnulib/import/m4/strerror.m4: Update.
874         * gnulib/import/m4/string_h.m4: Update.
875         * gnulib/import/m4/strstr.m4: Update.
876         * gnulib/import/m4/strtok_r.m4: Update.
877         * gnulib/import/m4/sys_socket_h.m4: Update.
878         * gnulib/import/m4/sys_stat_h.m4: Update.
879         * gnulib/import/m4/sys_time_h.m4: Update.
880         * gnulib/import/m4/sys_types_h.m4: Update.
881         * gnulib/import/m4/tempname.m4: Update.
882         * gnulib/import/m4/time_h.m4: Update.
883         * gnulib/import/m4/unistd-safer.m4: Update.
884         * gnulib/import/m4/unistd_h.m4: Update.
885         * gnulib/import/m4/warn-on-use.m4: Update.
886         * gnulib/import/m4/wchar_h.m4: Update.
887         * gnulib/import/m4/wchar_t.m4: Update.
888         * gnulib/import/m4/wctype_h.m4: Update.
889         * gnulib/import/m4/wint_t.m4: Update.
890         * gnulib/import/malloc.c: Update.
891         * gnulib/import/malloc/scratch_buffer.h: Update.
892         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
893         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
894         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
895         * gnulib/import/malloca.c: Update.
896         * gnulib/import/malloca.h: Update.
897         * gnulib/import/malloca.valgrind: Update.
898         * gnulib/import/math.in.h: Update.
899         * gnulib/import/mbrtowc.c: Update.
900         * gnulib/import/mbsinit.c: Update.
901         * gnulib/import/mbsrtowcs-impl.h: Update.
902         * gnulib/import/mbsrtowcs-state.c: Update.
903         * gnulib/import/mbsrtowcs.c: Update.
904         * gnulib/import/memchr.c: Update.
905         * gnulib/import/memmem.c: Update.
906         * gnulib/import/mempcpy.c: Update.
907         * gnulib/import/memrchr.c: Update.
908         * gnulib/import/mkdir.c: Update.
909         * gnulib/import/mkstemp.c: Update.
910         * gnulib/import/msvc-inval.c: Update.
911         * gnulib/import/msvc-inval.h: Update.
912         * gnulib/import/msvc-nothrow.c: Update.
913         * gnulib/import/msvc-nothrow.h: Update.
914         * gnulib/import/open.c: Update.
915         * gnulib/import/openat-die.c: Update.
916         * gnulib/import/openat-priv.h: Update.
917         * gnulib/import/openat-proc.c: Update.
918         * gnulib/import/openat.c: Update.
919         * gnulib/import/openat.h: Update.
920         * gnulib/import/opendir.c: Update.
921         * gnulib/import/pathmax.h: Update.
922         * gnulib/import/pipe-safer.c: Update.
923         * gnulib/import/rawmemchr.c: Update.
924         * gnulib/import/readdir.c: Update.
925         * gnulib/import/readlink.c: Update.
926         * gnulib/import/realloc.c: Update.
927         * gnulib/import/ref-add.sin: Update.
928         * gnulib/import/ref-del.sin: Update.
929         * gnulib/import/rename.c: Update.
930         * gnulib/import/rewinddir.c: Update.
931         * gnulib/import/rmdir.c: Update.
932         * gnulib/import/same-inode.h: Update.
933         * gnulib/import/save-cwd.c: Update.
934         * gnulib/import/save-cwd.h: Update.
935         * gnulib/import/scratch_buffer.h: Update.
936         * gnulib/import/secure_getenv.c: Update.
937         * gnulib/import/setenv.c: Update.
938         * gnulib/import/signal.in.h: Update.
939         * gnulib/import/stat-time.c: Update.
940         * gnulib/import/stat-time.h: Update.
941         * gnulib/import/stat-w32.c: Update.
942         * gnulib/import/stat-w32.h: Update.
943         * gnulib/import/stat.c: Update.
944         * gnulib/import/stdbool.in.h: Update.
945         * gnulib/import/stddef.in.h: Update.
946         * gnulib/import/stdint.in.h: Update.
947         * gnulib/import/stdio.in.h: Update.
948         * gnulib/import/stdlib.in.h: Update.
949         * gnulib/import/str-two-way.h: Update.
950         * gnulib/import/strchrnul.c: Update.
951         * gnulib/import/strdup.c: Update.
952         * gnulib/import/streq.h: Update.
953         * gnulib/import/strerror-override.c: Update.
954         * gnulib/import/strerror-override.h: Update.
955         * gnulib/import/strerror.c: Update.
956         * gnulib/import/string.in.h: Update.
957         * gnulib/import/stripslash.c: Update.
958         * gnulib/import/strnlen1.c: Update.
959         * gnulib/import/strnlen1.h: Update.
960         * gnulib/import/strstr.c: Update.
961         * gnulib/import/strtok_r.c: Update.
962         * gnulib/import/sys_stat.in.h: Update.
963         * gnulib/import/sys_time.in.h: Update.
964         * gnulib/import/sys_types.in.h: Update.
965         * gnulib/import/tempname.c: Update.
966         * gnulib/import/tempname.h: Update.
967         * gnulib/import/time.in.h: Update.
968         * gnulib/import/unistd--.h: Update.
969         * gnulib/import/unistd-safer.h: Update.
970         * gnulib/import/unistd.in.h: Update.
971         * gnulib/import/unsetenv.c: Update.
972         * gnulib/import/verify.h: Update.
973         * gnulib/import/extra/snippet/warn-on-use.h: Update.
974         * gnulib/import/wchar.in.h: Update.
975         * gnulib/import/wctype.in.h: Update.
976         * gnulib/import/xalloc-oversized.h: Update.
977         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
978         "53e2c179f26a890fa6685af4b6c1397ee370433b".
979
980 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
981
982         * record-btrace.c (get_thread_current_frame): Remove
983         old_inferior_ptid.
984
985 2018-09-10  Jerome Guitton  <guitton@adacore.com>
986
987         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
988         with check_tag to 1 if and only if the type is tagged and the
989         component being searched cannot been found in the current
990         view. Otherwise, always call ada_to_fixed_type with
991         check_tag to 0.
992
993 2018-09-10  Xavier Roirand  <roirand@adacore.com>
994
995         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
996         declaration.
997         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
998         * ada-varobj.c (ada_varobj_get_number_of_children,
999         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1000
1001 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1002
1003         * ada-valprint.c (ada_value_print): Use type instead of
1004         enclosing type.
1005
1006 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1007
1008         * ada-lang.c (ada_value_subscript): Handle case when parameter is
1009         an array of access to unconstrained array.
1010
1011 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1012
1013         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1014         (ada_check_typedef): Use it.
1015
1016 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1017
1018         * ada-varobj.c (ada_varobj_describe_struct_child)
1019         (ada_varobj_describe_child): Handle union case like struct one.
1020
1021 2018-09-10  Tom Tromey  <tom@tromey.com>
1022
1023         PR python/18380:
1024         * python/python.c (_initialize_python): Make example in "python"
1025         help work in Python 3.
1026
1027 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
1028
1029         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1030         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
1031         $(EXEEXT) to the script, as it is not a program.
1032
1033 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
1034
1035         * python/py-prettyprint.c (pretty_print_one_value): Return
1036         gdbpy_ref<>.
1037         (print_string_repr): Adjust.
1038         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1039         * python/python-internal.h (apply_varobj_pretty_printer): Return
1040         gdbpy_ref<>.
1041         * varobj.c (varobj_value_get_print_value): Adjust.
1042
1043 2018-09-08  Tom Tromey  <tom@tromey.com>
1044
1045         PR python/16047:
1046         * python/py-prettyprint.c (pretty_print_one_value): Check for
1047         to_string method.
1048
1049 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1050
1051         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1052         replace_operator_with_call.
1053
1054 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1055
1056         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1057
1058 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1059
1060         * ada-typeprint.c (print_range): Print the bounds using TYPE
1061         rather than its TYPE_TARGET_TYPE.
1062
1063 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1064
1065         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1066         call to ada_to_fixed_value_create.
1067
1068 2018-09-08  Jerome Guitton  <guitton@adacore.com>
1069
1070         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1071
1072 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1073
1074         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1075         by calls to error.
1076
1077 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1078
1079         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1080         Move update of loop variable "fi".
1081
1082 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1083
1084         * ada-lang.c (value_assign_to_component): In the case of
1085         big-endian targets, extract the bits of the given VAL
1086         using an src_offset of zero if container is not a scalar.
1087
1088 2018-09-06  Simon Ser  <contact@emersion.fr>
1089
1090         PR gdb/23105
1091         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1092         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1093         * fbsd-tdep.c (fbsd_make_note_desc): New.
1094         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1095         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1096         * target.h (enum target_object) Add FreeBSD-specific
1097         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1098
1099 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1100
1101         * compile/compile-c.h (generate_c_for_variable_locations):
1102         Change reference to pointer.
1103         * compile/compile-c-support.c (compile_program) <compute>:
1104         Likewise.
1105         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1106         (generate_c_for_for_one_variable): Likewise
1107         (generate_c_for_variable_locations): Likewise
1108         * compile/compile-c-types.c (compile_c_instance::convert_type):
1109         Likewise
1110         * compile/compile-cplus-symbols.c (convert_one_symbol):
1111         std::move the scope passed to enter_scope.
1112         * compile/compile-cplus-types.c
1113         (compile_cplus_instance::enter_scope): Make parameter
1114         rvalue-reference.
1115         (compile_cplus_instance::new_scope): Change reference to
1116         pointer.
1117         (compile_cplus_instance::convert_type): Likewise
1118         (compile_cplus_convert_typedef): std::move the scope passed to
1119         enter_scope.
1120         (compile_cplus_convert_struct_or_union): Likewise.
1121         (compile_cplus_convert_enum): Likewise.
1122         (compile_cplus_convert_namespace): Likewise.
1123         * compile/compile-cplus.h (compile_cplus_instance)
1124         <enter_scope>: Make parameter rvalue-reference.
1125         * compile/compile-internal.h (compile_instance)
1126         <get_cached_type>: Likewise
1127         * compile/compile-loc2c.c (push): Likewise
1128         (pushf): Likewise
1129         (unary): Likewise
1130         (binary): Likewise
1131         (print_label): Likewise
1132         (pushf_register_address): Likewise
1133         (pushf_register): Likewise
1134         (do_compile_dwarf_expr_to_c): Likewise
1135         (compile_dwarf_expr_to_c): Likewise
1136         (compile_dwarf_bounds_to_c): Likewise
1137         * compile/compile.c (compile_instance::get_cached_type):
1138         Likewise
1139         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1140         (compile_dwarf_bounds_to_c): Likewise
1141         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1142         (dwarf2_compile_property_to_c): Likewise
1143         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1144         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1145         Likewise
1146
1147 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1148
1149         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1150         * tui/tui-data.c (init_content_element): Don't initialize it.
1151
1152 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1153
1154         * tui/tui-data.h (struct tui_win_info)
1155         <detail::opaque>: Remove.
1156         * tui/tui-data.c (init_win_info): Remove assignment.
1157
1158 2018-09-05  Tom Tromey  <tom@tromey.com>
1159
1160         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1161         -Wformat-nonliteral.
1162         * target-float.c (host_float_ops<T>::to_string)
1163         (host_float_ops<T>::from_string): Use
1164         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1165         * configure: Rebuild.
1166
1167 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1168
1169         * printcmd.c (printf_c_string): Use
1170         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1171         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1172
1173 2018-09-05  Tom Tromey  <tom@tromey.com>
1174
1175         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1176
1177 2018-09-05  Tom de Vries  <tdevries@suse.de>
1178
1179         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1180         with resolve_abstract_p == true.
1181         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1182         defaulting to false. Propagate resolve_abstract_p to
1183         dwarf2_fetch_die_loc_sect_off.
1184         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1185         parameter, defaulting to false.
1186         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1187         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1188         parameter.
1189         * dwarf2read.h (struct die_info): Forward-declare.
1190         (die_info_ptr): New typedef.
1191         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1192
1193 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
1194
1195         GDB 8.2 released.
1196
1197 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1198             Pedro Alves  <palves@redhat.com>
1199
1200         * gnulib/Makefile.in (aclocal_m4_deps): Move to
1201         "aclocal-m4-deps.mk".  Include file here.
1202         $(srcdir)/aclocal.m4: Add "configure.ac".
1203         * gnulib/aclocal-m4-deps.mk: New file.
1204         * gnulib/update-gnulib.sh: Automatically update
1205         "aclocal-m4-deps.mk".
1206
1207 2018-09-04  Tom Tromey  <tom@tromey.com>
1208
1209         * configure: Rebuild.
1210         * configure.ac: Remove multi-ice code.
1211
1212 2018-09-04  Tom Tromey  <tom@tromey.com>
1213
1214         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1215         (ada-exp.o): Update.
1216
1217 2018-09-04  Tom Tromey  <tom@tromey.com>
1218
1219         * Makefile.in (printcmd.o, target-float.o): Remove.
1220         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1221
1222 2018-09-04  Tom Tromey  <tom@tromey.com>
1223
1224         * gnulib/Makefile.in: Remove obsolete comment.
1225         * Makefile.in: Remove obsolete comment.
1226
1227 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
1228
1229         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1230         line with '+'.
1231
1232 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1233
1234         * riscv-tdep.c: Add 'prologue-value.h' include.
1235         (struct riscv_unwind_cache): New struct.
1236         (riscv_debug_unwinder): New global.
1237         (riscv_scan_prologue): Update arguments, capture register details
1238         from prologue scan.
1239         (riscv_skip_prologue): Reformat arguments line, move end of
1240         prologue calculation into riscv_scan_prologue.
1241         (riscv_frame_cache): Update return type, create
1242         riscv_unwind_cache, scan the prologue, and fill in remaining cache
1243         details.
1244         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1245         (riscv_frame_prev_register): Use the trad_frame within the
1246         riscv_unwind_cache.
1247         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1248         flag.
1249
1250 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1251
1252         * trad-frame.h (trad_frame_set_realreg): Declare.
1253         (trad_frame_set_addr): Declare.
1254         * trad-frame.c (trad_frame_set_realreg): Define new function.
1255         (trad_frame_set_addr): Define new function.
1256         (trad_frame_set_reg_realreg): Use new function.
1257         (trad_frame_set_reg_addr): Use new function.
1258
1259 2018-09-01  Keith Seitz  <keiths@redhat.com>
1260
1261         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1262         pulongest instead of "%lld".
1263         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1264         ATTRIBUTE_UNUSED.
1265
1266 2018-08-31  Tom Tromey  <tom@tromey.com>
1267
1268         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1269         variant part type.
1270
1271 2018-08-31  Pedro Alves  <palves@redhat.com>
1272
1273         * gdbarch.h: Regenerate.
1274
1275 2018-08-31  Pedro Alves  <palves@redhat.com>
1276
1277         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1278         * target.h (Hardware watchpoint interfaces): Describe
1279         continuable/steppable/non-steppable watchpoints.
1280         * gdbarch.h, gdbarch.c: Regenerate.
1281
1282 2018-08-31  Pedro Alves  <palves@redhat.com>
1283
1284         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1285         Delete.
1286         * s390-linux-nat.c
1287         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1288         * target.h (target_ops::have_continuable_watchpoint): Delete.
1289         (target_have_continuable_watchpoint): Delete.
1290         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1291         * target-delegates.c: Regenerate.
1292
1293 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1294
1295         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1296         the files present in "gnulib/import/m4/".
1297
1298 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1299
1300         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1301         c.sw, c.swsp, and c.sdsp.
1302
1303 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1304
1305         * riscv-tdep.c (struct riscv_inferior_data): Delete.
1306         (riscv_read_misa_reg): Don't cache value read into inferior data.
1307         (riscv_new_inferior_data): Delete.
1308         (riscv_inferior_data_cleanup): Delete.
1309         (riscv_inferior_data): Delete.
1310         (riscv_invalidate_inferior_data): Delete.
1311         (_initialize_riscv_tdep): Remove initialisation of inferior data.
1312
1313 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
1314
1315         * compile/compile-cplus-types.c
1316         (compile_cplus_instance::leave_scope): Take the address of scope
1317         object.
1318         (compile_cplus_instance::convert_qualified_base): Compare quals
1319         to 0.
1320
1321 2018-08-30  Keith Seitz  <keiths@redhat.com>
1322
1323         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1324         Use "%s" and host_address_to_string instead of "%p" in printf.
1325
1326 2018-08-29  Keith Seitz  <keiths@redhat.com>
1327
1328         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1329         and compile-cplus-types.c.
1330         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1331         * c-lang.c (cplus_language_defn): Set C++ compile functions.
1332         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1333         Declare.
1334         * compile/compile-c-support.c: Include compile-cplus.h.
1335         (load_libcompile): Templatize.
1336         (get_compile_context): "New" function.
1337         (c_get_compile_context): Use get_compile_context.
1338         (cplus_get_compile_context): New function.
1339         (cplus_push_user_expression, cplus_pop_user_expression)
1340         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1341         (cplus_compute_program): Define new structs/functions.
1342         * compile/compile-cplus-symmbols.c: New file.
1343         * compile/compile-cplus-types.c: New file.
1344         * compile/compile-cplus.h: New file.
1345         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1346         Declare.
1347         * compile/compile-object-load.c (get_out_value_type): Use
1348         strncmp_iw when comparing symbol names.
1349         (compile_object_load): Add mst_bss and mst_data.
1350         * compile/compile.c (_initialize_compile): Remove
1351         -Wno-implicit-function-declaration from `compile_args'.
1352         * compile/gcc-cp-plugin.h: New file.
1353         * NEWS: Mention C++ compile support and new debug options.
1354
1355 2018-08-29  Keith Seitz  <keiths@redhat.com>
1356
1357         * linespec.c (collect_info::add_symbol): Make virtual.
1358         (struct symbol_searcher_collect_info): New struct.
1359         (symbol_searcher::find_all_symbols): New method.
1360         * symtab.h (class symbol_searcher): New class.
1361
1362 2018-08-29  Keith Seitz  <keiths@redhat.com>
1363
1364         * linespec.c (struct linespec) <function_symbols, label_symbols>:
1365         Change to vector of block_symbol.  Update all users.
1366         (struct collect_info) <symbols>: Likewise.
1367         (collect_info::add_symbol): Take block_symbol as argument.
1368         Update all callers.
1369         (decode_compound_collector) <m_symbols>: Change type to vector
1370         of block_symbol.  Update all users.
1371         (decode_compound_collector::operator ()): Change parameter type
1372         to block_symbol.
1373         (find_method, find_function_symbols, find_linespec_symbols)
1374         (find_label_symbols_in_block, find_label_symbols): Change symbol
1375         vectors to block_symbol vectors.
1376         * symtab.h (symbol_found_callback_ftype): Change parameter type to
1377         block_symbol.
1378
1379 2018-08-29  Keith Seitz  <keiths@redhat.com>
1380
1381         * linespec.c (symbolp): Remove typedef and VEC definitions.
1382         (bound_minimal_symbol_d): Likewise.
1383
1384 2018-08-29  Keith Seitz  <keiths@redhat.com>
1385
1386         * linespec.c (decode_compound_collector::decode_compound_collector):
1387         Remove initialization for `m_symtabs'.
1388         (decode_compound_collector::release_symbols): Change return type
1389         to std::vector.  Update all callers.
1390         (class decode_compound_collector) <m_symbols>: Change type to
1391         std::vector.
1392         (lookup_prefix_sym): Change return type to std::vector.  Update all
1393         callers.
1394         (compare_symbols): Remove.
1395         (std_compare_symbols): Rename to `compare_symbols'.
1396         (find_method): Change `sym_classes' parameter to std::vector.
1397         Update all callers.  Use std::sort to sort sym_classes.
1398         (find_linespec_symbols): Remove cleanup.
1399
1400 2018-08-29  Keith Seitz  <keiths@redhat.com>
1401
1402         * linespec.c (struct linespec) <minimal_symbols>: Change type to
1403         std::vector.  Update all users.
1404         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1405         (struct collect_info) <minimal_symbols>: Likewise.
1406         (compare_msymbols): Return bool.  Change parameters to const
1407         bound_minimal_symbol references.
1408         (find_method, find_function_symbols, find_linespec_symbols): Change
1409         `minsyms' parameter to std::vector.  Update all callers.
1410
1411 2018-08-29  Keith Seitz  <keiths@redhat.com>
1412
1413         * linespec.c (struct linespec) <label_symbols>: Change type to
1414         std::vector.  Update all users.
1415         (find_label_symbols_in_block): Change `result' parameter to
1416         std::vector.  Update all callers.
1417         (find_label_symbols): Return std::vector.  Update all callers.
1418
1419 2018-08-29  Keith Seitz  <keiths@redhat.com>
1420
1421         * linespec.c (struct linespec) <function_symbols>: Change type to
1422         std::vector.  Update all users.
1423         (struct collect_info) <function_symbols>: Likewise.
1424         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1425         (std_compare_symbols): New function.
1426         (find_method, find_function_symbols, find_linespec_symbols)
1427         (find_label_symbols_in_block): Change `symbols' parameter to
1428         std::vector.  Update all callers.
1429         (find_label_symbols): Likewise for `function_symbols' and
1430         `label_funcs_ret'.
1431
1432 2018-08-29  Keith Seitz  <keiths@redhat.com>
1433
1434         * linespec.c (symtab_vector_up): Define.
1435         (struct linespec) <file_symtabs>: Change type to std::vector *.
1436         Update all uses.
1437         (struct collect_info) <file_symtabs>: Likewise.
1438         (collect_symtabs_from_filename): Return symtab_vector_up.
1439         Update all callers.
1440         (decode_objc): Remove cleanup.
1441         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1442         (symtab_collector::release_symtabs): Return symtab_vector_up.
1443         Update all callers.
1444         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1445         Update all users.
1446         (collect_symtabs_from_filename, symtabs_from_filename): Return
1447         symtab_vector_up.  Update all callers.
1448
1449 2018-08-29  Tom Tromey  <tom@tromey.com>
1450
1451         * csky-tdep.c (csky_analyze_prologue): Use
1452         core_addr_to_string_nz.
1453
1454 2018-08-29  Tom Tromey  <tom@tromey.com>
1455
1456         * windows-nat.c (struct xlate_exception) <them>: Change type to
1457         DWORD.
1458         (xlate): Fix formatting.  Remove last entry.
1459         (struct xlate_exception, xlate): Comment out.
1460         (windows_nat_target::resume): Use ranged for.
1461
1462 2018-08-29  Jim Wilson  <jimw@sifive.com>
1463
1464         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1465         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1466         of NT_PRFPREG.
1467         (riscv_linux_nat_target::store_registers): Likewise.
1468
1469 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1470
1471         PR gdb/23555
1472         PR gdb/23558
1473         * gnulib/aclocal.m4: Regenerate.
1474         * gnulib/config.in: Regenerate.
1475         * gnulib/configure: Regenerate.
1476         * gnulib/import/Makefile.am: Update.
1477         * gnulib/import/Makefile.in: Update.
1478         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1479         * gnulib/import/_Noreturn.h: ... this.
1480         * gnulib/import/alloca.in.h: Update.
1481         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1482         * gnulib/import/arg-nonnull.h: ... this.
1483         * gnulib/import/assure.h: Update.
1484         * gnulib/import/at-func.c: Update.
1485         * gnulib/import/basename-lgpl.c: Update.
1486         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1487         * gnulib/import/c++defs.h: ... this.
1488         * gnulib/import/canonicalize-lgpl.c: Update.
1489         * gnulib/import/cdefs.h: Update.
1490         * gnulib/import/chdir-long.c: Update.
1491         * gnulib/import/chdir-long.h: Update.
1492         * gnulib/import/cloexec.c: Update.
1493         * gnulib/import/cloexec.h: Update.
1494         * gnulib/import/close.c: Update.
1495         * gnulib/import/closedir.c: Update.
1496         * gnulib/import/config.charset: Update.
1497         * gnulib/import/dirent-private.h: Update.
1498         * gnulib/import/dirent.in.h: Update.
1499         * gnulib/import/dirfd.c: Update.
1500         * gnulib/import/dirname-lgpl.c: Update.
1501         * gnulib/import/dirname.h: Update.
1502         * gnulib/import/dosname.h: Update.
1503         * gnulib/import/dup-safer-flag.c: Update.
1504         * gnulib/import/dup-safer.c: Update.
1505         * gnulib/import/dup.c: Update.
1506         * gnulib/import/dup2.c: Update.
1507         * gnulib/import/errno.in.h: Update.
1508         * gnulib/import/error.c: Update.
1509         * gnulib/import/error.h: Update.
1510         * gnulib/import/exitfail.c: Update.
1511         * gnulib/import/exitfail.h: Update.
1512         * gnulib/import/extra/update-copyright: Update.
1513         * gnulib/import/fchdir.c: Update.
1514         * gnulib/import/fcntl.c: Update.
1515         * gnulib/import/fcntl.in.h: Update.
1516         * gnulib/import/fd-hook.c: Update.
1517         * gnulib/import/fd-hook.h: Update.
1518         * gnulib/import/fd-safer-flag.c: Update.
1519         * gnulib/import/fd-safer.c: Update.
1520         * gnulib/import/fdopendir.c: Update.
1521         * gnulib/import/filename.h: Update.
1522         * gnulib/import/filenamecat-lgpl.c: Update.
1523         * gnulib/import/filenamecat.h: Update.
1524         * gnulib/import/flexmember.h: Update.
1525         * gnulib/import/float+.h: Update.
1526         * gnulib/import/float.c: Update.
1527         * gnulib/import/float.in.h: Update.
1528         * gnulib/import/fnmatch.c: Update.
1529         * gnulib/import/fnmatch.in.h: Update.
1530         * gnulib/import/fnmatch_loop.c: Update.
1531         * gnulib/import/fpucw.h: Update.
1532         * gnulib/import/frexp.c: Update.
1533         * gnulib/import/frexpl.c: Update.
1534         * gnulib/import/fstat.c: Update.
1535         * gnulib/import/fstatat.c: Update.
1536         * gnulib/import/getcwd-lgpl.c: Update.
1537         * gnulib/import/getcwd.c: Update.
1538         * gnulib/import/getdtablesize.c: Update.
1539         * gnulib/import/getlogin_r.c: Update.
1540         * gnulib/import/getprogname.c: Update.
1541         * gnulib/import/getprogname.h: Update.
1542         * gnulib/import/gettext.h: Update.
1543         * gnulib/import/gettimeofday.c: Update.
1544         * gnulib/import/glob-libc.h: Update.
1545         * gnulib/import/glob.c: Update.
1546         * gnulib/import/glob.in.h: Update.
1547         * gnulib/import/glob_internal.h: Update.
1548         * gnulib/import/glob_pattern_p.c: Update.
1549         * gnulib/import/globfree.c: Update.
1550         * gnulib/import/hard-locale.c: Update.
1551         * gnulib/import/hard-locale.h: Update.
1552         * gnulib/import/intprops.h: Update.
1553         * gnulib/import/inttypes.in.h: Update.
1554         * gnulib/import/isnan.c: Update.
1555         * gnulib/import/isnand-nolibm.h: Update.
1556         * gnulib/import/isnand.c: Update.
1557         * gnulib/import/isnanl-nolibm.h: Update.
1558         * gnulib/import/isnanl.c: Update.
1559         * gnulib/import/itold.c: Update.
1560         * gnulib/import/libc-config.h: Update.
1561         * gnulib/import/limits.in.h: Update.
1562         * gnulib/import/localcharset.c: Update.
1563         * gnulib/import/localcharset.h: Update.
1564         * gnulib/import/localtime-buffer.c: Update.
1565         * gnulib/import/localtime-buffer.h: Update.
1566         * gnulib/import/lstat.c: Update.
1567         * gnulib/import/m4/00gnulib.m4: Update.
1568         * gnulib/import/m4/__inline.m4: Update.
1569         * gnulib/import/m4/absolute-header.m4: Update.
1570         * gnulib/import/m4/alloca.m4: Update.
1571         * gnulib/import/m4/builtin-expect.m4: Update.
1572         * gnulib/import/m4/canonicalize.m4: Update.
1573         * gnulib/import/m4/chdir-long.m4: Update.
1574         * gnulib/import/m4/close.m4: Update.
1575         * gnulib/import/m4/closedir.m4: Update.
1576         * gnulib/import/m4/configmake.m4: Update.
1577         * gnulib/import/m4/d-ino.m4: Update.
1578         * gnulib/import/m4/d-type.m4: Update.
1579         * gnulib/import/m4/dirent_h.m4: Update.
1580         * gnulib/import/m4/dirfd.m4: Update.
1581         * gnulib/import/m4/dirname.m4: Update.
1582         * gnulib/import/m4/double-slash-root.m4: Update.
1583         * gnulib/import/m4/dup.m4: Update.
1584         * gnulib/import/m4/dup2.m4: Update.
1585         * gnulib/import/m4/eealloc.m4: Update.
1586         * gnulib/import/m4/environ.m4: Update.
1587         * gnulib/import/m4/errno_h.m4: Update.
1588         * gnulib/import/m4/error.m4: Update.
1589         * gnulib/import/m4/exponentd.m4: Update.
1590         * gnulib/import/m4/exponentl.m4: Update.
1591         * gnulib/import/m4/extensions.m4: Update.
1592         * gnulib/import/m4/extern-inline.m4: Update.
1593         * gnulib/import/m4/fchdir.m4: Update.
1594         * gnulib/import/m4/fcntl-o.m4: Update.
1595         * gnulib/import/m4/fcntl.m4: Update.
1596         * gnulib/import/m4/fcntl_h.m4: Update.
1597         * gnulib/import/m4/fdopendir.m4: Update.
1598         * gnulib/import/m4/filenamecat.m4: Update.
1599         * gnulib/import/m4/flexmember.m4: Update.
1600         * gnulib/import/m4/float_h.m4: Update.
1601         * gnulib/import/m4/fnmatch.m4: Update.
1602         * gnulib/import/m4/fnmatch_h.m4: Update.
1603         * gnulib/import/m4/fpieee.m4: Update.
1604         * gnulib/import/m4/frexp.m4: Update.
1605         * gnulib/import/m4/frexpl.m4: Update.
1606         * gnulib/import/m4/fstat.m4: Update.
1607         * gnulib/import/m4/fstatat.m4: Update.
1608         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1609         * gnulib/import/m4/getcwd-path-max.m4: Update.
1610         * gnulib/import/m4/getcwd.m4: Update.
1611         * gnulib/import/m4/getdtablesize.m4: Update.
1612         * gnulib/import/m4/getlogin.m4: Update.
1613         * gnulib/import/m4/getlogin_r.m4: Update.
1614         * gnulib/import/m4/getpagesize.m4: Update.
1615         * gnulib/import/m4/getprogname.m4: Update.
1616         * gnulib/import/m4/gettimeofday.m4: Update.
1617         * gnulib/import/m4/glibc21.m4: Update.
1618         * gnulib/import/m4/glob.m4: Update.
1619         * gnulib/import/m4/glob_h.m4: Update.
1620         * gnulib/import/m4/gnulib-cache.m4: Update.
1621         * gnulib/import/m4/gnulib-common.m4: Update.
1622         * gnulib/import/m4/gnulib-comp.m4: Update.
1623         * gnulib/import/m4/gnulib-tool.m4: Update.
1624         * gnulib/import/m4/hard-locale.m4: Update.
1625         * gnulib/import/m4/include_next.m4: Update.
1626         * gnulib/import/m4/inttypes-pri.m4: Update.
1627         * gnulib/import/m4/inttypes.m4: Update.
1628         * gnulib/import/m4/isnand.m4: Update.
1629         * gnulib/import/m4/isnanl.m4: Update.
1630         * gnulib/import/m4/largefile.m4: Update.
1631         * gnulib/import/m4/limits-h.m4: Update.
1632         * gnulib/import/m4/localcharset.m4: Update.
1633         * gnulib/import/m4/locale-fr.m4: Update.
1634         * gnulib/import/m4/locale-ja.m4: Update.
1635         * gnulib/import/m4/locale-zh.m4: Update.
1636         * gnulib/import/m4/localtime-buffer.m4: Update.
1637         * gnulib/import/m4/longlong.m4: Update.
1638         * gnulib/import/m4/lstat.m4: Update.
1639         * gnulib/import/m4/malloc.m4: Update.
1640         * gnulib/import/m4/malloca.m4: Update.
1641         * gnulib/import/m4/math_h.m4: Update.
1642         * gnulib/import/m4/mbrtowc.m4: Update.
1643         * gnulib/import/m4/mbsinit.m4: Update.
1644         * gnulib/import/m4/mbsrtowcs.m4: Update.
1645         * gnulib/import/m4/mbstate_t.m4: Update.
1646         * gnulib/import/m4/memchr.m4: Update.
1647         * gnulib/import/m4/memmem.m4: Update.
1648         * gnulib/import/m4/mempcpy.m4: Update.
1649         * gnulib/import/m4/memrchr.m4: Update.
1650         * gnulib/import/m4/mkdir.m4: Update.
1651         * gnulib/import/m4/mkstemp.m4: Update.
1652         * gnulib/import/m4/mmap-anon.m4: Update.
1653         * gnulib/import/m4/mode_t.m4: Update.
1654         * gnulib/import/m4/msvc-inval.m4: Update.
1655         * gnulib/import/m4/msvc-nothrow.m4: Update.
1656         * gnulib/import/m4/multiarch.m4: Update.
1657         * gnulib/import/m4/nocrash.m4: Update.
1658         * gnulib/import/m4/off_t.m4: Update.
1659         * gnulib/import/m4/onceonly.m4: Update.
1660         * gnulib/import/m4/open-cloexec.m4: Update.
1661         * gnulib/import/m4/open.m4: Update.
1662         * gnulib/import/m4/openat.m4: Update.
1663         * gnulib/import/m4/opendir.m4: Update.
1664         * gnulib/import/m4/pathmax.m4: Update.
1665         * gnulib/import/m4/rawmemchr.m4: Update.
1666         * gnulib/import/m4/readdir.m4: Update.
1667         * gnulib/import/m4/readlink.m4: Update.
1668         * gnulib/import/m4/realloc.m4: Update.
1669         * gnulib/import/m4/rename.m4: Update.
1670         * gnulib/import/m4/rewinddir.m4: Update.
1671         * gnulib/import/m4/rmdir.m4: Update.
1672         * gnulib/import/m4/save-cwd.m4: Update.
1673         * gnulib/import/m4/secure_getenv.m4: Update.
1674         * gnulib/import/m4/setenv.m4: Update.
1675         * gnulib/import/m4/signal_h.m4: Update.
1676         * gnulib/import/m4/ssize_t.m4: Update.
1677         * gnulib/import/m4/stat-time.m4: Update.
1678         * gnulib/import/m4/stat.m4: Update.
1679         * gnulib/import/m4/std-gnu11.m4: Update.
1680         * gnulib/import/m4/stdbool.m4: Update.
1681         * gnulib/import/m4/stddef_h.m4: Update.
1682         * gnulib/import/m4/stdint.m4: Update.
1683         * gnulib/import/m4/stdio_h.m4: Update.
1684         * gnulib/import/m4/stdlib_h.m4: Update.
1685         * gnulib/import/m4/strchrnul.m4: Update.
1686         * gnulib/import/m4/strdup.m4: Update.
1687         * gnulib/import/m4/strerror.m4: Update.
1688         * gnulib/import/m4/string_h.m4: Update.
1689         * gnulib/import/m4/strstr.m4: Update.
1690         * gnulib/import/m4/strtok_r.m4: Update.
1691         * gnulib/import/m4/sys_socket_h.m4: Update.
1692         * gnulib/import/m4/sys_stat_h.m4: Update.
1693         * gnulib/import/m4/sys_time_h.m4: Update.
1694         * gnulib/import/m4/sys_types_h.m4: Update.
1695         * gnulib/import/m4/tempname.m4: Update.
1696         * gnulib/import/m4/time_h.m4: Update.
1697         * gnulib/import/m4/unistd-safer.m4: Update.
1698         * gnulib/import/m4/unistd_h.m4: Update.
1699         * gnulib/import/m4/warn-on-use.m4: Update.
1700         * gnulib/import/m4/wchar_h.m4: Update.
1701         * gnulib/import/m4/wchar_t.m4: Update.
1702         * gnulib/import/m4/wctype_h.m4: Update.
1703         * gnulib/import/m4/wint_t.m4: Update.
1704         * gnulib/import/malloc.c: Update.
1705         * gnulib/import/malloc/scratch_buffer.h: Update.
1706         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1707         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1708         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1709         * gnulib/import/malloca.c: Update.
1710         * gnulib/import/malloca.h: Update.
1711         * gnulib/import/malloca.valgrind: Update.
1712         * gnulib/import/math.in.h: Update.
1713         * gnulib/import/mbrtowc.c: Update.
1714         * gnulib/import/mbsinit.c: Update.
1715         * gnulib/import/mbsrtowcs-impl.h: Update.
1716         * gnulib/import/mbsrtowcs-state.c: Update.
1717         * gnulib/import/mbsrtowcs.c: Update.
1718         * gnulib/import/memchr.c: Update.
1719         * gnulib/import/memmem.c: Update.
1720         * gnulib/import/mempcpy.c: Update.
1721         * gnulib/import/memrchr.c: Update.
1722         * gnulib/import/mkdir.c: Update.
1723         * gnulib/import/mkstemp.c: Update.
1724         * gnulib/import/msvc-inval.c: Update.
1725         * gnulib/import/msvc-inval.h: Update.
1726         * gnulib/import/msvc-nothrow.c: Update.
1727         * gnulib/import/msvc-nothrow.h: Update.
1728         * gnulib/import/open.c: Update.
1729         * gnulib/import/openat-die.c: Update.
1730         * gnulib/import/openat-priv.h: Update.
1731         * gnulib/import/openat-proc.c: Update.
1732         * gnulib/import/openat.c: Update.
1733         * gnulib/import/openat.h: Update.
1734         * gnulib/import/opendir.c: Update.
1735         * gnulib/import/pathmax.h: Update.
1736         * gnulib/import/pipe-safer.c: Update.
1737         * gnulib/import/rawmemchr.c: Update.
1738         * gnulib/import/readdir.c: Update.
1739         * gnulib/import/readlink.c: Update.
1740         * gnulib/import/realloc.c: Update.
1741         * gnulib/import/ref-add.sin: Update.
1742         * gnulib/import/ref-del.sin: Update.
1743         * gnulib/import/rename.c: Update.
1744         * gnulib/import/rewinddir.c: Update.
1745         * gnulib/import/rmdir.c: Update.
1746         * gnulib/import/same-inode.h: Update.
1747         * gnulib/import/save-cwd.c: Update.
1748         * gnulib/import/save-cwd.h: Update.
1749         * gnulib/import/scratch_buffer.h: Update.
1750         * gnulib/import/secure_getenv.c: Update.
1751         * gnulib/import/setenv.c: Update.
1752         * gnulib/import/signal.in.h: Update.
1753         * gnulib/import/stat-time.c: Update.
1754         * gnulib/import/stat-time.h: Update.
1755         * gnulib/import/stat-w32.c: Update.
1756         * gnulib/import/stat-w32.h: Update.
1757         * gnulib/import/stat.c: Update.
1758         * gnulib/import/stdbool.in.h: Update.
1759         * gnulib/import/stddef.in.h: Update.
1760         * gnulib/import/stdint.in.h: Update.
1761         * gnulib/import/stdio.in.h: Update.
1762         * gnulib/import/stdlib.in.h: Update.
1763         * gnulib/import/str-two-way.h: Update.
1764         * gnulib/import/strchrnul.c: Update.
1765         * gnulib/import/strdup.c: Update.
1766         * gnulib/import/streq.h: Update.
1767         * gnulib/import/strerror-override.c: Update.
1768         * gnulib/import/strerror-override.h: Update.
1769         * gnulib/import/strerror.c: Update.
1770         * gnulib/import/string.in.h: Update.
1771         * gnulib/import/stripslash.c: Update.
1772         * gnulib/import/strnlen1.c: Update.
1773         * gnulib/import/strnlen1.h: Update.
1774         * gnulib/import/strstr.c: Update.
1775         * gnulib/import/strtok_r.c: Update.
1776         * gnulib/import/sys_stat.in.h: Update.
1777         * gnulib/import/sys_time.in.h: Update.
1778         * gnulib/import/sys_types.in.h: Update.
1779         * gnulib/import/tempname.c: Update.
1780         * gnulib/import/tempname.h: Update.
1781         * gnulib/import/time.in.h: Update.
1782         * gnulib/import/unistd--.h: Update.
1783         * gnulib/import/unistd-safer.h: Update.
1784         * gnulib/import/unistd.in.h: Update.
1785         * gnulib/import/unsetenv.c: Update.
1786         * gnulib/import/verify.h: Update.
1787         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1788         * gnulib/import/wchar.in.h: Update.
1789         * gnulib/import/wctype.in.h: Update.
1790         * gnulib/import/xalloc-oversized.h: Update.
1791         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1792         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1793
1794 2018-08-16  Gary Benson <gbenson@redhat.com>
1795
1796         PR gdb/13000:
1797         * gdb/main.c (captured_main_1): Exit with nonzero status
1798         in batch mode if the last command to be executed failed.
1799         * NEWS: Mention the above.
1800
1801 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
1802
1803         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1804         end of warning message.
1805
1806 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1807
1808         PR gdb/22943:
1809         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1810         (aarch64_extract_return_value): Use
1811         aapcs_is_vfp_call_or_return_candidate.
1812         (aarch64_return_in_memory): Likewise.
1813         (aarch64_store_return_value): Likewise.
1814
1815 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1816
1817         * aarch64-tdep.c
1818         (aapcs_is_vfp_call_or_return_candidate): Make static
1819         (pass_in_v_or_stack): Remove function.
1820         (pass_in_v_vfp_candidate): New function.
1821         (aarch64_push_dummy_call): Check for float register candidates.
1822
1823 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1824
1825         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1826         (aapcs_is_vfp_call_or_return_candidate_1): New function.
1827         (aapcs_is_vfp_call_or_return_candidate): Likewise.
1828
1829 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
1830
1831         PR build/23399
1832         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1833         (struct ipa_sym_addresses): Rename to...
1834         (struct ipa_sym_addresses_common): ... this.
1835         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1836
1837 2018-08-28  Tom Tromey  <tom@tromey.com>
1838
1839         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1840         (token_fifo): Now a std::vector.
1841         (yylex, c_parse): Update.
1842         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1843         (token_fifo): Now a std::vector.
1844         (yylex, d_parse): Update.
1845         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
1846         (token_fifo): Now a std::vector.
1847         (yylex, go_parse): Update.
1848
1849 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
1850
1851         * parser-defs.h (struct type_stack) <elements>: Change type to
1852         std::vector<union type_stack_elt>.
1853         <depth, size>: Remove.
1854         * parse.c (parse_exp_in_context_1): Adjust.
1855         (type_stack_reserve): Remove.
1856         (check_type_stack_depth): Remove.
1857         (insert_into_type_stack): Adjust to std::vector.
1858         (insert_type): Likewise.
1859         (push_type): Likewise.
1860         (push_type_int): Likewise.
1861         (insert_type_address_space): Likewise.
1862         (pop_type): Likewise.
1863         (pop_type_int): Likewise.
1864         (pop_typelist): Likewise.
1865         (pop_type_stack): Likewise.
1866         (append_type_stack): Likewise.
1867         (push_type_stack): Likewise.
1868         (get_type_stack): Likewise.
1869         (type_stack_cleanup): Likewise.
1870         (push_typelist): Likewise.
1871         (follow_types): Likewise.
1872         (_initialize_parse): Likewise.
1873
1874 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
1875
1876         * NEWS: Mention csky target.
1877
1878 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
1879             Hafiz Abid Qadeer  <abidh@codesourcery.com>
1880             Don Breazeal  <donb@codesourcery.com>
1881
1882         * csky-linux-tdep.c: New file.
1883         * csky-tdep.c: Likewise.
1884         * csky-tdep.h: Likewise.
1885         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
1886         csky-tdep.o.
1887         (HFILES_NO_SRCDIR): Add csky-tdep.h.
1888         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
1889         * configure.tgt: Add csky support.
1890
1891 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
1892
1893         * python/py-framefilter.c (py_print_frame): Print frame architecture
1894         when printing on an MI output.
1895
1896 2018-08-27  Tom Tromey  <tom@tromey.com>
1897
1898         PR build/23087:
1899         * configure: Rebuild.
1900         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
1901
1902 2018-08-27  Tom Tromey  <tom@tromey.com>
1903
1904         * aarch64-linux-tdep.c
1905         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
1906         casts to int.
1907
1908 2018-08-27  Tom Tromey  <tom@tromey.com>
1909
1910         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
1911         unsigned.
1912         (ppc64_standard_linkage1, ppc64_standard_linkage2)
1913         (ppc64_standard_linkage3, ppc64_standard_linkage4)
1914         (ppc64_standard_linkage5, ppc64_standard_linkage6)
1915         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
1916         unsigned.
1917
1918 2018-08-27  Tom Tromey  <tom@tromey.com>
1919
1920         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
1921         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
1922
1923 2018-08-27  Tom Tromey  <tom@tromey.com>
1924
1925         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
1926         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
1927         ULONGEST_MAX.
1928         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
1929         ULONGEST_MAX.
1930         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
1931         ULONGEST_MAX.
1932         * sparc-linux-tdep.c (sparc32_linux_sigframe)
1933         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
1934         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
1935         ULONGEST_MAX.
1936         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
1937         (ppc64_linux_sigaction_tramp_frame)
1938         (ppc32_linux_sighandler_tramp_frame)
1939         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1940         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
1941         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
1942         * mn10300-linux-tdep.c (am33_linux_sigframe)
1943         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
1944         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
1945         * mips-linux-tdep.c (mips_linux_o32_sigframe)
1946         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
1947         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
1948         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
1949         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
1950         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
1951         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
1952         * microblaze-linux-tdep.c
1953         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
1954         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
1955         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
1956         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
1957         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
1958         * common/common-types.h (ULONGEST_MAX): New define.
1959         (CORE_ADDR_MAX): Fix formatting.
1960         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
1961         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
1962         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
1963         (arm_linux_rt_sigreturn_tramp_frame)
1964         (arm_eabi_linux_sigreturn_tramp_frame)
1965         (arm_eabi_linux_rt_sigreturn_tramp_frame)
1966         (thumb2_eabi_linux_sigreturn_tramp_frame)
1967         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
1968         (arm_linux_restart_syscall_tramp_frame)
1969         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
1970         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
1971         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
1972         ULONGEST_MAX.
1973         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
1974
1975 2018-08-27  Tom Tromey  <tom@tromey.com>
1976
1977         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
1978         CORE_ADDR_MAX.
1979         * mips-tdep.c (mips_deal_with_atomic_sequence)
1980         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
1981         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
1982         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
1983         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
1984         CORE_ADDR_MAX.
1985         * aarch64-tdep.c (aarch64_software_single_step): Use
1986         CORE_ADDR_MAX.
1987
1988 2018-08-27  Tom Tromey  <tom@tromey.com>
1989
1990         * linespec.c (complete_linespec_component): Add cast to "char".
1991         * completer.c (completion_tracker::build_completion_result): Add
1992         cast to "char".
1993
1994 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
1995
1996         * solist.h (struct solist, struct target_so_ops): Fix
1997         indentation.
1998
1999 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2000
2001         * ada-tasks.c (ada_task_info_s): Remove typedef.
2002         (DEF_VEC_O(ada_task_info_s)): Remove.
2003         (struct ada_tasks_inferior_data): Initialize fields.
2004         <task_list>: Make an std::vector.
2005         (get_ada_tasks_inferior_data): Allocate with new.
2006         (ada_get_task_number): Adjust.
2007         (get_task_number_from_id): Likewise.
2008         (valid_task_id): Likewise.
2009         (ada_get_task_info_from_ptid): Likewise.
2010         (iterate_over_live_ada_tasks): Likewise.
2011         (add_ada_task): Likewise.
2012         (read_known_tasks): Likewise.
2013         (ada_build_task_list): Likewise.
2014         (print_ada_task_info): Likewise.
2015         (info_task): Likewise.
2016         (task_command_1): Likewise.
2017
2018 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2019
2020         * ada-lang.c (add_angle_brackets): Return std::string.
2021
2022 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
2023
2024         * python/py-threadevent.c (py_get_event_thread): Initialize
2025         pythread.
2026
2027 2018-08-24  Pedro Alves  <palves@redhat.com>
2028
2029         * python/py-bpevent.c (create_breakpoint_event_object): Use
2030         copy-initialization.
2031         * python/py-continueevent.c (emit_continue_event): Use
2032         copy-initialization.
2033         * python/py-exitedevent.c (create_exited_event_object): Return a
2034         gdbpy_ref<>.
2035         (emit_exited_event): Use copy-initialization.
2036         * python/py-inferior.c (python_new_inferior)
2037         (python_inferior_deleted, add_thread_object): Use
2038         copy-initialization.
2039         * python/py-infevents.c (create_inferior_call_event_object)
2040         (create_register_changed_event_object)
2041         (create_memory_changed_event_object): Return a gdbpy_ref<>.
2042         (emit_inferior_call_event, emit_memory_changed_event)
2043         (emit_register_changed_event): Use copy-initialization.
2044         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2045         Return a gdbpy_ref<>.
2046         (emit_new_objfile_event): Use copy-initialization.
2047         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2048         (emit_clear_objfiles_event): Use copy-initialization.
2049         * python/py-signalevent.c (create_signal_event_object): Use
2050         copy-initialization.
2051         * python/py-threadevent.c (create_thread_event_object): Use
2052         copy-initialization.
2053
2054 2018-08-24  Pedro Alves  <palves@redhat.com>
2055             Simon Marchi  <simon.marchi@ericsson.com>
2056
2057         PR gdb/23379
2058         * python/py-continueevent.c: Include "gdbthread.h".
2059         (create_continue_event_object): Add intro comment.  Add 'ptid'
2060         parameter.  Use it to find thread to pass to
2061         create_thread_event_object.
2062         (emit_continue_event): Pass PTID down to
2063         create_continue_event_object.
2064         * python/py-event.h (py_get_event_thread): Declare.
2065         (create_thread_event_object): Remove default from 'thread'
2066         parameter.
2067         * python/py-stopevent.c (create_stop_event_object): Use
2068         py_get_event_thread.
2069         * python/py-threadevent.c (get_event_thread): Rename to ...
2070         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2071         and use it to find the thread.
2072         (create_thread_event_object): Assert that THREAD isn't null.
2073         Don't find the event thread here.
2074
2075 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
2076
2077         * block.h (blockrange, blockranges): New struct declarations.
2078         (struct block): Add new field named `ranges'.
2079         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2080         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2081         macros for accessing ranges in struct block.
2082         (make_blockranges): New declaration.
2083         block.c (make_blockranges): New function.
2084         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2085         for block.
2086         * symtab.h (find_pc_partial_function): Add new parameter `block'.
2087         * blockframe.c (cache_pc_function_block): New static global.
2088         (clear_pc_function_cache): Clear cache_pc_function_block.
2089         (find_pc_partial_function): Move comment to symtab.h.  Add
2090         support for non-contiguous blocks.
2091         * cli/cli-cmds.c (block.h): Include.
2092         (print_disassembly): Handle printing of non-contiguous blocks.
2093         (disassemble_current_function): Likewise.
2094         (disassemble_command): Likewise.
2095
2096         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2097         BLOCK_START.
2098         * blockframe.c (get_pc_function_start): Likewise.
2099         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2100         (gcc_symbol_address): Likewise.
2101         * compile/compile-object-run.c (compile_object_run): Likewise.
2102         * compile/compile.c (get_expr_block_and_pc): Likewise.
2103         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2104         (func_addr_to_tail_call_list): Likewise.
2105         * findvar.c (default_read_var_value): Likewise.
2106         * inline-frame.c (inline_frame_this_id): Likewise.
2107         (skip-inline_frames): Likewise.
2108         * infcmd.c (until_next_command): Likewise.
2109         * linespec.c (convert_linespec_to_sals): Likewise.
2110         * parse.c (parse_exp_in_context_1): Likewise.
2111         * printcmd.c (build_address_symbolic): likewise.
2112         (info_address_command): Likewise.
2113         symtab.c (find_function_start_sal): Likewise.
2114         (skip_prologue_sal): Likewise.
2115         (find_function_alias_target): Likewise.
2116         (find_gnu_ifunc): Likewise.
2117         * stack.c (find_frame_funname): Likewise.
2118         * symtab.c (fixup_symbol_section): Likewise.
2119         (find_function_start_sal): Likewise.
2120         (skip_prologue_sal): Likewsie.
2121         (find_function_alias_target): Likewise.
2122         (find_gnu_ifunc): Likewise.
2123         * tracepoint.c (info_scope_command): Likewise.
2124         * value.c (value_fn_field): Likewise.
2125
2126         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2127         in place of find_pc_partial_function.
2128         * blockframe.c (find_function_entry_range_from_pc): New function.
2129         * symtab.h (find_function_entry_range_from_pc): Declare and document.
2130         * objfiles.c (objfile_relocate1): Relocate start and end addresses
2131         for each range in a block.
2132
2133
2134 2018-08-23  Xavier Roirand  <roirand@adacore.com>
2135
2136         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2137         incrementation.
2138
2139 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2140
2141         * solib-svr4.c (read_program_headers_from_bfd): Return
2142         gdb::optional<gdb::byte_vector>.
2143         (svr4_exec_displacement): Adjust.
2144
2145 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2146
2147         * solib-svr4.c (read_program_header): Return
2148         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2149         (find_program_interpreter): Return
2150         gdb::optional<gdb::byte_vector>.
2151         (scan_dyntag_auxv): Adjust.
2152         (enable_break): Adjust.
2153         (svr4_exec_displacement): Adjust.
2154
2155 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2156
2157         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2158         * inf-child.c (inf_child_target::terminal_save_inferior): New.
2159
2160 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2161
2162         * guile/scm-string.c (gdbscm_scm_from_printf): Use
2163         string_vprintf.
2164         * guile/scm-utils.c (gdbscm_printf): Likewise.
2165         * serial.c (serial_printf): Likewise.
2166         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2167
2168 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
2169
2170         * stack.c (print_frame): Print frame architecture when printing on
2171         an MI output.
2172         * NEWS: Mention new "arch" attribute in frame output.
2173
2174 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2175
2176         * arch/aarch64.h (aarch64_regnum): Update comment.
2177
2178 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2179
2180         * NEWS: Add SVE to 8.2 section.
2181
2182 2018-08-21  Pedro Alves  <palves@redhat.com>
2183
2184         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2185         out from gdbscm_parse_function_args.
2186         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2187         gdbscm_parse_function_args_1.
2188
2189 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
2190
2191         PR gdb/17816
2192         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2193         operator.
2194
2195 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
2196
2197         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2198
2199 2018-08-19  Michael Spang  <spang@google.com>
2200
2201         PR gdb/11786
2202         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2203         for PT_TLS segments.
2204
2205 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
2206
2207         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2208         dwarf_variable_value.
2209         * dwarf2-frame.c (class dwarf_expr_executor):
2210         Add override for dwarf_variable_value.
2211         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2212         (class symbol_needs_eval_context): Likewise.
2213         (indirect_synthetic_pointer): Add forward declaration.
2214         (sect_variable_value): New function.
2215         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2216         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2217         for DW_OP_GNU_variable_value.
2218
2219 2018-08-16  Tom Tromey  <tom@tromey.com>
2220
2221         * top.c (read_command_file): Update.
2222         (command_line_input): Remove "repeat" argument.
2223         * ada-lang.c (get_selections): Update.
2224         * linespec.c (decode_line_2): Update.
2225         * defs.h (command_line_input): Remove argument.
2226         * cli/cli-script.c (read_next_line): Update.
2227         * python/py-gdb-readline.c: Update.
2228
2229 2018-08-17  Tom Tromey  <tom@tromey.com>
2230
2231         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2232         command_line_input.
2233
2234 2018-08-15  Tom Tromey  <tom@tromey.com>
2235
2236         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2237
2238 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
2239
2240         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2241         If used, use find_pc_partial_function to find address range
2242         to disassemble.
2243         * mi/mi-main.c (mi_cmd_list_features): Report
2244         "data-disassemble-a-option" feature.
2245         * NEWS: Mention new -data-disassemble option -a.
2246
2247 2018-08-13  Tom Tromey  <tom@tromey.com>
2248
2249         * common/common-defs.h (_FORTIFY_SOURCE): Define.
2250
2251 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2252
2253         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2254         (aarch64_linux_collect_sve_regset): Likewise.
2255         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2256         * regcache.h (regcache_map_entry_size): New function.
2257
2258 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2259
2260         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2261         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2262         (SVE_HEADER_VL_LENGTH): Likewise.
2263         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2264         (SVE_HEADER_FLAGS_LENGTH): Likewise.
2265         (SVE_HEADER_RESERVED_LENGTH): Likewise.
2266         (SVE_HEADER_SIZE_OFFSET): Likewise.
2267         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2268         (SVE_HEADER_VL_OFFSET): Likewise.
2269         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2270         (SVE_HEADER_FLAGS_OFFSET): Likewise.
2271         (SVE_HEADER_RESERVED_OFFSET): Likewise.
2272         (SVE_HEADER_SIZE): Likewise.
2273         (aarch64_linux_core_read_vq): Add function.
2274         (aarch64_linux_core_read_description): Check for SVE section.
2275
2276 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2277
2278         * aarch64-fbsd-tdep.c
2279         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2280         collect_size.
2281         * aarch64-linux-tdep.c
2282         (aarch64_linux_iterate_over_regset_sections): Likewise.
2283         * alpha-linux-tdep.c
2284         (alpha_linux_iterate_over_regset_sections):
2285         * alpha-nbsd-tdep.c
2286         (alphanbsd_iterate_over_regset_sections): Likewise.
2287         * amd64-fbsd-tdep.c
2288         (amd64fbsd_iterate_over_regset_sections): Likewise.
2289         * amd64-linux-tdep.c
2290         (amd64_linux_iterate_over_regset_sections): Likewise.
2291         * arm-bsd-tdep.c
2292         (armbsd_iterate_over_regset_sections): Likewise.
2293         * arm-fbsd-tdep.c
2294         (arm_fbsd_iterate_over_regset_sections): Likewise.
2295         * arm-linux-tdep.c
2296         (arm_linux_iterate_over_regset_sections): Likewise.
2297         * corelow.c (get_core_registers_cb): Likewise.
2298         (core_target::fetch_registers): Likewise.
2299         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2300         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2301         * gdbarch.h (void): Regenerate.
2302         * gdbarch.sh: Add supply_size and collect_size.
2303         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2304         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2305         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2306         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2307         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2308         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2309         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2310         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2311         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2312         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2313         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2314         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2315         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2316         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2317         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2318         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2319         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2320         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2321         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2322         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2323         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2324         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2325         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2326         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2327         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2328         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2329         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2330         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2331         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2332         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2333
2334 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
2335
2336         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2337         with string_printf.
2338
2339 2018-08-10  Keith Seitz  <keiths@redhat.com>
2340
2341         * compile/compile-c-support.c (add_code_header, add_code_footer):
2342         Move into policy class.
2343         (c_push_user_expression, pop_user_expression_nop)
2344         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2345         (compile_program): New host class.
2346         (c_compile_program): New typedef.
2347         (c_compute_porgram): Use c_compile_program.
2348
2349 2018-08-10  Keith Seitz  <keiths@redhat.com>
2350
2351         * compile/compile-internal.h (compile_instance::~compile_instance):
2352         Remove calls to htab_delete.
2353         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2354         * compile.c (compile_instance::compile_instance): Initialize
2355         htab unique pointers.
2356         (compile_instance::get_cached_type, compile_instance::insert_type)
2357         (compile_instance::error_symbol_once): Update for unique_ptr.
2358
2359 2018-08-10  Keith Seitz  <keiths@redhat.com>
2360
2361         * compile/compile-c-symbols.c (struct symbol_error)
2362         (hash_symbol_error, eq_symbol_error, del_symbol_error)
2363         (compile_instance::insert_symbol_error)
2364         (compile_instance::error_symbol_once): Move to ...
2365         * compile/compile.c: ... here.
2366
2367 2018-08-10  Keith Seitz  <keiths@redhat.com>
2368
2369         * compile/compile-c-support.c (c_get_compile_context): Use `new'
2370         instead of `new_compile_instance'.
2371         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2372         Update description.
2373         If the symbol error map is not initialized, create it.
2374         (generate_c_for_for_one_symbol): Do not check/initialize
2375         the symbol error map.
2376         * compile/compile-c-types.c (compile_c_instance): Make a class.
2377         Update all callers.
2378         (compile_instance::compile_instance): Initialize the type cache.
2379         (get_cached_type): New function.
2380         (insert_type): Update description.
2381         (compile_c_instance::m_default_cflags): Define.
2382         (convert_type): Update description.  Use get_cached_type.
2383         (delete_instance): Moved to destructor.
2384         (new_compile_instance): Moved to constructor.
2385         * compile/compile-c.h (compile_c_instance): Make class inheriting
2386         from compile_instance.
2387         <base>: Remove field.
2388         <type_map, symbol_err_map>: Move to base class.
2389         <c_plugin>: Rename to `m_plugin' and remove pointer type.
2390         * compile/compile-internal.h (compile_instance): Make class.
2391         <type_map_t, symbol_err_map_t>: Define.
2392         <fe>: Rename to `m_gcc_fe'.
2393         <scope, block, gcc_target_options>: Add `m_' prefix.
2394         <m_type_map, m_symbol_err_map>: New fields, moved from
2395         compile_c_instance.
2396         <destroy>: Remove.
2397         (convert_type, new_compile_instance): Remove.
2398         * compile/compile.c (cleanup_compile_instance): Remove.
2399         (compile_to_object): Use unique_ptr to eliminate cleanups.
2400         (compile_instance::set_print_callback, compile_instance::version)
2401         (compile_instance::set_verbose)
2402         (compile_instance::set_driver_filename)
2403         (compile_instance::set_triplet_regexp)
2404         (compile_instance::set_arguments)
2405         (compile_instance::set_source_file)
2406         (compile_instance::compile): Define.
2407
2408 2018-08-10  Keith Seitz  <keiths@redhat.com>
2409
2410         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2411         * compile/compile-c-types.c: Define GCC_METHODN macros and include
2412         gcc-c-fe.def to define C plugin.
2413         (delete_instance): Delete `c_plugin'.
2414         (new_compile_instance): Initialize `c_plugin'.
2415         * compile/compile-c.h: Include gcc_c_plugin.h.
2416         (struct compile_c_instance) <c_plugin>: New member.
2417         * gcc-c-plugin.h: New file.
2418         Update all callers with API change.
2419
2420 2018-08-10  Keith Seitz  <keiths@redhat.com>
2421
2422         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2423         (HFILES_NO_SRCDIR): ... to here.
2424         Add compile-internal.h and compile-c.h.
2425         * compile/compile-c-support.c: Include compile-c.h.
2426         * compile/compile-c-symbols.c: Include compile-c.h.
2427         (generate_c_for_variable_locations): Update comment.
2428         * compile/compile-c-types.c: Include compile-c.h.
2429         * compile/compile-c.h: New file -- moved C language declarations
2430         from other files here.
2431         * compile/compile-internal.h: Do not include hashtab.h or
2432         common/enum-flags.h.
2433         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2434         (gcc_convert_symbol, gcc_symbol_address)
2435         (generate_c_for_variable_locations, c_get_mode_for_size)
2436         (c_get_range_decl_name): Definitions moved to compile-c.h.
2437         * compile/compile-loc2c.c: Include compile-c.h.
2438
2439 2018-08-10  Keith Seitz  <keiths@redhat.com>
2440
2441         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2442         (c_symbol_substitution_name): ... this.
2443         Update all callers.
2444
2445 2018-08-10  Keith Seitz  <keiths@redhat.com>
2446
2447         * compile/compile-c-support.c (c_compute_program): Use
2448         unique_xmalloc_ptr to eliminate cleanup.
2449         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2450         Return a unique_xmalloc_ptr and eliminate cleanup.
2451         * compile/compile-internal.h (generate_c_for_variable_locations):
2452         Return unique_xmalloc_ptr and update description.
2453
2454 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
2455
2456         * corelow.c (core_target::get_core_register_section): Rename
2457         min_size to section_min_size.
2458
2459 2018-08-09  Jim Wilson  <jimw@sifive.com>
2460
2461         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2462         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2463         * NEWS: Mention new GNU/Linux RISC-V target.
2464         * configure.host: Add riscv*-*-linux*.
2465         * configure.nat: Add riscv*.
2466         * configure.tgt: Add riscv*-*-linux*.
2467         * riscv-linux-nat.c: New file.
2468         * riscv-linux-tdep.c: New file.
2469
2470 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2471
2472         * infrun.c (resume): Make static, add forward declaration.
2473         (proceed): Update header comment.
2474         * infrun.h (resume): Delete declaration.
2475
2476 2018-08-09  Tom Tromey  <tom@tromey.com>
2477
2478         * riscv-tdep.h: Minor formatting fixes.
2479
2480 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
2481
2482         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2483         * dwarf-index-cache.c (create_dir_and_check): Likewise.
2484         (test_mkdir_recursive): Likewise.
2485         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2486
2487 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2488
2489         * valarith.c (value_subscripted_rvalue): If an array is not in
2490         memory, and we don't know the upper bound, then we can't know that
2491         the requested element exists or not.
2492
2493 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
2494
2495         * target.c (str_comma_list_concat_elem): Fix typo in comment.
2496         (target_options_to_string): Add comment.
2497
2498 2018-08-08  Tom Tromey  <tom@tromey.com>
2499
2500         * unittests/scoped_mmap-selftests.c: Check result of "write".
2501
2502 2018-08-08  Jim Wilson  <jimw@sifive.com>
2503
2504         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2505         (decode_register_index_short): New.
2506         (decode_j_type_insn, decode_cj_type_insn): New.
2507         (decode_b_type_insn, decode_cb_type_insn): New.
2508         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
2509         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
2510         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2511         is_c_sw_insn instead of is_sw_insn.
2512         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2513         (riscv_software_single_step): New.
2514         * riscv-tdep.h (riscv_software_single_step): Declare.
2515
2516         * riscv-tdep.c (riscv_isa_xlen): Drop static.
2517         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2518
2519 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2520
2521         PR gdb/18050:
2522         * target.c (dispose_inferior): Don't dispose of inferiors that are
2523         already killed.
2524
2525 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2526
2527         * remote.c (remote_target::download_tracepoint): Change char* to
2528         const char*.
2529
2530 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
2531
2532         * target.h (target_options_to_string): Return an std::string.
2533         * target.c (str_comma_list_concat_elem): Return void, use
2534         std::string.
2535         (do_option): Likewise.
2536         (target_options_to_string): Return an std::string.
2537         * linux-nat.c (linux_nat_target::wait): Adjust.
2538         * target-debug.h (target_debug_print_options): Adjust.
2539
2540 2018-08-07  Tom Tromey  <tom@tromey.com>
2541
2542         * Makefile.in (CPPFLAGS): New variable.
2543         (INTERNAL_CPPFLAGS): Use it.
2544
2545 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2546
2547         * NEWS: Mention the index cache.
2548
2549 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2550
2551         * common/pathstuff.h (get_standard_cache_dir): New.
2552         * common/pathstuff.c (get_standard_cache_dir): New.
2553         * build-id.h (build_id_to_string): New.
2554         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2555         DEBUG_STR_SUFFIX): Move to here.
2556         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2557         DEBUG_STR_SUFFIX): Move from there.
2558         (write_psymtabs_to_index): Make non-static, add basename
2559         parameter.  Write to temporary files, rename when done.
2560         (save_gdb_index_command): Adjust call to
2561         write_psymtabs_to_index.
2562         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2563         field.
2564         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2565         (get_gdb_index_contents_from_cache): New.
2566         (get_gdb_index_contents_from_cache_dwz): New.
2567         (dwarf2_initialize_objfile): Read index from cache.
2568         (dwarf2_build_psymtabs): Save to index.
2569         * dwarf-index-cache.h: New file.
2570         * dwarf-index-cache.c: New file.
2571         * dwarf-index-write.h: New file.
2572
2573 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2574
2575         * gnulib/aclocal.m4: Re-generate.
2576         * gnulib/config.in: Re-generate.
2577         * gnulib/configure: Re-generate.
2578         * gnulib/import/Makefile.am: Re-generate.
2579         * gnulib/import/Makefile.in: Re-generate.
2580         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2581         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2582         * gnulib/import/m4/mkdir.m4: New file.
2583         * gnulib/import/mkdir.c: New file.
2584         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2585         module.
2586
2587 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2588
2589         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2590         * common/scoped_mmap.c: New file.
2591         * common/scoped_mmap.h (destroy): New method.
2592         (~scoped_mmap, reset): Use destroy.
2593         (scoped_mmap): New move constructor.
2594         (mmap_file): New declaration.
2595         * unittests/scoped_mmap-selftests.c (test_normal,
2596         test_invalid_filename, run_tests): New functions.
2597         (_initialize_scoped_mmap_selftests): Register selftest.
2598
2599 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2600
2601         * dwarf2read.c (read_gdb_index_from_section): Rename to...
2602         (read_gdb_index_from_buffer): ... this.  Remove section
2603         parameter, add buffer parameter.
2604         (get_gdb_index_contents_ftype,
2605         get_gdb_index_contents_dwz_ftype): New typedefs.
2606         (dwarf2_read_gdb_index): Add callback parameters to get the
2607         index contents.
2608         (get_gdb_index_contents_from_section): New.
2609         (dwarf2_initialize_objfile): Update call to
2610         dwarf2_read_gdb_index.
2611
2612 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2613
2614         * common/filestuff.h (gdb_fopen_cloexec): New overload.
2615         (gdb_open_cloexec): Likewise.
2616         * nat/linux-osdata.c (command_from_pid): Use string_printf.
2617         (commandline_from_pid): Likewise.
2618         (linux_xfer_osdata_threads): Likewise.
2619         (linux_xfer_osdata_fds): Likewise.
2620         * ada-lang.c (is_package_name): Likewise.
2621         * auxv.c (procfs_xfer_auxv): Likewise.
2622         * breakpoint.c (print_one_breakpoint_location): Use
2623         uiout::field_fmt.
2624         (print_one_catch_solib): Use string_printf.
2625         * coff-pe-read.c (add_pe_exported_sym): Likewise.
2626         (add_pe_forwarded_sym): Likewise.
2627         * dwarf2read.c (create_type_unit_group): Likewise.
2628         (build_error_marker_type): Likewise.
2629         * infcall.c (get_function_name): Likewise.
2630         * valprint.c (print_converted_chars_to_obstack): Likewise.
2631         * xtensa-tdep.c (xtensa_register_type): Likewise.
2632
2633 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
2634
2635         * remote.c (remote_target::download_tracepoint): Fix format
2636         string errors.
2637
2638 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2639
2640         * tracefile.c: Include common/byte-vector.h.
2641         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
2642         with trace_regblock_size if needed.  Update uses of buf.
2643
2644 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2645
2646         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2647         std::vector<unsigned char>.
2648         * tracepoint.c (collection_list::collection_list): Remove
2649         m_regs_mask initializer from initializer list.  Resize
2650         m_regs_mask using the largest remote register number.
2651         (collection_list::add_remote_register): Remove size check on
2652         m_regs_mask.  Use at to access element.
2653         (collection_list::stringify): Change type of temp_buf to
2654         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
2655         stringify the register mask.  Use pack_hex_byte for the register
2656         mask.
2657
2658 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2659
2660         * tracepoint.h (class collection_list) <add_register>: Remove.
2661         <add_remote_register, add_ax_registers, add_local_register>:
2662         Declare.
2663         <add_memrange>: Add scope parameter.
2664         * tracepoint.c (encode_actions_1): Likewise.
2665         (collection_list::add_register): Rename to ...
2666         (collection_list::add_remote_register): ... this.  Update
2667         comment.
2668         (collection_list::add_ax_registers, add_local_register): New
2669         methods.
2670         (collection_list::add_memrange): Add scope parameter.  Call
2671         add_local_register instead of add_register.
2672         (finalize_tracepoint_aexpr): New function.
2673         (collection_list::collect_symbol): Update calls to add_memrange.
2674         Call add_local_register instead of add_register.  Call
2675         add_ax_registers.  Call finalize_tracepoint_aexpr.
2676         (encode_actions_1): Get remote regnos for $reg action.  Call
2677         add_remote_register, add_ax_registers, and add_local_register.
2678         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
2679         (validate_actionline): Call finalize_tracepoint_aexpr.
2680
2681 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2682
2683         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2684         Replace array buf with gdb::char_vector buf, of size
2685         get_remote_packet_size ().  Replace references to buf and
2686         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
2687         and xsnprintf with snprintf.  Raise errors if the buffer is too
2688         small.
2689
2690 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2691
2692         * remote.c (remote_target::download_tracepoint): Fix the has_more
2693         predicate in the QTDP action list iteration.
2694
2695 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2696
2697         * remote.c (remote_target::download_tracepoint): Fix indentation
2698         in for block.
2699
2700 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2701
2702         * proc-api.c (_initialize_proc_api): Remove c, unused.
2703         * procfs.c (procfs_init_inferior): Remove signals, unused.
2704         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2705         unused.
2706
2707 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
2708             Andrew Burgess  <andrew.burgess@embecosm.com>
2709
2710         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2711         'W_STOPCODE (0)' as this could be ambiguous.
2712
2713 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2714
2715         * ser-tcp.c (net_open): Fix thinko when deciding whether to
2716         disable TCP's Nagle algorithm (use "ai_protocol" instead of
2717         "ai_socktype").
2718
2719 2018-08-02  Tom Tromey  <tom@tromey.com>
2720
2721         PR symtab/16842.
2722         * dwarf2read.c (read_func_scope): Set symtab on template parameter
2723         symbols.
2724         (process_structure_scope): Likewise.
2725
2726 2018-08-02  Xavier Roirand  <roirand@adacore.com>
2727
2728         PR gdb/22629:
2729         * darwin-nat.c (darwin_kill_inferior): Fix handling of
2730         kill inferior.
2731
2732 2018-08-02  Tom Tromey  <tom@tromey.com>
2733
2734         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2735         (darwin_suspend_inferior, darwin_resume_inferior)
2736         (darwin_decode_notify_message, darwin_resume_inferior_threads)
2737         (darwin_check_new_threads): Check result of get_darwin_inferior.
2738
2739 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
2740
2741         GDB 8.1.1 released.
2742
2743 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
2744
2745         * varobj.c (varobj_get_path_expr_parent): Report an error if
2746         parent is a dynamic varobj.
2747
2748 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2749
2750         * gnulib/aclocal.m4: Re-generate.
2751         * gnulib/config.in: Re-generate.
2752         * gnulib/configure: Re-generate.
2753         * gnulib/import/Makefile.in: Re-generate.
2754         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2755         * gnulib/import/m4/onceonly.m4: Re-generate.
2756
2757 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2758
2759         * target-descriptions.c (struct xml_test_tdesc): New.
2760         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2761         (record_xml_tdesc): Update.
2762         (maintenance_check_xml_descriptions): Update.
2763         * target-descriptions.h (record_xml_tdesc): Update comment.
2764
2765 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2766
2767         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2768         checking array bounds are defined.
2769
2770 2018-07-30  Tom Tromey  <tom@tromey.com>
2771
2772         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2773         irreflexivity violation.
2774
2775 2018-07-30  Tom Tromey  <tom@tromey.com>
2776
2777         * cli/cli-decode.c (lookup_cmd): Remove lint code.
2778         * value.c (unpack_long): Remove lint code.
2779         * valops.c (value_ind): Remove lint code.
2780         * valarith.c (value_x_binop, value_x_unop, value_equal)
2781         (value_pos): Remove lint code.
2782
2783 2018-07-28  Tom de Vries  <tdevries@suse.de>
2784
2785         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2786         with undefined upper bound as <optimized out>.
2787
2788 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
2789
2790         * gcore.in: Rename variable "name" to "prefix".  Expand
2791         "usage" text.
2792
2793 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
2794
2795         * windows-nat.c (windows_nat_target::create_inferior): Update to
2796         call close() in global namespace.
2797
2798 2018-07-26  Tom Tromey  <tom@tromey.com>
2799
2800         * dwarf-index-write.c (add_address_entry): Don't add objfile
2801         offsets.
2802         * dbxread.c (find_stab_function): Rename from
2803         find_stab_function_addr.  Return a bound_minimal_symbol.
2804         (read_dbx_symtab): Use raw_text_low, raw_text_high.
2805         Don't add objfile offsets.
2806         (end_psymtab): Use raw_text_low, raw_text_high,
2807         MSYMBOL_VALUE_RAW_ADDRESS.
2808         (read_ofile_symtab): Update.
2809         (process_one_symbol): Update.
2810         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2811         offsets.
2812         (dw2_relocate): Remove.
2813         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2814         searching addrmap.
2815         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2816         Update.
2817         (process_psymtab_comp_unit_reader, add_partial_symbol)
2818         (add_partial_subprogram, dwarf2_ranges_read): Update.
2819         (load_partial_dies): Update.
2820         (add_address_entry): Don't add objfile offsets.
2821         (dwarf2_build_include_psymtabs): Update.
2822         (create_addrmap_from_aranges): Don't add objfile offsets.
2823         (dw2_find_pc_sect_compunit_symtab): Update.
2824         * mdebugread.c (parse_symbol): Don't add objfile offsets.
2825         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2826         Update.
2827         (parse_partial_symbols): Don't add objfile offsets.  Use
2828         raw_text_low, raw_text_high.  Update.
2829         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2830         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2831         or call 'relocate' quick function.  Clear psymbol_map.
2832         * psympriv.h (struct partial_symbol) <address>: Add section
2833         offset.
2834         <set_unrelocated_address>: Rename from set_address.
2835         <raw_text_low, raw_text_high>: New methods.
2836         <text_low, text_high>: Add objfile parameter.
2837         (add_psymbol_to_bcache): Add 'section' parameter.  Call
2838         set_unrelocated_address.
2839         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2840         (find_pc_psymbol): Update.
2841         (fixup_psymbol_section, relocate_psymtabs): Remove.
2842         (dump_psymtab, psym_functions): Update.
2843         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
2844         parameter.
2845         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
2846         (start_psymtab_common): Update.
2847         * symfile-debug.c (debug_qf_relocate): Remove.
2848         (debug_sym_quick_functions): Update.
2849         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
2850         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
2851         Update.
2852
2853 2018-07-26  Tom Tromey  <tromey@redhat.com>
2854
2855         * dbxread.c (end_psymtab): Use text_high_valid and
2856         text_low_valid.
2857         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
2858         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
2859         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2860         Update comment.
2861         <text_low_valid, text_high_valid>: New fields.
2862         <set_text_low, set_text_high>: Update.
2863         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
2864
2865 2018-07-26  Tom Tromey  <tom@tromey.com>
2866
2867         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
2868         Update.
2869         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
2870         textlow and texthigh fields.
2871         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
2872         Update.
2873         * mdebugread.c (parse_lines, parse_partial_symbols)
2874         (psymtab_to_symtab_1): Update.
2875         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
2876         Rename fields.  Update comment.  Now private.
2877         <text_low, text_high, set_text_low, set_text_high>: New methods.
2878         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2879         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
2880         (start_psymtab_common, maintenance_info_psymtabs)
2881         (maintenance_check_psymtabs): Update.
2882         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
2883         texthigh fields.
2884         (scan_xcoff_symtab): Update.
2885
2886 2018-07-26  Tom Tromey  <tromey@redhat.com>
2887
2888         * psympriv.h (struct partial_symbol) <unrelocated_address,
2889         address, set_address>: New methods.
2890         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
2891         (fixup_psymbol_section, relocate_psymtabs): Update.
2892         (print_partial_symbols): Add 'objfile' parameter.  Update.
2893         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
2894         Update.
2895
2896 2018-07-26  Tom Tromey  <tom@tromey.com>
2897
2898         * dwarf-index-write.c (write_psymbols, debug_names::insert)
2899         (debug_names::write_psymbols): Update.
2900         * psympriv.h (struct partial_symbol): Derive from
2901         general_symbol_info.
2902         <obj_section>: New method.
2903         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
2904         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
2905         (find_pc_sect_psymbol, fixup_psymbol_section)
2906         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
2907         (print_partial_symbols, recursively_search_psymtabs)
2908         (compare_psymbols, psymbol_hash, psymbol_compare)
2909         (add_psymbol_to_bcache, maintenance_check_psymtabs)
2910         (psymbol_name_matches, psym_fill_psymbol_map): Update.
2911
2912 2018-07-26  Tom Tromey  <tromey@redhat.com>
2913
2914         * dbxread.c (end_psymtab): Remove dead code.
2915
2916 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
2917
2918         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
2919         DWARF unwinders are disabled.
2920         * dwarf2-frame.c: Add dwarf2read.h include.
2921         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
2922         disabled.
2923         (dwarf2_frame_unwinders_enabled_p): Define.
2924         (show_dwarf_unwinders_enabled_p): New function.
2925         (_initialize_dwarf2_frame): Register switch to control DWARF
2926         unwinder use.
2927         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
2928         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
2929         (show_dwarf_cmdlist): Remove static keyword.
2930         * dwarf2read.h (set_dwarf_cmdlist): Declare.
2931         (show_dwarf_cmdlist): Declare.
2932         * NEWS: Document new feature.
2933
2934 2018-07-26  Tom de Vries  <tdevries@suse.de>
2935
2936         PR breakpoints/23366
2937         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
2938
2939 2018-07-26  Tom de Vries  <tdevries@suse.de>
2940
2941         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
2942         DW_AT_count can't be translated to a dynamic prop.
2943
2944 2018-07-25  Tom de Vries  <tdevries@suse.de>
2945
2946         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
2947         try/catch.
2948
2949 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
2950
2951         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
2952
2953 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
2954
2955         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
2956
2957 2018-07-24  Keith Seitz  <keiths@redhat.comt
2958
2959         PR symtab/23010
2960         * dwarf2read.c (dw2_add_symbol_to_list): New function.
2961         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
2962         instead of add_symbol_to_list.
2963         (read_file_scope): Call prepare_one_comp_unit before reading
2964         any other DIEs.
2965
2966 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
2967
2968         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
2969
2970 2018-07-24  Tom Tromey  <tom@tromey.com>
2971
2972         * utils.c (malloc, realloc, free): Don't declare.
2973         * configure, config.in: Rebuild.
2974         * configure.ac: Don't check for declarations of free, malloc, or
2975         realloc.
2976
2977 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
2978
2979         * aarch64-linux-nat.c
2980         (aarch64_linux_nat_target::stopped_data_address): Remove unused
2981         variable.
2982         * arm-linux-nat.c (fetch_regs): Likewise.
2983         (store_regs): Likewise.
2984         (fetch_vfp_regs): Likewise.
2985         (store_vfp_regs): Likewise.
2986         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
2987         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
2988         (arm_linux_nat_target::insert_watchpoint): Likewise.
2989         (arm_linux_nat_target::remove_watchpoint): Likewise.
2990         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
2991         Likewise.
2992         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
2993         Likewise.
2994         * ppc-linux-nat.c (fetch_register): Likewise.
2995         (fetch_all_gp_regs): Likewise.
2996         (fetch_ppc_registers): Likewise.
2997         (store_all_gp_regs): Likewise.
2998         (store_ppc_registers): Likewise.
2999         (hwdebug_insert_point): Likewise.
3000         (can_use_watchpoint_cond_accel): Likewise.
3001         * remote-sim.c (gdb_os_write_stdout): Likewise.
3002
3003 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3004             Tom Tromey  <tom@tromey.com>
3005
3006         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3007         test for it.
3008         * configure: Rebuild.
3009
3010 2018-07-22  Tom Tromey  <tom@tromey.com>
3011
3012         * regformats/regdat.sh: Define xmltarget_${name} inside
3013         #ifndef IN_PROCESS_AGENT.
3014
3015 2018-07-22  Tom Tromey  <tom@tromey.com>
3016
3017         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3018
3019 2018-07-22  Tom Tromey  <tom@tromey.com>
3020
3021         * symfile.c (reread_symbols): Notify iter, not objfile.
3022
3023 2018-07-22  Tom Tromey  <tom@tromey.com>
3024
3025         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3026         Use arch_ops.
3027         (ravenscar_thread_target::prepare_to_store): Likewise.
3028
3029 2018-07-22  Tom Tromey  <tom@tromey.com>
3030
3031         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3032         unused variable.  Call value_fetch_lazy when needed.
3033         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3034         Remove unused variable.  Call value_fetch_lazy when needed.
3035
3036 2018-07-22  Tom Tromey  <tom@tromey.com>
3037
3038         * m32c-tdep.c (mark_dma): Return void.
3039         (make_regs): Remove unused declarations.
3040
3041 2018-07-22  Tom Tromey  <tom@tromey.com>
3042
3043         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3044         cmdscm_get_valid_command_smob_arg_unsafe for effect.
3045         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3046         bkscm_get_valid_block_smob_arg_unsafe for effect.
3047
3048 2018-07-22  Tom Tromey  <tom@tromey.com>
3049
3050         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3051         value_type.
3052
3053 2018-07-22  Tom Tromey  <tom@tromey.com>
3054
3055         * windows-nat.c (saved_context): Conditionally define.
3056         * remote.c (remote_target::remote_btrace_maybe_reopen):
3057         Conditionally declare "warned".
3058         * inflow.c (sigquit_ours): Conditionally define.
3059         (new_tty): Move "tty" declaration inside #if.
3060         * guile/guile.c (guile_datadir): Conditionally define.
3061         * charset.c (set_be_le_names): Move some declarations inside #if.
3062         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3063         #if.
3064         (parse_xml_btrace_conf): Likewise.
3065
3066 2018-07-22  Tom Tromey  <tom@tromey.com>
3067
3068         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3069
3070 2018-07-22  Tom Tromey  <tom@tromey.com>
3071
3072         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3073         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3074         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3075         * buildsym-legacy.c (get_macro_table): Remove unused variable.
3076         * stack.c (frame_apply_level_command): Remove unused variable.
3077         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3078         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3079         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3080         unused variable.
3081         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3082         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3083         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3084         variable.
3085         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3086         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3087         variable.
3088         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3089         Remove unused variable.
3090         * cli/cli-script.c (recurse_read_control_structure): Remove unused
3091         variable.
3092         * common/tdesc.c (print_xml_feature::visit): Remove unused
3093         variable.
3094         * compile/compile-object-load.c (store_regs): Remove unused
3095         variables.
3096         * complaints.c (clear_complaints): Remove unused variable.
3097         * corelow.c (core_target_open): Remove unused variable.
3098         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3099         variable.
3100         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3101         variable.
3102         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3103         variable.
3104         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3105         variable.
3106         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3107         variable.
3108         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3109         variable.
3110         * ia64-tdep.c (examine_prologue): Remove unused variable.
3111         * infcall.c (run_inferior_call): Remove unused variable.
3112         * inferior.c (exit_inferior): Remove unused variable.
3113         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3114         * linespec.c (decode_line_2): Remove unused variable.
3115         * linux-nat.c (super_close): Remove.
3116         * linux-tdep.c (linux_info_proc): Remove unused variable.
3117         * mi/mi-main.c (mi_execute_command): Remove unused variable.
3118         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3119         Remove unused variable.
3120         * parse.c (find_minsym_type_and_address): Remove unused variable.
3121         * printcmd.c (info_symbol_command, printf_floating): Remove unused
3122         variable.
3123         * python/py-breakpoint.c (bppy_set_commands): Remove unused
3124         variable.
3125         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3126         variables.
3127         * record-btrace.c (record_btrace_target::store_registers): Remove
3128         unused variable.
3129         (cmd_show_record_btrace_cpu): Remove unused variable.
3130         * riscv-tdep.c (riscv_register_reggroup_p)
3131         (riscv_push_dummy_call, riscv_return_value): Remove unused
3132         variable.
3133         * rust-exp.y (literal): Remove unused variable.
3134         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3135         unused variable.
3136         <STRUCTOP_ANONYMOUS>: Likewise.
3137         * s390-linux-tdep.c (s390_linux_init_abi_31)
3138         (s390_linux_init_abi_64): Remove unused variable.
3139         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3140         (file_select_thread, net_windows_open, _initialize_ser_windows):
3141         Remove unused variables.
3142         * symtab.c (find_pc_sect_line): Remove unused variable.
3143         * target-memory.c (compute_garbled_blocks): Remove unused
3144         variable.
3145         (target_write_memory_blocks): Remove unused variable.
3146         * target.c (target_stack::unpush): Remove unused variables.
3147         * tracepoint.c (start_tracing, all_tracepoint_actions)
3148         (merge_uploaded_trace_state_variables)
3149         (print_one_static_tracepoint_marker): Remove unused variable.
3150         * unittests/basic_string_view/element_access/char/1.cc (test01):
3151         Remove unused variable.
3152         * windows-nat.c (windows_continue, windows_add_all_dlls)
3153         (do_initial_windows_stuff, windows_nat_target::create_inferior):
3154         Remove unused variables.
3155
3156 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
3157
3158         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3159         attr_profile in HAVE_ELF.
3160         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3161         HAVE_ELF.
3162
3163 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
3164
3165         * frame.c (frame_register_unwind): Change parameter name.
3166         (frame_unwind_register): Likewise.
3167         (frame_unwind_register_value): Likewise.
3168         (frame_unwind_register_signed): Likewise.
3169         (frame_unwind_register_unsigned): Likewise.
3170         * frame.h (frame_register_unwind): Likewise.
3171         (frame_unwind_register): Likewise.
3172         (frame_unwind_register_value): Likewise.
3173         (frame_unwind_register_signed): Likewise.
3174         (frame_unwind_register_unsigned): Likewise.
3175         (frame_unwind_arch): Likewise.
3176
3177 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3178
3179         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3180         ISA maintenance.
3181
3182 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3183
3184         * mips-linux-nat.c (mips_linux_nat_target::read_description):
3185         Call `get_ptrace_pid' rather than extracting the ptrace PID by
3186         hand.
3187
3188 2018-07-20  Keith Seitz  <keiths@redhat.com>
3189
3190         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3191         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3192         m_compunit_symtab, m_language>: Add "m_" prefix.
3193         Update all uses.
3194         * buildsym.c: Update all uses.
3195
3196 2018-07-20  Tom Tromey  <tom@tromey.com>
3197
3198         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3199         * buildsym.h (record_line_ftype): Remove typedef.
3200
3201 2018-07-20  Tom Tromey  <tom@tromey.com>
3202
3203         * buildsym-legacy.h (augment_type_symtab): Don't declare.
3204         (end_expandable_symtab): Likewise.
3205         (end_symtab_get_static_block): Likewise.
3206         (end_symtab_from_static_block): Likewise.
3207         * buildsym-legacy.c (augment_type_symtab): Remove.
3208         (end_expandable_symtab): Remove.
3209         (end_symtab_get_static_block): Remove.
3210         (end_symtab_from_static_block): Remove.
3211
3212 2018-07-20  Tom Tromey  <tom@tromey.com>
3213
3214         * dwarf2read.c: Include buildsym.h.
3215         (struct dwarf2_cu) <builder>: New method.
3216         (fixup_go_packaging): Update.
3217         (process_full_comp_unit, process_full_type_unit): Update.  Don't
3218         use scoped_free_pendings.
3219         (using_directives): Add "cu" parameter, remove "language".
3220         (read_import_statement, setup_type_unit_groups, )
3221         (read_func_scope, read_lexical_block_scope)
3222         (dwarf2_record_block_ranges, read_namespace): Update.
3223         (lnp_state_machine::lnp_state_machine): Add cu parameter.
3224         (lnp_state_machine::handle_end_sequence): Update.
3225         (class lnp_state_machine) <m_cu>: New member.
3226         <m_record_line_callback>: Remove.
3227         <m_currently_recording_lines>: New member.
3228         (lnp_state_machine::handle_set_file): Update.
3229         (noop_record_line): Remove.
3230         (dwarf_record_line_p): Add cu parameter.
3231         (dwarf_record_line_1, dwarf_finish_line): Likewise.
3232         (lnp_state_machine::record_line)
3233         (lnp_state_machine::lnp_state_machine)
3234         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3235         (dwarf_decode_lines): Update.
3236         (dwarf2_start_subfile): Add cu parameter.
3237         (dwarf2_start_symtab, new_symbol): Update.
3238         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3239         Remove dwarf2_per_objfile parameter.
3240         (dwarf_decode_macros): Update.
3241
3242 2018-07-20  Tom Tromey  <tom@tromey.com>
3243
3244         * stabsread.c (define_symbol): Update.
3245         * buildsym-legacy.h (get_buildsym_compunit): Declare.
3246         * dwarf2read.c (new_symbol): Update.
3247         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3248         * cp-namespace.c: Include buildsym.h.
3249         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3250         * buildsym-legacy.c (get_buildsym_compunit): New function.
3251
3252 2018-07-20  Tom Tromey  <tom@tromey.com>
3253
3254         * xcoffread.c: Include buildsym-legacy.h.
3255         * windows-nat.c: Include buildsym-legacy.h.
3256         * stabsread.c: Include buildsym-legacy.h.
3257         * mdebugread.c: Include buildsym-legacy.h.
3258         * buildsym-legacy.h: New file.
3259         * buildsym-legacy.c: New file, from buildsym.c.
3260         * go32-nat.c: Include buildsym-legacy.h.
3261         * dwarf2read.c: Include buildsym-legacy.h.
3262         * dbxread.c: Include buildsym-legacy.h.
3263         * cp-namespace.c: Include buildsym-legacy.h.
3264         * coffread.c: Include buildsym-legacy.h.
3265         * buildsym.h: Move some contents to buildsym-legacy.h.
3266         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
3267         buildsym-legacy.c.
3268         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3269
3270 2018-07-20  Tom Tromey  <tom@tromey.com>
3271
3272         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3273         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3274         (buildsym_compunit::buildsym_compunit)
3275         (buildsym_compunit::~buildsym_compunit)
3276         (buildsym_compunit::get_macro_table): Define.
3277
3278 2018-07-20  Tom Tromey  <tom@tromey.com>
3279
3280         * buildsym.c (reset_symtab_globals): Remove.
3281         (buildsym_compunit::end_symtab_from_static_block): Update.
3282         (buildsym_compunit::augment_type_symtab): Update.
3283         (end_symtab_from_static_block): Call free_buildsym_compunit.
3284         (augment_type_symtab, end_symtab, end_expandable_symtab):
3285         Likewise.
3286
3287 2018-07-20  Tom Tromey  <tom@tromey.com>
3288
3289         * arch-utils.c: Do not include buildsym.h.
3290         * mipsread.c: Do not include buildsym.h.
3291         * machoread.c: Do not include buildsym.h.
3292         * elfread.c: Do not include buildsym.h.
3293
3294 2018-07-20  Tom Tromey  <tom@tromey.com>
3295
3296         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3297         initialization.
3298         (buildsym_compunit): Add new constructor.
3299         (struct buildsym_compunit) <get_last_source_file, finish_block,
3300         record_block_range, start_subfile, patch_subfile_names,
3301         push_subfile, pop_subfile, record_line, get_compunit_symtab,
3302         set_last_source_start_addr, get_last_source_start_addr,
3303         get_local_using_directives, set_local_using_directives,
3304         get_global_using_directives, outermost_context_p,
3305         get_current_context_stack, get_context_stack_depth,
3306         get_current_subfile, get_local_symbols, get_file_symbols,
3307         get_global_symbols, record_debugformat, record_producer,
3308         push_context, pop_context, end_symtab_get_static_block,
3309         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3310         New public methods.
3311         <record_pending_block, finish_block_internal, make_blockvector,
3312         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3313         private methods.
3314         Update all users.
3315
3316 2018-05-22  Tom Tromey  <tom@tromey.com>
3317
3318         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3319         parameter.
3320         (finish_block_internal): Update.
3321
3322 2018-07-20  Tom Tromey  <tom@tromey.com>
3323
3324         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3325         parameter.
3326         (finish_block_internal): Update.
3327
3328 2018-07-20  Tom Tromey  <tom@tromey.com>
3329
3330         * buildsym.h (EXTERN): Don't define or undef.
3331         * buildsym.c (EXTERN): Don't define.
3332
3333 2018-07-20  Tom Tromey  <tom@tromey.com>
3334
3335         * buildsym.c: Remove TODO comment.
3336
3337 2018-07-20  Tom Tromey  <tom@tromey.com>
3338
3339         * coffread.c (coff_symtab_read): Update.
3340         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3341         (xcoff_new_init): Update.
3342         * mipsread.c (mipscoff_new_init): Update.
3343         * mdebugread.c (mdebug_build_psymtabs): Update.
3344         * elfread.c (elf_new_init): Update.
3345         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3346         Update.
3347         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3348         (coffstab_build_psymtabs, elfstab_build_psymtabs)
3349         (stabsect_build_psymtabs): Update.
3350         * buildsym.h (buildsym_init): Don't declare.
3351         * buildsym.c: Update comment.
3352         (prepare_for_building): Remove.
3353         (start_symtab, restart_symtab): Update.
3354         (reset_symtab_globals): Update comment.
3355         (buildsym_init): Remove.
3356
3357 2018-07-20  Tom Tromey  <tom@tromey.com>
3358
3359         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3360         * stabsread.c (patch_block_stabs, define_symbol, read_type)
3361         (read_enum_type, common_block_start, common_block_end)
3362         (cleanup_undefined_types_1, finish_global_stabs): Update.
3363         * mdebugread.c (psymtab_to_symtab_1): Update.
3364         * dwarf2read.c (fixup_go_packaging, read_func_scope)
3365         (read_lexical_block_scope, new_symbol): Update.
3366         * dbxread.c (process_one_symbol): Update.
3367         * coffread.c (coff_symtab_read, process_coff_symbol)
3368         (coff_read_enum_type): Update.
3369         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3370         declare.
3371         (get_local_symbols, get_file_symbols, get_global_symbols): New
3372         functions.
3373         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3374         m_global_symbols.
3375         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3376         (~scoped_free_pendings): Update.
3377         (finish_block, prepare_for_building, reset_symtab_globals)
3378         (end_symtab_get_static_block, end_symtab_with_blockvector)
3379         (augment_type_symtab, push_context): Update.
3380         (get_local_symbols, get_file_symbols, get_global_symbols): New
3381         functions.
3382         (buildsym_init): Update.
3383
3384 2018-07-20  Tom Tromey  <tom@tromey.com>
3385
3386         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3387         (process_full_type_unit): Likewise.
3388         (dwarf2_start_symtab): Set list_in_scope.
3389
3390 2018-07-20  Tom Tromey  <tom@tromey.com>
3391
3392         * dwarf2read.c (process_psymtab_comp_unit_reader)
3393         (build_type_psymtabs_reader): Do not set list_in_scope.
3394
3395 2018-07-20  Tom Tromey  <tom@tromey.com>
3396
3397         * buildsym.c (free_pendings): Remove.
3398         (add_symbol_to_list, scoped_free_pendings)
3399         (finish_block_internal, buildsym_init): Update.
3400
3401 2018-07-20  Tom Tromey  <tom@tromey.com>
3402
3403         * xcoffread.c (read_xcoff_symtab): Update.
3404         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3405         Update.
3406         * dbxread.c (process_one_symbol): Update.
3407         * coffread.c (coff_symtab_read): Update.
3408         * buildsym.h (finish_block): Update.
3409         * buildsym.c (finish_block): Remove "listhead" argument.
3410         (end_symtab_get_static_block): Update.
3411
3412 2018-07-20  Tom Tromey  <tom@tromey.com>
3413
3414         * buildsym.h (class scoped_free_pendings): Remove constructor.
3415         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3416         method.
3417         <m_pending_block_obstack, m_pending_blocks>: New members.
3418         (pending_block_obstack, pending_blocks): Remove.
3419         (scoped_free_pendings::scoped_free_pendings): Default.
3420         (~scoped_free_pendings): Update.
3421         (free_pending_blocks): Remove.
3422         (finish_block_internal, record_pending_block, make_blockvector)
3423         (end_symtab_get_static_block, augment_type_symtab, push_context)
3424         (buildsym_init): Update.
3425
3426 2018-07-20  Tom Tromey  <tom@tromey.com>
3427
3428         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3429         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3430         members.
3431         (pending_addrmap, pending_addrmap_obstack)
3432         (pending_addrmap_interesting): Remove.
3433         (scoped_free_pendings, record_block_range, make_blockvector)
3434         (prepare_for_building, reset_symtab_globals, buildsym_init):
3435         Update.
3436
3437 2018-07-20  Tom Tromey  <tom@tromey.com>
3438
3439         * xcoffread.c (process_linenos): Update.
3440         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3441         * mdebugread.c (psymtab_to_symtab_1): Update.
3442         * dwarf2read.c (setup_type_unit_groups)
3443         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3444         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3445         * dbxread.c (process_one_symbol): Update.
3446         * coffread.c (coff_symtab_read, enter_linenos)
3447         (process_coff_symbol): Update.
3448         * buildsym.h (current_subfile): Don't declare.
3449         (get_current_subfile): Declare.
3450         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3451         member.
3452         (start_subfile, free_buildsym_compunit, push_subfile)
3453         (prepare_for_building, start_symtab): Update.
3454         (get_current_subfile): New function.
3455
3456 2018-07-20  Tom Tromey  <tom@tromey.com>
3457
3458         * coffread.c (coff_symtab_read): Update.
3459         * xcoffread.c (read_xcoff_symtab): Update.
3460         * dwarf2read.c (new_symbol): Update.
3461         (read_func_scope, read_lexical_block_scope): Update.
3462         * dbxread.c (process_one_symbol): Update.
3463         * buildsym.h (context_stack, context_stack_depth): Don't declare.
3464         (outermost_context_p): Remove macro.
3465         (outermost_context_p, get_current_context_stack)
3466         (get_context_stack_depth): Declare.
3467         (pop_context): Return struct context_stack.
3468         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3469         member.
3470         (context_stack_size): Remove.
3471         (INITIAL_CONTEXT_STACK_SIZE): Remove.
3472         (prepare_for_building, end_symtab_get_static_block)
3473         (augment_type_symtab, push_context): Update.
3474         (pop_context): Return struct context_stack.
3475         (outermost_context_p, get_current_context_stack)
3476         (get_context_stack_depth): New functions.
3477         (buildsym_init): Update.
3478
3479 2018-07-20  Tom Tromey  <tom@tromey.com>
3480
3481         * rust-exp.y: Now a pure parser.  Update all rules.
3482         (%union): Move earlier.
3483         (current_parser, work_obstack): Remove globals.
3484         (rust_parser, ~rust_parser): Update.
3485         (class rust_parser) <copy_name, concat3, crate_name, super_name,
3486         lex_character, lex_number, lex_string, lex_identifier,
3487         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3488         convert_name, convert_params_to_expression,
3489         convert_ast_to_expression, ast_basic_type, ast_operation,
3490         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3491         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3492         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3493         ast_array_type, ast_slice_type, ast_reference_type,
3494         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3495         (rust_parse): Update.
3496         (rustyyerror, rustyylex): Add parser parameter.
3497         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3498         (rust_lex_stringish_test, rust_lex_test_sequence)
3499         (rust_lex_test_trailing_dot, rust_lex_test_completion)
3500         (rust_lex_test_push_back, rust_lex_tests): Update.
3501
3502 2018-07-19  Pedro Alves  <palves@redhat.com>
3503
3504         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3505         gdb::unique_xmalloc_ptr.
3506         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3507         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3508         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3509         copy-initialization.
3510         * guile/scm-pretty-print.c (ppscm_print_children): Use
3511         gdb::unique_xmalloc_ptr instead of cleanups.
3512         (gdbscm_apply_val_pretty_printer): Remove cleanups.
3513         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3514         gdb::unique_xmalloc_ptr.
3515         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3516         Adjust to use gdb::unique_xmalloc_ptr.
3517         * guile/scm-utils.c (extract_arg): Adjust.
3518         * guile/scm-value.c (gdbscm_value_field): Adjust to use
3519         gdb::unique_xmalloc_ptr instead of a cleanup.
3520
3521 2018-07-19  Tom Tromey  <tom@tromey.com>
3522
3523         * utils.c (do_value_free_to_mark)
3524         (make_cleanup_value_free_to_mark): Remove.
3525         * utils.h (make_cleanup_value_free_to_mark): Remove.
3526
3527 2018-07-19  Pedro Alves  <palves@redhat.com>
3528
3529         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3530         forwarding reference.
3531
3532 2018-07-18  Pedro Alves  <palves@redhat.com>
3533
3534         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3535         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
3536         cleanup.
3537
3538 2018-07-18  Pedro Alves  <palves@redhat.com>
3539
3540         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3541         exceptions.
3542         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3543         (gdbscm_wrap): New.
3544         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3545         directly instead of a cleanup.
3546         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3547         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3548         (vlscm_binop_gdbthrow): New, factored out from ...
3549         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3550         (vlscm_rich_compare): Use gdbscm_wrap.
3551         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3552         instead of a cleanup.
3553         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3554         cleanup.
3555         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3556         Use xfree directly instead of a cleanup.
3557         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3558         Adjust to use gdbscm_wrap and scoped_value_mark.
3559         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3560         (gdbscm_value_address, gdbscm_value_dereference)
3561         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3562         scoped_value_mark.
3563         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3564         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3565         scoped_value_mark.
3566         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3567         gdbscm_wrap and scoped_value_mark.
3568         (gdbscm_value_to_string): Use xfree directly instead of a
3569         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3570         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3571         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3572         scoped_value_mark.
3573         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3574         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3575         scoped_value_mark.
3576         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3577         gdbscm_wrap.
3578
3579 2018-07-18  Tom de Vries  <tdevries@suse.de>
3580
3581         * findvar.c (default_read_var_value): Also resolve dynamic type for
3582         LOC_OPTIMIZED_OUT vars.
3583
3584 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
3585
3586         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3587         decoding.
3588
3589 2018-07-17  Tom Tromey  <tom@tromey.com>
3590
3591         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3592         (compute_enum_list, pascm_set_param_value_x)
3593         (gdbscm_parameter_value): Update.
3594         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3595         (gdbscm_scm_to_host_string): Update.
3596         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3597         Update.
3598         * guile/scm-cmd.c (cmdscm_add_completion): Update.
3599         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3600         * guile/scm-string.c (gdbscm_scm_to_string): Return
3601         unique_xmalloc_ptr.
3602         (gdbscm_scm_to_host_string): Likewise.
3603
3604 2018-07-17  Tom Tromey  <tom@tromey.com>
3605
3606         * guile/guile.c (gdbscm_eval_from_control_command): Update.
3607         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3608         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3609         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3610         unique_xmalloc_ptr.
3611
3612 2018-07-17  Tom Tromey  <tom@tromey.com>
3613
3614         * guile/scm-param.c (pascm_signal_setshow_error): Update.
3615         * guile/guile-internal.h (gdbscm_exception_message_to_string):
3616         Update.
3617         * guile/scm-cmd.c (cmdscm_function): Update.
3618         * guile/scm-pretty-print.c
3619         (ppscm_print_exception_unless_memory_error): Update.
3620         * guile/scm-exception.c (gdbscm_exception_message_to_string):
3621         Return unique_xmalloc_ptr.
3622
3623 2018-07-17  Tom Tromey  <tom@tromey.com>
3624
3625         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3626         Use string_printf.
3627
3628 2018-07-17  Jim Wilson  <jimw@sifive.com>
3629
3630         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3631         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
3632         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
3633         unecessary braces after EF_RISCV_RVC test.  Delete call to
3634         set_gdbarch_decr_pc_after_break.
3635
3636         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3637         RISCV_LAST_FP_REGNUM + 1.
3638         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3639
3640 2018-07-17  Tom Tromey  <tom@tromey.com>
3641
3642         * configure.ac: Remove --disable-gdbcli.
3643         * configure: Rebuild.
3644         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3645         (SUBDIR_CLI_CFLAGS): Remove.
3646         (SFILES): Use SUBDIR_CLI_SRCS.
3647         (COMMON_OBS): Use SUBDIR_CLI_OBS.
3648
3649 2018-07-17  Tom Tromey  <tom@tromey.com>
3650
3651         PR gdb/18624:
3652         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3653
3654 2018-07-16  Jim Wilson  <jimw@sifive.com>
3655
3656         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3657
3658 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3659
3660         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3661         variable.
3662         (libunwind_frame_sniffer): Likewise.
3663         (libunwind_frame_prev_register): Likewise.
3664         (libunwind_sigtramp_frame_sniffer): Likewise.
3665         * ia64-tdep.c (ia64_access_reg): Likewise.
3666         (ia64_access_rse_reg): Likewise.
3667         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3668         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3669
3670 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3671
3672         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3673
3674 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3675
3676         * remote-sim.c (gdbsim_target::close,
3677         gdbsim_target::mourn_inferior): Remove unused variables.
3678
3679 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
3680
3681         * ia64-tdep.c (ktab_buf): New global.
3682         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3683         (get_kernel_table): Adjust.
3684
3685 2018-07-16  Tom Tromey  <tom@tromey.com>
3686
3687         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3688         * dwarf2read.c (using_directives, new_symbol): Use
3689         outermost_context_p.
3690         * dbxread.c (process_one_symbol): Use outermost_context_p.
3691         * coffread.c (coff_symtab_read): Use outermost_context_p.
3692
3693 2018-07-16  Tom Tromey  <tom@tromey.com>
3694
3695         * dwarf2read.c (using_directives, read_func_scope)
3696         (read_lexical_block_scope): Update.
3697         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3698         * buildsym.h (local_using_directives, global_using_directives):
3699         Don't declare.
3700         (get_local_using_directives, set_local_using_directives)
3701         (get_global_using_directives): Declare.
3702         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3703         m_global_using_directives>: New members.
3704         (finish_block_internal, prepare_for_building)
3705         (reset_symtab_globals, end_symtab_get_static_block)
3706         (push_context): Update.
3707         (get_local_using_directives, set_local_using_directives)
3708         (get_global_using_directives): New functions.
3709         (buildsym_init): Update.
3710
3711 2018-07-16  Tom Tromey  <tom@tromey.com>
3712
3713         * xcoffread.c (xcoff_initial_scan): Don't call
3714         free_pending_blocks.
3715         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3716         * buildsym.h (class scoped_free_pendings): Add constructor.
3717         (free_pending_blocks): Don't declare.
3718         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3719         (free_pending_blocks): Now static.
3720
3721 2018-07-16  Tom Tromey  <tom@tromey.com>
3722
3723         * buildsym.h (push_subfile, pop_subfile): Update declarations.
3724         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3725         member.
3726         (struct subfile_stack): Remove.
3727         (subfile_stack): Remove.
3728         (push_subfile, pop_subfile, buildsym_init): Update.
3729
3730 2018-07-16  Tom Tromey  <tom@tromey.com>
3731
3732         * buildsym.c (push_subfile): Use gdb_assert.
3733         (pop_subfile): Use gdb_assert.
3734
3735 2018-07-16  Tom Tromey  <tom@tromey.com>
3736
3737         * buildsym.h (merge_symbol_lists): Remove.
3738         * buildsym.c (merge_symbol_lists): Remove.
3739
3740 2018-07-16  Tom Tromey  <tom@tromey.com>
3741
3742         * stabsread.c (scan_file_globals): Update comment.
3743         * stabsread.h (scan_file_globals): Move from buildsym.h.
3744         * buildsym.h (scan_file_globals): Move to stabsread.h.
3745
3746 2018-07-16  Tom Tromey  <tom@tromey.com>
3747
3748         * xcoffread.c (xcoff_new_init): Update.
3749         * mipsread.c (mipscoff_new_init): Update.
3750         * mdebugread.c (mdebug_build_psymtabs): Update.
3751         * elfread.c (elf_new_init): Update.
3752         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3753         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3754         * buildsym.h (buildsym_new_init): Don't declare.
3755         * buildsym.c (buildsym_new_init): Remove.
3756
3757 2018-07-16  Tom Tromey  <tom@tromey.com>
3758
3759         * stabsread.h (within_function): Move from buildsym.h.
3760         * stabsread.c (start_stabs): Clear within_function.
3761         * coffread.c (coff_start_symtab): Clear within_function.
3762         * buildsym.h (within_function): Move to stabsread.h.
3763         * buildsym.c (prepare_for_building): Update.
3764
3765 2018-07-16  Tom Tromey  <tom@tromey.com>
3766
3767         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3768         * dwarf2read.c (dwarf2_start_symtab): Don't set
3769         processing_gcc_compilation.
3770         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3771
3772 2018-07-16  Tom Tromey  <tom@tromey.com>
3773
3774         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3775         (next_symbol_text_func): Move from buildsym.h.
3776         * stabsread.c (hashname): Move from buildsym.c.
3777         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3778         (next_symbol_text_func, hashname): Move to stabsread.h.
3779         * buildsym.c: Don't include bcache.h
3780         (hashname): Move to stasbread.c.
3781
3782 2018-07-16  Tom Tromey  <tom@tromey.com>
3783
3784         * buildsym.h (context_stack_size): Don't declare.
3785         * buildsym.c (context_stack_size): New global.
3786
3787 2018-07-16  Tom Tromey  <tom@tromey.com>
3788
3789         * dbxread.c (processing_acc_compilation): New global.
3790         * buildsym.h (processing_acc_compilation): Don't declare.
3791
3792 2018-07-16  Tom Tromey  <tom@tromey.com>
3793
3794         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3795         * dbxread.c (read_ofile_symtab): Update.
3796         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3797         * buildsym.h (last_source_start_addr): Remove.
3798         (set_last_source_start_addr, get_last_source_start_addr):
3799         Declare.
3800         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3801         parameter.
3802         (struct buildsym_compunit) <m_last_source_start_addr>: New
3803         member.
3804         (prepare_for_building): Remove start_addr parameter.
3805         (start_symtab, restart_symtab, end_symtab_get_static_block)
3806         (end_symtab_with_blockvector): Update.
3807         (set_last_source_start_addr, get_last_source_start_addr): New
3808         functions.
3809
3810 2018-07-16  Tom Tromey  <tom@tromey.com>
3811
3812         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3813         member.
3814         (have_line_numbers): Remove.
3815         (record_line, prepare_for_building, end_symtab_get_static_block)
3816         (augment_type_symtab): Update.
3817
3818 2018-07-16  Tom Tromey  <tom@tromey.com>
3819
3820         * buildsym.c (~buildsym_compunit): Free the macro table.
3821         (struct buildsym_compunit) <get_macro_table, release_macros>: New
3822         methods.
3823         <m_pending_macros>: New member.
3824         (pending_macros): Remove.
3825         (~scoped_free_pendings, get_macro_table, prepare_for_building)
3826         (reset_symtab_globals, end_symtab_get_static_block)
3827         (end_symtab_with_blockvector, augment_type_symtab)
3828         (buildsym_init): Update.
3829
3830 2018-07-16  Tom Tromey  <tom@tromey.com>
3831
3832         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3833         parameter.
3834         (buildsym_compunit::set_last_source_file): New method.
3835         <m_last_source_file>: New member.
3836         (prepare_for_building): Remove "name" parameter.
3837         (start_symtab, restart_symtab, reset_symtab_globals): Update.
3838         (last_source_file): Remove.
3839         (set_last_source_file, get_last_source_file): Update.
3840
3841 2018-07-16  Tom Tromey  <tom@tromey.com>
3842
3843         * buildsym.c (prepare_for_building): Add assert.
3844
3845 2018-07-16  Tom Tromey  <tom@tromey.com>
3846
3847         * buildsym.c (~buildsym_compunit): Update.
3848         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
3849         (start_subfile, patch_subfile_names)
3850         (end_symtab_with_blockvector): Update.
3851
3852 2018-07-16  Tom Tromey  <tom@tromey.com>
3853
3854         * buildsym.c (struct buildsym_compunit): Add constructor,
3855         destructor, initializers.
3856         (start_buildsym_compunit): Remove.
3857         (free_buildsym_compunit): Use "delete".
3858         (start_symtab, restart_symtab): Use "new".
3859
3860 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
3861
3862         * symfile.c (set_objfile_default_section_offset): Remove struct
3863         keyword.
3864
3865 2018-07-14  Stafford Horne  <shorne@gmail.com>
3866
3867         * (Responsible Maintainers): Add myself as or1k maintainer.
3868
3869 2018-07-13  Tom Tromey  <tom@tromey.com>
3870
3871         * symfile.c (set_objfile_default_section_offset): Use extra braces
3872         around initializer.
3873
3874 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3875
3876         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
3877         non-branching basr.
3878
3879 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3880
3881         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3882         unittests/cli-utils-selftests.c
3883         * unittests/cli-utils-selftests.c: New file.
3884
3885 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3886
3887         * NEWS: Mention new commands. Mention change to 'thread apply'.
3888
3889 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3890
3891         * thread.c (thr_try_catch_cmd): New function.
3892         (thread_apply_all_command): Handle qcs flags.
3893         (thread_apply_command): Handle qcs flags.
3894         (taas_command): New function.
3895         (tfaas_command): New function.
3896         (_initialize_thread): Update to setup the new commands 'taas
3897         and 'tfaas'. Change doc string for 'thread apply'.
3898
3899 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3900
3901         * stack.c: (trailing_outermost_frame): New function, mostly
3902         extracted from backtrace_command_1.
3903         (leading_innermost_frame): New function.
3904         (backtrace_command_1): Update to call trailing_outermost_frame.
3905         (frame_apply_command_count): New function.
3906         (frame_apply_level_command): New function.
3907         (frame_apply_all_command): New function.
3908         (frame_apply_command): New function.
3909         (faas_command): New function.
3910         (frame_cmd_list): New variable.
3911         (_initialize_stack): Update to setup the new commands 'frame apply'
3912         and 'faas'.
3913
3914 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3915
3916         * cli-utils.c (number_or_range_parser::get_number): Only handle
3917         numbers or convenience var as numbers.
3918         (parse_flags): New function.
3919         (parse_flags_qcs): New function.
3920         (number_or_range_parser::finished): Ensure parsing end is detected
3921         before end of string.
3922         * cli-utils.h (parse_flags): New function.
3923         (parse_flags_qcs): New function.
3924         (number_or_range_parser): Remove m_finished bool.
3925         (number_or_range_parser::skip_range): Set m_in_range to false.
3926
3927 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
3928
3929         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
3930         on Windows.
3931
3932 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3933             Jan Kratochvil  <jan.kratochvil@redhat.com>
3934             Paul Fertser  <fercerpav@gmail.com>
3935             Tsutomu Seki  <sekiriki@gmail.com>
3936             Pedro Alves  <palves@redhat.com>
3937
3938         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3939         'unittests/parse-connection-spec-selftests.c'.
3940         (COMMON_SFILES): Add 'common/netstuff.c'.
3941         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
3942         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
3943         * common/netstuff.c: New file.
3944         * common/netstuff.h: New file.
3945         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
3946         (wait_for_connect): Update comment.  New parameter
3947         'gdb::optional<int> sock' instead of 'struct serial *scb'.
3948         Use 'sock' directly instead of 'scb->fd'.
3949         (try_connect): New function, with code from 'net_open'.
3950         (net_open): Rewrite main loop to deal with multiple
3951         sockets/addresses.  Handle IPv6-style hostnames; implement
3952         support for IPv6 connections.
3953         * unittests/parse-connection-spec-selftests.c: New file.
3954
3955 2018-07-11  Pedro Alves  <palves@redhat.com>
3956
3957         PR gdb/23377
3958         * remote.c (remote_target::remote_detach_pid): Call
3959         set_current_process.
3960
3961 2018-07-11  Pedro Alves  <palves@redhat.com>
3962
3963         * h8300-tdep.c (h8300_gdbarch_init): Remove
3964         set_gdbarch_ecoff_reg_to_regnum calls.
3965
3966 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
3967
3968         PR c++/23373
3969         * c-typeprint.c (c_type_print_base_struct_union): Don't print
3970         offsets/sizes for static members of a class/struct.
3971
3972 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
3973
3974         * target-descriptions.c (tdesc_register_bitsize): Rename.
3975         * target-descriptions.h (tdesc_register_bitsize): Likewise.
3976         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
3977         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
3978
3979 2018-07-10  Tom Tromey  <tom@tromey.com>
3980
3981         * breakpoint.c (moribund_locations): Now static and a
3982         std::vector.
3983         (breakpoint_init_inferior, moribund_breakpoint_here_p)
3984         (build_bpstat_chain, update_global_location_list)
3985         (breakpoint_retire_moribund): Update.
3986         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
3987         VEC.
3988
3989 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3990
3991         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
3992         (riscv_register_reggroup_p): Use new function, remove unneeded
3993         parenthesis.
3994         (riscv_push_dummy_call): Extend assert to compare against xlen or
3995         flen based on register type.
3996
3997 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
3998
3999         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4000
4001 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4002
4003         * remote.c (show_hardware_watchpoint_limit): New function.
4004         (show_hardware_watchpoint_length_limit): New function.
4005         (show_hardware_breakpoint_limit): New function.
4006         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4007         where appropriate, update help text.
4008
4009 2018-07-09  Tom Tromey  <tom@tromey.com>
4010
4011         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4012         (CLIBS): Don't mention NAT_CLIBS.
4013
4014 2018-07-09  Tom Tromey  <tom@tromey.com>
4015
4016         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4017         (LIBGDB_OBS, clean mostlyclean): Update.
4018         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4019
4020 2018-07-09  Tom Tromey  <tom@tromey.com>
4021
4022         * Makefile.in (%.c: %.y): Use ECHO_YACC.
4023         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
4024         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4025
4026 2018-07-09  Tom Tromey  <tom@tromey.com>
4027
4028         * Makefile.in (ALLDEPFILES): Remove exec.c.
4029         (COMMON_OBS): Remove exec.o.
4030         (COMMON_SFILES): Add exec.c.
4031
4032 2018-07-09  Tom Tromey  <tom@tromey.com>
4033
4034         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4035
4036 2018-07-09  Tom Tromey  <tom@tromey.com>
4037
4038         * Makefile.in (clean mostlyclean): Remove stamp-version.
4039         (version.c): Depend on stamp-version.
4040         (stamp-version): New rule, from version.c rule.
4041
4042 2018-07-09  Tom Tromey  <tom@tromey.com>
4043
4044         * Makefile.in (init.c): Depend on stamp-init.
4045         (stamp-init): New rule, from init.c rule.
4046         (clean mostlyclean): Remove stamp-init.
4047
4048 2018-07-09  Tom Tromey  <tom@tromey.com>
4049
4050         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4051         SUBDIR_GCC_COMPILE_SRCS.
4052
4053 2018-07-09  Tom Tromey  <tom@tromey.com>
4054
4055         * Makefile.in (init.c): Remove some unused sed rules.
4056
4057 2018-07-09  Tom Tromey  <tom@tromey.com>
4058
4059         * Makefile.in (TSOBS): Remove.
4060         (INIT_FILES): Update.
4061         (LIBGDB_OBS): Update.
4062         (COMMON_SFILES): Add inflow.c.
4063         (SFILES): Remove inflow.c.
4064
4065 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
4066
4067         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4068
4069 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
4070
4071         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4072         get_saveloc_name, is_signal_frame_name, step_name,
4073         init_remote_name, create_addr_space_name,
4074         destroy_addr_space_name, search_unwind_table_name,
4075         find_dyn_list_name): Constify.
4076
4077 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
4078
4079         * darwin-nat.c (darwin_pthread_kill): New function.
4080         (darwin_resume_thread): Use darwin_pthread_kill.
4081
4082 2018-07-05  Tom de Vries  <tdevries@suse.de>
4083
4084         * macroexp.c (macro_buffer) <operator=>: New member function.
4085
4086 2018-07-04  Tom Tromey  <tom@tromey.com>
4087
4088         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4089
4090 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
4091
4092         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4093         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4094         * maint.c: Likewise.
4095         * top.c: Likewise.
4096
4097 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4098
4099         * NEWS: Create a new section for the next release branch.
4100         Rename the section of the current branch, now that it has
4101         been cut.
4102
4103 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4104
4105         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4106         * version.in: Bump version to 8.2.50.DATE-git.
4107
4108 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
4109             Pedro Alves  <palves@redhat.com>
4110
4111         * linux-nat.c (linux_init_ptrace): Rename to ...
4112         (linux_init_ptrace_procfs): ... this.  Call
4113         linux_proc_init_warnings.
4114         (linux_nat_target::post_attach)
4115         (linux_nat_target::post_startup_inferior): Adjust.
4116         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4117         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4118
4119 2018-07-04  Tom de Vries  <tdevries@suse.de>
4120
4121         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4122         check ...
4123         (read_comp_unit_head): ... here.
4124
4125 2018-07-03  Tom Tromey  <tom@tromey.com>
4126
4127         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4128         (stop_tracing, tstatus_command)
4129         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4130         (print_one_static_tracepoint_marker): Update.
4131         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4132         std::vector.
4133         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
4134         VEC.
4135         (all_tracepoints, static_tracepoints_here): Return std::vector.
4136
4137 2018-07-03  Tom Tromey  <tom@tromey.com>
4138
4139         * common/ptid.c (ptid_equal): Remove.
4140         * common/ptid.h (ptid_equal): Don't declare.
4141         * ada-tasks.c: Update.
4142         * breakpoint.c: Update.
4143         * common/agent.c: Update.
4144         * corelow.c: Update.
4145         * darwin-nat-info.c: Update.
4146         * darwin-nat.c: Update.
4147         * dcache.c: Update.
4148         * dtrace-probe.c: Update.
4149         * dummy-frame.c: Update.
4150         * fbsd-nat.c: Update.
4151         * frame.c: Update.
4152         * gdbthread.h: Update.
4153         * gnu-nat.c: Update.
4154         * go32-nat.c: Update.
4155         * inf-loop.c: Update.
4156         * inf-ptrace.c: Update.
4157         * infcall.c: Update.
4158         * infcmd.c: Update.
4159         * inflow.c: Update.
4160         * infrun.c: Update.
4161         * linux-fork.c: Update.
4162         * linux-nat.c: Update.
4163         * linux-thread-db.c: Update.
4164         * mi/mi-cmd-var.c: Update.
4165         * mi/mi-interp.c: Update.
4166         * mi/mi-main.c: Update.
4167         * nto-procfs.c: Update.
4168         * ppc-linux-tdep.c: Update.
4169         * procfs.c: Update.
4170         * python/py-inferior.c: Update.
4171         * python/py-record-btrace.c: Update.
4172         * python/py-record.c: Update.
4173         * ravenscar-thread.c: Update.
4174         * regcache.c: Update.
4175         * remote-sim.c: Update.
4176         * remote.c: Update.
4177         * sol-thread.c: Update.
4178         * solib.c: Update.
4179         * target.c: Update.
4180         * tui/tui-stack.c: Update.
4181         * varobj.c: Update.
4182         * windows-nat.c: Update.
4183         * windows-tdep.c: Update.
4184
4185 2018-07-03  Tom Tromey  <tom@tromey.com>
4186
4187         * common/ptid.c (ptid_match): Remove.
4188         * common/ptid.h (ptid_match): Don't declare.
4189         * fbsd-nat.c: Update.
4190         * infcmd.c: Update.
4191         * infrun.c: Update.
4192         * linux-nat.c: Update.
4193         * record-btrace.c: Update.
4194         * regcache.c: Update.
4195         * remote.c: Update.
4196
4197 2018-07-03  Tom Tromey  <tom@tromey.com>
4198
4199         * common/ptid.c (ptid_tid_p): Remove.
4200         * common/ptid.h (ptid_tid_p): Don't declare.
4201         * sol-thread.c: Update.
4202
4203 2018-07-03  Tom Tromey  <tom@tromey.com>
4204
4205         * common/ptid.c (ptid_lwp_p): Remove.
4206         * common/ptid.h (ptid_lwp_p): Don't declare.
4207         * fbsd-nat.c: Update.
4208         * linux-nat.c: Update.
4209         * nat/linux-procfs.c: Update.
4210         * nat/x86-linux-dregs.c: Update.
4211         * sol-thread.c: Update.
4212
4213 2018-07-03  Tom Tromey  <tom@tromey.com>
4214
4215         * common/ptid.c (ptid_is_pid): Remove.
4216         * common/ptid.h (ptid_is_pid): Don't declare.
4217         * infrun.c: Update.
4218         * linux-nat.c: Update.
4219         * mi/mi-interp.c: Update.
4220         * remote.c: Update.
4221         * thread.c: Update.
4222
4223 2018-07-03  Tom Tromey  <tom@tromey.com>
4224
4225         * common/ptid.c (ptid_get_tid): Remove.
4226         * common/ptid.h (ptid_get_tid): Don't declare.
4227         * ada-tasks.c: Update.
4228         * aix-thread.c: Update.
4229         * bsd-uthread.c: Update.
4230         * darwin-nat.c: Update.
4231         * fbsd-nat.c: Update.
4232         * i386-darwin-nat.c: Update.
4233         * infrun.c: Update.
4234         * linux-tdep.c: Update.
4235         * nto-procfs.c: Update.
4236         * ppc-ravenscar-thread.c: Update.
4237         * python/py-infthread.c: Update.
4238         * ravenscar-thread.c: Update.
4239         * sol-thread.c: Update.
4240         * sparc-ravenscar-thread.c: Update.
4241         * windows-nat.c: Update.
4242
4243 2018-07-03  Tom Tromey  <tom@tromey.com>
4244
4245         * common/ptid.c (ptid_get_lwp): Remove.
4246         * common/ptid.h (ptid_get_lwp): Don't declare.
4247         * aarch64-linux-nat.c: Update.
4248         * ada-tasks.c: Update.
4249         * aix-thread.c: Update.
4250         * amd64-linux-nat.c: Update.
4251         * arm-linux-nat.c: Update.
4252         * corelow.c: Update.
4253         * fbsd-nat.c: Update.
4254         * fbsd-tdep.c: Update.
4255         * gnu-nat.c: Update.
4256         * i386-cygwin-tdep.c: Update.
4257         * i386-gnu-nat.c: Update.
4258         * i386-linux-nat.c: Update.
4259         * ia64-linux-nat.c: Update.
4260         * inf-ptrace.c: Update.
4261         * infrun.c: Update.
4262         * linux-fork.c: Update.
4263         * linux-nat.c: Update.
4264         * linux-tdep.c: Update.
4265         * linux-thread-db.c: Update.
4266         * mips-linux-nat.c: Update.
4267         * nat/aarch64-linux-hw-point.c: Update.
4268         * nat/aarch64-linux.c: Update.
4269         * nat/linux-btrace.c: Update.
4270         * nat/linux-osdata.c: Update.
4271         * nat/linux-procfs.c: Update.
4272         * nat/x86-linux-dregs.c: Update.
4273         * obsd-nat.c: Update.
4274         * ppc-fbsd-nat.c: Update.
4275         * ppc-linux-nat.c: Update.
4276         * procfs.c: Update.
4277         * python/py-infthread.c: Update.
4278         * ravenscar-thread.c: Update.
4279         * remote.c: Update.
4280         * s390-linux-nat.c: Update.
4281         * sol-thread.c: Update.
4282         * sol2-tdep.c: Update.
4283         * spu-linux-nat.c: Update.
4284         * x86-linux-nat.c: Update.
4285         * xtensa-linux-nat.c: Update.
4286
4287 2018-07-03  Tom Tromey  <tom@tromey.com>
4288
4289         * common/ptid.c (ptid_get_pid): Remove.
4290         * common/ptid.h (ptid_get_pid): Don't declare.
4291         * aarch64-linux-nat.c: Update.
4292         * ada-lang.c: Update.
4293         * aix-thread.c: Update.
4294         * alpha-bsd-nat.c: Update.
4295         * amd64-fbsd-nat.c: Update.
4296         * amd64-linux-nat.c: Update.
4297         * arm-linux-nat.c: Update.
4298         * arm-nbsd-nat.c: Update.
4299         * auxv.c: Update.
4300         * break-catch-syscall.c: Update.
4301         * breakpoint.c: Update.
4302         * bsd-uthread.c: Update.
4303         * corelow.c: Update.
4304         * ctf.c: Update.
4305         * darwin-nat.c: Update.
4306         * fbsd-nat.c: Update.
4307         * fbsd-tdep.c: Update.
4308         * gcore.c: Update.
4309         * gnu-nat.c: Update.
4310         * hppa-nbsd-nat.c: Update.
4311         * hppa-obsd-nat.c: Update.
4312         * i386-fbsd-nat.c: Update.
4313         * ia64-linux-nat.c: Update.
4314         * inf-ptrace.c: Update.
4315         * infcmd.c: Update.
4316         * inferior.c: Update.
4317         * inferior.h: Update.
4318         * inflow.c: Update.
4319         * infrun.c: Update.
4320         * linux-fork.c: Update.
4321         * linux-nat.c: Update.
4322         * linux-tdep.c: Update.
4323         * linux-thread-db.c: Update.
4324         * m68k-bsd-nat.c: Update.
4325         * mi/mi-interp.c: Update.
4326         * mi/mi-main.c: Update.
4327         * mips-linux-nat.c: Update.
4328         * mips-nbsd-nat.c: Update.
4329         * mips64-obsd-nat.c: Update.
4330         * nat/aarch64-linux-hw-point.c: Update.
4331         * nat/aarch64-linux.c: Update.
4332         * nat/linux-btrace.c: Update.
4333         * nat/linux-osdata.c: Update.
4334         * nat/linux-procfs.c: Update.
4335         * nat/x86-linux-dregs.c: Update.
4336         * nto-procfs.c: Update.
4337         * obsd-nat.c: Update.
4338         * ppc-linux-nat.c: Update.
4339         * ppc-nbsd-nat.c: Update.
4340         * ppc-obsd-nat.c: Update.
4341         * proc-service.c: Update.
4342         * procfs.c: Update.
4343         * python/py-inferior.c: Update.
4344         * python/py-infthread.c: Update.
4345         * ravenscar-thread.c: Update.
4346         * record.c: Update.
4347         * remote-sim.c: Update.
4348         * remote.c: Update.
4349         * rs6000-nat.c: Update.
4350         * s390-linux-nat.c: Update.
4351         * sh-nbsd-nat.c: Update.
4352         * sol-thread.c: Update.
4353         * sparc-nat.c: Update.
4354         * sparc64-tdep.c: Update.
4355         * spu-linux-nat.c: Update.
4356         * spu-tdep.c: Update.
4357         * target-debug.h: Update.
4358         * target.c: Update.
4359         * thread.c: Update.
4360         * tid-parse.c: Update.
4361         * tracefile-tfile.c: Update.
4362         * vax-bsd-nat.c: Update.
4363         * windows-nat.c: Update.
4364         * x86-linux-nat.c: Update.
4365         * x86-nat.c: Update.
4366
4367 2018-07-03  Tom Tromey  <tom@tromey.com>
4368
4369         * common/ptid.c (pid_to_ptid): Remove.
4370         * common/ptid.h (pid_to_ptid): Don't declare.
4371         * aix-thread.c: Update.
4372         * arm-linux-nat.c: Update.
4373         * common/ptid.c: Update.
4374         * common/ptid.h: Update.
4375         * corelow.c: Update.
4376         * ctf.c: Update.
4377         * darwin-nat.c: Update.
4378         * fbsd-nat.c: Update.
4379         * fork-child.c: Update.
4380         * gnu-nat.c: Update.
4381         * go32-nat.c: Update.
4382         * inf-ptrace.c: Update.
4383         * infcmd.c: Update.
4384         * inferior.c: Update.
4385         * infrun.c: Update.
4386         * linux-fork.c: Update.
4387         * linux-nat.c: Update.
4388         * nat/aarch64-linux-hw-point.c: Update.
4389         * nat/fork-inferior.c: Update.
4390         * nat/x86-linux-dregs.c: Update.
4391         * nto-procfs.c: Update.
4392         * obsd-nat.c: Update.
4393         * procfs.c: Update.
4394         * progspace.c: Update.
4395         * remote.c: Update.
4396         * rs6000-nat.c: Update.
4397         * s390-linux-nat.c: Update.
4398         * sol-thread.c: Update.
4399         * spu-linux-nat.c: Update.
4400         * target.c: Update.
4401         * top.c: Update.
4402         * tracefile-tfile.c: Update.
4403         * windows-nat.c: Update.
4404
4405 2018-07-03  Tom Tromey  <tom@tromey.com>
4406
4407         * common/ptid.h (ptid_build): Don't declare.
4408         * common/ptid.c (ptid_build): Remove.
4409         * aix-thread.c: Update.
4410         * bsd-kvm.c: Update.
4411         * bsd-uthread.c: Update.
4412         * common/agent.c: Update.
4413         * common/ptid.c: Update.
4414         * common/ptid.h: Update.
4415         * corelow.c: Update.
4416         * darwin-nat.c: Update.
4417         * fbsd-nat.c: Update.
4418         * gnu-nat.c: Update.
4419         * linux-fork.c: Update.
4420         * linux-nat.c: Update.
4421         * linux-thread-db.c: Update.
4422         * nat/linux-osdata.c: Update.
4423         * nat/linux-procfs.c: Update.
4424         * nto-procfs.c: Update.
4425         * obsd-nat.c: Update.
4426         * proc-service.c: Update.
4427         * procfs.c: Update.
4428         * ravenscar-thread.c: Update.
4429         * remote-sim.c: Update.
4430         * remote.c: Update.
4431         * sol-thread.c: Update.
4432         * target.c: Update.
4433         * windows-nat.c: Update.
4434
4435 2018-07-03  Tom Tromey  <tom@tromey.com>
4436
4437         * infrun.c (follow_exec): Use exit_inferior_silent.
4438         * inferior.c (exit_inferior_num_silent): Remove.
4439         * inferior.h (exit_inferior_num_silent): Don't declare.
4440
4441 2018-07-03  Tom Tromey  <tom@tromey.com>
4442
4443         PR cli/23340:
4444         * darwin-nat.c (darwin_attach_pid): Reset inferior and
4445         inferior_ptid on error.
4446
4447 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
4448             Simon Marchi  <simon.marchi@polymtl.ca>
4449
4450         PR tdep/8282
4451         * disasm.h (gdb_disassembler): Add
4452         `m_disassembler_options_holder'. member
4453         * disasm.c (get_all_disassembler_options): New function.
4454         (gdb_disassembler::gdb_disassembler): Use it.
4455         (gdb_buffered_insn_length_init_dis): Likewise.
4456         (gdb_buffered_insn_length): Adjust accordingly.
4457         (set_disassembler_options): Handle options with arguments.
4458         (show_disassembler_options_sfunc): Likewise.  Add a leading new
4459         line if showing options with descriptions.
4460         (disassembler_options_completer): Adapt to using the
4461         `disasm_options_and_args_t' structure.
4462         * mips-tdep.c (mips_disassembler_options): New variable.
4463         (mips_disassembler_options_o32): Likewise.
4464         (mips_disassembler_options_n32): Likewise.
4465         (mips_disassembler_options_n64): Likewise.
4466         (gdb_print_insn_mips): Don't set `disassembler_options'.
4467         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4468         functions.
4469         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4470         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
4471         `gdbarch_disassembler_options_implicit' and
4472         `gdbarch_valid_disassembler_options'.
4473         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4474         `disasm_options_and_args_t' structure.
4475         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4476         method.
4477         (valid_disassembler_options): Switch from `disasm_options_t' to
4478         the `disasm_options_and_args_t' structure.
4479         * NEWS: Document `set disassembler-options' support for the MIPS
4480         target.
4481         * gdbarch.h: Regenerate.
4482         * gdbarch.c: Regenerate.
4483
4484 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4485
4486         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4487
4488 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
4489
4490         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4491         parameter in call to amd64_target_description.
4492         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4493         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4494         (amd64fbsd_init_abi): Likewise.
4495         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4496         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4497         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4498         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4499
4500 2018-06-29  Pedro Alves  <palves@redhat.com>
4501
4502         * gdb/amd64-tdep.h (amd64_create_target_description): Add
4503         "segments" parameter.
4504         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4505         (_initialize_amd64_tdep): Update call to
4506         amd64_create_target_description.
4507         (amd64_target_description): Add "segments" parameter.  Adjust
4508         the implementation to use it.
4509         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4510         call to amd64_create_target_description.
4511         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4512         * gdb/arch/amd64.h (amd64_create_target_description): Add
4513         "segments" register.
4514         * gdb/arch/amd64.c (amd64_create_target_description): Add
4515         "segments" parameter.  Call create_feature_i386_64bit_segments
4516         only if SEGMENTS is true.
4517         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4518         call to amd64_create_target_description.
4519
4520 2018-06-29  Pedro Alves  <palves@redhat.com>
4521
4522         * thread.c (thread_target_id_str): New, factored out from ...
4523         (print_thread_info_1): ... here.  Use it to compute the max
4524         "Target Id" column width.
4525
4526 2018-06-29  Pedro Alves  <palves@redhat.com>
4527
4528         * remote.c (remote_target::extra_thread_info): Delete
4529         'display_buf' and 'n' locals.  from the cache, regardless of
4530         packet mechanims is in use.  Use cache for qThreadExtra and qP
4531         methods too.
4532
4533 2018-06-29  Pedro Alves  <palves@redhat.com>
4534
4535         * blockframe.c (find_pc_sect_containing_function): New function.
4536         * breakpoint.c (print_breakpoint_location): Don't call
4537         find_pc_sect_function.
4538         * linespec.c (create_sals_line_offset): Record the location's
4539         symbol in the sal.
4540         * linespec.c (convert_address_location_to_sals): Fill in sal's
4541         symbol with find_pc_sect_containing_function.
4542         * symtab.c (find_function_start_sal): Rename to ...
4543         (find_function_start_sal_1): ... this.
4544         (find_function_start_sal): Reimplement as wrapper around
4545         find_function_start_sal_1, and use
4546         find_pc_sect_containing_function to fill in the sal's symbol.
4547         (find_function_start_sal(symbol*, bool)): Adjust.
4548         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4549         comments.
4550         (find_pc_sect_containing_function): Declare.
4551
4552 2018-06-29  Pedro Alves  <palves@redhat.com>
4553
4554         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4555         true if the the location has no symbol.
4556
4557 2018-06-28  Tom Tromey  <tom@tromey.com>
4558
4559         * NEWS: Mention --enable-codesign.
4560         * silent-rules.mk (ECHO_SIGN): New variable.
4561         * configure.ac: Add --enable-codesign.
4562         * configure: Rebuild.
4563         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4564         (gdb$(EXEEXT)): Optionally invoke codesign.
4565
4566 2018-06-28  Pedro Alves  <palves@redhat.com>
4567
4568         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4569         comments.
4570         (switch_to_thread_no_regs): Adjust comment.
4571         * infcmd.c (stop_pc): Delete.
4572         (post_create_inferior, info_program_command): Replace references
4573         to stop_pc with references to thread_info->suspend.stop_pc.
4574         * inferior.h (stop_pc): Delete declaration.
4575         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4576         (handle_inferior_event_1, handle_signal_stop)
4577         (process_event_stop_test, keep_going_stepped_thread)
4578         (handle_step_into_function, handle_step_into_function_backward)
4579         (print_stop_location): Replace references to stop_pc with
4580         references to thread_info->suspend.stop_pc.
4581         (struct infcall_suspend_state) <stop_pc>: Delete field.
4582         (save_infcall_suspend_state, restore_infcall_suspend_state):
4583         Remove references to inf_stat->stop_pc.
4584         * linux-fork.c (fork_load_infrun_state): Likewise.
4585         * record-btrace.c (record_btrace_set_replay): Likewise.
4586         * record-full.c (record_full_goto_entry): Likewise.
4587         * remote.c (print_one_stopped_thread): Likewise.
4588         * target.c (target_resume): Extend comment.
4589         * thread.c (set_executing_thread): New.
4590         (set_executing): Use it.
4591         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4592         Remove references to stop_pc.
4593
4594 2018-06-28  Pedro Alves  <palves@redhat.com>
4595
4596         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4597         Moving fetching stop_pc until after ecs->event_thread is refreshed.
4598
4599 2018-06-28  Tom Tromey  <tom@tromey.com>
4600
4601         * coffread.c (coff_symfile_finish): Update.
4602         * xcoffread.c (xcoff_symfile_finish): Update.
4603         * elfread.c (elf_symfile_finish): Update.
4604         * symfile.h (dwarf2_free_objfile): Don't declare.
4605         * dwarf2read.c (_initialize_dwarf2_read): Use
4606         register_objfile_data_with_cleanup.
4607         (dwarf2_free_objfile): Now static.  Change signature.
4608
4609 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4610
4611         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4612         option "-o" to add-symbol-file-load to add an offset to each
4613         section's load address.
4614         * symfile.c (set_objfile_default_section_offset): New function.
4615
4616 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4617
4618         * symfile.c (add_symbol_file_command): Make sure that sections
4619         with the same name are sorted in the same order.
4620
4621 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4622
4623         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4624         require the second argument.  If omitted, load sections at the
4625         addresses specified in the file.
4626
4627 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4628
4629         * symfile.c (symbol_file_command, symbol_file_add_main_1)
4630         (_initialize_symfile): Add option "-o" to symbol-file to add an
4631         offset to each section of the symbol file.
4632
4633 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4634
4635         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4636
4637 2018-06-27  Tom Tromey  <tom@tromey.com>
4638
4639         * stack.c (_initialize_stack): Update "func" help text.
4640
4641 2018-06-27  Tom Tromey  <tom@tromey.com>
4642
4643         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4644         std::vector.
4645         (unwind_infopy_str, pyuw_create_unwind_info)
4646         (unwind_infopy_add_saved_register, pyuw_sniffer)
4647         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4648         Update.
4649         (struct saved_reg): Add constructor.
4650         <value>: Now a gdbpy_ref<>.
4651
4652 2018-06-27  Tom Tromey  <tom@tromey.com>
4653
4654         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4655
4656 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4657
4658         * gdb-gdb.py.in: Format using autopep8.
4659
4660 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4661
4662         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4663         (type_lookup_function): Recognize CORE_ADDR values.
4664
4665 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4666
4667         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4668         print tag_name.
4669
4670 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4671
4672         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4673         <__lt__>: Add.
4674
4675 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4676
4677         * gdb-gdb.py: Move to...
4678         * gdb-gdb.py.in: ... here.
4679         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4680         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4681         dependencies.
4682         (distclean): Remove gdb-gdb.py when cleaning.
4683         (gdb-gdb.py, gdb-gdb.gdb): New rules.
4684         * configure: Re-generate.
4685
4686 2018-06-27  Pedro Alves  <palves@redhat.com>
4687
4688         * proc-service.c (get_ps_regcache): New.
4689         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4690         (ps_lsetfpregs): Use it.
4691
4692 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
4693
4694         PR gdb/21695
4695         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4696         (dwarf_decode_lines_1): Adjust.
4697
4698 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4699
4700         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4701         override.
4702         <info_proc>: Likewise.
4703
4704 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
4705
4706         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4707         to windows_fetch_one_register, and only handle the case of
4708         fetching one register.  Move the code that reloads the context
4709         and iterates over all registers if R is negative to...
4710         (windows_nat_target::fetch_registers): ... here.
4711         (do_windows_store_inferior_registers): Rename to
4712         windows_store_one_register, and only handle the case of storing
4713         one register.  Move the code that handles the case where r is
4714         negative to...
4715         (windows_nat_target::store_registers) ... here.
4716
4717 2018-06-26  Tom Tromey  <tom@tromey.com>
4718
4719         PR rust/22574:
4720         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4721         * rust-lang.c (rust_print_struct_def): Add podata parameter.
4722         Update.
4723         (rust_internal_print_type): Add podata parameter.
4724         (rust_print_type): Update.
4725
4726 2018-06-26  Tom Tromey  <tom@tromey.com>
4727
4728         * typeprint.h (struct print_offset_data) <update, finish,
4729         maybe_print_hole>: New methods.
4730         <indentation>: New constant.
4731         * typeprint.c (print_offset_data::indentation): Define.
4732         (print_offset_data::maybe_print_hole, print_offset_data::update)
4733         (print_offset_data::finish): Move from c-typeprint.c and rename.
4734         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4735         (print_spaces_filtered_with_print_options): Update.
4736         (c_print_type_union_field_offset, maybe_print_hole)
4737         (c_print_type_struct_field_offset): Move to typeprint.c and
4738         rename.
4739         (c_type_print_base_struct_union): Update.
4740
4741 2018-06-25  Pedro Alves  <palves@redhat.com>
4742
4743         * gdbthread.h (thread_info_ref, delete_thread)
4744         (delete_thread_silent, first_thread_of_inferior)
4745         (any_thread_of_inferior, switch_to_thread)
4746         (enable_thread_stack_temporaries)
4747         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4748         (get_last_thread_stack_temporary)
4749         (value_in_thread_stack_temporaries, can_access_registers_thread):
4750         Spell out "struct thread_info" instead of just "thread_info".
4751         * inferior.h (notice_new_inferior): Likewise.
4752
4753 2018-06-25  Pedro Alves  <palves@redhat.com>
4754
4755         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4756         pass thread_info pointer to delete_thread.
4757         (windows_nat_target::detach): Pass inferior pointer to
4758         detach_inferior.
4759         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4760         delete_thread.
4761         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4762         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4763         and pass a thread_info pointer to delete_thread.
4764         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4765         pass thread_info pointer to delete_thread.
4766         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4767         delete_thread_silent call.
4768         * procfs.c (procfs_target::detach): Pass inferior pointer to
4769         detach_inferior.
4770         (procfs_target::wait): Pass thread_info pointer to delete_thread.
4771         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4772         delete_thread_silent call.
4773         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4774         pass thread_info pointer to delete_thread.
4775         (windows_nat_target::detach): Pass inferior pointer to
4776         delete_inferior.
4777
4778 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4779
4780         * regcache.c (readable_regcache::read_part): Fix asserts.
4781         (reg_buffer::raw_collect_part): New function.
4782         (regcache::write_part): Fix asserts.
4783         (reg_buffer::raw_supply_part): New function.
4784         (regcache::transfer_regset_register): New helper function.
4785         (regcache::transfer_regset): Call new functions.
4786         (regcache_supply_regset): Use gdb_byte*.
4787         (regcache::supply_regset): Likewise.
4788         (regcache_collect_regset): Likewise.
4789         (regcache::collect_regset): Likewise.
4790         * regcache.h (reg_buffer::raw_collect_part): New declaration.
4791         (reg_buffer::raw_supply_part): Likewise.
4792         (regcache::transfer_regset_register): Likewise.
4793         (regcache::transfer_regset): Use gdb_byte*.
4794
4795 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4796
4797         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4798
4799 2018-06-21  Pedro Alves  <palves@redhat.com>
4800
4801         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4802         instead of a ptid_t.  All callers adjusted.
4803         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
4804         adjusted.
4805         (print_ada_task_info, display_current_task_id, task_command_1):
4806         Adjust.
4807         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4808         inferior_thread.
4809         (breakpoint_kind): Adjust.
4810         (remove_breakpoints_pid): Rename to ...
4811         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
4812         pointer.  All callers adjusted.
4813         (bpstat_clear_actions): Use inferior_thread.
4814         (get_bpstat_thread): New.
4815         (bpstat_do_actions): Use it.
4816         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4817         to take a thread_info pointer.  All callers adjusted.
4818         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4819         (breakpoint_re_set_thread): Use inferior_thread.
4820         * breakpoint.h (struct inferior): Forward declare.
4821         (bpstat_stop_status): Update.
4822         (remove_breakpoints_pid): Delete.
4823         (remove_breakpoints_inf): New.
4824         * bsd-uthread.c (bsd_uthread_target::wait)
4825         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4826         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4827         (maint_btrace_packet_history_cmd)
4828         (maint_btrace_clear_packet_history_cmd): Adjust.
4829         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4830         inferior_thread.
4831         * cli/cli-interp.c: Include "inferior.h".
4832         * common/refcounted-object.h (struct
4833         refcounted_object_ref_policy): New.
4834         * compile/compile-object-load.c: Include gdbthread.h.
4835         (store_regs): Use inferior_thread.
4836         * corelow.c (core_target::close): Use current_inferior.
4837         (core_target_open): Adjust to use first_thread_of_inferior and use
4838         the current inferior.
4839         * ctf.c (ctf_target::close): Adjust to use current_inferior.
4840         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
4841         <thread>: ... this new field.  All references adjusted.
4842         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
4843         Take a thread_info pointer instead of a ptid_t.
4844         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
4845         (dummy_frame_discard, register_dummy_frame_dtor): Take a
4846         thread_info pointer instead of a ptid_t.
4847         * elfread.c: Include "inferior.h".
4848         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
4849         Use inferior_thread.
4850         * eval.c (evaluate_subexp): Likewise.
4851         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
4852         inferior_thread.
4853         * gdb_proc_service.h (struct thread_info): Forward declare.
4854         (struct ps_prochandle) <ptid>: Delete, replaced by ...
4855         <thread>: ... this new field.  All references adjusted.
4856         * gdbarch.h, gdbarch.c: Regenerate.
4857         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
4858         'thread' parameter.  All implementations and callers adjusted.
4859         * gdbthread.h (thread_info) <set_running>: New method.
4860         (delete_thread, delete_thread_silent): Take a thread_info pointer
4861         instead of a ptid.
4862         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
4863         (first_thread_of_process): Delete, replaced by ...
4864         (first_thread_of_inferior): ... this new function.  All callers
4865         adjusted.
4866         (any_live_thread_of_process): Delete, replaced by ...
4867         (any_live_thread_of_inferior): ... this new function.  All callers
4868         adjusted.
4869         (switch_to_thread, switch_to_no_thread): Declare.
4870         (is_executing): Delete.
4871         (enable_thread_stack_temporaries): Update comment.
4872         <enable_thread_stack_temporaries>: Take a thread_info pointer
4873         instead of a ptid_t.  Incref the thread.
4874         <~enable_thread_stack_temporaries>: Decref the thread.
4875         <m_ptid>: Delete
4876         <m_thr>: New.
4877         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4878         (get_last_thread_stack_temporary)
4879         (value_in_thread_stack_temporaries, can_access_registers_thread):
4880         Take a thread_info pointer instead of a ptid_t.  All callers
4881         adjusted.
4882         * infcall.c (get_call_return_value): Use inferior_thread.
4883         (run_inferior_call): Work with thread pointers instead of ptid_t.
4884         (call_function_by_hand_dummy): Work with thread pointers instead
4885         of ptid_t.  Use thread_info_ref.
4886         * infcmd.c (proceed_thread_callback): Access thread's state
4887         directly.
4888         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
4889         access thread's state directly.
4890         (continue_command): Use inferior_thread.
4891         (info_program_command): Use find_thread_ptid and access thread
4892         state directly.
4893         (proceed_after_attach_callback): Use thread state directly.
4894         (notice_new_inferior): Take a thread_info pointer instead of a
4895         ptid_t.  All callers adjusted.
4896         (exit_inferior): Take an inferior pointer instead of a pid.  All
4897         callers adjusted.
4898         (exit_inferior_silent): New.
4899         (detach_inferior): Delete.
4900         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
4901         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
4902         (detach_inferior_command, kill_inferior_command): Use
4903         find_inferior_id instead of valid_gdb_inferior_id and
4904         gdb_inferior_id_to_pid.
4905         (inferior_command): Use inferior and thread pointers.
4906         * inferior.h (struct thread_info): Forward declare.
4907         (notice_new_inferior): Take a thread_info pointer instead of a
4908         ptid_t.  All callers adjusted.
4909         (detach_inferior): Delete declaration.
4910         (exit_inferior, exit_inferior_silent): Take an inferior pointer
4911         instead of a pid.  All callers adjusted.
4912         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
4913         (valid_gdb_inferior_id): Delete.
4914         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
4915         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
4916         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
4917         ...
4918         <inf>: ... this new field.
4919         <step_ptid>: Delete, replaced by ...
4920         <step_thread>: ... this new field.
4921         (get_displaced_stepping_state): Take an inferior pointer instead
4922         of a pid.  All callers adjusted.
4923         (displaced_step_in_progress_any_inferior): Adjust.
4924         (displaced_step_in_progress_thread): Take a thread pointer instead
4925         of a ptid_t.  All callers adjusted.
4926         (displaced_step_in_progress, add_displaced_stepping_state): Take
4927         an inferior pointer instead of a pid.  All callers adjusted.
4928         (get_displaced_step_closure_by_addr): Adjust.
4929         (remove_displaced_stepping_state): Take an inferior pointer
4930         instead of a pid.  All callers adjusted.
4931         (displaced_step_prepare_throw, displaced_step_prepare)
4932         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
4933         All callers adjusted.
4934         (start_step_over): Adjust.
4935         (infrun_thread_ptid_changed): Remove bit updating ptids in the
4936         displaced step queue.
4937         (do_target_resume): Adjust.
4938         (fetch_inferior_event): Use inferior_thread.
4939         (context_switch, get_inferior_stop_soon): Take an
4940         execution_control_state pointer instead of a ptid_t.  All callers
4941         adjusted.
4942         (switch_to_thread_cleanup): Delete.
4943         (stop_all_threads): Use scoped_restore_current_thread.
4944         * inline-frame.c: Include "gdbthread.h".
4945         (inline_state) <inline_state>: Take a thread pointer instead of a
4946         ptid_t.  All callers adjusted.
4947         <ptid>: Delete, replaced by ...
4948         <thread>: ... this new field.
4949         (find_inline_frame_state): Take a thread pointer instead of a
4950         ptid_t.  All callers adjusted.
4951         (skip_inline_frames, step_into_inline_frame)
4952         (inline_skipped_frames, inline_skipped_symbol): Take a thread
4953         pointer instead of a ptid_t.  All callers adjusted.
4954         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
4955         (inline_skipped_frames, inline_skipped_symbol): Likewise.
4956         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
4957         pointers directly.
4958         * linux-nat.c (get_detach_signal): Likewise.
4959         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
4960         (thread_db_notice_clone): Adjust.
4961         (thread_db_find_new_threads_silently)
4962         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
4963         a thread pointer instead of a ptid_t.  All callers adjusted.
4964         * mi/mi-cmd-var.c: Include "inferior.h".
4965         (mi_cmd_var_update_iter): Update to use thread pointers.
4966         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
4967         inferior directly.
4968         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
4969         out to ...
4970         (mi_output_running): ... this new function.
4971         (mi_on_resume_1): Adjust to use it.
4972         (mi_user_selected_context_changed): Adjust to use inferior_thread.
4973         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
4974         directly.
4975         (interrupt_thread_callback): : Adjust to use thread and inferior
4976         pointers.
4977         * proc-service.c: Include "gdbthread.h".
4978         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
4979         * progspace-and-thread.c: Include "inferior.h".
4980         * progspace.c: Include "inferior.h".
4981         * python/py-exitedevent.c (create_exited_event_object): Adjust to
4982         hold a reference to an inferior_object.
4983         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
4984         inferior_thread.
4985         * python/py-inferior.c (struct inferior_object): Give the type a
4986         tag name instead of a typedef.
4987         (python_on_normal_stop): No need to check if the current thread is
4988         listed.
4989         (inferior_to_inferior_object): Change return type to
4990         inferior_object.  All callers adjusted.
4991         (find_thread_object): Delete, bits factored out to ...
4992         (thread_to_thread_object): ... this new function.
4993         * python/py-infthread.c (create_thread_object): Use
4994         inferior_to_inferior_object.
4995         (thpy_is_stopped): Use thread pointer directly.
4996         (gdbpy_selected_thread): Use inferior_thread.
4997         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
4998         field, replaced with ...
4999         <thread>: ... this new field.  All users adjusted.
5000         (btpy_insn_or_gap_new): Drop const.
5001         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
5002         callers adjusted.
5003         * python/py-record.c: Include "gdbthread.h".
5004         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5005         a ptid_t.  All callers adjusted.
5006         (gdbpy_current_recording): Use inferior_thread.
5007         * python/py-record.h (recpy_record_object) <ptid>: Delete
5008         field, replaced with ...
5009         <thread>: ... this new field.  All users adjusted.
5010         (recpy_element_object) <ptid>: Delete
5011         field, replaced with ...
5012         <thread>: ... this new field.  All users adjusted.
5013         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5014         a ptid_t.  All callers adjusted.
5015         * python/py-threadevent.c: Include "gdbthread.h".
5016         (get_event_thread): Use thread_to_thread_object.
5017         * python/python-internal.h (struct inferior_object): Forward
5018         declare.
5019         (find_thread_object, find_inferior_object): Delete declarations.
5020         (thread_to_thread_object, inferior_to_inferior_object): New
5021         declarations.
5022         * record-btrace.c: Include "inferior.h".
5023         (require_btrace_thread): Use inferior_thread.
5024         (record_btrace_frame_sniffer)
5025         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5026         (get_thread_current_frame): Use scoped_restore_current_thread and
5027         switch_to_thread.
5028         (get_thread_current_frame): Use thread pointer directly.
5029         (record_btrace_replay_at_breakpoint): Use thread's inferior
5030         pointer directly.
5031         * record-full.c: Include "inferior.h".
5032         * regcache.c: Include "gdbthread.h".
5033         (get_thread_arch_regcache): Use the inferior's address space
5034         directly.
5035         (get_thread_regcache, registers_changed_thread): New.
5036         * regcache.h (get_thread_regcache(thread_info *thread)): New
5037         overload.
5038         (registers_changed_thread): New.
5039         (remote_target) <remote_detach_1>: Swap order of parameters.
5040         (remote_add_thread): <remote_add_thread>: Return the new thread.
5041         (get_remote_thread_info(ptid_t)): New overload.
5042         (remote_target::remote_notice_new_inferior): Use thread pointers
5043         directly.
5044         (remote_target::process_initial_stop_replies): Use
5045         thread_info::set_running.
5046         (remote_target::remote_detach_1, remote_target::detach)
5047         (extended_remote_target::detach): Adjust.
5048         * stack.c (frame_show_address): Use inferior_thread.
5049         * target-debug.h (target_debug_print_thread_info_pp): New.
5050         * target-delegates.c: Regenerate.
5051         * target.c (default_thread_address_space): Delete.
5052         (memory_xfer_partial_1): Use current_inferior.
5053         (target_detach): Use current_inferior.
5054         (target_thread_address_space): Delete.
5055         (generic_mourn_inferior): Use current_inferior.
5056         * target.h (struct target_ops) <thread_address_space>: Delete.
5057         (target_thread_address_space): Delete.
5058         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
5059         pointers directly.
5060         (delete_thread_1, delete_thread, delete_thread_silent): Take a
5061         thread pointer instead of a ptid_t.  Adjust all callers.
5062         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5063         (first_thread_of_process): Delete, replaced by ...
5064         (first_thread_of_inferior): ... this new function.  All callers
5065         adjusted.
5066         (any_thread_of_process): Rename to ...
5067         (any_thread_of_inferior): ... this, and take an inferior pointer.
5068         (any_live_thread_of_process): Rename to ...
5069         (any_live_thread_of_inferior): ... this, and take an inferior
5070         pointer.
5071         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5072         (value_in_thread_stack_temporaries)
5073         (get_last_thread_stack_temporary): Take a thread pointer instead
5074         of a ptid_t.  Adjust all callers.
5075         (thread_info::set_running): New.
5076         (validate_registers_access): Use inferior_thread.
5077         (can_access_registers_ptid): Rename to ...
5078         (can_access_registers_thread): ... this, and take a thread
5079         pointer.
5080         (print_thread_info_1): Adjust to compare thread pointers instead
5081         of ptids.
5082         (switch_to_no_thread, switch_to_thread): Make extern.
5083         (scoped_restore_current_thread::~scoped_restore_current_thread):
5084         Use m_thread pointer directly.
5085         (scoped_restore_current_thread::scoped_restore_current_thread):
5086         Use inferior_thread.
5087         (thread_command): Use thread pointer directly.
5088         (thread_num_make_value_helper): Use inferior_thread.
5089         * top.c (execute_command): Use inferior_thread.
5090         * tui/tui-interp.c: Include "inferior.h".
5091         * varobj.c (varobj_create): Use inferior_thread.
5092         (value_of_root_1): Use find_thread_global_id instead of
5093         global_thread_id_to_ptid.
5094
5095 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
5096
5097         * regcache.c (readable_regcache::read_part): Avoid memcpy when
5098         possible.
5099         (regcache::write_part): Likewise.
5100         (readable_regcache::cooked_read_part): Update comment.
5101         (readable_regcache::cooked_write_part): Likewise.
5102         * regcache.h: (readable_regcache::read_part): Likewise.
5103         (regcache::write_part): Likewise.
5104
5105 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
5106             Dirk Schubert  <dirk.schubert@arm.com>
5107
5108         * aarch64-linux-nat.c (post_attach): New.
5109         (aarch64_linux_nat_target::post_attach): Override post_attach to
5110         record the number of hardware debug registers.
5111
5112 2018-06-20  Tom Tromey  <tom@tromey.com>
5113
5114         * python/py-param.c (add_setshow_generic): Make parameters const.
5115         (parmpy_init): Update.
5116
5117 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5118
5119         * regcache.h (regcache_cooked_read_ftype): Rename to...
5120         (register_read_ftype): ...this, change type to function_view.
5121         (class reg_buffer) <save>: Remove src parameter.
5122         (readonly_detached_regcache) <readonly_detached_regcache>: Make
5123         parameter non-const in first overload.  Remove src parameter in
5124         second overload.
5125         * regcache.c (do_cooked_read): Remove.
5126         (readonly_detached_regcache::readonly_detached_regcache): Make
5127         parameter non-const, adjust call to other constructor.
5128         (reg_buffer::save): Remove src parameter.
5129         * frame.c (do_frame_register_read): Remove.
5130         (frame_save_as_regcache): Use lambda function.
5131         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5132         parameter to ppu2spu_data *.
5133         (ppu2spu_sniffer): Use lambda function.
5134
5135 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5136
5137         * record-full.c (record_full_target::insert_breakpoint): Remove
5138         "struct" keyword, add const.
5139
5140 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
5141
5142         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5143         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5144         * configure.ac: Remove AC_PREREQ, add missing quoting.
5145         * gnulib/configure.ac: Modernize usage of
5146         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
5147         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5148         (AUTOMAKE_VERSION): Bump to 1.15.1.
5149         * configure: Re-generate.
5150         * config.in: Re-generate.
5151         * aclocal.m4: Re-generate.
5152         * gnulib/aclocal.m4: Re-generate.
5153         * gnulib/config.in: Re-generate.
5154         * gnulib/configure: Re-generate.
5155         * gnulib/import/Makefile.in: Re-generate.
5156
5157 2018-06-19  Pedro Alves  <palves@redhat.com>
5158
5159         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5160         (lookup_minimal_symbol_by_pc_section): ... here with
5161         gdb_assert_not_reached added.
5162
5163 2018-06-19  Pedro Alves  <palves@redhat.com>
5164
5165         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5166         parameter with a block parameter.  Compare location's block symbol
5167         with the frame's block instead of addresses.
5168         (skip_inline_frames): Pass the current block instead of the
5169         frame's address.  Break out as soon as we determine the frame
5170         should not be skipped.
5171
5172 2018-06-18  Tom Tromey  <tom@tromey.com>
5173
5174         * solib-aix.c (solib_aix_get_section_offsets): Return
5175         unique_xmalloc_ptr.
5176         (solib_aix_solib_create_inferior_hook): Update.
5177
5178 2018-06-18  Tom Tromey  <tom@tromey.com>
5179
5180         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5181
5182 2018-06-18  Tom Tromey  <tom@tromey.com>
5183
5184         * solib-frv.c (frv_relocate_main_executable): Use
5185         unique_xmalloc_ptr.
5186         * solib-dsbt.c (dsbt_relocate_main_executable): Use
5187         unique_xmalloc_ptr.
5188
5189 2018-06-18  Tom Tromey  <tom@tromey.com>
5190
5191         * objfiles.h (inhibit_section_map_updates): Update.
5192         (resume_section_map_updates, resume_section_map_updates_cleanup):
5193         Remove.
5194         * solib-svr4.c (svr4_handle_solib_event): Update.
5195         * objfiles.c (inhibit_section_map_updates): Return
5196         scoped_restore_tmpl<int>.
5197         (resume_section_map_updates, resume_section_map_updates_cleanup):
5198         Remove.
5199
5200 2018-06-18  Tom Tromey  <tom@tromey.com>
5201
5202         * valprint.h (read_string): Update.
5203         * valprint.c (read_string): Change type of "buffer".
5204         (val_print_string): Update.
5205         * python/py-value.c (valpy_string): Update.
5206         * language.h (struct language_defn) <la_get_string>: Change
5207         type of "buffer".
5208         (default_get_string, c_get_string): Update.
5209         * language.c (default_get_string): Change type of "buffer".
5210         * guile/scm-value.c (gdbscm_value_to_string): Update.
5211         * c-lang.c (c_get_string): Change type of "buffer".
5212
5213 2018-06-18  Tom Tromey  <tom@tromey.com>
5214
5215         * ser-mingw.c (struct pipe_state_destroyer): New.
5216         (pipe_state_up): New typedef.
5217         (cleanup_pipe_state): Remove.
5218         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
5219
5220 2018-06-18  Tom Tromey  <tom@tromey.com>
5221
5222         * rust-lang.h (rust_yyerror): Don't declare.
5223         * rust-lang.c (rust_language_defn): Update.
5224         * rust-exp.y (yyerror): Now static.
5225         * parse.c (parse_exp_in_context_1): Update.
5226         * p-lang.h (p_yyerror): Don't declare.
5227         * p-lang.c (p_language_defn): Update.
5228         * p-exp.y (yyerror): Now static.
5229         * opencl-lang.c (opencl_language_defn): Update.
5230         * objc-lang.c (objc_language_defn): Update.
5231         * m2-lang.h (m2_yyerror): Don't declare.
5232         * m2-lang.c (m2_language_defn): Update.
5233         * m2-exp.y (yyerror): Now static.
5234         * language.h (struct language_defn) <la_error>: Remove.
5235         * language.c (unk_lang_error): Remove.
5236         (unknown_language_defn, auto_language_defn): Remove.
5237         * go-lang.h (go_yyerror): Don't declare.
5238         * go-lang.c (go_language_defn): Update.
5239         * go-exp.y (yyerror): Now static.
5240         * f-lang.h (f_yyerror): Don't declare.
5241         * f-lang.c (f_language_defn): Update.
5242         * f-exp.y (yyerror): Now static.
5243         * d-lang.h (d_yyerror): Don't declare.
5244         * d-lang.c (d_language_defn): Update.
5245         * d-exp.y (yyerror): Now static.
5246         * c-lang.h (c_yyerror): Don't declare.
5247         * c-lang.c (c_language_defn, cplus_language_defn)
5248         (asm_language_defn, minimal_language_defn): Update.
5249         * c-exp.y (yyerror): Now static.
5250         * ada-lang.h (ada_yyerror): Don't declare.
5251         * ada-lang.c (ada_language_defn): Update.
5252         * ada-exp.y (yyerror): Now static.
5253
5254 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5255
5256         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5257         (store_sveregs_to_thread): Likewise.
5258         (aarch64_linux_fetch_inferior_registers): Check for SVE.
5259         (aarch64_linux_store_inferior_registers): Likewise.
5260         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5261         function.
5262         (aarch64_sve_regs_copy_to_regcache): Likewise.
5263         (aarch64_sve_regs_copy_from_regcache): Likewise.
5264         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5265         declaration.
5266         (aarch64_sve_regs_copy_to_regcache): Likewise.
5267         (aarch64_sve_regs_copy_from_regcache): Likewise.
5268         (sve_context): Structure from Linux headers.
5269         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5270         (SVE_SIG_ZREG_SIZE): Likewise.
5271         (SVE_SIG_PREG_SIZE): Likewise.
5272         (SVE_SIG_FFR_SIZE): Likewise.
5273         (SVE_SIG_REGS_OFFSET): Likewise.
5274         (SVE_SIG_ZREGS_OFFSET): Likewise.
5275         (SVE_SIG_ZREG_OFFSET): Likewise.
5276         (SVE_SIG_ZREGS_SIZE): Likewise.
5277         (SVE_SIG_PREGS_OFFSET): Likewise.
5278         (SVE_SIG_PREG_OFFSET): Likewise.
5279         (SVE_SIG_PREGS_SIZE): Likewise.
5280         (SVE_SIG_FFR_OFFSET): Likewise.
5281         (SVE_SIG_REGS_SIZE): Likewise.
5282         (SVE_SIG_CONTEXT_SIZE): Likewise.
5283         (SVE_PT_REGS_MASK): Likewise.
5284         (SVE_PT_REGS_FPSIMD): Likewise.
5285         (SVE_PT_REGS_SVE): Likewise.
5286         (SVE_PT_VL_INHERIT): Likewise.
5287         (SVE_PT_VL_ONEXEC): Likewise.
5288         (SVE_PT_REGS_OFFSET): Likewise.
5289         (SVE_PT_FPSIMD_OFFSET): Likewise.
5290         (SVE_PT_FPSIMD_SIZE): Likewise.
5291         (SVE_PT_SVE_ZREG_SIZE): Likewise.
5292         (SVE_PT_SVE_PREG_SIZE): Likewise.
5293         (SVE_PT_SVE_FFR_SIZE): Likewise.
5294         (SVE_PT_SVE_FPSR_SIZE): Likewise.
5295         (SVE_PT_SVE_FPCR_SIZE): Likewise.
5296         (__SVE_SIG_TO_PT): Likewise.
5297         (SVE_PT_SVE_OFFSET): Likewise.
5298         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5299         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5300         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5301         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5302         (SVE_PT_SVE_PREG_OFFSET): Likewise.
5303         (SVE_PT_SVE_PREGS_SIZE): Likewise.
5304         (SVE_PT_SVE_FFR_OFFSET): Likewise.
5305         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5306         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5307         (SVE_PT_SVE_SIZE): Likewise.
5308         (SVE_PT_SIZE): Likewise.
5309         (HAS_SVE_STATE): New define.
5310
5311 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5312
5313         * nat/aarch64-sve-linux-sigcontext.h: New file.
5314         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5315         new files.
5316         (SVE_VQ_MIN): Likewise.
5317         (SVE_VQ_MAX): Likewise.
5318         (SVE_VL_MIN): Likewise.
5319         (SVE_VL_MAX): Likewise.
5320         (SVE_NUM_ZREGS): Likewise.
5321         (SVE_NUM_PREGS): Likewise.
5322         (sve_vl_valid): Likewise.
5323         (struct user_sve_header): Likewise.
5324
5325 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
5326             Richard Bunt <Richard.Bunt@arm.com>
5327
5328         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5329         was requested by GDB.
5330
5331 2018-06-15  Tom de Vries  <tdevries@suse.de>
5332
5333         * MAINTAINERS (Write After Approval): Add Tom de Vries.
5334
5335 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
5336
5337         * gnulib/update-gnulib.sh: Print expected versions of
5338         autoconf/aclocal.
5339
5340 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
5341
5342         * arch-utils.c (default_type_align): Use type_length_units.
5343         * gdbtypes.c (type_align): Use type_length_units.
5344
5345 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5346
5347         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5348         of 'define' command.
5349
5350 2018-06-14  Tom de Vries  <tdevries@suse.de>
5351
5352         PR cli/22573
5353         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5354         get_no_prettyformat_print_options.
5355
5356 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5357
5358         * sparc-nat.h: Include target.h.
5359         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5360         <fetch_registers>: Remove this argument in function call.
5361         <store_registers>: Remove this argument in function call, remove
5362         extra semicolon.
5363         <low_forget_process>: Call sparc64_forget_process instead of
5364         sparc_forget_process.
5365
5366 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5367
5368         * procfs.c (_initialize_procfs): Use add_inf_child_target.
5369         (procfs_target::make_corefile_notes): Adjust to new
5370         target_read_alloc return type.
5371
5372 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5373             Stephen Roberts  <stephen.roberts@arm.com>
5374
5375         PR gdb/22882
5376         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5377         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5378         Move should_notify_stop local into more inner scope.
5379
5380 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5381             Stephen Roberts  <stephen.roberts@arm.com>
5382
5383         PR gdb/22882
5384         * infrun.c (resume_1): Add call to mark_async_event_handler.
5385
5386 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5387
5388         * infrun.c (do_target_wait): Change old version of $pc printed.
5389
5390 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5391
5392         * dwarf2read.c (read_index_from_section): Rename to...
5393         (read_gdb_index_from_section): ... this, update all callers.
5394         (dwarf2_read_index): Rename to...
5395         (dwarf2_read_gdb_index): ... this, update all callers.
5396
5397 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
5398
5399         * gdb/hppa-linux-nat.c
5400         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5401         hppa_linux_nat_target::fetch_registers.
5402
5403 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5404
5405         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5406         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5407         (AARCH64_DWARF_SVE_FFR): Likewise.
5408         (AARCH64_DWARF_SVE_P0): Likewise.
5409         (AARCH64_DWARF_SVE_Z0): Likewise.
5410
5411 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5412
5413         * common/common-regcache.h (raw_compare): New function.
5414         * regcache.c (regcache::raw_compare): Likewise.
5415         * regcache.h (regcache::raw_compare): New declaration.
5416
5417 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5418
5419         * common/common-regcache.h (reg_buffer_common): New structure.
5420         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5421         (reg_buffer::raw_supply): Likewise.
5422         (reg_buffer::raw_supply_integer): Likewise.
5423         (reg_buffer::raw_supply_zeroed): Likewise.
5424         (reg_buffer::raw_collect): Likewise.
5425         (reg_buffer::raw_collect_integer): Likewise.
5426         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5427         (reg_buffer::raw_supply): Likewise.
5428         (reg_buffer::raw_supply_integer): Likewise.
5429         (reg_buffer::raw_supply_zeroed): Likewise.
5430         (reg_buffer::raw_collect): Likewise.
5431         (reg_buffer::raw_collect_integer): Likewise.
5432
5433 2018-06-10  Tom Tromey  <tom@tromey.com>
5434
5435         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
5436         (class remote_state) <stop_reply_queue>: Now std::vector.
5437         (remote_state::~remote_state)
5438         (remote_target::stop_reply_queue_length): Update.
5439         (struct queue_iter_param, remove_child_of_pending_fork)
5440         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5441         (check_pending_event_prevents_wildcard_vcont_callback)
5442         (remove_stop_reply_for_inferior)
5443         (remove_stop_reply_of_remote_state)
5444         (remote_notif_remove_once_on_match)
5445         (stop_reply_match_ptid_and_ws)
5446         (remote_kill_child_of_pending_fork): Remove.
5447         (remote_target::remove_new_fork_children)
5448         (remote_target::check_pending_events_prevent_wildcard_vcont)
5449         (remote_target::discard_pending_stop_replies)
5450         (remote_target::discard_pending_stop_replies_in_queue)
5451         (remote_target::remote_notif_remove_queued_reply)
5452         (remote_target::queued_stop_reply)
5453         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5454         (remote_target::wait, remote_target::kill_new_fork_children)
5455         (remote_target::async): Update.
5456
5457 2018-06-10  Tom Tromey  <tom@tromey.com>
5458
5459         * record-full.c (record_full_arch_list_cleanups): Remove.
5460         (record_full_message): Use try/catch.
5461         (record_full_wait_cleanups): Remove.
5462         (record_full_wait_1): Use try/catch.
5463         (record_full_restore): Likewise.
5464
5465 2018-06-10  Tom Tromey  <tom@tromey.com>
5466
5467         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
5468         declare VEC.  Add constructor.
5469         <in_target_beneath>: Now bool.
5470         (record_full_breakpoints): Now a std::vector, static.
5471         (record_full_sync_record_breakpoints)
5472         (record_full_init_record_breakpoints)
5473         (record_full_target::insert_breakpoint)
5474         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
5475
5476 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5477
5478         * dwarf2read.c (process_cu_includes): Remove struct keyword.
5479         * serial.c (serial_interface_lookup): Remove struct keyword.
5480
5481 2018-06-10  Tom Tromey  <tom@tromey.com>
5482
5483         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5484         method.
5485         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5486         a method.
5487         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5488         method.
5489         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5490         "beneath" as a method.
5491         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5492         Use "beneath" as a method.
5493
5494 2018-06-10  Tom Tromey  <tom@tromey.com>
5495
5496         * tracefile.c (struct trace_file_writer_deleter): New.
5497         <operator()>: Rename from trace_file_writer_xfree.
5498         (trace_file_writer_up): New typedef.
5499         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5500
5501 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5502
5503         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5504         <m_registers, m_register_status>: Change type to
5505         std::unique_ptr.
5506         * regcache.c (reg_buffer::reg_buffer): Use new instead of
5507         XCNEWVEC.
5508
5509 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5510
5511         * common/common-regcache.h (enum register_status): Add
5512         underlying type "signed char".
5513         * regcache.h (reg_buffer) <m_register_status>: Change type to
5514         register_status *.
5515         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5516         register_status instead of signed char.
5517         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5518         (reg_buffer::get_register_status): Remove cast.
5519         (readable_regcache::raw_read): Remove cast.
5520         (readable_regcache::cooked_read): Remove cast.
5521
5522 2018-06-09  Tom Tromey  <tom@tromey.com>
5523
5524         * source.c (reverse_search_command, forward_search_command): Use
5525         scoped_fd.
5526
5527 2018-06-09  Tom Tromey  <tom@tromey.com>
5528
5529         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
5530         (serial_ops_list): Now static, std::vector.
5531         (serial_interface_lookup, serial_add_interface): Update.
5532
5533 2018-06-09  Tom Tromey  <tom@tromey.com>
5534
5535         * dwarf2read.c (process_cu_includes): Update.
5536         (process_full_comp_unit): Update.
5537         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5538         std::vector.
5539
5540 2018-06-08  Paul Koning  <paul_koning@dell.com>
5541
5542         PR gdb/23252
5543
5544         * python/python.c (do_start_initialization):
5545         Avoid call to internal Python API.
5546         (init__gdb_module): New function.
5547
5548 2018-06-08  Gary Benson <gbenson@redhat.com>
5549
5550         * linux-thread-db.c (valprint.h): New include.
5551         (struct check_thread_db_info): New structure.
5552         (check_thread_db_on_load, tdb_testinfo): New static globals.
5553         (check_thread_db, check_thread_db_callback): New functions.
5554         (try_thread_db_load_1): Run integrity checks if requested.
5555         (maintenance_check_libthread_db): New function.
5556         (_initialize_thread_db): Register "maint check libthread-db"
5557         and "maint set/show check-libthread-db".
5558         * NEWS: Mention the above new commands.
5559
5560 2018-06-08  Tom Tromey  <tom@tromey.com>
5561
5562         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5563         now a method.
5564
5565 2018-06-08  Tom Tromey  <tom@tromey.com>
5566
5567         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5568
5569 2018-06-08  Tom Tromey  <tom@tromey.com>
5570
5571         * common/btrace-common.h (struct btrace_data): Add constructor,
5572         destructor, move assignment operator.
5573         <empty, clear, fini>: New methods.
5574         <format>: Initialize.
5575         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5576         (btrace_data_empty): Don't declare.
5577         * common/btrace-common.c (btrace_data_init): Remove.
5578         (btrace_data::fini): Rename from btrace_data_fini.
5579         (btrace_data::empty): Rename from btrace_data_empty.
5580         (btrace_data::clear): Rename from btrace_data_clear.  Return
5581         bool.
5582         * btrace.h (make_cleanup_btrace_data): Don't declare.
5583         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5584         (parse_xml_btrace): Update.
5585         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5586         (maint_btrace_clear_packet_history_cmd): Update.
5587
5588 2018-06-07  Pedro Alves  <palves@redhat.com>
5589
5590         * target.h (target_ops) <beneath>: Now a method.  All references
5591         updated.
5592         (class target_stack): New.
5593         * target.c (g_target_stack): New.
5594         (g_current_top_target): Delete.
5595         (current_top_target): Get the top target out of g_target_stack.
5596         (target_stack::push, target_stack::unpush): New.
5597         (push_target, unpush_target): Reimplement.
5598         (target_is_pushed): Reimplement in terms of g_target_stack.
5599         (target_ops::beneath, target_stack::find_beneath): New.
5600
5601 2018-06-07  Pedro Alves  <palves@redhat.com>
5602
5603         * target.h (find_target_beneath): Delete declaration.
5604         * target.c (find_target_beneath): Delete definition.
5605         * aix-thread.c: All callers of find_target_beneath adjusted to
5606         call target_ops::beneath instead.
5607         * bsd-uthread.c: Likewise.
5608         * linux-thread-db.c: Likewise.
5609         * ravenscar-thread.c: Likewise.
5610         * sol-thread.c: Likewise.
5611         * spu-multiarch.c: Likewise.
5612
5613 2018-06-07  Pedro Alves  <palves@redhat.com>
5614
5615         * target.h (target_ops) <beneath>: Now a method.  All references
5616         updated.
5617         (target_ops) <m_beneath>: New.
5618         * target.c (target_ops::beneath): New.
5619         * corelow.c: Adjust all references to target_ops::beneath.
5620         * linux-thread-db.c: Likewise.
5621         * make-target-delegates: Likewise.
5622         * record-btrace.c: Likewise.
5623         * record-full.c: Likewise.
5624         * remote.c: Likewise.
5625         * target.c: Likewise.
5626         * target-delegates.c: Regenerate.
5627
5628 2018-06-07  Pedro Alves  <palves@redhat.com>
5629
5630         * target.h (target_stack): Delete.
5631         (current_top_target): Declare function.
5632         * target.c (target_stack): Delete.
5633         (g_current_top_target): New.
5634         (current_top_target): New function.
5635         * auxv.c: Use current_top_target instead of target_stack
5636         throughout.
5637         * avr-tdep.c: Likewise.
5638         * breakpoint.c: Likewise.
5639         * corefile.c: Likewise.
5640         * elfread.c: Likewise.
5641         * eval.c: Likewise.
5642         * exceptions.c: Likewise.
5643         * frame.c: Likewise.
5644         * gdbarch-selftests.c: Likewise.
5645         * gnu-v3-abi.c: Likewise.
5646         * ia64-tdep.c: Likewise.
5647         * ia64-vms-tdep.c: Likewise.
5648         * infcall.c: Likewise.
5649         * infcmd.c: Likewise.
5650         * infrun.c: Likewise.
5651         * linespec.c: Likewise.
5652         * linux-tdep.c: Likewise.
5653         * minsyms.c: Likewise.
5654         * ppc-linux-nat.c: Likewise.
5655         * ppc-linux-tdep.c: Likewise.
5656         * procfs.c: Likewise.
5657         * regcache.c: Likewise.
5658         * remote.c: Likewise.
5659         * rs6000-tdep.c: Likewise.
5660         * s390-linux-nat.c: Likewise.
5661         * s390-tdep.c: Likewise.
5662         * solib-aix.c: Likewise.
5663         * solib-darwin.c: Likewise.
5664         * solib-dsbt.c: Likewise.
5665         * solib-spu.c: Likewise.
5666         * solib-svr4.c: Likewise.
5667         * solib-target.c: Likewise.
5668         * sparc-tdep.c: Likewise.
5669         * sparc64-tdep.c: Likewise.
5670         * spu-tdep.c: Likewise.
5671         * symfile.c: Likewise.
5672         * symtab.c: Likewise.
5673         * target-descriptions.c: Likewise.
5674         * target-memory.c: Likewise.
5675         * target.c: Likewise.
5676         * target.h: Likewise.
5677         * tracefile-tfile.c: Likewise.
5678         * tracepoint.c: Likewise.
5679         * valops.c: Likewise.
5680         * valprint.c: Likewise.
5681         * value.c: Likewise.
5682         * windows-tdep.c: Likewise.
5683         * mi/mi-main.c: Likewise.
5684
5685 2018-06-07  Tom Tromey  <tom@tromey.com>
5686
5687         * valprint.h (build_address_symbolic): Declare.
5688         * printcmd.c (print_address_symbolic): Update.
5689         (build_address_symbolic): Change "name" and "filename" to
5690         std::string.
5691         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5692         Update.
5693         * defs.h (build_address_symbolic): Remove declaration.
5694
5695 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
5696
5697         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5698         (aarch64_vnv_type): Add function.
5699         (aarch64_pseudo_register_name): Add V regs for SVE.
5700         (aarch64_pseudo_register_type): Likewise.
5701         (aarch64_pseudo_register_reggroup_p): Likewise.
5702         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5703         (aarch64_pseudo_read_value): Add V regs for SVE.
5704         (aarch64_pseudo_write_2): Use V0 offset for SVE
5705         (aarch64_pseudo_write): Add V regs for SVE.
5706         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5707
5708 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5709
5710         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5711         (sve_vl_from_vq): Likewise.
5712
5713 2018-06-05  Tom Tromey  <tom@tromey.com>
5714
5715         * cli/cli-cmds.c (show_version): Update.
5716         * top.c (print_gdb_version): Add "interactive" parameter.
5717         Update.
5718         * main.c (captured_main_1): Update.
5719         * top.h (print_gdb_version): Add "interactive" parameter and a
5720         comment.
5721
5722 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
5723
5724         * common/enum-flags.h: Add trailing semicolon to example in
5725         comment.
5726
5727 2018-06-05  Tom Tromey  <tom@tromey.com>
5728
5729         PR cli/12326:
5730         * NEWS: Add entry about pager.
5731         * utils.c (pagination_disabled_for_command): New global.
5732         (prompt_for_continue): Allow "c" response to prompt.
5733         (reinitialize_more_filter): Clear
5734         pagination_disabled_for_command.
5735         (fputs_maybe_filtered): Check pagination_disabled_for_command.
5736
5737 2018-06-04  Tom Tromey  <tom@tromey.com>
5738
5739         * ada-lang.h (ada_lookup_symbol_list): Update.
5740         * ada-lang.c (resolve_subexp): Update.
5741         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
5742         parameter.
5743         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5744         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5745         results parameter to std::vector.
5746         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5747         Update.
5748         * ada-exp.y (block_lookup): Update.
5749         (select_possible_type_sym): Change type of syms.  Remove nsyms
5750         parameter.
5751         (write_var_or_type, write_name_assoc): Update.
5752
5753 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
5754
5755         * windows-nat.c (windows_nat_target::xfer_partial): Return
5756         TARGET_XFER_E_IO if we need to delegate to the target beneath
5757         but BENEATH is NULL.
5758
5759 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
5760
5761         * Makefile.in (config.status): Add configure.nat as a
5762         dependency.
5763
5764 2018-06-04  Tom Tromey  <tom@tromey.com>
5765
5766         * cp-name-parser.y (cpname_state): Add method declarations.
5767         (HANDLE_QUAL): Update.
5768         (cpname_state::d_grab, cpname_state::fill_comp)
5769         (cpname_state::make_operator, cpname_state::make_dtor)
5770         (cpname_state::make_builtin_type, cpname_state::make_name)
5771         (cpname_state::d_qualify, cpname_state::d_int_type)
5772         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5773         (%union): Move earlier.
5774
5775 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5776
5777         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5778
5779 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5780
5781         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5782         (aarch64_pseudo_write_1): Likewise.
5783         (aarch64_pseudo_read_value): Use helper.
5784         (aarch64_pseudo_write): Likewise.
5785
5786 2018-06-04  Pedro Alves  <palves@redhat.com>
5787
5788         * darwin-nat.c (darwin_ops): Delete.
5789         (darwin_attach_pid): Use get_native_target.
5790
5791 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5792
5793         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5794         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5795
5796 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5797
5798         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5799         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5800         (aarch64_gdbarch_init): Check for SVE.
5801         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5802
5803 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5804
5805         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5806         * aarch64-tdep.h (aarch64_read_description): Likewise.
5807         * arch/aarch64.c (aarch64_create_target_description): Likewise.
5808         * arch/aarch64.h (aarch64_create_target_description): Likewise.
5809         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5810         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5811         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5812
5813 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
5814
5815         * value.c (value_fetch_lazy_bitfield): New.
5816         (value_fetch_lazy_memory): New.
5817         (value_fetch_lazy_register): New.
5818         (value_fetch_lazy): Factor out to smaller functions.
5819
5820 2018-06-01  Tom Tromey  <tom@tromey.com>
5821
5822         * cp-name-parser.y (backslashable, represented): Now const.
5823
5824 2018-06-01  Tom Tromey  <tom@tromey.com>
5825
5826         * cp-name-parser.y: Include parser-defs.h.
5827         (parser_fprintf): Remove declaration.
5828
5829 2018-06-01  Tom Tromey  <tom@tromey.com>
5830
5831         * cp-name-parser.y: Use %pure-parser, %lex-param, and
5832         %parse-param.
5833         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5834         (global_result): Remove globals.
5835         (struct cpname_state): New.
5836         (yyparse): Don't declare.
5837         (yylex, yyerror): Move declarations after %union.
5838         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
5839         (make_name): Add state parameter.
5840         Update all callers.
5841         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
5842         parameter.
5843         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
5844         Update.
5845         (yylex): Add lvalp, state parameters.
5846         (yyerror): Add state parameter.
5847         (cp_demangled_name_to_comp): Update.
5848
5849 2018-06-01  Tom Tromey  <tom@tromey.com>
5850
5851         * cp-name-parser.y (parser_fprintf): Declare.
5852         (GDB_YY_REMAP_PREFIX): Define.
5853         Include yy-remap.h.  Don't redefine yy* identifiers.
5854
5855 2018-06-01  Tom Tromey  <tom@tromey.com>
5856
5857         * python/py-type.c (typy_legacy_template_argument): Update.
5858         * cp-support.h (cp_demangled_name_to_comp): Update.
5859         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
5860         parameter to be a "std::string *".
5861         (main): Update.
5862
5863 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
5864
5865         * ada-lex.l: Include "diagnostics.h" instead of
5866         "common/diagnostics.h".
5867         * unittests/environ-selftests.c: Likewise.
5868         * common/diagnostics.h: Moved to ../include.
5869
5870 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
5871
5872         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
5873         to language_mode_manual while calling breakpoint_re_set_one.
5874
5875 2018-06-01  Tom Tromey  <tom@tromey.com>
5876
5877         * valops.c (value_cast_structs, destructor_name_p): Update.
5878         * symtab.c (gdb_mangle_name): Update.
5879         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
5880         Update.
5881         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
5882         (pascal_object_print_value_fields, pascal_object_print_value):
5883         Update.
5884         * p-typeprint.c (pascal_type_print_derivation_info): Update.
5885         * linespec.c (find_methods): Update.
5886         * gdbtypes.h (type_name_no_tag): Remove.
5887         (type_name_or_error): Rename from type_name_no_tag_or_error.
5888         * gdbtypes.c (type_name_no_tag): Remove.
5889         (type_name_or_error): Rename from type_name_no_tag_or_error.
5890         (lookup_struct_elt_type, check_typedef): Update.
5891         * expprint.c (print_subexp_standard): Update.
5892         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
5893         * d-namespace.c (d_lookup_nested_symbol): Update.
5894         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
5895         (cp_print_class_member): Update.
5896         * cp-namespace.c (cp_lookup_nested_symbol): Update.
5897         * completer.c (add_struct_fields): Update.
5898         * c-typeprint.c (cp_type_print_derivation_info)
5899         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
5900         Update.
5901         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
5902         (ada_prefer_type, ada_is_exception_sym): Update.
5903
5904 2018-06-01  Tom Tromey  <tom@tromey.com>
5905
5906         * valops.c (enum_constant_from_type, value_namespace_elt)
5907         (value_maybe_namespace_elt): Update.
5908         * valarith.c (find_size_for_pointer_math): Update.
5909         * target-descriptions.c (make_gdb_type): Update.
5910         * symmisc.c (print_symbol): Update.
5911         * stabsread.c (define_symbol, read_type)
5912         (complain_about_struct_wipeout, add_undefined_type)
5913         (cleanup_undefined_types_1): Update.
5914         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
5915         (rust_range_type_p, val_print_struct, rust_print_struct_def)
5916         (rust_internal_print_type, rust_composite_type)
5917         (rust_evaluate_funcall, rust_evaluate_subexp)
5918         (rust_inclusive_range_type_p): Update.
5919         * python/py-type.c (typy_get_tag): Update.
5920         * p-typeprint.c (pascal_type_print_base): Update.
5921         * mdebugread.c (parse_symbol, parse_type): Update.
5922         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
5923         Update.
5924         * guile/scm-type.c (gdbscm_type_tag): Update.
5925         * go-lang.c (sixg_string_p): Update.
5926         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
5927         Update.
5928         * gdbtypes.h (struct main_type) <tag_name>: Remove.
5929         (TYPE_TAG_NAME): Remove.
5930         * gdbtypes.c (type_name_no_tag): Simplify.
5931         (check_typedef, check_types_equal, recursive_dump_type)
5932         (copy_type_recursive, arch_composite_type): Update.
5933         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
5934         in summary mode when needed.
5935         * eval.c (evaluate_funcall): Update.
5936         * dwarf2read.c (fixup_go_packaging, read_structure_type)
5937         (process_structure_scope, read_enumeration_type)
5938         (read_namespace_type, read_module_type, determine_prefix): Update.
5939         * cp-support.c (inspect_type): Update.
5940         * coffread.c (process_coff_symbol, decode_base_type): Update.
5941         * c-varobj.c (c_is_path_expr_parent): Update.
5942         * c-typeprint.c (c_type_print_base_struct_union): Update.
5943         (c_type_print_base_1): Update.  Print struct/class/union/enum in
5944         summary when using C language.
5945         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
5946         (gen_maybe_namespace_elt): Update.
5947         * ada-lang.c (ada_type_name): Simplify.
5948         (empty_record, ada_template_to_fixed_record_type_1)
5949         (template_to_static_fixed_type)
5950         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
5951
5952 2018-06-01  Tom Tromey  <tom@tromey.com>
5953
5954         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
5955         c_print_type.
5956         * c-typeprint.c (c_print_type_1): Add "language" parameter.
5957         (c_print_type): Update.
5958         (c_print_type): New overload.
5959         (c_type_print_varspec_prefix, c_type_print_args)
5960         (c_type_print_varspec_suffix, c_print_type_no_offsets)
5961         (c_type_print_base_struct_union, c_type_print_base_1)
5962         (cp_type_print_method_args): Add "language" parameter.
5963         (c_type_print_base): Update.
5964         * c-lang.h (c_print_type): Add new overload.
5965
5966 2018-06-01  Tom Tromey  <tom@tromey.com>
5967
5968         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
5969         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
5970
5971 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
5972
5973         * aarch64-tdep.c (aarch64_sve_register_names): New const
5974         var.
5975         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
5976         (AARCH64_SVE_Z_REGS_NUM): New define.
5977         (AARCH64_SVE_P_REGS_NUM): Likewise.
5978         (AARCH64_SVE_NUM_REGS): Likewise.
5979
5980 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
5981
5982         * nat/linux-ptrace.h [__alpha__]
5983         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
5984         definitions.
5985
5986 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
5987
5988         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
5989         the endianness selected.
5990         * NEWS: Document `set endian auto' mode operation update.
5991
5992 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
5993
5994         * Makefile.in: Add new header.
5995         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
5996         (sve_vl_from_vg): Likewise.
5997         (sve_vq_from_vl): Likewise.
5998         (sve_vl_from_vq): Likewise.
5999         (sve_vq_from_vg): Likewise.
6000         (sve_vg_from_vq): Likewise.
6001         * configure.nat: Add new c file.
6002         * nat/aarch64-sve-linux-ptrace.c: New file.
6003         * nat/aarch64-sve-linux-ptrace.h: New file.
6004
6005 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6006
6007         * aarch64-linux-nat.c (aarch64_linux_read_description):
6008         Add parmeter zero.
6009         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6010         Likewise.
6011         * aarch64-tdep.c (tdesc_aarch64_list): Add.
6012         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6013         (aarch64_gdbarch_init): Add parmeter zero.
6014         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6015         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6016         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6017         parmeter.
6018         * doc/gdb.texinfo: Describe SVE feature
6019         * features/aarch64-sve.c: New file.
6020
6021 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
6022
6023         PR gdb/23210
6024         * gdbarch.sh (significant_addr_bit): Default to zero when
6025         not set by target architecture.
6026         * gdbarch.c: Re-generated.
6027         * utils.c (address_significant): Update.
6028
6029 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
6030
6031         * stack.c (func_command): Remove trailing newline in call to error.
6032
6033 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6034
6035         * regcache.h (regcache_raw_collect): Remove, update callers to
6036         use regcache::raw_collect.
6037         * regcache.c (regcache_raw_collect): Remove.
6038
6039 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6040
6041         * regcache.h (regcache_raw_supply): Remove, update callers to
6042         use detached_regcache::raw_supply.
6043         * regcache.c (regcache_raw_supply): Remove.
6044
6045 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6046
6047         * regcache.h (regcache_cooked_write_part): Remove, update
6048         callers to use regcache::cooked_write_part.
6049         * regcache.c (regcache_cooked_write_part): Remove.
6050
6051 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6052
6053         * regcache.h (regcache_cooked_read_part): Remove, update callers
6054         to use readable_regcache::cooked_read_part.
6055         * regcache.c (regcache_cooked_read_part): Remove.
6056
6057 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6058
6059         * regcache.h (regcache_cooked_read_value): Remove, update
6060         callers to use readable_regcache::cooked_read_value.
6061         * regcache.c (regcache_cooked_read_value): Remove.
6062
6063 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6064
6065         * regcache.h (regcache_cooked_write): Remove, update callers to
6066         use regcache::cooked_write.
6067         * regcache.c (regcache_cooked_write): Remove.
6068
6069 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6070
6071         * regcache.h (regcache_invalidate): Remove, update callers to
6072         use detached_regcache::invalidate instead.
6073         * regcache.c (regcache_invalidate): Remove.
6074
6075 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6076
6077         * regcache.h (regcache_raw_write_part): Remove, update callers
6078         to use regcache::raw_write_part instead.
6079         * regcache.c (regcache_raw_write_part): Remove.
6080
6081 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6082
6083         * regcache.h (regcache_raw_read_part): Remove, update callers to
6084         use readable_regcache::raw_read_part instead.
6085         * regcache.c (regcache_raw_read_part): Remove.
6086
6087 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6088
6089         * regcache.h (regcache_cooked_read): Remove, update callers to
6090         use readable_regcache::cooked_read instead.
6091         * regcache.c (regcache_cooked_read): Remove.
6092
6093 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6094
6095         * regcache.h (regcache_raw_write): Remove, update callers to use
6096         regcache::raw_write instead.
6097         * regcache.c (regcache_raw_write): Remove.
6098
6099 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6100
6101         * regcache.h (regcache_raw_read): Remove, update callers to use
6102         readable_regcache::raw_read instead.
6103         * regcache.c (regcache_raw_read): Remove.
6104
6105 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6106
6107         * regcache.h (regcache_raw_update): Remove, update callers to
6108         use readable_regcache::raw_update instead.
6109         * regcache.c (regcache_raw_update): Remove.
6110
6111 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6112
6113         * regcache.h (regcache_register_status): Remove, update callers
6114         to use reg_buffer::get_register_status directly instead.
6115         * regcache.c (regcache_register_status): Remove.
6116
6117 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6118
6119         * regcache.h (regcache_get_ptid): Remove, update all callers to
6120         call regcache::ptid instead.
6121         * regcache.c (regcache_get_ptid): Remove.
6122
6123 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6124
6125         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6126
6127 2018-05-30  Pedro Alves  <palves@redhat.com>
6128
6129         * common/common-exceptions.h (exception_rethrow): Use
6130         ATTRIBUTE_NORETURN.
6131
6132 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
6133
6134         * breakpoint.c (print_solib_event, check_status_catch_solib):
6135         Remove struct keyword in range-based for loops.
6136         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6137         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6138         Likewise.
6139         * linespec.c (find_superclass_methods, search_minsyms_for_name):
6140         Likewise.
6141         * symfile.c (addr_info_make_relative): Likewise.
6142         * thread.c (value_in_thread_stack_temporaries): Likewise.
6143
6144 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
6145
6146         PR gdb/16841
6147         * valops.c (value_struct_elt_for_reference): Call check_typedef on
6148         aggregate type to get its real type before accessing it.
6149
6150 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
6151
6152         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6153         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6154         * coff-pe-read.c (add_pe_forwarded_sym): Replace
6155         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6156         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6157         * jit.c (jit_breakpoint_re_set_internal): Likewise.
6158         * printcmd.c (info_address_command): Likewise.
6159
6160 2018-05-29  Tom Tromey  <tom@tromey.com>
6161
6162         * windows-nat.c (handle_exception): Update fall-through comment.
6163
6164 2018-05-29  Tom Tromey  <tom@tromey.com>
6165
6166         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
6167         (struct program_space) <added_solibs>: Now a std::vector.
6168         * breakpoint.c (print_solib_event): Update.
6169         (check_status_catch_solib): Update.
6170         * progspace.c (clear_program_space_solib_cache): Update.
6171         * solib.c (update_solib_list): Update.
6172
6173 2018-05-29  Tom Tromey  <tom@tromey.com>
6174
6175         * python/py-type.c (typy_richcompare): Update.
6176         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6177         * gdbtypes.h (types_deeply_equal): Return bool.
6178         (types_equal): Likewise.
6179         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
6180         declare VEC.
6181         (check_types_equal): Change worklist to std::vector.  Return
6182         bool.
6183         (struct type_equality_entry): Add constructor.
6184         (compare_maybe_null_strings): Return bool.
6185         (check_types_worklist): Return bool.  Change worklist to
6186         std::vector.
6187         (types_deeply_equal): Use std::vector.
6188         (types_equal): Return bool.
6189         (compare_maybe_null_strings): Simplify.
6190
6191 2018-05-29  Tom Tromey  <tom@tromey.com>
6192
6193         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
6194
6195 2018-05-29  Tom Tromey  <tom@tromey.com>
6196
6197         * objc-lang.h: Don't include cp-support.h.
6198         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
6199         declare VEC.
6200
6201 2018-05-27  Tom Tromey  <tom@tromey.com>
6202
6203         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6204
6205 2018-05-25  Tom Tromey  <tom@tromey.com>
6206
6207         * value.c (value::location): Initialize.
6208
6209 2018-05-25  Tom Tromey  <tom@tromey.com>
6210
6211         * dbxread.c (init_bincl_list): Remove.
6212         (bincl_list): Now a std::vector.
6213         (bincls_allocated, next_bincl): Remove.
6214         (free_bincl_list, do_free_bincl_list_cleanup)
6215         (make_cleanup_free_bincl_list): Remove.
6216         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6217         unique_xmalloc_ptr.
6218         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6219         (struct header_file_location): Add constructor.
6220         (add_bincl_to_list): Remove.
6221
6222 2018-05-25  Tom Tromey  <tom@tromey.com>
6223
6224         * tui/tui.c (tui_enable): Update.
6225         * mi/mi-interp.c (mi_interp::init): Update.
6226         * interps.h (class interp) <name>: New method.
6227         <m_name>: Rename from name.
6228         (~scoped_restore_interp): Update.
6229         * interps.c (interp::interp): Update.
6230         (interp_add, interp_set, interp_lookup_existing)
6231         (current_interp_named_p): Update.
6232
6233 2018-05-25  Tom Tromey  <tom@tromey.com>
6234
6235         * interps.c (interp_name): Remove.
6236         * mi/mi-interp.c (mi_interp::init): Update.
6237         * interps.h (interp_name): Remove.
6238         (~scoped_restore_interp): Update.
6239         * tui/tui.c (tui_enable): Update.
6240
6241 2018-05-25  Tom Tromey  <tom@tromey.com>
6242
6243         * utils.c (fputs_maybe_filtered): Update.
6244         * linespec.c (decode_line_full): Update.
6245         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6246         (mi_print_breakpoint_for_event, mi_solib_loaded)
6247         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6248         (mi_user_selected_context_changed): Update.
6249         * mi/mi-main.c (mi_execute_command): Update.
6250         * cli/cli-script.c (execute_control_command): Update.
6251         * python/python.c (execute_gdb_command): Update.
6252         * solib.c (info_sharedlibrary_command): Update.
6253         * interps.c (interp_ui_out): Remove.
6254         * interps.h (interp_ui_out): Remove.
6255
6256 2018-05-25  Tom Tromey  <tom@tromey.com>
6257
6258         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6259         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6260         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6261
6262 2018-05-25  Tom Tromey  <tom@tromey.com>
6263
6264         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6265         * interps.c (interp_exec): Use scoped_restore.
6266
6267 2018-05-25  Tom Tromey  <tom@tromey.com>
6268
6269         * remote.c (remote_target::remote_file_get): Use
6270         gdb::byte_vector.
6271         (remote_target::remote_file_put): Likewise.
6272
6273 2018-05-25  Tom Tromey  <tom@tromey.com>
6274
6275         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6276         a std::string.
6277         (get_pe_section_index, add_pe_exported_sym): Update.
6278         (read_pe_exported_syms): Use gdb::def_vector.
6279
6280 2018-05-25  Tom Tromey  <tom@tromey.com>
6281
6282         * frame.c (remove_prev_frame): Remove.
6283         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6284
6285 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
6286
6287         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6288         Remove prototypes.
6289         * mips-linux-nat.c (supply_fpregset): Always call
6290         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6291         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6292         `mips_fill_fpregset'.
6293         * mips-linux-tdep.c (mips_supply_fpregset)
6294         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6295         (mips_fill_fpregset_wrapper): Remove functions.
6296         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6297         (mips_linux_fpregset): Remove variable.
6298         (mips_linux_iterate_over_regset_sections): Use
6299         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6300         (mips_linux_o32_sigframe_init): Remove comment.
6301
6302 2018-05-25  Pedro Alves  <palves@redhat.com>
6303
6304         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6305         (struct readahead_cache, struct packet_reg, struct
6306         remote_arch_state, class remote_state): Move higher up in the
6307         file.
6308         (remote_target::m_remote_state): Now an object instead of a pointer.
6309         (remote_target::get_remote_state): Adjust.
6310
6311 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6312
6313         * stack.c (select_and_print_frame): Delete.
6314         (struct function_bounds): Move struct within function.
6315         (func_command): Most content moved into new function
6316         find_frame_for_function, use new function, print result, add
6317         function comment.
6318         (find_frame_for_function): New function, now returns a result.
6319
6320 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6321
6322         * stack.c (iterate_over_block_arg_vars): Fix comment.
6323         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6324
6325 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6326
6327         PR gdb/23203
6328         * frame.c
6329         (scoped_restore_selected_frame::scoped_restore_selected_frame):
6330         Define.
6331         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6332         Define.
6333         * frame.h (class scoped_restore_selected_frame): New class.
6334         * stack.c (print_frame_local_vars): Remove catching and rethrowing
6335         of any exception, use scoped_restore_selected_frame to restore the
6336         frame instead.
6337
6338 2018-05-24  Pedro Alves  <palves@redhat.com>
6339
6340         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6341         override.
6342
6343 2018-05-23  Tom Tromey  <tom@tromey.com>
6344
6345         * complaints.c (struct complaints): Remove.
6346         (symfile_complaint_book): Remove.
6347         (series): New global.
6348         (complaint_internal): Update.
6349         (clear_complaints): Update.
6350
6351 2018-05-23  Tom Tromey  <tom@tromey.com>
6352
6353         * complaints.c (counters): New global.
6354         (struct complain): Remove.
6355         (struct complaints) <root>: Remove.
6356         (complaint_sentinel): Remove.
6357         (symfile_complaint_book): Update.
6358         (find_complaint) Remove.
6359         (complaint_internal, clear_complaints): Update.
6360
6361 2018-05-23  Tom Tromey  <tom@tromey.com>
6362
6363         * complaints.c (struct complain) <file, line>: Remove.
6364         (find_complaint): Remove file, line parameters.
6365         (complaint_internal): Update.
6366
6367 2018-05-23  Tom Tromey  <tom@tromey.com>
6368
6369         * complaints.c (vcomplaint): Remove.
6370         (complaint_internal) Merge in contents of vcomplaint.
6371
6372 2018-05-23  Tom Tromey  <tom@tromey.com>
6373
6374         * complaints.c (struct complaints) <explanation>: Remove.
6375         (symfile_explanations): Remove.
6376         (symfile_complaint_book): Update.
6377         (vcomplaint): Update.
6378         (struct explanation): Remove.
6379
6380 2018-05-23  Tom Tromey  <tom@tromey.com>
6381
6382         * complaints.c (symfile_complaints): Remove.
6383         (complaint_internal): Remove "complaints" parameter.
6384         (clear_complaints, vcomplaint): Remove "c" parameter.
6385         (get_complaints): Remove.
6386         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6387         (dwarf2_debug_line_missing_file_complaint)
6388         (dwarf2_debug_line_missing_end_sequence_complaint)
6389         (dwarf2_complex_location_expr_complaint)
6390         (dwarf2_const_value_length_mismatch_complaint)
6391         (dwarf2_section_buffer_overflow_complaint)
6392         (dwarf2_macro_malformed_definition_complaint)
6393         (dwarf2_invalid_attrib_class_complaint)
6394         (create_addrmap_from_index, dw2_symtab_iter_next)
6395         (dw2_expand_marked_cus)
6396         (dw2_debug_names_iterator::find_vec_in_debug_names)
6397         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6398         (create_debug_type_hash_table, init_cutu_and_read_dies)
6399         (partial_die_parent_scope, add_partial_enumeration)
6400         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6401         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6402         (read_import_statement, read_file_scope, create_dwo_cu_reader)
6403         (create_cus_hash_table, create_dwp_hash_table)
6404         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6405         (dwarf2_rnglists_process, dwarf2_ranges_process)
6406         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6407         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6408         (handle_struct_member_die, process_structure_scope)
6409         (read_array_type, read_common_block, read_module_type)
6410         (read_tag_pointer_type, read_typedef, read_base_type)
6411         (read_subrange_type, load_partial_dies, partial_die_info::read)
6412         (partial_die_info::read, partial_die_info::read)
6413         (partial_die_info::read, read_checked_initial_length_and_offset)
6414         (dwarf2_string_attr, read_formatted_entries)
6415         (dwarf_decode_line_header)
6416         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6417         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6418         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6419         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6420         (get_signatured_type, get_DW_AT_signature_type)
6421         (decode_locdesc, file_file_name, consume_improper_spaces)
6422         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6423         (dwarf_decode_macro_bytes, dwarf_decode_macros)
6424         (dwarf2_symbol_mark_computed, set_die_type)
6425         (read_attribute_value): Update.
6426         * stap-probe.c (handle_stap_probe, get_stap_base_address):
6427         Update.
6428         * dbxread.c (unknown_symtype_complaint)
6429         (lbrac_mismatch_complaint, repeated_header_complaint)
6430         (set_namestring, function_outside_compilation_unit_complaint)
6431         (read_dbx_symtab, process_one_symbol): Update.
6432         * gdbtypes.c (stub_noname_complaint): Update.
6433         * windows-nat.c (handle_unload_dll): Update.
6434         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6435         (decode_base_type): Update.
6436         * xcoffread.c (bf_notfound_complaint, ef_complaint)
6437         (eb_complaint, record_include_begin, record_include_end)
6438         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6439         (process_xcoff_symbol, read_symbol)
6440         (function_outside_compilation_unit_complaint)
6441         (scan_xcoff_symtab): Update.
6442         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6443         * buildsym.c (finish_block_internal, make_blockvector)
6444         (end_symtab_get_static_block, augment_type_symtab): Update.
6445         * dtrace-probe.c (dtrace_process_dof)
6446         (dtrace_static_probe_ops::get_probes): Update.
6447         * complaints.h (struct complaint): Don't declare.
6448         (symfile_complaints): Remove.
6449         (complaint_internal): Remove "complaints" parameter.
6450         (complaint): Likewise.
6451         (clear_complaints): Likewise.
6452         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6453         (reread_symbols): Update.
6454         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6455         (dwarf2_frame_cache, decode_frame_entry): Update.
6456         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6457         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6458         (info_selectors_command): Update.
6459         * macrotab.c (macro_include, check_for_redefinition)
6460         (macro_undef): Update.
6461         * objfiles.c (filter_overlapping_sections): Update.
6462         * stabsread.c (invalid_cpp_abbrev_complaint)
6463         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6464         (define_symbol, error_type, read_type, rs6000_builtin_type)
6465         (stabs_method_name_from_physname, read_member_functions)
6466         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6467         (attach_fields_to_type, complain_about_struct_wipeout)
6468         (read_range_type, read_args, common_block_start)
6469         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6470         Update.
6471         * mdebugread.c (index_complaint, unknown_ext_complaint)
6472         (basic_type_complaint, bad_tag_guess_complaint)
6473         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6474         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6475         (parse_procedure, parse_lines)
6476         (function_outside_compilation_unit_complaint)
6477         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6478         (bad_tag_guess_complaint, reg_value_complaint): Update.
6479         * cp-support.c (demangled_name_complaint): Update.
6480         * macroscope.c (sal_macro_scope): Update.
6481         * dwarf-index-write.c (class debug_names): Update.
6482
6483 2018-05-23  Tom Tromey  <tom@tromey.com>
6484
6485         * complaints.c (clear_complaints): Remove "noisy" parameter.
6486         * complaints.h (clear_complaints): Update.
6487         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6488         (reread_symbols): Update.
6489
6490 2018-05-23  Tom Tromey  <tom@tromey.com>
6491
6492         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6493         SUBSEQUENT_MESSAGE.
6494         (vcomplaint, clear_complaints): Update.
6495         (symfile_explanations): Remove some messages.
6496
6497 2018-05-23  Tom Tromey  <tom@tromey.com>
6498
6499         * complaints.c (internal_complaint): Remove.
6500         * complaints.h (internal_complaint): Remove.
6501
6502 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6503
6504         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6505
6506 2018-05-22  Pedro Alves  <palves@redhat.com>
6507
6508         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6509         (remote_fileio_badfd, remote_fileio_return_errno)
6510         (remote_fileio_return_success, remote_fileio_func_open)
6511         (remote_fileio_func_open, remote_fileio_func_close)
6512         (remote_fileio_func_read, remote_fileio_func_write)
6513         (remote_fileio_func_lseek, remote_fileio_func_rename)
6514         (remote_fileio_func_unlink, remote_fileio_func_stat)
6515         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6516         (remote_fileio_func_isatty, remote_fileio_func_system): Add
6517         remote_target parameter.
6518         (remote_fio_func_map) <func>: Add remote_target parameter.
6519         (do_remote_fileio_request, remote_fileio_request):
6520         * remote-fileio.h (remote_fileio_request):
6521         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6522         remote_target parameter.
6523         (remote_notif_process, handle_notification): Adjust to pass down
6524         the remote.
6525         (remote_notif_state_allocate): Add remote_target parameter.  Save
6526         it.
6527         * remote-notif.h (struct remote_target): Forward declare.
6528         (struct notif_client) <parse, ack, can_get_pending_events>: Add
6529         remote_target parameter.
6530         (struct remote_notif_state) <remote>: New field.
6531         (remote_notif_ack, remote_notif_parse): Add remote_target
6532         parameter.
6533         (remote_notif_state_allocate, remote_notif_state_allocate): Add
6534         remote_target parameter.
6535         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6536         (threads_listing_context, rmt_thread_action, protocol_feature)
6537         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6538         (packet_result, struct threads_listing_context, remote_state):
6539         Move definitions and declarations higher up.
6540         (remote_target) <~remote_target>: Declare.
6541         (remote_download_command_source, remote_file_put, remote_file_get)
6542         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6543         (remote_hostio_pread_vFile, remote_hostio_send_command)
6544         (remote_hostio_set_filesystem, remote_hostio_open)
6545         (remote_hostio_close, remote_hostio_unlink, remote_state)
6546         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6547         (get_memory_write_packet_size, get_memory_read_packet_size)
6548         (append_pending_thread_resumptions, remote_detach_1)
6549         (append_resumption, remote_resume_with_vcont)
6550         (add_current_inferior_and_thread, wait_ns, wait_as)
6551         (process_stop_reply, remote_notice_new_inferior)
6552         (process_initial_stop_replies, remote_add_thread)
6553         (btrace_sync_conf, remote_btrace_maybe_reopen)
6554         (remove_new_fork_children, kill_new_fork_children)
6555         (discard_pending_stop_replies, stop_reply_queue_length)
6556         (check_pending_events_prevent_wildcard_vcont)
6557         (discard_pending_stop_replies_in_queue, stop_reply)
6558         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6559         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6560         (remote_interrupt_as, remote_interrupt_ns)
6561         (remote_get_noisy_reply, remote_query_attached)
6562         (remote_add_inferior, remote_current_thread, get_current_thread)
6563         (set_thread, set_general_thread, set_continue_thread)
6564         (set_general_process, write_ptid)
6565         (remote_unpack_thread_info_response, remote_get_threadinfo)
6566         (parse_threadlist_response, remote_get_threadlist)
6567         (remote_threadlist_iterator, remote_get_threads_with_ql)
6568         (remote_get_threads_with_qxfer)
6569         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6570         (get_offsets, remote_check_symbols, remote_supported_packet)
6571         (remote_query_supported, remote_packet_size)
6572         (remote_serial_quit_handler, remote_detach_pid)
6573         (remote_vcont_probe, remote_resume_with_hc)
6574         (send_interrupt_sequence, interrupt_query)
6575         (remote_notif_get_pending_events, fetch_register_using_p)
6576         (send_g_packet, process_g_packet, fetch_registers_using_g)
6577         (store_register_using_P, store_registers_using_G)
6578         (set_remote_traceframe, check_binary_download)
6579         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6580         (remote_xfer_live_readonly_partial, remote_read_bytes)
6581         (remote_send_printf, remote_flash_write, readchar)
6582         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6583         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6584         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6585         (extended_remote_disable_randomization, extended_remote_run)
6586         (send_environment_packet, extended_remote_environment_support)
6587         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6588         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6589         (packet_command): Now methods of ...
6590         (remote_target): ... this class.
6591         (m_remote_state) <remote_target>: New field.
6592         (struct remote_state) <stop_reply_queue,
6593         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6594         fields.
6595         (remote_state::remote_state): Allocate stop_reply_queue.
6596         (remote_state): Delete global.
6597         (get_remote_state_raw): Delete.
6598         (remote_target::get_remote_state): Allocate m_remote_state on
6599         demand.
6600         (get_current_remote_target): New.
6601         (remote_ops, extended_remote_ops): Delete.
6602         (wait_forever_enabled_p, remote_async_inferior_event_token):
6603         Delete, moved to struct remote_state.
6604         (remote_target::close): Delete self.  Destruction bits split to
6605         ...
6606         (remote_target::~remote_target): ... this.
6607         (show_memory_packet_size): Adjust to use
6608         get_current_remote_target.
6609         (struct protocol_feature) <func>: Add remote_target parameter.
6610         All callers adjusted.
6611         (curr_quit_handler_target): New.
6612         (remote_serial_quit_handler): Reimplement.
6613         (remote_target::open_1): Adjust to use get_current_remote_target.
6614         Heap-allocate remote_target/extended_remote_target instances.
6615         (vcont_builder::vcont_builder): Add remote_target parameter, and
6616         save it in m_remote.  All callers adjusted.
6617         (vcont_builder::m_remote): New field.
6618         (vcont_builder::restart, vcont_builder::flush)
6619         (vcont_builder::push_action): Use it.
6620         (remote_target::commit_resume): Use it.
6621         (struct queue_iter_param) <remote>: New field.
6622         (remote_target::remove_new_fork_children): Fill in 'remote' field.
6623         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6624         (check_pending_event_prevents_wildcard_vcont_callback)
6625         (remote_target::check_pending_events_prevent_wildcard_vcont)
6626         (remote_target::discard_pending_stop_replies)
6627         (remote_target::discard_pending_stop_replies_in_queue)
6628         (remote_target::remote_notif_remove_queued_reply): Fill in
6629         'remote' field.
6630         (remote_notif_get_pending_events): New.
6631         (remote_target::readchar, remote_target::remote_serial_write):
6632         Save/restore curr_quit_handler_target.
6633         (putpkt): New.
6634         (kill_new_fork_children): Fill in 'remote' field.
6635         (packet_command): Use get_current_remote_target, defer to
6636         remote_target method of same name.
6637         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6638         parameter, and save it in m_remote.  All callers adjusted.
6639         (scoped_remote_fd::release): Use m_remote.
6640         (scoped_remote_fd::m_remote): New field.
6641         (remote_file_put, remote_file_get, remote_file_delete): Use
6642         get_current_remote_target, defer to remote_target method of same
6643         name.
6644         (remote_btrace_reset): Add remote_state paremeter.  Update all
6645         callers.
6646         (remote_async_inferior_event_handler). Pass down 'data'.
6647         (remote_new_objfile): Use get_current_remote_target.
6648         (remote_target::vcont_r_supported): New.
6649         (set_range_stepping): Use get_current_remote_target and
6650         remote_target::vcont_r_supported.
6651         (_initialize_remote): Don't allocate 'remote_state' and
6652         'stop_reply_queue' globals.
6653         * remote.h (struct remote_target): Forward declare.
6654         (getpkt, putpkt, remote_notif_get_pending_events): Add
6655         'remote_target' parameter.
6656
6657 2018-05-22  Pedro Alves  <palves@redhat.com>
6658
6659         * remote.c (vcont_builder): Now a class.  Make all data members
6660         private.
6661         (vcont_builder) <vcont_builder, restart, flush, push_action>:
6662         Declare methods.
6663         (vcont_builder_restart): Rename to ...
6664         (vcont_builder::restart): ... this.
6665         (vcont_builder_flush): Rename to ...
6666         (vcont_builder::flush): ... this.
6667         (vcont_builder_push_action): Rename to ...
6668         (vcont_builder::push_action): ... this.
6669         (remote_target::commit_resume): Adjust.
6670
6671 2018-05-22  Pedro Alves  <palves@redhat.com>
6672
6673         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6674         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6675         (get_fixed_memory_packet_size): New.
6676         (get_memory_packet_size): Use it.
6677         (set_memory_packet_size): Don't override the config size with
6678         DEFAULT_MAX_MEMORY_PACKET_SIZE.
6679         (show_memory_packet_size): Use get_fixed_memory_packet_size.
6680         Don't refer to get_memory_packet_size if not connected to a remote
6681         target.  Show "(default)" if configured size is 0.
6682
6683 2018-05-22  Pedro Alves  <palves@redhat.com>
6684
6685         * remote.c (remote_target::mourn_inferior): Move
6686         discard_pending_stop_replies call here from ...
6687         (_initialize_remote): ... here.
6688
6689 2018-05-22  Pedro Alves  <palves@redhat.com>
6690
6691         * remote.c (compare_section_command): Remove set_general_process
6692         call.
6693
6694 2018-05-22  Pedro Alves  <palves@redhat.com>
6695
6696         * remote.c (struct packet_reg, struct remote_arch_state):
6697         Move higher up in the file.
6698         (remote_state) <m_arch_states>: Store remote_arch_state values
6699         instead of remote_arch_state pointers.
6700         (remote_state::get_remote_arch_state): Adjust.
6701
6702 2018-05-22  Pedro Alves  <palves@redhat.com>
6703
6704         * remote.c: Include <unordered_map>.
6705         (remote_state): Now a class.
6706         (remote_state) <get_remote_arch_state>: Declare method.
6707         <get_remote_arch_state>: New field.
6708         (remote_arch_state) <remote_arch_state>: Declare ctor.
6709         <regs>: Now a unique_ptr.
6710         (remote_gdbarch_data_handle): Delete.
6711         (get_remote_arch_state): Delete.
6712         (remote_state::get_remote_arch_state): New.
6713         (get_remote_state): Adjust to call remote_state's
6714         get_remote_arch_state method.
6715         (init_remote_state): Delete, bits factored out to ...
6716         (remote_arch_state::remote_arch_state): ... this new method.
6717         (get_remote_packet_size, get_memory_packet_size)
6718         (process_g_packet, remote_target::fetch_registers)
6719         (remote_target::prepare_to_store, store_registers_using_G)
6720         (remote_target::store_registers, remote_target::get_trace_status):
6721         Adjust to call remote_state's method.
6722         (_initialize_remote): Remove reference to
6723         remote_gdbarch_data_handle.
6724
6725 2018-05-22  Pedro Alves  <palves@redhat.com>
6726
6727         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6728         pread>: New method declarations.
6729         (remote_target::open_1): Adjust.
6730         (readahead_cache_invalidate): Rename to ...
6731         (readahead_cache::invalidate): ... this, and adjust to be a class
6732         method.
6733         (readahead_cache_invalidate_fd): Rename to ...
6734         (readahead_cache::invalidate_fd): ... this, and adjust to be a
6735         class method.
6736         (remote_hostio_pwrite): Adjust.
6737         (remote_hostio_pread_from_cache): Rename to ...
6738         (readahead_cache::pread): ... this, and adjust to be a class
6739         method.
6740         (remote_hostio_close): Adjust.
6741
6742 2018-05-22  Pedro Alves  <palves@redhat.com>
6743
6744         * remote.c (remote_hostio_close_cleanup): Delete.
6745         (class scoped_remote_fd): New.
6746         (remote_file_put, remote_file_get): Use it.
6747
6748 2018-05-22  Pedro Alves  <palves@redhat.com>
6749
6750         (struct vCont_action_support): Use bool and initialize all fields.
6751         (struct readahead_cache): Initialize all fields.
6752         (remote_state): Use bool and initialize all fields.
6753         (remote_state::remote_state, remote_state::~remote_state): New.
6754         (new_remote_state): Delete.
6755         (_initialize_remote): Use new to allocate remote_state.
6756
6757 2018-05-22  Pedro Alves  <palves@redhat.com>
6758             張俊芝  <zjz@zjz.name>
6759
6760         PR gdb/22973
6761         * c-exp.y: Include "c-support.h".
6762         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6763         of tolower.  Use c_ident_is_alpha to scan names.
6764         * c-lang.c: Include "c-support.h".
6765         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6766         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6767         * c-support.h: New file, with bits factored out from ...
6768         * cp-name-parser.y: ... this file.
6769         Include "c-support.h".
6770         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6771         c-support.h and renamed.
6772         (symbol_end, yylex): Adjust.
6773
6774 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6775
6776         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6777         parameter type to CORE_ADDR.
6778         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6779         parameter type in declaration to CORE_ADDR.
6780         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6781         target_auxv_search to get AT_HWCAP and use the result to get the
6782         target description.
6783         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6784         to CORE_ADDR. Remove the cast of the return value to unsigned
6785         long. Fix error predicate of target_auxv_search.
6786         (ppc_linux_nat_target::read_description): Change the type of the
6787         hwcap variable to CORE_ADDR.
6788
6789 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6790
6791         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6792         if the size of fpscr is larger than 32 bits.
6793
6794 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6795
6796         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6797         (ppc32_linux_vsxregmap): New global.
6798         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6799         regcache_supply_regset, and regcache_collect_regset.
6800         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6801         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6802         (fetch_vsx_register, store_vsx_register): Remove.
6803         (fetch_vsx_registers): Add regno parameter. Get regset using
6804         ppc_linux_vsxregset. Use regset to supply registers.
6805         (store_vsx_registers): Add regno parameter. Get regset using
6806         ppc_linux_vsxregset. Use regset to collect registers.
6807         (fetch_register): Call fetch_vsx_registers instead of
6808         fetch_vsx_register.
6809         (store_register): Call store_vsx_registers instead of
6810         store_vsx_register.
6811         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6812         new regno parameter.
6813         (store_ppc_registers): Call store_vsx_registers with -1 for the
6814         new regno parameter.
6815         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6816         (ppc_collect_vsxregset): Remove.
6817
6818 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6819
6820         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6821         offset fields.
6822         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6823         for vector register offset fields.
6824         (ppc64_fbsd_reg_offsets): Likewise.
6825         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6826         to vector register offset fields.
6827         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6828         to vector register offset fields.
6829         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6830         vector register offset fields.
6831         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6832         initializers for vector register offset fields.
6833         (rs6000_aix64_reg_offsets): Likewise.
6834         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6835         (ppc_supply_vrregset): Remove.
6836         (ppc_collect_vrregset): Remove.
6837         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
6838         (ppc_linux_vrregset) : New function.
6839         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
6840         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
6841         (ppc32_linux_vrregset): Remove.
6842         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
6843         and use result instead of ppc32_linux_vrregset.
6844         (ppc32_linux_reg_offsets): Remove initializers for vector register
6845         offset fields.
6846         (ppc64_linux_reg_offsets): Likewise.
6847         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
6848         * ppc-linux-nat.c: Include regset.h.
6849         (gdb_vrregset_t): Adjust comment to account for little-endian
6850         mode.
6851         (supply_vrregset, fill_vrregset): Remove.
6852         (fetch_altivec_register, store_altivec_register): Remove.
6853         (fetch_altivec_registers): Add regno parameter. Get regset using
6854         ppc_linux_vrregset. Use regset to supply registers.
6855         (store_altivec_registers): Add regno parameter. Get regset using
6856         ppc_linux_vrregset. Use regset to collect registers.
6857         (fetch_register): Call fetch_altivec_registers instead of
6858         fetch_altivec_register.
6859         (store_register): Call store_altivec_registers instead of
6860         store_altivec_register.
6861         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
6862         the new regno parameter.
6863         (store_ppc_registers): Call store_altivec_registers with -1 for
6864         the new regno parameter.
6865
6866 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6867
6868         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
6869         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
6870         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
6871         (gdb_vrregset_t): Change array type size to
6872         PPC_LINUX_SIZEOF_VRREGSET.
6873         (gdb_vsxregset_t): Change array type size to
6874         PPC_LINUX_SIZEOF_VSXREGSET.
6875         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
6876         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
6877         PPC_LINUX_SIZEOF_VSXREGSET.
6878
6879 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6880
6881         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
6882         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
6883         nat/ppc-linux.c.
6884         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
6885         ppc_linux_target_wordsize with tid.
6886         (ppc_linux_nat_target::read_description): Call ppc_linux_target
6887         wordsize with tid.
6888         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
6889         (ppc64_64bit_inferior_p): Add static and inline specifiers.
6890         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
6891         tid parameter. Remove static specifier.
6892         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
6893         (ppc_linux_target_wordsize): New declaration.
6894
6895 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6896
6897         * arch/ppc-linux-common.c: New file.
6898         * arch/ppc-linux-common.h: New file.
6899         * arch/ppc-linux-tdesc.h: New file.
6900         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
6901         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
6902         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
6903         arch/ppc-linux-tdesc.h.
6904         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
6905         arch/ppc-linux-tdesc.h.
6906         (ppc_linux_nat_target::read_description): Remove target
6907         description matching code. Fill a ppc_linux_features struct and
6908         call ppc_linux_match_description with it. Move comment about ISA
6909         2.05 to ppc-linux-common.c.
6910         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
6911         arch/ppc-linux-tdesc.h.
6912         (ppc_linux_core_read_description): Remove target description
6913         matching code. Fill a ppc_linux_features struct and call
6914         ppc_linux_match_description with it.
6915         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
6916         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
6917         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
6918         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
6919         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
6920         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
6921         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
6922         (tdesc_powerpc_e500l): Remove.
6923
6924 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
6925
6926         * ada-lang.c (catch_assert_command): Pass empty string instead
6927         of NULL for excep_string argument.
6928
6929 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6930
6931         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
6932         the width of the requested register exceeds the width of the
6933         `ptrace' data type.
6934
6935 2018-05-21  Tom Tromey  <tom@tromey.com>
6936
6937         * printcmd.c (output_command): Remove.
6938         (output_command_const): Rename to output_command.
6939         * valprint.h (output_command): Rename from output_command_const.
6940         * tracepoint.c (trace_dump_actions): Call output_command.
6941
6942 2018-05-21  Tom Tromey  <tom@tromey.com>
6943
6944         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
6945         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
6946         * ada-lang.h (create_ada_exception_catchpoint): Update.
6947         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
6948         std::string.
6949         (create_excep_cond_exprs, ~ada_catchpoint)
6950         (should_stop_exception, print_one_exception)
6951         (print_mention_exception, print_recreate_exception): Update.
6952         (ada_get_next_arg): Remove.
6953         (catch_ada_exception_command_split): Use std::string.  Change type
6954         of "excep_string", "cond_string".
6955         (catch_ada_exception_command): Update.
6956         (create_ada_exception_catchpoint): Change type of excep_string.
6957         (ada_exception_sal): Remove excep_string parameter.
6958         (~ada_catchpoint): Remove.
6959
6960 2018-05-21  Tom Tromey  <tom@tromey.com>
6961
6962         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
6963         cleanup.
6964
6965 2018-05-21  Tom Tromey  <tom@tromey.com>
6966
6967         * ada-lang.c (ada_exception_message_1, ada_exception_message):
6968         Return unique_xmalloc_ptr.
6969         (print_it_exception): Update.
6970
6971 2018-05-21  Tom Tromey  <tom@tromey.com>
6972
6973         * tracepoint.c (trace_dump_actions): Use std::string.
6974
6975 2018-05-21  Tom Tromey  <tom@tromey.com>
6976
6977         * symfile.c (reread_symbols): Use std::string for original_name.
6978
6979 2018-05-21  Tom Tromey  <tom@tromey.com>
6980
6981         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
6982         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
6983         constructor.
6984
6985 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
6986
6987         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
6988         instance to...
6989         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
6990         * objfiles.c (get_objfile_bfd_data): Allocate
6991         objfile_per_bfd_storage with obstack_new when allocating on
6992         obstack.
6993
6994 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
6995
6996         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
6997         OBSTACK_ZALLOC.
6998         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
6999         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7000         * mdebugread.c (mdebug_build_psymtabs): Likewise.
7001         (add_pending): Likewise.
7002         (parse_symbol): Likewise.
7003         (parse_partial_symbols): Likewise.
7004         (psymtab_to_symtab_1): Likewise.
7005         (new_psymtab): Likewise.
7006         (elfmdebug_build_psymtabs): Likewise.
7007         * minsyms.c (terminate_minimal_symbol_table): Likewise.
7008         * objfiles.c (get_objfile_bfd_data): Likewise.
7009         (objfile_register_static_link): Likewise.
7010         * psymtab.c (allocate_psymtab): Likewise.
7011         * stabsread.c (read_member_functions): Likewise.
7012         * xcoffread.c (xcoff_end_psymtab): Likewise.
7013
7014 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7015
7016         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7017         compiler supports std::is_trivially_constructible.
7018         * common/poison.h: Include obstack.h.
7019         (IsMallocable): Define to is_trivially_constructible if the
7020         compiler supports it, define to true_type otherwise.
7021         (xobnew): New.
7022         (XOBNEW): Redefine.
7023         (xobnewvec): New.
7024         (XOBNEWVEC): Redefine.
7025         * gdb_obstack.h (obstack_zalloc): New.
7026         (OBSTACK_ZALLOC): Redefine.
7027         (obstack_calloc): New.
7028         (OBSTACK_CALLOC): Redefine.
7029         (obstack_new): New.
7030         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7031         (gdbarch_obstack): New declaration in gdbarch.h, definition in
7032         gdbarch.c.
7033         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7034         obstack_calloc/obstack_zalloc.
7035         (gdbarch_obstack_zalloc): Remove.
7036         * target-descriptions.c (tdesc_data_init): Use obstack_new.
7037
7038 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7039
7040         * stack.c (backtrace_command_1): Remove useless variable int i.
7041
7042 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7043
7044         * stack.c (print_frame_info): Fix comment.
7045
7046 2018-05-18  Tom Tromey  <tom@tromey.com>
7047
7048         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7049         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7050         (~dwarf2_per_objfile): Update
7051         (dwarf2_get_dwz_file): Use new.
7052         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7053         unique_ptr.
7054
7055 2018-05-18  Tom Tromey  <tom@tromey.com>
7056
7057         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7058         unique_ptr.
7059         * dwarf2read.c (struct dwp_file): Add constructor and
7060         initializers.
7061         (open_and_init_dwp_file): Return a unique_ptr.
7062         (dwarf2_per_objfile, create_dwp_hash_table)
7063         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7064         (lookup_dwo_unit_in_dwp): Update.
7065         (open_and_init_dwp_file, get_dwp_file): Update.
7066
7067 2018-05-18  Tom Tromey  <tom@tromey.com>
7068
7069         * dwarf2read.c (dwarf2_per_objfile): Update.
7070         (struct mapped_index): Add initializers.
7071         (dwarf2_read_index): Use new.
7072         (dw2_symtab_iter_init): Update.
7073         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7074         unique_ptr.
7075
7076 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7077
7078         * dwarf2read.c (mapped_index) <total_size>: Remove.
7079
7080 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7081
7082         * unittests/format_pieces-selftests.c (test_format_specifier):
7083         Add ARI comments.
7084
7085 2018-05-18  Tom Tromey  <tom@tromey.com>
7086
7087         * c-typeprint.c (maybe_print_hole): New function.
7088         (c_print_type_struct_field_offset): Update.
7089         (c_type_print_base_struct_union): Call maybe_print_hole.
7090
7091 2018-05-17  Keith Seitz  <keiths@redhat.com>
7092
7093         * breakpoint.c (build_bpstat_chain): New function, moved from
7094         bpstat_stop_status.
7095         (bpstat_stop_status): Add optional parameter, `stop_chain'.
7096         If no stop chain is passed, call build_bpstat_chain to build it.
7097         * breakpoint.h (build_bpstat_chain): Declare.
7098         (bpstat_stop_status): Move documentation here from breakpoint.c.
7099         * infrun.c (handle_signal_stop): Before eliding inlined frames,
7100         build the stop chain and pass it to skip_inline_frames.
7101         Pass this stop chain to bpstat_stop_status.
7102         * inline-frame.c: Include breakpoint.h.
7103         (stopped_by_user_bp_inline_frame): New function.
7104         (skip_inline_frames): Add parameter `stop_chain'.
7105         Move documention to inline-frame.h.
7106         If non-NULL, use stopped_by_user_bp_inline_frame to determine
7107         whether the frame should be elided.
7108         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7109         Add moved documentation and update for new parameter.
7110
7111 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7112
7113         PR cli/14975
7114         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7115         unittests/format_pieces-selftests.c.
7116         * common/format.h (format_piece) <operator==>: New.
7117         (format_pieces) <operator[]>: Remove.
7118         * common/format.c (format_pieces::format_pieces): Handle \e.
7119         * unittests/format_pieces-selftests.c: New.
7120
7121 2018-05-17  Tom Tromey  <tom@tromey.com>
7122
7123         PR symtab/23010:
7124         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7125         (dw2_instantiate_symtab): Add skip_partial parameter.
7126         (dw2_find_last_source_symtab, dw2_map_expand_apply)
7127         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7128         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7129         (dw2_expand_symtabs_matching_one)
7130         (dw2_find_pc_sect_compunit_symtab)
7131         (dw2_debug_names_lookup_symbol)
7132         (dw2_debug_names_expand_symtabs_for_function): Update.
7133         (init_cutu_and_read_dies): Add skip_partial parameter.
7134         (process_psymtab_comp_unit, build_type_psymtabs_1)
7135         (process_skeletonless_type_unit, load_partial_comp_unit)
7136         (psymtab_to_symtab_1): Update.
7137         (load_full_comp_unit): Add skip_partial parameter.
7138         (process_imported_unit_die, dwarf2_read_addr_index)
7139         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7140         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7141         (read_signatured_type): Update.
7142
7143 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7144
7145         * value.c (release_value): Remove unused variable.
7146         (record_latest_value): Likewise.
7147         (access_value_history): Likewise.
7148         (preserve_values): Likewise.
7149
7150 2018-05-17  Tom Tromey  <tom@tromey.com>
7151
7152         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7153         Initialize.
7154
7155 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
7156
7157         PR gdb/22286
7158         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7159         Also handle registers whose width is not a multiple of
7160         PTRACE_TYPE_RET.
7161         (linux_nat_trad_target::store_register): Likewise.
7162
7163 2018-05-16  Tom Tromey  <tom@tromey.com>
7164
7165         * gdbcore.h (core_bfd): Redefine.
7166         * corelow.c (core_target::close): Update.
7167         (core_target_open): Update.
7168         * progspace.h (struct program_space) <cbfd>: Now a
7169         gdb_bfd_ref_ptr.
7170
7171 2018-05-16  Tom Tromey  <tom@tromey.com>
7172
7173         PR cli/19551:
7174         * symfile-add-flags.h (enum symfile_add_flags)
7175         <SYMFILE_NOT_FILENAME>: New constant.
7176         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
7177         objfile name from BFD.
7178         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7179         * minidebug.c (find_separate_debug_file_in_section): Put
7180         ".gnu_debugdata" into BFD's file name.
7181
7182 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
7183
7184         * regcache.c (regcache_read_ftype, regcache_write_ftype):
7185         Remove.
7186
7187 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
7188
7189         PR binutils/21446
7190         * aarch64-tdep.c (aarch64_analyze_prologue,
7191         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7192         Indicate not interested in errors.
7193
7194 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7195
7196         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7197         Supply the MIPS_ZERO_REGNUM register.
7198
7199 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7200
7201         * mips-tdep.c (mask_address_var): Make variable static.
7202
7203 2018-05-14  Tom Tromey  <tom@tromey.com>
7204
7205         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7206
7207 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
7208
7209         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7210         FXSAVE_ADDR for the mxcsr register.
7211
7212 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
7213
7214         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7215
7216 2018-05-11  Pedro Alves  <palves@redhat.com>
7217
7218         * corelow.c (core_target) <core_target>: No longer inline.
7219         Initialize m_core_gdbarch, m_core_vec and build the section table
7220         here.
7221         <~core_target>: New.
7222         <core_gdbarch, get_core_register_section>: New methods.
7223         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7224         factored out from ...
7225         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7226         (core_ops): Delete.
7227         (sniff_core_bfd): Add gdbarch parameter.
7228         (core_close): Delete, merged into ...
7229         (core_target::close): ... here.  Delete self.
7230         (core_close_cleanup): Delete.
7231         (core_target_open): Allocate a core_target on the heap.  Use a
7232         unique_ptr instead of a cleanup.  Bits moved into the core_target
7233         ctor.  Adjust to use core_target methods instead of globals.
7234         (get_core_register_section): Rename to ...
7235         (core_target::get_core_register_section): ... this and adjust.
7236         (struct get_core_registers_cb_data): New.
7237         (get_core_registers_cb): Use it.  Use bool.
7238         (core_target::fetch_registers, core_target::files_info)
7239         (core_target::xfer_partial, core_target::read_description)
7240         (core_target::pid_to, core_target::thread_name): Adjust to
7241         reference class fields instead of globals.
7242         * target.h (struct target_ops_deleter, target_ops_up): New.
7243
7244 2018-05-11  Pedro Alves  <palves@redhat.com>
7245
7246         * corefile.c (core_file_command): Move to corelow.c.
7247         * corelow.c (the_core_target): Delete.
7248         (core_file_command): Moved from corefile.c.  Check exec_bfd
7249         instead of the_core_target.  Use target_detach instead of calling
7250         into the_core_target directly.
7251         (maybe_say_no_core_file_now): New.
7252         (core_target::detach): Use it.
7253         (_initialize_corelow): Remove references to the_core_target.
7254         * gdbcore.h (the_core_target): Delete.
7255
7256 2018-05-11  Tom Tromey  <tromey@redhat.com>
7257             Pedro Alves  <palves@redhat.com>
7258
7259         * corefile.c (core_bfd): Remove.
7260         * gdbcore.h (core_bfd): Now a macro.
7261         * progspace.h (struct program_space) <cbfd>: New field.
7262
7263 2018-05-11  Tom Tromey  <tom@tromey.com>
7264
7265         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7266         gdb::def_vector.
7267
7268 2018-05-10  Tom Tromey  <tom@tromey.com>
7269
7270         * configure: Rebuild.
7271         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7272
7273 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
7274
7275         PR server/23158:
7276         * regformats/regdat.sh: Adjust script, following the addition
7277         of the new expedite_regs parameter to init_target_desc.
7278
7279 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
7280     
7281         PR gdb/23127
7282         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7283         set_gdbarch_significant_addr_bit.
7284         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7285         set_gdbarch_significant_addr_bit.
7286         * utils.c (address_significant): Update to sign extend addr.
7287
7288 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
7289
7290         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7291         (xtensa_linux_init_abi): Limit tdep->num_regs by
7292         tdep->num_nopriv_regs.
7293         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7294         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7295         not initialized.
7296
7297 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
7298
7299         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7300
7301 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
7302
7303         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7304         (I387_MXCSR_INIT_VAL): New constant.
7305         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7306         buffer if it was supplied by the inferior.
7307         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7308         (i387_xsave_get_clear_bv): New function.
7309         (i387_supply_xsave): Only read x87 control registers from the
7310         xsave buffer if the feature is enabled, and the state will have
7311         been written, otherwise, provide a suitable default.
7312         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7313         including x87 control registers.  Update control registers if they
7314         have changed from the default value, and mark features as enabled
7315         as required.
7316         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7317
7318 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
7319
7320         * spu-tdep.c (info_spu_event_command): Fix output formatting.
7321
7322 2018-05-07  Tom Tromey  <tom@tromey.com>
7323
7324         * configure: Rebuild.
7325         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7326
7327 2018-05-07  Tom Tromey  <tom@tromey.com>
7328
7329         PR tdep/20362:
7330         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7331         bit.  Use correct value for VDIV.
7332
7333 2018-05-04  Tom Tromey  <tom@tromey.com>
7334
7335         * configure: Rebuild.
7336         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7337
7338 2018-05-04  Tom Tromey  <tom@tromey.com>
7339
7340         * linux-record.c (record_linux_system_call) <case
7341         RECORD_SYS_RECVFROM>: Add "break".
7342
7343 2018-05-04  Tom Tromey  <tom@tromey.com>
7344
7345         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7346         Add missing "break".
7347         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7348         Add missing "break".
7349
7350 2018-05-04  Tom Tromey  <tom@tromey.com>
7351
7352         * rs6000-tdep.c (ppc_process_record_op4)
7353         (ppc_process_record_op63): Add fall-through comment.
7354
7355 2018-05-04  Tom Tromey  <tom@tromey.com>
7356
7357         * i386-tdep.c (i386_process_record): Add fall-through comment.
7358
7359 2018-05-04  Tom Tromey  <tom@tromey.com>
7360
7361         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7362         comment.
7363
7364 2018-05-04  Tom Tromey  <tom@tromey.com>
7365
7366         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7367         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7368         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7369         comment.
7370         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7371         comment.
7372         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7373         comment.
7374
7375 2018-05-04  Tom Tromey  <tom@tromey.com>
7376
7377         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7378
7379 2018-05-04  Tom Tromey  <tom@tromey.com>
7380
7381         * s390-tdep.c (s390_process_record): Fix fall-through comments.
7382         * xcoffread.c (scan_xcoff_symtab): Move comment later.
7383         * symfile.c (section_is_mapped): Fix fall-through comment.
7384         * stabsread.c (define_symbol, read_member_functions): Fix
7385         fall-through comment.
7386         * s390-linux-tdep.c (s390_process_record): Fix fall-through
7387         comment.
7388         * remote.c (remote_wait_as): Fix fall-through comment.
7389         * p-exp.y (yylex): Fix fall-through comment.
7390         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7391         comment.
7392         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7393         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7394         * jv-exp.y (yylex): Fix fall-through comment.
7395         * go-exp.y (lex_one_token): Fix fall-through comment.
7396         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7397         fall-through comment.
7398         * f-exp.y (yylex): Fix fall-through comment.
7399         * dwarf2read.c (process_die): Fix fall-through comments.
7400         * dbxread.c (process_one_symbol): Fix fall-through comment.
7401         * d-exp.y (lex_one_token): Fix fall-through comment.
7402         * cp-name-parser.y (yylex): Fix fall-through comment.
7403         * coffread.c (coff_symtab_read): Fix fall-through comment.
7404         * c-exp.y (lex_one_token): Fix fall-through comment.
7405         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7406         comment.
7407         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7408         comment.
7409
7410 2018-05-04  Tom Tromey  <tom@tromey.com>
7411
7412         PR python/22730:
7413         * NEWS: Mention gdb.execute change.
7414         * gdbcmd.h (execute_control_command): Don't declare.
7415         * python/python.c (execute_gdb_command): Use read_command_lines_1,
7416         execute_control_commands, execute_control_commands_to_string.
7417         * cli/cli-script.h (execute_control_commands)
7418         (execute_control_commands_to_string): Declare.
7419         (execute_control_command): Add from_tty parameter.
7420         * cli/cli-script.c (execute_control_commands)
7421         (execute_control_commands_to_string): New functions.
7422         (execute_user_command): Use execute_control_commands.
7423         (execute_control_command_1): Add "from_tty" parameter.  Update.
7424         (execute_control_command): Likewise.
7425
7426 2018-05-04  Tom Tromey  <tom@tromey.com>
7427
7428         PR python/22731:
7429         * NEWS: Mention that breakpoint commands are writable.
7430         * python/py-breakpoint.c (bppy_set_commands): New function.
7431         (breakpoint_object_getset) <"commands">: Use it.
7432
7433 2018-05-04  Tom Tromey  <tom@tromey.com>
7434
7435         * tracepoint.c (actions_command): Update.
7436         * mi/mi-cmd-break.c (mi_command_line_array)
7437         (mi_command_line_array_cnt, mi_command_line_array_ptr)
7438         (mi_read_next_line): Remove.
7439         (mi_cmd_break_commands): Update.
7440         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7441         function_view.
7442         * cli/cli-script.c (get_command_line): Update.
7443         (process_next_line): Use function_view.  Constify.
7444         (recurse_read_control_structure, read_command_lines)
7445         (read_command_lines_1): Change argument types to function_view.
7446         (do_define_command, document_command): Update.
7447         * breakpoint.h (check_tracepoint_command): Don't declare.
7448         * breakpoint.c (check_tracepoint_command): Remove.
7449         (commands_command_1, create_tracepoint_from_upload): Update.
7450
7451 2018-05-04  Tom Tromey  <tom@tromey.com>
7452
7453         PR gdb/11750:
7454         * cli/cli-script.h (enum command_control_type) <define_control>:
7455         New constant.
7456         * cli/cli-script.c (multi_line_command_p): Handle define_control.
7457         (build_command_line, execute_control_command_1)
7458         (process_next_line): Likewise.
7459         (do_define_command): New function, extracted from define_command.
7460         (define_command): Use it.
7461
7462 2018-05-04  Tom Tromey  <tom@tromey.com>
7463
7464         * tracepoint.c (actions_command): Update.
7465         * cli/cli-script.h (read_command_lines): Update.
7466         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7467         (MAX_TMPBUF): Remove define.
7468         (define_command): Use string_printf.
7469         (document_command): Likewise.
7470         * breakpoint.c (commands_command_1): Update.
7471
7472 2018-05-04  Tom Tromey  <tom@tromey.com>
7473
7474         * top.c (execute_command): Update.
7475         * cli/cli-script.h (print_command_lines): Now varargs.
7476         * cli/cli-script.c (print_command_lines): Now varargs.
7477         (execute_control_command_1) <case while_control, case if_control>:
7478         Update.
7479
7480 2018-05-04  Tom Tromey  <tom@tromey.com>
7481
7482         * tracepoint.c (all_tracepoint_actions): Rename from
7483         all_tracepoint_actions_and_cleanup.  Change return type.
7484         (actions_command, encode_actions_1, encode_actions)
7485         (trace_dump_actions, tdump_command): Update.
7486         * remote.c (remote_download_command_source): Update.
7487         * python/python.c (gdbpy_eval_from_control_command)
7488         (python_command, python_interactive_command): Update.
7489         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7490         * guile/guile.c (guile_command)
7491         (gdbscm_eval_from_control_command, guile_command): Update.
7492         * compile/compile.c (compile_code_command)
7493         (compile_print_command, compile_to_object): Update.
7494         * cli/cli-script.h (struct command_lines_deleter): New.
7495         (counted_command_line): New typedef.
7496         (struct command_line): Add constructor, destructor.
7497         <body_list>: Remove.
7498         <body_list_0, body_list_1>: New members.
7499         (command_line_up): Remove typedef.
7500         (read_command_lines, read_command_lines_1, get_command_line):
7501         Update.
7502         (copy_command_lines): Don't declare.
7503         * cli/cli-script.c (build_command_line): Use "new".
7504         (get_command_line): Return counted_command_line.
7505         (print_command_lines, execute_user_command)
7506         (execute_control_command_1, while_command, if_command): Update.
7507         (realloc_body_list): Remove.
7508         (process_next_line, recurse_read_control_structure): Update.
7509         (read_command_lines, read_command_lines_1): Return counted_command_line.
7510         (free_command_lines): Use "delete".
7511         (copy_command_lines): Remove.
7512         (define_command, document_command, show_user_1): Update.
7513         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7514         a counted_command_line.
7515         * breakpoint.h (counted_command_line): Remove typedef.
7516         (breakpoint_set_commands): Update.
7517         * breakpoint.c (check_no_tracepoint_commands)
7518         (validate_commands_for_breakpoint): Update.
7519         (breakpoint_set_commands): Change commands to be a
7520         counted_command_line.
7521         (commands_command_1, update_dprintf_command_list)
7522         (create_tracepoint_from_upload): Update.
7523
7524 2018-05-04  Tom Tromey  <tom@tromey.com>
7525
7526         * cli/cli-decode.h (cmd_list_element): New constructor.
7527         (~cmd_list_element): New destructor.
7528         (struct cmd_list_element): Add initializers.
7529         * cli/cli-decode.c (do_add_cmd): Use "new".
7530         (delete_cmd): Use "delete".
7531
7532 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7533             Pedro Alves <palves@redhat.com>
7534
7535         PR breakpoints/19806 and support for PR external/20207.
7536         * NEWS: Mention Aarch64 watchpoint improvements.
7537         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7538         watchpoints and PR external/20207 watchpoints.
7539         * nat/aarch64-linux-hw-point.c
7540         (kernel_supports_any_contiguous_range): New.
7541         (aarch64_watchpoint_offset): New.
7542         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7543         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7544         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7545         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7546         next_addr_orig_p.  Support PR external/20207 watchpoints.
7547         (aarch64_downgrade_regs): New.
7548         (aarch64_dr_state_insert_one_point): New parameters offset and
7549         addr_orig.
7550         (aarch64_dr_state_remove_one_point): Likewise.
7551         (aarch64_handle_breakpoint): Update caller.
7552         (aarch64_handle_aligned_watchpoint): Likewise.
7553         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7554         aligned_offset.
7555         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7556         aarch64_downgrade_regs.
7557         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7558         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7559         (DR_CONTROL_MASK): ... this.
7560         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7561         (unsigned int aarch64_watchpoint_offset): New prototype.
7562         (aarch64_linux_set_debug_regs): Remove const from state.
7563         * utils.c (align_up, align_down): Move to ...
7564         * common/common-utils.c (align_up, align_down): ... here.
7565         * utils.h (align_up, align_down): Move to ...
7566         * common/common-utils.h (align_up, align_down): ... here.
7567
7568 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
7569
7570         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7571         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7572         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7573         Re-implement to match the ABI as summarized in GCC's
7574         gcc/config/sparc/sparc.c.  All callers updated.
7575         (sparc32_store_arguments): Remove assertion.
7576
7577 2018-05-04  Tom Tromey  <tom@tromey.com>
7578
7579         * printcmd.c: Don't include tui.h.
7580         (decode_format): Use skip_spaces.
7581
7582 2018-05-04  Tom Tromey  <tom@tromey.com>
7583
7584         PR gdb/22619:
7585         * printcmd.c (last_count): New global.
7586         (x_command): Use saved count when repeating.
7587
7588 2018-05-04  Tom Tromey  <tom@tromey.com>
7589
7590         * nto-procfs.c (do_closedir_cleanup): Remove.
7591         (procfs_pidlist): Use gdb_dir_up.
7592         * procfs.c (do_closedir_cleanup): Remove.
7593         (proc_update_threads): Use gdb_dir_up.
7594         * common/filestuff.h (struct gdb_dir_deleter): New.
7595         (gdb_dir_up): New typedef.
7596
7597 2018-05-04  Tom Tromey  <tom@tromey.com>
7598
7599         * ada-lang.c (print_mention_exception): Use std::string.
7600
7601 2018-05-04  Tom Tromey  <tom@tromey.com>
7602
7603         * ada-lang.c (create_excep_cond_exprs): Update.
7604         (ada_exception_catchpoint_cond_string): Use std::string.
7605
7606 2018-05-04  Tom Tromey  <tom@tromey.com>
7607
7608         * ada-lang.c (xget_renaming_scope): Return std::string.
7609         (old_renaming_is_invisible): Update.
7610
7611 2018-05-04  Tom Tromey  <tom@tromey.com>
7612
7613         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7614         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7615
7616 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7617
7618         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7619
7620 2018-05-04  Tom Tromey  <tom@tromey.com>
7621
7622         * remote.c (remote_query_supported_append): Change type.
7623         (remote_check_symbols): Update.
7624
7625 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
7626
7627         PR gdb/11420
7628         * configure.ac: Prepend libpython.
7629         * python/python-config.py: Likewise.
7630         * configure: Regenerate.
7631
7632 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7633
7634         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7635
7636 2018-05-03  Pedro Alves  <palves@redhat.com>
7637
7638         * s390-linux-nat.c
7639         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7640         override.  Write 'true' instead of '1'.
7641         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7642         declaration.
7643
7644 2018-05-02  Pedro Alves  <palves@redhat.com>
7645
7646         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7647         add_inf_child_target.
7648         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7649         add_inf_child_target.
7650         * aix-thread.c (aix_thread_target_info): New.
7651         (aix_thread_target) <shortname, longname, doc>: Delete.
7652         <info>: New.
7653         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7654         add_inf_child_target.
7655         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7656         add_inf_child_target.
7657         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7658         add_inf_child_target.
7659         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7660         add_inf_child_target.
7661         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7662         add_inf_child_target.
7663         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7664         add_inf_child_target.
7665         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7666         add_inf_child_target.
7667         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7668         add_inf_child_target.
7669         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7670         add_inf_child_target.
7671         * bfd-target.c (target_bfd_target_info): New.
7672         (target_bfd) <shortname, longname, doc>: Delete.
7673         <info>: New.
7674         * bsd-kvm.c (bsd_kvm_target_info): New.
7675         (bsd_kvm_target) <shortname, longname, doc>: Delete.
7676         <info>: New.
7677         (bsd_kvm_target::open): Rename to ...
7678         (bsd_kvm_target_open): ... this.  Adjust.
7679         * bsd-uthread.c (bsd_uthread_target_info): New.
7680         (bsd_uthread_target) <shortname, longname, doc>: Delete.
7681         <info>: New.
7682         * corefile.c (core_file_command): Adjust.
7683         * corelow.c (core_target_info): New.
7684         (core_target) <shortname, longname, doc>: Delete.
7685         <info>: New.
7686         (core_target::open): Rename to ...
7687         (core_target_open): ... this.  Adjust.
7688         * ctf.c (ctf_target_info): New.
7689         (ctf_target) <shortname, longname, doc>: Delete.
7690         <info>: New.
7691         (ctf_target::open): Rename to ...
7692         (ctf_target_open): ... this.
7693         (_initialize_ctf): Adjust.
7694         * exec.c (exec_target_info): New.
7695         (exec_target) <shortname, longname, doc>: Delete.
7696         <info>: New.
7697         (exec_target::open): Rename to ...
7698         (exec_target_open): ... this.
7699         * gdbcore.h (core_target_open): Declare.
7700         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7701         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7702         add_inf_child_target.
7703         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7704         add_inf_child_target.
7705         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7706         add_inf_child_target.
7707         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7708         add_inf_child_target.
7709         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7710         add_inf_child_target.
7711         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7712         add_inf_child_target.
7713         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7714         add_inf_child_target.
7715         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7716         add_inf_child_target.
7717         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7718         add_inf_child_target.
7719         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7720         add_inf_child_target.
7721         * inf-child.c (inf_child_target_info): New.
7722         (inf_child_target::info): New.
7723         (inf_child_open_target): Remove 'target' parameter.  Use
7724         get_native_target instead.
7725         (inf_child_target::open): Delete.
7726         (add_inf_child_target): New.
7727         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7728         Delete.
7729         <info>: New.
7730         (add_inf_child_target): Declare.
7731         (inf_child_open_target): Declare.
7732         * linux-thread-db.c (thread_db_target_info): New.
7733         (thread_db_target) <shortname, longname, doc>: Delete.
7734         <info>: New.
7735         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7736         add_inf_child_target.
7737         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7738         add_inf_child_target.
7739         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7740         add_inf_child_target.
7741         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7742         add_inf_child_target.
7743         * make-target-delegates (print_class): Adjust.
7744         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7745         add_inf_child_target.
7746         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7747         add_inf_child_target.
7748         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7749         add_inf_child_target.
7750         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7751         add_inf_child_target.
7752         * nto-procfs.c (nto_native_target_info): New.
7753         (nto_procfs_target_native) <shortname, longname, doc>:
7754         Delete.
7755         <info>: New.
7756         (nto_procfs_target_info): New.
7757         (nto_procfs_target_procfs) <shortname, longname, doc>:
7758         Delete.
7759         <info>: New.
7760         (init_procfs_targets): Adjust.
7761         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7762         add_inf_child_target.
7763         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7764         add_inf_child_target.
7765         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7766         add_inf_child_target.
7767         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7768         add_inf_child_target.
7769         * ravenscar-thread.c (ravenscar_target_info): New.
7770         (ravenscar_thread_target) <shortname, longname, doc>:
7771         Delete.
7772         <info>: New.
7773         * record-btrace.c (record_btrace_target_info):
7774         (record_btrace_target) <shortname, longname, doc>: Delete.
7775         <info>: New.
7776         (record_btrace_target::open): Rename to ...
7777         (record_btrace_target_open): ... this.  Adjust.
7778         * record-full.c (record_longname, record_doc): New.
7779         (record_full_base_target) <shortname, longname, doc>: Delete.
7780         <info>: New.
7781         (record_full_target_info): New.
7782         (record_full_target): <shortname>: Delete.
7783         <info>: New.
7784         (record_full_core_open_1, record_full_open_1): Update comments.
7785         (record_full_base_target::open): Rename to ...
7786         (record_full_open): ... this.
7787         (cmd_record_full_restore): Update.
7788         (_initialize_record_full): Update.
7789         * remote-sim.c (remote_sim_target_info): New.
7790         (gdbsim_target) <shortname, longname, doc>: Delete.
7791         <info>: New.
7792         (gdbsim_target::open): Rename to ...
7793         (gdbsim_target_open): ... this.
7794         (_initialize_remote_sim): Adjust.
7795         * remote.c (remote_doc): New.
7796         (remote_target_info): New.
7797         (remote_target) <shortname, longname, doc>: Delete.
7798         <info>: New.
7799         (extended_remote_target_info): New.
7800         (extended_remote_target) <shortname, longname, doc>: Delete.
7801         <info>: New.
7802         (remote_target::open_1): Make static.  Adjust.
7803         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7804         * s390-linux-nat.c (_initialize_s390_nat): Use
7805         add_inf_child_target.
7806         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7807         add_inf_child_target.
7808         * sol-thread.c (thread_db_target_info): New.
7809         (sol_thread_target) <shortname, longname, doc>: Delete.
7810         <info>: New.
7811         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7812         add_inf_child_target.
7813         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7814         add_inf_child_target.
7815         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7816         add_inf_child_target.
7817         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7818         add_inf_child_target.
7819         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7820         add_inf_child_target.
7821         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7822         add_inf_child_target.
7823         * spu-linux-nat.c (_initialize_spu_nat): Use
7824         add_inf_child_target.
7825         * spu-multiarch.c (spu_multiarch_target_info): New.
7826         (spu_multiarch_target) <shortname, longname, doc>: Delete.
7827         <info>: New.
7828         * target-delegates.c: Regenerate.
7829         * target.c: Include <unordered_map>.
7830         (target_ops_p): Delete.
7831         (DEF_VEC_P(target_ops_p)): Delete.
7832         (target_factories): New.
7833         (test_target_info): New.
7834         (test_target_ops::info): New.
7835         (open_target): Adjust to use target_factories.
7836         (add_target_with_completer): Rename to ...
7837         (add_target): ... this.  Change prototype.  Register target_info
7838         and open callback in target_factories.  Register target_info in
7839         command context instead of target_ops.
7840         (add_target): Delete old implementation.
7841         (add_deprecated_target_alias): Change prototype.  Adjust.
7842         (the_native_target): New.
7843         (set_native_target, get_native_target): New.
7844         (find_default_run_target): Use the_native_target.
7845         (find_attach_target, find_run_target): Simplify.
7846         (target_ops::open): Delete.
7847         (dummy_target_info): New.
7848         (dummy_target::shortname, dummy_target::longname)
7849         (dummy_target::doc): Delete.
7850         (dummy_target::info): New.
7851         (debug_target::shortname, debug_target::longname)
7852         (debug_target::doc): Delete.
7853         (debug_target::info): New.
7854         * target.h (struct target_info): New.
7855         (target_ops::~target_ops): Add comment.
7856         (target_ops::info): New.
7857         (target_ops::shortname, target_ops::longname, target_ops::doc): No
7858         longer virtual.  Implement in terms of target_info.
7859         (set_native_target, get_native_target): Declare.
7860         (target_open_ftype): New.
7861         (add_target, add_target_with_completer)
7862         (add_deprecated_target_alias): Change prototype.
7863         (test_target) <shortname, longname, doc>: Delete.
7864         <info>: New.
7865         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
7866         add_inf_child_target.
7867         * tracefile-tfile.c (tfile_target_info): New.
7868         (tfile_target) <shortname, longname, doc>: Delete.
7869         <info>: New.
7870         (tfile_target::open): Rename to ...
7871         (tfile_target_open): ... this.
7872         (_initialize_tracefile_tfile): Adjust.
7873         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
7874         add_inf_child_target.
7875         * windows-nat.c (_initialize_windows_nat): Use
7876         add_inf_child_target.
7877         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
7878         add_inf_child_target.
7879
7880 2018-05-02  Pedro Alves  <palves@redhat.com>
7881
7882         * linux-nat.h (linux_nat_target) <low_new_thread,
7883         low_delete_thread, low_new_fork, low_forget_process,
7884         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
7885         New virtual methods.
7886         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7887         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
7888         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
7889         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7890         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
7891         Delete.
7892         * linux-fork.c (delete_fork): Adjust to call low method.
7893         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
7894         (linux_nat_new_fork, linux_nat_forget_process_hook)
7895         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
7896         (linux_nat_status_is_event):
7897         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
7898         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
7899         to call low method.
7900         (sigtrap_is_event): Rename to ...
7901         (linux_nat_target::low_status_is_event): ... this.
7902         (linux_nat_set_status_is_event): Delete.
7903         (save_stop_reason, linux_nat_wait_1)
7904         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
7905         low methods.
7906         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
7907         (linux_nat_set_new_fork, linux_nat_set_forget_process)
7908         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
7909         (linux_nat_set_prepare_to_resume): Delete.
7910         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
7911         low virtual methods.
7912         * amd64-linux-nat.c: Likewise.
7913         * arm-linux-nat.c: Likewise.
7914         * i386-linux-nat.c: Likewise.
7915         * ia64-linux-nat.c: Likewise.
7916         * mips-linux-nat.c: Likewise.
7917         * ppc-linux-nat.c: Likewise.
7918         * s390-linux-nat.c: Likewise.
7919         * sparc64-linux-nat.c: Likewise.
7920         * x86-linux-nat.c: Likewise.
7921         * x86-linux-nat.h: Include "nat/x86-linux.h".
7922         (x86_linux_nat_target) <low_new_fork, low_forget_process,
7923         low_prepare_to_resume, low_new_thread, low_delete_thread>:
7924         Override methods.
7925
7926 2018-05-02  Pedro Alves  <palves@redhat.com>
7927
7928         * target.h (target_ops)
7929         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
7930         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
7931         stopped_by_watchpoint, have_continuable_watchpoint,
7932         stopped_data_address, watchpoint_addr_within_range,
7933         can_accel_watchpoint_condition, can_run, thread_alive,
7934         has_all_memory, has_memory, has_stack, has_registers,
7935         has_execution, can_async_p, is_async_p, supports_non_stop,
7936         always_non_stop_p, can_execute_reverse, supports_multi_process,
7937         supports_enable_disable_tracepoint,
7938         supports_disable_randomization, supports_string_tracing,
7939         supports_evaluation_of_breakpoint_conditions,
7940         can_run_breakpoint_commands, filesystem_is_local,
7941         can_download_tracepoint, get_trace_state_variable_value,
7942         set_trace_notes, get_tib_address, use_agent, can_use_agent,
7943         record_is_replaying, record_will_replay,
7944         augmented_libraries_svr4_read>: Adjust to return bool.
7945         * aarch64-linux-nat.c: All implementations adjusted.
7946         * aix-thread.c: All implementations adjusted.
7947         * arm-linux-nat.c: All implementations adjusted.
7948         * breakpoint.c: All implementations adjusted.
7949         * bsd-kvm.c: All implementations adjusted.
7950         * bsd-uthread.c: All implementations adjusted.
7951         * corelow.c: All implementations adjusted.
7952         * ctf.c: All implementations adjusted.
7953         * darwin-nat.c: All implementations adjusted.
7954         * darwin-nat.h: All implementations adjusted.
7955         * exec.c: All implementations adjusted.
7956         * fbsd-nat.c: All implementations adjusted.
7957         * fbsd-nat.h: All implementations adjusted.
7958         * gnu-nat.c: All implementations adjusted.
7959         * gnu-nat.h: All implementations adjusted.
7960         * go32-nat.c: All implementations adjusted.
7961         * ia64-linux-nat.c: All implementations adjusted.
7962         * inf-child.c: All implementations adjusted.
7963         * inf-child.h: All implementations adjusted.
7964         * inf-ptrace.c: All implementations adjusted.
7965         * inf-ptrace.h: All implementations adjusted.
7966         * linux-nat.c: All implementations adjusted.
7967         * linux-nat.h: All implementations adjusted.
7968         * mips-linux-nat.c: All implementations adjusted.
7969         * nto-procfs.c: All implementations adjusted.
7970         * ppc-linux-nat.c: All implementations adjusted.
7971         * procfs.c: All implementations adjusted.
7972         * ravenscar-thread.c: All implementations adjusted.
7973         * record-btrace.c: All implementations adjusted.
7974         * record-full.c: All implementations adjusted.
7975         * remote-sim.c: All implementations adjusted.
7976         * remote.c: All implementations adjusted.
7977         * s390-linux-nat.c: All implementations adjusted.
7978         * sol-thread.c: All implementations adjusted.
7979         * spu-multiarch.c: All implementations adjusted.
7980         * target-delegates.c: All implementations adjusted.
7981         * target.c: All implementations adjusted.
7982         * target.h: All implementations adjusted.
7983         * tracefile-tfile.c: All implementations adjusted.
7984         * tracefile.c: All implementations adjusted.
7985         * tracefile.h: All implementations adjusted.
7986         * windows-nat.c: All implementations adjusted.
7987         * x86-linux-nat.h: All implementations adjusted.
7988         * x86-nat.h: All implementations adjusted.
7989
7990 2018-05-02  Pedro Alves  <palves@redhat.com>
7991
7992         * make-target-delegates (scan_target_h): Don't trim lines here.
7993         Replace sequences of tabs and/or whitespace with a single
7994         whitespace.
7995         (top level, parsing methods): Trim each line before processing it
7996         here.
7997
7998 2018-05-02  Pedro Alves  <palves@redhat.com>
7999             John Baldwin  <jhb@freebsd.org>
8000
8001         * target.h (enum strata) <debug_stratum>: New.
8002         (struct target_ops) <all delegation methods>: Replace by C++
8003         virtual methods, and drop "to_" prefix.  All references updated
8004         throughout.
8005         <to_shortname, to_longname, to_doc, to_data,
8006         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8007         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8008         virtual methods.  All references updated throughout.
8009         <can_attach, supports_terminal_ours, can_create_inferior,
8010         get_thread_control_capabilities, attach_no_wait>: New
8011         virtual methods.
8012         <insert_breakpoint, remove_breakpoint>: Now
8013         TARGET_DEFAULT_NORETURN methods.
8014         <info_proc>: Now returns bool.
8015         <to_magic>: Delete.
8016         (OPS_MAGIC): Delete.
8017         (current_target): Delete.  All references replaced by references
8018         to ...
8019         (target_stack): ... this.  New.
8020         (target_shortname, target_longname): Adjust.
8021         (target_can_run): Now a function declaration.
8022         (default_child_has_all_memory, default_child_has_memory)
8023         (default_child_has_stack, default_child_has_registers)
8024         (default_child_has_execution): Remove target_ops parameter.
8025         (complete_target_initialization): Delete.
8026         (memory_breakpoint_target): New template class.
8027         (test_target_ops): Refactor as a C++ class with virtual methods.
8028         * make-target-delegates (NAME_PART): Tighten.
8029         (POINTER_PART, CP_SYMBOL): New.
8030         (SIMPLE_RETURN_PART): Reimplement.
8031         (VEC_RETURN_PART): Expect less.
8032         (RETURN_PART, VIRTUAL_PART): New.
8033         (METHOD): Adjust to C++ virtual methods.
8034         (scan_target_h): Remove reference to C99.
8035         (dname): Output "target_ops::" prefix.
8036         (write_function_header): Adjust to output a C++ class method.
8037         (write_declaration): New.
8038         (write_delegator): Adjust to output a C++ class method.
8039         (tdname): Output "dummy_target::" prefix.
8040         (write_tdefault, write_debugmethod): Adjust to output a C++ class
8041         method.
8042         (tdefault_names, debug_names): Delete.
8043         (return_types, tdefaults, styles, argtypes_array): New.
8044         (top level): All methods are delegators.
8045         (print_class): New.
8046         (top level): Print dummy_target and debug_target classes.
8047         * target-delegates.c: Regenerate.
8048         * target-debug.h (target_debug_print_enum_info_proc_what)
8049         (target_debug_print_thread_control_capabilities)
8050         (target_debug_print_thread_info_p): New.
8051         * target.c (dummy_target): Delete.
8052         (the_dummy_target, the_debug_target): New.
8053         (target_stack): Now extern.
8054         (set_targetdebug): Push/unpush debug target.
8055         (default_child_has_all_memory, default_child_has_memory)
8056         (default_child_has_stack, default_child_has_registers)
8057         (default_child_has_execution): Remove target_ops parameter.
8058         (complete_target_initialization): Delete.
8059         (add_target_with_completer): No longer call
8060         complete_target_initialization.
8061         (target_supports_terminal_ours): Use regular delegation.
8062         (update_current_target): Delete.
8063         (push_target): No longer check magic number.  Don't call
8064         update_current_target.
8065         (unpush_target): Don't call update_current_target.
8066         (target_is_pushed): No longer check magic number.
8067         (target_require_runnable): Skip for all stratums over
8068         process_stratum.
8069         (target_ops::info_proc): New.
8070         (target_info_proc): Use find_target_at and
8071         find_default_run_target.
8072         (target_supports_disable_randomization): Use regular delegation.
8073         (target_get_osdata): Use find_target_at.
8074         (target_ops::open, target_ops::close, target_ops::can_attach)
8075         (target_ops::attach, target_ops::can_create_inferior)
8076         (target_ops::create_inferior, target_ops::can_run)
8077         (target_can_run): New.
8078         (default_fileio_target): Use regular delegation.
8079         (target_ops::fileio_open, target_ops::fileio_pwrite)
8080         (target_ops::fileio_pread, target_ops::fileio_fstat)
8081         (target_ops::fileio_close, target_ops::fileio_unlink)
8082         (target_ops::fileio_readlink): New.
8083         (target_fileio_open_1, target_fileio_unlink)
8084         (target_fileio_readlink): Always call the target method.  Handle
8085         FILEIO_ENOSYS.
8086         (return_zero, return_zero_has_execution): Delete.
8087         (init_dummy_target): Delete.
8088         (dummy_target::dummy_target, dummy_target::shortname)
8089         (dummy_target::longname, dummy_target::doc)
8090         (debug_target::debug_target, debug_target::shortname)
8091         (debug_target::longname, debug_target::doc): New.
8092         (target_supports_delete_record): Use regular delegation.
8093         (setup_target_debug): Delete.
8094         (maintenance_print_target_stack): Skip debug_stratum.
8095         (initialize_targets): Instantiate the_dummy_target and
8096         the_debug_target.
8097         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
8098         use target_stack.
8099         (target_auxv_search, fprint_target_auxv): Adjust.
8100         (info_auxv_command): Adjust to use target_stack.
8101         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8102         * exceptions.c (print_flush): Handle a NULL target_stack.
8103         * regcache.c (target_ops_no_register): Refactor as class with
8104         virtual methods.
8105
8106         * exec.c (exec_target): New class.
8107         (exec_ops): Now an exec_target.
8108         (exec_open, exec_close_1, exec_get_section_table)
8109         (exec_xfer_partial, exec_files_info, exec_has_memory)
8110         (exec_make_note_section): Refactor as exec_target methods.
8111         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8112         Delete.
8113         (exec_target::find_memory_regions): New.
8114         (_initialize_exec): Don't call init_exec_ops.
8115         * gdbcore.h (exec_file_clear): Delete.
8116
8117         * corefile.c (core_target): Delete.
8118         (core_file_command): Adjust.
8119         * corelow.c (core_target): New class.
8120         (the_core_target): New.
8121         (core_close): Remove target_ops parameter.
8122         (core_close_cleanup): Adjust.
8123         (core_target::close): New.
8124         (core_open, core_detach, get_core_registers, core_files_info)
8125         (core_xfer_partial, core_thread_alive, core_read_description)
8126         (core_pid_to_str, core_thread_name, core_has_memory)
8127         (core_has_stack, core_has_registers, core_info_proc): Rework as
8128         core_target methods.
8129         (ignore, core_remove_breakpoint, init_core_ops): Delete.
8130         (_initialize_corelow): Initialize the_core_target.
8131         * gdbcore.h (core_target): Delete.
8132         (the_core_target): New.
8133
8134         * ctf.c: (ctf_target): New class.
8135         (ctf_ops): Now a ctf_target.
8136         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8137         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8138         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8139         methods.
8140         (init_ctf_ops): Delete.
8141         (_initialize_ctf): Don't call it.
8142         * tracefile-tfile.c (tfile_target): New class.
8143         (tfile_ops): Now a tfile_target.
8144         (tfile_open, tfile_close, tfile_files_info)
8145         (tfile_get_tracepoint_status, tfile_trace_find)
8146         (tfile_fetch_registers, tfile_xfer_partial)
8147         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8148         Refactor as tfile_target methods.
8149         (tfile_xfer_partial_features): Remove target_ops parameter.
8150         (init_tfile_ops): Delete.
8151         (_initialize_tracefile_tfile): Don't call it.
8152         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8153         (tracefile_has_stack, tracefile_has_registers)
8154         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8155         tracefile_target methods.
8156         (init_tracefile_ops): Delete.
8157         (tracefile_target::tracefile_target): New.
8158         * tracefile.h: Include "target.h".
8159         (tracefile_target): New class.
8160         (init_tracefile_ops): Delete.
8161
8162         * spu-multiarch.c (spu_multiarch_target): New class.
8163         (spu_ops): Now a spu_multiarch_target.
8164         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8165         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8166         (spu_search_memory, spu_mourn_inferior): Refactor as
8167         spu_multiarch_target methods.
8168         (init_spu_ops): Delete.
8169         (_initialize_spu_multiarch): Remove references to init_spu_ops,
8170         complete_target_initialization.
8171
8172         * ravenscar-thread.c (ravenscar_thread_target): New class.
8173         (ravenscar_ops): Now a ravenscar_thread_target.
8174         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8175         (ravenscar_thread_alive, ravenscar_pid_to_str)
8176         (ravenscar_fetch_registers, ravenscar_store_registers)
8177         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8178         (ravenscar_stopped_by_hw_breakpoint)
8179         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8180         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8181         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8182         methods.
8183         (init_ravenscar_thread_ops): Delete.
8184         (_initialize_ravenscar): Remove references to
8185         init_ravenscar_thread_ops and complete_target_initialization.
8186
8187         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8188         (bsd_uthread_target): New class.
8189         (bsd_uthread_ops): Now a bsd_uthread_target.
8190         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8191         (bsd_uthread_close, bsd_uthread_mourn_inferior)
8192         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8193         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8194         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8195         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8196         (bsd_uthread_target): Delete function.
8197         (_initialize_bsd_uthread): Remove reference to
8198         complete_target_initialization.
8199
8200         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
8201         (target_bfd): ... this new class.
8202         (target_bfd_xfer_partial, target_bfd_get_section_table)
8203         (target_bfd_close): Refactor as target_bfd methods.
8204         (target_bfd::~target_bfd): New.
8205         (target_bfd_reopen): Adjust.
8206         (target_bfd::close): New.
8207
8208         * record-btrace.c (record_btrace_target): New class.
8209         (record_btrace_ops): Now a record_btrace_target.
8210         (record_btrace_open, record_btrace_stop_recording)
8211         (record_btrace_disconnect, record_btrace_close)
8212         (record_btrace_async, record_btrace_info)
8213         (record_btrace_insn_history, record_btrace_insn_history_range)
8214         (record_btrace_insn_history_from, record_btrace_call_history)
8215         (record_btrace_call_history_range)
8216         (record_btrace_call_history_from, record_btrace_record_method)
8217         (record_btrace_is_replaying, record_btrace_will_replay)
8218         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8219         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8220         (record_btrace_store_registers, record_btrace_prepare_to_store)
8221         (record_btrace_to_get_unwinder)
8222         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8223         (record_btrace_commit_resume, record_btrace_wait)
8224         (record_btrace_stop, record_btrace_can_execute_reverse)
8225         (record_btrace_stopped_by_sw_breakpoint)
8226         (record_btrace_supports_stopped_by_sw_breakpoint)
8227         (record_btrace_stopped_by_hw_breakpoint)
8228         (record_btrace_supports_stopped_by_hw_breakpoint)
8229         (record_btrace_update_thread_list, record_btrace_thread_alive)
8230         (record_btrace_goto_begin, record_btrace_goto_end)
8231         (record_btrace_goto, record_btrace_stop_replaying_all)
8232         (record_btrace_execution_direction)
8233         (record_btrace_prepare_to_generate_core)
8234         (record_btrace_done_generating_core): Refactor as
8235         record_btrace_target methods.
8236         (init_record_btrace_ops): Delete.
8237         (_initialize_record_btrace): Remove reference to
8238         init_record_btrace_ops.
8239         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8240         the execution_direction global.
8241         (record_full_base_target, record_full_target)
8242         (record_full_core_target): New classes.
8243         (record_full_ops): Now a record_full_target.
8244         (record_full_core_ops): Now a record_full_core_target.
8245         (record_full_target::detach, record_full_target::disconnect)
8246         (record_full_core_target::disconnect)
8247         (record_full_target::mourn_inferior, record_full_target::kill):
8248         New.
8249         (record_full_open, record_full_close, record_full_async): Refactor
8250         as methods of the record_full_base_target class.
8251         (record_full_resume, record_full_commit_resume): Refactor
8252         as methods of the record_full_target class.
8253         (record_full_wait, record_full_stopped_by_watchpoint)
8254         (record_full_stopped_data_address)
8255         (record_full_stopped_by_sw_breakpoint)
8256         (record_full_supports_stopped_by_sw_breakpoint)
8257         (record_full_stopped_by_hw_breakpoint)
8258         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8259         methods of the record_full_base_target class.
8260         (record_full_store_registers, record_full_xfer_partial)
8261         (record_full_insert_breakpoint, record_full_remove_breakpoint):
8262         Refactor as methods of the record_full_target class.
8263         (record_full_can_execute_reverse, record_full_get_bookmark)
8264         (record_full_goto_bookmark, record_full_execution_direction)
8265         (record_full_record_method, record_full_info, record_full_delete)
8266         (record_full_is_replaying, record_full_will_replay)
8267         (record_full_goto_begin, record_full_goto_end, record_full_goto)
8268         (record_full_stop_replaying): Refactor as methods of the
8269         record_full_base_target class.
8270         (record_full_core_resume, record_full_core_kill)
8271         (record_full_core_fetch_registers)
8272         (record_full_core_prepare_to_store)
8273         (record_full_core_store_registers, record_full_core_xfer_partial)
8274         (record_full_core_insert_breakpoint)
8275         (record_full_core_remove_breakpoint)
8276         (record_full_core_has_execution): Refactor
8277         as methods of the record_full_core_target class.
8278         (record_full_base_target::supports_delete_record): New.
8279         (init_record_full_ops): Delete.
8280         (init_record_full_core_ops): Delete.
8281         (record_full_save): Refactor as method of the
8282         record_full_base_target class.
8283         (_initialize_record_full): Remove references to
8284         init_record_full_ops and init_record_full_core_ops.
8285
8286         * remote.c (remote_target, extended_remote_target): New classes.
8287         (remote_ops): Now a remote_target.
8288         (extended_remote_ops): Now an extended_remote_target.
8289         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8290         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8291         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8292         (remote_pass_signals, remote_set_syscall_catchpoint)
8293         (remote_program_signals, )
8294         (remote_thread_always_alive): Remove target_ops parameter.
8295         (remote_thread_alive, remote_thread_name)
8296         (remote_update_thread_list, remote_threads_extra_info)
8297         (remote_static_tracepoint_marker_at)
8298         (remote_static_tracepoint_markers_by_strid)
8299         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8300         (remote_open): Refactor as methods of remote_target.
8301         (extended_remote_open, extended_remote_detach)
8302         (extended_remote_attach, extended_remote_post_attach):
8303         (extended_remote_supports_disable_randomization)
8304         (extended_remote_create_inferior): : Refactor as method of
8305         extended_remote_target.
8306         (remote_set_permissions, remote_open_1, remote_detach)
8307         (remote_follow_fork, remote_follow_exec, remote_disconnect)
8308         (remote_resume, remote_commit_resume, remote_stop)
8309         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8310         (remote_terminal_ours, remote_wait, remote_fetch_registers)
8311         (remote_prepare_to_store, remote_store_registers)
8312         (remote_flash_erase, remote_flash_done, remote_files_info)
8313         (remote_kill, remote_mourn, remote_insert_breakpoint)
8314         (remote_remove_breakpoint, remote_insert_watchpoint)
8315         (remote_watchpoint_addr_within_range)
8316         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8317         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8318         (remote_supports_stopped_by_sw_breakpoint)
8319         (remote_stopped_by_hw_breakpoint)
8320         (remote_supports_stopped_by_hw_breakpoint)
8321         (remote_stopped_by_watchpoint, remote_stopped_data_address)
8322         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8323         (remote_verify_memory): Refactor as methods of remote_target.
8324         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8325         parameter.
8326         (remote_xfer_partial, remote_get_memory_xfer_limit)
8327         (remote_search_memory, remote_rcmd, remote_memory_map)
8328         (remote_pid_to_str, remote_get_thread_local_address)
8329         (remote_get_tib_address, remote_read_description): Refactor as
8330         methods of remote_target.
8331         (remote_target::fileio_open, remote_target::fileio_pwrite)
8332         (remote_target::fileio_pread, remote_target::fileio_close): New.
8333         (remote_hostio_readlink, remote_hostio_fstat)
8334         (remote_filesystem_is_local, remote_can_execute_reverse)
8335         (remote_supports_non_stop, remote_supports_disable_randomization)
8336         (remote_supports_multi_process, remote_supports_cond_breakpoints)
8337         (remote_supports_enable_disable_tracepoint)
8338         (remote_supports_string_tracing)
8339         (remote_can_run_breakpoint_commands, remote_trace_init)
8340         (remote_download_tracepoint, remote_can_download_tracepoint)
8341         (remote_download_trace_state_variable, remote_enable_tracepoint)
8342         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8343         (remote_trace_start, remote_get_trace_status)
8344         (remote_get_tracepoint_status, remote_trace_stop)
8345         (remote_trace_find, remote_get_trace_state_variable_value)
8346         (remote_save_trace_data, remote_get_raw_trace_data)
8347         (remote_set_disconnected_tracing, remote_core_of_thread)
8348         (remote_set_circular_trace_buffer, remote_traceframe_info)
8349         (remote_get_min_fast_tracepoint_insn_len)
8350         (remote_set_trace_buffer_size, remote_set_trace_notes)
8351         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8352         (remote_disable_btrace, remote_teardown_btrace)
8353         (remote_read_btrace, remote_btrace_conf)
8354         (remote_augmented_libraries_svr4_read, remote_load)
8355         (remote_pid_to_exec_file, remote_can_do_single_step)
8356         (remote_execution_direction, remote_thread_handle_to_thread_info):
8357         Refactor as methods of remote_target.
8358         (init_remote_ops, init_extended_remote_ops): Delete.
8359         (remote_can_async_p, remote_is_async_p, remote_async)
8360         (remote_thread_events, remote_upload_tracepoints)
8361         (remote_upload_trace_state_variables): Refactor as methods of
8362         remote_target.
8363         (_initialize_remote): Remove references to init_remote_ops and
8364         init_extended_remote_ops.
8365
8366         * remote-sim.c (gdbsim_target): New class.
8367         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8368         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8369         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8370         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8371         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8372         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8373         Refactor as methods of gdbsim_target.
8374         (gdbsim_ops): Now a gdbsim_target.
8375         (init_gdbsim_ops): Delete.
8376         (gdbsim_cntrl_c): Adjust.
8377         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8378
8379         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8380         (the_amd64_linux_nat_target): New.
8381         (amd64_linux_fetch_inferior_registers)
8382         (amd64_linux_store_inferior_registers): Refactor as methods of
8383         amd64_linux_nat_target.
8384         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
8385         * i386-linux-nat.c: Don't include "linux-nat.h".
8386         (i386_linux_nat_target): New class.
8387         (the_i386_linux_nat_target): New.
8388         (i386_linux_fetch_inferior_registers)
8389         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8390         as methods of i386_linux_nat_target.
8391         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
8392         * inf-child.c (inf_child_ops): Delete.
8393         (inf_child_fetch_inferior_registers)
8394         (inf_child_store_inferior_registers): Delete.
8395         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8396         methods of inf_child_target.
8397         (inf_child_target::supports_terminal_ours)
8398         (inf_child_target::terminal_init)
8399         (inf_child_target::terminal_inferior)
8400         (inf_child_target::terminal_ours_for_output)
8401         (inf_child_target::terminal_ours, inf_child_target::interrupt)
8402         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8403         New.
8404         (inf_child_open, inf_child_disconnect, inf_child_close)
8405         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8406         (inf_child_post_startup_inferior, inf_child_can_run)
8407         (inf_child_pid_to_exec_file): Refactor as methods of
8408         inf_child_target.
8409         (inf_child_follow_fork): Delete.
8410         (inf_child_target::can_create_inferior)
8411         (inf_child_target::can_attach): New.
8412         (inf_child_target::has_all_memory, inf_child_target::has_memory)
8413         (inf_child_target::has_stack, inf_child_target::has_registers)
8414         (inf_child_target::has_execution): New.
8415         (inf_child_fileio_open, inf_child_fileio_pwrite)
8416         (inf_child_fileio_pread, inf_child_fileio_fstat)
8417         (inf_child_fileio_close, inf_child_fileio_unlink)
8418         (inf_child_fileio_readlink, inf_child_use_agent)
8419         (inf_child_can_use_agent): Refactor as methods of
8420         inf_child_target.
8421         (return_zero, inf_child_target): Delete.
8422         (inf_child_target::inf_child_target): New.
8423         * inf-child.h: Include "target.h".
8424         (inf_child_target): Delete function prototype.
8425         (inf_child_target): New class.
8426         (inf_child_open_target, inf_child_mourn_inferior)
8427         (inf_child_maybe_unpush_target): Delete.
8428         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8429         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8430         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8431         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8432         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8433         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8434         (inf_ptrace_wait, inf_ptrace_xfer_partial)
8435         (inf_ptrace_thread_alive, inf_ptrace_files_info)
8436         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8437         methods of inf_ptrace_target.
8438         (inf_ptrace_target): Delete function.
8439         * inf-ptrace.h: Include "inf-child.h".
8440         (inf_ptrace_target): Delete function declaration.
8441         (inf_ptrace_target): New class.
8442         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8443         * linux-nat.c (linux_target): New.
8444         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8445         (linux_nat_target::~linux_nat_target): New.
8446         (linux_child_post_attach, linux_child_post_startup_inferior)
8447         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8448         (linux_child_remove_fork_catchpoint)
8449         (linux_child_insert_vfork_catchpoint)
8450         (linux_child_remove_vfork_catchpoint)
8451         (linux_child_insert_exec_catchpoint)
8452         (linux_child_remove_exec_catchpoint)
8453         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8454         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8455         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8456         (linux_nat_stopped_data_address)
8457         (linux_nat_stopped_by_sw_breakpoint)
8458         (linux_nat_supports_stopped_by_sw_breakpoint)
8459         (linux_nat_stopped_by_hw_breakpoint)
8460         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8461         (linux_nat_kill, linux_nat_mourn_inferior)
8462         (linux_nat_xfer_partial, linux_nat_thread_alive)
8463         (linux_nat_update_thread_list, linux_nat_pid_to_str)
8464         (linux_nat_thread_name, linux_child_pid_to_exec_file)
8465         (linux_child_static_tracepoint_markers_by_strid)
8466         (linux_nat_is_async_p, linux_nat_can_async_p)
8467         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8468         (linux_nat_supports_multi_process)
8469         (linux_nat_supports_disable_randomization, linux_nat_async)
8470         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8471         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8472         (linux_nat_fileio_open, linux_nat_fileio_readlink)
8473         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8474         methods of linux_nat_target.
8475         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8476         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8477         parameter.
8478         (check_stopped_by_watchpoint): Adjust.
8479         (linux_xfer_partial): Delete.
8480         (linux_target_install_ops, linux_target, linux_nat_add_target):
8481         Delete.
8482         (linux_nat_target::linux_nat_target): New.
8483         * linux-nat.h: Include "inf-ptrace.h".
8484         (linux_nat_target): New.
8485         (linux_target, linux_target_install_ops, linux_nat_add_target):
8486         Delete function declarations.
8487         (linux_target): Declare global.
8488         * linux-thread-db.c (thread_db_target): New.
8489         (thread_db_target::thread_db_target): New.
8490         (thread_db_ops): Delete.
8491         (the_thread_db_target): New.
8492         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8493         (thread_db_update_thread_list, thread_db_pid_to_str)
8494         (thread_db_extra_thread_info)
8495         (thread_db_thread_handle_to_thread_info)
8496         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8497         (thread_db_resume): Refactor as methods of thread_db_target.
8498         (init_thread_db_ops): Delete.
8499         (_initialize_thread_db): Remove reference to init_thread_db_ops.
8500         * x86-linux-nat.c: Don't include "linux-nat.h".
8501         (super_post_startup_inferior): Delete.
8502         (x86_linux_nat_target::~x86_linux_nat_target): New.
8503         (x86_linux_child_post_startup_inferior)
8504         (x86_linux_read_description, x86_linux_enable_btrace)
8505         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8506         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8507         methods of x86_linux_nat_target.
8508         (x86_linux_create_target): Delete.  Bits folded ...
8509         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
8510         pointer.
8511         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8512         (x86_linux_nat_target): New class.
8513         (x86_linux_create_target): Delete.
8514         (x86_linux_add_target): Now takes a linux_nat_target pointer.
8515         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8516         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8517         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8518         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8519         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8520         make extern.
8521         (x86_use_watchpoints): Delete.
8522         * x86-nat.h: Include "breakpoint.h" and "target.h".
8523         (x86_use_watchpoints): Delete.
8524         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8525         (x86_stopped_by_watchpoint, x86_stopped_data_address)
8526         (x86_insert_watchpoint, x86_remove_watchpoint)
8527         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8528         (x86_stopped_by_hw_breakpoint): New declarations.
8529         (x86_nat_target): New template class.
8530
8531         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8532         (the_ppc_linux_nat_target): New.
8533         (ppc_linux_fetch_inferior_registers)
8534         (ppc_linux_can_use_hw_breakpoint)
8535         (ppc_linux_region_ok_for_hw_watchpoint)
8536         (ppc_linux_ranged_break_num_registers)
8537         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8538         (ppc_linux_insert_mask_watchpoint)
8539         (ppc_linux_remove_mask_watchpoint)
8540         (ppc_linux_can_accel_watchpoint_condition)
8541         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8542         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8543         (ppc_linux_watchpoint_addr_within_range)
8544         (ppc_linux_masked_watch_num_registers)
8545         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8546         (ppc_linux_read_description): Refactor as methods of
8547         ppc_linux_nat_target.
8548         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8549
8550         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8551         (procfs_target): New class.
8552         (the_procfs_target): New.
8553         (procfs_target): Delete function.
8554         (procfs_auxv_parse, procfs_attach, procfs_detach)
8555         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8556         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8557         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8558         (procfs_create_inferior, procfs_update_thread_list)
8559         (procfs_thread_alive, procfs_pid_to_str)
8560         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8561         (procfs_stopped_data_address, procfs_insert_watchpoint)
8562         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8563         (proc_find_memory_regions, procfs_info_proc)
8564         (procfs_make_note_section): Refactor as methods of procfs_target.
8565         (_initialize_procfs): Adjust.
8566         * sol-thread.c (sol_thread_target): New class.
8567         (sol_thread_ops): Now a sol_thread_target.
8568         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8569         (sol_thread_fetch_registers, sol_thread_store_registers)
8570         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8571         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8572         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8573         (init_sol_thread_ops): Delete.
8574         (_initialize_sol_thread): Adjust.  Remove references to
8575         init_sol_thread_ops and complete_target_initialization.
8576
8577         * windows-nat.c (windows_nat_target): New class.
8578         (windows_fetch_inferior_registers)
8579         (windows_store_inferior_registers, windows_resume, windows_wait)
8580         (windows_attach, windows_detach, windows_pid_to_exec_file)
8581         (windows_files_info, windows_create_inferior)
8582         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8583         (windows_close, windows_pid_to_str, windows_xfer_partial)
8584         (windows_get_tib_address, windows_get_ada_task_ptid)
8585         (windows_thread_name, windows_thread_alive): Refactor as
8586         windows_nat_target methods.
8587         (do_initial_windows_stuff): Adjust.
8588         (windows_target): Delete function.
8589         (_initialize_windows_nat): Adjust.
8590
8591         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8592         (darwin_mourn_inferior, darwin_kill_inferior)
8593         (darwin_create_inferior, darwin_attach, darwin_detach)
8594         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8595         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8596         (darwin_supports_multi_process): Refactor as darwin_nat_target
8597         methods.
8598         (darwin_resume_to, darwin_files_info): Delete.
8599         (_initialize_darwin_inferior): Rename to ...
8600         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
8601         * darwin-nat.h: Include "inf-child.h".
8602         (darwin_nat_target): New class.
8603         (darwin_complete_target): Delete.
8604         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8605         (darwin_target): New.
8606         (i386_darwin_fetch_inferior_registers)
8607         (i386_darwin_store_inferior_registers): Refactor as methods of
8608         darwin_nat_target.
8609         (darwin_complete_target): Delete, with ...
8610         (_initialize_i386_darwin_nat): ... bits factored out here.
8611
8612         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8613         (the_alpha_linux_nat_target): New.
8614         (alpha_linux_register_u_offset): Refactor as
8615         alpha_linux_nat_target method.
8616         (_initialize_alpha_linux_nat): Adjust.
8617         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8618         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8619         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8620         methods of linux_nat_trad_target.
8621         (linux_trad_target): Delete.
8622         * linux-nat-trad.h (linux_trad_target): Delete function.
8623         (linux_nat_trad_target): New class.
8624         * mips-linux-nat.c (mips_linux_nat_target): New class.
8625         (super_fetch_registers, super_store_registers, super_close):
8626         Delete.
8627         (the_mips_linux_nat_target): New.
8628         (mips64_linux_regsets_fetch_registers)
8629         (mips64_linux_regsets_store_registers)
8630         (mips64_linux_fetch_registers, mips64_linux_store_registers)
8631         (mips_linux_register_u_offset, mips_linux_read_description)
8632         (mips_linux_can_use_hw_breakpoint)
8633         (mips_linux_stopped_by_watchpoint)
8634         (mips_linux_stopped_data_address)
8635         (mips_linux_region_ok_for_hw_watchpoint)
8636         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8637         (mips_linux_close): Refactor as methods of mips_linux_nat.
8638         (_initialize_mips_linux_nat): Adjust to C++ification.
8639
8640         * aix-thread.c (aix_thread_target): New class.
8641         (aix_thread_ops): Now an aix_thread_target.
8642         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8643         (aix_thread_fetch_registers, aix_thread_store_registers)
8644         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8645         (aix_thread_thread_alive, aix_thread_pid_to_str)
8646         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8647         Refactor as methods of aix_thread_target.
8648         (init_aix_thread_ops): Delete.
8649         (_initialize_aix_thread): Remove references to init_aix_thread_ops
8650         and complete_target_initialization.
8651         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8652         (rs6000_nat_target): New class.
8653         (the_rs6000_nat_target): New.
8654         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8655         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8656         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8657         (super_create_inferior): Delete.
8658         (_initialize_rs6000_nat): Adjust to C++ification.
8659
8660         * arm-linux-nat.c (arm_linux_nat_target): New class.
8661         (the_arm_linux_nat_target): New.
8662         (arm_linux_fetch_inferior_registers)
8663         (arm_linux_store_inferior_registers, arm_linux_read_description)
8664         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8665         (arm_linux_remove_hw_breakpoint)
8666         (arm_linux_region_ok_for_hw_watchpoint)
8667         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8668         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8669         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8670         arm_linux_nat_target.
8671         (_initialize_arm_linux_nat): Adjust to C++ification.
8672
8673         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8674         (the_aarch64_linux_nat_target): New.
8675         (aarch64_linux_fetch_inferior_registers)
8676         (aarch64_linux_store_inferior_registers)
8677         (aarch64_linux_child_post_startup_inferior)
8678         (aarch64_linux_read_description)
8679         (aarch64_linux_can_use_hw_breakpoint)
8680         (aarch64_linux_insert_hw_breakpoint)
8681         (aarch64_linux_remove_hw_breakpoint)
8682         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8683         (aarch64_linux_region_ok_for_hw_watchpoint)
8684         (aarch64_linux_stopped_data_address)
8685         (aarch64_linux_stopped_by_watchpoint)
8686         (aarch64_linux_watchpoint_addr_within_range)
8687         (aarch64_linux_can_do_single_step): Refactor as methods of
8688         aarch64_linux_nat_target.
8689         (super_post_startup_inferior): Delete.
8690         (_initialize_aarch64_linux_nat): Adjust to C++ification.
8691
8692         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8693         (the_hppa_linux_nat_target): New.
8694         (hppa_linux_fetch_inferior_registers)
8695         (hppa_linux_store_inferior_registers): Refactor as methods of
8696         hppa_linux_nat_target.
8697         (_initialize_hppa_linux_nat): Adjust to C++ification.
8698
8699         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8700         (the_ia64_linux_nat_target): New.
8701         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8702         (ia64_linux_stopped_data_address)
8703         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8704         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8705         ia64_linux_nat_target methods.
8706         (super_xfer_partial): Delete.
8707         (_initialize_ia64_linux_nat): Adjust to C++ification.
8708
8709         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8710         (the_m32r_linux_nat_target): New.
8711         (m32r_linux_fetch_inferior_registers)
8712         (m32r_linux_store_inferior_registers): Refactor as
8713         m32r_linux_nat_target methods.
8714         (_initialize_m32r_linux_nat): Adjust to C++ification.
8715
8716         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8717         (the_m68k_linux_nat_target): New.
8718         (m68k_linux_fetch_inferior_registers)
8719         (m68k_linux_store_inferior_registers): Refactor as
8720         m68k_linux_nat_target methods.
8721         (_initialize_m68k_linux_nat): Adjust to C++ification.
8722
8723         * s390-linux-nat.c (s390_linux_nat_target): New class.
8724         (the_s390_linux_nat_target): New.
8725         (s390_linux_fetch_inferior_registers)
8726         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8727         (s390_insert_watchpoint, s390_remove_watchpoint)
8728         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8729         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8730         (s390_auxv_parse, s390_read_description): Refactor as methods of
8731         s390_linux_nat_target.
8732         (_initialize_s390_nat): Adjust to C++ification.
8733
8734         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8735         (the_sparc_linux_nat_target): New.
8736         (_initialize_sparc_linux_nat): Adjust to C++ification.
8737         * sparc-nat.c (sparc_fetch_inferior_registers)
8738         (sparc_store_inferior_registers): Remove target_ops parameter.
8739         * sparc-nat.h (sparc_fetch_inferior_registers)
8740         (sparc_store_inferior_registers): Remove target_ops parameter.
8741         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8742         (the_sparc64_linux_nat_target): New.
8743         (_initialize_sparc64_linux_nat): Adjust to C++ification.
8744
8745         * spu-linux-nat.c (spu_linux_nat_target): New class.
8746         (the_spu_linux_nat_target): New.
8747         (spu_child_post_startup_inferior, spu_child_post_attach)
8748         (spu_child_wait, spu_fetch_inferior_registers)
8749         (spu_store_inferior_registers, spu_xfer_partial)
8750         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8751         methods.
8752         (_initialize_spu_nat): Adjust to C++ification.
8753
8754         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8755         (the_tilegx_linux_nat_target): New.
8756         (fetch_inferior_registers, store_inferior_registers):
8757         Refactor as methods.
8758         (_initialize_tile_linux_nat): Adjust to C++ification.
8759
8760         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8761         (the_xtensa_linux_nat_target): New.
8762         (xtensa_linux_fetch_inferior_registers)
8763         (xtensa_linux_store_inferior_registers): Refactor as
8764         xtensa_linux_nat_target methods.
8765         (_initialize_xtensa_linux_nat): Adjust to C++ification.
8766
8767         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8768         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8769         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8770         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8771         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8772         (fbsd_stopped_by_sw_breakpoint)
8773         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8774         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8775         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8776         (fbsd_post_startup_inferior, fbsd_post_attach)
8777         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8778         (fbsd_set_syscall_catchpoint)
8779         (super_xfer_partial, super_resume, super_wait)
8780         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8781         (fbsd_handle_debug_trap): Remove target_ops parameter.
8782         (fbsd_nat_add_target): Delete.
8783         * fbsd-nat.h: Include "inf-ptrace.h".
8784         (fbsd_nat_add_target): Delete.
8785         (USE_SIGTRAP_SIGINFO): Define.
8786         (fbsd_nat_target): New class.
8787
8788         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8789         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8790         (amd64bsd_target): Delete.
8791         * amd64-bsd-nat.h: New file.
8792         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8793         "x86-bsd-nat.h".
8794         (amd64_fbsd_nat_target): New class.
8795         (the_amd64_fbsd_nat_target): New.
8796         (amd64fbsd_read_description): Refactor as method of
8797         amd64_fbsd_nat_target.
8798         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8799         (_initialize_amd64fbsd_nat): Adjust to C++ification.
8800         * amd64-nat.h (amd64bsd_target): Delete function declaration.
8801         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8802         (i386bsd_store_inferior_registers): Remove target_ops parameter.
8803         (i386bsd_target): Delete.
8804         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8805         (i386bsd_fetch_inferior_registers)
8806         (i386bsd_store_inferior_registers): Declare.
8807         (i386_bsd_nat_target): New class.
8808         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8809         (the_i386_fbsd_nat_target): New.
8810         (i386fbsd_resume, i386fbsd_read_description): Refactor as
8811         i386_fbsd_nat_target methods.
8812         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8813         (_initialize_i386fbsd_nat): Adjust to C++ification.
8814         * x86-bsd-nat.c (super_mourn_inferior): Delete.
8815         (x86bsd_mourn_inferior, x86bsd_target): Delete.
8816         (_initialize_x86_bsd_nat): Adjust to C++ification.
8817         * x86-bsd-nat.h: Include "x86-nat.h".
8818         (x86bsd_target): Delete declaration.
8819         (x86bsd_nat_target): New class.
8820
8821         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8822         (the_aarch64_fbsd_nat_target): New.
8823         (aarch64_fbsd_fetch_inferior_registers)
8824         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8825         aarch64_fbsd_nat_target.
8826         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8827         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8828         (the_alpha_bsd_nat_target): New.
8829         (alphabsd_fetch_inferior_registers)
8830         (alphabsd_store_inferior_registers): Refactor as
8831         alpha_bsd_nat_target methods.
8832         (_initialize_alphabsd_nat): Refactor as methods of
8833         alpha_bsd_nat_target.
8834         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8835         (the_amd64_nbsd_nat_target): New.
8836         (_initialize_amd64nbsd_nat): Adjust to C++ification.
8837         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
8838         (the_amd64_obsd_nat_target): New.
8839         (_initialize_amd64obsd_nat): Adjust to C++ification.
8840         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
8841         (the_arm_fbsd_nat_target): New.
8842         (arm_fbsd_fetch_inferior_registers)
8843         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
8844         (_initialize_arm_fbsd_nat): Refactor as methods of
8845         arm_fbsd_nat_target.
8846         (_initialize_arm_fbsd_nat): Adjust to C++ification.
8847         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
8848         (the_arm_netbsd_nat_target): New.
8849         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
8850         arm_netbsd_nat_target.
8851         (_initialize_arm_netbsd_nat): Adjust to C++ification.
8852         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
8853         (the_hppa_nbsd_nat_target): New.
8854         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
8855         hppa_nbsd_nat_target methods.
8856         (_initialize_hppanbsd_nat): Adjust to C++ification.
8857         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
8858         (the_hppa_obsd_nat_target): New.
8859         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
8860         methods of hppa_obsd_nat_target.
8861         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
8862         add_target.
8863         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
8864         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
8865         add_target.
8866         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
8867         (_initialize_i386obsd_nat): Use add_target.
8868         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
8869         (the_m68k_bsd_nat_target): New.
8870         (m68kbsd_fetch_inferior_registers)
8871         (m68kbsd_store_inferior_registers): Refactor as methods of
8872         m68k_bsd_nat_target.
8873         (_initialize_m68kbsd_nat): Adjust to C++ification.
8874         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
8875         (the_mips_fbsd_nat_target): New.
8876         (mips_fbsd_fetch_inferior_registers)
8877         (mips_fbsd_store_inferior_registers): Refactor as methods of
8878         mips_fbsd_nat_target.
8879         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
8880         add_target.
8881         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
8882         (the_mips_nbsd_nat_target): New.
8883         (mipsnbsd_fetch_inferior_registers)
8884         (mipsnbsd_store_inferior_registers): Refactor as methods of
8885         mips_nbsd_nat_target.
8886         (_initialize_mipsnbsd_nat): Adjust to C++ification.
8887         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
8888         (the_mips64_obsd_nat_target): New.
8889         (mips64obsd_fetch_inferior_registers)
8890         (mips64obsd_store_inferior_registers): Refactor as methods of
8891         mips64_obsd_nat_target.
8892         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
8893         add_target.
8894         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
8895         nbsd_nat_target.
8896         * nbsd-nat.h: Include "inf-ptrace.h".
8897         (nbsd_nat_target): New class.
8898         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
8899         (obsd_wait): Refactor as methods of obsd_nat_target.
8900         (obsd_add_target): Delete.
8901         * obsd-nat.h: Include "inf-ptrace.h".
8902         (obsd_nat_target): New class.
8903         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
8904         (the_ppc_fbsd_nat_target): New.
8905         (ppcfbsd_fetch_inferior_registers)
8906         (ppcfbsd_store_inferior_registers): Refactor as methods of
8907         ppc_fbsd_nat_target.
8908         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
8909         add_target.
8910         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
8911         (the_ppc_nbsd_nat_target): New.
8912         (ppcnbsd_fetch_inferior_registers)
8913         (ppcnbsd_store_inferior_registers): Refactor as methods of
8914         ppc_nbsd_nat_target.
8915         (_initialize_ppcnbsd_nat): Adjust to C++ification.
8916         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
8917         (the_ppc_obsd_nat_target): New.
8918         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
8919         methods of ppc_obsd_nat_target.
8920         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
8921         add_target.
8922         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
8923         (the_sh_nbsd_nat_target): New.
8924         (shnbsd_fetch_inferior_registers)
8925         (shnbsd_store_inferior_registers): Refactor as methods of
8926         sh_nbsd_nat_target.
8927         (_initialize_shnbsd_nat): Adjust to C++ification.
8928         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
8929         (inf_ptrace_xfer_partial): Delete.
8930         (sparc_xfer_partial, sparc_target): Delete.
8931         * sparc-nat.h (sparc_fetch_inferior_registers)
8932         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
8933         (sparc_target): Delete function declaration.
8934         (sparc_target): New template class.
8935         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
8936         (_initialize_sparcnbsd_nat): Adjust to C++ification.
8937         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
8938         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
8939         add_target.
8940         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
8941         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
8942         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
8943         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
8944         add_target.
8945         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
8946         (the_vax_bsd_nat_target): New.
8947         (vaxbsd_fetch_inferior_registers)
8948         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
8949         methods.
8950         (_initialize_vaxbsd_nat): Adjust to C++ification.
8951
8952         * bsd-kvm.c (bsd_kvm_target): New class.
8953         (bsd_kvm_ops): Now a bsd_kvm_target.
8954         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
8955         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
8956         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
8957         bsd_kvm_target.
8958         (bsd_kvm_return_one): Delete.
8959         (bsd_kvm_add_target): Adjust to C++ification.
8960
8961         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
8962         (nto_procfs_target_procfs): New classes.
8963         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
8964         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
8965         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
8966         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
8967         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
8968         (procfs_remove_hw_breakpoint, procfs_resume)
8969         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
8970         (procfs_kill_inferior, procfs_store_registers)
8971         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
8972         as methods of nto_procfs_target.
8973         (nto_procfs_ops): Now an nto_procfs_target_procfs.
8974         (nto_native_ops): Delete.
8975         (procfs_open, procfs_native_open): Delete.
8976         (nto_native_ops): Now an nto_procfs_target_native.
8977         (init_procfs_targets): Adjust to C++ification.
8978         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
8979         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
8980         Refactor as methods of nto_procfs_target.
8981
8982         * go32-nat.c (go32_nat_target): New class.
8983         (the_go32_nat_target): New.
8984         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
8985         (go32_store_registers, go32_xfer_partial, go32_files_info)
8986         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
8987         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
8988         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
8989         (go32_pid_to_str): Refactor as methods of go32_nat_target.
8990         (go32_target): Delete.
8991         (_initialize_go32_nat): Adjust to C++ification.
8992
8993         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
8994         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
8995         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
8996         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
8997         gnu_nat_target.
8998         (gnu_target): Delete.
8999         * gnu-nat.h (gnu_target): Delete.
9000         (gnu_nat_target): New class.
9001         * i386-gnu-nat.c (gnu_base_target): New.
9002         (i386_gnu_nat_target): New class.
9003         (the_i386_gnu_nat_target): New.
9004         (_initialize_i386gnu_nat): Adjust to C++ification.
9005
9006 2018-05-02  Pedro Alves  <palves@redhat.com>
9007
9008         * bfd-target.c (target_bfd_xclose): Rename to ...
9009         (target_bfd_close): ... this.
9010         (target_bfd_reopen): Adjust.
9011         * target.c (target_close): Remove references to to_xclose.
9012         * target.h (target_ops::to_xclose): Delete.
9013         (target_ops::to_close): Update comments.
9014
9015 2018-05-02  Pedro Alves  <palves@redhat.com>
9016
9017         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9018         "linux-nat.h".
9019         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9020         * inf-ptrace.c (inf_ptrace_register_u_offset)
9021         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9022         (inf_ptrace_store_register, inf_ptrace_store_registers)
9023         (inf_ptrace_trad_target): Move to ...
9024         * linux-nat-trad.c: ... this new file.
9025         * linux-nat-trad.h: New file.
9026         * linux-nat.c (linux_target_install_ops): Make extern.
9027         (linux_trad_target): Delete.
9028         * linux-nat.h (linux_trad_target): Delete declaration.
9029         (linux_target_install_ops): Declare.
9030         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9031         "linux-nat.h".
9032
9033 2018-05-02  Pedro Alves  <palves@redhat.com>
9034
9035         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9036         procfs_target/add_target here.
9037         * procfs.c (procfs_target): Make static.
9038         (_initialize_procfs): Call add_target here.
9039         * procfs.h (struct target_ops): Remove forward declaration.
9040         (procfs_target): Remove declaration.
9041         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9042
9043 2018-05-02  Pedro Alves  <palves@redhat.com>
9044
9045         * procfs.c (procfs_stopped_by_watchpoint)
9046         (procfs_insert_watchpoint, procfs_remove_watchpoint)
9047         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9048         Forward declare.
9049         (procfs_use_watchpoints): Delete, move contents...
9050         (procfs_target): ... here.
9051         * procfs.h (procfs_use_watchpoints): Delete declaration.
9052         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9053         procfs_use_watchpoints.
9054         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9055         procfs_use_watchpoints.
9056
9057 2018-05-02  Tom Tromey  <tom@tromey.com>
9058
9059         PR python/20084:
9060         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9061         and var_zuinteger_unlimited.
9062         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9063         and PARAM_ZUINTEGER_UNLIMITED.
9064         (set_parameter_value): Handle var_zuinteger and
9065         var_zuinteger_unlimited.
9066         (add_setshow_generic): Likewise.
9067         (parmpy_init): Likewise.
9068
9069 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
9070
9071         PR rust/23124
9072         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9073         pointer is not null before dereferencing it.
9074
9075 2018-04-30  Tom Tromey  <tom@tromey.com>
9076
9077         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9078         is_mi_like_p.
9079
9080 2018-04-30  Tom Tromey  <tom@tromey.com>
9081
9082         * breakpoint.c (mention): Remove use of is_mi_like_p.
9083         (print_mention_ranged_breakpoint): Likewise.
9084         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9085         of is_mi_like_p.
9086
9087 2018-04-30  Tom Tromey  <tom@tromey.com>
9088
9089         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9090
9091 2018-04-30  Tom Tromey  <tom@tromey.com>
9092
9093         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9094         (info_spu_event_command): Remove some uses of is_mi_like_p.
9095
9096 2018-04-30  Tom Tromey  <tom@tromey.com>
9097
9098         * python/py-framefilter.c (py_print_single_arg)
9099         (enumerate_locals, py_print_args, py_print_frame): Remove some
9100         uses of is_mi_like_p.
9101
9102 2018-04-30  Tom Tromey  <tom@tromey.com>
9103
9104         * ui-out.c: Update.
9105         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9106         * ui-out.h (ui_out::is_mi_like_p): Now const.
9107         (ui_out::do_is_mi_like_p): Now const.
9108         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9109
9110 2018-04-30  Tom Tromey  <tom@tromey.com>
9111
9112         * varobj.c (varobj_set_visualizer): Use new_reference.
9113         * python/python.c (gdbpy_decode_line): Use new_reference.
9114         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9115         new_reference.
9116
9117 2018-04-30  Tom Tromey  <tom@tromey.com>
9118
9119         * varobj.c (install_new_value): Use new_reference.
9120         * value.h (value_incref): Return void.  Swap intro comment with
9121         value_decref.
9122         * value.c (set_value_parent): Use new_reference.
9123         (value_incref): Return void.  Update intro comment.
9124         (release_value): Use new_reference.
9125         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9126
9127 2018-04-30  Tom Tromey  <tom@tromey.com>
9128
9129         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9130         * gdb_bfd.h (new_bfd_ref): Remove.
9131         (gdb_bfd_open): Update comment.
9132         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9133         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9134         (gdb_bfd_fdopenr): Use new_reference.
9135         * exec.c (exec_file_attach): Use new_reference.
9136
9137 2018-04-30  Tom Tromey  <tom@tromey.com>
9138
9139         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9140         method.
9141
9142 2018-04-30  Tom Tromey  <tom@tromey.com>
9143
9144         * jit.c (jit_read_code_entry): Use type_align.
9145         * i386-tdep.c (i386_gdbarch_init): Don't call
9146         set_gdbarch_long_long_align_bit.
9147         * gdbarch.sh: Remove long_long_align_bit.
9148         * gdbarch.c, gdbarch.h: Rebuild.
9149         * arc-tdep.c (arc_type_align): New function.
9150         (arc_gdbarch_init): Use arc_type_align.  Don't call
9151         set_gdbarch_long_long_align_bit.
9152
9153 2018-04-30  Tom Tromey  <tom@tromey.com>
9154
9155         * rust-lang.c (rust_type_alignment): Remove.
9156         (rust_composite_type): Use type_align.
9157
9158 2018-04-30  Tom Tromey  <tom@tromey.com>
9159
9160         * NEWS: Mention Type.align.
9161         * python/py-type.c (typy_get_alignof): New function.
9162         (type_object_getset): Add "alignof".
9163
9164 2018-04-30  Tom Tromey  <tom@tromey.com>
9165
9166         PR exp/17095:
9167         * NEWS: Update.
9168         * std-operator.def (UNOP_ALIGNOF): New operator.
9169         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9170         New.
9171         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9172         * c-lang.c (c_op_print_tab): Add alignof.
9173         * c-exp.y (ALIGNOF): New token.
9174         (exp): Add "ALIGNOF" production.
9175         (ident_tokens): Add _Alignof and alignof.
9176
9177 2018-04-30  Tom Tromey  <tom@tromey.com>
9178
9179         * i386-tdep.c (i386_type_align): New function.
9180         (i386_gdbarch_init): Update.
9181         * gdbarch.sh (type_align): New method.
9182         * gdbarch.c, gdbarch.h: Rebuild.
9183         * arch-utils.h (default_type_align): Declare.
9184         * arch-utils.c (default_type_align): New function.
9185         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9186         (struct type) <align_log2>: New field.
9187         <instance_flags>: Now a bitfield.
9188         (TYPE_RAW_ALIGN): New macro.
9189         (type_align, type_raw_align, set_type_align): Declare.
9190         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9191         functions.
9192         * dwarf2read.c (quirk_rust_enum): Set type alignment.
9193         (get_alignment, maybe_set_alignment): New functions.
9194         (read_structure_type, read_enumeration_type, read_array_type)
9195         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9196         (read_subrange_type, read_base_type): Set type alignment.
9197
9198 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
9199
9200         * dwarf2read.c (read_index_from_section): Use bool.
9201
9202 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
9203
9204         PR gdb/22950
9205         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9206         with #ifdef.
9207
9208 2018-04-29  John Reiser  <jreiser@BitWagon.com>
9209
9210         PR build/22873
9211         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9212         last step, and do it atomically.
9213
9214 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
9215
9216         * compile/compile-c-types.c (convert_int, convert_float):
9217         Update for C FE v1.
9218
9219 2018-04-27  Tom Tromey  <tom@tromey.com>
9220
9221         PR rust/22545:
9222         * rust-lang.c (rust_inclusive_range_type_p): New function.
9223         (rust_range): Handle inclusive ranges.
9224         (rust_compute_range): Likewise.
9225         * rust-exp.y (struct rust_op) <inclusive>: New field.
9226         (DOTDOTEQ): New constant.
9227         (range_expr): Add "..=" productions.
9228         (operator_tokens): Add "..=" token.
9229         (ast_range): Add "inclusive" parameter.
9230         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9231         ranges.
9232         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9233         bounds values.
9234         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9235         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9236         Update comments.
9237         * expprint.c (print_subexp_standard): Handle new bounds values.
9238         (dump_subexp_body_standard): Likewise.
9239
9240 2018-04-27  Tom Tromey  <tom@tromey.com>
9241
9242         * configure: Rebuild.
9243         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9244         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9245         "OVERRIDE".
9246         (class symbol_needs_eval_context): Likewise.
9247         * dwarf2read.c (mock_mapped_index::symbol_name_count)
9248         (mock_mapped_index::symbol_name_at): Use "override".  Remove
9249         "virtual".
9250         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9251         "override".
9252         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9253         * aarch64-tdep.c (instruction_reader::read): Use "override".
9254         (instruction_reader_test::read): Likewise.
9255         * arm-tdep.c (instruction_reader::read): Use "override".
9256         (instruction_reader_thumb::read): Likewise.
9257
9258 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
9259
9260         PR remote/9665
9261         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9262         instead of remote_send.
9263         (remote_send): Remove.
9264
9265 2018-04-26  Pedro Alves  <palves@redhat.com>
9266
9267         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9268         find_function_start_sal instead of find_pc_line.
9269
9270 2018-04-26  Pedro Alves  <palves@redhat.com>
9271
9272         * breakpoint.c (set_breakpoint_location_function): Handle
9273         mst_data_gnu_ifunc.
9274         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9275         * elfread.c (elf_symtab_read): Give data symbols with
9276         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9277         (elf_rel_plt_read): Update comment.
9278         * linespec.c (convert_linespec_to_sals): Handle
9279         mst_data_gnu_ifunc.
9280         (minsym_found): Handle mst_data_gnu_ifunc.
9281         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9282         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9283         * parse.c (find_minsym_type_and_address): Handle
9284         mst_data_gnu_ifunc.
9285         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9286         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9287         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9288         comment.
9289         <mst_data_gnu_ifunc>: New enumerator.
9290
9291 2018-04-26  Pedro Alves  <palves@redhat.com>
9292
9293         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9294         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
9295         'want_trampoline' parameter by a lookup_msym_prefer parameter.
9296         Handle it.
9297         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9298         (lookup_minimal_symbol_by_pc): Adjust.
9299         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9300         (lookup_solib_trampoline_symbol_by_pc): Adjust.
9301         * minsyms.h (lookup_msym_prefer): New enum.
9302         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9303         parameter by a lookup_msym_prefer parameter.
9304
9305 2018-04-26  Pedro Alves  <palves@redhat.com>
9306
9307         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9308         ends in "@plt" instead of looking at the symbol's section.
9309
9310 2018-04-26  Pedro Alves  <palves@redhat.com>
9311
9312         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
9313         all references.
9314         (find_pc_partial_function_gnu_ifunc): Rename to ...
9315         (find_pc_partial_function): ... this, and remove references to
9316         'is_gnu_ifunc_p'.
9317         (find_pc_partial_function): Delete old implementation.
9318         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9319
9320 2018-04-26  Pedro Alves  <palves@redhat.com>
9321
9322         * linespec.c (struct bound_minimal_symbol_search_key): New.
9323         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
9324         skip first line if we found a GNU ifunc minimal symbol by name.
9325         (compare_msymbols): Change parameters to work with a destructured
9326         lhs minsym.
9327         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9328         functions.
9329
9330 2018-04-26  Pedro Alves  <palves@redhat.com>
9331
9332         * breakpoint.c (set_breakpoint_location_function): Don't resolve
9333         ifunc targets here.  Instead, if we have an ifunc minsym, use its
9334         address/name.
9335         (add_location_to_breakpoint): Store the minsym and the objfile in
9336         the breakpoint location.
9337         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9338         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9339         Record the minsym in the sal.
9340         * symtab.h (symtab_and_line) <msymbol>: New field.
9341
9342 2018-04-26  Pedro Alves  <palves@redhat.com>
9343
9344         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9345         unless we actually resolved the ifunc.
9346
9347 2018-04-26  Pedro Alves  <palves@redhat.com>
9348
9349         * c-exp.y (variable production): Prefer ifunc minsyms over
9350         regular function symbols.
9351         * symtab.c (find_gnu_ifunc): New function.
9352         * minsyms.h (lookup_msym_prefer): New enum.
9353         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9354         parameter by a lookup_msym_prefer parameter.
9355         * symtab.h (find_gnu_ifunc): New declaration.
9356
9357 2018-04-26  Pedro Alves  <palves@redhat.com>
9358
9359         * blockframe.c (find_gnu_ifunc_target_type): New function.
9360         (find_function_type): New.
9361         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9362         return a value with a memory address.
9363         (eval_call): For calls to GNU ifunc functions, try to find the
9364         type of the target function from the type that the resolver
9365         returns.
9366         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9367         symbols.
9368         * infcall.c (find_function_return_type): Delete.
9369         (find_function_addr): Add 'function_type' parameter.  For calls to
9370         GNU ifunc functions, try to find the type of the target function
9371         from the type that the resolver returns, and return it via
9372         FUNCTION_TYPE.
9373         (call_function_by_hand_dummy): Adjust to use the function type
9374         returned by find_function_addr.
9375         (find_function_addr): Add 'function_type' parameter and move
9376         description here.
9377         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9378         declarations.
9379
9380 2018-04-26  Pedro Alves  <palves@redhat.com>
9381
9382         * c-exp.y (variable production): Skip finding an alias for ifunc
9383         symbols.
9384
9385 2018-04-26  Pedro Alves  <palves@redhat.com>
9386
9387         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9388
9389 2018-04-25  Pedro Alves  <palves@redhat.com>
9390
9391         * infcmd.c (kill_command): Print the pid as string, not the whole
9392         thread's ptid.  Add comment.  s/has been killed/killed/ in output
9393         message.
9394         * remote.c (remote_detach_1): Print the pid as string, not the
9395         whole thread's ptid.
9396
9397 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9398             Sergio Durigan Junior  <sergiodj@redhat.com>
9399             Pedro Alves  <palves@redhat.com>
9400
9401         * infcmd.c (kill_command): Print message when inferior has
9402         been killed.
9403         * inferior.c (print_inferior_events): Remove 'static'.  Set as
9404         '1'.
9405         (add_inferior): Improve message printed when
9406         'print_inferior_events' is on.
9407         (exit_inferior): Remove message printed when
9408         'print_inferior_events' is on.
9409         (detach_inferior): Improve message printed when
9410         'print_inferior_events' is on.
9411         (initialize_inferiors): Use 'add_inferior_silent' to set
9412         'current_inferior_'.
9413         * inferior.h (print_inferior_events): Declare here as
9414         'extern'.
9415         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9416         '[Detaching...]' messages when 'print_inferior_events' is on.
9417         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
9418         as prefix/suffix for messages.  Remove periods.  Fix erroneous
9419         'Detaching after fork from child...', replace it by '... from
9420         parent...'.
9421         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9422         prefix/suffix when printing 'Detaching...' messages.  Print
9423         them when 'print_inferior_events' is on.
9424         * remote.c (remote_detach_1): Print message when detaching
9425         from inferior and '!is_fork_parent'.
9426
9427 2018-04-24  Tom Tromey  <tom@tromey.com>
9428
9429         * cli-out.h: Reindent.
9430
9431 2018-04-24  Tom Tromey  <tom@tromey.com>
9432
9433         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9434         (cli_ui_out::do_field_string): Use fputs_filtered.
9435         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9436
9437 2018-04-23  Tom Tromey  <tom@tromey.com>
9438
9439         * guile/scm-frame.c (gdbscm_frame_read_var): Use
9440         gdb::unique_xmalloc_ptr.
9441
9442 2018-04-23  Tom Tromey  <tom@tromey.com>
9443
9444         * configure: Rebuild.
9445
9446 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
9447
9448         PR gdb/23095
9449         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9450         prepare_for_testing.  Set normal_bp to r_debug_state if target
9451         is bsd.
9452
9453 2018-04-21  Pedro Alves  <palves@redhat.com>
9454             Rajendra SY  <rajendra.sy@gmail.com>
9455
9456         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9457         * remote.c (extended_remote_attach): In all-stop mode, mark the
9458         thread as executing.
9459
9460 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9461
9462         * thread.c (thread_apply_all_command): Fix comment.
9463         (thread_command): Fix comment.
9464
9465 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
9466
9467         * common/tdesc.h (tdesc_create_feature): Remove xml filename
9468         parameter.
9469         * features/aarch64-core.c (create_feature_aarch64_core):
9470         Regenerate.
9471         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9472         Likewise.
9473         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9474         Likewise.
9475         * features/i386/32bit-avx512.c
9476         (create_feature_i386_32bit_avx512): Likewise.
9477         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9478         Likewise.
9479         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9480         Likewise.
9481         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9482         Likewise.
9483         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9484         Likewise.
9485         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9486         Likewise.
9487         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9488         Likewise.
9489         * features/i386/64bit-avx512.c
9490         (create_feature_i386_64bit_avx512): Likewise.
9491         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9492         Likewise.
9493         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9494         Likewise.
9495         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9496         Likewise.
9497         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9498         Likewise.
9499         * features/i386/64bit-segments.c
9500         (create_feature_i386_64bit_segments): Likewise.
9501         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9502         Likewise.
9503         * features/i386/x32-core.c
9504         (create_feature_i386_x32_core): Likewise.
9505         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9506         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9507         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9508         * target-descriptions.c: In generated code, don't pass xml
9509         filename.
9510
9511 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9512
9513         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9514         (print_xml_feature::visit_post): Likewise.
9515         (print_xml_feature::visit): Likewise.
9516         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9517         (print_xml_feature): Add new class.
9518         * regformats/regdat.sh: Null xmltarget on feature targets.
9519         * target-descriptions.c (struct target_desc): Add xmltarget.
9520         (maintenance_check_tdesc_xml_convert): Add unittest function.
9521         (tdesc_get_features_xml): Add function to get xml.
9522         (maintenance_check_xml_descriptions): Test xml generation.
9523         * xml-tdesc.c (string_read_description_xml): Add function.
9524         * xml-tdesc.h (string_read_description_xml): Add declaration.
9525
9526 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9527
9528         * features/Makefile: Add feature marker to targets with new style
9529         target descriptions.
9530         * regformats/aarch64.dat: Regenerate.
9531         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9532         * regformats/i386/amd64-avx-linux.dat: Likewise.
9533         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9534         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9535         * regformats/i386/amd64-linux.dat: Likewise.
9536         * regformats/i386/amd64-mpx-linux.dat: Likewise.
9537         * regformats/i386/amd64.dat: Likewise.
9538         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9539         * regformats/i386/i386-avx-linux.dat: Likewise.
9540         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9541         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9542         * regformats/i386/i386-linux.dat: Likewise.
9543         * regformats/i386/i386-mmx-linux.dat: Likewise.
9544         * regformats/i386/i386-mpx-linux.dat: Likewise.
9545         * regformats/i386/i386.dat: Likewise.
9546         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9547         * regformats/i386/x32-avx-linux.dat: Likewise.
9548         * regformats/i386/x32-linux.dat: Likewise.
9549         * regformats/tic6x-c62x-linux.dat: Likewise.
9550         * regformats/tic6x-c64x-linux.dat: Likewise.
9551         * regformats/tic6x-c64xp-linux.dat: Likewise.
9552         * regformats/regdat.sh: Parse feature marker.
9553
9554 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9555
9556         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9557         (tdesc_osabi_name): Likewise.
9558         * target-descriptions.c (tdesc_architecture_name): Add new
9559         function.
9560         (tdesc_osabi_name): Likewise.
9561
9562 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9563
9564         * common/tdesc.c (tdesc_predefined_type): Move to here.
9565         (tdesc_named_type): Likewise.
9566         (tdesc_create_vector): Likewise.
9567         (tdesc_create_struct): Likewise.
9568         (tdesc_set_struct_size): Likewise.
9569         (tdesc_create_union): Likewise.
9570         (tdesc_create_flags): Likewise.
9571         (tdesc_create_enum): Likewise.
9572         (tdesc_add_field): Likewise.
9573         (tdesc_add_typed_bitfield): Likewise.
9574         (tdesc_add_bitfield): Likewise.
9575         (tdesc_add_flag): Likewise.
9576         (tdesc_add_enum_value): Likewise.
9577         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9578         (struct tdesc_type_vector): Likewise.
9579         (struct tdesc_type_field): Likewise.
9580         (struct tdesc_type_with_fields): Likewise.
9581         (tdesc_create_enum): Add declaration.
9582         (tdesc_add_typed_bitfield): Likewise.
9583         (tdesc_add_enum_value): Likewise.
9584         * target-descriptions.c (tdesc_type_field): Move from here.
9585         (tdesc_type_builtin): Likewise.
9586         (tdesc_type_vector): Likewise.
9587         (tdesc_type_with_fields): Likewise.
9588         (tdesc_predefined_types): Likewise.
9589         (tdesc_named_type): Likewise.
9590         (tdesc_create_vector): Likewise.
9591         (tdesc_create_struct): Likewise.
9592         (tdesc_set_struct_size): Likewise.
9593         (tdesc_create_union): Likewise.
9594         (tdesc_create_flags): Likewise.
9595         (tdesc_create_enum): Likewise.
9596         (tdesc_add_field): Likewise.
9597         (tdesc_add_typed_bitfield): Likewise.
9598         (tdesc_add_bitfield): Likewise.
9599         (tdesc_add_flag): Likewise.
9600         (tdesc_add_enum_value): Likewise.
9601         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9602         (tdesc_add_typed_bitfield): Likewise.
9603         (tdesc_add_enum_value): Likewise.
9604
9605 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9606
9607         * common/tdesc.c (tdesc_feature::accept): Move to here.
9608         (tdesc_feature::operator==): Likewise.
9609         (tdesc_create_reg): Likewise.
9610         * common/tdesc.h (tdesc_type_kind): Likewise.
9611         (struct tdesc_type): Likewise.
9612         (struct tdesc_feature): Likewise.
9613         * regformats/regdat.sh: Create a feature.
9614         * target-descriptions.c (tdesc_type_kind): Move from here.
9615         (tdesc_type): Likewise.
9616         (tdesc_type_up): Likewise.
9617         (tdesc_feature): Likewise.
9618         (tdesc_create_reg): Likewise.
9619
9620 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9621
9622         * Makefile.in: Add arch/tdesc.c
9623         * common/tdesc.c: New file.
9624         * common/tdesc.h (tdesc_element_visitor): Move to here.
9625         (tdesc_element): Likewise.
9626         (tdesc_reg): Likewise.
9627         (tdesc_reg_up): Likewise.
9628         * regformats/regdef.h (reg): Add offset to constructors.
9629         * target-descriptions.c (tdesc_element_visitor): Move from here.
9630         (tdesc_element): Likewise.
9631         (tdesc_reg): Likewise.
9632         (tdesc_reg_up): Likewise.
9633
9634 2018-04-17  Tom Tromey  <tom@tromey.com>
9635
9636         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9637         discriminant field.
9638
9639 2018-04-17  Tom Tromey  <tom@tromey.com>
9640
9641         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9642
9643 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9644
9645         * symtab.c (print_symbol_info): Skip printing filename and line
9646         number when `last' is NULL.
9647         (symtab_symbol_info): Use empty string instead of NULL for first
9648         invocation of print_symbol_info.
9649         (rbreak_command): Pass NULL to `last' parameter of
9650         print_symbol_info.
9651
9652 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
9653
9654         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9655         instead of nullptr.
9656
9657 2018-04-16  Pedro Alves  <palves@redhat.com>
9658
9659         * MAINTAINERS (sh): Remove.
9660         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9661         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9662         (ALLDEPFILES): Remove sh64-tdep.c.
9663         * NEWS: Mentions that support for SH-5/SH64 is removed.
9664         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9665         (sh*-*-openbsd*): Ditto.
9666         (sh64-*-elf*): Remove.
9667         (sh*): Remove.
9668         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9669         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9670         * sh-tdep.c: No longer include "sh64-tdep.h".
9671         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9672         * sh64-tdep.c, sh64-tdep.h: Remove files.
9673
9674 2018-04-16  Pedro Alves  <palves@redhat.com>
9675
9676         * MAINTAINERS: Remove m88k.
9677         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9678         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9679         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9680         * NEWS: Mention that support for m88k was removed.
9681         * configure.host (m88*-*-*): Remove support.
9682         * configure.nat (m88k-*-*): Remove support.
9683         * configure.tgt (m88*-*-openbsd*): Remove.
9684         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9685
9686 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
9687
9688         * configure.tgt (x86_tobjs): New variable.
9689         (amd64_tobjs, i386_tobjs): Use it.
9690
9691 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9692
9693         * symtab.c (print_symbol_info): Precede the symbol definition by
9694         the line number when available.
9695         * NEWS: Advertise this enhancement.
9696
9697 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9698
9699         * NEWS (New options): announce set/show record btrace cpu.
9700         * btrace.c: Include record-btrace.h.
9701         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9702         the vendor is unknown.
9703         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
9704         Maybe overwrite the btrace configuration's cpu.
9705         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
9706         (btrace_fetch): Add cpu parameter.  Update callers.
9707         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9708         Maybe overwrite the btrace configuration's cpu.  Skip enabling
9709         errata workarounds if the vendor is unknown.
9710         * python/py-record-btrace.c: Include record-btrace.h.
9711         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9712         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9713         * record-btrace.c (record_btrace_cpu_state_kind): New.
9714         (record_btrace_cpu): New.
9715         (set_record_btrace_cpu_cmdlist): New.
9716         (record_btrace_get_cpu): New.
9717         (require_btrace_thread, record_btrace_info)
9718         (record_btrace_resume_thread): Call record_btrace_get_cpu.
9719         (cmd_set_record_btrace_cpu_none): New.
9720         (cmd_set_record_btrace_cpu_auto): New.
9721         (cmd_set_record_btrace_cpu): New.
9722         (cmd_show_record_btrace_cpu): New.
9723         (_initialize_record_btrace): Initialize set/show record btrace cpu
9724         commands.
9725         * record-btrace.h (record_btrace_get_cpu): New.
9726
9727 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9728
9729         * record.c (set_record_command): Fix typo in message.
9730
9731 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9732
9733         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9734
9735 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9736
9737         * infrun.c (process_event_stop_test): Call
9738         gdbarch_in_indirect_branch_thunk.
9739         * gdbarch.sh (in_indirect_branch_thunk): New.
9740         * gdbarch.c: Regenerated.
9741         * gdbarch.h: Regenerated.
9742         * x86-tdep.h: New.
9743         * x86-tdep.c: New.
9744         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9745         (HFILES_NO_SRCDIR): Add x86-tdep.h.
9746         (ALLDEPFILES): Add x86-tdep.c.
9747         * arch-utils.h (default_in_indirect_branch_thunk): New.
9748         * arch-utils.c (default_in_indirect_branch_thunk): New.
9749         * i386-tdep: Include x86-tdep.h.
9750         (i386_in_indirect_branch_thunk): New.
9751         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9752         function.
9753         * amd64-tdep: Include x86-tdep.h.
9754         (amd64_in_indirect_branch_thunk): New.
9755         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9756
9757 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9758
9759         PR gdb/23053
9760         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9761         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9762         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9763         regression.
9764
9765 2018-04-12  Tom Tromey  <tom@tromey.com>
9766
9767         * rust-lang.c (rust_print_struct_def): Remove univariant code.
9768         (rust_evaluate_subexp): Likewise.
9769
9770 2018-04-12  Pedro Alves  <palves@redhat.com>
9771
9772         * procfs.c (procfs_detach): Make forward declaration's prototype
9773         match definition's protototype.
9774         (proc_get_LDT_entry): Remove stale do_cleanups call.
9775
9776 2018-04-12  Pedro Alves  <palves@redhat.com>
9777
9778         * target.h (target_ops::to_has_exited): Delete.
9779         (target_has_exited): Delete.
9780         * target-delegates.c: Regenerate.
9781
9782 2018-04-11  Pedro Alves  <palves@redhat.com>
9783
9784         * target.c (fileio_fh_t::t): Add comment.
9785         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9786         (target_fileio_close): Handle a NULL target.
9787         (invalidate_fileio_fh): New.
9788         (target_close): Call it.
9789         * remote.c (remote_hostio_send_command): No longer check whether
9790         remote_desc is open.
9791
9792 2018-04-11  Pedro Alves  <palves@redhat.com>
9793
9794         * target.c (fileio_fh_t): Make it a named struct instead of a
9795         typedef.
9796         (fileio_fh_t::is_closed): New method.
9797         (DEF_VEC_O (fileio_fh_t)): Remove.
9798         (fileio_fhandles): Now a std::vector.
9799         (is_closed_fileio_fh): Delete.
9800         (acquire_fileio_fd): Adjust.  Rename parameters.
9801         (release_fileio_fd): Adjust.
9802         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9803         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9804         (target_fileio_close): Adjust.
9805
9806 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
9807
9808         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9809         index.
9810
9811 2018-04-10  Pedro Alves  <palves@redhat.com>
9812
9813         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9814         (scoped_finish_thread_state): New class.
9815         * infcmd.c (run_command_1): Use it instead of finish_thread_state
9816         cleanup.
9817         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9818         (fetch_inferior_event, normal_stop): Likewise.
9819         * thread.c (finish_thread_state_cleanup): Delete.
9820
9821 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9822             Pedro Alves  <palves@redhat.com>
9823
9824         * value.c: Include "selftest.h" and "common/array-view.h".
9825         (struct range) <operator ==>: New.
9826         (test_ranges_contain): New.
9827         (check_ranges_vector): New.
9828         (test_insert_into_bit_range_vector): New.
9829         (_initialize_values): Register selftests.
9830         * common/array-view.h (operator==, operator!=): New.
9831
9832 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9833
9834         * common/gdb_vecs.h (unordered_remove): Add overload that takes
9835         an iterator.
9836         * inline-frame.c: Include <algorithm>.
9837         (struct inline_state): Add constructor.
9838         (inline_state_s): Remove.
9839         (DEF_VEC_O(inline_state_s)): Remove.
9840         (inline_states): Change type to std::vector.
9841         (find_inline_frame_state): Adjust to std::vector.
9842         (allocate_inline_frame_state): Remove.
9843         (clear_inline_frame_state): Adjust to std::vector.
9844         (skip_inline_frames): Adjust to std::vector.
9845
9846 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9847
9848         * tracepoint.h (struct trace_state_variable): Add constructor.
9849         <name>: Change type to std::string.
9850         * tracepoint.c (tsv_s): Remove.
9851         (DEF_VEC_O(tsv_s)): Remove.
9852         (tvariables): Change to std::vector.
9853         (create_trace_state_variable): Adjust to std::vector.
9854         (find_trace_state_variable): Likewise.
9855         (find_trace_state_variable_by_number): Likewise.
9856         (delete_trace_state_variable): Likewise.
9857         (trace_variable_command): Adjust to std::string.
9858         (delete_trace_variable_command): Likewise.
9859         (tvariables_info_1): Adjust to std::vector.
9860         (save_trace_state_variables): Likewise.
9861         (start_tracing): Likewise.
9862         (merge_uploaded_trace_state_variables): Adjust to std::vector
9863         and std::string.
9864         * target.h (struct target_ops)
9865         <to_download_trace_state_variable>: Pass reference to
9866         trace_state_variable.
9867         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
9868         * target-delegates.c: Re-generate.
9869         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
9870         (mi_tsv_deleted): Likewise.
9871         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
9872         * remote.c (remote_download_trace_state_variable): Change
9873         pointer to reference and adjust.
9874         * make-target-delegates (parse_argtypes): Handle references.
9875         (write_function_header): Likewise.
9876         (munge_type): Likewise.
9877
9878 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9879
9880         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9881         string_view-selftests.c.
9882         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
9883         testsuite.
9884         * unittests/basic_string_view/cons/char/1.cc: Likewise.
9885         * unittests/basic_string_view/cons/char/2.cc: Likewise.
9886         * unittests/basic_string_view/cons/char/3.cc: Likewise.
9887         * unittests/basic_string_view/element_access/char/1.cc:
9888         Likewise.
9889         * unittests/basic_string_view/element_access/char/empty.cc:
9890         Likewise.
9891         * unittests/basic_string_view/element_access/char/front_back.cc:
9892         Likewise.
9893         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
9894         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
9895         Likewise.
9896         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
9897         Likewise.
9898         * unittests/basic_string_view/modifiers/swap/char/1.cc:
9899         Likewise.
9900         * unittests/basic_string_view/operations/compare/char/1.cc:
9901         Likewise.
9902         * unittests/basic_string_view/operations/compare/char/13650.cc:
9903         Likewise.
9904         * unittests/basic_string_view/operations/copy/char/1.cc:
9905         Likewise.
9906         * unittests/basic_string_view/operations/data/char/1.cc:
9907         Likewise.
9908         * unittests/basic_string_view/operations/find/char/1.cc:
9909         Likewise.
9910         * unittests/basic_string_view/operations/find/char/2.cc:
9911         Likewise.
9912         * unittests/basic_string_view/operations/find/char/3.cc:
9913         Likewise.
9914         * unittests/basic_string_view/operations/find/char/4.cc:
9915         Likewise.
9916         * unittests/basic_string_view/operations/rfind/char/1.cc:
9917         Likewise.
9918         * unittests/basic_string_view/operations/rfind/char/2.cc:
9919         Likewise.
9920         * unittests/basic_string_view/operations/rfind/char/3.cc:
9921         Likewise.
9922         * unittests/basic_string_view/operations/substr/char/1.cc:
9923         Likewise.
9924         * unittests/basic_string_view/operators/char/2.cc: Likewise.
9925         * unittests/string_view-selftests.c: New file.
9926
9927 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9928
9929         * unittests/basic_string_view/capacity/1.cc: New file.
9930         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
9931         * unittests/basic_string_view/cons/char/1.cc: New file.
9932         * unittests/basic_string_view/cons/char/2.cc: New file.
9933         * unittests/basic_string_view/cons/char/3.cc: New file.
9934         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
9935         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
9936         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
9937         * unittests/basic_string_view/element_access/char/1.cc: New file.
9938         * unittests/basic_string_view/element_access/char/2.cc: New file.
9939         * unittests/basic_string_view/element_access/char/empty.cc: New file.
9940         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
9941         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
9942         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
9943         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
9944         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
9945         * unittests/basic_string_view/include.cc: New file.
9946         * unittests/basic_string_view/inserters/char/1.cc: New file.
9947         * unittests/basic_string_view/inserters/char/2.cc: New file.
9948         * unittests/basic_string_view/inserters/char/3.cc: New file.
9949         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
9950         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
9951         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
9952         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
9953         * unittests/basic_string_view/literals/types.cc: New file.
9954         * unittests/basic_string_view/literals/values.cc: New file.
9955         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
9956         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
9957         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
9958         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
9959         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
9960         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
9961         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
9962         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
9963         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
9964         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
9965         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
9966         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
9967         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
9968         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
9969         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
9970         * unittests/basic_string_view/operations/data/char/1.cc: New file.
9971         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
9972         * unittests/basic_string_view/operations/find/char/1.cc: New file.
9973         * unittests/basic_string_view/operations/find/char/2.cc: New file.
9974         * unittests/basic_string_view/operations/find/char/3.cc: New file.
9975         * unittests/basic_string_view/operations/find/char/4.cc: New file.
9976         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
9977         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
9978         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
9979         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
9980         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
9981         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
9982         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
9983         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
9984         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
9985         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
9986         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
9987         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
9988         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
9989         * unittests/basic_string_view/operators/char/2.cc: New file.
9990         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
9991         * unittests/basic_string_view/range_access/char/1.cc: New file.
9992         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
9993         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
9994         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
9995         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
9996         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
9997         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
9998         * unittests/basic_string_view/requirements/typedefs.cc: New file.
9999         * unittests/basic_string_view/typedefs.cc: New file.
10000         * unittests/basic_string_view/types/1.cc: New file.
10001
10002 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10003
10004         * common/gdb_string_view.h: Remove libstdc++ implementation
10005         details, adjust to gdb reality.
10006         * common/gdb_string_view.tcc: Likewise.
10007         * cli/cli-script.c (struct string_view): Remove.
10008         (user_args) <m_args>: Change element type to gdb::string_view.
10009         (user_args::insert_args): Adjust.
10010
10011 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10012
10013         * common/gdb_string_view.h: New file.
10014         * common/gdb_string_view.tcc: New file.
10015
10016 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10017
10018         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10019         * configure: Re-generate.
10020
10021 2018-04-09  Pedro Alves  <palves@redhat.com>
10022
10023         * gdbarch.sh: Include "observable.h" instead of "observer.h".
10024         (set_target_gdbarch): Call
10025         gdb::observers::architecture_changed.notify instead of
10026         observer_notify_architecture_changed.
10027
10028 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10029
10030         * tracepoint.c (struct current_traceframe_cleanup): Remove.
10031         (do_restore_current_traceframe_cleanup): Remove.
10032         (restore_current_traceframe_cleanup_dtor): Remove.
10033         (make_cleanup_restore_current_traceframe): Remove.
10034         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10035         New.
10036         * tracepoint.h (struct scoped_restore_current_traceframe): New.
10037         * infrun.c (fetch_inferior_event): Use
10038         scoped_restore_current_traceframe.
10039
10040 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10041
10042         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10043         Remove.
10044         <n_allocated_type_units>: Remove.
10045         <all_type_units>: Change to std::vector.
10046         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10047         to std::vector change.
10048         (dwarf2_per_objfile::get_cutu): Likewise.
10049         (dwarf2_per_objfile::get_tu): Likewise.
10050         (create_signatured_type_table_from_index): Likewise.
10051         (create_signatured_type_table_from_debug_names): Likewise.
10052         (dw2_symtab_iter_next): Likewise.
10053         (dw2_print_stats): Likewise.
10054         (dw2_expand_all_symtabs): Likewise.
10055         (dw2_expand_marked_cus): Likewise.
10056         (dw2_debug_names_iterator::next): Likewise.
10057         (dwarf2_initialize_objfile): Likewise.
10058         (add_signatured_type_cu_to_table): Likewise.
10059         (create_all_type_units): Likewise.
10060         (add_type_unit): Likewise.
10061         (struct tu_abbrev_offset): Add constructor.
10062         (build_type_psymtabs_1): Adjust to std::vector change.
10063         (print_tu_stats): Likewise.
10064         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10065         (write_debug_names): Likewise.
10066
10067 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10068
10069         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10070         Make an std::vector.
10071         <n_comp_units>: Remove.
10072         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10073         to std::vector change.
10074         (dwarf2_per_objfile::get_cutu): Likewise.
10075         (dwarf2_per_objfile::get_cu): Likewise.
10076         (create_cus_from_index): Likewise.
10077         (create_addrmap_from_index): Likewise.
10078         (create_addrmap_from_aranges): Likewise.
10079         (dwarf2_read_index): Likewise.
10080         (dw2_find_last_source_symtab): Likewise.
10081         (dw2_map_symtabs_matching_filename): Likewise.
10082         (dw2_symtab_iter_next): Likewise.
10083         (dw2_print_stats): Likewise.
10084         (dw2_expand_all_symtabs): Likewise.
10085         (dw2_expand_symtabs_with_fullname): Likewise.
10086         (dw2_expand_marked_cus): Likewise.
10087         (dw2_map_symbol_filenames): Likewise.
10088         (create_cus_from_debug_names): Likewise.
10089         (dwarf2_read_debug_names): Likewise.
10090         (dw2_debug_names_iterator::next): Likewise.
10091         (dwarf2_initialize_objfile): Likewise.
10092         (set_partial_user): Likewise.
10093         (dwarf2_build_psymtabs_hard): Likewise.
10094         (read_comp_units_from_section): Remove arguments, adjust to
10095         std::vector change.
10096         (create_all_comp_units): Adjust to std::vector and
10097         read_comp_units_from_section changes.
10098         (dwarf2_find_containing_comp_unit): Adjust to std::vector
10099         change.
10100         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10101         (psyms_seen_size): Likewise.
10102         (write_gdbindex): Likewise.
10103         (write_debug_names): Likewise.
10104
10105 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10106
10107         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10108         with dwarf2_per_objfile.
10109         (create_cus_from_index): Likewise.
10110         (create_signatured_type_table_from_index): Likewise.
10111         (dwarf2_read_index): Likewise.
10112         (dwarf2_initialize_objfile): Likewise.
10113         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
10114         per_cu rather than get_dwarf2_per_objfile.
10115
10116 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10117
10118         * dwarf2read.h (struct signatured_type): Forward declare.
10119         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10120         New methods.
10121         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10122         (dw2_get_cutu): ...this.
10123         (dwarf2_per_objfile::get_cu): Rename from...
10124         (dw2_get_cu): ...this.
10125         (dwarf2_per_objfile::get_tu): New.
10126         (create_addrmap_from_index): Adjust.
10127         (create_addrmap_from_aranges): Adjust.
10128         (dw2_find_last_source_symtab): Adjust.
10129         (dw2_map_symtabs_matching_filename): Adjust.
10130         (dw2_symtab_iter_next): Adjust.
10131         (dw2_print_stats): Adjust.
10132         (dw2_expand_all_symtabs): Adjust.
10133         (dw2_expand_symtabs_with_fullname): Adjust.
10134         (dw2_expand_marked_cus): Adjust.
10135         (dw_expand_symtabs_matching_file_matcher): Adjust.
10136         (dw2_map_symbol_filenames): Adjust.
10137         (dw2_debug_names_iterator::next): Adjust.
10138         (dwarf2_initialize_objfile): Adjust.
10139         (set_partial_user): Adjust.
10140         (dwarf2_build_psymtabs_hard): Adjust.
10141
10142 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10143
10144         * dwarf2read.c (create_signatured_type_table_from_debug_names):
10145         Remove unused variables.
10146         (dw2_map_symtabs_matching_filename): Likewise.
10147         (dwarf2_record_block_ranges): Likewise.
10148         (dwarf2_read_addr_index): Likewise.
10149         (follow_die_offset): Likewise.
10150
10151 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10152
10153         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10154         to symbol_file_add_main.
10155
10156 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10157
10158         PR mi/22299
10159         * mi/mi-console.c (do_fputc_async_safe): New.
10160         (mi_console_file::write_async_safe): New.
10161         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10162         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10163         New.
10164         * ui-file.c (ui_file::putstrn): Adjust call to
10165         fputstrn_unfiltered.
10166         * utils.c (printchar): Replace do_fputs and do_fprintf
10167         parameters by do_fputc.
10168         (fputstr_filtered): Adjust call to printchar.
10169         (fputstr_unfiltered): Likewise.
10170         (fputstrn_filtered): Likewise.
10171         (fputstrn_unfiltered): Add do_fputc parameter, pass to
10172         printchar.
10173         * utils.h (do_fputc_ftype): New typedef.
10174         (fputstrn_unfiltered): Add do_fputc parameter.
10175
10176 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10177
10178         * regformats/i386/i386-avx.dat: Remove.
10179
10180 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10181
10182         PR gdb/22979
10183         * amd64-tdep.c (amd64_none_init_abi): New function.
10184         (amd64_x32_none_init_abi): New function.
10185         (_initialize_amd64_tdep): Register handlers for x86-64 and
10186         x64_32 with GDB_OSABI_NONE.
10187         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10188         GDB_OSABI_NONE osabi.
10189
10190 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10191
10192         PR gdb/22980
10193         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10194         GDB_OSABI_NONE.
10195         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10196         * osabi.c (gdb_osabi_names): Add "unknown" entry.
10197
10198 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10199
10200         * common/byte-vector.h (char_vector): New type.
10201         * target.h (target_read_alloc): Return
10202         gdb::optional<byte_vector>.
10203         (target_read_stralloc): Return gdb::optional<char_vector>.
10204         (target_get_osdata): Return gdb::optional<char_vector>.
10205         * target.c (target_read_alloc_1): Templatize.  Replacement
10206         manual memory management with vector.
10207         (target_read_alloc): Change return type, adjust.
10208         (target_read_stralloc): Change return type, adjust.
10209         (target_get_osdata): Change return type, adjust.
10210         * auxv.c (struct auxv_info) <length>: Remove.
10211         <data>: Change type to gdb::optional<byte_vector>.
10212         (auxv_inferior_data_cleanup): Free auxv_info with delete.
10213         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10214         (target_auxv_search): Adjust.
10215         (fprint_target_auxv): Adjust.
10216         * avr-tdep.c (avr_io_reg_read_command): Adjust.
10217         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10218         (linux_make_corefile_notes): Adjust.
10219         * osdata.c (get_osdata): Adjust.
10220         * remote.c (remote_get_threads_with_qxfer): Adjust.
10221         (remote_memory_map): Adjust.
10222         (remote_traceframe_info): Adjust.
10223         (btrace_read_config): Adjust.
10224         (remote_read_btrace): Adjust.
10225         (remote_pid_to_exec_file): Adjust.
10226         * solib-aix.c (solib_aix_get_library_list): Adjust.
10227         * solib-dsbt.c (decode_loadmap): Don't free buf.
10228         (dsbt_get_initial_loadmaps): Adjust.
10229         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10230         * solib-target.c (solib_target_current_sos): Adjust.
10231         * tracepoint.c (sdata_make_value): Adjust.
10232         * xml-support.c (xinclude_start_include): Adjust.
10233         (xml_fetch_content_from_file): Adjust.
10234         * xml-support.h (xml_fetch_another): Change return type.
10235         (xml_fetch_content_from_file): Change return type.
10236         * xml-syscall.c (xml_init_syscalls_info): Adjust.
10237         * xml-tdesc.c (file_read_description_xml): Adjust.
10238         (fetch_available_features_from_target): Change return type.
10239         (target_fetch_description_xml): Adjust.
10240         (target_read_description_xml): Adjust.
10241
10242 2018-04-06  Tom Tromey  <tom@tromey.com>
10243
10244         * value.c (~value): Update.
10245         (struct value) <contents>: Now unique_xmalloc_ptr.
10246         (value_contents_bits_eq, allocate_value_contents)
10247         (value_contents_raw, value_contents_all_raw)
10248         (value_contents_for_printing, value_contents_for_printing_const)
10249         (set_value_enclosing_type): Update.
10250
10251 2018-04-06  Tom Tromey  <tom@tromey.com>
10252
10253         * value.c (range_s): Remove typedef, VEC.
10254         (struct range): Add operator<.
10255         (range_lessthan): Remove.
10256         (ranges_contain): Change type.
10257         (~value): Update.
10258         (struct value) <unavailable, optimized_out>: Now std::vector.
10259         (value_entirely_available)
10260         (value_entirely_covered_by_range_vector)
10261         (value_entirely_unavailable, value_entirely_optimized_out):
10262         Update.
10263         (insert_into_bit_range_vector): Change argument type.
10264         (find_first_range_overlap): Likewise.
10265         (struct ranges_and_idx, value_contents_bits_eq)
10266         (require_not_optimized_out, require_available): Update.
10267         (ranges_copy_adjusted): Change argument types.
10268         (value_optimized_out, value_copy, value_fetch_lazy): Update.
10269
10270 2018-04-06  Tom Tromey  <tom@tromey.com>
10271
10272         * value.c (~value): Update.
10273         (struct value) <parent>: Now a value_ref_ptr.
10274         (value_parent, set_value_parent, value_address, value_copy):
10275         Update.
10276
10277 2018-04-06  Tom Tromey  <tom@tromey.com>
10278
10279         * value.c (struct value): Add constructor, destructor, and member
10280         initializers.
10281         (allocate_value_lazy, value_decref): Update.
10282
10283 2018-04-06  Tom Tromey  <tom@tromey.com>
10284
10285         * value.c (struct value) <released, next>: Remove.
10286         (all_values): Now a std::vector.
10287         (allocate_value_lazy): Update.
10288         (value_next): Remove.
10289         (value_mark, value_free_to_mark, release_value)
10290         (value_release_to_mark): Update.
10291
10292 2018-04-06  Tom Tromey  <tom@tromey.com>
10293
10294         * value.h (fetch_subexp_value, value_release_to_mark): Update.
10295         (free_value_chain): Remove.
10296         * value.c (free_value_chain): Remove.
10297         (value_release_to_mark): Return a std::vector.
10298         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10299         std::vector.
10300         (check_condition): Update.
10301         * eval.c (fetch_subexp_value): Change "val_chain" to a
10302         std::vector.
10303         * breakpoint.c (update_watchpoint): Update.
10304         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10305
10306 2018-04-06  Tom Tromey  <tom@tromey.com>
10307
10308         * value.h (free_all_values): Remove.
10309         * value.c (free_all_values): Remove.
10310
10311 2018-04-06  Tom Tromey  <tom@tromey.com>
10312
10313         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10314         (value_history_chain, value_history_count): Remove.
10315         (value_history): New global.
10316         (record_latest_value, access_value_history, show_values)
10317         (preserve_values): Update.
10318
10319 2018-04-06  Tom Tromey  <tom@tromey.com>
10320
10321         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10322         * varobj.c (varobj_set_display_format, varobj_set_value)
10323         (install_default_visualizer, construct_visualizer)
10324         (install_new_value, ~varobj, varobj_get_value_type)
10325         (my_value_of_variable, varobj_editable_p): Update.
10326         * c-varobj.c (c_describe_child, c_value_of_variable)
10327         (cplus_number_of_children, cplus_describe_child): Update.
10328         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10329         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10330         (ada_value_of_variable, ada_value_is_changeable_p): Update.
10331
10332 2018-04-06  Tom Tromey  <tom@tromey.com>
10333
10334         * printcmd.c (last_examine_address): Change type to
10335         value_ref_ptr.
10336         (do_examine, x_command): Update.
10337
10338 2018-04-06  Tom Tromey  <tom@tromey.com>
10339
10340         * value.c (release_value): Update.
10341         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10342         (struct bpstats) <val>: Now a value_ref_ptr.
10343         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10344         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10345         (~watchpoint, print_it_watchpoint, watch_command_1)
10346         (invalidate_bp_value_on_memory_change): Update.
10347
10348 2018-04-06  Tom Tromey  <tom@tromey.com>
10349
10350         * varobj.c (varobj_clear_saved_item)
10351         (update_dynamic_varobj_children, install_new_value, ~varobj):
10352         Update.
10353         * value.h (value_incref): Move declaration earlier.
10354         (value_decref): Rename from value_free.
10355         (struct value_ref_policy): New.
10356         (value_ref_ptr): New typedef.
10357         (struct value_deleter): Remove.
10358         (gdb_value_up): Remove typedef.
10359         (release_value): Change return type.
10360         (release_value_or_incref): Remove.
10361         * value.c (set_value_parent): Update.
10362         (value_incref): Change return type.
10363         (value_decref): Rename from value_free.
10364         (value_free_to_mark, free_all_values, free_value_chain): Update.
10365         (release_value): Return value_ref_ptr.
10366         (release_value_or_incref): Remove.
10367         (record_latest_value, set_internalvar, clear_internalvar):
10368         Update.
10369         * stack.c (info_frame_command): Don't call value_free.
10370         * python/py-value.c (valpy_dealloc, valpy_new)
10371         (value_to_value_object): Update.
10372         * printcmd.c (do_examine): Update.
10373         * opencl-lang.c (lval_func_free_closure): Update.
10374         * mi/mi-main.c (register_changed_p): Don't call value_free.
10375         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10376         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10377         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10378         value_free.
10379         * guile/scm-value.c (vlscm_free_value_smob)
10380         (vlscm_scm_from_value): Update.
10381         * frame.c (frame_register_unwind, frame_unwind_register_signed)
10382         (frame_unwind_register_unsigned, get_frame_register_bytes)
10383         (put_frame_register_bytes): Don't call value_free.
10384         * findvar.c (address_from_register): Don't call value_free.
10385         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10386         * dwarf2loc.c (entry_data_value_free_closure)
10387         (value_of_dwarf_reg_entry, free_pieced_value_closure)
10388         (dwarf2_evaluate_loc_desc_full): Update.
10389         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10390         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10391         (~watchpoint, watch_command_1)
10392         (invalidate_bp_value_on_memory_change): Update.
10393         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10394
10395 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
10396
10397         PR gdb/23022
10398         * warning.m4: Add -Wno-error=deprecated-register.
10399         * configure: Re-generate.
10400
10401 2018-04-05  Tom Tromey  <tom@tromey.com>
10402
10403         * linespec.h: Remove include of "vec.h".
10404
10405 2018-04-05  Tom Tromey  <tom@tromey.com>
10406
10407         * linespec.c (typep): Remove typedef.
10408         (find_methods, find_superclass_methods): Take a std::vector.
10409         (find_method): Use std::vector.
10410
10411 2018-04-05  Tom Tromey  <tom@tromey.com>
10412
10413         * utils.c (compare_strings): Remove.
10414         * utils.h (compare_strings): Remove.
10415         * objc-lang.h (find_imps): Update.
10416         * objc-lang.c (find_methods): Take a std::vector.
10417         (uniquify_strings, find_imps): Likewise.
10418         * linespec.c (find_methods): Take a std::vector.
10419         (decode_objc): Use std::vector.
10420         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10421         a std::vector.
10422         (find_method, find_function_symbols): Use std::vector.
10423
10424 2018-04-05  Tom Tromey  <tom@tromey.com>
10425
10426         * completer.c (completion_tracker::completion_tracker): Remove
10427         cast.
10428         (completion_tracker::discard_completions): Likewise.
10429         * breakpoint.c (ambiguous_names_p): Remove cast.
10430         * ada-lang.c (_initialize_ada_language): Remove cast.
10431         * utils.h (streq): Update.
10432         (streq_hash): Add new declaration.
10433         * utils.c (streq): Return bool.
10434         (streq_hash): New function.
10435
10436 2018-04-05  Tom Tromey  <tom@tromey.com>
10437
10438         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10439         Remove a string copy.
10440
10441 2018-04-05  Tom Tromey  <tom@tromey.com>
10442
10443         * linespec.c (filter_results): Use std::vector.
10444         (decode_line_2, decode_line_full): Update.
10445
10446 2018-04-05  Tom Tromey  <tom@tromey.com>
10447
10448         * linespec.c (canonical_to_fullform): Return std::string.
10449         (filter_results): Update.
10450         (struct decode_line_2_item): Add constructor.
10451         <fullform, displayform>: Now std::string.
10452         (decode_line_2_compare_items): Now a std::sort comparator.
10453         (decode_line_2): Update.
10454
10455 2018-04-05  Tom Tromey  <tom@tromey.com>
10456
10457         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10458         (unexpected_linespec_error): Update.
10459         (linespec_parse_basic, parse_linespec): Update.
10460
10461 2018-04-05  Tom Tromey  <tom@tromey.com>
10462
10463         * linespec.c (linespec_parse_basic): Reindent.
10464
10465 2018-04-05  Tom Tromey  <tom@tromey.com>
10466
10467         * minsyms.h (iterate_over_minimal_symbols): Update.
10468         * minsyms.c (iterate_over_minimal_symbols): Take a
10469         gdb::function_view.
10470         * linespec.c (struct collect_minsyms): Remove.
10471         (compare_msyms): Now a std::sort comparator.
10472         (add_minsym): Add parameters.
10473         (search_minsyms_for_name): Update.  Use std::vector.
10474
10475 2018-04-03  Tom Tromey  <tom@tromey.com>
10476
10477         * mipsread.c (read_alphacoff_dynamic_symtab): Use
10478         gdb::byte_vector.
10479
10480 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10481
10482         * MAINTAINERS (Write After Approval): Add Weimin Pan.
10483
10484 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10485
10486         PR gdb/16959
10487         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
10488         printing static type.
10489
10490 2018-04-01  Tom Tromey  <tom@tromey.com>
10491
10492         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10493         (rs6000_xfer_shared_libraries): Update.
10494
10495 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
10496
10497         * common/gdb_vecs.h (char_ptr): Remove.
10498         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10499
10500 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10501
10502         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10503         with std::vector.
10504         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10505
10506 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10507
10508         * tracepoint.h (struct uploaded_tp): Initialize fields.
10509         <actions, step_actions, cmd_strings>: Change type to
10510         std::vector<char *>.
10511         * tracepoint.c (get_uploaded_tp): Allocate with new.
10512         (free_uploaded_tps): Free with delete.
10513         (parse_tracepoint_definition): Adjust to std::vector change.
10514         * breakpoint.c (read_uploaded_action): Likewise.
10515         (create_tracepoint_from_upload): Likewise.
10516         * ctf.c (ctf_write_uploaded_tp): Likewise.
10517         (SET_ARRAY_FIELD): Likewise.
10518         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10519
10520 2018-03-30  Tom Tromey  <tom@tromey.com>
10521
10522         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
10523         std::unique_ptr.
10524         (svr4_keep_data_in_core): Update.
10525         (svr4_read_so_list): Update.
10526
10527 2018-03-30  Tom Tromey  <tom@tromey.com>
10528
10529         * windows-nat.c (handle_output_debug_string, handle_exception):
10530         Update.
10531         * target.h (target_read_string): Update.
10532         * target.c (target_read_string): Change "string" to
10533         unique_xmalloc_ptr.
10534         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10535         Update.
10536         * solib-frv.c (frv_current_sos): Update.
10537         * solib-dsbt.c (dsbt_current_sos): Update.
10538         * solib-darwin.c (darwin_current_sos): Update.
10539         * linux-thread-db.c (inferior_has_bug): Update.
10540         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10541         Update.  Remove alloca.
10542         * ada-lang.c (ada_main_name): Update.
10543
10544 2018-03-30  Tom Tromey  <tom@tromey.com>
10545
10546         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10547         (struct dwo_file_deleter): New.
10548         (dwo_file_up): New typedef.
10549         (open_and_init_dwo_file): Use dwo_file_up.
10550         (free_dwo_file_cleanup): Remove.
10551
10552 2018-03-30  Tom Tromey  <tom@tromey.com>
10553
10554         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10555         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10556
10557 2018-03-30  Tom Tromey  <tom@tromey.com>
10558
10559         * dwarf2read.c (class free_cached_comp_units): New class.
10560         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10561         (free_cached_comp_units): Remove function.
10562
10563 2018-03-30  Tom Tromey  <tom@tromey.com>
10564
10565         * utils.h (make_cleanup_unpush_target): Remove.
10566         * inf-ptrace.c (struct target_unpusher): New.
10567         (target_unpush_up) New typedef.
10568         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10569         target_unpush_up.
10570         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10571
10572 2018-03-27  Tom Tromey  <tom@tromey.com>
10573
10574         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10575
10576 2018-03-27  Pedro Alves  <palves@redhat.com>
10577             Tom Tromey  <tom@tromey.com>
10578
10579         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10580         destructor.  Now a class.
10581         (gdb_readline_wrapper_cleanup): Remove function.
10582         (gdb_readline_wrapper): Remove cleanups.
10583
10584 2018-03-27  Tom Tromey  <tom@tromey.com>
10585
10586         * typeprint.h (struct type_print_options) <local_typedefs,
10587         global_typedefs>: Remove "struct" keyword.
10588         (class typedef_hash_table): New class.
10589         (recursively_update_typedef_hash, add_template_parameters)
10590         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10591         (find_typedef_in_hash): Don't declare.
10592         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10593         (typedef_hash_table::recursively_update): Rename from
10594         recursively_update_typedef_hash.  Now a member.
10595         (typedef_hash_table::add_template_parameters): Rename from
10596         add_template_parameters.  Now a member.
10597         (typedef_hash_table::typedef_hash_table): Now a constructor;
10598         rename from create_typedef_hash.
10599         (typedef_hash_table::~typedef_hash_table): Now a destructor;
10600         rename from free_typedef_hash.
10601         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10602         (do_free_global_table): Remove.
10603         (typedef_hash_table::typedef_hash_table): New constructor; renamed
10604         from copy_type_recursive.
10605         (create_global_typedef_table): Remove.
10606         (typedef_hash_table::find_global_typedef): Now a member of
10607         typedef_hash_table.
10608         (typedef_hash_table::find_typedef): Rename from
10609         find_typedef_in_hash; now a member.
10610         (whatis_exp): Update.
10611         * extension.h (struct ext_lang_type_printers): Add constructor and
10612         destructor.
10613         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10614         declare.
10615         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10616         Now a constructor; rename from start_ext_lang_type_printers.
10617         (ext_lang_type_printers): Now a destructor; rename from
10618         free_ext_lang_type_printers.
10619         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10620         Update.
10621         (c_type_print_base_struct_union): Update.  Remove cleanups.
10622
10623 2018-03-27  Tom Tromey  <tom@tromey.com>
10624
10625         * dwarf-index-write.c: Include <cmath>.
10626
10627 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10628
10629         * NEWS: Add entry describing new "set|show varsize-limit" command.
10630         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10631         command.
10632         * printcmd.c (_initialize_printcmd): Add "set var" alias of
10633         "set variable".
10634
10635 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
10636
10637         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10638         dwarf-index-write.c
10639         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10640         * dwarf-index-common.c: New file.
10641         * dwarf-index-common.h: New file.
10642         * dwarf-index-write.c: New file.
10643         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10644         (struct dwarf2_section_info): Move from here.
10645         (dwarf2_section_info_def): Likewise.
10646         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10647         (offset_type): Likewise.
10648         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10649         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10650         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10651         (byte_swap): Likewise.
10652         (MAYBE_SWAP): Likewise.
10653         (dwarf2_per_cu_ptr): Likewise.
10654         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10655         (struct tu_stats): Likewise.
10656         (struct dwarf2_per_objfile): Likewise.
10657         (struct dwarf2_per_cu_data): Likewise.
10658         (struct signatured_type): Likewise.
10659         (sig_type_ptr): Likewise.
10660         (DEF_VEC_P (sig_type_ptr)): Likewise.
10661         (INDEX4_SUFFIX): Likewise.
10662         (INDEX5_SUFFIX): Likewise.
10663         (DEBUG_STR_SUFFIX): Likewise.
10664         (dwarf2_read_section): Make non-static.
10665         (mapped_index_string_hash): Move from here.
10666         (dwarf5_djb_hash): Likewise.
10667         (file_write): Likewise.
10668         (class data_buf): Likewise.
10669         (struct symtab_index_entry): Likewise.
10670         (struct mapped_symtab): Likewise.
10671         (find_slot): Likewise.
10672         (hash_expand): Likewise.
10673         (add_index_entry): Likewise.
10674         (uniquify_cu_indices): Likewise.
10675         (class c_str_view): Likewise.
10676         (class c_str_view_hasher): Likewise.
10677         (class vector_hasher): Likewise.
10678         (write_hash_table): Likewise.
10679         (psym_index_map): Likewise.
10680         (struct addrmap_index_data): Likewise.
10681         (add_address_entry): Likewise.
10682         (add_address_entry_worker): Likewise.
10683         (write_address_map): Likewise.
10684         (symbol_kind): Likewise.
10685         (write_psymbols): Likewise.
10686         (struct signatured_type_index_data): Likewise.
10687         (write_one_signatured_type): Likewise.
10688         (recursively_count_psymbols): Likewise.
10689         (recursively_write_psymbols): Likewise.
10690         (class debug_names): Likewise.
10691         (check_dwarf64_offsets): Likewise.
10692         (psyms_seen_size): Likewise.
10693         (write_gdbindex): Likewise.
10694         (write_debug_names): Likewise.
10695         (assert_file_size): Likewise.
10696         (write_psymtabs_to_index): Likewise.
10697         (save_gdb_index_command): Likewise.
10698         (_initialize_dwarf2_read): Don't register the "save gdb-index"
10699         command.
10700         * dwarf2read.h: New file.
10701
10702 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10703
10704         PR gdb/22670
10705         * dwarf2read.c (dwarf2_physname): Do not return the demangled
10706         symbol name if the CU's language stores symbol names in linkage
10707         format.
10708         * language.h (struct language_defn)
10709         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
10710         all instances of this struct.
10711
10712 2018-03-26  Tom Tromey  <tom@tromey.com>
10713
10714         * stack.c (backtrace_command_1): Remove verbose code.
10715
10716 2018-03-26  Tom Tromey  <tom@tromey.com>
10717
10718         * python/py-framefilter.c (py_print_type): Don't catch
10719         exceptions.  Return void.
10720         (py_print_value): Likewise.
10721         (py_print_single_arg): Likewise.
10722         (enumerate_args): Don't catch exceptions.
10723         (py_print_args): Likewise.
10724         (py_print_frame): Likewise.
10725         (gdbpy_apply_frame_filter): Catch exceptions here.
10726
10727 2018-03-26  Tom Tromey  <tom@tromey.com>
10728
10729         * stack.c (_initialize_stack): Remove trailing newlines from help
10730         text.  Add "Usage" line to "backtrace" help.
10731
10732 2018-03-26  Tom Tromey  <tom@tromey.com>
10733
10734         PR python/16486:
10735         * python/py-framefilter.c (py_print_args): Call wrap_hint.
10736
10737 2018-03-26  Tom Tromey  <tom@tromey.com>
10738
10739         * python/py-framefilter.c (py_print_single_arg): Return
10740         EXT_LANG_BT_ERROR from catch.
10741
10742 2018-03-26  Tom Tromey  <tom@tromey.com>
10743
10744         PR backtrace/15584:
10745         * stack.c (backtrace_command_1): Move some code into no-filters
10746         "if".
10747
10748 2018-03-26  Tom Tromey  <tom@tromey.com>
10749
10750         * python/py-framefilter.c (throw_quit_or_print_exception): New
10751         function.
10752         (gdbpy_apply_frame_filter): Use it.
10753
10754 2018-03-26  Tom Tromey  <tom@tromey.com>
10755
10756         PR cli/17716:
10757         * python/py-framefilter.c (py_print_type, py_print_value)
10758         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10759         RETURN_MASK_ERROR.
10760
10761 2018-03-26  Tom Tromey  <tom@tromey.com>
10762
10763         * python/py-framefilter.c (enumerate_args): Use
10764         gdb::unique_xmalloc_ptr.
10765
10766 2018-03-26  Tom Tromey  <tom@tromey.com>
10767
10768         * python/py-framefilter.c (py_print_frame): Return
10769         EXT_LANG_BT_OK.
10770         (gdbpy_apply_frame_filter): Update comment.
10771         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10772         Remove.
10773         <EXT_LANG_BT_NO_FILTERS>: Change value.
10774
10775 2018-03-26  Tom Tromey  <tom@tromey.com>
10776
10777         PR backtrace/15582:
10778         * stack.c (backtrace_command): Parse "hide" argument.
10779         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10780         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10781         constant.
10782
10783 2018-03-26  Tom Tromey  <tom@tromey.com>
10784
10785         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10786         add "flags".
10787         (backtrace_command): Remove "fulltrace", add "flags".
10788
10789 2018-03-26  Tom Tromey  <tom@tromey.com>
10790
10791         * stack.c (backtrace_command): Rewrite command line parsing.
10792
10793 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10794
10795         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10796
10797 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10798
10799         * filename-seen-cache.h: Add include guard.
10800
10801 2018-03-26  Keith Seitz  <keiths@redhat.com>
10802
10803         * symfile.c (place_section): Remove "struct" from section_addr_info
10804         in comment.
10805         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10806         "struct" keyword from section_addr_info.
10807
10808 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
10809
10810         * regformats/regdef.h (reg): Add constructors.
10811
10812 2018-03-25  Pedro Alves  <palves@redhat.com>
10813
10814         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10815         if then/else bodies in var_func_name extraction.
10816
10817 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
10818
10819         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10820         lookup_minimal_symbol() to find symbol entry.
10821         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10822
10823 2018-03-23  Keith Seitz  <keiths@redhat.com>
10824
10825         PR c++/22968
10826         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10827         nested type definitions for C++, too.
10828
10829 2018-03-23  Tom Tromey  <tom@tromey.com>
10830
10831         * machoread.c (struct oso_el): Add a constructor.  Don't define as
10832         a typedef.
10833         (macho_register_oso): Remove.
10834         (macho_symtab_read): Take a std::vector.
10835         (oso_el_compare_name): Now a std::sort comparator.
10836         (macho_symfile_read_all_oso): Take a std::vector.
10837         (macho_symfile_read): Use std::vector.  Remove cleanups.
10838
10839 2018-03-22  Tom Tromey  <tom@tromey.com>
10840
10841         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
10842         (record_full_goto_bookmark): Use std::string.
10843
10844 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10845
10846         PR tdep/18295
10847         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
10848         a single mask.
10849
10850 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10851
10852         * rs6000-tdep.c (store_insn_p): New function.
10853         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
10854         and cr_reg to their unshifted values. Use store_insn_p to
10855         match LR saves using either R1 or fdata->alloca_reg. Use
10856         store_insn_p to match CR saves. Set alloca_reg_offset
10857         when alloca_reg and framep are set. Remove lr_reg shift
10858         when assigning to fdata->lr_register.
10859
10860 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10861
10862         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
10863         command line args instead of emitting a warning.
10864
10865 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10866
10867         * tracepoint.h (struct static_tracepoint_marker): Initialize
10868         fields, define default constructor, move constructor and move
10869         assignment, disable the rest.
10870         <str_id, extra>: Make std::string.
10871         (release_static_tracepoint_marker): Remove.
10872         (free_current_marker): Remove.
10873         * tracepoint.c (free_current_marker): Remove.
10874         (parse_static_tracepoint_marker_definition): Adjust to
10875         std::string, use new hex2str overload.
10876         (release_static_tracepoint_marker): Remove.
10877         (print_one_static_tracepoint_marker): Get marker by reference
10878         and adjust to std::string.
10879         (info_static_tracepoint_markers_command): Adjust to std::vector
10880         changes
10881         * target.h (static_tracepoint_marker_p): Remove typedef.
10882         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
10883         (struct target_ops) <to_static_tracepoint_marker_at>: Return
10884         bool.
10885         <to_static_tracepoint_markers_by_strid>: Return std::vector.
10886         * target-debug.h
10887         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
10888         (target_debug_print_std_vector_static_tracepoint_marker): New.
10889         (target_debug_print_struct_static_tracepoint_marker_p): Rename
10890         to...
10891         (target_debug_print_static_tracepoint_marker_p): ... this.
10892         * target-delegates.c: Re-generate.
10893         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
10894         Make std::string.
10895         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
10896         (decode_static_tracepoint_spec): Adjust to std::vector.
10897         (tracepoint_print_one_detail): Adjust to std::string.
10898         (strace_marker_decode_location): Adjust to std::string.
10899         (update_static_tracepoint): Adjust to std::string, remove call
10900         to release_static_tracepoint_marker.
10901         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
10902         Adjust to std::vector.
10903         * remote.c (remote_static_tracepoint_marker_at): Return bool.
10904         (remote_static_tracepoint_markers_by_strid): Adjust to
10905         std::vector.
10906         * common/rsp-low.h (hex2str): New overload with explicit count
10907         of bytes.
10908         * common/rsp-low.c (hex2str): New overload with explicit count
10909         of bytes.
10910         * unittests/rsp-low-selftests.c (test_hex2str): New function.
10911         (_initialize_rsp_low_selftests): Add test_hex2str test.
10912         * unittests/tracepoint-selftests.c
10913         (test_parse_static_tracepoint_marker_definition): Adjust to
10914         std::string.
10915
10916 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
10917
10918         * tracepoint.c (parse_static_tracepoint_marker_definition):
10919         Consider case where the definition is followed by more
10920         definitions.
10921         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10922         tracepoint-selftests.c.
10923         * unittests/tracepoint-selftests.c: New.
10924
10925 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
10926
10927         * MAINTAINERS (Write After Approval): Add Pedro Franco de
10928         Carvalho.
10929
10930 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10931
10932         * symtab.c (find_pc_sect_line): fixed indentation.
10933
10934 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
10935
10936         * symtab.c (find_pc_sect_line): now uses binary search.
10937
10938 2018-03-19  Tom Tromey  <tom@tromey.com>
10939
10940         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
10941         "IDENT" production.
10942
10943 2018-03-19  Pedro Alves  <palves@redhat.com>
10944             Tom Tromey  <tom@tromey.com>
10945
10946         * unittests/observable-selftests.c: New file.
10947         * common/observable.h: New file.
10948         * observable.h: New file.
10949         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
10950         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
10951         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
10952         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
10953         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
10954         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
10955         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
10956         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
10957         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
10958         python/py-breakpoint.c, python/py-finishbreakpoint.c,
10959         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
10960         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
10961         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
10962         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
10963         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
10964         tui/tui-interp.c, valops.c: Update all users.
10965         * tui/tui-hooks.c (tui_bp_created_observer)
10966         (tui_bp_deleted_observer, tui_bp_modified_observer)
10967         (tui_inferior_exit_observer, tui_before_prompt_observer)
10968         (tui_normal_stop_observer, tui_register_changed_observer):
10969         Remove.
10970         (tui_observers_token): New global.
10971         (attach_or_detach, tui_attach_detach_observers): New functions.
10972         (tui_install_hooks, tui_remove_hooks): Use
10973         tui_attach_detach_observers.
10974         * record-btrace.c (record_btrace_thread_observer): Remove.
10975         (record_btrace_thread_observer_token): New global.
10976         * observer.sh: Remove.
10977         * observer.c: Rename to observable.c.
10978         * observable.c (namespace gdb_observers): Define new objects.
10979         (observer_debug): Move into gdb_observers namespace.
10980         (struct observer, struct observer_list, xalloc_observer_list_node)
10981         (xfree_observer_list_node, generic_observer_attach)
10982         (generic_observer_detach, generic_observer_notify): Remove.
10983         (_initialize_observer): Update.
10984         Don't include observer.inc.
10985         * Makefile.in (generated_files): Remove observer.h, observer.inc.
10986         (clean mostlyclean): Likewise.
10987         (observer.h, observer.inc): Remove targets.
10988         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
10989         (COMMON_SFILES): Use observable.c, not observer.c.
10990         * .gitignore: Remove observer.h.
10991
10992 2018-03-18  Tom Tromey  <tom@tromey.com>
10993
10994         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
10995         gdb::def_vector.
10996         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
10997
10998 2018-03-17  Tom Tromey  <tom@tromey.com>
10999
11000         * auto-load.c (auto_load_objfile_script_1): Use std::string.
11001
11002 2018-03-17  Tom Tromey  <tom@tromey.com>
11003
11004         * target.c (class scoped_target_fd): New.
11005         (target_fileio_close_cleanup): Remove.
11006         (target_fileio_read_alloc_1): Use scoped_target_fd.
11007
11008 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
11009
11010         * silent-rules.mk: New.
11011         * Makefile.in: Include silent-rules.mk
11012         (srcdir, VPATH, top_srcdir): Move up.
11013         (COMPILE): Add ECHO_CXX.
11014         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11015         (init.c): Add ECHO_INIT_C.
11016         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11017         (version.c): Add ECHO_GEN.
11018         (printcmd.o): Add ECHO_CXX.
11019         (target-float.o): Add ECHO_CXX.
11020         (ada-exp.o): Add ECHO_CXX.
11021         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11022         (insight$(EXEEXT)): Add ECHO_CXXLD.
11023         * gnulib/configure.ac: Add AM_SILENT_RULES.
11024         * gnulib/aclocal.m4: Re-generate.
11025         * gnulib/configure: Re-generate.
11026         * gnulib/import/Makefile.in: Re-generate.
11027
11028 2018-03-16  Tom Tromey  <tom@tromey.com>
11029
11030         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11031         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11032         * utils.c (do_free_section_addr_info)
11033         (make_cleanup_free_section_addr_info): Remove.
11034         * symfile.h (struct other_sections): Add constructor.
11035         (struct section_addr_info): Remove.
11036         (section_addr_info): New typedef.
11037         (struct sym_fns) <sym_offsets>: Change type of parameter.
11038         (build_section_addr_info_from_objfile)
11039         (relative_addr_info_to_section_offsets, addr_info_make_relative)
11040         (default_symfile_offsets, symbol_file_add)
11041         (symbol_file_add_from_bfd)
11042         (build_section_addr_info_from_section_table): Update.
11043         (alloc_section_addr_info, free_section_addr_info): Don't declare.
11044         * symfile.c (alloc_section_addr_info): Remove.
11045         (build_section_addr_info_from_section_table): Change return type.
11046         Update.
11047         (build_section_addr_info_from_bfd)
11048         (build_section_addr_info_from_objfile): Likewise.
11049         (free_section_addr_info): Remove.
11050         (relative_addr_info_to_section_offsets): Change type of "addrs".
11051         (addrs_section_compar): Now a std::sort comparator.
11052         (addrs_section_sort): Change return type.
11053         (addr_info_make_relative): Change type of "addrs".  Update.
11054         (default_symfile_offsets, syms_from_objfile_1)
11055         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11056         (symbol_file_add_separate): Update.
11057         (symbol_file_add): Change type of "addrs".  Update.
11058         (add_symbol_file_command): Update.  Remove cleanups.
11059         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
11060         cleanups.
11061         * symfile-debug.c (debug_sym_offsets): Change type of "info".
11062         * solib.c (solib_read_symbols): Update.
11063         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
11064         * machoread.c (macho_symfile_offsets): Update.
11065         * jit.c (jit_bfd_try_read_symtab): Update.
11066
11067 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
11068
11069         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11070         unittests/utils-selftests.c.
11071         * unittests/utils-selftests.c: New file.
11072
11073 2018-03-14  Tom Tromey  <tom@tromey.com>
11074
11075         PR cli/14977:
11076         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11077         for NULL.
11078
11079 2018-03-14  Tom Tromey  <tom@tromey.com>
11080
11081         PR cli/19918:
11082         * printcmd.c (printf_pointer): Allow "-" in format.
11083
11084 2018-03-14  Tom Tromey  <tom@tromey.com>
11085
11086         * printcmd.c (_initialize_printcmd): Add usage to printf.
11087
11088 2018-03-14  Yao Qi  <qiyao@sourceware.org>
11089
11090         * MAINTAINERS: Update my email address.
11091
11092 2018-03-13  Tom Tromey  <tom@tromey.com>
11093
11094         * machoread.c (macho_check_dsym): Change filenamep to a
11095         std::string*.
11096         (macho_symfile_read): Update.
11097         * symfile.c (load_command): Use std::string.
11098
11099 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11100
11101         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11102         to error message string.
11103         (riscv_register_name): Use xsnprintf instead of sprintf.
11104         (riscv_insn::fetch_instruction): Use gdb_assert instead of
11105         internal_error.
11106         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11107         error.
11108         (riscv_push_dummy_call): Likewise.
11109
11110 2018-03-12  Tom Tromey  <tom@tromey.com>
11111
11112         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11113         Use gdb::byte_vector.
11114         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11115
11116 2018-03-12  Yao Qi  <yao.qi@linaro.org>
11117
11118         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11119         parameter type to readable_regcache.
11120         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11121         the declaration.
11122
11123 2018-03-11  Tom Tromey  <tom@tromey.com>
11124
11125         * dwarf2read.c (struct nextfield): Add initializers.
11126         (struct nextfnfield): Remove.
11127         (struct fnfieldlist): Add initializers.  Remove "length" and
11128         "head", use std::vector.
11129         (struct decl_field_list): Remove.
11130         (struct field_info): Add initializers.
11131         <fields, baseclasses>: Now std::vector.
11132         <nbaseclasses, nfnfields, typedef_field_list_count,
11133         nested_types_list_count>: Remove.
11134         (dwarf2_add_field, dwarf2_add_type_defn)
11135         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11136         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11137         (process_structure_scope): Update.
11138
11139 2018-03-11  Tom Tromey  <tom@tromey.com>
11140
11141         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11142         for use by std::sort.
11143         (build_type_psymtabs_1): Use std::vector.
11144
11145 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
11146
11147         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11148         and LIBMPFR in the printed configuration.
11149
11150 2018-03-08  Tom Tromey  <tom@tromey.com>
11151
11152         * source.c (get_filename_and_charpos): Use scoped_fd.
11153         * nto-procfs.c (procfs_open_1): Use scoped_fd.
11154         (procfs_pidlist): Likewise.
11155         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11156         (iterate_over_mappings): Likewise.
11157
11158 2018-03-08  Tom Tromey  <tom@tromey.com>
11159
11160         * infcall.c (struct call_return_meta_info)
11161         <stack_temporaries_enabled>: Remove.
11162         (get_call_return_value, call_function_by_hand_dummy): Update.
11163         * thread.c (disable_thread_stack_temporaries): Remove.
11164         (enable_thread_stack_temporaries): Remove.
11165         (thread_stack_temporaries_enabled_p): Return bool.
11166         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11167         (get_last_thread_stack_temporary): Update.
11168         * eval.c (evaluate_subexp): Update.
11169         * gdbthread.h (class enable_thread_stack_temporaries): Now a
11170         class, not a function.
11171         (value_ptr, value_vec): Remove typedefs.
11172         (class thread_info) <stack_temporaries_enabled>: Now bool.
11173         <stack_temporaries>: Now a std::vector.
11174         (thread_stack_temporaries_enabled_p)
11175         (value_in_thread_stack_temporaries): Return bool.
11176
11177 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
11178
11179         * remote.c (putpkt_binary): Fix omitted bytes reporting.
11180         (getpkt_or_notif_sane_1): Likewise.
11181
11182 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11183
11184         * build-id.c (build_id_to_debug_bfd): Use std::string.
11185
11186 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11187
11188         * build-id.c (find_separate_debug_file_by_buildid): Return
11189         std::string.
11190         * build-id.h (find_separate_debug_file_by_buildid): Return
11191         std::string.
11192         * coffread.c (coff_symfile_read): Adjust to std::string.
11193         * elfread.c (elf_symfile_read): Adjust to std::string.
11194         * symfile.c (separate_debug_file_exists): Change parameter to
11195         std::string.
11196         (find_separate_debug_file): Return std::string.
11197         (find_separate_debug_file_by_debuglink): Return std::string.
11198         * symfile.h (find_separate_debug_file_by_debuglink): Return
11199         std::string.
11200
11201 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11202
11203         * common/xml-utils.c (xml_escape_text): Move code to...
11204         (xml_escape_text_append): ... this new function.
11205         * common/xml-utils.h (xml_escape_text_append): New declaration.
11206         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11207         New function.
11208         (_initialize_xml_utils): register test_xml_escape_text_append as
11209         a selftest.
11210
11211 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
11212
11213         * defs.h: Remove MAX_REGISTER_SIZE.
11214         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11215         asserts.
11216         * python/py-unwind.c (pyuw_sniffer): Likewise.
11217
11218 2018-03-07  Tom Tromey  <tom@tromey.com>
11219
11220         * linux-tdep.c (linux_info_proc): Update.
11221         * target.h (struct target_ops) <to_fileio_readlink>: Return
11222         optional<string>.
11223         (target_fileio_readlink): Return optional<string>.
11224         * remote.c (remote_hostio_readlink): Return optional<string>.
11225         * inf-child.c (inf_child_fileio_readlink): Return
11226         optional<string>.
11227         * target.c (target_fileio_readlink): Return optional<string>.
11228
11229 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
11230
11231         * regcache.c (cooked_read_test): Add riscv to the list of
11232         architectures that have a save_reggroup.
11233
11234 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11235
11236         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11237         value is not a dynamic class object.
11238
11239 2018-03-06  Tom Tromey  <tom@tromey.com>
11240
11241         * rust-exp.y: Formatting fixes.
11242
11243 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11244
11245         * riscv-tdep.c (riscv_register_name): Remove target description
11246         support.
11247         (riscv_gdbarch_init): Remove target description check.
11248
11249 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11250
11251         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11252         comment.
11253         * riscv-tdep.h: Likewise.
11254
11255 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11256
11257         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11258         (riscv_pseudo_register_write): Delete.
11259         (riscv_gdbarch_init): Remove all use of pseudo registers.
11260
11261 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11262
11263         * record-btrace.c (btrace_print_lines): Replace cleanup
11264         parameter with RAII equivalents.
11265         (btrace_insn_history): Replace cleanup with RAII equivalents.
11266         * ui-out.h (make_cleanup_ui_out_list_begin_end,
11267         make_cleanup_ui_out_tuple_begin_end): Remove.
11268         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11269         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11270         make_cleanup_ui_out_list_begin_end): Remove.
11271
11272 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11273
11274         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11275         parameter types to std::vector.  Use bool.
11276         (record_btrace_wait): Replace VEC(tp_t) with
11277         std::vector<thread_info *>.
11278         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11279
11280 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11281
11282         * record-btrace.c (record_btrace_disable_callback): Remove.
11283         (struct scoped_btrace_disable): New.
11284         (record_btrace_open): Use scoped_btrace_disable.
11285
11286 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11287
11288         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11289         reading values from registers.
11290
11291 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11292
11293         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11294         where appropriate.
11295
11296 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11297
11298         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11299         change parameter type.  Use GDB's print functions, and use
11300         core_addr_to_string where appropriate.
11301         (riscv_push_dummy_call): Use core_addr_to_string where
11302         appropriate, update call to riscv_print_arg_location, and reindent
11303         a few lines.
11304         (riscv_return_value): Update call to riscv_print_arg_location.
11305
11306 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11307             Tim Newsome <tim@sifive.com>
11308             Albert Ou <a0u@eecs.berkeley.edu>
11309             Darius Rad <darius@bluespec.com>
11310
11311         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11312         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11313         (ALLDEPFILES): Add riscv-tdep.c
11314         * configure.tgt: Add riscv support.
11315         * riscv-tdep.c: New file.
11316         * riscv-tdep.h: New file.
11317         * NEWS: Mention new target.
11318         * MAINTAINERS: Add entry for riscv.
11319
11320 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11321
11322         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11323         fields within aggregates.
11324
11325 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
11326
11327         * record-btrace.c (btrace_print_lines): Change type of flags to
11328         gdb_disassembly_flags.
11329
11330 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11331
11332         * fbsd-nat.c: Include "inf-ptrace.h".
11333         (USE_SIGTRAP_SIGINFO): Conditionally define.
11334         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11335         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11336         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11337         function.
11338         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11339         Likewise.
11340         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11341         Likewise.
11342         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11343         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11344         "supports_stopped_by_hw_breakpoint" target methods.
11345
11346 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11347
11348         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11349         * fbsd-nat.c (debug_fbsd_nat): New variable.
11350         (show_fbsd_nat_debug): New function.
11351         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11352         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11353
11354 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11355
11356         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11357         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11358         prototype.
11359         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11360         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11361         method.
11362
11363 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11364
11365         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11366         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11367
11368 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11369
11370         * charset.c (struct charset_vector): New.
11371         (charsets): Change type to charset_vector.
11372         (find_charset_names): Adjust.
11373         (add_one): Adjust.
11374         (_initialize_charset): Adjust.
11375
11376 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11377
11378         * progspace.h (struct program_space) <deleted_solibs>: Change
11379         type to std::vector<std::string>.
11380         * progspace.c (clear_program_space_solib_cache): Adjust.
11381         * breakpoint.c (print_solib_event): Adjust.
11382         (check_status_catch_solib): Adjust.
11383         * solib.c (update_solib_list): Adjust.
11384         * ui-out.h (class ui_out) <field_string>: New overload.
11385         * ui-out.c (ui_out::field_string): New overload.
11386
11387 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11388
11389         * progspace.h (struct program_space): Add constructor and
11390         destructor, initialize fields.
11391         (add_program_space): Remove.
11392         * progspace.c (add_program_space): Rename to...
11393         (program_space::program_space): ... this.
11394         (release_program_space): Rename to...
11395         (program_space::~program_space): ... this.
11396         (delete_program_space): Use delete to delete program_space.
11397         (initialize_progspace): Use new to allocate program_space.
11398         * inferior.c (add_inferior_with_spaces): Likewise.
11399         (clone_inferior_command): Likewise.
11400         * infrun.c (follow_fork_inferior): Likewise.
11401         (handle_vfork_child_exec_or_exit): Likewise.
11402
11403 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11404
11405         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11406         (delim_string_to_char_ptr_vec): Return std::vector of
11407         gdb::unique_xmalloc_ptr.
11408         (dirnames_to_char_ptr_vec_append): Take std::vector of
11409         gdb::unique_xmalloc_ptr.
11410         (dirnames_to_char_ptr_vec): Return std::vector of
11411         gdb::unique_xmalloc_ptr.
11412         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11413         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11414         (delim_string_to_char_ptr_vec): Return an std::vector of
11415         gdb::unique_xmalloc_ptr, adjust the code.
11416         (dirnames_to_char_ptr_vec_append): Take an std::vector of
11417         gdb::unique_xmalloc_ptr, adjust the code.
11418         (dirnames_to_char_ptr_vec): Return an std::vector of
11419         gdb::unique_xmalloc_ptr, adjust the code.
11420         * auto-load.c (auto_load_safe_path_vec): Change type to
11421         std::vector of gdb::unique_xmalloc_ptr.
11422         (auto_load_expand_dir_vars): Return an std::vector of
11423         gdb::unique_xmalloc_ptr, adjust the code.
11424         (auto_load_safe_path_vec_update): Adjust.
11425         (filename_is_in_auto_load_safe_path_vec): Adjust.
11426         (auto_load_objfile_script_1): Adjust.
11427         * build-id.c (build_id_to_debug_bfd): Adjust.
11428         * linux-thread-db.c (thread_db_load_search): Adjust.
11429         * source.c (add_path): Adjust.
11430         (openp): Adjust.
11431         * symfile.c (find_separate_debug_file): Adjust.
11432         * utils.c (do_free_char_ptr_vec): Remove.
11433         (make_cleanup_free_char_ptr_vec): Remove.
11434
11435 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
11436
11437         PR gdb/22907
11438         * common/pathstuff.c: Conditionally include "<windows.h>".
11439
11440 2018-03-01  Georg Sauthoff  <mail@georg.so>
11441
11442         PR gdb/22888
11443         * gcore.in: Quote variables and switch interpreter to bash.
11444
11445 2018-03-01  Tom Tromey  <tom@tromey.com>
11446
11447         * dwarf2read.c (alloc_discriminant_info): Fix default_index
11448         assertion.  Add assertion for discriminant_index.
11449         (quirk_rust_enum): Use correct base type name in univariant case.
11450
11451 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
11452
11453         * record.c (get_call_history_modifiers): Return a
11454         record_print_flags.
11455         (cmd_record_call_history): Adjust.
11456         * record-btrace.c (record_btrace_call_history): Adjust.
11457         (record_btrace_call_history_range): Adjust.
11458         (record_btrace_call_history_from): Adjust.
11459         * target-debug.h (target_debug_print_record_print_flags): New.
11460         * target-delegates.c: Re-generate.
11461         * target.c (target_call_history): Change flags type.
11462         (target_call_history_from): Likewise.
11463         (target_call_history_range): Likewise.
11464         * target.h (struct target_ops) <target_call_history>: Likewise.
11465         (target_call_history_from): Likewise.
11466         (target_call_history_range): Likewise.
11467
11468 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11469             Simon Marchi  <simon.marchi@polymtl.ca>
11470
11471         * common/common-utils.c: Include "sys/stat.h".
11472         (is_regular_file): Move here from "source.c"; change return
11473         type to "bool".
11474         * common/common-utils.h (is_regular_file): New prototype.
11475         * common/pathstuff.c (contains_dir_separator): New function.
11476         * common/pathstuff.h (contains_dir_separator): New prototype.
11477         * source.c: Don't include "sys/stat.h".
11478         (is_regular_file): Move to "common/common-utils.c".
11479
11480 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11481
11482         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11483         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11484         * auto-load.c: Include "common/pathstuff.h".
11485         * common/common-def.h (current_directory): Move here.
11486         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11487         function.
11488         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11489         prototype.
11490         * common/pathstuff.c: New file.
11491         * common/pathstuff.h: New file.
11492         * compile/compile.c: Include "common/pathstuff.h".
11493         * defs.h (current_directory): Move to "common/common-defs.h".
11494         * dwarf2read.c: Include "common/pathstuff.h".
11495         * exec.c: Likewise.
11496         * guile/scm-safe-call.c: Likewise.
11497         * linux-thread-db.c: Likewise.
11498         * main.c: Likewise.
11499         * nto-tdep.c: Likewise.
11500         * objfiles.c: Likewise.
11501         * source.c: Likewise.
11502         * symtab.c: Likewise.
11503         * utils.c: Include "common/pathstuff.h".
11504         (gdb_realpath): Move to "common/pathstuff.c".
11505         (gdb_realpath_keepfile): Likewise.
11506         (gdb_abspath): Likewise.
11507         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11508         (gdb_realpath_keepfile): Likewise.
11509         (gdb_abspath): Likewise.
11510
11511 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
11512
11513         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11514         wildcard process pid for super_resume for kernels with a
11515         specific bug.
11516
11517 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
11518
11519         * compile/compile.c (get_args): Add additional comments
11520         explaining function.
11521
11522 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
11523             Tom Tromey  <tom@tromey.com>
11524
11525         * target.h (memory_write_request_s): Remove typedef.  Don't define
11526         VEC.
11527         (target_write_memory_blocks): Change argument to std::vector.
11528         (struct memory_write_request): Add constructor.
11529         * target-memory.c (compare_block_starting_address): Return bool.
11530         Change argument types.
11531         (claim_memory): Change arguments to use std::vector.
11532         (split_regular_and_flash_blocks, blocks_to_erase)
11533         (compute_garbled_blocks): Likewise.
11534         (cleanup_request_data, cleanup_write_requests_vector): Remove.
11535         (target_write_memory_blocks): Change argument to std::vector.
11536         * symfile.c (struct load_section_data): Add constructor and
11537         destructor.  Use std::vector for "requests".
11538         (struct load_progress_data): Add initializers.
11539         (load_section_callback): Update.  Use "new".
11540         (clear_memory_write_data): Remove.
11541         (generic_load): Update.
11542
11543 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
11544
11545         * arch/aarch64.h: Use common/tdesc.h.
11546
11547 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11548
11549         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11550         architecture with a 64-bit ABI.
11551
11552 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11553
11554         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11555         ahead of target description loading.
11556
11557 2018-02-26  Tom Tromey  <tom@tromey.com>
11558
11559         * stack.c (backtrace_command_1): Update.
11560         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11561         of "flags".
11562         * python/py-framefilter.c (py_print_frame)
11563         (gdbpy_apply_frame_filter): Change type of "flags".
11564         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11565         of "flags".
11566         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11567         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11568         * extension.h (enum frame_filter_flag): Rename from
11569         frame_filter_flags.
11570         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11571         (apply_ext_lang_frame_filter): Change type of "flags".
11572         * extension.c (apply_ext_lang_frame_filter): Change type of
11573         "flags".
11574         * extension-priv.h (struct extension_language_ops)
11575         <apply_frame_filter>: Change type of "flags".
11576
11577 2018-02-26  Tom Tromey  <tom@tromey.com>
11578
11579         PR python/16497:
11580         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11581         off-by-one in py_end computation.
11582         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11583         PRINT_MORE_FRAMES.
11584         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11585         constant.
11586
11587 2018-02-26  Tom Tromey  <tom@tromey.com>
11588
11589         * dwarf2read.c (struct variant_field): New.
11590         (struct nextfield) <variant>: New field.
11591         (dwarf2_add_field): Handle DW_TAG_variant_part.
11592         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11593         discriminated union.
11594         (read_structure_type): Handle DW_TAG_variant_part.
11595         (handle_struct_member_die): New function, extracted from
11596         process_structure_scope.  Handle DW_TAG_variant.
11597         (process_structure_scope): Handle discriminated unions.  Call
11598         handle_struct_member_die.
11599
11600 2018-02-26  Tom Tromey  <tom@tromey.com>
11601
11602         * rust-lang.h (rust_last_path_segment): Declare.
11603         * rust-lang.c (rust_last_path_segment): Now public.  Change
11604         contract.
11605         (struct disr_info): Remove.
11606         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11607         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11608         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11609         (rust_enum_p, rust_enum_variant): New function.
11610         (rust_underscore_fields): Remove "offset" parameter.
11611         (rust_print_enum): New function.
11612         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11613         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11614         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
11615         enums.
11616         (rust_internal_print_type): New function, from rust_print_type.
11617         Remove enum code.
11618         (rust_print_type): Call rust_internal_print_type.
11619         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11620         Update enum handling.
11621         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11622         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11623         (rust_union_quirks): New functions.
11624         (process_full_comp_unit, process_full_type_unit): Call
11625         rust_union_quirks.
11626         (process_structure_scope): Update rust_unions if necessary.
11627
11628 2018-02-26  Tom Tromey  <tom@tromey.com>
11629
11630         * value.h (value_union_variant): Declare.
11631         * valops.c (value_union_variant): New function.
11632         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11633         (struct discriminant_info): New.
11634         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11635         enumerator.
11636         (struct main_type) <flag_discriminated_union>: New field.
11637
11638 2018-02-26  Tom Tromey  <tom@tromey.com>
11639
11640         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11641         unittests/unpack-selftests.c.
11642         * unittests/unpack-selftests.c: New file.
11643         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11644
11645 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11646
11647         * dwarf2read.c (struct partial_die_info) <read>: New method.
11648         (read_partial_die): Remove the declaration.
11649         (load_partial_dies): Update.
11650         (partial_die_info::partial_die_info):
11651         (read_partial_die): Change it to partial_die_info::read.
11652
11653 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11654
11655         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11656         (fixup_partial_die): Remove declaration.
11657         (scan_partial_symbols): Update.
11658         (partial_die_parent_scope): Likewise.
11659         (partial_die_full_name): Likewise.
11660         (fixup_partial_die): Change it to partial_die_info::fixup.
11661
11662 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11663
11664         * dwarf2read.c (read_partial_die): Update the declaration.
11665         (load_partial_dies): Caller update.
11666         (read_partial_die): Remove one argument abbrev_len.
11667
11668 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11669
11670         * dwarf2read.c (struct partial_die_info): Add ctor, delete
11671         assignment operator.
11672         (load_partial_dies): Use ctor and copy ctor.
11673         (read_partial_die): Update.
11674         (dwarf2_cu::find_partial_die): Use ctor.
11675
11676 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11677
11678         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11679         (find_partial_die_in_comp_unit): Change it to
11680         dwarf2_cu::find_partial_die.
11681         (find_partial_die): Update.
11682
11683 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11684
11685         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11686         is NULL.
11687
11688 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11689
11690         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11691
11692 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
11693
11694         * arch/amd64.h: Use common/tdesc.h.
11695         * arch/i386.c: Likewise.
11696         * arch/i386.h: Likewise.
11697         * arch/tic6x.c: Likewise.
11698         * arch/tdesc.h: Move file from here...
11699         * common/tdesc.h: ...to here.
11700         * features/aarch64-core.c: Regenerate.
11701         * features/aarch64-fpu.c: Regenerate.
11702         * features/i386/32bit-avx.c: Regenerate.
11703         * features/i386/32bit-avx512.c: Regenerate.
11704         * features/i386/32bit-core.c: Regenerate.
11705         * features/i386/32bit-linux.c: Regenerate.
11706         * features/i386/32bit-mpx.c: Regenerate.
11707         * features/i386/32bit-pkeys.c: Regenerate.
11708         * features/i386/32bit-sse.c: Regenerate.
11709         * features/i386/64bit-avx.c: Regenerate.
11710         * features/i386/64bit-avx512.c: Regenerate.
11711         * features/i386/64bit-core.c: Regenerate.
11712         * features/i386/64bit-linux.c: Regenerate.
11713         * features/i386/64bit-mpx.c: Regenerate.
11714         * features/i386/64bit-pkeys.c: Regenerate.
11715         * features/i386/64bit-segments.c: Regenerate.
11716         * features/i386/64bit-sse.c: Regenerate.
11717         * features/i386/x32-core.c: Regenerate.
11718         * features/tic6x-c6xp.c: Regenerate.
11719         * features/tic6x-core.c: Regenerate.
11720         * features/tic6x-gp.c: Regenerate.
11721         * target-descriptions.c: Use common/tdesc.h.
11722         * target-descriptions.h: Likewise.
11723
11724 2018-02-24  Tom Tromey  <tom@tromey.com>
11725
11726         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11727         (try_thread_db_load_from_dir, thread_db_load_search): Use
11728         std::string.
11729         (info_auto_load_libthread_db_compare): Return bool.  Change
11730         argument types.
11731         (info_auto_load_libthread_db): Use std::vector, std::string.
11732         Remove cleanups.
11733
11734 2018-02-24  Tom Tromey  <tom@tromey.com>
11735
11736         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11737         std::string.
11738         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11739         std::string*.
11740         * gdbarch.c: Rebuild.
11741         * gdbarch.h: Rebuild.
11742         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11743         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11744         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11745         std::string*.
11746
11747 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
11748
11749         * gdbtypes.h (sect_offset): Change type to uint64_t.
11750         (sect_offset_str): New function.
11751         * dwarf2read.c (create_addrmap_from_aranges): Use
11752         sect_offset_str.
11753         (error_check_comp_unit_head): Likewise.
11754         (create_debug_type_hash_table): Likewise.
11755         (read_cutu_die_from_dwo): Likewise.
11756         (init_cutu_and_read_dies): Likewise.
11757         (init_cutu_and_read_dies_no_follow): Likewise.
11758         (process_psymtab_comp_unit_reader): Likewise.
11759         (partial_die_parent_scope): Likewise.
11760         (peek_die_abbrev): Likewise.
11761         (process_queue): Likewise.
11762         (dwarf2_physname): Likewise.
11763         (read_namespace_alias): Likewise.
11764         (read_import_statement): Likewise.
11765         (create_dwo_cu_reader): Likewise.
11766         (create_cus_hash_table): Likewise.
11767         (lookup_dwo_cutu): Likewise.
11768         (inherit_abstract_dies): Likewise.
11769         (read_func_scope): Likewise.
11770         (read_call_site_scope): Likewise.
11771         (dwarf2_add_member_fn): Likewise.
11772         (read_common_block): Likewise.
11773         (read_module_type): Likewise.
11774         (read_typedef): Likewise.
11775         (read_subrange_type): Likewise.
11776         (load_partial_dies): Likewise.
11777         (read_partial_die): Likewise.
11778         (find_partial_die): Likewise.
11779         (read_str_index): Likewise.
11780         (dwarf2_string_attr): Likewise.
11781         (build_error_marker_type): Likewise.
11782         (lookup_die_type): Likewise.
11783         (dump_die_shallow): Likewise.
11784         (follow_die_ref): Likewise.
11785         (dwarf2_fetch_die_loc_sect_off): Likewise.
11786         (dwarf2_fetch_constant_bytes): Likewise.
11787         (follow_die_sig): Likewise.
11788         (get_signatured_type): Likewise.
11789         (get_DW_AT_signature_type): Likewise.
11790         (dwarf2_find_containing_comp_unit): Likewise.
11791         (set_die_type): Likewise.
11792
11793 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
11794
11795         * arch/aarch64.c: Include "common-defs.h".
11796         * arch/amd64.c: Likewise.
11797         * arch/i386.c: Likewise.
11798
11799 2018-02-21  Tom Tromey  <tom@tromey.com>
11800
11801         * value.h: (extract_field_op): Update.
11802         * eval.c (extract_field_op): Return a const char *.
11803         * expression.h (parse_expression_for_completion): Update.
11804         * completer.c (complete_expression): Update.
11805         (add_struct_fields): Make fieldname const.
11806         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11807         (mark_completion_tag, parse_exp_in_context_1): Update.
11808         (parse_expression_for_completion): Change "name" to
11809         unique_xmalloc_ptr*.
11810
11811 2018-02-21  Tom Tromey  <tom@tromey.com>
11812
11813         * infcall.c (call_function_by_hand_dummy): Use std::vector.
11814
11815 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11816
11817         * avr-tdep.c (avr_read_pc): Change parameter type to
11818         readable_regcache.
11819         * gdbarch.sh (read_pc): Likewise.
11820         * gdbarch.c: Re-generated.
11821         * gdbarch.h: Re-generated.
11822         * hppa-tdep.c (hppa_read_pc): Change parameter type to
11823         readable_regcache.
11824         * ia64-tdep.c (ia64_read_pc): Likewise.
11825         * mips-tdep.c (mips_read_pc): Likewise.
11826         * spu-tdep.c (spu_read_pc): Likewise.
11827
11828 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11829
11830         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11831         * regcache-dump.c: New file.
11832         * regcache.c: Move register_dump to regcache-dump.c.
11833         (maintenance_print_registers): Likewise.
11834         (maintenance_print_raw_registers): Likewise.
11835         (maintenance_print_cooked_registers): Likewise.
11836         (maintenance_print_register_groups): Likewise.
11837         (maintenance_print_remote_registers): Likewise.
11838         (_initialize_regcache): Likewise.
11839         * regcache.h (register_dump): Moved from regcache.c.
11840
11841 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11842
11843         * regcache.c (regcache::regcache): Update.
11844         (regcache::invalidate): Move it to detached_regcache::invalidate.
11845         (get_thread_arch_aspace_regcache): Update.
11846         (regcache::raw_update): Update.
11847         (regcache::cooked_read): Remove some code.
11848         (regcache::cooked_read_value): Likewise.
11849         (regcache::raw_write): Remove assert on m_readonly_p.
11850         (regcache::raw_supply_integer): Move it to
11851         detached_regcache::raw_supply_integer.
11852         (regcache::raw_supply_zeroed): Likewise.
11853         * regcache.h (detached_regcache) <raw_supply_integer>: New
11854         declaration.
11855         <raw_supply_zeroed, invalidate>: Likewise.
11856         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
11857         <invalidate>: Likewise.
11858         <m_readonly_p>: Removed.
11859
11860 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11861
11862         * infcmd.c (get_return_value): Let stop_regs point to
11863         get_current_regcache.
11864         * regcache.c (regcache::regcache): Remove.
11865         (register_dump_reg_buffer): New class.
11866         (regcache_print): Adjust.
11867         * regcache.h (regcache): Remove constructors.
11868
11869 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11870
11871         * regcache.c (class register_dump): New class.
11872         (register_dump_regcache, register_dump_none): New class.
11873         (register_dump_remote, register_dump_groups): New class.
11874         (regcache_print): Update.
11875         * regcache.h (regcache_dump_what): Move it to regcache.c.
11876         (regcache) <dump>: Remove.
11877
11878 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11879
11880         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
11881          reg_buffer_rw *.
11882         (jit_unwind_reg_set_impl): Call raw_supply.
11883         (jit_frame_sniffer): Use reg_buffer_rw.
11884         * record-full.c (record_full_core_regbuf): Change its type.
11885         (record_full_core_open_1): Use reg_buffer_rw.
11886         (record_full_close): Likewise.
11887         (record_full_core_fetch_registers): Use regcache->raw_supply.
11888         (record_full_core_store_registers): Likewise.
11889         * regcache.c (regcache::get_register_status): Move it to
11890         reg_buffer.
11891         (regcache_raw_set_cached_value): Remove.
11892         (regcache::raw_set_cached_value): Remove.
11893         (regcache::raw_write): Call raw_supply.
11894         (regcache::raw_supply): Move it to reg_buffer_rw.
11895         * regcache.h (regcache_raw_set_cached_value): Remove.
11896         (reg_buffer_rw): New class.
11897
11898 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11899
11900         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
11901         readonly_detached_regcache.
11902         (dummy_frame_prev_register): Use regcache->cooked_read.
11903         * frame.c (frame_save_as_regcache): Change return type.
11904         (frame_pop): Update.
11905         * frame.h (frame_save_as_regcache): Update declaration.
11906         * inferior.h (get_infcall_suspend_state_regcache): Update
11907         declaration.
11908         * infrun.c (infcall_suspend_state) <registers>: use
11909         readonly_detached_regcache.
11910         (save_infcall_suspend_state): Don't use regcache_dup.
11911         (get_infcall_suspend_state_regcache): Change return type.
11912         * linux-fork.c (struct fork_info) <savedregs>: Change to
11913         readonly_detached_regcache.
11914         <pc>: New field.
11915         (fork_save_infrun_state): Don't use regcache_dup.
11916         (info_checkpoints_command): Adjust.
11917         * mi/mi-main.c (register_changed_p): Update declaration.
11918         (mi_cmd_data_list_changed_registers): Use
11919         readonly_detached_regcache.
11920         (register_changed_p): Change parameter type to
11921         readonly_detached_regcache.
11922         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
11923         readonly_detached_regcache.
11924         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
11925         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
11926         New.
11927         (regcache::save): Move it to reg_buffer.
11928         (regcache::restore): Change parameter type.
11929         (regcache_dup): Remove.
11930         * regcache.h (reg_buffer) <save>: New method.
11931         (readonly_detached_regcache): New class.
11932         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
11933         readonly_detached_regcache.
11934         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
11935
11936 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11937
11938         * frame.c (frame_save_as_regcache): Use regcache method save.
11939         (frame_pop): Use regcache method restore.
11940         * infrun.c (restore_infcall_suspend_state): Likewise.
11941         * linux-fork.c (fork_load_infrun_state): Likewise.
11942         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
11943         save.
11944         * regcache.c (regcache_save): Remove.
11945         (regcache::restore): More asserts.
11946         (regcache_cpy): Remove.
11947         * regcache.h (regcache_save): Remove the declaration.
11948         (regcache::restore): Move from private to public.
11949         Remove the friend declaration of regcache_cpy.
11950         (regcache_cpy): Remove declaration.
11951
11952 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11953
11954         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
11955         parameter type to 'readable_regcache *'.
11956         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11957         * arm-tdep.c (arm_neon_quad_read): Likewise.
11958         (arm_pseudo_read): Likewise.
11959         * avr-tdep.c (avr_pseudo_register_read): Likewise.
11960         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11961         * frv-tdep.c (frv_pseudo_register_read): Likewise.
11962         * gdbarch.c: Re-generated.
11963         * gdbarch.h: Re-generated.
11964         * gdbarch.sh (pseudo_register_read): Change parameter type to
11965         'readable_regcache *'.
11966         (pseudo_register_read_value): Likewise.
11967         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
11968         (h8300_pseudo_register_read): Likewise.
11969         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
11970         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11971         (i386_pseudo_register_read_into_value): Likewise.
11972         (i386_pseudo_register_read_value): Likewise.
11973         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
11974         declaration.
11975         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
11976         * m32c-tdep.c (m32c_raw_read): Likewise.
11977         (m32c_read_flg): Likewise.
11978         (m32c_banked_register): Likewise.
11979         (m32c_banked_read): Likewise.
11980         (m32c_sb_read): Likewise.
11981         (m32c_part_read): Likewise.
11982         (m32c_cat_read): Likewise.
11983         (m32c_r3r2r1r0_read): Likewise.
11984         (m32c_pseudo_register_read): Likewise.
11985         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11986         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11987         (mep_pseudo_cr64_read): Likewise.
11988         (mep_pseudo_register_read): Likewise.
11989         * mips-tdep.c (mips_pseudo_register_read): Likewise.
11990         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11991         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11992         * regcache.c (regcache::raw_read): Move it to readable_regcache.
11993         (regcache::cooked_read): Likewise.
11994         (regcache::cooked_read_value): Likewise.
11995         (regcache_cooked_read_signed):
11996         (regcache::cooked_read): Likewise.
11997         * regcache.h (readable_regcache): New class.
11998         (regcache): Inherit readable_regcache.  Move some methods to
11999         readable_regcache.
12000         * rl78-tdep.c (rl78_pseudo_register_read): Change
12001         parameter type to 'readable_regcache *'.
12002         * rs6000-tdep.c (do_regcache_raw_read): Remove.
12003         (e500_pseudo_register_read): Change parameter type to
12004         'readable_regcache *'.
12005         (dfp_pseudo_register_read): Likewise.
12006         (vsx_pseudo_register_read): Likewise.
12007         (efpr_pseudo_register_read): Likewise.
12008         * s390-tdep.c (s390_pseudo_register_read): Likewise.
12009         * sh-tdep.c (sh_pseudo_register_read): Likewise.
12010         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12011         (sh64_pseudo_register_read): Likewise.
12012         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12013         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12014         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12015         (spu_pseudo_register_read): Likewise.
12016         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12017         (xtensa_pseudo_register_read): Likewise.
12018
12019 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12020
12021         * regcache.c (regcache::regcache): Call reg_buffer ctor.
12022         (regcache::arch): Move it to reg_buffer::arch.
12023         (regcache::register_buffer): Likewise.
12024         (regcache::assert_regnum): Likewise.
12025         (regcache::num_raw_registers): Likewise.
12026         * regcache.h (reg_buffer): New class.
12027         (regcache): Inherit reg_buffer.
12028
12029 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
12030
12031         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12032         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12033
12034 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
12035
12036         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12037
12038 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
12039
12040         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12041         (SFILES): Remove common/*.c files.
12042         (COMMON_OBS): Remove some *.o files built from common/*.c files.
12043         * common/common.host: Add common reference.
12044         * configure.ac: Likewise.
12045         * configure: Regenerate.
12046
12047 2018-02-16  Yao Qi  <yao.qi@linaro.org>
12048
12049         * block.c (block_namespace_info): Inherit allocate_on_obstack.
12050         (block_initialize_namespace): Use new.
12051         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12052         (dwarf2_free_objfile): Use delete.
12053         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12054         (copy_type_recursive): Use new.
12055         * gdb_obstack.h (allocate_on_obstack): New.
12056
12057 2018-02-15  Yao Qi  <yao.qi@linaro.org>
12058
12059         PR gdb/22849
12060         * inferior.c (exit_inferior_1): Reset inf->control.
12061
12062 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
12063
12064         * ada-lang.c (ada_to_fixed_value_create): Delete advance
12065         declaration.
12066
12067 2018-02-14  Pedro Alves  <palves@redhat.com>
12068
12069         * frame-unwind.c (frame_unwind_try_unwinder): Always call
12070         frame_cleanup_after_sniffer on exception.
12071
12072 2018-02-14  Tom Tromey  <tom@tromey.com>
12073
12074         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12075         const.
12076         (solib_bfd_open): Make pathname const.
12077         * solib.c (solib_bfd_open): Make pathname const.
12078         * solib-spu.c (spu_bfd_fopen): Make name const.
12079         (spu_bfd_open): Make pathname const.
12080         * solib-darwin.c (darwin_bfd_open): Make pathname const.
12081         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12082
12083 2018-02-14  Tom Tromey  <tom@tromey.com>
12084
12085         * symfile.c (symfile_bfd_open): Update.
12086         * source.h (openp, source_full_path_of, find_and_open_source):
12087         Change argument type to unique_xmalloc_ptr.
12088         * source.c (openp): Take a unique_xmalloc_ptr.
12089         (source_full_path_of, find_and_open_source): Likewise.
12090         (open_source_file, symtab_to_fullname): Update.
12091         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12092         unique_xmalloc_ptr.
12093         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12094         (exec_file_find): Update.
12095         * psymtab.c (psymtab_to_fullname): Update.
12096         * nto-tdep.h (nto_find_and_open_solib): Update.
12097         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12098         unique_xmalloc_ptr.
12099         * exec.c (exec_file_attach): Update.
12100         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12101         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12102
12103 2018-02-14  Tom Tromey  <tom@tromey.com>
12104
12105         * solib.c: Include source.h.
12106         * nto-tdep.c: Include source.h.
12107         * mi/mi-cmd-env.c: Include source.h.
12108         * infcmd.c: Include source.h.
12109         * exec.c: Include source.h.
12110         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12111         (add_path, directory_switch, source_path, init_source_path): Move
12112         declarations...
12113         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12114         (add_path, directory_switch, source_path, init_source_path):
12115         ...here.
12116
12117 2018-02-14  Tom Tromey  <tom@tromey.com>
12118
12119         * solist.h (exec_file_find, solib_find): Return
12120         unique_xmalloc_ptr.
12121         (solib_bfd_fopen): Take a const char *.
12122         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12123         (exec_file_find, solib_find): Likewise.
12124         (solib_bfd_fopen): Do not take ownership of "pathname".
12125         (solib_bfd_open): Use unique_xmalloc_ptr.
12126         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12127         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12128         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12129         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12130
12131 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
12132
12133         * ada-lang.c (name_match_type_from_name): Remove reference to
12134         ada_name_for_lookup in function's documentation.
12135         * ada-lang.h (ada_name_for_lookup): Delete declaration.
12136
12137 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12138
12139         * defs.h (enum openp_flags): New enum.
12140         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12141         Move to enum openp_flags.
12142         (openp_flags): New enum flags.
12143         (openp): Change parameter type to openp_flags.
12144         * source.c (openp): Change parameter type to openp_flags.
12145         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12146         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12147
12148 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12149
12150         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12151         per-command.
12152
12153 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12154
12155         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12156         into...
12157         (class dwarf2_queue_guard): ...the destructor of this new class.
12158         (dw2_do_instantiate_symtab): Create instance of the new class
12159         dwarf2_queue_guard, remove cleanup.
12160
12161 2018-02-09  Tom Tromey  <tom@tromey.com>
12162
12163         * source.c (find_source_lines): Don't reference past the end of
12164         the vector.
12165
12166 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12167
12168         * remote.c (remote_btrace_maybe_reopen): Change error message.
12169         * btrace.c (btrace_enable): Likewise.
12170         (parse_xml_btrace): Likewise.
12171         (parse_xml_btrace_conf): Likewise.
12172
12173 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12174
12175         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12176         (linux_enable_pt, linux_enable_bts): Call
12177         diagnose_perf_event_open_fail.
12178
12179 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12180
12181         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12182         Remove parameter and change return type.  Update callers.  Move it.
12183         (linux_enable_bts, linux_enable_pt): Improve error message.
12184         (linux_enable_pt): Remove zero buffer size check.
12185         (linux_enable_btrace): Improve error messages.  Remove NULL return
12186         check.
12187
12188 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12189
12190         * btrace.c (btrace_enable): Remove target_supports_btrace call.
12191         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12192         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12193         (linux_supports_pt, linux_supports_btrace): Remove.
12194         (linux_enable_bts): Call cpu_supports_bts.
12195         * nat/linux-btrace.h (linux_supports_btrace): Remove.
12196         * remote.c (remote_supports_btrace): Remove.
12197         (init_remote_ops): Remove remote_supports_btrace.
12198         * target-delegates.c: Regenerated.
12199         * target.c (target_supports_btrace): Remove.
12200         * target.h (target_ops) <to_supports_btrace>: Remove
12201         (target_supports_btrace): Remove.
12202         * x86-linux-nat.c (x86_linux_create_target): Remove
12203         linux_supports_btrace.
12204
12205 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12206
12207         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12208         btrace failed.
12209         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12210         exception and use message in own exception.
12211
12212 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12213
12214         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12215         (perf_event_pt_event_type): Use gdb_file_up.
12216         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12217         scoped_fd, and scoped_mmap.
12218
12219 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12220
12221         * common/scoped_mmap.h: New.
12222         * unittests/scoped_mmap-selftest.c: New.
12223         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12224         unittests/scoped_mmap-selftest.c.
12225
12226 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12227
12228         * common/scoped_fd.h: New.
12229         * unittests/scoped_fd-selftest.c: New.
12230         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12231         unittests/scoped_fd-selftest.c.
12232
12233 2018-02-09  Tom Tromey  <tom@tromey.com>
12234
12235         * auto-load.c (auto_load_section_scripts): Use
12236         gdb::unique_xmalloc_ptr.
12237
12238 2018-02-09  Tom Tromey  <tom@tromey.com>
12239
12240         * auto-load.c (execute_script_contents): Use std::string.
12241
12242 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
12243
12244         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12245         Python function, rather than a new command.
12246
12247 2018-02-08  Tom Tromey  <tom@tromey.com>
12248
12249         * solib.c (solib_find_1): Use std::string.
12250         (solib_bfd_fopen): Use unique_xmalloc_ptr.
12251
12252 2018-02-08  Tom Tromey  <tom@tromey.com>
12253
12254         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12255
12256 2018-02-08  Tom Tromey  <tom@tromey.com>
12257
12258         * source.c (find_source_lines): Use gdb::def_vector.
12259
12260 2018-02-08  Tom Tromey  <tom@tromey.com>
12261
12262         * macrocmd.c (struct temporary_macro_definition): New.
12263         (macro_define_command): Use temporary_macro_definition.  Remove
12264         cleanups.
12265         (free_macro_definition_ptr): Remove.
12266
12267 2018-02-08  Tom Tromey  <tom@tromey.com>
12268
12269         * macroexp.c (maybe_expand): Use std::string.
12270
12271 2018-02-08  Tom Tromey  <tom@tromey.com>
12272
12273         * macroexp.c (struct macro_buffer): Add initializers for some
12274         members.
12275         (init_buffer, init_shared_buffer, free_buffer)
12276         (free_buffer_return_text): Remove.
12277         (macro_buffer): New constructors.
12278         (~macro_buffer): New destructor.
12279         (macro_buffer::set_shared): New method.
12280         (macro_buffer::resize_buffer, macro_buffer::appendc)
12281         (macro_buffer::appendmem): Now methods, not free functions.
12282         (set_token, append_tokens_without_splicing, stringify)
12283         (macro_stringify): Update.
12284         (gather_arguments): Change return type.  Remove argc_p argument,
12285         add args_ptr argument.  Use std::vector.
12286         (substitute_args): Remove argc argument.  Accept std::vector.
12287         (expand): Update.  Use std::vector.
12288         (scan, macro_expand, macro_expand_next): Update.
12289
12290 2018-02-08  Tom Tromey  <tom@tromey.com>
12291
12292         * symtab.c (default_collect_symbol_completion_matches_break_on):
12293         Use unique_xmalloc_ptr.
12294         * macroscope.h: (sal_macro_scope, user_macro_scope)
12295         (default_macro_scope): Return unique_xmalloc_ptr.
12296         * macroscope.c (sal_macro_scope, user_macro_scope)
12297         (default_macro_scope): Return unique_xmalloc_ptr.
12298         * macroexp.h (macro_expand, macro_expand_once): Return
12299         unique_xmalloc_ptr.
12300         * macroexp.c (macro_expand, macro_expand_once): Return
12301         unique_xmalloc_ptr.
12302         * macrocmd.c (macro_expand_command, macro_expand_once_command)
12303         (info_macro_command, info_macros_command): Use
12304         unique_xmalloc_ptr.
12305         * compile/compile-c-support.c (write_macro_definitions): Use
12306         unique_xmalloc_ptr.
12307         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12308
12309 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
12310
12311         * value.c (value_static_field): Assign field type instead of
12312         containing type when returning an optimized out value.
12313
12314 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12315
12316         * ft32-tdep.c (ft32_read_pc): Remove.
12317         (ft32_write_pc): Remove.
12318         (ft32_gdbarch_init): Update.
12319         * m32r-tdep.c (m32r_read_pc): Remove.
12320         (m32r_gdbarch_init): Update.
12321         * mep-tdep.c (mep_read_pc): Remove.
12322         (mep_gdbarch_init): Update.
12323         * microblaze-tdep.c (microblaze_write_pc): Remove.
12324         (microblaze_gdbarch_init): Update.
12325         * mn10300-tdep.c (mn10300_read_pc): Remove.
12326         (mn10300_write_pc): Remove.
12327         (mn10300_gdbarch_init): Update.
12328         * moxie-tdep.c (moxie_read_pc): Remove.
12329         (moxie_write_pc): Remove.
12330         (moxie_gdbarch_init): Update.
12331
12332 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12333
12334         * expprint.c (print_subexp_standard): Handle
12335         OP_F77_UNDETERMINED_ARGLIST.
12336         (dump_subexp_body_standard): Likewise.
12337
12338 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
12339
12340         * target-descriptions.c (tdesc_element_visitor) Add empty
12341         implementations.
12342         (tdesc_type): Move make_gdb_type from here.
12343         (tdesc_type_builtin): Likewise.
12344         (tdesc_type_vector): Likewise.
12345         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12346         (make_gdb_type_struct): Move from tdesc_type_with_fields.
12347         (make_gdb_type_union): Likewise.
12348         (make_gdb_type_flags): Likewise.
12349         (make_gdb_type_enum): Likewise.
12350         (make_gdb_type): New function.
12351         (tdesc_register_type): Use static make_gdb_type.
12352
12353 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
12354
12355         * infcmd.c (default_print_one_register_info): Align natural-format
12356         column values consistently one under another.
12357         (pad_to_column): New function.
12358
12359 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
12360
12361         * dwarf2read.c (dwarf2_physname): Move commment.
12362
12363 2018-02-01  Leszek Swirski  <leszeks@google.com>
12364
12365         * varobj.c (varobj_formatted_print_options): Allow recursive
12366         pretty printing if pretty printing is enabled.
12367
12368 2018-02-01  Leszek Swirski  <leszeks@google.com>
12369
12370         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12371         names after a structop as a filename.
12372
12373 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12374
12375         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12376         (arm_record_coproc_data_proc): Likewise.
12377
12378 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12379
12380         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12381
12382 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
12383
12384         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12385         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12386
12387 2018-01-31  Pedro Alves  <palves@redhat.com>
12388
12389         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12390         * inflow.c (child_terminal_save_inferior): Wrap reference to
12391         tcgetpgrp in HAVE_TERMIOS_H.
12392         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12393         _WIN32.
12394         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12395         always iterate over all inferiors.
12396         (gdbsim_cntrl_c): Adjust.
12397         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12398
12399 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12400
12401         * gdbtypes.c (lookup_array_range_type): Make sure the array's
12402         index type is objfile-owned if the element type is as well.
12403
12404 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12405
12406         GDB 8.1 released.
12407
12408 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12409
12410         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12411         "features/s390x-linux64.c".
12412         (_initialize_s390_linux_tdep): Remove initialization of tdescs
12413         s390_linux32 and s390x_linux64.
12414         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12415         default tdesc.
12416         * s390-tdep.c: Include "features/s390-linux32.c" and
12417         "features/s390x-linux64.c".
12418         (s390_tdesc_valid): Add check for tdesc_has_registers.
12419         (s390_gdbarch_init): Make sure there is always a valid tdesc.
12420         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12421         tdesc_s390x_linux64.
12422         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12423         tdesc_s390x_linux64 to...
12424         * s390-tdep.h: ...here.
12425
12426 2018-01-30  Pedro Alves  <palves@redhat.com>
12427
12428         PR gdb/13211
12429         * config.in, configure: Regenerate.
12430         * configure.ac: Check for getpgid.
12431         * go32-nat.c (go32_pass_ctrlc): New.
12432         (go32_target): Install it.
12433         * inf-child.c (inf_child_target): Install
12434         child_terminal_save_inferior, child_pass_ctrlc and
12435         child_interrupt.
12436         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12437         (inf_ptrace_target): No longer install it.
12438         * infcmd.c (interrupt_target_1): Adjust.
12439         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12440         (child_interrupt): Declare.
12441         (inferior::terminal_state): New.
12442         * inflow.c (struct terminal_info): Update comments.
12443         (inferior_process_group): Delete.
12444         (terminal_is_ours): Delete.
12445         (gdb_tty_state): New.
12446         (child_terminal_init): Adjust.
12447         (is_gdb_terminal, sharing_input_terminal_1)
12448         (sharing_input_terminal): New functions.
12449         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
12450         Set the process's actual process group in the foreground if
12451         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
12452         mark terminal as the inferior's if not sharing GDB's terminal.
12453         Don't check attach_flag.
12454         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12455         pass down a target_terminal_state.
12456         (child_terminal_save_inferior): New, factored out from ...
12457         (child_terminal_ours_1): ... this.  Handle
12458         target_terminal_state::is_ours_for_output.
12459         (child_interrupt, child_pass_ctrlc): New.
12460         (inflow_inferior_exit): Clear the inferior's terminal_state.
12461         (copy_terminal_info): Copy the inferior's terminal state.
12462         (_initialize_inflow): Remove reference to terminal_is_ours.
12463         * inflow.h (inferior_process_group): Delete.
12464         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12465         * procfs.c (procfs_target): Don't install procfs_interrupt.
12466         (procfs_interrupt): Delete.
12467         * remote.c (remote_serial_quit_handler): Adjust.
12468         (remote_interrupt): Remove ptid parameter.  Adjust.
12469         * target-delegates.c: Regenerate.
12470         * target.c: Include "terminal.h".
12471         (target_terminal::terminal_state): Rename to ...
12472         (target_terminal::m_terminal_state): ... this.
12473         (target_terminal::init): Adjust.
12474         (target_terminal::inferior): Adjust to per-inferior
12475         terminal_state.
12476         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12477         (target_terminal::ours, target_terminal::ours_for_output): Use
12478         target_terminal_is_ours_kind.
12479         (target_interrupt): Remove ptid parameter.  Adjust.
12480         (default_target_pass_ctrlc): Adjust.
12481         * target.h (target_ops::to_terminal_save_inferior): New field.
12482         (target_ops::to_interrupt): Remove ptid_t parameter.
12483         (target_interrupt): Remove ptid_t parameter.  Update comment.
12484         (target_pass_ctrlc): Update comment.
12485         * target/target.h (target_terminal_state): New scoped enum,
12486         factored out of ...
12487         (target_terminal::terminal_state): ... here.
12488         (target_terminal::inferior): Update comments.
12489         (target_terminal::restore_inferior): New.
12490         (target_terminal::is_inferior, target_terminal::is_ours)
12491         (target_terminal::is_ours_for_output): Adjust.
12492         (target_terminal::scoped_restore_terminal_state): Adjust to
12493         rename, and call restore_inferior() instead of inferior().
12494         (target_terminal::scoped_restore_terminal_state::m_state): Change
12495         type.
12496         (target_terminal::terminal_state): Rename to ...
12497         (target_terminal::m_terminal_state): ... this and change type.
12498
12499 2018-01-30  Pedro Alves  <palves@redhat.com>
12500
12501         * linux-nat.c (wait_for_signal): New function.
12502         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12503         directly.
12504         (async_terminal_is_ours)
12505         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12506         (linux_nat_add_target): Don't override
12507         to_terminal_inferior/to_terminal_ours.
12508
12509 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
12510
12511         * remote.c (remote_follow_fork): Don't call "detach_inferior".
12512
12513 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
12514
12515         * dwarf2read.c (free_dwo_files): Add forward-declaration.
12516         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12517         dwarf2_per_objfile_free here.
12518         (dwarf2_per_objfile_free): Remove.
12519         (_initialize_dwarf2_read): Don't register
12520         dwarf2_per_objfile_free as a registry cleanup.
12521
12522 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
12523
12524         Avoid compilation errors in MinGW native builds
12525
12526         The error is triggered by including python-internal.h, and the
12527         error message is:
12528
12529              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12530                       from build-gnulib/import/math.h:27,
12531                       from d:/usr/Python26/include/pyport.h:235,
12532                       from d:/usr/Python26/include/Python.h:58,
12533                       from python/python-internal.h:94,
12534                       from python/py-arch.c:24:
12535              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12536         using ::hypot;
12537                 ^~~~~
12538
12539         This happens because Python headers define 'hypot' to expand t
12540         '_hypot' in the Windows builds.
12541         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12542         'hypoth'.  This avoids a compilation error.
12543
12544 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12545
12546         * MAINTAINERS (Write After Approval): Fix ordering.
12547
12548 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12549
12550         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12551
12552 2018-01-26  Alan Modra  <amodra@gmail.com>
12553
12554         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12555         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12556         Remove nop.  Make const.  Comment.
12557         (powerpc32_plt_stub_so_2): New.
12558         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12559         Correct count.  Update uses.
12560         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12561         Move common code reading PLT entry word.  Correct
12562         powerpc32_plt_stub PLT address calculation.
12563         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12564         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12565         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12566         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12567         (ppc64_standard_linkage8): Likewise.
12568         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12569         Correct insns description.
12570         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12571
12572 2018-01-24  Pedro Alves  <palves@redhat.com>
12573
12574         GCC PR libstdc++/83906
12575         * gdbtypes.c (operator==(const dynamic_prop &,
12576         const dynamic_prop &)): New.
12577         (operator==(const range_bounds &, const range_bounds &)): New.
12578         (check_types_equal): Use them instead of memcmp.
12579         * gdbtypes.h (operator==(const dynamic_prop &,
12580         const dynamic_prop &)): Declare.
12581         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12582         (operator==(const range_bounds &, const range_bounds &)): Declare.
12583         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12584
12585 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12586
12587         * s390-linux-tdep.c (s390_record_address_mask)
12588         (s390_record_calc_disp_common, s390_record_calc_disp)
12589         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12590         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12591         (s390_process_record): Move to s390-tdep.c.
12592         (s390_linux_init_abi_any): Adjust.
12593         * s390-tdep.c (s390_record_address_mask)
12594         (s390_record_calc_disp_common, s390_record_calc_disp)
12595         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12596         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12597         (s390_process_record): Moved from s390-linux-tdep.c
12598         (s390_gdbarch_init): Adjust.
12599
12600 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12601
12602         * s390-linux-nat.c (s390-tdep.h): New include.
12603         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12604         (HFILES_NO_SRCDIR): Add s390-tdep.h.
12605         (ALLDEPFILES): Add s390-tdep.c.
12606         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12607         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12608         * s390-tdep.h: ...this.  New file.
12609         * s390-linux-tdep.c (s390-tdep.h): New include.
12610         (_initialize_s390_tdep): Rename to...
12611         (_initialize_s390_linux_tdep): ...this and adjust.
12612         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12613         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12614         s390-tdep.h.
12615         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12616         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12617         (s390_is_partial_instruction, s390_software_single_step)
12618         (is_non_branch_ril, s390_displaced_step_copy_insn)
12619         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12620         (s390_prologue_data, s390_addr, s390_store, s390_load)
12621         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12622         (s390_register_call_saved, s390_guess_tracepoint_registers)
12623         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12624         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12625         (s390_pseudo_register_name, s390_pseudo_register_type)
12626         (s390_pseudo_register_read, s390_pseudo_register_write)
12627         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12628         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12629         (s390_addr_bits_remove, s390_address_class_type_flags)
12630         (s390_address_class_type_flags_to_name)
12631         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12632         (s390_function_arg_float, s390_function_arg_vector)
12633         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12634         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12635         (s390_frame_align, s390_register_return_value, s390_return_value)
12636         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12637         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12638         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12639         (s390_trad_frame_prev_register, s390_unwind_cache)
12640         (s390_prologue_frame_unwind_cache)
12641         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12642         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12643         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12644         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12645         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12646         (s390_frame_base_address, s390_local_base_address)
12647         (s390_frame_base, s390_gcc_target_options)
12648         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12649         (s390_validate_reg_range, s390_tdesc_valid)
12650         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12651         * s390-tdep.c: ...this.  New file.
12652
12653 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12654
12655         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12656         (s390_process_record, s390_gdbarch_tdep_alloc)
12657         (s390_linux_init_abi_any): Use/set new hook.
12658
12659 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12660
12661         * s390-linux-tdep.c (osabi.h): New include.
12662         (s390_linux_init_abi_31, s390_linux_init_abi_64)
12663         (s390_linux_init_abi_any): New functions.
12664         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12665
12666 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12667
12668         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12669         tdesc_has_registers check
12670
12671 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12672
12673         * s390-linux-tdep.c (s390_tdesc_valid): New function.
12674         (s390_validate_reg_range): New macro.
12675         (s390_gdbarch_init): Adjust.
12676
12677 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12678
12679         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12680         (s390_gdbarch_tdep_alloc): Adjust.
12681         (s390_gdbarch_init): Adjust.
12682
12683 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12684
12685         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12686         <have_tdb>: Change type to bool.
12687         (s390_gdbarch_tdep_alloc): Adjust.
12688         (s390_gdbarch_init): Adjust.
12689
12690 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12691
12692         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12693         (gdbarch_tdep) <have_upper, have_vx>: New fields.
12694         (s390_gdbarch_tdep_alloc): New function.
12695         (s390_gdbarch_init): Allocate tdep at start and use its fields
12696         instead of separate variables.
12697
12698 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12699
12700         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12701         when looking for cached gdbarch and add comment for remaining.
12702
12703 2018-01-22  Pedro Alves  <palves@redhat.com>
12704             Sergio Durigan Junior  <sergiodj@redhat.com>
12705
12706         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12707         case.
12708
12709 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
12710
12711         * MAINTAINERS: Update my company e-mail address.
12712
12713 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12714
12715         * regcache.c (cooked_write_test): New function.
12716         (_initialize_regcache): Register the test.
12717
12718 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12719
12720         * ia64-tdep.c (ia64_pseudo_register_read): Call
12721         regcache->cooked_read instead of regcache_cooked_read_unsigned.
12722         * m32c-tdep.c (m32c_cat_read): Likewise.
12723         (m32c_r3r2r1r0_read): Likewise.
12724         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12725         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12726
12727 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12728
12729         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12730         method raw_read instead of regcache_raw_read.
12731         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12732         * arm-tdep.c (arm_neon_quad_read): Likewise.
12733         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12734         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12735         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12736         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12737         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12738         (i386_pseudo_register_read_into_value): Likewise.
12739         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12740         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12741         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12742         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12743         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12744         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
12745         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12746         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
12747         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12748
12749 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12750
12751         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12752         * configure.tgt: Remove target mt.
12753         * mt-tdep.c: Remove.
12754         * regcache.c (cooked_read_test): Remove the check for mt.
12755
12756 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12757
12758         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12759         instead of gdbarch_pseudo_register_read_value.
12760
12761 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12762
12763         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12764         language is Ada.
12765
12766 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12767
12768         * linespec.c (create_sals_line_offset): Remove code that preserved
12769         the symtab_and_line's line number.
12770
12771 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12772
12773         * varobj.c (varobj_create): Don't set valid_block when creating a
12774         floating varobj.
12775
12776 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12777
12778         * varobj.c (varobj_create): Remove out of date comment.
12779
12780 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12781
12782         PR mi/20395
12783         * ada-exp.y (write_var_from_sym): Pass extra parameter when
12784         updating innermost block.
12785         * parse.c (innermost_block_tracker::update): Take extra type
12786         parameter, and check types match before updating innermost block.
12787         (write_dollar_variable): Update innermost block for registers.
12788         * parser-defs.h (enum innermost_block_tracker_type): New enum.
12789         (innermost_block_tracker::innermost_block_tracker): Initialise
12790         m_types member.
12791         (innermost_block_tracker::reset): Take type parameter.
12792         (innermost_block_tracker::update): Take type parameter, and pass
12793         type through as needed.
12794         (innermost_block_tracker::m_types): New member.
12795         * varobj.c (varobj_create): Pass type when reseting innermost
12796         block.
12797
12798 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12799
12800         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12801         * ada-lang.c (resolve_subexp): Likewise.
12802         * breakpoint.c (set_breakpoint_condition) Likewise.
12803         (watch_command_1) Likewise.
12804         * c-exp.y (variable): Likewise.
12805         * d-exp.y (PrimaryExpression): Likewise.
12806         * f-exp.y (variable): Likewise.
12807         * go-exp.y (variable): Likewise.
12808         * m2-exp.y (variable): Likewise.
12809         * objfiles.c (objfile::~objfile): Likewise.
12810         * p-exp.y (variable): Likewise.
12811         * parse.c (innermost_block): Change type.
12812         * parser-defs.h (class innermost_block_tracker): New.
12813         (innermost_block): Change to innermost_block_tracker.
12814         * printcmd.c (display_command): Switch to innermost_block API.
12815         (do_one_display): Likewise.
12816         * rust-exp.y (do_one_display): Likewise.
12817         * symfile.c (clear_symtab_users): Likewise.
12818         * varobj.c (varobj_create): Switch to innermost_block API, replace
12819         use of innermost_block with block stored on varobj object.
12820
12821 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12822
12823         * expression.h (innermost_block): Remove declaration.
12824         * varobj.c: Add 'parser-defs.h' include.
12825
12826 2018-01-19  Tom Tromey  <tom@tromey.com>
12827
12828         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12829         symbols in the static and global blocks.
12830
12831 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
12832
12833         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12834         gdb_ptrace.h, and move including gdb_wait.h ...
12835         * nat/linux-ptrace.h: ... to here.
12836
12837 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12838
12839         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
12840         inf_ptrace_detach_success.
12841         (inf_ptrace_detach_success): Add inferior parameter, use it
12842         instead of inferior_ptid, pass it to detach_inferior.
12843         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
12844         parameter.
12845         * inferior.c (detach_inferior): Add overload that takes an
12846         inferior object.
12847         * inferior.h (detach_inferior): Likewise.
12848         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
12849         use inferior_ptid, adjust call to inf_ptrace_detach_success.
12850         * linux-thread-db.c (thread_db_detach): Use inf parameter.
12851
12852 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12853
12854         * target.h (struct target_ops) <to_detach>: Add inferior
12855         parameter.
12856         (target_detach): Likewise.
12857         * target.c (dispose_inferior): Pass inferior down.
12858         (target_detach): Pass inferior down.  Assert that it is equal to
12859         the current inferior.
12860         * aix-thread.c (aix_thread_detach): Pass inferior down.
12861         * corefile.c (core_file_command): Pass current_inferior() down.
12862         * corelow.c (core_detach): Add inferior parameter.
12863         * darwin-nat.c (darwin_detach): Likewise.
12864         * gnu-nat.c (gnu_detach): Likewise.
12865         * inf-ptrace.c (inf_ptrace_detach): Likewise.
12866         * infcmd.c (detach_command): Pass current_inferior() down to
12867         target_detach.
12868         * infrun.c (follow_fork_inferior): Pass parent_inf to
12869         target_detach.
12870         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
12871         target_detach.
12872         * linux-nat.c (linux_nat_detach): Add inferior parameter.
12873         * linux-thread-db.c (thread_db_detach): Likewise.
12874         * nto-procfs.c (procfs_detach): Likewise.
12875         * procfs.c (procfs_detach): Likewise.
12876         * record.c (record_detach): Likewise.
12877         * record.h (struct inferior): Forward-declare.
12878         (record_detach): Add inferior parameter.
12879         * remote-sim.c (gdbsim_detach): Likewise.
12880         * remote.c (remote_detach_1): Likewise.
12881         (remote_detach): Likewise.
12882         (extended_remote_detach): Likewise.
12883         * sol-thread.c (sol_thread_detach): Likewise.
12884         * target-debug.h (target_debug_print_inferior_p): New macro.
12885         * target-delegates.c: Re-generate.
12886         * top.c (kill_or_detach): Pass inferior down to target_detach.
12887         * windows-nat.c (windows_detach): Add inferior parameter.
12888
12889 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
12890
12891         * target.h (struct target_ops) <to_detach>: Remove args
12892         parameter.
12893         (target_detach): Likewise.
12894         * target.c (dispose_inferior): Adjust.
12895         (target_detach): Remove args parameter, adjust.
12896         * aix-thread.c (aix_thread_detach): Adjust.
12897         * corefile.c (core_file_command): Adjust.
12898         * corelow.c (core_detach): Adjust.
12899         * darwin-nat.c (darwin_detach): Adjust.
12900         * gnu-nat.c (gnu_detach): Adjust.
12901         * inf-ptrace.c (inf_ptrace_detach): Adjust.
12902         * infcmd.c (detach_command): Adjust
12903         * infrun.c (follow_fork_inferior): Adjust.
12904         (handle_vfork_child_exec_or_exit): Adjust.
12905         * linux-fork.c (linux_fork_detach): Remove args parameter.
12906         * linux-fork.h (linux_fork_detach): Likewise.
12907         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
12908         * linux-thread-db.c (thread_db_detach): Likewise.
12909         * nto-procfs.c (procfs_detach): Likewise.
12910         * procfs.c (procfs_detach): Likewise.
12911         (do_detach): Remove signo parameter.
12912         * record.c (record_detach): Remove args parameter.
12913         * record.h (record_detach): Likewise.
12914         * remote-sim.c (gdbsim_detach): Likewise.
12915         * remote.c (remote_detach_1): Likewise.
12916         (remote_detach): Likewise.
12917         (extended_remote_detach): Likewise.
12918         * sol-thread.c (sol_thread_detach): Likewise.
12919         * target-delegates.c: Re-generate.
12920         * top.c (struct qt_args) <args>: Remove field.
12921         (kill_or_detach): Don't pass args.
12922         (quit_force): Don't set args.
12923         * windows-nat.c (windows_detach): Remove args parameter.
12924
12925 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12926
12927         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
12928         (arm_linux_init_abi): Install it.
12929
12930 2018-01-19  Yao Qi  <yao.qi@linaro.org>
12931
12932         * osabi.c (gdb_osabi_names): Extend the regexp for
12933         arm-linux-gnueabihf.
12934
12935 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12936
12937         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
12938         m_abbrevs.
12939         (abbrev_table::add_abbrev): Update.
12940         (abbrev_table::lookup_abbrev): Update.
12941
12942 2018-01-18  Yao Qi  <yao.qi@linaro.org>
12943
12944         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
12945
12946 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
12947
12948         * compile/compile.c (compile_to_object): Convert "triplet_rx"
12949         to "std::string".
12950
12951 2018-01-17  Tom Tromey  <tom@tromey.com>
12952
12953         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
12954
12955 2018-01-17  Tom Tromey  <tom@tromey.com>
12956
12957         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
12958         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
12959         (create_array_type_with_stride): Update.
12960         * dwarf2read.c (set_die_type): Update.
12961
12962 2018-01-17  Tom Tromey  <tom@tromey.com>
12963
12964         * dwarf2read.c (delayed_method_info): Remove typedef.
12965         (dwarf2_cu::method_info): Now a std::vector.
12966         (add_to_method_list): Update.
12967         (free_delayed_list): Remove.
12968         (compute_delayed_physnames): Update.
12969         (process_full_comp_unit, process_full_type_unit): Clear the method
12970         list.  Remove cleanups.
12971         (psymtab_include_file_name): Add name_holder parameter.  Use
12972         unique_xmalloc_ptr.
12973         (dwarf_decode_lines): Update.
12974
12975 2018-01-17  Tom Tromey  <tom@tromey.com>
12976             Simon Marchi  <simon.marchi@ericsson.com>
12977
12978         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
12979         (dwarf2_per_objfile::free_cached_comp_units)
12980         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
12981         (init_cutu_and_read_dies_no_follow): Update.
12982         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
12983         (dwarf2_cu::~dwarf2_cu): New.
12984         (free_heap_comp_unit, free_stack_comp_unit): Remove.
12985         (age_cached_comp_units, free_one_cached_comp_unit): Update.
12986
12987 2018-01-17  Tom Tromey  <tom@tromey.com>
12988             Simon Marchi  <simon.marchi@ericsson.com>
12989
12990         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
12991         (struct die_reader_specs) <abbrev_table>: New member.
12992         (struct abbrev_table): Add constructor.
12993         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
12994         <abbrev_obstack>: Now an auto_obstack.
12995         (abbrev_table_up): New typedef.
12996         (init_cu_die_reader): Add abbrev_table parameter.
12997         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
12998         Add result_dwo_abbrev_table.
12999         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13000         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13001         Update.
13002         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13003         parameter.
13004         (skip_children): Update.
13005         (abbrev_table::alloc_abbrev): Rename from
13006         abbrev_table_alloc_abbrev.
13007         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13008         (abbrev_table::lookup_abbrev): Rename from
13009         abbrev_table_lookup_abbrev.
13010         (abbrev_table_read_table): Return abbrev_table_up.
13011         (abbrev_table_free, abbrev_table_free_cleanup)
13012         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13013         (load_partial_dies): Update.
13014
13015 2018-01-17  Tom Tromey  <tom@tromey.com>
13016
13017         * dwarf2read.c (dwarf2_compute_name): Update comment.
13018         (read_func_scope, read_variable): Update.
13019         (new_symbol): Remove.
13020         (new_symbol_full): Rename to new_symbol.
13021
13022 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
13023
13024         PR gdb/16577
13025         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13026         a warning instead of throwing an error, set section size to 0 and return
13027         NULL.
13028         * gdb_bfd.h (gdb_bfd_map_section): Update description.
13029
13030 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13031
13032         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13033         std::string.
13034         (linux_ptrace_attach_fail_reason_string): Likewise.
13035         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13036         Likewise.
13037         (linux_ptrace_attach_fail_reason_string): Likewise.
13038         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13039
13040 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13041
13042         * linux-nat.c (linux_nat_attach): Remove xstrdup.
13043
13044 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
13045
13046         PR gdb/21559
13047         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13048         checking for fs_base/gs_base fields in struct user_regs_struct.
13049         * configure: Regenerate.
13050
13051 2018-01-17  Yao Qi  <yao.qi@linaro.org>
13052
13053         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13054         function.
13055         (aarch64_linux_init_abi): Install it to gdbarch hook
13056         gcc_target_options.
13057
13058 2018-01-15  Pedro Alves  <palves@redhat.com>
13059
13060         * common/signals-state-save-restore.c
13061         (save_original_signals_state): Fix typos.
13062
13063 2017-01-12  Tom Tromey  <tom@tromey.com>
13064             Sergio Durigan Junior  <sergiodj@redhat.com>
13065
13066         * Makefile.in (install-only): Install gdb-add-index.
13067
13068 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
13069
13070         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13071
13072 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13073
13074         * infrun.c (keep_going_pass_signal): Clear step-over info when
13075         insert_breakpoints fails.
13076
13077 2018-01-11  Pedro Alves  <palves@redhat.com>
13078
13079         PR gdb/22583
13080         * infrun.c (resume): Rename to ...
13081         (resume_1): ... this.
13082         (resume): Reimplement as wrapper around resume_1.
13083
13084 2018-01-11  Pedro Alves  <palves@redhat.com>
13085
13086         PR remote/22597
13087         * remote.c (remote_parse_stop_reply): Default to the last-set
13088         general thread instead of to 'magic_null_ptid'.
13089
13090 2018-01-10  Pedro Alves  <palves@redhat.com>
13091
13092         * language.h (language_get_symbol_name_matcher): Rename ...
13093         (get_symbol_name_matcher): ... this.
13094         * language.c (language_get_symbol_name_matcher): Ditto.
13095         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13096         callers adjusted.
13097
13098 2018-01-10  Pedro Alves  <palves@redhat.com>
13099
13100         PR gdb/22670
13101         * dwarf2read.c
13102         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13103         Adjust to use language_get_symbol_name_matcher instead of
13104         language_defn::la_get_symbol_name_matcher.
13105         * language.c (language_get_symbol_name_matcher): If in Ada mode
13106         and the lookup name is a verbatim match, return Ada's matcher.
13107         * language.h (language_get_symbol_name_matcher): Adjust comment.
13108         (ada_lookup_name_info::verbatim_p):: New method.
13109
13110 2018-01-10  Pedro Alves  <palves@redhat.com>
13111
13112         PR gdb/22670
13113         * ada-lang.c (ada_collect_symbol_completion_matches): If the
13114         minsym's language is language_auto or language_cplus, pass down
13115         language_ada instead.
13116         * symtab.c (compare_symbol_name): Don't frob symbol language here.
13117
13118 2018-01-10  Pedro Alves  <palves@redhat.com>
13119
13120         PR gdb/22670
13121         * minsyms.c (linkage_name_str): New function.
13122         (iterate_over_minimal_symbols): Use it.
13123
13124 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13125
13126         * NEWS: Document that 'info proc' now works on FreeBSD.
13127
13128 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13129
13130         * configure.ac: Check for kinfo_getfile in libutil.
13131         * configure: Regenerate.
13132         * config.in: Regenerate.
13133         * fbsd-nat.c: Include "fbsd-tdep.h".
13134         (fbsd_fetch_cmdline): New.
13135         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13136         rather than calling error.
13137         (fbsd_info_proc): New.
13138         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13139         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13140         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13141
13142 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13143
13144         * fbsd-nat.c (struct free_deleter): Remove.
13145         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13146
13147 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13148
13149         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13150         NULL for an empty pathname.
13151
13152 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13153
13154         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13155         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13156         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13157         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13158         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13159         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13160         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13161         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13162         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13163         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13164         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13165         (fbsd_core_fetch_timeval, fbsd_print_sigset)
13166         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13167         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
13168         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13169
13170 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
13171
13172         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13173         (gnu_xfer_auxv): New function.
13174         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13175         TARGET_OBJECT_AUXV.
13176
13177 2018-01-08  Yao Qi  <yao.qi@linaro.org>
13178             Simon Marchi  <simon.marchi@ericsson.com>
13179
13180         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13181         common/selftest.c.
13182         (COMMON_OBS): Remove selftest.o.
13183         * configure.ac: Append selftest-arch.c and common/selftest.c to
13184         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
13185         * configure: Re-generated.
13186         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13187         GDB_SELF_TEST.
13188         (maintenance_info_selftests): Likewise.
13189
13190 2018-01-08  Xavier Roirand  <roirand@adacore.com>
13191
13192         * ada-valprint.c (val_print_packed_array_elements): Use
13193         proper number of elements when printing an array indexed
13194         by an enumeration type.
13195
13196 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13197
13198         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13199         (dw2_get_file_names_reader): Adjust.
13200         (lookup_dwo_signatured_type): Adjust.
13201         (lookup_dwp_signatured_type): Adjust.
13202         (lookup_signatured_type): Adjust.
13203         (create_type_unit_group): Adjust.
13204         (get_type_unit_group): Adjust.
13205         (process_psymtab_comp_unit_reader): Adjust.
13206         (build_type_psymtabs_reader): Adjust.
13207         (scan_partial_symbols): Adjust.
13208         (add_partial_symbol): Adjust.
13209         (add_partial_subprogram): Adjust.
13210         (peek_die_abbrev): Adjust.
13211         (fixup_go_packaging): Adjust.
13212         (process_imported_unit_die): Adjust.
13213         (dwarf2_compute_name): Adjust.
13214         (dwarf2_physname): Adjust.
13215         (read_import_statement): Adjust.
13216         (handle_DW_AT_stmt_list): Adjust.
13217         (read_file_scope): Adjust.
13218         (read_func_scope): Adjust.
13219         (read_lexical_block_scope): Adjust.
13220         (read_call_site_scope): Adjust.
13221         (read_variable): Adjust.
13222         (dwarf2_rnglists_process): Adjust.
13223         (dwarf2_ranges_process): Adjust.
13224         (dwarf2_ranges_read): Adjust.
13225         (dwarf2_get_pc_bounds): Adjust.
13226         (dwarf2_record_block_ranges): Adjust.
13227         (dwarf2_add_field): Adjust.
13228         (dwarf2_add_member_fn): Adjust.
13229         (read_structure_type): Adjust.
13230         (process_structure_scope): Adjust.
13231         (read_enumeration_type): Adjust.
13232         (read_array_type): Adjust.
13233         (mark_common_block_symbol_computed): Adjust.
13234         (read_common_block): Adjust.
13235         (read_namespace_type): Adjust.
13236         (read_namespace): Adjust.
13237         (read_module_type): Adjust.
13238         (read_tag_pointer_type): Adjust.
13239         (read_tag_ptr_to_member_type): Adjust.
13240         (read_tag_string_type): Adjust.
13241         (read_subroutine_type): Adjust.
13242         (read_typedef): Adjust.
13243         (read_base_type): Adjust.
13244         (attr_to_dynamic_prop): Adjust.
13245         (read_subrange_type): Adjust.
13246         (read_unspecified_type): Adjust.
13247         (dwarf2_read_abbrevs): Adjust.
13248         (load_partial_dies): Adjust.
13249         (read_partial_die): Adjust.
13250         (find_partial_die): Adjust.
13251         (guess_partial_die_structure_name): Adjust.
13252         (fixup_partial_die): Adjust.
13253         (read_attribute_value): Adjust.
13254         (read_addr_index): Adjust.
13255         (read_addr_index_from_leb128): Adjust.
13256         (read_str_index): Adjust.
13257         (dwarf2_string_attr): Adjust.
13258         (get_debug_line_section): Adjust.
13259         (dwarf_decode_line_header): Adjust.
13260         (lnp_state_machine::check_line_address): Adjust.
13261         (dwarf_decode_lines_1): Adjust.
13262         (dwarf_decode_lines): Adjust.
13263         (dwarf2_start_symtab): Adjust.
13264         (var_decode_location): Adjust.
13265         (new_symbol_full): Adjust.
13266         (dwarf2_const_value_data): Adjust.
13267         (dwarf2_const_value_attr): Adjust.
13268         (dwarf2_const_value): Adjust.
13269         (die_type): Adjust.
13270         (die_containing_type): Adjust.
13271         (build_error_marker_type): Adjust.
13272         (lookup_die_type): Adjust.
13273         (guess_full_die_structure_name): Adjust.
13274         (anonymous_struct_prefix): Adjust.
13275         (determine_prefix): Adjust.
13276         (dwarf2_name): Adjust.
13277         (follow_die_ref_or_sig): Adjust.
13278         (follow_die_offset): Adjust.
13279         (follow_die_ref): Adjust.
13280         (follow_die_sig_1): Adjust.
13281         (follow_die_sig): Adjust.
13282         (get_signatured_type): Adjust.
13283         (get_DW_AT_signature_type): Adjust.
13284         (decode_locdesc): Adjust.
13285         (dwarf_decode_macros): Adjust.
13286         (cu_debug_loc_section): Adjust.
13287         (fill_in_loclist_baton): Adjust.
13288         (dwarf2_symbol_mark_computed): Adjust.
13289         (init_one_comp_unit): Don't assign
13290         dwarf2_cu::dwarf2_per_objfile.
13291         (set_die_type): Adjust.
13292
13293 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13294
13295         * dwarf2read.c (struct mapped_debug_names): Add constructor.
13296         <dwarf2_per_objfile>: New field.
13297         (dwarf2_per_objfile): Remove global.
13298         (get_dwarf2_per_objfile): New function.
13299         (set_dwarf2_per_objfile): New function.
13300         (dwarf2_build_psymtabs_hard): Change objfile parameter to
13301         dwarf2_per_objfile.
13302         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13303         (read_abbrev_offset): Likewise.
13304         (read_indirect_string): Likewise.
13305         (read_indirect_line_string): Likewise.
13306         (read_indirect_string_at_offset): Likewise.
13307         (read_indirect_string_from_dwz): Likewise.
13308         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13309         dwarf2_per_objfile.
13310         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13311         (create_all_comp_units): Change objfile parameter to
13312         dwarf2_per_objfile.
13313         (create_all_type_units): Likewise.
13314         (process_queue): Add dwarf2_per_objfile parameter.
13315         (read_and_check_comp_unit_head): Likewise.
13316         (lookup_dwo_unit_in_dwp): Likewise.
13317         (get_dwp_file): Likewise.
13318         (process_cu_includes): Likewise.
13319         (struct free_dwo_file_cleanup_data): New struct.
13320         (dwarf2_has_info): Use get_dwarf2_per_objfile and
13321         set_dwarf2_per_objfile.
13322         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13323         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13324         context, adjust calls.
13325         (dw2_instantiate_symtab): Likewise.
13326         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13327         (dw2_get_cu): Likewise.
13328         (create_cu_from_index_list): Change objfile parameter to
13329         dwarf2_per_objfile.
13330         (create_cus_from_index_list): Get dwarf2_per_objfile from
13331         context, adjust calls.
13332         (create_cus_from_index): Likewise.
13333         (create_signatured_type_table_from_index): Change objfile
13334         parameter to dwarf2_per_objfile.
13335         (create_signatured_type_table_from_debug_names): Change objfile
13336         parameter to dwarf2_per_objfile.
13337         (create_addrmap_from_index): Likewise.
13338         (create_addrmap_from_aranges): Likewise.
13339         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13340         (dw2_setup): Remove.
13341         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13342         context.
13343         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13344         get_dwarf2_per_objfile.
13345         (dw2_forget_cached_source_info): Likewise.
13346         (dw2_map_symtabs_matching_filename): Likewise.
13347         (struct dw2_symtab_iterator) <index>: Remove.
13348         <dwarf2_per_objfile>: New field.
13349         (dw2_symtab_iter_init): Replace index parameter with
13350         dwarf2_per_objfile.
13351         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13352         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13353         (dw2_print_stats): Likewise.
13354         (dw2_dump): Likewise.
13355         (dw2_expand_symtabs_for_function): Likewise.
13356         (dw2_expand_all_symtabs): Likewise.
13357         (dw2_expand_symtabs_with_fullname): Likewise.
13358         (dw2_expand_marked_cus): Replace index and objfile parameters
13359         with dwarf2_per_objfile.
13360         (dw_expand_symtabs_matching_file_matcher): Add
13361         dwarf2_per_objfile parameter and adjust calls.
13362         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13363         adjust calls.
13364         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13365         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13366         adjust calls.
13367         (create_cus_from_debug_names_list): Replace objfile parameter
13368         with dwarf2_per_objfile and adjust calls.
13369         (create_cus_from_debug_names): Likewise.
13370         (dwarf2_read_debug_names): Likewise.
13371         (mapped_debug_names::namei_to_name): Adjust call.
13372         (dw2_debug_names_iterator::next): Likewise.
13373         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13374         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13375         (dw2_debug_names_dump): Likewise.
13376         (dw2_debug_names_expand_symtabs_for_function): Likewise.
13377         (dw2_debug_names_expand_symtabs_matching): Likewise.
13378         (dwarf2_initialize_objfile): Likewise.
13379         (dwarf2_build_psymtabs): Likewise.
13380         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13381         this_cu.
13382         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13383         (read_and_check_comp_unit_head): Likewise.
13384         (read_abbrev_offset): Likewise.
13385         (create_debug_type_hash_table): Likewise.
13386         (create_debug_types_hash_table): Likewise.
13387         (create_all_type_units): Replace objfile parameter with
13388         dwarf2_per_objfile.
13389         (add_type_unit): Add dwarf2_per_objfile parameter.
13390         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13391         with dwarf2_per_objfile.
13392         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13393         (lookup_dwp_signatured_type): Likewise.
13394         (lookup_signatured_type): Likewise.
13395         (read_cutu_die_from_dwo): Likewise.
13396         (init_tu_and_read_dwo_dies): Likewise.
13397         (init_cutu_and_read_dies): Likewise.
13398         (init_cutu_and_read_dies_no_follow): Likewise.
13399         (allocate_type_unit_groups_table): Add objfile parameter.
13400         (create_type_unit_group): Use dwarf2_per_objfile from cu.
13401         (get_type_unit_group): Likewise.
13402         (process_psymtab_comp_unit): Update call.
13403         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13404         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13405         (print_tu_stats): Likewise.
13406         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13407         in void* parameter.
13408         (build_type_psymtabs): Change objfile parameter to
13409         dwarf2_per_objfile.
13410         (process_skeletonless_type_unit): Use dwarf2_per_objfile
13411         passed in void* parameter.
13412         (process_skeletonless_type_units): Change objfile parameter to
13413         dwarf2_per_objfile.
13414         (set_partial_user): Likewise.
13415         (dwarf2_build_psymtabs_hard): Likewise.
13416         (read_comp_units_from_section): Likewise.
13417         (create_all_comp_units): Likewise.
13418         (scan_partial_symbols): Update calls.
13419         (add_partial_symbol): Likewise.
13420         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13421         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13422         (process_queue): Add dwarf2_per_objfile parameter.
13423         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13424         (compute_compunit_symtab_includes): Likewise.
13425         (process_cu_includes): Add dwarf2_per_objfile parameter.
13426         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13427         (process_full_type_unit): Likewise.
13428         (process_imported_unit_die): Update call.
13429         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13430         (read_file_scope): Likewise.
13431         (allocate_dwo_file_hash_table): Add objfile parameter.
13432         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13433         (create_cus_hash_table): Likewise.
13434         (create_dwp_hash_table): Likewise.
13435         (create_dwo_unit_in_dwp_v1): Likewise.
13436         (create_dwp_v2_section): Likewise.
13437         (create_dwo_unit_in_dwp_v2): Likewise.
13438         (lookup_dwo_unit_in_dwp): Likewise.
13439         (try_open_dwop_file): Likewise.
13440         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13441         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13442         cleanup to include a reference to dwarf2_per_objfile.
13443         (open_dwp_file): Add dwarf2_per_objfile parameter.
13444         (open_and_init_dwp_file): Likewise.
13445         (get_dwp_file): Likewise.
13446         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13447         (queue_and_load_all_dwo_tus): Update call.
13448         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13449         data.
13450         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13451         (dwarf2_ranges_process): Likewise.
13452         (dwarf2_get_pc_bounds): Likewise.
13453         (mark_common_block_symbol_computed): Likewise.
13454         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13455         (dwarf2_read_abbrevs): Update call.
13456         (read_partial_die): Use dwarf2_per_objfile from cu.
13457         (find_partial_die): Likewise.
13458         (fixup_partial_die): Likewise.
13459         (read_attribute_value): Likewise.
13460         (read_indirect_string_at_offset_from): Add objfile parameter.
13461         (read_indirect_string_at_offset): Add dwarf2_per_objfile
13462         parameter.
13463         (read_indirect_string_from_dwz): Add objfile parameter.
13464         (read_indirect_string): Add objfile parameter.
13465         (read_addr_index_1): Add dwarf2_per_objfile parameter.
13466         (read_addr_index): Use dwarf2_per_objfile from cu.
13467         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13468         call dw2_setup.
13469         (read_str_index): Use dwarf2_per_objfile from cu.
13470         (get_debug_line_section): Likewise.
13471         (read_formatted_entries): Add dwarf2_per_objfile parameter.
13472         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13473         (new_symbol_full): Use dwarf2_per_objfile from cu.
13474         (build_error_marker_type): Likewise.
13475         (lookup_die_type): Likewise.
13476         (determine_prefix): Likewise.
13477         (follow_die_offset): Likewise.
13478         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13479         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13480         (dwarf2_fetch_die_type_sect_off): Likewise.
13481         (dwarf2_get_die_type): Likewise.
13482         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13483         (get_signatured_type): Likewise.
13484         (get_DW_AT_signature_type): Likewise.
13485         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13486         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13487         (cu_debug_loc_section): Likewise.
13488         (fill_in_loclist_baton): Likewise.
13489         (dwarf2_symbol_mark_computed): Likewise.
13490         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13491         dwarf2_per_objfile.
13492         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13493         parameter.
13494         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13495         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13496         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13497         (set_die_type): Use dwarf2_free_objfile from cu.
13498         (get_die_type_at_offset): Likewise.
13499         (dwarf2_per_objfile_free): Don't assign global variable.
13500         (debug_names) <constructor>: Add dwarf2_per_objfile
13501         parameter, update m_debugstrlookup construction.
13502         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13503         parameter.
13504         <m_dwarf2_per_objfile>: New field.
13505         <lookup>: Use m_dwarf2_per_objfile.
13506         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13507         (psyms_seen_size): Likewise.
13508         (write_gdbindex): Replace objfile parameter with
13509         dwarf2_per_objfile.
13510         (write_debug_names): Likewise.
13511         (write_psymtabs_to_index): Likewise.
13512         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13513         calls.
13514
13515 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13516
13517         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13518         <dwarf2_per_objfile>: New field.
13519         (struct dwarf2_per_cu_data) <objfile>: Remove.
13520         <dwarf2_per_objfile>: New field.
13521         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13522         of objfile.
13523         (create_signatured_type_table_from_index): Likewise.
13524         (create_debug_type_hash_table): Likewise.
13525         (fill_in_sig_entry_from_dwo_entry): Likewise.
13526         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13527         (create_type_unit_group): Assign dwarf2_per_objfile instead of
13528         objfile.
13529         (create_partial_symtab): Access objfile through
13530         dwarf2_per_objfile.
13531         (process_psymtab_comp_unit_reader): Likewise.
13532         (read_comp_units_from_section): Likewise.
13533         (scan_partial_symbols): Likewise.
13534         (add_partial_symbol): Likewise.
13535         (add_partial_subprogram): Likewise.
13536         (peek_die_abbrev): Likewise.
13537         (fixup_go_packaging): Likewise.
13538         (process_full_comp_unit): Likewise.
13539         (process_full_type_unit): Likewise.
13540         (process_imported_unit_die): Likewise.
13541         (dwarf2_compute_name): Likewise.
13542         (dwarf2_physname): Likewise.
13543         (read_import_statement): Likewise.
13544         (create_cus_hash_table): Assign dwarf2_physname instead of
13545         objfile.
13546         (read_func_scope): Access objfile through dwarf2_per_objfile.
13547         (read_lexical_block_scope): Likewise.
13548         (read_call_site_scope): Likewise.
13549         (read_variable): Likewise.
13550         (dwarf2_rnglists_process): Likewise.
13551         (dwarf2_ranges_process): Likewise.
13552         (dwarf2_ranges_read): Likewise.
13553         (dwarf2_record_block_ranges): Likewise.
13554         (dwarf2_add_field): Likewise.
13555         (dwarf2_add_member_fn): Likewise.
13556         (read_structure_type): Likewise.
13557         (process_structure_scope): Likewise.
13558         (read_enumeration_type): Likewise.
13559         (read_array_type): Likewise.
13560         (read_common_block): Likewise.
13561         (read_namespace_type): Likewise.
13562         (read_namespace): Likewise.
13563         (read_module_type): Likewise.
13564         (read_tag_pointer_type): Likewise.
13565         (read_tag_ptr_to_member_type): Likewise.
13566         (read_tag_string_type): Likewise.
13567         (read_subroutine_type): Likewise.
13568         (read_typedef): Likewise.
13569         (read_base_type): Likewise.
13570         (attr_to_dynamic_prop): Likewise.
13571         (read_subrange_type): Likewise.
13572         (read_unspecified_type): Likewise.
13573         (load_partial_dies): Likewise.
13574         (read_partial_die): Likewise.
13575         (find_partial_die): Likewise.
13576         (guess_partial_die_structure_name): Likewise.
13577         (fixup_partial_die): Likewise.
13578         (read_attribute_value): Likewise.
13579         (read_addr_index_from_leb128): Likewise.
13580         (dwarf2_read_addr_index): Likewise.
13581         (dwarf2_string_attr): Likewise.
13582         (lnp_state_machine::check_line_address): Likewise.
13583         (dwarf_decode_lines_1): Likewise.
13584         (dwarf_decode_lines): Likewise.
13585         (dwarf2_start_symtab): Likewise.
13586         (var_decode_location): Likewise.
13587         (new_symbol_full): Likewise.
13588         (dwarf2_const_value_data): Likewise.
13589         (dwarf2_const_value_attr): Likewise.
13590         (dwarf2_const_value): Likewise.
13591         (die_type): Likewise.
13592         (die_containing_type): Likewise.
13593         (lookup_die_type): Likewise.
13594         (guess_full_die_structure_name): Likewise.
13595         (anonymous_struct_prefix): Likewise.
13596         (dwarf2_name): Likewise.
13597         (follow_die_ref_or_sig): Likewise.
13598         (follow_die_offset): Likewise.
13599         (follow_die_ref): Likewise.
13600         (dwarf2_fetch_die_loc_sect_off): Likewise.
13601         (dwarf2_fetch_constant_bytes): Likewise.
13602         (dwarf2_fetch_die_type_sect_off): Likewise.
13603         (dwarf2_get_die_type): Likewise.
13604         (follow_die_sig): Likewise.
13605         (decode_locdesc): Likewise.
13606         (dwarf2_per_cu_objfile): Likewise.
13607         (dwarf2_per_cu_text_offset): Likewise.
13608         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13609         objfile.
13610         (set_die_type): Access objfile through
13611         dwarf2_per_objfile.
13612
13613 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13614
13615         * valprint.c (converted_character_d): Remove typedef.
13616         (DEF_VEC_O (converted_character_d)): Remove.
13617         (count_next_character): Use std::vector.
13618         (print_converted_chars_to_obstack): Likewise.
13619         (generic_printstr): Likewise.
13620
13621 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13622
13623         * xml-support.h (struct gdb_xml_value): Add constructor.
13624         <value>: Change type to unique_xmalloc_ptr.
13625         (gdb_xml_value_s): Remove typedef.
13626         (DEF_VEC_O (gdb_xml_value_s)): Remove.
13627         (gdb_xml_element_start_handler): Change parameter type to
13628         std::vector.
13629         (xml_find_attribute): Likewise.
13630         * xml-support.c (xml_find_attribute): Change parameter type to
13631         std::vector and adjust.
13632         (gdb_xml_values_cleanup): Remove.
13633         (gdb_xml_parser::start_element): Adjust to std::vector.
13634         (xinclude_start_include): Change paraeter type to std::vector
13635         and adjust.
13636         * btrace.c (check_xml_btrace_version): Likewise.
13637         (parse_xml_btrace_block): Likewise.
13638         (parse_xml_btrace_pt_config_cpu): Likewise.
13639         (parse_xml_btrace_pt): Likewise.
13640         (parse_xml_btrace_conf_bts): Likewise.
13641         (parse_xml_btrace_conf_pt): Likewise.
13642         * memory-map.c (memory_map_start_memory): Likewise.
13643         (memory_map_start_property): Likewise.
13644         * osdata.c (osdata_start_osdata): Likewise.
13645         (osdata_start_item): Likewise.
13646         (osdata_start_column): Likewise.
13647         * remote.c (start_thread): Likewise.
13648         * solib-aix.c (library_list_start_library): Likewise.
13649         (library_list_start_list): Likewise.
13650         * solib-svr4.c (library_list_start_library): Likewise.
13651         (svr4_library_list_start_list): Likewise.
13652         * solib-target.c (library_list_start_segment): Likewise.
13653         (library_list_start_section): Likewise.
13654         (library_list_start_library): Likewise.
13655         (library_list_start_list): Likewise.
13656         * tracepoint.c (traceframe_info_start_memory): Likewise.
13657         (traceframe_info_start_tvar): Likewise.
13658         * xml-syscall.c (syscall_start_syscall): Likewise.
13659         * xml-tdesc.c (tdesc_start_target): Likewise.
13660         (tdesc_start_feature): Likewise.
13661         (tdesc_start_reg): Likewise.
13662         (tdesc_start_union): Likewise.
13663         (tdesc_start_struct): Likewise.
13664         (tdesc_start_flags): Likewise.
13665         (tdesc_start_enum): Likewise.
13666         (tdesc_start_field): Likewise.
13667         (tdesc_start_enum_value): Likewise.
13668         (tdesc_start_vector): Likewise.
13669
13670 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13671
13672         * extension.h (struct xmethod_worker) <clone>: Remove.
13673         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13674         Remove.
13675         (python_xmethod_worker::clone): Remove.
13676         * valops.c (find_overload_match): Use std::move instead of
13677         clone.
13678
13679 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13680
13681         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13682         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13683         <free_xmethod_worker_data>: Remove.
13684         <get_matching_xmethod_workers>: Chance VEC to std::vector.
13685         <get_xmethod_arg_types>: Remove.
13686         <get_xmethod_result_type>: Remove.
13687         <invoke_xmethod>: Remove.
13688         * extension.c (new_xmethod_worker): Remove.
13689         (clone_xmethod_worker): Remove.
13690         (get_matching_xmethod_workers): Return void, pass std::vector by
13691         pointer.
13692         (get_xmethod_arg_types): Rename to...
13693         (xmethod_worker::get_arg_types): ... this, and adjust.
13694         (get_xmethod_result_type): Rename to...
13695         (xmethod_worker::get_result_type): ... this, and adjust.
13696         (invoke_xmethod): Remove.
13697         (free_xmethod_worker): Remove.
13698         (free_xmethod_worker_vec): Remove.
13699         * extension.h (enum ext_lang_rc): Move here from
13700         extension-priv.h.
13701         (struct xmethod_worker): Add constructor and destructor.
13702         <data>: Remove.
13703         <value>: Remove.
13704         <invoke, clone, do_get_result_type, do_get_arg_types>: New
13705         virtual pure methods.
13706         <get_arg_types, get_result_type>: New methods.
13707         (xmethod_worker_ptr): Remove typedef.
13708         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13709         (xmethod_worker_vec): Remove typedef.
13710         (xmethod_worker_up): New typedef.
13711         (invoke_xmethod): Remove.
13712         (clone_xmethod_worker): Remove.
13713         (free_xmethod_worker): Remove.
13714         (free_xmethod_worker_vec): Remove.
13715         (get_xmethod_arg_types): Remove.
13716         (get_xmethod_result_type): Remove.
13717         * valops.c (find_method_list): Use std::vector, don't use
13718         intermediate vector.
13719         (value_find_oload_method_list): Use std::vector.
13720         (find_overload_match): Use std::vector.
13721         (find_oload_champ): Use std::vector.
13722         * value.c (value_free): Use operator delete.
13723         (value_of_xmethod): Rename to...
13724         (value_from_xmethod): ... this.  Don't assign
13725         xmethod_worker::value, take rvalue-reference.
13726         (result_type_of_xmethod): Adjust.
13727         (call_xmethod): Adjust.
13728         * value.h: Include extension.h.
13729         (struct xmethod_worker): Don't forward-declare.
13730         (value_of_xmethod): Rename to...
13731         (value_from_xmethod): ... this, take rvalue-reference.
13732         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13733         (struct python_xmethod_worker): ... this, add constructor and
13734         destructor.
13735         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13736         (gdbpy_free_xmethod_worker_data): Rename to...
13737         (python_xmethod_worker::~python_xmethod_worker): ... this and
13738         adjust.
13739         (gdbpy_clone_xmethod_worker_data): Rename to...
13740         (python_xmethod_worker::clone): ... this and adjust.
13741         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13742         temporary vector.
13743         (gdbpy_get_xmethod_arg_types): Rename to...
13744         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13745         (gdbpy_get_xmethod_result_type): Rename to...
13746         (python_xmethod_worker::do_get_result_type): ... this and
13747         adjust.
13748         (gdbpy_invoke_xmethod): Rename to...
13749         (python_xmethod_worker::invoke): ... this and adjust.
13750         (new_python_xmethod_worker): Rename to...
13751         (python_xmethod_worker::python_xmethod_worker): ... this and
13752         adjust.
13753         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13754         Remove.
13755         (gdbpy_free_xmethod_worker_data): Remove.
13756         (gdbpy_get_matching_xmethod_workers): Use std::vector.
13757         (gdbpy_get_xmethod_arg_types): Remove.
13758         (gdbpy_get_xmethod_result_type): Remove.
13759         (gdbpy_invoke_xmethod): Remove.
13760         * python/python.c (python_extension_ops): Remove obsolete
13761         callbacks.
13762
13763 2018-01-05  Pedro Alves  <palves@redhat.com>
13764
13765         PR gdb/18653
13766         * common/signals-state-save-restore.c
13767         (save_original_signals_state): New parameter 'quiet'.  Warn if we
13768         find a custom handler preinstalled, instead of internal erroring.
13769         But only warn if !quiet.
13770         * common/signals-state-save-restore.h
13771         (save_original_signals_state): New parameter 'quiet'.
13772         * main.c (captured_main_1): Move save_original_signals_state call
13773         after option handling, and pass QUIET.
13774
13775 2018-01-05  Pedro Alves  <palves@redhat.com>
13776
13777         * spu-tdep.c (spu_catch_start): Pass
13778         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13779
13780 2018-01-05  Pedro Alves  <palves@redhat.com>
13781
13782         PR gdb/22670
13783         * ada-lang.c (literal_symbol_name_matcher): New function.
13784         (ada_get_symbol_name_matcher): Use it for
13785         symbol_name_match_type::SEARCH_NAME.
13786         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
13787         it down instead of assuming symbol_name_match_type::FULL.
13788         * block.h (block_lookup_symbol): New parameter 'match_type'.
13789         * c-valprint.c (print_unpacked_pointer): Use
13790         lookup_symbol_search_name instead of lookup_symbol.
13791         * compile/compile-object-load.c (get_out_value_type): Pass down
13792         symbol_name_match_type::SEARCH_NAME.
13793         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13794         symbol_name_match_type::FULL.
13795         * cp-support.c (cp_get_symbol_name_matcher): Handle
13796         symbol_name_match_type::SEARCH_NAME.
13797         * infrun.c (insert_exception_resume_breakpoint): Use
13798         lookup_symbol_search_name.
13799         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13800         * psymtab.c (maintenance_check_psymtabs): Use
13801         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13802         * stack.c (print_frame_args): Use lookup_symbol_search_name and
13803         SYMBOL_SEARCH_NAME.
13804         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13805         if symbol_name_match_type::SEARCH_NAME.
13806         (lookup_symbol_in_language): Pass down
13807         symbol_name_match_type::FULL.
13808         (lookup_symbol_search_name): New.
13809         (lookup_language_this): Pass down
13810         symbol_name_match_type::SEARCH_NAME.
13811         (lookup_symbol_aux, lookup_local_symbol): New parameter
13812         'match_type'.  Pass it down.
13813         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13814         (lookup_symbol_search_name): New declaration.
13815         (lookup_symbol_in_block): New 'match_type' parameter.
13816
13817 2018-01-05  Pedro Alves  <palves@redhat.com>
13818
13819         PR gdb/22670
13820         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13821         ada_lookup_symbol.
13822         (ada_lookup_symbol): Reimplement in terms of
13823         ada_lookup_symbol_list, bits factored out from
13824         ada_lookup_encoded_symbol.
13825
13826 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13827
13828         * ada-exp.y (write_object_renaming): When subscripting an array
13829         using a symbol as the index, pass the block in call to
13830         ada_lookup_encoded_symbol when looking that symbol up.
13831
13832 2018-01-05  Jerome Guitton  <guitton@adacore.com>
13833
13834         * ada-lang.c (ada_array_length): Use ada_index_type instead of
13835         TYPE_INDEX_TYPE.
13836
13837 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13838
13839         * ada-lang.c (ada_to_fixed_value_create): Add handling of
13840         the case where VALUE_LVAL (val0) is not lval_memory.
13841
13842 2018-01-05  Xavier Roirand  <roirand@adacore.com>
13843
13844         * ada-valprint.c (print_optional_low_bound): Handle
13845         character-indexed array printing like boolean-indexed array
13846         printing.
13847
13848 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13849
13850         * NEWS: Create a new section for the next release branch.
13851         Rename the section of the current branch, now that it has
13852         been cut.
13853
13854 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13855
13856         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
13857         * version.in: Bump version to 8.1.50.DATE-git.
13858
13859 2018-01-03  Xavier Roirand  <roirand@adacore.com>
13860
13861         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
13862         Add field.
13863         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
13864         Add field.
13865         (default_exception_support_info) <catch_handlers_sym>: Add field.
13866         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
13867         (ada_exception_name_addr_1): Add "catch handlers" handling.
13868         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
13869         Update all callers.
13870         (create_excep_cond_exprs) <ex>: Add parameter.
13871         (re_set_exception): Update create_excep_cond_exprs call.
13872         (print_it_exception, print_one_exception, print_mention_exception)
13873         (print_recreate_exception): Add "catch handler" handling.
13874         (allocate_location_catch_handlers, re_set_catch_handlers)
13875         (check_status_catch_handlers, print_it_catch_handlers)
13876         (print_one_catch_handlers, print_mention_catch_handlers)
13877         (print_recreate_catch_handlers): New function.
13878         (catch_handlers_breakpoint_ops): New variable.
13879         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
13880         Add parameter.  Add "catch handler" handling.
13881         (ada_exception_sym_name, ada_exception_breakpoint_ops):
13882         Add "catch handler" handling.
13883         (ada_exception_catchpoint_cond_string): Add "catch handler"
13884         handling.
13885         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
13886         call.
13887         (catch_ada_handlers_command): New function.
13888         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
13889         operations structure.
13890         (_initialize_ada_language): Add "catch handlers" command entry.
13891         * NEWS: Document "catch handlers" feature.
13892
13893 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13894
13895         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
13896         account when creating the array type of the slice.
13897         (ada_value_slice): Likewise.
13898
13899 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13900
13901         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
13902         New enum value.
13903         (create_array_type_with_stride): Add byte_stride_prop parameter.
13904         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
13905         New parameter.  Update all callers in this file.
13906         (array_type_has_dynamic_stride): New function.
13907         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
13908         of arrays with dynamic byte strides.
13909         * dwarf2read.c (read_array_type): Add support for dynamic
13910         DW_AT_byte_stride attributes.
13911
13912 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
13913
13914         * dwarf2read.c (read_unspecified_type): Treat
13915         DW_TAG_enumeration_type DIEs from Ada units as stubs.
13916
13917 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13918
13919         Update copyright year range in all GDB files.
13920
13921 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13922
13923         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
13924         and gdb/testsuite/gdb.base/step-line.c.
13925
13926 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13927
13928         * copyright.py (main): Dump the contents of
13929         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
13930         even if BY_HAND is empty.
13931
13932 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13933
13934         * top.c (print_gdb_version): Update Copyright year in version
13935         message.
13936
13937 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
13938
13939         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
13940
13941 For older changes see ChangeLog-2017.
13942 \f
13943 Local Variables:
13944 mode: change-log
13945 left-margin: 8
13946 fill-column: 74
13947 version-control: never
13948 coding: utf-8
13949 End: