31d06708e38148ea79047e6c3457072b86e20071
[external/binutils.git] / gdb / ChangeLog
1 2018-09-30  Pedro Alves  <palves@redhat.com>
2
3         * darwin-nat-info.c (darwin_debug_regions_recurse)
4         (info_mach_exceptions_command): Remove unused local variables.
5         * darwin-nat.c (darwin_decode_notify_message)
6         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
7         (darwin_stop_inferior, darwin_setup_exceptions)
8         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
9         (darwin_nat_target::attach, darwin_nat_target::detach)
10         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
11         local variables.
12         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
13         variables.
14
15 2018-09-29  Tom Tromey  <tom@tromey.com>
16
17         * README: Remove some leftover text.
18
19 2018-09-29  Tom Tromey  <tom@tromey.com>
20
21         * PROBLEMS: Rewrite.
22         * README: Update.
23
24 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
25
26         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
27         case with explicit breakpoint kind.
28         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
29         'additional_info' and related logic.
30         (riscv_debug_breakpoints): New variable.
31         (riscv_breakpoint_kind_from_pc): Use the length of the existing
32         instruction to determine the breakpoint kind.
33         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
34         flag.  Update description of 'set/show riscv
35         use-compressed-breakpoints' flag.
36
37 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
38
39         (NEWS): Mention changes to frame related commands.
40         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
41         (add_prefix_cmd_suppress_notification): New function.
42         (add_com_suppress_notification): Call
43         add_cmd_suppress_notification.
44         * command.h (add_cmd_suppress_notification): Declare.
45         (add_prefix_cmd_suppress_notification): Declare.
46         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
47         (parse_frame_specification): Moved from stack.c, with
48         simplification to handle a single argument.
49         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
50         switch to the selected frame.  Add a header comment.
51         * stack.c: Remove 'safe-ctype.h' include.
52         (find_frame_for_function): Add declaration.
53         (find_frame_for_address): New function.
54         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
55         (frame_selection_by_function_completer): New function.
56         (info_frame_command): Rename to...
57         (info_frame_command_core): ...this, and update parameter types.
58         (select_frame_command): Rename to...
59         (select_frame_command_core): ...this, and update parameter types.
60         (frame_command): Rename to...
61         (frame_command_core): ...this, and update parameter types.
62         (class frame_command_helper): New class to wrap implementations of
63         frame related sub-commands.
64         (frame_apply_cmd_list): New static global.
65         (frame_cmd_list): Make static.
66         (select_frame_cmd_list): New global for sub-commands.
67         (info_frame_cmd_list): New global for sub-commands.
68         (_initialize_stack): Register sub-commands for 'frame',
69         'select-frame', and 'info frame'.  Update 'frame apply' commands
70         to use frame_apply_cmd_list.  Move function local static
71         frame_apply_list to file static frame_apply_cmd_list for
72         consistency.
73         * stack.h (select_frame_command): Delete declarationn.
74         (select_frame_for_mi): Declare new function.
75
76 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
77
78         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
79         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
80         and NOP.
81
82 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
83
84         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
85
86 2018-09-26  Tom Tromey  <tom@tromey.com>
87
88         * valops.c (auto_abandon): Remove dead code.
89
90 2018-09-26  Tom Tromey  <tom@tromey.com>
91
92         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
93
94 2018-09-24  Tom Tromey  <tom@tromey.com>
95
96         * common/pathstuff.c (get_standard_cache_dir): Make
97         "xdg_cache_home" and "home" const.
98         * top.c (init_history): Make "tmpenv" const.
99         * main.c (get_init_files): Make "homedir" const.
100
101 2018-09-23  Tom Tromey  <tom@tromey.com>
102
103         PR python/18852:
104         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
105
106 2018-09-23  Tom Tromey  <tom@tromey.com>
107
108         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
109         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
110         * python/python-internal.h (gdbpy_handle_exception): Declare.
111         * python/py-utils.c (gdbpy_handle_exception): New function.
112
113 2018-09-23  Tom Tromey  <tom@tromey.com>
114
115         PR python/17284:
116         * python/py-type.c (typy_template_argument): Check for negative
117         argument number.
118
119 2018-09-23  Tom Tromey  <tom@tromey.com>
120
121         PR python/14062:
122         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
123
124 2018-09-23  Tom Tromey  <tom@tromey.com>
125
126         PR python/18170:
127         * python/py-value.c (valpy_int): Allow conversion from pointer
128         type.
129
130 2018-09-23  Tom Tromey  <tom@tromey.com>
131
132         PR python/20126:
133         * python/py-value.c (valpy_int): Respect type sign.
134
135 2018-09-23  Tom Tromey  <tom@tromey.com>
136
137         PR python/18352;
138         * python/py-value.c (valpy_float): Allow conversions from int or
139         char.
140         (valpy_int, valpy_long): Allow conversions from float.
141
142 2018-09-23  Tom Tromey  <tom@tromey.com>
143
144         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
145         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
146
147 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
148
149         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
150         __sighndlr.
151         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
152
153 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
154
155         * windows-nat.c (windows_nat_target::wait): Remove a spurious
156         target_terminal::ours().
157
158 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
159
160         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
161         of vl to ULONGEST.
162
163 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
164
165         * breakpoint.c (update_inserted_breakpoint_locations): Remove
166         redundant condition.
167
168 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
169
170         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
171
172         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
173         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
174         * sol-thread.c (ps_pdmodel): Don't guard definition.
175
176         * procfs.c: Fix formatting.
177
178         * procfs.c (sysset_t_alloc): Remove.
179         (create_procinfo): Use XNEW instead of sysset_t_alloc.
180         (procfs_debug_inferior): Likewise.
181         (procfs_set_exec_trap): Likewise.
182         (proc_set_traced_sysentry): Don't allocate argp dynamically.
183         (proc_set_traced_sysexit): Likewise.
184
185         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
186         (dead_procinfo): Likewise.
187         (proc_warn): Likewise.
188         (proc_error): Likewise.
189         (proc_get_LDT_entry): Likewise.
190         (do_attach): Likewise.
191         (procfs_target::pid_to_str): Likewise.
192         (iterate_over_mappings): Likewise.
193
194         * procfs.c (create_procinfo): Fix ARI warning.
195         (proc_get_status): Likewise.
196         (proc_stop_process): Likewise.
197         (proc_run_process): Likewise.
198         (proc_kill): Likewise.
199         (proc_get_LDT_entry): Likewise.
200         (procfs_find_LDT_entry): Likewise.
201         (proc_update_threads): Likewise.
202         (proc_iterate_over_threads): Likewise.
203         (do_attach): Likewise.
204         (procfs_xfer_memory): Likewise.
205         (invalidate_cache): Likewise.
206         (procfs_target::resume): Likewise.
207         (procfs_init_inferior): Likewise.
208         (procfs_set_exec_trap): Likewise.
209         (procfs_target::thread_alive): Likewise.
210         (procfs_target::pid_to_exec_file): Likewise.
211         (iterate_over_mappings): Likewise.
212         (procfs_target::make_corefile_notes): Likewise.
213         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
214
215         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
216         (procfs_find_LDT_entry): Likewise.
217         * sol-thread.c (ps_lgetLDT): Likewise.
218
219 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
220
221         PR tdep/17903
222         * procfs.c (procfs_target): Declare pid_to_exec_file.
223         (procfs_target::pid_to_exec_file): New.
224
225 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
226
227         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
228         renaming.
229         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
230         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
231
232 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
233
234         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
235         (supply_fpregset, fill_fpregset): Move ...
236         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
237         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
238         Remove references to ioctl-based procfs.
239         Include <sys/reg.h>.
240         Remove PR_MODEL_NATIVE guards.
241         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
242         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
243
244 2018-09-19  Xavier Roirand  <roirand@adacore.com>
245
246         PR gdb/20981:
247         * solib-darwin.c (darwin_get_dyld_bfd): New function.
248         (darwin_solib_get_all_image_info_addr_at_init): Update call.
249         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
250
251 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
252
253         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
254         (fbsd_print_sockaddr_in6): Likewise.
255
256 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
257             Chris January  <chris.january@arm.com>
258
259         * eval.c (skip_undetermined_arglist): Skip argument list helper.
260         (evaluate_subexp_standard): Return a dummy type when
261         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
262         OP_F77_UNDETERMINED_ARGLIST case.
263         * expression.h (enum noside): Update comment.
264
265 2018-09-19  George Vasick <george.vasick@oracle.com>
266
267         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
268
269 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
270             April Chin <april.chin@oracle.com>
271             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
272
273         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
274         uint_t lwpid_t.
275         (create_procinfo): Print pids in /proc without leading zeros.
276
277 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
278
279         * nios2-tdep.c (nios2_gcc_target_options): New.
280         (nios2_gdb_arch_init): Install new hook.
281
282 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
283
284         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
285         New file.
286         * update-gnulib.sh: Apply patch.
287         * configure: Re-generate.
288
289 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
290
291         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
292         description.  Make "info proc" command descriptions more
293         consistent.
294
295 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
296
297         * NEWS: Mention 'info proc files' command.
298
299 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
300
301         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
302         descriptors for IP_FILES and IP_ALL.
303
304 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
305
306         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
307         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
308         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
309         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
310         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
311         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
312         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
313         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
314         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
315         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
316         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
317         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
318         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
319         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
320         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
321         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
322         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
323         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
324         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
325         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
326         (struct fbsd_sockaddr_un): New types.
327         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
328         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
329         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
330         (fbsd_core_info_proc_files): New functions.
331         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
332         IP_ALL.
333         * fbsd-tdep.h (fbsd_info_proc_files_header)
334         (fbsd_info_proc_files_entry): New.
335
336 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
337
338         * defs.h (enum info_proc_what) [IP_FILES]: New value.
339         * infcmd.c (info_proc_cmd_files): New function.
340         (_initialize_infcmd): Register 'info proc files' command.
341
342 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
343
344         * gnulib/aclocal-m4-deps.mk: Re-generate.
345         * gnulib/aclocal.m4: Re-generate.
346         * gnulib/config.in: Re-generate.
347         * gnulib/configure: Re-generate.
348         * gnulib/import/Makefile.am: Re-generate.
349         * gnulib/import/Makefile.in: Re-generate.
350         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
351         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
352         * gnulib/import/arpa_inet.in.h: New file.
353         * gnulib/import/inet_ntop.c: New file.
354         * gnulib/import/m4/arpa_inet_h.m4: New file.
355         * gnulib/import/m4/inet_ntop.m4: New file.
356         * gnulib/import/m4/netinet_in_h.m4: New file.
357         * gnulib/import/m4/socklen.m4: New file.
358         * gnulib/import/m4/sockpfaf.m4: New file.
359         * gnulib/import/m4/stdalign.m4: New file.
360         * gnulib/import/m4/sys_uio_h.m4: New file.
361         * gnulib/import/netinet_in.in.h: New file.
362         * gnulib/import/stdalign.in.h: New file.
363         * gnulib/import/sys_socket.c: New file.
364         * gnulib/import/sys_socket.in.h: New file.
365         * gnulib/import/sys_uio.in.h: New file.
366         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
367         module.
368
369 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
370
371         * gnulib/aclocal-m4-deps.mk: New file.
372         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
373         deterministically.
374
375 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
376
377         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
378         KVE_PATH.
379
380 2018-09-18  Tom Tromey  <tom@tromey.com>
381
382         * compile/compile-object-load.c (struct
383         link_hash_table_cleanup_data): Add constructor and destructor.
384         Use DISABLE_COPY_AND_ASSIGN.
385         (~link_hash_table_cleanup_data): Rename from
386         link_hash_table_free.  Now a destructor.
387         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
388
389 2018-09-18  Tom Tromey  <tom@tromey.com>
390
391         * compile/compile-object-run.c (do_module_cleanup): Use delete.
392         * compile/compile-object-load.c (struct munmap_list): Move to
393         header file.
394         (munmap_list::add): Rename from munmap_list_add; rewrite.
395         (munmap_list::~munmap_list): Rename from munmap_list_free.
396         (munmap_listp_free_cleanup): Remove.
397         (compile_object_load): Update.
398         * compile/compile-object-load.h (struct munmap_list): Move from
399         compile-object-load.c.  Rewrite.
400
401 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
402
403         * aarch64-tdep.c (pass_in_v): Use register size.
404         (aarch64_extract_return_value): Likewise.
405         (aarch64_store_return_value): Likewise.
406
407 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
408
409         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
410         rlim_t.
411
412 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
413
414         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
415         Fix short help line.
416
417 2018-09-17  Tom Tromey  <tom@tromey.com>
418
419         PR python/20445:
420         * configure: Rebuild.
421         * configure.ac: Conditionally use -DNDEBUG for Python.
422
423 2018-09-17  Tom Tromey  <tom@tromey.com>
424
425         * configure: Rebuild.
426         * configure.ac: Use gmp as a library dependency when checking for
427         mpfr.
428
429 2018-09-17  Pedro Alves  <palves@redhat.com>
430
431         * python/py-inferior.c (find_inferior_object): Delete.
432
433 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
434
435         * compile/compile-cplus-types.c
436         (compile_cplus_instance::enter_scope): Don't use new_scope after
437         std::move.
438
439 2018-09-17  Tom Tromey  <tom@tromey.com>
440
441         * common/pathstuff.c (get_standard_cache_dir): Use
442         ~/Library/Caches on macOS.
443         * common/pathstuff.h (get_standard_cache_dir): Update comment.
444
445 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
446
447         PR python/23669
448         * breakpoint.c (commands_cmd_element): New.
449         (_initialize_breakpoint): Assign commands_cmd_element.
450         * breakpoint.h (commands_cmd_element): New.
451         * cli/cli-script.c (while_cmd_element, if_command,
452         define_cmd_element): New.
453         (command_name_equals): Remove.
454         (process_next_line): Compare commands by pointer, not by name.
455         (_initialize_cli_script): Assign the various cmd_list_element
456         variables.
457         * compile/compile.c (compile_cmd_element): New.
458         (_initialize_compile): Assign compile_cmd_element.
459         * compile/compile.h (compile_cmd_element): New.
460         * guile/guile.c (guile_cmd_element): New.
461         (install_gdb_commands): Assign guile_cmd_element.
462         * guile/guile.h (guile_cmd_element): New.
463         * python/python.c (python_cmd_element): New.
464         (_initialize_python): Assign python_cmd_element.
465         * python/python.h (python_cmd_element): New.
466         * tracepoint.c (while_stepping_cmd_element): New.
467         (_initialize_tracepoint): Assign while_stepping_cmd_element.
468         * tracepoint.h (while_stepping_cmd_element): New.
469
470 2018-09-17  Tom Tromey  <tom@tromey.com>
471
472         * infrun.c (save_infcall_suspend_state): Return
473         infcall_suspend_state_up.
474         (save_infcall_control_state): Return infcall_control_state_up.
475         * inferior.h (save_infcall_suspend_state)
476         (save_infcall_control_state): Declare later.  Return unique
477         pointers.
478
479 2018-09-17  Tom Tromey  <tom@tromey.com>
480
481         * infrun.c (struct stop_context): Declare constructor,
482         destructor, "changed" method.
483         (stop_context::stop_context): Rename from save_stop_context.
484         (stop_context::~stop_context): Rename from
485         release_stop_context_cleanup.
486         (normal_stop): Update.
487         (stop_context::changed): Rename from stop_context_changed.  Return
488         bool.
489
490 2018-09-17  Tom Tromey  <tom@tromey.com>
491
492         * inferior.h (struct infcall_suspend_state_deleter): New.
493         (infcall_suspend_state_up): New typedef.
494         (struct infcall_control_state_deleter): New.
495         (infcall_control_state_up): New typedef.
496         (make_cleanup_restore_infcall_suspend_state)
497         (make_cleanup_restore_infcall_control_state): Don't declare.
498         * infcall.c (call_function_by_hand_dummy): Update.
499         * infrun.c (do_restore_infcall_suspend_state_cleanup)
500         (make_cleanup_restore_infcall_suspend_state): Remove.
501         (do_restore_infcall_control_state_cleanup)
502         (make_cleanup_restore_infcall_control_state): Remove.
503
504 2018-09-17  Tom Tromey  <tom@tromey.com>
505
506         * gdbthread.h (struct thread_control_state): Add initializer.
507         (class thread_info) <control>: Remove initializer.
508         * inferior.h (struct inferior_control_state): Add initializer.
509         (class inferior) <control>: Remove initializer.
510         (exit_inferior_1): Update.
511         * infrun.c (struct infcall_control_state): Add constructors.
512         (save_infcall_control_state): Use new.
513         (restore_infcall_control_state, discard_infcall_control_state):
514         Use delete.
515
516 2018-09-17  Tom Tromey  <tom@tromey.com>
517
518         * infrun.c (struct infcall_suspend_state) <registers>: Now a
519         unique_ptr.
520         <siginfo_data>: Now a unique_xmalloc_ptr.
521         (save_infcall_suspend_state, restore_infcall_suspend_state)
522         (discard_infcall_suspend_state)
523         (get_infcall_suspend_state_regcache): Update.
524
525 2018-09-17  Tom Tromey  <tom@tromey.com>
526
527         * gdbthread.h (struct thread_suspend_state): Add initializers.
528         (class thread_info) <suspend>: Remove initializer.
529         * infrun.c (struct infcall_suspend_state): Add initializers.
530         (save_infcall_suspend_state): Use new.
531         (discard_infcall_suspend_state): Use delete.
532
533 2018-09-16  Tom Tromey  <tom@tromey.com>
534
535         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
536         Remove.
537         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
538         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
539         (py_varobj_iter_new): Likewise.
540         (py_varobj_get_iterator): Use gdbpy_ref.
541
542 2018-09-16  Tom Tromey  <tom@tromey.com>
543
544         * python/py-threadevent.c (py_get_event_thread): Simplify.
545         * python/py-inferior.c (infpy_thread_from_thread_handle):
546         Return immediately after calling thread_to_thread_object.  Use
547         Py_RETURN_NONE.
548         (thread_to_thread_object): Set the exception on a NULL return.
549
550 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
551
552         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
553
554 2018-09-16  Tom Tromey  <tom@tromey.com>
555
556         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
557         Remove.
558
559 2018-09-16  Tom Tromey  <tom@tromey.com>
560
561         * python/python-internal.h (thread_to_thread_object): Change
562         return type.
563         * python/py-inferior.c (thread_to_thread_object): Return a new
564         reference.
565         (infpy_thread_from_thread_handle): Update.
566         * python/py-infthread.c (gdbpy_selected_thread): Update.
567         * python/py-stopevent.c (create_stop_event_object): Update.
568         * python/py-threadevent.c (py_get_event_thread): Return a new
569         reference.
570         (py_get_event_thread): Update.
571         * python/py-event.h (py_get_event_thread): Change return type.
572         * python/py-continueevent.c (create_continue_event_object):
573         Update.
574
575 2018-09-16  Tom Tromey  <tom@tromey.com>
576
577         * python/py-progspace.c (pspy_get_objfiles): Update.
578         * python/python-internal.h (objfile_to_objfile_object): Change
579         return type.
580         * python/py-newobjfileevent.c (create_new_objfile_event_object):
581         Update.
582         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
583         Update.
584         * python/python.c (gdbpy_get_current_objfile): Update.
585         (gdbpy_objfiles): Update.
586         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
587         Update.
588         (objfile_to_objfile_object): Return a new reference.
589         * python/py-symtab.c (stpy_get_objfile): Update.
590         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
591         Update.
592
593 2018-09-16  Tom Tromey  <tom@tromey.com>
594
595         * python/py-inferior.c (infpy_get_progspace): Update.
596         * python/python-internal.h (pspace_to_pspace_object): Change
597         return type.
598         * python/py-newobjfileevent.c
599         (create_clear_objfiles_event_object): Update.
600         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
601         Update.
602         * python/python.c (gdbpy_get_current_progspace): Update.
603         (gdbpy_progspaces): Update.
604         * python/py-progspace.c (pspace_to_pspace_object): Return a new
605         reference.
606         * python/py-objfile.c (objfpy_get_progspace): Update.
607         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
608         Update.
609
610 2018-09-16  Tom Tromey  <tom@tromey.com>
611
612         * python/lib/gdb/__init__.py (current_progspace, objfiles)
613         (solib_name, block_for_pc, find_pc_line): New functions.
614         (execute_unwinders): Update.
615         * python/py-block.c (gdbpy_block_for_pc): Remove.
616         * python/py-inferior.c (infpy_get_progspace): New function.
617         (inferior_object_getset) <progspace>: Add.
618         * python/py-progspace.c (pspy_objfiles): Rewrite.
619         (pspy_solib_name, pspy_block_for_pc)
620         (pspy_find_pc_line, pspy_is_valid): New functions.
621         (progspace_object_methods): Add entries for solib_name,
622         block_for_pc, find_pc_line, is_valid.
623         * python/python-internal.h (gdbpy_block_for_pc)
624         (build_objfiles_list): Don't declare.
625         * python/python.c: Don't include solib.h.
626         (gdbpy_solib_name, gdbpy_find_pc_line)
627         (gdbpy_get_current_progspace, build_objfiles_list)
628         (gdbpy_objfiles): Remove.
629         (GdbMethods) <current_progspace, objfiles, block_for_pc,
630         solib_name, find_pc_line>: Remove entries.
631
632 2018-09-16  Tom Tromey  <tom@tromey.com>
633
634         * top.c (new_ui_command): Use GNU style for metasyntactic
635         variables.
636         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
637         variables.
638         * maint.c (maintenance_translate_address): Remove "<>" around
639         text.
640         * interps.c (interpreter_exec_cmd): Use GNU style for
641         metasyntactic variables.
642         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
643         metasyntactic variables.
644         * tracepoint.c (tfind_range_command): Use GNU style for
645         metasyntactic variables.
646         (tfind_outside_command): Likewise.
647         (_initialize_tracepoint): Likewise.
648         * remote.c (extended_remote_target::create_inferior): Use GNU
649         style for metasyntactic variables.
650         * sparc64-tdep.c (adi_examine_command): Use GNU style for
651         metasyntactic variables.
652         (adi_assign_command): Likewise.
653
654 2018-09-16  Tom Tromey  <tom@tromey.com>
655
656         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
657         metasyntactic variables.  Print message if no disassembler options
658         are available.
659
660 2018-09-15  Tom Tromey  <tom@tromey.com>
661
662         * infcmd.c (get_inferior_args): Return const char *.
663         * inferior.h (get_inferior_args): Return type now const.
664         * linux-tdep.c (linux_fill_prpsinfo): Update.
665         * procfs.c (procfs_target::make_corefile_notes): Update.
666
667 2018-09-07  Tom Tromey  <tom@tromey.com>
668
669         * python/python.c (execute_gdb_command): Call bpstat_do_actions
670         inside the TRY.
671
672 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
673
674         * nios2-tdep.c (nios2_type_align): New.
675         (nios2_gdb_arch_init): Install type_align hook.
676
677 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
678
679         * eval.c (fake_method::fake_method): Call xzalloc directly for a
680         type that is neither object file owned, nor gdbarch owned.
681         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
682         gdbarch is non-NULL.
683         (alloc_type_instance): Allocate non-objfile owned types on the
684         gdbarch obstack.
685         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
686         using TYPE_ALLOC to ensure memory is allocated on the correct
687         obstack.
688         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
689         obstack, or the gdbarch obstack.
690         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
691
692 2018-09-14  Tom Tromey  <tom@tromey.com>
693
694         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
695         block.
696
697 2018-09-14  Tom Tromey  <tom@tromey.com>
698
699         * nat/fork-inferior.c (get_startup_shell): Remove "static".
700
701 2018-09-13  Tom Tromey  <tom@tromey.com>
702
703         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
704         static.
705
706 2018-09-13  Tom Tromey  <tom@tromey.com>
707
708         * exec.c (try_open_exec_file): Use std::string.
709
710 2018-09-13  Tom Tromey  <tom@tromey.com>
711
712         * utils.h (gdb_bfd_errmsg): Return std::string.
713         * exec.c (exec_file_attach): Update.
714         * compile/compile-object-load.c (compile_object_load): Update.
715         * utils.c (gdb_bfd_errmsg): Return std::string.
716
717 2018-09-13  Tom Tromey  <tom@tromey.com>
718
719         * procfs.c (struct procinfo_deleter): New.
720         (procinfo_up): New typedef.
721         (do_destroy_procinfo_cleanup): Remove.
722         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
723
724 2018-09-13  Tom Tromey  <tom@tromey.com>
725
726         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
727
728 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
729 2018-09-13  Tom Tromey  <tom@tromey.com>
730
731         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
732         (pspy_get_objfiles): New function.
733         (progspace_object_methods): New.
734         (pspace_object_type): Add tp_methods callback.
735         * python/python-internal.h (build_objfiles_list): New
736         declaration.
737         * python/python.c (build_objfiles_list): New function.
738         (gdbpy_objfiles): Implement using build_objfiles_list.
739         * NEWS: Mention the Progspace.objfiles method.
740
741 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
742
743         * python/py-inferior.c (infpy_get_progspace): New function.
744         (inferior_object_getset): Add progspace property.
745         * NEWS: Mention the new property.
746
747 2018-09-13  Tom Tromey  <tom@tromey.com>
748
749         PR rust/23650:
750         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
751
752 2018-09-13  Tom Tromey  <tom@tromey.com>
753
754         PR rust/23626:
755         * rust-lang.c (rust_enum_variant): Now static.
756         (rust_empty_enum_p): New function.
757         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
758         Handle empty enum.
759
760 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
761
762         * python/py-inferior.c (infpy_repr): New.
763         (inferior_object_type): Register infpy_repr.
764         * python/py-objfile.c (objfpy_repr): New.
765         (objfile_object_type): Register objfpy_repr.
766
767 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
768
769         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
770
771 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
772
773         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
774         typo.
775
776 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
777
778         * common/common-utils.c: Don't include '<sys/stat.h>'.
779         (is_regular_file): Move to...
780         * common/filestuff.c (is_regular_file): ... here.
781         * common/common-utils.h (is_regular_file): Move to...
782         * common/filestuff.h (is_regular_file): ... here.
783
784 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
785
786         * skip.c (debug_skip): New variable.
787         (skiplist_entry::do_skip_file_p): Add debug output.
788         (skiplist_entry::do_skip_gfile_p): Likewise.
789         (skiplist_entry::skip_function_p): Likewise.
790         (_initialize_step_skip): Create debug command.
791         * NEWS: Mention set/show debug skip.
792
793 2018-09-11  Xavier Roirand  <roirand@adacore.com>
794
795         * darwin-nat.c (should_disable_startup_with_shell):
796         New function.
797         (darwin_nat_target::create_inferior): Add call.
798
799 2018-09-11  Xavier Roirand  <roirand@adacore.com>
800
801         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
802         inf_port, msg_state>: Initialize.
803         (struct darwin_thread_info) <signaled, single_step>: Change
804         type and initialize.
805         (struct darwin_thread_info) <event>: Initialize.
806
807 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
808
809         PR gdb/23555
810         PR gdb/23558
811         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
812         guesses.
813
814 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
815
816         Revert:
817         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
818
819         PR gdb/23555
820         PR gdb/23558
821         * gnulib/aclocal.m4: Regenerate.
822         * gnulib/config.in: Regenerate.
823         * gnulib/configure: Regenerate.
824         * gnulib/import/Makefile.am: Update.
825         * gnulib/import/Makefile.in: Update.
826         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
827         * gnulib/import/_Noreturn.h: ... this.
828         * gnulib/import/alloca.in.h: Update.
829         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
830         * gnulib/import/arg-nonnull.h: ... this.
831         * gnulib/import/assure.h: Update.
832         * gnulib/import/at-func.c: Update.
833         * gnulib/import/basename-lgpl.c: Update.
834         * gnulib/import/extra/snippet/c++defs.h: Rename to...
835         * gnulib/import/c++defs.h: ... this.
836         * gnulib/import/canonicalize-lgpl.c: Update.
837         * gnulib/import/cdefs.h: Update.
838         * gnulib/import/chdir-long.c: Update.
839         * gnulib/import/chdir-long.h: Update.
840         * gnulib/import/cloexec.c: Update.
841         * gnulib/import/cloexec.h: Update.
842         * gnulib/import/close.c: Update.
843         * gnulib/import/closedir.c: Update.
844         * gnulib/import/config.charset: Update.
845         * gnulib/import/dirent-private.h: Update.
846         * gnulib/import/dirent.in.h: Update.
847         * gnulib/import/dirfd.c: Update.
848         * gnulib/import/dirname-lgpl.c: Update.
849         * gnulib/import/dirname.h: Update.
850         * gnulib/import/dosname.h: Update.
851         * gnulib/import/dup-safer-flag.c: Update.
852         * gnulib/import/dup-safer.c: Update.
853         * gnulib/import/dup.c: Update.
854         * gnulib/import/dup2.c: Update.
855         * gnulib/import/errno.in.h: Update.
856         * gnulib/import/error.c: Update.
857         * gnulib/import/error.h: Update.
858         * gnulib/import/exitfail.c: Update.
859         * gnulib/import/exitfail.h: Update.
860         * gnulib/import/extra/update-copyright: Update.
861         * gnulib/import/fchdir.c: Update.
862         * gnulib/import/fcntl.c: Update.
863         * gnulib/import/fcntl.in.h: Update.
864         * gnulib/import/fd-hook.c: Update.
865         * gnulib/import/fd-hook.h: Update.
866         * gnulib/import/fd-safer-flag.c: Update.
867         * gnulib/import/fd-safer.c: Update.
868         * gnulib/import/fdopendir.c: Update.
869         * gnulib/import/filename.h: Update.
870         * gnulib/import/filenamecat-lgpl.c: Update.
871         * gnulib/import/filenamecat.h: Update.
872         * gnulib/import/flexmember.h: Update.
873         * gnulib/import/float+.h: Update.
874         * gnulib/import/float.c: Update.
875         * gnulib/import/float.in.h: Update.
876         * gnulib/import/fnmatch.c: Update.
877         * gnulib/import/fnmatch.in.h: Update.
878         * gnulib/import/fnmatch_loop.c: Update.
879         * gnulib/import/fpucw.h: Update.
880         * gnulib/import/frexp.c: Update.
881         * gnulib/import/frexpl.c: Update.
882         * gnulib/import/fstat.c: Update.
883         * gnulib/import/fstatat.c: Update.
884         * gnulib/import/getcwd-lgpl.c: Update.
885         * gnulib/import/getcwd.c: Update.
886         * gnulib/import/getdtablesize.c: Update.
887         * gnulib/import/getlogin_r.c: Update.
888         * gnulib/import/getprogname.c: Update.
889         * gnulib/import/getprogname.h: Update.
890         * gnulib/import/gettext.h: Update.
891         * gnulib/import/gettimeofday.c: Update.
892         * gnulib/import/glob-libc.h: Update.
893         * gnulib/import/glob.c: Update.
894         * gnulib/import/glob.in.h: Update.
895         * gnulib/import/glob_internal.h: Update.
896         * gnulib/import/glob_pattern_p.c: Update.
897         * gnulib/import/globfree.c: Update.
898         * gnulib/import/hard-locale.c: Update.
899         * gnulib/import/hard-locale.h: Update.
900         * gnulib/import/intprops.h: Update.
901         * gnulib/import/inttypes.in.h: Update.
902         * gnulib/import/isnan.c: Update.
903         * gnulib/import/isnand-nolibm.h: Update.
904         * gnulib/import/isnand.c: Update.
905         * gnulib/import/isnanl-nolibm.h: Update.
906         * gnulib/import/isnanl.c: Update.
907         * gnulib/import/itold.c: Update.
908         * gnulib/import/libc-config.h: Update.
909         * gnulib/import/limits.in.h: Update.
910         * gnulib/import/localcharset.c: Update.
911         * gnulib/import/localcharset.h: Update.
912         * gnulib/import/localtime-buffer.c: Update.
913         * gnulib/import/localtime-buffer.h: Update.
914         * gnulib/import/lstat.c: Update.
915         * gnulib/import/m4/00gnulib.m4: Update.
916         * gnulib/import/m4/__inline.m4: Update.
917         * gnulib/import/m4/absolute-header.m4: Update.
918         * gnulib/import/m4/alloca.m4: Update.
919         * gnulib/import/m4/builtin-expect.m4: Update.
920         * gnulib/import/m4/canonicalize.m4: Update.
921         * gnulib/import/m4/chdir-long.m4: Update.
922         * gnulib/import/m4/close.m4: Update.
923         * gnulib/import/m4/closedir.m4: Update.
924         * gnulib/import/m4/configmake.m4: Update.
925         * gnulib/import/m4/d-ino.m4: Update.
926         * gnulib/import/m4/d-type.m4: Update.
927         * gnulib/import/m4/dirent_h.m4: Update.
928         * gnulib/import/m4/dirfd.m4: Update.
929         * gnulib/import/m4/dirname.m4: Update.
930         * gnulib/import/m4/double-slash-root.m4: Update.
931         * gnulib/import/m4/dup.m4: Update.
932         * gnulib/import/m4/dup2.m4: Update.
933         * gnulib/import/m4/eealloc.m4: Update.
934         * gnulib/import/m4/environ.m4: Update.
935         * gnulib/import/m4/errno_h.m4: Update.
936         * gnulib/import/m4/error.m4: Update.
937         * gnulib/import/m4/exponentd.m4: Update.
938         * gnulib/import/m4/exponentl.m4: Update.
939         * gnulib/import/m4/extensions.m4: Update.
940         * gnulib/import/m4/extern-inline.m4: Update.
941         * gnulib/import/m4/fchdir.m4: Update.
942         * gnulib/import/m4/fcntl-o.m4: Update.
943         * gnulib/import/m4/fcntl.m4: Update.
944         * gnulib/import/m4/fcntl_h.m4: Update.
945         * gnulib/import/m4/fdopendir.m4: Update.
946         * gnulib/import/m4/filenamecat.m4: Update.
947         * gnulib/import/m4/flexmember.m4: Update.
948         * gnulib/import/m4/float_h.m4: Update.
949         * gnulib/import/m4/fnmatch.m4: Update.
950         * gnulib/import/m4/fnmatch_h.m4: Update.
951         * gnulib/import/m4/fpieee.m4: Update.
952         * gnulib/import/m4/frexp.m4: Update.
953         * gnulib/import/m4/frexpl.m4: Update.
954         * gnulib/import/m4/fstat.m4: Update.
955         * gnulib/import/m4/fstatat.m4: Update.
956         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
957         * gnulib/import/m4/getcwd-path-max.m4: Update.
958         * gnulib/import/m4/getcwd.m4: Update.
959         * gnulib/import/m4/getdtablesize.m4: Update.
960         * gnulib/import/m4/getlogin.m4: Update.
961         * gnulib/import/m4/getlogin_r.m4: Update.
962         * gnulib/import/m4/getpagesize.m4: Update.
963         * gnulib/import/m4/getprogname.m4: Update.
964         * gnulib/import/m4/gettimeofday.m4: Update.
965         * gnulib/import/m4/glibc21.m4: Update.
966         * gnulib/import/m4/glob.m4: Update.
967         * gnulib/import/m4/glob_h.m4: Update.
968         * gnulib/import/m4/gnulib-cache.m4: Update.
969         * gnulib/import/m4/gnulib-common.m4: Update.
970         * gnulib/import/m4/gnulib-comp.m4: Update.
971         * gnulib/import/m4/gnulib-tool.m4: Update.
972         * gnulib/import/m4/hard-locale.m4: Update.
973         * gnulib/import/m4/include_next.m4: Update.
974         * gnulib/import/m4/inttypes-pri.m4: Update.
975         * gnulib/import/m4/inttypes.m4: Update.
976         * gnulib/import/m4/isnand.m4: Update.
977         * gnulib/import/m4/isnanl.m4: Update.
978         * gnulib/import/m4/largefile.m4: Update.
979         * gnulib/import/m4/limits-h.m4: Update.
980         * gnulib/import/m4/localcharset.m4: Update.
981         * gnulib/import/m4/locale-fr.m4: Update.
982         * gnulib/import/m4/locale-ja.m4: Update.
983         * gnulib/import/m4/locale-zh.m4: Update.
984         * gnulib/import/m4/localtime-buffer.m4: Update.
985         * gnulib/import/m4/longlong.m4: Update.
986         * gnulib/import/m4/lstat.m4: Update.
987         * gnulib/import/m4/malloc.m4: Update.
988         * gnulib/import/m4/malloca.m4: Update.
989         * gnulib/import/m4/math_h.m4: Update.
990         * gnulib/import/m4/mbrtowc.m4: Update.
991         * gnulib/import/m4/mbsinit.m4: Update.
992         * gnulib/import/m4/mbsrtowcs.m4: Update.
993         * gnulib/import/m4/mbstate_t.m4: Update.
994         * gnulib/import/m4/memchr.m4: Update.
995         * gnulib/import/m4/memmem.m4: Update.
996         * gnulib/import/m4/mempcpy.m4: Update.
997         * gnulib/import/m4/memrchr.m4: Update.
998         * gnulib/import/m4/mkdir.m4: Update.
999         * gnulib/import/m4/mkstemp.m4: Update.
1000         * gnulib/import/m4/mmap-anon.m4: Update.
1001         * gnulib/import/m4/mode_t.m4: Update.
1002         * gnulib/import/m4/msvc-inval.m4: Update.
1003         * gnulib/import/m4/msvc-nothrow.m4: Update.
1004         * gnulib/import/m4/multiarch.m4: Update.
1005         * gnulib/import/m4/nocrash.m4: Update.
1006         * gnulib/import/m4/off_t.m4: Update.
1007         * gnulib/import/m4/onceonly.m4: Update.
1008         * gnulib/import/m4/open-cloexec.m4: Update.
1009         * gnulib/import/m4/open.m4: Update.
1010         * gnulib/import/m4/openat.m4: Update.
1011         * gnulib/import/m4/opendir.m4: Update.
1012         * gnulib/import/m4/pathmax.m4: Update.
1013         * gnulib/import/m4/rawmemchr.m4: Update.
1014         * gnulib/import/m4/readdir.m4: Update.
1015         * gnulib/import/m4/readlink.m4: Update.
1016         * gnulib/import/m4/realloc.m4: Update.
1017         * gnulib/import/m4/rename.m4: Update.
1018         * gnulib/import/m4/rewinddir.m4: Update.
1019         * gnulib/import/m4/rmdir.m4: Update.
1020         * gnulib/import/m4/save-cwd.m4: Update.
1021         * gnulib/import/m4/secure_getenv.m4: Update.
1022         * gnulib/import/m4/setenv.m4: Update.
1023         * gnulib/import/m4/signal_h.m4: Update.
1024         * gnulib/import/m4/ssize_t.m4: Update.
1025         * gnulib/import/m4/stat-time.m4: Update.
1026         * gnulib/import/m4/stat.m4: Update.
1027         * gnulib/import/m4/std-gnu11.m4: Update.
1028         * gnulib/import/m4/stdbool.m4: Update.
1029         * gnulib/import/m4/stddef_h.m4: Update.
1030         * gnulib/import/m4/stdint.m4: Update.
1031         * gnulib/import/m4/stdio_h.m4: Update.
1032         * gnulib/import/m4/stdlib_h.m4: Update.
1033         * gnulib/import/m4/strchrnul.m4: Update.
1034         * gnulib/import/m4/strdup.m4: Update.
1035         * gnulib/import/m4/strerror.m4: Update.
1036         * gnulib/import/m4/string_h.m4: Update.
1037         * gnulib/import/m4/strstr.m4: Update.
1038         * gnulib/import/m4/strtok_r.m4: Update.
1039         * gnulib/import/m4/sys_socket_h.m4: Update.
1040         * gnulib/import/m4/sys_stat_h.m4: Update.
1041         * gnulib/import/m4/sys_time_h.m4: Update.
1042         * gnulib/import/m4/sys_types_h.m4: Update.
1043         * gnulib/import/m4/tempname.m4: Update.
1044         * gnulib/import/m4/time_h.m4: Update.
1045         * gnulib/import/m4/unistd-safer.m4: Update.
1046         * gnulib/import/m4/unistd_h.m4: Update.
1047         * gnulib/import/m4/warn-on-use.m4: Update.
1048         * gnulib/import/m4/wchar_h.m4: Update.
1049         * gnulib/import/m4/wchar_t.m4: Update.
1050         * gnulib/import/m4/wctype_h.m4: Update.
1051         * gnulib/import/m4/wint_t.m4: Update.
1052         * gnulib/import/malloc.c: Update.
1053         * gnulib/import/malloc/scratch_buffer.h: Update.
1054         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1055         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1056         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1057         * gnulib/import/malloca.c: Update.
1058         * gnulib/import/malloca.h: Update.
1059         * gnulib/import/malloca.valgrind: Update.
1060         * gnulib/import/math.in.h: Update.
1061         * gnulib/import/mbrtowc.c: Update.
1062         * gnulib/import/mbsinit.c: Update.
1063         * gnulib/import/mbsrtowcs-impl.h: Update.
1064         * gnulib/import/mbsrtowcs-state.c: Update.
1065         * gnulib/import/mbsrtowcs.c: Update.
1066         * gnulib/import/memchr.c: Update.
1067         * gnulib/import/memmem.c: Update.
1068         * gnulib/import/mempcpy.c: Update.
1069         * gnulib/import/memrchr.c: Update.
1070         * gnulib/import/mkdir.c: Update.
1071         * gnulib/import/mkstemp.c: Update.
1072         * gnulib/import/msvc-inval.c: Update.
1073         * gnulib/import/msvc-inval.h: Update.
1074         * gnulib/import/msvc-nothrow.c: Update.
1075         * gnulib/import/msvc-nothrow.h: Update.
1076         * gnulib/import/open.c: Update.
1077         * gnulib/import/openat-die.c: Update.
1078         * gnulib/import/openat-priv.h: Update.
1079         * gnulib/import/openat-proc.c: Update.
1080         * gnulib/import/openat.c: Update.
1081         * gnulib/import/openat.h: Update.
1082         * gnulib/import/opendir.c: Update.
1083         * gnulib/import/pathmax.h: Update.
1084         * gnulib/import/pipe-safer.c: Update.
1085         * gnulib/import/rawmemchr.c: Update.
1086         * gnulib/import/readdir.c: Update.
1087         * gnulib/import/readlink.c: Update.
1088         * gnulib/import/realloc.c: Update.
1089         * gnulib/import/ref-add.sin: Update.
1090         * gnulib/import/ref-del.sin: Update.
1091         * gnulib/import/rename.c: Update.
1092         * gnulib/import/rewinddir.c: Update.
1093         * gnulib/import/rmdir.c: Update.
1094         * gnulib/import/same-inode.h: Update.
1095         * gnulib/import/save-cwd.c: Update.
1096         * gnulib/import/save-cwd.h: Update.
1097         * gnulib/import/scratch_buffer.h: Update.
1098         * gnulib/import/secure_getenv.c: Update.
1099         * gnulib/import/setenv.c: Update.
1100         * gnulib/import/signal.in.h: Update.
1101         * gnulib/import/stat-time.c: Update.
1102         * gnulib/import/stat-time.h: Update.
1103         * gnulib/import/stat-w32.c: Update.
1104         * gnulib/import/stat-w32.h: Update.
1105         * gnulib/import/stat.c: Update.
1106         * gnulib/import/stdbool.in.h: Update.
1107         * gnulib/import/stddef.in.h: Update.
1108         * gnulib/import/stdint.in.h: Update.
1109         * gnulib/import/stdio.in.h: Update.
1110         * gnulib/import/stdlib.in.h: Update.
1111         * gnulib/import/str-two-way.h: Update.
1112         * gnulib/import/strchrnul.c: Update.
1113         * gnulib/import/strdup.c: Update.
1114         * gnulib/import/streq.h: Update.
1115         * gnulib/import/strerror-override.c: Update.
1116         * gnulib/import/strerror-override.h: Update.
1117         * gnulib/import/strerror.c: Update.
1118         * gnulib/import/string.in.h: Update.
1119         * gnulib/import/stripslash.c: Update.
1120         * gnulib/import/strnlen1.c: Update.
1121         * gnulib/import/strnlen1.h: Update.
1122         * gnulib/import/strstr.c: Update.
1123         * gnulib/import/strtok_r.c: Update.
1124         * gnulib/import/sys_stat.in.h: Update.
1125         * gnulib/import/sys_time.in.h: Update.
1126         * gnulib/import/sys_types.in.h: Update.
1127         * gnulib/import/tempname.c: Update.
1128         * gnulib/import/tempname.h: Update.
1129         * gnulib/import/time.in.h: Update.
1130         * gnulib/import/unistd--.h: Update.
1131         * gnulib/import/unistd-safer.h: Update.
1132         * gnulib/import/unistd.in.h: Update.
1133         * gnulib/import/unsetenv.c: Update.
1134         * gnulib/import/verify.h: Update.
1135         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1136         * gnulib/import/wchar.in.h: Update.
1137         * gnulib/import/wctype.in.h: Update.
1138         * gnulib/import/xalloc-oversized.h: Update.
1139         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1140         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1141
1142 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
1143
1144         * record-btrace.c (get_thread_current_frame): Remove
1145         old_inferior_ptid.
1146
1147 2018-09-10  Jerome Guitton  <guitton@adacore.com>
1148
1149         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1150         with check_tag to 1 if and only if the type is tagged and the
1151         component being searched cannot been found in the current
1152         view. Otherwise, always call ada_to_fixed_type with
1153         check_tag to 0.
1154
1155 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1156
1157         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1158         declaration.
1159         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1160         * ada-varobj.c (ada_varobj_get_number_of_children,
1161         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1162
1163 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1164
1165         * ada-valprint.c (ada_value_print): Use type instead of
1166         enclosing type.
1167
1168 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1169
1170         * ada-lang.c (ada_value_subscript): Handle case when parameter is
1171         an array of access to unconstrained array.
1172
1173 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1174
1175         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1176         (ada_check_typedef): Use it.
1177
1178 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1179
1180         * ada-varobj.c (ada_varobj_describe_struct_child)
1181         (ada_varobj_describe_child): Handle union case like struct one.
1182
1183 2018-09-10  Tom Tromey  <tom@tromey.com>
1184
1185         PR python/18380:
1186         * python/python.c (_initialize_python): Make example in "python"
1187         help work in Python 3.
1188
1189 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
1190
1191         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1192         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
1193         $(EXEEXT) to the script, as it is not a program.
1194
1195 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
1196
1197         * python/py-prettyprint.c (pretty_print_one_value): Return
1198         gdbpy_ref<>.
1199         (print_string_repr): Adjust.
1200         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1201         * python/python-internal.h (apply_varobj_pretty_printer): Return
1202         gdbpy_ref<>.
1203         * varobj.c (varobj_value_get_print_value): Adjust.
1204
1205 2018-09-08  Tom Tromey  <tom@tromey.com>
1206
1207         PR python/16047:
1208         * python/py-prettyprint.c (pretty_print_one_value): Check for
1209         to_string method.
1210
1211 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1212
1213         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1214         replace_operator_with_call.
1215
1216 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1217
1218         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1219
1220 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1221
1222         * ada-typeprint.c (print_range): Print the bounds using TYPE
1223         rather than its TYPE_TARGET_TYPE.
1224
1225 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1226
1227         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1228         call to ada_to_fixed_value_create.
1229
1230 2018-09-08  Jerome Guitton  <guitton@adacore.com>
1231
1232         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1233
1234 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1235
1236         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1237         by calls to error.
1238
1239 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1240
1241         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1242         Move update of loop variable "fi".
1243
1244 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1245
1246         * ada-lang.c (value_assign_to_component): In the case of
1247         big-endian targets, extract the bits of the given VAL
1248         using an src_offset of zero if container is not a scalar.
1249
1250 2018-09-06  Simon Ser  <contact@emersion.fr>
1251
1252         PR gdb/23105
1253         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1254         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1255         * fbsd-tdep.c (fbsd_make_note_desc): New.
1256         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1257         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1258         * target.h (enum target_object) Add FreeBSD-specific
1259         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1260
1261 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1262
1263         * compile/compile-c.h (generate_c_for_variable_locations):
1264         Change reference to pointer.
1265         * compile/compile-c-support.c (compile_program) <compute>:
1266         Likewise.
1267         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1268         (generate_c_for_for_one_variable): Likewise
1269         (generate_c_for_variable_locations): Likewise
1270         * compile/compile-c-types.c (compile_c_instance::convert_type):
1271         Likewise
1272         * compile/compile-cplus-symbols.c (convert_one_symbol):
1273         std::move the scope passed to enter_scope.
1274         * compile/compile-cplus-types.c
1275         (compile_cplus_instance::enter_scope): Make parameter
1276         rvalue-reference.
1277         (compile_cplus_instance::new_scope): Change reference to
1278         pointer.
1279         (compile_cplus_instance::convert_type): Likewise
1280         (compile_cplus_convert_typedef): std::move the scope passed to
1281         enter_scope.
1282         (compile_cplus_convert_struct_or_union): Likewise.
1283         (compile_cplus_convert_enum): Likewise.
1284         (compile_cplus_convert_namespace): Likewise.
1285         * compile/compile-cplus.h (compile_cplus_instance)
1286         <enter_scope>: Make parameter rvalue-reference.
1287         * compile/compile-internal.h (compile_instance)
1288         <get_cached_type>: Likewise
1289         * compile/compile-loc2c.c (push): Likewise
1290         (pushf): Likewise
1291         (unary): Likewise
1292         (binary): Likewise
1293         (print_label): Likewise
1294         (pushf_register_address): Likewise
1295         (pushf_register): Likewise
1296         (do_compile_dwarf_expr_to_c): Likewise
1297         (compile_dwarf_expr_to_c): Likewise
1298         (compile_dwarf_bounds_to_c): Likewise
1299         * compile/compile.c (compile_instance::get_cached_type):
1300         Likewise
1301         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1302         (compile_dwarf_bounds_to_c): Likewise
1303         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1304         (dwarf2_compile_property_to_c): Likewise
1305         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1306         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1307         Likewise
1308
1309 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1310
1311         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1312         * tui/tui-data.c (init_content_element): Don't initialize it.
1313
1314 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1315
1316         * tui/tui-data.h (struct tui_win_info)
1317         <detail::opaque>: Remove.
1318         * tui/tui-data.c (init_win_info): Remove assignment.
1319
1320 2018-09-05  Tom Tromey  <tom@tromey.com>
1321
1322         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1323         -Wformat-nonliteral.
1324         * target-float.c (host_float_ops<T>::to_string)
1325         (host_float_ops<T>::from_string): Use
1326         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1327         * configure: Rebuild.
1328
1329 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1330
1331         * printcmd.c (printf_c_string): Use
1332         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1333         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1334
1335 2018-09-05  Tom Tromey  <tom@tromey.com>
1336
1337         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1338
1339 2018-09-05  Tom de Vries  <tdevries@suse.de>
1340
1341         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1342         with resolve_abstract_p == true.
1343         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1344         defaulting to false. Propagate resolve_abstract_p to
1345         dwarf2_fetch_die_loc_sect_off.
1346         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1347         parameter, defaulting to false.
1348         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1349         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1350         parameter.
1351         * dwarf2read.h (struct die_info): Forward-declare.
1352         (die_info_ptr): New typedef.
1353         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1354
1355 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
1356
1357         GDB 8.2 released.
1358
1359 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1360             Pedro Alves  <palves@redhat.com>
1361
1362         * gnulib/Makefile.in (aclocal_m4_deps): Move to
1363         "aclocal-m4-deps.mk".  Include file here.
1364         $(srcdir)/aclocal.m4: Add "configure.ac".
1365         * gnulib/aclocal-m4-deps.mk: New file.
1366         * gnulib/update-gnulib.sh: Automatically update
1367         "aclocal-m4-deps.mk".
1368
1369 2018-09-04  Tom Tromey  <tom@tromey.com>
1370
1371         * configure: Rebuild.
1372         * configure.ac: Remove multi-ice code.
1373
1374 2018-09-04  Tom Tromey  <tom@tromey.com>
1375
1376         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1377         (ada-exp.o): Update.
1378
1379 2018-09-04  Tom Tromey  <tom@tromey.com>
1380
1381         * Makefile.in (printcmd.o, target-float.o): Remove.
1382         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1383
1384 2018-09-04  Tom Tromey  <tom@tromey.com>
1385
1386         * gnulib/Makefile.in: Remove obsolete comment.
1387         * Makefile.in: Remove obsolete comment.
1388
1389 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
1390
1391         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1392         line with '+'.
1393
1394 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1395
1396         * riscv-tdep.c: Add 'prologue-value.h' include.
1397         (struct riscv_unwind_cache): New struct.
1398         (riscv_debug_unwinder): New global.
1399         (riscv_scan_prologue): Update arguments, capture register details
1400         from prologue scan.
1401         (riscv_skip_prologue): Reformat arguments line, move end of
1402         prologue calculation into riscv_scan_prologue.
1403         (riscv_frame_cache): Update return type, create
1404         riscv_unwind_cache, scan the prologue, and fill in remaining cache
1405         details.
1406         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1407         (riscv_frame_prev_register): Use the trad_frame within the
1408         riscv_unwind_cache.
1409         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1410         flag.
1411
1412 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1413
1414         * trad-frame.h (trad_frame_set_realreg): Declare.
1415         (trad_frame_set_addr): Declare.
1416         * trad-frame.c (trad_frame_set_realreg): Define new function.
1417         (trad_frame_set_addr): Define new function.
1418         (trad_frame_set_reg_realreg): Use new function.
1419         (trad_frame_set_reg_addr): Use new function.
1420
1421 2018-09-01  Keith Seitz  <keiths@redhat.com>
1422
1423         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1424         pulongest instead of "%lld".
1425         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1426         ATTRIBUTE_UNUSED.
1427
1428 2018-08-31  Tom Tromey  <tom@tromey.com>
1429
1430         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1431         variant part type.
1432
1433 2018-08-31  Pedro Alves  <palves@redhat.com>
1434
1435         * gdbarch.h: Regenerate.
1436
1437 2018-08-31  Pedro Alves  <palves@redhat.com>
1438
1439         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1440         * target.h (Hardware watchpoint interfaces): Describe
1441         continuable/steppable/non-steppable watchpoints.
1442         * gdbarch.h, gdbarch.c: Regenerate.
1443
1444 2018-08-31  Pedro Alves  <palves@redhat.com>
1445
1446         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1447         Delete.
1448         * s390-linux-nat.c
1449         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1450         * target.h (target_ops::have_continuable_watchpoint): Delete.
1451         (target_have_continuable_watchpoint): Delete.
1452         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1453         * target-delegates.c: Regenerate.
1454
1455 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1456
1457         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1458         the files present in "gnulib/import/m4/".
1459
1460 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1461
1462         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1463         c.sw, c.swsp, and c.sdsp.
1464
1465 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1466
1467         * riscv-tdep.c (struct riscv_inferior_data): Delete.
1468         (riscv_read_misa_reg): Don't cache value read into inferior data.
1469         (riscv_new_inferior_data): Delete.
1470         (riscv_inferior_data_cleanup): Delete.
1471         (riscv_inferior_data): Delete.
1472         (riscv_invalidate_inferior_data): Delete.
1473         (_initialize_riscv_tdep): Remove initialisation of inferior data.
1474
1475 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
1476
1477         * compile/compile-cplus-types.c
1478         (compile_cplus_instance::leave_scope): Take the address of scope
1479         object.
1480         (compile_cplus_instance::convert_qualified_base): Compare quals
1481         to 0.
1482
1483 2018-08-30  Keith Seitz  <keiths@redhat.com>
1484
1485         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1486         Use "%s" and host_address_to_string instead of "%p" in printf.
1487
1488 2018-08-29  Keith Seitz  <keiths@redhat.com>
1489
1490         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1491         and compile-cplus-types.c.
1492         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1493         * c-lang.c (cplus_language_defn): Set C++ compile functions.
1494         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1495         Declare.
1496         * compile/compile-c-support.c: Include compile-cplus.h.
1497         (load_libcompile): Templatize.
1498         (get_compile_context): "New" function.
1499         (c_get_compile_context): Use get_compile_context.
1500         (cplus_get_compile_context): New function.
1501         (cplus_push_user_expression, cplus_pop_user_expression)
1502         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1503         (cplus_compute_program): Define new structs/functions.
1504         * compile/compile-cplus-symmbols.c: New file.
1505         * compile/compile-cplus-types.c: New file.
1506         * compile/compile-cplus.h: New file.
1507         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1508         Declare.
1509         * compile/compile-object-load.c (get_out_value_type): Use
1510         strncmp_iw when comparing symbol names.
1511         (compile_object_load): Add mst_bss and mst_data.
1512         * compile/compile.c (_initialize_compile): Remove
1513         -Wno-implicit-function-declaration from `compile_args'.
1514         * compile/gcc-cp-plugin.h: New file.
1515         * NEWS: Mention C++ compile support and new debug options.
1516
1517 2018-08-29  Keith Seitz  <keiths@redhat.com>
1518
1519         * linespec.c (collect_info::add_symbol): Make virtual.
1520         (struct symbol_searcher_collect_info): New struct.
1521         (symbol_searcher::find_all_symbols): New method.
1522         * symtab.h (class symbol_searcher): New class.
1523
1524 2018-08-29  Keith Seitz  <keiths@redhat.com>
1525
1526         * linespec.c (struct linespec) <function_symbols, label_symbols>:
1527         Change to vector of block_symbol.  Update all users.
1528         (struct collect_info) <symbols>: Likewise.
1529         (collect_info::add_symbol): Take block_symbol as argument.
1530         Update all callers.
1531         (decode_compound_collector) <m_symbols>: Change type to vector
1532         of block_symbol.  Update all users.
1533         (decode_compound_collector::operator ()): Change parameter type
1534         to block_symbol.
1535         (find_method, find_function_symbols, find_linespec_symbols)
1536         (find_label_symbols_in_block, find_label_symbols): Change symbol
1537         vectors to block_symbol vectors.
1538         * symtab.h (symbol_found_callback_ftype): Change parameter type to
1539         block_symbol.
1540
1541 2018-08-29  Keith Seitz  <keiths@redhat.com>
1542
1543         * linespec.c (symbolp): Remove typedef and VEC definitions.
1544         (bound_minimal_symbol_d): Likewise.
1545
1546 2018-08-29  Keith Seitz  <keiths@redhat.com>
1547
1548         * linespec.c (decode_compound_collector::decode_compound_collector):
1549         Remove initialization for `m_symtabs'.
1550         (decode_compound_collector::release_symbols): Change return type
1551         to std::vector.  Update all callers.
1552         (class decode_compound_collector) <m_symbols>: Change type to
1553         std::vector.
1554         (lookup_prefix_sym): Change return type to std::vector.  Update all
1555         callers.
1556         (compare_symbols): Remove.
1557         (std_compare_symbols): Rename to `compare_symbols'.
1558         (find_method): Change `sym_classes' parameter to std::vector.
1559         Update all callers.  Use std::sort to sort sym_classes.
1560         (find_linespec_symbols): Remove cleanup.
1561
1562 2018-08-29  Keith Seitz  <keiths@redhat.com>
1563
1564         * linespec.c (struct linespec) <minimal_symbols>: Change type to
1565         std::vector.  Update all users.
1566         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1567         (struct collect_info) <minimal_symbols>: Likewise.
1568         (compare_msymbols): Return bool.  Change parameters to const
1569         bound_minimal_symbol references.
1570         (find_method, find_function_symbols, find_linespec_symbols): Change
1571         `minsyms' parameter to std::vector.  Update all callers.
1572
1573 2018-08-29  Keith Seitz  <keiths@redhat.com>
1574
1575         * linespec.c (struct linespec) <label_symbols>: Change type to
1576         std::vector.  Update all users.
1577         (find_label_symbols_in_block): Change `result' parameter to
1578         std::vector.  Update all callers.
1579         (find_label_symbols): Return std::vector.  Update all callers.
1580
1581 2018-08-29  Keith Seitz  <keiths@redhat.com>
1582
1583         * linespec.c (struct linespec) <function_symbols>: Change type to
1584         std::vector.  Update all users.
1585         (struct collect_info) <function_symbols>: Likewise.
1586         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1587         (std_compare_symbols): New function.
1588         (find_method, find_function_symbols, find_linespec_symbols)
1589         (find_label_symbols_in_block): Change `symbols' parameter to
1590         std::vector.  Update all callers.
1591         (find_label_symbols): Likewise for `function_symbols' and
1592         `label_funcs_ret'.
1593
1594 2018-08-29  Keith Seitz  <keiths@redhat.com>
1595
1596         * linespec.c (symtab_vector_up): Define.
1597         (struct linespec) <file_symtabs>: Change type to std::vector *.
1598         Update all uses.
1599         (struct collect_info) <file_symtabs>: Likewise.
1600         (collect_symtabs_from_filename): Return symtab_vector_up.
1601         Update all callers.
1602         (decode_objc): Remove cleanup.
1603         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1604         (symtab_collector::release_symtabs): Return symtab_vector_up.
1605         Update all callers.
1606         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1607         Update all users.
1608         (collect_symtabs_from_filename, symtabs_from_filename): Return
1609         symtab_vector_up.  Update all callers.
1610
1611 2018-08-29  Tom Tromey  <tom@tromey.com>
1612
1613         * csky-tdep.c (csky_analyze_prologue): Use
1614         core_addr_to_string_nz.
1615
1616 2018-08-29  Tom Tromey  <tom@tromey.com>
1617
1618         * windows-nat.c (struct xlate_exception) <them>: Change type to
1619         DWORD.
1620         (xlate): Fix formatting.  Remove last entry.
1621         (struct xlate_exception, xlate): Comment out.
1622         (windows_nat_target::resume): Use ranged for.
1623
1624 2018-08-29  Jim Wilson  <jimw@sifive.com>
1625
1626         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1627         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1628         of NT_PRFPREG.
1629         (riscv_linux_nat_target::store_registers): Likewise.
1630
1631 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1632
1633         PR gdb/23555
1634         PR gdb/23558
1635         * gnulib/aclocal.m4: Regenerate.
1636         * gnulib/config.in: Regenerate.
1637         * gnulib/configure: Regenerate.
1638         * gnulib/import/Makefile.am: Update.
1639         * gnulib/import/Makefile.in: Update.
1640         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1641         * gnulib/import/_Noreturn.h: ... this.
1642         * gnulib/import/alloca.in.h: Update.
1643         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1644         * gnulib/import/arg-nonnull.h: ... this.
1645         * gnulib/import/assure.h: Update.
1646         * gnulib/import/at-func.c: Update.
1647         * gnulib/import/basename-lgpl.c: Update.
1648         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1649         * gnulib/import/c++defs.h: ... this.
1650         * gnulib/import/canonicalize-lgpl.c: Update.
1651         * gnulib/import/cdefs.h: Update.
1652         * gnulib/import/chdir-long.c: Update.
1653         * gnulib/import/chdir-long.h: Update.
1654         * gnulib/import/cloexec.c: Update.
1655         * gnulib/import/cloexec.h: Update.
1656         * gnulib/import/close.c: Update.
1657         * gnulib/import/closedir.c: Update.
1658         * gnulib/import/config.charset: Update.
1659         * gnulib/import/dirent-private.h: Update.
1660         * gnulib/import/dirent.in.h: Update.
1661         * gnulib/import/dirfd.c: Update.
1662         * gnulib/import/dirname-lgpl.c: Update.
1663         * gnulib/import/dirname.h: Update.
1664         * gnulib/import/dosname.h: Update.
1665         * gnulib/import/dup-safer-flag.c: Update.
1666         * gnulib/import/dup-safer.c: Update.
1667         * gnulib/import/dup.c: Update.
1668         * gnulib/import/dup2.c: Update.
1669         * gnulib/import/errno.in.h: Update.
1670         * gnulib/import/error.c: Update.
1671         * gnulib/import/error.h: Update.
1672         * gnulib/import/exitfail.c: Update.
1673         * gnulib/import/exitfail.h: Update.
1674         * gnulib/import/extra/update-copyright: Update.
1675         * gnulib/import/fchdir.c: Update.
1676         * gnulib/import/fcntl.c: Update.
1677         * gnulib/import/fcntl.in.h: Update.
1678         * gnulib/import/fd-hook.c: Update.
1679         * gnulib/import/fd-hook.h: Update.
1680         * gnulib/import/fd-safer-flag.c: Update.
1681         * gnulib/import/fd-safer.c: Update.
1682         * gnulib/import/fdopendir.c: Update.
1683         * gnulib/import/filename.h: Update.
1684         * gnulib/import/filenamecat-lgpl.c: Update.
1685         * gnulib/import/filenamecat.h: Update.
1686         * gnulib/import/flexmember.h: Update.
1687         * gnulib/import/float+.h: Update.
1688         * gnulib/import/float.c: Update.
1689         * gnulib/import/float.in.h: Update.
1690         * gnulib/import/fnmatch.c: Update.
1691         * gnulib/import/fnmatch.in.h: Update.
1692         * gnulib/import/fnmatch_loop.c: Update.
1693         * gnulib/import/fpucw.h: Update.
1694         * gnulib/import/frexp.c: Update.
1695         * gnulib/import/frexpl.c: Update.
1696         * gnulib/import/fstat.c: Update.
1697         * gnulib/import/fstatat.c: Update.
1698         * gnulib/import/getcwd-lgpl.c: Update.
1699         * gnulib/import/getcwd.c: Update.
1700         * gnulib/import/getdtablesize.c: Update.
1701         * gnulib/import/getlogin_r.c: Update.
1702         * gnulib/import/getprogname.c: Update.
1703         * gnulib/import/getprogname.h: Update.
1704         * gnulib/import/gettext.h: Update.
1705         * gnulib/import/gettimeofday.c: Update.
1706         * gnulib/import/glob-libc.h: Update.
1707         * gnulib/import/glob.c: Update.
1708         * gnulib/import/glob.in.h: Update.
1709         * gnulib/import/glob_internal.h: Update.
1710         * gnulib/import/glob_pattern_p.c: Update.
1711         * gnulib/import/globfree.c: Update.
1712         * gnulib/import/hard-locale.c: Update.
1713         * gnulib/import/hard-locale.h: Update.
1714         * gnulib/import/intprops.h: Update.
1715         * gnulib/import/inttypes.in.h: Update.
1716         * gnulib/import/isnan.c: Update.
1717         * gnulib/import/isnand-nolibm.h: Update.
1718         * gnulib/import/isnand.c: Update.
1719         * gnulib/import/isnanl-nolibm.h: Update.
1720         * gnulib/import/isnanl.c: Update.
1721         * gnulib/import/itold.c: Update.
1722         * gnulib/import/libc-config.h: Update.
1723         * gnulib/import/limits.in.h: Update.
1724         * gnulib/import/localcharset.c: Update.
1725         * gnulib/import/localcharset.h: Update.
1726         * gnulib/import/localtime-buffer.c: Update.
1727         * gnulib/import/localtime-buffer.h: Update.
1728         * gnulib/import/lstat.c: Update.
1729         * gnulib/import/m4/00gnulib.m4: Update.
1730         * gnulib/import/m4/__inline.m4: Update.
1731         * gnulib/import/m4/absolute-header.m4: Update.
1732         * gnulib/import/m4/alloca.m4: Update.
1733         * gnulib/import/m4/builtin-expect.m4: Update.
1734         * gnulib/import/m4/canonicalize.m4: Update.
1735         * gnulib/import/m4/chdir-long.m4: Update.
1736         * gnulib/import/m4/close.m4: Update.
1737         * gnulib/import/m4/closedir.m4: Update.
1738         * gnulib/import/m4/configmake.m4: Update.
1739         * gnulib/import/m4/d-ino.m4: Update.
1740         * gnulib/import/m4/d-type.m4: Update.
1741         * gnulib/import/m4/dirent_h.m4: Update.
1742         * gnulib/import/m4/dirfd.m4: Update.
1743         * gnulib/import/m4/dirname.m4: Update.
1744         * gnulib/import/m4/double-slash-root.m4: Update.
1745         * gnulib/import/m4/dup.m4: Update.
1746         * gnulib/import/m4/dup2.m4: Update.
1747         * gnulib/import/m4/eealloc.m4: Update.
1748         * gnulib/import/m4/environ.m4: Update.
1749         * gnulib/import/m4/errno_h.m4: Update.
1750         * gnulib/import/m4/error.m4: Update.
1751         * gnulib/import/m4/exponentd.m4: Update.
1752         * gnulib/import/m4/exponentl.m4: Update.
1753         * gnulib/import/m4/extensions.m4: Update.
1754         * gnulib/import/m4/extern-inline.m4: Update.
1755         * gnulib/import/m4/fchdir.m4: Update.
1756         * gnulib/import/m4/fcntl-o.m4: Update.
1757         * gnulib/import/m4/fcntl.m4: Update.
1758         * gnulib/import/m4/fcntl_h.m4: Update.
1759         * gnulib/import/m4/fdopendir.m4: Update.
1760         * gnulib/import/m4/filenamecat.m4: Update.
1761         * gnulib/import/m4/flexmember.m4: Update.
1762         * gnulib/import/m4/float_h.m4: Update.
1763         * gnulib/import/m4/fnmatch.m4: Update.
1764         * gnulib/import/m4/fnmatch_h.m4: Update.
1765         * gnulib/import/m4/fpieee.m4: Update.
1766         * gnulib/import/m4/frexp.m4: Update.
1767         * gnulib/import/m4/frexpl.m4: Update.
1768         * gnulib/import/m4/fstat.m4: Update.
1769         * gnulib/import/m4/fstatat.m4: Update.
1770         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1771         * gnulib/import/m4/getcwd-path-max.m4: Update.
1772         * gnulib/import/m4/getcwd.m4: Update.
1773         * gnulib/import/m4/getdtablesize.m4: Update.
1774         * gnulib/import/m4/getlogin.m4: Update.
1775         * gnulib/import/m4/getlogin_r.m4: Update.
1776         * gnulib/import/m4/getpagesize.m4: Update.
1777         * gnulib/import/m4/getprogname.m4: Update.
1778         * gnulib/import/m4/gettimeofday.m4: Update.
1779         * gnulib/import/m4/glibc21.m4: Update.
1780         * gnulib/import/m4/glob.m4: Update.
1781         * gnulib/import/m4/glob_h.m4: Update.
1782         * gnulib/import/m4/gnulib-cache.m4: Update.
1783         * gnulib/import/m4/gnulib-common.m4: Update.
1784         * gnulib/import/m4/gnulib-comp.m4: Update.
1785         * gnulib/import/m4/gnulib-tool.m4: Update.
1786         * gnulib/import/m4/hard-locale.m4: Update.
1787         * gnulib/import/m4/include_next.m4: Update.
1788         * gnulib/import/m4/inttypes-pri.m4: Update.
1789         * gnulib/import/m4/inttypes.m4: Update.
1790         * gnulib/import/m4/isnand.m4: Update.
1791         * gnulib/import/m4/isnanl.m4: Update.
1792         * gnulib/import/m4/largefile.m4: Update.
1793         * gnulib/import/m4/limits-h.m4: Update.
1794         * gnulib/import/m4/localcharset.m4: Update.
1795         * gnulib/import/m4/locale-fr.m4: Update.
1796         * gnulib/import/m4/locale-ja.m4: Update.
1797         * gnulib/import/m4/locale-zh.m4: Update.
1798         * gnulib/import/m4/localtime-buffer.m4: Update.
1799         * gnulib/import/m4/longlong.m4: Update.
1800         * gnulib/import/m4/lstat.m4: Update.
1801         * gnulib/import/m4/malloc.m4: Update.
1802         * gnulib/import/m4/malloca.m4: Update.
1803         * gnulib/import/m4/math_h.m4: Update.
1804         * gnulib/import/m4/mbrtowc.m4: Update.
1805         * gnulib/import/m4/mbsinit.m4: Update.
1806         * gnulib/import/m4/mbsrtowcs.m4: Update.
1807         * gnulib/import/m4/mbstate_t.m4: Update.
1808         * gnulib/import/m4/memchr.m4: Update.
1809         * gnulib/import/m4/memmem.m4: Update.
1810         * gnulib/import/m4/mempcpy.m4: Update.
1811         * gnulib/import/m4/memrchr.m4: Update.
1812         * gnulib/import/m4/mkdir.m4: Update.
1813         * gnulib/import/m4/mkstemp.m4: Update.
1814         * gnulib/import/m4/mmap-anon.m4: Update.
1815         * gnulib/import/m4/mode_t.m4: Update.
1816         * gnulib/import/m4/msvc-inval.m4: Update.
1817         * gnulib/import/m4/msvc-nothrow.m4: Update.
1818         * gnulib/import/m4/multiarch.m4: Update.
1819         * gnulib/import/m4/nocrash.m4: Update.
1820         * gnulib/import/m4/off_t.m4: Update.
1821         * gnulib/import/m4/onceonly.m4: Update.
1822         * gnulib/import/m4/open-cloexec.m4: Update.
1823         * gnulib/import/m4/open.m4: Update.
1824         * gnulib/import/m4/openat.m4: Update.
1825         * gnulib/import/m4/opendir.m4: Update.
1826         * gnulib/import/m4/pathmax.m4: Update.
1827         * gnulib/import/m4/rawmemchr.m4: Update.
1828         * gnulib/import/m4/readdir.m4: Update.
1829         * gnulib/import/m4/readlink.m4: Update.
1830         * gnulib/import/m4/realloc.m4: Update.
1831         * gnulib/import/m4/rename.m4: Update.
1832         * gnulib/import/m4/rewinddir.m4: Update.
1833         * gnulib/import/m4/rmdir.m4: Update.
1834         * gnulib/import/m4/save-cwd.m4: Update.
1835         * gnulib/import/m4/secure_getenv.m4: Update.
1836         * gnulib/import/m4/setenv.m4: Update.
1837         * gnulib/import/m4/signal_h.m4: Update.
1838         * gnulib/import/m4/ssize_t.m4: Update.
1839         * gnulib/import/m4/stat-time.m4: Update.
1840         * gnulib/import/m4/stat.m4: Update.
1841         * gnulib/import/m4/std-gnu11.m4: Update.
1842         * gnulib/import/m4/stdbool.m4: Update.
1843         * gnulib/import/m4/stddef_h.m4: Update.
1844         * gnulib/import/m4/stdint.m4: Update.
1845         * gnulib/import/m4/stdio_h.m4: Update.
1846         * gnulib/import/m4/stdlib_h.m4: Update.
1847         * gnulib/import/m4/strchrnul.m4: Update.
1848         * gnulib/import/m4/strdup.m4: Update.
1849         * gnulib/import/m4/strerror.m4: Update.
1850         * gnulib/import/m4/string_h.m4: Update.
1851         * gnulib/import/m4/strstr.m4: Update.
1852         * gnulib/import/m4/strtok_r.m4: Update.
1853         * gnulib/import/m4/sys_socket_h.m4: Update.
1854         * gnulib/import/m4/sys_stat_h.m4: Update.
1855         * gnulib/import/m4/sys_time_h.m4: Update.
1856         * gnulib/import/m4/sys_types_h.m4: Update.
1857         * gnulib/import/m4/tempname.m4: Update.
1858         * gnulib/import/m4/time_h.m4: Update.
1859         * gnulib/import/m4/unistd-safer.m4: Update.
1860         * gnulib/import/m4/unistd_h.m4: Update.
1861         * gnulib/import/m4/warn-on-use.m4: Update.
1862         * gnulib/import/m4/wchar_h.m4: Update.
1863         * gnulib/import/m4/wchar_t.m4: Update.
1864         * gnulib/import/m4/wctype_h.m4: Update.
1865         * gnulib/import/m4/wint_t.m4: Update.
1866         * gnulib/import/malloc.c: Update.
1867         * gnulib/import/malloc/scratch_buffer.h: Update.
1868         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1869         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1870         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1871         * gnulib/import/malloca.c: Update.
1872         * gnulib/import/malloca.h: Update.
1873         * gnulib/import/malloca.valgrind: Update.
1874         * gnulib/import/math.in.h: Update.
1875         * gnulib/import/mbrtowc.c: Update.
1876         * gnulib/import/mbsinit.c: Update.
1877         * gnulib/import/mbsrtowcs-impl.h: Update.
1878         * gnulib/import/mbsrtowcs-state.c: Update.
1879         * gnulib/import/mbsrtowcs.c: Update.
1880         * gnulib/import/memchr.c: Update.
1881         * gnulib/import/memmem.c: Update.
1882         * gnulib/import/mempcpy.c: Update.
1883         * gnulib/import/memrchr.c: Update.
1884         * gnulib/import/mkdir.c: Update.
1885         * gnulib/import/mkstemp.c: Update.
1886         * gnulib/import/msvc-inval.c: Update.
1887         * gnulib/import/msvc-inval.h: Update.
1888         * gnulib/import/msvc-nothrow.c: Update.
1889         * gnulib/import/msvc-nothrow.h: Update.
1890         * gnulib/import/open.c: Update.
1891         * gnulib/import/openat-die.c: Update.
1892         * gnulib/import/openat-priv.h: Update.
1893         * gnulib/import/openat-proc.c: Update.
1894         * gnulib/import/openat.c: Update.
1895         * gnulib/import/openat.h: Update.
1896         * gnulib/import/opendir.c: Update.
1897         * gnulib/import/pathmax.h: Update.
1898         * gnulib/import/pipe-safer.c: Update.
1899         * gnulib/import/rawmemchr.c: Update.
1900         * gnulib/import/readdir.c: Update.
1901         * gnulib/import/readlink.c: Update.
1902         * gnulib/import/realloc.c: Update.
1903         * gnulib/import/ref-add.sin: Update.
1904         * gnulib/import/ref-del.sin: Update.
1905         * gnulib/import/rename.c: Update.
1906         * gnulib/import/rewinddir.c: Update.
1907         * gnulib/import/rmdir.c: Update.
1908         * gnulib/import/same-inode.h: Update.
1909         * gnulib/import/save-cwd.c: Update.
1910         * gnulib/import/save-cwd.h: Update.
1911         * gnulib/import/scratch_buffer.h: Update.
1912         * gnulib/import/secure_getenv.c: Update.
1913         * gnulib/import/setenv.c: Update.
1914         * gnulib/import/signal.in.h: Update.
1915         * gnulib/import/stat-time.c: Update.
1916         * gnulib/import/stat-time.h: Update.
1917         * gnulib/import/stat-w32.c: Update.
1918         * gnulib/import/stat-w32.h: Update.
1919         * gnulib/import/stat.c: Update.
1920         * gnulib/import/stdbool.in.h: Update.
1921         * gnulib/import/stddef.in.h: Update.
1922         * gnulib/import/stdint.in.h: Update.
1923         * gnulib/import/stdio.in.h: Update.
1924         * gnulib/import/stdlib.in.h: Update.
1925         * gnulib/import/str-two-way.h: Update.
1926         * gnulib/import/strchrnul.c: Update.
1927         * gnulib/import/strdup.c: Update.
1928         * gnulib/import/streq.h: Update.
1929         * gnulib/import/strerror-override.c: Update.
1930         * gnulib/import/strerror-override.h: Update.
1931         * gnulib/import/strerror.c: Update.
1932         * gnulib/import/string.in.h: Update.
1933         * gnulib/import/stripslash.c: Update.
1934         * gnulib/import/strnlen1.c: Update.
1935         * gnulib/import/strnlen1.h: Update.
1936         * gnulib/import/strstr.c: Update.
1937         * gnulib/import/strtok_r.c: Update.
1938         * gnulib/import/sys_stat.in.h: Update.
1939         * gnulib/import/sys_time.in.h: Update.
1940         * gnulib/import/sys_types.in.h: Update.
1941         * gnulib/import/tempname.c: Update.
1942         * gnulib/import/tempname.h: Update.
1943         * gnulib/import/time.in.h: Update.
1944         * gnulib/import/unistd--.h: Update.
1945         * gnulib/import/unistd-safer.h: Update.
1946         * gnulib/import/unistd.in.h: Update.
1947         * gnulib/import/unsetenv.c: Update.
1948         * gnulib/import/verify.h: Update.
1949         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1950         * gnulib/import/wchar.in.h: Update.
1951         * gnulib/import/wctype.in.h: Update.
1952         * gnulib/import/xalloc-oversized.h: Update.
1953         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1954         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1955
1956 2018-08-16  Gary Benson <gbenson@redhat.com>
1957
1958         PR gdb/13000:
1959         * gdb/main.c (captured_main_1): Exit with nonzero status
1960         in batch mode if the last command to be executed failed.
1961         * NEWS: Mention the above.
1962
1963 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
1964
1965         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
1966         end of warning message.
1967
1968 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1969
1970         PR gdb/22943:
1971         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
1972         (aarch64_extract_return_value): Use
1973         aapcs_is_vfp_call_or_return_candidate.
1974         (aarch64_return_in_memory): Likewise.
1975         (aarch64_store_return_value): Likewise.
1976
1977 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1978
1979         * aarch64-tdep.c
1980         (aapcs_is_vfp_call_or_return_candidate): Make static
1981         (pass_in_v_or_stack): Remove function.
1982         (pass_in_v_vfp_candidate): New function.
1983         (aarch64_push_dummy_call): Check for float register candidates.
1984
1985 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
1986
1987         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
1988         (aapcs_is_vfp_call_or_return_candidate_1): New function.
1989         (aapcs_is_vfp_call_or_return_candidate): Likewise.
1990
1991 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
1992
1993         PR build/23399
1994         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
1995         (struct ipa_sym_addresses): Rename to...
1996         (struct ipa_sym_addresses_common): ... this.
1997         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
1998
1999 2018-08-28  Tom Tromey  <tom@tromey.com>
2000
2001         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2002         (token_fifo): Now a std::vector.
2003         (yylex, c_parse): Update.
2004         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2005         (token_fifo): Now a std::vector.
2006         (yylex, d_parse): Update.
2007         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2008         (token_fifo): Now a std::vector.
2009         (yylex, go_parse): Update.
2010
2011 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
2012
2013         * parser-defs.h (struct type_stack) <elements>: Change type to
2014         std::vector<union type_stack_elt>.
2015         <depth, size>: Remove.
2016         * parse.c (parse_exp_in_context_1): Adjust.
2017         (type_stack_reserve): Remove.
2018         (check_type_stack_depth): Remove.
2019         (insert_into_type_stack): Adjust to std::vector.
2020         (insert_type): Likewise.
2021         (push_type): Likewise.
2022         (push_type_int): Likewise.
2023         (insert_type_address_space): Likewise.
2024         (pop_type): Likewise.
2025         (pop_type_int): Likewise.
2026         (pop_typelist): Likewise.
2027         (pop_type_stack): Likewise.
2028         (append_type_stack): Likewise.
2029         (push_type_stack): Likewise.
2030         (get_type_stack): Likewise.
2031         (type_stack_cleanup): Likewise.
2032         (push_typelist): Likewise.
2033         (follow_types): Likewise.
2034         (_initialize_parse): Likewise.
2035
2036 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2037
2038         * NEWS: Mention csky target.
2039
2040 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
2041             Hafiz Abid Qadeer  <abidh@codesourcery.com>
2042             Don Breazeal  <donb@codesourcery.com>
2043
2044         * csky-linux-tdep.c: New file.
2045         * csky-tdep.c: Likewise.
2046         * csky-tdep.h: Likewise.
2047         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2048         csky-tdep.o.
2049         (HFILES_NO_SRCDIR): Add csky-tdep.h.
2050         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2051         * configure.tgt: Add csky support.
2052
2053 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
2054
2055         * python/py-framefilter.c (py_print_frame): Print frame architecture
2056         when printing on an MI output.
2057
2058 2018-08-27  Tom Tromey  <tom@tromey.com>
2059
2060         PR build/23087:
2061         * configure: Rebuild.
2062         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2063
2064 2018-08-27  Tom Tromey  <tom@tromey.com>
2065
2066         * aarch64-linux-tdep.c
2067         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2068         casts to int.
2069
2070 2018-08-27  Tom Tromey  <tom@tromey.com>
2071
2072         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2073         unsigned.
2074         (ppc64_standard_linkage1, ppc64_standard_linkage2)
2075         (ppc64_standard_linkage3, ppc64_standard_linkage4)
2076         (ppc64_standard_linkage5, ppc64_standard_linkage6)
2077         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2078         unsigned.
2079
2080 2018-08-27  Tom Tromey  <tom@tromey.com>
2081
2082         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2083         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2084
2085 2018-08-27  Tom Tromey  <tom@tromey.com>
2086
2087         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2088         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2089         ULONGEST_MAX.
2090         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2091         ULONGEST_MAX.
2092         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2093         ULONGEST_MAX.
2094         * sparc-linux-tdep.c (sparc32_linux_sigframe)
2095         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2096         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2097         ULONGEST_MAX.
2098         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2099         (ppc64_linux_sigaction_tramp_frame)
2100         (ppc32_linux_sighandler_tramp_frame)
2101         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2102         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2103         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2104         * mn10300-linux-tdep.c (am33_linux_sigframe)
2105         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2106         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2107         * mips-linux-tdep.c (mips_linux_o32_sigframe)
2108         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2109         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2110         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2111         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2112         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2113         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2114         * microblaze-linux-tdep.c
2115         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2116         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2117         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2118         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2119         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2120         * common/common-types.h (ULONGEST_MAX): New define.
2121         (CORE_ADDR_MAX): Fix formatting.
2122         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2123         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2124         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2125         (arm_linux_rt_sigreturn_tramp_frame)
2126         (arm_eabi_linux_sigreturn_tramp_frame)
2127         (arm_eabi_linux_rt_sigreturn_tramp_frame)
2128         (thumb2_eabi_linux_sigreturn_tramp_frame)
2129         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2130         (arm_linux_restart_syscall_tramp_frame)
2131         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2132         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2133         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2134         ULONGEST_MAX.
2135         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2136
2137 2018-08-27  Tom Tromey  <tom@tromey.com>
2138
2139         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2140         CORE_ADDR_MAX.
2141         * mips-tdep.c (mips_deal_with_atomic_sequence)
2142         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2143         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2144         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2145         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2146         CORE_ADDR_MAX.
2147         * aarch64-tdep.c (aarch64_software_single_step): Use
2148         CORE_ADDR_MAX.
2149
2150 2018-08-27  Tom Tromey  <tom@tromey.com>
2151
2152         * linespec.c (complete_linespec_component): Add cast to "char".
2153         * completer.c (completion_tracker::build_completion_result): Add
2154         cast to "char".
2155
2156 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2157
2158         * solist.h (struct solist, struct target_so_ops): Fix
2159         indentation.
2160
2161 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2162
2163         * ada-tasks.c (ada_task_info_s): Remove typedef.
2164         (DEF_VEC_O(ada_task_info_s)): Remove.
2165         (struct ada_tasks_inferior_data): Initialize fields.
2166         <task_list>: Make an std::vector.
2167         (get_ada_tasks_inferior_data): Allocate with new.
2168         (ada_get_task_number): Adjust.
2169         (get_task_number_from_id): Likewise.
2170         (valid_task_id): Likewise.
2171         (ada_get_task_info_from_ptid): Likewise.
2172         (iterate_over_live_ada_tasks): Likewise.
2173         (add_ada_task): Likewise.
2174         (read_known_tasks): Likewise.
2175         (ada_build_task_list): Likewise.
2176         (print_ada_task_info): Likewise.
2177         (info_task): Likewise.
2178         (task_command_1): Likewise.
2179
2180 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2181
2182         * ada-lang.c (add_angle_brackets): Return std::string.
2183
2184 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
2185
2186         * python/py-threadevent.c (py_get_event_thread): Initialize
2187         pythread.
2188
2189 2018-08-24  Pedro Alves  <palves@redhat.com>
2190
2191         * python/py-bpevent.c (create_breakpoint_event_object): Use
2192         copy-initialization.
2193         * python/py-continueevent.c (emit_continue_event): Use
2194         copy-initialization.
2195         * python/py-exitedevent.c (create_exited_event_object): Return a
2196         gdbpy_ref<>.
2197         (emit_exited_event): Use copy-initialization.
2198         * python/py-inferior.c (python_new_inferior)
2199         (python_inferior_deleted, add_thread_object): Use
2200         copy-initialization.
2201         * python/py-infevents.c (create_inferior_call_event_object)
2202         (create_register_changed_event_object)
2203         (create_memory_changed_event_object): Return a gdbpy_ref<>.
2204         (emit_inferior_call_event, emit_memory_changed_event)
2205         (emit_register_changed_event): Use copy-initialization.
2206         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2207         Return a gdbpy_ref<>.
2208         (emit_new_objfile_event): Use copy-initialization.
2209         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2210         (emit_clear_objfiles_event): Use copy-initialization.
2211         * python/py-signalevent.c (create_signal_event_object): Use
2212         copy-initialization.
2213         * python/py-threadevent.c (create_thread_event_object): Use
2214         copy-initialization.
2215
2216 2018-08-24  Pedro Alves  <palves@redhat.com>
2217             Simon Marchi  <simon.marchi@ericsson.com>
2218
2219         PR gdb/23379
2220         * python/py-continueevent.c: Include "gdbthread.h".
2221         (create_continue_event_object): Add intro comment.  Add 'ptid'
2222         parameter.  Use it to find thread to pass to
2223         create_thread_event_object.
2224         (emit_continue_event): Pass PTID down to
2225         create_continue_event_object.
2226         * python/py-event.h (py_get_event_thread): Declare.
2227         (create_thread_event_object): Remove default from 'thread'
2228         parameter.
2229         * python/py-stopevent.c (create_stop_event_object): Use
2230         py_get_event_thread.
2231         * python/py-threadevent.c (get_event_thread): Rename to ...
2232         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2233         and use it to find the thread.
2234         (create_thread_event_object): Assert that THREAD isn't null.
2235         Don't find the event thread here.
2236
2237 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
2238
2239         * block.h (blockrange, blockranges): New struct declarations.
2240         (struct block): Add new field named `ranges'.
2241         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2242         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2243         macros for accessing ranges in struct block.
2244         (make_blockranges): New declaration.
2245         block.c (make_blockranges): New function.
2246         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2247         for block.
2248         * symtab.h (find_pc_partial_function): Add new parameter `block'.
2249         * blockframe.c (cache_pc_function_block): New static global.
2250         (clear_pc_function_cache): Clear cache_pc_function_block.
2251         (find_pc_partial_function): Move comment to symtab.h.  Add
2252         support for non-contiguous blocks.
2253         * cli/cli-cmds.c (block.h): Include.
2254         (print_disassembly): Handle printing of non-contiguous blocks.
2255         (disassemble_current_function): Likewise.
2256         (disassemble_command): Likewise.
2257
2258         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2259         BLOCK_START.
2260         * blockframe.c (get_pc_function_start): Likewise.
2261         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2262         (gcc_symbol_address): Likewise.
2263         * compile/compile-object-run.c (compile_object_run): Likewise.
2264         * compile/compile.c (get_expr_block_and_pc): Likewise.
2265         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2266         (func_addr_to_tail_call_list): Likewise.
2267         * findvar.c (default_read_var_value): Likewise.
2268         * inline-frame.c (inline_frame_this_id): Likewise.
2269         (skip-inline_frames): Likewise.
2270         * infcmd.c (until_next_command): Likewise.
2271         * linespec.c (convert_linespec_to_sals): Likewise.
2272         * parse.c (parse_exp_in_context_1): Likewise.
2273         * printcmd.c (build_address_symbolic): likewise.
2274         (info_address_command): Likewise.
2275         symtab.c (find_function_start_sal): Likewise.
2276         (skip_prologue_sal): Likewise.
2277         (find_function_alias_target): Likewise.
2278         (find_gnu_ifunc): Likewise.
2279         * stack.c (find_frame_funname): Likewise.
2280         * symtab.c (fixup_symbol_section): Likewise.
2281         (find_function_start_sal): Likewise.
2282         (skip_prologue_sal): Likewsie.
2283         (find_function_alias_target): Likewise.
2284         (find_gnu_ifunc): Likewise.
2285         * tracepoint.c (info_scope_command): Likewise.
2286         * value.c (value_fn_field): Likewise.
2287
2288         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2289         in place of find_pc_partial_function.
2290         * blockframe.c (find_function_entry_range_from_pc): New function.
2291         * symtab.h (find_function_entry_range_from_pc): Declare and document.
2292         * objfiles.c (objfile_relocate1): Relocate start and end addresses
2293         for each range in a block.
2294
2295
2296 2018-08-23  Xavier Roirand  <roirand@adacore.com>
2297
2298         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2299         incrementation.
2300
2301 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2302
2303         * solib-svr4.c (read_program_headers_from_bfd): Return
2304         gdb::optional<gdb::byte_vector>.
2305         (svr4_exec_displacement): Adjust.
2306
2307 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2308
2309         * solib-svr4.c (read_program_header): Return
2310         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2311         (find_program_interpreter): Return
2312         gdb::optional<gdb::byte_vector>.
2313         (scan_dyntag_auxv): Adjust.
2314         (enable_break): Adjust.
2315         (svr4_exec_displacement): Adjust.
2316
2317 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2318
2319         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2320         * inf-child.c (inf_child_target::terminal_save_inferior): New.
2321
2322 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2323
2324         * guile/scm-string.c (gdbscm_scm_from_printf): Use
2325         string_vprintf.
2326         * guile/scm-utils.c (gdbscm_printf): Likewise.
2327         * serial.c (serial_printf): Likewise.
2328         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2329
2330 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
2331
2332         * stack.c (print_frame): Print frame architecture when printing on
2333         an MI output.
2334         * NEWS: Mention new "arch" attribute in frame output.
2335
2336 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2337
2338         * arch/aarch64.h (aarch64_regnum): Update comment.
2339
2340 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2341
2342         * NEWS: Add SVE to 8.2 section.
2343
2344 2018-08-21  Pedro Alves  <palves@redhat.com>
2345
2346         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2347         out from gdbscm_parse_function_args.
2348         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2349         gdbscm_parse_function_args_1.
2350
2351 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
2352
2353         PR gdb/17816
2354         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2355         operator.
2356
2357 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
2358
2359         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2360
2361 2018-08-19  Michael Spang  <spang@google.com>
2362
2363         PR gdb/11786
2364         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2365         for PT_TLS segments.
2366
2367 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
2368
2369         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2370         dwarf_variable_value.
2371         * dwarf2-frame.c (class dwarf_expr_executor):
2372         Add override for dwarf_variable_value.
2373         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2374         (class symbol_needs_eval_context): Likewise.
2375         (indirect_synthetic_pointer): Add forward declaration.
2376         (sect_variable_value): New function.
2377         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2378         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2379         for DW_OP_GNU_variable_value.
2380
2381 2018-08-16  Tom Tromey  <tom@tromey.com>
2382
2383         * top.c (read_command_file): Update.
2384         (command_line_input): Remove "repeat" argument.
2385         * ada-lang.c (get_selections): Update.
2386         * linespec.c (decode_line_2): Update.
2387         * defs.h (command_line_input): Remove argument.
2388         * cli/cli-script.c (read_next_line): Update.
2389         * python/py-gdb-readline.c: Update.
2390
2391 2018-08-17  Tom Tromey  <tom@tromey.com>
2392
2393         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2394         command_line_input.
2395
2396 2018-08-15  Tom Tromey  <tom@tromey.com>
2397
2398         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2399
2400 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
2401
2402         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2403         If used, use find_pc_partial_function to find address range
2404         to disassemble.
2405         * mi/mi-main.c (mi_cmd_list_features): Report
2406         "data-disassemble-a-option" feature.
2407         * NEWS: Mention new -data-disassemble option -a.
2408
2409 2018-08-13  Tom Tromey  <tom@tromey.com>
2410
2411         * common/common-defs.h (_FORTIFY_SOURCE): Define.
2412
2413 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2414
2415         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2416         (aarch64_linux_collect_sve_regset): Likewise.
2417         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2418         * regcache.h (regcache_map_entry_size): New function.
2419
2420 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2421
2422         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2423         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2424         (SVE_HEADER_VL_LENGTH): Likewise.
2425         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2426         (SVE_HEADER_FLAGS_LENGTH): Likewise.
2427         (SVE_HEADER_RESERVED_LENGTH): Likewise.
2428         (SVE_HEADER_SIZE_OFFSET): Likewise.
2429         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2430         (SVE_HEADER_VL_OFFSET): Likewise.
2431         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2432         (SVE_HEADER_FLAGS_OFFSET): Likewise.
2433         (SVE_HEADER_RESERVED_OFFSET): Likewise.
2434         (SVE_HEADER_SIZE): Likewise.
2435         (aarch64_linux_core_read_vq): Add function.
2436         (aarch64_linux_core_read_description): Check for SVE section.
2437
2438 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2439
2440         * aarch64-fbsd-tdep.c
2441         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2442         collect_size.
2443         * aarch64-linux-tdep.c
2444         (aarch64_linux_iterate_over_regset_sections): Likewise.
2445         * alpha-linux-tdep.c
2446         (alpha_linux_iterate_over_regset_sections):
2447         * alpha-nbsd-tdep.c
2448         (alphanbsd_iterate_over_regset_sections): Likewise.
2449         * amd64-fbsd-tdep.c
2450         (amd64fbsd_iterate_over_regset_sections): Likewise.
2451         * amd64-linux-tdep.c
2452         (amd64_linux_iterate_over_regset_sections): Likewise.
2453         * arm-bsd-tdep.c
2454         (armbsd_iterate_over_regset_sections): Likewise.
2455         * arm-fbsd-tdep.c
2456         (arm_fbsd_iterate_over_regset_sections): Likewise.
2457         * arm-linux-tdep.c
2458         (arm_linux_iterate_over_regset_sections): Likewise.
2459         * corelow.c (get_core_registers_cb): Likewise.
2460         (core_target::fetch_registers): Likewise.
2461         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2462         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2463         * gdbarch.h (void): Regenerate.
2464         * gdbarch.sh: Add supply_size and collect_size.
2465         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2466         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2467         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2468         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2469         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2470         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2471         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2472         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2473         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2474         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2475         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2476         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2477         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2478         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2479         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2480         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2481         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2482         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2483         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2484         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2485         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2486         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2487         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2488         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2489         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2490         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2491         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2492         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2493         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2494         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2495
2496 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
2497
2498         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2499         with string_printf.
2500
2501 2018-08-10  Keith Seitz  <keiths@redhat.com>
2502
2503         * compile/compile-c-support.c (add_code_header, add_code_footer):
2504         Move into policy class.
2505         (c_push_user_expression, pop_user_expression_nop)
2506         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2507         (compile_program): New host class.
2508         (c_compile_program): New typedef.
2509         (c_compute_porgram): Use c_compile_program.
2510
2511 2018-08-10  Keith Seitz  <keiths@redhat.com>
2512
2513         * compile/compile-internal.h (compile_instance::~compile_instance):
2514         Remove calls to htab_delete.
2515         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2516         * compile.c (compile_instance::compile_instance): Initialize
2517         htab unique pointers.
2518         (compile_instance::get_cached_type, compile_instance::insert_type)
2519         (compile_instance::error_symbol_once): Update for unique_ptr.
2520
2521 2018-08-10  Keith Seitz  <keiths@redhat.com>
2522
2523         * compile/compile-c-symbols.c (struct symbol_error)
2524         (hash_symbol_error, eq_symbol_error, del_symbol_error)
2525         (compile_instance::insert_symbol_error)
2526         (compile_instance::error_symbol_once): Move to ...
2527         * compile/compile.c: ... here.
2528
2529 2018-08-10  Keith Seitz  <keiths@redhat.com>
2530
2531         * compile/compile-c-support.c (c_get_compile_context): Use `new'
2532         instead of `new_compile_instance'.
2533         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2534         Update description.
2535         If the symbol error map is not initialized, create it.
2536         (generate_c_for_for_one_symbol): Do not check/initialize
2537         the symbol error map.
2538         * compile/compile-c-types.c (compile_c_instance): Make a class.
2539         Update all callers.
2540         (compile_instance::compile_instance): Initialize the type cache.
2541         (get_cached_type): New function.
2542         (insert_type): Update description.
2543         (compile_c_instance::m_default_cflags): Define.
2544         (convert_type): Update description.  Use get_cached_type.
2545         (delete_instance): Moved to destructor.
2546         (new_compile_instance): Moved to constructor.
2547         * compile/compile-c.h (compile_c_instance): Make class inheriting
2548         from compile_instance.
2549         <base>: Remove field.
2550         <type_map, symbol_err_map>: Move to base class.
2551         <c_plugin>: Rename to `m_plugin' and remove pointer type.
2552         * compile/compile-internal.h (compile_instance): Make class.
2553         <type_map_t, symbol_err_map_t>: Define.
2554         <fe>: Rename to `m_gcc_fe'.
2555         <scope, block, gcc_target_options>: Add `m_' prefix.
2556         <m_type_map, m_symbol_err_map>: New fields, moved from
2557         compile_c_instance.
2558         <destroy>: Remove.
2559         (convert_type, new_compile_instance): Remove.
2560         * compile/compile.c (cleanup_compile_instance): Remove.
2561         (compile_to_object): Use unique_ptr to eliminate cleanups.
2562         (compile_instance::set_print_callback, compile_instance::version)
2563         (compile_instance::set_verbose)
2564         (compile_instance::set_driver_filename)
2565         (compile_instance::set_triplet_regexp)
2566         (compile_instance::set_arguments)
2567         (compile_instance::set_source_file)
2568         (compile_instance::compile): Define.
2569
2570 2018-08-10  Keith Seitz  <keiths@redhat.com>
2571
2572         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2573         * compile/compile-c-types.c: Define GCC_METHODN macros and include
2574         gcc-c-fe.def to define C plugin.
2575         (delete_instance): Delete `c_plugin'.
2576         (new_compile_instance): Initialize `c_plugin'.
2577         * compile/compile-c.h: Include gcc_c_plugin.h.
2578         (struct compile_c_instance) <c_plugin>: New member.
2579         * gcc-c-plugin.h: New file.
2580         Update all callers with API change.
2581
2582 2018-08-10  Keith Seitz  <keiths@redhat.com>
2583
2584         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2585         (HFILES_NO_SRCDIR): ... to here.
2586         Add compile-internal.h and compile-c.h.
2587         * compile/compile-c-support.c: Include compile-c.h.
2588         * compile/compile-c-symbols.c: Include compile-c.h.
2589         (generate_c_for_variable_locations): Update comment.
2590         * compile/compile-c-types.c: Include compile-c.h.
2591         * compile/compile-c.h: New file -- moved C language declarations
2592         from other files here.
2593         * compile/compile-internal.h: Do not include hashtab.h or
2594         common/enum-flags.h.
2595         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2596         (gcc_convert_symbol, gcc_symbol_address)
2597         (generate_c_for_variable_locations, c_get_mode_for_size)
2598         (c_get_range_decl_name): Definitions moved to compile-c.h.
2599         * compile/compile-loc2c.c: Include compile-c.h.
2600
2601 2018-08-10  Keith Seitz  <keiths@redhat.com>
2602
2603         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2604         (c_symbol_substitution_name): ... this.
2605         Update all callers.
2606
2607 2018-08-10  Keith Seitz  <keiths@redhat.com>
2608
2609         * compile/compile-c-support.c (c_compute_program): Use
2610         unique_xmalloc_ptr to eliminate cleanup.
2611         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2612         Return a unique_xmalloc_ptr and eliminate cleanup.
2613         * compile/compile-internal.h (generate_c_for_variable_locations):
2614         Return unique_xmalloc_ptr and update description.
2615
2616 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
2617
2618         * corelow.c (core_target::get_core_register_section): Rename
2619         min_size to section_min_size.
2620
2621 2018-08-09  Jim Wilson  <jimw@sifive.com>
2622
2623         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2624         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2625         * NEWS: Mention new GNU/Linux RISC-V target.
2626         * configure.host: Add riscv*-*-linux*.
2627         * configure.nat: Add riscv*.
2628         * configure.tgt: Add riscv*-*-linux*.
2629         * riscv-linux-nat.c: New file.
2630         * riscv-linux-tdep.c: New file.
2631
2632 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2633
2634         * infrun.c (resume): Make static, add forward declaration.
2635         (proceed): Update header comment.
2636         * infrun.h (resume): Delete declaration.
2637
2638 2018-08-09  Tom Tromey  <tom@tromey.com>
2639
2640         * riscv-tdep.h: Minor formatting fixes.
2641
2642 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
2643
2644         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2645         * dwarf-index-cache.c (create_dir_and_check): Likewise.
2646         (test_mkdir_recursive): Likewise.
2647         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2648
2649 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2650
2651         * valarith.c (value_subscripted_rvalue): If an array is not in
2652         memory, and we don't know the upper bound, then we can't know that
2653         the requested element exists or not.
2654
2655 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
2656
2657         * target.c (str_comma_list_concat_elem): Fix typo in comment.
2658         (target_options_to_string): Add comment.
2659
2660 2018-08-08  Tom Tromey  <tom@tromey.com>
2661
2662         * unittests/scoped_mmap-selftests.c: Check result of "write".
2663
2664 2018-08-08  Jim Wilson  <jimw@sifive.com>
2665
2666         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2667         (decode_register_index_short): New.
2668         (decode_j_type_insn, decode_cj_type_insn): New.
2669         (decode_b_type_insn, decode_cb_type_insn): New.
2670         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
2671         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
2672         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2673         is_c_sw_insn instead of is_sw_insn.
2674         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2675         (riscv_software_single_step): New.
2676         * riscv-tdep.h (riscv_software_single_step): Declare.
2677
2678         * riscv-tdep.c (riscv_isa_xlen): Drop static.
2679         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2680
2681 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2682
2683         PR gdb/18050:
2684         * target.c (dispose_inferior): Don't dispose of inferiors that are
2685         already killed.
2686
2687 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2688
2689         * remote.c (remote_target::download_tracepoint): Change char* to
2690         const char*.
2691
2692 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
2693
2694         * target.h (target_options_to_string): Return an std::string.
2695         * target.c (str_comma_list_concat_elem): Return void, use
2696         std::string.
2697         (do_option): Likewise.
2698         (target_options_to_string): Return an std::string.
2699         * linux-nat.c (linux_nat_target::wait): Adjust.
2700         * target-debug.h (target_debug_print_options): Adjust.
2701
2702 2018-08-07  Tom Tromey  <tom@tromey.com>
2703
2704         * Makefile.in (CPPFLAGS): New variable.
2705         (INTERNAL_CPPFLAGS): Use it.
2706
2707 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2708
2709         * NEWS: Mention the index cache.
2710
2711 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2712
2713         * common/pathstuff.h (get_standard_cache_dir): New.
2714         * common/pathstuff.c (get_standard_cache_dir): New.
2715         * build-id.h (build_id_to_string): New.
2716         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2717         DEBUG_STR_SUFFIX): Move to here.
2718         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2719         DEBUG_STR_SUFFIX): Move from there.
2720         (write_psymtabs_to_index): Make non-static, add basename
2721         parameter.  Write to temporary files, rename when done.
2722         (save_gdb_index_command): Adjust call to
2723         write_psymtabs_to_index.
2724         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2725         field.
2726         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2727         (get_gdb_index_contents_from_cache): New.
2728         (get_gdb_index_contents_from_cache_dwz): New.
2729         (dwarf2_initialize_objfile): Read index from cache.
2730         (dwarf2_build_psymtabs): Save to index.
2731         * dwarf-index-cache.h: New file.
2732         * dwarf-index-cache.c: New file.
2733         * dwarf-index-write.h: New file.
2734
2735 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2736
2737         * gnulib/aclocal.m4: Re-generate.
2738         * gnulib/config.in: Re-generate.
2739         * gnulib/configure: Re-generate.
2740         * gnulib/import/Makefile.am: Re-generate.
2741         * gnulib/import/Makefile.in: Re-generate.
2742         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2743         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2744         * gnulib/import/m4/mkdir.m4: New file.
2745         * gnulib/import/mkdir.c: New file.
2746         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2747         module.
2748
2749 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2750
2751         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2752         * common/scoped_mmap.c: New file.
2753         * common/scoped_mmap.h (destroy): New method.
2754         (~scoped_mmap, reset): Use destroy.
2755         (scoped_mmap): New move constructor.
2756         (mmap_file): New declaration.
2757         * unittests/scoped_mmap-selftests.c (test_normal,
2758         test_invalid_filename, run_tests): New functions.
2759         (_initialize_scoped_mmap_selftests): Register selftest.
2760
2761 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2762
2763         * dwarf2read.c (read_gdb_index_from_section): Rename to...
2764         (read_gdb_index_from_buffer): ... this.  Remove section
2765         parameter, add buffer parameter.
2766         (get_gdb_index_contents_ftype,
2767         get_gdb_index_contents_dwz_ftype): New typedefs.
2768         (dwarf2_read_gdb_index): Add callback parameters to get the
2769         index contents.
2770         (get_gdb_index_contents_from_section): New.
2771         (dwarf2_initialize_objfile): Update call to
2772         dwarf2_read_gdb_index.
2773
2774 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2775
2776         * common/filestuff.h (gdb_fopen_cloexec): New overload.
2777         (gdb_open_cloexec): Likewise.
2778         * nat/linux-osdata.c (command_from_pid): Use string_printf.
2779         (commandline_from_pid): Likewise.
2780         (linux_xfer_osdata_threads): Likewise.
2781         (linux_xfer_osdata_fds): Likewise.
2782         * ada-lang.c (is_package_name): Likewise.
2783         * auxv.c (procfs_xfer_auxv): Likewise.
2784         * breakpoint.c (print_one_breakpoint_location): Use
2785         uiout::field_fmt.
2786         (print_one_catch_solib): Use string_printf.
2787         * coff-pe-read.c (add_pe_exported_sym): Likewise.
2788         (add_pe_forwarded_sym): Likewise.
2789         * dwarf2read.c (create_type_unit_group): Likewise.
2790         (build_error_marker_type): Likewise.
2791         * infcall.c (get_function_name): Likewise.
2792         * valprint.c (print_converted_chars_to_obstack): Likewise.
2793         * xtensa-tdep.c (xtensa_register_type): Likewise.
2794
2795 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
2796
2797         * remote.c (remote_target::download_tracepoint): Fix format
2798         string errors.
2799
2800 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2801
2802         * tracefile.c: Include common/byte-vector.h.
2803         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
2804         with trace_regblock_size if needed.  Update uses of buf.
2805
2806 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2807
2808         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2809         std::vector<unsigned char>.
2810         * tracepoint.c (collection_list::collection_list): Remove
2811         m_regs_mask initializer from initializer list.  Resize
2812         m_regs_mask using the largest remote register number.
2813         (collection_list::add_remote_register): Remove size check on
2814         m_regs_mask.  Use at to access element.
2815         (collection_list::stringify): Change type of temp_buf to
2816         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
2817         stringify the register mask.  Use pack_hex_byte for the register
2818         mask.
2819
2820 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2821
2822         * tracepoint.h (class collection_list) <add_register>: Remove.
2823         <add_remote_register, add_ax_registers, add_local_register>:
2824         Declare.
2825         <add_memrange>: Add scope parameter.
2826         * tracepoint.c (encode_actions_1): Likewise.
2827         (collection_list::add_register): Rename to ...
2828         (collection_list::add_remote_register): ... this.  Update
2829         comment.
2830         (collection_list::add_ax_registers, add_local_register): New
2831         methods.
2832         (collection_list::add_memrange): Add scope parameter.  Call
2833         add_local_register instead of add_register.
2834         (finalize_tracepoint_aexpr): New function.
2835         (collection_list::collect_symbol): Update calls to add_memrange.
2836         Call add_local_register instead of add_register.  Call
2837         add_ax_registers.  Call finalize_tracepoint_aexpr.
2838         (encode_actions_1): Get remote regnos for $reg action.  Call
2839         add_remote_register, add_ax_registers, and add_local_register.
2840         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
2841         (validate_actionline): Call finalize_tracepoint_aexpr.
2842
2843 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2844
2845         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2846         Replace array buf with gdb::char_vector buf, of size
2847         get_remote_packet_size ().  Replace references to buf and
2848         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
2849         and xsnprintf with snprintf.  Raise errors if the buffer is too
2850         small.
2851
2852 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2853
2854         * remote.c (remote_target::download_tracepoint): Fix the has_more
2855         predicate in the QTDP action list iteration.
2856
2857 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2858
2859         * remote.c (remote_target::download_tracepoint): Fix indentation
2860         in for block.
2861
2862 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2863
2864         * proc-api.c (_initialize_proc_api): Remove c, unused.
2865         * procfs.c (procfs_init_inferior): Remove signals, unused.
2866         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2867         unused.
2868
2869 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
2870             Andrew Burgess  <andrew.burgess@embecosm.com>
2871
2872         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2873         'W_STOPCODE (0)' as this could be ambiguous.
2874
2875 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2876
2877         * ser-tcp.c (net_open): Fix thinko when deciding whether to
2878         disable TCP's Nagle algorithm (use "ai_protocol" instead of
2879         "ai_socktype").
2880
2881 2018-08-02  Tom Tromey  <tom@tromey.com>
2882
2883         PR symtab/16842.
2884         * dwarf2read.c (read_func_scope): Set symtab on template parameter
2885         symbols.
2886         (process_structure_scope): Likewise.
2887
2888 2018-08-02  Xavier Roirand  <roirand@adacore.com>
2889
2890         PR gdb/22629:
2891         * darwin-nat.c (darwin_kill_inferior): Fix handling of
2892         kill inferior.
2893
2894 2018-08-02  Tom Tromey  <tom@tromey.com>
2895
2896         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2897         (darwin_suspend_inferior, darwin_resume_inferior)
2898         (darwin_decode_notify_message, darwin_resume_inferior_threads)
2899         (darwin_check_new_threads): Check result of get_darwin_inferior.
2900
2901 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
2902
2903         GDB 8.1.1 released.
2904
2905 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
2906
2907         * varobj.c (varobj_get_path_expr_parent): Report an error if
2908         parent is a dynamic varobj.
2909
2910 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2911
2912         * gnulib/aclocal.m4: Re-generate.
2913         * gnulib/config.in: Re-generate.
2914         * gnulib/configure: Re-generate.
2915         * gnulib/import/Makefile.in: Re-generate.
2916         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2917         * gnulib/import/m4/onceonly.m4: Re-generate.
2918
2919 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2920
2921         * target-descriptions.c (struct xml_test_tdesc): New.
2922         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2923         (record_xml_tdesc): Update.
2924         (maintenance_check_xml_descriptions): Update.
2925         * target-descriptions.h (record_xml_tdesc): Update comment.
2926
2927 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2928
2929         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2930         checking array bounds are defined.
2931
2932 2018-07-30  Tom Tromey  <tom@tromey.com>
2933
2934         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2935         irreflexivity violation.
2936
2937 2018-07-30  Tom Tromey  <tom@tromey.com>
2938
2939         * cli/cli-decode.c (lookup_cmd): Remove lint code.
2940         * value.c (unpack_long): Remove lint code.
2941         * valops.c (value_ind): Remove lint code.
2942         * valarith.c (value_x_binop, value_x_unop, value_equal)
2943         (value_pos): Remove lint code.
2944
2945 2018-07-28  Tom de Vries  <tdevries@suse.de>
2946
2947         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
2948         with undefined upper bound as <optimized out>.
2949
2950 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
2951
2952         * gcore.in: Rename variable "name" to "prefix".  Expand
2953         "usage" text.
2954
2955 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
2956
2957         * windows-nat.c (windows_nat_target::create_inferior): Update to
2958         call close() in global namespace.
2959
2960 2018-07-26  Tom Tromey  <tom@tromey.com>
2961
2962         * dwarf-index-write.c (add_address_entry): Don't add objfile
2963         offsets.
2964         * dbxread.c (find_stab_function): Rename from
2965         find_stab_function_addr.  Return a bound_minimal_symbol.
2966         (read_dbx_symtab): Use raw_text_low, raw_text_high.
2967         Don't add objfile offsets.
2968         (end_psymtab): Use raw_text_low, raw_text_high,
2969         MSYMBOL_VALUE_RAW_ADDRESS.
2970         (read_ofile_symtab): Update.
2971         (process_one_symbol): Update.
2972         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
2973         offsets.
2974         (dw2_relocate): Remove.
2975         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
2976         searching addrmap.
2977         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
2978         Update.
2979         (process_psymtab_comp_unit_reader, add_partial_symbol)
2980         (add_partial_subprogram, dwarf2_ranges_read): Update.
2981         (load_partial_dies): Update.
2982         (add_address_entry): Don't add objfile offsets.
2983         (dwarf2_build_include_psymtabs): Update.
2984         (create_addrmap_from_aranges): Don't add objfile offsets.
2985         (dw2_find_pc_sect_compunit_symtab): Update.
2986         * mdebugread.c (parse_symbol): Don't add objfile offsets.
2987         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
2988         Update.
2989         (parse_partial_symbols): Don't add objfile offsets.  Use
2990         raw_text_low, raw_text_high.  Update.
2991         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
2992         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
2993         or call 'relocate' quick function.  Clear psymbol_map.
2994         * psympriv.h (struct partial_symbol) <address>: Add section
2995         offset.
2996         <set_unrelocated_address>: Rename from set_address.
2997         <raw_text_low, raw_text_high>: New methods.
2998         <text_low, text_high>: Add objfile parameter.
2999         (add_psymbol_to_bcache): Add 'section' parameter.  Call
3000         set_unrelocated_address.
3001         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3002         (find_pc_psymbol): Update.
3003         (fixup_psymbol_section, relocate_psymtabs): Remove.
3004         (dump_psymtab, psym_functions): Update.
3005         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3006         parameter.
3007         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3008         (start_psymtab_common): Update.
3009         * symfile-debug.c (debug_qf_relocate): Remove.
3010         (debug_sym_quick_functions): Update.
3011         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3012         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3013         Update.
3014
3015 2018-07-26  Tom Tromey  <tromey@redhat.com>
3016
3017         * dbxread.c (end_psymtab): Use text_high_valid and
3018         text_low_valid.
3019         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3020         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3021         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3022         Update comment.
3023         <text_low_valid, text_high_valid>: New fields.
3024         <set_text_low, set_text_high>: Update.
3025         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3026
3027 2018-07-26  Tom Tromey  <tom@tromey.com>
3028
3029         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3030         Update.
3031         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3032         textlow and texthigh fields.
3033         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3034         Update.
3035         * mdebugread.c (parse_lines, parse_partial_symbols)
3036         (psymtab_to_symtab_1): Update.
3037         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3038         Rename fields.  Update comment.  Now private.
3039         <text_low, text_high, set_text_low, set_text_high>: New methods.
3040         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3041         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3042         (start_psymtab_common, maintenance_info_psymtabs)
3043         (maintenance_check_psymtabs): Update.
3044         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3045         texthigh fields.
3046         (scan_xcoff_symtab): Update.
3047
3048 2018-07-26  Tom Tromey  <tromey@redhat.com>
3049
3050         * psympriv.h (struct partial_symbol) <unrelocated_address,
3051         address, set_address>: New methods.
3052         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3053         (fixup_psymbol_section, relocate_psymtabs): Update.
3054         (print_partial_symbols): Add 'objfile' parameter.  Update.
3055         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3056         Update.
3057
3058 2018-07-26  Tom Tromey  <tom@tromey.com>
3059
3060         * dwarf-index-write.c (write_psymbols, debug_names::insert)
3061         (debug_names::write_psymbols): Update.
3062         * psympriv.h (struct partial_symbol): Derive from
3063         general_symbol_info.
3064         <obj_section>: New method.
3065         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3066         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3067         (find_pc_sect_psymbol, fixup_psymbol_section)
3068         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3069         (print_partial_symbols, recursively_search_psymtabs)
3070         (compare_psymbols, psymbol_hash, psymbol_compare)
3071         (add_psymbol_to_bcache, maintenance_check_psymtabs)
3072         (psymbol_name_matches, psym_fill_psymbol_map): Update.
3073
3074 2018-07-26  Tom Tromey  <tromey@redhat.com>
3075
3076         * dbxread.c (end_psymtab): Remove dead code.
3077
3078 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
3079
3080         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3081         DWARF unwinders are disabled.
3082         * dwarf2-frame.c: Add dwarf2read.h include.
3083         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3084         disabled.
3085         (dwarf2_frame_unwinders_enabled_p): Define.
3086         (show_dwarf_unwinders_enabled_p): New function.
3087         (_initialize_dwarf2_frame): Register switch to control DWARF
3088         unwinder use.
3089         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3090         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3091         (show_dwarf_cmdlist): Remove static keyword.
3092         * dwarf2read.h (set_dwarf_cmdlist): Declare.
3093         (show_dwarf_cmdlist): Declare.
3094         * NEWS: Document new feature.
3095
3096 2018-07-26  Tom de Vries  <tdevries@suse.de>
3097
3098         PR breakpoints/23366
3099         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3100
3101 2018-07-26  Tom de Vries  <tdevries@suse.de>
3102
3103         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3104         DW_AT_count can't be translated to a dynamic prop.
3105
3106 2018-07-25  Tom de Vries  <tdevries@suse.de>
3107
3108         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3109         try/catch.
3110
3111 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
3112
3113         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3114
3115 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
3116
3117         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3118
3119 2018-07-24  Keith Seitz  <keiths@redhat.comt
3120
3121         PR symtab/23010
3122         * dwarf2read.c (dw2_add_symbol_to_list): New function.
3123         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3124         instead of add_symbol_to_list.
3125         (read_file_scope): Call prepare_one_comp_unit before reading
3126         any other DIEs.
3127
3128 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
3129
3130         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3131
3132 2018-07-24  Tom Tromey  <tom@tromey.com>
3133
3134         * utils.c (malloc, realloc, free): Don't declare.
3135         * configure, config.in: Rebuild.
3136         * configure.ac: Don't check for declarations of free, malloc, or
3137         realloc.
3138
3139 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3140
3141         * aarch64-linux-nat.c
3142         (aarch64_linux_nat_target::stopped_data_address): Remove unused
3143         variable.
3144         * arm-linux-nat.c (fetch_regs): Likewise.
3145         (store_regs): Likewise.
3146         (fetch_vfp_regs): Likewise.
3147         (store_vfp_regs): Likewise.
3148         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3149         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3150         (arm_linux_nat_target::insert_watchpoint): Likewise.
3151         (arm_linux_nat_target::remove_watchpoint): Likewise.
3152         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3153         Likewise.
3154         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3155         Likewise.
3156         * ppc-linux-nat.c (fetch_register): Likewise.
3157         (fetch_all_gp_regs): Likewise.
3158         (fetch_ppc_registers): Likewise.
3159         (store_all_gp_regs): Likewise.
3160         (store_ppc_registers): Likewise.
3161         (hwdebug_insert_point): Likewise.
3162         (can_use_watchpoint_cond_accel): Likewise.
3163         * remote-sim.c (gdb_os_write_stdout): Likewise.
3164
3165 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3166             Tom Tromey  <tom@tromey.com>
3167
3168         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3169         test for it.
3170         * configure: Rebuild.
3171
3172 2018-07-22  Tom Tromey  <tom@tromey.com>
3173
3174         * regformats/regdat.sh: Define xmltarget_${name} inside
3175         #ifndef IN_PROCESS_AGENT.
3176
3177 2018-07-22  Tom Tromey  <tom@tromey.com>
3178
3179         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3180
3181 2018-07-22  Tom Tromey  <tom@tromey.com>
3182
3183         * symfile.c (reread_symbols): Notify iter, not objfile.
3184
3185 2018-07-22  Tom Tromey  <tom@tromey.com>
3186
3187         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3188         Use arch_ops.
3189         (ravenscar_thread_target::prepare_to_store): Likewise.
3190
3191 2018-07-22  Tom Tromey  <tom@tromey.com>
3192
3193         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3194         unused variable.  Call value_fetch_lazy when needed.
3195         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3196         Remove unused variable.  Call value_fetch_lazy when needed.
3197
3198 2018-07-22  Tom Tromey  <tom@tromey.com>
3199
3200         * m32c-tdep.c (mark_dma): Return void.
3201         (make_regs): Remove unused declarations.
3202
3203 2018-07-22  Tom Tromey  <tom@tromey.com>
3204
3205         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3206         cmdscm_get_valid_command_smob_arg_unsafe for effect.
3207         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3208         bkscm_get_valid_block_smob_arg_unsafe for effect.
3209
3210 2018-07-22  Tom Tromey  <tom@tromey.com>
3211
3212         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3213         value_type.
3214
3215 2018-07-22  Tom Tromey  <tom@tromey.com>
3216
3217         * windows-nat.c (saved_context): Conditionally define.
3218         * remote.c (remote_target::remote_btrace_maybe_reopen):
3219         Conditionally declare "warned".
3220         * inflow.c (sigquit_ours): Conditionally define.
3221         (new_tty): Move "tty" declaration inside #if.
3222         * guile/guile.c (guile_datadir): Conditionally define.
3223         * charset.c (set_be_le_names): Move some declarations inside #if.
3224         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3225         #if.
3226         (parse_xml_btrace_conf): Likewise.
3227
3228 2018-07-22  Tom Tromey  <tom@tromey.com>
3229
3230         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3231
3232 2018-07-22  Tom Tromey  <tom@tromey.com>
3233
3234         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3235         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3236         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3237         * buildsym-legacy.c (get_macro_table): Remove unused variable.
3238         * stack.c (frame_apply_level_command): Remove unused variable.
3239         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3240         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3241         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3242         unused variable.
3243         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3244         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3245         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3246         variable.
3247         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3248         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3249         variable.
3250         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3251         Remove unused variable.
3252         * cli/cli-script.c (recurse_read_control_structure): Remove unused
3253         variable.
3254         * common/tdesc.c (print_xml_feature::visit): Remove unused
3255         variable.
3256         * compile/compile-object-load.c (store_regs): Remove unused
3257         variables.
3258         * complaints.c (clear_complaints): Remove unused variable.
3259         * corelow.c (core_target_open): Remove unused variable.
3260         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3261         variable.
3262         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3263         variable.
3264         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3265         variable.
3266         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3267         variable.
3268         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3269         variable.
3270         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3271         variable.
3272         * ia64-tdep.c (examine_prologue): Remove unused variable.
3273         * infcall.c (run_inferior_call): Remove unused variable.
3274         * inferior.c (exit_inferior): Remove unused variable.
3275         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3276         * linespec.c (decode_line_2): Remove unused variable.
3277         * linux-nat.c (super_close): Remove.
3278         * linux-tdep.c (linux_info_proc): Remove unused variable.
3279         * mi/mi-main.c (mi_execute_command): Remove unused variable.
3280         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3281         Remove unused variable.
3282         * parse.c (find_minsym_type_and_address): Remove unused variable.
3283         * printcmd.c (info_symbol_command, printf_floating): Remove unused
3284         variable.
3285         * python/py-breakpoint.c (bppy_set_commands): Remove unused
3286         variable.
3287         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3288         variables.
3289         * record-btrace.c (record_btrace_target::store_registers): Remove
3290         unused variable.
3291         (cmd_show_record_btrace_cpu): Remove unused variable.
3292         * riscv-tdep.c (riscv_register_reggroup_p)
3293         (riscv_push_dummy_call, riscv_return_value): Remove unused
3294         variable.
3295         * rust-exp.y (literal): Remove unused variable.
3296         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3297         unused variable.
3298         <STRUCTOP_ANONYMOUS>: Likewise.
3299         * s390-linux-tdep.c (s390_linux_init_abi_31)
3300         (s390_linux_init_abi_64): Remove unused variable.
3301         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3302         (file_select_thread, net_windows_open, _initialize_ser_windows):
3303         Remove unused variables.
3304         * symtab.c (find_pc_sect_line): Remove unused variable.
3305         * target-memory.c (compute_garbled_blocks): Remove unused
3306         variable.
3307         (target_write_memory_blocks): Remove unused variable.
3308         * target.c (target_stack::unpush): Remove unused variables.
3309         * tracepoint.c (start_tracing, all_tracepoint_actions)
3310         (merge_uploaded_trace_state_variables)
3311         (print_one_static_tracepoint_marker): Remove unused variable.
3312         * unittests/basic_string_view/element_access/char/1.cc (test01):
3313         Remove unused variable.
3314         * windows-nat.c (windows_continue, windows_add_all_dlls)
3315         (do_initial_windows_stuff, windows_nat_target::create_inferior):
3316         Remove unused variables.
3317
3318 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
3319
3320         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3321         attr_profile in HAVE_ELF.
3322         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3323         HAVE_ELF.
3324
3325 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
3326
3327         * frame.c (frame_register_unwind): Change parameter name.
3328         (frame_unwind_register): Likewise.
3329         (frame_unwind_register_value): Likewise.
3330         (frame_unwind_register_signed): Likewise.
3331         (frame_unwind_register_unsigned): Likewise.
3332         * frame.h (frame_register_unwind): Likewise.
3333         (frame_unwind_register): Likewise.
3334         (frame_unwind_register_value): Likewise.
3335         (frame_unwind_register_signed): Likewise.
3336         (frame_unwind_register_unsigned): Likewise.
3337         (frame_unwind_arch): Likewise.
3338
3339 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3340
3341         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3342         ISA maintenance.
3343
3344 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3345
3346         * mips-linux-nat.c (mips_linux_nat_target::read_description):
3347         Call `get_ptrace_pid' rather than extracting the ptrace PID by
3348         hand.
3349
3350 2018-07-20  Keith Seitz  <keiths@redhat.com>
3351
3352         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3353         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3354         m_compunit_symtab, m_language>: Add "m_" prefix.
3355         Update all uses.
3356         * buildsym.c: Update all uses.
3357
3358 2018-07-20  Tom Tromey  <tom@tromey.com>
3359
3360         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3361         * buildsym.h (record_line_ftype): Remove typedef.
3362
3363 2018-07-20  Tom Tromey  <tom@tromey.com>
3364
3365         * buildsym-legacy.h (augment_type_symtab): Don't declare.
3366         (end_expandable_symtab): Likewise.
3367         (end_symtab_get_static_block): Likewise.
3368         (end_symtab_from_static_block): Likewise.
3369         * buildsym-legacy.c (augment_type_symtab): Remove.
3370         (end_expandable_symtab): Remove.
3371         (end_symtab_get_static_block): Remove.
3372         (end_symtab_from_static_block): Remove.
3373
3374 2018-07-20  Tom Tromey  <tom@tromey.com>
3375
3376         * dwarf2read.c: Include buildsym.h.
3377         (struct dwarf2_cu) <builder>: New method.
3378         (fixup_go_packaging): Update.
3379         (process_full_comp_unit, process_full_type_unit): Update.  Don't
3380         use scoped_free_pendings.
3381         (using_directives): Add "cu" parameter, remove "language".
3382         (read_import_statement, setup_type_unit_groups, )
3383         (read_func_scope, read_lexical_block_scope)
3384         (dwarf2_record_block_ranges, read_namespace): Update.
3385         (lnp_state_machine::lnp_state_machine): Add cu parameter.
3386         (lnp_state_machine::handle_end_sequence): Update.
3387         (class lnp_state_machine) <m_cu>: New member.
3388         <m_record_line_callback>: Remove.
3389         <m_currently_recording_lines>: New member.
3390         (lnp_state_machine::handle_set_file): Update.
3391         (noop_record_line): Remove.
3392         (dwarf_record_line_p): Add cu parameter.
3393         (dwarf_record_line_1, dwarf_finish_line): Likewise.
3394         (lnp_state_machine::record_line)
3395         (lnp_state_machine::lnp_state_machine)
3396         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3397         (dwarf_decode_lines): Update.
3398         (dwarf2_start_subfile): Add cu parameter.
3399         (dwarf2_start_symtab, new_symbol): Update.
3400         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3401         Remove dwarf2_per_objfile parameter.
3402         (dwarf_decode_macros): Update.
3403
3404 2018-07-20  Tom Tromey  <tom@tromey.com>
3405
3406         * stabsread.c (define_symbol): Update.
3407         * buildsym-legacy.h (get_buildsym_compunit): Declare.
3408         * dwarf2read.c (new_symbol): Update.
3409         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3410         * cp-namespace.c: Include buildsym.h.
3411         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3412         * buildsym-legacy.c (get_buildsym_compunit): New function.
3413
3414 2018-07-20  Tom Tromey  <tom@tromey.com>
3415
3416         * xcoffread.c: Include buildsym-legacy.h.
3417         * windows-nat.c: Include buildsym-legacy.h.
3418         * stabsread.c: Include buildsym-legacy.h.
3419         * mdebugread.c: Include buildsym-legacy.h.
3420         * buildsym-legacy.h: New file.
3421         * buildsym-legacy.c: New file, from buildsym.c.
3422         * go32-nat.c: Include buildsym-legacy.h.
3423         * dwarf2read.c: Include buildsym-legacy.h.
3424         * dbxread.c: Include buildsym-legacy.h.
3425         * cp-namespace.c: Include buildsym-legacy.h.
3426         * coffread.c: Include buildsym-legacy.h.
3427         * buildsym.h: Move some contents to buildsym-legacy.h.
3428         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
3429         buildsym-legacy.c.
3430         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3431
3432 2018-07-20  Tom Tromey  <tom@tromey.com>
3433
3434         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3435         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3436         (buildsym_compunit::buildsym_compunit)
3437         (buildsym_compunit::~buildsym_compunit)
3438         (buildsym_compunit::get_macro_table): Define.
3439
3440 2018-07-20  Tom Tromey  <tom@tromey.com>
3441
3442         * buildsym.c (reset_symtab_globals): Remove.
3443         (buildsym_compunit::end_symtab_from_static_block): Update.
3444         (buildsym_compunit::augment_type_symtab): Update.
3445         (end_symtab_from_static_block): Call free_buildsym_compunit.
3446         (augment_type_symtab, end_symtab, end_expandable_symtab):
3447         Likewise.
3448
3449 2018-07-20  Tom Tromey  <tom@tromey.com>
3450
3451         * arch-utils.c: Do not include buildsym.h.
3452         * mipsread.c: Do not include buildsym.h.
3453         * machoread.c: Do not include buildsym.h.
3454         * elfread.c: Do not include buildsym.h.
3455
3456 2018-07-20  Tom Tromey  <tom@tromey.com>
3457
3458         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3459         initialization.
3460         (buildsym_compunit): Add new constructor.
3461         (struct buildsym_compunit) <get_last_source_file, finish_block,
3462         record_block_range, start_subfile, patch_subfile_names,
3463         push_subfile, pop_subfile, record_line, get_compunit_symtab,
3464         set_last_source_start_addr, get_last_source_start_addr,
3465         get_local_using_directives, set_local_using_directives,
3466         get_global_using_directives, outermost_context_p,
3467         get_current_context_stack, get_context_stack_depth,
3468         get_current_subfile, get_local_symbols, get_file_symbols,
3469         get_global_symbols, record_debugformat, record_producer,
3470         push_context, pop_context, end_symtab_get_static_block,
3471         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3472         New public methods.
3473         <record_pending_block, finish_block_internal, make_blockvector,
3474         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3475         private methods.
3476         Update all users.
3477
3478 2018-05-22  Tom Tromey  <tom@tromey.com>
3479
3480         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3481         parameter.
3482         (finish_block_internal): Update.
3483
3484 2018-07-20  Tom Tromey  <tom@tromey.com>
3485
3486         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3487         parameter.
3488         (finish_block_internal): Update.
3489
3490 2018-07-20  Tom Tromey  <tom@tromey.com>
3491
3492         * buildsym.h (EXTERN): Don't define or undef.
3493         * buildsym.c (EXTERN): Don't define.
3494
3495 2018-07-20  Tom Tromey  <tom@tromey.com>
3496
3497         * buildsym.c: Remove TODO comment.
3498
3499 2018-07-20  Tom Tromey  <tom@tromey.com>
3500
3501         * coffread.c (coff_symtab_read): Update.
3502         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3503         (xcoff_new_init): Update.
3504         * mipsread.c (mipscoff_new_init): Update.
3505         * mdebugread.c (mdebug_build_psymtabs): Update.
3506         * elfread.c (elf_new_init): Update.
3507         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3508         Update.
3509         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3510         (coffstab_build_psymtabs, elfstab_build_psymtabs)
3511         (stabsect_build_psymtabs): Update.
3512         * buildsym.h (buildsym_init): Don't declare.
3513         * buildsym.c: Update comment.
3514         (prepare_for_building): Remove.
3515         (start_symtab, restart_symtab): Update.
3516         (reset_symtab_globals): Update comment.
3517         (buildsym_init): Remove.
3518
3519 2018-07-20  Tom Tromey  <tom@tromey.com>
3520
3521         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3522         * stabsread.c (patch_block_stabs, define_symbol, read_type)
3523         (read_enum_type, common_block_start, common_block_end)
3524         (cleanup_undefined_types_1, finish_global_stabs): Update.
3525         * mdebugread.c (psymtab_to_symtab_1): Update.
3526         * dwarf2read.c (fixup_go_packaging, read_func_scope)
3527         (read_lexical_block_scope, new_symbol): Update.
3528         * dbxread.c (process_one_symbol): Update.
3529         * coffread.c (coff_symtab_read, process_coff_symbol)
3530         (coff_read_enum_type): Update.
3531         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3532         declare.
3533         (get_local_symbols, get_file_symbols, get_global_symbols): New
3534         functions.
3535         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3536         m_global_symbols.
3537         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3538         (~scoped_free_pendings): Update.
3539         (finish_block, prepare_for_building, reset_symtab_globals)
3540         (end_symtab_get_static_block, end_symtab_with_blockvector)
3541         (augment_type_symtab, push_context): Update.
3542         (get_local_symbols, get_file_symbols, get_global_symbols): New
3543         functions.
3544         (buildsym_init): Update.
3545
3546 2018-07-20  Tom Tromey  <tom@tromey.com>
3547
3548         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3549         (process_full_type_unit): Likewise.
3550         (dwarf2_start_symtab): Set list_in_scope.
3551
3552 2018-07-20  Tom Tromey  <tom@tromey.com>
3553
3554         * dwarf2read.c (process_psymtab_comp_unit_reader)
3555         (build_type_psymtabs_reader): Do not set list_in_scope.
3556
3557 2018-07-20  Tom Tromey  <tom@tromey.com>
3558
3559         * buildsym.c (free_pendings): Remove.
3560         (add_symbol_to_list, scoped_free_pendings)
3561         (finish_block_internal, buildsym_init): Update.
3562
3563 2018-07-20  Tom Tromey  <tom@tromey.com>
3564
3565         * xcoffread.c (read_xcoff_symtab): Update.
3566         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3567         Update.
3568         * dbxread.c (process_one_symbol): Update.
3569         * coffread.c (coff_symtab_read): Update.
3570         * buildsym.h (finish_block): Update.
3571         * buildsym.c (finish_block): Remove "listhead" argument.
3572         (end_symtab_get_static_block): Update.
3573
3574 2018-07-20  Tom Tromey  <tom@tromey.com>
3575
3576         * buildsym.h (class scoped_free_pendings): Remove constructor.
3577         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3578         method.
3579         <m_pending_block_obstack, m_pending_blocks>: New members.
3580         (pending_block_obstack, pending_blocks): Remove.
3581         (scoped_free_pendings::scoped_free_pendings): Default.
3582         (~scoped_free_pendings): Update.
3583         (free_pending_blocks): Remove.
3584         (finish_block_internal, record_pending_block, make_blockvector)
3585         (end_symtab_get_static_block, augment_type_symtab, push_context)
3586         (buildsym_init): Update.
3587
3588 2018-07-20  Tom Tromey  <tom@tromey.com>
3589
3590         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3591         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3592         members.
3593         (pending_addrmap, pending_addrmap_obstack)
3594         (pending_addrmap_interesting): Remove.
3595         (scoped_free_pendings, record_block_range, make_blockvector)
3596         (prepare_for_building, reset_symtab_globals, buildsym_init):
3597         Update.
3598
3599 2018-07-20  Tom Tromey  <tom@tromey.com>
3600
3601         * xcoffread.c (process_linenos): Update.
3602         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3603         * mdebugread.c (psymtab_to_symtab_1): Update.
3604         * dwarf2read.c (setup_type_unit_groups)
3605         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3606         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3607         * dbxread.c (process_one_symbol): Update.
3608         * coffread.c (coff_symtab_read, enter_linenos)
3609         (process_coff_symbol): Update.
3610         * buildsym.h (current_subfile): Don't declare.
3611         (get_current_subfile): Declare.
3612         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3613         member.
3614         (start_subfile, free_buildsym_compunit, push_subfile)
3615         (prepare_for_building, start_symtab): Update.
3616         (get_current_subfile): New function.
3617
3618 2018-07-20  Tom Tromey  <tom@tromey.com>
3619
3620         * coffread.c (coff_symtab_read): Update.
3621         * xcoffread.c (read_xcoff_symtab): Update.
3622         * dwarf2read.c (new_symbol): Update.
3623         (read_func_scope, read_lexical_block_scope): Update.
3624         * dbxread.c (process_one_symbol): Update.
3625         * buildsym.h (context_stack, context_stack_depth): Don't declare.
3626         (outermost_context_p): Remove macro.
3627         (outermost_context_p, get_current_context_stack)
3628         (get_context_stack_depth): Declare.
3629         (pop_context): Return struct context_stack.
3630         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3631         member.
3632         (context_stack_size): Remove.
3633         (INITIAL_CONTEXT_STACK_SIZE): Remove.
3634         (prepare_for_building, end_symtab_get_static_block)
3635         (augment_type_symtab, push_context): Update.
3636         (pop_context): Return struct context_stack.
3637         (outermost_context_p, get_current_context_stack)
3638         (get_context_stack_depth): New functions.
3639         (buildsym_init): Update.
3640
3641 2018-07-20  Tom Tromey  <tom@tromey.com>
3642
3643         * rust-exp.y: Now a pure parser.  Update all rules.
3644         (%union): Move earlier.
3645         (current_parser, work_obstack): Remove globals.
3646         (rust_parser, ~rust_parser): Update.
3647         (class rust_parser) <copy_name, concat3, crate_name, super_name,
3648         lex_character, lex_number, lex_string, lex_identifier,
3649         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3650         convert_name, convert_params_to_expression,
3651         convert_ast_to_expression, ast_basic_type, ast_operation,
3652         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3653         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3654         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3655         ast_array_type, ast_slice_type, ast_reference_type,
3656         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3657         (rust_parse): Update.
3658         (rustyyerror, rustyylex): Add parser parameter.
3659         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3660         (rust_lex_stringish_test, rust_lex_test_sequence)
3661         (rust_lex_test_trailing_dot, rust_lex_test_completion)
3662         (rust_lex_test_push_back, rust_lex_tests): Update.
3663
3664 2018-07-19  Pedro Alves  <palves@redhat.com>
3665
3666         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3667         gdb::unique_xmalloc_ptr.
3668         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3669         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3670         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3671         copy-initialization.
3672         * guile/scm-pretty-print.c (ppscm_print_children): Use
3673         gdb::unique_xmalloc_ptr instead of cleanups.
3674         (gdbscm_apply_val_pretty_printer): Remove cleanups.
3675         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3676         gdb::unique_xmalloc_ptr.
3677         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3678         Adjust to use gdb::unique_xmalloc_ptr.
3679         * guile/scm-utils.c (extract_arg): Adjust.
3680         * guile/scm-value.c (gdbscm_value_field): Adjust to use
3681         gdb::unique_xmalloc_ptr instead of a cleanup.
3682
3683 2018-07-19  Tom Tromey  <tom@tromey.com>
3684
3685         * utils.c (do_value_free_to_mark)
3686         (make_cleanup_value_free_to_mark): Remove.
3687         * utils.h (make_cleanup_value_free_to_mark): Remove.
3688
3689 2018-07-19  Pedro Alves  <palves@redhat.com>
3690
3691         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3692         forwarding reference.
3693
3694 2018-07-18  Pedro Alves  <palves@redhat.com>
3695
3696         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3697         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
3698         cleanup.
3699
3700 2018-07-18  Pedro Alves  <palves@redhat.com>
3701
3702         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3703         exceptions.
3704         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3705         (gdbscm_wrap): New.
3706         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3707         directly instead of a cleanup.
3708         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3709         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3710         (vlscm_binop_gdbthrow): New, factored out from ...
3711         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3712         (vlscm_rich_compare): Use gdbscm_wrap.
3713         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3714         instead of a cleanup.
3715         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3716         cleanup.
3717         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3718         Use xfree directly instead of a cleanup.
3719         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3720         Adjust to use gdbscm_wrap and scoped_value_mark.
3721         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3722         (gdbscm_value_address, gdbscm_value_dereference)
3723         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3724         scoped_value_mark.
3725         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3726         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3727         scoped_value_mark.
3728         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3729         gdbscm_wrap and scoped_value_mark.
3730         (gdbscm_value_to_string): Use xfree directly instead of a
3731         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3732         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3733         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3734         scoped_value_mark.
3735         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3736         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3737         scoped_value_mark.
3738         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3739         gdbscm_wrap.
3740
3741 2018-07-18  Tom de Vries  <tdevries@suse.de>
3742
3743         * findvar.c (default_read_var_value): Also resolve dynamic type for
3744         LOC_OPTIMIZED_OUT vars.
3745
3746 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
3747
3748         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3749         decoding.
3750
3751 2018-07-17  Tom Tromey  <tom@tromey.com>
3752
3753         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3754         (compute_enum_list, pascm_set_param_value_x)
3755         (gdbscm_parameter_value): Update.
3756         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3757         (gdbscm_scm_to_host_string): Update.
3758         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3759         Update.
3760         * guile/scm-cmd.c (cmdscm_add_completion): Update.
3761         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3762         * guile/scm-string.c (gdbscm_scm_to_string): Return
3763         unique_xmalloc_ptr.
3764         (gdbscm_scm_to_host_string): Likewise.
3765
3766 2018-07-17  Tom Tromey  <tom@tromey.com>
3767
3768         * guile/guile.c (gdbscm_eval_from_control_command): Update.
3769         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3770         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3771         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3772         unique_xmalloc_ptr.
3773
3774 2018-07-17  Tom Tromey  <tom@tromey.com>
3775
3776         * guile/scm-param.c (pascm_signal_setshow_error): Update.
3777         * guile/guile-internal.h (gdbscm_exception_message_to_string):
3778         Update.
3779         * guile/scm-cmd.c (cmdscm_function): Update.
3780         * guile/scm-pretty-print.c
3781         (ppscm_print_exception_unless_memory_error): Update.
3782         * guile/scm-exception.c (gdbscm_exception_message_to_string):
3783         Return unique_xmalloc_ptr.
3784
3785 2018-07-17  Tom Tromey  <tom@tromey.com>
3786
3787         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3788         Use string_printf.
3789
3790 2018-07-17  Jim Wilson  <jimw@sifive.com>
3791
3792         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3793         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
3794         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
3795         unecessary braces after EF_RISCV_RVC test.  Delete call to
3796         set_gdbarch_decr_pc_after_break.
3797
3798         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3799         RISCV_LAST_FP_REGNUM + 1.
3800         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3801
3802 2018-07-17  Tom Tromey  <tom@tromey.com>
3803
3804         * configure.ac: Remove --disable-gdbcli.
3805         * configure: Rebuild.
3806         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3807         (SUBDIR_CLI_CFLAGS): Remove.
3808         (SFILES): Use SUBDIR_CLI_SRCS.
3809         (COMMON_OBS): Use SUBDIR_CLI_OBS.
3810
3811 2018-07-17  Tom Tromey  <tom@tromey.com>
3812
3813         PR gdb/18624:
3814         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3815
3816 2018-07-16  Jim Wilson  <jimw@sifive.com>
3817
3818         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3819
3820 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3821
3822         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3823         variable.
3824         (libunwind_frame_sniffer): Likewise.
3825         (libunwind_frame_prev_register): Likewise.
3826         (libunwind_sigtramp_frame_sniffer): Likewise.
3827         * ia64-tdep.c (ia64_access_reg): Likewise.
3828         (ia64_access_rse_reg): Likewise.
3829         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3830         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3831
3832 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3833
3834         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3835
3836 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3837
3838         * remote-sim.c (gdbsim_target::close,
3839         gdbsim_target::mourn_inferior): Remove unused variables.
3840
3841 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
3842
3843         * ia64-tdep.c (ktab_buf): New global.
3844         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3845         (get_kernel_table): Adjust.
3846
3847 2018-07-16  Tom Tromey  <tom@tromey.com>
3848
3849         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3850         * dwarf2read.c (using_directives, new_symbol): Use
3851         outermost_context_p.
3852         * dbxread.c (process_one_symbol): Use outermost_context_p.
3853         * coffread.c (coff_symtab_read): Use outermost_context_p.
3854
3855 2018-07-16  Tom Tromey  <tom@tromey.com>
3856
3857         * dwarf2read.c (using_directives, read_func_scope)
3858         (read_lexical_block_scope): Update.
3859         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3860         * buildsym.h (local_using_directives, global_using_directives):
3861         Don't declare.
3862         (get_local_using_directives, set_local_using_directives)
3863         (get_global_using_directives): Declare.
3864         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3865         m_global_using_directives>: New members.
3866         (finish_block_internal, prepare_for_building)
3867         (reset_symtab_globals, end_symtab_get_static_block)
3868         (push_context): Update.
3869         (get_local_using_directives, set_local_using_directives)
3870         (get_global_using_directives): New functions.
3871         (buildsym_init): Update.
3872
3873 2018-07-16  Tom Tromey  <tom@tromey.com>
3874
3875         * xcoffread.c (xcoff_initial_scan): Don't call
3876         free_pending_blocks.
3877         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3878         * buildsym.h (class scoped_free_pendings): Add constructor.
3879         (free_pending_blocks): Don't declare.
3880         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3881         (free_pending_blocks): Now static.
3882
3883 2018-07-16  Tom Tromey  <tom@tromey.com>
3884
3885         * buildsym.h (push_subfile, pop_subfile): Update declarations.
3886         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3887         member.
3888         (struct subfile_stack): Remove.
3889         (subfile_stack): Remove.
3890         (push_subfile, pop_subfile, buildsym_init): Update.
3891
3892 2018-07-16  Tom Tromey  <tom@tromey.com>
3893
3894         * buildsym.c (push_subfile): Use gdb_assert.
3895         (pop_subfile): Use gdb_assert.
3896
3897 2018-07-16  Tom Tromey  <tom@tromey.com>
3898
3899         * buildsym.h (merge_symbol_lists): Remove.
3900         * buildsym.c (merge_symbol_lists): Remove.
3901
3902 2018-07-16  Tom Tromey  <tom@tromey.com>
3903
3904         * stabsread.c (scan_file_globals): Update comment.
3905         * stabsread.h (scan_file_globals): Move from buildsym.h.
3906         * buildsym.h (scan_file_globals): Move to stabsread.h.
3907
3908 2018-07-16  Tom Tromey  <tom@tromey.com>
3909
3910         * xcoffread.c (xcoff_new_init): Update.
3911         * mipsread.c (mipscoff_new_init): Update.
3912         * mdebugread.c (mdebug_build_psymtabs): Update.
3913         * elfread.c (elf_new_init): Update.
3914         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3915         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3916         * buildsym.h (buildsym_new_init): Don't declare.
3917         * buildsym.c (buildsym_new_init): Remove.
3918
3919 2018-07-16  Tom Tromey  <tom@tromey.com>
3920
3921         * stabsread.h (within_function): Move from buildsym.h.
3922         * stabsread.c (start_stabs): Clear within_function.
3923         * coffread.c (coff_start_symtab): Clear within_function.
3924         * buildsym.h (within_function): Move to stabsread.h.
3925         * buildsym.c (prepare_for_building): Update.
3926
3927 2018-07-16  Tom Tromey  <tom@tromey.com>
3928
3929         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3930         * dwarf2read.c (dwarf2_start_symtab): Don't set
3931         processing_gcc_compilation.
3932         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3933
3934 2018-07-16  Tom Tromey  <tom@tromey.com>
3935
3936         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3937         (next_symbol_text_func): Move from buildsym.h.
3938         * stabsread.c (hashname): Move from buildsym.c.
3939         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3940         (next_symbol_text_func, hashname): Move to stabsread.h.
3941         * buildsym.c: Don't include bcache.h
3942         (hashname): Move to stasbread.c.
3943
3944 2018-07-16  Tom Tromey  <tom@tromey.com>
3945
3946         * buildsym.h (context_stack_size): Don't declare.
3947         * buildsym.c (context_stack_size): New global.
3948
3949 2018-07-16  Tom Tromey  <tom@tromey.com>
3950
3951         * dbxread.c (processing_acc_compilation): New global.
3952         * buildsym.h (processing_acc_compilation): Don't declare.
3953
3954 2018-07-16  Tom Tromey  <tom@tromey.com>
3955
3956         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
3957         * dbxread.c (read_ofile_symtab): Update.
3958         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
3959         * buildsym.h (last_source_start_addr): Remove.
3960         (set_last_source_start_addr, get_last_source_start_addr):
3961         Declare.
3962         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
3963         parameter.
3964         (struct buildsym_compunit) <m_last_source_start_addr>: New
3965         member.
3966         (prepare_for_building): Remove start_addr parameter.
3967         (start_symtab, restart_symtab, end_symtab_get_static_block)
3968         (end_symtab_with_blockvector): Update.
3969         (set_last_source_start_addr, get_last_source_start_addr): New
3970         functions.
3971
3972 2018-07-16  Tom Tromey  <tom@tromey.com>
3973
3974         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
3975         member.
3976         (have_line_numbers): Remove.
3977         (record_line, prepare_for_building, end_symtab_get_static_block)
3978         (augment_type_symtab): Update.
3979
3980 2018-07-16  Tom Tromey  <tom@tromey.com>
3981
3982         * buildsym.c (~buildsym_compunit): Free the macro table.
3983         (struct buildsym_compunit) <get_macro_table, release_macros>: New
3984         methods.
3985         <m_pending_macros>: New member.
3986         (pending_macros): Remove.
3987         (~scoped_free_pendings, get_macro_table, prepare_for_building)
3988         (reset_symtab_globals, end_symtab_get_static_block)
3989         (end_symtab_with_blockvector, augment_type_symtab)
3990         (buildsym_init): Update.
3991
3992 2018-07-16  Tom Tromey  <tom@tromey.com>
3993
3994         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
3995         parameter.
3996         (buildsym_compunit::set_last_source_file): New method.
3997         <m_last_source_file>: New member.
3998         (prepare_for_building): Remove "name" parameter.
3999         (start_symtab, restart_symtab, reset_symtab_globals): Update.
4000         (last_source_file): Remove.
4001         (set_last_source_file, get_last_source_file): Update.
4002
4003 2018-07-16  Tom Tromey  <tom@tromey.com>
4004
4005         * buildsym.c (prepare_for_building): Add assert.
4006
4007 2018-07-16  Tom Tromey  <tom@tromey.com>
4008
4009         * buildsym.c (~buildsym_compunit): Update.
4010         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4011         (start_subfile, patch_subfile_names)
4012         (end_symtab_with_blockvector): Update.
4013
4014 2018-07-16  Tom Tromey  <tom@tromey.com>
4015
4016         * buildsym.c (struct buildsym_compunit): Add constructor,
4017         destructor, initializers.
4018         (start_buildsym_compunit): Remove.
4019         (free_buildsym_compunit): Use "delete".
4020         (start_symtab, restart_symtab): Use "new".
4021
4022 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
4023
4024         * symfile.c (set_objfile_default_section_offset): Remove struct
4025         keyword.
4026
4027 2018-07-14  Stafford Horne  <shorne@gmail.com>
4028
4029         * (Responsible Maintainers): Add myself as or1k maintainer.
4030
4031 2018-07-13  Tom Tromey  <tom@tromey.com>
4032
4033         * symfile.c (set_objfile_default_section_offset): Use extra braces
4034         around initializer.
4035
4036 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4037
4038         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4039         non-branching basr.
4040
4041 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4042
4043         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4044         unittests/cli-utils-selftests.c
4045         * unittests/cli-utils-selftests.c: New file.
4046
4047 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4048
4049         * NEWS: Mention new commands. Mention change to 'thread apply'.
4050
4051 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4052
4053         * thread.c (thr_try_catch_cmd): New function.
4054         (thread_apply_all_command): Handle qcs flags.
4055         (thread_apply_command): Handle qcs flags.
4056         (taas_command): New function.
4057         (tfaas_command): New function.
4058         (_initialize_thread): Update to setup the new commands 'taas
4059         and 'tfaas'. Change doc string for 'thread apply'.
4060
4061 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4062
4063         * stack.c: (trailing_outermost_frame): New function, mostly
4064         extracted from backtrace_command_1.
4065         (leading_innermost_frame): New function.
4066         (backtrace_command_1): Update to call trailing_outermost_frame.
4067         (frame_apply_command_count): New function.
4068         (frame_apply_level_command): New function.
4069         (frame_apply_all_command): New function.
4070         (frame_apply_command): New function.
4071         (faas_command): New function.
4072         (frame_cmd_list): New variable.
4073         (_initialize_stack): Update to setup the new commands 'frame apply'
4074         and 'faas'.
4075
4076 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4077
4078         * cli-utils.c (number_or_range_parser::get_number): Only handle
4079         numbers or convenience var as numbers.
4080         (parse_flags): New function.
4081         (parse_flags_qcs): New function.
4082         (number_or_range_parser::finished): Ensure parsing end is detected
4083         before end of string.
4084         * cli-utils.h (parse_flags): New function.
4085         (parse_flags_qcs): New function.
4086         (number_or_range_parser): Remove m_finished bool.
4087         (number_or_range_parser::skip_range): Set m_in_range to false.
4088
4089 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
4090
4091         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4092         on Windows.
4093
4094 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4095             Jan Kratochvil  <jan.kratochvil@redhat.com>
4096             Paul Fertser  <fercerpav@gmail.com>
4097             Tsutomu Seki  <sekiriki@gmail.com>
4098             Pedro Alves  <palves@redhat.com>
4099
4100         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4101         'unittests/parse-connection-spec-selftests.c'.
4102         (COMMON_SFILES): Add 'common/netstuff.c'.
4103         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4104         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4105         * common/netstuff.c: New file.
4106         * common/netstuff.h: New file.
4107         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4108         (wait_for_connect): Update comment.  New parameter
4109         'gdb::optional<int> sock' instead of 'struct serial *scb'.
4110         Use 'sock' directly instead of 'scb->fd'.
4111         (try_connect): New function, with code from 'net_open'.
4112         (net_open): Rewrite main loop to deal with multiple
4113         sockets/addresses.  Handle IPv6-style hostnames; implement
4114         support for IPv6 connections.
4115         * unittests/parse-connection-spec-selftests.c: New file.
4116
4117 2018-07-11  Pedro Alves  <palves@redhat.com>
4118
4119         PR gdb/23377
4120         * remote.c (remote_target::remote_detach_pid): Call
4121         set_current_process.
4122
4123 2018-07-11  Pedro Alves  <palves@redhat.com>
4124
4125         * h8300-tdep.c (h8300_gdbarch_init): Remove
4126         set_gdbarch_ecoff_reg_to_regnum calls.
4127
4128 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4129
4130         PR c++/23373
4131         * c-typeprint.c (c_type_print_base_struct_union): Don't print
4132         offsets/sizes for static members of a class/struct.
4133
4134 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
4135
4136         * target-descriptions.c (tdesc_register_bitsize): Rename.
4137         * target-descriptions.h (tdesc_register_bitsize): Likewise.
4138         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4139         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4140
4141 2018-07-10  Tom Tromey  <tom@tromey.com>
4142
4143         * breakpoint.c (moribund_locations): Now static and a
4144         std::vector.
4145         (breakpoint_init_inferior, moribund_breakpoint_here_p)
4146         (build_bpstat_chain, update_global_location_list)
4147         (breakpoint_retire_moribund): Update.
4148         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
4149         VEC.
4150
4151 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4152
4153         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4154         (riscv_register_reggroup_p): Use new function, remove unneeded
4155         parenthesis.
4156         (riscv_push_dummy_call): Extend assert to compare against xlen or
4157         flen based on register type.
4158
4159 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4160
4161         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4162
4163 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4164
4165         * remote.c (show_hardware_watchpoint_limit): New function.
4166         (show_hardware_watchpoint_length_limit): New function.
4167         (show_hardware_breakpoint_limit): New function.
4168         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4169         where appropriate, update help text.
4170
4171 2018-07-09  Tom Tromey  <tom@tromey.com>
4172
4173         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4174         (CLIBS): Don't mention NAT_CLIBS.
4175
4176 2018-07-09  Tom Tromey  <tom@tromey.com>
4177
4178         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4179         (LIBGDB_OBS, clean mostlyclean): Update.
4180         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4181
4182 2018-07-09  Tom Tromey  <tom@tromey.com>
4183
4184         * Makefile.in (%.c: %.y): Use ECHO_YACC.
4185         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
4186         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4187
4188 2018-07-09  Tom Tromey  <tom@tromey.com>
4189
4190         * Makefile.in (ALLDEPFILES): Remove exec.c.
4191         (COMMON_OBS): Remove exec.o.
4192         (COMMON_SFILES): Add exec.c.
4193
4194 2018-07-09  Tom Tromey  <tom@tromey.com>
4195
4196         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4197
4198 2018-07-09  Tom Tromey  <tom@tromey.com>
4199
4200         * Makefile.in (clean mostlyclean): Remove stamp-version.
4201         (version.c): Depend on stamp-version.
4202         (stamp-version): New rule, from version.c rule.
4203
4204 2018-07-09  Tom Tromey  <tom@tromey.com>
4205
4206         * Makefile.in (init.c): Depend on stamp-init.
4207         (stamp-init): New rule, from init.c rule.
4208         (clean mostlyclean): Remove stamp-init.
4209
4210 2018-07-09  Tom Tromey  <tom@tromey.com>
4211
4212         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4213         SUBDIR_GCC_COMPILE_SRCS.
4214
4215 2018-07-09  Tom Tromey  <tom@tromey.com>
4216
4217         * Makefile.in (init.c): Remove some unused sed rules.
4218
4219 2018-07-09  Tom Tromey  <tom@tromey.com>
4220
4221         * Makefile.in (TSOBS): Remove.
4222         (INIT_FILES): Update.
4223         (LIBGDB_OBS): Update.
4224         (COMMON_SFILES): Add inflow.c.
4225         (SFILES): Remove inflow.c.
4226
4227 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
4228
4229         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4230
4231 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
4232
4233         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4234         get_saveloc_name, is_signal_frame_name, step_name,
4235         init_remote_name, create_addr_space_name,
4236         destroy_addr_space_name, search_unwind_table_name,
4237         find_dyn_list_name): Constify.
4238
4239 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
4240
4241         * darwin-nat.c (darwin_pthread_kill): New function.
4242         (darwin_resume_thread): Use darwin_pthread_kill.
4243
4244 2018-07-05  Tom de Vries  <tdevries@suse.de>
4245
4246         * macroexp.c (macro_buffer) <operator=>: New member function.
4247
4248 2018-07-04  Tom Tromey  <tom@tromey.com>
4249
4250         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4251
4252 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
4253
4254         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4255         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4256         * maint.c: Likewise.
4257         * top.c: Likewise.
4258
4259 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4260
4261         * NEWS: Create a new section for the next release branch.
4262         Rename the section of the current branch, now that it has
4263         been cut.
4264
4265 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4266
4267         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4268         * version.in: Bump version to 8.2.50.DATE-git.
4269
4270 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
4271             Pedro Alves  <palves@redhat.com>
4272
4273         * linux-nat.c (linux_init_ptrace): Rename to ...
4274         (linux_init_ptrace_procfs): ... this.  Call
4275         linux_proc_init_warnings.
4276         (linux_nat_target::post_attach)
4277         (linux_nat_target::post_startup_inferior): Adjust.
4278         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4279         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4280
4281 2018-07-04  Tom de Vries  <tdevries@suse.de>
4282
4283         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4284         check ...
4285         (read_comp_unit_head): ... here.
4286
4287 2018-07-03  Tom Tromey  <tom@tromey.com>
4288
4289         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4290         (stop_tracing, tstatus_command)
4291         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4292         (print_one_static_tracepoint_marker): Update.
4293         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4294         std::vector.
4295         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
4296         VEC.
4297         (all_tracepoints, static_tracepoints_here): Return std::vector.
4298
4299 2018-07-03  Tom Tromey  <tom@tromey.com>
4300
4301         * common/ptid.c (ptid_equal): Remove.
4302         * common/ptid.h (ptid_equal): Don't declare.
4303         * ada-tasks.c: Update.
4304         * breakpoint.c: Update.
4305         * common/agent.c: Update.
4306         * corelow.c: Update.
4307         * darwin-nat-info.c: Update.
4308         * darwin-nat.c: Update.
4309         * dcache.c: Update.
4310         * dtrace-probe.c: Update.
4311         * dummy-frame.c: Update.
4312         * fbsd-nat.c: Update.
4313         * frame.c: Update.
4314         * gdbthread.h: Update.
4315         * gnu-nat.c: Update.
4316         * go32-nat.c: Update.
4317         * inf-loop.c: Update.
4318         * inf-ptrace.c: Update.
4319         * infcall.c: Update.
4320         * infcmd.c: Update.
4321         * inflow.c: Update.
4322         * infrun.c: Update.
4323         * linux-fork.c: Update.
4324         * linux-nat.c: Update.
4325         * linux-thread-db.c: Update.
4326         * mi/mi-cmd-var.c: Update.
4327         * mi/mi-interp.c: Update.
4328         * mi/mi-main.c: Update.
4329         * nto-procfs.c: Update.
4330         * ppc-linux-tdep.c: Update.
4331         * procfs.c: Update.
4332         * python/py-inferior.c: Update.
4333         * python/py-record-btrace.c: Update.
4334         * python/py-record.c: Update.
4335         * ravenscar-thread.c: Update.
4336         * regcache.c: Update.
4337         * remote-sim.c: Update.
4338         * remote.c: Update.
4339         * sol-thread.c: Update.
4340         * solib.c: Update.
4341         * target.c: Update.
4342         * tui/tui-stack.c: Update.
4343         * varobj.c: Update.
4344         * windows-nat.c: Update.
4345         * windows-tdep.c: Update.
4346
4347 2018-07-03  Tom Tromey  <tom@tromey.com>
4348
4349         * common/ptid.c (ptid_match): Remove.
4350         * common/ptid.h (ptid_match): Don't declare.
4351         * fbsd-nat.c: Update.
4352         * infcmd.c: Update.
4353         * infrun.c: Update.
4354         * linux-nat.c: Update.
4355         * record-btrace.c: Update.
4356         * regcache.c: Update.
4357         * remote.c: Update.
4358
4359 2018-07-03  Tom Tromey  <tom@tromey.com>
4360
4361         * common/ptid.c (ptid_tid_p): Remove.
4362         * common/ptid.h (ptid_tid_p): Don't declare.
4363         * sol-thread.c: Update.
4364
4365 2018-07-03  Tom Tromey  <tom@tromey.com>
4366
4367         * common/ptid.c (ptid_lwp_p): Remove.
4368         * common/ptid.h (ptid_lwp_p): Don't declare.
4369         * fbsd-nat.c: Update.
4370         * linux-nat.c: Update.
4371         * nat/linux-procfs.c: Update.
4372         * nat/x86-linux-dregs.c: Update.
4373         * sol-thread.c: Update.
4374
4375 2018-07-03  Tom Tromey  <tom@tromey.com>
4376
4377         * common/ptid.c (ptid_is_pid): Remove.
4378         * common/ptid.h (ptid_is_pid): Don't declare.
4379         * infrun.c: Update.
4380         * linux-nat.c: Update.
4381         * mi/mi-interp.c: Update.
4382         * remote.c: Update.
4383         * thread.c: Update.
4384
4385 2018-07-03  Tom Tromey  <tom@tromey.com>
4386
4387         * common/ptid.c (ptid_get_tid): Remove.
4388         * common/ptid.h (ptid_get_tid): Don't declare.
4389         * ada-tasks.c: Update.
4390         * aix-thread.c: Update.
4391         * bsd-uthread.c: Update.
4392         * darwin-nat.c: Update.
4393         * fbsd-nat.c: Update.
4394         * i386-darwin-nat.c: Update.
4395         * infrun.c: Update.
4396         * linux-tdep.c: Update.
4397         * nto-procfs.c: Update.
4398         * ppc-ravenscar-thread.c: Update.
4399         * python/py-infthread.c: Update.
4400         * ravenscar-thread.c: Update.
4401         * sol-thread.c: Update.
4402         * sparc-ravenscar-thread.c: Update.
4403         * windows-nat.c: Update.
4404
4405 2018-07-03  Tom Tromey  <tom@tromey.com>
4406
4407         * common/ptid.c (ptid_get_lwp): Remove.
4408         * common/ptid.h (ptid_get_lwp): Don't declare.
4409         * aarch64-linux-nat.c: Update.
4410         * ada-tasks.c: Update.
4411         * aix-thread.c: Update.
4412         * amd64-linux-nat.c: Update.
4413         * arm-linux-nat.c: Update.
4414         * corelow.c: Update.
4415         * fbsd-nat.c: Update.
4416         * fbsd-tdep.c: Update.
4417         * gnu-nat.c: Update.
4418         * i386-cygwin-tdep.c: Update.
4419         * i386-gnu-nat.c: Update.
4420         * i386-linux-nat.c: Update.
4421         * ia64-linux-nat.c: Update.
4422         * inf-ptrace.c: Update.
4423         * infrun.c: Update.
4424         * linux-fork.c: Update.
4425         * linux-nat.c: Update.
4426         * linux-tdep.c: Update.
4427         * linux-thread-db.c: Update.
4428         * mips-linux-nat.c: Update.
4429         * nat/aarch64-linux-hw-point.c: Update.
4430         * nat/aarch64-linux.c: Update.
4431         * nat/linux-btrace.c: Update.
4432         * nat/linux-osdata.c: Update.
4433         * nat/linux-procfs.c: Update.
4434         * nat/x86-linux-dregs.c: Update.
4435         * obsd-nat.c: Update.
4436         * ppc-fbsd-nat.c: Update.
4437         * ppc-linux-nat.c: Update.
4438         * procfs.c: Update.
4439         * python/py-infthread.c: Update.
4440         * ravenscar-thread.c: Update.
4441         * remote.c: Update.
4442         * s390-linux-nat.c: Update.
4443         * sol-thread.c: Update.
4444         * sol2-tdep.c: Update.
4445         * spu-linux-nat.c: Update.
4446         * x86-linux-nat.c: Update.
4447         * xtensa-linux-nat.c: Update.
4448
4449 2018-07-03  Tom Tromey  <tom@tromey.com>
4450
4451         * common/ptid.c (ptid_get_pid): Remove.
4452         * common/ptid.h (ptid_get_pid): Don't declare.
4453         * aarch64-linux-nat.c: Update.
4454         * ada-lang.c: Update.
4455         * aix-thread.c: Update.
4456         * alpha-bsd-nat.c: Update.
4457         * amd64-fbsd-nat.c: Update.
4458         * amd64-linux-nat.c: Update.
4459         * arm-linux-nat.c: Update.
4460         * arm-nbsd-nat.c: Update.
4461         * auxv.c: Update.
4462         * break-catch-syscall.c: Update.
4463         * breakpoint.c: Update.
4464         * bsd-uthread.c: Update.
4465         * corelow.c: Update.
4466         * ctf.c: Update.
4467         * darwin-nat.c: Update.
4468         * fbsd-nat.c: Update.
4469         * fbsd-tdep.c: Update.
4470         * gcore.c: Update.
4471         * gnu-nat.c: Update.
4472         * hppa-nbsd-nat.c: Update.
4473         * hppa-obsd-nat.c: Update.
4474         * i386-fbsd-nat.c: Update.
4475         * ia64-linux-nat.c: Update.
4476         * inf-ptrace.c: Update.
4477         * infcmd.c: Update.
4478         * inferior.c: Update.
4479         * inferior.h: Update.
4480         * inflow.c: Update.
4481         * infrun.c: Update.
4482         * linux-fork.c: Update.
4483         * linux-nat.c: Update.
4484         * linux-tdep.c: Update.
4485         * linux-thread-db.c: Update.
4486         * m68k-bsd-nat.c: Update.
4487         * mi/mi-interp.c: Update.
4488         * mi/mi-main.c: Update.
4489         * mips-linux-nat.c: Update.
4490         * mips-nbsd-nat.c: Update.
4491         * mips64-obsd-nat.c: Update.
4492         * nat/aarch64-linux-hw-point.c: Update.
4493         * nat/aarch64-linux.c: Update.
4494         * nat/linux-btrace.c: Update.
4495         * nat/linux-osdata.c: Update.
4496         * nat/linux-procfs.c: Update.
4497         * nat/x86-linux-dregs.c: Update.
4498         * nto-procfs.c: Update.
4499         * obsd-nat.c: Update.
4500         * ppc-linux-nat.c: Update.
4501         * ppc-nbsd-nat.c: Update.
4502         * ppc-obsd-nat.c: Update.
4503         * proc-service.c: Update.
4504         * procfs.c: Update.
4505         * python/py-inferior.c: Update.
4506         * python/py-infthread.c: Update.
4507         * ravenscar-thread.c: Update.
4508         * record.c: Update.
4509         * remote-sim.c: Update.
4510         * remote.c: Update.
4511         * rs6000-nat.c: Update.
4512         * s390-linux-nat.c: Update.
4513         * sh-nbsd-nat.c: Update.
4514         * sol-thread.c: Update.
4515         * sparc-nat.c: Update.
4516         * sparc64-tdep.c: Update.
4517         * spu-linux-nat.c: Update.
4518         * spu-tdep.c: Update.
4519         * target-debug.h: Update.
4520         * target.c: Update.
4521         * thread.c: Update.
4522         * tid-parse.c: Update.
4523         * tracefile-tfile.c: Update.
4524         * vax-bsd-nat.c: Update.
4525         * windows-nat.c: Update.
4526         * x86-linux-nat.c: Update.
4527         * x86-nat.c: Update.
4528
4529 2018-07-03  Tom Tromey  <tom@tromey.com>
4530
4531         * common/ptid.c (pid_to_ptid): Remove.
4532         * common/ptid.h (pid_to_ptid): Don't declare.
4533         * aix-thread.c: Update.
4534         * arm-linux-nat.c: Update.
4535         * common/ptid.c: Update.
4536         * common/ptid.h: Update.
4537         * corelow.c: Update.
4538         * ctf.c: Update.
4539         * darwin-nat.c: Update.
4540         * fbsd-nat.c: Update.
4541         * fork-child.c: Update.
4542         * gnu-nat.c: Update.
4543         * go32-nat.c: Update.
4544         * inf-ptrace.c: Update.
4545         * infcmd.c: Update.
4546         * inferior.c: Update.
4547         * infrun.c: Update.
4548         * linux-fork.c: Update.
4549         * linux-nat.c: Update.
4550         * nat/aarch64-linux-hw-point.c: Update.
4551         * nat/fork-inferior.c: Update.
4552         * nat/x86-linux-dregs.c: Update.
4553         * nto-procfs.c: Update.
4554         * obsd-nat.c: Update.
4555         * procfs.c: Update.
4556         * progspace.c: Update.
4557         * remote.c: Update.
4558         * rs6000-nat.c: Update.
4559         * s390-linux-nat.c: Update.
4560         * sol-thread.c: Update.
4561         * spu-linux-nat.c: Update.
4562         * target.c: Update.
4563         * top.c: Update.
4564         * tracefile-tfile.c: Update.
4565         * windows-nat.c: Update.
4566
4567 2018-07-03  Tom Tromey  <tom@tromey.com>
4568
4569         * common/ptid.h (ptid_build): Don't declare.
4570         * common/ptid.c (ptid_build): Remove.
4571         * aix-thread.c: Update.
4572         * bsd-kvm.c: Update.
4573         * bsd-uthread.c: Update.
4574         * common/agent.c: Update.
4575         * common/ptid.c: Update.
4576         * common/ptid.h: Update.
4577         * corelow.c: Update.
4578         * darwin-nat.c: Update.
4579         * fbsd-nat.c: Update.
4580         * gnu-nat.c: Update.
4581         * linux-fork.c: Update.
4582         * linux-nat.c: Update.
4583         * linux-thread-db.c: Update.
4584         * nat/linux-osdata.c: Update.
4585         * nat/linux-procfs.c: Update.
4586         * nto-procfs.c: Update.
4587         * obsd-nat.c: Update.
4588         * proc-service.c: Update.
4589         * procfs.c: Update.
4590         * ravenscar-thread.c: Update.
4591         * remote-sim.c: Update.
4592         * remote.c: Update.
4593         * sol-thread.c: Update.
4594         * target.c: Update.
4595         * windows-nat.c: Update.
4596
4597 2018-07-03  Tom Tromey  <tom@tromey.com>
4598
4599         * infrun.c (follow_exec): Use exit_inferior_silent.
4600         * inferior.c (exit_inferior_num_silent): Remove.
4601         * inferior.h (exit_inferior_num_silent): Don't declare.
4602
4603 2018-07-03  Tom Tromey  <tom@tromey.com>
4604
4605         PR cli/23340:
4606         * darwin-nat.c (darwin_attach_pid): Reset inferior and
4607         inferior_ptid on error.
4608
4609 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
4610             Simon Marchi  <simon.marchi@polymtl.ca>
4611
4612         PR tdep/8282
4613         * disasm.h (gdb_disassembler): Add
4614         `m_disassembler_options_holder'. member
4615         * disasm.c (get_all_disassembler_options): New function.
4616         (gdb_disassembler::gdb_disassembler): Use it.
4617         (gdb_buffered_insn_length_init_dis): Likewise.
4618         (gdb_buffered_insn_length): Adjust accordingly.
4619         (set_disassembler_options): Handle options with arguments.
4620         (show_disassembler_options_sfunc): Likewise.  Add a leading new
4621         line if showing options with descriptions.
4622         (disassembler_options_completer): Adapt to using the
4623         `disasm_options_and_args_t' structure.
4624         * mips-tdep.c (mips_disassembler_options): New variable.
4625         (mips_disassembler_options_o32): Likewise.
4626         (mips_disassembler_options_n32): Likewise.
4627         (mips_disassembler_options_n64): Likewise.
4628         (gdb_print_insn_mips): Don't set `disassembler_options'.
4629         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4630         functions.
4631         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4632         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
4633         `gdbarch_disassembler_options_implicit' and
4634         `gdbarch_valid_disassembler_options'.
4635         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4636         `disasm_options_and_args_t' structure.
4637         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4638         method.
4639         (valid_disassembler_options): Switch from `disasm_options_t' to
4640         the `disasm_options_and_args_t' structure.
4641         * NEWS: Document `set disassembler-options' support for the MIPS
4642         target.
4643         * gdbarch.h: Regenerate.
4644         * gdbarch.c: Regenerate.
4645
4646 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4647
4648         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4649
4650 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
4651
4652         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4653         parameter in call to amd64_target_description.
4654         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4655         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4656         (amd64fbsd_init_abi): Likewise.
4657         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4658         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4659         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4660         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4661
4662 2018-06-29  Pedro Alves  <palves@redhat.com>
4663
4664         * gdb/amd64-tdep.h (amd64_create_target_description): Add
4665         "segments" parameter.
4666         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4667         (_initialize_amd64_tdep): Update call to
4668         amd64_create_target_description.
4669         (amd64_target_description): Add "segments" parameter.  Adjust
4670         the implementation to use it.
4671         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4672         call to amd64_create_target_description.
4673         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4674         * gdb/arch/amd64.h (amd64_create_target_description): Add
4675         "segments" register.
4676         * gdb/arch/amd64.c (amd64_create_target_description): Add
4677         "segments" parameter.  Call create_feature_i386_64bit_segments
4678         only if SEGMENTS is true.
4679         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4680         call to amd64_create_target_description.
4681
4682 2018-06-29  Pedro Alves  <palves@redhat.com>
4683
4684         * thread.c (thread_target_id_str): New, factored out from ...
4685         (print_thread_info_1): ... here.  Use it to compute the max
4686         "Target Id" column width.
4687
4688 2018-06-29  Pedro Alves  <palves@redhat.com>
4689
4690         * remote.c (remote_target::extra_thread_info): Delete
4691         'display_buf' and 'n' locals.  from the cache, regardless of
4692         packet mechanims is in use.  Use cache for qThreadExtra and qP
4693         methods too.
4694
4695 2018-06-29  Pedro Alves  <palves@redhat.com>
4696
4697         * blockframe.c (find_pc_sect_containing_function): New function.
4698         * breakpoint.c (print_breakpoint_location): Don't call
4699         find_pc_sect_function.
4700         * linespec.c (create_sals_line_offset): Record the location's
4701         symbol in the sal.
4702         * linespec.c (convert_address_location_to_sals): Fill in sal's
4703         symbol with find_pc_sect_containing_function.
4704         * symtab.c (find_function_start_sal): Rename to ...
4705         (find_function_start_sal_1): ... this.
4706         (find_function_start_sal): Reimplement as wrapper around
4707         find_function_start_sal_1, and use
4708         find_pc_sect_containing_function to fill in the sal's symbol.
4709         (find_function_start_sal(symbol*, bool)): Adjust.
4710         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4711         comments.
4712         (find_pc_sect_containing_function): Declare.
4713
4714 2018-06-29  Pedro Alves  <palves@redhat.com>
4715
4716         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4717         true if the the location has no symbol.
4718
4719 2018-06-28  Tom Tromey  <tom@tromey.com>
4720
4721         * NEWS: Mention --enable-codesign.
4722         * silent-rules.mk (ECHO_SIGN): New variable.
4723         * configure.ac: Add --enable-codesign.
4724         * configure: Rebuild.
4725         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4726         (gdb$(EXEEXT)): Optionally invoke codesign.
4727
4728 2018-06-28  Pedro Alves  <palves@redhat.com>
4729
4730         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4731         comments.
4732         (switch_to_thread_no_regs): Adjust comment.
4733         * infcmd.c (stop_pc): Delete.
4734         (post_create_inferior, info_program_command): Replace references
4735         to stop_pc with references to thread_info->suspend.stop_pc.
4736         * inferior.h (stop_pc): Delete declaration.
4737         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4738         (handle_inferior_event_1, handle_signal_stop)
4739         (process_event_stop_test, keep_going_stepped_thread)
4740         (handle_step_into_function, handle_step_into_function_backward)
4741         (print_stop_location): Replace references to stop_pc with
4742         references to thread_info->suspend.stop_pc.
4743         (struct infcall_suspend_state) <stop_pc>: Delete field.
4744         (save_infcall_suspend_state, restore_infcall_suspend_state):
4745         Remove references to inf_stat->stop_pc.
4746         * linux-fork.c (fork_load_infrun_state): Likewise.
4747         * record-btrace.c (record_btrace_set_replay): Likewise.
4748         * record-full.c (record_full_goto_entry): Likewise.
4749         * remote.c (print_one_stopped_thread): Likewise.
4750         * target.c (target_resume): Extend comment.
4751         * thread.c (set_executing_thread): New.
4752         (set_executing): Use it.
4753         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4754         Remove references to stop_pc.
4755
4756 2018-06-28  Pedro Alves  <palves@redhat.com>
4757
4758         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4759         Moving fetching stop_pc until after ecs->event_thread is refreshed.
4760
4761 2018-06-28  Tom Tromey  <tom@tromey.com>
4762
4763         * coffread.c (coff_symfile_finish): Update.
4764         * xcoffread.c (xcoff_symfile_finish): Update.
4765         * elfread.c (elf_symfile_finish): Update.
4766         * symfile.h (dwarf2_free_objfile): Don't declare.
4767         * dwarf2read.c (_initialize_dwarf2_read): Use
4768         register_objfile_data_with_cleanup.
4769         (dwarf2_free_objfile): Now static.  Change signature.
4770
4771 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4772
4773         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4774         option "-o" to add-symbol-file-load to add an offset to each
4775         section's load address.
4776         * symfile.c (set_objfile_default_section_offset): New function.
4777
4778 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4779
4780         * symfile.c (add_symbol_file_command): Make sure that sections
4781         with the same name are sorted in the same order.
4782
4783 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4784
4785         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4786         require the second argument.  If omitted, load sections at the
4787         addresses specified in the file.
4788
4789 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4790
4791         * symfile.c (symbol_file_command, symbol_file_add_main_1)
4792         (_initialize_symfile): Add option "-o" to symbol-file to add an
4793         offset to each section of the symbol file.
4794
4795 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4796
4797         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4798
4799 2018-06-27  Tom Tromey  <tom@tromey.com>
4800
4801         * stack.c (_initialize_stack): Update "func" help text.
4802
4803 2018-06-27  Tom Tromey  <tom@tromey.com>
4804
4805         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4806         std::vector.
4807         (unwind_infopy_str, pyuw_create_unwind_info)
4808         (unwind_infopy_add_saved_register, pyuw_sniffer)
4809         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4810         Update.
4811         (struct saved_reg): Add constructor.
4812         <value>: Now a gdbpy_ref<>.
4813
4814 2018-06-27  Tom Tromey  <tom@tromey.com>
4815
4816         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4817
4818 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4819
4820         * gdb-gdb.py.in: Format using autopep8.
4821
4822 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4823
4824         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4825         (type_lookup_function): Recognize CORE_ADDR values.
4826
4827 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4828
4829         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4830         print tag_name.
4831
4832 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4833
4834         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4835         <__lt__>: Add.
4836
4837 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4838
4839         * gdb-gdb.py: Move to...
4840         * gdb-gdb.py.in: ... here.
4841         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4842         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4843         dependencies.
4844         (distclean): Remove gdb-gdb.py when cleaning.
4845         (gdb-gdb.py, gdb-gdb.gdb): New rules.
4846         * configure: Re-generate.
4847
4848 2018-06-27  Pedro Alves  <palves@redhat.com>
4849
4850         * proc-service.c (get_ps_regcache): New.
4851         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4852         (ps_lsetfpregs): Use it.
4853
4854 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
4855
4856         PR gdb/21695
4857         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4858         (dwarf_decode_lines_1): Adjust.
4859
4860 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4861
4862         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4863         override.
4864         <info_proc>: Likewise.
4865
4866 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
4867
4868         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4869         to windows_fetch_one_register, and only handle the case of
4870         fetching one register.  Move the code that reloads the context
4871         and iterates over all registers if R is negative to...
4872         (windows_nat_target::fetch_registers): ... here.
4873         (do_windows_store_inferior_registers): Rename to
4874         windows_store_one_register, and only handle the case of storing
4875         one register.  Move the code that handles the case where r is
4876         negative to...
4877         (windows_nat_target::store_registers) ... here.
4878
4879 2018-06-26  Tom Tromey  <tom@tromey.com>
4880
4881         PR rust/22574:
4882         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4883         * rust-lang.c (rust_print_struct_def): Add podata parameter.
4884         Update.
4885         (rust_internal_print_type): Add podata parameter.
4886         (rust_print_type): Update.
4887
4888 2018-06-26  Tom Tromey  <tom@tromey.com>
4889
4890         * typeprint.h (struct print_offset_data) <update, finish,
4891         maybe_print_hole>: New methods.
4892         <indentation>: New constant.
4893         * typeprint.c (print_offset_data::indentation): Define.
4894         (print_offset_data::maybe_print_hole, print_offset_data::update)
4895         (print_offset_data::finish): Move from c-typeprint.c and rename.
4896         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4897         (print_spaces_filtered_with_print_options): Update.
4898         (c_print_type_union_field_offset, maybe_print_hole)
4899         (c_print_type_struct_field_offset): Move to typeprint.c and
4900         rename.
4901         (c_type_print_base_struct_union): Update.
4902
4903 2018-06-25  Pedro Alves  <palves@redhat.com>
4904
4905         * gdbthread.h (thread_info_ref, delete_thread)
4906         (delete_thread_silent, first_thread_of_inferior)
4907         (any_thread_of_inferior, switch_to_thread)
4908         (enable_thread_stack_temporaries)
4909         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4910         (get_last_thread_stack_temporary)
4911         (value_in_thread_stack_temporaries, can_access_registers_thread):
4912         Spell out "struct thread_info" instead of just "thread_info".
4913         * inferior.h (notice_new_inferior): Likewise.
4914
4915 2018-06-25  Pedro Alves  <palves@redhat.com>
4916
4917         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4918         pass thread_info pointer to delete_thread.
4919         (windows_nat_target::detach): Pass inferior pointer to
4920         detach_inferior.
4921         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4922         delete_thread.
4923         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4924         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4925         and pass a thread_info pointer to delete_thread.
4926         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4927         pass thread_info pointer to delete_thread.
4928         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4929         delete_thread_silent call.
4930         * procfs.c (procfs_target::detach): Pass inferior pointer to
4931         detach_inferior.
4932         (procfs_target::wait): Pass thread_info pointer to delete_thread.
4933         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4934         delete_thread_silent call.
4935         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4936         pass thread_info pointer to delete_thread.
4937         (windows_nat_target::detach): Pass inferior pointer to
4938         delete_inferior.
4939
4940 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4941
4942         * regcache.c (readable_regcache::read_part): Fix asserts.
4943         (reg_buffer::raw_collect_part): New function.
4944         (regcache::write_part): Fix asserts.
4945         (reg_buffer::raw_supply_part): New function.
4946         (regcache::transfer_regset_register): New helper function.
4947         (regcache::transfer_regset): Call new functions.
4948         (regcache_supply_regset): Use gdb_byte*.
4949         (regcache::supply_regset): Likewise.
4950         (regcache_collect_regset): Likewise.
4951         (regcache::collect_regset): Likewise.
4952         * regcache.h (reg_buffer::raw_collect_part): New declaration.
4953         (reg_buffer::raw_supply_part): Likewise.
4954         (regcache::transfer_regset_register): Likewise.
4955         (regcache::transfer_regset): Use gdb_byte*.
4956
4957 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4958
4959         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
4960
4961 2018-06-21  Pedro Alves  <palves@redhat.com>
4962
4963         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
4964         instead of a ptid_t.  All callers adjusted.
4965         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
4966         adjusted.
4967         (print_ada_task_info, display_current_task_id, task_command_1):
4968         Adjust.
4969         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
4970         inferior_thread.
4971         (breakpoint_kind): Adjust.
4972         (remove_breakpoints_pid): Rename to ...
4973         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
4974         pointer.  All callers adjusted.
4975         (bpstat_clear_actions): Use inferior_thread.
4976         (get_bpstat_thread): New.
4977         (bpstat_do_actions): Use it.
4978         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
4979         to take a thread_info pointer.  All callers adjusted.
4980         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
4981         (breakpoint_re_set_thread): Use inferior_thread.
4982         * breakpoint.h (struct inferior): Forward declare.
4983         (bpstat_stop_status): Update.
4984         (remove_breakpoints_pid): Delete.
4985         (remove_breakpoints_inf): New.
4986         * bsd-uthread.c (bsd_uthread_target::wait)
4987         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
4988         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
4989         (maint_btrace_packet_history_cmd)
4990         (maint_btrace_clear_packet_history_cmd): Adjust.
4991         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
4992         inferior_thread.
4993         * cli/cli-interp.c: Include "inferior.h".
4994         * common/refcounted-object.h (struct
4995         refcounted_object_ref_policy): New.
4996         * compile/compile-object-load.c: Include gdbthread.h.
4997         (store_regs): Use inferior_thread.
4998         * corelow.c (core_target::close): Use current_inferior.
4999         (core_target_open): Adjust to use first_thread_of_inferior and use
5000         the current inferior.
5001         * ctf.c (ctf_target::close): Adjust to use current_inferior.
5002         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5003         <thread>: ... this new field.  All references adjusted.
5004         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5005         Take a thread_info pointer instead of a ptid_t.
5006         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5007         (dummy_frame_discard, register_dummy_frame_dtor): Take a
5008         thread_info pointer instead of a ptid_t.
5009         * elfread.c: Include "inferior.h".
5010         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5011         Use inferior_thread.
5012         * eval.c (evaluate_subexp): Likewise.
5013         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5014         inferior_thread.
5015         * gdb_proc_service.h (struct thread_info): Forward declare.
5016         (struct ps_prochandle) <ptid>: Delete, replaced by ...
5017         <thread>: ... this new field.  All references adjusted.
5018         * gdbarch.h, gdbarch.c: Regenerate.
5019         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5020         'thread' parameter.  All implementations and callers adjusted.
5021         * gdbthread.h (thread_info) <set_running>: New method.
5022         (delete_thread, delete_thread_silent): Take a thread_info pointer
5023         instead of a ptid.
5024         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5025         (first_thread_of_process): Delete, replaced by ...
5026         (first_thread_of_inferior): ... this new function.  All callers
5027         adjusted.
5028         (any_live_thread_of_process): Delete, replaced by ...
5029         (any_live_thread_of_inferior): ... this new function.  All callers
5030         adjusted.
5031         (switch_to_thread, switch_to_no_thread): Declare.
5032         (is_executing): Delete.
5033         (enable_thread_stack_temporaries): Update comment.
5034         <enable_thread_stack_temporaries>: Take a thread_info pointer
5035         instead of a ptid_t.  Incref the thread.
5036         <~enable_thread_stack_temporaries>: Decref the thread.
5037         <m_ptid>: Delete
5038         <m_thr>: New.
5039         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5040         (get_last_thread_stack_temporary)
5041         (value_in_thread_stack_temporaries, can_access_registers_thread):
5042         Take a thread_info pointer instead of a ptid_t.  All callers
5043         adjusted.
5044         * infcall.c (get_call_return_value): Use inferior_thread.
5045         (run_inferior_call): Work with thread pointers instead of ptid_t.
5046         (call_function_by_hand_dummy): Work with thread pointers instead
5047         of ptid_t.  Use thread_info_ref.
5048         * infcmd.c (proceed_thread_callback): Access thread's state
5049         directly.
5050         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5051         access thread's state directly.
5052         (continue_command): Use inferior_thread.
5053         (info_program_command): Use find_thread_ptid and access thread
5054         state directly.
5055         (proceed_after_attach_callback): Use thread state directly.
5056         (notice_new_inferior): Take a thread_info pointer instead of a
5057         ptid_t.  All callers adjusted.
5058         (exit_inferior): Take an inferior pointer instead of a pid.  All
5059         callers adjusted.
5060         (exit_inferior_silent): New.
5061         (detach_inferior): Delete.
5062         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5063         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5064         (detach_inferior_command, kill_inferior_command): Use
5065         find_inferior_id instead of valid_gdb_inferior_id and
5066         gdb_inferior_id_to_pid.
5067         (inferior_command): Use inferior and thread pointers.
5068         * inferior.h (struct thread_info): Forward declare.
5069         (notice_new_inferior): Take a thread_info pointer instead of a
5070         ptid_t.  All callers adjusted.
5071         (detach_inferior): Delete declaration.
5072         (exit_inferior, exit_inferior_silent): Take an inferior pointer
5073         instead of a pid.  All callers adjusted.
5074         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5075         (valid_gdb_inferior_id): Delete.
5076         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5077         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5078         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5079         ...
5080         <inf>: ... this new field.
5081         <step_ptid>: Delete, replaced by ...
5082         <step_thread>: ... this new field.
5083         (get_displaced_stepping_state): Take an inferior pointer instead
5084         of a pid.  All callers adjusted.
5085         (displaced_step_in_progress_any_inferior): Adjust.
5086         (displaced_step_in_progress_thread): Take a thread pointer instead
5087         of a ptid_t.  All callers adjusted.
5088         (displaced_step_in_progress, add_displaced_stepping_state): Take
5089         an inferior pointer instead of a pid.  All callers adjusted.
5090         (get_displaced_step_closure_by_addr): Adjust.
5091         (remove_displaced_stepping_state): Take an inferior pointer
5092         instead of a pid.  All callers adjusted.
5093         (displaced_step_prepare_throw, displaced_step_prepare)
5094         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5095         All callers adjusted.
5096         (start_step_over): Adjust.
5097         (infrun_thread_ptid_changed): Remove bit updating ptids in the
5098         displaced step queue.
5099         (do_target_resume): Adjust.
5100         (fetch_inferior_event): Use inferior_thread.
5101         (context_switch, get_inferior_stop_soon): Take an
5102         execution_control_state pointer instead of a ptid_t.  All callers
5103         adjusted.
5104         (switch_to_thread_cleanup): Delete.
5105         (stop_all_threads): Use scoped_restore_current_thread.
5106         * inline-frame.c: Include "gdbthread.h".
5107         (inline_state) <inline_state>: Take a thread pointer instead of a
5108         ptid_t.  All callers adjusted.
5109         <ptid>: Delete, replaced by ...
5110         <thread>: ... this new field.
5111         (find_inline_frame_state): Take a thread pointer instead of a
5112         ptid_t.  All callers adjusted.
5113         (skip_inline_frames, step_into_inline_frame)
5114         (inline_skipped_frames, inline_skipped_symbol): Take a thread
5115         pointer instead of a ptid_t.  All callers adjusted.
5116         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5117         (inline_skipped_frames, inline_skipped_symbol): Likewise.
5118         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5119         pointers directly.
5120         * linux-nat.c (get_detach_signal): Likewise.
5121         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5122         (thread_db_notice_clone): Adjust.
5123         (thread_db_find_new_threads_silently)
5124         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5125         a thread pointer instead of a ptid_t.  All callers adjusted.
5126         * mi/mi-cmd-var.c: Include "inferior.h".
5127         (mi_cmd_var_update_iter): Update to use thread pointers.
5128         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5129         inferior directly.
5130         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5131         out to ...
5132         (mi_output_running): ... this new function.
5133         (mi_on_resume_1): Adjust to use it.
5134         (mi_user_selected_context_changed): Adjust to use inferior_thread.
5135         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5136         directly.
5137         (interrupt_thread_callback): : Adjust to use thread and inferior
5138         pointers.
5139         * proc-service.c: Include "gdbthread.h".
5140         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5141         * progspace-and-thread.c: Include "inferior.h".
5142         * progspace.c: Include "inferior.h".
5143         * python/py-exitedevent.c (create_exited_event_object): Adjust to
5144         hold a reference to an inferior_object.
5145         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5146         inferior_thread.
5147         * python/py-inferior.c (struct inferior_object): Give the type a
5148         tag name instead of a typedef.
5149         (python_on_normal_stop): No need to check if the current thread is
5150         listed.
5151         (inferior_to_inferior_object): Change return type to
5152         inferior_object.  All callers adjusted.
5153         (find_thread_object): Delete, bits factored out to ...
5154         (thread_to_thread_object): ... this new function.
5155         * python/py-infthread.c (create_thread_object): Use
5156         inferior_to_inferior_object.
5157         (thpy_is_stopped): Use thread pointer directly.
5158         (gdbpy_selected_thread): Use inferior_thread.
5159         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5160         field, replaced with ...
5161         <thread>: ... this new field.  All users adjusted.
5162         (btpy_insn_or_gap_new): Drop const.
5163         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
5164         callers adjusted.
5165         * python/py-record.c: Include "gdbthread.h".
5166         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5167         a ptid_t.  All callers adjusted.
5168         (gdbpy_current_recording): Use inferior_thread.
5169         * python/py-record.h (recpy_record_object) <ptid>: Delete
5170         field, replaced with ...
5171         <thread>: ... this new field.  All users adjusted.
5172         (recpy_element_object) <ptid>: Delete
5173         field, replaced with ...
5174         <thread>: ... this new field.  All users adjusted.
5175         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5176         a ptid_t.  All callers adjusted.
5177         * python/py-threadevent.c: Include "gdbthread.h".
5178         (get_event_thread): Use thread_to_thread_object.
5179         * python/python-internal.h (struct inferior_object): Forward
5180         declare.
5181         (find_thread_object, find_inferior_object): Delete declarations.
5182         (thread_to_thread_object, inferior_to_inferior_object): New
5183         declarations.
5184         * record-btrace.c: Include "inferior.h".
5185         (require_btrace_thread): Use inferior_thread.
5186         (record_btrace_frame_sniffer)
5187         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5188         (get_thread_current_frame): Use scoped_restore_current_thread and
5189         switch_to_thread.
5190         (get_thread_current_frame): Use thread pointer directly.
5191         (record_btrace_replay_at_breakpoint): Use thread's inferior
5192         pointer directly.
5193         * record-full.c: Include "inferior.h".
5194         * regcache.c: Include "gdbthread.h".
5195         (get_thread_arch_regcache): Use the inferior's address space
5196         directly.
5197         (get_thread_regcache, registers_changed_thread): New.
5198         * regcache.h (get_thread_regcache(thread_info *thread)): New
5199         overload.
5200         (registers_changed_thread): New.
5201         (remote_target) <remote_detach_1>: Swap order of parameters.
5202         (remote_add_thread): <remote_add_thread>: Return the new thread.
5203         (get_remote_thread_info(ptid_t)): New overload.
5204         (remote_target::remote_notice_new_inferior): Use thread pointers
5205         directly.
5206         (remote_target::process_initial_stop_replies): Use
5207         thread_info::set_running.
5208         (remote_target::remote_detach_1, remote_target::detach)
5209         (extended_remote_target::detach): Adjust.
5210         * stack.c (frame_show_address): Use inferior_thread.
5211         * target-debug.h (target_debug_print_thread_info_pp): New.
5212         * target-delegates.c: Regenerate.
5213         * target.c (default_thread_address_space): Delete.
5214         (memory_xfer_partial_1): Use current_inferior.
5215         (target_detach): Use current_inferior.
5216         (target_thread_address_space): Delete.
5217         (generic_mourn_inferior): Use current_inferior.
5218         * target.h (struct target_ops) <thread_address_space>: Delete.
5219         (target_thread_address_space): Delete.
5220         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
5221         pointers directly.
5222         (delete_thread_1, delete_thread, delete_thread_silent): Take a
5223         thread pointer instead of a ptid_t.  Adjust all callers.
5224         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5225         (first_thread_of_process): Delete, replaced by ...
5226         (first_thread_of_inferior): ... this new function.  All callers
5227         adjusted.
5228         (any_thread_of_process): Rename to ...
5229         (any_thread_of_inferior): ... this, and take an inferior pointer.
5230         (any_live_thread_of_process): Rename to ...
5231         (any_live_thread_of_inferior): ... this, and take an inferior
5232         pointer.
5233         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5234         (value_in_thread_stack_temporaries)
5235         (get_last_thread_stack_temporary): Take a thread pointer instead
5236         of a ptid_t.  Adjust all callers.
5237         (thread_info::set_running): New.
5238         (validate_registers_access): Use inferior_thread.
5239         (can_access_registers_ptid): Rename to ...
5240         (can_access_registers_thread): ... this, and take a thread
5241         pointer.
5242         (print_thread_info_1): Adjust to compare thread pointers instead
5243         of ptids.
5244         (switch_to_no_thread, switch_to_thread): Make extern.
5245         (scoped_restore_current_thread::~scoped_restore_current_thread):
5246         Use m_thread pointer directly.
5247         (scoped_restore_current_thread::scoped_restore_current_thread):
5248         Use inferior_thread.
5249         (thread_command): Use thread pointer directly.
5250         (thread_num_make_value_helper): Use inferior_thread.
5251         * top.c (execute_command): Use inferior_thread.
5252         * tui/tui-interp.c: Include "inferior.h".
5253         * varobj.c (varobj_create): Use inferior_thread.
5254         (value_of_root_1): Use find_thread_global_id instead of
5255         global_thread_id_to_ptid.
5256
5257 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
5258
5259         * regcache.c (readable_regcache::read_part): Avoid memcpy when
5260         possible.
5261         (regcache::write_part): Likewise.
5262         (readable_regcache::cooked_read_part): Update comment.
5263         (readable_regcache::cooked_write_part): Likewise.
5264         * regcache.h: (readable_regcache::read_part): Likewise.
5265         (regcache::write_part): Likewise.
5266
5267 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
5268             Dirk Schubert  <dirk.schubert@arm.com>
5269
5270         * aarch64-linux-nat.c (post_attach): New.
5271         (aarch64_linux_nat_target::post_attach): Override post_attach to
5272         record the number of hardware debug registers.
5273
5274 2018-06-20  Tom Tromey  <tom@tromey.com>
5275
5276         * python/py-param.c (add_setshow_generic): Make parameters const.
5277         (parmpy_init): Update.
5278
5279 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5280
5281         * regcache.h (regcache_cooked_read_ftype): Rename to...
5282         (register_read_ftype): ...this, change type to function_view.
5283         (class reg_buffer) <save>: Remove src parameter.
5284         (readonly_detached_regcache) <readonly_detached_regcache>: Make
5285         parameter non-const in first overload.  Remove src parameter in
5286         second overload.
5287         * regcache.c (do_cooked_read): Remove.
5288         (readonly_detached_regcache::readonly_detached_regcache): Make
5289         parameter non-const, adjust call to other constructor.
5290         (reg_buffer::save): Remove src parameter.
5291         * frame.c (do_frame_register_read): Remove.
5292         (frame_save_as_regcache): Use lambda function.
5293         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5294         parameter to ppu2spu_data *.
5295         (ppu2spu_sniffer): Use lambda function.
5296
5297 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5298
5299         * record-full.c (record_full_target::insert_breakpoint): Remove
5300         "struct" keyword, add const.
5301
5302 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
5303
5304         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5305         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5306         * configure.ac: Remove AC_PREREQ, add missing quoting.
5307         * gnulib/configure.ac: Modernize usage of
5308         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
5309         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5310         (AUTOMAKE_VERSION): Bump to 1.15.1.
5311         * configure: Re-generate.
5312         * config.in: Re-generate.
5313         * aclocal.m4: Re-generate.
5314         * gnulib/aclocal.m4: Re-generate.
5315         * gnulib/config.in: Re-generate.
5316         * gnulib/configure: Re-generate.
5317         * gnulib/import/Makefile.in: Re-generate.
5318
5319 2018-06-19  Pedro Alves  <palves@redhat.com>
5320
5321         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5322         (lookup_minimal_symbol_by_pc_section): ... here with
5323         gdb_assert_not_reached added.
5324
5325 2018-06-19  Pedro Alves  <palves@redhat.com>
5326
5327         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5328         parameter with a block parameter.  Compare location's block symbol
5329         with the frame's block instead of addresses.
5330         (skip_inline_frames): Pass the current block instead of the
5331         frame's address.  Break out as soon as we determine the frame
5332         should not be skipped.
5333
5334 2018-06-18  Tom Tromey  <tom@tromey.com>
5335
5336         * solib-aix.c (solib_aix_get_section_offsets): Return
5337         unique_xmalloc_ptr.
5338         (solib_aix_solib_create_inferior_hook): Update.
5339
5340 2018-06-18  Tom Tromey  <tom@tromey.com>
5341
5342         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5343
5344 2018-06-18  Tom Tromey  <tom@tromey.com>
5345
5346         * solib-frv.c (frv_relocate_main_executable): Use
5347         unique_xmalloc_ptr.
5348         * solib-dsbt.c (dsbt_relocate_main_executable): Use
5349         unique_xmalloc_ptr.
5350
5351 2018-06-18  Tom Tromey  <tom@tromey.com>
5352
5353         * objfiles.h (inhibit_section_map_updates): Update.
5354         (resume_section_map_updates, resume_section_map_updates_cleanup):
5355         Remove.
5356         * solib-svr4.c (svr4_handle_solib_event): Update.
5357         * objfiles.c (inhibit_section_map_updates): Return
5358         scoped_restore_tmpl<int>.
5359         (resume_section_map_updates, resume_section_map_updates_cleanup):
5360         Remove.
5361
5362 2018-06-18  Tom Tromey  <tom@tromey.com>
5363
5364         * valprint.h (read_string): Update.
5365         * valprint.c (read_string): Change type of "buffer".
5366         (val_print_string): Update.
5367         * python/py-value.c (valpy_string): Update.
5368         * language.h (struct language_defn) <la_get_string>: Change
5369         type of "buffer".
5370         (default_get_string, c_get_string): Update.
5371         * language.c (default_get_string): Change type of "buffer".
5372         * guile/scm-value.c (gdbscm_value_to_string): Update.
5373         * c-lang.c (c_get_string): Change type of "buffer".
5374
5375 2018-06-18  Tom Tromey  <tom@tromey.com>
5376
5377         * ser-mingw.c (struct pipe_state_destroyer): New.
5378         (pipe_state_up): New typedef.
5379         (cleanup_pipe_state): Remove.
5380         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
5381
5382 2018-06-18  Tom Tromey  <tom@tromey.com>
5383
5384         * rust-lang.h (rust_yyerror): Don't declare.
5385         * rust-lang.c (rust_language_defn): Update.
5386         * rust-exp.y (yyerror): Now static.
5387         * parse.c (parse_exp_in_context_1): Update.
5388         * p-lang.h (p_yyerror): Don't declare.
5389         * p-lang.c (p_language_defn): Update.
5390         * p-exp.y (yyerror): Now static.
5391         * opencl-lang.c (opencl_language_defn): Update.
5392         * objc-lang.c (objc_language_defn): Update.
5393         * m2-lang.h (m2_yyerror): Don't declare.
5394         * m2-lang.c (m2_language_defn): Update.
5395         * m2-exp.y (yyerror): Now static.
5396         * language.h (struct language_defn) <la_error>: Remove.
5397         * language.c (unk_lang_error): Remove.
5398         (unknown_language_defn, auto_language_defn): Remove.
5399         * go-lang.h (go_yyerror): Don't declare.
5400         * go-lang.c (go_language_defn): Update.
5401         * go-exp.y (yyerror): Now static.
5402         * f-lang.h (f_yyerror): Don't declare.
5403         * f-lang.c (f_language_defn): Update.
5404         * f-exp.y (yyerror): Now static.
5405         * d-lang.h (d_yyerror): Don't declare.
5406         * d-lang.c (d_language_defn): Update.
5407         * d-exp.y (yyerror): Now static.
5408         * c-lang.h (c_yyerror): Don't declare.
5409         * c-lang.c (c_language_defn, cplus_language_defn)
5410         (asm_language_defn, minimal_language_defn): Update.
5411         * c-exp.y (yyerror): Now static.
5412         * ada-lang.h (ada_yyerror): Don't declare.
5413         * ada-lang.c (ada_language_defn): Update.
5414         * ada-exp.y (yyerror): Now static.
5415
5416 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5417
5418         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5419         (store_sveregs_to_thread): Likewise.
5420         (aarch64_linux_fetch_inferior_registers): Check for SVE.
5421         (aarch64_linux_store_inferior_registers): Likewise.
5422         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5423         function.
5424         (aarch64_sve_regs_copy_to_regcache): Likewise.
5425         (aarch64_sve_regs_copy_from_regcache): Likewise.
5426         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5427         declaration.
5428         (aarch64_sve_regs_copy_to_regcache): Likewise.
5429         (aarch64_sve_regs_copy_from_regcache): Likewise.
5430         (sve_context): Structure from Linux headers.
5431         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5432         (SVE_SIG_ZREG_SIZE): Likewise.
5433         (SVE_SIG_PREG_SIZE): Likewise.
5434         (SVE_SIG_FFR_SIZE): Likewise.
5435         (SVE_SIG_REGS_OFFSET): Likewise.
5436         (SVE_SIG_ZREGS_OFFSET): Likewise.
5437         (SVE_SIG_ZREG_OFFSET): Likewise.
5438         (SVE_SIG_ZREGS_SIZE): Likewise.
5439         (SVE_SIG_PREGS_OFFSET): Likewise.
5440         (SVE_SIG_PREG_OFFSET): Likewise.
5441         (SVE_SIG_PREGS_SIZE): Likewise.
5442         (SVE_SIG_FFR_OFFSET): Likewise.
5443         (SVE_SIG_REGS_SIZE): Likewise.
5444         (SVE_SIG_CONTEXT_SIZE): Likewise.
5445         (SVE_PT_REGS_MASK): Likewise.
5446         (SVE_PT_REGS_FPSIMD): Likewise.
5447         (SVE_PT_REGS_SVE): Likewise.
5448         (SVE_PT_VL_INHERIT): Likewise.
5449         (SVE_PT_VL_ONEXEC): Likewise.
5450         (SVE_PT_REGS_OFFSET): Likewise.
5451         (SVE_PT_FPSIMD_OFFSET): Likewise.
5452         (SVE_PT_FPSIMD_SIZE): Likewise.
5453         (SVE_PT_SVE_ZREG_SIZE): Likewise.
5454         (SVE_PT_SVE_PREG_SIZE): Likewise.
5455         (SVE_PT_SVE_FFR_SIZE): Likewise.
5456         (SVE_PT_SVE_FPSR_SIZE): Likewise.
5457         (SVE_PT_SVE_FPCR_SIZE): Likewise.
5458         (__SVE_SIG_TO_PT): Likewise.
5459         (SVE_PT_SVE_OFFSET): Likewise.
5460         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5461         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5462         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5463         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5464         (SVE_PT_SVE_PREG_OFFSET): Likewise.
5465         (SVE_PT_SVE_PREGS_SIZE): Likewise.
5466         (SVE_PT_SVE_FFR_OFFSET): Likewise.
5467         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5468         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5469         (SVE_PT_SVE_SIZE): Likewise.
5470         (SVE_PT_SIZE): Likewise.
5471         (HAS_SVE_STATE): New define.
5472
5473 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5474
5475         * nat/aarch64-sve-linux-sigcontext.h: New file.
5476         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5477         new files.
5478         (SVE_VQ_MIN): Likewise.
5479         (SVE_VQ_MAX): Likewise.
5480         (SVE_VL_MIN): Likewise.
5481         (SVE_VL_MAX): Likewise.
5482         (SVE_NUM_ZREGS): Likewise.
5483         (SVE_NUM_PREGS): Likewise.
5484         (sve_vl_valid): Likewise.
5485         (struct user_sve_header): Likewise.
5486
5487 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
5488             Richard Bunt <Richard.Bunt@arm.com>
5489
5490         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5491         was requested by GDB.
5492
5493 2018-06-15  Tom de Vries  <tdevries@suse.de>
5494
5495         * MAINTAINERS (Write After Approval): Add Tom de Vries.
5496
5497 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
5498
5499         * gnulib/update-gnulib.sh: Print expected versions of
5500         autoconf/aclocal.
5501
5502 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
5503
5504         * arch-utils.c (default_type_align): Use type_length_units.
5505         * gdbtypes.c (type_align): Use type_length_units.
5506
5507 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5508
5509         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5510         of 'define' command.
5511
5512 2018-06-14  Tom de Vries  <tdevries@suse.de>
5513
5514         PR cli/22573
5515         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5516         get_no_prettyformat_print_options.
5517
5518 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5519
5520         * sparc-nat.h: Include target.h.
5521         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5522         <fetch_registers>: Remove this argument in function call.
5523         <store_registers>: Remove this argument in function call, remove
5524         extra semicolon.
5525         <low_forget_process>: Call sparc64_forget_process instead of
5526         sparc_forget_process.
5527
5528 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5529
5530         * procfs.c (_initialize_procfs): Use add_inf_child_target.
5531         (procfs_target::make_corefile_notes): Adjust to new
5532         target_read_alloc return type.
5533
5534 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5535             Stephen Roberts  <stephen.roberts@arm.com>
5536
5537         PR gdb/22882
5538         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5539         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5540         Move should_notify_stop local into more inner scope.
5541
5542 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5543             Stephen Roberts  <stephen.roberts@arm.com>
5544
5545         PR gdb/22882
5546         * infrun.c (resume_1): Add call to mark_async_event_handler.
5547
5548 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5549
5550         * infrun.c (do_target_wait): Change old version of $pc printed.
5551
5552 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5553
5554         * dwarf2read.c (read_index_from_section): Rename to...
5555         (read_gdb_index_from_section): ... this, update all callers.
5556         (dwarf2_read_index): Rename to...
5557         (dwarf2_read_gdb_index): ... this, update all callers.
5558
5559 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
5560
5561         * gdb/hppa-linux-nat.c
5562         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5563         hppa_linux_nat_target::fetch_registers.
5564
5565 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5566
5567         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5568         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5569         (AARCH64_DWARF_SVE_FFR): Likewise.
5570         (AARCH64_DWARF_SVE_P0): Likewise.
5571         (AARCH64_DWARF_SVE_Z0): Likewise.
5572
5573 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5574
5575         * common/common-regcache.h (raw_compare): New function.
5576         * regcache.c (regcache::raw_compare): Likewise.
5577         * regcache.h (regcache::raw_compare): New declaration.
5578
5579 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5580
5581         * common/common-regcache.h (reg_buffer_common): New structure.
5582         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5583         (reg_buffer::raw_supply): Likewise.
5584         (reg_buffer::raw_supply_integer): Likewise.
5585         (reg_buffer::raw_supply_zeroed): Likewise.
5586         (reg_buffer::raw_collect): Likewise.
5587         (reg_buffer::raw_collect_integer): Likewise.
5588         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5589         (reg_buffer::raw_supply): Likewise.
5590         (reg_buffer::raw_supply_integer): Likewise.
5591         (reg_buffer::raw_supply_zeroed): Likewise.
5592         (reg_buffer::raw_collect): Likewise.
5593         (reg_buffer::raw_collect_integer): Likewise.
5594
5595 2018-06-10  Tom Tromey  <tom@tromey.com>
5596
5597         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
5598         (class remote_state) <stop_reply_queue>: Now std::vector.
5599         (remote_state::~remote_state)
5600         (remote_target::stop_reply_queue_length): Update.
5601         (struct queue_iter_param, remove_child_of_pending_fork)
5602         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5603         (check_pending_event_prevents_wildcard_vcont_callback)
5604         (remove_stop_reply_for_inferior)
5605         (remove_stop_reply_of_remote_state)
5606         (remote_notif_remove_once_on_match)
5607         (stop_reply_match_ptid_and_ws)
5608         (remote_kill_child_of_pending_fork): Remove.
5609         (remote_target::remove_new_fork_children)
5610         (remote_target::check_pending_events_prevent_wildcard_vcont)
5611         (remote_target::discard_pending_stop_replies)
5612         (remote_target::discard_pending_stop_replies_in_queue)
5613         (remote_target::remote_notif_remove_queued_reply)
5614         (remote_target::queued_stop_reply)
5615         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5616         (remote_target::wait, remote_target::kill_new_fork_children)
5617         (remote_target::async): Update.
5618
5619 2018-06-10  Tom Tromey  <tom@tromey.com>
5620
5621         * record-full.c (record_full_arch_list_cleanups): Remove.
5622         (record_full_message): Use try/catch.
5623         (record_full_wait_cleanups): Remove.
5624         (record_full_wait_1): Use try/catch.
5625         (record_full_restore): Likewise.
5626
5627 2018-06-10  Tom Tromey  <tom@tromey.com>
5628
5629         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
5630         declare VEC.  Add constructor.
5631         <in_target_beneath>: Now bool.
5632         (record_full_breakpoints): Now a std::vector, static.
5633         (record_full_sync_record_breakpoints)
5634         (record_full_init_record_breakpoints)
5635         (record_full_target::insert_breakpoint)
5636         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
5637
5638 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5639
5640         * dwarf2read.c (process_cu_includes): Remove struct keyword.
5641         * serial.c (serial_interface_lookup): Remove struct keyword.
5642
5643 2018-06-10  Tom Tromey  <tom@tromey.com>
5644
5645         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5646         method.
5647         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5648         a method.
5649         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5650         method.
5651         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5652         "beneath" as a method.
5653         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5654         Use "beneath" as a method.
5655
5656 2018-06-10  Tom Tromey  <tom@tromey.com>
5657
5658         * tracefile.c (struct trace_file_writer_deleter): New.
5659         <operator()>: Rename from trace_file_writer_xfree.
5660         (trace_file_writer_up): New typedef.
5661         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5662
5663 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5664
5665         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5666         <m_registers, m_register_status>: Change type to
5667         std::unique_ptr.
5668         * regcache.c (reg_buffer::reg_buffer): Use new instead of
5669         XCNEWVEC.
5670
5671 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5672
5673         * common/common-regcache.h (enum register_status): Add
5674         underlying type "signed char".
5675         * regcache.h (reg_buffer) <m_register_status>: Change type to
5676         register_status *.
5677         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5678         register_status instead of signed char.
5679         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5680         (reg_buffer::get_register_status): Remove cast.
5681         (readable_regcache::raw_read): Remove cast.
5682         (readable_regcache::cooked_read): Remove cast.
5683
5684 2018-06-09  Tom Tromey  <tom@tromey.com>
5685
5686         * source.c (reverse_search_command, forward_search_command): Use
5687         scoped_fd.
5688
5689 2018-06-09  Tom Tromey  <tom@tromey.com>
5690
5691         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
5692         (serial_ops_list): Now static, std::vector.
5693         (serial_interface_lookup, serial_add_interface): Update.
5694
5695 2018-06-09  Tom Tromey  <tom@tromey.com>
5696
5697         * dwarf2read.c (process_cu_includes): Update.
5698         (process_full_comp_unit): Update.
5699         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5700         std::vector.
5701
5702 2018-06-08  Paul Koning  <paul_koning@dell.com>
5703
5704         PR gdb/23252
5705
5706         * python/python.c (do_start_initialization):
5707         Avoid call to internal Python API.
5708         (init__gdb_module): New function.
5709
5710 2018-06-08  Gary Benson <gbenson@redhat.com>
5711
5712         * linux-thread-db.c (valprint.h): New include.
5713         (struct check_thread_db_info): New structure.
5714         (check_thread_db_on_load, tdb_testinfo): New static globals.
5715         (check_thread_db, check_thread_db_callback): New functions.
5716         (try_thread_db_load_1): Run integrity checks if requested.
5717         (maintenance_check_libthread_db): New function.
5718         (_initialize_thread_db): Register "maint check libthread-db"
5719         and "maint set/show check-libthread-db".
5720         * NEWS: Mention the above new commands.
5721
5722 2018-06-08  Tom Tromey  <tom@tromey.com>
5723
5724         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5725         now a method.
5726
5727 2018-06-08  Tom Tromey  <tom@tromey.com>
5728
5729         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5730
5731 2018-06-08  Tom Tromey  <tom@tromey.com>
5732
5733         * common/btrace-common.h (struct btrace_data): Add constructor,
5734         destructor, move assignment operator.
5735         <empty, clear, fini>: New methods.
5736         <format>: Initialize.
5737         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5738         (btrace_data_empty): Don't declare.
5739         * common/btrace-common.c (btrace_data_init): Remove.
5740         (btrace_data::fini): Rename from btrace_data_fini.
5741         (btrace_data::empty): Rename from btrace_data_empty.
5742         (btrace_data::clear): Rename from btrace_data_clear.  Return
5743         bool.
5744         * btrace.h (make_cleanup_btrace_data): Don't declare.
5745         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5746         (parse_xml_btrace): Update.
5747         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5748         (maint_btrace_clear_packet_history_cmd): Update.
5749
5750 2018-06-07  Pedro Alves  <palves@redhat.com>
5751
5752         * target.h (target_ops) <beneath>: Now a method.  All references
5753         updated.
5754         (class target_stack): New.
5755         * target.c (g_target_stack): New.
5756         (g_current_top_target): Delete.
5757         (current_top_target): Get the top target out of g_target_stack.
5758         (target_stack::push, target_stack::unpush): New.
5759         (push_target, unpush_target): Reimplement.
5760         (target_is_pushed): Reimplement in terms of g_target_stack.
5761         (target_ops::beneath, target_stack::find_beneath): New.
5762
5763 2018-06-07  Pedro Alves  <palves@redhat.com>
5764
5765         * target.h (find_target_beneath): Delete declaration.
5766         * target.c (find_target_beneath): Delete definition.
5767         * aix-thread.c: All callers of find_target_beneath adjusted to
5768         call target_ops::beneath instead.
5769         * bsd-uthread.c: Likewise.
5770         * linux-thread-db.c: Likewise.
5771         * ravenscar-thread.c: Likewise.
5772         * sol-thread.c: Likewise.
5773         * spu-multiarch.c: Likewise.
5774
5775 2018-06-07  Pedro Alves  <palves@redhat.com>
5776
5777         * target.h (target_ops) <beneath>: Now a method.  All references
5778         updated.
5779         (target_ops) <m_beneath>: New.
5780         * target.c (target_ops::beneath): New.
5781         * corelow.c: Adjust all references to target_ops::beneath.
5782         * linux-thread-db.c: Likewise.
5783         * make-target-delegates: Likewise.
5784         * record-btrace.c: Likewise.
5785         * record-full.c: Likewise.
5786         * remote.c: Likewise.
5787         * target.c: Likewise.
5788         * target-delegates.c: Regenerate.
5789
5790 2018-06-07  Pedro Alves  <palves@redhat.com>
5791
5792         * target.h (target_stack): Delete.
5793         (current_top_target): Declare function.
5794         * target.c (target_stack): Delete.
5795         (g_current_top_target): New.
5796         (current_top_target): New function.
5797         * auxv.c: Use current_top_target instead of target_stack
5798         throughout.
5799         * avr-tdep.c: Likewise.
5800         * breakpoint.c: Likewise.
5801         * corefile.c: Likewise.
5802         * elfread.c: Likewise.
5803         * eval.c: Likewise.
5804         * exceptions.c: Likewise.
5805         * frame.c: Likewise.
5806         * gdbarch-selftests.c: Likewise.
5807         * gnu-v3-abi.c: Likewise.
5808         * ia64-tdep.c: Likewise.
5809         * ia64-vms-tdep.c: Likewise.
5810         * infcall.c: Likewise.
5811         * infcmd.c: Likewise.
5812         * infrun.c: Likewise.
5813         * linespec.c: Likewise.
5814         * linux-tdep.c: Likewise.
5815         * minsyms.c: Likewise.
5816         * ppc-linux-nat.c: Likewise.
5817         * ppc-linux-tdep.c: Likewise.
5818         * procfs.c: Likewise.
5819         * regcache.c: Likewise.
5820         * remote.c: Likewise.
5821         * rs6000-tdep.c: Likewise.
5822         * s390-linux-nat.c: Likewise.
5823         * s390-tdep.c: Likewise.
5824         * solib-aix.c: Likewise.
5825         * solib-darwin.c: Likewise.
5826         * solib-dsbt.c: Likewise.
5827         * solib-spu.c: Likewise.
5828         * solib-svr4.c: Likewise.
5829         * solib-target.c: Likewise.
5830         * sparc-tdep.c: Likewise.
5831         * sparc64-tdep.c: Likewise.
5832         * spu-tdep.c: Likewise.
5833         * symfile.c: Likewise.
5834         * symtab.c: Likewise.
5835         * target-descriptions.c: Likewise.
5836         * target-memory.c: Likewise.
5837         * target.c: Likewise.
5838         * target.h: Likewise.
5839         * tracefile-tfile.c: Likewise.
5840         * tracepoint.c: Likewise.
5841         * valops.c: Likewise.
5842         * valprint.c: Likewise.
5843         * value.c: Likewise.
5844         * windows-tdep.c: Likewise.
5845         * mi/mi-main.c: Likewise.
5846
5847 2018-06-07  Tom Tromey  <tom@tromey.com>
5848
5849         * valprint.h (build_address_symbolic): Declare.
5850         * printcmd.c (print_address_symbolic): Update.
5851         (build_address_symbolic): Change "name" and "filename" to
5852         std::string.
5853         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5854         Update.
5855         * defs.h (build_address_symbolic): Remove declaration.
5856
5857 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
5858
5859         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5860         (aarch64_vnv_type): Add function.
5861         (aarch64_pseudo_register_name): Add V regs for SVE.
5862         (aarch64_pseudo_register_type): Likewise.
5863         (aarch64_pseudo_register_reggroup_p): Likewise.
5864         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5865         (aarch64_pseudo_read_value): Add V regs for SVE.
5866         (aarch64_pseudo_write_2): Use V0 offset for SVE
5867         (aarch64_pseudo_write): Add V regs for SVE.
5868         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5869
5870 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5871
5872         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5873         (sve_vl_from_vq): Likewise.
5874
5875 2018-06-05  Tom Tromey  <tom@tromey.com>
5876
5877         * cli/cli-cmds.c (show_version): Update.
5878         * top.c (print_gdb_version): Add "interactive" parameter.
5879         Update.
5880         * main.c (captured_main_1): Update.
5881         * top.h (print_gdb_version): Add "interactive" parameter and a
5882         comment.
5883
5884 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
5885
5886         * common/enum-flags.h: Add trailing semicolon to example in
5887         comment.
5888
5889 2018-06-05  Tom Tromey  <tom@tromey.com>
5890
5891         PR cli/12326:
5892         * NEWS: Add entry about pager.
5893         * utils.c (pagination_disabled_for_command): New global.
5894         (prompt_for_continue): Allow "c" response to prompt.
5895         (reinitialize_more_filter): Clear
5896         pagination_disabled_for_command.
5897         (fputs_maybe_filtered): Check pagination_disabled_for_command.
5898
5899 2018-06-04  Tom Tromey  <tom@tromey.com>
5900
5901         * ada-lang.h (ada_lookup_symbol_list): Update.
5902         * ada-lang.c (resolve_subexp): Update.
5903         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
5904         parameter.
5905         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5906         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5907         results parameter to std::vector.
5908         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5909         Update.
5910         * ada-exp.y (block_lookup): Update.
5911         (select_possible_type_sym): Change type of syms.  Remove nsyms
5912         parameter.
5913         (write_var_or_type, write_name_assoc): Update.
5914
5915 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
5916
5917         * windows-nat.c (windows_nat_target::xfer_partial): Return
5918         TARGET_XFER_E_IO if we need to delegate to the target beneath
5919         but BENEATH is NULL.
5920
5921 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
5922
5923         * Makefile.in (config.status): Add configure.nat as a
5924         dependency.
5925
5926 2018-06-04  Tom Tromey  <tom@tromey.com>
5927
5928         * cp-name-parser.y (cpname_state): Add method declarations.
5929         (HANDLE_QUAL): Update.
5930         (cpname_state::d_grab, cpname_state::fill_comp)
5931         (cpname_state::make_operator, cpname_state::make_dtor)
5932         (cpname_state::make_builtin_type, cpname_state::make_name)
5933         (cpname_state::d_qualify, cpname_state::d_int_type)
5934         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5935         (%union): Move earlier.
5936
5937 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5938
5939         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5940
5941 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5942
5943         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
5944         (aarch64_pseudo_write_1): Likewise.
5945         (aarch64_pseudo_read_value): Use helper.
5946         (aarch64_pseudo_write): Likewise.
5947
5948 2018-06-04  Pedro Alves  <palves@redhat.com>
5949
5950         * darwin-nat.c (darwin_ops): Delete.
5951         (darwin_attach_pid): Use get_native_target.
5952
5953 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5954
5955         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
5956         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
5957
5958 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5959
5960         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
5961         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
5962         (aarch64_gdbarch_init): Check for SVE.
5963         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
5964
5965 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5966
5967         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
5968         * aarch64-tdep.h (aarch64_read_description): Likewise.
5969         * arch/aarch64.c (aarch64_create_target_description): Likewise.
5970         * arch/aarch64.h (aarch64_create_target_description): Likewise.
5971         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
5972         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
5973         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
5974
5975 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
5976
5977         * value.c (value_fetch_lazy_bitfield): New.
5978         (value_fetch_lazy_memory): New.
5979         (value_fetch_lazy_register): New.
5980         (value_fetch_lazy): Factor out to smaller functions.
5981
5982 2018-06-01  Tom Tromey  <tom@tromey.com>
5983
5984         * cp-name-parser.y (backslashable, represented): Now const.
5985
5986 2018-06-01  Tom Tromey  <tom@tromey.com>
5987
5988         * cp-name-parser.y: Include parser-defs.h.
5989         (parser_fprintf): Remove declaration.
5990
5991 2018-06-01  Tom Tromey  <tom@tromey.com>
5992
5993         * cp-name-parser.y: Use %pure-parser, %lex-param, and
5994         %parse-param.
5995         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
5996         (global_result): Remove globals.
5997         (struct cpname_state): New.
5998         (yyparse): Don't declare.
5999         (yylex, yyerror): Move declarations after %union.
6000         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6001         (make_name): Add state parameter.
6002         Update all callers.
6003         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6004         parameter.
6005         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6006         Update.
6007         (yylex): Add lvalp, state parameters.
6008         (yyerror): Add state parameter.
6009         (cp_demangled_name_to_comp): Update.
6010
6011 2018-06-01  Tom Tromey  <tom@tromey.com>
6012
6013         * cp-name-parser.y (parser_fprintf): Declare.
6014         (GDB_YY_REMAP_PREFIX): Define.
6015         Include yy-remap.h.  Don't redefine yy* identifiers.
6016
6017 2018-06-01  Tom Tromey  <tom@tromey.com>
6018
6019         * python/py-type.c (typy_legacy_template_argument): Update.
6020         * cp-support.h (cp_demangled_name_to_comp): Update.
6021         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6022         parameter to be a "std::string *".
6023         (main): Update.
6024
6025 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
6026
6027         * ada-lex.l: Include "diagnostics.h" instead of
6028         "common/diagnostics.h".
6029         * unittests/environ-selftests.c: Likewise.
6030         * common/diagnostics.h: Moved to ../include.
6031
6032 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
6033
6034         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6035         to language_mode_manual while calling breakpoint_re_set_one.
6036
6037 2018-06-01  Tom Tromey  <tom@tromey.com>
6038
6039         * valops.c (value_cast_structs, destructor_name_p): Update.
6040         * symtab.c (gdb_mangle_name): Update.
6041         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6042         Update.
6043         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6044         (pascal_object_print_value_fields, pascal_object_print_value):
6045         Update.
6046         * p-typeprint.c (pascal_type_print_derivation_info): Update.
6047         * linespec.c (find_methods): Update.
6048         * gdbtypes.h (type_name_no_tag): Remove.
6049         (type_name_or_error): Rename from type_name_no_tag_or_error.
6050         * gdbtypes.c (type_name_no_tag): Remove.
6051         (type_name_or_error): Rename from type_name_no_tag_or_error.
6052         (lookup_struct_elt_type, check_typedef): Update.
6053         * expprint.c (print_subexp_standard): Update.
6054         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6055         * d-namespace.c (d_lookup_nested_symbol): Update.
6056         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6057         (cp_print_class_member): Update.
6058         * cp-namespace.c (cp_lookup_nested_symbol): Update.
6059         * completer.c (add_struct_fields): Update.
6060         * c-typeprint.c (cp_type_print_derivation_info)
6061         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6062         Update.
6063         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6064         (ada_prefer_type, ada_is_exception_sym): Update.
6065
6066 2018-06-01  Tom Tromey  <tom@tromey.com>
6067
6068         * valops.c (enum_constant_from_type, value_namespace_elt)
6069         (value_maybe_namespace_elt): Update.
6070         * valarith.c (find_size_for_pointer_math): Update.
6071         * target-descriptions.c (make_gdb_type): Update.
6072         * symmisc.c (print_symbol): Update.
6073         * stabsread.c (define_symbol, read_type)
6074         (complain_about_struct_wipeout, add_undefined_type)
6075         (cleanup_undefined_types_1): Update.
6076         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6077         (rust_range_type_p, val_print_struct, rust_print_struct_def)
6078         (rust_internal_print_type, rust_composite_type)
6079         (rust_evaluate_funcall, rust_evaluate_subexp)
6080         (rust_inclusive_range_type_p): Update.
6081         * python/py-type.c (typy_get_tag): Update.
6082         * p-typeprint.c (pascal_type_print_base): Update.
6083         * mdebugread.c (parse_symbol, parse_type): Update.
6084         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6085         Update.
6086         * guile/scm-type.c (gdbscm_type_tag): Update.
6087         * go-lang.c (sixg_string_p): Update.
6088         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6089         Update.
6090         * gdbtypes.h (struct main_type) <tag_name>: Remove.
6091         (TYPE_TAG_NAME): Remove.
6092         * gdbtypes.c (type_name_no_tag): Simplify.
6093         (check_typedef, check_types_equal, recursive_dump_type)
6094         (copy_type_recursive, arch_composite_type): Update.
6095         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
6096         in summary mode when needed.
6097         * eval.c (evaluate_funcall): Update.
6098         * dwarf2read.c (fixup_go_packaging, read_structure_type)
6099         (process_structure_scope, read_enumeration_type)
6100         (read_namespace_type, read_module_type, determine_prefix): Update.
6101         * cp-support.c (inspect_type): Update.
6102         * coffread.c (process_coff_symbol, decode_base_type): Update.
6103         * c-varobj.c (c_is_path_expr_parent): Update.
6104         * c-typeprint.c (c_type_print_base_struct_union): Update.
6105         (c_type_print_base_1): Update.  Print struct/class/union/enum in
6106         summary when using C language.
6107         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6108         (gen_maybe_namespace_elt): Update.
6109         * ada-lang.c (ada_type_name): Simplify.
6110         (empty_record, ada_template_to_fixed_record_type_1)
6111         (template_to_static_fixed_type)
6112         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6113
6114 2018-06-01  Tom Tromey  <tom@tromey.com>
6115
6116         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6117         c_print_type.
6118         * c-typeprint.c (c_print_type_1): Add "language" parameter.
6119         (c_print_type): Update.
6120         (c_print_type): New overload.
6121         (c_type_print_varspec_prefix, c_type_print_args)
6122         (c_type_print_varspec_suffix, c_print_type_no_offsets)
6123         (c_type_print_base_struct_union, c_type_print_base_1)
6124         (cp_type_print_method_args): Add "language" parameter.
6125         (c_type_print_base): Update.
6126         * c-lang.h (c_print_type): Add new overload.
6127
6128 2018-06-01  Tom Tromey  <tom@tromey.com>
6129
6130         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6131         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6132
6133 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
6134
6135         * aarch64-tdep.c (aarch64_sve_register_names): New const
6136         var.
6137         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6138         (AARCH64_SVE_Z_REGS_NUM): New define.
6139         (AARCH64_SVE_P_REGS_NUM): Likewise.
6140         (AARCH64_SVE_NUM_REGS): Likewise.
6141
6142 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
6143
6144         * nat/linux-ptrace.h [__alpha__]
6145         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6146         definitions.
6147
6148 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
6149
6150         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6151         the endianness selected.
6152         * NEWS: Document `set endian auto' mode operation update.
6153
6154 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6155
6156         * Makefile.in: Add new header.
6157         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6158         (sve_vl_from_vg): Likewise.
6159         (sve_vq_from_vl): Likewise.
6160         (sve_vl_from_vq): Likewise.
6161         (sve_vq_from_vg): Likewise.
6162         (sve_vg_from_vq): Likewise.
6163         * configure.nat: Add new c file.
6164         * nat/aarch64-sve-linux-ptrace.c: New file.
6165         * nat/aarch64-sve-linux-ptrace.h: New file.
6166
6167 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6168
6169         * aarch64-linux-nat.c (aarch64_linux_read_description):
6170         Add parmeter zero.
6171         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6172         Likewise.
6173         * aarch64-tdep.c (tdesc_aarch64_list): Add.
6174         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6175         (aarch64_gdbarch_init): Add parmeter zero.
6176         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6177         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6178         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6179         parmeter.
6180         * doc/gdb.texinfo: Describe SVE feature
6181         * features/aarch64-sve.c: New file.
6182
6183 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
6184
6185         PR gdb/23210
6186         * gdbarch.sh (significant_addr_bit): Default to zero when
6187         not set by target architecture.
6188         * gdbarch.c: Re-generated.
6189         * utils.c (address_significant): Update.
6190
6191 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
6192
6193         * stack.c (func_command): Remove trailing newline in call to error.
6194
6195 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6196
6197         * regcache.h (regcache_raw_collect): Remove, update callers to
6198         use regcache::raw_collect.
6199         * regcache.c (regcache_raw_collect): Remove.
6200
6201 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6202
6203         * regcache.h (regcache_raw_supply): Remove, update callers to
6204         use detached_regcache::raw_supply.
6205         * regcache.c (regcache_raw_supply): Remove.
6206
6207 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6208
6209         * regcache.h (regcache_cooked_write_part): Remove, update
6210         callers to use regcache::cooked_write_part.
6211         * regcache.c (regcache_cooked_write_part): Remove.
6212
6213 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6214
6215         * regcache.h (regcache_cooked_read_part): Remove, update callers
6216         to use readable_regcache::cooked_read_part.
6217         * regcache.c (regcache_cooked_read_part): Remove.
6218
6219 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6220
6221         * regcache.h (regcache_cooked_read_value): Remove, update
6222         callers to use readable_regcache::cooked_read_value.
6223         * regcache.c (regcache_cooked_read_value): Remove.
6224
6225 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6226
6227         * regcache.h (regcache_cooked_write): Remove, update callers to
6228         use regcache::cooked_write.
6229         * regcache.c (regcache_cooked_write): Remove.
6230
6231 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6232
6233         * regcache.h (regcache_invalidate): Remove, update callers to
6234         use detached_regcache::invalidate instead.
6235         * regcache.c (regcache_invalidate): Remove.
6236
6237 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6238
6239         * regcache.h (regcache_raw_write_part): Remove, update callers
6240         to use regcache::raw_write_part instead.
6241         * regcache.c (regcache_raw_write_part): Remove.
6242
6243 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6244
6245         * regcache.h (regcache_raw_read_part): Remove, update callers to
6246         use readable_regcache::raw_read_part instead.
6247         * regcache.c (regcache_raw_read_part): Remove.
6248
6249 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6250
6251         * regcache.h (regcache_cooked_read): Remove, update callers to
6252         use readable_regcache::cooked_read instead.
6253         * regcache.c (regcache_cooked_read): Remove.
6254
6255 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6256
6257         * regcache.h (regcache_raw_write): Remove, update callers to use
6258         regcache::raw_write instead.
6259         * regcache.c (regcache_raw_write): Remove.
6260
6261 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6262
6263         * regcache.h (regcache_raw_read): Remove, update callers to use
6264         readable_regcache::raw_read instead.
6265         * regcache.c (regcache_raw_read): Remove.
6266
6267 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6268
6269         * regcache.h (regcache_raw_update): Remove, update callers to
6270         use readable_regcache::raw_update instead.
6271         * regcache.c (regcache_raw_update): Remove.
6272
6273 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6274
6275         * regcache.h (regcache_register_status): Remove, update callers
6276         to use reg_buffer::get_register_status directly instead.
6277         * regcache.c (regcache_register_status): Remove.
6278
6279 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6280
6281         * regcache.h (regcache_get_ptid): Remove, update all callers to
6282         call regcache::ptid instead.
6283         * regcache.c (regcache_get_ptid): Remove.
6284
6285 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6286
6287         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6288
6289 2018-05-30  Pedro Alves  <palves@redhat.com>
6290
6291         * common/common-exceptions.h (exception_rethrow): Use
6292         ATTRIBUTE_NORETURN.
6293
6294 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
6295
6296         * breakpoint.c (print_solib_event, check_status_catch_solib):
6297         Remove struct keyword in range-based for loops.
6298         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6299         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6300         Likewise.
6301         * linespec.c (find_superclass_methods, search_minsyms_for_name):
6302         Likewise.
6303         * symfile.c (addr_info_make_relative): Likewise.
6304         * thread.c (value_in_thread_stack_temporaries): Likewise.
6305
6306 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
6307
6308         PR gdb/16841
6309         * valops.c (value_struct_elt_for_reference): Call check_typedef on
6310         aggregate type to get its real type before accessing it.
6311
6312 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
6313
6314         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6315         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6316         * coff-pe-read.c (add_pe_forwarded_sym): Replace
6317         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6318         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6319         * jit.c (jit_breakpoint_re_set_internal): Likewise.
6320         * printcmd.c (info_address_command): Likewise.
6321
6322 2018-05-29  Tom Tromey  <tom@tromey.com>
6323
6324         * windows-nat.c (handle_exception): Update fall-through comment.
6325
6326 2018-05-29  Tom Tromey  <tom@tromey.com>
6327
6328         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
6329         (struct program_space) <added_solibs>: Now a std::vector.
6330         * breakpoint.c (print_solib_event): Update.
6331         (check_status_catch_solib): Update.
6332         * progspace.c (clear_program_space_solib_cache): Update.
6333         * solib.c (update_solib_list): Update.
6334
6335 2018-05-29  Tom Tromey  <tom@tromey.com>
6336
6337         * python/py-type.c (typy_richcompare): Update.
6338         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6339         * gdbtypes.h (types_deeply_equal): Return bool.
6340         (types_equal): Likewise.
6341         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
6342         declare VEC.
6343         (check_types_equal): Change worklist to std::vector.  Return
6344         bool.
6345         (struct type_equality_entry): Add constructor.
6346         (compare_maybe_null_strings): Return bool.
6347         (check_types_worklist): Return bool.  Change worklist to
6348         std::vector.
6349         (types_deeply_equal): Use std::vector.
6350         (types_equal): Return bool.
6351         (compare_maybe_null_strings): Simplify.
6352
6353 2018-05-29  Tom Tromey  <tom@tromey.com>
6354
6355         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
6356
6357 2018-05-29  Tom Tromey  <tom@tromey.com>
6358
6359         * objc-lang.h: Don't include cp-support.h.
6360         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
6361         declare VEC.
6362
6363 2018-05-27  Tom Tromey  <tom@tromey.com>
6364
6365         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6366
6367 2018-05-25  Tom Tromey  <tom@tromey.com>
6368
6369         * value.c (value::location): Initialize.
6370
6371 2018-05-25  Tom Tromey  <tom@tromey.com>
6372
6373         * dbxread.c (init_bincl_list): Remove.
6374         (bincl_list): Now a std::vector.
6375         (bincls_allocated, next_bincl): Remove.
6376         (free_bincl_list, do_free_bincl_list_cleanup)
6377         (make_cleanup_free_bincl_list): Remove.
6378         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6379         unique_xmalloc_ptr.
6380         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6381         (struct header_file_location): Add constructor.
6382         (add_bincl_to_list): Remove.
6383
6384 2018-05-25  Tom Tromey  <tom@tromey.com>
6385
6386         * tui/tui.c (tui_enable): Update.
6387         * mi/mi-interp.c (mi_interp::init): Update.
6388         * interps.h (class interp) <name>: New method.
6389         <m_name>: Rename from name.
6390         (~scoped_restore_interp): Update.
6391         * interps.c (interp::interp): Update.
6392         (interp_add, interp_set, interp_lookup_existing)
6393         (current_interp_named_p): Update.
6394
6395 2018-05-25  Tom Tromey  <tom@tromey.com>
6396
6397         * interps.c (interp_name): Remove.
6398         * mi/mi-interp.c (mi_interp::init): Update.
6399         * interps.h (interp_name): Remove.
6400         (~scoped_restore_interp): Update.
6401         * tui/tui.c (tui_enable): Update.
6402
6403 2018-05-25  Tom Tromey  <tom@tromey.com>
6404
6405         * utils.c (fputs_maybe_filtered): Update.
6406         * linespec.c (decode_line_full): Update.
6407         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6408         (mi_print_breakpoint_for_event, mi_solib_loaded)
6409         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6410         (mi_user_selected_context_changed): Update.
6411         * mi/mi-main.c (mi_execute_command): Update.
6412         * cli/cli-script.c (execute_control_command): Update.
6413         * python/python.c (execute_gdb_command): Update.
6414         * solib.c (info_sharedlibrary_command): Update.
6415         * interps.c (interp_ui_out): Remove.
6416         * interps.h (interp_ui_out): Remove.
6417
6418 2018-05-25  Tom Tromey  <tom@tromey.com>
6419
6420         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6421         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6422         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6423
6424 2018-05-25  Tom Tromey  <tom@tromey.com>
6425
6426         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6427         * interps.c (interp_exec): Use scoped_restore.
6428
6429 2018-05-25  Tom Tromey  <tom@tromey.com>
6430
6431         * remote.c (remote_target::remote_file_get): Use
6432         gdb::byte_vector.
6433         (remote_target::remote_file_put): Likewise.
6434
6435 2018-05-25  Tom Tromey  <tom@tromey.com>
6436
6437         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6438         a std::string.
6439         (get_pe_section_index, add_pe_exported_sym): Update.
6440         (read_pe_exported_syms): Use gdb::def_vector.
6441
6442 2018-05-25  Tom Tromey  <tom@tromey.com>
6443
6444         * frame.c (remove_prev_frame): Remove.
6445         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6446
6447 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
6448
6449         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6450         Remove prototypes.
6451         * mips-linux-nat.c (supply_fpregset): Always call
6452         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6453         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6454         `mips_fill_fpregset'.
6455         * mips-linux-tdep.c (mips_supply_fpregset)
6456         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6457         (mips_fill_fpregset_wrapper): Remove functions.
6458         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6459         (mips_linux_fpregset): Remove variable.
6460         (mips_linux_iterate_over_regset_sections): Use
6461         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6462         (mips_linux_o32_sigframe_init): Remove comment.
6463
6464 2018-05-25  Pedro Alves  <palves@redhat.com>
6465
6466         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6467         (struct readahead_cache, struct packet_reg, struct
6468         remote_arch_state, class remote_state): Move higher up in the
6469         file.
6470         (remote_target::m_remote_state): Now an object instead of a pointer.
6471         (remote_target::get_remote_state): Adjust.
6472
6473 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6474
6475         * stack.c (select_and_print_frame): Delete.
6476         (struct function_bounds): Move struct within function.
6477         (func_command): Most content moved into new function
6478         find_frame_for_function, use new function, print result, add
6479         function comment.
6480         (find_frame_for_function): New function, now returns a result.
6481
6482 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6483
6484         * stack.c (iterate_over_block_arg_vars): Fix comment.
6485         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6486
6487 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6488
6489         PR gdb/23203
6490         * frame.c
6491         (scoped_restore_selected_frame::scoped_restore_selected_frame):
6492         Define.
6493         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6494         Define.
6495         * frame.h (class scoped_restore_selected_frame): New class.
6496         * stack.c (print_frame_local_vars): Remove catching and rethrowing
6497         of any exception, use scoped_restore_selected_frame to restore the
6498         frame instead.
6499
6500 2018-05-24  Pedro Alves  <palves@redhat.com>
6501
6502         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6503         override.
6504
6505 2018-05-23  Tom Tromey  <tom@tromey.com>
6506
6507         * complaints.c (struct complaints): Remove.
6508         (symfile_complaint_book): Remove.
6509         (series): New global.
6510         (complaint_internal): Update.
6511         (clear_complaints): Update.
6512
6513 2018-05-23  Tom Tromey  <tom@tromey.com>
6514
6515         * complaints.c (counters): New global.
6516         (struct complain): Remove.
6517         (struct complaints) <root>: Remove.
6518         (complaint_sentinel): Remove.
6519         (symfile_complaint_book): Update.
6520         (find_complaint) Remove.
6521         (complaint_internal, clear_complaints): Update.
6522
6523 2018-05-23  Tom Tromey  <tom@tromey.com>
6524
6525         * complaints.c (struct complain) <file, line>: Remove.
6526         (find_complaint): Remove file, line parameters.
6527         (complaint_internal): Update.
6528
6529 2018-05-23  Tom Tromey  <tom@tromey.com>
6530
6531         * complaints.c (vcomplaint): Remove.
6532         (complaint_internal) Merge in contents of vcomplaint.
6533
6534 2018-05-23  Tom Tromey  <tom@tromey.com>
6535
6536         * complaints.c (struct complaints) <explanation>: Remove.
6537         (symfile_explanations): Remove.
6538         (symfile_complaint_book): Update.
6539         (vcomplaint): Update.
6540         (struct explanation): Remove.
6541
6542 2018-05-23  Tom Tromey  <tom@tromey.com>
6543
6544         * complaints.c (symfile_complaints): Remove.
6545         (complaint_internal): Remove "complaints" parameter.
6546         (clear_complaints, vcomplaint): Remove "c" parameter.
6547         (get_complaints): Remove.
6548         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6549         (dwarf2_debug_line_missing_file_complaint)
6550         (dwarf2_debug_line_missing_end_sequence_complaint)
6551         (dwarf2_complex_location_expr_complaint)
6552         (dwarf2_const_value_length_mismatch_complaint)
6553         (dwarf2_section_buffer_overflow_complaint)
6554         (dwarf2_macro_malformed_definition_complaint)
6555         (dwarf2_invalid_attrib_class_complaint)
6556         (create_addrmap_from_index, dw2_symtab_iter_next)
6557         (dw2_expand_marked_cus)
6558         (dw2_debug_names_iterator::find_vec_in_debug_names)
6559         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6560         (create_debug_type_hash_table, init_cutu_and_read_dies)
6561         (partial_die_parent_scope, add_partial_enumeration)
6562         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6563         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6564         (read_import_statement, read_file_scope, create_dwo_cu_reader)
6565         (create_cus_hash_table, create_dwp_hash_table)
6566         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6567         (dwarf2_rnglists_process, dwarf2_ranges_process)
6568         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6569         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6570         (handle_struct_member_die, process_structure_scope)
6571         (read_array_type, read_common_block, read_module_type)
6572         (read_tag_pointer_type, read_typedef, read_base_type)
6573         (read_subrange_type, load_partial_dies, partial_die_info::read)
6574         (partial_die_info::read, partial_die_info::read)
6575         (partial_die_info::read, read_checked_initial_length_and_offset)
6576         (dwarf2_string_attr, read_formatted_entries)
6577         (dwarf_decode_line_header)
6578         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6579         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6580         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6581         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6582         (get_signatured_type, get_DW_AT_signature_type)
6583         (decode_locdesc, file_file_name, consume_improper_spaces)
6584         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6585         (dwarf_decode_macro_bytes, dwarf_decode_macros)
6586         (dwarf2_symbol_mark_computed, set_die_type)
6587         (read_attribute_value): Update.
6588         * stap-probe.c (handle_stap_probe, get_stap_base_address):
6589         Update.
6590         * dbxread.c (unknown_symtype_complaint)
6591         (lbrac_mismatch_complaint, repeated_header_complaint)
6592         (set_namestring, function_outside_compilation_unit_complaint)
6593         (read_dbx_symtab, process_one_symbol): Update.
6594         * gdbtypes.c (stub_noname_complaint): Update.
6595         * windows-nat.c (handle_unload_dll): Update.
6596         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6597         (decode_base_type): Update.
6598         * xcoffread.c (bf_notfound_complaint, ef_complaint)
6599         (eb_complaint, record_include_begin, record_include_end)
6600         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6601         (process_xcoff_symbol, read_symbol)
6602         (function_outside_compilation_unit_complaint)
6603         (scan_xcoff_symtab): Update.
6604         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6605         * buildsym.c (finish_block_internal, make_blockvector)
6606         (end_symtab_get_static_block, augment_type_symtab): Update.
6607         * dtrace-probe.c (dtrace_process_dof)
6608         (dtrace_static_probe_ops::get_probes): Update.
6609         * complaints.h (struct complaint): Don't declare.
6610         (symfile_complaints): Remove.
6611         (complaint_internal): Remove "complaints" parameter.
6612         (complaint): Likewise.
6613         (clear_complaints): Likewise.
6614         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6615         (reread_symbols): Update.
6616         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6617         (dwarf2_frame_cache, decode_frame_entry): Update.
6618         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6619         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6620         (info_selectors_command): Update.
6621         * macrotab.c (macro_include, check_for_redefinition)
6622         (macro_undef): Update.
6623         * objfiles.c (filter_overlapping_sections): Update.
6624         * stabsread.c (invalid_cpp_abbrev_complaint)
6625         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6626         (define_symbol, error_type, read_type, rs6000_builtin_type)
6627         (stabs_method_name_from_physname, read_member_functions)
6628         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6629         (attach_fields_to_type, complain_about_struct_wipeout)
6630         (read_range_type, read_args, common_block_start)
6631         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6632         Update.
6633         * mdebugread.c (index_complaint, unknown_ext_complaint)
6634         (basic_type_complaint, bad_tag_guess_complaint)
6635         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6636         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6637         (parse_procedure, parse_lines)
6638         (function_outside_compilation_unit_complaint)
6639         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6640         (bad_tag_guess_complaint, reg_value_complaint): Update.
6641         * cp-support.c (demangled_name_complaint): Update.
6642         * macroscope.c (sal_macro_scope): Update.
6643         * dwarf-index-write.c (class debug_names): Update.
6644
6645 2018-05-23  Tom Tromey  <tom@tromey.com>
6646
6647         * complaints.c (clear_complaints): Remove "noisy" parameter.
6648         * complaints.h (clear_complaints): Update.
6649         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6650         (reread_symbols): Update.
6651
6652 2018-05-23  Tom Tromey  <tom@tromey.com>
6653
6654         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6655         SUBSEQUENT_MESSAGE.
6656         (vcomplaint, clear_complaints): Update.
6657         (symfile_explanations): Remove some messages.
6658
6659 2018-05-23  Tom Tromey  <tom@tromey.com>
6660
6661         * complaints.c (internal_complaint): Remove.
6662         * complaints.h (internal_complaint): Remove.
6663
6664 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6665
6666         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6667
6668 2018-05-22  Pedro Alves  <palves@redhat.com>
6669
6670         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6671         (remote_fileio_badfd, remote_fileio_return_errno)
6672         (remote_fileio_return_success, remote_fileio_func_open)
6673         (remote_fileio_func_open, remote_fileio_func_close)
6674         (remote_fileio_func_read, remote_fileio_func_write)
6675         (remote_fileio_func_lseek, remote_fileio_func_rename)
6676         (remote_fileio_func_unlink, remote_fileio_func_stat)
6677         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6678         (remote_fileio_func_isatty, remote_fileio_func_system): Add
6679         remote_target parameter.
6680         (remote_fio_func_map) <func>: Add remote_target parameter.
6681         (do_remote_fileio_request, remote_fileio_request):
6682         * remote-fileio.h (remote_fileio_request):
6683         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6684         remote_target parameter.
6685         (remote_notif_process, handle_notification): Adjust to pass down
6686         the remote.
6687         (remote_notif_state_allocate): Add remote_target parameter.  Save
6688         it.
6689         * remote-notif.h (struct remote_target): Forward declare.
6690         (struct notif_client) <parse, ack, can_get_pending_events>: Add
6691         remote_target parameter.
6692         (struct remote_notif_state) <remote>: New field.
6693         (remote_notif_ack, remote_notif_parse): Add remote_target
6694         parameter.
6695         (remote_notif_state_allocate, remote_notif_state_allocate): Add
6696         remote_target parameter.
6697         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6698         (threads_listing_context, rmt_thread_action, protocol_feature)
6699         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6700         (packet_result, struct threads_listing_context, remote_state):
6701         Move definitions and declarations higher up.
6702         (remote_target) <~remote_target>: Declare.
6703         (remote_download_command_source, remote_file_put, remote_file_get)
6704         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6705         (remote_hostio_pread_vFile, remote_hostio_send_command)
6706         (remote_hostio_set_filesystem, remote_hostio_open)
6707         (remote_hostio_close, remote_hostio_unlink, remote_state)
6708         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6709         (get_memory_write_packet_size, get_memory_read_packet_size)
6710         (append_pending_thread_resumptions, remote_detach_1)
6711         (append_resumption, remote_resume_with_vcont)
6712         (add_current_inferior_and_thread, wait_ns, wait_as)
6713         (process_stop_reply, remote_notice_new_inferior)
6714         (process_initial_stop_replies, remote_add_thread)
6715         (btrace_sync_conf, remote_btrace_maybe_reopen)
6716         (remove_new_fork_children, kill_new_fork_children)
6717         (discard_pending_stop_replies, stop_reply_queue_length)
6718         (check_pending_events_prevent_wildcard_vcont)
6719         (discard_pending_stop_replies_in_queue, stop_reply)
6720         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6721         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6722         (remote_interrupt_as, remote_interrupt_ns)
6723         (remote_get_noisy_reply, remote_query_attached)
6724         (remote_add_inferior, remote_current_thread, get_current_thread)
6725         (set_thread, set_general_thread, set_continue_thread)
6726         (set_general_process, write_ptid)
6727         (remote_unpack_thread_info_response, remote_get_threadinfo)
6728         (parse_threadlist_response, remote_get_threadlist)
6729         (remote_threadlist_iterator, remote_get_threads_with_ql)
6730         (remote_get_threads_with_qxfer)
6731         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6732         (get_offsets, remote_check_symbols, remote_supported_packet)
6733         (remote_query_supported, remote_packet_size)
6734         (remote_serial_quit_handler, remote_detach_pid)
6735         (remote_vcont_probe, remote_resume_with_hc)
6736         (send_interrupt_sequence, interrupt_query)
6737         (remote_notif_get_pending_events, fetch_register_using_p)
6738         (send_g_packet, process_g_packet, fetch_registers_using_g)
6739         (store_register_using_P, store_registers_using_G)
6740         (set_remote_traceframe, check_binary_download)
6741         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6742         (remote_xfer_live_readonly_partial, remote_read_bytes)
6743         (remote_send_printf, remote_flash_write, readchar)
6744         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6745         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6746         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6747         (extended_remote_disable_randomization, extended_remote_run)
6748         (send_environment_packet, extended_remote_environment_support)
6749         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6750         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6751         (packet_command): Now methods of ...
6752         (remote_target): ... this class.
6753         (m_remote_state) <remote_target>: New field.
6754         (struct remote_state) <stop_reply_queue,
6755         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6756         fields.
6757         (remote_state::remote_state): Allocate stop_reply_queue.
6758         (remote_state): Delete global.
6759         (get_remote_state_raw): Delete.
6760         (remote_target::get_remote_state): Allocate m_remote_state on
6761         demand.
6762         (get_current_remote_target): New.
6763         (remote_ops, extended_remote_ops): Delete.
6764         (wait_forever_enabled_p, remote_async_inferior_event_token):
6765         Delete, moved to struct remote_state.
6766         (remote_target::close): Delete self.  Destruction bits split to
6767         ...
6768         (remote_target::~remote_target): ... this.
6769         (show_memory_packet_size): Adjust to use
6770         get_current_remote_target.
6771         (struct protocol_feature) <func>: Add remote_target parameter.
6772         All callers adjusted.
6773         (curr_quit_handler_target): New.
6774         (remote_serial_quit_handler): Reimplement.
6775         (remote_target::open_1): Adjust to use get_current_remote_target.
6776         Heap-allocate remote_target/extended_remote_target instances.
6777         (vcont_builder::vcont_builder): Add remote_target parameter, and
6778         save it in m_remote.  All callers adjusted.
6779         (vcont_builder::m_remote): New field.
6780         (vcont_builder::restart, vcont_builder::flush)
6781         (vcont_builder::push_action): Use it.
6782         (remote_target::commit_resume): Use it.
6783         (struct queue_iter_param) <remote>: New field.
6784         (remote_target::remove_new_fork_children): Fill in 'remote' field.
6785         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6786         (check_pending_event_prevents_wildcard_vcont_callback)
6787         (remote_target::check_pending_events_prevent_wildcard_vcont)
6788         (remote_target::discard_pending_stop_replies)
6789         (remote_target::discard_pending_stop_replies_in_queue)
6790         (remote_target::remote_notif_remove_queued_reply): Fill in
6791         'remote' field.
6792         (remote_notif_get_pending_events): New.
6793         (remote_target::readchar, remote_target::remote_serial_write):
6794         Save/restore curr_quit_handler_target.
6795         (putpkt): New.
6796         (kill_new_fork_children): Fill in 'remote' field.
6797         (packet_command): Use get_current_remote_target, defer to
6798         remote_target method of same name.
6799         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6800         parameter, and save it in m_remote.  All callers adjusted.
6801         (scoped_remote_fd::release): Use m_remote.
6802         (scoped_remote_fd::m_remote): New field.
6803         (remote_file_put, remote_file_get, remote_file_delete): Use
6804         get_current_remote_target, defer to remote_target method of same
6805         name.
6806         (remote_btrace_reset): Add remote_state paremeter.  Update all
6807         callers.
6808         (remote_async_inferior_event_handler). Pass down 'data'.
6809         (remote_new_objfile): Use get_current_remote_target.
6810         (remote_target::vcont_r_supported): New.
6811         (set_range_stepping): Use get_current_remote_target and
6812         remote_target::vcont_r_supported.
6813         (_initialize_remote): Don't allocate 'remote_state' and
6814         'stop_reply_queue' globals.
6815         * remote.h (struct remote_target): Forward declare.
6816         (getpkt, putpkt, remote_notif_get_pending_events): Add
6817         'remote_target' parameter.
6818
6819 2018-05-22  Pedro Alves  <palves@redhat.com>
6820
6821         * remote.c (vcont_builder): Now a class.  Make all data members
6822         private.
6823         (vcont_builder) <vcont_builder, restart, flush, push_action>:
6824         Declare methods.
6825         (vcont_builder_restart): Rename to ...
6826         (vcont_builder::restart): ... this.
6827         (vcont_builder_flush): Rename to ...
6828         (vcont_builder::flush): ... this.
6829         (vcont_builder_push_action): Rename to ...
6830         (vcont_builder::push_action): ... this.
6831         (remote_target::commit_resume): Adjust.
6832
6833 2018-05-22  Pedro Alves  <palves@redhat.com>
6834
6835         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6836         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6837         (get_fixed_memory_packet_size): New.
6838         (get_memory_packet_size): Use it.
6839         (set_memory_packet_size): Don't override the config size with
6840         DEFAULT_MAX_MEMORY_PACKET_SIZE.
6841         (show_memory_packet_size): Use get_fixed_memory_packet_size.
6842         Don't refer to get_memory_packet_size if not connected to a remote
6843         target.  Show "(default)" if configured size is 0.
6844
6845 2018-05-22  Pedro Alves  <palves@redhat.com>
6846
6847         * remote.c (remote_target::mourn_inferior): Move
6848         discard_pending_stop_replies call here from ...
6849         (_initialize_remote): ... here.
6850
6851 2018-05-22  Pedro Alves  <palves@redhat.com>
6852
6853         * remote.c (compare_section_command): Remove set_general_process
6854         call.
6855
6856 2018-05-22  Pedro Alves  <palves@redhat.com>
6857
6858         * remote.c (struct packet_reg, struct remote_arch_state):
6859         Move higher up in the file.
6860         (remote_state) <m_arch_states>: Store remote_arch_state values
6861         instead of remote_arch_state pointers.
6862         (remote_state::get_remote_arch_state): Adjust.
6863
6864 2018-05-22  Pedro Alves  <palves@redhat.com>
6865
6866         * remote.c: Include <unordered_map>.
6867         (remote_state): Now a class.
6868         (remote_state) <get_remote_arch_state>: Declare method.
6869         <get_remote_arch_state>: New field.
6870         (remote_arch_state) <remote_arch_state>: Declare ctor.
6871         <regs>: Now a unique_ptr.
6872         (remote_gdbarch_data_handle): Delete.
6873         (get_remote_arch_state): Delete.
6874         (remote_state::get_remote_arch_state): New.
6875         (get_remote_state): Adjust to call remote_state's
6876         get_remote_arch_state method.
6877         (init_remote_state): Delete, bits factored out to ...
6878         (remote_arch_state::remote_arch_state): ... this new method.
6879         (get_remote_packet_size, get_memory_packet_size)
6880         (process_g_packet, remote_target::fetch_registers)
6881         (remote_target::prepare_to_store, store_registers_using_G)
6882         (remote_target::store_registers, remote_target::get_trace_status):
6883         Adjust to call remote_state's method.
6884         (_initialize_remote): Remove reference to
6885         remote_gdbarch_data_handle.
6886
6887 2018-05-22  Pedro Alves  <palves@redhat.com>
6888
6889         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6890         pread>: New method declarations.
6891         (remote_target::open_1): Adjust.
6892         (readahead_cache_invalidate): Rename to ...
6893         (readahead_cache::invalidate): ... this, and adjust to be a class
6894         method.
6895         (readahead_cache_invalidate_fd): Rename to ...
6896         (readahead_cache::invalidate_fd): ... this, and adjust to be a
6897         class method.
6898         (remote_hostio_pwrite): Adjust.
6899         (remote_hostio_pread_from_cache): Rename to ...
6900         (readahead_cache::pread): ... this, and adjust to be a class
6901         method.
6902         (remote_hostio_close): Adjust.
6903
6904 2018-05-22  Pedro Alves  <palves@redhat.com>
6905
6906         * remote.c (remote_hostio_close_cleanup): Delete.
6907         (class scoped_remote_fd): New.
6908         (remote_file_put, remote_file_get): Use it.
6909
6910 2018-05-22  Pedro Alves  <palves@redhat.com>
6911
6912         (struct vCont_action_support): Use bool and initialize all fields.
6913         (struct readahead_cache): Initialize all fields.
6914         (remote_state): Use bool and initialize all fields.
6915         (remote_state::remote_state, remote_state::~remote_state): New.
6916         (new_remote_state): Delete.
6917         (_initialize_remote): Use new to allocate remote_state.
6918
6919 2018-05-22  Pedro Alves  <palves@redhat.com>
6920             張俊芝  <zjz@zjz.name>
6921
6922         PR gdb/22973
6923         * c-exp.y: Include "c-support.h".
6924         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6925         of tolower.  Use c_ident_is_alpha to scan names.
6926         * c-lang.c: Include "c-support.h".
6927         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6928         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6929         * c-support.h: New file, with bits factored out from ...
6930         * cp-name-parser.y: ... this file.
6931         Include "c-support.h".
6932         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6933         c-support.h and renamed.
6934         (symbol_end, yylex): Adjust.
6935
6936 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6937
6938         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6939         parameter type to CORE_ADDR.
6940         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6941         parameter type in declaration to CORE_ADDR.
6942         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6943         target_auxv_search to get AT_HWCAP and use the result to get the
6944         target description.
6945         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
6946         to CORE_ADDR. Remove the cast of the return value to unsigned
6947         long. Fix error predicate of target_auxv_search.
6948         (ppc_linux_nat_target::read_description): Change the type of the
6949         hwcap variable to CORE_ADDR.
6950
6951 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6952
6953         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
6954         if the size of fpscr is larger than 32 bits.
6955
6956 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6957
6958         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
6959         (ppc32_linux_vsxregmap): New global.
6960         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
6961         regcache_supply_regset, and regcache_collect_regset.
6962         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
6963         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
6964         (fetch_vsx_register, store_vsx_register): Remove.
6965         (fetch_vsx_registers): Add regno parameter. Get regset using
6966         ppc_linux_vsxregset. Use regset to supply registers.
6967         (store_vsx_registers): Add regno parameter. Get regset using
6968         ppc_linux_vsxregset. Use regset to collect registers.
6969         (fetch_register): Call fetch_vsx_registers instead of
6970         fetch_vsx_register.
6971         (store_register): Call store_vsx_registers instead of
6972         store_vsx_register.
6973         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
6974         new regno parameter.
6975         (store_ppc_registers): Call store_vsx_registers with -1 for the
6976         new regno parameter.
6977         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
6978         (ppc_collect_vsxregset): Remove.
6979
6980 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6981
6982         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
6983         offset fields.
6984         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
6985         for vector register offset fields.
6986         (ppc64_fbsd_reg_offsets): Likewise.
6987         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6988         to vector register offset fields.
6989         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
6990         to vector register offset fields.
6991         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
6992         vector register offset fields.
6993         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
6994         initializers for vector register offset fields.
6995         (rs6000_aix64_reg_offsets): Likewise.
6996         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
6997         (ppc_supply_vrregset): Remove.
6998         (ppc_collect_vrregset): Remove.
6999         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7000         (ppc_linux_vrregset) : New function.
7001         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7002         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7003         (ppc32_linux_vrregset): Remove.
7004         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7005         and use result instead of ppc32_linux_vrregset.
7006         (ppc32_linux_reg_offsets): Remove initializers for vector register
7007         offset fields.
7008         (ppc64_linux_reg_offsets): Likewise.
7009         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7010         * ppc-linux-nat.c: Include regset.h.
7011         (gdb_vrregset_t): Adjust comment to account for little-endian
7012         mode.
7013         (supply_vrregset, fill_vrregset): Remove.
7014         (fetch_altivec_register, store_altivec_register): Remove.
7015         (fetch_altivec_registers): Add regno parameter. Get regset using
7016         ppc_linux_vrregset. Use regset to supply registers.
7017         (store_altivec_registers): Add regno parameter. Get regset using
7018         ppc_linux_vrregset. Use regset to collect registers.
7019         (fetch_register): Call fetch_altivec_registers instead of
7020         fetch_altivec_register.
7021         (store_register): Call store_altivec_registers instead of
7022         store_altivec_register.
7023         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7024         the new regno parameter.
7025         (store_ppc_registers): Call store_altivec_registers with -1 for
7026         the new regno parameter.
7027
7028 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7029
7030         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7031         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7032         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7033         (gdb_vrregset_t): Change array type size to
7034         PPC_LINUX_SIZEOF_VRREGSET.
7035         (gdb_vsxregset_t): Change array type size to
7036         PPC_LINUX_SIZEOF_VSXREGSET.
7037         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7038         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7039         PPC_LINUX_SIZEOF_VSXREGSET.
7040
7041 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7042
7043         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7044         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7045         nat/ppc-linux.c.
7046         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7047         ppc_linux_target_wordsize with tid.
7048         (ppc_linux_nat_target::read_description): Call ppc_linux_target
7049         wordsize with tid.
7050         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7051         (ppc64_64bit_inferior_p): Add static and inline specifiers.
7052         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7053         tid parameter. Remove static specifier.
7054         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7055         (ppc_linux_target_wordsize): New declaration.
7056
7057 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7058
7059         * arch/ppc-linux-common.c: New file.
7060         * arch/ppc-linux-common.h: New file.
7061         * arch/ppc-linux-tdesc.h: New file.
7062         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7063         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7064         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7065         arch/ppc-linux-tdesc.h.
7066         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7067         arch/ppc-linux-tdesc.h.
7068         (ppc_linux_nat_target::read_description): Remove target
7069         description matching code. Fill a ppc_linux_features struct and
7070         call ppc_linux_match_description with it. Move comment about ISA
7071         2.05 to ppc-linux-common.c.
7072         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7073         arch/ppc-linux-tdesc.h.
7074         (ppc_linux_core_read_description): Remove target description
7075         matching code. Fill a ppc_linux_features struct and call
7076         ppc_linux_match_description with it.
7077         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7078         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7079         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7080         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7081         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7082         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7083         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7084         (tdesc_powerpc_e500l): Remove.
7085
7086 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
7087
7088         * ada-lang.c (catch_assert_command): Pass empty string instead
7089         of NULL for excep_string argument.
7090
7091 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7092
7093         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7094         the width of the requested register exceeds the width of the
7095         `ptrace' data type.
7096
7097 2018-05-21  Tom Tromey  <tom@tromey.com>
7098
7099         * printcmd.c (output_command): Remove.
7100         (output_command_const): Rename to output_command.
7101         * valprint.h (output_command): Rename from output_command_const.
7102         * tracepoint.c (trace_dump_actions): Call output_command.
7103
7104 2018-05-21  Tom Tromey  <tom@tromey.com>
7105
7106         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7107         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7108         * ada-lang.h (create_ada_exception_catchpoint): Update.
7109         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7110         std::string.
7111         (create_excep_cond_exprs, ~ada_catchpoint)
7112         (should_stop_exception, print_one_exception)
7113         (print_mention_exception, print_recreate_exception): Update.
7114         (ada_get_next_arg): Remove.
7115         (catch_ada_exception_command_split): Use std::string.  Change type
7116         of "excep_string", "cond_string".
7117         (catch_ada_exception_command): Update.
7118         (create_ada_exception_catchpoint): Change type of excep_string.
7119         (ada_exception_sal): Remove excep_string parameter.
7120         (~ada_catchpoint): Remove.
7121
7122 2018-05-21  Tom Tromey  <tom@tromey.com>
7123
7124         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7125         cleanup.
7126
7127 2018-05-21  Tom Tromey  <tom@tromey.com>
7128
7129         * ada-lang.c (ada_exception_message_1, ada_exception_message):
7130         Return unique_xmalloc_ptr.
7131         (print_it_exception): Update.
7132
7133 2018-05-21  Tom Tromey  <tom@tromey.com>
7134
7135         * tracepoint.c (trace_dump_actions): Use std::string.
7136
7137 2018-05-21  Tom Tromey  <tom@tromey.com>
7138
7139         * symfile.c (reread_symbols): Use std::string for original_name.
7140
7141 2018-05-21  Tom Tromey  <tom@tromey.com>
7142
7143         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7144         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
7145         constructor.
7146
7147 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
7148
7149         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7150         instance to...
7151         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7152         * objfiles.c (get_objfile_bfd_data): Allocate
7153         objfile_per_bfd_storage with obstack_new when allocating on
7154         obstack.
7155
7156 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7157
7158         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7159         OBSTACK_ZALLOC.
7160         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7161         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7162         * mdebugread.c (mdebug_build_psymtabs): Likewise.
7163         (add_pending): Likewise.
7164         (parse_symbol): Likewise.
7165         (parse_partial_symbols): Likewise.
7166         (psymtab_to_symtab_1): Likewise.
7167         (new_psymtab): Likewise.
7168         (elfmdebug_build_psymtabs): Likewise.
7169         * minsyms.c (terminate_minimal_symbol_table): Likewise.
7170         * objfiles.c (get_objfile_bfd_data): Likewise.
7171         (objfile_register_static_link): Likewise.
7172         * psymtab.c (allocate_psymtab): Likewise.
7173         * stabsread.c (read_member_functions): Likewise.
7174         * xcoffread.c (xcoff_end_psymtab): Likewise.
7175
7176 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7177
7178         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7179         compiler supports std::is_trivially_constructible.
7180         * common/poison.h: Include obstack.h.
7181         (IsMallocable): Define to is_trivially_constructible if the
7182         compiler supports it, define to true_type otherwise.
7183         (xobnew): New.
7184         (XOBNEW): Redefine.
7185         (xobnewvec): New.
7186         (XOBNEWVEC): Redefine.
7187         * gdb_obstack.h (obstack_zalloc): New.
7188         (OBSTACK_ZALLOC): Redefine.
7189         (obstack_calloc): New.
7190         (OBSTACK_CALLOC): Redefine.
7191         (obstack_new): New.
7192         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7193         (gdbarch_obstack): New declaration in gdbarch.h, definition in
7194         gdbarch.c.
7195         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7196         obstack_calloc/obstack_zalloc.
7197         (gdbarch_obstack_zalloc): Remove.
7198         * target-descriptions.c (tdesc_data_init): Use obstack_new.
7199
7200 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7201
7202         * stack.c (backtrace_command_1): Remove useless variable int i.
7203
7204 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7205
7206         * stack.c (print_frame_info): Fix comment.
7207
7208 2018-05-18  Tom Tromey  <tom@tromey.com>
7209
7210         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7211         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7212         (~dwarf2_per_objfile): Update
7213         (dwarf2_get_dwz_file): Use new.
7214         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7215         unique_ptr.
7216
7217 2018-05-18  Tom Tromey  <tom@tromey.com>
7218
7219         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7220         unique_ptr.
7221         * dwarf2read.c (struct dwp_file): Add constructor and
7222         initializers.
7223         (open_and_init_dwp_file): Return a unique_ptr.
7224         (dwarf2_per_objfile, create_dwp_hash_table)
7225         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7226         (lookup_dwo_unit_in_dwp): Update.
7227         (open_and_init_dwp_file, get_dwp_file): Update.
7228
7229 2018-05-18  Tom Tromey  <tom@tromey.com>
7230
7231         * dwarf2read.c (dwarf2_per_objfile): Update.
7232         (struct mapped_index): Add initializers.
7233         (dwarf2_read_index): Use new.
7234         (dw2_symtab_iter_init): Update.
7235         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7236         unique_ptr.
7237
7238 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7239
7240         * dwarf2read.c (mapped_index) <total_size>: Remove.
7241
7242 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7243
7244         * unittests/format_pieces-selftests.c (test_format_specifier):
7245         Add ARI comments.
7246
7247 2018-05-18  Tom Tromey  <tom@tromey.com>
7248
7249         * c-typeprint.c (maybe_print_hole): New function.
7250         (c_print_type_struct_field_offset): Update.
7251         (c_type_print_base_struct_union): Call maybe_print_hole.
7252
7253 2018-05-17  Keith Seitz  <keiths@redhat.com>
7254
7255         * breakpoint.c (build_bpstat_chain): New function, moved from
7256         bpstat_stop_status.
7257         (bpstat_stop_status): Add optional parameter, `stop_chain'.
7258         If no stop chain is passed, call build_bpstat_chain to build it.
7259         * breakpoint.h (build_bpstat_chain): Declare.
7260         (bpstat_stop_status): Move documentation here from breakpoint.c.
7261         * infrun.c (handle_signal_stop): Before eliding inlined frames,
7262         build the stop chain and pass it to skip_inline_frames.
7263         Pass this stop chain to bpstat_stop_status.
7264         * inline-frame.c: Include breakpoint.h.
7265         (stopped_by_user_bp_inline_frame): New function.
7266         (skip_inline_frames): Add parameter `stop_chain'.
7267         Move documention to inline-frame.h.
7268         If non-NULL, use stopped_by_user_bp_inline_frame to determine
7269         whether the frame should be elided.
7270         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7271         Add moved documentation and update for new parameter.
7272
7273 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7274
7275         PR cli/14975
7276         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7277         unittests/format_pieces-selftests.c.
7278         * common/format.h (format_piece) <operator==>: New.
7279         (format_pieces) <operator[]>: Remove.
7280         * common/format.c (format_pieces::format_pieces): Handle \e.
7281         * unittests/format_pieces-selftests.c: New.
7282
7283 2018-05-17  Tom Tromey  <tom@tromey.com>
7284
7285         PR symtab/23010:
7286         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7287         (dw2_instantiate_symtab): Add skip_partial parameter.
7288         (dw2_find_last_source_symtab, dw2_map_expand_apply)
7289         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7290         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7291         (dw2_expand_symtabs_matching_one)
7292         (dw2_find_pc_sect_compunit_symtab)
7293         (dw2_debug_names_lookup_symbol)
7294         (dw2_debug_names_expand_symtabs_for_function): Update.
7295         (init_cutu_and_read_dies): Add skip_partial parameter.
7296         (process_psymtab_comp_unit, build_type_psymtabs_1)
7297         (process_skeletonless_type_unit, load_partial_comp_unit)
7298         (psymtab_to_symtab_1): Update.
7299         (load_full_comp_unit): Add skip_partial parameter.
7300         (process_imported_unit_die, dwarf2_read_addr_index)
7301         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7302         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7303         (read_signatured_type): Update.
7304
7305 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7306
7307         * value.c (release_value): Remove unused variable.
7308         (record_latest_value): Likewise.
7309         (access_value_history): Likewise.
7310         (preserve_values): Likewise.
7311
7312 2018-05-17  Tom Tromey  <tom@tromey.com>
7313
7314         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7315         Initialize.
7316
7317 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
7318
7319         PR gdb/22286
7320         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7321         Also handle registers whose width is not a multiple of
7322         PTRACE_TYPE_RET.
7323         (linux_nat_trad_target::store_register): Likewise.
7324
7325 2018-05-16  Tom Tromey  <tom@tromey.com>
7326
7327         * gdbcore.h (core_bfd): Redefine.
7328         * corelow.c (core_target::close): Update.
7329         (core_target_open): Update.
7330         * progspace.h (struct program_space) <cbfd>: Now a
7331         gdb_bfd_ref_ptr.
7332
7333 2018-05-16  Tom Tromey  <tom@tromey.com>
7334
7335         PR cli/19551:
7336         * symfile-add-flags.h (enum symfile_add_flags)
7337         <SYMFILE_NOT_FILENAME>: New constant.
7338         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
7339         objfile name from BFD.
7340         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7341         * minidebug.c (find_separate_debug_file_in_section): Put
7342         ".gnu_debugdata" into BFD's file name.
7343
7344 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
7345
7346         * regcache.c (regcache_read_ftype, regcache_write_ftype):
7347         Remove.
7348
7349 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
7350
7351         PR binutils/21446
7352         * aarch64-tdep.c (aarch64_analyze_prologue,
7353         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7354         Indicate not interested in errors.
7355
7356 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7357
7358         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7359         Supply the MIPS_ZERO_REGNUM register.
7360
7361 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7362
7363         * mips-tdep.c (mask_address_var): Make variable static.
7364
7365 2018-05-14  Tom Tromey  <tom@tromey.com>
7366
7367         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7368
7369 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
7370
7371         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7372         FXSAVE_ADDR for the mxcsr register.
7373
7374 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
7375
7376         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7377
7378 2018-05-11  Pedro Alves  <palves@redhat.com>
7379
7380         * corelow.c (core_target) <core_target>: No longer inline.
7381         Initialize m_core_gdbarch, m_core_vec and build the section table
7382         here.
7383         <~core_target>: New.
7384         <core_gdbarch, get_core_register_section>: New methods.
7385         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7386         factored out from ...
7387         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7388         (core_ops): Delete.
7389         (sniff_core_bfd): Add gdbarch parameter.
7390         (core_close): Delete, merged into ...
7391         (core_target::close): ... here.  Delete self.
7392         (core_close_cleanup): Delete.
7393         (core_target_open): Allocate a core_target on the heap.  Use a
7394         unique_ptr instead of a cleanup.  Bits moved into the core_target
7395         ctor.  Adjust to use core_target methods instead of globals.
7396         (get_core_register_section): Rename to ...
7397         (core_target::get_core_register_section): ... this and adjust.
7398         (struct get_core_registers_cb_data): New.
7399         (get_core_registers_cb): Use it.  Use bool.
7400         (core_target::fetch_registers, core_target::files_info)
7401         (core_target::xfer_partial, core_target::read_description)
7402         (core_target::pid_to, core_target::thread_name): Adjust to
7403         reference class fields instead of globals.
7404         * target.h (struct target_ops_deleter, target_ops_up): New.
7405
7406 2018-05-11  Pedro Alves  <palves@redhat.com>
7407
7408         * corefile.c (core_file_command): Move to corelow.c.
7409         * corelow.c (the_core_target): Delete.
7410         (core_file_command): Moved from corefile.c.  Check exec_bfd
7411         instead of the_core_target.  Use target_detach instead of calling
7412         into the_core_target directly.
7413         (maybe_say_no_core_file_now): New.
7414         (core_target::detach): Use it.
7415         (_initialize_corelow): Remove references to the_core_target.
7416         * gdbcore.h (the_core_target): Delete.
7417
7418 2018-05-11  Tom Tromey  <tromey@redhat.com>
7419             Pedro Alves  <palves@redhat.com>
7420
7421         * corefile.c (core_bfd): Remove.
7422         * gdbcore.h (core_bfd): Now a macro.
7423         * progspace.h (struct program_space) <cbfd>: New field.
7424
7425 2018-05-11  Tom Tromey  <tom@tromey.com>
7426
7427         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7428         gdb::def_vector.
7429
7430 2018-05-10  Tom Tromey  <tom@tromey.com>
7431
7432         * configure: Rebuild.
7433         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7434
7435 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
7436
7437         PR server/23158:
7438         * regformats/regdat.sh: Adjust script, following the addition
7439         of the new expedite_regs parameter to init_target_desc.
7440
7441 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
7442     
7443         PR gdb/23127
7444         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7445         set_gdbarch_significant_addr_bit.
7446         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7447         set_gdbarch_significant_addr_bit.
7448         * utils.c (address_significant): Update to sign extend addr.
7449
7450 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
7451
7452         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7453         (xtensa_linux_init_abi): Limit tdep->num_regs by
7454         tdep->num_nopriv_regs.
7455         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7456         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7457         not initialized.
7458
7459 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
7460
7461         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7462
7463 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
7464
7465         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7466         (I387_MXCSR_INIT_VAL): New constant.
7467         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7468         buffer if it was supplied by the inferior.
7469         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7470         (i387_xsave_get_clear_bv): New function.
7471         (i387_supply_xsave): Only read x87 control registers from the
7472         xsave buffer if the feature is enabled, and the state will have
7473         been written, otherwise, provide a suitable default.
7474         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7475         including x87 control registers.  Update control registers if they
7476         have changed from the default value, and mark features as enabled
7477         as required.
7478         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7479
7480 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
7481
7482         * spu-tdep.c (info_spu_event_command): Fix output formatting.
7483
7484 2018-05-07  Tom Tromey  <tom@tromey.com>
7485
7486         * configure: Rebuild.
7487         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7488
7489 2018-05-07  Tom Tromey  <tom@tromey.com>
7490
7491         PR tdep/20362:
7492         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7493         bit.  Use correct value for VDIV.
7494
7495 2018-05-04  Tom Tromey  <tom@tromey.com>
7496
7497         * configure: Rebuild.
7498         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7499
7500 2018-05-04  Tom Tromey  <tom@tromey.com>
7501
7502         * linux-record.c (record_linux_system_call) <case
7503         RECORD_SYS_RECVFROM>: Add "break".
7504
7505 2018-05-04  Tom Tromey  <tom@tromey.com>
7506
7507         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7508         Add missing "break".
7509         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7510         Add missing "break".
7511
7512 2018-05-04  Tom Tromey  <tom@tromey.com>
7513
7514         * rs6000-tdep.c (ppc_process_record_op4)
7515         (ppc_process_record_op63): Add fall-through comment.
7516
7517 2018-05-04  Tom Tromey  <tom@tromey.com>
7518
7519         * i386-tdep.c (i386_process_record): Add fall-through comment.
7520
7521 2018-05-04  Tom Tromey  <tom@tromey.com>
7522
7523         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7524         comment.
7525
7526 2018-05-04  Tom Tromey  <tom@tromey.com>
7527
7528         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7529         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7530         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7531         comment.
7532         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7533         comment.
7534         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7535         comment.
7536
7537 2018-05-04  Tom Tromey  <tom@tromey.com>
7538
7539         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7540
7541 2018-05-04  Tom Tromey  <tom@tromey.com>
7542
7543         * s390-tdep.c (s390_process_record): Fix fall-through comments.
7544         * xcoffread.c (scan_xcoff_symtab): Move comment later.
7545         * symfile.c (section_is_mapped): Fix fall-through comment.
7546         * stabsread.c (define_symbol, read_member_functions): Fix
7547         fall-through comment.
7548         * s390-linux-tdep.c (s390_process_record): Fix fall-through
7549         comment.
7550         * remote.c (remote_wait_as): Fix fall-through comment.
7551         * p-exp.y (yylex): Fix fall-through comment.
7552         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7553         comment.
7554         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7555         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7556         * jv-exp.y (yylex): Fix fall-through comment.
7557         * go-exp.y (lex_one_token): Fix fall-through comment.
7558         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7559         fall-through comment.
7560         * f-exp.y (yylex): Fix fall-through comment.
7561         * dwarf2read.c (process_die): Fix fall-through comments.
7562         * dbxread.c (process_one_symbol): Fix fall-through comment.
7563         * d-exp.y (lex_one_token): Fix fall-through comment.
7564         * cp-name-parser.y (yylex): Fix fall-through comment.
7565         * coffread.c (coff_symtab_read): Fix fall-through comment.
7566         * c-exp.y (lex_one_token): Fix fall-through comment.
7567         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7568         comment.
7569         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7570         comment.
7571
7572 2018-05-04  Tom Tromey  <tom@tromey.com>
7573
7574         PR python/22730:
7575         * NEWS: Mention gdb.execute change.
7576         * gdbcmd.h (execute_control_command): Don't declare.
7577         * python/python.c (execute_gdb_command): Use read_command_lines_1,
7578         execute_control_commands, execute_control_commands_to_string.
7579         * cli/cli-script.h (execute_control_commands)
7580         (execute_control_commands_to_string): Declare.
7581         (execute_control_command): Add from_tty parameter.
7582         * cli/cli-script.c (execute_control_commands)
7583         (execute_control_commands_to_string): New functions.
7584         (execute_user_command): Use execute_control_commands.
7585         (execute_control_command_1): Add "from_tty" parameter.  Update.
7586         (execute_control_command): Likewise.
7587
7588 2018-05-04  Tom Tromey  <tom@tromey.com>
7589
7590         PR python/22731:
7591         * NEWS: Mention that breakpoint commands are writable.
7592         * python/py-breakpoint.c (bppy_set_commands): New function.
7593         (breakpoint_object_getset) <"commands">: Use it.
7594
7595 2018-05-04  Tom Tromey  <tom@tromey.com>
7596
7597         * tracepoint.c (actions_command): Update.
7598         * mi/mi-cmd-break.c (mi_command_line_array)
7599         (mi_command_line_array_cnt, mi_command_line_array_ptr)
7600         (mi_read_next_line): Remove.
7601         (mi_cmd_break_commands): Update.
7602         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7603         function_view.
7604         * cli/cli-script.c (get_command_line): Update.
7605         (process_next_line): Use function_view.  Constify.
7606         (recurse_read_control_structure, read_command_lines)
7607         (read_command_lines_1): Change argument types to function_view.
7608         (do_define_command, document_command): Update.
7609         * breakpoint.h (check_tracepoint_command): Don't declare.
7610         * breakpoint.c (check_tracepoint_command): Remove.
7611         (commands_command_1, create_tracepoint_from_upload): Update.
7612
7613 2018-05-04  Tom Tromey  <tom@tromey.com>
7614
7615         PR gdb/11750:
7616         * cli/cli-script.h (enum command_control_type) <define_control>:
7617         New constant.
7618         * cli/cli-script.c (multi_line_command_p): Handle define_control.
7619         (build_command_line, execute_control_command_1)
7620         (process_next_line): Likewise.
7621         (do_define_command): New function, extracted from define_command.
7622         (define_command): Use it.
7623
7624 2018-05-04  Tom Tromey  <tom@tromey.com>
7625
7626         * tracepoint.c (actions_command): Update.
7627         * cli/cli-script.h (read_command_lines): Update.
7628         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7629         (MAX_TMPBUF): Remove define.
7630         (define_command): Use string_printf.
7631         (document_command): Likewise.
7632         * breakpoint.c (commands_command_1): Update.
7633
7634 2018-05-04  Tom Tromey  <tom@tromey.com>
7635
7636         * top.c (execute_command): Update.
7637         * cli/cli-script.h (print_command_lines): Now varargs.
7638         * cli/cli-script.c (print_command_lines): Now varargs.
7639         (execute_control_command_1) <case while_control, case if_control>:
7640         Update.
7641
7642 2018-05-04  Tom Tromey  <tom@tromey.com>
7643
7644         * tracepoint.c (all_tracepoint_actions): Rename from
7645         all_tracepoint_actions_and_cleanup.  Change return type.
7646         (actions_command, encode_actions_1, encode_actions)
7647         (trace_dump_actions, tdump_command): Update.
7648         * remote.c (remote_download_command_source): Update.
7649         * python/python.c (gdbpy_eval_from_control_command)
7650         (python_command, python_interactive_command): Update.
7651         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7652         * guile/guile.c (guile_command)
7653         (gdbscm_eval_from_control_command, guile_command): Update.
7654         * compile/compile.c (compile_code_command)
7655         (compile_print_command, compile_to_object): Update.
7656         * cli/cli-script.h (struct command_lines_deleter): New.
7657         (counted_command_line): New typedef.
7658         (struct command_line): Add constructor, destructor.
7659         <body_list>: Remove.
7660         <body_list_0, body_list_1>: New members.
7661         (command_line_up): Remove typedef.
7662         (read_command_lines, read_command_lines_1, get_command_line):
7663         Update.
7664         (copy_command_lines): Don't declare.
7665         * cli/cli-script.c (build_command_line): Use "new".
7666         (get_command_line): Return counted_command_line.
7667         (print_command_lines, execute_user_command)
7668         (execute_control_command_1, while_command, if_command): Update.
7669         (realloc_body_list): Remove.
7670         (process_next_line, recurse_read_control_structure): Update.
7671         (read_command_lines, read_command_lines_1): Return counted_command_line.
7672         (free_command_lines): Use "delete".
7673         (copy_command_lines): Remove.
7674         (define_command, document_command, show_user_1): Update.
7675         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7676         a counted_command_line.
7677         * breakpoint.h (counted_command_line): Remove typedef.
7678         (breakpoint_set_commands): Update.
7679         * breakpoint.c (check_no_tracepoint_commands)
7680         (validate_commands_for_breakpoint): Update.
7681         (breakpoint_set_commands): Change commands to be a
7682         counted_command_line.
7683         (commands_command_1, update_dprintf_command_list)
7684         (create_tracepoint_from_upload): Update.
7685
7686 2018-05-04  Tom Tromey  <tom@tromey.com>
7687
7688         * cli/cli-decode.h (cmd_list_element): New constructor.
7689         (~cmd_list_element): New destructor.
7690         (struct cmd_list_element): Add initializers.
7691         * cli/cli-decode.c (do_add_cmd): Use "new".
7692         (delete_cmd): Use "delete".
7693
7694 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7695             Pedro Alves <palves@redhat.com>
7696
7697         PR breakpoints/19806 and support for PR external/20207.
7698         * NEWS: Mention Aarch64 watchpoint improvements.
7699         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7700         watchpoints and PR external/20207 watchpoints.
7701         * nat/aarch64-linux-hw-point.c
7702         (kernel_supports_any_contiguous_range): New.
7703         (aarch64_watchpoint_offset): New.
7704         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7705         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7706         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7707         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7708         next_addr_orig_p.  Support PR external/20207 watchpoints.
7709         (aarch64_downgrade_regs): New.
7710         (aarch64_dr_state_insert_one_point): New parameters offset and
7711         addr_orig.
7712         (aarch64_dr_state_remove_one_point): Likewise.
7713         (aarch64_handle_breakpoint): Update caller.
7714         (aarch64_handle_aligned_watchpoint): Likewise.
7715         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7716         aligned_offset.
7717         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7718         aarch64_downgrade_regs.
7719         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7720         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7721         (DR_CONTROL_MASK): ... this.
7722         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7723         (unsigned int aarch64_watchpoint_offset): New prototype.
7724         (aarch64_linux_set_debug_regs): Remove const from state.
7725         * utils.c (align_up, align_down): Move to ...
7726         * common/common-utils.c (align_up, align_down): ... here.
7727         * utils.h (align_up, align_down): Move to ...
7728         * common/common-utils.h (align_up, align_down): ... here.
7729
7730 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
7731
7732         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7733         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7734         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7735         Re-implement to match the ABI as summarized in GCC's
7736         gcc/config/sparc/sparc.c.  All callers updated.
7737         (sparc32_store_arguments): Remove assertion.
7738
7739 2018-05-04  Tom Tromey  <tom@tromey.com>
7740
7741         * printcmd.c: Don't include tui.h.
7742         (decode_format): Use skip_spaces.
7743
7744 2018-05-04  Tom Tromey  <tom@tromey.com>
7745
7746         PR gdb/22619:
7747         * printcmd.c (last_count): New global.
7748         (x_command): Use saved count when repeating.
7749
7750 2018-05-04  Tom Tromey  <tom@tromey.com>
7751
7752         * nto-procfs.c (do_closedir_cleanup): Remove.
7753         (procfs_pidlist): Use gdb_dir_up.
7754         * procfs.c (do_closedir_cleanup): Remove.
7755         (proc_update_threads): Use gdb_dir_up.
7756         * common/filestuff.h (struct gdb_dir_deleter): New.
7757         (gdb_dir_up): New typedef.
7758
7759 2018-05-04  Tom Tromey  <tom@tromey.com>
7760
7761         * ada-lang.c (print_mention_exception): Use std::string.
7762
7763 2018-05-04  Tom Tromey  <tom@tromey.com>
7764
7765         * ada-lang.c (create_excep_cond_exprs): Update.
7766         (ada_exception_catchpoint_cond_string): Use std::string.
7767
7768 2018-05-04  Tom Tromey  <tom@tromey.com>
7769
7770         * ada-lang.c (xget_renaming_scope): Return std::string.
7771         (old_renaming_is_invisible): Update.
7772
7773 2018-05-04  Tom Tromey  <tom@tromey.com>
7774
7775         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7776         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7777
7778 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7779
7780         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7781
7782 2018-05-04  Tom Tromey  <tom@tromey.com>
7783
7784         * remote.c (remote_query_supported_append): Change type.
7785         (remote_check_symbols): Update.
7786
7787 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
7788
7789         PR gdb/11420
7790         * configure.ac: Prepend libpython.
7791         * python/python-config.py: Likewise.
7792         * configure: Regenerate.
7793
7794 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7795
7796         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7797
7798 2018-05-03  Pedro Alves  <palves@redhat.com>
7799
7800         * s390-linux-nat.c
7801         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7802         override.  Write 'true' instead of '1'.
7803         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7804         declaration.
7805
7806 2018-05-02  Pedro Alves  <palves@redhat.com>
7807
7808         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7809         add_inf_child_target.
7810         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7811         add_inf_child_target.
7812         * aix-thread.c (aix_thread_target_info): New.
7813         (aix_thread_target) <shortname, longname, doc>: Delete.
7814         <info>: New.
7815         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7816         add_inf_child_target.
7817         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7818         add_inf_child_target.
7819         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7820         add_inf_child_target.
7821         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7822         add_inf_child_target.
7823         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7824         add_inf_child_target.
7825         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7826         add_inf_child_target.
7827         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7828         add_inf_child_target.
7829         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7830         add_inf_child_target.
7831         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7832         add_inf_child_target.
7833         * bfd-target.c (target_bfd_target_info): New.
7834         (target_bfd) <shortname, longname, doc>: Delete.
7835         <info>: New.
7836         * bsd-kvm.c (bsd_kvm_target_info): New.
7837         (bsd_kvm_target) <shortname, longname, doc>: Delete.
7838         <info>: New.
7839         (bsd_kvm_target::open): Rename to ...
7840         (bsd_kvm_target_open): ... this.  Adjust.
7841         * bsd-uthread.c (bsd_uthread_target_info): New.
7842         (bsd_uthread_target) <shortname, longname, doc>: Delete.
7843         <info>: New.
7844         * corefile.c (core_file_command): Adjust.
7845         * corelow.c (core_target_info): New.
7846         (core_target) <shortname, longname, doc>: Delete.
7847         <info>: New.
7848         (core_target::open): Rename to ...
7849         (core_target_open): ... this.  Adjust.
7850         * ctf.c (ctf_target_info): New.
7851         (ctf_target) <shortname, longname, doc>: Delete.
7852         <info>: New.
7853         (ctf_target::open): Rename to ...
7854         (ctf_target_open): ... this.
7855         (_initialize_ctf): Adjust.
7856         * exec.c (exec_target_info): New.
7857         (exec_target) <shortname, longname, doc>: Delete.
7858         <info>: New.
7859         (exec_target::open): Rename to ...
7860         (exec_target_open): ... this.
7861         * gdbcore.h (core_target_open): Declare.
7862         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7863         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7864         add_inf_child_target.
7865         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7866         add_inf_child_target.
7867         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7868         add_inf_child_target.
7869         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7870         add_inf_child_target.
7871         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7872         add_inf_child_target.
7873         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7874         add_inf_child_target.
7875         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7876         add_inf_child_target.
7877         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7878         add_inf_child_target.
7879         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7880         add_inf_child_target.
7881         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7882         add_inf_child_target.
7883         * inf-child.c (inf_child_target_info): New.
7884         (inf_child_target::info): New.
7885         (inf_child_open_target): Remove 'target' parameter.  Use
7886         get_native_target instead.
7887         (inf_child_target::open): Delete.
7888         (add_inf_child_target): New.
7889         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7890         Delete.
7891         <info>: New.
7892         (add_inf_child_target): Declare.
7893         (inf_child_open_target): Declare.
7894         * linux-thread-db.c (thread_db_target_info): New.
7895         (thread_db_target) <shortname, longname, doc>: Delete.
7896         <info>: New.
7897         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7898         add_inf_child_target.
7899         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7900         add_inf_child_target.
7901         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7902         add_inf_child_target.
7903         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7904         add_inf_child_target.
7905         * make-target-delegates (print_class): Adjust.
7906         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7907         add_inf_child_target.
7908         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7909         add_inf_child_target.
7910         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7911         add_inf_child_target.
7912         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7913         add_inf_child_target.
7914         * nto-procfs.c (nto_native_target_info): New.
7915         (nto_procfs_target_native) <shortname, longname, doc>:
7916         Delete.
7917         <info>: New.
7918         (nto_procfs_target_info): New.
7919         (nto_procfs_target_procfs) <shortname, longname, doc>:
7920         Delete.
7921         <info>: New.
7922         (init_procfs_targets): Adjust.
7923         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7924         add_inf_child_target.
7925         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7926         add_inf_child_target.
7927         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7928         add_inf_child_target.
7929         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7930         add_inf_child_target.
7931         * ravenscar-thread.c (ravenscar_target_info): New.
7932         (ravenscar_thread_target) <shortname, longname, doc>:
7933         Delete.
7934         <info>: New.
7935         * record-btrace.c (record_btrace_target_info):
7936         (record_btrace_target) <shortname, longname, doc>: Delete.
7937         <info>: New.
7938         (record_btrace_target::open): Rename to ...
7939         (record_btrace_target_open): ... this.  Adjust.
7940         * record-full.c (record_longname, record_doc): New.
7941         (record_full_base_target) <shortname, longname, doc>: Delete.
7942         <info>: New.
7943         (record_full_target_info): New.
7944         (record_full_target): <shortname>: Delete.
7945         <info>: New.
7946         (record_full_core_open_1, record_full_open_1): Update comments.
7947         (record_full_base_target::open): Rename to ...
7948         (record_full_open): ... this.
7949         (cmd_record_full_restore): Update.
7950         (_initialize_record_full): Update.
7951         * remote-sim.c (remote_sim_target_info): New.
7952         (gdbsim_target) <shortname, longname, doc>: Delete.
7953         <info>: New.
7954         (gdbsim_target::open): Rename to ...
7955         (gdbsim_target_open): ... this.
7956         (_initialize_remote_sim): Adjust.
7957         * remote.c (remote_doc): New.
7958         (remote_target_info): New.
7959         (remote_target) <shortname, longname, doc>: Delete.
7960         <info>: New.
7961         (extended_remote_target_info): New.
7962         (extended_remote_target) <shortname, longname, doc>: Delete.
7963         <info>: New.
7964         (remote_target::open_1): Make static.  Adjust.
7965         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
7966         * s390-linux-nat.c (_initialize_s390_nat): Use
7967         add_inf_child_target.
7968         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
7969         add_inf_child_target.
7970         * sol-thread.c (thread_db_target_info): New.
7971         (sol_thread_target) <shortname, longname, doc>: Delete.
7972         <info>: New.
7973         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
7974         add_inf_child_target.
7975         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
7976         add_inf_child_target.
7977         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
7978         add_inf_child_target.
7979         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
7980         add_inf_child_target.
7981         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
7982         add_inf_child_target.
7983         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
7984         add_inf_child_target.
7985         * spu-linux-nat.c (_initialize_spu_nat): Use
7986         add_inf_child_target.
7987         * spu-multiarch.c (spu_multiarch_target_info): New.
7988         (spu_multiarch_target) <shortname, longname, doc>: Delete.
7989         <info>: New.
7990         * target-delegates.c: Regenerate.
7991         * target.c: Include <unordered_map>.
7992         (target_ops_p): Delete.
7993         (DEF_VEC_P(target_ops_p)): Delete.
7994         (target_factories): New.
7995         (test_target_info): New.
7996         (test_target_ops::info): New.
7997         (open_target): Adjust to use target_factories.
7998         (add_target_with_completer): Rename to ...
7999         (add_target): ... this.  Change prototype.  Register target_info
8000         and open callback in target_factories.  Register target_info in
8001         command context instead of target_ops.
8002         (add_target): Delete old implementation.
8003         (add_deprecated_target_alias): Change prototype.  Adjust.
8004         (the_native_target): New.
8005         (set_native_target, get_native_target): New.
8006         (find_default_run_target): Use the_native_target.
8007         (find_attach_target, find_run_target): Simplify.
8008         (target_ops::open): Delete.
8009         (dummy_target_info): New.
8010         (dummy_target::shortname, dummy_target::longname)
8011         (dummy_target::doc): Delete.
8012         (dummy_target::info): New.
8013         (debug_target::shortname, debug_target::longname)
8014         (debug_target::doc): Delete.
8015         (debug_target::info): New.
8016         * target.h (struct target_info): New.
8017         (target_ops::~target_ops): Add comment.
8018         (target_ops::info): New.
8019         (target_ops::shortname, target_ops::longname, target_ops::doc): No
8020         longer virtual.  Implement in terms of target_info.
8021         (set_native_target, get_native_target): Declare.
8022         (target_open_ftype): New.
8023         (add_target, add_target_with_completer)
8024         (add_deprecated_target_alias): Change prototype.
8025         (test_target) <shortname, longname, doc>: Delete.
8026         <info>: New.
8027         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8028         add_inf_child_target.
8029         * tracefile-tfile.c (tfile_target_info): New.
8030         (tfile_target) <shortname, longname, doc>: Delete.
8031         <info>: New.
8032         (tfile_target::open): Rename to ...
8033         (tfile_target_open): ... this.
8034         (_initialize_tracefile_tfile): Adjust.
8035         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8036         add_inf_child_target.
8037         * windows-nat.c (_initialize_windows_nat): Use
8038         add_inf_child_target.
8039         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8040         add_inf_child_target.
8041
8042 2018-05-02  Pedro Alves  <palves@redhat.com>
8043
8044         * linux-nat.h (linux_nat_target) <low_new_thread,
8045         low_delete_thread, low_new_fork, low_forget_process,
8046         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8047         New virtual methods.
8048         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8049         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8050         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8051         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8052         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8053         Delete.
8054         * linux-fork.c (delete_fork): Adjust to call low method.
8055         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8056         (linux_nat_new_fork, linux_nat_forget_process_hook)
8057         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8058         (linux_nat_status_is_event):
8059         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8060         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8061         to call low method.
8062         (sigtrap_is_event): Rename to ...
8063         (linux_nat_target::low_status_is_event): ... this.
8064         (linux_nat_set_status_is_event): Delete.
8065         (save_stop_reason, linux_nat_wait_1)
8066         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8067         low methods.
8068         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8069         (linux_nat_set_new_fork, linux_nat_set_forget_process)
8070         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8071         (linux_nat_set_prepare_to_resume): Delete.
8072         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8073         low virtual methods.
8074         * amd64-linux-nat.c: Likewise.
8075         * arm-linux-nat.c: Likewise.
8076         * i386-linux-nat.c: Likewise.
8077         * ia64-linux-nat.c: Likewise.
8078         * mips-linux-nat.c: Likewise.
8079         * ppc-linux-nat.c: Likewise.
8080         * s390-linux-nat.c: Likewise.
8081         * sparc64-linux-nat.c: Likewise.
8082         * x86-linux-nat.c: Likewise.
8083         * x86-linux-nat.h: Include "nat/x86-linux.h".
8084         (x86_linux_nat_target) <low_new_fork, low_forget_process,
8085         low_prepare_to_resume, low_new_thread, low_delete_thread>:
8086         Override methods.
8087
8088 2018-05-02  Pedro Alves  <palves@redhat.com>
8089
8090         * target.h (target_ops)
8091         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8092         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8093         stopped_by_watchpoint, have_continuable_watchpoint,
8094         stopped_data_address, watchpoint_addr_within_range,
8095         can_accel_watchpoint_condition, can_run, thread_alive,
8096         has_all_memory, has_memory, has_stack, has_registers,
8097         has_execution, can_async_p, is_async_p, supports_non_stop,
8098         always_non_stop_p, can_execute_reverse, supports_multi_process,
8099         supports_enable_disable_tracepoint,
8100         supports_disable_randomization, supports_string_tracing,
8101         supports_evaluation_of_breakpoint_conditions,
8102         can_run_breakpoint_commands, filesystem_is_local,
8103         can_download_tracepoint, get_trace_state_variable_value,
8104         set_trace_notes, get_tib_address, use_agent, can_use_agent,
8105         record_is_replaying, record_will_replay,
8106         augmented_libraries_svr4_read>: Adjust to return bool.
8107         * aarch64-linux-nat.c: All implementations adjusted.
8108         * aix-thread.c: All implementations adjusted.
8109         * arm-linux-nat.c: All implementations adjusted.
8110         * breakpoint.c: All implementations adjusted.
8111         * bsd-kvm.c: All implementations adjusted.
8112         * bsd-uthread.c: All implementations adjusted.
8113         * corelow.c: All implementations adjusted.
8114         * ctf.c: All implementations adjusted.
8115         * darwin-nat.c: All implementations adjusted.
8116         * darwin-nat.h: All implementations adjusted.
8117         * exec.c: All implementations adjusted.
8118         * fbsd-nat.c: All implementations adjusted.
8119         * fbsd-nat.h: All implementations adjusted.
8120         * gnu-nat.c: All implementations adjusted.
8121         * gnu-nat.h: All implementations adjusted.
8122         * go32-nat.c: All implementations adjusted.
8123         * ia64-linux-nat.c: All implementations adjusted.
8124         * inf-child.c: All implementations adjusted.
8125         * inf-child.h: All implementations adjusted.
8126         * inf-ptrace.c: All implementations adjusted.
8127         * inf-ptrace.h: All implementations adjusted.
8128         * linux-nat.c: All implementations adjusted.
8129         * linux-nat.h: All implementations adjusted.
8130         * mips-linux-nat.c: All implementations adjusted.
8131         * nto-procfs.c: All implementations adjusted.
8132         * ppc-linux-nat.c: All implementations adjusted.
8133         * procfs.c: All implementations adjusted.
8134         * ravenscar-thread.c: All implementations adjusted.
8135         * record-btrace.c: All implementations adjusted.
8136         * record-full.c: All implementations adjusted.
8137         * remote-sim.c: All implementations adjusted.
8138         * remote.c: All implementations adjusted.
8139         * s390-linux-nat.c: All implementations adjusted.
8140         * sol-thread.c: All implementations adjusted.
8141         * spu-multiarch.c: All implementations adjusted.
8142         * target-delegates.c: All implementations adjusted.
8143         * target.c: All implementations adjusted.
8144         * target.h: All implementations adjusted.
8145         * tracefile-tfile.c: All implementations adjusted.
8146         * tracefile.c: All implementations adjusted.
8147         * tracefile.h: All implementations adjusted.
8148         * windows-nat.c: All implementations adjusted.
8149         * x86-linux-nat.h: All implementations adjusted.
8150         * x86-nat.h: All implementations adjusted.
8151
8152 2018-05-02  Pedro Alves  <palves@redhat.com>
8153
8154         * make-target-delegates (scan_target_h): Don't trim lines here.
8155         Replace sequences of tabs and/or whitespace with a single
8156         whitespace.
8157         (top level, parsing methods): Trim each line before processing it
8158         here.
8159
8160 2018-05-02  Pedro Alves  <palves@redhat.com>
8161             John Baldwin  <jhb@freebsd.org>
8162
8163         * target.h (enum strata) <debug_stratum>: New.
8164         (struct target_ops) <all delegation methods>: Replace by C++
8165         virtual methods, and drop "to_" prefix.  All references updated
8166         throughout.
8167         <to_shortname, to_longname, to_doc, to_data,
8168         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8169         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8170         virtual methods.  All references updated throughout.
8171         <can_attach, supports_terminal_ours, can_create_inferior,
8172         get_thread_control_capabilities, attach_no_wait>: New
8173         virtual methods.
8174         <insert_breakpoint, remove_breakpoint>: Now
8175         TARGET_DEFAULT_NORETURN methods.
8176         <info_proc>: Now returns bool.
8177         <to_magic>: Delete.
8178         (OPS_MAGIC): Delete.
8179         (current_target): Delete.  All references replaced by references
8180         to ...
8181         (target_stack): ... this.  New.
8182         (target_shortname, target_longname): Adjust.
8183         (target_can_run): Now a function declaration.
8184         (default_child_has_all_memory, default_child_has_memory)
8185         (default_child_has_stack, default_child_has_registers)
8186         (default_child_has_execution): Remove target_ops parameter.
8187         (complete_target_initialization): Delete.
8188         (memory_breakpoint_target): New template class.
8189         (test_target_ops): Refactor as a C++ class with virtual methods.
8190         * make-target-delegates (NAME_PART): Tighten.
8191         (POINTER_PART, CP_SYMBOL): New.
8192         (SIMPLE_RETURN_PART): Reimplement.
8193         (VEC_RETURN_PART): Expect less.
8194         (RETURN_PART, VIRTUAL_PART): New.
8195         (METHOD): Adjust to C++ virtual methods.
8196         (scan_target_h): Remove reference to C99.
8197         (dname): Output "target_ops::" prefix.
8198         (write_function_header): Adjust to output a C++ class method.
8199         (write_declaration): New.
8200         (write_delegator): Adjust to output a C++ class method.
8201         (tdname): Output "dummy_target::" prefix.
8202         (write_tdefault, write_debugmethod): Adjust to output a C++ class
8203         method.
8204         (tdefault_names, debug_names): Delete.
8205         (return_types, tdefaults, styles, argtypes_array): New.
8206         (top level): All methods are delegators.
8207         (print_class): New.
8208         (top level): Print dummy_target and debug_target classes.
8209         * target-delegates.c: Regenerate.
8210         * target-debug.h (target_debug_print_enum_info_proc_what)
8211         (target_debug_print_thread_control_capabilities)
8212         (target_debug_print_thread_info_p): New.
8213         * target.c (dummy_target): Delete.
8214         (the_dummy_target, the_debug_target): New.
8215         (target_stack): Now extern.
8216         (set_targetdebug): Push/unpush debug target.
8217         (default_child_has_all_memory, default_child_has_memory)
8218         (default_child_has_stack, default_child_has_registers)
8219         (default_child_has_execution): Remove target_ops parameter.
8220         (complete_target_initialization): Delete.
8221         (add_target_with_completer): No longer call
8222         complete_target_initialization.
8223         (target_supports_terminal_ours): Use regular delegation.
8224         (update_current_target): Delete.
8225         (push_target): No longer check magic number.  Don't call
8226         update_current_target.
8227         (unpush_target): Don't call update_current_target.
8228         (target_is_pushed): No longer check magic number.
8229         (target_require_runnable): Skip for all stratums over
8230         process_stratum.
8231         (target_ops::info_proc): New.
8232         (target_info_proc): Use find_target_at and
8233         find_default_run_target.
8234         (target_supports_disable_randomization): Use regular delegation.
8235         (target_get_osdata): Use find_target_at.
8236         (target_ops::open, target_ops::close, target_ops::can_attach)
8237         (target_ops::attach, target_ops::can_create_inferior)
8238         (target_ops::create_inferior, target_ops::can_run)
8239         (target_can_run): New.
8240         (default_fileio_target): Use regular delegation.
8241         (target_ops::fileio_open, target_ops::fileio_pwrite)
8242         (target_ops::fileio_pread, target_ops::fileio_fstat)
8243         (target_ops::fileio_close, target_ops::fileio_unlink)
8244         (target_ops::fileio_readlink): New.
8245         (target_fileio_open_1, target_fileio_unlink)
8246         (target_fileio_readlink): Always call the target method.  Handle
8247         FILEIO_ENOSYS.
8248         (return_zero, return_zero_has_execution): Delete.
8249         (init_dummy_target): Delete.
8250         (dummy_target::dummy_target, dummy_target::shortname)
8251         (dummy_target::longname, dummy_target::doc)
8252         (debug_target::debug_target, debug_target::shortname)
8253         (debug_target::longname, debug_target::doc): New.
8254         (target_supports_delete_record): Use regular delegation.
8255         (setup_target_debug): Delete.
8256         (maintenance_print_target_stack): Skip debug_stratum.
8257         (initialize_targets): Instantiate the_dummy_target and
8258         the_debug_target.
8259         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
8260         use target_stack.
8261         (target_auxv_search, fprint_target_auxv): Adjust.
8262         (info_auxv_command): Adjust to use target_stack.
8263         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8264         * exceptions.c (print_flush): Handle a NULL target_stack.
8265         * regcache.c (target_ops_no_register): Refactor as class with
8266         virtual methods.
8267
8268         * exec.c (exec_target): New class.
8269         (exec_ops): Now an exec_target.
8270         (exec_open, exec_close_1, exec_get_section_table)
8271         (exec_xfer_partial, exec_files_info, exec_has_memory)
8272         (exec_make_note_section): Refactor as exec_target methods.
8273         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8274         Delete.
8275         (exec_target::find_memory_regions): New.
8276         (_initialize_exec): Don't call init_exec_ops.
8277         * gdbcore.h (exec_file_clear): Delete.
8278
8279         * corefile.c (core_target): Delete.
8280         (core_file_command): Adjust.
8281         * corelow.c (core_target): New class.
8282         (the_core_target): New.
8283         (core_close): Remove target_ops parameter.
8284         (core_close_cleanup): Adjust.
8285         (core_target::close): New.
8286         (core_open, core_detach, get_core_registers, core_files_info)
8287         (core_xfer_partial, core_thread_alive, core_read_description)
8288         (core_pid_to_str, core_thread_name, core_has_memory)
8289         (core_has_stack, core_has_registers, core_info_proc): Rework as
8290         core_target methods.
8291         (ignore, core_remove_breakpoint, init_core_ops): Delete.
8292         (_initialize_corelow): Initialize the_core_target.
8293         * gdbcore.h (core_target): Delete.
8294         (the_core_target): New.
8295
8296         * ctf.c: (ctf_target): New class.
8297         (ctf_ops): Now a ctf_target.
8298         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8299         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8300         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8301         methods.
8302         (init_ctf_ops): Delete.
8303         (_initialize_ctf): Don't call it.
8304         * tracefile-tfile.c (tfile_target): New class.
8305         (tfile_ops): Now a tfile_target.
8306         (tfile_open, tfile_close, tfile_files_info)
8307         (tfile_get_tracepoint_status, tfile_trace_find)
8308         (tfile_fetch_registers, tfile_xfer_partial)
8309         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8310         Refactor as tfile_target methods.
8311         (tfile_xfer_partial_features): Remove target_ops parameter.
8312         (init_tfile_ops): Delete.
8313         (_initialize_tracefile_tfile): Don't call it.
8314         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8315         (tracefile_has_stack, tracefile_has_registers)
8316         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8317         tracefile_target methods.
8318         (init_tracefile_ops): Delete.
8319         (tracefile_target::tracefile_target): New.
8320         * tracefile.h: Include "target.h".
8321         (tracefile_target): New class.
8322         (init_tracefile_ops): Delete.
8323
8324         * spu-multiarch.c (spu_multiarch_target): New class.
8325         (spu_ops): Now a spu_multiarch_target.
8326         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8327         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8328         (spu_search_memory, spu_mourn_inferior): Refactor as
8329         spu_multiarch_target methods.
8330         (init_spu_ops): Delete.
8331         (_initialize_spu_multiarch): Remove references to init_spu_ops,
8332         complete_target_initialization.
8333
8334         * ravenscar-thread.c (ravenscar_thread_target): New class.
8335         (ravenscar_ops): Now a ravenscar_thread_target.
8336         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8337         (ravenscar_thread_alive, ravenscar_pid_to_str)
8338         (ravenscar_fetch_registers, ravenscar_store_registers)
8339         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8340         (ravenscar_stopped_by_hw_breakpoint)
8341         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8342         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8343         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8344         methods.
8345         (init_ravenscar_thread_ops): Delete.
8346         (_initialize_ravenscar): Remove references to
8347         init_ravenscar_thread_ops and complete_target_initialization.
8348
8349         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8350         (bsd_uthread_target): New class.
8351         (bsd_uthread_ops): Now a bsd_uthread_target.
8352         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8353         (bsd_uthread_close, bsd_uthread_mourn_inferior)
8354         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8355         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8356         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8357         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8358         (bsd_uthread_target): Delete function.
8359         (_initialize_bsd_uthread): Remove reference to
8360         complete_target_initialization.
8361
8362         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
8363         (target_bfd): ... this new class.
8364         (target_bfd_xfer_partial, target_bfd_get_section_table)
8365         (target_bfd_close): Refactor as target_bfd methods.
8366         (target_bfd::~target_bfd): New.
8367         (target_bfd_reopen): Adjust.
8368         (target_bfd::close): New.
8369
8370         * record-btrace.c (record_btrace_target): New class.
8371         (record_btrace_ops): Now a record_btrace_target.
8372         (record_btrace_open, record_btrace_stop_recording)
8373         (record_btrace_disconnect, record_btrace_close)
8374         (record_btrace_async, record_btrace_info)
8375         (record_btrace_insn_history, record_btrace_insn_history_range)
8376         (record_btrace_insn_history_from, record_btrace_call_history)
8377         (record_btrace_call_history_range)
8378         (record_btrace_call_history_from, record_btrace_record_method)
8379         (record_btrace_is_replaying, record_btrace_will_replay)
8380         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8381         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8382         (record_btrace_store_registers, record_btrace_prepare_to_store)
8383         (record_btrace_to_get_unwinder)
8384         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8385         (record_btrace_commit_resume, record_btrace_wait)
8386         (record_btrace_stop, record_btrace_can_execute_reverse)
8387         (record_btrace_stopped_by_sw_breakpoint)
8388         (record_btrace_supports_stopped_by_sw_breakpoint)
8389         (record_btrace_stopped_by_hw_breakpoint)
8390         (record_btrace_supports_stopped_by_hw_breakpoint)
8391         (record_btrace_update_thread_list, record_btrace_thread_alive)
8392         (record_btrace_goto_begin, record_btrace_goto_end)
8393         (record_btrace_goto, record_btrace_stop_replaying_all)
8394         (record_btrace_execution_direction)
8395         (record_btrace_prepare_to_generate_core)
8396         (record_btrace_done_generating_core): Refactor as
8397         record_btrace_target methods.
8398         (init_record_btrace_ops): Delete.
8399         (_initialize_record_btrace): Remove reference to
8400         init_record_btrace_ops.
8401         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8402         the execution_direction global.
8403         (record_full_base_target, record_full_target)
8404         (record_full_core_target): New classes.
8405         (record_full_ops): Now a record_full_target.
8406         (record_full_core_ops): Now a record_full_core_target.
8407         (record_full_target::detach, record_full_target::disconnect)
8408         (record_full_core_target::disconnect)
8409         (record_full_target::mourn_inferior, record_full_target::kill):
8410         New.
8411         (record_full_open, record_full_close, record_full_async): Refactor
8412         as methods of the record_full_base_target class.
8413         (record_full_resume, record_full_commit_resume): Refactor
8414         as methods of the record_full_target class.
8415         (record_full_wait, record_full_stopped_by_watchpoint)
8416         (record_full_stopped_data_address)
8417         (record_full_stopped_by_sw_breakpoint)
8418         (record_full_supports_stopped_by_sw_breakpoint)
8419         (record_full_stopped_by_hw_breakpoint)
8420         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8421         methods of the record_full_base_target class.
8422         (record_full_store_registers, record_full_xfer_partial)
8423         (record_full_insert_breakpoint, record_full_remove_breakpoint):
8424         Refactor as methods of the record_full_target class.
8425         (record_full_can_execute_reverse, record_full_get_bookmark)
8426         (record_full_goto_bookmark, record_full_execution_direction)
8427         (record_full_record_method, record_full_info, record_full_delete)
8428         (record_full_is_replaying, record_full_will_replay)
8429         (record_full_goto_begin, record_full_goto_end, record_full_goto)
8430         (record_full_stop_replaying): Refactor as methods of the
8431         record_full_base_target class.
8432         (record_full_core_resume, record_full_core_kill)
8433         (record_full_core_fetch_registers)
8434         (record_full_core_prepare_to_store)
8435         (record_full_core_store_registers, record_full_core_xfer_partial)
8436         (record_full_core_insert_breakpoint)
8437         (record_full_core_remove_breakpoint)
8438         (record_full_core_has_execution): Refactor
8439         as methods of the record_full_core_target class.
8440         (record_full_base_target::supports_delete_record): New.
8441         (init_record_full_ops): Delete.
8442         (init_record_full_core_ops): Delete.
8443         (record_full_save): Refactor as method of the
8444         record_full_base_target class.
8445         (_initialize_record_full): Remove references to
8446         init_record_full_ops and init_record_full_core_ops.
8447
8448         * remote.c (remote_target, extended_remote_target): New classes.
8449         (remote_ops): Now a remote_target.
8450         (extended_remote_ops): Now an extended_remote_target.
8451         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8452         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8453         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8454         (remote_pass_signals, remote_set_syscall_catchpoint)
8455         (remote_program_signals, )
8456         (remote_thread_always_alive): Remove target_ops parameter.
8457         (remote_thread_alive, remote_thread_name)
8458         (remote_update_thread_list, remote_threads_extra_info)
8459         (remote_static_tracepoint_marker_at)
8460         (remote_static_tracepoint_markers_by_strid)
8461         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8462         (remote_open): Refactor as methods of remote_target.
8463         (extended_remote_open, extended_remote_detach)
8464         (extended_remote_attach, extended_remote_post_attach):
8465         (extended_remote_supports_disable_randomization)
8466         (extended_remote_create_inferior): : Refactor as method of
8467         extended_remote_target.
8468         (remote_set_permissions, remote_open_1, remote_detach)
8469         (remote_follow_fork, remote_follow_exec, remote_disconnect)
8470         (remote_resume, remote_commit_resume, remote_stop)
8471         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8472         (remote_terminal_ours, remote_wait, remote_fetch_registers)
8473         (remote_prepare_to_store, remote_store_registers)
8474         (remote_flash_erase, remote_flash_done, remote_files_info)
8475         (remote_kill, remote_mourn, remote_insert_breakpoint)
8476         (remote_remove_breakpoint, remote_insert_watchpoint)
8477         (remote_watchpoint_addr_within_range)
8478         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8479         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8480         (remote_supports_stopped_by_sw_breakpoint)
8481         (remote_stopped_by_hw_breakpoint)
8482         (remote_supports_stopped_by_hw_breakpoint)
8483         (remote_stopped_by_watchpoint, remote_stopped_data_address)
8484         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8485         (remote_verify_memory): Refactor as methods of remote_target.
8486         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8487         parameter.
8488         (remote_xfer_partial, remote_get_memory_xfer_limit)
8489         (remote_search_memory, remote_rcmd, remote_memory_map)
8490         (remote_pid_to_str, remote_get_thread_local_address)
8491         (remote_get_tib_address, remote_read_description): Refactor as
8492         methods of remote_target.
8493         (remote_target::fileio_open, remote_target::fileio_pwrite)
8494         (remote_target::fileio_pread, remote_target::fileio_close): New.
8495         (remote_hostio_readlink, remote_hostio_fstat)
8496         (remote_filesystem_is_local, remote_can_execute_reverse)
8497         (remote_supports_non_stop, remote_supports_disable_randomization)
8498         (remote_supports_multi_process, remote_supports_cond_breakpoints)
8499         (remote_supports_enable_disable_tracepoint)
8500         (remote_supports_string_tracing)
8501         (remote_can_run_breakpoint_commands, remote_trace_init)
8502         (remote_download_tracepoint, remote_can_download_tracepoint)
8503         (remote_download_trace_state_variable, remote_enable_tracepoint)
8504         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8505         (remote_trace_start, remote_get_trace_status)
8506         (remote_get_tracepoint_status, remote_trace_stop)
8507         (remote_trace_find, remote_get_trace_state_variable_value)
8508         (remote_save_trace_data, remote_get_raw_trace_data)
8509         (remote_set_disconnected_tracing, remote_core_of_thread)
8510         (remote_set_circular_trace_buffer, remote_traceframe_info)
8511         (remote_get_min_fast_tracepoint_insn_len)
8512         (remote_set_trace_buffer_size, remote_set_trace_notes)
8513         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8514         (remote_disable_btrace, remote_teardown_btrace)
8515         (remote_read_btrace, remote_btrace_conf)
8516         (remote_augmented_libraries_svr4_read, remote_load)
8517         (remote_pid_to_exec_file, remote_can_do_single_step)
8518         (remote_execution_direction, remote_thread_handle_to_thread_info):
8519         Refactor as methods of remote_target.
8520         (init_remote_ops, init_extended_remote_ops): Delete.
8521         (remote_can_async_p, remote_is_async_p, remote_async)
8522         (remote_thread_events, remote_upload_tracepoints)
8523         (remote_upload_trace_state_variables): Refactor as methods of
8524         remote_target.
8525         (_initialize_remote): Remove references to init_remote_ops and
8526         init_extended_remote_ops.
8527
8528         * remote-sim.c (gdbsim_target): New class.
8529         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8530         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8531         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8532         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8533         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8534         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8535         Refactor as methods of gdbsim_target.
8536         (gdbsim_ops): Now a gdbsim_target.
8537         (init_gdbsim_ops): Delete.
8538         (gdbsim_cntrl_c): Adjust.
8539         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8540
8541         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8542         (the_amd64_linux_nat_target): New.
8543         (amd64_linux_fetch_inferior_registers)
8544         (amd64_linux_store_inferior_registers): Refactor as methods of
8545         amd64_linux_nat_target.
8546         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
8547         * i386-linux-nat.c: Don't include "linux-nat.h".
8548         (i386_linux_nat_target): New class.
8549         (the_i386_linux_nat_target): New.
8550         (i386_linux_fetch_inferior_registers)
8551         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8552         as methods of i386_linux_nat_target.
8553         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
8554         * inf-child.c (inf_child_ops): Delete.
8555         (inf_child_fetch_inferior_registers)
8556         (inf_child_store_inferior_registers): Delete.
8557         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8558         methods of inf_child_target.
8559         (inf_child_target::supports_terminal_ours)
8560         (inf_child_target::terminal_init)
8561         (inf_child_target::terminal_inferior)
8562         (inf_child_target::terminal_ours_for_output)
8563         (inf_child_target::terminal_ours, inf_child_target::interrupt)
8564         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8565         New.
8566         (inf_child_open, inf_child_disconnect, inf_child_close)
8567         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8568         (inf_child_post_startup_inferior, inf_child_can_run)
8569         (inf_child_pid_to_exec_file): Refactor as methods of
8570         inf_child_target.
8571         (inf_child_follow_fork): Delete.
8572         (inf_child_target::can_create_inferior)
8573         (inf_child_target::can_attach): New.
8574         (inf_child_target::has_all_memory, inf_child_target::has_memory)
8575         (inf_child_target::has_stack, inf_child_target::has_registers)
8576         (inf_child_target::has_execution): New.
8577         (inf_child_fileio_open, inf_child_fileio_pwrite)
8578         (inf_child_fileio_pread, inf_child_fileio_fstat)
8579         (inf_child_fileio_close, inf_child_fileio_unlink)
8580         (inf_child_fileio_readlink, inf_child_use_agent)
8581         (inf_child_can_use_agent): Refactor as methods of
8582         inf_child_target.
8583         (return_zero, inf_child_target): Delete.
8584         (inf_child_target::inf_child_target): New.
8585         * inf-child.h: Include "target.h".
8586         (inf_child_target): Delete function prototype.
8587         (inf_child_target): New class.
8588         (inf_child_open_target, inf_child_mourn_inferior)
8589         (inf_child_maybe_unpush_target): Delete.
8590         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8591         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8592         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8593         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8594         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8595         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8596         (inf_ptrace_wait, inf_ptrace_xfer_partial)
8597         (inf_ptrace_thread_alive, inf_ptrace_files_info)
8598         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8599         methods of inf_ptrace_target.
8600         (inf_ptrace_target): Delete function.
8601         * inf-ptrace.h: Include "inf-child.h".
8602         (inf_ptrace_target): Delete function declaration.
8603         (inf_ptrace_target): New class.
8604         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8605         * linux-nat.c (linux_target): New.
8606         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8607         (linux_nat_target::~linux_nat_target): New.
8608         (linux_child_post_attach, linux_child_post_startup_inferior)
8609         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8610         (linux_child_remove_fork_catchpoint)
8611         (linux_child_insert_vfork_catchpoint)
8612         (linux_child_remove_vfork_catchpoint)
8613         (linux_child_insert_exec_catchpoint)
8614         (linux_child_remove_exec_catchpoint)
8615         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8616         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8617         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8618         (linux_nat_stopped_data_address)
8619         (linux_nat_stopped_by_sw_breakpoint)
8620         (linux_nat_supports_stopped_by_sw_breakpoint)
8621         (linux_nat_stopped_by_hw_breakpoint)
8622         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8623         (linux_nat_kill, linux_nat_mourn_inferior)
8624         (linux_nat_xfer_partial, linux_nat_thread_alive)
8625         (linux_nat_update_thread_list, linux_nat_pid_to_str)
8626         (linux_nat_thread_name, linux_child_pid_to_exec_file)
8627         (linux_child_static_tracepoint_markers_by_strid)
8628         (linux_nat_is_async_p, linux_nat_can_async_p)
8629         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8630         (linux_nat_supports_multi_process)
8631         (linux_nat_supports_disable_randomization, linux_nat_async)
8632         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8633         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8634         (linux_nat_fileio_open, linux_nat_fileio_readlink)
8635         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8636         methods of linux_nat_target.
8637         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8638         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8639         parameter.
8640         (check_stopped_by_watchpoint): Adjust.
8641         (linux_xfer_partial): Delete.
8642         (linux_target_install_ops, linux_target, linux_nat_add_target):
8643         Delete.
8644         (linux_nat_target::linux_nat_target): New.
8645         * linux-nat.h: Include "inf-ptrace.h".
8646         (linux_nat_target): New.
8647         (linux_target, linux_target_install_ops, linux_nat_add_target):
8648         Delete function declarations.
8649         (linux_target): Declare global.
8650         * linux-thread-db.c (thread_db_target): New.
8651         (thread_db_target::thread_db_target): New.
8652         (thread_db_ops): Delete.
8653         (the_thread_db_target): New.
8654         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8655         (thread_db_update_thread_list, thread_db_pid_to_str)
8656         (thread_db_extra_thread_info)
8657         (thread_db_thread_handle_to_thread_info)
8658         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8659         (thread_db_resume): Refactor as methods of thread_db_target.
8660         (init_thread_db_ops): Delete.
8661         (_initialize_thread_db): Remove reference to init_thread_db_ops.
8662         * x86-linux-nat.c: Don't include "linux-nat.h".
8663         (super_post_startup_inferior): Delete.
8664         (x86_linux_nat_target::~x86_linux_nat_target): New.
8665         (x86_linux_child_post_startup_inferior)
8666         (x86_linux_read_description, x86_linux_enable_btrace)
8667         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8668         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8669         methods of x86_linux_nat_target.
8670         (x86_linux_create_target): Delete.  Bits folded ...
8671         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
8672         pointer.
8673         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8674         (x86_linux_nat_target): New class.
8675         (x86_linux_create_target): Delete.
8676         (x86_linux_add_target): Now takes a linux_nat_target pointer.
8677         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8678         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8679         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8680         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8681         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8682         make extern.
8683         (x86_use_watchpoints): Delete.
8684         * x86-nat.h: Include "breakpoint.h" and "target.h".
8685         (x86_use_watchpoints): Delete.
8686         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8687         (x86_stopped_by_watchpoint, x86_stopped_data_address)
8688         (x86_insert_watchpoint, x86_remove_watchpoint)
8689         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8690         (x86_stopped_by_hw_breakpoint): New declarations.
8691         (x86_nat_target): New template class.
8692
8693         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8694         (the_ppc_linux_nat_target): New.
8695         (ppc_linux_fetch_inferior_registers)
8696         (ppc_linux_can_use_hw_breakpoint)
8697         (ppc_linux_region_ok_for_hw_watchpoint)
8698         (ppc_linux_ranged_break_num_registers)
8699         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8700         (ppc_linux_insert_mask_watchpoint)
8701         (ppc_linux_remove_mask_watchpoint)
8702         (ppc_linux_can_accel_watchpoint_condition)
8703         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8704         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8705         (ppc_linux_watchpoint_addr_within_range)
8706         (ppc_linux_masked_watch_num_registers)
8707         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8708         (ppc_linux_read_description): Refactor as methods of
8709         ppc_linux_nat_target.
8710         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8711
8712         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8713         (procfs_target): New class.
8714         (the_procfs_target): New.
8715         (procfs_target): Delete function.
8716         (procfs_auxv_parse, procfs_attach, procfs_detach)
8717         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8718         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8719         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8720         (procfs_create_inferior, procfs_update_thread_list)
8721         (procfs_thread_alive, procfs_pid_to_str)
8722         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8723         (procfs_stopped_data_address, procfs_insert_watchpoint)
8724         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8725         (proc_find_memory_regions, procfs_info_proc)
8726         (procfs_make_note_section): Refactor as methods of procfs_target.
8727         (_initialize_procfs): Adjust.
8728         * sol-thread.c (sol_thread_target): New class.
8729         (sol_thread_ops): Now a sol_thread_target.
8730         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8731         (sol_thread_fetch_registers, sol_thread_store_registers)
8732         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8733         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8734         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8735         (init_sol_thread_ops): Delete.
8736         (_initialize_sol_thread): Adjust.  Remove references to
8737         init_sol_thread_ops and complete_target_initialization.
8738
8739         * windows-nat.c (windows_nat_target): New class.
8740         (windows_fetch_inferior_registers)
8741         (windows_store_inferior_registers, windows_resume, windows_wait)
8742         (windows_attach, windows_detach, windows_pid_to_exec_file)
8743         (windows_files_info, windows_create_inferior)
8744         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8745         (windows_close, windows_pid_to_str, windows_xfer_partial)
8746         (windows_get_tib_address, windows_get_ada_task_ptid)
8747         (windows_thread_name, windows_thread_alive): Refactor as
8748         windows_nat_target methods.
8749         (do_initial_windows_stuff): Adjust.
8750         (windows_target): Delete function.
8751         (_initialize_windows_nat): Adjust.
8752
8753         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8754         (darwin_mourn_inferior, darwin_kill_inferior)
8755         (darwin_create_inferior, darwin_attach, darwin_detach)
8756         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8757         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8758         (darwin_supports_multi_process): Refactor as darwin_nat_target
8759         methods.
8760         (darwin_resume_to, darwin_files_info): Delete.
8761         (_initialize_darwin_inferior): Rename to ...
8762         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
8763         * darwin-nat.h: Include "inf-child.h".
8764         (darwin_nat_target): New class.
8765         (darwin_complete_target): Delete.
8766         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8767         (darwin_target): New.
8768         (i386_darwin_fetch_inferior_registers)
8769         (i386_darwin_store_inferior_registers): Refactor as methods of
8770         darwin_nat_target.
8771         (darwin_complete_target): Delete, with ...
8772         (_initialize_i386_darwin_nat): ... bits factored out here.
8773
8774         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8775         (the_alpha_linux_nat_target): New.
8776         (alpha_linux_register_u_offset): Refactor as
8777         alpha_linux_nat_target method.
8778         (_initialize_alpha_linux_nat): Adjust.
8779         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8780         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8781         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8782         methods of linux_nat_trad_target.
8783         (linux_trad_target): Delete.
8784         * linux-nat-trad.h (linux_trad_target): Delete function.
8785         (linux_nat_trad_target): New class.
8786         * mips-linux-nat.c (mips_linux_nat_target): New class.
8787         (super_fetch_registers, super_store_registers, super_close):
8788         Delete.
8789         (the_mips_linux_nat_target): New.
8790         (mips64_linux_regsets_fetch_registers)
8791         (mips64_linux_regsets_store_registers)
8792         (mips64_linux_fetch_registers, mips64_linux_store_registers)
8793         (mips_linux_register_u_offset, mips_linux_read_description)
8794         (mips_linux_can_use_hw_breakpoint)
8795         (mips_linux_stopped_by_watchpoint)
8796         (mips_linux_stopped_data_address)
8797         (mips_linux_region_ok_for_hw_watchpoint)
8798         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8799         (mips_linux_close): Refactor as methods of mips_linux_nat.
8800         (_initialize_mips_linux_nat): Adjust to C++ification.
8801
8802         * aix-thread.c (aix_thread_target): New class.
8803         (aix_thread_ops): Now an aix_thread_target.
8804         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8805         (aix_thread_fetch_registers, aix_thread_store_registers)
8806         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8807         (aix_thread_thread_alive, aix_thread_pid_to_str)
8808         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8809         Refactor as methods of aix_thread_target.
8810         (init_aix_thread_ops): Delete.
8811         (_initialize_aix_thread): Remove references to init_aix_thread_ops
8812         and complete_target_initialization.
8813         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8814         (rs6000_nat_target): New class.
8815         (the_rs6000_nat_target): New.
8816         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8817         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8818         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8819         (super_create_inferior): Delete.
8820         (_initialize_rs6000_nat): Adjust to C++ification.
8821
8822         * arm-linux-nat.c (arm_linux_nat_target): New class.
8823         (the_arm_linux_nat_target): New.
8824         (arm_linux_fetch_inferior_registers)
8825         (arm_linux_store_inferior_registers, arm_linux_read_description)
8826         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8827         (arm_linux_remove_hw_breakpoint)
8828         (arm_linux_region_ok_for_hw_watchpoint)
8829         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8830         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8831         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8832         arm_linux_nat_target.
8833         (_initialize_arm_linux_nat): Adjust to C++ification.
8834
8835         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8836         (the_aarch64_linux_nat_target): New.
8837         (aarch64_linux_fetch_inferior_registers)
8838         (aarch64_linux_store_inferior_registers)
8839         (aarch64_linux_child_post_startup_inferior)
8840         (aarch64_linux_read_description)
8841         (aarch64_linux_can_use_hw_breakpoint)
8842         (aarch64_linux_insert_hw_breakpoint)
8843         (aarch64_linux_remove_hw_breakpoint)
8844         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8845         (aarch64_linux_region_ok_for_hw_watchpoint)
8846         (aarch64_linux_stopped_data_address)
8847         (aarch64_linux_stopped_by_watchpoint)
8848         (aarch64_linux_watchpoint_addr_within_range)
8849         (aarch64_linux_can_do_single_step): Refactor as methods of
8850         aarch64_linux_nat_target.
8851         (super_post_startup_inferior): Delete.
8852         (_initialize_aarch64_linux_nat): Adjust to C++ification.
8853
8854         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8855         (the_hppa_linux_nat_target): New.
8856         (hppa_linux_fetch_inferior_registers)
8857         (hppa_linux_store_inferior_registers): Refactor as methods of
8858         hppa_linux_nat_target.
8859         (_initialize_hppa_linux_nat): Adjust to C++ification.
8860
8861         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8862         (the_ia64_linux_nat_target): New.
8863         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8864         (ia64_linux_stopped_data_address)
8865         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8866         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8867         ia64_linux_nat_target methods.
8868         (super_xfer_partial): Delete.
8869         (_initialize_ia64_linux_nat): Adjust to C++ification.
8870
8871         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8872         (the_m32r_linux_nat_target): New.
8873         (m32r_linux_fetch_inferior_registers)
8874         (m32r_linux_store_inferior_registers): Refactor as
8875         m32r_linux_nat_target methods.
8876         (_initialize_m32r_linux_nat): Adjust to C++ification.
8877
8878         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8879         (the_m68k_linux_nat_target): New.
8880         (m68k_linux_fetch_inferior_registers)
8881         (m68k_linux_store_inferior_registers): Refactor as
8882         m68k_linux_nat_target methods.
8883         (_initialize_m68k_linux_nat): Adjust to C++ification.
8884
8885         * s390-linux-nat.c (s390_linux_nat_target): New class.
8886         (the_s390_linux_nat_target): New.
8887         (s390_linux_fetch_inferior_registers)
8888         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8889         (s390_insert_watchpoint, s390_remove_watchpoint)
8890         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8891         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8892         (s390_auxv_parse, s390_read_description): Refactor as methods of
8893         s390_linux_nat_target.
8894         (_initialize_s390_nat): Adjust to C++ification.
8895
8896         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8897         (the_sparc_linux_nat_target): New.
8898         (_initialize_sparc_linux_nat): Adjust to C++ification.
8899         * sparc-nat.c (sparc_fetch_inferior_registers)
8900         (sparc_store_inferior_registers): Remove target_ops parameter.
8901         * sparc-nat.h (sparc_fetch_inferior_registers)
8902         (sparc_store_inferior_registers): Remove target_ops parameter.
8903         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8904         (the_sparc64_linux_nat_target): New.
8905         (_initialize_sparc64_linux_nat): Adjust to C++ification.
8906
8907         * spu-linux-nat.c (spu_linux_nat_target): New class.
8908         (the_spu_linux_nat_target): New.
8909         (spu_child_post_startup_inferior, spu_child_post_attach)
8910         (spu_child_wait, spu_fetch_inferior_registers)
8911         (spu_store_inferior_registers, spu_xfer_partial)
8912         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8913         methods.
8914         (_initialize_spu_nat): Adjust to C++ification.
8915
8916         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8917         (the_tilegx_linux_nat_target): New.
8918         (fetch_inferior_registers, store_inferior_registers):
8919         Refactor as methods.
8920         (_initialize_tile_linux_nat): Adjust to C++ification.
8921
8922         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8923         (the_xtensa_linux_nat_target): New.
8924         (xtensa_linux_fetch_inferior_registers)
8925         (xtensa_linux_store_inferior_registers): Refactor as
8926         xtensa_linux_nat_target methods.
8927         (_initialize_xtensa_linux_nat): Adjust to C++ification.
8928
8929         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8930         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8931         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8932         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8933         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8934         (fbsd_stopped_by_sw_breakpoint)
8935         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8936         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8937         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8938         (fbsd_post_startup_inferior, fbsd_post_attach)
8939         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8940         (fbsd_set_syscall_catchpoint)
8941         (super_xfer_partial, super_resume, super_wait)
8942         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8943         (fbsd_handle_debug_trap): Remove target_ops parameter.
8944         (fbsd_nat_add_target): Delete.
8945         * fbsd-nat.h: Include "inf-ptrace.h".
8946         (fbsd_nat_add_target): Delete.
8947         (USE_SIGTRAP_SIGINFO): Define.
8948         (fbsd_nat_target): New class.
8949
8950         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
8951         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
8952         (amd64bsd_target): Delete.
8953         * amd64-bsd-nat.h: New file.
8954         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
8955         "x86-bsd-nat.h".
8956         (amd64_fbsd_nat_target): New class.
8957         (the_amd64_fbsd_nat_target): New.
8958         (amd64fbsd_read_description): Refactor as method of
8959         amd64_fbsd_nat_target.
8960         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8961         (_initialize_amd64fbsd_nat): Adjust to C++ification.
8962         * amd64-nat.h (amd64bsd_target): Delete function declaration.
8963         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
8964         (i386bsd_store_inferior_registers): Remove target_ops parameter.
8965         (i386bsd_target): Delete.
8966         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
8967         (i386bsd_fetch_inferior_registers)
8968         (i386bsd_store_inferior_registers): Declare.
8969         (i386_bsd_nat_target): New class.
8970         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
8971         (the_i386_fbsd_nat_target): New.
8972         (i386fbsd_resume, i386fbsd_read_description): Refactor as
8973         i386_fbsd_nat_target methods.
8974         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
8975         (_initialize_i386fbsd_nat): Adjust to C++ification.
8976         * x86-bsd-nat.c (super_mourn_inferior): Delete.
8977         (x86bsd_mourn_inferior, x86bsd_target): Delete.
8978         (_initialize_x86_bsd_nat): Adjust to C++ification.
8979         * x86-bsd-nat.h: Include "x86-nat.h".
8980         (x86bsd_target): Delete declaration.
8981         (x86bsd_nat_target): New class.
8982
8983         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
8984         (the_aarch64_fbsd_nat_target): New.
8985         (aarch64_fbsd_fetch_inferior_registers)
8986         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
8987         aarch64_fbsd_nat_target.
8988         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
8989         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
8990         (the_alpha_bsd_nat_target): New.
8991         (alphabsd_fetch_inferior_registers)
8992         (alphabsd_store_inferior_registers): Refactor as
8993         alpha_bsd_nat_target methods.
8994         (_initialize_alphabsd_nat): Refactor as methods of
8995         alpha_bsd_nat_target.
8996         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
8997         (the_amd64_nbsd_nat_target): New.
8998         (_initialize_amd64nbsd_nat): Adjust to C++ification.
8999         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9000         (the_amd64_obsd_nat_target): New.
9001         (_initialize_amd64obsd_nat): Adjust to C++ification.
9002         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9003         (the_arm_fbsd_nat_target): New.
9004         (arm_fbsd_fetch_inferior_registers)
9005         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9006         (_initialize_arm_fbsd_nat): Refactor as methods of
9007         arm_fbsd_nat_target.
9008         (_initialize_arm_fbsd_nat): Adjust to C++ification.
9009         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9010         (the_arm_netbsd_nat_target): New.
9011         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9012         arm_netbsd_nat_target.
9013         (_initialize_arm_netbsd_nat): Adjust to C++ification.
9014         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9015         (the_hppa_nbsd_nat_target): New.
9016         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9017         hppa_nbsd_nat_target methods.
9018         (_initialize_hppanbsd_nat): Adjust to C++ification.
9019         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9020         (the_hppa_obsd_nat_target): New.
9021         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9022         methods of hppa_obsd_nat_target.
9023         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
9024         add_target.
9025         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9026         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
9027         add_target.
9028         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9029         (_initialize_i386obsd_nat): Use add_target.
9030         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9031         (the_m68k_bsd_nat_target): New.
9032         (m68kbsd_fetch_inferior_registers)
9033         (m68kbsd_store_inferior_registers): Refactor as methods of
9034         m68k_bsd_nat_target.
9035         (_initialize_m68kbsd_nat): Adjust to C++ification.
9036         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9037         (the_mips_fbsd_nat_target): New.
9038         (mips_fbsd_fetch_inferior_registers)
9039         (mips_fbsd_store_inferior_registers): Refactor as methods of
9040         mips_fbsd_nat_target.
9041         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
9042         add_target.
9043         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9044         (the_mips_nbsd_nat_target): New.
9045         (mipsnbsd_fetch_inferior_registers)
9046         (mipsnbsd_store_inferior_registers): Refactor as methods of
9047         mips_nbsd_nat_target.
9048         (_initialize_mipsnbsd_nat): Adjust to C++ification.
9049         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9050         (the_mips64_obsd_nat_target): New.
9051         (mips64obsd_fetch_inferior_registers)
9052         (mips64obsd_store_inferior_registers): Refactor as methods of
9053         mips64_obsd_nat_target.
9054         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
9055         add_target.
9056         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9057         nbsd_nat_target.
9058         * nbsd-nat.h: Include "inf-ptrace.h".
9059         (nbsd_nat_target): New class.
9060         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9061         (obsd_wait): Refactor as methods of obsd_nat_target.
9062         (obsd_add_target): Delete.
9063         * obsd-nat.h: Include "inf-ptrace.h".
9064         (obsd_nat_target): New class.
9065         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9066         (the_ppc_fbsd_nat_target): New.
9067         (ppcfbsd_fetch_inferior_registers)
9068         (ppcfbsd_store_inferior_registers): Refactor as methods of
9069         ppc_fbsd_nat_target.
9070         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
9071         add_target.
9072         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9073         (the_ppc_nbsd_nat_target): New.
9074         (ppcnbsd_fetch_inferior_registers)
9075         (ppcnbsd_store_inferior_registers): Refactor as methods of
9076         ppc_nbsd_nat_target.
9077         (_initialize_ppcnbsd_nat): Adjust to C++ification.
9078         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9079         (the_ppc_obsd_nat_target): New.
9080         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9081         methods of ppc_obsd_nat_target.
9082         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
9083         add_target.
9084         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9085         (the_sh_nbsd_nat_target): New.
9086         (shnbsd_fetch_inferior_registers)
9087         (shnbsd_store_inferior_registers): Refactor as methods of
9088         sh_nbsd_nat_target.
9089         (_initialize_shnbsd_nat): Adjust to C++ification.
9090         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9091         (inf_ptrace_xfer_partial): Delete.
9092         (sparc_xfer_partial, sparc_target): Delete.
9093         * sparc-nat.h (sparc_fetch_inferior_registers)
9094         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9095         (sparc_target): Delete function declaration.
9096         (sparc_target): New template class.
9097         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9098         (_initialize_sparcnbsd_nat): Adjust to C++ification.
9099         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9100         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
9101         add_target.
9102         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9103         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9104         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9105         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
9106         add_target.
9107         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9108         (the_vax_bsd_nat_target): New.
9109         (vaxbsd_fetch_inferior_registers)
9110         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9111         methods.
9112         (_initialize_vaxbsd_nat): Adjust to C++ification.
9113
9114         * bsd-kvm.c (bsd_kvm_target): New class.
9115         (bsd_kvm_ops): Now a bsd_kvm_target.
9116         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9117         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9118         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9119         bsd_kvm_target.
9120         (bsd_kvm_return_one): Delete.
9121         (bsd_kvm_add_target): Adjust to C++ification.
9122
9123         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9124         (nto_procfs_target_procfs): New classes.
9125         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9126         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9127         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9128         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9129         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9130         (procfs_remove_hw_breakpoint, procfs_resume)
9131         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9132         (procfs_kill_inferior, procfs_store_registers)
9133         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9134         as methods of nto_procfs_target.
9135         (nto_procfs_ops): Now an nto_procfs_target_procfs.
9136         (nto_native_ops): Delete.
9137         (procfs_open, procfs_native_open): Delete.
9138         (nto_native_ops): Now an nto_procfs_target_native.
9139         (init_procfs_targets): Adjust to C++ification.
9140         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9141         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9142         Refactor as methods of nto_procfs_target.
9143
9144         * go32-nat.c (go32_nat_target): New class.
9145         (the_go32_nat_target): New.
9146         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9147         (go32_store_registers, go32_xfer_partial, go32_files_info)
9148         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9149         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9150         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9151         (go32_pid_to_str): Refactor as methods of go32_nat_target.
9152         (go32_target): Delete.
9153         (_initialize_go32_nat): Adjust to C++ification.
9154
9155         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9156         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9157         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9158         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9159         gnu_nat_target.
9160         (gnu_target): Delete.
9161         * gnu-nat.h (gnu_target): Delete.
9162         (gnu_nat_target): New class.
9163         * i386-gnu-nat.c (gnu_base_target): New.
9164         (i386_gnu_nat_target): New class.
9165         (the_i386_gnu_nat_target): New.
9166         (_initialize_i386gnu_nat): Adjust to C++ification.
9167
9168 2018-05-02  Pedro Alves  <palves@redhat.com>
9169
9170         * bfd-target.c (target_bfd_xclose): Rename to ...
9171         (target_bfd_close): ... this.
9172         (target_bfd_reopen): Adjust.
9173         * target.c (target_close): Remove references to to_xclose.
9174         * target.h (target_ops::to_xclose): Delete.
9175         (target_ops::to_close): Update comments.
9176
9177 2018-05-02  Pedro Alves  <palves@redhat.com>
9178
9179         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9180         "linux-nat.h".
9181         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9182         * inf-ptrace.c (inf_ptrace_register_u_offset)
9183         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9184         (inf_ptrace_store_register, inf_ptrace_store_registers)
9185         (inf_ptrace_trad_target): Move to ...
9186         * linux-nat-trad.c: ... this new file.
9187         * linux-nat-trad.h: New file.
9188         * linux-nat.c (linux_target_install_ops): Make extern.
9189         (linux_trad_target): Delete.
9190         * linux-nat.h (linux_trad_target): Delete declaration.
9191         (linux_target_install_ops): Declare.
9192         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9193         "linux-nat.h".
9194
9195 2018-05-02  Pedro Alves  <palves@redhat.com>
9196
9197         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9198         procfs_target/add_target here.
9199         * procfs.c (procfs_target): Make static.
9200         (_initialize_procfs): Call add_target here.
9201         * procfs.h (struct target_ops): Remove forward declaration.
9202         (procfs_target): Remove declaration.
9203         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9204
9205 2018-05-02  Pedro Alves  <palves@redhat.com>
9206
9207         * procfs.c (procfs_stopped_by_watchpoint)
9208         (procfs_insert_watchpoint, procfs_remove_watchpoint)
9209         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9210         Forward declare.
9211         (procfs_use_watchpoints): Delete, move contents...
9212         (procfs_target): ... here.
9213         * procfs.h (procfs_use_watchpoints): Delete declaration.
9214         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9215         procfs_use_watchpoints.
9216         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9217         procfs_use_watchpoints.
9218
9219 2018-05-02  Tom Tromey  <tom@tromey.com>
9220
9221         PR python/20084:
9222         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9223         and var_zuinteger_unlimited.
9224         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9225         and PARAM_ZUINTEGER_UNLIMITED.
9226         (set_parameter_value): Handle var_zuinteger and
9227         var_zuinteger_unlimited.
9228         (add_setshow_generic): Likewise.
9229         (parmpy_init): Likewise.
9230
9231 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
9232
9233         PR rust/23124
9234         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9235         pointer is not null before dereferencing it.
9236
9237 2018-04-30  Tom Tromey  <tom@tromey.com>
9238
9239         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9240         is_mi_like_p.
9241
9242 2018-04-30  Tom Tromey  <tom@tromey.com>
9243
9244         * breakpoint.c (mention): Remove use of is_mi_like_p.
9245         (print_mention_ranged_breakpoint): Likewise.
9246         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9247         of is_mi_like_p.
9248
9249 2018-04-30  Tom Tromey  <tom@tromey.com>
9250
9251         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9252
9253 2018-04-30  Tom Tromey  <tom@tromey.com>
9254
9255         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9256         (info_spu_event_command): Remove some uses of is_mi_like_p.
9257
9258 2018-04-30  Tom Tromey  <tom@tromey.com>
9259
9260         * python/py-framefilter.c (py_print_single_arg)
9261         (enumerate_locals, py_print_args, py_print_frame): Remove some
9262         uses of is_mi_like_p.
9263
9264 2018-04-30  Tom Tromey  <tom@tromey.com>
9265
9266         * ui-out.c: Update.
9267         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9268         * ui-out.h (ui_out::is_mi_like_p): Now const.
9269         (ui_out::do_is_mi_like_p): Now const.
9270         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9271
9272 2018-04-30  Tom Tromey  <tom@tromey.com>
9273
9274         * varobj.c (varobj_set_visualizer): Use new_reference.
9275         * python/python.c (gdbpy_decode_line): Use new_reference.
9276         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9277         new_reference.
9278
9279 2018-04-30  Tom Tromey  <tom@tromey.com>
9280
9281         * varobj.c (install_new_value): Use new_reference.
9282         * value.h (value_incref): Return void.  Swap intro comment with
9283         value_decref.
9284         * value.c (set_value_parent): Use new_reference.
9285         (value_incref): Return void.  Update intro comment.
9286         (release_value): Use new_reference.
9287         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9288
9289 2018-04-30  Tom Tromey  <tom@tromey.com>
9290
9291         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9292         * gdb_bfd.h (new_bfd_ref): Remove.
9293         (gdb_bfd_open): Update comment.
9294         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9295         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9296         (gdb_bfd_fdopenr): Use new_reference.
9297         * exec.c (exec_file_attach): Use new_reference.
9298
9299 2018-04-30  Tom Tromey  <tom@tromey.com>
9300
9301         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9302         method.
9303
9304 2018-04-30  Tom Tromey  <tom@tromey.com>
9305
9306         * jit.c (jit_read_code_entry): Use type_align.
9307         * i386-tdep.c (i386_gdbarch_init): Don't call
9308         set_gdbarch_long_long_align_bit.
9309         * gdbarch.sh: Remove long_long_align_bit.
9310         * gdbarch.c, gdbarch.h: Rebuild.
9311         * arc-tdep.c (arc_type_align): New function.
9312         (arc_gdbarch_init): Use arc_type_align.  Don't call
9313         set_gdbarch_long_long_align_bit.
9314
9315 2018-04-30  Tom Tromey  <tom@tromey.com>
9316
9317         * rust-lang.c (rust_type_alignment): Remove.
9318         (rust_composite_type): Use type_align.
9319
9320 2018-04-30  Tom Tromey  <tom@tromey.com>
9321
9322         * NEWS: Mention Type.align.
9323         * python/py-type.c (typy_get_alignof): New function.
9324         (type_object_getset): Add "alignof".
9325
9326 2018-04-30  Tom Tromey  <tom@tromey.com>
9327
9328         PR exp/17095:
9329         * NEWS: Update.
9330         * std-operator.def (UNOP_ALIGNOF): New operator.
9331         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9332         New.
9333         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9334         * c-lang.c (c_op_print_tab): Add alignof.
9335         * c-exp.y (ALIGNOF): New token.
9336         (exp): Add "ALIGNOF" production.
9337         (ident_tokens): Add _Alignof and alignof.
9338
9339 2018-04-30  Tom Tromey  <tom@tromey.com>
9340
9341         * i386-tdep.c (i386_type_align): New function.
9342         (i386_gdbarch_init): Update.
9343         * gdbarch.sh (type_align): New method.
9344         * gdbarch.c, gdbarch.h: Rebuild.
9345         * arch-utils.h (default_type_align): Declare.
9346         * arch-utils.c (default_type_align): New function.
9347         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9348         (struct type) <align_log2>: New field.
9349         <instance_flags>: Now a bitfield.
9350         (TYPE_RAW_ALIGN): New macro.
9351         (type_align, type_raw_align, set_type_align): Declare.
9352         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9353         functions.
9354         * dwarf2read.c (quirk_rust_enum): Set type alignment.
9355         (get_alignment, maybe_set_alignment): New functions.
9356         (read_structure_type, read_enumeration_type, read_array_type)
9357         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9358         (read_subrange_type, read_base_type): Set type alignment.
9359
9360 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
9361
9362         * dwarf2read.c (read_index_from_section): Use bool.
9363
9364 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
9365
9366         PR gdb/22950
9367         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9368         with #ifdef.
9369
9370 2018-04-29  John Reiser  <jreiser@BitWagon.com>
9371
9372         PR build/22873
9373         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9374         last step, and do it atomically.
9375
9376 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
9377
9378         * compile/compile-c-types.c (convert_int, convert_float):
9379         Update for C FE v1.
9380
9381 2018-04-27  Tom Tromey  <tom@tromey.com>
9382
9383         PR rust/22545:
9384         * rust-lang.c (rust_inclusive_range_type_p): New function.
9385         (rust_range): Handle inclusive ranges.
9386         (rust_compute_range): Likewise.
9387         * rust-exp.y (struct rust_op) <inclusive>: New field.
9388         (DOTDOTEQ): New constant.
9389         (range_expr): Add "..=" productions.
9390         (operator_tokens): Add "..=" token.
9391         (ast_range): Add "inclusive" parameter.
9392         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9393         ranges.
9394         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9395         bounds values.
9396         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9397         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9398         Update comments.
9399         * expprint.c (print_subexp_standard): Handle new bounds values.
9400         (dump_subexp_body_standard): Likewise.
9401
9402 2018-04-27  Tom Tromey  <tom@tromey.com>
9403
9404         * configure: Rebuild.
9405         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9406         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9407         "OVERRIDE".
9408         (class symbol_needs_eval_context): Likewise.
9409         * dwarf2read.c (mock_mapped_index::symbol_name_count)
9410         (mock_mapped_index::symbol_name_at): Use "override".  Remove
9411         "virtual".
9412         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9413         "override".
9414         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9415         * aarch64-tdep.c (instruction_reader::read): Use "override".
9416         (instruction_reader_test::read): Likewise.
9417         * arm-tdep.c (instruction_reader::read): Use "override".
9418         (instruction_reader_thumb::read): Likewise.
9419
9420 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
9421
9422         PR remote/9665
9423         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9424         instead of remote_send.
9425         (remote_send): Remove.
9426
9427 2018-04-26  Pedro Alves  <palves@redhat.com>
9428
9429         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9430         find_function_start_sal instead of find_pc_line.
9431
9432 2018-04-26  Pedro Alves  <palves@redhat.com>
9433
9434         * breakpoint.c (set_breakpoint_location_function): Handle
9435         mst_data_gnu_ifunc.
9436         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9437         * elfread.c (elf_symtab_read): Give data symbols with
9438         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9439         (elf_rel_plt_read): Update comment.
9440         * linespec.c (convert_linespec_to_sals): Handle
9441         mst_data_gnu_ifunc.
9442         (minsym_found): Handle mst_data_gnu_ifunc.
9443         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9444         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9445         * parse.c (find_minsym_type_and_address): Handle
9446         mst_data_gnu_ifunc.
9447         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9448         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9449         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9450         comment.
9451         <mst_data_gnu_ifunc>: New enumerator.
9452
9453 2018-04-26  Pedro Alves  <palves@redhat.com>
9454
9455         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9456         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
9457         'want_trampoline' parameter by a lookup_msym_prefer parameter.
9458         Handle it.
9459         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9460         (lookup_minimal_symbol_by_pc): Adjust.
9461         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9462         (lookup_solib_trampoline_symbol_by_pc): Adjust.
9463         * minsyms.h (lookup_msym_prefer): New enum.
9464         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9465         parameter by a lookup_msym_prefer parameter.
9466
9467 2018-04-26  Pedro Alves  <palves@redhat.com>
9468
9469         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9470         ends in "@plt" instead of looking at the symbol's section.
9471
9472 2018-04-26  Pedro Alves  <palves@redhat.com>
9473
9474         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
9475         all references.
9476         (find_pc_partial_function_gnu_ifunc): Rename to ...
9477         (find_pc_partial_function): ... this, and remove references to
9478         'is_gnu_ifunc_p'.
9479         (find_pc_partial_function): Delete old implementation.
9480         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9481
9482 2018-04-26  Pedro Alves  <palves@redhat.com>
9483
9484         * linespec.c (struct bound_minimal_symbol_search_key): New.
9485         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
9486         skip first line if we found a GNU ifunc minimal symbol by name.
9487         (compare_msymbols): Change parameters to work with a destructured
9488         lhs minsym.
9489         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9490         functions.
9491
9492 2018-04-26  Pedro Alves  <palves@redhat.com>
9493
9494         * breakpoint.c (set_breakpoint_location_function): Don't resolve
9495         ifunc targets here.  Instead, if we have an ifunc minsym, use its
9496         address/name.
9497         (add_location_to_breakpoint): Store the minsym and the objfile in
9498         the breakpoint location.
9499         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9500         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9501         Record the minsym in the sal.
9502         * symtab.h (symtab_and_line) <msymbol>: New field.
9503
9504 2018-04-26  Pedro Alves  <palves@redhat.com>
9505
9506         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9507         unless we actually resolved the ifunc.
9508
9509 2018-04-26  Pedro Alves  <palves@redhat.com>
9510
9511         * c-exp.y (variable production): Prefer ifunc minsyms over
9512         regular function symbols.
9513         * symtab.c (find_gnu_ifunc): New function.
9514         * minsyms.h (lookup_msym_prefer): New enum.
9515         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9516         parameter by a lookup_msym_prefer parameter.
9517         * symtab.h (find_gnu_ifunc): New declaration.
9518
9519 2018-04-26  Pedro Alves  <palves@redhat.com>
9520
9521         * blockframe.c (find_gnu_ifunc_target_type): New function.
9522         (find_function_type): New.
9523         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9524         return a value with a memory address.
9525         (eval_call): For calls to GNU ifunc functions, try to find the
9526         type of the target function from the type that the resolver
9527         returns.
9528         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9529         symbols.
9530         * infcall.c (find_function_return_type): Delete.
9531         (find_function_addr): Add 'function_type' parameter.  For calls to
9532         GNU ifunc functions, try to find the type of the target function
9533         from the type that the resolver returns, and return it via
9534         FUNCTION_TYPE.
9535         (call_function_by_hand_dummy): Adjust to use the function type
9536         returned by find_function_addr.
9537         (find_function_addr): Add 'function_type' parameter and move
9538         description here.
9539         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9540         declarations.
9541
9542 2018-04-26  Pedro Alves  <palves@redhat.com>
9543
9544         * c-exp.y (variable production): Skip finding an alias for ifunc
9545         symbols.
9546
9547 2018-04-26  Pedro Alves  <palves@redhat.com>
9548
9549         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9550
9551 2018-04-25  Pedro Alves  <palves@redhat.com>
9552
9553         * infcmd.c (kill_command): Print the pid as string, not the whole
9554         thread's ptid.  Add comment.  s/has been killed/killed/ in output
9555         message.
9556         * remote.c (remote_detach_1): Print the pid as string, not the
9557         whole thread's ptid.
9558
9559 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9560             Sergio Durigan Junior  <sergiodj@redhat.com>
9561             Pedro Alves  <palves@redhat.com>
9562
9563         * infcmd.c (kill_command): Print message when inferior has
9564         been killed.
9565         * inferior.c (print_inferior_events): Remove 'static'.  Set as
9566         '1'.
9567         (add_inferior): Improve message printed when
9568         'print_inferior_events' is on.
9569         (exit_inferior): Remove message printed when
9570         'print_inferior_events' is on.
9571         (detach_inferior): Improve message printed when
9572         'print_inferior_events' is on.
9573         (initialize_inferiors): Use 'add_inferior_silent' to set
9574         'current_inferior_'.
9575         * inferior.h (print_inferior_events): Declare here as
9576         'extern'.
9577         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9578         '[Detaching...]' messages when 'print_inferior_events' is on.
9579         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
9580         as prefix/suffix for messages.  Remove periods.  Fix erroneous
9581         'Detaching after fork from child...', replace it by '... from
9582         parent...'.
9583         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9584         prefix/suffix when printing 'Detaching...' messages.  Print
9585         them when 'print_inferior_events' is on.
9586         * remote.c (remote_detach_1): Print message when detaching
9587         from inferior and '!is_fork_parent'.
9588
9589 2018-04-24  Tom Tromey  <tom@tromey.com>
9590
9591         * cli-out.h: Reindent.
9592
9593 2018-04-24  Tom Tromey  <tom@tromey.com>
9594
9595         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9596         (cli_ui_out::do_field_string): Use fputs_filtered.
9597         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9598
9599 2018-04-23  Tom Tromey  <tom@tromey.com>
9600
9601         * guile/scm-frame.c (gdbscm_frame_read_var): Use
9602         gdb::unique_xmalloc_ptr.
9603
9604 2018-04-23  Tom Tromey  <tom@tromey.com>
9605
9606         * configure: Rebuild.
9607
9608 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
9609
9610         PR gdb/23095
9611         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9612         prepare_for_testing.  Set normal_bp to r_debug_state if target
9613         is bsd.
9614
9615 2018-04-21  Pedro Alves  <palves@redhat.com>
9616             Rajendra SY  <rajendra.sy@gmail.com>
9617
9618         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9619         * remote.c (extended_remote_attach): In all-stop mode, mark the
9620         thread as executing.
9621
9622 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9623
9624         * thread.c (thread_apply_all_command): Fix comment.
9625         (thread_command): Fix comment.
9626
9627 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
9628
9629         * common/tdesc.h (tdesc_create_feature): Remove xml filename
9630         parameter.
9631         * features/aarch64-core.c (create_feature_aarch64_core):
9632         Regenerate.
9633         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9634         Likewise.
9635         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9636         Likewise.
9637         * features/i386/32bit-avx512.c
9638         (create_feature_i386_32bit_avx512): Likewise.
9639         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9640         Likewise.
9641         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9642         Likewise.
9643         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9644         Likewise.
9645         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9646         Likewise.
9647         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9648         Likewise.
9649         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9650         Likewise.
9651         * features/i386/64bit-avx512.c
9652         (create_feature_i386_64bit_avx512): Likewise.
9653         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9654         Likewise.
9655         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9656         Likewise.
9657         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9658         Likewise.
9659         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9660         Likewise.
9661         * features/i386/64bit-segments.c
9662         (create_feature_i386_64bit_segments): Likewise.
9663         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9664         Likewise.
9665         * features/i386/x32-core.c
9666         (create_feature_i386_x32_core): Likewise.
9667         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9668         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9669         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9670         * target-descriptions.c: In generated code, don't pass xml
9671         filename.
9672
9673 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9674
9675         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9676         (print_xml_feature::visit_post): Likewise.
9677         (print_xml_feature::visit): Likewise.
9678         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9679         (print_xml_feature): Add new class.
9680         * regformats/regdat.sh: Null xmltarget on feature targets.
9681         * target-descriptions.c (struct target_desc): Add xmltarget.
9682         (maintenance_check_tdesc_xml_convert): Add unittest function.
9683         (tdesc_get_features_xml): Add function to get xml.
9684         (maintenance_check_xml_descriptions): Test xml generation.
9685         * xml-tdesc.c (string_read_description_xml): Add function.
9686         * xml-tdesc.h (string_read_description_xml): Add declaration.
9687
9688 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9689
9690         * features/Makefile: Add feature marker to targets with new style
9691         target descriptions.
9692         * regformats/aarch64.dat: Regenerate.
9693         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9694         * regformats/i386/amd64-avx-linux.dat: Likewise.
9695         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9696         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9697         * regformats/i386/amd64-linux.dat: Likewise.
9698         * regformats/i386/amd64-mpx-linux.dat: Likewise.
9699         * regformats/i386/amd64.dat: Likewise.
9700         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9701         * regformats/i386/i386-avx-linux.dat: Likewise.
9702         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9703         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9704         * regformats/i386/i386-linux.dat: Likewise.
9705         * regformats/i386/i386-mmx-linux.dat: Likewise.
9706         * regformats/i386/i386-mpx-linux.dat: Likewise.
9707         * regformats/i386/i386.dat: Likewise.
9708         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9709         * regformats/i386/x32-avx-linux.dat: Likewise.
9710         * regformats/i386/x32-linux.dat: Likewise.
9711         * regformats/tic6x-c62x-linux.dat: Likewise.
9712         * regformats/tic6x-c64x-linux.dat: Likewise.
9713         * regformats/tic6x-c64xp-linux.dat: Likewise.
9714         * regformats/regdat.sh: Parse feature marker.
9715
9716 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9717
9718         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9719         (tdesc_osabi_name): Likewise.
9720         * target-descriptions.c (tdesc_architecture_name): Add new
9721         function.
9722         (tdesc_osabi_name): Likewise.
9723
9724 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9725
9726         * common/tdesc.c (tdesc_predefined_type): Move to here.
9727         (tdesc_named_type): Likewise.
9728         (tdesc_create_vector): Likewise.
9729         (tdesc_create_struct): Likewise.
9730         (tdesc_set_struct_size): Likewise.
9731         (tdesc_create_union): Likewise.
9732         (tdesc_create_flags): Likewise.
9733         (tdesc_create_enum): Likewise.
9734         (tdesc_add_field): Likewise.
9735         (tdesc_add_typed_bitfield): Likewise.
9736         (tdesc_add_bitfield): Likewise.
9737         (tdesc_add_flag): Likewise.
9738         (tdesc_add_enum_value): Likewise.
9739         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9740         (struct tdesc_type_vector): Likewise.
9741         (struct tdesc_type_field): Likewise.
9742         (struct tdesc_type_with_fields): Likewise.
9743         (tdesc_create_enum): Add declaration.
9744         (tdesc_add_typed_bitfield): Likewise.
9745         (tdesc_add_enum_value): Likewise.
9746         * target-descriptions.c (tdesc_type_field): Move from here.
9747         (tdesc_type_builtin): Likewise.
9748         (tdesc_type_vector): Likewise.
9749         (tdesc_type_with_fields): Likewise.
9750         (tdesc_predefined_types): Likewise.
9751         (tdesc_named_type): Likewise.
9752         (tdesc_create_vector): Likewise.
9753         (tdesc_create_struct): Likewise.
9754         (tdesc_set_struct_size): Likewise.
9755         (tdesc_create_union): Likewise.
9756         (tdesc_create_flags): Likewise.
9757         (tdesc_create_enum): Likewise.
9758         (tdesc_add_field): Likewise.
9759         (tdesc_add_typed_bitfield): Likewise.
9760         (tdesc_add_bitfield): Likewise.
9761         (tdesc_add_flag): Likewise.
9762         (tdesc_add_enum_value): Likewise.
9763         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9764         (tdesc_add_typed_bitfield): Likewise.
9765         (tdesc_add_enum_value): Likewise.
9766
9767 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9768
9769         * common/tdesc.c (tdesc_feature::accept): Move to here.
9770         (tdesc_feature::operator==): Likewise.
9771         (tdesc_create_reg): Likewise.
9772         * common/tdesc.h (tdesc_type_kind): Likewise.
9773         (struct tdesc_type): Likewise.
9774         (struct tdesc_feature): Likewise.
9775         * regformats/regdat.sh: Create a feature.
9776         * target-descriptions.c (tdesc_type_kind): Move from here.
9777         (tdesc_type): Likewise.
9778         (tdesc_type_up): Likewise.
9779         (tdesc_feature): Likewise.
9780         (tdesc_create_reg): Likewise.
9781
9782 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9783
9784         * Makefile.in: Add arch/tdesc.c
9785         * common/tdesc.c: New file.
9786         * common/tdesc.h (tdesc_element_visitor): Move to here.
9787         (tdesc_element): Likewise.
9788         (tdesc_reg): Likewise.
9789         (tdesc_reg_up): Likewise.
9790         * regformats/regdef.h (reg): Add offset to constructors.
9791         * target-descriptions.c (tdesc_element_visitor): Move from here.
9792         (tdesc_element): Likewise.
9793         (tdesc_reg): Likewise.
9794         (tdesc_reg_up): Likewise.
9795
9796 2018-04-17  Tom Tromey  <tom@tromey.com>
9797
9798         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9799         discriminant field.
9800
9801 2018-04-17  Tom Tromey  <tom@tromey.com>
9802
9803         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9804
9805 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9806
9807         * symtab.c (print_symbol_info): Skip printing filename and line
9808         number when `last' is NULL.
9809         (symtab_symbol_info): Use empty string instead of NULL for first
9810         invocation of print_symbol_info.
9811         (rbreak_command): Pass NULL to `last' parameter of
9812         print_symbol_info.
9813
9814 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
9815
9816         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9817         instead of nullptr.
9818
9819 2018-04-16  Pedro Alves  <palves@redhat.com>
9820
9821         * MAINTAINERS (sh): Remove.
9822         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9823         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9824         (ALLDEPFILES): Remove sh64-tdep.c.
9825         * NEWS: Mentions that support for SH-5/SH64 is removed.
9826         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9827         (sh*-*-openbsd*): Ditto.
9828         (sh64-*-elf*): Remove.
9829         (sh*): Remove.
9830         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9831         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9832         * sh-tdep.c: No longer include "sh64-tdep.h".
9833         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9834         * sh64-tdep.c, sh64-tdep.h: Remove files.
9835
9836 2018-04-16  Pedro Alves  <palves@redhat.com>
9837
9838         * MAINTAINERS: Remove m88k.
9839         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9840         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9841         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9842         * NEWS: Mention that support for m88k was removed.
9843         * configure.host (m88*-*-*): Remove support.
9844         * configure.nat (m88k-*-*): Remove support.
9845         * configure.tgt (m88*-*-openbsd*): Remove.
9846         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9847
9848 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
9849
9850         * configure.tgt (x86_tobjs): New variable.
9851         (amd64_tobjs, i386_tobjs): Use it.
9852
9853 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9854
9855         * symtab.c (print_symbol_info): Precede the symbol definition by
9856         the line number when available.
9857         * NEWS: Advertise this enhancement.
9858
9859 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9860
9861         * NEWS (New options): announce set/show record btrace cpu.
9862         * btrace.c: Include record-btrace.h.
9863         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9864         the vendor is unknown.
9865         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
9866         Maybe overwrite the btrace configuration's cpu.
9867         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
9868         (btrace_fetch): Add cpu parameter.  Update callers.
9869         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9870         Maybe overwrite the btrace configuration's cpu.  Skip enabling
9871         errata workarounds if the vendor is unknown.
9872         * python/py-record-btrace.c: Include record-btrace.h.
9873         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9874         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9875         * record-btrace.c (record_btrace_cpu_state_kind): New.
9876         (record_btrace_cpu): New.
9877         (set_record_btrace_cpu_cmdlist): New.
9878         (record_btrace_get_cpu): New.
9879         (require_btrace_thread, record_btrace_info)
9880         (record_btrace_resume_thread): Call record_btrace_get_cpu.
9881         (cmd_set_record_btrace_cpu_none): New.
9882         (cmd_set_record_btrace_cpu_auto): New.
9883         (cmd_set_record_btrace_cpu): New.
9884         (cmd_show_record_btrace_cpu): New.
9885         (_initialize_record_btrace): Initialize set/show record btrace cpu
9886         commands.
9887         * record-btrace.h (record_btrace_get_cpu): New.
9888
9889 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9890
9891         * record.c (set_record_command): Fix typo in message.
9892
9893 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9894
9895         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9896
9897 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9898
9899         * infrun.c (process_event_stop_test): Call
9900         gdbarch_in_indirect_branch_thunk.
9901         * gdbarch.sh (in_indirect_branch_thunk): New.
9902         * gdbarch.c: Regenerated.
9903         * gdbarch.h: Regenerated.
9904         * x86-tdep.h: New.
9905         * x86-tdep.c: New.
9906         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9907         (HFILES_NO_SRCDIR): Add x86-tdep.h.
9908         (ALLDEPFILES): Add x86-tdep.c.
9909         * arch-utils.h (default_in_indirect_branch_thunk): New.
9910         * arch-utils.c (default_in_indirect_branch_thunk): New.
9911         * i386-tdep: Include x86-tdep.h.
9912         (i386_in_indirect_branch_thunk): New.
9913         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9914         function.
9915         * amd64-tdep: Include x86-tdep.h.
9916         (amd64_in_indirect_branch_thunk): New.
9917         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9918
9919 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9920
9921         PR gdb/23053
9922         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9923         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9924         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9925         regression.
9926
9927 2018-04-12  Tom Tromey  <tom@tromey.com>
9928
9929         * rust-lang.c (rust_print_struct_def): Remove univariant code.
9930         (rust_evaluate_subexp): Likewise.
9931
9932 2018-04-12  Pedro Alves  <palves@redhat.com>
9933
9934         * procfs.c (procfs_detach): Make forward declaration's prototype
9935         match definition's protototype.
9936         (proc_get_LDT_entry): Remove stale do_cleanups call.
9937
9938 2018-04-12  Pedro Alves  <palves@redhat.com>
9939
9940         * target.h (target_ops::to_has_exited): Delete.
9941         (target_has_exited): Delete.
9942         * target-delegates.c: Regenerate.
9943
9944 2018-04-11  Pedro Alves  <palves@redhat.com>
9945
9946         * target.c (fileio_fh_t::t): Add comment.
9947         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9948         (target_fileio_close): Handle a NULL target.
9949         (invalidate_fileio_fh): New.
9950         (target_close): Call it.
9951         * remote.c (remote_hostio_send_command): No longer check whether
9952         remote_desc is open.
9953
9954 2018-04-11  Pedro Alves  <palves@redhat.com>
9955
9956         * target.c (fileio_fh_t): Make it a named struct instead of a
9957         typedef.
9958         (fileio_fh_t::is_closed): New method.
9959         (DEF_VEC_O (fileio_fh_t)): Remove.
9960         (fileio_fhandles): Now a std::vector.
9961         (is_closed_fileio_fh): Delete.
9962         (acquire_fileio_fd): Adjust.  Rename parameters.
9963         (release_fileio_fd): Adjust.
9964         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
9965         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
9966         (target_fileio_close): Adjust.
9967
9968 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
9969
9970         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
9971         index.
9972
9973 2018-04-10  Pedro Alves  <palves@redhat.com>
9974
9975         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
9976         (scoped_finish_thread_state): New class.
9977         * infcmd.c (run_command_1): Use it instead of finish_thread_state
9978         cleanup.
9979         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
9980         (fetch_inferior_event, normal_stop): Likewise.
9981         * thread.c (finish_thread_state_cleanup): Delete.
9982
9983 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9984             Pedro Alves  <palves@redhat.com>
9985
9986         * value.c: Include "selftest.h" and "common/array-view.h".
9987         (struct range) <operator ==>: New.
9988         (test_ranges_contain): New.
9989         (check_ranges_vector): New.
9990         (test_insert_into_bit_range_vector): New.
9991         (_initialize_values): Register selftests.
9992         * common/array-view.h (operator==, operator!=): New.
9993
9994 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
9995
9996         * common/gdb_vecs.h (unordered_remove): Add overload that takes
9997         an iterator.
9998         * inline-frame.c: Include <algorithm>.
9999         (struct inline_state): Add constructor.
10000         (inline_state_s): Remove.
10001         (DEF_VEC_O(inline_state_s)): Remove.
10002         (inline_states): Change type to std::vector.
10003         (find_inline_frame_state): Adjust to std::vector.
10004         (allocate_inline_frame_state): Remove.
10005         (clear_inline_frame_state): Adjust to std::vector.
10006         (skip_inline_frames): Adjust to std::vector.
10007
10008 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10009
10010         * tracepoint.h (struct trace_state_variable): Add constructor.
10011         <name>: Change type to std::string.
10012         * tracepoint.c (tsv_s): Remove.
10013         (DEF_VEC_O(tsv_s)): Remove.
10014         (tvariables): Change to std::vector.
10015         (create_trace_state_variable): Adjust to std::vector.
10016         (find_trace_state_variable): Likewise.
10017         (find_trace_state_variable_by_number): Likewise.
10018         (delete_trace_state_variable): Likewise.
10019         (trace_variable_command): Adjust to std::string.
10020         (delete_trace_variable_command): Likewise.
10021         (tvariables_info_1): Adjust to std::vector.
10022         (save_trace_state_variables): Likewise.
10023         (start_tracing): Likewise.
10024         (merge_uploaded_trace_state_variables): Adjust to std::vector
10025         and std::string.
10026         * target.h (struct target_ops)
10027         <to_download_trace_state_variable>: Pass reference to
10028         trace_state_variable.
10029         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10030         * target-delegates.c: Re-generate.
10031         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10032         (mi_tsv_deleted): Likewise.
10033         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10034         * remote.c (remote_download_trace_state_variable): Change
10035         pointer to reference and adjust.
10036         * make-target-delegates (parse_argtypes): Handle references.
10037         (write_function_header): Likewise.
10038         (munge_type): Likewise.
10039
10040 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10041
10042         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10043         string_view-selftests.c.
10044         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10045         testsuite.
10046         * unittests/basic_string_view/cons/char/1.cc: Likewise.
10047         * unittests/basic_string_view/cons/char/2.cc: Likewise.
10048         * unittests/basic_string_view/cons/char/3.cc: Likewise.
10049         * unittests/basic_string_view/element_access/char/1.cc:
10050         Likewise.
10051         * unittests/basic_string_view/element_access/char/empty.cc:
10052         Likewise.
10053         * unittests/basic_string_view/element_access/char/front_back.cc:
10054         Likewise.
10055         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10056         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10057         Likewise.
10058         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10059         Likewise.
10060         * unittests/basic_string_view/modifiers/swap/char/1.cc:
10061         Likewise.
10062         * unittests/basic_string_view/operations/compare/char/1.cc:
10063         Likewise.
10064         * unittests/basic_string_view/operations/compare/char/13650.cc:
10065         Likewise.
10066         * unittests/basic_string_view/operations/copy/char/1.cc:
10067         Likewise.
10068         * unittests/basic_string_view/operations/data/char/1.cc:
10069         Likewise.
10070         * unittests/basic_string_view/operations/find/char/1.cc:
10071         Likewise.
10072         * unittests/basic_string_view/operations/find/char/2.cc:
10073         Likewise.
10074         * unittests/basic_string_view/operations/find/char/3.cc:
10075         Likewise.
10076         * unittests/basic_string_view/operations/find/char/4.cc:
10077         Likewise.
10078         * unittests/basic_string_view/operations/rfind/char/1.cc:
10079         Likewise.
10080         * unittests/basic_string_view/operations/rfind/char/2.cc:
10081         Likewise.
10082         * unittests/basic_string_view/operations/rfind/char/3.cc:
10083         Likewise.
10084         * unittests/basic_string_view/operations/substr/char/1.cc:
10085         Likewise.
10086         * unittests/basic_string_view/operators/char/2.cc: Likewise.
10087         * unittests/string_view-selftests.c: New file.
10088
10089 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10090
10091         * unittests/basic_string_view/capacity/1.cc: New file.
10092         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10093         * unittests/basic_string_view/cons/char/1.cc: New file.
10094         * unittests/basic_string_view/cons/char/2.cc: New file.
10095         * unittests/basic_string_view/cons/char/3.cc: New file.
10096         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10097         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10098         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10099         * unittests/basic_string_view/element_access/char/1.cc: New file.
10100         * unittests/basic_string_view/element_access/char/2.cc: New file.
10101         * unittests/basic_string_view/element_access/char/empty.cc: New file.
10102         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10103         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10104         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10105         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10106         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10107         * unittests/basic_string_view/include.cc: New file.
10108         * unittests/basic_string_view/inserters/char/1.cc: New file.
10109         * unittests/basic_string_view/inserters/char/2.cc: New file.
10110         * unittests/basic_string_view/inserters/char/3.cc: New file.
10111         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10112         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10113         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10114         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10115         * unittests/basic_string_view/literals/types.cc: New file.
10116         * unittests/basic_string_view/literals/values.cc: New file.
10117         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10118         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10119         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10120         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10121         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10122         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10123         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10124         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10125         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10126         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10127         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10128         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10129         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10130         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10131         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10132         * unittests/basic_string_view/operations/data/char/1.cc: New file.
10133         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10134         * unittests/basic_string_view/operations/find/char/1.cc: New file.
10135         * unittests/basic_string_view/operations/find/char/2.cc: New file.
10136         * unittests/basic_string_view/operations/find/char/3.cc: New file.
10137         * unittests/basic_string_view/operations/find/char/4.cc: New file.
10138         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10139         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10140         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10141         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10142         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10143         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10144         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10145         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10146         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10147         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10148         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10149         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10150         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10151         * unittests/basic_string_view/operators/char/2.cc: New file.
10152         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10153         * unittests/basic_string_view/range_access/char/1.cc: New file.
10154         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10155         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10156         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10157         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10158         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10159         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10160         * unittests/basic_string_view/requirements/typedefs.cc: New file.
10161         * unittests/basic_string_view/typedefs.cc: New file.
10162         * unittests/basic_string_view/types/1.cc: New file.
10163
10164 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10165
10166         * common/gdb_string_view.h: Remove libstdc++ implementation
10167         details, adjust to gdb reality.
10168         * common/gdb_string_view.tcc: Likewise.
10169         * cli/cli-script.c (struct string_view): Remove.
10170         (user_args) <m_args>: Change element type to gdb::string_view.
10171         (user_args::insert_args): Adjust.
10172
10173 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10174
10175         * common/gdb_string_view.h: New file.
10176         * common/gdb_string_view.tcc: New file.
10177
10178 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10179
10180         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10181         * configure: Re-generate.
10182
10183 2018-04-09  Pedro Alves  <palves@redhat.com>
10184
10185         * gdbarch.sh: Include "observable.h" instead of "observer.h".
10186         (set_target_gdbarch): Call
10187         gdb::observers::architecture_changed.notify instead of
10188         observer_notify_architecture_changed.
10189
10190 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10191
10192         * tracepoint.c (struct current_traceframe_cleanup): Remove.
10193         (do_restore_current_traceframe_cleanup): Remove.
10194         (restore_current_traceframe_cleanup_dtor): Remove.
10195         (make_cleanup_restore_current_traceframe): Remove.
10196         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10197         New.
10198         * tracepoint.h (struct scoped_restore_current_traceframe): New.
10199         * infrun.c (fetch_inferior_event): Use
10200         scoped_restore_current_traceframe.
10201
10202 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10203
10204         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10205         Remove.
10206         <n_allocated_type_units>: Remove.
10207         <all_type_units>: Change to std::vector.
10208         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10209         to std::vector change.
10210         (dwarf2_per_objfile::get_cutu): Likewise.
10211         (dwarf2_per_objfile::get_tu): Likewise.
10212         (create_signatured_type_table_from_index): Likewise.
10213         (create_signatured_type_table_from_debug_names): Likewise.
10214         (dw2_symtab_iter_next): Likewise.
10215         (dw2_print_stats): Likewise.
10216         (dw2_expand_all_symtabs): Likewise.
10217         (dw2_expand_marked_cus): Likewise.
10218         (dw2_debug_names_iterator::next): Likewise.
10219         (dwarf2_initialize_objfile): Likewise.
10220         (add_signatured_type_cu_to_table): Likewise.
10221         (create_all_type_units): Likewise.
10222         (add_type_unit): Likewise.
10223         (struct tu_abbrev_offset): Add constructor.
10224         (build_type_psymtabs_1): Adjust to std::vector change.
10225         (print_tu_stats): Likewise.
10226         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10227         (write_debug_names): Likewise.
10228
10229 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10230
10231         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10232         Make an std::vector.
10233         <n_comp_units>: Remove.
10234         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10235         to std::vector change.
10236         (dwarf2_per_objfile::get_cutu): Likewise.
10237         (dwarf2_per_objfile::get_cu): Likewise.
10238         (create_cus_from_index): Likewise.
10239         (create_addrmap_from_index): Likewise.
10240         (create_addrmap_from_aranges): Likewise.
10241         (dwarf2_read_index): Likewise.
10242         (dw2_find_last_source_symtab): Likewise.
10243         (dw2_map_symtabs_matching_filename): Likewise.
10244         (dw2_symtab_iter_next): Likewise.
10245         (dw2_print_stats): Likewise.
10246         (dw2_expand_all_symtabs): Likewise.
10247         (dw2_expand_symtabs_with_fullname): Likewise.
10248         (dw2_expand_marked_cus): Likewise.
10249         (dw2_map_symbol_filenames): Likewise.
10250         (create_cus_from_debug_names): Likewise.
10251         (dwarf2_read_debug_names): Likewise.
10252         (dw2_debug_names_iterator::next): Likewise.
10253         (dwarf2_initialize_objfile): Likewise.
10254         (set_partial_user): Likewise.
10255         (dwarf2_build_psymtabs_hard): Likewise.
10256         (read_comp_units_from_section): Remove arguments, adjust to
10257         std::vector change.
10258         (create_all_comp_units): Adjust to std::vector and
10259         read_comp_units_from_section changes.
10260         (dwarf2_find_containing_comp_unit): Adjust to std::vector
10261         change.
10262         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10263         (psyms_seen_size): Likewise.
10264         (write_gdbindex): Likewise.
10265         (write_debug_names): Likewise.
10266
10267 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10268
10269         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10270         with dwarf2_per_objfile.
10271         (create_cus_from_index): Likewise.
10272         (create_signatured_type_table_from_index): Likewise.
10273         (dwarf2_read_index): Likewise.
10274         (dwarf2_initialize_objfile): Likewise.
10275         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
10276         per_cu rather than get_dwarf2_per_objfile.
10277
10278 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10279
10280         * dwarf2read.h (struct signatured_type): Forward declare.
10281         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10282         New methods.
10283         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10284         (dw2_get_cutu): ...this.
10285         (dwarf2_per_objfile::get_cu): Rename from...
10286         (dw2_get_cu): ...this.
10287         (dwarf2_per_objfile::get_tu): New.
10288         (create_addrmap_from_index): Adjust.
10289         (create_addrmap_from_aranges): Adjust.
10290         (dw2_find_last_source_symtab): Adjust.
10291         (dw2_map_symtabs_matching_filename): Adjust.
10292         (dw2_symtab_iter_next): Adjust.
10293         (dw2_print_stats): Adjust.
10294         (dw2_expand_all_symtabs): Adjust.
10295         (dw2_expand_symtabs_with_fullname): Adjust.
10296         (dw2_expand_marked_cus): Adjust.
10297         (dw_expand_symtabs_matching_file_matcher): Adjust.
10298         (dw2_map_symbol_filenames): Adjust.
10299         (dw2_debug_names_iterator::next): Adjust.
10300         (dwarf2_initialize_objfile): Adjust.
10301         (set_partial_user): Adjust.
10302         (dwarf2_build_psymtabs_hard): Adjust.
10303
10304 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10305
10306         * dwarf2read.c (create_signatured_type_table_from_debug_names):
10307         Remove unused variables.
10308         (dw2_map_symtabs_matching_filename): Likewise.
10309         (dwarf2_record_block_ranges): Likewise.
10310         (dwarf2_read_addr_index): Likewise.
10311         (follow_die_offset): Likewise.
10312
10313 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10314
10315         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10316         to symbol_file_add_main.
10317
10318 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10319
10320         PR mi/22299
10321         * mi/mi-console.c (do_fputc_async_safe): New.
10322         (mi_console_file::write_async_safe): New.
10323         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10324         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10325         New.
10326         * ui-file.c (ui_file::putstrn): Adjust call to
10327         fputstrn_unfiltered.
10328         * utils.c (printchar): Replace do_fputs and do_fprintf
10329         parameters by do_fputc.
10330         (fputstr_filtered): Adjust call to printchar.
10331         (fputstr_unfiltered): Likewise.
10332         (fputstrn_filtered): Likewise.
10333         (fputstrn_unfiltered): Add do_fputc parameter, pass to
10334         printchar.
10335         * utils.h (do_fputc_ftype): New typedef.
10336         (fputstrn_unfiltered): Add do_fputc parameter.
10337
10338 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10339
10340         * regformats/i386/i386-avx.dat: Remove.
10341
10342 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10343
10344         PR gdb/22979
10345         * amd64-tdep.c (amd64_none_init_abi): New function.
10346         (amd64_x32_none_init_abi): New function.
10347         (_initialize_amd64_tdep): Register handlers for x86-64 and
10348         x64_32 with GDB_OSABI_NONE.
10349         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10350         GDB_OSABI_NONE osabi.
10351
10352 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10353
10354         PR gdb/22980
10355         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10356         GDB_OSABI_NONE.
10357         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10358         * osabi.c (gdb_osabi_names): Add "unknown" entry.
10359
10360 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10361
10362         * common/byte-vector.h (char_vector): New type.
10363         * target.h (target_read_alloc): Return
10364         gdb::optional<byte_vector>.
10365         (target_read_stralloc): Return gdb::optional<char_vector>.
10366         (target_get_osdata): Return gdb::optional<char_vector>.
10367         * target.c (target_read_alloc_1): Templatize.  Replacement
10368         manual memory management with vector.
10369         (target_read_alloc): Change return type, adjust.
10370         (target_read_stralloc): Change return type, adjust.
10371         (target_get_osdata): Change return type, adjust.
10372         * auxv.c (struct auxv_info) <length>: Remove.
10373         <data>: Change type to gdb::optional<byte_vector>.
10374         (auxv_inferior_data_cleanup): Free auxv_info with delete.
10375         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10376         (target_auxv_search): Adjust.
10377         (fprint_target_auxv): Adjust.
10378         * avr-tdep.c (avr_io_reg_read_command): Adjust.
10379         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10380         (linux_make_corefile_notes): Adjust.
10381         * osdata.c (get_osdata): Adjust.
10382         * remote.c (remote_get_threads_with_qxfer): Adjust.
10383         (remote_memory_map): Adjust.
10384         (remote_traceframe_info): Adjust.
10385         (btrace_read_config): Adjust.
10386         (remote_read_btrace): Adjust.
10387         (remote_pid_to_exec_file): Adjust.
10388         * solib-aix.c (solib_aix_get_library_list): Adjust.
10389         * solib-dsbt.c (decode_loadmap): Don't free buf.
10390         (dsbt_get_initial_loadmaps): Adjust.
10391         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10392         * solib-target.c (solib_target_current_sos): Adjust.
10393         * tracepoint.c (sdata_make_value): Adjust.
10394         * xml-support.c (xinclude_start_include): Adjust.
10395         (xml_fetch_content_from_file): Adjust.
10396         * xml-support.h (xml_fetch_another): Change return type.
10397         (xml_fetch_content_from_file): Change return type.
10398         * xml-syscall.c (xml_init_syscalls_info): Adjust.
10399         * xml-tdesc.c (file_read_description_xml): Adjust.
10400         (fetch_available_features_from_target): Change return type.
10401         (target_fetch_description_xml): Adjust.
10402         (target_read_description_xml): Adjust.
10403
10404 2018-04-06  Tom Tromey  <tom@tromey.com>
10405
10406         * value.c (~value): Update.
10407         (struct value) <contents>: Now unique_xmalloc_ptr.
10408         (value_contents_bits_eq, allocate_value_contents)
10409         (value_contents_raw, value_contents_all_raw)
10410         (value_contents_for_printing, value_contents_for_printing_const)
10411         (set_value_enclosing_type): Update.
10412
10413 2018-04-06  Tom Tromey  <tom@tromey.com>
10414
10415         * value.c (range_s): Remove typedef, VEC.
10416         (struct range): Add operator<.
10417         (range_lessthan): Remove.
10418         (ranges_contain): Change type.
10419         (~value): Update.
10420         (struct value) <unavailable, optimized_out>: Now std::vector.
10421         (value_entirely_available)
10422         (value_entirely_covered_by_range_vector)
10423         (value_entirely_unavailable, value_entirely_optimized_out):
10424         Update.
10425         (insert_into_bit_range_vector): Change argument type.
10426         (find_first_range_overlap): Likewise.
10427         (struct ranges_and_idx, value_contents_bits_eq)
10428         (require_not_optimized_out, require_available): Update.
10429         (ranges_copy_adjusted): Change argument types.
10430         (value_optimized_out, value_copy, value_fetch_lazy): Update.
10431
10432 2018-04-06  Tom Tromey  <tom@tromey.com>
10433
10434         * value.c (~value): Update.
10435         (struct value) <parent>: Now a value_ref_ptr.
10436         (value_parent, set_value_parent, value_address, value_copy):
10437         Update.
10438
10439 2018-04-06  Tom Tromey  <tom@tromey.com>
10440
10441         * value.c (struct value): Add constructor, destructor, and member
10442         initializers.
10443         (allocate_value_lazy, value_decref): Update.
10444
10445 2018-04-06  Tom Tromey  <tom@tromey.com>
10446
10447         * value.c (struct value) <released, next>: Remove.
10448         (all_values): Now a std::vector.
10449         (allocate_value_lazy): Update.
10450         (value_next): Remove.
10451         (value_mark, value_free_to_mark, release_value)
10452         (value_release_to_mark): Update.
10453
10454 2018-04-06  Tom Tromey  <tom@tromey.com>
10455
10456         * value.h (fetch_subexp_value, value_release_to_mark): Update.
10457         (free_value_chain): Remove.
10458         * value.c (free_value_chain): Remove.
10459         (value_release_to_mark): Return a std::vector.
10460         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10461         std::vector.
10462         (check_condition): Update.
10463         * eval.c (fetch_subexp_value): Change "val_chain" to a
10464         std::vector.
10465         * breakpoint.c (update_watchpoint): Update.
10466         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10467
10468 2018-04-06  Tom Tromey  <tom@tromey.com>
10469
10470         * value.h (free_all_values): Remove.
10471         * value.c (free_all_values): Remove.
10472
10473 2018-04-06  Tom Tromey  <tom@tromey.com>
10474
10475         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10476         (value_history_chain, value_history_count): Remove.
10477         (value_history): New global.
10478         (record_latest_value, access_value_history, show_values)
10479         (preserve_values): Update.
10480
10481 2018-04-06  Tom Tromey  <tom@tromey.com>
10482
10483         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10484         * varobj.c (varobj_set_display_format, varobj_set_value)
10485         (install_default_visualizer, construct_visualizer)
10486         (install_new_value, ~varobj, varobj_get_value_type)
10487         (my_value_of_variable, varobj_editable_p): Update.
10488         * c-varobj.c (c_describe_child, c_value_of_variable)
10489         (cplus_number_of_children, cplus_describe_child): Update.
10490         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10491         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10492         (ada_value_of_variable, ada_value_is_changeable_p): Update.
10493
10494 2018-04-06  Tom Tromey  <tom@tromey.com>
10495
10496         * printcmd.c (last_examine_address): Change type to
10497         value_ref_ptr.
10498         (do_examine, x_command): Update.
10499
10500 2018-04-06  Tom Tromey  <tom@tromey.com>
10501
10502         * value.c (release_value): Update.
10503         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10504         (struct bpstats) <val>: Now a value_ref_ptr.
10505         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10506         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10507         (~watchpoint, print_it_watchpoint, watch_command_1)
10508         (invalidate_bp_value_on_memory_change): Update.
10509
10510 2018-04-06  Tom Tromey  <tom@tromey.com>
10511
10512         * varobj.c (varobj_clear_saved_item)
10513         (update_dynamic_varobj_children, install_new_value, ~varobj):
10514         Update.
10515         * value.h (value_incref): Move declaration earlier.
10516         (value_decref): Rename from value_free.
10517         (struct value_ref_policy): New.
10518         (value_ref_ptr): New typedef.
10519         (struct value_deleter): Remove.
10520         (gdb_value_up): Remove typedef.
10521         (release_value): Change return type.
10522         (release_value_or_incref): Remove.
10523         * value.c (set_value_parent): Update.
10524         (value_incref): Change return type.
10525         (value_decref): Rename from value_free.
10526         (value_free_to_mark, free_all_values, free_value_chain): Update.
10527         (release_value): Return value_ref_ptr.
10528         (release_value_or_incref): Remove.
10529         (record_latest_value, set_internalvar, clear_internalvar):
10530         Update.
10531         * stack.c (info_frame_command): Don't call value_free.
10532         * python/py-value.c (valpy_dealloc, valpy_new)
10533         (value_to_value_object): Update.
10534         * printcmd.c (do_examine): Update.
10535         * opencl-lang.c (lval_func_free_closure): Update.
10536         * mi/mi-main.c (register_changed_p): Don't call value_free.
10537         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10538         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10539         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10540         value_free.
10541         * guile/scm-value.c (vlscm_free_value_smob)
10542         (vlscm_scm_from_value): Update.
10543         * frame.c (frame_register_unwind, frame_unwind_register_signed)
10544         (frame_unwind_register_unsigned, get_frame_register_bytes)
10545         (put_frame_register_bytes): Don't call value_free.
10546         * findvar.c (address_from_register): Don't call value_free.
10547         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10548         * dwarf2loc.c (entry_data_value_free_closure)
10549         (value_of_dwarf_reg_entry, free_pieced_value_closure)
10550         (dwarf2_evaluate_loc_desc_full): Update.
10551         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10552         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10553         (~watchpoint, watch_command_1)
10554         (invalidate_bp_value_on_memory_change): Update.
10555         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10556
10557 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
10558
10559         PR gdb/23022
10560         * warning.m4: Add -Wno-error=deprecated-register.
10561         * configure: Re-generate.
10562
10563 2018-04-05  Tom Tromey  <tom@tromey.com>
10564
10565         * linespec.h: Remove include of "vec.h".
10566
10567 2018-04-05  Tom Tromey  <tom@tromey.com>
10568
10569         * linespec.c (typep): Remove typedef.
10570         (find_methods, find_superclass_methods): Take a std::vector.
10571         (find_method): Use std::vector.
10572
10573 2018-04-05  Tom Tromey  <tom@tromey.com>
10574
10575         * utils.c (compare_strings): Remove.
10576         * utils.h (compare_strings): Remove.
10577         * objc-lang.h (find_imps): Update.
10578         * objc-lang.c (find_methods): Take a std::vector.
10579         (uniquify_strings, find_imps): Likewise.
10580         * linespec.c (find_methods): Take a std::vector.
10581         (decode_objc): Use std::vector.
10582         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10583         a std::vector.
10584         (find_method, find_function_symbols): Use std::vector.
10585
10586 2018-04-05  Tom Tromey  <tom@tromey.com>
10587
10588         * completer.c (completion_tracker::completion_tracker): Remove
10589         cast.
10590         (completion_tracker::discard_completions): Likewise.
10591         * breakpoint.c (ambiguous_names_p): Remove cast.
10592         * ada-lang.c (_initialize_ada_language): Remove cast.
10593         * utils.h (streq): Update.
10594         (streq_hash): Add new declaration.
10595         * utils.c (streq): Return bool.
10596         (streq_hash): New function.
10597
10598 2018-04-05  Tom Tromey  <tom@tromey.com>
10599
10600         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10601         Remove a string copy.
10602
10603 2018-04-05  Tom Tromey  <tom@tromey.com>
10604
10605         * linespec.c (filter_results): Use std::vector.
10606         (decode_line_2, decode_line_full): Update.
10607
10608 2018-04-05  Tom Tromey  <tom@tromey.com>
10609
10610         * linespec.c (canonical_to_fullform): Return std::string.
10611         (filter_results): Update.
10612         (struct decode_line_2_item): Add constructor.
10613         <fullform, displayform>: Now std::string.
10614         (decode_line_2_compare_items): Now a std::sort comparator.
10615         (decode_line_2): Update.
10616
10617 2018-04-05  Tom Tromey  <tom@tromey.com>
10618
10619         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10620         (unexpected_linespec_error): Update.
10621         (linespec_parse_basic, parse_linespec): Update.
10622
10623 2018-04-05  Tom Tromey  <tom@tromey.com>
10624
10625         * linespec.c (linespec_parse_basic): Reindent.
10626
10627 2018-04-05  Tom Tromey  <tom@tromey.com>
10628
10629         * minsyms.h (iterate_over_minimal_symbols): Update.
10630         * minsyms.c (iterate_over_minimal_symbols): Take a
10631         gdb::function_view.
10632         * linespec.c (struct collect_minsyms): Remove.
10633         (compare_msyms): Now a std::sort comparator.
10634         (add_minsym): Add parameters.
10635         (search_minsyms_for_name): Update.  Use std::vector.
10636
10637 2018-04-03  Tom Tromey  <tom@tromey.com>
10638
10639         * mipsread.c (read_alphacoff_dynamic_symtab): Use
10640         gdb::byte_vector.
10641
10642 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10643
10644         * MAINTAINERS (Write After Approval): Add Weimin Pan.
10645
10646 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10647
10648         PR gdb/16959
10649         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
10650         printing static type.
10651
10652 2018-04-01  Tom Tromey  <tom@tromey.com>
10653
10654         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10655         (rs6000_xfer_shared_libraries): Update.
10656
10657 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
10658
10659         * common/gdb_vecs.h (char_ptr): Remove.
10660         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10661
10662 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10663
10664         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10665         with std::vector.
10666         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10667
10668 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10669
10670         * tracepoint.h (struct uploaded_tp): Initialize fields.
10671         <actions, step_actions, cmd_strings>: Change type to
10672         std::vector<char *>.
10673         * tracepoint.c (get_uploaded_tp): Allocate with new.
10674         (free_uploaded_tps): Free with delete.
10675         (parse_tracepoint_definition): Adjust to std::vector change.
10676         * breakpoint.c (read_uploaded_action): Likewise.
10677         (create_tracepoint_from_upload): Likewise.
10678         * ctf.c (ctf_write_uploaded_tp): Likewise.
10679         (SET_ARRAY_FIELD): Likewise.
10680         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10681
10682 2018-03-30  Tom Tromey  <tom@tromey.com>
10683
10684         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
10685         std::unique_ptr.
10686         (svr4_keep_data_in_core): Update.
10687         (svr4_read_so_list): Update.
10688
10689 2018-03-30  Tom Tromey  <tom@tromey.com>
10690
10691         * windows-nat.c (handle_output_debug_string, handle_exception):
10692         Update.
10693         * target.h (target_read_string): Update.
10694         * target.c (target_read_string): Change "string" to
10695         unique_xmalloc_ptr.
10696         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10697         Update.
10698         * solib-frv.c (frv_current_sos): Update.
10699         * solib-dsbt.c (dsbt_current_sos): Update.
10700         * solib-darwin.c (darwin_current_sos): Update.
10701         * linux-thread-db.c (inferior_has_bug): Update.
10702         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10703         Update.  Remove alloca.
10704         * ada-lang.c (ada_main_name): Update.
10705
10706 2018-03-30  Tom Tromey  <tom@tromey.com>
10707
10708         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10709         (struct dwo_file_deleter): New.
10710         (dwo_file_up): New typedef.
10711         (open_and_init_dwo_file): Use dwo_file_up.
10712         (free_dwo_file_cleanup): Remove.
10713
10714 2018-03-30  Tom Tromey  <tom@tromey.com>
10715
10716         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10717         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10718
10719 2018-03-30  Tom Tromey  <tom@tromey.com>
10720
10721         * dwarf2read.c (class free_cached_comp_units): New class.
10722         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10723         (free_cached_comp_units): Remove function.
10724
10725 2018-03-30  Tom Tromey  <tom@tromey.com>
10726
10727         * utils.h (make_cleanup_unpush_target): Remove.
10728         * inf-ptrace.c (struct target_unpusher): New.
10729         (target_unpush_up) New typedef.
10730         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10731         target_unpush_up.
10732         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10733
10734 2018-03-27  Tom Tromey  <tom@tromey.com>
10735
10736         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10737
10738 2018-03-27  Pedro Alves  <palves@redhat.com>
10739             Tom Tromey  <tom@tromey.com>
10740
10741         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10742         destructor.  Now a class.
10743         (gdb_readline_wrapper_cleanup): Remove function.
10744         (gdb_readline_wrapper): Remove cleanups.
10745
10746 2018-03-27  Tom Tromey  <tom@tromey.com>
10747
10748         * typeprint.h (struct type_print_options) <local_typedefs,
10749         global_typedefs>: Remove "struct" keyword.
10750         (class typedef_hash_table): New class.
10751         (recursively_update_typedef_hash, add_template_parameters)
10752         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10753         (find_typedef_in_hash): Don't declare.
10754         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10755         (typedef_hash_table::recursively_update): Rename from
10756         recursively_update_typedef_hash.  Now a member.
10757         (typedef_hash_table::add_template_parameters): Rename from
10758         add_template_parameters.  Now a member.
10759         (typedef_hash_table::typedef_hash_table): Now a constructor;
10760         rename from create_typedef_hash.
10761         (typedef_hash_table::~typedef_hash_table): Now a destructor;
10762         rename from free_typedef_hash.
10763         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10764         (do_free_global_table): Remove.
10765         (typedef_hash_table::typedef_hash_table): New constructor; renamed
10766         from copy_type_recursive.
10767         (create_global_typedef_table): Remove.
10768         (typedef_hash_table::find_global_typedef): Now a member of
10769         typedef_hash_table.
10770         (typedef_hash_table::find_typedef): Rename from
10771         find_typedef_in_hash; now a member.
10772         (whatis_exp): Update.
10773         * extension.h (struct ext_lang_type_printers): Add constructor and
10774         destructor.
10775         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10776         declare.
10777         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10778         Now a constructor; rename from start_ext_lang_type_printers.
10779         (ext_lang_type_printers): Now a destructor; rename from
10780         free_ext_lang_type_printers.
10781         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10782         Update.
10783         (c_type_print_base_struct_union): Update.  Remove cleanups.
10784
10785 2018-03-27  Tom Tromey  <tom@tromey.com>
10786
10787         * dwarf-index-write.c: Include <cmath>.
10788
10789 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10790
10791         * NEWS: Add entry describing new "set|show varsize-limit" command.
10792         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10793         command.
10794         * printcmd.c (_initialize_printcmd): Add "set var" alias of
10795         "set variable".
10796
10797 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
10798
10799         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10800         dwarf-index-write.c
10801         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10802         * dwarf-index-common.c: New file.
10803         * dwarf-index-common.h: New file.
10804         * dwarf-index-write.c: New file.
10805         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10806         (struct dwarf2_section_info): Move from here.
10807         (dwarf2_section_info_def): Likewise.
10808         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10809         (offset_type): Likewise.
10810         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10811         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10812         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10813         (byte_swap): Likewise.
10814         (MAYBE_SWAP): Likewise.
10815         (dwarf2_per_cu_ptr): Likewise.
10816         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10817         (struct tu_stats): Likewise.
10818         (struct dwarf2_per_objfile): Likewise.
10819         (struct dwarf2_per_cu_data): Likewise.
10820         (struct signatured_type): Likewise.
10821         (sig_type_ptr): Likewise.
10822         (DEF_VEC_P (sig_type_ptr)): Likewise.
10823         (INDEX4_SUFFIX): Likewise.
10824         (INDEX5_SUFFIX): Likewise.
10825         (DEBUG_STR_SUFFIX): Likewise.
10826         (dwarf2_read_section): Make non-static.
10827         (mapped_index_string_hash): Move from here.
10828         (dwarf5_djb_hash): Likewise.
10829         (file_write): Likewise.
10830         (class data_buf): Likewise.
10831         (struct symtab_index_entry): Likewise.
10832         (struct mapped_symtab): Likewise.
10833         (find_slot): Likewise.
10834         (hash_expand): Likewise.
10835         (add_index_entry): Likewise.
10836         (uniquify_cu_indices): Likewise.
10837         (class c_str_view): Likewise.
10838         (class c_str_view_hasher): Likewise.
10839         (class vector_hasher): Likewise.
10840         (write_hash_table): Likewise.
10841         (psym_index_map): Likewise.
10842         (struct addrmap_index_data): Likewise.
10843         (add_address_entry): Likewise.
10844         (add_address_entry_worker): Likewise.
10845         (write_address_map): Likewise.
10846         (symbol_kind): Likewise.
10847         (write_psymbols): Likewise.
10848         (struct signatured_type_index_data): Likewise.
10849         (write_one_signatured_type): Likewise.
10850         (recursively_count_psymbols): Likewise.
10851         (recursively_write_psymbols): Likewise.
10852         (class debug_names): Likewise.
10853         (check_dwarf64_offsets): Likewise.
10854         (psyms_seen_size): Likewise.
10855         (write_gdbindex): Likewise.
10856         (write_debug_names): Likewise.
10857         (assert_file_size): Likewise.
10858         (write_psymtabs_to_index): Likewise.
10859         (save_gdb_index_command): Likewise.
10860         (_initialize_dwarf2_read): Don't register the "save gdb-index"
10861         command.
10862         * dwarf2read.h: New file.
10863
10864 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10865
10866         PR gdb/22670
10867         * dwarf2read.c (dwarf2_physname): Do not return the demangled
10868         symbol name if the CU's language stores symbol names in linkage
10869         format.
10870         * language.h (struct language_defn)
10871         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
10872         all instances of this struct.
10873
10874 2018-03-26  Tom Tromey  <tom@tromey.com>
10875
10876         * stack.c (backtrace_command_1): Remove verbose code.
10877
10878 2018-03-26  Tom Tromey  <tom@tromey.com>
10879
10880         * python/py-framefilter.c (py_print_type): Don't catch
10881         exceptions.  Return void.
10882         (py_print_value): Likewise.
10883         (py_print_single_arg): Likewise.
10884         (enumerate_args): Don't catch exceptions.
10885         (py_print_args): Likewise.
10886         (py_print_frame): Likewise.
10887         (gdbpy_apply_frame_filter): Catch exceptions here.
10888
10889 2018-03-26  Tom Tromey  <tom@tromey.com>
10890
10891         * stack.c (_initialize_stack): Remove trailing newlines from help
10892         text.  Add "Usage" line to "backtrace" help.
10893
10894 2018-03-26  Tom Tromey  <tom@tromey.com>
10895
10896         PR python/16486:
10897         * python/py-framefilter.c (py_print_args): Call wrap_hint.
10898
10899 2018-03-26  Tom Tromey  <tom@tromey.com>
10900
10901         * python/py-framefilter.c (py_print_single_arg): Return
10902         EXT_LANG_BT_ERROR from catch.
10903
10904 2018-03-26  Tom Tromey  <tom@tromey.com>
10905
10906         PR backtrace/15584:
10907         * stack.c (backtrace_command_1): Move some code into no-filters
10908         "if".
10909
10910 2018-03-26  Tom Tromey  <tom@tromey.com>
10911
10912         * python/py-framefilter.c (throw_quit_or_print_exception): New
10913         function.
10914         (gdbpy_apply_frame_filter): Use it.
10915
10916 2018-03-26  Tom Tromey  <tom@tromey.com>
10917
10918         PR cli/17716:
10919         * python/py-framefilter.c (py_print_type, py_print_value)
10920         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10921         RETURN_MASK_ERROR.
10922
10923 2018-03-26  Tom Tromey  <tom@tromey.com>
10924
10925         * python/py-framefilter.c (enumerate_args): Use
10926         gdb::unique_xmalloc_ptr.
10927
10928 2018-03-26  Tom Tromey  <tom@tromey.com>
10929
10930         * python/py-framefilter.c (py_print_frame): Return
10931         EXT_LANG_BT_OK.
10932         (gdbpy_apply_frame_filter): Update comment.
10933         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10934         Remove.
10935         <EXT_LANG_BT_NO_FILTERS>: Change value.
10936
10937 2018-03-26  Tom Tromey  <tom@tromey.com>
10938
10939         PR backtrace/15582:
10940         * stack.c (backtrace_command): Parse "hide" argument.
10941         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10942         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10943         constant.
10944
10945 2018-03-26  Tom Tromey  <tom@tromey.com>
10946
10947         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
10948         add "flags".
10949         (backtrace_command): Remove "fulltrace", add "flags".
10950
10951 2018-03-26  Tom Tromey  <tom@tromey.com>
10952
10953         * stack.c (backtrace_command): Rewrite command line parsing.
10954
10955 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10956
10957         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
10958
10959 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
10960
10961         * filename-seen-cache.h: Add include guard.
10962
10963 2018-03-26  Keith Seitz  <keiths@redhat.com>
10964
10965         * symfile.c (place_section): Remove "struct" from section_addr_info
10966         in comment.
10967         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
10968         "struct" keyword from section_addr_info.
10969
10970 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
10971
10972         * regformats/regdef.h (reg): Add constructors.
10973
10974 2018-03-25  Pedro Alves  <palves@redhat.com>
10975
10976         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
10977         if then/else bodies in var_func_name extraction.
10978
10979 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
10980
10981         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
10982         lookup_minimal_symbol() to find symbol entry.
10983         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
10984
10985 2018-03-23  Keith Seitz  <keiths@redhat.com>
10986
10987         PR c++/22968
10988         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
10989         nested type definitions for C++, too.
10990
10991 2018-03-23  Tom Tromey  <tom@tromey.com>
10992
10993         * machoread.c (struct oso_el): Add a constructor.  Don't define as
10994         a typedef.
10995         (macho_register_oso): Remove.
10996         (macho_symtab_read): Take a std::vector.
10997         (oso_el_compare_name): Now a std::sort comparator.
10998         (macho_symfile_read_all_oso): Take a std::vector.
10999         (macho_symfile_read): Use std::vector.  Remove cleanups.
11000
11001 2018-03-22  Tom Tromey  <tom@tromey.com>
11002
11003         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11004         (record_full_goto_bookmark): Use std::string.
11005
11006 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11007
11008         PR tdep/18295
11009         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11010         a single mask.
11011
11012 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11013
11014         * rs6000-tdep.c (store_insn_p): New function.
11015         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11016         and cr_reg to their unshifted values. Use store_insn_p to
11017         match LR saves using either R1 or fdata->alloca_reg. Use
11018         store_insn_p to match CR saves. Set alloca_reg_offset
11019         when alloca_reg and framep are set. Remove lr_reg shift
11020         when assigning to fdata->lr_register.
11021
11022 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11023
11024         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11025         command line args instead of emitting a warning.
11026
11027 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11028
11029         * tracepoint.h (struct static_tracepoint_marker): Initialize
11030         fields, define default constructor, move constructor and move
11031         assignment, disable the rest.
11032         <str_id, extra>: Make std::string.
11033         (release_static_tracepoint_marker): Remove.
11034         (free_current_marker): Remove.
11035         * tracepoint.c (free_current_marker): Remove.
11036         (parse_static_tracepoint_marker_definition): Adjust to
11037         std::string, use new hex2str overload.
11038         (release_static_tracepoint_marker): Remove.
11039         (print_one_static_tracepoint_marker): Get marker by reference
11040         and adjust to std::string.
11041         (info_static_tracepoint_markers_command): Adjust to std::vector
11042         changes
11043         * target.h (static_tracepoint_marker_p): Remove typedef.
11044         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11045         (struct target_ops) <to_static_tracepoint_marker_at>: Return
11046         bool.
11047         <to_static_tracepoint_markers_by_strid>: Return std::vector.
11048         * target-debug.h
11049         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11050         (target_debug_print_std_vector_static_tracepoint_marker): New.
11051         (target_debug_print_struct_static_tracepoint_marker_p): Rename
11052         to...
11053         (target_debug_print_static_tracepoint_marker_p): ... this.
11054         * target-delegates.c: Re-generate.
11055         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11056         Make std::string.
11057         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11058         (decode_static_tracepoint_spec): Adjust to std::vector.
11059         (tracepoint_print_one_detail): Adjust to std::string.
11060         (strace_marker_decode_location): Adjust to std::string.
11061         (update_static_tracepoint): Adjust to std::string, remove call
11062         to release_static_tracepoint_marker.
11063         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11064         Adjust to std::vector.
11065         * remote.c (remote_static_tracepoint_marker_at): Return bool.
11066         (remote_static_tracepoint_markers_by_strid): Adjust to
11067         std::vector.
11068         * common/rsp-low.h (hex2str): New overload with explicit count
11069         of bytes.
11070         * common/rsp-low.c (hex2str): New overload with explicit count
11071         of bytes.
11072         * unittests/rsp-low-selftests.c (test_hex2str): New function.
11073         (_initialize_rsp_low_selftests): Add test_hex2str test.
11074         * unittests/tracepoint-selftests.c
11075         (test_parse_static_tracepoint_marker_definition): Adjust to
11076         std::string.
11077
11078 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11079
11080         * tracepoint.c (parse_static_tracepoint_marker_definition):
11081         Consider case where the definition is followed by more
11082         definitions.
11083         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11084         tracepoint-selftests.c.
11085         * unittests/tracepoint-selftests.c: New.
11086
11087 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11088
11089         * MAINTAINERS (Write After Approval): Add Pedro Franco de
11090         Carvalho.
11091
11092 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11093
11094         * symtab.c (find_pc_sect_line): fixed indentation.
11095
11096 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11097
11098         * symtab.c (find_pc_sect_line): now uses binary search.
11099
11100 2018-03-19  Tom Tromey  <tom@tromey.com>
11101
11102         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11103         "IDENT" production.
11104
11105 2018-03-19  Pedro Alves  <palves@redhat.com>
11106             Tom Tromey  <tom@tromey.com>
11107
11108         * unittests/observable-selftests.c: New file.
11109         * common/observable.h: New file.
11110         * observable.h: New file.
11111         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11112         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11113         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11114         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11115         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11116         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11117         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11118         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11119         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11120         python/py-breakpoint.c, python/py-finishbreakpoint.c,
11121         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11122         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11123         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11124         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11125         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11126         tui/tui-interp.c, valops.c: Update all users.
11127         * tui/tui-hooks.c (tui_bp_created_observer)
11128         (tui_bp_deleted_observer, tui_bp_modified_observer)
11129         (tui_inferior_exit_observer, tui_before_prompt_observer)
11130         (tui_normal_stop_observer, tui_register_changed_observer):
11131         Remove.
11132         (tui_observers_token): New global.
11133         (attach_or_detach, tui_attach_detach_observers): New functions.
11134         (tui_install_hooks, tui_remove_hooks): Use
11135         tui_attach_detach_observers.
11136         * record-btrace.c (record_btrace_thread_observer): Remove.
11137         (record_btrace_thread_observer_token): New global.
11138         * observer.sh: Remove.
11139         * observer.c: Rename to observable.c.
11140         * observable.c (namespace gdb_observers): Define new objects.
11141         (observer_debug): Move into gdb_observers namespace.
11142         (struct observer, struct observer_list, xalloc_observer_list_node)
11143         (xfree_observer_list_node, generic_observer_attach)
11144         (generic_observer_detach, generic_observer_notify): Remove.
11145         (_initialize_observer): Update.
11146         Don't include observer.inc.
11147         * Makefile.in (generated_files): Remove observer.h, observer.inc.
11148         (clean mostlyclean): Likewise.
11149         (observer.h, observer.inc): Remove targets.
11150         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11151         (COMMON_SFILES): Use observable.c, not observer.c.
11152         * .gitignore: Remove observer.h.
11153
11154 2018-03-18  Tom Tromey  <tom@tromey.com>
11155
11156         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11157         gdb::def_vector.
11158         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11159
11160 2018-03-17  Tom Tromey  <tom@tromey.com>
11161
11162         * auto-load.c (auto_load_objfile_script_1): Use std::string.
11163
11164 2018-03-17  Tom Tromey  <tom@tromey.com>
11165
11166         * target.c (class scoped_target_fd): New.
11167         (target_fileio_close_cleanup): Remove.
11168         (target_fileio_read_alloc_1): Use scoped_target_fd.
11169
11170 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
11171
11172         * silent-rules.mk: New.
11173         * Makefile.in: Include silent-rules.mk
11174         (srcdir, VPATH, top_srcdir): Move up.
11175         (COMPILE): Add ECHO_CXX.
11176         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11177         (init.c): Add ECHO_INIT_C.
11178         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11179         (version.c): Add ECHO_GEN.
11180         (printcmd.o): Add ECHO_CXX.
11181         (target-float.o): Add ECHO_CXX.
11182         (ada-exp.o): Add ECHO_CXX.
11183         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11184         (insight$(EXEEXT)): Add ECHO_CXXLD.
11185         * gnulib/configure.ac: Add AM_SILENT_RULES.
11186         * gnulib/aclocal.m4: Re-generate.
11187         * gnulib/configure: Re-generate.
11188         * gnulib/import/Makefile.in: Re-generate.
11189
11190 2018-03-16  Tom Tromey  <tom@tromey.com>
11191
11192         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11193         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11194         * utils.c (do_free_section_addr_info)
11195         (make_cleanup_free_section_addr_info): Remove.
11196         * symfile.h (struct other_sections): Add constructor.
11197         (struct section_addr_info): Remove.
11198         (section_addr_info): New typedef.
11199         (struct sym_fns) <sym_offsets>: Change type of parameter.
11200         (build_section_addr_info_from_objfile)
11201         (relative_addr_info_to_section_offsets, addr_info_make_relative)
11202         (default_symfile_offsets, symbol_file_add)
11203         (symbol_file_add_from_bfd)
11204         (build_section_addr_info_from_section_table): Update.
11205         (alloc_section_addr_info, free_section_addr_info): Don't declare.
11206         * symfile.c (alloc_section_addr_info): Remove.
11207         (build_section_addr_info_from_section_table): Change return type.
11208         Update.
11209         (build_section_addr_info_from_bfd)
11210         (build_section_addr_info_from_objfile): Likewise.
11211         (free_section_addr_info): Remove.
11212         (relative_addr_info_to_section_offsets): Change type of "addrs".
11213         (addrs_section_compar): Now a std::sort comparator.
11214         (addrs_section_sort): Change return type.
11215         (addr_info_make_relative): Change type of "addrs".  Update.
11216         (default_symfile_offsets, syms_from_objfile_1)
11217         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11218         (symbol_file_add_separate): Update.
11219         (symbol_file_add): Change type of "addrs".  Update.
11220         (add_symbol_file_command): Update.  Remove cleanups.
11221         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
11222         cleanups.
11223         * symfile-debug.c (debug_sym_offsets): Change type of "info".
11224         * solib.c (solib_read_symbols): Update.
11225         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
11226         * machoread.c (macho_symfile_offsets): Update.
11227         * jit.c (jit_bfd_try_read_symtab): Update.
11228
11229 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
11230
11231         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11232         unittests/utils-selftests.c.
11233         * unittests/utils-selftests.c: New file.
11234
11235 2018-03-14  Tom Tromey  <tom@tromey.com>
11236
11237         PR cli/14977:
11238         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11239         for NULL.
11240
11241 2018-03-14  Tom Tromey  <tom@tromey.com>
11242
11243         PR cli/19918:
11244         * printcmd.c (printf_pointer): Allow "-" in format.
11245
11246 2018-03-14  Tom Tromey  <tom@tromey.com>
11247
11248         * printcmd.c (_initialize_printcmd): Add usage to printf.
11249
11250 2018-03-14  Yao Qi  <qiyao@sourceware.org>
11251
11252         * MAINTAINERS: Update my email address.
11253
11254 2018-03-13  Tom Tromey  <tom@tromey.com>
11255
11256         * machoread.c (macho_check_dsym): Change filenamep to a
11257         std::string*.
11258         (macho_symfile_read): Update.
11259         * symfile.c (load_command): Use std::string.
11260
11261 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11262
11263         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11264         to error message string.
11265         (riscv_register_name): Use xsnprintf instead of sprintf.
11266         (riscv_insn::fetch_instruction): Use gdb_assert instead of
11267         internal_error.
11268         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11269         error.
11270         (riscv_push_dummy_call): Likewise.
11271
11272 2018-03-12  Tom Tromey  <tom@tromey.com>
11273
11274         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11275         Use gdb::byte_vector.
11276         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11277
11278 2018-03-12  Yao Qi  <yao.qi@linaro.org>
11279
11280         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11281         parameter type to readable_regcache.
11282         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11283         the declaration.
11284
11285 2018-03-11  Tom Tromey  <tom@tromey.com>
11286
11287         * dwarf2read.c (struct nextfield): Add initializers.
11288         (struct nextfnfield): Remove.
11289         (struct fnfieldlist): Add initializers.  Remove "length" and
11290         "head", use std::vector.
11291         (struct decl_field_list): Remove.
11292         (struct field_info): Add initializers.
11293         <fields, baseclasses>: Now std::vector.
11294         <nbaseclasses, nfnfields, typedef_field_list_count,
11295         nested_types_list_count>: Remove.
11296         (dwarf2_add_field, dwarf2_add_type_defn)
11297         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11298         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11299         (process_structure_scope): Update.
11300
11301 2018-03-11  Tom Tromey  <tom@tromey.com>
11302
11303         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11304         for use by std::sort.
11305         (build_type_psymtabs_1): Use std::vector.
11306
11307 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
11308
11309         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11310         and LIBMPFR in the printed configuration.
11311
11312 2018-03-08  Tom Tromey  <tom@tromey.com>
11313
11314         * source.c (get_filename_and_charpos): Use scoped_fd.
11315         * nto-procfs.c (procfs_open_1): Use scoped_fd.
11316         (procfs_pidlist): Likewise.
11317         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11318         (iterate_over_mappings): Likewise.
11319
11320 2018-03-08  Tom Tromey  <tom@tromey.com>
11321
11322         * infcall.c (struct call_return_meta_info)
11323         <stack_temporaries_enabled>: Remove.
11324         (get_call_return_value, call_function_by_hand_dummy): Update.
11325         * thread.c (disable_thread_stack_temporaries): Remove.
11326         (enable_thread_stack_temporaries): Remove.
11327         (thread_stack_temporaries_enabled_p): Return bool.
11328         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11329         (get_last_thread_stack_temporary): Update.
11330         * eval.c (evaluate_subexp): Update.
11331         * gdbthread.h (class enable_thread_stack_temporaries): Now a
11332         class, not a function.
11333         (value_ptr, value_vec): Remove typedefs.
11334         (class thread_info) <stack_temporaries_enabled>: Now bool.
11335         <stack_temporaries>: Now a std::vector.
11336         (thread_stack_temporaries_enabled_p)
11337         (value_in_thread_stack_temporaries): Return bool.
11338
11339 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
11340
11341         * remote.c (putpkt_binary): Fix omitted bytes reporting.
11342         (getpkt_or_notif_sane_1): Likewise.
11343
11344 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11345
11346         * build-id.c (build_id_to_debug_bfd): Use std::string.
11347
11348 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11349
11350         * build-id.c (find_separate_debug_file_by_buildid): Return
11351         std::string.
11352         * build-id.h (find_separate_debug_file_by_buildid): Return
11353         std::string.
11354         * coffread.c (coff_symfile_read): Adjust to std::string.
11355         * elfread.c (elf_symfile_read): Adjust to std::string.
11356         * symfile.c (separate_debug_file_exists): Change parameter to
11357         std::string.
11358         (find_separate_debug_file): Return std::string.
11359         (find_separate_debug_file_by_debuglink): Return std::string.
11360         * symfile.h (find_separate_debug_file_by_debuglink): Return
11361         std::string.
11362
11363 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11364
11365         * common/xml-utils.c (xml_escape_text): Move code to...
11366         (xml_escape_text_append): ... this new function.
11367         * common/xml-utils.h (xml_escape_text_append): New declaration.
11368         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11369         New function.
11370         (_initialize_xml_utils): register test_xml_escape_text_append as
11371         a selftest.
11372
11373 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
11374
11375         * defs.h: Remove MAX_REGISTER_SIZE.
11376         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11377         asserts.
11378         * python/py-unwind.c (pyuw_sniffer): Likewise.
11379
11380 2018-03-07  Tom Tromey  <tom@tromey.com>
11381
11382         * linux-tdep.c (linux_info_proc): Update.
11383         * target.h (struct target_ops) <to_fileio_readlink>: Return
11384         optional<string>.
11385         (target_fileio_readlink): Return optional<string>.
11386         * remote.c (remote_hostio_readlink): Return optional<string>.
11387         * inf-child.c (inf_child_fileio_readlink): Return
11388         optional<string>.
11389         * target.c (target_fileio_readlink): Return optional<string>.
11390
11391 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
11392
11393         * regcache.c (cooked_read_test): Add riscv to the list of
11394         architectures that have a save_reggroup.
11395
11396 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11397
11398         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11399         value is not a dynamic class object.
11400
11401 2018-03-06  Tom Tromey  <tom@tromey.com>
11402
11403         * rust-exp.y: Formatting fixes.
11404
11405 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11406
11407         * riscv-tdep.c (riscv_register_name): Remove target description
11408         support.
11409         (riscv_gdbarch_init): Remove target description check.
11410
11411 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11412
11413         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11414         comment.
11415         * riscv-tdep.h: Likewise.
11416
11417 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11418
11419         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11420         (riscv_pseudo_register_write): Delete.
11421         (riscv_gdbarch_init): Remove all use of pseudo registers.
11422
11423 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11424
11425         * record-btrace.c (btrace_print_lines): Replace cleanup
11426         parameter with RAII equivalents.
11427         (btrace_insn_history): Replace cleanup with RAII equivalents.
11428         * ui-out.h (make_cleanup_ui_out_list_begin_end,
11429         make_cleanup_ui_out_tuple_begin_end): Remove.
11430         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11431         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11432         make_cleanup_ui_out_list_begin_end): Remove.
11433
11434 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11435
11436         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11437         parameter types to std::vector.  Use bool.
11438         (record_btrace_wait): Replace VEC(tp_t) with
11439         std::vector<thread_info *>.
11440         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11441
11442 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11443
11444         * record-btrace.c (record_btrace_disable_callback): Remove.
11445         (struct scoped_btrace_disable): New.
11446         (record_btrace_open): Use scoped_btrace_disable.
11447
11448 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11449
11450         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11451         reading values from registers.
11452
11453 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11454
11455         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11456         where appropriate.
11457
11458 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11459
11460         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11461         change parameter type.  Use GDB's print functions, and use
11462         core_addr_to_string where appropriate.
11463         (riscv_push_dummy_call): Use core_addr_to_string where
11464         appropriate, update call to riscv_print_arg_location, and reindent
11465         a few lines.
11466         (riscv_return_value): Update call to riscv_print_arg_location.
11467
11468 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11469             Tim Newsome <tim@sifive.com>
11470             Albert Ou <a0u@eecs.berkeley.edu>
11471             Darius Rad <darius@bluespec.com>
11472
11473         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11474         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11475         (ALLDEPFILES): Add riscv-tdep.c
11476         * configure.tgt: Add riscv support.
11477         * riscv-tdep.c: New file.
11478         * riscv-tdep.h: New file.
11479         * NEWS: Mention new target.
11480         * MAINTAINERS: Add entry for riscv.
11481
11482 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11483
11484         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11485         fields within aggregates.
11486
11487 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
11488
11489         * record-btrace.c (btrace_print_lines): Change type of flags to
11490         gdb_disassembly_flags.
11491
11492 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11493
11494         * fbsd-nat.c: Include "inf-ptrace.h".
11495         (USE_SIGTRAP_SIGINFO): Conditionally define.
11496         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11497         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11498         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11499         function.
11500         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11501         Likewise.
11502         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11503         Likewise.
11504         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11505         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11506         "supports_stopped_by_hw_breakpoint" target methods.
11507
11508 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11509
11510         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11511         * fbsd-nat.c (debug_fbsd_nat): New variable.
11512         (show_fbsd_nat_debug): New function.
11513         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11514         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11515
11516 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11517
11518         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11519         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11520         prototype.
11521         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11522         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11523         method.
11524
11525 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11526
11527         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11528         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11529
11530 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11531
11532         * charset.c (struct charset_vector): New.
11533         (charsets): Change type to charset_vector.
11534         (find_charset_names): Adjust.
11535         (add_one): Adjust.
11536         (_initialize_charset): Adjust.
11537
11538 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11539
11540         * progspace.h (struct program_space) <deleted_solibs>: Change
11541         type to std::vector<std::string>.
11542         * progspace.c (clear_program_space_solib_cache): Adjust.
11543         * breakpoint.c (print_solib_event): Adjust.
11544         (check_status_catch_solib): Adjust.
11545         * solib.c (update_solib_list): Adjust.
11546         * ui-out.h (class ui_out) <field_string>: New overload.
11547         * ui-out.c (ui_out::field_string): New overload.
11548
11549 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11550
11551         * progspace.h (struct program_space): Add constructor and
11552         destructor, initialize fields.
11553         (add_program_space): Remove.
11554         * progspace.c (add_program_space): Rename to...
11555         (program_space::program_space): ... this.
11556         (release_program_space): Rename to...
11557         (program_space::~program_space): ... this.
11558         (delete_program_space): Use delete to delete program_space.
11559         (initialize_progspace): Use new to allocate program_space.
11560         * inferior.c (add_inferior_with_spaces): Likewise.
11561         (clone_inferior_command): Likewise.
11562         * infrun.c (follow_fork_inferior): Likewise.
11563         (handle_vfork_child_exec_or_exit): Likewise.
11564
11565 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11566
11567         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11568         (delim_string_to_char_ptr_vec): Return std::vector of
11569         gdb::unique_xmalloc_ptr.
11570         (dirnames_to_char_ptr_vec_append): Take std::vector of
11571         gdb::unique_xmalloc_ptr.
11572         (dirnames_to_char_ptr_vec): Return std::vector of
11573         gdb::unique_xmalloc_ptr.
11574         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11575         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11576         (delim_string_to_char_ptr_vec): Return an std::vector of
11577         gdb::unique_xmalloc_ptr, adjust the code.
11578         (dirnames_to_char_ptr_vec_append): Take an std::vector of
11579         gdb::unique_xmalloc_ptr, adjust the code.
11580         (dirnames_to_char_ptr_vec): Return an std::vector of
11581         gdb::unique_xmalloc_ptr, adjust the code.
11582         * auto-load.c (auto_load_safe_path_vec): Change type to
11583         std::vector of gdb::unique_xmalloc_ptr.
11584         (auto_load_expand_dir_vars): Return an std::vector of
11585         gdb::unique_xmalloc_ptr, adjust the code.
11586         (auto_load_safe_path_vec_update): Adjust.
11587         (filename_is_in_auto_load_safe_path_vec): Adjust.
11588         (auto_load_objfile_script_1): Adjust.
11589         * build-id.c (build_id_to_debug_bfd): Adjust.
11590         * linux-thread-db.c (thread_db_load_search): Adjust.
11591         * source.c (add_path): Adjust.
11592         (openp): Adjust.
11593         * symfile.c (find_separate_debug_file): Adjust.
11594         * utils.c (do_free_char_ptr_vec): Remove.
11595         (make_cleanup_free_char_ptr_vec): Remove.
11596
11597 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
11598
11599         PR gdb/22907
11600         * common/pathstuff.c: Conditionally include "<windows.h>".
11601
11602 2018-03-01  Georg Sauthoff  <mail@georg.so>
11603
11604         PR gdb/22888
11605         * gcore.in: Quote variables and switch interpreter to bash.
11606
11607 2018-03-01  Tom Tromey  <tom@tromey.com>
11608
11609         * dwarf2read.c (alloc_discriminant_info): Fix default_index
11610         assertion.  Add assertion for discriminant_index.
11611         (quirk_rust_enum): Use correct base type name in univariant case.
11612
11613 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
11614
11615         * record.c (get_call_history_modifiers): Return a
11616         record_print_flags.
11617         (cmd_record_call_history): Adjust.
11618         * record-btrace.c (record_btrace_call_history): Adjust.
11619         (record_btrace_call_history_range): Adjust.
11620         (record_btrace_call_history_from): Adjust.
11621         * target-debug.h (target_debug_print_record_print_flags): New.
11622         * target-delegates.c: Re-generate.
11623         * target.c (target_call_history): Change flags type.
11624         (target_call_history_from): Likewise.
11625         (target_call_history_range): Likewise.
11626         * target.h (struct target_ops) <target_call_history>: Likewise.
11627         (target_call_history_from): Likewise.
11628         (target_call_history_range): Likewise.
11629
11630 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11631             Simon Marchi  <simon.marchi@polymtl.ca>
11632
11633         * common/common-utils.c: Include "sys/stat.h".
11634         (is_regular_file): Move here from "source.c"; change return
11635         type to "bool".
11636         * common/common-utils.h (is_regular_file): New prototype.
11637         * common/pathstuff.c (contains_dir_separator): New function.
11638         * common/pathstuff.h (contains_dir_separator): New prototype.
11639         * source.c: Don't include "sys/stat.h".
11640         (is_regular_file): Move to "common/common-utils.c".
11641
11642 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11643
11644         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11645         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11646         * auto-load.c: Include "common/pathstuff.h".
11647         * common/common-def.h (current_directory): Move here.
11648         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11649         function.
11650         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11651         prototype.
11652         * common/pathstuff.c: New file.
11653         * common/pathstuff.h: New file.
11654         * compile/compile.c: Include "common/pathstuff.h".
11655         * defs.h (current_directory): Move to "common/common-defs.h".
11656         * dwarf2read.c: Include "common/pathstuff.h".
11657         * exec.c: Likewise.
11658         * guile/scm-safe-call.c: Likewise.
11659         * linux-thread-db.c: Likewise.
11660         * main.c: Likewise.
11661         * nto-tdep.c: Likewise.
11662         * objfiles.c: Likewise.
11663         * source.c: Likewise.
11664         * symtab.c: Likewise.
11665         * utils.c: Include "common/pathstuff.h".
11666         (gdb_realpath): Move to "common/pathstuff.c".
11667         (gdb_realpath_keepfile): Likewise.
11668         (gdb_abspath): Likewise.
11669         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11670         (gdb_realpath_keepfile): Likewise.
11671         (gdb_abspath): Likewise.
11672
11673 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
11674
11675         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11676         wildcard process pid for super_resume for kernels with a
11677         specific bug.
11678
11679 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
11680
11681         * compile/compile.c (get_args): Add additional comments
11682         explaining function.
11683
11684 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
11685             Tom Tromey  <tom@tromey.com>
11686
11687         * target.h (memory_write_request_s): Remove typedef.  Don't define
11688         VEC.
11689         (target_write_memory_blocks): Change argument to std::vector.
11690         (struct memory_write_request): Add constructor.
11691         * target-memory.c (compare_block_starting_address): Return bool.
11692         Change argument types.
11693         (claim_memory): Change arguments to use std::vector.
11694         (split_regular_and_flash_blocks, blocks_to_erase)
11695         (compute_garbled_blocks): Likewise.
11696         (cleanup_request_data, cleanup_write_requests_vector): Remove.
11697         (target_write_memory_blocks): Change argument to std::vector.
11698         * symfile.c (struct load_section_data): Add constructor and
11699         destructor.  Use std::vector for "requests".
11700         (struct load_progress_data): Add initializers.
11701         (load_section_callback): Update.  Use "new".
11702         (clear_memory_write_data): Remove.
11703         (generic_load): Update.
11704
11705 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
11706
11707         * arch/aarch64.h: Use common/tdesc.h.
11708
11709 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11710
11711         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11712         architecture with a 64-bit ABI.
11713
11714 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11715
11716         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11717         ahead of target description loading.
11718
11719 2018-02-26  Tom Tromey  <tom@tromey.com>
11720
11721         * stack.c (backtrace_command_1): Update.
11722         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11723         of "flags".
11724         * python/py-framefilter.c (py_print_frame)
11725         (gdbpy_apply_frame_filter): Change type of "flags".
11726         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11727         of "flags".
11728         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11729         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11730         * extension.h (enum frame_filter_flag): Rename from
11731         frame_filter_flags.
11732         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11733         (apply_ext_lang_frame_filter): Change type of "flags".
11734         * extension.c (apply_ext_lang_frame_filter): Change type of
11735         "flags".
11736         * extension-priv.h (struct extension_language_ops)
11737         <apply_frame_filter>: Change type of "flags".
11738
11739 2018-02-26  Tom Tromey  <tom@tromey.com>
11740
11741         PR python/16497:
11742         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11743         off-by-one in py_end computation.
11744         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11745         PRINT_MORE_FRAMES.
11746         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11747         constant.
11748
11749 2018-02-26  Tom Tromey  <tom@tromey.com>
11750
11751         * dwarf2read.c (struct variant_field): New.
11752         (struct nextfield) <variant>: New field.
11753         (dwarf2_add_field): Handle DW_TAG_variant_part.
11754         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11755         discriminated union.
11756         (read_structure_type): Handle DW_TAG_variant_part.
11757         (handle_struct_member_die): New function, extracted from
11758         process_structure_scope.  Handle DW_TAG_variant.
11759         (process_structure_scope): Handle discriminated unions.  Call
11760         handle_struct_member_die.
11761
11762 2018-02-26  Tom Tromey  <tom@tromey.com>
11763
11764         * rust-lang.h (rust_last_path_segment): Declare.
11765         * rust-lang.c (rust_last_path_segment): Now public.  Change
11766         contract.
11767         (struct disr_info): Remove.
11768         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11769         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11770         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11771         (rust_enum_p, rust_enum_variant): New function.
11772         (rust_underscore_fields): Remove "offset" parameter.
11773         (rust_print_enum): New function.
11774         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11775         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11776         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
11777         enums.
11778         (rust_internal_print_type): New function, from rust_print_type.
11779         Remove enum code.
11780         (rust_print_type): Call rust_internal_print_type.
11781         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11782         Update enum handling.
11783         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11784         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11785         (rust_union_quirks): New functions.
11786         (process_full_comp_unit, process_full_type_unit): Call
11787         rust_union_quirks.
11788         (process_structure_scope): Update rust_unions if necessary.
11789
11790 2018-02-26  Tom Tromey  <tom@tromey.com>
11791
11792         * value.h (value_union_variant): Declare.
11793         * valops.c (value_union_variant): New function.
11794         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11795         (struct discriminant_info): New.
11796         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11797         enumerator.
11798         (struct main_type) <flag_discriminated_union>: New field.
11799
11800 2018-02-26  Tom Tromey  <tom@tromey.com>
11801
11802         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11803         unittests/unpack-selftests.c.
11804         * unittests/unpack-selftests.c: New file.
11805         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11806
11807 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11808
11809         * dwarf2read.c (struct partial_die_info) <read>: New method.
11810         (read_partial_die): Remove the declaration.
11811         (load_partial_dies): Update.
11812         (partial_die_info::partial_die_info):
11813         (read_partial_die): Change it to partial_die_info::read.
11814
11815 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11816
11817         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11818         (fixup_partial_die): Remove declaration.
11819         (scan_partial_symbols): Update.
11820         (partial_die_parent_scope): Likewise.
11821         (partial_die_full_name): Likewise.
11822         (fixup_partial_die): Change it to partial_die_info::fixup.
11823
11824 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11825
11826         * dwarf2read.c (read_partial_die): Update the declaration.
11827         (load_partial_dies): Caller update.
11828         (read_partial_die): Remove one argument abbrev_len.
11829
11830 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11831
11832         * dwarf2read.c (struct partial_die_info): Add ctor, delete
11833         assignment operator.
11834         (load_partial_dies): Use ctor and copy ctor.
11835         (read_partial_die): Update.
11836         (dwarf2_cu::find_partial_die): Use ctor.
11837
11838 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11839
11840         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11841         (find_partial_die_in_comp_unit): Change it to
11842         dwarf2_cu::find_partial_die.
11843         (find_partial_die): Update.
11844
11845 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11846
11847         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11848         is NULL.
11849
11850 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11851
11852         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11853
11854 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
11855
11856         * arch/amd64.h: Use common/tdesc.h.
11857         * arch/i386.c: Likewise.
11858         * arch/i386.h: Likewise.
11859         * arch/tic6x.c: Likewise.
11860         * arch/tdesc.h: Move file from here...
11861         * common/tdesc.h: ...to here.
11862         * features/aarch64-core.c: Regenerate.
11863         * features/aarch64-fpu.c: Regenerate.
11864         * features/i386/32bit-avx.c: Regenerate.
11865         * features/i386/32bit-avx512.c: Regenerate.
11866         * features/i386/32bit-core.c: Regenerate.
11867         * features/i386/32bit-linux.c: Regenerate.
11868         * features/i386/32bit-mpx.c: Regenerate.
11869         * features/i386/32bit-pkeys.c: Regenerate.
11870         * features/i386/32bit-sse.c: Regenerate.
11871         * features/i386/64bit-avx.c: Regenerate.
11872         * features/i386/64bit-avx512.c: Regenerate.
11873         * features/i386/64bit-core.c: Regenerate.
11874         * features/i386/64bit-linux.c: Regenerate.
11875         * features/i386/64bit-mpx.c: Regenerate.
11876         * features/i386/64bit-pkeys.c: Regenerate.
11877         * features/i386/64bit-segments.c: Regenerate.
11878         * features/i386/64bit-sse.c: Regenerate.
11879         * features/i386/x32-core.c: Regenerate.
11880         * features/tic6x-c6xp.c: Regenerate.
11881         * features/tic6x-core.c: Regenerate.
11882         * features/tic6x-gp.c: Regenerate.
11883         * target-descriptions.c: Use common/tdesc.h.
11884         * target-descriptions.h: Likewise.
11885
11886 2018-02-24  Tom Tromey  <tom@tromey.com>
11887
11888         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11889         (try_thread_db_load_from_dir, thread_db_load_search): Use
11890         std::string.
11891         (info_auto_load_libthread_db_compare): Return bool.  Change
11892         argument types.
11893         (info_auto_load_libthread_db): Use std::vector, std::string.
11894         Remove cleanups.
11895
11896 2018-02-24  Tom Tromey  <tom@tromey.com>
11897
11898         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11899         std::string.
11900         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11901         std::string*.
11902         * gdbarch.c: Rebuild.
11903         * gdbarch.h: Rebuild.
11904         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11905         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11906         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11907         std::string*.
11908
11909 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
11910
11911         * gdbtypes.h (sect_offset): Change type to uint64_t.
11912         (sect_offset_str): New function.
11913         * dwarf2read.c (create_addrmap_from_aranges): Use
11914         sect_offset_str.
11915         (error_check_comp_unit_head): Likewise.
11916         (create_debug_type_hash_table): Likewise.
11917         (read_cutu_die_from_dwo): Likewise.
11918         (init_cutu_and_read_dies): Likewise.
11919         (init_cutu_and_read_dies_no_follow): Likewise.
11920         (process_psymtab_comp_unit_reader): Likewise.
11921         (partial_die_parent_scope): Likewise.
11922         (peek_die_abbrev): Likewise.
11923         (process_queue): Likewise.
11924         (dwarf2_physname): Likewise.
11925         (read_namespace_alias): Likewise.
11926         (read_import_statement): Likewise.
11927         (create_dwo_cu_reader): Likewise.
11928         (create_cus_hash_table): Likewise.
11929         (lookup_dwo_cutu): Likewise.
11930         (inherit_abstract_dies): Likewise.
11931         (read_func_scope): Likewise.
11932         (read_call_site_scope): Likewise.
11933         (dwarf2_add_member_fn): Likewise.
11934         (read_common_block): Likewise.
11935         (read_module_type): Likewise.
11936         (read_typedef): Likewise.
11937         (read_subrange_type): Likewise.
11938         (load_partial_dies): Likewise.
11939         (read_partial_die): Likewise.
11940         (find_partial_die): Likewise.
11941         (read_str_index): Likewise.
11942         (dwarf2_string_attr): Likewise.
11943         (build_error_marker_type): Likewise.
11944         (lookup_die_type): Likewise.
11945         (dump_die_shallow): Likewise.
11946         (follow_die_ref): Likewise.
11947         (dwarf2_fetch_die_loc_sect_off): Likewise.
11948         (dwarf2_fetch_constant_bytes): Likewise.
11949         (follow_die_sig): Likewise.
11950         (get_signatured_type): Likewise.
11951         (get_DW_AT_signature_type): Likewise.
11952         (dwarf2_find_containing_comp_unit): Likewise.
11953         (set_die_type): Likewise.
11954
11955 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
11956
11957         * arch/aarch64.c: Include "common-defs.h".
11958         * arch/amd64.c: Likewise.
11959         * arch/i386.c: Likewise.
11960
11961 2018-02-21  Tom Tromey  <tom@tromey.com>
11962
11963         * value.h: (extract_field_op): Update.
11964         * eval.c (extract_field_op): Return a const char *.
11965         * expression.h (parse_expression_for_completion): Update.
11966         * completer.c (complete_expression): Update.
11967         (add_struct_fields): Make fieldname const.
11968         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
11969         (mark_completion_tag, parse_exp_in_context_1): Update.
11970         (parse_expression_for_completion): Change "name" to
11971         unique_xmalloc_ptr*.
11972
11973 2018-02-21  Tom Tromey  <tom@tromey.com>
11974
11975         * infcall.c (call_function_by_hand_dummy): Use std::vector.
11976
11977 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11978
11979         * avr-tdep.c (avr_read_pc): Change parameter type to
11980         readable_regcache.
11981         * gdbarch.sh (read_pc): Likewise.
11982         * gdbarch.c: Re-generated.
11983         * gdbarch.h: Re-generated.
11984         * hppa-tdep.c (hppa_read_pc): Change parameter type to
11985         readable_regcache.
11986         * ia64-tdep.c (ia64_read_pc): Likewise.
11987         * mips-tdep.c (mips_read_pc): Likewise.
11988         * spu-tdep.c (spu_read_pc): Likewise.
11989
11990 2018-02-21  Yao Qi  <yao.qi@linaro.org>
11991
11992         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
11993         * regcache-dump.c: New file.
11994         * regcache.c: Move register_dump to regcache-dump.c.
11995         (maintenance_print_registers): Likewise.
11996         (maintenance_print_raw_registers): Likewise.
11997         (maintenance_print_cooked_registers): Likewise.
11998         (maintenance_print_register_groups): Likewise.
11999         (maintenance_print_remote_registers): Likewise.
12000         (_initialize_regcache): Likewise.
12001         * regcache.h (register_dump): Moved from regcache.c.
12002
12003 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12004
12005         * regcache.c (regcache::regcache): Update.
12006         (regcache::invalidate): Move it to detached_regcache::invalidate.
12007         (get_thread_arch_aspace_regcache): Update.
12008         (regcache::raw_update): Update.
12009         (regcache::cooked_read): Remove some code.
12010         (regcache::cooked_read_value): Likewise.
12011         (regcache::raw_write): Remove assert on m_readonly_p.
12012         (regcache::raw_supply_integer): Move it to
12013         detached_regcache::raw_supply_integer.
12014         (regcache::raw_supply_zeroed): Likewise.
12015         * regcache.h (detached_regcache) <raw_supply_integer>: New
12016         declaration.
12017         <raw_supply_zeroed, invalidate>: Likewise.
12018         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12019         <invalidate>: Likewise.
12020         <m_readonly_p>: Removed.
12021
12022 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12023
12024         * infcmd.c (get_return_value): Let stop_regs point to
12025         get_current_regcache.
12026         * regcache.c (regcache::regcache): Remove.
12027         (register_dump_reg_buffer): New class.
12028         (regcache_print): Adjust.
12029         * regcache.h (regcache): Remove constructors.
12030
12031 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12032
12033         * regcache.c (class register_dump): New class.
12034         (register_dump_regcache, register_dump_none): New class.
12035         (register_dump_remote, register_dump_groups): New class.
12036         (regcache_print): Update.
12037         * regcache.h (regcache_dump_what): Move it to regcache.c.
12038         (regcache) <dump>: Remove.
12039
12040 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12041
12042         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12043          reg_buffer_rw *.
12044         (jit_unwind_reg_set_impl): Call raw_supply.
12045         (jit_frame_sniffer): Use reg_buffer_rw.
12046         * record-full.c (record_full_core_regbuf): Change its type.
12047         (record_full_core_open_1): Use reg_buffer_rw.
12048         (record_full_close): Likewise.
12049         (record_full_core_fetch_registers): Use regcache->raw_supply.
12050         (record_full_core_store_registers): Likewise.
12051         * regcache.c (regcache::get_register_status): Move it to
12052         reg_buffer.
12053         (regcache_raw_set_cached_value): Remove.
12054         (regcache::raw_set_cached_value): Remove.
12055         (regcache::raw_write): Call raw_supply.
12056         (regcache::raw_supply): Move it to reg_buffer_rw.
12057         * regcache.h (regcache_raw_set_cached_value): Remove.
12058         (reg_buffer_rw): New class.
12059
12060 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12061
12062         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12063         readonly_detached_regcache.
12064         (dummy_frame_prev_register): Use regcache->cooked_read.
12065         * frame.c (frame_save_as_regcache): Change return type.
12066         (frame_pop): Update.
12067         * frame.h (frame_save_as_regcache): Update declaration.
12068         * inferior.h (get_infcall_suspend_state_regcache): Update
12069         declaration.
12070         * infrun.c (infcall_suspend_state) <registers>: use
12071         readonly_detached_regcache.
12072         (save_infcall_suspend_state): Don't use regcache_dup.
12073         (get_infcall_suspend_state_regcache): Change return type.
12074         * linux-fork.c (struct fork_info) <savedregs>: Change to
12075         readonly_detached_regcache.
12076         <pc>: New field.
12077         (fork_save_infrun_state): Don't use regcache_dup.
12078         (info_checkpoints_command): Adjust.
12079         * mi/mi-main.c (register_changed_p): Update declaration.
12080         (mi_cmd_data_list_changed_registers): Use
12081         readonly_detached_regcache.
12082         (register_changed_p): Change parameter type to
12083         readonly_detached_regcache.
12084         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12085         readonly_detached_regcache.
12086         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12087         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12088         New.
12089         (regcache::save): Move it to reg_buffer.
12090         (regcache::restore): Change parameter type.
12091         (regcache_dup): Remove.
12092         * regcache.h (reg_buffer) <save>: New method.
12093         (readonly_detached_regcache): New class.
12094         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12095         readonly_detached_regcache.
12096         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12097
12098 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12099
12100         * frame.c (frame_save_as_regcache): Use regcache method save.
12101         (frame_pop): Use regcache method restore.
12102         * infrun.c (restore_infcall_suspend_state): Likewise.
12103         * linux-fork.c (fork_load_infrun_state): Likewise.
12104         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12105         save.
12106         * regcache.c (regcache_save): Remove.
12107         (regcache::restore): More asserts.
12108         (regcache_cpy): Remove.
12109         * regcache.h (regcache_save): Remove the declaration.
12110         (regcache::restore): Move from private to public.
12111         Remove the friend declaration of regcache_cpy.
12112         (regcache_cpy): Remove declaration.
12113
12114 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12115
12116         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12117         parameter type to 'readable_regcache *'.
12118         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12119         * arm-tdep.c (arm_neon_quad_read): Likewise.
12120         (arm_pseudo_read): Likewise.
12121         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12122         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12123         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12124         * gdbarch.c: Re-generated.
12125         * gdbarch.h: Re-generated.
12126         * gdbarch.sh (pseudo_register_read): Change parameter type to
12127         'readable_regcache *'.
12128         (pseudo_register_read_value): Likewise.
12129         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12130         (h8300_pseudo_register_read): Likewise.
12131         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12132         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12133         (i386_pseudo_register_read_into_value): Likewise.
12134         (i386_pseudo_register_read_value): Likewise.
12135         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12136         declaration.
12137         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12138         * m32c-tdep.c (m32c_raw_read): Likewise.
12139         (m32c_read_flg): Likewise.
12140         (m32c_banked_register): Likewise.
12141         (m32c_banked_read): Likewise.
12142         (m32c_sb_read): Likewise.
12143         (m32c_part_read): Likewise.
12144         (m32c_cat_read): Likewise.
12145         (m32c_r3r2r1r0_read): Likewise.
12146         (m32c_pseudo_register_read): Likewise.
12147         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12148         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12149         (mep_pseudo_cr64_read): Likewise.
12150         (mep_pseudo_register_read): Likewise.
12151         * mips-tdep.c (mips_pseudo_register_read): Likewise.
12152         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12153         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12154         * regcache.c (regcache::raw_read): Move it to readable_regcache.
12155         (regcache::cooked_read): Likewise.
12156         (regcache::cooked_read_value): Likewise.
12157         (regcache_cooked_read_signed):
12158         (regcache::cooked_read): Likewise.
12159         * regcache.h (readable_regcache): New class.
12160         (regcache): Inherit readable_regcache.  Move some methods to
12161         readable_regcache.
12162         * rl78-tdep.c (rl78_pseudo_register_read): Change
12163         parameter type to 'readable_regcache *'.
12164         * rs6000-tdep.c (do_regcache_raw_read): Remove.
12165         (e500_pseudo_register_read): Change parameter type to
12166         'readable_regcache *'.
12167         (dfp_pseudo_register_read): Likewise.
12168         (vsx_pseudo_register_read): Likewise.
12169         (efpr_pseudo_register_read): Likewise.
12170         * s390-tdep.c (s390_pseudo_register_read): Likewise.
12171         * sh-tdep.c (sh_pseudo_register_read): Likewise.
12172         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12173         (sh64_pseudo_register_read): Likewise.
12174         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12175         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12176         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12177         (spu_pseudo_register_read): Likewise.
12178         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12179         (xtensa_pseudo_register_read): Likewise.
12180
12181 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12182
12183         * regcache.c (regcache::regcache): Call reg_buffer ctor.
12184         (regcache::arch): Move it to reg_buffer::arch.
12185         (regcache::register_buffer): Likewise.
12186         (regcache::assert_regnum): Likewise.
12187         (regcache::num_raw_registers): Likewise.
12188         * regcache.h (reg_buffer): New class.
12189         (regcache): Inherit reg_buffer.
12190
12191 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
12192
12193         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12194         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12195
12196 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
12197
12198         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12199
12200 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
12201
12202         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12203         (SFILES): Remove common/*.c files.
12204         (COMMON_OBS): Remove some *.o files built from common/*.c files.
12205         * common/common.host: Add common reference.
12206         * configure.ac: Likewise.
12207         * configure: Regenerate.
12208
12209 2018-02-16  Yao Qi  <yao.qi@linaro.org>
12210
12211         * block.c (block_namespace_info): Inherit allocate_on_obstack.
12212         (block_initialize_namespace): Use new.
12213         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12214         (dwarf2_free_objfile): Use delete.
12215         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12216         (copy_type_recursive): Use new.
12217         * gdb_obstack.h (allocate_on_obstack): New.
12218
12219 2018-02-15  Yao Qi  <yao.qi@linaro.org>
12220
12221         PR gdb/22849
12222         * inferior.c (exit_inferior_1): Reset inf->control.
12223
12224 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
12225
12226         * ada-lang.c (ada_to_fixed_value_create): Delete advance
12227         declaration.
12228
12229 2018-02-14  Pedro Alves  <palves@redhat.com>
12230
12231         * frame-unwind.c (frame_unwind_try_unwinder): Always call
12232         frame_cleanup_after_sniffer on exception.
12233
12234 2018-02-14  Tom Tromey  <tom@tromey.com>
12235
12236         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12237         const.
12238         (solib_bfd_open): Make pathname const.
12239         * solib.c (solib_bfd_open): Make pathname const.
12240         * solib-spu.c (spu_bfd_fopen): Make name const.
12241         (spu_bfd_open): Make pathname const.
12242         * solib-darwin.c (darwin_bfd_open): Make pathname const.
12243         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12244
12245 2018-02-14  Tom Tromey  <tom@tromey.com>
12246
12247         * symfile.c (symfile_bfd_open): Update.
12248         * source.h (openp, source_full_path_of, find_and_open_source):
12249         Change argument type to unique_xmalloc_ptr.
12250         * source.c (openp): Take a unique_xmalloc_ptr.
12251         (source_full_path_of, find_and_open_source): Likewise.
12252         (open_source_file, symtab_to_fullname): Update.
12253         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12254         unique_xmalloc_ptr.
12255         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12256         (exec_file_find): Update.
12257         * psymtab.c (psymtab_to_fullname): Update.
12258         * nto-tdep.h (nto_find_and_open_solib): Update.
12259         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12260         unique_xmalloc_ptr.
12261         * exec.c (exec_file_attach): Update.
12262         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12263         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12264
12265 2018-02-14  Tom Tromey  <tom@tromey.com>
12266
12267         * solib.c: Include source.h.
12268         * nto-tdep.c: Include source.h.
12269         * mi/mi-cmd-env.c: Include source.h.
12270         * infcmd.c: Include source.h.
12271         * exec.c: Include source.h.
12272         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12273         (add_path, directory_switch, source_path, init_source_path): Move
12274         declarations...
12275         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12276         (add_path, directory_switch, source_path, init_source_path):
12277         ...here.
12278
12279 2018-02-14  Tom Tromey  <tom@tromey.com>
12280
12281         * solist.h (exec_file_find, solib_find): Return
12282         unique_xmalloc_ptr.
12283         (solib_bfd_fopen): Take a const char *.
12284         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12285         (exec_file_find, solib_find): Likewise.
12286         (solib_bfd_fopen): Do not take ownership of "pathname".
12287         (solib_bfd_open): Use unique_xmalloc_ptr.
12288         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12289         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12290         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12291         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12292
12293 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
12294
12295         * ada-lang.c (name_match_type_from_name): Remove reference to
12296         ada_name_for_lookup in function's documentation.
12297         * ada-lang.h (ada_name_for_lookup): Delete declaration.
12298
12299 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12300
12301         * defs.h (enum openp_flags): New enum.
12302         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12303         Move to enum openp_flags.
12304         (openp_flags): New enum flags.
12305         (openp): Change parameter type to openp_flags.
12306         * source.c (openp): Change parameter type to openp_flags.
12307         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12308         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12309
12310 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12311
12312         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12313         per-command.
12314
12315 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12316
12317         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12318         into...
12319         (class dwarf2_queue_guard): ...the destructor of this new class.
12320         (dw2_do_instantiate_symtab): Create instance of the new class
12321         dwarf2_queue_guard, remove cleanup.
12322
12323 2018-02-09  Tom Tromey  <tom@tromey.com>
12324
12325         * source.c (find_source_lines): Don't reference past the end of
12326         the vector.
12327
12328 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12329
12330         * remote.c (remote_btrace_maybe_reopen): Change error message.
12331         * btrace.c (btrace_enable): Likewise.
12332         (parse_xml_btrace): Likewise.
12333         (parse_xml_btrace_conf): Likewise.
12334
12335 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12336
12337         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12338         (linux_enable_pt, linux_enable_bts): Call
12339         diagnose_perf_event_open_fail.
12340
12341 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12342
12343         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12344         Remove parameter and change return type.  Update callers.  Move it.
12345         (linux_enable_bts, linux_enable_pt): Improve error message.
12346         (linux_enable_pt): Remove zero buffer size check.
12347         (linux_enable_btrace): Improve error messages.  Remove NULL return
12348         check.
12349
12350 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12351
12352         * btrace.c (btrace_enable): Remove target_supports_btrace call.
12353         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12354         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12355         (linux_supports_pt, linux_supports_btrace): Remove.
12356         (linux_enable_bts): Call cpu_supports_bts.
12357         * nat/linux-btrace.h (linux_supports_btrace): Remove.
12358         * remote.c (remote_supports_btrace): Remove.
12359         (init_remote_ops): Remove remote_supports_btrace.
12360         * target-delegates.c: Regenerated.
12361         * target.c (target_supports_btrace): Remove.
12362         * target.h (target_ops) <to_supports_btrace>: Remove
12363         (target_supports_btrace): Remove.
12364         * x86-linux-nat.c (x86_linux_create_target): Remove
12365         linux_supports_btrace.
12366
12367 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12368
12369         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12370         btrace failed.
12371         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12372         exception and use message in own exception.
12373
12374 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12375
12376         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12377         (perf_event_pt_event_type): Use gdb_file_up.
12378         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12379         scoped_fd, and scoped_mmap.
12380
12381 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12382
12383         * common/scoped_mmap.h: New.
12384         * unittests/scoped_mmap-selftest.c: New.
12385         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12386         unittests/scoped_mmap-selftest.c.
12387
12388 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12389
12390         * common/scoped_fd.h: New.
12391         * unittests/scoped_fd-selftest.c: New.
12392         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12393         unittests/scoped_fd-selftest.c.
12394
12395 2018-02-09  Tom Tromey  <tom@tromey.com>
12396
12397         * auto-load.c (auto_load_section_scripts): Use
12398         gdb::unique_xmalloc_ptr.
12399
12400 2018-02-09  Tom Tromey  <tom@tromey.com>
12401
12402         * auto-load.c (execute_script_contents): Use std::string.
12403
12404 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
12405
12406         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12407         Python function, rather than a new command.
12408
12409 2018-02-08  Tom Tromey  <tom@tromey.com>
12410
12411         * solib.c (solib_find_1): Use std::string.
12412         (solib_bfd_fopen): Use unique_xmalloc_ptr.
12413
12414 2018-02-08  Tom Tromey  <tom@tromey.com>
12415
12416         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12417
12418 2018-02-08  Tom Tromey  <tom@tromey.com>
12419
12420         * source.c (find_source_lines): Use gdb::def_vector.
12421
12422 2018-02-08  Tom Tromey  <tom@tromey.com>
12423
12424         * macrocmd.c (struct temporary_macro_definition): New.
12425         (macro_define_command): Use temporary_macro_definition.  Remove
12426         cleanups.
12427         (free_macro_definition_ptr): Remove.
12428
12429 2018-02-08  Tom Tromey  <tom@tromey.com>
12430
12431         * macroexp.c (maybe_expand): Use std::string.
12432
12433 2018-02-08  Tom Tromey  <tom@tromey.com>
12434
12435         * macroexp.c (struct macro_buffer): Add initializers for some
12436         members.
12437         (init_buffer, init_shared_buffer, free_buffer)
12438         (free_buffer_return_text): Remove.
12439         (macro_buffer): New constructors.
12440         (~macro_buffer): New destructor.
12441         (macro_buffer::set_shared): New method.
12442         (macro_buffer::resize_buffer, macro_buffer::appendc)
12443         (macro_buffer::appendmem): Now methods, not free functions.
12444         (set_token, append_tokens_without_splicing, stringify)
12445         (macro_stringify): Update.
12446         (gather_arguments): Change return type.  Remove argc_p argument,
12447         add args_ptr argument.  Use std::vector.
12448         (substitute_args): Remove argc argument.  Accept std::vector.
12449         (expand): Update.  Use std::vector.
12450         (scan, macro_expand, macro_expand_next): Update.
12451
12452 2018-02-08  Tom Tromey  <tom@tromey.com>
12453
12454         * symtab.c (default_collect_symbol_completion_matches_break_on):
12455         Use unique_xmalloc_ptr.
12456         * macroscope.h: (sal_macro_scope, user_macro_scope)
12457         (default_macro_scope): Return unique_xmalloc_ptr.
12458         * macroscope.c (sal_macro_scope, user_macro_scope)
12459         (default_macro_scope): Return unique_xmalloc_ptr.
12460         * macroexp.h (macro_expand, macro_expand_once): Return
12461         unique_xmalloc_ptr.
12462         * macroexp.c (macro_expand, macro_expand_once): Return
12463         unique_xmalloc_ptr.
12464         * macrocmd.c (macro_expand_command, macro_expand_once_command)
12465         (info_macro_command, info_macros_command): Use
12466         unique_xmalloc_ptr.
12467         * compile/compile-c-support.c (write_macro_definitions): Use
12468         unique_xmalloc_ptr.
12469         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12470
12471 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
12472
12473         * value.c (value_static_field): Assign field type instead of
12474         containing type when returning an optimized out value.
12475
12476 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12477
12478         * ft32-tdep.c (ft32_read_pc): Remove.
12479         (ft32_write_pc): Remove.
12480         (ft32_gdbarch_init): Update.
12481         * m32r-tdep.c (m32r_read_pc): Remove.
12482         (m32r_gdbarch_init): Update.
12483         * mep-tdep.c (mep_read_pc): Remove.
12484         (mep_gdbarch_init): Update.
12485         * microblaze-tdep.c (microblaze_write_pc): Remove.
12486         (microblaze_gdbarch_init): Update.
12487         * mn10300-tdep.c (mn10300_read_pc): Remove.
12488         (mn10300_write_pc): Remove.
12489         (mn10300_gdbarch_init): Update.
12490         * moxie-tdep.c (moxie_read_pc): Remove.
12491         (moxie_write_pc): Remove.
12492         (moxie_gdbarch_init): Update.
12493
12494 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12495
12496         * expprint.c (print_subexp_standard): Handle
12497         OP_F77_UNDETERMINED_ARGLIST.
12498         (dump_subexp_body_standard): Likewise.
12499
12500 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
12501
12502         * target-descriptions.c (tdesc_element_visitor) Add empty
12503         implementations.
12504         (tdesc_type): Move make_gdb_type from here.
12505         (tdesc_type_builtin): Likewise.
12506         (tdesc_type_vector): Likewise.
12507         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12508         (make_gdb_type_struct): Move from tdesc_type_with_fields.
12509         (make_gdb_type_union): Likewise.
12510         (make_gdb_type_flags): Likewise.
12511         (make_gdb_type_enum): Likewise.
12512         (make_gdb_type): New function.
12513         (tdesc_register_type): Use static make_gdb_type.
12514
12515 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
12516
12517         * infcmd.c (default_print_one_register_info): Align natural-format
12518         column values consistently one under another.
12519         (pad_to_column): New function.
12520
12521 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
12522
12523         * dwarf2read.c (dwarf2_physname): Move commment.
12524
12525 2018-02-01  Leszek Swirski  <leszeks@google.com>
12526
12527         * varobj.c (varobj_formatted_print_options): Allow recursive
12528         pretty printing if pretty printing is enabled.
12529
12530 2018-02-01  Leszek Swirski  <leszeks@google.com>
12531
12532         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12533         names after a structop as a filename.
12534
12535 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12536
12537         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12538         (arm_record_coproc_data_proc): Likewise.
12539
12540 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12541
12542         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12543
12544 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
12545
12546         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12547         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12548
12549 2018-01-31  Pedro Alves  <palves@redhat.com>
12550
12551         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12552         * inflow.c (child_terminal_save_inferior): Wrap reference to
12553         tcgetpgrp in HAVE_TERMIOS_H.
12554         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12555         _WIN32.
12556         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12557         always iterate over all inferiors.
12558         (gdbsim_cntrl_c): Adjust.
12559         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12560
12561 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12562
12563         * gdbtypes.c (lookup_array_range_type): Make sure the array's
12564         index type is objfile-owned if the element type is as well.
12565
12566 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12567
12568         GDB 8.1 released.
12569
12570 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12571
12572         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12573         "features/s390x-linux64.c".
12574         (_initialize_s390_linux_tdep): Remove initialization of tdescs
12575         s390_linux32 and s390x_linux64.
12576         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12577         default tdesc.
12578         * s390-tdep.c: Include "features/s390-linux32.c" and
12579         "features/s390x-linux64.c".
12580         (s390_tdesc_valid): Add check for tdesc_has_registers.
12581         (s390_gdbarch_init): Make sure there is always a valid tdesc.
12582         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12583         tdesc_s390x_linux64.
12584         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12585         tdesc_s390x_linux64 to...
12586         * s390-tdep.h: ...here.
12587
12588 2018-01-30  Pedro Alves  <palves@redhat.com>
12589
12590         PR gdb/13211
12591         * config.in, configure: Regenerate.
12592         * configure.ac: Check for getpgid.
12593         * go32-nat.c (go32_pass_ctrlc): New.
12594         (go32_target): Install it.
12595         * inf-child.c (inf_child_target): Install
12596         child_terminal_save_inferior, child_pass_ctrlc and
12597         child_interrupt.
12598         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12599         (inf_ptrace_target): No longer install it.
12600         * infcmd.c (interrupt_target_1): Adjust.
12601         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12602         (child_interrupt): Declare.
12603         (inferior::terminal_state): New.
12604         * inflow.c (struct terminal_info): Update comments.
12605         (inferior_process_group): Delete.
12606         (terminal_is_ours): Delete.
12607         (gdb_tty_state): New.
12608         (child_terminal_init): Adjust.
12609         (is_gdb_terminal, sharing_input_terminal_1)
12610         (sharing_input_terminal): New functions.
12611         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
12612         Set the process's actual process group in the foreground if
12613         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
12614         mark terminal as the inferior's if not sharing GDB's terminal.
12615         Don't check attach_flag.
12616         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12617         pass down a target_terminal_state.
12618         (child_terminal_save_inferior): New, factored out from ...
12619         (child_terminal_ours_1): ... this.  Handle
12620         target_terminal_state::is_ours_for_output.
12621         (child_interrupt, child_pass_ctrlc): New.
12622         (inflow_inferior_exit): Clear the inferior's terminal_state.
12623         (copy_terminal_info): Copy the inferior's terminal state.
12624         (_initialize_inflow): Remove reference to terminal_is_ours.
12625         * inflow.h (inferior_process_group): Delete.
12626         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12627         * procfs.c (procfs_target): Don't install procfs_interrupt.
12628         (procfs_interrupt): Delete.
12629         * remote.c (remote_serial_quit_handler): Adjust.
12630         (remote_interrupt): Remove ptid parameter.  Adjust.
12631         * target-delegates.c: Regenerate.
12632         * target.c: Include "terminal.h".
12633         (target_terminal::terminal_state): Rename to ...
12634         (target_terminal::m_terminal_state): ... this.
12635         (target_terminal::init): Adjust.
12636         (target_terminal::inferior): Adjust to per-inferior
12637         terminal_state.
12638         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12639         (target_terminal::ours, target_terminal::ours_for_output): Use
12640         target_terminal_is_ours_kind.
12641         (target_interrupt): Remove ptid parameter.  Adjust.
12642         (default_target_pass_ctrlc): Adjust.
12643         * target.h (target_ops::to_terminal_save_inferior): New field.
12644         (target_ops::to_interrupt): Remove ptid_t parameter.
12645         (target_interrupt): Remove ptid_t parameter.  Update comment.
12646         (target_pass_ctrlc): Update comment.
12647         * target/target.h (target_terminal_state): New scoped enum,
12648         factored out of ...
12649         (target_terminal::terminal_state): ... here.
12650         (target_terminal::inferior): Update comments.
12651         (target_terminal::restore_inferior): New.
12652         (target_terminal::is_inferior, target_terminal::is_ours)
12653         (target_terminal::is_ours_for_output): Adjust.
12654         (target_terminal::scoped_restore_terminal_state): Adjust to
12655         rename, and call restore_inferior() instead of inferior().
12656         (target_terminal::scoped_restore_terminal_state::m_state): Change
12657         type.
12658         (target_terminal::terminal_state): Rename to ...
12659         (target_terminal::m_terminal_state): ... this and change type.
12660
12661 2018-01-30  Pedro Alves  <palves@redhat.com>
12662
12663         * linux-nat.c (wait_for_signal): New function.
12664         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12665         directly.
12666         (async_terminal_is_ours)
12667         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12668         (linux_nat_add_target): Don't override
12669         to_terminal_inferior/to_terminal_ours.
12670
12671 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
12672
12673         * remote.c (remote_follow_fork): Don't call "detach_inferior".
12674
12675 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
12676
12677         * dwarf2read.c (free_dwo_files): Add forward-declaration.
12678         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12679         dwarf2_per_objfile_free here.
12680         (dwarf2_per_objfile_free): Remove.
12681         (_initialize_dwarf2_read): Don't register
12682         dwarf2_per_objfile_free as a registry cleanup.
12683
12684 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
12685
12686         Avoid compilation errors in MinGW native builds
12687
12688         The error is triggered by including python-internal.h, and the
12689         error message is:
12690
12691              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12692                       from build-gnulib/import/math.h:27,
12693                       from d:/usr/Python26/include/pyport.h:235,
12694                       from d:/usr/Python26/include/Python.h:58,
12695                       from python/python-internal.h:94,
12696                       from python/py-arch.c:24:
12697              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12698         using ::hypot;
12699                 ^~~~~
12700
12701         This happens because Python headers define 'hypot' to expand t
12702         '_hypot' in the Windows builds.
12703         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12704         'hypoth'.  This avoids a compilation error.
12705
12706 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12707
12708         * MAINTAINERS (Write After Approval): Fix ordering.
12709
12710 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12711
12712         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12713
12714 2018-01-26  Alan Modra  <amodra@gmail.com>
12715
12716         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12717         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12718         Remove nop.  Make const.  Comment.
12719         (powerpc32_plt_stub_so_2): New.
12720         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12721         Correct count.  Update uses.
12722         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12723         Move common code reading PLT entry word.  Correct
12724         powerpc32_plt_stub PLT address calculation.
12725         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12726         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12727         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12728         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12729         (ppc64_standard_linkage8): Likewise.
12730         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12731         Correct insns description.
12732         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12733
12734 2018-01-24  Pedro Alves  <palves@redhat.com>
12735
12736         GCC PR libstdc++/83906
12737         * gdbtypes.c (operator==(const dynamic_prop &,
12738         const dynamic_prop &)): New.
12739         (operator==(const range_bounds &, const range_bounds &)): New.
12740         (check_types_equal): Use them instead of memcmp.
12741         * gdbtypes.h (operator==(const dynamic_prop &,
12742         const dynamic_prop &)): Declare.
12743         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12744         (operator==(const range_bounds &, const range_bounds &)): Declare.
12745         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12746
12747 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12748
12749         * s390-linux-tdep.c (s390_record_address_mask)
12750         (s390_record_calc_disp_common, s390_record_calc_disp)
12751         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12752         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12753         (s390_process_record): Move to s390-tdep.c.
12754         (s390_linux_init_abi_any): Adjust.
12755         * s390-tdep.c (s390_record_address_mask)
12756         (s390_record_calc_disp_common, s390_record_calc_disp)
12757         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12758         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12759         (s390_process_record): Moved from s390-linux-tdep.c
12760         (s390_gdbarch_init): Adjust.
12761
12762 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12763
12764         * s390-linux-nat.c (s390-tdep.h): New include.
12765         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12766         (HFILES_NO_SRCDIR): Add s390-tdep.h.
12767         (ALLDEPFILES): Add s390-tdep.c.
12768         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12769         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12770         * s390-tdep.h: ...this.  New file.
12771         * s390-linux-tdep.c (s390-tdep.h): New include.
12772         (_initialize_s390_tdep): Rename to...
12773         (_initialize_s390_linux_tdep): ...this and adjust.
12774         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12775         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12776         s390-tdep.h.
12777         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12778         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12779         (s390_is_partial_instruction, s390_software_single_step)
12780         (is_non_branch_ril, s390_displaced_step_copy_insn)
12781         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12782         (s390_prologue_data, s390_addr, s390_store, s390_load)
12783         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12784         (s390_register_call_saved, s390_guess_tracepoint_registers)
12785         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12786         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12787         (s390_pseudo_register_name, s390_pseudo_register_type)
12788         (s390_pseudo_register_read, s390_pseudo_register_write)
12789         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12790         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12791         (s390_addr_bits_remove, s390_address_class_type_flags)
12792         (s390_address_class_type_flags_to_name)
12793         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12794         (s390_function_arg_float, s390_function_arg_vector)
12795         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12796         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12797         (s390_frame_align, s390_register_return_value, s390_return_value)
12798         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12799         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12800         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12801         (s390_trad_frame_prev_register, s390_unwind_cache)
12802         (s390_prologue_frame_unwind_cache)
12803         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12804         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12805         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12806         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12807         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12808         (s390_frame_base_address, s390_local_base_address)
12809         (s390_frame_base, s390_gcc_target_options)
12810         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12811         (s390_validate_reg_range, s390_tdesc_valid)
12812         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12813         * s390-tdep.c: ...this.  New file.
12814
12815 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12816
12817         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12818         (s390_process_record, s390_gdbarch_tdep_alloc)
12819         (s390_linux_init_abi_any): Use/set new hook.
12820
12821 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12822
12823         * s390-linux-tdep.c (osabi.h): New include.
12824         (s390_linux_init_abi_31, s390_linux_init_abi_64)
12825         (s390_linux_init_abi_any): New functions.
12826         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12827
12828 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12829
12830         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12831         tdesc_has_registers check
12832
12833 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12834
12835         * s390-linux-tdep.c (s390_tdesc_valid): New function.
12836         (s390_validate_reg_range): New macro.
12837         (s390_gdbarch_init): Adjust.
12838
12839 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12840
12841         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12842         (s390_gdbarch_tdep_alloc): Adjust.
12843         (s390_gdbarch_init): Adjust.
12844
12845 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12846
12847         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12848         <have_tdb>: Change type to bool.
12849         (s390_gdbarch_tdep_alloc): Adjust.
12850         (s390_gdbarch_init): Adjust.
12851
12852 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12853
12854         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12855         (gdbarch_tdep) <have_upper, have_vx>: New fields.
12856         (s390_gdbarch_tdep_alloc): New function.
12857         (s390_gdbarch_init): Allocate tdep at start and use its fields
12858         instead of separate variables.
12859
12860 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12861
12862         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12863         when looking for cached gdbarch and add comment for remaining.
12864
12865 2018-01-22  Pedro Alves  <palves@redhat.com>
12866             Sergio Durigan Junior  <sergiodj@redhat.com>
12867
12868         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12869         case.
12870
12871 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
12872
12873         * MAINTAINERS: Update my company e-mail address.
12874
12875 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12876
12877         * regcache.c (cooked_write_test): New function.
12878         (_initialize_regcache): Register the test.
12879
12880 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12881
12882         * ia64-tdep.c (ia64_pseudo_register_read): Call
12883         regcache->cooked_read instead of regcache_cooked_read_unsigned.
12884         * m32c-tdep.c (m32c_cat_read): Likewise.
12885         (m32c_r3r2r1r0_read): Likewise.
12886         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12887         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12888
12889 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12890
12891         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12892         method raw_read instead of regcache_raw_read.
12893         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12894         * arm-tdep.c (arm_neon_quad_read): Likewise.
12895         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12896         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12897         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12898         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12899         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12900         (i386_pseudo_register_read_into_value): Likewise.
12901         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12902         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12903         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12904         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12905         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12906         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
12907         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12908         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
12909         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12910
12911 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12912
12913         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12914         * configure.tgt: Remove target mt.
12915         * mt-tdep.c: Remove.
12916         * regcache.c (cooked_read_test): Remove the check for mt.
12917
12918 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12919
12920         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12921         instead of gdbarch_pseudo_register_read_value.
12922
12923 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12924
12925         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12926         language is Ada.
12927
12928 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12929
12930         * linespec.c (create_sals_line_offset): Remove code that preserved
12931         the symtab_and_line's line number.
12932
12933 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12934
12935         * varobj.c (varobj_create): Don't set valid_block when creating a
12936         floating varobj.
12937
12938 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12939
12940         * varobj.c (varobj_create): Remove out of date comment.
12941
12942 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12943
12944         PR mi/20395
12945         * ada-exp.y (write_var_from_sym): Pass extra parameter when
12946         updating innermost block.
12947         * parse.c (innermost_block_tracker::update): Take extra type
12948         parameter, and check types match before updating innermost block.
12949         (write_dollar_variable): Update innermost block for registers.
12950         * parser-defs.h (enum innermost_block_tracker_type): New enum.
12951         (innermost_block_tracker::innermost_block_tracker): Initialise
12952         m_types member.
12953         (innermost_block_tracker::reset): Take type parameter.
12954         (innermost_block_tracker::update): Take type parameter, and pass
12955         type through as needed.
12956         (innermost_block_tracker::m_types): New member.
12957         * varobj.c (varobj_create): Pass type when reseting innermost
12958         block.
12959
12960 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12961
12962         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
12963         * ada-lang.c (resolve_subexp): Likewise.
12964         * breakpoint.c (set_breakpoint_condition) Likewise.
12965         (watch_command_1) Likewise.
12966         * c-exp.y (variable): Likewise.
12967         * d-exp.y (PrimaryExpression): Likewise.
12968         * f-exp.y (variable): Likewise.
12969         * go-exp.y (variable): Likewise.
12970         * m2-exp.y (variable): Likewise.
12971         * objfiles.c (objfile::~objfile): Likewise.
12972         * p-exp.y (variable): Likewise.
12973         * parse.c (innermost_block): Change type.
12974         * parser-defs.h (class innermost_block_tracker): New.
12975         (innermost_block): Change to innermost_block_tracker.
12976         * printcmd.c (display_command): Switch to innermost_block API.
12977         (do_one_display): Likewise.
12978         * rust-exp.y (do_one_display): Likewise.
12979         * symfile.c (clear_symtab_users): Likewise.
12980         * varobj.c (varobj_create): Switch to innermost_block API, replace
12981         use of innermost_block with block stored on varobj object.
12982
12983 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12984
12985         * expression.h (innermost_block): Remove declaration.
12986         * varobj.c: Add 'parser-defs.h' include.
12987
12988 2018-01-19  Tom Tromey  <tom@tromey.com>
12989
12990         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
12991         symbols in the static and global blocks.
12992
12993 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
12994
12995         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
12996         gdb_ptrace.h, and move including gdb_wait.h ...
12997         * nat/linux-ptrace.h: ... to here.
12998
12999 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13000
13001         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13002         inf_ptrace_detach_success.
13003         (inf_ptrace_detach_success): Add inferior parameter, use it
13004         instead of inferior_ptid, pass it to detach_inferior.
13005         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13006         parameter.
13007         * inferior.c (detach_inferior): Add overload that takes an
13008         inferior object.
13009         * inferior.h (detach_inferior): Likewise.
13010         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13011         use inferior_ptid, adjust call to inf_ptrace_detach_success.
13012         * linux-thread-db.c (thread_db_detach): Use inf parameter.
13013
13014 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13015
13016         * target.h (struct target_ops) <to_detach>: Add inferior
13017         parameter.
13018         (target_detach): Likewise.
13019         * target.c (dispose_inferior): Pass inferior down.
13020         (target_detach): Pass inferior down.  Assert that it is equal to
13021         the current inferior.
13022         * aix-thread.c (aix_thread_detach): Pass inferior down.
13023         * corefile.c (core_file_command): Pass current_inferior() down.
13024         * corelow.c (core_detach): Add inferior parameter.
13025         * darwin-nat.c (darwin_detach): Likewise.
13026         * gnu-nat.c (gnu_detach): Likewise.
13027         * inf-ptrace.c (inf_ptrace_detach): Likewise.
13028         * infcmd.c (detach_command): Pass current_inferior() down to
13029         target_detach.
13030         * infrun.c (follow_fork_inferior): Pass parent_inf to
13031         target_detach.
13032         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13033         target_detach.
13034         * linux-nat.c (linux_nat_detach): Add inferior parameter.
13035         * linux-thread-db.c (thread_db_detach): Likewise.
13036         * nto-procfs.c (procfs_detach): Likewise.
13037         * procfs.c (procfs_detach): Likewise.
13038         * record.c (record_detach): Likewise.
13039         * record.h (struct inferior): Forward-declare.
13040         (record_detach): Add inferior parameter.
13041         * remote-sim.c (gdbsim_detach): Likewise.
13042         * remote.c (remote_detach_1): Likewise.
13043         (remote_detach): Likewise.
13044         (extended_remote_detach): Likewise.
13045         * sol-thread.c (sol_thread_detach): Likewise.
13046         * target-debug.h (target_debug_print_inferior_p): New macro.
13047         * target-delegates.c: Re-generate.
13048         * top.c (kill_or_detach): Pass inferior down to target_detach.
13049         * windows-nat.c (windows_detach): Add inferior parameter.
13050
13051 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13052
13053         * target.h (struct target_ops) <to_detach>: Remove args
13054         parameter.
13055         (target_detach): Likewise.
13056         * target.c (dispose_inferior): Adjust.
13057         (target_detach): Remove args parameter, adjust.
13058         * aix-thread.c (aix_thread_detach): Adjust.
13059         * corefile.c (core_file_command): Adjust.
13060         * corelow.c (core_detach): Adjust.
13061         * darwin-nat.c (darwin_detach): Adjust.
13062         * gnu-nat.c (gnu_detach): Adjust.
13063         * inf-ptrace.c (inf_ptrace_detach): Adjust.
13064         * infcmd.c (detach_command): Adjust
13065         * infrun.c (follow_fork_inferior): Adjust.
13066         (handle_vfork_child_exec_or_exit): Adjust.
13067         * linux-fork.c (linux_fork_detach): Remove args parameter.
13068         * linux-fork.h (linux_fork_detach): Likewise.
13069         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13070         * linux-thread-db.c (thread_db_detach): Likewise.
13071         * nto-procfs.c (procfs_detach): Likewise.
13072         * procfs.c (procfs_detach): Likewise.
13073         (do_detach): Remove signo parameter.
13074         * record.c (record_detach): Remove args parameter.
13075         * record.h (record_detach): Likewise.
13076         * remote-sim.c (gdbsim_detach): Likewise.
13077         * remote.c (remote_detach_1): Likewise.
13078         (remote_detach): Likewise.
13079         (extended_remote_detach): Likewise.
13080         * sol-thread.c (sol_thread_detach): Likewise.
13081         * target-delegates.c: Re-generate.
13082         * top.c (struct qt_args) <args>: Remove field.
13083         (kill_or_detach): Don't pass args.
13084         (quit_force): Don't set args.
13085         * windows-nat.c (windows_detach): Remove args parameter.
13086
13087 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13088
13089         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13090         (arm_linux_init_abi): Install it.
13091
13092 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13093
13094         * osabi.c (gdb_osabi_names): Extend the regexp for
13095         arm-linux-gnueabihf.
13096
13097 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13098
13099         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13100         m_abbrevs.
13101         (abbrev_table::add_abbrev): Update.
13102         (abbrev_table::lookup_abbrev): Update.
13103
13104 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13105
13106         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13107
13108 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
13109
13110         * compile/compile.c (compile_to_object): Convert "triplet_rx"
13111         to "std::string".
13112
13113 2018-01-17  Tom Tromey  <tom@tromey.com>
13114
13115         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
13116
13117 2018-01-17  Tom Tromey  <tom@tromey.com>
13118
13119         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13120         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13121         (create_array_type_with_stride): Update.
13122         * dwarf2read.c (set_die_type): Update.
13123
13124 2018-01-17  Tom Tromey  <tom@tromey.com>
13125
13126         * dwarf2read.c (delayed_method_info): Remove typedef.
13127         (dwarf2_cu::method_info): Now a std::vector.
13128         (add_to_method_list): Update.
13129         (free_delayed_list): Remove.
13130         (compute_delayed_physnames): Update.
13131         (process_full_comp_unit, process_full_type_unit): Clear the method
13132         list.  Remove cleanups.
13133         (psymtab_include_file_name): Add name_holder parameter.  Use
13134         unique_xmalloc_ptr.
13135         (dwarf_decode_lines): Update.
13136
13137 2018-01-17  Tom Tromey  <tom@tromey.com>
13138             Simon Marchi  <simon.marchi@ericsson.com>
13139
13140         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13141         (dwarf2_per_objfile::free_cached_comp_units)
13142         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13143         (init_cutu_and_read_dies_no_follow): Update.
13144         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13145         (dwarf2_cu::~dwarf2_cu): New.
13146         (free_heap_comp_unit, free_stack_comp_unit): Remove.
13147         (age_cached_comp_units, free_one_cached_comp_unit): Update.
13148
13149 2018-01-17  Tom Tromey  <tom@tromey.com>
13150             Simon Marchi  <simon.marchi@ericsson.com>
13151
13152         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13153         (struct die_reader_specs) <abbrev_table>: New member.
13154         (struct abbrev_table): Add constructor.
13155         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13156         <abbrev_obstack>: Now an auto_obstack.
13157         (abbrev_table_up): New typedef.
13158         (init_cu_die_reader): Add abbrev_table parameter.
13159         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13160         Add result_dwo_abbrev_table.
13161         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13162         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13163         Update.
13164         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13165         parameter.
13166         (skip_children): Update.
13167         (abbrev_table::alloc_abbrev): Rename from
13168         abbrev_table_alloc_abbrev.
13169         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13170         (abbrev_table::lookup_abbrev): Rename from
13171         abbrev_table_lookup_abbrev.
13172         (abbrev_table_read_table): Return abbrev_table_up.
13173         (abbrev_table_free, abbrev_table_free_cleanup)
13174         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13175         (load_partial_dies): Update.
13176
13177 2018-01-17  Tom Tromey  <tom@tromey.com>
13178
13179         * dwarf2read.c (dwarf2_compute_name): Update comment.
13180         (read_func_scope, read_variable): Update.
13181         (new_symbol): Remove.
13182         (new_symbol_full): Rename to new_symbol.
13183
13184 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
13185
13186         PR gdb/16577
13187         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13188         a warning instead of throwing an error, set section size to 0 and return
13189         NULL.
13190         * gdb_bfd.h (gdb_bfd_map_section): Update description.
13191
13192 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13193
13194         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13195         std::string.
13196         (linux_ptrace_attach_fail_reason_string): Likewise.
13197         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13198         Likewise.
13199         (linux_ptrace_attach_fail_reason_string): Likewise.
13200         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13201
13202 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13203
13204         * linux-nat.c (linux_nat_attach): Remove xstrdup.
13205
13206 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
13207
13208         PR gdb/21559
13209         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13210         checking for fs_base/gs_base fields in struct user_regs_struct.
13211         * configure: Regenerate.
13212
13213 2018-01-17  Yao Qi  <yao.qi@linaro.org>
13214
13215         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13216         function.
13217         (aarch64_linux_init_abi): Install it to gdbarch hook
13218         gcc_target_options.
13219
13220 2018-01-15  Pedro Alves  <palves@redhat.com>
13221
13222         * common/signals-state-save-restore.c
13223         (save_original_signals_state): Fix typos.
13224
13225 2017-01-12  Tom Tromey  <tom@tromey.com>
13226             Sergio Durigan Junior  <sergiodj@redhat.com>
13227
13228         * Makefile.in (install-only): Install gdb-add-index.
13229
13230 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
13231
13232         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13233
13234 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13235
13236         * infrun.c (keep_going_pass_signal): Clear step-over info when
13237         insert_breakpoints fails.
13238
13239 2018-01-11  Pedro Alves  <palves@redhat.com>
13240
13241         PR gdb/22583
13242         * infrun.c (resume): Rename to ...
13243         (resume_1): ... this.
13244         (resume): Reimplement as wrapper around resume_1.
13245
13246 2018-01-11  Pedro Alves  <palves@redhat.com>
13247
13248         PR remote/22597
13249         * remote.c (remote_parse_stop_reply): Default to the last-set
13250         general thread instead of to 'magic_null_ptid'.
13251
13252 2018-01-10  Pedro Alves  <palves@redhat.com>
13253
13254         * language.h (language_get_symbol_name_matcher): Rename ...
13255         (get_symbol_name_matcher): ... this.
13256         * language.c (language_get_symbol_name_matcher): Ditto.
13257         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13258         callers adjusted.
13259
13260 2018-01-10  Pedro Alves  <palves@redhat.com>
13261
13262         PR gdb/22670
13263         * dwarf2read.c
13264         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13265         Adjust to use language_get_symbol_name_matcher instead of
13266         language_defn::la_get_symbol_name_matcher.
13267         * language.c (language_get_symbol_name_matcher): If in Ada mode
13268         and the lookup name is a verbatim match, return Ada's matcher.
13269         * language.h (language_get_symbol_name_matcher): Adjust comment.
13270         (ada_lookup_name_info::verbatim_p):: New method.
13271
13272 2018-01-10  Pedro Alves  <palves@redhat.com>
13273
13274         PR gdb/22670
13275         * ada-lang.c (ada_collect_symbol_completion_matches): If the
13276         minsym's language is language_auto or language_cplus, pass down
13277         language_ada instead.
13278         * symtab.c (compare_symbol_name): Don't frob symbol language here.
13279
13280 2018-01-10  Pedro Alves  <palves@redhat.com>
13281
13282         PR gdb/22670
13283         * minsyms.c (linkage_name_str): New function.
13284         (iterate_over_minimal_symbols): Use it.
13285
13286 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13287
13288         * NEWS: Document that 'info proc' now works on FreeBSD.
13289
13290 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13291
13292         * configure.ac: Check for kinfo_getfile in libutil.
13293         * configure: Regenerate.
13294         * config.in: Regenerate.
13295         * fbsd-nat.c: Include "fbsd-tdep.h".
13296         (fbsd_fetch_cmdline): New.
13297         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13298         rather than calling error.
13299         (fbsd_info_proc): New.
13300         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13301         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13302         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13303
13304 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13305
13306         * fbsd-nat.c (struct free_deleter): Remove.
13307         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13308
13309 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13310
13311         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13312         NULL for an empty pathname.
13313
13314 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13315
13316         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13317         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13318         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13319         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13320         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13321         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13322         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13323         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13324         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13325         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13326         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13327         (fbsd_core_fetch_timeval, fbsd_print_sigset)
13328         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13329         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
13330         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13331
13332 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
13333
13334         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13335         (gnu_xfer_auxv): New function.
13336         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13337         TARGET_OBJECT_AUXV.
13338
13339 2018-01-08  Yao Qi  <yao.qi@linaro.org>
13340             Simon Marchi  <simon.marchi@ericsson.com>
13341
13342         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13343         common/selftest.c.
13344         (COMMON_OBS): Remove selftest.o.
13345         * configure.ac: Append selftest-arch.c and common/selftest.c to
13346         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
13347         * configure: Re-generated.
13348         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13349         GDB_SELF_TEST.
13350         (maintenance_info_selftests): Likewise.
13351
13352 2018-01-08  Xavier Roirand  <roirand@adacore.com>
13353
13354         * ada-valprint.c (val_print_packed_array_elements): Use
13355         proper number of elements when printing an array indexed
13356         by an enumeration type.
13357
13358 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13359
13360         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13361         (dw2_get_file_names_reader): Adjust.
13362         (lookup_dwo_signatured_type): Adjust.
13363         (lookup_dwp_signatured_type): Adjust.
13364         (lookup_signatured_type): Adjust.
13365         (create_type_unit_group): Adjust.
13366         (get_type_unit_group): Adjust.
13367         (process_psymtab_comp_unit_reader): Adjust.
13368         (build_type_psymtabs_reader): Adjust.
13369         (scan_partial_symbols): Adjust.
13370         (add_partial_symbol): Adjust.
13371         (add_partial_subprogram): Adjust.
13372         (peek_die_abbrev): Adjust.
13373         (fixup_go_packaging): Adjust.
13374         (process_imported_unit_die): Adjust.
13375         (dwarf2_compute_name): Adjust.
13376         (dwarf2_physname): Adjust.
13377         (read_import_statement): Adjust.
13378         (handle_DW_AT_stmt_list): Adjust.
13379         (read_file_scope): Adjust.
13380         (read_func_scope): Adjust.
13381         (read_lexical_block_scope): Adjust.
13382         (read_call_site_scope): Adjust.
13383         (read_variable): Adjust.
13384         (dwarf2_rnglists_process): Adjust.
13385         (dwarf2_ranges_process): Adjust.
13386         (dwarf2_ranges_read): Adjust.
13387         (dwarf2_get_pc_bounds): Adjust.
13388         (dwarf2_record_block_ranges): Adjust.
13389         (dwarf2_add_field): Adjust.
13390         (dwarf2_add_member_fn): Adjust.
13391         (read_structure_type): Adjust.
13392         (process_structure_scope): Adjust.
13393         (read_enumeration_type): Adjust.
13394         (read_array_type): Adjust.
13395         (mark_common_block_symbol_computed): Adjust.
13396         (read_common_block): Adjust.
13397         (read_namespace_type): Adjust.
13398         (read_namespace): Adjust.
13399         (read_module_type): Adjust.
13400         (read_tag_pointer_type): Adjust.
13401         (read_tag_ptr_to_member_type): Adjust.
13402         (read_tag_string_type): Adjust.
13403         (read_subroutine_type): Adjust.
13404         (read_typedef): Adjust.
13405         (read_base_type): Adjust.
13406         (attr_to_dynamic_prop): Adjust.
13407         (read_subrange_type): Adjust.
13408         (read_unspecified_type): Adjust.
13409         (dwarf2_read_abbrevs): Adjust.
13410         (load_partial_dies): Adjust.
13411         (read_partial_die): Adjust.
13412         (find_partial_die): Adjust.
13413         (guess_partial_die_structure_name): Adjust.
13414         (fixup_partial_die): Adjust.
13415         (read_attribute_value): Adjust.
13416         (read_addr_index): Adjust.
13417         (read_addr_index_from_leb128): Adjust.
13418         (read_str_index): Adjust.
13419         (dwarf2_string_attr): Adjust.
13420         (get_debug_line_section): Adjust.
13421         (dwarf_decode_line_header): Adjust.
13422         (lnp_state_machine::check_line_address): Adjust.
13423         (dwarf_decode_lines_1): Adjust.
13424         (dwarf_decode_lines): Adjust.
13425         (dwarf2_start_symtab): Adjust.
13426         (var_decode_location): Adjust.
13427         (new_symbol_full): Adjust.
13428         (dwarf2_const_value_data): Adjust.
13429         (dwarf2_const_value_attr): Adjust.
13430         (dwarf2_const_value): Adjust.
13431         (die_type): Adjust.
13432         (die_containing_type): Adjust.
13433         (build_error_marker_type): Adjust.
13434         (lookup_die_type): Adjust.
13435         (guess_full_die_structure_name): Adjust.
13436         (anonymous_struct_prefix): Adjust.
13437         (determine_prefix): Adjust.
13438         (dwarf2_name): Adjust.
13439         (follow_die_ref_or_sig): Adjust.
13440         (follow_die_offset): Adjust.
13441         (follow_die_ref): Adjust.
13442         (follow_die_sig_1): Adjust.
13443         (follow_die_sig): Adjust.
13444         (get_signatured_type): Adjust.
13445         (get_DW_AT_signature_type): Adjust.
13446         (decode_locdesc): Adjust.
13447         (dwarf_decode_macros): Adjust.
13448         (cu_debug_loc_section): Adjust.
13449         (fill_in_loclist_baton): Adjust.
13450         (dwarf2_symbol_mark_computed): Adjust.
13451         (init_one_comp_unit): Don't assign
13452         dwarf2_cu::dwarf2_per_objfile.
13453         (set_die_type): Adjust.
13454
13455 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13456
13457         * dwarf2read.c (struct mapped_debug_names): Add constructor.
13458         <dwarf2_per_objfile>: New field.
13459         (dwarf2_per_objfile): Remove global.
13460         (get_dwarf2_per_objfile): New function.
13461         (set_dwarf2_per_objfile): New function.
13462         (dwarf2_build_psymtabs_hard): Change objfile parameter to
13463         dwarf2_per_objfile.
13464         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13465         (read_abbrev_offset): Likewise.
13466         (read_indirect_string): Likewise.
13467         (read_indirect_line_string): Likewise.
13468         (read_indirect_string_at_offset): Likewise.
13469         (read_indirect_string_from_dwz): Likewise.
13470         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13471         dwarf2_per_objfile.
13472         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13473         (create_all_comp_units): Change objfile parameter to
13474         dwarf2_per_objfile.
13475         (create_all_type_units): Likewise.
13476         (process_queue): Add dwarf2_per_objfile parameter.
13477         (read_and_check_comp_unit_head): Likewise.
13478         (lookup_dwo_unit_in_dwp): Likewise.
13479         (get_dwp_file): Likewise.
13480         (process_cu_includes): Likewise.
13481         (struct free_dwo_file_cleanup_data): New struct.
13482         (dwarf2_has_info): Use get_dwarf2_per_objfile and
13483         set_dwarf2_per_objfile.
13484         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13485         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13486         context, adjust calls.
13487         (dw2_instantiate_symtab): Likewise.
13488         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13489         (dw2_get_cu): Likewise.
13490         (create_cu_from_index_list): Change objfile parameter to
13491         dwarf2_per_objfile.
13492         (create_cus_from_index_list): Get dwarf2_per_objfile from
13493         context, adjust calls.
13494         (create_cus_from_index): Likewise.
13495         (create_signatured_type_table_from_index): Change objfile
13496         parameter to dwarf2_per_objfile.
13497         (create_signatured_type_table_from_debug_names): Change objfile
13498         parameter to dwarf2_per_objfile.
13499         (create_addrmap_from_index): Likewise.
13500         (create_addrmap_from_aranges): Likewise.
13501         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13502         (dw2_setup): Remove.
13503         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13504         context.
13505         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13506         get_dwarf2_per_objfile.
13507         (dw2_forget_cached_source_info): Likewise.
13508         (dw2_map_symtabs_matching_filename): Likewise.
13509         (struct dw2_symtab_iterator) <index>: Remove.
13510         <dwarf2_per_objfile>: New field.
13511         (dw2_symtab_iter_init): Replace index parameter with
13512         dwarf2_per_objfile.
13513         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13514         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13515         (dw2_print_stats): Likewise.
13516         (dw2_dump): Likewise.
13517         (dw2_expand_symtabs_for_function): Likewise.
13518         (dw2_expand_all_symtabs): Likewise.
13519         (dw2_expand_symtabs_with_fullname): Likewise.
13520         (dw2_expand_marked_cus): Replace index and objfile parameters
13521         with dwarf2_per_objfile.
13522         (dw_expand_symtabs_matching_file_matcher): Add
13523         dwarf2_per_objfile parameter and adjust calls.
13524         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13525         adjust calls.
13526         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13527         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13528         adjust calls.
13529         (create_cus_from_debug_names_list): Replace objfile parameter
13530         with dwarf2_per_objfile and adjust calls.
13531         (create_cus_from_debug_names): Likewise.
13532         (dwarf2_read_debug_names): Likewise.
13533         (mapped_debug_names::namei_to_name): Adjust call.
13534         (dw2_debug_names_iterator::next): Likewise.
13535         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13536         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13537         (dw2_debug_names_dump): Likewise.
13538         (dw2_debug_names_expand_symtabs_for_function): Likewise.
13539         (dw2_debug_names_expand_symtabs_matching): Likewise.
13540         (dwarf2_initialize_objfile): Likewise.
13541         (dwarf2_build_psymtabs): Likewise.
13542         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13543         this_cu.
13544         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13545         (read_and_check_comp_unit_head): Likewise.
13546         (read_abbrev_offset): Likewise.
13547         (create_debug_type_hash_table): Likewise.
13548         (create_debug_types_hash_table): Likewise.
13549         (create_all_type_units): Replace objfile parameter with
13550         dwarf2_per_objfile.
13551         (add_type_unit): Add dwarf2_per_objfile parameter.
13552         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13553         with dwarf2_per_objfile.
13554         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13555         (lookup_dwp_signatured_type): Likewise.
13556         (lookup_signatured_type): Likewise.
13557         (read_cutu_die_from_dwo): Likewise.
13558         (init_tu_and_read_dwo_dies): Likewise.
13559         (init_cutu_and_read_dies): Likewise.
13560         (init_cutu_and_read_dies_no_follow): Likewise.
13561         (allocate_type_unit_groups_table): Add objfile parameter.
13562         (create_type_unit_group): Use dwarf2_per_objfile from cu.
13563         (get_type_unit_group): Likewise.
13564         (process_psymtab_comp_unit): Update call.
13565         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13566         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13567         (print_tu_stats): Likewise.
13568         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13569         in void* parameter.
13570         (build_type_psymtabs): Change objfile parameter to
13571         dwarf2_per_objfile.
13572         (process_skeletonless_type_unit): Use dwarf2_per_objfile
13573         passed in void* parameter.
13574         (process_skeletonless_type_units): Change objfile parameter to
13575         dwarf2_per_objfile.
13576         (set_partial_user): Likewise.
13577         (dwarf2_build_psymtabs_hard): Likewise.
13578         (read_comp_units_from_section): Likewise.
13579         (create_all_comp_units): Likewise.
13580         (scan_partial_symbols): Update calls.
13581         (add_partial_symbol): Likewise.
13582         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13583         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13584         (process_queue): Add dwarf2_per_objfile parameter.
13585         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13586         (compute_compunit_symtab_includes): Likewise.
13587         (process_cu_includes): Add dwarf2_per_objfile parameter.
13588         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13589         (process_full_type_unit): Likewise.
13590         (process_imported_unit_die): Update call.
13591         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13592         (read_file_scope): Likewise.
13593         (allocate_dwo_file_hash_table): Add objfile parameter.
13594         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13595         (create_cus_hash_table): Likewise.
13596         (create_dwp_hash_table): Likewise.
13597         (create_dwo_unit_in_dwp_v1): Likewise.
13598         (create_dwp_v2_section): Likewise.
13599         (create_dwo_unit_in_dwp_v2): Likewise.
13600         (lookup_dwo_unit_in_dwp): Likewise.
13601         (try_open_dwop_file): Likewise.
13602         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13603         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13604         cleanup to include a reference to dwarf2_per_objfile.
13605         (open_dwp_file): Add dwarf2_per_objfile parameter.
13606         (open_and_init_dwp_file): Likewise.
13607         (get_dwp_file): Likewise.
13608         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13609         (queue_and_load_all_dwo_tus): Update call.
13610         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13611         data.
13612         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13613         (dwarf2_ranges_process): Likewise.
13614         (dwarf2_get_pc_bounds): Likewise.
13615         (mark_common_block_symbol_computed): Likewise.
13616         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13617         (dwarf2_read_abbrevs): Update call.
13618         (read_partial_die): Use dwarf2_per_objfile from cu.
13619         (find_partial_die): Likewise.
13620         (fixup_partial_die): Likewise.
13621         (read_attribute_value): Likewise.
13622         (read_indirect_string_at_offset_from): Add objfile parameter.
13623         (read_indirect_string_at_offset): Add dwarf2_per_objfile
13624         parameter.
13625         (read_indirect_string_from_dwz): Add objfile parameter.
13626         (read_indirect_string): Add objfile parameter.
13627         (read_addr_index_1): Add dwarf2_per_objfile parameter.
13628         (read_addr_index): Use dwarf2_per_objfile from cu.
13629         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13630         call dw2_setup.
13631         (read_str_index): Use dwarf2_per_objfile from cu.
13632         (get_debug_line_section): Likewise.
13633         (read_formatted_entries): Add dwarf2_per_objfile parameter.
13634         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13635         (new_symbol_full): Use dwarf2_per_objfile from cu.
13636         (build_error_marker_type): Likewise.
13637         (lookup_die_type): Likewise.
13638         (determine_prefix): Likewise.
13639         (follow_die_offset): Likewise.
13640         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13641         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13642         (dwarf2_fetch_die_type_sect_off): Likewise.
13643         (dwarf2_get_die_type): Likewise.
13644         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13645         (get_signatured_type): Likewise.
13646         (get_DW_AT_signature_type): Likewise.
13647         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13648         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13649         (cu_debug_loc_section): Likewise.
13650         (fill_in_loclist_baton): Likewise.
13651         (dwarf2_symbol_mark_computed): Likewise.
13652         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13653         dwarf2_per_objfile.
13654         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13655         parameter.
13656         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13657         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13658         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13659         (set_die_type): Use dwarf2_free_objfile from cu.
13660         (get_die_type_at_offset): Likewise.
13661         (dwarf2_per_objfile_free): Don't assign global variable.
13662         (debug_names) <constructor>: Add dwarf2_per_objfile
13663         parameter, update m_debugstrlookup construction.
13664         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13665         parameter.
13666         <m_dwarf2_per_objfile>: New field.
13667         <lookup>: Use m_dwarf2_per_objfile.
13668         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13669         (psyms_seen_size): Likewise.
13670         (write_gdbindex): Replace objfile parameter with
13671         dwarf2_per_objfile.
13672         (write_debug_names): Likewise.
13673         (write_psymtabs_to_index): Likewise.
13674         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13675         calls.
13676
13677 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13678
13679         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13680         <dwarf2_per_objfile>: New field.
13681         (struct dwarf2_per_cu_data) <objfile>: Remove.
13682         <dwarf2_per_objfile>: New field.
13683         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13684         of objfile.
13685         (create_signatured_type_table_from_index): Likewise.
13686         (create_debug_type_hash_table): Likewise.
13687         (fill_in_sig_entry_from_dwo_entry): Likewise.
13688         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13689         (create_type_unit_group): Assign dwarf2_per_objfile instead of
13690         objfile.
13691         (create_partial_symtab): Access objfile through
13692         dwarf2_per_objfile.
13693         (process_psymtab_comp_unit_reader): Likewise.
13694         (read_comp_units_from_section): Likewise.
13695         (scan_partial_symbols): Likewise.
13696         (add_partial_symbol): Likewise.
13697         (add_partial_subprogram): Likewise.
13698         (peek_die_abbrev): Likewise.
13699         (fixup_go_packaging): Likewise.
13700         (process_full_comp_unit): Likewise.
13701         (process_full_type_unit): Likewise.
13702         (process_imported_unit_die): Likewise.
13703         (dwarf2_compute_name): Likewise.
13704         (dwarf2_physname): Likewise.
13705         (read_import_statement): Likewise.
13706         (create_cus_hash_table): Assign dwarf2_physname instead of
13707         objfile.
13708         (read_func_scope): Access objfile through dwarf2_per_objfile.
13709         (read_lexical_block_scope): Likewise.
13710         (read_call_site_scope): Likewise.
13711         (read_variable): Likewise.
13712         (dwarf2_rnglists_process): Likewise.
13713         (dwarf2_ranges_process): Likewise.
13714         (dwarf2_ranges_read): Likewise.
13715         (dwarf2_record_block_ranges): Likewise.
13716         (dwarf2_add_field): Likewise.
13717         (dwarf2_add_member_fn): Likewise.
13718         (read_structure_type): Likewise.
13719         (process_structure_scope): Likewise.
13720         (read_enumeration_type): Likewise.
13721         (read_array_type): Likewise.
13722         (read_common_block): Likewise.
13723         (read_namespace_type): Likewise.
13724         (read_namespace): Likewise.
13725         (read_module_type): Likewise.
13726         (read_tag_pointer_type): Likewise.
13727         (read_tag_ptr_to_member_type): Likewise.
13728         (read_tag_string_type): Likewise.
13729         (read_subroutine_type): Likewise.
13730         (read_typedef): Likewise.
13731         (read_base_type): Likewise.
13732         (attr_to_dynamic_prop): Likewise.
13733         (read_subrange_type): Likewise.
13734         (read_unspecified_type): Likewise.
13735         (load_partial_dies): Likewise.
13736         (read_partial_die): Likewise.
13737         (find_partial_die): Likewise.
13738         (guess_partial_die_structure_name): Likewise.
13739         (fixup_partial_die): Likewise.
13740         (read_attribute_value): Likewise.
13741         (read_addr_index_from_leb128): Likewise.
13742         (dwarf2_read_addr_index): Likewise.
13743         (dwarf2_string_attr): Likewise.
13744         (lnp_state_machine::check_line_address): Likewise.
13745         (dwarf_decode_lines_1): Likewise.
13746         (dwarf_decode_lines): Likewise.
13747         (dwarf2_start_symtab): Likewise.
13748         (var_decode_location): Likewise.
13749         (new_symbol_full): Likewise.
13750         (dwarf2_const_value_data): Likewise.
13751         (dwarf2_const_value_attr): Likewise.
13752         (dwarf2_const_value): Likewise.
13753         (die_type): Likewise.
13754         (die_containing_type): Likewise.
13755         (lookup_die_type): Likewise.
13756         (guess_full_die_structure_name): Likewise.
13757         (anonymous_struct_prefix): Likewise.
13758         (dwarf2_name): Likewise.
13759         (follow_die_ref_or_sig): Likewise.
13760         (follow_die_offset): Likewise.
13761         (follow_die_ref): Likewise.
13762         (dwarf2_fetch_die_loc_sect_off): Likewise.
13763         (dwarf2_fetch_constant_bytes): Likewise.
13764         (dwarf2_fetch_die_type_sect_off): Likewise.
13765         (dwarf2_get_die_type): Likewise.
13766         (follow_die_sig): Likewise.
13767         (decode_locdesc): Likewise.
13768         (dwarf2_per_cu_objfile): Likewise.
13769         (dwarf2_per_cu_text_offset): Likewise.
13770         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13771         objfile.
13772         (set_die_type): Access objfile through
13773         dwarf2_per_objfile.
13774
13775 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13776
13777         * valprint.c (converted_character_d): Remove typedef.
13778         (DEF_VEC_O (converted_character_d)): Remove.
13779         (count_next_character): Use std::vector.
13780         (print_converted_chars_to_obstack): Likewise.
13781         (generic_printstr): Likewise.
13782
13783 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13784
13785         * xml-support.h (struct gdb_xml_value): Add constructor.
13786         <value>: Change type to unique_xmalloc_ptr.
13787         (gdb_xml_value_s): Remove typedef.
13788         (DEF_VEC_O (gdb_xml_value_s)): Remove.
13789         (gdb_xml_element_start_handler): Change parameter type to
13790         std::vector.
13791         (xml_find_attribute): Likewise.
13792         * xml-support.c (xml_find_attribute): Change parameter type to
13793         std::vector and adjust.
13794         (gdb_xml_values_cleanup): Remove.
13795         (gdb_xml_parser::start_element): Adjust to std::vector.
13796         (xinclude_start_include): Change paraeter type to std::vector
13797         and adjust.
13798         * btrace.c (check_xml_btrace_version): Likewise.
13799         (parse_xml_btrace_block): Likewise.
13800         (parse_xml_btrace_pt_config_cpu): Likewise.
13801         (parse_xml_btrace_pt): Likewise.
13802         (parse_xml_btrace_conf_bts): Likewise.
13803         (parse_xml_btrace_conf_pt): Likewise.
13804         * memory-map.c (memory_map_start_memory): Likewise.
13805         (memory_map_start_property): Likewise.
13806         * osdata.c (osdata_start_osdata): Likewise.
13807         (osdata_start_item): Likewise.
13808         (osdata_start_column): Likewise.
13809         * remote.c (start_thread): Likewise.
13810         * solib-aix.c (library_list_start_library): Likewise.
13811         (library_list_start_list): Likewise.
13812         * solib-svr4.c (library_list_start_library): Likewise.
13813         (svr4_library_list_start_list): Likewise.
13814         * solib-target.c (library_list_start_segment): Likewise.
13815         (library_list_start_section): Likewise.
13816         (library_list_start_library): Likewise.
13817         (library_list_start_list): Likewise.
13818         * tracepoint.c (traceframe_info_start_memory): Likewise.
13819         (traceframe_info_start_tvar): Likewise.
13820         * xml-syscall.c (syscall_start_syscall): Likewise.
13821         * xml-tdesc.c (tdesc_start_target): Likewise.
13822         (tdesc_start_feature): Likewise.
13823         (tdesc_start_reg): Likewise.
13824         (tdesc_start_union): Likewise.
13825         (tdesc_start_struct): Likewise.
13826         (tdesc_start_flags): Likewise.
13827         (tdesc_start_enum): Likewise.
13828         (tdesc_start_field): Likewise.
13829         (tdesc_start_enum_value): Likewise.
13830         (tdesc_start_vector): Likewise.
13831
13832 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13833
13834         * extension.h (struct xmethod_worker) <clone>: Remove.
13835         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13836         Remove.
13837         (python_xmethod_worker::clone): Remove.
13838         * valops.c (find_overload_match): Use std::move instead of
13839         clone.
13840
13841 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13842
13843         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13844         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13845         <free_xmethod_worker_data>: Remove.
13846         <get_matching_xmethod_workers>: Chance VEC to std::vector.
13847         <get_xmethod_arg_types>: Remove.
13848         <get_xmethod_result_type>: Remove.
13849         <invoke_xmethod>: Remove.
13850         * extension.c (new_xmethod_worker): Remove.
13851         (clone_xmethod_worker): Remove.
13852         (get_matching_xmethod_workers): Return void, pass std::vector by
13853         pointer.
13854         (get_xmethod_arg_types): Rename to...
13855         (xmethod_worker::get_arg_types): ... this, and adjust.
13856         (get_xmethod_result_type): Rename to...
13857         (xmethod_worker::get_result_type): ... this, and adjust.
13858         (invoke_xmethod): Remove.
13859         (free_xmethod_worker): Remove.
13860         (free_xmethod_worker_vec): Remove.
13861         * extension.h (enum ext_lang_rc): Move here from
13862         extension-priv.h.
13863         (struct xmethod_worker): Add constructor and destructor.
13864         <data>: Remove.
13865         <value>: Remove.
13866         <invoke, clone, do_get_result_type, do_get_arg_types>: New
13867         virtual pure methods.
13868         <get_arg_types, get_result_type>: New methods.
13869         (xmethod_worker_ptr): Remove typedef.
13870         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13871         (xmethod_worker_vec): Remove typedef.
13872         (xmethod_worker_up): New typedef.
13873         (invoke_xmethod): Remove.
13874         (clone_xmethod_worker): Remove.
13875         (free_xmethod_worker): Remove.
13876         (free_xmethod_worker_vec): Remove.
13877         (get_xmethod_arg_types): Remove.
13878         (get_xmethod_result_type): Remove.
13879         * valops.c (find_method_list): Use std::vector, don't use
13880         intermediate vector.
13881         (value_find_oload_method_list): Use std::vector.
13882         (find_overload_match): Use std::vector.
13883         (find_oload_champ): Use std::vector.
13884         * value.c (value_free): Use operator delete.
13885         (value_of_xmethod): Rename to...
13886         (value_from_xmethod): ... this.  Don't assign
13887         xmethod_worker::value, take rvalue-reference.
13888         (result_type_of_xmethod): Adjust.
13889         (call_xmethod): Adjust.
13890         * value.h: Include extension.h.
13891         (struct xmethod_worker): Don't forward-declare.
13892         (value_of_xmethod): Rename to...
13893         (value_from_xmethod): ... this, take rvalue-reference.
13894         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13895         (struct python_xmethod_worker): ... this, add constructor and
13896         destructor.
13897         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13898         (gdbpy_free_xmethod_worker_data): Rename to...
13899         (python_xmethod_worker::~python_xmethod_worker): ... this and
13900         adjust.
13901         (gdbpy_clone_xmethod_worker_data): Rename to...
13902         (python_xmethod_worker::clone): ... this and adjust.
13903         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13904         temporary vector.
13905         (gdbpy_get_xmethod_arg_types): Rename to...
13906         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13907         (gdbpy_get_xmethod_result_type): Rename to...
13908         (python_xmethod_worker::do_get_result_type): ... this and
13909         adjust.
13910         (gdbpy_invoke_xmethod): Rename to...
13911         (python_xmethod_worker::invoke): ... this and adjust.
13912         (new_python_xmethod_worker): Rename to...
13913         (python_xmethod_worker::python_xmethod_worker): ... this and
13914         adjust.
13915         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13916         Remove.
13917         (gdbpy_free_xmethod_worker_data): Remove.
13918         (gdbpy_get_matching_xmethod_workers): Use std::vector.
13919         (gdbpy_get_xmethod_arg_types): Remove.
13920         (gdbpy_get_xmethod_result_type): Remove.
13921         (gdbpy_invoke_xmethod): Remove.
13922         * python/python.c (python_extension_ops): Remove obsolete
13923         callbacks.
13924
13925 2018-01-05  Pedro Alves  <palves@redhat.com>
13926
13927         PR gdb/18653
13928         * common/signals-state-save-restore.c
13929         (save_original_signals_state): New parameter 'quiet'.  Warn if we
13930         find a custom handler preinstalled, instead of internal erroring.
13931         But only warn if !quiet.
13932         * common/signals-state-save-restore.h
13933         (save_original_signals_state): New parameter 'quiet'.
13934         * main.c (captured_main_1): Move save_original_signals_state call
13935         after option handling, and pass QUIET.
13936
13937 2018-01-05  Pedro Alves  <palves@redhat.com>
13938
13939         * spu-tdep.c (spu_catch_start): Pass
13940         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13941
13942 2018-01-05  Pedro Alves  <palves@redhat.com>
13943
13944         PR gdb/22670
13945         * ada-lang.c (literal_symbol_name_matcher): New function.
13946         (ada_get_symbol_name_matcher): Use it for
13947         symbol_name_match_type::SEARCH_NAME.
13948         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
13949         it down instead of assuming symbol_name_match_type::FULL.
13950         * block.h (block_lookup_symbol): New parameter 'match_type'.
13951         * c-valprint.c (print_unpacked_pointer): Use
13952         lookup_symbol_search_name instead of lookup_symbol.
13953         * compile/compile-object-load.c (get_out_value_type): Pass down
13954         symbol_name_match_type::SEARCH_NAME.
13955         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
13956         symbol_name_match_type::FULL.
13957         * cp-support.c (cp_get_symbol_name_matcher): Handle
13958         symbol_name_match_type::SEARCH_NAME.
13959         * infrun.c (insert_exception_resume_breakpoint): Use
13960         lookup_symbol_search_name.
13961         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
13962         * psymtab.c (maintenance_check_psymtabs): Use
13963         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
13964         * stack.c (print_frame_args): Use lookup_symbol_search_name and
13965         SYMBOL_SEARCH_NAME.
13966         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
13967         if symbol_name_match_type::SEARCH_NAME.
13968         (lookup_symbol_in_language): Pass down
13969         symbol_name_match_type::FULL.
13970         (lookup_symbol_search_name): New.
13971         (lookup_language_this): Pass down
13972         symbol_name_match_type::SEARCH_NAME.
13973         (lookup_symbol_aux, lookup_local_symbol): New parameter
13974         'match_type'.  Pass it down.
13975         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
13976         (lookup_symbol_search_name): New declaration.
13977         (lookup_symbol_in_block): New 'match_type' parameter.
13978
13979 2018-01-05  Pedro Alves  <palves@redhat.com>
13980
13981         PR gdb/22670
13982         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
13983         ada_lookup_symbol.
13984         (ada_lookup_symbol): Reimplement in terms of
13985         ada_lookup_symbol_list, bits factored out from
13986         ada_lookup_encoded_symbol.
13987
13988 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
13989
13990         * ada-exp.y (write_object_renaming): When subscripting an array
13991         using a symbol as the index, pass the block in call to
13992         ada_lookup_encoded_symbol when looking that symbol up.
13993
13994 2018-01-05  Jerome Guitton  <guitton@adacore.com>
13995
13996         * ada-lang.c (ada_array_length): Use ada_index_type instead of
13997         TYPE_INDEX_TYPE.
13998
13999 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14000
14001         * ada-lang.c (ada_to_fixed_value_create): Add handling of
14002         the case where VALUE_LVAL (val0) is not lval_memory.
14003
14004 2018-01-05  Xavier Roirand  <roirand@adacore.com>
14005
14006         * ada-valprint.c (print_optional_low_bound): Handle
14007         character-indexed array printing like boolean-indexed array
14008         printing.
14009
14010 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14011
14012         * NEWS: Create a new section for the next release branch.
14013         Rename the section of the current branch, now that it has
14014         been cut.
14015
14016 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14017
14018         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14019         * version.in: Bump version to 8.1.50.DATE-git.
14020
14021 2018-01-03  Xavier Roirand  <roirand@adacore.com>
14022
14023         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14024         Add field.
14025         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14026         Add field.
14027         (default_exception_support_info) <catch_handlers_sym>: Add field.
14028         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14029         (ada_exception_name_addr_1): Add "catch handlers" handling.
14030         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14031         Update all callers.
14032         (create_excep_cond_exprs) <ex>: Add parameter.
14033         (re_set_exception): Update create_excep_cond_exprs call.
14034         (print_it_exception, print_one_exception, print_mention_exception)
14035         (print_recreate_exception): Add "catch handler" handling.
14036         (allocate_location_catch_handlers, re_set_catch_handlers)
14037         (check_status_catch_handlers, print_it_catch_handlers)
14038         (print_one_catch_handlers, print_mention_catch_handlers)
14039         (print_recreate_catch_handlers): New function.
14040         (catch_handlers_breakpoint_ops): New variable.
14041         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14042         Add parameter.  Add "catch handler" handling.
14043         (ada_exception_sym_name, ada_exception_breakpoint_ops):
14044         Add "catch handler" handling.
14045         (ada_exception_catchpoint_cond_string): Add "catch handler"
14046         handling.
14047         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14048         call.
14049         (catch_ada_handlers_command): New function.
14050         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14051         operations structure.
14052         (_initialize_ada_language): Add "catch handlers" command entry.
14053         * NEWS: Document "catch handlers" feature.
14054
14055 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14056
14057         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14058         account when creating the array type of the slice.
14059         (ada_value_slice): Likewise.
14060
14061 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14062
14063         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14064         New enum value.
14065         (create_array_type_with_stride): Add byte_stride_prop parameter.
14066         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14067         New parameter.  Update all callers in this file.
14068         (array_type_has_dynamic_stride): New function.
14069         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14070         of arrays with dynamic byte strides.
14071         * dwarf2read.c (read_array_type): Add support for dynamic
14072         DW_AT_byte_stride attributes.
14073
14074 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14075
14076         * dwarf2read.c (read_unspecified_type): Treat
14077         DW_TAG_enumeration_type DIEs from Ada units as stubs.
14078
14079 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14080
14081         Update copyright year range in all GDB files.
14082
14083 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14084
14085         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14086         and gdb/testsuite/gdb.base/step-line.c.
14087
14088 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14089
14090         * copyright.py (main): Dump the contents of
14091         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14092         even if BY_HAND is empty.
14093
14094 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14095
14096         * top.c (print_gdb_version): Update Copyright year in version
14097         message.
14098
14099 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14100
14101         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14102
14103 For older changes see ChangeLog-2017.
14104 \f
14105 Local Variables:
14106 mode: change-log
14107 left-margin: 8
14108 fill-column: 74
14109 version-control: never
14110 coding: utf-8
14111 End: