1f8b8e57225769fbdaa55a7a6aec62bd9e59b009
[external/binutils.git] / gdb / ChangeLog
1 2018-10-03  Tom Tromey  <tom@tromey.com>
2
3         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
4
5 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6
7         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
8
9 2018-10-02  Tom Tromey  <tom@tromey.com>
10
11         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
12
13 2018-10-02  John Darrington <john@darrington.wattle.id.au>
14
15         * NEWS: Mention changed commands.
16         * ser-uds.c: New file.
17         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
18         * configure: Regenerate.
19         * Makefile.in: Add new file.
20         * serial.c (serial_open): Check if filename is a socket
21           and lookup the appropriate interface accordingly.
22
23 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
24
25         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
26         define.
27         (AARCH64_EXTRA_MAGIC): Likewise.
28         (AARCH64_FPSIMD_MAGIC): Likewise.
29         (AARCH64_SVE_MAGIC): Likewise.
30         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
31         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
32         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
33         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
34         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
35         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
36         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
37         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
38         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
39         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
40         (read_aarch64_ctx): Add function.
41         (aarch64_linux_sigframe_init): Detect FP registers.
42
43 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
44
45         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
46         (AARCH64_D0_REGNUM): Likewise.
47         (AARCH64_S0_REGNUM): Likewise.
48         (AARCH64_H0_REGNUM): Likewise.
49         (AARCH64_B0_REGNUM): Likewise.
50         (AARCH64_SVE_V0_REGNUM): Likewise.
51         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
52         (AARCH64_D0_REGNUM): Likewise.
53         (AARCH64_S0_REGNUM): Likewise.
54         (AARCH64_H0_REGNUM): Likewise.
55         (AARCH64_B0_REGNUM): Likewise.
56         (AARCH64_SVE_V0_REGNUM): Likewise.
57
58 2018-10-01  Gary Benson <gbenson@redhat.com>
59
60         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
61         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
62         prfpregset_t instead of gdb_prfpregset_t.
63         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
64         * configure, config.in: Rebuild.
65
66 2018-10-01  Gary Benson <gbenson@redhat.com>
67
68         * common/gdb_proc_service.h: New file, factored out from...
69         * gdb_proc_service.h: Moved common code to the above file.
70         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
71
72 2018-10-01  Gary Benson <gbenson@redhat.com>
73
74         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
75         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
76
77 2018-10-01  Gary Benson <gbenson@redhat.com>
78
79         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
80         (AC_CHECK_HEADERS): Check for linux/elf.h.
81         * configure, config.in: Rebuild.
82         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
83         doesn't define elf_fpregset_t.
84
85 2018-10-01  Gary Benson <gbenson@redhat.com>
86
87         * gdb_proc_service.h: Whitespace change.
88
89 2018-10-01  Tom Tromey  <tom@tromey.com>
90
91         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
92         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
93         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
94
95 2018-10-01  Tom Tromey  <tom@tromey.com>
96
97         * README: Minor change.
98
99 2018-09-30  Pedro Alves  <palves@redhat.com>
100
101         * darwin-nat-info.c (darwin_debug_regions_recurse)
102         (info_mach_exceptions_command): Remove unused local variables.
103         * darwin-nat.c (darwin_decode_notify_message)
104         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
105         (darwin_stop_inferior, darwin_setup_exceptions)
106         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
107         (darwin_nat_target::attach, darwin_nat_target::detach)
108         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
109         local variables.
110         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
111         variables.
112
113 2018-09-29  Tom Tromey  <tom@tromey.com>
114
115         * README: Remove some leftover text.
116
117 2018-09-29  Tom Tromey  <tom@tromey.com>
118
119         * PROBLEMS: Rewrite.
120         * README: Update.
121
122 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
123
124         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
125         case with explicit breakpoint kind.
126         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
127         'additional_info' and related logic.
128         (riscv_debug_breakpoints): New variable.
129         (riscv_breakpoint_kind_from_pc): Use the length of the existing
130         instruction to determine the breakpoint kind.
131         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
132         flag.  Update description of 'set/show riscv
133         use-compressed-breakpoints' flag.
134
135 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
136
137         (NEWS): Mention changes to frame related commands.
138         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
139         (add_prefix_cmd_suppress_notification): New function.
140         (add_com_suppress_notification): Call
141         add_cmd_suppress_notification.
142         * command.h (add_cmd_suppress_notification): Declare.
143         (add_prefix_cmd_suppress_notification): Declare.
144         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
145         (parse_frame_specification): Moved from stack.c, with
146         simplification to handle a single argument.
147         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
148         switch to the selected frame.  Add a header comment.
149         * stack.c: Remove 'safe-ctype.h' include.
150         (find_frame_for_function): Add declaration.
151         (find_frame_for_address): New function.
152         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
153         (frame_selection_by_function_completer): New function.
154         (info_frame_command): Rename to...
155         (info_frame_command_core): ...this, and update parameter types.
156         (select_frame_command): Rename to...
157         (select_frame_command_core): ...this, and update parameter types.
158         (frame_command): Rename to...
159         (frame_command_core): ...this, and update parameter types.
160         (class frame_command_helper): New class to wrap implementations of
161         frame related sub-commands.
162         (frame_apply_cmd_list): New static global.
163         (frame_cmd_list): Make static.
164         (select_frame_cmd_list): New global for sub-commands.
165         (info_frame_cmd_list): New global for sub-commands.
166         (_initialize_stack): Register sub-commands for 'frame',
167         'select-frame', and 'info frame'.  Update 'frame apply' commands
168         to use frame_apply_cmd_list.  Move function local static
169         frame_apply_list to file static frame_apply_cmd_list for
170         consistency.
171         * stack.h (select_frame_command): Delete declarationn.
172         (select_frame_for_mi): Declare new function.
173
174 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
175
176         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
177         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
178         and NOP.
179
180 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
181
182         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
183
184 2018-09-26  Tom Tromey  <tom@tromey.com>
185
186         * valops.c (auto_abandon): Remove dead code.
187
188 2018-09-26  Tom Tromey  <tom@tromey.com>
189
190         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
191
192 2018-09-24  Tom Tromey  <tom@tromey.com>
193
194         * common/pathstuff.c (get_standard_cache_dir): Make
195         "xdg_cache_home" and "home" const.
196         * top.c (init_history): Make "tmpenv" const.
197         * main.c (get_init_files): Make "homedir" const.
198
199 2018-09-23  Tom Tromey  <tom@tromey.com>
200
201         PR python/18852:
202         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
203
204 2018-09-23  Tom Tromey  <tom@tromey.com>
205
206         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
207         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
208         * python/python-internal.h (gdbpy_handle_exception): Declare.
209         * python/py-utils.c (gdbpy_handle_exception): New function.
210
211 2018-09-23  Tom Tromey  <tom@tromey.com>
212
213         PR python/17284:
214         * python/py-type.c (typy_template_argument): Check for negative
215         argument number.
216
217 2018-09-23  Tom Tromey  <tom@tromey.com>
218
219         PR python/14062:
220         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
221
222 2018-09-23  Tom Tromey  <tom@tromey.com>
223
224         PR python/18170:
225         * python/py-value.c (valpy_int): Allow conversion from pointer
226         type.
227
228 2018-09-23  Tom Tromey  <tom@tromey.com>
229
230         PR python/20126:
231         * python/py-value.c (valpy_int): Respect type sign.
232
233 2018-09-23  Tom Tromey  <tom@tromey.com>
234
235         PR python/18352;
236         * python/py-value.c (valpy_float): Allow conversions from int or
237         char.
238         (valpy_int, valpy_long): Allow conversions from float.
239
240 2018-09-23  Tom Tromey  <tom@tromey.com>
241
242         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
243         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
244
245 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
246
247         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
248         __sighndlr.
249         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
250
251 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
252
253         * windows-nat.c (windows_nat_target::wait): Remove a spurious
254         target_terminal::ours().
255
256 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
257
258         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
259         of vl to ULONGEST.
260
261 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
262
263         * breakpoint.c (update_inserted_breakpoint_locations): Remove
264         redundant condition.
265
266 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
267
268         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
269
270         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
271         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
272         * sol-thread.c (ps_pdmodel): Don't guard definition.
273
274         * procfs.c: Fix formatting.
275
276         * procfs.c (sysset_t_alloc): Remove.
277         (create_procinfo): Use XNEW instead of sysset_t_alloc.
278         (procfs_debug_inferior): Likewise.
279         (procfs_set_exec_trap): Likewise.
280         (proc_set_traced_sysentry): Don't allocate argp dynamically.
281         (proc_set_traced_sysexit): Likewise.
282
283         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
284         (dead_procinfo): Likewise.
285         (proc_warn): Likewise.
286         (proc_error): Likewise.
287         (proc_get_LDT_entry): Likewise.
288         (do_attach): Likewise.
289         (procfs_target::pid_to_str): Likewise.
290         (iterate_over_mappings): Likewise.
291
292         * procfs.c (create_procinfo): Fix ARI warning.
293         (proc_get_status): Likewise.
294         (proc_stop_process): Likewise.
295         (proc_run_process): Likewise.
296         (proc_kill): Likewise.
297         (proc_get_LDT_entry): Likewise.
298         (procfs_find_LDT_entry): Likewise.
299         (proc_update_threads): Likewise.
300         (proc_iterate_over_threads): Likewise.
301         (do_attach): Likewise.
302         (procfs_xfer_memory): Likewise.
303         (invalidate_cache): Likewise.
304         (procfs_target::resume): Likewise.
305         (procfs_init_inferior): Likewise.
306         (procfs_set_exec_trap): Likewise.
307         (procfs_target::thread_alive): Likewise.
308         (procfs_target::pid_to_exec_file): Likewise.
309         (iterate_over_mappings): Likewise.
310         (procfs_target::make_corefile_notes): Likewise.
311         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
312
313         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
314         (procfs_find_LDT_entry): Likewise.
315         * sol-thread.c (ps_lgetLDT): Likewise.
316
317 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
318
319         PR tdep/17903
320         * procfs.c (procfs_target): Declare pid_to_exec_file.
321         (procfs_target::pid_to_exec_file): New.
322
323 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
324
325         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
326         renaming.
327         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
328         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
329
330 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
331
332         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
333         (supply_fpregset, fill_fpregset): Move ...
334         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
335         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
336         Remove references to ioctl-based procfs.
337         Include <sys/reg.h>.
338         Remove PR_MODEL_NATIVE guards.
339         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
340         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
341
342 2018-09-19  Xavier Roirand  <roirand@adacore.com>
343
344         PR gdb/20981:
345         * solib-darwin.c (darwin_get_dyld_bfd): New function.
346         (darwin_solib_get_all_image_info_addr_at_init): Update call.
347         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
348
349 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
350
351         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
352         (fbsd_print_sockaddr_in6): Likewise.
353
354 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
355             Chris January  <chris.january@arm.com>
356
357         * eval.c (skip_undetermined_arglist): Skip argument list helper.
358         (evaluate_subexp_standard): Return a dummy type when
359         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
360         OP_F77_UNDETERMINED_ARGLIST case.
361         * expression.h (enum noside): Update comment.
362
363 2018-09-19  George Vasick <george.vasick@oracle.com>
364
365         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
366
367 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
368             April Chin <april.chin@oracle.com>
369             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
370
371         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
372         uint_t lwpid_t.
373         (create_procinfo): Print pids in /proc without leading zeros.
374
375 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
376
377         * nios2-tdep.c (nios2_gcc_target_options): New.
378         (nios2_gdb_arch_init): Install new hook.
379
380 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
381
382         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
383         New file.
384         * update-gnulib.sh: Apply patch.
385         * configure: Re-generate.
386
387 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
388
389         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
390         description.  Make "info proc" command descriptions more
391         consistent.
392
393 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
394
395         * NEWS: Mention 'info proc files' command.
396
397 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
398
399         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
400         descriptors for IP_FILES and IP_ALL.
401
402 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
403
404         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
405         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
406         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
407         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
408         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
409         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
410         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
411         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
412         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
413         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
414         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
415         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
416         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
417         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
418         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
419         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
420         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
421         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
422         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
423         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
424         (struct fbsd_sockaddr_un): New types.
425         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
426         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
427         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
428         (fbsd_core_info_proc_files): New functions.
429         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
430         IP_ALL.
431         * fbsd-tdep.h (fbsd_info_proc_files_header)
432         (fbsd_info_proc_files_entry): New.
433
434 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
435
436         * defs.h (enum info_proc_what) [IP_FILES]: New value.
437         * infcmd.c (info_proc_cmd_files): New function.
438         (_initialize_infcmd): Register 'info proc files' command.
439
440 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
441
442         * gnulib/aclocal-m4-deps.mk: Re-generate.
443         * gnulib/aclocal.m4: Re-generate.
444         * gnulib/config.in: Re-generate.
445         * gnulib/configure: Re-generate.
446         * gnulib/import/Makefile.am: Re-generate.
447         * gnulib/import/Makefile.in: Re-generate.
448         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
449         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
450         * gnulib/import/arpa_inet.in.h: New file.
451         * gnulib/import/inet_ntop.c: New file.
452         * gnulib/import/m4/arpa_inet_h.m4: New file.
453         * gnulib/import/m4/inet_ntop.m4: New file.
454         * gnulib/import/m4/netinet_in_h.m4: New file.
455         * gnulib/import/m4/socklen.m4: New file.
456         * gnulib/import/m4/sockpfaf.m4: New file.
457         * gnulib/import/m4/stdalign.m4: New file.
458         * gnulib/import/m4/sys_uio_h.m4: New file.
459         * gnulib/import/netinet_in.in.h: New file.
460         * gnulib/import/stdalign.in.h: New file.
461         * gnulib/import/sys_socket.c: New file.
462         * gnulib/import/sys_socket.in.h: New file.
463         * gnulib/import/sys_uio.in.h: New file.
464         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
465         module.
466
467 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
468
469         * gnulib/aclocal-m4-deps.mk: New file.
470         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
471         deterministically.
472
473 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
474
475         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
476         KVE_PATH.
477
478 2018-09-18  Tom Tromey  <tom@tromey.com>
479
480         * compile/compile-object-load.c (struct
481         link_hash_table_cleanup_data): Add constructor and destructor.
482         Use DISABLE_COPY_AND_ASSIGN.
483         (~link_hash_table_cleanup_data): Rename from
484         link_hash_table_free.  Now a destructor.
485         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
486
487 2018-09-18  Tom Tromey  <tom@tromey.com>
488
489         * compile/compile-object-run.c (do_module_cleanup): Use delete.
490         * compile/compile-object-load.c (struct munmap_list): Move to
491         header file.
492         (munmap_list::add): Rename from munmap_list_add; rewrite.
493         (munmap_list::~munmap_list): Rename from munmap_list_free.
494         (munmap_listp_free_cleanup): Remove.
495         (compile_object_load): Update.
496         * compile/compile-object-load.h (struct munmap_list): Move from
497         compile-object-load.c.  Rewrite.
498
499 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
500
501         * aarch64-tdep.c (pass_in_v): Use register size.
502         (aarch64_extract_return_value): Likewise.
503         (aarch64_store_return_value): Likewise.
504
505 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
506
507         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
508         rlim_t.
509
510 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
511
512         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
513         Fix short help line.
514
515 2018-09-17  Tom Tromey  <tom@tromey.com>
516
517         PR python/20445:
518         * configure: Rebuild.
519         * configure.ac: Conditionally use -DNDEBUG for Python.
520
521 2018-09-17  Tom Tromey  <tom@tromey.com>
522
523         * configure: Rebuild.
524         * configure.ac: Use gmp as a library dependency when checking for
525         mpfr.
526
527 2018-09-17  Pedro Alves  <palves@redhat.com>
528
529         * python/py-inferior.c (find_inferior_object): Delete.
530
531 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
532
533         * compile/compile-cplus-types.c
534         (compile_cplus_instance::enter_scope): Don't use new_scope after
535         std::move.
536
537 2018-09-17  Tom Tromey  <tom@tromey.com>
538
539         * common/pathstuff.c (get_standard_cache_dir): Use
540         ~/Library/Caches on macOS.
541         * common/pathstuff.h (get_standard_cache_dir): Update comment.
542
543 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
544
545         PR python/23669
546         * breakpoint.c (commands_cmd_element): New.
547         (_initialize_breakpoint): Assign commands_cmd_element.
548         * breakpoint.h (commands_cmd_element): New.
549         * cli/cli-script.c (while_cmd_element, if_command,
550         define_cmd_element): New.
551         (command_name_equals): Remove.
552         (process_next_line): Compare commands by pointer, not by name.
553         (_initialize_cli_script): Assign the various cmd_list_element
554         variables.
555         * compile/compile.c (compile_cmd_element): New.
556         (_initialize_compile): Assign compile_cmd_element.
557         * compile/compile.h (compile_cmd_element): New.
558         * guile/guile.c (guile_cmd_element): New.
559         (install_gdb_commands): Assign guile_cmd_element.
560         * guile/guile.h (guile_cmd_element): New.
561         * python/python.c (python_cmd_element): New.
562         (_initialize_python): Assign python_cmd_element.
563         * python/python.h (python_cmd_element): New.
564         * tracepoint.c (while_stepping_cmd_element): New.
565         (_initialize_tracepoint): Assign while_stepping_cmd_element.
566         * tracepoint.h (while_stepping_cmd_element): New.
567
568 2018-09-17  Tom Tromey  <tom@tromey.com>
569
570         * infrun.c (save_infcall_suspend_state): Return
571         infcall_suspend_state_up.
572         (save_infcall_control_state): Return infcall_control_state_up.
573         * inferior.h (save_infcall_suspend_state)
574         (save_infcall_control_state): Declare later.  Return unique
575         pointers.
576
577 2018-09-17  Tom Tromey  <tom@tromey.com>
578
579         * infrun.c (struct stop_context): Declare constructor,
580         destructor, "changed" method.
581         (stop_context::stop_context): Rename from save_stop_context.
582         (stop_context::~stop_context): Rename from
583         release_stop_context_cleanup.
584         (normal_stop): Update.
585         (stop_context::changed): Rename from stop_context_changed.  Return
586         bool.
587
588 2018-09-17  Tom Tromey  <tom@tromey.com>
589
590         * inferior.h (struct infcall_suspend_state_deleter): New.
591         (infcall_suspend_state_up): New typedef.
592         (struct infcall_control_state_deleter): New.
593         (infcall_control_state_up): New typedef.
594         (make_cleanup_restore_infcall_suspend_state)
595         (make_cleanup_restore_infcall_control_state): Don't declare.
596         * infcall.c (call_function_by_hand_dummy): Update.
597         * infrun.c (do_restore_infcall_suspend_state_cleanup)
598         (make_cleanup_restore_infcall_suspend_state): Remove.
599         (do_restore_infcall_control_state_cleanup)
600         (make_cleanup_restore_infcall_control_state): Remove.
601
602 2018-09-17  Tom Tromey  <tom@tromey.com>
603
604         * gdbthread.h (struct thread_control_state): Add initializer.
605         (class thread_info) <control>: Remove initializer.
606         * inferior.h (struct inferior_control_state): Add initializer.
607         (class inferior) <control>: Remove initializer.
608         (exit_inferior_1): Update.
609         * infrun.c (struct infcall_control_state): Add constructors.
610         (save_infcall_control_state): Use new.
611         (restore_infcall_control_state, discard_infcall_control_state):
612         Use delete.
613
614 2018-09-17  Tom Tromey  <tom@tromey.com>
615
616         * infrun.c (struct infcall_suspend_state) <registers>: Now a
617         unique_ptr.
618         <siginfo_data>: Now a unique_xmalloc_ptr.
619         (save_infcall_suspend_state, restore_infcall_suspend_state)
620         (discard_infcall_suspend_state)
621         (get_infcall_suspend_state_regcache): Update.
622
623 2018-09-17  Tom Tromey  <tom@tromey.com>
624
625         * gdbthread.h (struct thread_suspend_state): Add initializers.
626         (class thread_info) <suspend>: Remove initializer.
627         * infrun.c (struct infcall_suspend_state): Add initializers.
628         (save_infcall_suspend_state): Use new.
629         (discard_infcall_suspend_state): Use delete.
630
631 2018-09-16  Tom Tromey  <tom@tromey.com>
632
633         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
634         Remove.
635         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
636         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
637         (py_varobj_iter_new): Likewise.
638         (py_varobj_get_iterator): Use gdbpy_ref.
639
640 2018-09-16  Tom Tromey  <tom@tromey.com>
641
642         * python/py-threadevent.c (py_get_event_thread): Simplify.
643         * python/py-inferior.c (infpy_thread_from_thread_handle):
644         Return immediately after calling thread_to_thread_object.  Use
645         Py_RETURN_NONE.
646         (thread_to_thread_object): Set the exception on a NULL return.
647
648 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
649
650         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
651
652 2018-09-16  Tom Tromey  <tom@tromey.com>
653
654         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
655         Remove.
656
657 2018-09-16  Tom Tromey  <tom@tromey.com>
658
659         * python/python-internal.h (thread_to_thread_object): Change
660         return type.
661         * python/py-inferior.c (thread_to_thread_object): Return a new
662         reference.
663         (infpy_thread_from_thread_handle): Update.
664         * python/py-infthread.c (gdbpy_selected_thread): Update.
665         * python/py-stopevent.c (create_stop_event_object): Update.
666         * python/py-threadevent.c (py_get_event_thread): Return a new
667         reference.
668         (py_get_event_thread): Update.
669         * python/py-event.h (py_get_event_thread): Change return type.
670         * python/py-continueevent.c (create_continue_event_object):
671         Update.
672
673 2018-09-16  Tom Tromey  <tom@tromey.com>
674
675         * python/py-progspace.c (pspy_get_objfiles): Update.
676         * python/python-internal.h (objfile_to_objfile_object): Change
677         return type.
678         * python/py-newobjfileevent.c (create_new_objfile_event_object):
679         Update.
680         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
681         Update.
682         * python/python.c (gdbpy_get_current_objfile): Update.
683         (gdbpy_objfiles): Update.
684         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
685         Update.
686         (objfile_to_objfile_object): Return a new reference.
687         * python/py-symtab.c (stpy_get_objfile): Update.
688         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
689         Update.
690
691 2018-09-16  Tom Tromey  <tom@tromey.com>
692
693         * python/py-inferior.c (infpy_get_progspace): Update.
694         * python/python-internal.h (pspace_to_pspace_object): Change
695         return type.
696         * python/py-newobjfileevent.c
697         (create_clear_objfiles_event_object): Update.
698         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
699         Update.
700         * python/python.c (gdbpy_get_current_progspace): Update.
701         (gdbpy_progspaces): Update.
702         * python/py-progspace.c (pspace_to_pspace_object): Return a new
703         reference.
704         * python/py-objfile.c (objfpy_get_progspace): Update.
705         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
706         Update.
707
708 2018-09-16  Tom Tromey  <tom@tromey.com>
709
710         * python/lib/gdb/__init__.py (current_progspace, objfiles)
711         (solib_name, block_for_pc, find_pc_line): New functions.
712         (execute_unwinders): Update.
713         * python/py-block.c (gdbpy_block_for_pc): Remove.
714         * python/py-inferior.c (infpy_get_progspace): New function.
715         (inferior_object_getset) <progspace>: Add.
716         * python/py-progspace.c (pspy_objfiles): Rewrite.
717         (pspy_solib_name, pspy_block_for_pc)
718         (pspy_find_pc_line, pspy_is_valid): New functions.
719         (progspace_object_methods): Add entries for solib_name,
720         block_for_pc, find_pc_line, is_valid.
721         * python/python-internal.h (gdbpy_block_for_pc)
722         (build_objfiles_list): Don't declare.
723         * python/python.c: Don't include solib.h.
724         (gdbpy_solib_name, gdbpy_find_pc_line)
725         (gdbpy_get_current_progspace, build_objfiles_list)
726         (gdbpy_objfiles): Remove.
727         (GdbMethods) <current_progspace, objfiles, block_for_pc,
728         solib_name, find_pc_line>: Remove entries.
729
730 2018-09-16  Tom Tromey  <tom@tromey.com>
731
732         * top.c (new_ui_command): Use GNU style for metasyntactic
733         variables.
734         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
735         variables.
736         * maint.c (maintenance_translate_address): Remove "<>" around
737         text.
738         * interps.c (interpreter_exec_cmd): Use GNU style for
739         metasyntactic variables.
740         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
741         metasyntactic variables.
742         * tracepoint.c (tfind_range_command): Use GNU style for
743         metasyntactic variables.
744         (tfind_outside_command): Likewise.
745         (_initialize_tracepoint): Likewise.
746         * remote.c (extended_remote_target::create_inferior): Use GNU
747         style for metasyntactic variables.
748         * sparc64-tdep.c (adi_examine_command): Use GNU style for
749         metasyntactic variables.
750         (adi_assign_command): Likewise.
751
752 2018-09-16  Tom Tromey  <tom@tromey.com>
753
754         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
755         metasyntactic variables.  Print message if no disassembler options
756         are available.
757
758 2018-09-15  Tom Tromey  <tom@tromey.com>
759
760         * infcmd.c (get_inferior_args): Return const char *.
761         * inferior.h (get_inferior_args): Return type now const.
762         * linux-tdep.c (linux_fill_prpsinfo): Update.
763         * procfs.c (procfs_target::make_corefile_notes): Update.
764
765 2018-09-07  Tom Tromey  <tom@tromey.com>
766
767         * python/python.c (execute_gdb_command): Call bpstat_do_actions
768         inside the TRY.
769
770 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
771
772         * nios2-tdep.c (nios2_type_align): New.
773         (nios2_gdb_arch_init): Install type_align hook.
774
775 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
776
777         * eval.c (fake_method::fake_method): Call xzalloc directly for a
778         type that is neither object file owned, nor gdbarch owned.
779         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
780         gdbarch is non-NULL.
781         (alloc_type_instance): Allocate non-objfile owned types on the
782         gdbarch obstack.
783         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
784         using TYPE_ALLOC to ensure memory is allocated on the correct
785         obstack.
786         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
787         obstack, or the gdbarch obstack.
788         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
789
790 2018-09-14  Tom Tromey  <tom@tromey.com>
791
792         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
793         block.
794
795 2018-09-14  Tom Tromey  <tom@tromey.com>
796
797         * nat/fork-inferior.c (get_startup_shell): Remove "static".
798
799 2018-09-13  Tom Tromey  <tom@tromey.com>
800
801         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
802         static.
803
804 2018-09-13  Tom Tromey  <tom@tromey.com>
805
806         * exec.c (try_open_exec_file): Use std::string.
807
808 2018-09-13  Tom Tromey  <tom@tromey.com>
809
810         * utils.h (gdb_bfd_errmsg): Return std::string.
811         * exec.c (exec_file_attach): Update.
812         * compile/compile-object-load.c (compile_object_load): Update.
813         * utils.c (gdb_bfd_errmsg): Return std::string.
814
815 2018-09-13  Tom Tromey  <tom@tromey.com>
816
817         * procfs.c (struct procinfo_deleter): New.
818         (procinfo_up): New typedef.
819         (do_destroy_procinfo_cleanup): Remove.
820         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
821
822 2018-09-13  Tom Tromey  <tom@tromey.com>
823
824         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
825
826 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
827 2018-09-13  Tom Tromey  <tom@tromey.com>
828
829         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
830         (pspy_get_objfiles): New function.
831         (progspace_object_methods): New.
832         (pspace_object_type): Add tp_methods callback.
833         * python/python-internal.h (build_objfiles_list): New
834         declaration.
835         * python/python.c (build_objfiles_list): New function.
836         (gdbpy_objfiles): Implement using build_objfiles_list.
837         * NEWS: Mention the Progspace.objfiles method.
838
839 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
840
841         * python/py-inferior.c (infpy_get_progspace): New function.
842         (inferior_object_getset): Add progspace property.
843         * NEWS: Mention the new property.
844
845 2018-09-13  Tom Tromey  <tom@tromey.com>
846
847         PR rust/23650:
848         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
849
850 2018-09-13  Tom Tromey  <tom@tromey.com>
851
852         PR rust/23626:
853         * rust-lang.c (rust_enum_variant): Now static.
854         (rust_empty_enum_p): New function.
855         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
856         Handle empty enum.
857
858 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
859
860         * python/py-inferior.c (infpy_repr): New.
861         (inferior_object_type): Register infpy_repr.
862         * python/py-objfile.c (objfpy_repr): New.
863         (objfile_object_type): Register objfpy_repr.
864
865 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
866
867         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
868
869 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
870
871         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
872         typo.
873
874 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
875
876         * common/common-utils.c: Don't include '<sys/stat.h>'.
877         (is_regular_file): Move to...
878         * common/filestuff.c (is_regular_file): ... here.
879         * common/common-utils.h (is_regular_file): Move to...
880         * common/filestuff.h (is_regular_file): ... here.
881
882 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
883
884         * skip.c (debug_skip): New variable.
885         (skiplist_entry::do_skip_file_p): Add debug output.
886         (skiplist_entry::do_skip_gfile_p): Likewise.
887         (skiplist_entry::skip_function_p): Likewise.
888         (_initialize_step_skip): Create debug command.
889         * NEWS: Mention set/show debug skip.
890
891 2018-09-11  Xavier Roirand  <roirand@adacore.com>
892
893         * darwin-nat.c (should_disable_startup_with_shell):
894         New function.
895         (darwin_nat_target::create_inferior): Add call.
896
897 2018-09-11  Xavier Roirand  <roirand@adacore.com>
898
899         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
900         inf_port, msg_state>: Initialize.
901         (struct darwin_thread_info) <signaled, single_step>: Change
902         type and initialize.
903         (struct darwin_thread_info) <event>: Initialize.
904
905 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
906
907         PR gdb/23555
908         PR gdb/23558
909         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
910         guesses.
911
912 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
913
914         Revert:
915         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
916
917         PR gdb/23555
918         PR gdb/23558
919         * gnulib/aclocal.m4: Regenerate.
920         * gnulib/config.in: Regenerate.
921         * gnulib/configure: Regenerate.
922         * gnulib/import/Makefile.am: Update.
923         * gnulib/import/Makefile.in: Update.
924         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
925         * gnulib/import/_Noreturn.h: ... this.
926         * gnulib/import/alloca.in.h: Update.
927         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
928         * gnulib/import/arg-nonnull.h: ... this.
929         * gnulib/import/assure.h: Update.
930         * gnulib/import/at-func.c: Update.
931         * gnulib/import/basename-lgpl.c: Update.
932         * gnulib/import/extra/snippet/c++defs.h: Rename to...
933         * gnulib/import/c++defs.h: ... this.
934         * gnulib/import/canonicalize-lgpl.c: Update.
935         * gnulib/import/cdefs.h: Update.
936         * gnulib/import/chdir-long.c: Update.
937         * gnulib/import/chdir-long.h: Update.
938         * gnulib/import/cloexec.c: Update.
939         * gnulib/import/cloexec.h: Update.
940         * gnulib/import/close.c: Update.
941         * gnulib/import/closedir.c: Update.
942         * gnulib/import/config.charset: Update.
943         * gnulib/import/dirent-private.h: Update.
944         * gnulib/import/dirent.in.h: Update.
945         * gnulib/import/dirfd.c: Update.
946         * gnulib/import/dirname-lgpl.c: Update.
947         * gnulib/import/dirname.h: Update.
948         * gnulib/import/dosname.h: Update.
949         * gnulib/import/dup-safer-flag.c: Update.
950         * gnulib/import/dup-safer.c: Update.
951         * gnulib/import/dup.c: Update.
952         * gnulib/import/dup2.c: Update.
953         * gnulib/import/errno.in.h: Update.
954         * gnulib/import/error.c: Update.
955         * gnulib/import/error.h: Update.
956         * gnulib/import/exitfail.c: Update.
957         * gnulib/import/exitfail.h: Update.
958         * gnulib/import/extra/update-copyright: Update.
959         * gnulib/import/fchdir.c: Update.
960         * gnulib/import/fcntl.c: Update.
961         * gnulib/import/fcntl.in.h: Update.
962         * gnulib/import/fd-hook.c: Update.
963         * gnulib/import/fd-hook.h: Update.
964         * gnulib/import/fd-safer-flag.c: Update.
965         * gnulib/import/fd-safer.c: Update.
966         * gnulib/import/fdopendir.c: Update.
967         * gnulib/import/filename.h: Update.
968         * gnulib/import/filenamecat-lgpl.c: Update.
969         * gnulib/import/filenamecat.h: Update.
970         * gnulib/import/flexmember.h: Update.
971         * gnulib/import/float+.h: Update.
972         * gnulib/import/float.c: Update.
973         * gnulib/import/float.in.h: Update.
974         * gnulib/import/fnmatch.c: Update.
975         * gnulib/import/fnmatch.in.h: Update.
976         * gnulib/import/fnmatch_loop.c: Update.
977         * gnulib/import/fpucw.h: Update.
978         * gnulib/import/frexp.c: Update.
979         * gnulib/import/frexpl.c: Update.
980         * gnulib/import/fstat.c: Update.
981         * gnulib/import/fstatat.c: Update.
982         * gnulib/import/getcwd-lgpl.c: Update.
983         * gnulib/import/getcwd.c: Update.
984         * gnulib/import/getdtablesize.c: Update.
985         * gnulib/import/getlogin_r.c: Update.
986         * gnulib/import/getprogname.c: Update.
987         * gnulib/import/getprogname.h: Update.
988         * gnulib/import/gettext.h: Update.
989         * gnulib/import/gettimeofday.c: Update.
990         * gnulib/import/glob-libc.h: Update.
991         * gnulib/import/glob.c: Update.
992         * gnulib/import/glob.in.h: Update.
993         * gnulib/import/glob_internal.h: Update.
994         * gnulib/import/glob_pattern_p.c: Update.
995         * gnulib/import/globfree.c: Update.
996         * gnulib/import/hard-locale.c: Update.
997         * gnulib/import/hard-locale.h: Update.
998         * gnulib/import/intprops.h: Update.
999         * gnulib/import/inttypes.in.h: Update.
1000         * gnulib/import/isnan.c: Update.
1001         * gnulib/import/isnand-nolibm.h: Update.
1002         * gnulib/import/isnand.c: Update.
1003         * gnulib/import/isnanl-nolibm.h: Update.
1004         * gnulib/import/isnanl.c: Update.
1005         * gnulib/import/itold.c: Update.
1006         * gnulib/import/libc-config.h: Update.
1007         * gnulib/import/limits.in.h: Update.
1008         * gnulib/import/localcharset.c: Update.
1009         * gnulib/import/localcharset.h: Update.
1010         * gnulib/import/localtime-buffer.c: Update.
1011         * gnulib/import/localtime-buffer.h: Update.
1012         * gnulib/import/lstat.c: Update.
1013         * gnulib/import/m4/00gnulib.m4: Update.
1014         * gnulib/import/m4/__inline.m4: Update.
1015         * gnulib/import/m4/absolute-header.m4: Update.
1016         * gnulib/import/m4/alloca.m4: Update.
1017         * gnulib/import/m4/builtin-expect.m4: Update.
1018         * gnulib/import/m4/canonicalize.m4: Update.
1019         * gnulib/import/m4/chdir-long.m4: Update.
1020         * gnulib/import/m4/close.m4: Update.
1021         * gnulib/import/m4/closedir.m4: Update.
1022         * gnulib/import/m4/configmake.m4: Update.
1023         * gnulib/import/m4/d-ino.m4: Update.
1024         * gnulib/import/m4/d-type.m4: Update.
1025         * gnulib/import/m4/dirent_h.m4: Update.
1026         * gnulib/import/m4/dirfd.m4: Update.
1027         * gnulib/import/m4/dirname.m4: Update.
1028         * gnulib/import/m4/double-slash-root.m4: Update.
1029         * gnulib/import/m4/dup.m4: Update.
1030         * gnulib/import/m4/dup2.m4: Update.
1031         * gnulib/import/m4/eealloc.m4: Update.
1032         * gnulib/import/m4/environ.m4: Update.
1033         * gnulib/import/m4/errno_h.m4: Update.
1034         * gnulib/import/m4/error.m4: Update.
1035         * gnulib/import/m4/exponentd.m4: Update.
1036         * gnulib/import/m4/exponentl.m4: Update.
1037         * gnulib/import/m4/extensions.m4: Update.
1038         * gnulib/import/m4/extern-inline.m4: Update.
1039         * gnulib/import/m4/fchdir.m4: Update.
1040         * gnulib/import/m4/fcntl-o.m4: Update.
1041         * gnulib/import/m4/fcntl.m4: Update.
1042         * gnulib/import/m4/fcntl_h.m4: Update.
1043         * gnulib/import/m4/fdopendir.m4: Update.
1044         * gnulib/import/m4/filenamecat.m4: Update.
1045         * gnulib/import/m4/flexmember.m4: Update.
1046         * gnulib/import/m4/float_h.m4: Update.
1047         * gnulib/import/m4/fnmatch.m4: Update.
1048         * gnulib/import/m4/fnmatch_h.m4: Update.
1049         * gnulib/import/m4/fpieee.m4: Update.
1050         * gnulib/import/m4/frexp.m4: Update.
1051         * gnulib/import/m4/frexpl.m4: Update.
1052         * gnulib/import/m4/fstat.m4: Update.
1053         * gnulib/import/m4/fstatat.m4: Update.
1054         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1055         * gnulib/import/m4/getcwd-path-max.m4: Update.
1056         * gnulib/import/m4/getcwd.m4: Update.
1057         * gnulib/import/m4/getdtablesize.m4: Update.
1058         * gnulib/import/m4/getlogin.m4: Update.
1059         * gnulib/import/m4/getlogin_r.m4: Update.
1060         * gnulib/import/m4/getpagesize.m4: Update.
1061         * gnulib/import/m4/getprogname.m4: Update.
1062         * gnulib/import/m4/gettimeofday.m4: Update.
1063         * gnulib/import/m4/glibc21.m4: Update.
1064         * gnulib/import/m4/glob.m4: Update.
1065         * gnulib/import/m4/glob_h.m4: Update.
1066         * gnulib/import/m4/gnulib-cache.m4: Update.
1067         * gnulib/import/m4/gnulib-common.m4: Update.
1068         * gnulib/import/m4/gnulib-comp.m4: Update.
1069         * gnulib/import/m4/gnulib-tool.m4: Update.
1070         * gnulib/import/m4/hard-locale.m4: Update.
1071         * gnulib/import/m4/include_next.m4: Update.
1072         * gnulib/import/m4/inttypes-pri.m4: Update.
1073         * gnulib/import/m4/inttypes.m4: Update.
1074         * gnulib/import/m4/isnand.m4: Update.
1075         * gnulib/import/m4/isnanl.m4: Update.
1076         * gnulib/import/m4/largefile.m4: Update.
1077         * gnulib/import/m4/limits-h.m4: Update.
1078         * gnulib/import/m4/localcharset.m4: Update.
1079         * gnulib/import/m4/locale-fr.m4: Update.
1080         * gnulib/import/m4/locale-ja.m4: Update.
1081         * gnulib/import/m4/locale-zh.m4: Update.
1082         * gnulib/import/m4/localtime-buffer.m4: Update.
1083         * gnulib/import/m4/longlong.m4: Update.
1084         * gnulib/import/m4/lstat.m4: Update.
1085         * gnulib/import/m4/malloc.m4: Update.
1086         * gnulib/import/m4/malloca.m4: Update.
1087         * gnulib/import/m4/math_h.m4: Update.
1088         * gnulib/import/m4/mbrtowc.m4: Update.
1089         * gnulib/import/m4/mbsinit.m4: Update.
1090         * gnulib/import/m4/mbsrtowcs.m4: Update.
1091         * gnulib/import/m4/mbstate_t.m4: Update.
1092         * gnulib/import/m4/memchr.m4: Update.
1093         * gnulib/import/m4/memmem.m4: Update.
1094         * gnulib/import/m4/mempcpy.m4: Update.
1095         * gnulib/import/m4/memrchr.m4: Update.
1096         * gnulib/import/m4/mkdir.m4: Update.
1097         * gnulib/import/m4/mkstemp.m4: Update.
1098         * gnulib/import/m4/mmap-anon.m4: Update.
1099         * gnulib/import/m4/mode_t.m4: Update.
1100         * gnulib/import/m4/msvc-inval.m4: Update.
1101         * gnulib/import/m4/msvc-nothrow.m4: Update.
1102         * gnulib/import/m4/multiarch.m4: Update.
1103         * gnulib/import/m4/nocrash.m4: Update.
1104         * gnulib/import/m4/off_t.m4: Update.
1105         * gnulib/import/m4/onceonly.m4: Update.
1106         * gnulib/import/m4/open-cloexec.m4: Update.
1107         * gnulib/import/m4/open.m4: Update.
1108         * gnulib/import/m4/openat.m4: Update.
1109         * gnulib/import/m4/opendir.m4: Update.
1110         * gnulib/import/m4/pathmax.m4: Update.
1111         * gnulib/import/m4/rawmemchr.m4: Update.
1112         * gnulib/import/m4/readdir.m4: Update.
1113         * gnulib/import/m4/readlink.m4: Update.
1114         * gnulib/import/m4/realloc.m4: Update.
1115         * gnulib/import/m4/rename.m4: Update.
1116         * gnulib/import/m4/rewinddir.m4: Update.
1117         * gnulib/import/m4/rmdir.m4: Update.
1118         * gnulib/import/m4/save-cwd.m4: Update.
1119         * gnulib/import/m4/secure_getenv.m4: Update.
1120         * gnulib/import/m4/setenv.m4: Update.
1121         * gnulib/import/m4/signal_h.m4: Update.
1122         * gnulib/import/m4/ssize_t.m4: Update.
1123         * gnulib/import/m4/stat-time.m4: Update.
1124         * gnulib/import/m4/stat.m4: Update.
1125         * gnulib/import/m4/std-gnu11.m4: Update.
1126         * gnulib/import/m4/stdbool.m4: Update.
1127         * gnulib/import/m4/stddef_h.m4: Update.
1128         * gnulib/import/m4/stdint.m4: Update.
1129         * gnulib/import/m4/stdio_h.m4: Update.
1130         * gnulib/import/m4/stdlib_h.m4: Update.
1131         * gnulib/import/m4/strchrnul.m4: Update.
1132         * gnulib/import/m4/strdup.m4: Update.
1133         * gnulib/import/m4/strerror.m4: Update.
1134         * gnulib/import/m4/string_h.m4: Update.
1135         * gnulib/import/m4/strstr.m4: Update.
1136         * gnulib/import/m4/strtok_r.m4: Update.
1137         * gnulib/import/m4/sys_socket_h.m4: Update.
1138         * gnulib/import/m4/sys_stat_h.m4: Update.
1139         * gnulib/import/m4/sys_time_h.m4: Update.
1140         * gnulib/import/m4/sys_types_h.m4: Update.
1141         * gnulib/import/m4/tempname.m4: Update.
1142         * gnulib/import/m4/time_h.m4: Update.
1143         * gnulib/import/m4/unistd-safer.m4: Update.
1144         * gnulib/import/m4/unistd_h.m4: Update.
1145         * gnulib/import/m4/warn-on-use.m4: Update.
1146         * gnulib/import/m4/wchar_h.m4: Update.
1147         * gnulib/import/m4/wchar_t.m4: Update.
1148         * gnulib/import/m4/wctype_h.m4: Update.
1149         * gnulib/import/m4/wint_t.m4: Update.
1150         * gnulib/import/malloc.c: Update.
1151         * gnulib/import/malloc/scratch_buffer.h: Update.
1152         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1153         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1154         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1155         * gnulib/import/malloca.c: Update.
1156         * gnulib/import/malloca.h: Update.
1157         * gnulib/import/malloca.valgrind: Update.
1158         * gnulib/import/math.in.h: Update.
1159         * gnulib/import/mbrtowc.c: Update.
1160         * gnulib/import/mbsinit.c: Update.
1161         * gnulib/import/mbsrtowcs-impl.h: Update.
1162         * gnulib/import/mbsrtowcs-state.c: Update.
1163         * gnulib/import/mbsrtowcs.c: Update.
1164         * gnulib/import/memchr.c: Update.
1165         * gnulib/import/memmem.c: Update.
1166         * gnulib/import/mempcpy.c: Update.
1167         * gnulib/import/memrchr.c: Update.
1168         * gnulib/import/mkdir.c: Update.
1169         * gnulib/import/mkstemp.c: Update.
1170         * gnulib/import/msvc-inval.c: Update.
1171         * gnulib/import/msvc-inval.h: Update.
1172         * gnulib/import/msvc-nothrow.c: Update.
1173         * gnulib/import/msvc-nothrow.h: Update.
1174         * gnulib/import/open.c: Update.
1175         * gnulib/import/openat-die.c: Update.
1176         * gnulib/import/openat-priv.h: Update.
1177         * gnulib/import/openat-proc.c: Update.
1178         * gnulib/import/openat.c: Update.
1179         * gnulib/import/openat.h: Update.
1180         * gnulib/import/opendir.c: Update.
1181         * gnulib/import/pathmax.h: Update.
1182         * gnulib/import/pipe-safer.c: Update.
1183         * gnulib/import/rawmemchr.c: Update.
1184         * gnulib/import/readdir.c: Update.
1185         * gnulib/import/readlink.c: Update.
1186         * gnulib/import/realloc.c: Update.
1187         * gnulib/import/ref-add.sin: Update.
1188         * gnulib/import/ref-del.sin: Update.
1189         * gnulib/import/rename.c: Update.
1190         * gnulib/import/rewinddir.c: Update.
1191         * gnulib/import/rmdir.c: Update.
1192         * gnulib/import/same-inode.h: Update.
1193         * gnulib/import/save-cwd.c: Update.
1194         * gnulib/import/save-cwd.h: Update.
1195         * gnulib/import/scratch_buffer.h: Update.
1196         * gnulib/import/secure_getenv.c: Update.
1197         * gnulib/import/setenv.c: Update.
1198         * gnulib/import/signal.in.h: Update.
1199         * gnulib/import/stat-time.c: Update.
1200         * gnulib/import/stat-time.h: Update.
1201         * gnulib/import/stat-w32.c: Update.
1202         * gnulib/import/stat-w32.h: Update.
1203         * gnulib/import/stat.c: Update.
1204         * gnulib/import/stdbool.in.h: Update.
1205         * gnulib/import/stddef.in.h: Update.
1206         * gnulib/import/stdint.in.h: Update.
1207         * gnulib/import/stdio.in.h: Update.
1208         * gnulib/import/stdlib.in.h: Update.
1209         * gnulib/import/str-two-way.h: Update.
1210         * gnulib/import/strchrnul.c: Update.
1211         * gnulib/import/strdup.c: Update.
1212         * gnulib/import/streq.h: Update.
1213         * gnulib/import/strerror-override.c: Update.
1214         * gnulib/import/strerror-override.h: Update.
1215         * gnulib/import/strerror.c: Update.
1216         * gnulib/import/string.in.h: Update.
1217         * gnulib/import/stripslash.c: Update.
1218         * gnulib/import/strnlen1.c: Update.
1219         * gnulib/import/strnlen1.h: Update.
1220         * gnulib/import/strstr.c: Update.
1221         * gnulib/import/strtok_r.c: Update.
1222         * gnulib/import/sys_stat.in.h: Update.
1223         * gnulib/import/sys_time.in.h: Update.
1224         * gnulib/import/sys_types.in.h: Update.
1225         * gnulib/import/tempname.c: Update.
1226         * gnulib/import/tempname.h: Update.
1227         * gnulib/import/time.in.h: Update.
1228         * gnulib/import/unistd--.h: Update.
1229         * gnulib/import/unistd-safer.h: Update.
1230         * gnulib/import/unistd.in.h: Update.
1231         * gnulib/import/unsetenv.c: Update.
1232         * gnulib/import/verify.h: Update.
1233         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1234         * gnulib/import/wchar.in.h: Update.
1235         * gnulib/import/wctype.in.h: Update.
1236         * gnulib/import/xalloc-oversized.h: Update.
1237         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1238         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1239
1240 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
1241
1242         * record-btrace.c (get_thread_current_frame): Remove
1243         old_inferior_ptid.
1244
1245 2018-09-10  Jerome Guitton  <guitton@adacore.com>
1246
1247         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1248         with check_tag to 1 if and only if the type is tagged and the
1249         component being searched cannot been found in the current
1250         view. Otherwise, always call ada_to_fixed_type with
1251         check_tag to 0.
1252
1253 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1254
1255         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1256         declaration.
1257         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1258         * ada-varobj.c (ada_varobj_get_number_of_children,
1259         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1260
1261 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1262
1263         * ada-valprint.c (ada_value_print): Use type instead of
1264         enclosing type.
1265
1266 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1267
1268         * ada-lang.c (ada_value_subscript): Handle case when parameter is
1269         an array of access to unconstrained array.
1270
1271 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1272
1273         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1274         (ada_check_typedef): Use it.
1275
1276 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1277
1278         * ada-varobj.c (ada_varobj_describe_struct_child)
1279         (ada_varobj_describe_child): Handle union case like struct one.
1280
1281 2018-09-10  Tom Tromey  <tom@tromey.com>
1282
1283         PR python/18380:
1284         * python/python.c (_initialize_python): Make example in "python"
1285         help work in Python 3.
1286
1287 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
1288
1289         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1290         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
1291         $(EXEEXT) to the script, as it is not a program.
1292
1293 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
1294
1295         * python/py-prettyprint.c (pretty_print_one_value): Return
1296         gdbpy_ref<>.
1297         (print_string_repr): Adjust.
1298         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1299         * python/python-internal.h (apply_varobj_pretty_printer): Return
1300         gdbpy_ref<>.
1301         * varobj.c (varobj_value_get_print_value): Adjust.
1302
1303 2018-09-08  Tom Tromey  <tom@tromey.com>
1304
1305         PR python/16047:
1306         * python/py-prettyprint.c (pretty_print_one_value): Check for
1307         to_string method.
1308
1309 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1310
1311         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1312         replace_operator_with_call.
1313
1314 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1315
1316         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1317
1318 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1319
1320         * ada-typeprint.c (print_range): Print the bounds using TYPE
1321         rather than its TYPE_TARGET_TYPE.
1322
1323 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1324
1325         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1326         call to ada_to_fixed_value_create.
1327
1328 2018-09-08  Jerome Guitton  <guitton@adacore.com>
1329
1330         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1331
1332 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1333
1334         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1335         by calls to error.
1336
1337 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1338
1339         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1340         Move update of loop variable "fi".
1341
1342 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1343
1344         * ada-lang.c (value_assign_to_component): In the case of
1345         big-endian targets, extract the bits of the given VAL
1346         using an src_offset of zero if container is not a scalar.
1347
1348 2018-09-06  Simon Ser  <contact@emersion.fr>
1349
1350         PR gdb/23105
1351         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1352         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1353         * fbsd-tdep.c (fbsd_make_note_desc): New.
1354         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1355         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1356         * target.h (enum target_object) Add FreeBSD-specific
1357         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1358
1359 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1360
1361         * compile/compile-c.h (generate_c_for_variable_locations):
1362         Change reference to pointer.
1363         * compile/compile-c-support.c (compile_program) <compute>:
1364         Likewise.
1365         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1366         (generate_c_for_for_one_variable): Likewise
1367         (generate_c_for_variable_locations): Likewise
1368         * compile/compile-c-types.c (compile_c_instance::convert_type):
1369         Likewise
1370         * compile/compile-cplus-symbols.c (convert_one_symbol):
1371         std::move the scope passed to enter_scope.
1372         * compile/compile-cplus-types.c
1373         (compile_cplus_instance::enter_scope): Make parameter
1374         rvalue-reference.
1375         (compile_cplus_instance::new_scope): Change reference to
1376         pointer.
1377         (compile_cplus_instance::convert_type): Likewise
1378         (compile_cplus_convert_typedef): std::move the scope passed to
1379         enter_scope.
1380         (compile_cplus_convert_struct_or_union): Likewise.
1381         (compile_cplus_convert_enum): Likewise.
1382         (compile_cplus_convert_namespace): Likewise.
1383         * compile/compile-cplus.h (compile_cplus_instance)
1384         <enter_scope>: Make parameter rvalue-reference.
1385         * compile/compile-internal.h (compile_instance)
1386         <get_cached_type>: Likewise
1387         * compile/compile-loc2c.c (push): Likewise
1388         (pushf): Likewise
1389         (unary): Likewise
1390         (binary): Likewise
1391         (print_label): Likewise
1392         (pushf_register_address): Likewise
1393         (pushf_register): Likewise
1394         (do_compile_dwarf_expr_to_c): Likewise
1395         (compile_dwarf_expr_to_c): Likewise
1396         (compile_dwarf_bounds_to_c): Likewise
1397         * compile/compile.c (compile_instance::get_cached_type):
1398         Likewise
1399         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1400         (compile_dwarf_bounds_to_c): Likewise
1401         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1402         (dwarf2_compile_property_to_c): Likewise
1403         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1404         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1405         Likewise
1406
1407 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1408
1409         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1410         * tui/tui-data.c (init_content_element): Don't initialize it.
1411
1412 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1413
1414         * tui/tui-data.h (struct tui_win_info)
1415         <detail::opaque>: Remove.
1416         * tui/tui-data.c (init_win_info): Remove assignment.
1417
1418 2018-09-05  Tom Tromey  <tom@tromey.com>
1419
1420         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1421         -Wformat-nonliteral.
1422         * target-float.c (host_float_ops<T>::to_string)
1423         (host_float_ops<T>::from_string): Use
1424         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1425         * configure: Rebuild.
1426
1427 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1428
1429         * printcmd.c (printf_c_string): Use
1430         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1431         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1432
1433 2018-09-05  Tom Tromey  <tom@tromey.com>
1434
1435         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1436
1437 2018-09-05  Tom de Vries  <tdevries@suse.de>
1438
1439         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1440         with resolve_abstract_p == true.
1441         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1442         defaulting to false. Propagate resolve_abstract_p to
1443         dwarf2_fetch_die_loc_sect_off.
1444         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1445         parameter, defaulting to false.
1446         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1447         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1448         parameter.
1449         * dwarf2read.h (struct die_info): Forward-declare.
1450         (die_info_ptr): New typedef.
1451         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1452
1453 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
1454
1455         GDB 8.2 released.
1456
1457 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1458             Pedro Alves  <palves@redhat.com>
1459
1460         * gnulib/Makefile.in (aclocal_m4_deps): Move to
1461         "aclocal-m4-deps.mk".  Include file here.
1462         $(srcdir)/aclocal.m4: Add "configure.ac".
1463         * gnulib/aclocal-m4-deps.mk: New file.
1464         * gnulib/update-gnulib.sh: Automatically update
1465         "aclocal-m4-deps.mk".
1466
1467 2018-09-04  Tom Tromey  <tom@tromey.com>
1468
1469         * configure: Rebuild.
1470         * configure.ac: Remove multi-ice code.
1471
1472 2018-09-04  Tom Tromey  <tom@tromey.com>
1473
1474         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1475         (ada-exp.o): Update.
1476
1477 2018-09-04  Tom Tromey  <tom@tromey.com>
1478
1479         * Makefile.in (printcmd.o, target-float.o): Remove.
1480         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1481
1482 2018-09-04  Tom Tromey  <tom@tromey.com>
1483
1484         * gnulib/Makefile.in: Remove obsolete comment.
1485         * Makefile.in: Remove obsolete comment.
1486
1487 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
1488
1489         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1490         line with '+'.
1491
1492 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1493
1494         * riscv-tdep.c: Add 'prologue-value.h' include.
1495         (struct riscv_unwind_cache): New struct.
1496         (riscv_debug_unwinder): New global.
1497         (riscv_scan_prologue): Update arguments, capture register details
1498         from prologue scan.
1499         (riscv_skip_prologue): Reformat arguments line, move end of
1500         prologue calculation into riscv_scan_prologue.
1501         (riscv_frame_cache): Update return type, create
1502         riscv_unwind_cache, scan the prologue, and fill in remaining cache
1503         details.
1504         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1505         (riscv_frame_prev_register): Use the trad_frame within the
1506         riscv_unwind_cache.
1507         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1508         flag.
1509
1510 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1511
1512         * trad-frame.h (trad_frame_set_realreg): Declare.
1513         (trad_frame_set_addr): Declare.
1514         * trad-frame.c (trad_frame_set_realreg): Define new function.
1515         (trad_frame_set_addr): Define new function.
1516         (trad_frame_set_reg_realreg): Use new function.
1517         (trad_frame_set_reg_addr): Use new function.
1518
1519 2018-09-01  Keith Seitz  <keiths@redhat.com>
1520
1521         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1522         pulongest instead of "%lld".
1523         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1524         ATTRIBUTE_UNUSED.
1525
1526 2018-08-31  Tom Tromey  <tom@tromey.com>
1527
1528         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1529         variant part type.
1530
1531 2018-08-31  Pedro Alves  <palves@redhat.com>
1532
1533         * gdbarch.h: Regenerate.
1534
1535 2018-08-31  Pedro Alves  <palves@redhat.com>
1536
1537         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1538         * target.h (Hardware watchpoint interfaces): Describe
1539         continuable/steppable/non-steppable watchpoints.
1540         * gdbarch.h, gdbarch.c: Regenerate.
1541
1542 2018-08-31  Pedro Alves  <palves@redhat.com>
1543
1544         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1545         Delete.
1546         * s390-linux-nat.c
1547         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1548         * target.h (target_ops::have_continuable_watchpoint): Delete.
1549         (target_have_continuable_watchpoint): Delete.
1550         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1551         * target-delegates.c: Regenerate.
1552
1553 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1554
1555         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1556         the files present in "gnulib/import/m4/".
1557
1558 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1559
1560         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1561         c.sw, c.swsp, and c.sdsp.
1562
1563 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1564
1565         * riscv-tdep.c (struct riscv_inferior_data): Delete.
1566         (riscv_read_misa_reg): Don't cache value read into inferior data.
1567         (riscv_new_inferior_data): Delete.
1568         (riscv_inferior_data_cleanup): Delete.
1569         (riscv_inferior_data): Delete.
1570         (riscv_invalidate_inferior_data): Delete.
1571         (_initialize_riscv_tdep): Remove initialisation of inferior data.
1572
1573 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
1574
1575         * compile/compile-cplus-types.c
1576         (compile_cplus_instance::leave_scope): Take the address of scope
1577         object.
1578         (compile_cplus_instance::convert_qualified_base): Compare quals
1579         to 0.
1580
1581 2018-08-30  Keith Seitz  <keiths@redhat.com>
1582
1583         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1584         Use "%s" and host_address_to_string instead of "%p" in printf.
1585
1586 2018-08-29  Keith Seitz  <keiths@redhat.com>
1587
1588         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1589         and compile-cplus-types.c.
1590         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1591         * c-lang.c (cplus_language_defn): Set C++ compile functions.
1592         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1593         Declare.
1594         * compile/compile-c-support.c: Include compile-cplus.h.
1595         (load_libcompile): Templatize.
1596         (get_compile_context): "New" function.
1597         (c_get_compile_context): Use get_compile_context.
1598         (cplus_get_compile_context): New function.
1599         (cplus_push_user_expression, cplus_pop_user_expression)
1600         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1601         (cplus_compute_program): Define new structs/functions.
1602         * compile/compile-cplus-symmbols.c: New file.
1603         * compile/compile-cplus-types.c: New file.
1604         * compile/compile-cplus.h: New file.
1605         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1606         Declare.
1607         * compile/compile-object-load.c (get_out_value_type): Use
1608         strncmp_iw when comparing symbol names.
1609         (compile_object_load): Add mst_bss and mst_data.
1610         * compile/compile.c (_initialize_compile): Remove
1611         -Wno-implicit-function-declaration from `compile_args'.
1612         * compile/gcc-cp-plugin.h: New file.
1613         * NEWS: Mention C++ compile support and new debug options.
1614
1615 2018-08-29  Keith Seitz  <keiths@redhat.com>
1616
1617         * linespec.c (collect_info::add_symbol): Make virtual.
1618         (struct symbol_searcher_collect_info): New struct.
1619         (symbol_searcher::find_all_symbols): New method.
1620         * symtab.h (class symbol_searcher): New class.
1621
1622 2018-08-29  Keith Seitz  <keiths@redhat.com>
1623
1624         * linespec.c (struct linespec) <function_symbols, label_symbols>:
1625         Change to vector of block_symbol.  Update all users.
1626         (struct collect_info) <symbols>: Likewise.
1627         (collect_info::add_symbol): Take block_symbol as argument.
1628         Update all callers.
1629         (decode_compound_collector) <m_symbols>: Change type to vector
1630         of block_symbol.  Update all users.
1631         (decode_compound_collector::operator ()): Change parameter type
1632         to block_symbol.
1633         (find_method, find_function_symbols, find_linespec_symbols)
1634         (find_label_symbols_in_block, find_label_symbols): Change symbol
1635         vectors to block_symbol vectors.
1636         * symtab.h (symbol_found_callback_ftype): Change parameter type to
1637         block_symbol.
1638
1639 2018-08-29  Keith Seitz  <keiths@redhat.com>
1640
1641         * linespec.c (symbolp): Remove typedef and VEC definitions.
1642         (bound_minimal_symbol_d): Likewise.
1643
1644 2018-08-29  Keith Seitz  <keiths@redhat.com>
1645
1646         * linespec.c (decode_compound_collector::decode_compound_collector):
1647         Remove initialization for `m_symtabs'.
1648         (decode_compound_collector::release_symbols): Change return type
1649         to std::vector.  Update all callers.
1650         (class decode_compound_collector) <m_symbols>: Change type to
1651         std::vector.
1652         (lookup_prefix_sym): Change return type to std::vector.  Update all
1653         callers.
1654         (compare_symbols): Remove.
1655         (std_compare_symbols): Rename to `compare_symbols'.
1656         (find_method): Change `sym_classes' parameter to std::vector.
1657         Update all callers.  Use std::sort to sort sym_classes.
1658         (find_linespec_symbols): Remove cleanup.
1659
1660 2018-08-29  Keith Seitz  <keiths@redhat.com>
1661
1662         * linespec.c (struct linespec) <minimal_symbols>: Change type to
1663         std::vector.  Update all users.
1664         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1665         (struct collect_info) <minimal_symbols>: Likewise.
1666         (compare_msymbols): Return bool.  Change parameters to const
1667         bound_minimal_symbol references.
1668         (find_method, find_function_symbols, find_linespec_symbols): Change
1669         `minsyms' parameter to std::vector.  Update all callers.
1670
1671 2018-08-29  Keith Seitz  <keiths@redhat.com>
1672
1673         * linespec.c (struct linespec) <label_symbols>: Change type to
1674         std::vector.  Update all users.
1675         (find_label_symbols_in_block): Change `result' parameter to
1676         std::vector.  Update all callers.
1677         (find_label_symbols): Return std::vector.  Update all callers.
1678
1679 2018-08-29  Keith Seitz  <keiths@redhat.com>
1680
1681         * linespec.c (struct linespec) <function_symbols>: Change type to
1682         std::vector.  Update all users.
1683         (struct collect_info) <function_symbols>: Likewise.
1684         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1685         (std_compare_symbols): New function.
1686         (find_method, find_function_symbols, find_linespec_symbols)
1687         (find_label_symbols_in_block): Change `symbols' parameter to
1688         std::vector.  Update all callers.
1689         (find_label_symbols): Likewise for `function_symbols' and
1690         `label_funcs_ret'.
1691
1692 2018-08-29  Keith Seitz  <keiths@redhat.com>
1693
1694         * linespec.c (symtab_vector_up): Define.
1695         (struct linespec) <file_symtabs>: Change type to std::vector *.
1696         Update all uses.
1697         (struct collect_info) <file_symtabs>: Likewise.
1698         (collect_symtabs_from_filename): Return symtab_vector_up.
1699         Update all callers.
1700         (decode_objc): Remove cleanup.
1701         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1702         (symtab_collector::release_symtabs): Return symtab_vector_up.
1703         Update all callers.
1704         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1705         Update all users.
1706         (collect_symtabs_from_filename, symtabs_from_filename): Return
1707         symtab_vector_up.  Update all callers.
1708
1709 2018-08-29  Tom Tromey  <tom@tromey.com>
1710
1711         * csky-tdep.c (csky_analyze_prologue): Use
1712         core_addr_to_string_nz.
1713
1714 2018-08-29  Tom Tromey  <tom@tromey.com>
1715
1716         * windows-nat.c (struct xlate_exception) <them>: Change type to
1717         DWORD.
1718         (xlate): Fix formatting.  Remove last entry.
1719         (struct xlate_exception, xlate): Comment out.
1720         (windows_nat_target::resume): Use ranged for.
1721
1722 2018-08-29  Jim Wilson  <jimw@sifive.com>
1723
1724         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1725         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1726         of NT_PRFPREG.
1727         (riscv_linux_nat_target::store_registers): Likewise.
1728
1729 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1730
1731         PR gdb/23555
1732         PR gdb/23558
1733         * gnulib/aclocal.m4: Regenerate.
1734         * gnulib/config.in: Regenerate.
1735         * gnulib/configure: Regenerate.
1736         * gnulib/import/Makefile.am: Update.
1737         * gnulib/import/Makefile.in: Update.
1738         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1739         * gnulib/import/_Noreturn.h: ... this.
1740         * gnulib/import/alloca.in.h: Update.
1741         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1742         * gnulib/import/arg-nonnull.h: ... this.
1743         * gnulib/import/assure.h: Update.
1744         * gnulib/import/at-func.c: Update.
1745         * gnulib/import/basename-lgpl.c: Update.
1746         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1747         * gnulib/import/c++defs.h: ... this.
1748         * gnulib/import/canonicalize-lgpl.c: Update.
1749         * gnulib/import/cdefs.h: Update.
1750         * gnulib/import/chdir-long.c: Update.
1751         * gnulib/import/chdir-long.h: Update.
1752         * gnulib/import/cloexec.c: Update.
1753         * gnulib/import/cloexec.h: Update.
1754         * gnulib/import/close.c: Update.
1755         * gnulib/import/closedir.c: Update.
1756         * gnulib/import/config.charset: Update.
1757         * gnulib/import/dirent-private.h: Update.
1758         * gnulib/import/dirent.in.h: Update.
1759         * gnulib/import/dirfd.c: Update.
1760         * gnulib/import/dirname-lgpl.c: Update.
1761         * gnulib/import/dirname.h: Update.
1762         * gnulib/import/dosname.h: Update.
1763         * gnulib/import/dup-safer-flag.c: Update.
1764         * gnulib/import/dup-safer.c: Update.
1765         * gnulib/import/dup.c: Update.
1766         * gnulib/import/dup2.c: Update.
1767         * gnulib/import/errno.in.h: Update.
1768         * gnulib/import/error.c: Update.
1769         * gnulib/import/error.h: Update.
1770         * gnulib/import/exitfail.c: Update.
1771         * gnulib/import/exitfail.h: Update.
1772         * gnulib/import/extra/update-copyright: Update.
1773         * gnulib/import/fchdir.c: Update.
1774         * gnulib/import/fcntl.c: Update.
1775         * gnulib/import/fcntl.in.h: Update.
1776         * gnulib/import/fd-hook.c: Update.
1777         * gnulib/import/fd-hook.h: Update.
1778         * gnulib/import/fd-safer-flag.c: Update.
1779         * gnulib/import/fd-safer.c: Update.
1780         * gnulib/import/fdopendir.c: Update.
1781         * gnulib/import/filename.h: Update.
1782         * gnulib/import/filenamecat-lgpl.c: Update.
1783         * gnulib/import/filenamecat.h: Update.
1784         * gnulib/import/flexmember.h: Update.
1785         * gnulib/import/float+.h: Update.
1786         * gnulib/import/float.c: Update.
1787         * gnulib/import/float.in.h: Update.
1788         * gnulib/import/fnmatch.c: Update.
1789         * gnulib/import/fnmatch.in.h: Update.
1790         * gnulib/import/fnmatch_loop.c: Update.
1791         * gnulib/import/fpucw.h: Update.
1792         * gnulib/import/frexp.c: Update.
1793         * gnulib/import/frexpl.c: Update.
1794         * gnulib/import/fstat.c: Update.
1795         * gnulib/import/fstatat.c: Update.
1796         * gnulib/import/getcwd-lgpl.c: Update.
1797         * gnulib/import/getcwd.c: Update.
1798         * gnulib/import/getdtablesize.c: Update.
1799         * gnulib/import/getlogin_r.c: Update.
1800         * gnulib/import/getprogname.c: Update.
1801         * gnulib/import/getprogname.h: Update.
1802         * gnulib/import/gettext.h: Update.
1803         * gnulib/import/gettimeofday.c: Update.
1804         * gnulib/import/glob-libc.h: Update.
1805         * gnulib/import/glob.c: Update.
1806         * gnulib/import/glob.in.h: Update.
1807         * gnulib/import/glob_internal.h: Update.
1808         * gnulib/import/glob_pattern_p.c: Update.
1809         * gnulib/import/globfree.c: Update.
1810         * gnulib/import/hard-locale.c: Update.
1811         * gnulib/import/hard-locale.h: Update.
1812         * gnulib/import/intprops.h: Update.
1813         * gnulib/import/inttypes.in.h: Update.
1814         * gnulib/import/isnan.c: Update.
1815         * gnulib/import/isnand-nolibm.h: Update.
1816         * gnulib/import/isnand.c: Update.
1817         * gnulib/import/isnanl-nolibm.h: Update.
1818         * gnulib/import/isnanl.c: Update.
1819         * gnulib/import/itold.c: Update.
1820         * gnulib/import/libc-config.h: Update.
1821         * gnulib/import/limits.in.h: Update.
1822         * gnulib/import/localcharset.c: Update.
1823         * gnulib/import/localcharset.h: Update.
1824         * gnulib/import/localtime-buffer.c: Update.
1825         * gnulib/import/localtime-buffer.h: Update.
1826         * gnulib/import/lstat.c: Update.
1827         * gnulib/import/m4/00gnulib.m4: Update.
1828         * gnulib/import/m4/__inline.m4: Update.
1829         * gnulib/import/m4/absolute-header.m4: Update.
1830         * gnulib/import/m4/alloca.m4: Update.
1831         * gnulib/import/m4/builtin-expect.m4: Update.
1832         * gnulib/import/m4/canonicalize.m4: Update.
1833         * gnulib/import/m4/chdir-long.m4: Update.
1834         * gnulib/import/m4/close.m4: Update.
1835         * gnulib/import/m4/closedir.m4: Update.
1836         * gnulib/import/m4/configmake.m4: Update.
1837         * gnulib/import/m4/d-ino.m4: Update.
1838         * gnulib/import/m4/d-type.m4: Update.
1839         * gnulib/import/m4/dirent_h.m4: Update.
1840         * gnulib/import/m4/dirfd.m4: Update.
1841         * gnulib/import/m4/dirname.m4: Update.
1842         * gnulib/import/m4/double-slash-root.m4: Update.
1843         * gnulib/import/m4/dup.m4: Update.
1844         * gnulib/import/m4/dup2.m4: Update.
1845         * gnulib/import/m4/eealloc.m4: Update.
1846         * gnulib/import/m4/environ.m4: Update.
1847         * gnulib/import/m4/errno_h.m4: Update.
1848         * gnulib/import/m4/error.m4: Update.
1849         * gnulib/import/m4/exponentd.m4: Update.
1850         * gnulib/import/m4/exponentl.m4: Update.
1851         * gnulib/import/m4/extensions.m4: Update.
1852         * gnulib/import/m4/extern-inline.m4: Update.
1853         * gnulib/import/m4/fchdir.m4: Update.
1854         * gnulib/import/m4/fcntl-o.m4: Update.
1855         * gnulib/import/m4/fcntl.m4: Update.
1856         * gnulib/import/m4/fcntl_h.m4: Update.
1857         * gnulib/import/m4/fdopendir.m4: Update.
1858         * gnulib/import/m4/filenamecat.m4: Update.
1859         * gnulib/import/m4/flexmember.m4: Update.
1860         * gnulib/import/m4/float_h.m4: Update.
1861         * gnulib/import/m4/fnmatch.m4: Update.
1862         * gnulib/import/m4/fnmatch_h.m4: Update.
1863         * gnulib/import/m4/fpieee.m4: Update.
1864         * gnulib/import/m4/frexp.m4: Update.
1865         * gnulib/import/m4/frexpl.m4: Update.
1866         * gnulib/import/m4/fstat.m4: Update.
1867         * gnulib/import/m4/fstatat.m4: Update.
1868         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1869         * gnulib/import/m4/getcwd-path-max.m4: Update.
1870         * gnulib/import/m4/getcwd.m4: Update.
1871         * gnulib/import/m4/getdtablesize.m4: Update.
1872         * gnulib/import/m4/getlogin.m4: Update.
1873         * gnulib/import/m4/getlogin_r.m4: Update.
1874         * gnulib/import/m4/getpagesize.m4: Update.
1875         * gnulib/import/m4/getprogname.m4: Update.
1876         * gnulib/import/m4/gettimeofday.m4: Update.
1877         * gnulib/import/m4/glibc21.m4: Update.
1878         * gnulib/import/m4/glob.m4: Update.
1879         * gnulib/import/m4/glob_h.m4: Update.
1880         * gnulib/import/m4/gnulib-cache.m4: Update.
1881         * gnulib/import/m4/gnulib-common.m4: Update.
1882         * gnulib/import/m4/gnulib-comp.m4: Update.
1883         * gnulib/import/m4/gnulib-tool.m4: Update.
1884         * gnulib/import/m4/hard-locale.m4: Update.
1885         * gnulib/import/m4/include_next.m4: Update.
1886         * gnulib/import/m4/inttypes-pri.m4: Update.
1887         * gnulib/import/m4/inttypes.m4: Update.
1888         * gnulib/import/m4/isnand.m4: Update.
1889         * gnulib/import/m4/isnanl.m4: Update.
1890         * gnulib/import/m4/largefile.m4: Update.
1891         * gnulib/import/m4/limits-h.m4: Update.
1892         * gnulib/import/m4/localcharset.m4: Update.
1893         * gnulib/import/m4/locale-fr.m4: Update.
1894         * gnulib/import/m4/locale-ja.m4: Update.
1895         * gnulib/import/m4/locale-zh.m4: Update.
1896         * gnulib/import/m4/localtime-buffer.m4: Update.
1897         * gnulib/import/m4/longlong.m4: Update.
1898         * gnulib/import/m4/lstat.m4: Update.
1899         * gnulib/import/m4/malloc.m4: Update.
1900         * gnulib/import/m4/malloca.m4: Update.
1901         * gnulib/import/m4/math_h.m4: Update.
1902         * gnulib/import/m4/mbrtowc.m4: Update.
1903         * gnulib/import/m4/mbsinit.m4: Update.
1904         * gnulib/import/m4/mbsrtowcs.m4: Update.
1905         * gnulib/import/m4/mbstate_t.m4: Update.
1906         * gnulib/import/m4/memchr.m4: Update.
1907         * gnulib/import/m4/memmem.m4: Update.
1908         * gnulib/import/m4/mempcpy.m4: Update.
1909         * gnulib/import/m4/memrchr.m4: Update.
1910         * gnulib/import/m4/mkdir.m4: Update.
1911         * gnulib/import/m4/mkstemp.m4: Update.
1912         * gnulib/import/m4/mmap-anon.m4: Update.
1913         * gnulib/import/m4/mode_t.m4: Update.
1914         * gnulib/import/m4/msvc-inval.m4: Update.
1915         * gnulib/import/m4/msvc-nothrow.m4: Update.
1916         * gnulib/import/m4/multiarch.m4: Update.
1917         * gnulib/import/m4/nocrash.m4: Update.
1918         * gnulib/import/m4/off_t.m4: Update.
1919         * gnulib/import/m4/onceonly.m4: Update.
1920         * gnulib/import/m4/open-cloexec.m4: Update.
1921         * gnulib/import/m4/open.m4: Update.
1922         * gnulib/import/m4/openat.m4: Update.
1923         * gnulib/import/m4/opendir.m4: Update.
1924         * gnulib/import/m4/pathmax.m4: Update.
1925         * gnulib/import/m4/rawmemchr.m4: Update.
1926         * gnulib/import/m4/readdir.m4: Update.
1927         * gnulib/import/m4/readlink.m4: Update.
1928         * gnulib/import/m4/realloc.m4: Update.
1929         * gnulib/import/m4/rename.m4: Update.
1930         * gnulib/import/m4/rewinddir.m4: Update.
1931         * gnulib/import/m4/rmdir.m4: Update.
1932         * gnulib/import/m4/save-cwd.m4: Update.
1933         * gnulib/import/m4/secure_getenv.m4: Update.
1934         * gnulib/import/m4/setenv.m4: Update.
1935         * gnulib/import/m4/signal_h.m4: Update.
1936         * gnulib/import/m4/ssize_t.m4: Update.
1937         * gnulib/import/m4/stat-time.m4: Update.
1938         * gnulib/import/m4/stat.m4: Update.
1939         * gnulib/import/m4/std-gnu11.m4: Update.
1940         * gnulib/import/m4/stdbool.m4: Update.
1941         * gnulib/import/m4/stddef_h.m4: Update.
1942         * gnulib/import/m4/stdint.m4: Update.
1943         * gnulib/import/m4/stdio_h.m4: Update.
1944         * gnulib/import/m4/stdlib_h.m4: Update.
1945         * gnulib/import/m4/strchrnul.m4: Update.
1946         * gnulib/import/m4/strdup.m4: Update.
1947         * gnulib/import/m4/strerror.m4: Update.
1948         * gnulib/import/m4/string_h.m4: Update.
1949         * gnulib/import/m4/strstr.m4: Update.
1950         * gnulib/import/m4/strtok_r.m4: Update.
1951         * gnulib/import/m4/sys_socket_h.m4: Update.
1952         * gnulib/import/m4/sys_stat_h.m4: Update.
1953         * gnulib/import/m4/sys_time_h.m4: Update.
1954         * gnulib/import/m4/sys_types_h.m4: Update.
1955         * gnulib/import/m4/tempname.m4: Update.
1956         * gnulib/import/m4/time_h.m4: Update.
1957         * gnulib/import/m4/unistd-safer.m4: Update.
1958         * gnulib/import/m4/unistd_h.m4: Update.
1959         * gnulib/import/m4/warn-on-use.m4: Update.
1960         * gnulib/import/m4/wchar_h.m4: Update.
1961         * gnulib/import/m4/wchar_t.m4: Update.
1962         * gnulib/import/m4/wctype_h.m4: Update.
1963         * gnulib/import/m4/wint_t.m4: Update.
1964         * gnulib/import/malloc.c: Update.
1965         * gnulib/import/malloc/scratch_buffer.h: Update.
1966         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1967         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1968         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1969         * gnulib/import/malloca.c: Update.
1970         * gnulib/import/malloca.h: Update.
1971         * gnulib/import/malloca.valgrind: Update.
1972         * gnulib/import/math.in.h: Update.
1973         * gnulib/import/mbrtowc.c: Update.
1974         * gnulib/import/mbsinit.c: Update.
1975         * gnulib/import/mbsrtowcs-impl.h: Update.
1976         * gnulib/import/mbsrtowcs-state.c: Update.
1977         * gnulib/import/mbsrtowcs.c: Update.
1978         * gnulib/import/memchr.c: Update.
1979         * gnulib/import/memmem.c: Update.
1980         * gnulib/import/mempcpy.c: Update.
1981         * gnulib/import/memrchr.c: Update.
1982         * gnulib/import/mkdir.c: Update.
1983         * gnulib/import/mkstemp.c: Update.
1984         * gnulib/import/msvc-inval.c: Update.
1985         * gnulib/import/msvc-inval.h: Update.
1986         * gnulib/import/msvc-nothrow.c: Update.
1987         * gnulib/import/msvc-nothrow.h: Update.
1988         * gnulib/import/open.c: Update.
1989         * gnulib/import/openat-die.c: Update.
1990         * gnulib/import/openat-priv.h: Update.
1991         * gnulib/import/openat-proc.c: Update.
1992         * gnulib/import/openat.c: Update.
1993         * gnulib/import/openat.h: Update.
1994         * gnulib/import/opendir.c: Update.
1995         * gnulib/import/pathmax.h: Update.
1996         * gnulib/import/pipe-safer.c: Update.
1997         * gnulib/import/rawmemchr.c: Update.
1998         * gnulib/import/readdir.c: Update.
1999         * gnulib/import/readlink.c: Update.
2000         * gnulib/import/realloc.c: Update.
2001         * gnulib/import/ref-add.sin: Update.
2002         * gnulib/import/ref-del.sin: Update.
2003         * gnulib/import/rename.c: Update.
2004         * gnulib/import/rewinddir.c: Update.
2005         * gnulib/import/rmdir.c: Update.
2006         * gnulib/import/same-inode.h: Update.
2007         * gnulib/import/save-cwd.c: Update.
2008         * gnulib/import/save-cwd.h: Update.
2009         * gnulib/import/scratch_buffer.h: Update.
2010         * gnulib/import/secure_getenv.c: Update.
2011         * gnulib/import/setenv.c: Update.
2012         * gnulib/import/signal.in.h: Update.
2013         * gnulib/import/stat-time.c: Update.
2014         * gnulib/import/stat-time.h: Update.
2015         * gnulib/import/stat-w32.c: Update.
2016         * gnulib/import/stat-w32.h: Update.
2017         * gnulib/import/stat.c: Update.
2018         * gnulib/import/stdbool.in.h: Update.
2019         * gnulib/import/stddef.in.h: Update.
2020         * gnulib/import/stdint.in.h: Update.
2021         * gnulib/import/stdio.in.h: Update.
2022         * gnulib/import/stdlib.in.h: Update.
2023         * gnulib/import/str-two-way.h: Update.
2024         * gnulib/import/strchrnul.c: Update.
2025         * gnulib/import/strdup.c: Update.
2026         * gnulib/import/streq.h: Update.
2027         * gnulib/import/strerror-override.c: Update.
2028         * gnulib/import/strerror-override.h: Update.
2029         * gnulib/import/strerror.c: Update.
2030         * gnulib/import/string.in.h: Update.
2031         * gnulib/import/stripslash.c: Update.
2032         * gnulib/import/strnlen1.c: Update.
2033         * gnulib/import/strnlen1.h: Update.
2034         * gnulib/import/strstr.c: Update.
2035         * gnulib/import/strtok_r.c: Update.
2036         * gnulib/import/sys_stat.in.h: Update.
2037         * gnulib/import/sys_time.in.h: Update.
2038         * gnulib/import/sys_types.in.h: Update.
2039         * gnulib/import/tempname.c: Update.
2040         * gnulib/import/tempname.h: Update.
2041         * gnulib/import/time.in.h: Update.
2042         * gnulib/import/unistd--.h: Update.
2043         * gnulib/import/unistd-safer.h: Update.
2044         * gnulib/import/unistd.in.h: Update.
2045         * gnulib/import/unsetenv.c: Update.
2046         * gnulib/import/verify.h: Update.
2047         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2048         * gnulib/import/wchar.in.h: Update.
2049         * gnulib/import/wctype.in.h: Update.
2050         * gnulib/import/xalloc-oversized.h: Update.
2051         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2052         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2053
2054 2018-08-16  Gary Benson <gbenson@redhat.com>
2055
2056         PR gdb/13000:
2057         * gdb/main.c (captured_main_1): Exit with nonzero status
2058         in batch mode if the last command to be executed failed.
2059         * NEWS: Mention the above.
2060
2061 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
2062
2063         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2064         end of warning message.
2065
2066 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2067
2068         PR gdb/22943:
2069         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2070         (aarch64_extract_return_value): Use
2071         aapcs_is_vfp_call_or_return_candidate.
2072         (aarch64_return_in_memory): Likewise.
2073         (aarch64_store_return_value): Likewise.
2074
2075 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2076
2077         * aarch64-tdep.c
2078         (aapcs_is_vfp_call_or_return_candidate): Make static
2079         (pass_in_v_or_stack): Remove function.
2080         (pass_in_v_vfp_candidate): New function.
2081         (aarch64_push_dummy_call): Check for float register candidates.
2082
2083 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2084
2085         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2086         (aapcs_is_vfp_call_or_return_candidate_1): New function.
2087         (aapcs_is_vfp_call_or_return_candidate): Likewise.
2088
2089 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
2090
2091         PR build/23399
2092         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2093         (struct ipa_sym_addresses): Rename to...
2094         (struct ipa_sym_addresses_common): ... this.
2095         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2096
2097 2018-08-28  Tom Tromey  <tom@tromey.com>
2098
2099         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2100         (token_fifo): Now a std::vector.
2101         (yylex, c_parse): Update.
2102         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2103         (token_fifo): Now a std::vector.
2104         (yylex, d_parse): Update.
2105         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2106         (token_fifo): Now a std::vector.
2107         (yylex, go_parse): Update.
2108
2109 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
2110
2111         * parser-defs.h (struct type_stack) <elements>: Change type to
2112         std::vector<union type_stack_elt>.
2113         <depth, size>: Remove.
2114         * parse.c (parse_exp_in_context_1): Adjust.
2115         (type_stack_reserve): Remove.
2116         (check_type_stack_depth): Remove.
2117         (insert_into_type_stack): Adjust to std::vector.
2118         (insert_type): Likewise.
2119         (push_type): Likewise.
2120         (push_type_int): Likewise.
2121         (insert_type_address_space): Likewise.
2122         (pop_type): Likewise.
2123         (pop_type_int): Likewise.
2124         (pop_typelist): Likewise.
2125         (pop_type_stack): Likewise.
2126         (append_type_stack): Likewise.
2127         (push_type_stack): Likewise.
2128         (get_type_stack): Likewise.
2129         (type_stack_cleanup): Likewise.
2130         (push_typelist): Likewise.
2131         (follow_types): Likewise.
2132         (_initialize_parse): Likewise.
2133
2134 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2135
2136         * NEWS: Mention csky target.
2137
2138 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
2139             Hafiz Abid Qadeer  <abidh@codesourcery.com>
2140             Don Breazeal  <donb@codesourcery.com>
2141
2142         * csky-linux-tdep.c: New file.
2143         * csky-tdep.c: Likewise.
2144         * csky-tdep.h: Likewise.
2145         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2146         csky-tdep.o.
2147         (HFILES_NO_SRCDIR): Add csky-tdep.h.
2148         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2149         * configure.tgt: Add csky support.
2150
2151 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
2152
2153         * python/py-framefilter.c (py_print_frame): Print frame architecture
2154         when printing on an MI output.
2155
2156 2018-08-27  Tom Tromey  <tom@tromey.com>
2157
2158         PR build/23087:
2159         * configure: Rebuild.
2160         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2161
2162 2018-08-27  Tom Tromey  <tom@tromey.com>
2163
2164         * aarch64-linux-tdep.c
2165         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2166         casts to int.
2167
2168 2018-08-27  Tom Tromey  <tom@tromey.com>
2169
2170         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2171         unsigned.
2172         (ppc64_standard_linkage1, ppc64_standard_linkage2)
2173         (ppc64_standard_linkage3, ppc64_standard_linkage4)
2174         (ppc64_standard_linkage5, ppc64_standard_linkage6)
2175         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2176         unsigned.
2177
2178 2018-08-27  Tom Tromey  <tom@tromey.com>
2179
2180         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2181         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2182
2183 2018-08-27  Tom Tromey  <tom@tromey.com>
2184
2185         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2186         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2187         ULONGEST_MAX.
2188         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2189         ULONGEST_MAX.
2190         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2191         ULONGEST_MAX.
2192         * sparc-linux-tdep.c (sparc32_linux_sigframe)
2193         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2194         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2195         ULONGEST_MAX.
2196         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2197         (ppc64_linux_sigaction_tramp_frame)
2198         (ppc32_linux_sighandler_tramp_frame)
2199         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2200         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2201         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2202         * mn10300-linux-tdep.c (am33_linux_sigframe)
2203         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2204         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2205         * mips-linux-tdep.c (mips_linux_o32_sigframe)
2206         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2207         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2208         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2209         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2210         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2211         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2212         * microblaze-linux-tdep.c
2213         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2214         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2215         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2216         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2217         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2218         * common/common-types.h (ULONGEST_MAX): New define.
2219         (CORE_ADDR_MAX): Fix formatting.
2220         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2221         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2222         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2223         (arm_linux_rt_sigreturn_tramp_frame)
2224         (arm_eabi_linux_sigreturn_tramp_frame)
2225         (arm_eabi_linux_rt_sigreturn_tramp_frame)
2226         (thumb2_eabi_linux_sigreturn_tramp_frame)
2227         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2228         (arm_linux_restart_syscall_tramp_frame)
2229         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2230         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2231         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2232         ULONGEST_MAX.
2233         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2234
2235 2018-08-27  Tom Tromey  <tom@tromey.com>
2236
2237         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2238         CORE_ADDR_MAX.
2239         * mips-tdep.c (mips_deal_with_atomic_sequence)
2240         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2241         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2242         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2243         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2244         CORE_ADDR_MAX.
2245         * aarch64-tdep.c (aarch64_software_single_step): Use
2246         CORE_ADDR_MAX.
2247
2248 2018-08-27  Tom Tromey  <tom@tromey.com>
2249
2250         * linespec.c (complete_linespec_component): Add cast to "char".
2251         * completer.c (completion_tracker::build_completion_result): Add
2252         cast to "char".
2253
2254 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2255
2256         * solist.h (struct solist, struct target_so_ops): Fix
2257         indentation.
2258
2259 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2260
2261         * ada-tasks.c (ada_task_info_s): Remove typedef.
2262         (DEF_VEC_O(ada_task_info_s)): Remove.
2263         (struct ada_tasks_inferior_data): Initialize fields.
2264         <task_list>: Make an std::vector.
2265         (get_ada_tasks_inferior_data): Allocate with new.
2266         (ada_get_task_number): Adjust.
2267         (get_task_number_from_id): Likewise.
2268         (valid_task_id): Likewise.
2269         (ada_get_task_info_from_ptid): Likewise.
2270         (iterate_over_live_ada_tasks): Likewise.
2271         (add_ada_task): Likewise.
2272         (read_known_tasks): Likewise.
2273         (ada_build_task_list): Likewise.
2274         (print_ada_task_info): Likewise.
2275         (info_task): Likewise.
2276         (task_command_1): Likewise.
2277
2278 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2279
2280         * ada-lang.c (add_angle_brackets): Return std::string.
2281
2282 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
2283
2284         * python/py-threadevent.c (py_get_event_thread): Initialize
2285         pythread.
2286
2287 2018-08-24  Pedro Alves  <palves@redhat.com>
2288
2289         * python/py-bpevent.c (create_breakpoint_event_object): Use
2290         copy-initialization.
2291         * python/py-continueevent.c (emit_continue_event): Use
2292         copy-initialization.
2293         * python/py-exitedevent.c (create_exited_event_object): Return a
2294         gdbpy_ref<>.
2295         (emit_exited_event): Use copy-initialization.
2296         * python/py-inferior.c (python_new_inferior)
2297         (python_inferior_deleted, add_thread_object): Use
2298         copy-initialization.
2299         * python/py-infevents.c (create_inferior_call_event_object)
2300         (create_register_changed_event_object)
2301         (create_memory_changed_event_object): Return a gdbpy_ref<>.
2302         (emit_inferior_call_event, emit_memory_changed_event)
2303         (emit_register_changed_event): Use copy-initialization.
2304         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2305         Return a gdbpy_ref<>.
2306         (emit_new_objfile_event): Use copy-initialization.
2307         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2308         (emit_clear_objfiles_event): Use copy-initialization.
2309         * python/py-signalevent.c (create_signal_event_object): Use
2310         copy-initialization.
2311         * python/py-threadevent.c (create_thread_event_object): Use
2312         copy-initialization.
2313
2314 2018-08-24  Pedro Alves  <palves@redhat.com>
2315             Simon Marchi  <simon.marchi@ericsson.com>
2316
2317         PR gdb/23379
2318         * python/py-continueevent.c: Include "gdbthread.h".
2319         (create_continue_event_object): Add intro comment.  Add 'ptid'
2320         parameter.  Use it to find thread to pass to
2321         create_thread_event_object.
2322         (emit_continue_event): Pass PTID down to
2323         create_continue_event_object.
2324         * python/py-event.h (py_get_event_thread): Declare.
2325         (create_thread_event_object): Remove default from 'thread'
2326         parameter.
2327         * python/py-stopevent.c (create_stop_event_object): Use
2328         py_get_event_thread.
2329         * python/py-threadevent.c (get_event_thread): Rename to ...
2330         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2331         and use it to find the thread.
2332         (create_thread_event_object): Assert that THREAD isn't null.
2333         Don't find the event thread here.
2334
2335 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
2336
2337         * block.h (blockrange, blockranges): New struct declarations.
2338         (struct block): Add new field named `ranges'.
2339         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2340         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2341         macros for accessing ranges in struct block.
2342         (make_blockranges): New declaration.
2343         block.c (make_blockranges): New function.
2344         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2345         for block.
2346         * symtab.h (find_pc_partial_function): Add new parameter `block'.
2347         * blockframe.c (cache_pc_function_block): New static global.
2348         (clear_pc_function_cache): Clear cache_pc_function_block.
2349         (find_pc_partial_function): Move comment to symtab.h.  Add
2350         support for non-contiguous blocks.
2351         * cli/cli-cmds.c (block.h): Include.
2352         (print_disassembly): Handle printing of non-contiguous blocks.
2353         (disassemble_current_function): Likewise.
2354         (disassemble_command): Likewise.
2355
2356         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2357         BLOCK_START.
2358         * blockframe.c (get_pc_function_start): Likewise.
2359         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2360         (gcc_symbol_address): Likewise.
2361         * compile/compile-object-run.c (compile_object_run): Likewise.
2362         * compile/compile.c (get_expr_block_and_pc): Likewise.
2363         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2364         (func_addr_to_tail_call_list): Likewise.
2365         * findvar.c (default_read_var_value): Likewise.
2366         * inline-frame.c (inline_frame_this_id): Likewise.
2367         (skip-inline_frames): Likewise.
2368         * infcmd.c (until_next_command): Likewise.
2369         * linespec.c (convert_linespec_to_sals): Likewise.
2370         * parse.c (parse_exp_in_context_1): Likewise.
2371         * printcmd.c (build_address_symbolic): likewise.
2372         (info_address_command): Likewise.
2373         symtab.c (find_function_start_sal): Likewise.
2374         (skip_prologue_sal): Likewise.
2375         (find_function_alias_target): Likewise.
2376         (find_gnu_ifunc): Likewise.
2377         * stack.c (find_frame_funname): Likewise.
2378         * symtab.c (fixup_symbol_section): Likewise.
2379         (find_function_start_sal): Likewise.
2380         (skip_prologue_sal): Likewsie.
2381         (find_function_alias_target): Likewise.
2382         (find_gnu_ifunc): Likewise.
2383         * tracepoint.c (info_scope_command): Likewise.
2384         * value.c (value_fn_field): Likewise.
2385
2386         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2387         in place of find_pc_partial_function.
2388         * blockframe.c (find_function_entry_range_from_pc): New function.
2389         * symtab.h (find_function_entry_range_from_pc): Declare and document.
2390         * objfiles.c (objfile_relocate1): Relocate start and end addresses
2391         for each range in a block.
2392
2393
2394 2018-08-23  Xavier Roirand  <roirand@adacore.com>
2395
2396         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2397         incrementation.
2398
2399 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2400
2401         * solib-svr4.c (read_program_headers_from_bfd): Return
2402         gdb::optional<gdb::byte_vector>.
2403         (svr4_exec_displacement): Adjust.
2404
2405 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2406
2407         * solib-svr4.c (read_program_header): Return
2408         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2409         (find_program_interpreter): Return
2410         gdb::optional<gdb::byte_vector>.
2411         (scan_dyntag_auxv): Adjust.
2412         (enable_break): Adjust.
2413         (svr4_exec_displacement): Adjust.
2414
2415 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2416
2417         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2418         * inf-child.c (inf_child_target::terminal_save_inferior): New.
2419
2420 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2421
2422         * guile/scm-string.c (gdbscm_scm_from_printf): Use
2423         string_vprintf.
2424         * guile/scm-utils.c (gdbscm_printf): Likewise.
2425         * serial.c (serial_printf): Likewise.
2426         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2427
2428 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
2429
2430         * stack.c (print_frame): Print frame architecture when printing on
2431         an MI output.
2432         * NEWS: Mention new "arch" attribute in frame output.
2433
2434 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2435
2436         * arch/aarch64.h (aarch64_regnum): Update comment.
2437
2438 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2439
2440         * NEWS: Add SVE to 8.2 section.
2441
2442 2018-08-21  Pedro Alves  <palves@redhat.com>
2443
2444         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2445         out from gdbscm_parse_function_args.
2446         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2447         gdbscm_parse_function_args_1.
2448
2449 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
2450
2451         PR gdb/17816
2452         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2453         operator.
2454
2455 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
2456
2457         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2458
2459 2018-08-19  Michael Spang  <spang@google.com>
2460
2461         PR gdb/11786
2462         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2463         for PT_TLS segments.
2464
2465 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
2466
2467         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2468         dwarf_variable_value.
2469         * dwarf2-frame.c (class dwarf_expr_executor):
2470         Add override for dwarf_variable_value.
2471         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2472         (class symbol_needs_eval_context): Likewise.
2473         (indirect_synthetic_pointer): Add forward declaration.
2474         (sect_variable_value): New function.
2475         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2476         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2477         for DW_OP_GNU_variable_value.
2478
2479 2018-08-16  Tom Tromey  <tom@tromey.com>
2480
2481         * top.c (read_command_file): Update.
2482         (command_line_input): Remove "repeat" argument.
2483         * ada-lang.c (get_selections): Update.
2484         * linespec.c (decode_line_2): Update.
2485         * defs.h (command_line_input): Remove argument.
2486         * cli/cli-script.c (read_next_line): Update.
2487         * python/py-gdb-readline.c: Update.
2488
2489 2018-08-17  Tom Tromey  <tom@tromey.com>
2490
2491         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2492         command_line_input.
2493
2494 2018-08-15  Tom Tromey  <tom@tromey.com>
2495
2496         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2497
2498 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
2499
2500         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2501         If used, use find_pc_partial_function to find address range
2502         to disassemble.
2503         * mi/mi-main.c (mi_cmd_list_features): Report
2504         "data-disassemble-a-option" feature.
2505         * NEWS: Mention new -data-disassemble option -a.
2506
2507 2018-08-13  Tom Tromey  <tom@tromey.com>
2508
2509         * common/common-defs.h (_FORTIFY_SOURCE): Define.
2510
2511 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2512
2513         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2514         (aarch64_linux_collect_sve_regset): Likewise.
2515         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2516         * regcache.h (regcache_map_entry_size): New function.
2517
2518 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2519
2520         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2521         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2522         (SVE_HEADER_VL_LENGTH): Likewise.
2523         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2524         (SVE_HEADER_FLAGS_LENGTH): Likewise.
2525         (SVE_HEADER_RESERVED_LENGTH): Likewise.
2526         (SVE_HEADER_SIZE_OFFSET): Likewise.
2527         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2528         (SVE_HEADER_VL_OFFSET): Likewise.
2529         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2530         (SVE_HEADER_FLAGS_OFFSET): Likewise.
2531         (SVE_HEADER_RESERVED_OFFSET): Likewise.
2532         (SVE_HEADER_SIZE): Likewise.
2533         (aarch64_linux_core_read_vq): Add function.
2534         (aarch64_linux_core_read_description): Check for SVE section.
2535
2536 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2537
2538         * aarch64-fbsd-tdep.c
2539         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2540         collect_size.
2541         * aarch64-linux-tdep.c
2542         (aarch64_linux_iterate_over_regset_sections): Likewise.
2543         * alpha-linux-tdep.c
2544         (alpha_linux_iterate_over_regset_sections):
2545         * alpha-nbsd-tdep.c
2546         (alphanbsd_iterate_over_regset_sections): Likewise.
2547         * amd64-fbsd-tdep.c
2548         (amd64fbsd_iterate_over_regset_sections): Likewise.
2549         * amd64-linux-tdep.c
2550         (amd64_linux_iterate_over_regset_sections): Likewise.
2551         * arm-bsd-tdep.c
2552         (armbsd_iterate_over_regset_sections): Likewise.
2553         * arm-fbsd-tdep.c
2554         (arm_fbsd_iterate_over_regset_sections): Likewise.
2555         * arm-linux-tdep.c
2556         (arm_linux_iterate_over_regset_sections): Likewise.
2557         * corelow.c (get_core_registers_cb): Likewise.
2558         (core_target::fetch_registers): Likewise.
2559         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2560         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2561         * gdbarch.h (void): Regenerate.
2562         * gdbarch.sh: Add supply_size and collect_size.
2563         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2564         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2565         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2566         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2567         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2568         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2569         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2570         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2571         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2572         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2573         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2574         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2575         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2576         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2577         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2578         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2579         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2580         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2581         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2582         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2583         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2584         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2585         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2586         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2587         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2588         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2589         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2590         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2591         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2592         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2593
2594 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
2595
2596         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2597         with string_printf.
2598
2599 2018-08-10  Keith Seitz  <keiths@redhat.com>
2600
2601         * compile/compile-c-support.c (add_code_header, add_code_footer):
2602         Move into policy class.
2603         (c_push_user_expression, pop_user_expression_nop)
2604         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2605         (compile_program): New host class.
2606         (c_compile_program): New typedef.
2607         (c_compute_porgram): Use c_compile_program.
2608
2609 2018-08-10  Keith Seitz  <keiths@redhat.com>
2610
2611         * compile/compile-internal.h (compile_instance::~compile_instance):
2612         Remove calls to htab_delete.
2613         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2614         * compile.c (compile_instance::compile_instance): Initialize
2615         htab unique pointers.
2616         (compile_instance::get_cached_type, compile_instance::insert_type)
2617         (compile_instance::error_symbol_once): Update for unique_ptr.
2618
2619 2018-08-10  Keith Seitz  <keiths@redhat.com>
2620
2621         * compile/compile-c-symbols.c (struct symbol_error)
2622         (hash_symbol_error, eq_symbol_error, del_symbol_error)
2623         (compile_instance::insert_symbol_error)
2624         (compile_instance::error_symbol_once): Move to ...
2625         * compile/compile.c: ... here.
2626
2627 2018-08-10  Keith Seitz  <keiths@redhat.com>
2628
2629         * compile/compile-c-support.c (c_get_compile_context): Use `new'
2630         instead of `new_compile_instance'.
2631         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2632         Update description.
2633         If the symbol error map is not initialized, create it.
2634         (generate_c_for_for_one_symbol): Do not check/initialize
2635         the symbol error map.
2636         * compile/compile-c-types.c (compile_c_instance): Make a class.
2637         Update all callers.
2638         (compile_instance::compile_instance): Initialize the type cache.
2639         (get_cached_type): New function.
2640         (insert_type): Update description.
2641         (compile_c_instance::m_default_cflags): Define.
2642         (convert_type): Update description.  Use get_cached_type.
2643         (delete_instance): Moved to destructor.
2644         (new_compile_instance): Moved to constructor.
2645         * compile/compile-c.h (compile_c_instance): Make class inheriting
2646         from compile_instance.
2647         <base>: Remove field.
2648         <type_map, symbol_err_map>: Move to base class.
2649         <c_plugin>: Rename to `m_plugin' and remove pointer type.
2650         * compile/compile-internal.h (compile_instance): Make class.
2651         <type_map_t, symbol_err_map_t>: Define.
2652         <fe>: Rename to `m_gcc_fe'.
2653         <scope, block, gcc_target_options>: Add `m_' prefix.
2654         <m_type_map, m_symbol_err_map>: New fields, moved from
2655         compile_c_instance.
2656         <destroy>: Remove.
2657         (convert_type, new_compile_instance): Remove.
2658         * compile/compile.c (cleanup_compile_instance): Remove.
2659         (compile_to_object): Use unique_ptr to eliminate cleanups.
2660         (compile_instance::set_print_callback, compile_instance::version)
2661         (compile_instance::set_verbose)
2662         (compile_instance::set_driver_filename)
2663         (compile_instance::set_triplet_regexp)
2664         (compile_instance::set_arguments)
2665         (compile_instance::set_source_file)
2666         (compile_instance::compile): Define.
2667
2668 2018-08-10  Keith Seitz  <keiths@redhat.com>
2669
2670         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2671         * compile/compile-c-types.c: Define GCC_METHODN macros and include
2672         gcc-c-fe.def to define C plugin.
2673         (delete_instance): Delete `c_plugin'.
2674         (new_compile_instance): Initialize `c_plugin'.
2675         * compile/compile-c.h: Include gcc_c_plugin.h.
2676         (struct compile_c_instance) <c_plugin>: New member.
2677         * gcc-c-plugin.h: New file.
2678         Update all callers with API change.
2679
2680 2018-08-10  Keith Seitz  <keiths@redhat.com>
2681
2682         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2683         (HFILES_NO_SRCDIR): ... to here.
2684         Add compile-internal.h and compile-c.h.
2685         * compile/compile-c-support.c: Include compile-c.h.
2686         * compile/compile-c-symbols.c: Include compile-c.h.
2687         (generate_c_for_variable_locations): Update comment.
2688         * compile/compile-c-types.c: Include compile-c.h.
2689         * compile/compile-c.h: New file -- moved C language declarations
2690         from other files here.
2691         * compile/compile-internal.h: Do not include hashtab.h or
2692         common/enum-flags.h.
2693         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2694         (gcc_convert_symbol, gcc_symbol_address)
2695         (generate_c_for_variable_locations, c_get_mode_for_size)
2696         (c_get_range_decl_name): Definitions moved to compile-c.h.
2697         * compile/compile-loc2c.c: Include compile-c.h.
2698
2699 2018-08-10  Keith Seitz  <keiths@redhat.com>
2700
2701         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2702         (c_symbol_substitution_name): ... this.
2703         Update all callers.
2704
2705 2018-08-10  Keith Seitz  <keiths@redhat.com>
2706
2707         * compile/compile-c-support.c (c_compute_program): Use
2708         unique_xmalloc_ptr to eliminate cleanup.
2709         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2710         Return a unique_xmalloc_ptr and eliminate cleanup.
2711         * compile/compile-internal.h (generate_c_for_variable_locations):
2712         Return unique_xmalloc_ptr and update description.
2713
2714 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
2715
2716         * corelow.c (core_target::get_core_register_section): Rename
2717         min_size to section_min_size.
2718
2719 2018-08-09  Jim Wilson  <jimw@sifive.com>
2720
2721         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2722         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2723         * NEWS: Mention new GNU/Linux RISC-V target.
2724         * configure.host: Add riscv*-*-linux*.
2725         * configure.nat: Add riscv*.
2726         * configure.tgt: Add riscv*-*-linux*.
2727         * riscv-linux-nat.c: New file.
2728         * riscv-linux-tdep.c: New file.
2729
2730 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2731
2732         * infrun.c (resume): Make static, add forward declaration.
2733         (proceed): Update header comment.
2734         * infrun.h (resume): Delete declaration.
2735
2736 2018-08-09  Tom Tromey  <tom@tromey.com>
2737
2738         * riscv-tdep.h: Minor formatting fixes.
2739
2740 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
2741
2742         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2743         * dwarf-index-cache.c (create_dir_and_check): Likewise.
2744         (test_mkdir_recursive): Likewise.
2745         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2746
2747 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2748
2749         * valarith.c (value_subscripted_rvalue): If an array is not in
2750         memory, and we don't know the upper bound, then we can't know that
2751         the requested element exists or not.
2752
2753 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
2754
2755         * target.c (str_comma_list_concat_elem): Fix typo in comment.
2756         (target_options_to_string): Add comment.
2757
2758 2018-08-08  Tom Tromey  <tom@tromey.com>
2759
2760         * unittests/scoped_mmap-selftests.c: Check result of "write".
2761
2762 2018-08-08  Jim Wilson  <jimw@sifive.com>
2763
2764         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2765         (decode_register_index_short): New.
2766         (decode_j_type_insn, decode_cj_type_insn): New.
2767         (decode_b_type_insn, decode_cb_type_insn): New.
2768         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
2769         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
2770         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2771         is_c_sw_insn instead of is_sw_insn.
2772         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2773         (riscv_software_single_step): New.
2774         * riscv-tdep.h (riscv_software_single_step): Declare.
2775
2776         * riscv-tdep.c (riscv_isa_xlen): Drop static.
2777         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2778
2779 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2780
2781         PR gdb/18050:
2782         * target.c (dispose_inferior): Don't dispose of inferiors that are
2783         already killed.
2784
2785 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2786
2787         * remote.c (remote_target::download_tracepoint): Change char* to
2788         const char*.
2789
2790 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
2791
2792         * target.h (target_options_to_string): Return an std::string.
2793         * target.c (str_comma_list_concat_elem): Return void, use
2794         std::string.
2795         (do_option): Likewise.
2796         (target_options_to_string): Return an std::string.
2797         * linux-nat.c (linux_nat_target::wait): Adjust.
2798         * target-debug.h (target_debug_print_options): Adjust.
2799
2800 2018-08-07  Tom Tromey  <tom@tromey.com>
2801
2802         * Makefile.in (CPPFLAGS): New variable.
2803         (INTERNAL_CPPFLAGS): Use it.
2804
2805 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2806
2807         * NEWS: Mention the index cache.
2808
2809 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2810
2811         * common/pathstuff.h (get_standard_cache_dir): New.
2812         * common/pathstuff.c (get_standard_cache_dir): New.
2813         * build-id.h (build_id_to_string): New.
2814         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2815         DEBUG_STR_SUFFIX): Move to here.
2816         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2817         DEBUG_STR_SUFFIX): Move from there.
2818         (write_psymtabs_to_index): Make non-static, add basename
2819         parameter.  Write to temporary files, rename when done.
2820         (save_gdb_index_command): Adjust call to
2821         write_psymtabs_to_index.
2822         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2823         field.
2824         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2825         (get_gdb_index_contents_from_cache): New.
2826         (get_gdb_index_contents_from_cache_dwz): New.
2827         (dwarf2_initialize_objfile): Read index from cache.
2828         (dwarf2_build_psymtabs): Save to index.
2829         * dwarf-index-cache.h: New file.
2830         * dwarf-index-cache.c: New file.
2831         * dwarf-index-write.h: New file.
2832
2833 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2834
2835         * gnulib/aclocal.m4: Re-generate.
2836         * gnulib/config.in: Re-generate.
2837         * gnulib/configure: Re-generate.
2838         * gnulib/import/Makefile.am: Re-generate.
2839         * gnulib/import/Makefile.in: Re-generate.
2840         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2841         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2842         * gnulib/import/m4/mkdir.m4: New file.
2843         * gnulib/import/mkdir.c: New file.
2844         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2845         module.
2846
2847 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2848
2849         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2850         * common/scoped_mmap.c: New file.
2851         * common/scoped_mmap.h (destroy): New method.
2852         (~scoped_mmap, reset): Use destroy.
2853         (scoped_mmap): New move constructor.
2854         (mmap_file): New declaration.
2855         * unittests/scoped_mmap-selftests.c (test_normal,
2856         test_invalid_filename, run_tests): New functions.
2857         (_initialize_scoped_mmap_selftests): Register selftest.
2858
2859 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2860
2861         * dwarf2read.c (read_gdb_index_from_section): Rename to...
2862         (read_gdb_index_from_buffer): ... this.  Remove section
2863         parameter, add buffer parameter.
2864         (get_gdb_index_contents_ftype,
2865         get_gdb_index_contents_dwz_ftype): New typedefs.
2866         (dwarf2_read_gdb_index): Add callback parameters to get the
2867         index contents.
2868         (get_gdb_index_contents_from_section): New.
2869         (dwarf2_initialize_objfile): Update call to
2870         dwarf2_read_gdb_index.
2871
2872 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2873
2874         * common/filestuff.h (gdb_fopen_cloexec): New overload.
2875         (gdb_open_cloexec): Likewise.
2876         * nat/linux-osdata.c (command_from_pid): Use string_printf.
2877         (commandline_from_pid): Likewise.
2878         (linux_xfer_osdata_threads): Likewise.
2879         (linux_xfer_osdata_fds): Likewise.
2880         * ada-lang.c (is_package_name): Likewise.
2881         * auxv.c (procfs_xfer_auxv): Likewise.
2882         * breakpoint.c (print_one_breakpoint_location): Use
2883         uiout::field_fmt.
2884         (print_one_catch_solib): Use string_printf.
2885         * coff-pe-read.c (add_pe_exported_sym): Likewise.
2886         (add_pe_forwarded_sym): Likewise.
2887         * dwarf2read.c (create_type_unit_group): Likewise.
2888         (build_error_marker_type): Likewise.
2889         * infcall.c (get_function_name): Likewise.
2890         * valprint.c (print_converted_chars_to_obstack): Likewise.
2891         * xtensa-tdep.c (xtensa_register_type): Likewise.
2892
2893 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
2894
2895         * remote.c (remote_target::download_tracepoint): Fix format
2896         string errors.
2897
2898 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2899
2900         * tracefile.c: Include common/byte-vector.h.
2901         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
2902         with trace_regblock_size if needed.  Update uses of buf.
2903
2904 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2905
2906         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2907         std::vector<unsigned char>.
2908         * tracepoint.c (collection_list::collection_list): Remove
2909         m_regs_mask initializer from initializer list.  Resize
2910         m_regs_mask using the largest remote register number.
2911         (collection_list::add_remote_register): Remove size check on
2912         m_regs_mask.  Use at to access element.
2913         (collection_list::stringify): Change type of temp_buf to
2914         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
2915         stringify the register mask.  Use pack_hex_byte for the register
2916         mask.
2917
2918 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2919
2920         * tracepoint.h (class collection_list) <add_register>: Remove.
2921         <add_remote_register, add_ax_registers, add_local_register>:
2922         Declare.
2923         <add_memrange>: Add scope parameter.
2924         * tracepoint.c (encode_actions_1): Likewise.
2925         (collection_list::add_register): Rename to ...
2926         (collection_list::add_remote_register): ... this.  Update
2927         comment.
2928         (collection_list::add_ax_registers, add_local_register): New
2929         methods.
2930         (collection_list::add_memrange): Add scope parameter.  Call
2931         add_local_register instead of add_register.
2932         (finalize_tracepoint_aexpr): New function.
2933         (collection_list::collect_symbol): Update calls to add_memrange.
2934         Call add_local_register instead of add_register.  Call
2935         add_ax_registers.  Call finalize_tracepoint_aexpr.
2936         (encode_actions_1): Get remote regnos for $reg action.  Call
2937         add_remote_register, add_ax_registers, and add_local_register.
2938         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
2939         (validate_actionline): Call finalize_tracepoint_aexpr.
2940
2941 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2942
2943         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2944         Replace array buf with gdb::char_vector buf, of size
2945         get_remote_packet_size ().  Replace references to buf and
2946         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
2947         and xsnprintf with snprintf.  Raise errors if the buffer is too
2948         small.
2949
2950 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2951
2952         * remote.c (remote_target::download_tracepoint): Fix the has_more
2953         predicate in the QTDP action list iteration.
2954
2955 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2956
2957         * remote.c (remote_target::download_tracepoint): Fix indentation
2958         in for block.
2959
2960 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2961
2962         * proc-api.c (_initialize_proc_api): Remove c, unused.
2963         * procfs.c (procfs_init_inferior): Remove signals, unused.
2964         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2965         unused.
2966
2967 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
2968             Andrew Burgess  <andrew.burgess@embecosm.com>
2969
2970         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2971         'W_STOPCODE (0)' as this could be ambiguous.
2972
2973 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2974
2975         * ser-tcp.c (net_open): Fix thinko when deciding whether to
2976         disable TCP's Nagle algorithm (use "ai_protocol" instead of
2977         "ai_socktype").
2978
2979 2018-08-02  Tom Tromey  <tom@tromey.com>
2980
2981         PR symtab/16842.
2982         * dwarf2read.c (read_func_scope): Set symtab on template parameter
2983         symbols.
2984         (process_structure_scope): Likewise.
2985
2986 2018-08-02  Xavier Roirand  <roirand@adacore.com>
2987
2988         PR gdb/22629:
2989         * darwin-nat.c (darwin_kill_inferior): Fix handling of
2990         kill inferior.
2991
2992 2018-08-02  Tom Tromey  <tom@tromey.com>
2993
2994         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2995         (darwin_suspend_inferior, darwin_resume_inferior)
2996         (darwin_decode_notify_message, darwin_resume_inferior_threads)
2997         (darwin_check_new_threads): Check result of get_darwin_inferior.
2998
2999 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
3000
3001         GDB 8.1.1 released.
3002
3003 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
3004
3005         * varobj.c (varobj_get_path_expr_parent): Report an error if
3006         parent is a dynamic varobj.
3007
3008 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3009
3010         * gnulib/aclocal.m4: Re-generate.
3011         * gnulib/config.in: Re-generate.
3012         * gnulib/configure: Re-generate.
3013         * gnulib/import/Makefile.in: Re-generate.
3014         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3015         * gnulib/import/m4/onceonly.m4: Re-generate.
3016
3017 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3018
3019         * target-descriptions.c (struct xml_test_tdesc): New.
3020         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3021         (record_xml_tdesc): Update.
3022         (maintenance_check_xml_descriptions): Update.
3023         * target-descriptions.h (record_xml_tdesc): Update comment.
3024
3025 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3026
3027         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3028         checking array bounds are defined.
3029
3030 2018-07-30  Tom Tromey  <tom@tromey.com>
3031
3032         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3033         irreflexivity violation.
3034
3035 2018-07-30  Tom Tromey  <tom@tromey.com>
3036
3037         * cli/cli-decode.c (lookup_cmd): Remove lint code.
3038         * value.c (unpack_long): Remove lint code.
3039         * valops.c (value_ind): Remove lint code.
3040         * valarith.c (value_x_binop, value_x_unop, value_equal)
3041         (value_pos): Remove lint code.
3042
3043 2018-07-28  Tom de Vries  <tdevries@suse.de>
3044
3045         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3046         with undefined upper bound as <optimized out>.
3047
3048 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
3049
3050         * gcore.in: Rename variable "name" to "prefix".  Expand
3051         "usage" text.
3052
3053 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
3054
3055         * windows-nat.c (windows_nat_target::create_inferior): Update to
3056         call close() in global namespace.
3057
3058 2018-07-26  Tom Tromey  <tom@tromey.com>
3059
3060         * dwarf-index-write.c (add_address_entry): Don't add objfile
3061         offsets.
3062         * dbxread.c (find_stab_function): Rename from
3063         find_stab_function_addr.  Return a bound_minimal_symbol.
3064         (read_dbx_symtab): Use raw_text_low, raw_text_high.
3065         Don't add objfile offsets.
3066         (end_psymtab): Use raw_text_low, raw_text_high,
3067         MSYMBOL_VALUE_RAW_ADDRESS.
3068         (read_ofile_symtab): Update.
3069         (process_one_symbol): Update.
3070         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3071         offsets.
3072         (dw2_relocate): Remove.
3073         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3074         searching addrmap.
3075         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3076         Update.
3077         (process_psymtab_comp_unit_reader, add_partial_symbol)
3078         (add_partial_subprogram, dwarf2_ranges_read): Update.
3079         (load_partial_dies): Update.
3080         (add_address_entry): Don't add objfile offsets.
3081         (dwarf2_build_include_psymtabs): Update.
3082         (create_addrmap_from_aranges): Don't add objfile offsets.
3083         (dw2_find_pc_sect_compunit_symtab): Update.
3084         * mdebugread.c (parse_symbol): Don't add objfile offsets.
3085         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3086         Update.
3087         (parse_partial_symbols): Don't add objfile offsets.  Use
3088         raw_text_low, raw_text_high.  Update.
3089         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3090         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3091         or call 'relocate' quick function.  Clear psymbol_map.
3092         * psympriv.h (struct partial_symbol) <address>: Add section
3093         offset.
3094         <set_unrelocated_address>: Rename from set_address.
3095         <raw_text_low, raw_text_high>: New methods.
3096         <text_low, text_high>: Add objfile parameter.
3097         (add_psymbol_to_bcache): Add 'section' parameter.  Call
3098         set_unrelocated_address.
3099         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3100         (find_pc_psymbol): Update.
3101         (fixup_psymbol_section, relocate_psymtabs): Remove.
3102         (dump_psymtab, psym_functions): Update.
3103         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3104         parameter.
3105         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3106         (start_psymtab_common): Update.
3107         * symfile-debug.c (debug_qf_relocate): Remove.
3108         (debug_sym_quick_functions): Update.
3109         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3110         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3111         Update.
3112
3113 2018-07-26  Tom Tromey  <tromey@redhat.com>
3114
3115         * dbxread.c (end_psymtab): Use text_high_valid and
3116         text_low_valid.
3117         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3118         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3119         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3120         Update comment.
3121         <text_low_valid, text_high_valid>: New fields.
3122         <set_text_low, set_text_high>: Update.
3123         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3124
3125 2018-07-26  Tom Tromey  <tom@tromey.com>
3126
3127         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3128         Update.
3129         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3130         textlow and texthigh fields.
3131         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3132         Update.
3133         * mdebugread.c (parse_lines, parse_partial_symbols)
3134         (psymtab_to_symtab_1): Update.
3135         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3136         Rename fields.  Update comment.  Now private.
3137         <text_low, text_high, set_text_low, set_text_high>: New methods.
3138         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3139         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3140         (start_psymtab_common, maintenance_info_psymtabs)
3141         (maintenance_check_psymtabs): Update.
3142         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3143         texthigh fields.
3144         (scan_xcoff_symtab): Update.
3145
3146 2018-07-26  Tom Tromey  <tromey@redhat.com>
3147
3148         * psympriv.h (struct partial_symbol) <unrelocated_address,
3149         address, set_address>: New methods.
3150         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3151         (fixup_psymbol_section, relocate_psymtabs): Update.
3152         (print_partial_symbols): Add 'objfile' parameter.  Update.
3153         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3154         Update.
3155
3156 2018-07-26  Tom Tromey  <tom@tromey.com>
3157
3158         * dwarf-index-write.c (write_psymbols, debug_names::insert)
3159         (debug_names::write_psymbols): Update.
3160         * psympriv.h (struct partial_symbol): Derive from
3161         general_symbol_info.
3162         <obj_section>: New method.
3163         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3164         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3165         (find_pc_sect_psymbol, fixup_psymbol_section)
3166         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3167         (print_partial_symbols, recursively_search_psymtabs)
3168         (compare_psymbols, psymbol_hash, psymbol_compare)
3169         (add_psymbol_to_bcache, maintenance_check_psymtabs)
3170         (psymbol_name_matches, psym_fill_psymbol_map): Update.
3171
3172 2018-07-26  Tom Tromey  <tromey@redhat.com>
3173
3174         * dbxread.c (end_psymtab): Remove dead code.
3175
3176 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
3177
3178         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3179         DWARF unwinders are disabled.
3180         * dwarf2-frame.c: Add dwarf2read.h include.
3181         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3182         disabled.
3183         (dwarf2_frame_unwinders_enabled_p): Define.
3184         (show_dwarf_unwinders_enabled_p): New function.
3185         (_initialize_dwarf2_frame): Register switch to control DWARF
3186         unwinder use.
3187         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3188         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3189         (show_dwarf_cmdlist): Remove static keyword.
3190         * dwarf2read.h (set_dwarf_cmdlist): Declare.
3191         (show_dwarf_cmdlist): Declare.
3192         * NEWS: Document new feature.
3193
3194 2018-07-26  Tom de Vries  <tdevries@suse.de>
3195
3196         PR breakpoints/23366
3197         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3198
3199 2018-07-26  Tom de Vries  <tdevries@suse.de>
3200
3201         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3202         DW_AT_count can't be translated to a dynamic prop.
3203
3204 2018-07-25  Tom de Vries  <tdevries@suse.de>
3205
3206         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3207         try/catch.
3208
3209 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
3210
3211         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3212
3213 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
3214
3215         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3216
3217 2018-07-24  Keith Seitz  <keiths@redhat.comt
3218
3219         PR symtab/23010
3220         * dwarf2read.c (dw2_add_symbol_to_list): New function.
3221         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3222         instead of add_symbol_to_list.
3223         (read_file_scope): Call prepare_one_comp_unit before reading
3224         any other DIEs.
3225
3226 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
3227
3228         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3229
3230 2018-07-24  Tom Tromey  <tom@tromey.com>
3231
3232         * utils.c (malloc, realloc, free): Don't declare.
3233         * configure, config.in: Rebuild.
3234         * configure.ac: Don't check for declarations of free, malloc, or
3235         realloc.
3236
3237 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3238
3239         * aarch64-linux-nat.c
3240         (aarch64_linux_nat_target::stopped_data_address): Remove unused
3241         variable.
3242         * arm-linux-nat.c (fetch_regs): Likewise.
3243         (store_regs): Likewise.
3244         (fetch_vfp_regs): Likewise.
3245         (store_vfp_regs): Likewise.
3246         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3247         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3248         (arm_linux_nat_target::insert_watchpoint): Likewise.
3249         (arm_linux_nat_target::remove_watchpoint): Likewise.
3250         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3251         Likewise.
3252         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3253         Likewise.
3254         * ppc-linux-nat.c (fetch_register): Likewise.
3255         (fetch_all_gp_regs): Likewise.
3256         (fetch_ppc_registers): Likewise.
3257         (store_all_gp_regs): Likewise.
3258         (store_ppc_registers): Likewise.
3259         (hwdebug_insert_point): Likewise.
3260         (can_use_watchpoint_cond_accel): Likewise.
3261         * remote-sim.c (gdb_os_write_stdout): Likewise.
3262
3263 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3264             Tom Tromey  <tom@tromey.com>
3265
3266         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3267         test for it.
3268         * configure: Rebuild.
3269
3270 2018-07-22  Tom Tromey  <tom@tromey.com>
3271
3272         * regformats/regdat.sh: Define xmltarget_${name} inside
3273         #ifndef IN_PROCESS_AGENT.
3274
3275 2018-07-22  Tom Tromey  <tom@tromey.com>
3276
3277         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3278
3279 2018-07-22  Tom Tromey  <tom@tromey.com>
3280
3281         * symfile.c (reread_symbols): Notify iter, not objfile.
3282
3283 2018-07-22  Tom Tromey  <tom@tromey.com>
3284
3285         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3286         Use arch_ops.
3287         (ravenscar_thread_target::prepare_to_store): Likewise.
3288
3289 2018-07-22  Tom Tromey  <tom@tromey.com>
3290
3291         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3292         unused variable.  Call value_fetch_lazy when needed.
3293         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3294         Remove unused variable.  Call value_fetch_lazy when needed.
3295
3296 2018-07-22  Tom Tromey  <tom@tromey.com>
3297
3298         * m32c-tdep.c (mark_dma): Return void.
3299         (make_regs): Remove unused declarations.
3300
3301 2018-07-22  Tom Tromey  <tom@tromey.com>
3302
3303         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3304         cmdscm_get_valid_command_smob_arg_unsafe for effect.
3305         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3306         bkscm_get_valid_block_smob_arg_unsafe for effect.
3307
3308 2018-07-22  Tom Tromey  <tom@tromey.com>
3309
3310         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3311         value_type.
3312
3313 2018-07-22  Tom Tromey  <tom@tromey.com>
3314
3315         * windows-nat.c (saved_context): Conditionally define.
3316         * remote.c (remote_target::remote_btrace_maybe_reopen):
3317         Conditionally declare "warned".
3318         * inflow.c (sigquit_ours): Conditionally define.
3319         (new_tty): Move "tty" declaration inside #if.
3320         * guile/guile.c (guile_datadir): Conditionally define.
3321         * charset.c (set_be_le_names): Move some declarations inside #if.
3322         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3323         #if.
3324         (parse_xml_btrace_conf): Likewise.
3325
3326 2018-07-22  Tom Tromey  <tom@tromey.com>
3327
3328         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3329
3330 2018-07-22  Tom Tromey  <tom@tromey.com>
3331
3332         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3333         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3334         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3335         * buildsym-legacy.c (get_macro_table): Remove unused variable.
3336         * stack.c (frame_apply_level_command): Remove unused variable.
3337         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3338         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3339         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3340         unused variable.
3341         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3342         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3343         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3344         variable.
3345         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3346         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3347         variable.
3348         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3349         Remove unused variable.
3350         * cli/cli-script.c (recurse_read_control_structure): Remove unused
3351         variable.
3352         * common/tdesc.c (print_xml_feature::visit): Remove unused
3353         variable.
3354         * compile/compile-object-load.c (store_regs): Remove unused
3355         variables.
3356         * complaints.c (clear_complaints): Remove unused variable.
3357         * corelow.c (core_target_open): Remove unused variable.
3358         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3359         variable.
3360         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3361         variable.
3362         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3363         variable.
3364         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3365         variable.
3366         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3367         variable.
3368         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3369         variable.
3370         * ia64-tdep.c (examine_prologue): Remove unused variable.
3371         * infcall.c (run_inferior_call): Remove unused variable.
3372         * inferior.c (exit_inferior): Remove unused variable.
3373         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3374         * linespec.c (decode_line_2): Remove unused variable.
3375         * linux-nat.c (super_close): Remove.
3376         * linux-tdep.c (linux_info_proc): Remove unused variable.
3377         * mi/mi-main.c (mi_execute_command): Remove unused variable.
3378         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3379         Remove unused variable.
3380         * parse.c (find_minsym_type_and_address): Remove unused variable.
3381         * printcmd.c (info_symbol_command, printf_floating): Remove unused
3382         variable.
3383         * python/py-breakpoint.c (bppy_set_commands): Remove unused
3384         variable.
3385         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3386         variables.
3387         * record-btrace.c (record_btrace_target::store_registers): Remove
3388         unused variable.
3389         (cmd_show_record_btrace_cpu): Remove unused variable.
3390         * riscv-tdep.c (riscv_register_reggroup_p)
3391         (riscv_push_dummy_call, riscv_return_value): Remove unused
3392         variable.
3393         * rust-exp.y (literal): Remove unused variable.
3394         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3395         unused variable.
3396         <STRUCTOP_ANONYMOUS>: Likewise.
3397         * s390-linux-tdep.c (s390_linux_init_abi_31)
3398         (s390_linux_init_abi_64): Remove unused variable.
3399         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3400         (file_select_thread, net_windows_open, _initialize_ser_windows):
3401         Remove unused variables.
3402         * symtab.c (find_pc_sect_line): Remove unused variable.
3403         * target-memory.c (compute_garbled_blocks): Remove unused
3404         variable.
3405         (target_write_memory_blocks): Remove unused variable.
3406         * target.c (target_stack::unpush): Remove unused variables.
3407         * tracepoint.c (start_tracing, all_tracepoint_actions)
3408         (merge_uploaded_trace_state_variables)
3409         (print_one_static_tracepoint_marker): Remove unused variable.
3410         * unittests/basic_string_view/element_access/char/1.cc (test01):
3411         Remove unused variable.
3412         * windows-nat.c (windows_continue, windows_add_all_dlls)
3413         (do_initial_windows_stuff, windows_nat_target::create_inferior):
3414         Remove unused variables.
3415
3416 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
3417
3418         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3419         attr_profile in HAVE_ELF.
3420         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3421         HAVE_ELF.
3422
3423 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
3424
3425         * frame.c (frame_register_unwind): Change parameter name.
3426         (frame_unwind_register): Likewise.
3427         (frame_unwind_register_value): Likewise.
3428         (frame_unwind_register_signed): Likewise.
3429         (frame_unwind_register_unsigned): Likewise.
3430         * frame.h (frame_register_unwind): Likewise.
3431         (frame_unwind_register): Likewise.
3432         (frame_unwind_register_value): Likewise.
3433         (frame_unwind_register_signed): Likewise.
3434         (frame_unwind_register_unsigned): Likewise.
3435         (frame_unwind_arch): Likewise.
3436
3437 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3438
3439         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3440         ISA maintenance.
3441
3442 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3443
3444         * mips-linux-nat.c (mips_linux_nat_target::read_description):
3445         Call `get_ptrace_pid' rather than extracting the ptrace PID by
3446         hand.
3447
3448 2018-07-20  Keith Seitz  <keiths@redhat.com>
3449
3450         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3451         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3452         m_compunit_symtab, m_language>: Add "m_" prefix.
3453         Update all uses.
3454         * buildsym.c: Update all uses.
3455
3456 2018-07-20  Tom Tromey  <tom@tromey.com>
3457
3458         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3459         * buildsym.h (record_line_ftype): Remove typedef.
3460
3461 2018-07-20  Tom Tromey  <tom@tromey.com>
3462
3463         * buildsym-legacy.h (augment_type_symtab): Don't declare.
3464         (end_expandable_symtab): Likewise.
3465         (end_symtab_get_static_block): Likewise.
3466         (end_symtab_from_static_block): Likewise.
3467         * buildsym-legacy.c (augment_type_symtab): Remove.
3468         (end_expandable_symtab): Remove.
3469         (end_symtab_get_static_block): Remove.
3470         (end_symtab_from_static_block): Remove.
3471
3472 2018-07-20  Tom Tromey  <tom@tromey.com>
3473
3474         * dwarf2read.c: Include buildsym.h.
3475         (struct dwarf2_cu) <builder>: New method.
3476         (fixup_go_packaging): Update.
3477         (process_full_comp_unit, process_full_type_unit): Update.  Don't
3478         use scoped_free_pendings.
3479         (using_directives): Add "cu" parameter, remove "language".
3480         (read_import_statement, setup_type_unit_groups, )
3481         (read_func_scope, read_lexical_block_scope)
3482         (dwarf2_record_block_ranges, read_namespace): Update.
3483         (lnp_state_machine::lnp_state_machine): Add cu parameter.
3484         (lnp_state_machine::handle_end_sequence): Update.
3485         (class lnp_state_machine) <m_cu>: New member.
3486         <m_record_line_callback>: Remove.
3487         <m_currently_recording_lines>: New member.
3488         (lnp_state_machine::handle_set_file): Update.
3489         (noop_record_line): Remove.
3490         (dwarf_record_line_p): Add cu parameter.
3491         (dwarf_record_line_1, dwarf_finish_line): Likewise.
3492         (lnp_state_machine::record_line)
3493         (lnp_state_machine::lnp_state_machine)
3494         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3495         (dwarf_decode_lines): Update.
3496         (dwarf2_start_subfile): Add cu parameter.
3497         (dwarf2_start_symtab, new_symbol): Update.
3498         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3499         Remove dwarf2_per_objfile parameter.
3500         (dwarf_decode_macros): Update.
3501
3502 2018-07-20  Tom Tromey  <tom@tromey.com>
3503
3504         * stabsread.c (define_symbol): Update.
3505         * buildsym-legacy.h (get_buildsym_compunit): Declare.
3506         * dwarf2read.c (new_symbol): Update.
3507         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3508         * cp-namespace.c: Include buildsym.h.
3509         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3510         * buildsym-legacy.c (get_buildsym_compunit): New function.
3511
3512 2018-07-20  Tom Tromey  <tom@tromey.com>
3513
3514         * xcoffread.c: Include buildsym-legacy.h.
3515         * windows-nat.c: Include buildsym-legacy.h.
3516         * stabsread.c: Include buildsym-legacy.h.
3517         * mdebugread.c: Include buildsym-legacy.h.
3518         * buildsym-legacy.h: New file.
3519         * buildsym-legacy.c: New file, from buildsym.c.
3520         * go32-nat.c: Include buildsym-legacy.h.
3521         * dwarf2read.c: Include buildsym-legacy.h.
3522         * dbxread.c: Include buildsym-legacy.h.
3523         * cp-namespace.c: Include buildsym-legacy.h.
3524         * coffread.c: Include buildsym-legacy.h.
3525         * buildsym.h: Move some contents to buildsym-legacy.h.
3526         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
3527         buildsym-legacy.c.
3528         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3529
3530 2018-07-20  Tom Tromey  <tom@tromey.com>
3531
3532         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3533         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3534         (buildsym_compunit::buildsym_compunit)
3535         (buildsym_compunit::~buildsym_compunit)
3536         (buildsym_compunit::get_macro_table): Define.
3537
3538 2018-07-20  Tom Tromey  <tom@tromey.com>
3539
3540         * buildsym.c (reset_symtab_globals): Remove.
3541         (buildsym_compunit::end_symtab_from_static_block): Update.
3542         (buildsym_compunit::augment_type_symtab): Update.
3543         (end_symtab_from_static_block): Call free_buildsym_compunit.
3544         (augment_type_symtab, end_symtab, end_expandable_symtab):
3545         Likewise.
3546
3547 2018-07-20  Tom Tromey  <tom@tromey.com>
3548
3549         * arch-utils.c: Do not include buildsym.h.
3550         * mipsread.c: Do not include buildsym.h.
3551         * machoread.c: Do not include buildsym.h.
3552         * elfread.c: Do not include buildsym.h.
3553
3554 2018-07-20  Tom Tromey  <tom@tromey.com>
3555
3556         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3557         initialization.
3558         (buildsym_compunit): Add new constructor.
3559         (struct buildsym_compunit) <get_last_source_file, finish_block,
3560         record_block_range, start_subfile, patch_subfile_names,
3561         push_subfile, pop_subfile, record_line, get_compunit_symtab,
3562         set_last_source_start_addr, get_last_source_start_addr,
3563         get_local_using_directives, set_local_using_directives,
3564         get_global_using_directives, outermost_context_p,
3565         get_current_context_stack, get_context_stack_depth,
3566         get_current_subfile, get_local_symbols, get_file_symbols,
3567         get_global_symbols, record_debugformat, record_producer,
3568         push_context, pop_context, end_symtab_get_static_block,
3569         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3570         New public methods.
3571         <record_pending_block, finish_block_internal, make_blockvector,
3572         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3573         private methods.
3574         Update all users.
3575
3576 2018-05-22  Tom Tromey  <tom@tromey.com>
3577
3578         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3579         parameter.
3580         (finish_block_internal): Update.
3581
3582 2018-07-20  Tom Tromey  <tom@tromey.com>
3583
3584         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3585         parameter.
3586         (finish_block_internal): Update.
3587
3588 2018-07-20  Tom Tromey  <tom@tromey.com>
3589
3590         * buildsym.h (EXTERN): Don't define or undef.
3591         * buildsym.c (EXTERN): Don't define.
3592
3593 2018-07-20  Tom Tromey  <tom@tromey.com>
3594
3595         * buildsym.c: Remove TODO comment.
3596
3597 2018-07-20  Tom Tromey  <tom@tromey.com>
3598
3599         * coffread.c (coff_symtab_read): Update.
3600         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3601         (xcoff_new_init): Update.
3602         * mipsread.c (mipscoff_new_init): Update.
3603         * mdebugread.c (mdebug_build_psymtabs): Update.
3604         * elfread.c (elf_new_init): Update.
3605         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3606         Update.
3607         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3608         (coffstab_build_psymtabs, elfstab_build_psymtabs)
3609         (stabsect_build_psymtabs): Update.
3610         * buildsym.h (buildsym_init): Don't declare.
3611         * buildsym.c: Update comment.
3612         (prepare_for_building): Remove.
3613         (start_symtab, restart_symtab): Update.
3614         (reset_symtab_globals): Update comment.
3615         (buildsym_init): Remove.
3616
3617 2018-07-20  Tom Tromey  <tom@tromey.com>
3618
3619         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3620         * stabsread.c (patch_block_stabs, define_symbol, read_type)
3621         (read_enum_type, common_block_start, common_block_end)
3622         (cleanup_undefined_types_1, finish_global_stabs): Update.
3623         * mdebugread.c (psymtab_to_symtab_1): Update.
3624         * dwarf2read.c (fixup_go_packaging, read_func_scope)
3625         (read_lexical_block_scope, new_symbol): Update.
3626         * dbxread.c (process_one_symbol): Update.
3627         * coffread.c (coff_symtab_read, process_coff_symbol)
3628         (coff_read_enum_type): Update.
3629         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3630         declare.
3631         (get_local_symbols, get_file_symbols, get_global_symbols): New
3632         functions.
3633         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3634         m_global_symbols.
3635         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3636         (~scoped_free_pendings): Update.
3637         (finish_block, prepare_for_building, reset_symtab_globals)
3638         (end_symtab_get_static_block, end_symtab_with_blockvector)
3639         (augment_type_symtab, push_context): Update.
3640         (get_local_symbols, get_file_symbols, get_global_symbols): New
3641         functions.
3642         (buildsym_init): Update.
3643
3644 2018-07-20  Tom Tromey  <tom@tromey.com>
3645
3646         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3647         (process_full_type_unit): Likewise.
3648         (dwarf2_start_symtab): Set list_in_scope.
3649
3650 2018-07-20  Tom Tromey  <tom@tromey.com>
3651
3652         * dwarf2read.c (process_psymtab_comp_unit_reader)
3653         (build_type_psymtabs_reader): Do not set list_in_scope.
3654
3655 2018-07-20  Tom Tromey  <tom@tromey.com>
3656
3657         * buildsym.c (free_pendings): Remove.
3658         (add_symbol_to_list, scoped_free_pendings)
3659         (finish_block_internal, buildsym_init): Update.
3660
3661 2018-07-20  Tom Tromey  <tom@tromey.com>
3662
3663         * xcoffread.c (read_xcoff_symtab): Update.
3664         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3665         Update.
3666         * dbxread.c (process_one_symbol): Update.
3667         * coffread.c (coff_symtab_read): Update.
3668         * buildsym.h (finish_block): Update.
3669         * buildsym.c (finish_block): Remove "listhead" argument.
3670         (end_symtab_get_static_block): Update.
3671
3672 2018-07-20  Tom Tromey  <tom@tromey.com>
3673
3674         * buildsym.h (class scoped_free_pendings): Remove constructor.
3675         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3676         method.
3677         <m_pending_block_obstack, m_pending_blocks>: New members.
3678         (pending_block_obstack, pending_blocks): Remove.
3679         (scoped_free_pendings::scoped_free_pendings): Default.
3680         (~scoped_free_pendings): Update.
3681         (free_pending_blocks): Remove.
3682         (finish_block_internal, record_pending_block, make_blockvector)
3683         (end_symtab_get_static_block, augment_type_symtab, push_context)
3684         (buildsym_init): Update.
3685
3686 2018-07-20  Tom Tromey  <tom@tromey.com>
3687
3688         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3689         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3690         members.
3691         (pending_addrmap, pending_addrmap_obstack)
3692         (pending_addrmap_interesting): Remove.
3693         (scoped_free_pendings, record_block_range, make_blockvector)
3694         (prepare_for_building, reset_symtab_globals, buildsym_init):
3695         Update.
3696
3697 2018-07-20  Tom Tromey  <tom@tromey.com>
3698
3699         * xcoffread.c (process_linenos): Update.
3700         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3701         * mdebugread.c (psymtab_to_symtab_1): Update.
3702         * dwarf2read.c (setup_type_unit_groups)
3703         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3704         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3705         * dbxread.c (process_one_symbol): Update.
3706         * coffread.c (coff_symtab_read, enter_linenos)
3707         (process_coff_symbol): Update.
3708         * buildsym.h (current_subfile): Don't declare.
3709         (get_current_subfile): Declare.
3710         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3711         member.
3712         (start_subfile, free_buildsym_compunit, push_subfile)
3713         (prepare_for_building, start_symtab): Update.
3714         (get_current_subfile): New function.
3715
3716 2018-07-20  Tom Tromey  <tom@tromey.com>
3717
3718         * coffread.c (coff_symtab_read): Update.
3719         * xcoffread.c (read_xcoff_symtab): Update.
3720         * dwarf2read.c (new_symbol): Update.
3721         (read_func_scope, read_lexical_block_scope): Update.
3722         * dbxread.c (process_one_symbol): Update.
3723         * buildsym.h (context_stack, context_stack_depth): Don't declare.
3724         (outermost_context_p): Remove macro.
3725         (outermost_context_p, get_current_context_stack)
3726         (get_context_stack_depth): Declare.
3727         (pop_context): Return struct context_stack.
3728         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3729         member.
3730         (context_stack_size): Remove.
3731         (INITIAL_CONTEXT_STACK_SIZE): Remove.
3732         (prepare_for_building, end_symtab_get_static_block)
3733         (augment_type_symtab, push_context): Update.
3734         (pop_context): Return struct context_stack.
3735         (outermost_context_p, get_current_context_stack)
3736         (get_context_stack_depth): New functions.
3737         (buildsym_init): Update.
3738
3739 2018-07-20  Tom Tromey  <tom@tromey.com>
3740
3741         * rust-exp.y: Now a pure parser.  Update all rules.
3742         (%union): Move earlier.
3743         (current_parser, work_obstack): Remove globals.
3744         (rust_parser, ~rust_parser): Update.
3745         (class rust_parser) <copy_name, concat3, crate_name, super_name,
3746         lex_character, lex_number, lex_string, lex_identifier,
3747         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3748         convert_name, convert_params_to_expression,
3749         convert_ast_to_expression, ast_basic_type, ast_operation,
3750         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3751         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3752         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3753         ast_array_type, ast_slice_type, ast_reference_type,
3754         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3755         (rust_parse): Update.
3756         (rustyyerror, rustyylex): Add parser parameter.
3757         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3758         (rust_lex_stringish_test, rust_lex_test_sequence)
3759         (rust_lex_test_trailing_dot, rust_lex_test_completion)
3760         (rust_lex_test_push_back, rust_lex_tests): Update.
3761
3762 2018-07-19  Pedro Alves  <palves@redhat.com>
3763
3764         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3765         gdb::unique_xmalloc_ptr.
3766         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3767         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3768         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3769         copy-initialization.
3770         * guile/scm-pretty-print.c (ppscm_print_children): Use
3771         gdb::unique_xmalloc_ptr instead of cleanups.
3772         (gdbscm_apply_val_pretty_printer): Remove cleanups.
3773         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3774         gdb::unique_xmalloc_ptr.
3775         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3776         Adjust to use gdb::unique_xmalloc_ptr.
3777         * guile/scm-utils.c (extract_arg): Adjust.
3778         * guile/scm-value.c (gdbscm_value_field): Adjust to use
3779         gdb::unique_xmalloc_ptr instead of a cleanup.
3780
3781 2018-07-19  Tom Tromey  <tom@tromey.com>
3782
3783         * utils.c (do_value_free_to_mark)
3784         (make_cleanup_value_free_to_mark): Remove.
3785         * utils.h (make_cleanup_value_free_to_mark): Remove.
3786
3787 2018-07-19  Pedro Alves  <palves@redhat.com>
3788
3789         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3790         forwarding reference.
3791
3792 2018-07-18  Pedro Alves  <palves@redhat.com>
3793
3794         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3795         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
3796         cleanup.
3797
3798 2018-07-18  Pedro Alves  <palves@redhat.com>
3799
3800         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3801         exceptions.
3802         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3803         (gdbscm_wrap): New.
3804         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3805         directly instead of a cleanup.
3806         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3807         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3808         (vlscm_binop_gdbthrow): New, factored out from ...
3809         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3810         (vlscm_rich_compare): Use gdbscm_wrap.
3811         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3812         instead of a cleanup.
3813         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3814         cleanup.
3815         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3816         Use xfree directly instead of a cleanup.
3817         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3818         Adjust to use gdbscm_wrap and scoped_value_mark.
3819         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3820         (gdbscm_value_address, gdbscm_value_dereference)
3821         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3822         scoped_value_mark.
3823         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3824         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3825         scoped_value_mark.
3826         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3827         gdbscm_wrap and scoped_value_mark.
3828         (gdbscm_value_to_string): Use xfree directly instead of a
3829         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3830         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3831         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3832         scoped_value_mark.
3833         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3834         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3835         scoped_value_mark.
3836         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3837         gdbscm_wrap.
3838
3839 2018-07-18  Tom de Vries  <tdevries@suse.de>
3840
3841         * findvar.c (default_read_var_value): Also resolve dynamic type for
3842         LOC_OPTIMIZED_OUT vars.
3843
3844 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
3845
3846         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3847         decoding.
3848
3849 2018-07-17  Tom Tromey  <tom@tromey.com>
3850
3851         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3852         (compute_enum_list, pascm_set_param_value_x)
3853         (gdbscm_parameter_value): Update.
3854         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3855         (gdbscm_scm_to_host_string): Update.
3856         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3857         Update.
3858         * guile/scm-cmd.c (cmdscm_add_completion): Update.
3859         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3860         * guile/scm-string.c (gdbscm_scm_to_string): Return
3861         unique_xmalloc_ptr.
3862         (gdbscm_scm_to_host_string): Likewise.
3863
3864 2018-07-17  Tom Tromey  <tom@tromey.com>
3865
3866         * guile/guile.c (gdbscm_eval_from_control_command): Update.
3867         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3868         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3869         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3870         unique_xmalloc_ptr.
3871
3872 2018-07-17  Tom Tromey  <tom@tromey.com>
3873
3874         * guile/scm-param.c (pascm_signal_setshow_error): Update.
3875         * guile/guile-internal.h (gdbscm_exception_message_to_string):
3876         Update.
3877         * guile/scm-cmd.c (cmdscm_function): Update.
3878         * guile/scm-pretty-print.c
3879         (ppscm_print_exception_unless_memory_error): Update.
3880         * guile/scm-exception.c (gdbscm_exception_message_to_string):
3881         Return unique_xmalloc_ptr.
3882
3883 2018-07-17  Tom Tromey  <tom@tromey.com>
3884
3885         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3886         Use string_printf.
3887
3888 2018-07-17  Jim Wilson  <jimw@sifive.com>
3889
3890         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3891         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
3892         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
3893         unecessary braces after EF_RISCV_RVC test.  Delete call to
3894         set_gdbarch_decr_pc_after_break.
3895
3896         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3897         RISCV_LAST_FP_REGNUM + 1.
3898         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3899
3900 2018-07-17  Tom Tromey  <tom@tromey.com>
3901
3902         * configure.ac: Remove --disable-gdbcli.
3903         * configure: Rebuild.
3904         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3905         (SUBDIR_CLI_CFLAGS): Remove.
3906         (SFILES): Use SUBDIR_CLI_SRCS.
3907         (COMMON_OBS): Use SUBDIR_CLI_OBS.
3908
3909 2018-07-17  Tom Tromey  <tom@tromey.com>
3910
3911         PR gdb/18624:
3912         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3913
3914 2018-07-16  Jim Wilson  <jimw@sifive.com>
3915
3916         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3917
3918 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3919
3920         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3921         variable.
3922         (libunwind_frame_sniffer): Likewise.
3923         (libunwind_frame_prev_register): Likewise.
3924         (libunwind_sigtramp_frame_sniffer): Likewise.
3925         * ia64-tdep.c (ia64_access_reg): Likewise.
3926         (ia64_access_rse_reg): Likewise.
3927         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3928         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3929
3930 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3931
3932         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3933
3934 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3935
3936         * remote-sim.c (gdbsim_target::close,
3937         gdbsim_target::mourn_inferior): Remove unused variables.
3938
3939 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
3940
3941         * ia64-tdep.c (ktab_buf): New global.
3942         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3943         (get_kernel_table): Adjust.
3944
3945 2018-07-16  Tom Tromey  <tom@tromey.com>
3946
3947         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3948         * dwarf2read.c (using_directives, new_symbol): Use
3949         outermost_context_p.
3950         * dbxread.c (process_one_symbol): Use outermost_context_p.
3951         * coffread.c (coff_symtab_read): Use outermost_context_p.
3952
3953 2018-07-16  Tom Tromey  <tom@tromey.com>
3954
3955         * dwarf2read.c (using_directives, read_func_scope)
3956         (read_lexical_block_scope): Update.
3957         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3958         * buildsym.h (local_using_directives, global_using_directives):
3959         Don't declare.
3960         (get_local_using_directives, set_local_using_directives)
3961         (get_global_using_directives): Declare.
3962         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3963         m_global_using_directives>: New members.
3964         (finish_block_internal, prepare_for_building)
3965         (reset_symtab_globals, end_symtab_get_static_block)
3966         (push_context): Update.
3967         (get_local_using_directives, set_local_using_directives)
3968         (get_global_using_directives): New functions.
3969         (buildsym_init): Update.
3970
3971 2018-07-16  Tom Tromey  <tom@tromey.com>
3972
3973         * xcoffread.c (xcoff_initial_scan): Don't call
3974         free_pending_blocks.
3975         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3976         * buildsym.h (class scoped_free_pendings): Add constructor.
3977         (free_pending_blocks): Don't declare.
3978         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3979         (free_pending_blocks): Now static.
3980
3981 2018-07-16  Tom Tromey  <tom@tromey.com>
3982
3983         * buildsym.h (push_subfile, pop_subfile): Update declarations.
3984         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3985         member.
3986         (struct subfile_stack): Remove.
3987         (subfile_stack): Remove.
3988         (push_subfile, pop_subfile, buildsym_init): Update.
3989
3990 2018-07-16  Tom Tromey  <tom@tromey.com>
3991
3992         * buildsym.c (push_subfile): Use gdb_assert.
3993         (pop_subfile): Use gdb_assert.
3994
3995 2018-07-16  Tom Tromey  <tom@tromey.com>
3996
3997         * buildsym.h (merge_symbol_lists): Remove.
3998         * buildsym.c (merge_symbol_lists): Remove.
3999
4000 2018-07-16  Tom Tromey  <tom@tromey.com>
4001
4002         * stabsread.c (scan_file_globals): Update comment.
4003         * stabsread.h (scan_file_globals): Move from buildsym.h.
4004         * buildsym.h (scan_file_globals): Move to stabsread.h.
4005
4006 2018-07-16  Tom Tromey  <tom@tromey.com>
4007
4008         * xcoffread.c (xcoff_new_init): Update.
4009         * mipsread.c (mipscoff_new_init): Update.
4010         * mdebugread.c (mdebug_build_psymtabs): Update.
4011         * elfread.c (elf_new_init): Update.
4012         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4013         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4014         * buildsym.h (buildsym_new_init): Don't declare.
4015         * buildsym.c (buildsym_new_init): Remove.
4016
4017 2018-07-16  Tom Tromey  <tom@tromey.com>
4018
4019         * stabsread.h (within_function): Move from buildsym.h.
4020         * stabsread.c (start_stabs): Clear within_function.
4021         * coffread.c (coff_start_symtab): Clear within_function.
4022         * buildsym.h (within_function): Move to stabsread.h.
4023         * buildsym.c (prepare_for_building): Update.
4024
4025 2018-07-16  Tom Tromey  <tom@tromey.com>
4026
4027         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4028         * dwarf2read.c (dwarf2_start_symtab): Don't set
4029         processing_gcc_compilation.
4030         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4031
4032 2018-07-16  Tom Tromey  <tom@tromey.com>
4033
4034         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4035         (next_symbol_text_func): Move from buildsym.h.
4036         * stabsread.c (hashname): Move from buildsym.c.
4037         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4038         (next_symbol_text_func, hashname): Move to stabsread.h.
4039         * buildsym.c: Don't include bcache.h
4040         (hashname): Move to stasbread.c.
4041
4042 2018-07-16  Tom Tromey  <tom@tromey.com>
4043
4044         * buildsym.h (context_stack_size): Don't declare.
4045         * buildsym.c (context_stack_size): New global.
4046
4047 2018-07-16  Tom Tromey  <tom@tromey.com>
4048
4049         * dbxread.c (processing_acc_compilation): New global.
4050         * buildsym.h (processing_acc_compilation): Don't declare.
4051
4052 2018-07-16  Tom Tromey  <tom@tromey.com>
4053
4054         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4055         * dbxread.c (read_ofile_symtab): Update.
4056         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4057         * buildsym.h (last_source_start_addr): Remove.
4058         (set_last_source_start_addr, get_last_source_start_addr):
4059         Declare.
4060         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4061         parameter.
4062         (struct buildsym_compunit) <m_last_source_start_addr>: New
4063         member.
4064         (prepare_for_building): Remove start_addr parameter.
4065         (start_symtab, restart_symtab, end_symtab_get_static_block)
4066         (end_symtab_with_blockvector): Update.
4067         (set_last_source_start_addr, get_last_source_start_addr): New
4068         functions.
4069
4070 2018-07-16  Tom Tromey  <tom@tromey.com>
4071
4072         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4073         member.
4074         (have_line_numbers): Remove.
4075         (record_line, prepare_for_building, end_symtab_get_static_block)
4076         (augment_type_symtab): Update.
4077
4078 2018-07-16  Tom Tromey  <tom@tromey.com>
4079
4080         * buildsym.c (~buildsym_compunit): Free the macro table.
4081         (struct buildsym_compunit) <get_macro_table, release_macros>: New
4082         methods.
4083         <m_pending_macros>: New member.
4084         (pending_macros): Remove.
4085         (~scoped_free_pendings, get_macro_table, prepare_for_building)
4086         (reset_symtab_globals, end_symtab_get_static_block)
4087         (end_symtab_with_blockvector, augment_type_symtab)
4088         (buildsym_init): Update.
4089
4090 2018-07-16  Tom Tromey  <tom@tromey.com>
4091
4092         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4093         parameter.
4094         (buildsym_compunit::set_last_source_file): New method.
4095         <m_last_source_file>: New member.
4096         (prepare_for_building): Remove "name" parameter.
4097         (start_symtab, restart_symtab, reset_symtab_globals): Update.
4098         (last_source_file): Remove.
4099         (set_last_source_file, get_last_source_file): Update.
4100
4101 2018-07-16  Tom Tromey  <tom@tromey.com>
4102
4103         * buildsym.c (prepare_for_building): Add assert.
4104
4105 2018-07-16  Tom Tromey  <tom@tromey.com>
4106
4107         * buildsym.c (~buildsym_compunit): Update.
4108         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4109         (start_subfile, patch_subfile_names)
4110         (end_symtab_with_blockvector): Update.
4111
4112 2018-07-16  Tom Tromey  <tom@tromey.com>
4113
4114         * buildsym.c (struct buildsym_compunit): Add constructor,
4115         destructor, initializers.
4116         (start_buildsym_compunit): Remove.
4117         (free_buildsym_compunit): Use "delete".
4118         (start_symtab, restart_symtab): Use "new".
4119
4120 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
4121
4122         * symfile.c (set_objfile_default_section_offset): Remove struct
4123         keyword.
4124
4125 2018-07-14  Stafford Horne  <shorne@gmail.com>
4126
4127         * (Responsible Maintainers): Add myself as or1k maintainer.
4128
4129 2018-07-13  Tom Tromey  <tom@tromey.com>
4130
4131         * symfile.c (set_objfile_default_section_offset): Use extra braces
4132         around initializer.
4133
4134 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4135
4136         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4137         non-branching basr.
4138
4139 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4140
4141         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4142         unittests/cli-utils-selftests.c
4143         * unittests/cli-utils-selftests.c: New file.
4144
4145 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4146
4147         * NEWS: Mention new commands. Mention change to 'thread apply'.
4148
4149 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4150
4151         * thread.c (thr_try_catch_cmd): New function.
4152         (thread_apply_all_command): Handle qcs flags.
4153         (thread_apply_command): Handle qcs flags.
4154         (taas_command): New function.
4155         (tfaas_command): New function.
4156         (_initialize_thread): Update to setup the new commands 'taas
4157         and 'tfaas'. Change doc string for 'thread apply'.
4158
4159 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4160
4161         * stack.c: (trailing_outermost_frame): New function, mostly
4162         extracted from backtrace_command_1.
4163         (leading_innermost_frame): New function.
4164         (backtrace_command_1): Update to call trailing_outermost_frame.
4165         (frame_apply_command_count): New function.
4166         (frame_apply_level_command): New function.
4167         (frame_apply_all_command): New function.
4168         (frame_apply_command): New function.
4169         (faas_command): New function.
4170         (frame_cmd_list): New variable.
4171         (_initialize_stack): Update to setup the new commands 'frame apply'
4172         and 'faas'.
4173
4174 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4175
4176         * cli-utils.c (number_or_range_parser::get_number): Only handle
4177         numbers or convenience var as numbers.
4178         (parse_flags): New function.
4179         (parse_flags_qcs): New function.
4180         (number_or_range_parser::finished): Ensure parsing end is detected
4181         before end of string.
4182         * cli-utils.h (parse_flags): New function.
4183         (parse_flags_qcs): New function.
4184         (number_or_range_parser): Remove m_finished bool.
4185         (number_or_range_parser::skip_range): Set m_in_range to false.
4186
4187 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
4188
4189         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4190         on Windows.
4191
4192 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4193             Jan Kratochvil  <jan.kratochvil@redhat.com>
4194             Paul Fertser  <fercerpav@gmail.com>
4195             Tsutomu Seki  <sekiriki@gmail.com>
4196             Pedro Alves  <palves@redhat.com>
4197
4198         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4199         'unittests/parse-connection-spec-selftests.c'.
4200         (COMMON_SFILES): Add 'common/netstuff.c'.
4201         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4202         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4203         * common/netstuff.c: New file.
4204         * common/netstuff.h: New file.
4205         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4206         (wait_for_connect): Update comment.  New parameter
4207         'gdb::optional<int> sock' instead of 'struct serial *scb'.
4208         Use 'sock' directly instead of 'scb->fd'.
4209         (try_connect): New function, with code from 'net_open'.
4210         (net_open): Rewrite main loop to deal with multiple
4211         sockets/addresses.  Handle IPv6-style hostnames; implement
4212         support for IPv6 connections.
4213         * unittests/parse-connection-spec-selftests.c: New file.
4214
4215 2018-07-11  Pedro Alves  <palves@redhat.com>
4216
4217         PR gdb/23377
4218         * remote.c (remote_target::remote_detach_pid): Call
4219         set_current_process.
4220
4221 2018-07-11  Pedro Alves  <palves@redhat.com>
4222
4223         * h8300-tdep.c (h8300_gdbarch_init): Remove
4224         set_gdbarch_ecoff_reg_to_regnum calls.
4225
4226 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4227
4228         PR c++/23373
4229         * c-typeprint.c (c_type_print_base_struct_union): Don't print
4230         offsets/sizes for static members of a class/struct.
4231
4232 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
4233
4234         * target-descriptions.c (tdesc_register_bitsize): Rename.
4235         * target-descriptions.h (tdesc_register_bitsize): Likewise.
4236         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4237         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4238
4239 2018-07-10  Tom Tromey  <tom@tromey.com>
4240
4241         * breakpoint.c (moribund_locations): Now static and a
4242         std::vector.
4243         (breakpoint_init_inferior, moribund_breakpoint_here_p)
4244         (build_bpstat_chain, update_global_location_list)
4245         (breakpoint_retire_moribund): Update.
4246         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
4247         VEC.
4248
4249 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4250
4251         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4252         (riscv_register_reggroup_p): Use new function, remove unneeded
4253         parenthesis.
4254         (riscv_push_dummy_call): Extend assert to compare against xlen or
4255         flen based on register type.
4256
4257 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4258
4259         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4260
4261 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4262
4263         * remote.c (show_hardware_watchpoint_limit): New function.
4264         (show_hardware_watchpoint_length_limit): New function.
4265         (show_hardware_breakpoint_limit): New function.
4266         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4267         where appropriate, update help text.
4268
4269 2018-07-09  Tom Tromey  <tom@tromey.com>
4270
4271         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4272         (CLIBS): Don't mention NAT_CLIBS.
4273
4274 2018-07-09  Tom Tromey  <tom@tromey.com>
4275
4276         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4277         (LIBGDB_OBS, clean mostlyclean): Update.
4278         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4279
4280 2018-07-09  Tom Tromey  <tom@tromey.com>
4281
4282         * Makefile.in (%.c: %.y): Use ECHO_YACC.
4283         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
4284         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4285
4286 2018-07-09  Tom Tromey  <tom@tromey.com>
4287
4288         * Makefile.in (ALLDEPFILES): Remove exec.c.
4289         (COMMON_OBS): Remove exec.o.
4290         (COMMON_SFILES): Add exec.c.
4291
4292 2018-07-09  Tom Tromey  <tom@tromey.com>
4293
4294         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4295
4296 2018-07-09  Tom Tromey  <tom@tromey.com>
4297
4298         * Makefile.in (clean mostlyclean): Remove stamp-version.
4299         (version.c): Depend on stamp-version.
4300         (stamp-version): New rule, from version.c rule.
4301
4302 2018-07-09  Tom Tromey  <tom@tromey.com>
4303
4304         * Makefile.in (init.c): Depend on stamp-init.
4305         (stamp-init): New rule, from init.c rule.
4306         (clean mostlyclean): Remove stamp-init.
4307
4308 2018-07-09  Tom Tromey  <tom@tromey.com>
4309
4310         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4311         SUBDIR_GCC_COMPILE_SRCS.
4312
4313 2018-07-09  Tom Tromey  <tom@tromey.com>
4314
4315         * Makefile.in (init.c): Remove some unused sed rules.
4316
4317 2018-07-09  Tom Tromey  <tom@tromey.com>
4318
4319         * Makefile.in (TSOBS): Remove.
4320         (INIT_FILES): Update.
4321         (LIBGDB_OBS): Update.
4322         (COMMON_SFILES): Add inflow.c.
4323         (SFILES): Remove inflow.c.
4324
4325 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
4326
4327         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4328
4329 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
4330
4331         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4332         get_saveloc_name, is_signal_frame_name, step_name,
4333         init_remote_name, create_addr_space_name,
4334         destroy_addr_space_name, search_unwind_table_name,
4335         find_dyn_list_name): Constify.
4336
4337 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
4338
4339         * darwin-nat.c (darwin_pthread_kill): New function.
4340         (darwin_resume_thread): Use darwin_pthread_kill.
4341
4342 2018-07-05  Tom de Vries  <tdevries@suse.de>
4343
4344         * macroexp.c (macro_buffer) <operator=>: New member function.
4345
4346 2018-07-04  Tom Tromey  <tom@tromey.com>
4347
4348         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4349
4350 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
4351
4352         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4353         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4354         * maint.c: Likewise.
4355         * top.c: Likewise.
4356
4357 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4358
4359         * NEWS: Create a new section for the next release branch.
4360         Rename the section of the current branch, now that it has
4361         been cut.
4362
4363 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4364
4365         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4366         * version.in: Bump version to 8.2.50.DATE-git.
4367
4368 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
4369             Pedro Alves  <palves@redhat.com>
4370
4371         * linux-nat.c (linux_init_ptrace): Rename to ...
4372         (linux_init_ptrace_procfs): ... this.  Call
4373         linux_proc_init_warnings.
4374         (linux_nat_target::post_attach)
4375         (linux_nat_target::post_startup_inferior): Adjust.
4376         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4377         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4378
4379 2018-07-04  Tom de Vries  <tdevries@suse.de>
4380
4381         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4382         check ...
4383         (read_comp_unit_head): ... here.
4384
4385 2018-07-03  Tom Tromey  <tom@tromey.com>
4386
4387         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4388         (stop_tracing, tstatus_command)
4389         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4390         (print_one_static_tracepoint_marker): Update.
4391         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4392         std::vector.
4393         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
4394         VEC.
4395         (all_tracepoints, static_tracepoints_here): Return std::vector.
4396
4397 2018-07-03  Tom Tromey  <tom@tromey.com>
4398
4399         * common/ptid.c (ptid_equal): Remove.
4400         * common/ptid.h (ptid_equal): Don't declare.
4401         * ada-tasks.c: Update.
4402         * breakpoint.c: Update.
4403         * common/agent.c: Update.
4404         * corelow.c: Update.
4405         * darwin-nat-info.c: Update.
4406         * darwin-nat.c: Update.
4407         * dcache.c: Update.
4408         * dtrace-probe.c: Update.
4409         * dummy-frame.c: Update.
4410         * fbsd-nat.c: Update.
4411         * frame.c: Update.
4412         * gdbthread.h: Update.
4413         * gnu-nat.c: Update.
4414         * go32-nat.c: Update.
4415         * inf-loop.c: Update.
4416         * inf-ptrace.c: Update.
4417         * infcall.c: Update.
4418         * infcmd.c: Update.
4419         * inflow.c: Update.
4420         * infrun.c: Update.
4421         * linux-fork.c: Update.
4422         * linux-nat.c: Update.
4423         * linux-thread-db.c: Update.
4424         * mi/mi-cmd-var.c: Update.
4425         * mi/mi-interp.c: Update.
4426         * mi/mi-main.c: Update.
4427         * nto-procfs.c: Update.
4428         * ppc-linux-tdep.c: Update.
4429         * procfs.c: Update.
4430         * python/py-inferior.c: Update.
4431         * python/py-record-btrace.c: Update.
4432         * python/py-record.c: Update.
4433         * ravenscar-thread.c: Update.
4434         * regcache.c: Update.
4435         * remote-sim.c: Update.
4436         * remote.c: Update.
4437         * sol-thread.c: Update.
4438         * solib.c: Update.
4439         * target.c: Update.
4440         * tui/tui-stack.c: Update.
4441         * varobj.c: Update.
4442         * windows-nat.c: Update.
4443         * windows-tdep.c: Update.
4444
4445 2018-07-03  Tom Tromey  <tom@tromey.com>
4446
4447         * common/ptid.c (ptid_match): Remove.
4448         * common/ptid.h (ptid_match): Don't declare.
4449         * fbsd-nat.c: Update.
4450         * infcmd.c: Update.
4451         * infrun.c: Update.
4452         * linux-nat.c: Update.
4453         * record-btrace.c: Update.
4454         * regcache.c: Update.
4455         * remote.c: Update.
4456
4457 2018-07-03  Tom Tromey  <tom@tromey.com>
4458
4459         * common/ptid.c (ptid_tid_p): Remove.
4460         * common/ptid.h (ptid_tid_p): Don't declare.
4461         * sol-thread.c: Update.
4462
4463 2018-07-03  Tom Tromey  <tom@tromey.com>
4464
4465         * common/ptid.c (ptid_lwp_p): Remove.
4466         * common/ptid.h (ptid_lwp_p): Don't declare.
4467         * fbsd-nat.c: Update.
4468         * linux-nat.c: Update.
4469         * nat/linux-procfs.c: Update.
4470         * nat/x86-linux-dregs.c: Update.
4471         * sol-thread.c: Update.
4472
4473 2018-07-03  Tom Tromey  <tom@tromey.com>
4474
4475         * common/ptid.c (ptid_is_pid): Remove.
4476         * common/ptid.h (ptid_is_pid): Don't declare.
4477         * infrun.c: Update.
4478         * linux-nat.c: Update.
4479         * mi/mi-interp.c: Update.
4480         * remote.c: Update.
4481         * thread.c: Update.
4482
4483 2018-07-03  Tom Tromey  <tom@tromey.com>
4484
4485         * common/ptid.c (ptid_get_tid): Remove.
4486         * common/ptid.h (ptid_get_tid): Don't declare.
4487         * ada-tasks.c: Update.
4488         * aix-thread.c: Update.
4489         * bsd-uthread.c: Update.
4490         * darwin-nat.c: Update.
4491         * fbsd-nat.c: Update.
4492         * i386-darwin-nat.c: Update.
4493         * infrun.c: Update.
4494         * linux-tdep.c: Update.
4495         * nto-procfs.c: Update.
4496         * ppc-ravenscar-thread.c: Update.
4497         * python/py-infthread.c: Update.
4498         * ravenscar-thread.c: Update.
4499         * sol-thread.c: Update.
4500         * sparc-ravenscar-thread.c: Update.
4501         * windows-nat.c: Update.
4502
4503 2018-07-03  Tom Tromey  <tom@tromey.com>
4504
4505         * common/ptid.c (ptid_get_lwp): Remove.
4506         * common/ptid.h (ptid_get_lwp): Don't declare.
4507         * aarch64-linux-nat.c: Update.
4508         * ada-tasks.c: Update.
4509         * aix-thread.c: Update.
4510         * amd64-linux-nat.c: Update.
4511         * arm-linux-nat.c: Update.
4512         * corelow.c: Update.
4513         * fbsd-nat.c: Update.
4514         * fbsd-tdep.c: Update.
4515         * gnu-nat.c: Update.
4516         * i386-cygwin-tdep.c: Update.
4517         * i386-gnu-nat.c: Update.
4518         * i386-linux-nat.c: Update.
4519         * ia64-linux-nat.c: Update.
4520         * inf-ptrace.c: Update.
4521         * infrun.c: Update.
4522         * linux-fork.c: Update.
4523         * linux-nat.c: Update.
4524         * linux-tdep.c: Update.
4525         * linux-thread-db.c: Update.
4526         * mips-linux-nat.c: Update.
4527         * nat/aarch64-linux-hw-point.c: Update.
4528         * nat/aarch64-linux.c: Update.
4529         * nat/linux-btrace.c: Update.
4530         * nat/linux-osdata.c: Update.
4531         * nat/linux-procfs.c: Update.
4532         * nat/x86-linux-dregs.c: Update.
4533         * obsd-nat.c: Update.
4534         * ppc-fbsd-nat.c: Update.
4535         * ppc-linux-nat.c: Update.
4536         * procfs.c: Update.
4537         * python/py-infthread.c: Update.
4538         * ravenscar-thread.c: Update.
4539         * remote.c: Update.
4540         * s390-linux-nat.c: Update.
4541         * sol-thread.c: Update.
4542         * sol2-tdep.c: Update.
4543         * spu-linux-nat.c: Update.
4544         * x86-linux-nat.c: Update.
4545         * xtensa-linux-nat.c: Update.
4546
4547 2018-07-03  Tom Tromey  <tom@tromey.com>
4548
4549         * common/ptid.c (ptid_get_pid): Remove.
4550         * common/ptid.h (ptid_get_pid): Don't declare.
4551         * aarch64-linux-nat.c: Update.
4552         * ada-lang.c: Update.
4553         * aix-thread.c: Update.
4554         * alpha-bsd-nat.c: Update.
4555         * amd64-fbsd-nat.c: Update.
4556         * amd64-linux-nat.c: Update.
4557         * arm-linux-nat.c: Update.
4558         * arm-nbsd-nat.c: Update.
4559         * auxv.c: Update.
4560         * break-catch-syscall.c: Update.
4561         * breakpoint.c: Update.
4562         * bsd-uthread.c: Update.
4563         * corelow.c: Update.
4564         * ctf.c: Update.
4565         * darwin-nat.c: Update.
4566         * fbsd-nat.c: Update.
4567         * fbsd-tdep.c: Update.
4568         * gcore.c: Update.
4569         * gnu-nat.c: Update.
4570         * hppa-nbsd-nat.c: Update.
4571         * hppa-obsd-nat.c: Update.
4572         * i386-fbsd-nat.c: Update.
4573         * ia64-linux-nat.c: Update.
4574         * inf-ptrace.c: Update.
4575         * infcmd.c: Update.
4576         * inferior.c: Update.
4577         * inferior.h: Update.
4578         * inflow.c: Update.
4579         * infrun.c: Update.
4580         * linux-fork.c: Update.
4581         * linux-nat.c: Update.
4582         * linux-tdep.c: Update.
4583         * linux-thread-db.c: Update.
4584         * m68k-bsd-nat.c: Update.
4585         * mi/mi-interp.c: Update.
4586         * mi/mi-main.c: Update.
4587         * mips-linux-nat.c: Update.
4588         * mips-nbsd-nat.c: Update.
4589         * mips64-obsd-nat.c: Update.
4590         * nat/aarch64-linux-hw-point.c: Update.
4591         * nat/aarch64-linux.c: Update.
4592         * nat/linux-btrace.c: Update.
4593         * nat/linux-osdata.c: Update.
4594         * nat/linux-procfs.c: Update.
4595         * nat/x86-linux-dregs.c: Update.
4596         * nto-procfs.c: Update.
4597         * obsd-nat.c: Update.
4598         * ppc-linux-nat.c: Update.
4599         * ppc-nbsd-nat.c: Update.
4600         * ppc-obsd-nat.c: Update.
4601         * proc-service.c: Update.
4602         * procfs.c: Update.
4603         * python/py-inferior.c: Update.
4604         * python/py-infthread.c: Update.
4605         * ravenscar-thread.c: Update.
4606         * record.c: Update.
4607         * remote-sim.c: Update.
4608         * remote.c: Update.
4609         * rs6000-nat.c: Update.
4610         * s390-linux-nat.c: Update.
4611         * sh-nbsd-nat.c: Update.
4612         * sol-thread.c: Update.
4613         * sparc-nat.c: Update.
4614         * sparc64-tdep.c: Update.
4615         * spu-linux-nat.c: Update.
4616         * spu-tdep.c: Update.
4617         * target-debug.h: Update.
4618         * target.c: Update.
4619         * thread.c: Update.
4620         * tid-parse.c: Update.
4621         * tracefile-tfile.c: Update.
4622         * vax-bsd-nat.c: Update.
4623         * windows-nat.c: Update.
4624         * x86-linux-nat.c: Update.
4625         * x86-nat.c: Update.
4626
4627 2018-07-03  Tom Tromey  <tom@tromey.com>
4628
4629         * common/ptid.c (pid_to_ptid): Remove.
4630         * common/ptid.h (pid_to_ptid): Don't declare.
4631         * aix-thread.c: Update.
4632         * arm-linux-nat.c: Update.
4633         * common/ptid.c: Update.
4634         * common/ptid.h: Update.
4635         * corelow.c: Update.
4636         * ctf.c: Update.
4637         * darwin-nat.c: Update.
4638         * fbsd-nat.c: Update.
4639         * fork-child.c: Update.
4640         * gnu-nat.c: Update.
4641         * go32-nat.c: Update.
4642         * inf-ptrace.c: Update.
4643         * infcmd.c: Update.
4644         * inferior.c: Update.
4645         * infrun.c: Update.
4646         * linux-fork.c: Update.
4647         * linux-nat.c: Update.
4648         * nat/aarch64-linux-hw-point.c: Update.
4649         * nat/fork-inferior.c: Update.
4650         * nat/x86-linux-dregs.c: Update.
4651         * nto-procfs.c: Update.
4652         * obsd-nat.c: Update.
4653         * procfs.c: Update.
4654         * progspace.c: Update.
4655         * remote.c: Update.
4656         * rs6000-nat.c: Update.
4657         * s390-linux-nat.c: Update.
4658         * sol-thread.c: Update.
4659         * spu-linux-nat.c: Update.
4660         * target.c: Update.
4661         * top.c: Update.
4662         * tracefile-tfile.c: Update.
4663         * windows-nat.c: Update.
4664
4665 2018-07-03  Tom Tromey  <tom@tromey.com>
4666
4667         * common/ptid.h (ptid_build): Don't declare.
4668         * common/ptid.c (ptid_build): Remove.
4669         * aix-thread.c: Update.
4670         * bsd-kvm.c: Update.
4671         * bsd-uthread.c: Update.
4672         * common/agent.c: Update.
4673         * common/ptid.c: Update.
4674         * common/ptid.h: Update.
4675         * corelow.c: Update.
4676         * darwin-nat.c: Update.
4677         * fbsd-nat.c: Update.
4678         * gnu-nat.c: Update.
4679         * linux-fork.c: Update.
4680         * linux-nat.c: Update.
4681         * linux-thread-db.c: Update.
4682         * nat/linux-osdata.c: Update.
4683         * nat/linux-procfs.c: Update.
4684         * nto-procfs.c: Update.
4685         * obsd-nat.c: Update.
4686         * proc-service.c: Update.
4687         * procfs.c: Update.
4688         * ravenscar-thread.c: Update.
4689         * remote-sim.c: Update.
4690         * remote.c: Update.
4691         * sol-thread.c: Update.
4692         * target.c: Update.
4693         * windows-nat.c: Update.
4694
4695 2018-07-03  Tom Tromey  <tom@tromey.com>
4696
4697         * infrun.c (follow_exec): Use exit_inferior_silent.
4698         * inferior.c (exit_inferior_num_silent): Remove.
4699         * inferior.h (exit_inferior_num_silent): Don't declare.
4700
4701 2018-07-03  Tom Tromey  <tom@tromey.com>
4702
4703         PR cli/23340:
4704         * darwin-nat.c (darwin_attach_pid): Reset inferior and
4705         inferior_ptid on error.
4706
4707 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
4708             Simon Marchi  <simon.marchi@polymtl.ca>
4709
4710         PR tdep/8282
4711         * disasm.h (gdb_disassembler): Add
4712         `m_disassembler_options_holder'. member
4713         * disasm.c (get_all_disassembler_options): New function.
4714         (gdb_disassembler::gdb_disassembler): Use it.
4715         (gdb_buffered_insn_length_init_dis): Likewise.
4716         (gdb_buffered_insn_length): Adjust accordingly.
4717         (set_disassembler_options): Handle options with arguments.
4718         (show_disassembler_options_sfunc): Likewise.  Add a leading new
4719         line if showing options with descriptions.
4720         (disassembler_options_completer): Adapt to using the
4721         `disasm_options_and_args_t' structure.
4722         * mips-tdep.c (mips_disassembler_options): New variable.
4723         (mips_disassembler_options_o32): Likewise.
4724         (mips_disassembler_options_n32): Likewise.
4725         (mips_disassembler_options_n64): Likewise.
4726         (gdb_print_insn_mips): Don't set `disassembler_options'.
4727         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4728         functions.
4729         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4730         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
4731         `gdbarch_disassembler_options_implicit' and
4732         `gdbarch_valid_disassembler_options'.
4733         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4734         `disasm_options_and_args_t' structure.
4735         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4736         method.
4737         (valid_disassembler_options): Switch from `disasm_options_t' to
4738         the `disasm_options_and_args_t' structure.
4739         * NEWS: Document `set disassembler-options' support for the MIPS
4740         target.
4741         * gdbarch.h: Regenerate.
4742         * gdbarch.c: Regenerate.
4743
4744 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4745
4746         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4747
4748 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
4749
4750         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4751         parameter in call to amd64_target_description.
4752         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4753         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4754         (amd64fbsd_init_abi): Likewise.
4755         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4756         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4757         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4758         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4759
4760 2018-06-29  Pedro Alves  <palves@redhat.com>
4761
4762         * gdb/amd64-tdep.h (amd64_create_target_description): Add
4763         "segments" parameter.
4764         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4765         (_initialize_amd64_tdep): Update call to
4766         amd64_create_target_description.
4767         (amd64_target_description): Add "segments" parameter.  Adjust
4768         the implementation to use it.
4769         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4770         call to amd64_create_target_description.
4771         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4772         * gdb/arch/amd64.h (amd64_create_target_description): Add
4773         "segments" register.
4774         * gdb/arch/amd64.c (amd64_create_target_description): Add
4775         "segments" parameter.  Call create_feature_i386_64bit_segments
4776         only if SEGMENTS is true.
4777         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4778         call to amd64_create_target_description.
4779
4780 2018-06-29  Pedro Alves  <palves@redhat.com>
4781
4782         * thread.c (thread_target_id_str): New, factored out from ...
4783         (print_thread_info_1): ... here.  Use it to compute the max
4784         "Target Id" column width.
4785
4786 2018-06-29  Pedro Alves  <palves@redhat.com>
4787
4788         * remote.c (remote_target::extra_thread_info): Delete
4789         'display_buf' and 'n' locals.  from the cache, regardless of
4790         packet mechanims is in use.  Use cache for qThreadExtra and qP
4791         methods too.
4792
4793 2018-06-29  Pedro Alves  <palves@redhat.com>
4794
4795         * blockframe.c (find_pc_sect_containing_function): New function.
4796         * breakpoint.c (print_breakpoint_location): Don't call
4797         find_pc_sect_function.
4798         * linespec.c (create_sals_line_offset): Record the location's
4799         symbol in the sal.
4800         * linespec.c (convert_address_location_to_sals): Fill in sal's
4801         symbol with find_pc_sect_containing_function.
4802         * symtab.c (find_function_start_sal): Rename to ...
4803         (find_function_start_sal_1): ... this.
4804         (find_function_start_sal): Reimplement as wrapper around
4805         find_function_start_sal_1, and use
4806         find_pc_sect_containing_function to fill in the sal's symbol.
4807         (find_function_start_sal(symbol*, bool)): Adjust.
4808         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4809         comments.
4810         (find_pc_sect_containing_function): Declare.
4811
4812 2018-06-29  Pedro Alves  <palves@redhat.com>
4813
4814         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4815         true if the the location has no symbol.
4816
4817 2018-06-28  Tom Tromey  <tom@tromey.com>
4818
4819         * NEWS: Mention --enable-codesign.
4820         * silent-rules.mk (ECHO_SIGN): New variable.
4821         * configure.ac: Add --enable-codesign.
4822         * configure: Rebuild.
4823         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4824         (gdb$(EXEEXT)): Optionally invoke codesign.
4825
4826 2018-06-28  Pedro Alves  <palves@redhat.com>
4827
4828         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4829         comments.
4830         (switch_to_thread_no_regs): Adjust comment.
4831         * infcmd.c (stop_pc): Delete.
4832         (post_create_inferior, info_program_command): Replace references
4833         to stop_pc with references to thread_info->suspend.stop_pc.
4834         * inferior.h (stop_pc): Delete declaration.
4835         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4836         (handle_inferior_event_1, handle_signal_stop)
4837         (process_event_stop_test, keep_going_stepped_thread)
4838         (handle_step_into_function, handle_step_into_function_backward)
4839         (print_stop_location): Replace references to stop_pc with
4840         references to thread_info->suspend.stop_pc.
4841         (struct infcall_suspend_state) <stop_pc>: Delete field.
4842         (save_infcall_suspend_state, restore_infcall_suspend_state):
4843         Remove references to inf_stat->stop_pc.
4844         * linux-fork.c (fork_load_infrun_state): Likewise.
4845         * record-btrace.c (record_btrace_set_replay): Likewise.
4846         * record-full.c (record_full_goto_entry): Likewise.
4847         * remote.c (print_one_stopped_thread): Likewise.
4848         * target.c (target_resume): Extend comment.
4849         * thread.c (set_executing_thread): New.
4850         (set_executing): Use it.
4851         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4852         Remove references to stop_pc.
4853
4854 2018-06-28  Pedro Alves  <palves@redhat.com>
4855
4856         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4857         Moving fetching stop_pc until after ecs->event_thread is refreshed.
4858
4859 2018-06-28  Tom Tromey  <tom@tromey.com>
4860
4861         * coffread.c (coff_symfile_finish): Update.
4862         * xcoffread.c (xcoff_symfile_finish): Update.
4863         * elfread.c (elf_symfile_finish): Update.
4864         * symfile.h (dwarf2_free_objfile): Don't declare.
4865         * dwarf2read.c (_initialize_dwarf2_read): Use
4866         register_objfile_data_with_cleanup.
4867         (dwarf2_free_objfile): Now static.  Change signature.
4868
4869 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4870
4871         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4872         option "-o" to add-symbol-file-load to add an offset to each
4873         section's load address.
4874         * symfile.c (set_objfile_default_section_offset): New function.
4875
4876 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4877
4878         * symfile.c (add_symbol_file_command): Make sure that sections
4879         with the same name are sorted in the same order.
4880
4881 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4882
4883         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4884         require the second argument.  If omitted, load sections at the
4885         addresses specified in the file.
4886
4887 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4888
4889         * symfile.c (symbol_file_command, symbol_file_add_main_1)
4890         (_initialize_symfile): Add option "-o" to symbol-file to add an
4891         offset to each section of the symbol file.
4892
4893 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4894
4895         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4896
4897 2018-06-27  Tom Tromey  <tom@tromey.com>
4898
4899         * stack.c (_initialize_stack): Update "func" help text.
4900
4901 2018-06-27  Tom Tromey  <tom@tromey.com>
4902
4903         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4904         std::vector.
4905         (unwind_infopy_str, pyuw_create_unwind_info)
4906         (unwind_infopy_add_saved_register, pyuw_sniffer)
4907         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4908         Update.
4909         (struct saved_reg): Add constructor.
4910         <value>: Now a gdbpy_ref<>.
4911
4912 2018-06-27  Tom Tromey  <tom@tromey.com>
4913
4914         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4915
4916 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4917
4918         * gdb-gdb.py.in: Format using autopep8.
4919
4920 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4921
4922         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4923         (type_lookup_function): Recognize CORE_ADDR values.
4924
4925 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4926
4927         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4928         print tag_name.
4929
4930 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4931
4932         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4933         <__lt__>: Add.
4934
4935 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4936
4937         * gdb-gdb.py: Move to...
4938         * gdb-gdb.py.in: ... here.
4939         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4940         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4941         dependencies.
4942         (distclean): Remove gdb-gdb.py when cleaning.
4943         (gdb-gdb.py, gdb-gdb.gdb): New rules.
4944         * configure: Re-generate.
4945
4946 2018-06-27  Pedro Alves  <palves@redhat.com>
4947
4948         * proc-service.c (get_ps_regcache): New.
4949         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4950         (ps_lsetfpregs): Use it.
4951
4952 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
4953
4954         PR gdb/21695
4955         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4956         (dwarf_decode_lines_1): Adjust.
4957
4958 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4959
4960         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4961         override.
4962         <info_proc>: Likewise.
4963
4964 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
4965
4966         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4967         to windows_fetch_one_register, and only handle the case of
4968         fetching one register.  Move the code that reloads the context
4969         and iterates over all registers if R is negative to...
4970         (windows_nat_target::fetch_registers): ... here.
4971         (do_windows_store_inferior_registers): Rename to
4972         windows_store_one_register, and only handle the case of storing
4973         one register.  Move the code that handles the case where r is
4974         negative to...
4975         (windows_nat_target::store_registers) ... here.
4976
4977 2018-06-26  Tom Tromey  <tom@tromey.com>
4978
4979         PR rust/22574:
4980         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4981         * rust-lang.c (rust_print_struct_def): Add podata parameter.
4982         Update.
4983         (rust_internal_print_type): Add podata parameter.
4984         (rust_print_type): Update.
4985
4986 2018-06-26  Tom Tromey  <tom@tromey.com>
4987
4988         * typeprint.h (struct print_offset_data) <update, finish,
4989         maybe_print_hole>: New methods.
4990         <indentation>: New constant.
4991         * typeprint.c (print_offset_data::indentation): Define.
4992         (print_offset_data::maybe_print_hole, print_offset_data::update)
4993         (print_offset_data::finish): Move from c-typeprint.c and rename.
4994         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4995         (print_spaces_filtered_with_print_options): Update.
4996         (c_print_type_union_field_offset, maybe_print_hole)
4997         (c_print_type_struct_field_offset): Move to typeprint.c and
4998         rename.
4999         (c_type_print_base_struct_union): Update.
5000
5001 2018-06-25  Pedro Alves  <palves@redhat.com>
5002
5003         * gdbthread.h (thread_info_ref, delete_thread)
5004         (delete_thread_silent, first_thread_of_inferior)
5005         (any_thread_of_inferior, switch_to_thread)
5006         (enable_thread_stack_temporaries)
5007         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5008         (get_last_thread_stack_temporary)
5009         (value_in_thread_stack_temporaries, can_access_registers_thread):
5010         Spell out "struct thread_info" instead of just "thread_info".
5011         * inferior.h (notice_new_inferior): Likewise.
5012
5013 2018-06-25  Pedro Alves  <palves@redhat.com>
5014
5015         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5016         pass thread_info pointer to delete_thread.
5017         (windows_nat_target::detach): Pass inferior pointer to
5018         detach_inferior.
5019         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5020         delete_thread.
5021         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5022         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5023         and pass a thread_info pointer to delete_thread.
5024         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5025         pass thread_info pointer to delete_thread.
5026         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5027         delete_thread_silent call.
5028         * procfs.c (procfs_target::detach): Pass inferior pointer to
5029         detach_inferior.
5030         (procfs_target::wait): Pass thread_info pointer to delete_thread.
5031         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5032         delete_thread_silent call.
5033         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5034         pass thread_info pointer to delete_thread.
5035         (windows_nat_target::detach): Pass inferior pointer to
5036         delete_inferior.
5037
5038 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5039
5040         * regcache.c (readable_regcache::read_part): Fix asserts.
5041         (reg_buffer::raw_collect_part): New function.
5042         (regcache::write_part): Fix asserts.
5043         (reg_buffer::raw_supply_part): New function.
5044         (regcache::transfer_regset_register): New helper function.
5045         (regcache::transfer_regset): Call new functions.
5046         (regcache_supply_regset): Use gdb_byte*.
5047         (regcache::supply_regset): Likewise.
5048         (regcache_collect_regset): Likewise.
5049         (regcache::collect_regset): Likewise.
5050         * regcache.h (reg_buffer::raw_collect_part): New declaration.
5051         (reg_buffer::raw_supply_part): Likewise.
5052         (regcache::transfer_regset_register): Likewise.
5053         (regcache::transfer_regset): Use gdb_byte*.
5054
5055 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5056
5057         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5058
5059 2018-06-21  Pedro Alves  <palves@redhat.com>
5060
5061         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5062         instead of a ptid_t.  All callers adjusted.
5063         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
5064         adjusted.
5065         (print_ada_task_info, display_current_task_id, task_command_1):
5066         Adjust.
5067         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5068         inferior_thread.
5069         (breakpoint_kind): Adjust.
5070         (remove_breakpoints_pid): Rename to ...
5071         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
5072         pointer.  All callers adjusted.
5073         (bpstat_clear_actions): Use inferior_thread.
5074         (get_bpstat_thread): New.
5075         (bpstat_do_actions): Use it.
5076         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5077         to take a thread_info pointer.  All callers adjusted.
5078         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5079         (breakpoint_re_set_thread): Use inferior_thread.
5080         * breakpoint.h (struct inferior): Forward declare.
5081         (bpstat_stop_status): Update.
5082         (remove_breakpoints_pid): Delete.
5083         (remove_breakpoints_inf): New.
5084         * bsd-uthread.c (bsd_uthread_target::wait)
5085         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5086         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5087         (maint_btrace_packet_history_cmd)
5088         (maint_btrace_clear_packet_history_cmd): Adjust.
5089         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5090         inferior_thread.
5091         * cli/cli-interp.c: Include "inferior.h".
5092         * common/refcounted-object.h (struct
5093         refcounted_object_ref_policy): New.
5094         * compile/compile-object-load.c: Include gdbthread.h.
5095         (store_regs): Use inferior_thread.
5096         * corelow.c (core_target::close): Use current_inferior.
5097         (core_target_open): Adjust to use first_thread_of_inferior and use
5098         the current inferior.
5099         * ctf.c (ctf_target::close): Adjust to use current_inferior.
5100         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5101         <thread>: ... this new field.  All references adjusted.
5102         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5103         Take a thread_info pointer instead of a ptid_t.
5104         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5105         (dummy_frame_discard, register_dummy_frame_dtor): Take a
5106         thread_info pointer instead of a ptid_t.
5107         * elfread.c: Include "inferior.h".
5108         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5109         Use inferior_thread.
5110         * eval.c (evaluate_subexp): Likewise.
5111         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5112         inferior_thread.
5113         * gdb_proc_service.h (struct thread_info): Forward declare.
5114         (struct ps_prochandle) <ptid>: Delete, replaced by ...
5115         <thread>: ... this new field.  All references adjusted.
5116         * gdbarch.h, gdbarch.c: Regenerate.
5117         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5118         'thread' parameter.  All implementations and callers adjusted.
5119         * gdbthread.h (thread_info) <set_running>: New method.
5120         (delete_thread, delete_thread_silent): Take a thread_info pointer
5121         instead of a ptid.
5122         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5123         (first_thread_of_process): Delete, replaced by ...
5124         (first_thread_of_inferior): ... this new function.  All callers
5125         adjusted.
5126         (any_live_thread_of_process): Delete, replaced by ...
5127         (any_live_thread_of_inferior): ... this new function.  All callers
5128         adjusted.
5129         (switch_to_thread, switch_to_no_thread): Declare.
5130         (is_executing): Delete.
5131         (enable_thread_stack_temporaries): Update comment.
5132         <enable_thread_stack_temporaries>: Take a thread_info pointer
5133         instead of a ptid_t.  Incref the thread.
5134         <~enable_thread_stack_temporaries>: Decref the thread.
5135         <m_ptid>: Delete
5136         <m_thr>: New.
5137         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5138         (get_last_thread_stack_temporary)
5139         (value_in_thread_stack_temporaries, can_access_registers_thread):
5140         Take a thread_info pointer instead of a ptid_t.  All callers
5141         adjusted.
5142         * infcall.c (get_call_return_value): Use inferior_thread.
5143         (run_inferior_call): Work with thread pointers instead of ptid_t.
5144         (call_function_by_hand_dummy): Work with thread pointers instead
5145         of ptid_t.  Use thread_info_ref.
5146         * infcmd.c (proceed_thread_callback): Access thread's state
5147         directly.
5148         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5149         access thread's state directly.
5150         (continue_command): Use inferior_thread.
5151         (info_program_command): Use find_thread_ptid and access thread
5152         state directly.
5153         (proceed_after_attach_callback): Use thread state directly.
5154         (notice_new_inferior): Take a thread_info pointer instead of a
5155         ptid_t.  All callers adjusted.
5156         (exit_inferior): Take an inferior pointer instead of a pid.  All
5157         callers adjusted.
5158         (exit_inferior_silent): New.
5159         (detach_inferior): Delete.
5160         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5161         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5162         (detach_inferior_command, kill_inferior_command): Use
5163         find_inferior_id instead of valid_gdb_inferior_id and
5164         gdb_inferior_id_to_pid.
5165         (inferior_command): Use inferior and thread pointers.
5166         * inferior.h (struct thread_info): Forward declare.
5167         (notice_new_inferior): Take a thread_info pointer instead of a
5168         ptid_t.  All callers adjusted.
5169         (detach_inferior): Delete declaration.
5170         (exit_inferior, exit_inferior_silent): Take an inferior pointer
5171         instead of a pid.  All callers adjusted.
5172         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5173         (valid_gdb_inferior_id): Delete.
5174         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5175         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5176         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5177         ...
5178         <inf>: ... this new field.
5179         <step_ptid>: Delete, replaced by ...
5180         <step_thread>: ... this new field.
5181         (get_displaced_stepping_state): Take an inferior pointer instead
5182         of a pid.  All callers adjusted.
5183         (displaced_step_in_progress_any_inferior): Adjust.
5184         (displaced_step_in_progress_thread): Take a thread pointer instead
5185         of a ptid_t.  All callers adjusted.
5186         (displaced_step_in_progress, add_displaced_stepping_state): Take
5187         an inferior pointer instead of a pid.  All callers adjusted.
5188         (get_displaced_step_closure_by_addr): Adjust.
5189         (remove_displaced_stepping_state): Take an inferior pointer
5190         instead of a pid.  All callers adjusted.
5191         (displaced_step_prepare_throw, displaced_step_prepare)
5192         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5193         All callers adjusted.
5194         (start_step_over): Adjust.
5195         (infrun_thread_ptid_changed): Remove bit updating ptids in the
5196         displaced step queue.
5197         (do_target_resume): Adjust.
5198         (fetch_inferior_event): Use inferior_thread.
5199         (context_switch, get_inferior_stop_soon): Take an
5200         execution_control_state pointer instead of a ptid_t.  All callers
5201         adjusted.
5202         (switch_to_thread_cleanup): Delete.
5203         (stop_all_threads): Use scoped_restore_current_thread.
5204         * inline-frame.c: Include "gdbthread.h".
5205         (inline_state) <inline_state>: Take a thread pointer instead of a
5206         ptid_t.  All callers adjusted.
5207         <ptid>: Delete, replaced by ...
5208         <thread>: ... this new field.
5209         (find_inline_frame_state): Take a thread pointer instead of a
5210         ptid_t.  All callers adjusted.
5211         (skip_inline_frames, step_into_inline_frame)
5212         (inline_skipped_frames, inline_skipped_symbol): Take a thread
5213         pointer instead of a ptid_t.  All callers adjusted.
5214         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5215         (inline_skipped_frames, inline_skipped_symbol): Likewise.
5216         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5217         pointers directly.
5218         * linux-nat.c (get_detach_signal): Likewise.
5219         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5220         (thread_db_notice_clone): Adjust.
5221         (thread_db_find_new_threads_silently)
5222         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5223         a thread pointer instead of a ptid_t.  All callers adjusted.
5224         * mi/mi-cmd-var.c: Include "inferior.h".
5225         (mi_cmd_var_update_iter): Update to use thread pointers.
5226         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5227         inferior directly.
5228         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5229         out to ...
5230         (mi_output_running): ... this new function.
5231         (mi_on_resume_1): Adjust to use it.
5232         (mi_user_selected_context_changed): Adjust to use inferior_thread.
5233         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5234         directly.
5235         (interrupt_thread_callback): : Adjust to use thread and inferior
5236         pointers.
5237         * proc-service.c: Include "gdbthread.h".
5238         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5239         * progspace-and-thread.c: Include "inferior.h".
5240         * progspace.c: Include "inferior.h".
5241         * python/py-exitedevent.c (create_exited_event_object): Adjust to
5242         hold a reference to an inferior_object.
5243         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5244         inferior_thread.
5245         * python/py-inferior.c (struct inferior_object): Give the type a
5246         tag name instead of a typedef.
5247         (python_on_normal_stop): No need to check if the current thread is
5248         listed.
5249         (inferior_to_inferior_object): Change return type to
5250         inferior_object.  All callers adjusted.
5251         (find_thread_object): Delete, bits factored out to ...
5252         (thread_to_thread_object): ... this new function.
5253         * python/py-infthread.c (create_thread_object): Use
5254         inferior_to_inferior_object.
5255         (thpy_is_stopped): Use thread pointer directly.
5256         (gdbpy_selected_thread): Use inferior_thread.
5257         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5258         field, replaced with ...
5259         <thread>: ... this new field.  All users adjusted.
5260         (btpy_insn_or_gap_new): Drop const.
5261         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
5262         callers adjusted.
5263         * python/py-record.c: Include "gdbthread.h".
5264         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5265         a ptid_t.  All callers adjusted.
5266         (gdbpy_current_recording): Use inferior_thread.
5267         * python/py-record.h (recpy_record_object) <ptid>: Delete
5268         field, replaced with ...
5269         <thread>: ... this new field.  All users adjusted.
5270         (recpy_element_object) <ptid>: Delete
5271         field, replaced with ...
5272         <thread>: ... this new field.  All users adjusted.
5273         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5274         a ptid_t.  All callers adjusted.
5275         * python/py-threadevent.c: Include "gdbthread.h".
5276         (get_event_thread): Use thread_to_thread_object.
5277         * python/python-internal.h (struct inferior_object): Forward
5278         declare.
5279         (find_thread_object, find_inferior_object): Delete declarations.
5280         (thread_to_thread_object, inferior_to_inferior_object): New
5281         declarations.
5282         * record-btrace.c: Include "inferior.h".
5283         (require_btrace_thread): Use inferior_thread.
5284         (record_btrace_frame_sniffer)
5285         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5286         (get_thread_current_frame): Use scoped_restore_current_thread and
5287         switch_to_thread.
5288         (get_thread_current_frame): Use thread pointer directly.
5289         (record_btrace_replay_at_breakpoint): Use thread's inferior
5290         pointer directly.
5291         * record-full.c: Include "inferior.h".
5292         * regcache.c: Include "gdbthread.h".
5293         (get_thread_arch_regcache): Use the inferior's address space
5294         directly.
5295         (get_thread_regcache, registers_changed_thread): New.
5296         * regcache.h (get_thread_regcache(thread_info *thread)): New
5297         overload.
5298         (registers_changed_thread): New.
5299         (remote_target) <remote_detach_1>: Swap order of parameters.
5300         (remote_add_thread): <remote_add_thread>: Return the new thread.
5301         (get_remote_thread_info(ptid_t)): New overload.
5302         (remote_target::remote_notice_new_inferior): Use thread pointers
5303         directly.
5304         (remote_target::process_initial_stop_replies): Use
5305         thread_info::set_running.
5306         (remote_target::remote_detach_1, remote_target::detach)
5307         (extended_remote_target::detach): Adjust.
5308         * stack.c (frame_show_address): Use inferior_thread.
5309         * target-debug.h (target_debug_print_thread_info_pp): New.
5310         * target-delegates.c: Regenerate.
5311         * target.c (default_thread_address_space): Delete.
5312         (memory_xfer_partial_1): Use current_inferior.
5313         (target_detach): Use current_inferior.
5314         (target_thread_address_space): Delete.
5315         (generic_mourn_inferior): Use current_inferior.
5316         * target.h (struct target_ops) <thread_address_space>: Delete.
5317         (target_thread_address_space): Delete.
5318         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
5319         pointers directly.
5320         (delete_thread_1, delete_thread, delete_thread_silent): Take a
5321         thread pointer instead of a ptid_t.  Adjust all callers.
5322         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5323         (first_thread_of_process): Delete, replaced by ...
5324         (first_thread_of_inferior): ... this new function.  All callers
5325         adjusted.
5326         (any_thread_of_process): Rename to ...
5327         (any_thread_of_inferior): ... this, and take an inferior pointer.
5328         (any_live_thread_of_process): Rename to ...
5329         (any_live_thread_of_inferior): ... this, and take an inferior
5330         pointer.
5331         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5332         (value_in_thread_stack_temporaries)
5333         (get_last_thread_stack_temporary): Take a thread pointer instead
5334         of a ptid_t.  Adjust all callers.
5335         (thread_info::set_running): New.
5336         (validate_registers_access): Use inferior_thread.
5337         (can_access_registers_ptid): Rename to ...
5338         (can_access_registers_thread): ... this, and take a thread
5339         pointer.
5340         (print_thread_info_1): Adjust to compare thread pointers instead
5341         of ptids.
5342         (switch_to_no_thread, switch_to_thread): Make extern.
5343         (scoped_restore_current_thread::~scoped_restore_current_thread):
5344         Use m_thread pointer directly.
5345         (scoped_restore_current_thread::scoped_restore_current_thread):
5346         Use inferior_thread.
5347         (thread_command): Use thread pointer directly.
5348         (thread_num_make_value_helper): Use inferior_thread.
5349         * top.c (execute_command): Use inferior_thread.
5350         * tui/tui-interp.c: Include "inferior.h".
5351         * varobj.c (varobj_create): Use inferior_thread.
5352         (value_of_root_1): Use find_thread_global_id instead of
5353         global_thread_id_to_ptid.
5354
5355 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
5356
5357         * regcache.c (readable_regcache::read_part): Avoid memcpy when
5358         possible.
5359         (regcache::write_part): Likewise.
5360         (readable_regcache::cooked_read_part): Update comment.
5361         (readable_regcache::cooked_write_part): Likewise.
5362         * regcache.h: (readable_regcache::read_part): Likewise.
5363         (regcache::write_part): Likewise.
5364
5365 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
5366             Dirk Schubert  <dirk.schubert@arm.com>
5367
5368         * aarch64-linux-nat.c (post_attach): New.
5369         (aarch64_linux_nat_target::post_attach): Override post_attach to
5370         record the number of hardware debug registers.
5371
5372 2018-06-20  Tom Tromey  <tom@tromey.com>
5373
5374         * python/py-param.c (add_setshow_generic): Make parameters const.
5375         (parmpy_init): Update.
5376
5377 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5378
5379         * regcache.h (regcache_cooked_read_ftype): Rename to...
5380         (register_read_ftype): ...this, change type to function_view.
5381         (class reg_buffer) <save>: Remove src parameter.
5382         (readonly_detached_regcache) <readonly_detached_regcache>: Make
5383         parameter non-const in first overload.  Remove src parameter in
5384         second overload.
5385         * regcache.c (do_cooked_read): Remove.
5386         (readonly_detached_regcache::readonly_detached_regcache): Make
5387         parameter non-const, adjust call to other constructor.
5388         (reg_buffer::save): Remove src parameter.
5389         * frame.c (do_frame_register_read): Remove.
5390         (frame_save_as_regcache): Use lambda function.
5391         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5392         parameter to ppu2spu_data *.
5393         (ppu2spu_sniffer): Use lambda function.
5394
5395 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5396
5397         * record-full.c (record_full_target::insert_breakpoint): Remove
5398         "struct" keyword, add const.
5399
5400 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
5401
5402         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5403         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5404         * configure.ac: Remove AC_PREREQ, add missing quoting.
5405         * gnulib/configure.ac: Modernize usage of
5406         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
5407         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5408         (AUTOMAKE_VERSION): Bump to 1.15.1.
5409         * configure: Re-generate.
5410         * config.in: Re-generate.
5411         * aclocal.m4: Re-generate.
5412         * gnulib/aclocal.m4: Re-generate.
5413         * gnulib/config.in: Re-generate.
5414         * gnulib/configure: Re-generate.
5415         * gnulib/import/Makefile.in: Re-generate.
5416
5417 2018-06-19  Pedro Alves  <palves@redhat.com>
5418
5419         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5420         (lookup_minimal_symbol_by_pc_section): ... here with
5421         gdb_assert_not_reached added.
5422
5423 2018-06-19  Pedro Alves  <palves@redhat.com>
5424
5425         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5426         parameter with a block parameter.  Compare location's block symbol
5427         with the frame's block instead of addresses.
5428         (skip_inline_frames): Pass the current block instead of the
5429         frame's address.  Break out as soon as we determine the frame
5430         should not be skipped.
5431
5432 2018-06-18  Tom Tromey  <tom@tromey.com>
5433
5434         * solib-aix.c (solib_aix_get_section_offsets): Return
5435         unique_xmalloc_ptr.
5436         (solib_aix_solib_create_inferior_hook): Update.
5437
5438 2018-06-18  Tom Tromey  <tom@tromey.com>
5439
5440         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5441
5442 2018-06-18  Tom Tromey  <tom@tromey.com>
5443
5444         * solib-frv.c (frv_relocate_main_executable): Use
5445         unique_xmalloc_ptr.
5446         * solib-dsbt.c (dsbt_relocate_main_executable): Use
5447         unique_xmalloc_ptr.
5448
5449 2018-06-18  Tom Tromey  <tom@tromey.com>
5450
5451         * objfiles.h (inhibit_section_map_updates): Update.
5452         (resume_section_map_updates, resume_section_map_updates_cleanup):
5453         Remove.
5454         * solib-svr4.c (svr4_handle_solib_event): Update.
5455         * objfiles.c (inhibit_section_map_updates): Return
5456         scoped_restore_tmpl<int>.
5457         (resume_section_map_updates, resume_section_map_updates_cleanup):
5458         Remove.
5459
5460 2018-06-18  Tom Tromey  <tom@tromey.com>
5461
5462         * valprint.h (read_string): Update.
5463         * valprint.c (read_string): Change type of "buffer".
5464         (val_print_string): Update.
5465         * python/py-value.c (valpy_string): Update.
5466         * language.h (struct language_defn) <la_get_string>: Change
5467         type of "buffer".
5468         (default_get_string, c_get_string): Update.
5469         * language.c (default_get_string): Change type of "buffer".
5470         * guile/scm-value.c (gdbscm_value_to_string): Update.
5471         * c-lang.c (c_get_string): Change type of "buffer".
5472
5473 2018-06-18  Tom Tromey  <tom@tromey.com>
5474
5475         * ser-mingw.c (struct pipe_state_destroyer): New.
5476         (pipe_state_up): New typedef.
5477         (cleanup_pipe_state): Remove.
5478         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
5479
5480 2018-06-18  Tom Tromey  <tom@tromey.com>
5481
5482         * rust-lang.h (rust_yyerror): Don't declare.
5483         * rust-lang.c (rust_language_defn): Update.
5484         * rust-exp.y (yyerror): Now static.
5485         * parse.c (parse_exp_in_context_1): Update.
5486         * p-lang.h (p_yyerror): Don't declare.
5487         * p-lang.c (p_language_defn): Update.
5488         * p-exp.y (yyerror): Now static.
5489         * opencl-lang.c (opencl_language_defn): Update.
5490         * objc-lang.c (objc_language_defn): Update.
5491         * m2-lang.h (m2_yyerror): Don't declare.
5492         * m2-lang.c (m2_language_defn): Update.
5493         * m2-exp.y (yyerror): Now static.
5494         * language.h (struct language_defn) <la_error>: Remove.
5495         * language.c (unk_lang_error): Remove.
5496         (unknown_language_defn, auto_language_defn): Remove.
5497         * go-lang.h (go_yyerror): Don't declare.
5498         * go-lang.c (go_language_defn): Update.
5499         * go-exp.y (yyerror): Now static.
5500         * f-lang.h (f_yyerror): Don't declare.
5501         * f-lang.c (f_language_defn): Update.
5502         * f-exp.y (yyerror): Now static.
5503         * d-lang.h (d_yyerror): Don't declare.
5504         * d-lang.c (d_language_defn): Update.
5505         * d-exp.y (yyerror): Now static.
5506         * c-lang.h (c_yyerror): Don't declare.
5507         * c-lang.c (c_language_defn, cplus_language_defn)
5508         (asm_language_defn, minimal_language_defn): Update.
5509         * c-exp.y (yyerror): Now static.
5510         * ada-lang.h (ada_yyerror): Don't declare.
5511         * ada-lang.c (ada_language_defn): Update.
5512         * ada-exp.y (yyerror): Now static.
5513
5514 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5515
5516         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5517         (store_sveregs_to_thread): Likewise.
5518         (aarch64_linux_fetch_inferior_registers): Check for SVE.
5519         (aarch64_linux_store_inferior_registers): Likewise.
5520         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5521         function.
5522         (aarch64_sve_regs_copy_to_regcache): Likewise.
5523         (aarch64_sve_regs_copy_from_regcache): Likewise.
5524         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5525         declaration.
5526         (aarch64_sve_regs_copy_to_regcache): Likewise.
5527         (aarch64_sve_regs_copy_from_regcache): Likewise.
5528         (sve_context): Structure from Linux headers.
5529         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5530         (SVE_SIG_ZREG_SIZE): Likewise.
5531         (SVE_SIG_PREG_SIZE): Likewise.
5532         (SVE_SIG_FFR_SIZE): Likewise.
5533         (SVE_SIG_REGS_OFFSET): Likewise.
5534         (SVE_SIG_ZREGS_OFFSET): Likewise.
5535         (SVE_SIG_ZREG_OFFSET): Likewise.
5536         (SVE_SIG_ZREGS_SIZE): Likewise.
5537         (SVE_SIG_PREGS_OFFSET): Likewise.
5538         (SVE_SIG_PREG_OFFSET): Likewise.
5539         (SVE_SIG_PREGS_SIZE): Likewise.
5540         (SVE_SIG_FFR_OFFSET): Likewise.
5541         (SVE_SIG_REGS_SIZE): Likewise.
5542         (SVE_SIG_CONTEXT_SIZE): Likewise.
5543         (SVE_PT_REGS_MASK): Likewise.
5544         (SVE_PT_REGS_FPSIMD): Likewise.
5545         (SVE_PT_REGS_SVE): Likewise.
5546         (SVE_PT_VL_INHERIT): Likewise.
5547         (SVE_PT_VL_ONEXEC): Likewise.
5548         (SVE_PT_REGS_OFFSET): Likewise.
5549         (SVE_PT_FPSIMD_OFFSET): Likewise.
5550         (SVE_PT_FPSIMD_SIZE): Likewise.
5551         (SVE_PT_SVE_ZREG_SIZE): Likewise.
5552         (SVE_PT_SVE_PREG_SIZE): Likewise.
5553         (SVE_PT_SVE_FFR_SIZE): Likewise.
5554         (SVE_PT_SVE_FPSR_SIZE): Likewise.
5555         (SVE_PT_SVE_FPCR_SIZE): Likewise.
5556         (__SVE_SIG_TO_PT): Likewise.
5557         (SVE_PT_SVE_OFFSET): Likewise.
5558         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5559         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5560         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5561         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5562         (SVE_PT_SVE_PREG_OFFSET): Likewise.
5563         (SVE_PT_SVE_PREGS_SIZE): Likewise.
5564         (SVE_PT_SVE_FFR_OFFSET): Likewise.
5565         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5566         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5567         (SVE_PT_SVE_SIZE): Likewise.
5568         (SVE_PT_SIZE): Likewise.
5569         (HAS_SVE_STATE): New define.
5570
5571 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5572
5573         * nat/aarch64-sve-linux-sigcontext.h: New file.
5574         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5575         new files.
5576         (SVE_VQ_MIN): Likewise.
5577         (SVE_VQ_MAX): Likewise.
5578         (SVE_VL_MIN): Likewise.
5579         (SVE_VL_MAX): Likewise.
5580         (SVE_NUM_ZREGS): Likewise.
5581         (SVE_NUM_PREGS): Likewise.
5582         (sve_vl_valid): Likewise.
5583         (struct user_sve_header): Likewise.
5584
5585 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
5586             Richard Bunt <Richard.Bunt@arm.com>
5587
5588         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5589         was requested by GDB.
5590
5591 2018-06-15  Tom de Vries  <tdevries@suse.de>
5592
5593         * MAINTAINERS (Write After Approval): Add Tom de Vries.
5594
5595 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
5596
5597         * gnulib/update-gnulib.sh: Print expected versions of
5598         autoconf/aclocal.
5599
5600 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
5601
5602         * arch-utils.c (default_type_align): Use type_length_units.
5603         * gdbtypes.c (type_align): Use type_length_units.
5604
5605 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5606
5607         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5608         of 'define' command.
5609
5610 2018-06-14  Tom de Vries  <tdevries@suse.de>
5611
5612         PR cli/22573
5613         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5614         get_no_prettyformat_print_options.
5615
5616 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5617
5618         * sparc-nat.h: Include target.h.
5619         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5620         <fetch_registers>: Remove this argument in function call.
5621         <store_registers>: Remove this argument in function call, remove
5622         extra semicolon.
5623         <low_forget_process>: Call sparc64_forget_process instead of
5624         sparc_forget_process.
5625
5626 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5627
5628         * procfs.c (_initialize_procfs): Use add_inf_child_target.
5629         (procfs_target::make_corefile_notes): Adjust to new
5630         target_read_alloc return type.
5631
5632 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5633             Stephen Roberts  <stephen.roberts@arm.com>
5634
5635         PR gdb/22882
5636         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5637         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5638         Move should_notify_stop local into more inner scope.
5639
5640 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5641             Stephen Roberts  <stephen.roberts@arm.com>
5642
5643         PR gdb/22882
5644         * infrun.c (resume_1): Add call to mark_async_event_handler.
5645
5646 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5647
5648         * infrun.c (do_target_wait): Change old version of $pc printed.
5649
5650 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5651
5652         * dwarf2read.c (read_index_from_section): Rename to...
5653         (read_gdb_index_from_section): ... this, update all callers.
5654         (dwarf2_read_index): Rename to...
5655         (dwarf2_read_gdb_index): ... this, update all callers.
5656
5657 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
5658
5659         * gdb/hppa-linux-nat.c
5660         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5661         hppa_linux_nat_target::fetch_registers.
5662
5663 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5664
5665         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5666         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5667         (AARCH64_DWARF_SVE_FFR): Likewise.
5668         (AARCH64_DWARF_SVE_P0): Likewise.
5669         (AARCH64_DWARF_SVE_Z0): Likewise.
5670
5671 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5672
5673         * common/common-regcache.h (raw_compare): New function.
5674         * regcache.c (regcache::raw_compare): Likewise.
5675         * regcache.h (regcache::raw_compare): New declaration.
5676
5677 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5678
5679         * common/common-regcache.h (reg_buffer_common): New structure.
5680         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5681         (reg_buffer::raw_supply): Likewise.
5682         (reg_buffer::raw_supply_integer): Likewise.
5683         (reg_buffer::raw_supply_zeroed): Likewise.
5684         (reg_buffer::raw_collect): Likewise.
5685         (reg_buffer::raw_collect_integer): Likewise.
5686         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5687         (reg_buffer::raw_supply): Likewise.
5688         (reg_buffer::raw_supply_integer): Likewise.
5689         (reg_buffer::raw_supply_zeroed): Likewise.
5690         (reg_buffer::raw_collect): Likewise.
5691         (reg_buffer::raw_collect_integer): Likewise.
5692
5693 2018-06-10  Tom Tromey  <tom@tromey.com>
5694
5695         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
5696         (class remote_state) <stop_reply_queue>: Now std::vector.
5697         (remote_state::~remote_state)
5698         (remote_target::stop_reply_queue_length): Update.
5699         (struct queue_iter_param, remove_child_of_pending_fork)
5700         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5701         (check_pending_event_prevents_wildcard_vcont_callback)
5702         (remove_stop_reply_for_inferior)
5703         (remove_stop_reply_of_remote_state)
5704         (remote_notif_remove_once_on_match)
5705         (stop_reply_match_ptid_and_ws)
5706         (remote_kill_child_of_pending_fork): Remove.
5707         (remote_target::remove_new_fork_children)
5708         (remote_target::check_pending_events_prevent_wildcard_vcont)
5709         (remote_target::discard_pending_stop_replies)
5710         (remote_target::discard_pending_stop_replies_in_queue)
5711         (remote_target::remote_notif_remove_queued_reply)
5712         (remote_target::queued_stop_reply)
5713         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5714         (remote_target::wait, remote_target::kill_new_fork_children)
5715         (remote_target::async): Update.
5716
5717 2018-06-10  Tom Tromey  <tom@tromey.com>
5718
5719         * record-full.c (record_full_arch_list_cleanups): Remove.
5720         (record_full_message): Use try/catch.
5721         (record_full_wait_cleanups): Remove.
5722         (record_full_wait_1): Use try/catch.
5723         (record_full_restore): Likewise.
5724
5725 2018-06-10  Tom Tromey  <tom@tromey.com>
5726
5727         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
5728         declare VEC.  Add constructor.
5729         <in_target_beneath>: Now bool.
5730         (record_full_breakpoints): Now a std::vector, static.
5731         (record_full_sync_record_breakpoints)
5732         (record_full_init_record_breakpoints)
5733         (record_full_target::insert_breakpoint)
5734         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
5735
5736 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5737
5738         * dwarf2read.c (process_cu_includes): Remove struct keyword.
5739         * serial.c (serial_interface_lookup): Remove struct keyword.
5740
5741 2018-06-10  Tom Tromey  <tom@tromey.com>
5742
5743         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5744         method.
5745         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5746         a method.
5747         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5748         method.
5749         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5750         "beneath" as a method.
5751         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5752         Use "beneath" as a method.
5753
5754 2018-06-10  Tom Tromey  <tom@tromey.com>
5755
5756         * tracefile.c (struct trace_file_writer_deleter): New.
5757         <operator()>: Rename from trace_file_writer_xfree.
5758         (trace_file_writer_up): New typedef.
5759         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5760
5761 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5762
5763         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5764         <m_registers, m_register_status>: Change type to
5765         std::unique_ptr.
5766         * regcache.c (reg_buffer::reg_buffer): Use new instead of
5767         XCNEWVEC.
5768
5769 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5770
5771         * common/common-regcache.h (enum register_status): Add
5772         underlying type "signed char".
5773         * regcache.h (reg_buffer) <m_register_status>: Change type to
5774         register_status *.
5775         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5776         register_status instead of signed char.
5777         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5778         (reg_buffer::get_register_status): Remove cast.
5779         (readable_regcache::raw_read): Remove cast.
5780         (readable_regcache::cooked_read): Remove cast.
5781
5782 2018-06-09  Tom Tromey  <tom@tromey.com>
5783
5784         * source.c (reverse_search_command, forward_search_command): Use
5785         scoped_fd.
5786
5787 2018-06-09  Tom Tromey  <tom@tromey.com>
5788
5789         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
5790         (serial_ops_list): Now static, std::vector.
5791         (serial_interface_lookup, serial_add_interface): Update.
5792
5793 2018-06-09  Tom Tromey  <tom@tromey.com>
5794
5795         * dwarf2read.c (process_cu_includes): Update.
5796         (process_full_comp_unit): Update.
5797         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5798         std::vector.
5799
5800 2018-06-08  Paul Koning  <paul_koning@dell.com>
5801
5802         PR gdb/23252
5803
5804         * python/python.c (do_start_initialization):
5805         Avoid call to internal Python API.
5806         (init__gdb_module): New function.
5807
5808 2018-06-08  Gary Benson <gbenson@redhat.com>
5809
5810         * linux-thread-db.c (valprint.h): New include.
5811         (struct check_thread_db_info): New structure.
5812         (check_thread_db_on_load, tdb_testinfo): New static globals.
5813         (check_thread_db, check_thread_db_callback): New functions.
5814         (try_thread_db_load_1): Run integrity checks if requested.
5815         (maintenance_check_libthread_db): New function.
5816         (_initialize_thread_db): Register "maint check libthread-db"
5817         and "maint set/show check-libthread-db".
5818         * NEWS: Mention the above new commands.
5819
5820 2018-06-08  Tom Tromey  <tom@tromey.com>
5821
5822         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5823         now a method.
5824
5825 2018-06-08  Tom Tromey  <tom@tromey.com>
5826
5827         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5828
5829 2018-06-08  Tom Tromey  <tom@tromey.com>
5830
5831         * common/btrace-common.h (struct btrace_data): Add constructor,
5832         destructor, move assignment operator.
5833         <empty, clear, fini>: New methods.
5834         <format>: Initialize.
5835         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5836         (btrace_data_empty): Don't declare.
5837         * common/btrace-common.c (btrace_data_init): Remove.
5838         (btrace_data::fini): Rename from btrace_data_fini.
5839         (btrace_data::empty): Rename from btrace_data_empty.
5840         (btrace_data::clear): Rename from btrace_data_clear.  Return
5841         bool.
5842         * btrace.h (make_cleanup_btrace_data): Don't declare.
5843         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5844         (parse_xml_btrace): Update.
5845         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5846         (maint_btrace_clear_packet_history_cmd): Update.
5847
5848 2018-06-07  Pedro Alves  <palves@redhat.com>
5849
5850         * target.h (target_ops) <beneath>: Now a method.  All references
5851         updated.
5852         (class target_stack): New.
5853         * target.c (g_target_stack): New.
5854         (g_current_top_target): Delete.
5855         (current_top_target): Get the top target out of g_target_stack.
5856         (target_stack::push, target_stack::unpush): New.
5857         (push_target, unpush_target): Reimplement.
5858         (target_is_pushed): Reimplement in terms of g_target_stack.
5859         (target_ops::beneath, target_stack::find_beneath): New.
5860
5861 2018-06-07  Pedro Alves  <palves@redhat.com>
5862
5863         * target.h (find_target_beneath): Delete declaration.
5864         * target.c (find_target_beneath): Delete definition.
5865         * aix-thread.c: All callers of find_target_beneath adjusted to
5866         call target_ops::beneath instead.
5867         * bsd-uthread.c: Likewise.
5868         * linux-thread-db.c: Likewise.
5869         * ravenscar-thread.c: Likewise.
5870         * sol-thread.c: Likewise.
5871         * spu-multiarch.c: Likewise.
5872
5873 2018-06-07  Pedro Alves  <palves@redhat.com>
5874
5875         * target.h (target_ops) <beneath>: Now a method.  All references
5876         updated.
5877         (target_ops) <m_beneath>: New.
5878         * target.c (target_ops::beneath): New.
5879         * corelow.c: Adjust all references to target_ops::beneath.
5880         * linux-thread-db.c: Likewise.
5881         * make-target-delegates: Likewise.
5882         * record-btrace.c: Likewise.
5883         * record-full.c: Likewise.
5884         * remote.c: Likewise.
5885         * target.c: Likewise.
5886         * target-delegates.c: Regenerate.
5887
5888 2018-06-07  Pedro Alves  <palves@redhat.com>
5889
5890         * target.h (target_stack): Delete.
5891         (current_top_target): Declare function.
5892         * target.c (target_stack): Delete.
5893         (g_current_top_target): New.
5894         (current_top_target): New function.
5895         * auxv.c: Use current_top_target instead of target_stack
5896         throughout.
5897         * avr-tdep.c: Likewise.
5898         * breakpoint.c: Likewise.
5899         * corefile.c: Likewise.
5900         * elfread.c: Likewise.
5901         * eval.c: Likewise.
5902         * exceptions.c: Likewise.
5903         * frame.c: Likewise.
5904         * gdbarch-selftests.c: Likewise.
5905         * gnu-v3-abi.c: Likewise.
5906         * ia64-tdep.c: Likewise.
5907         * ia64-vms-tdep.c: Likewise.
5908         * infcall.c: Likewise.
5909         * infcmd.c: Likewise.
5910         * infrun.c: Likewise.
5911         * linespec.c: Likewise.
5912         * linux-tdep.c: Likewise.
5913         * minsyms.c: Likewise.
5914         * ppc-linux-nat.c: Likewise.
5915         * ppc-linux-tdep.c: Likewise.
5916         * procfs.c: Likewise.
5917         * regcache.c: Likewise.
5918         * remote.c: Likewise.
5919         * rs6000-tdep.c: Likewise.
5920         * s390-linux-nat.c: Likewise.
5921         * s390-tdep.c: Likewise.
5922         * solib-aix.c: Likewise.
5923         * solib-darwin.c: Likewise.
5924         * solib-dsbt.c: Likewise.
5925         * solib-spu.c: Likewise.
5926         * solib-svr4.c: Likewise.
5927         * solib-target.c: Likewise.
5928         * sparc-tdep.c: Likewise.
5929         * sparc64-tdep.c: Likewise.
5930         * spu-tdep.c: Likewise.
5931         * symfile.c: Likewise.
5932         * symtab.c: Likewise.
5933         * target-descriptions.c: Likewise.
5934         * target-memory.c: Likewise.
5935         * target.c: Likewise.
5936         * target.h: Likewise.
5937         * tracefile-tfile.c: Likewise.
5938         * tracepoint.c: Likewise.
5939         * valops.c: Likewise.
5940         * valprint.c: Likewise.
5941         * value.c: Likewise.
5942         * windows-tdep.c: Likewise.
5943         * mi/mi-main.c: Likewise.
5944
5945 2018-06-07  Tom Tromey  <tom@tromey.com>
5946
5947         * valprint.h (build_address_symbolic): Declare.
5948         * printcmd.c (print_address_symbolic): Update.
5949         (build_address_symbolic): Change "name" and "filename" to
5950         std::string.
5951         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5952         Update.
5953         * defs.h (build_address_symbolic): Remove declaration.
5954
5955 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
5956
5957         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5958         (aarch64_vnv_type): Add function.
5959         (aarch64_pseudo_register_name): Add V regs for SVE.
5960         (aarch64_pseudo_register_type): Likewise.
5961         (aarch64_pseudo_register_reggroup_p): Likewise.
5962         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5963         (aarch64_pseudo_read_value): Add V regs for SVE.
5964         (aarch64_pseudo_write_2): Use V0 offset for SVE
5965         (aarch64_pseudo_write): Add V regs for SVE.
5966         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5967
5968 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5969
5970         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5971         (sve_vl_from_vq): Likewise.
5972
5973 2018-06-05  Tom Tromey  <tom@tromey.com>
5974
5975         * cli/cli-cmds.c (show_version): Update.
5976         * top.c (print_gdb_version): Add "interactive" parameter.
5977         Update.
5978         * main.c (captured_main_1): Update.
5979         * top.h (print_gdb_version): Add "interactive" parameter and a
5980         comment.
5981
5982 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
5983
5984         * common/enum-flags.h: Add trailing semicolon to example in
5985         comment.
5986
5987 2018-06-05  Tom Tromey  <tom@tromey.com>
5988
5989         PR cli/12326:
5990         * NEWS: Add entry about pager.
5991         * utils.c (pagination_disabled_for_command): New global.
5992         (prompt_for_continue): Allow "c" response to prompt.
5993         (reinitialize_more_filter): Clear
5994         pagination_disabled_for_command.
5995         (fputs_maybe_filtered): Check pagination_disabled_for_command.
5996
5997 2018-06-04  Tom Tromey  <tom@tromey.com>
5998
5999         * ada-lang.h (ada_lookup_symbol_list): Update.
6000         * ada-lang.c (resolve_subexp): Update.
6001         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
6002         parameter.
6003         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6004         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6005         results parameter to std::vector.
6006         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6007         Update.
6008         * ada-exp.y (block_lookup): Update.
6009         (select_possible_type_sym): Change type of syms.  Remove nsyms
6010         parameter.
6011         (write_var_or_type, write_name_assoc): Update.
6012
6013 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
6014
6015         * windows-nat.c (windows_nat_target::xfer_partial): Return
6016         TARGET_XFER_E_IO if we need to delegate to the target beneath
6017         but BENEATH is NULL.
6018
6019 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
6020
6021         * Makefile.in (config.status): Add configure.nat as a
6022         dependency.
6023
6024 2018-06-04  Tom Tromey  <tom@tromey.com>
6025
6026         * cp-name-parser.y (cpname_state): Add method declarations.
6027         (HANDLE_QUAL): Update.
6028         (cpname_state::d_grab, cpname_state::fill_comp)
6029         (cpname_state::make_operator, cpname_state::make_dtor)
6030         (cpname_state::make_builtin_type, cpname_state::make_name)
6031         (cpname_state::d_qualify, cpname_state::d_int_type)
6032         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6033         (%union): Move earlier.
6034
6035 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6036
6037         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6038
6039 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6040
6041         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6042         (aarch64_pseudo_write_1): Likewise.
6043         (aarch64_pseudo_read_value): Use helper.
6044         (aarch64_pseudo_write): Likewise.
6045
6046 2018-06-04  Pedro Alves  <palves@redhat.com>
6047
6048         * darwin-nat.c (darwin_ops): Delete.
6049         (darwin_attach_pid): Use get_native_target.
6050
6051 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6052
6053         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6054         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6055
6056 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6057
6058         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6059         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6060         (aarch64_gdbarch_init): Check for SVE.
6061         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6062
6063 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6064
6065         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6066         * aarch64-tdep.h (aarch64_read_description): Likewise.
6067         * arch/aarch64.c (aarch64_create_target_description): Likewise.
6068         * arch/aarch64.h (aarch64_create_target_description): Likewise.
6069         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6070         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6071         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6072
6073 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6074
6075         * value.c (value_fetch_lazy_bitfield): New.
6076         (value_fetch_lazy_memory): New.
6077         (value_fetch_lazy_register): New.
6078         (value_fetch_lazy): Factor out to smaller functions.
6079
6080 2018-06-01  Tom Tromey  <tom@tromey.com>
6081
6082         * cp-name-parser.y (backslashable, represented): Now const.
6083
6084 2018-06-01  Tom Tromey  <tom@tromey.com>
6085
6086         * cp-name-parser.y: Include parser-defs.h.
6087         (parser_fprintf): Remove declaration.
6088
6089 2018-06-01  Tom Tromey  <tom@tromey.com>
6090
6091         * cp-name-parser.y: Use %pure-parser, %lex-param, and
6092         %parse-param.
6093         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6094         (global_result): Remove globals.
6095         (struct cpname_state): New.
6096         (yyparse): Don't declare.
6097         (yylex, yyerror): Move declarations after %union.
6098         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6099         (make_name): Add state parameter.
6100         Update all callers.
6101         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6102         parameter.
6103         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6104         Update.
6105         (yylex): Add lvalp, state parameters.
6106         (yyerror): Add state parameter.
6107         (cp_demangled_name_to_comp): Update.
6108
6109 2018-06-01  Tom Tromey  <tom@tromey.com>
6110
6111         * cp-name-parser.y (parser_fprintf): Declare.
6112         (GDB_YY_REMAP_PREFIX): Define.
6113         Include yy-remap.h.  Don't redefine yy* identifiers.
6114
6115 2018-06-01  Tom Tromey  <tom@tromey.com>
6116
6117         * python/py-type.c (typy_legacy_template_argument): Update.
6118         * cp-support.h (cp_demangled_name_to_comp): Update.
6119         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6120         parameter to be a "std::string *".
6121         (main): Update.
6122
6123 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
6124
6125         * ada-lex.l: Include "diagnostics.h" instead of
6126         "common/diagnostics.h".
6127         * unittests/environ-selftests.c: Likewise.
6128         * common/diagnostics.h: Moved to ../include.
6129
6130 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
6131
6132         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6133         to language_mode_manual while calling breakpoint_re_set_one.
6134
6135 2018-06-01  Tom Tromey  <tom@tromey.com>
6136
6137         * valops.c (value_cast_structs, destructor_name_p): Update.
6138         * symtab.c (gdb_mangle_name): Update.
6139         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6140         Update.
6141         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6142         (pascal_object_print_value_fields, pascal_object_print_value):
6143         Update.
6144         * p-typeprint.c (pascal_type_print_derivation_info): Update.
6145         * linespec.c (find_methods): Update.
6146         * gdbtypes.h (type_name_no_tag): Remove.
6147         (type_name_or_error): Rename from type_name_no_tag_or_error.
6148         * gdbtypes.c (type_name_no_tag): Remove.
6149         (type_name_or_error): Rename from type_name_no_tag_or_error.
6150         (lookup_struct_elt_type, check_typedef): Update.
6151         * expprint.c (print_subexp_standard): Update.
6152         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6153         * d-namespace.c (d_lookup_nested_symbol): Update.
6154         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6155         (cp_print_class_member): Update.
6156         * cp-namespace.c (cp_lookup_nested_symbol): Update.
6157         * completer.c (add_struct_fields): Update.
6158         * c-typeprint.c (cp_type_print_derivation_info)
6159         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6160         Update.
6161         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6162         (ada_prefer_type, ada_is_exception_sym): Update.
6163
6164 2018-06-01  Tom Tromey  <tom@tromey.com>
6165
6166         * valops.c (enum_constant_from_type, value_namespace_elt)
6167         (value_maybe_namespace_elt): Update.
6168         * valarith.c (find_size_for_pointer_math): Update.
6169         * target-descriptions.c (make_gdb_type): Update.
6170         * symmisc.c (print_symbol): Update.
6171         * stabsread.c (define_symbol, read_type)
6172         (complain_about_struct_wipeout, add_undefined_type)
6173         (cleanup_undefined_types_1): Update.
6174         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6175         (rust_range_type_p, val_print_struct, rust_print_struct_def)
6176         (rust_internal_print_type, rust_composite_type)
6177         (rust_evaluate_funcall, rust_evaluate_subexp)
6178         (rust_inclusive_range_type_p): Update.
6179         * python/py-type.c (typy_get_tag): Update.
6180         * p-typeprint.c (pascal_type_print_base): Update.
6181         * mdebugread.c (parse_symbol, parse_type): Update.
6182         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6183         Update.
6184         * guile/scm-type.c (gdbscm_type_tag): Update.
6185         * go-lang.c (sixg_string_p): Update.
6186         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6187         Update.
6188         * gdbtypes.h (struct main_type) <tag_name>: Remove.
6189         (TYPE_TAG_NAME): Remove.
6190         * gdbtypes.c (type_name_no_tag): Simplify.
6191         (check_typedef, check_types_equal, recursive_dump_type)
6192         (copy_type_recursive, arch_composite_type): Update.
6193         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
6194         in summary mode when needed.
6195         * eval.c (evaluate_funcall): Update.
6196         * dwarf2read.c (fixup_go_packaging, read_structure_type)
6197         (process_structure_scope, read_enumeration_type)
6198         (read_namespace_type, read_module_type, determine_prefix): Update.
6199         * cp-support.c (inspect_type): Update.
6200         * coffread.c (process_coff_symbol, decode_base_type): Update.
6201         * c-varobj.c (c_is_path_expr_parent): Update.
6202         * c-typeprint.c (c_type_print_base_struct_union): Update.
6203         (c_type_print_base_1): Update.  Print struct/class/union/enum in
6204         summary when using C language.
6205         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6206         (gen_maybe_namespace_elt): Update.
6207         * ada-lang.c (ada_type_name): Simplify.
6208         (empty_record, ada_template_to_fixed_record_type_1)
6209         (template_to_static_fixed_type)
6210         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6211
6212 2018-06-01  Tom Tromey  <tom@tromey.com>
6213
6214         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6215         c_print_type.
6216         * c-typeprint.c (c_print_type_1): Add "language" parameter.
6217         (c_print_type): Update.
6218         (c_print_type): New overload.
6219         (c_type_print_varspec_prefix, c_type_print_args)
6220         (c_type_print_varspec_suffix, c_print_type_no_offsets)
6221         (c_type_print_base_struct_union, c_type_print_base_1)
6222         (cp_type_print_method_args): Add "language" parameter.
6223         (c_type_print_base): Update.
6224         * c-lang.h (c_print_type): Add new overload.
6225
6226 2018-06-01  Tom Tromey  <tom@tromey.com>
6227
6228         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6229         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6230
6231 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
6232
6233         * aarch64-tdep.c (aarch64_sve_register_names): New const
6234         var.
6235         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6236         (AARCH64_SVE_Z_REGS_NUM): New define.
6237         (AARCH64_SVE_P_REGS_NUM): Likewise.
6238         (AARCH64_SVE_NUM_REGS): Likewise.
6239
6240 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
6241
6242         * nat/linux-ptrace.h [__alpha__]
6243         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6244         definitions.
6245
6246 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
6247
6248         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6249         the endianness selected.
6250         * NEWS: Document `set endian auto' mode operation update.
6251
6252 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6253
6254         * Makefile.in: Add new header.
6255         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6256         (sve_vl_from_vg): Likewise.
6257         (sve_vq_from_vl): Likewise.
6258         (sve_vl_from_vq): Likewise.
6259         (sve_vq_from_vg): Likewise.
6260         (sve_vg_from_vq): Likewise.
6261         * configure.nat: Add new c file.
6262         * nat/aarch64-sve-linux-ptrace.c: New file.
6263         * nat/aarch64-sve-linux-ptrace.h: New file.
6264
6265 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6266
6267         * aarch64-linux-nat.c (aarch64_linux_read_description):
6268         Add parmeter zero.
6269         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6270         Likewise.
6271         * aarch64-tdep.c (tdesc_aarch64_list): Add.
6272         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6273         (aarch64_gdbarch_init): Add parmeter zero.
6274         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6275         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6276         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6277         parmeter.
6278         * doc/gdb.texinfo: Describe SVE feature
6279         * features/aarch64-sve.c: New file.
6280
6281 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
6282
6283         PR gdb/23210
6284         * gdbarch.sh (significant_addr_bit): Default to zero when
6285         not set by target architecture.
6286         * gdbarch.c: Re-generated.
6287         * utils.c (address_significant): Update.
6288
6289 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
6290
6291         * stack.c (func_command): Remove trailing newline in call to error.
6292
6293 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6294
6295         * regcache.h (regcache_raw_collect): Remove, update callers to
6296         use regcache::raw_collect.
6297         * regcache.c (regcache_raw_collect): Remove.
6298
6299 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6300
6301         * regcache.h (regcache_raw_supply): Remove, update callers to
6302         use detached_regcache::raw_supply.
6303         * regcache.c (regcache_raw_supply): Remove.
6304
6305 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6306
6307         * regcache.h (regcache_cooked_write_part): Remove, update
6308         callers to use regcache::cooked_write_part.
6309         * regcache.c (regcache_cooked_write_part): Remove.
6310
6311 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6312
6313         * regcache.h (regcache_cooked_read_part): Remove, update callers
6314         to use readable_regcache::cooked_read_part.
6315         * regcache.c (regcache_cooked_read_part): Remove.
6316
6317 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6318
6319         * regcache.h (regcache_cooked_read_value): Remove, update
6320         callers to use readable_regcache::cooked_read_value.
6321         * regcache.c (regcache_cooked_read_value): Remove.
6322
6323 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6324
6325         * regcache.h (regcache_cooked_write): Remove, update callers to
6326         use regcache::cooked_write.
6327         * regcache.c (regcache_cooked_write): Remove.
6328
6329 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6330
6331         * regcache.h (regcache_invalidate): Remove, update callers to
6332         use detached_regcache::invalidate instead.
6333         * regcache.c (regcache_invalidate): Remove.
6334
6335 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6336
6337         * regcache.h (regcache_raw_write_part): Remove, update callers
6338         to use regcache::raw_write_part instead.
6339         * regcache.c (regcache_raw_write_part): Remove.
6340
6341 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6342
6343         * regcache.h (regcache_raw_read_part): Remove, update callers to
6344         use readable_regcache::raw_read_part instead.
6345         * regcache.c (regcache_raw_read_part): Remove.
6346
6347 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6348
6349         * regcache.h (regcache_cooked_read): Remove, update callers to
6350         use readable_regcache::cooked_read instead.
6351         * regcache.c (regcache_cooked_read): Remove.
6352
6353 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6354
6355         * regcache.h (regcache_raw_write): Remove, update callers to use
6356         regcache::raw_write instead.
6357         * regcache.c (regcache_raw_write): Remove.
6358
6359 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6360
6361         * regcache.h (regcache_raw_read): Remove, update callers to use
6362         readable_regcache::raw_read instead.
6363         * regcache.c (regcache_raw_read): Remove.
6364
6365 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6366
6367         * regcache.h (regcache_raw_update): Remove, update callers to
6368         use readable_regcache::raw_update instead.
6369         * regcache.c (regcache_raw_update): Remove.
6370
6371 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6372
6373         * regcache.h (regcache_register_status): Remove, update callers
6374         to use reg_buffer::get_register_status directly instead.
6375         * regcache.c (regcache_register_status): Remove.
6376
6377 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6378
6379         * regcache.h (regcache_get_ptid): Remove, update all callers to
6380         call regcache::ptid instead.
6381         * regcache.c (regcache_get_ptid): Remove.
6382
6383 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6384
6385         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6386
6387 2018-05-30  Pedro Alves  <palves@redhat.com>
6388
6389         * common/common-exceptions.h (exception_rethrow): Use
6390         ATTRIBUTE_NORETURN.
6391
6392 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
6393
6394         * breakpoint.c (print_solib_event, check_status_catch_solib):
6395         Remove struct keyword in range-based for loops.
6396         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6397         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6398         Likewise.
6399         * linespec.c (find_superclass_methods, search_minsyms_for_name):
6400         Likewise.
6401         * symfile.c (addr_info_make_relative): Likewise.
6402         * thread.c (value_in_thread_stack_temporaries): Likewise.
6403
6404 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
6405
6406         PR gdb/16841
6407         * valops.c (value_struct_elt_for_reference): Call check_typedef on
6408         aggregate type to get its real type before accessing it.
6409
6410 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
6411
6412         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6413         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6414         * coff-pe-read.c (add_pe_forwarded_sym): Replace
6415         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6416         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6417         * jit.c (jit_breakpoint_re_set_internal): Likewise.
6418         * printcmd.c (info_address_command): Likewise.
6419
6420 2018-05-29  Tom Tromey  <tom@tromey.com>
6421
6422         * windows-nat.c (handle_exception): Update fall-through comment.
6423
6424 2018-05-29  Tom Tromey  <tom@tromey.com>
6425
6426         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
6427         (struct program_space) <added_solibs>: Now a std::vector.
6428         * breakpoint.c (print_solib_event): Update.
6429         (check_status_catch_solib): Update.
6430         * progspace.c (clear_program_space_solib_cache): Update.
6431         * solib.c (update_solib_list): Update.
6432
6433 2018-05-29  Tom Tromey  <tom@tromey.com>
6434
6435         * python/py-type.c (typy_richcompare): Update.
6436         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6437         * gdbtypes.h (types_deeply_equal): Return bool.
6438         (types_equal): Likewise.
6439         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
6440         declare VEC.
6441         (check_types_equal): Change worklist to std::vector.  Return
6442         bool.
6443         (struct type_equality_entry): Add constructor.
6444         (compare_maybe_null_strings): Return bool.
6445         (check_types_worklist): Return bool.  Change worklist to
6446         std::vector.
6447         (types_deeply_equal): Use std::vector.
6448         (types_equal): Return bool.
6449         (compare_maybe_null_strings): Simplify.
6450
6451 2018-05-29  Tom Tromey  <tom@tromey.com>
6452
6453         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
6454
6455 2018-05-29  Tom Tromey  <tom@tromey.com>
6456
6457         * objc-lang.h: Don't include cp-support.h.
6458         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
6459         declare VEC.
6460
6461 2018-05-27  Tom Tromey  <tom@tromey.com>
6462
6463         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6464
6465 2018-05-25  Tom Tromey  <tom@tromey.com>
6466
6467         * value.c (value::location): Initialize.
6468
6469 2018-05-25  Tom Tromey  <tom@tromey.com>
6470
6471         * dbxread.c (init_bincl_list): Remove.
6472         (bincl_list): Now a std::vector.
6473         (bincls_allocated, next_bincl): Remove.
6474         (free_bincl_list, do_free_bincl_list_cleanup)
6475         (make_cleanup_free_bincl_list): Remove.
6476         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6477         unique_xmalloc_ptr.
6478         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6479         (struct header_file_location): Add constructor.
6480         (add_bincl_to_list): Remove.
6481
6482 2018-05-25  Tom Tromey  <tom@tromey.com>
6483
6484         * tui/tui.c (tui_enable): Update.
6485         * mi/mi-interp.c (mi_interp::init): Update.
6486         * interps.h (class interp) <name>: New method.
6487         <m_name>: Rename from name.
6488         (~scoped_restore_interp): Update.
6489         * interps.c (interp::interp): Update.
6490         (interp_add, interp_set, interp_lookup_existing)
6491         (current_interp_named_p): Update.
6492
6493 2018-05-25  Tom Tromey  <tom@tromey.com>
6494
6495         * interps.c (interp_name): Remove.
6496         * mi/mi-interp.c (mi_interp::init): Update.
6497         * interps.h (interp_name): Remove.
6498         (~scoped_restore_interp): Update.
6499         * tui/tui.c (tui_enable): Update.
6500
6501 2018-05-25  Tom Tromey  <tom@tromey.com>
6502
6503         * utils.c (fputs_maybe_filtered): Update.
6504         * linespec.c (decode_line_full): Update.
6505         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6506         (mi_print_breakpoint_for_event, mi_solib_loaded)
6507         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6508         (mi_user_selected_context_changed): Update.
6509         * mi/mi-main.c (mi_execute_command): Update.
6510         * cli/cli-script.c (execute_control_command): Update.
6511         * python/python.c (execute_gdb_command): Update.
6512         * solib.c (info_sharedlibrary_command): Update.
6513         * interps.c (interp_ui_out): Remove.
6514         * interps.h (interp_ui_out): Remove.
6515
6516 2018-05-25  Tom Tromey  <tom@tromey.com>
6517
6518         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6519         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6520         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6521
6522 2018-05-25  Tom Tromey  <tom@tromey.com>
6523
6524         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6525         * interps.c (interp_exec): Use scoped_restore.
6526
6527 2018-05-25  Tom Tromey  <tom@tromey.com>
6528
6529         * remote.c (remote_target::remote_file_get): Use
6530         gdb::byte_vector.
6531         (remote_target::remote_file_put): Likewise.
6532
6533 2018-05-25  Tom Tromey  <tom@tromey.com>
6534
6535         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6536         a std::string.
6537         (get_pe_section_index, add_pe_exported_sym): Update.
6538         (read_pe_exported_syms): Use gdb::def_vector.
6539
6540 2018-05-25  Tom Tromey  <tom@tromey.com>
6541
6542         * frame.c (remove_prev_frame): Remove.
6543         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6544
6545 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
6546
6547         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6548         Remove prototypes.
6549         * mips-linux-nat.c (supply_fpregset): Always call
6550         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6551         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6552         `mips_fill_fpregset'.
6553         * mips-linux-tdep.c (mips_supply_fpregset)
6554         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6555         (mips_fill_fpregset_wrapper): Remove functions.
6556         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6557         (mips_linux_fpregset): Remove variable.
6558         (mips_linux_iterate_over_regset_sections): Use
6559         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6560         (mips_linux_o32_sigframe_init): Remove comment.
6561
6562 2018-05-25  Pedro Alves  <palves@redhat.com>
6563
6564         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6565         (struct readahead_cache, struct packet_reg, struct
6566         remote_arch_state, class remote_state): Move higher up in the
6567         file.
6568         (remote_target::m_remote_state): Now an object instead of a pointer.
6569         (remote_target::get_remote_state): Adjust.
6570
6571 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6572
6573         * stack.c (select_and_print_frame): Delete.
6574         (struct function_bounds): Move struct within function.
6575         (func_command): Most content moved into new function
6576         find_frame_for_function, use new function, print result, add
6577         function comment.
6578         (find_frame_for_function): New function, now returns a result.
6579
6580 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6581
6582         * stack.c (iterate_over_block_arg_vars): Fix comment.
6583         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6584
6585 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6586
6587         PR gdb/23203
6588         * frame.c
6589         (scoped_restore_selected_frame::scoped_restore_selected_frame):
6590         Define.
6591         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6592         Define.
6593         * frame.h (class scoped_restore_selected_frame): New class.
6594         * stack.c (print_frame_local_vars): Remove catching and rethrowing
6595         of any exception, use scoped_restore_selected_frame to restore the
6596         frame instead.
6597
6598 2018-05-24  Pedro Alves  <palves@redhat.com>
6599
6600         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6601         override.
6602
6603 2018-05-23  Tom Tromey  <tom@tromey.com>
6604
6605         * complaints.c (struct complaints): Remove.
6606         (symfile_complaint_book): Remove.
6607         (series): New global.
6608         (complaint_internal): Update.
6609         (clear_complaints): Update.
6610
6611 2018-05-23  Tom Tromey  <tom@tromey.com>
6612
6613         * complaints.c (counters): New global.
6614         (struct complain): Remove.
6615         (struct complaints) <root>: Remove.
6616         (complaint_sentinel): Remove.
6617         (symfile_complaint_book): Update.
6618         (find_complaint) Remove.
6619         (complaint_internal, clear_complaints): Update.
6620
6621 2018-05-23  Tom Tromey  <tom@tromey.com>
6622
6623         * complaints.c (struct complain) <file, line>: Remove.
6624         (find_complaint): Remove file, line parameters.
6625         (complaint_internal): Update.
6626
6627 2018-05-23  Tom Tromey  <tom@tromey.com>
6628
6629         * complaints.c (vcomplaint): Remove.
6630         (complaint_internal) Merge in contents of vcomplaint.
6631
6632 2018-05-23  Tom Tromey  <tom@tromey.com>
6633
6634         * complaints.c (struct complaints) <explanation>: Remove.
6635         (symfile_explanations): Remove.
6636         (symfile_complaint_book): Update.
6637         (vcomplaint): Update.
6638         (struct explanation): Remove.
6639
6640 2018-05-23  Tom Tromey  <tom@tromey.com>
6641
6642         * complaints.c (symfile_complaints): Remove.
6643         (complaint_internal): Remove "complaints" parameter.
6644         (clear_complaints, vcomplaint): Remove "c" parameter.
6645         (get_complaints): Remove.
6646         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6647         (dwarf2_debug_line_missing_file_complaint)
6648         (dwarf2_debug_line_missing_end_sequence_complaint)
6649         (dwarf2_complex_location_expr_complaint)
6650         (dwarf2_const_value_length_mismatch_complaint)
6651         (dwarf2_section_buffer_overflow_complaint)
6652         (dwarf2_macro_malformed_definition_complaint)
6653         (dwarf2_invalid_attrib_class_complaint)
6654         (create_addrmap_from_index, dw2_symtab_iter_next)
6655         (dw2_expand_marked_cus)
6656         (dw2_debug_names_iterator::find_vec_in_debug_names)
6657         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6658         (create_debug_type_hash_table, init_cutu_and_read_dies)
6659         (partial_die_parent_scope, add_partial_enumeration)
6660         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6661         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6662         (read_import_statement, read_file_scope, create_dwo_cu_reader)
6663         (create_cus_hash_table, create_dwp_hash_table)
6664         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6665         (dwarf2_rnglists_process, dwarf2_ranges_process)
6666         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6667         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6668         (handle_struct_member_die, process_structure_scope)
6669         (read_array_type, read_common_block, read_module_type)
6670         (read_tag_pointer_type, read_typedef, read_base_type)
6671         (read_subrange_type, load_partial_dies, partial_die_info::read)
6672         (partial_die_info::read, partial_die_info::read)
6673         (partial_die_info::read, read_checked_initial_length_and_offset)
6674         (dwarf2_string_attr, read_formatted_entries)
6675         (dwarf_decode_line_header)
6676         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6677         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6678         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6679         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6680         (get_signatured_type, get_DW_AT_signature_type)
6681         (decode_locdesc, file_file_name, consume_improper_spaces)
6682         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6683         (dwarf_decode_macro_bytes, dwarf_decode_macros)
6684         (dwarf2_symbol_mark_computed, set_die_type)
6685         (read_attribute_value): Update.
6686         * stap-probe.c (handle_stap_probe, get_stap_base_address):
6687         Update.
6688         * dbxread.c (unknown_symtype_complaint)
6689         (lbrac_mismatch_complaint, repeated_header_complaint)
6690         (set_namestring, function_outside_compilation_unit_complaint)
6691         (read_dbx_symtab, process_one_symbol): Update.
6692         * gdbtypes.c (stub_noname_complaint): Update.
6693         * windows-nat.c (handle_unload_dll): Update.
6694         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6695         (decode_base_type): Update.
6696         * xcoffread.c (bf_notfound_complaint, ef_complaint)
6697         (eb_complaint, record_include_begin, record_include_end)
6698         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6699         (process_xcoff_symbol, read_symbol)
6700         (function_outside_compilation_unit_complaint)
6701         (scan_xcoff_symtab): Update.
6702         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6703         * buildsym.c (finish_block_internal, make_blockvector)
6704         (end_symtab_get_static_block, augment_type_symtab): Update.
6705         * dtrace-probe.c (dtrace_process_dof)
6706         (dtrace_static_probe_ops::get_probes): Update.
6707         * complaints.h (struct complaint): Don't declare.
6708         (symfile_complaints): Remove.
6709         (complaint_internal): Remove "complaints" parameter.
6710         (complaint): Likewise.
6711         (clear_complaints): Likewise.
6712         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6713         (reread_symbols): Update.
6714         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6715         (dwarf2_frame_cache, decode_frame_entry): Update.
6716         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6717         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6718         (info_selectors_command): Update.
6719         * macrotab.c (macro_include, check_for_redefinition)
6720         (macro_undef): Update.
6721         * objfiles.c (filter_overlapping_sections): Update.
6722         * stabsread.c (invalid_cpp_abbrev_complaint)
6723         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6724         (define_symbol, error_type, read_type, rs6000_builtin_type)
6725         (stabs_method_name_from_physname, read_member_functions)
6726         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6727         (attach_fields_to_type, complain_about_struct_wipeout)
6728         (read_range_type, read_args, common_block_start)
6729         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6730         Update.
6731         * mdebugread.c (index_complaint, unknown_ext_complaint)
6732         (basic_type_complaint, bad_tag_guess_complaint)
6733         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6734         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6735         (parse_procedure, parse_lines)
6736         (function_outside_compilation_unit_complaint)
6737         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6738         (bad_tag_guess_complaint, reg_value_complaint): Update.
6739         * cp-support.c (demangled_name_complaint): Update.
6740         * macroscope.c (sal_macro_scope): Update.
6741         * dwarf-index-write.c (class debug_names): Update.
6742
6743 2018-05-23  Tom Tromey  <tom@tromey.com>
6744
6745         * complaints.c (clear_complaints): Remove "noisy" parameter.
6746         * complaints.h (clear_complaints): Update.
6747         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6748         (reread_symbols): Update.
6749
6750 2018-05-23  Tom Tromey  <tom@tromey.com>
6751
6752         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6753         SUBSEQUENT_MESSAGE.
6754         (vcomplaint, clear_complaints): Update.
6755         (symfile_explanations): Remove some messages.
6756
6757 2018-05-23  Tom Tromey  <tom@tromey.com>
6758
6759         * complaints.c (internal_complaint): Remove.
6760         * complaints.h (internal_complaint): Remove.
6761
6762 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6763
6764         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6765
6766 2018-05-22  Pedro Alves  <palves@redhat.com>
6767
6768         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6769         (remote_fileio_badfd, remote_fileio_return_errno)
6770         (remote_fileio_return_success, remote_fileio_func_open)
6771         (remote_fileio_func_open, remote_fileio_func_close)
6772         (remote_fileio_func_read, remote_fileio_func_write)
6773         (remote_fileio_func_lseek, remote_fileio_func_rename)
6774         (remote_fileio_func_unlink, remote_fileio_func_stat)
6775         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6776         (remote_fileio_func_isatty, remote_fileio_func_system): Add
6777         remote_target parameter.
6778         (remote_fio_func_map) <func>: Add remote_target parameter.
6779         (do_remote_fileio_request, remote_fileio_request):
6780         * remote-fileio.h (remote_fileio_request):
6781         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6782         remote_target parameter.
6783         (remote_notif_process, handle_notification): Adjust to pass down
6784         the remote.
6785         (remote_notif_state_allocate): Add remote_target parameter.  Save
6786         it.
6787         * remote-notif.h (struct remote_target): Forward declare.
6788         (struct notif_client) <parse, ack, can_get_pending_events>: Add
6789         remote_target parameter.
6790         (struct remote_notif_state) <remote>: New field.
6791         (remote_notif_ack, remote_notif_parse): Add remote_target
6792         parameter.
6793         (remote_notif_state_allocate, remote_notif_state_allocate): Add
6794         remote_target parameter.
6795         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6796         (threads_listing_context, rmt_thread_action, protocol_feature)
6797         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6798         (packet_result, struct threads_listing_context, remote_state):
6799         Move definitions and declarations higher up.
6800         (remote_target) <~remote_target>: Declare.
6801         (remote_download_command_source, remote_file_put, remote_file_get)
6802         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6803         (remote_hostio_pread_vFile, remote_hostio_send_command)
6804         (remote_hostio_set_filesystem, remote_hostio_open)
6805         (remote_hostio_close, remote_hostio_unlink, remote_state)
6806         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6807         (get_memory_write_packet_size, get_memory_read_packet_size)
6808         (append_pending_thread_resumptions, remote_detach_1)
6809         (append_resumption, remote_resume_with_vcont)
6810         (add_current_inferior_and_thread, wait_ns, wait_as)
6811         (process_stop_reply, remote_notice_new_inferior)
6812         (process_initial_stop_replies, remote_add_thread)
6813         (btrace_sync_conf, remote_btrace_maybe_reopen)
6814         (remove_new_fork_children, kill_new_fork_children)
6815         (discard_pending_stop_replies, stop_reply_queue_length)
6816         (check_pending_events_prevent_wildcard_vcont)
6817         (discard_pending_stop_replies_in_queue, stop_reply)
6818         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6819         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6820         (remote_interrupt_as, remote_interrupt_ns)
6821         (remote_get_noisy_reply, remote_query_attached)
6822         (remote_add_inferior, remote_current_thread, get_current_thread)
6823         (set_thread, set_general_thread, set_continue_thread)
6824         (set_general_process, write_ptid)
6825         (remote_unpack_thread_info_response, remote_get_threadinfo)
6826         (parse_threadlist_response, remote_get_threadlist)
6827         (remote_threadlist_iterator, remote_get_threads_with_ql)
6828         (remote_get_threads_with_qxfer)
6829         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6830         (get_offsets, remote_check_symbols, remote_supported_packet)
6831         (remote_query_supported, remote_packet_size)
6832         (remote_serial_quit_handler, remote_detach_pid)
6833         (remote_vcont_probe, remote_resume_with_hc)
6834         (send_interrupt_sequence, interrupt_query)
6835         (remote_notif_get_pending_events, fetch_register_using_p)
6836         (send_g_packet, process_g_packet, fetch_registers_using_g)
6837         (store_register_using_P, store_registers_using_G)
6838         (set_remote_traceframe, check_binary_download)
6839         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6840         (remote_xfer_live_readonly_partial, remote_read_bytes)
6841         (remote_send_printf, remote_flash_write, readchar)
6842         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6843         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6844         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6845         (extended_remote_disable_randomization, extended_remote_run)
6846         (send_environment_packet, extended_remote_environment_support)
6847         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6848         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6849         (packet_command): Now methods of ...
6850         (remote_target): ... this class.
6851         (m_remote_state) <remote_target>: New field.
6852         (struct remote_state) <stop_reply_queue,
6853         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6854         fields.
6855         (remote_state::remote_state): Allocate stop_reply_queue.
6856         (remote_state): Delete global.
6857         (get_remote_state_raw): Delete.
6858         (remote_target::get_remote_state): Allocate m_remote_state on
6859         demand.
6860         (get_current_remote_target): New.
6861         (remote_ops, extended_remote_ops): Delete.
6862         (wait_forever_enabled_p, remote_async_inferior_event_token):
6863         Delete, moved to struct remote_state.
6864         (remote_target::close): Delete self.  Destruction bits split to
6865         ...
6866         (remote_target::~remote_target): ... this.
6867         (show_memory_packet_size): Adjust to use
6868         get_current_remote_target.
6869         (struct protocol_feature) <func>: Add remote_target parameter.
6870         All callers adjusted.
6871         (curr_quit_handler_target): New.
6872         (remote_serial_quit_handler): Reimplement.
6873         (remote_target::open_1): Adjust to use get_current_remote_target.
6874         Heap-allocate remote_target/extended_remote_target instances.
6875         (vcont_builder::vcont_builder): Add remote_target parameter, and
6876         save it in m_remote.  All callers adjusted.
6877         (vcont_builder::m_remote): New field.
6878         (vcont_builder::restart, vcont_builder::flush)
6879         (vcont_builder::push_action): Use it.
6880         (remote_target::commit_resume): Use it.
6881         (struct queue_iter_param) <remote>: New field.
6882         (remote_target::remove_new_fork_children): Fill in 'remote' field.
6883         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6884         (check_pending_event_prevents_wildcard_vcont_callback)
6885         (remote_target::check_pending_events_prevent_wildcard_vcont)
6886         (remote_target::discard_pending_stop_replies)
6887         (remote_target::discard_pending_stop_replies_in_queue)
6888         (remote_target::remote_notif_remove_queued_reply): Fill in
6889         'remote' field.
6890         (remote_notif_get_pending_events): New.
6891         (remote_target::readchar, remote_target::remote_serial_write):
6892         Save/restore curr_quit_handler_target.
6893         (putpkt): New.
6894         (kill_new_fork_children): Fill in 'remote' field.
6895         (packet_command): Use get_current_remote_target, defer to
6896         remote_target method of same name.
6897         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6898         parameter, and save it in m_remote.  All callers adjusted.
6899         (scoped_remote_fd::release): Use m_remote.
6900         (scoped_remote_fd::m_remote): New field.
6901         (remote_file_put, remote_file_get, remote_file_delete): Use
6902         get_current_remote_target, defer to remote_target method of same
6903         name.
6904         (remote_btrace_reset): Add remote_state paremeter.  Update all
6905         callers.
6906         (remote_async_inferior_event_handler). Pass down 'data'.
6907         (remote_new_objfile): Use get_current_remote_target.
6908         (remote_target::vcont_r_supported): New.
6909         (set_range_stepping): Use get_current_remote_target and
6910         remote_target::vcont_r_supported.
6911         (_initialize_remote): Don't allocate 'remote_state' and
6912         'stop_reply_queue' globals.
6913         * remote.h (struct remote_target): Forward declare.
6914         (getpkt, putpkt, remote_notif_get_pending_events): Add
6915         'remote_target' parameter.
6916
6917 2018-05-22  Pedro Alves  <palves@redhat.com>
6918
6919         * remote.c (vcont_builder): Now a class.  Make all data members
6920         private.
6921         (vcont_builder) <vcont_builder, restart, flush, push_action>:
6922         Declare methods.
6923         (vcont_builder_restart): Rename to ...
6924         (vcont_builder::restart): ... this.
6925         (vcont_builder_flush): Rename to ...
6926         (vcont_builder::flush): ... this.
6927         (vcont_builder_push_action): Rename to ...
6928         (vcont_builder::push_action): ... this.
6929         (remote_target::commit_resume): Adjust.
6930
6931 2018-05-22  Pedro Alves  <palves@redhat.com>
6932
6933         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6934         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6935         (get_fixed_memory_packet_size): New.
6936         (get_memory_packet_size): Use it.
6937         (set_memory_packet_size): Don't override the config size with
6938         DEFAULT_MAX_MEMORY_PACKET_SIZE.
6939         (show_memory_packet_size): Use get_fixed_memory_packet_size.
6940         Don't refer to get_memory_packet_size if not connected to a remote
6941         target.  Show "(default)" if configured size is 0.
6942
6943 2018-05-22  Pedro Alves  <palves@redhat.com>
6944
6945         * remote.c (remote_target::mourn_inferior): Move
6946         discard_pending_stop_replies call here from ...
6947         (_initialize_remote): ... here.
6948
6949 2018-05-22  Pedro Alves  <palves@redhat.com>
6950
6951         * remote.c (compare_section_command): Remove set_general_process
6952         call.
6953
6954 2018-05-22  Pedro Alves  <palves@redhat.com>
6955
6956         * remote.c (struct packet_reg, struct remote_arch_state):
6957         Move higher up in the file.
6958         (remote_state) <m_arch_states>: Store remote_arch_state values
6959         instead of remote_arch_state pointers.
6960         (remote_state::get_remote_arch_state): Adjust.
6961
6962 2018-05-22  Pedro Alves  <palves@redhat.com>
6963
6964         * remote.c: Include <unordered_map>.
6965         (remote_state): Now a class.
6966         (remote_state) <get_remote_arch_state>: Declare method.
6967         <get_remote_arch_state>: New field.
6968         (remote_arch_state) <remote_arch_state>: Declare ctor.
6969         <regs>: Now a unique_ptr.
6970         (remote_gdbarch_data_handle): Delete.
6971         (get_remote_arch_state): Delete.
6972         (remote_state::get_remote_arch_state): New.
6973         (get_remote_state): Adjust to call remote_state's
6974         get_remote_arch_state method.
6975         (init_remote_state): Delete, bits factored out to ...
6976         (remote_arch_state::remote_arch_state): ... this new method.
6977         (get_remote_packet_size, get_memory_packet_size)
6978         (process_g_packet, remote_target::fetch_registers)
6979         (remote_target::prepare_to_store, store_registers_using_G)
6980         (remote_target::store_registers, remote_target::get_trace_status):
6981         Adjust to call remote_state's method.
6982         (_initialize_remote): Remove reference to
6983         remote_gdbarch_data_handle.
6984
6985 2018-05-22  Pedro Alves  <palves@redhat.com>
6986
6987         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6988         pread>: New method declarations.
6989         (remote_target::open_1): Adjust.
6990         (readahead_cache_invalidate): Rename to ...
6991         (readahead_cache::invalidate): ... this, and adjust to be a class
6992         method.
6993         (readahead_cache_invalidate_fd): Rename to ...
6994         (readahead_cache::invalidate_fd): ... this, and adjust to be a
6995         class method.
6996         (remote_hostio_pwrite): Adjust.
6997         (remote_hostio_pread_from_cache): Rename to ...
6998         (readahead_cache::pread): ... this, and adjust to be a class
6999         method.
7000         (remote_hostio_close): Adjust.
7001
7002 2018-05-22  Pedro Alves  <palves@redhat.com>
7003
7004         * remote.c (remote_hostio_close_cleanup): Delete.
7005         (class scoped_remote_fd): New.
7006         (remote_file_put, remote_file_get): Use it.
7007
7008 2018-05-22  Pedro Alves  <palves@redhat.com>
7009
7010         (struct vCont_action_support): Use bool and initialize all fields.
7011         (struct readahead_cache): Initialize all fields.
7012         (remote_state): Use bool and initialize all fields.
7013         (remote_state::remote_state, remote_state::~remote_state): New.
7014         (new_remote_state): Delete.
7015         (_initialize_remote): Use new to allocate remote_state.
7016
7017 2018-05-22  Pedro Alves  <palves@redhat.com>
7018             張俊芝  <zjz@zjz.name>
7019
7020         PR gdb/22973
7021         * c-exp.y: Include "c-support.h".
7022         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7023         of tolower.  Use c_ident_is_alpha to scan names.
7024         * c-lang.c: Include "c-support.h".
7025         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7026         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7027         * c-support.h: New file, with bits factored out from ...
7028         * cp-name-parser.y: ... this file.
7029         Include "c-support.h".
7030         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7031         c-support.h and renamed.
7032         (symbol_end, yylex): Adjust.
7033
7034 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7035
7036         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7037         parameter type to CORE_ADDR.
7038         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7039         parameter type in declaration to CORE_ADDR.
7040         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7041         target_auxv_search to get AT_HWCAP and use the result to get the
7042         target description.
7043         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7044         to CORE_ADDR. Remove the cast of the return value to unsigned
7045         long. Fix error predicate of target_auxv_search.
7046         (ppc_linux_nat_target::read_description): Change the type of the
7047         hwcap variable to CORE_ADDR.
7048
7049 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7050
7051         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7052         if the size of fpscr is larger than 32 bits.
7053
7054 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7055
7056         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7057         (ppc32_linux_vsxregmap): New global.
7058         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7059         regcache_supply_regset, and regcache_collect_regset.
7060         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7061         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7062         (fetch_vsx_register, store_vsx_register): Remove.
7063         (fetch_vsx_registers): Add regno parameter. Get regset using
7064         ppc_linux_vsxregset. Use regset to supply registers.
7065         (store_vsx_registers): Add regno parameter. Get regset using
7066         ppc_linux_vsxregset. Use regset to collect registers.
7067         (fetch_register): Call fetch_vsx_registers instead of
7068         fetch_vsx_register.
7069         (store_register): Call store_vsx_registers instead of
7070         store_vsx_register.
7071         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7072         new regno parameter.
7073         (store_ppc_registers): Call store_vsx_registers with -1 for the
7074         new regno parameter.
7075         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7076         (ppc_collect_vsxregset): Remove.
7077
7078 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7079
7080         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7081         offset fields.
7082         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7083         for vector register offset fields.
7084         (ppc64_fbsd_reg_offsets): Likewise.
7085         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7086         to vector register offset fields.
7087         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7088         to vector register offset fields.
7089         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7090         vector register offset fields.
7091         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7092         initializers for vector register offset fields.
7093         (rs6000_aix64_reg_offsets): Likewise.
7094         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7095         (ppc_supply_vrregset): Remove.
7096         (ppc_collect_vrregset): Remove.
7097         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7098         (ppc_linux_vrregset) : New function.
7099         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7100         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7101         (ppc32_linux_vrregset): Remove.
7102         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7103         and use result instead of ppc32_linux_vrregset.
7104         (ppc32_linux_reg_offsets): Remove initializers for vector register
7105         offset fields.
7106         (ppc64_linux_reg_offsets): Likewise.
7107         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7108         * ppc-linux-nat.c: Include regset.h.
7109         (gdb_vrregset_t): Adjust comment to account for little-endian
7110         mode.
7111         (supply_vrregset, fill_vrregset): Remove.
7112         (fetch_altivec_register, store_altivec_register): Remove.
7113         (fetch_altivec_registers): Add regno parameter. Get regset using
7114         ppc_linux_vrregset. Use regset to supply registers.
7115         (store_altivec_registers): Add regno parameter. Get regset using
7116         ppc_linux_vrregset. Use regset to collect registers.
7117         (fetch_register): Call fetch_altivec_registers instead of
7118         fetch_altivec_register.
7119         (store_register): Call store_altivec_registers instead of
7120         store_altivec_register.
7121         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7122         the new regno parameter.
7123         (store_ppc_registers): Call store_altivec_registers with -1 for
7124         the new regno parameter.
7125
7126 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7127
7128         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7129         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7130         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7131         (gdb_vrregset_t): Change array type size to
7132         PPC_LINUX_SIZEOF_VRREGSET.
7133         (gdb_vsxregset_t): Change array type size to
7134         PPC_LINUX_SIZEOF_VSXREGSET.
7135         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7136         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7137         PPC_LINUX_SIZEOF_VSXREGSET.
7138
7139 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7140
7141         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7142         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7143         nat/ppc-linux.c.
7144         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7145         ppc_linux_target_wordsize with tid.
7146         (ppc_linux_nat_target::read_description): Call ppc_linux_target
7147         wordsize with tid.
7148         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7149         (ppc64_64bit_inferior_p): Add static and inline specifiers.
7150         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7151         tid parameter. Remove static specifier.
7152         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7153         (ppc_linux_target_wordsize): New declaration.
7154
7155 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7156
7157         * arch/ppc-linux-common.c: New file.
7158         * arch/ppc-linux-common.h: New file.
7159         * arch/ppc-linux-tdesc.h: New file.
7160         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7161         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7162         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7163         arch/ppc-linux-tdesc.h.
7164         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7165         arch/ppc-linux-tdesc.h.
7166         (ppc_linux_nat_target::read_description): Remove target
7167         description matching code. Fill a ppc_linux_features struct and
7168         call ppc_linux_match_description with it. Move comment about ISA
7169         2.05 to ppc-linux-common.c.
7170         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7171         arch/ppc-linux-tdesc.h.
7172         (ppc_linux_core_read_description): Remove target description
7173         matching code. Fill a ppc_linux_features struct and call
7174         ppc_linux_match_description with it.
7175         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7176         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7177         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7178         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7179         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7180         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7181         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7182         (tdesc_powerpc_e500l): Remove.
7183
7184 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
7185
7186         * ada-lang.c (catch_assert_command): Pass empty string instead
7187         of NULL for excep_string argument.
7188
7189 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7190
7191         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7192         the width of the requested register exceeds the width of the
7193         `ptrace' data type.
7194
7195 2018-05-21  Tom Tromey  <tom@tromey.com>
7196
7197         * printcmd.c (output_command): Remove.
7198         (output_command_const): Rename to output_command.
7199         * valprint.h (output_command): Rename from output_command_const.
7200         * tracepoint.c (trace_dump_actions): Call output_command.
7201
7202 2018-05-21  Tom Tromey  <tom@tromey.com>
7203
7204         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7205         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7206         * ada-lang.h (create_ada_exception_catchpoint): Update.
7207         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7208         std::string.
7209         (create_excep_cond_exprs, ~ada_catchpoint)
7210         (should_stop_exception, print_one_exception)
7211         (print_mention_exception, print_recreate_exception): Update.
7212         (ada_get_next_arg): Remove.
7213         (catch_ada_exception_command_split): Use std::string.  Change type
7214         of "excep_string", "cond_string".
7215         (catch_ada_exception_command): Update.
7216         (create_ada_exception_catchpoint): Change type of excep_string.
7217         (ada_exception_sal): Remove excep_string parameter.
7218         (~ada_catchpoint): Remove.
7219
7220 2018-05-21  Tom Tromey  <tom@tromey.com>
7221
7222         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7223         cleanup.
7224
7225 2018-05-21  Tom Tromey  <tom@tromey.com>
7226
7227         * ada-lang.c (ada_exception_message_1, ada_exception_message):
7228         Return unique_xmalloc_ptr.
7229         (print_it_exception): Update.
7230
7231 2018-05-21  Tom Tromey  <tom@tromey.com>
7232
7233         * tracepoint.c (trace_dump_actions): Use std::string.
7234
7235 2018-05-21  Tom Tromey  <tom@tromey.com>
7236
7237         * symfile.c (reread_symbols): Use std::string for original_name.
7238
7239 2018-05-21  Tom Tromey  <tom@tromey.com>
7240
7241         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7242         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
7243         constructor.
7244
7245 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
7246
7247         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7248         instance to...
7249         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7250         * objfiles.c (get_objfile_bfd_data): Allocate
7251         objfile_per_bfd_storage with obstack_new when allocating on
7252         obstack.
7253
7254 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7255
7256         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7257         OBSTACK_ZALLOC.
7258         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7259         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7260         * mdebugread.c (mdebug_build_psymtabs): Likewise.
7261         (add_pending): Likewise.
7262         (parse_symbol): Likewise.
7263         (parse_partial_symbols): Likewise.
7264         (psymtab_to_symtab_1): Likewise.
7265         (new_psymtab): Likewise.
7266         (elfmdebug_build_psymtabs): Likewise.
7267         * minsyms.c (terminate_minimal_symbol_table): Likewise.
7268         * objfiles.c (get_objfile_bfd_data): Likewise.
7269         (objfile_register_static_link): Likewise.
7270         * psymtab.c (allocate_psymtab): Likewise.
7271         * stabsread.c (read_member_functions): Likewise.
7272         * xcoffread.c (xcoff_end_psymtab): Likewise.
7273
7274 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7275
7276         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7277         compiler supports std::is_trivially_constructible.
7278         * common/poison.h: Include obstack.h.
7279         (IsMallocable): Define to is_trivially_constructible if the
7280         compiler supports it, define to true_type otherwise.
7281         (xobnew): New.
7282         (XOBNEW): Redefine.
7283         (xobnewvec): New.
7284         (XOBNEWVEC): Redefine.
7285         * gdb_obstack.h (obstack_zalloc): New.
7286         (OBSTACK_ZALLOC): Redefine.
7287         (obstack_calloc): New.
7288         (OBSTACK_CALLOC): Redefine.
7289         (obstack_new): New.
7290         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7291         (gdbarch_obstack): New declaration in gdbarch.h, definition in
7292         gdbarch.c.
7293         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7294         obstack_calloc/obstack_zalloc.
7295         (gdbarch_obstack_zalloc): Remove.
7296         * target-descriptions.c (tdesc_data_init): Use obstack_new.
7297
7298 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7299
7300         * stack.c (backtrace_command_1): Remove useless variable int i.
7301
7302 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7303
7304         * stack.c (print_frame_info): Fix comment.
7305
7306 2018-05-18  Tom Tromey  <tom@tromey.com>
7307
7308         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7309         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7310         (~dwarf2_per_objfile): Update
7311         (dwarf2_get_dwz_file): Use new.
7312         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7313         unique_ptr.
7314
7315 2018-05-18  Tom Tromey  <tom@tromey.com>
7316
7317         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7318         unique_ptr.
7319         * dwarf2read.c (struct dwp_file): Add constructor and
7320         initializers.
7321         (open_and_init_dwp_file): Return a unique_ptr.
7322         (dwarf2_per_objfile, create_dwp_hash_table)
7323         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7324         (lookup_dwo_unit_in_dwp): Update.
7325         (open_and_init_dwp_file, get_dwp_file): Update.
7326
7327 2018-05-18  Tom Tromey  <tom@tromey.com>
7328
7329         * dwarf2read.c (dwarf2_per_objfile): Update.
7330         (struct mapped_index): Add initializers.
7331         (dwarf2_read_index): Use new.
7332         (dw2_symtab_iter_init): Update.
7333         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7334         unique_ptr.
7335
7336 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7337
7338         * dwarf2read.c (mapped_index) <total_size>: Remove.
7339
7340 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7341
7342         * unittests/format_pieces-selftests.c (test_format_specifier):
7343         Add ARI comments.
7344
7345 2018-05-18  Tom Tromey  <tom@tromey.com>
7346
7347         * c-typeprint.c (maybe_print_hole): New function.
7348         (c_print_type_struct_field_offset): Update.
7349         (c_type_print_base_struct_union): Call maybe_print_hole.
7350
7351 2018-05-17  Keith Seitz  <keiths@redhat.com>
7352
7353         * breakpoint.c (build_bpstat_chain): New function, moved from
7354         bpstat_stop_status.
7355         (bpstat_stop_status): Add optional parameter, `stop_chain'.
7356         If no stop chain is passed, call build_bpstat_chain to build it.
7357         * breakpoint.h (build_bpstat_chain): Declare.
7358         (bpstat_stop_status): Move documentation here from breakpoint.c.
7359         * infrun.c (handle_signal_stop): Before eliding inlined frames,
7360         build the stop chain and pass it to skip_inline_frames.
7361         Pass this stop chain to bpstat_stop_status.
7362         * inline-frame.c: Include breakpoint.h.
7363         (stopped_by_user_bp_inline_frame): New function.
7364         (skip_inline_frames): Add parameter `stop_chain'.
7365         Move documention to inline-frame.h.
7366         If non-NULL, use stopped_by_user_bp_inline_frame to determine
7367         whether the frame should be elided.
7368         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7369         Add moved documentation and update for new parameter.
7370
7371 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7372
7373         PR cli/14975
7374         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7375         unittests/format_pieces-selftests.c.
7376         * common/format.h (format_piece) <operator==>: New.
7377         (format_pieces) <operator[]>: Remove.
7378         * common/format.c (format_pieces::format_pieces): Handle \e.
7379         * unittests/format_pieces-selftests.c: New.
7380
7381 2018-05-17  Tom Tromey  <tom@tromey.com>
7382
7383         PR symtab/23010:
7384         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7385         (dw2_instantiate_symtab): Add skip_partial parameter.
7386         (dw2_find_last_source_symtab, dw2_map_expand_apply)
7387         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7388         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7389         (dw2_expand_symtabs_matching_one)
7390         (dw2_find_pc_sect_compunit_symtab)
7391         (dw2_debug_names_lookup_symbol)
7392         (dw2_debug_names_expand_symtabs_for_function): Update.
7393         (init_cutu_and_read_dies): Add skip_partial parameter.
7394         (process_psymtab_comp_unit, build_type_psymtabs_1)
7395         (process_skeletonless_type_unit, load_partial_comp_unit)
7396         (psymtab_to_symtab_1): Update.
7397         (load_full_comp_unit): Add skip_partial parameter.
7398         (process_imported_unit_die, dwarf2_read_addr_index)
7399         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7400         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7401         (read_signatured_type): Update.
7402
7403 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7404
7405         * value.c (release_value): Remove unused variable.
7406         (record_latest_value): Likewise.
7407         (access_value_history): Likewise.
7408         (preserve_values): Likewise.
7409
7410 2018-05-17  Tom Tromey  <tom@tromey.com>
7411
7412         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7413         Initialize.
7414
7415 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
7416
7417         PR gdb/22286
7418         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7419         Also handle registers whose width is not a multiple of
7420         PTRACE_TYPE_RET.
7421         (linux_nat_trad_target::store_register): Likewise.
7422
7423 2018-05-16  Tom Tromey  <tom@tromey.com>
7424
7425         * gdbcore.h (core_bfd): Redefine.
7426         * corelow.c (core_target::close): Update.
7427         (core_target_open): Update.
7428         * progspace.h (struct program_space) <cbfd>: Now a
7429         gdb_bfd_ref_ptr.
7430
7431 2018-05-16  Tom Tromey  <tom@tromey.com>
7432
7433         PR cli/19551:
7434         * symfile-add-flags.h (enum symfile_add_flags)
7435         <SYMFILE_NOT_FILENAME>: New constant.
7436         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
7437         objfile name from BFD.
7438         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7439         * minidebug.c (find_separate_debug_file_in_section): Put
7440         ".gnu_debugdata" into BFD's file name.
7441
7442 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
7443
7444         * regcache.c (regcache_read_ftype, regcache_write_ftype):
7445         Remove.
7446
7447 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
7448
7449         PR binutils/21446
7450         * aarch64-tdep.c (aarch64_analyze_prologue,
7451         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7452         Indicate not interested in errors.
7453
7454 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7455
7456         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7457         Supply the MIPS_ZERO_REGNUM register.
7458
7459 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7460
7461         * mips-tdep.c (mask_address_var): Make variable static.
7462
7463 2018-05-14  Tom Tromey  <tom@tromey.com>
7464
7465         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7466
7467 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
7468
7469         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7470         FXSAVE_ADDR for the mxcsr register.
7471
7472 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
7473
7474         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7475
7476 2018-05-11  Pedro Alves  <palves@redhat.com>
7477
7478         * corelow.c (core_target) <core_target>: No longer inline.
7479         Initialize m_core_gdbarch, m_core_vec and build the section table
7480         here.
7481         <~core_target>: New.
7482         <core_gdbarch, get_core_register_section>: New methods.
7483         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7484         factored out from ...
7485         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7486         (core_ops): Delete.
7487         (sniff_core_bfd): Add gdbarch parameter.
7488         (core_close): Delete, merged into ...
7489         (core_target::close): ... here.  Delete self.
7490         (core_close_cleanup): Delete.
7491         (core_target_open): Allocate a core_target on the heap.  Use a
7492         unique_ptr instead of a cleanup.  Bits moved into the core_target
7493         ctor.  Adjust to use core_target methods instead of globals.
7494         (get_core_register_section): Rename to ...
7495         (core_target::get_core_register_section): ... this and adjust.
7496         (struct get_core_registers_cb_data): New.
7497         (get_core_registers_cb): Use it.  Use bool.
7498         (core_target::fetch_registers, core_target::files_info)
7499         (core_target::xfer_partial, core_target::read_description)
7500         (core_target::pid_to, core_target::thread_name): Adjust to
7501         reference class fields instead of globals.
7502         * target.h (struct target_ops_deleter, target_ops_up): New.
7503
7504 2018-05-11  Pedro Alves  <palves@redhat.com>
7505
7506         * corefile.c (core_file_command): Move to corelow.c.
7507         * corelow.c (the_core_target): Delete.
7508         (core_file_command): Moved from corefile.c.  Check exec_bfd
7509         instead of the_core_target.  Use target_detach instead of calling
7510         into the_core_target directly.
7511         (maybe_say_no_core_file_now): New.
7512         (core_target::detach): Use it.
7513         (_initialize_corelow): Remove references to the_core_target.
7514         * gdbcore.h (the_core_target): Delete.
7515
7516 2018-05-11  Tom Tromey  <tromey@redhat.com>
7517             Pedro Alves  <palves@redhat.com>
7518
7519         * corefile.c (core_bfd): Remove.
7520         * gdbcore.h (core_bfd): Now a macro.
7521         * progspace.h (struct program_space) <cbfd>: New field.
7522
7523 2018-05-11  Tom Tromey  <tom@tromey.com>
7524
7525         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7526         gdb::def_vector.
7527
7528 2018-05-10  Tom Tromey  <tom@tromey.com>
7529
7530         * configure: Rebuild.
7531         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7532
7533 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
7534
7535         PR server/23158:
7536         * regformats/regdat.sh: Adjust script, following the addition
7537         of the new expedite_regs parameter to init_target_desc.
7538
7539 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
7540     
7541         PR gdb/23127
7542         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7543         set_gdbarch_significant_addr_bit.
7544         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7545         set_gdbarch_significant_addr_bit.
7546         * utils.c (address_significant): Update to sign extend addr.
7547
7548 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
7549
7550         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7551         (xtensa_linux_init_abi): Limit tdep->num_regs by
7552         tdep->num_nopriv_regs.
7553         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7554         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7555         not initialized.
7556
7557 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
7558
7559         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7560
7561 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
7562
7563         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7564         (I387_MXCSR_INIT_VAL): New constant.
7565         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7566         buffer if it was supplied by the inferior.
7567         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7568         (i387_xsave_get_clear_bv): New function.
7569         (i387_supply_xsave): Only read x87 control registers from the
7570         xsave buffer if the feature is enabled, and the state will have
7571         been written, otherwise, provide a suitable default.
7572         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7573         including x87 control registers.  Update control registers if they
7574         have changed from the default value, and mark features as enabled
7575         as required.
7576         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7577
7578 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
7579
7580         * spu-tdep.c (info_spu_event_command): Fix output formatting.
7581
7582 2018-05-07  Tom Tromey  <tom@tromey.com>
7583
7584         * configure: Rebuild.
7585         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7586
7587 2018-05-07  Tom Tromey  <tom@tromey.com>
7588
7589         PR tdep/20362:
7590         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7591         bit.  Use correct value for VDIV.
7592
7593 2018-05-04  Tom Tromey  <tom@tromey.com>
7594
7595         * configure: Rebuild.
7596         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7597
7598 2018-05-04  Tom Tromey  <tom@tromey.com>
7599
7600         * linux-record.c (record_linux_system_call) <case
7601         RECORD_SYS_RECVFROM>: Add "break".
7602
7603 2018-05-04  Tom Tromey  <tom@tromey.com>
7604
7605         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7606         Add missing "break".
7607         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7608         Add missing "break".
7609
7610 2018-05-04  Tom Tromey  <tom@tromey.com>
7611
7612         * rs6000-tdep.c (ppc_process_record_op4)
7613         (ppc_process_record_op63): Add fall-through comment.
7614
7615 2018-05-04  Tom Tromey  <tom@tromey.com>
7616
7617         * i386-tdep.c (i386_process_record): Add fall-through comment.
7618
7619 2018-05-04  Tom Tromey  <tom@tromey.com>
7620
7621         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7622         comment.
7623
7624 2018-05-04  Tom Tromey  <tom@tromey.com>
7625
7626         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7627         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7628         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7629         comment.
7630         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7631         comment.
7632         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7633         comment.
7634
7635 2018-05-04  Tom Tromey  <tom@tromey.com>
7636
7637         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7638
7639 2018-05-04  Tom Tromey  <tom@tromey.com>
7640
7641         * s390-tdep.c (s390_process_record): Fix fall-through comments.
7642         * xcoffread.c (scan_xcoff_symtab): Move comment later.
7643         * symfile.c (section_is_mapped): Fix fall-through comment.
7644         * stabsread.c (define_symbol, read_member_functions): Fix
7645         fall-through comment.
7646         * s390-linux-tdep.c (s390_process_record): Fix fall-through
7647         comment.
7648         * remote.c (remote_wait_as): Fix fall-through comment.
7649         * p-exp.y (yylex): Fix fall-through comment.
7650         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7651         comment.
7652         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7653         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7654         * jv-exp.y (yylex): Fix fall-through comment.
7655         * go-exp.y (lex_one_token): Fix fall-through comment.
7656         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7657         fall-through comment.
7658         * f-exp.y (yylex): Fix fall-through comment.
7659         * dwarf2read.c (process_die): Fix fall-through comments.
7660         * dbxread.c (process_one_symbol): Fix fall-through comment.
7661         * d-exp.y (lex_one_token): Fix fall-through comment.
7662         * cp-name-parser.y (yylex): Fix fall-through comment.
7663         * coffread.c (coff_symtab_read): Fix fall-through comment.
7664         * c-exp.y (lex_one_token): Fix fall-through comment.
7665         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7666         comment.
7667         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7668         comment.
7669
7670 2018-05-04  Tom Tromey  <tom@tromey.com>
7671
7672         PR python/22730:
7673         * NEWS: Mention gdb.execute change.
7674         * gdbcmd.h (execute_control_command): Don't declare.
7675         * python/python.c (execute_gdb_command): Use read_command_lines_1,
7676         execute_control_commands, execute_control_commands_to_string.
7677         * cli/cli-script.h (execute_control_commands)
7678         (execute_control_commands_to_string): Declare.
7679         (execute_control_command): Add from_tty parameter.
7680         * cli/cli-script.c (execute_control_commands)
7681         (execute_control_commands_to_string): New functions.
7682         (execute_user_command): Use execute_control_commands.
7683         (execute_control_command_1): Add "from_tty" parameter.  Update.
7684         (execute_control_command): Likewise.
7685
7686 2018-05-04  Tom Tromey  <tom@tromey.com>
7687
7688         PR python/22731:
7689         * NEWS: Mention that breakpoint commands are writable.
7690         * python/py-breakpoint.c (bppy_set_commands): New function.
7691         (breakpoint_object_getset) <"commands">: Use it.
7692
7693 2018-05-04  Tom Tromey  <tom@tromey.com>
7694
7695         * tracepoint.c (actions_command): Update.
7696         * mi/mi-cmd-break.c (mi_command_line_array)
7697         (mi_command_line_array_cnt, mi_command_line_array_ptr)
7698         (mi_read_next_line): Remove.
7699         (mi_cmd_break_commands): Update.
7700         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7701         function_view.
7702         * cli/cli-script.c (get_command_line): Update.
7703         (process_next_line): Use function_view.  Constify.
7704         (recurse_read_control_structure, read_command_lines)
7705         (read_command_lines_1): Change argument types to function_view.
7706         (do_define_command, document_command): Update.
7707         * breakpoint.h (check_tracepoint_command): Don't declare.
7708         * breakpoint.c (check_tracepoint_command): Remove.
7709         (commands_command_1, create_tracepoint_from_upload): Update.
7710
7711 2018-05-04  Tom Tromey  <tom@tromey.com>
7712
7713         PR gdb/11750:
7714         * cli/cli-script.h (enum command_control_type) <define_control>:
7715         New constant.
7716         * cli/cli-script.c (multi_line_command_p): Handle define_control.
7717         (build_command_line, execute_control_command_1)
7718         (process_next_line): Likewise.
7719         (do_define_command): New function, extracted from define_command.
7720         (define_command): Use it.
7721
7722 2018-05-04  Tom Tromey  <tom@tromey.com>
7723
7724         * tracepoint.c (actions_command): Update.
7725         * cli/cli-script.h (read_command_lines): Update.
7726         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7727         (MAX_TMPBUF): Remove define.
7728         (define_command): Use string_printf.
7729         (document_command): Likewise.
7730         * breakpoint.c (commands_command_1): Update.
7731
7732 2018-05-04  Tom Tromey  <tom@tromey.com>
7733
7734         * top.c (execute_command): Update.
7735         * cli/cli-script.h (print_command_lines): Now varargs.
7736         * cli/cli-script.c (print_command_lines): Now varargs.
7737         (execute_control_command_1) <case while_control, case if_control>:
7738         Update.
7739
7740 2018-05-04  Tom Tromey  <tom@tromey.com>
7741
7742         * tracepoint.c (all_tracepoint_actions): Rename from
7743         all_tracepoint_actions_and_cleanup.  Change return type.
7744         (actions_command, encode_actions_1, encode_actions)
7745         (trace_dump_actions, tdump_command): Update.
7746         * remote.c (remote_download_command_source): Update.
7747         * python/python.c (gdbpy_eval_from_control_command)
7748         (python_command, python_interactive_command): Update.
7749         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7750         * guile/guile.c (guile_command)
7751         (gdbscm_eval_from_control_command, guile_command): Update.
7752         * compile/compile.c (compile_code_command)
7753         (compile_print_command, compile_to_object): Update.
7754         * cli/cli-script.h (struct command_lines_deleter): New.
7755         (counted_command_line): New typedef.
7756         (struct command_line): Add constructor, destructor.
7757         <body_list>: Remove.
7758         <body_list_0, body_list_1>: New members.
7759         (command_line_up): Remove typedef.
7760         (read_command_lines, read_command_lines_1, get_command_line):
7761         Update.
7762         (copy_command_lines): Don't declare.
7763         * cli/cli-script.c (build_command_line): Use "new".
7764         (get_command_line): Return counted_command_line.
7765         (print_command_lines, execute_user_command)
7766         (execute_control_command_1, while_command, if_command): Update.
7767         (realloc_body_list): Remove.
7768         (process_next_line, recurse_read_control_structure): Update.
7769         (read_command_lines, read_command_lines_1): Return counted_command_line.
7770         (free_command_lines): Use "delete".
7771         (copy_command_lines): Remove.
7772         (define_command, document_command, show_user_1): Update.
7773         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7774         a counted_command_line.
7775         * breakpoint.h (counted_command_line): Remove typedef.
7776         (breakpoint_set_commands): Update.
7777         * breakpoint.c (check_no_tracepoint_commands)
7778         (validate_commands_for_breakpoint): Update.
7779         (breakpoint_set_commands): Change commands to be a
7780         counted_command_line.
7781         (commands_command_1, update_dprintf_command_list)
7782         (create_tracepoint_from_upload): Update.
7783
7784 2018-05-04  Tom Tromey  <tom@tromey.com>
7785
7786         * cli/cli-decode.h (cmd_list_element): New constructor.
7787         (~cmd_list_element): New destructor.
7788         (struct cmd_list_element): Add initializers.
7789         * cli/cli-decode.c (do_add_cmd): Use "new".
7790         (delete_cmd): Use "delete".
7791
7792 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7793             Pedro Alves <palves@redhat.com>
7794
7795         PR breakpoints/19806 and support for PR external/20207.
7796         * NEWS: Mention Aarch64 watchpoint improvements.
7797         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7798         watchpoints and PR external/20207 watchpoints.
7799         * nat/aarch64-linux-hw-point.c
7800         (kernel_supports_any_contiguous_range): New.
7801         (aarch64_watchpoint_offset): New.
7802         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7803         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7804         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7805         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7806         next_addr_orig_p.  Support PR external/20207 watchpoints.
7807         (aarch64_downgrade_regs): New.
7808         (aarch64_dr_state_insert_one_point): New parameters offset and
7809         addr_orig.
7810         (aarch64_dr_state_remove_one_point): Likewise.
7811         (aarch64_handle_breakpoint): Update caller.
7812         (aarch64_handle_aligned_watchpoint): Likewise.
7813         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7814         aligned_offset.
7815         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7816         aarch64_downgrade_regs.
7817         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7818         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7819         (DR_CONTROL_MASK): ... this.
7820         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7821         (unsigned int aarch64_watchpoint_offset): New prototype.
7822         (aarch64_linux_set_debug_regs): Remove const from state.
7823         * utils.c (align_up, align_down): Move to ...
7824         * common/common-utils.c (align_up, align_down): ... here.
7825         * utils.h (align_up, align_down): Move to ...
7826         * common/common-utils.h (align_up, align_down): ... here.
7827
7828 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
7829
7830         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7831         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7832         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7833         Re-implement to match the ABI as summarized in GCC's
7834         gcc/config/sparc/sparc.c.  All callers updated.
7835         (sparc32_store_arguments): Remove assertion.
7836
7837 2018-05-04  Tom Tromey  <tom@tromey.com>
7838
7839         * printcmd.c: Don't include tui.h.
7840         (decode_format): Use skip_spaces.
7841
7842 2018-05-04  Tom Tromey  <tom@tromey.com>
7843
7844         PR gdb/22619:
7845         * printcmd.c (last_count): New global.
7846         (x_command): Use saved count when repeating.
7847
7848 2018-05-04  Tom Tromey  <tom@tromey.com>
7849
7850         * nto-procfs.c (do_closedir_cleanup): Remove.
7851         (procfs_pidlist): Use gdb_dir_up.
7852         * procfs.c (do_closedir_cleanup): Remove.
7853         (proc_update_threads): Use gdb_dir_up.
7854         * common/filestuff.h (struct gdb_dir_deleter): New.
7855         (gdb_dir_up): New typedef.
7856
7857 2018-05-04  Tom Tromey  <tom@tromey.com>
7858
7859         * ada-lang.c (print_mention_exception): Use std::string.
7860
7861 2018-05-04  Tom Tromey  <tom@tromey.com>
7862
7863         * ada-lang.c (create_excep_cond_exprs): Update.
7864         (ada_exception_catchpoint_cond_string): Use std::string.
7865
7866 2018-05-04  Tom Tromey  <tom@tromey.com>
7867
7868         * ada-lang.c (xget_renaming_scope): Return std::string.
7869         (old_renaming_is_invisible): Update.
7870
7871 2018-05-04  Tom Tromey  <tom@tromey.com>
7872
7873         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7874         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7875
7876 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7877
7878         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7879
7880 2018-05-04  Tom Tromey  <tom@tromey.com>
7881
7882         * remote.c (remote_query_supported_append): Change type.
7883         (remote_check_symbols): Update.
7884
7885 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
7886
7887         PR gdb/11420
7888         * configure.ac: Prepend libpython.
7889         * python/python-config.py: Likewise.
7890         * configure: Regenerate.
7891
7892 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7893
7894         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7895
7896 2018-05-03  Pedro Alves  <palves@redhat.com>
7897
7898         * s390-linux-nat.c
7899         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7900         override.  Write 'true' instead of '1'.
7901         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7902         declaration.
7903
7904 2018-05-02  Pedro Alves  <palves@redhat.com>
7905
7906         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7907         add_inf_child_target.
7908         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7909         add_inf_child_target.
7910         * aix-thread.c (aix_thread_target_info): New.
7911         (aix_thread_target) <shortname, longname, doc>: Delete.
7912         <info>: New.
7913         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7914         add_inf_child_target.
7915         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7916         add_inf_child_target.
7917         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7918         add_inf_child_target.
7919         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7920         add_inf_child_target.
7921         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7922         add_inf_child_target.
7923         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7924         add_inf_child_target.
7925         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7926         add_inf_child_target.
7927         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7928         add_inf_child_target.
7929         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7930         add_inf_child_target.
7931         * bfd-target.c (target_bfd_target_info): New.
7932         (target_bfd) <shortname, longname, doc>: Delete.
7933         <info>: New.
7934         * bsd-kvm.c (bsd_kvm_target_info): New.
7935         (bsd_kvm_target) <shortname, longname, doc>: Delete.
7936         <info>: New.
7937         (bsd_kvm_target::open): Rename to ...
7938         (bsd_kvm_target_open): ... this.  Adjust.
7939         * bsd-uthread.c (bsd_uthread_target_info): New.
7940         (bsd_uthread_target) <shortname, longname, doc>: Delete.
7941         <info>: New.
7942         * corefile.c (core_file_command): Adjust.
7943         * corelow.c (core_target_info): New.
7944         (core_target) <shortname, longname, doc>: Delete.
7945         <info>: New.
7946         (core_target::open): Rename to ...
7947         (core_target_open): ... this.  Adjust.
7948         * ctf.c (ctf_target_info): New.
7949         (ctf_target) <shortname, longname, doc>: Delete.
7950         <info>: New.
7951         (ctf_target::open): Rename to ...
7952         (ctf_target_open): ... this.
7953         (_initialize_ctf): Adjust.
7954         * exec.c (exec_target_info): New.
7955         (exec_target) <shortname, longname, doc>: Delete.
7956         <info>: New.
7957         (exec_target::open): Rename to ...
7958         (exec_target_open): ... this.
7959         * gdbcore.h (core_target_open): Declare.
7960         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7961         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7962         add_inf_child_target.
7963         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7964         add_inf_child_target.
7965         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7966         add_inf_child_target.
7967         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7968         add_inf_child_target.
7969         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7970         add_inf_child_target.
7971         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7972         add_inf_child_target.
7973         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7974         add_inf_child_target.
7975         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7976         add_inf_child_target.
7977         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7978         add_inf_child_target.
7979         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7980         add_inf_child_target.
7981         * inf-child.c (inf_child_target_info): New.
7982         (inf_child_target::info): New.
7983         (inf_child_open_target): Remove 'target' parameter.  Use
7984         get_native_target instead.
7985         (inf_child_target::open): Delete.
7986         (add_inf_child_target): New.
7987         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7988         Delete.
7989         <info>: New.
7990         (add_inf_child_target): Declare.
7991         (inf_child_open_target): Declare.
7992         * linux-thread-db.c (thread_db_target_info): New.
7993         (thread_db_target) <shortname, longname, doc>: Delete.
7994         <info>: New.
7995         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7996         add_inf_child_target.
7997         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7998         add_inf_child_target.
7999         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8000         add_inf_child_target.
8001         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8002         add_inf_child_target.
8003         * make-target-delegates (print_class): Adjust.
8004         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8005         add_inf_child_target.
8006         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8007         add_inf_child_target.
8008         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8009         add_inf_child_target.
8010         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8011         add_inf_child_target.
8012         * nto-procfs.c (nto_native_target_info): New.
8013         (nto_procfs_target_native) <shortname, longname, doc>:
8014         Delete.
8015         <info>: New.
8016         (nto_procfs_target_info): New.
8017         (nto_procfs_target_procfs) <shortname, longname, doc>:
8018         Delete.
8019         <info>: New.
8020         (init_procfs_targets): Adjust.
8021         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8022         add_inf_child_target.
8023         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8024         add_inf_child_target.
8025         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8026         add_inf_child_target.
8027         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8028         add_inf_child_target.
8029         * ravenscar-thread.c (ravenscar_target_info): New.
8030         (ravenscar_thread_target) <shortname, longname, doc>:
8031         Delete.
8032         <info>: New.
8033         * record-btrace.c (record_btrace_target_info):
8034         (record_btrace_target) <shortname, longname, doc>: Delete.
8035         <info>: New.
8036         (record_btrace_target::open): Rename to ...
8037         (record_btrace_target_open): ... this.  Adjust.
8038         * record-full.c (record_longname, record_doc): New.
8039         (record_full_base_target) <shortname, longname, doc>: Delete.
8040         <info>: New.
8041         (record_full_target_info): New.
8042         (record_full_target): <shortname>: Delete.
8043         <info>: New.
8044         (record_full_core_open_1, record_full_open_1): Update comments.
8045         (record_full_base_target::open): Rename to ...
8046         (record_full_open): ... this.
8047         (cmd_record_full_restore): Update.
8048         (_initialize_record_full): Update.
8049         * remote-sim.c (remote_sim_target_info): New.
8050         (gdbsim_target) <shortname, longname, doc>: Delete.
8051         <info>: New.
8052         (gdbsim_target::open): Rename to ...
8053         (gdbsim_target_open): ... this.
8054         (_initialize_remote_sim): Adjust.
8055         * remote.c (remote_doc): New.
8056         (remote_target_info): New.
8057         (remote_target) <shortname, longname, doc>: Delete.
8058         <info>: New.
8059         (extended_remote_target_info): New.
8060         (extended_remote_target) <shortname, longname, doc>: Delete.
8061         <info>: New.
8062         (remote_target::open_1): Make static.  Adjust.
8063         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8064         * s390-linux-nat.c (_initialize_s390_nat): Use
8065         add_inf_child_target.
8066         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8067         add_inf_child_target.
8068         * sol-thread.c (thread_db_target_info): New.
8069         (sol_thread_target) <shortname, longname, doc>: Delete.
8070         <info>: New.
8071         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8072         add_inf_child_target.
8073         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8074         add_inf_child_target.
8075         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8076         add_inf_child_target.
8077         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8078         add_inf_child_target.
8079         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8080         add_inf_child_target.
8081         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8082         add_inf_child_target.
8083         * spu-linux-nat.c (_initialize_spu_nat): Use
8084         add_inf_child_target.
8085         * spu-multiarch.c (spu_multiarch_target_info): New.
8086         (spu_multiarch_target) <shortname, longname, doc>: Delete.
8087         <info>: New.
8088         * target-delegates.c: Regenerate.
8089         * target.c: Include <unordered_map>.
8090         (target_ops_p): Delete.
8091         (DEF_VEC_P(target_ops_p)): Delete.
8092         (target_factories): New.
8093         (test_target_info): New.
8094         (test_target_ops::info): New.
8095         (open_target): Adjust to use target_factories.
8096         (add_target_with_completer): Rename to ...
8097         (add_target): ... this.  Change prototype.  Register target_info
8098         and open callback in target_factories.  Register target_info in
8099         command context instead of target_ops.
8100         (add_target): Delete old implementation.
8101         (add_deprecated_target_alias): Change prototype.  Adjust.
8102         (the_native_target): New.
8103         (set_native_target, get_native_target): New.
8104         (find_default_run_target): Use the_native_target.
8105         (find_attach_target, find_run_target): Simplify.
8106         (target_ops::open): Delete.
8107         (dummy_target_info): New.
8108         (dummy_target::shortname, dummy_target::longname)
8109         (dummy_target::doc): Delete.
8110         (dummy_target::info): New.
8111         (debug_target::shortname, debug_target::longname)
8112         (debug_target::doc): Delete.
8113         (debug_target::info): New.
8114         * target.h (struct target_info): New.
8115         (target_ops::~target_ops): Add comment.
8116         (target_ops::info): New.
8117         (target_ops::shortname, target_ops::longname, target_ops::doc): No
8118         longer virtual.  Implement in terms of target_info.
8119         (set_native_target, get_native_target): Declare.
8120         (target_open_ftype): New.
8121         (add_target, add_target_with_completer)
8122         (add_deprecated_target_alias): Change prototype.
8123         (test_target) <shortname, longname, doc>: Delete.
8124         <info>: New.
8125         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8126         add_inf_child_target.
8127         * tracefile-tfile.c (tfile_target_info): New.
8128         (tfile_target) <shortname, longname, doc>: Delete.
8129         <info>: New.
8130         (tfile_target::open): Rename to ...
8131         (tfile_target_open): ... this.
8132         (_initialize_tracefile_tfile): Adjust.
8133         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8134         add_inf_child_target.
8135         * windows-nat.c (_initialize_windows_nat): Use
8136         add_inf_child_target.
8137         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8138         add_inf_child_target.
8139
8140 2018-05-02  Pedro Alves  <palves@redhat.com>
8141
8142         * linux-nat.h (linux_nat_target) <low_new_thread,
8143         low_delete_thread, low_new_fork, low_forget_process,
8144         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8145         New virtual methods.
8146         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8147         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8148         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8149         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8150         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8151         Delete.
8152         * linux-fork.c (delete_fork): Adjust to call low method.
8153         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8154         (linux_nat_new_fork, linux_nat_forget_process_hook)
8155         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8156         (linux_nat_status_is_event):
8157         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8158         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8159         to call low method.
8160         (sigtrap_is_event): Rename to ...
8161         (linux_nat_target::low_status_is_event): ... this.
8162         (linux_nat_set_status_is_event): Delete.
8163         (save_stop_reason, linux_nat_wait_1)
8164         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8165         low methods.
8166         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8167         (linux_nat_set_new_fork, linux_nat_set_forget_process)
8168         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8169         (linux_nat_set_prepare_to_resume): Delete.
8170         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8171         low virtual methods.
8172         * amd64-linux-nat.c: Likewise.
8173         * arm-linux-nat.c: Likewise.
8174         * i386-linux-nat.c: Likewise.
8175         * ia64-linux-nat.c: Likewise.
8176         * mips-linux-nat.c: Likewise.
8177         * ppc-linux-nat.c: Likewise.
8178         * s390-linux-nat.c: Likewise.
8179         * sparc64-linux-nat.c: Likewise.
8180         * x86-linux-nat.c: Likewise.
8181         * x86-linux-nat.h: Include "nat/x86-linux.h".
8182         (x86_linux_nat_target) <low_new_fork, low_forget_process,
8183         low_prepare_to_resume, low_new_thread, low_delete_thread>:
8184         Override methods.
8185
8186 2018-05-02  Pedro Alves  <palves@redhat.com>
8187
8188         * target.h (target_ops)
8189         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8190         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8191         stopped_by_watchpoint, have_continuable_watchpoint,
8192         stopped_data_address, watchpoint_addr_within_range,
8193         can_accel_watchpoint_condition, can_run, thread_alive,
8194         has_all_memory, has_memory, has_stack, has_registers,
8195         has_execution, can_async_p, is_async_p, supports_non_stop,
8196         always_non_stop_p, can_execute_reverse, supports_multi_process,
8197         supports_enable_disable_tracepoint,
8198         supports_disable_randomization, supports_string_tracing,
8199         supports_evaluation_of_breakpoint_conditions,
8200         can_run_breakpoint_commands, filesystem_is_local,
8201         can_download_tracepoint, get_trace_state_variable_value,
8202         set_trace_notes, get_tib_address, use_agent, can_use_agent,
8203         record_is_replaying, record_will_replay,
8204         augmented_libraries_svr4_read>: Adjust to return bool.
8205         * aarch64-linux-nat.c: All implementations adjusted.
8206         * aix-thread.c: All implementations adjusted.
8207         * arm-linux-nat.c: All implementations adjusted.
8208         * breakpoint.c: All implementations adjusted.
8209         * bsd-kvm.c: All implementations adjusted.
8210         * bsd-uthread.c: All implementations adjusted.
8211         * corelow.c: All implementations adjusted.
8212         * ctf.c: All implementations adjusted.
8213         * darwin-nat.c: All implementations adjusted.
8214         * darwin-nat.h: All implementations adjusted.
8215         * exec.c: All implementations adjusted.
8216         * fbsd-nat.c: All implementations adjusted.
8217         * fbsd-nat.h: All implementations adjusted.
8218         * gnu-nat.c: All implementations adjusted.
8219         * gnu-nat.h: All implementations adjusted.
8220         * go32-nat.c: All implementations adjusted.
8221         * ia64-linux-nat.c: All implementations adjusted.
8222         * inf-child.c: All implementations adjusted.
8223         * inf-child.h: All implementations adjusted.
8224         * inf-ptrace.c: All implementations adjusted.
8225         * inf-ptrace.h: All implementations adjusted.
8226         * linux-nat.c: All implementations adjusted.
8227         * linux-nat.h: All implementations adjusted.
8228         * mips-linux-nat.c: All implementations adjusted.
8229         * nto-procfs.c: All implementations adjusted.
8230         * ppc-linux-nat.c: All implementations adjusted.
8231         * procfs.c: All implementations adjusted.
8232         * ravenscar-thread.c: All implementations adjusted.
8233         * record-btrace.c: All implementations adjusted.
8234         * record-full.c: All implementations adjusted.
8235         * remote-sim.c: All implementations adjusted.
8236         * remote.c: All implementations adjusted.
8237         * s390-linux-nat.c: All implementations adjusted.
8238         * sol-thread.c: All implementations adjusted.
8239         * spu-multiarch.c: All implementations adjusted.
8240         * target-delegates.c: All implementations adjusted.
8241         * target.c: All implementations adjusted.
8242         * target.h: All implementations adjusted.
8243         * tracefile-tfile.c: All implementations adjusted.
8244         * tracefile.c: All implementations adjusted.
8245         * tracefile.h: All implementations adjusted.
8246         * windows-nat.c: All implementations adjusted.
8247         * x86-linux-nat.h: All implementations adjusted.
8248         * x86-nat.h: All implementations adjusted.
8249
8250 2018-05-02  Pedro Alves  <palves@redhat.com>
8251
8252         * make-target-delegates (scan_target_h): Don't trim lines here.
8253         Replace sequences of tabs and/or whitespace with a single
8254         whitespace.
8255         (top level, parsing methods): Trim each line before processing it
8256         here.
8257
8258 2018-05-02  Pedro Alves  <palves@redhat.com>
8259             John Baldwin  <jhb@freebsd.org>
8260
8261         * target.h (enum strata) <debug_stratum>: New.
8262         (struct target_ops) <all delegation methods>: Replace by C++
8263         virtual methods, and drop "to_" prefix.  All references updated
8264         throughout.
8265         <to_shortname, to_longname, to_doc, to_data,
8266         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8267         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8268         virtual methods.  All references updated throughout.
8269         <can_attach, supports_terminal_ours, can_create_inferior,
8270         get_thread_control_capabilities, attach_no_wait>: New
8271         virtual methods.
8272         <insert_breakpoint, remove_breakpoint>: Now
8273         TARGET_DEFAULT_NORETURN methods.
8274         <info_proc>: Now returns bool.
8275         <to_magic>: Delete.
8276         (OPS_MAGIC): Delete.
8277         (current_target): Delete.  All references replaced by references
8278         to ...
8279         (target_stack): ... this.  New.
8280         (target_shortname, target_longname): Adjust.
8281         (target_can_run): Now a function declaration.
8282         (default_child_has_all_memory, default_child_has_memory)
8283         (default_child_has_stack, default_child_has_registers)
8284         (default_child_has_execution): Remove target_ops parameter.
8285         (complete_target_initialization): Delete.
8286         (memory_breakpoint_target): New template class.
8287         (test_target_ops): Refactor as a C++ class with virtual methods.
8288         * make-target-delegates (NAME_PART): Tighten.
8289         (POINTER_PART, CP_SYMBOL): New.
8290         (SIMPLE_RETURN_PART): Reimplement.
8291         (VEC_RETURN_PART): Expect less.
8292         (RETURN_PART, VIRTUAL_PART): New.
8293         (METHOD): Adjust to C++ virtual methods.
8294         (scan_target_h): Remove reference to C99.
8295         (dname): Output "target_ops::" prefix.
8296         (write_function_header): Adjust to output a C++ class method.
8297         (write_declaration): New.
8298         (write_delegator): Adjust to output a C++ class method.
8299         (tdname): Output "dummy_target::" prefix.
8300         (write_tdefault, write_debugmethod): Adjust to output a C++ class
8301         method.
8302         (tdefault_names, debug_names): Delete.
8303         (return_types, tdefaults, styles, argtypes_array): New.
8304         (top level): All methods are delegators.
8305         (print_class): New.
8306         (top level): Print dummy_target and debug_target classes.
8307         * target-delegates.c: Regenerate.
8308         * target-debug.h (target_debug_print_enum_info_proc_what)
8309         (target_debug_print_thread_control_capabilities)
8310         (target_debug_print_thread_info_p): New.
8311         * target.c (dummy_target): Delete.
8312         (the_dummy_target, the_debug_target): New.
8313         (target_stack): Now extern.
8314         (set_targetdebug): Push/unpush debug target.
8315         (default_child_has_all_memory, default_child_has_memory)
8316         (default_child_has_stack, default_child_has_registers)
8317         (default_child_has_execution): Remove target_ops parameter.
8318         (complete_target_initialization): Delete.
8319         (add_target_with_completer): No longer call
8320         complete_target_initialization.
8321         (target_supports_terminal_ours): Use regular delegation.
8322         (update_current_target): Delete.
8323         (push_target): No longer check magic number.  Don't call
8324         update_current_target.
8325         (unpush_target): Don't call update_current_target.
8326         (target_is_pushed): No longer check magic number.
8327         (target_require_runnable): Skip for all stratums over
8328         process_stratum.
8329         (target_ops::info_proc): New.
8330         (target_info_proc): Use find_target_at and
8331         find_default_run_target.
8332         (target_supports_disable_randomization): Use regular delegation.
8333         (target_get_osdata): Use find_target_at.
8334         (target_ops::open, target_ops::close, target_ops::can_attach)
8335         (target_ops::attach, target_ops::can_create_inferior)
8336         (target_ops::create_inferior, target_ops::can_run)
8337         (target_can_run): New.
8338         (default_fileio_target): Use regular delegation.
8339         (target_ops::fileio_open, target_ops::fileio_pwrite)
8340         (target_ops::fileio_pread, target_ops::fileio_fstat)
8341         (target_ops::fileio_close, target_ops::fileio_unlink)
8342         (target_ops::fileio_readlink): New.
8343         (target_fileio_open_1, target_fileio_unlink)
8344         (target_fileio_readlink): Always call the target method.  Handle
8345         FILEIO_ENOSYS.
8346         (return_zero, return_zero_has_execution): Delete.
8347         (init_dummy_target): Delete.
8348         (dummy_target::dummy_target, dummy_target::shortname)
8349         (dummy_target::longname, dummy_target::doc)
8350         (debug_target::debug_target, debug_target::shortname)
8351         (debug_target::longname, debug_target::doc): New.
8352         (target_supports_delete_record): Use regular delegation.
8353         (setup_target_debug): Delete.
8354         (maintenance_print_target_stack): Skip debug_stratum.
8355         (initialize_targets): Instantiate the_dummy_target and
8356         the_debug_target.
8357         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
8358         use target_stack.
8359         (target_auxv_search, fprint_target_auxv): Adjust.
8360         (info_auxv_command): Adjust to use target_stack.
8361         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8362         * exceptions.c (print_flush): Handle a NULL target_stack.
8363         * regcache.c (target_ops_no_register): Refactor as class with
8364         virtual methods.
8365
8366         * exec.c (exec_target): New class.
8367         (exec_ops): Now an exec_target.
8368         (exec_open, exec_close_1, exec_get_section_table)
8369         (exec_xfer_partial, exec_files_info, exec_has_memory)
8370         (exec_make_note_section): Refactor as exec_target methods.
8371         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8372         Delete.
8373         (exec_target::find_memory_regions): New.
8374         (_initialize_exec): Don't call init_exec_ops.
8375         * gdbcore.h (exec_file_clear): Delete.
8376
8377         * corefile.c (core_target): Delete.
8378         (core_file_command): Adjust.
8379         * corelow.c (core_target): New class.
8380         (the_core_target): New.
8381         (core_close): Remove target_ops parameter.
8382         (core_close_cleanup): Adjust.
8383         (core_target::close): New.
8384         (core_open, core_detach, get_core_registers, core_files_info)
8385         (core_xfer_partial, core_thread_alive, core_read_description)
8386         (core_pid_to_str, core_thread_name, core_has_memory)
8387         (core_has_stack, core_has_registers, core_info_proc): Rework as
8388         core_target methods.
8389         (ignore, core_remove_breakpoint, init_core_ops): Delete.
8390         (_initialize_corelow): Initialize the_core_target.
8391         * gdbcore.h (core_target): Delete.
8392         (the_core_target): New.
8393
8394         * ctf.c: (ctf_target): New class.
8395         (ctf_ops): Now a ctf_target.
8396         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8397         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8398         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8399         methods.
8400         (init_ctf_ops): Delete.
8401         (_initialize_ctf): Don't call it.
8402         * tracefile-tfile.c (tfile_target): New class.
8403         (tfile_ops): Now a tfile_target.
8404         (tfile_open, tfile_close, tfile_files_info)
8405         (tfile_get_tracepoint_status, tfile_trace_find)
8406         (tfile_fetch_registers, tfile_xfer_partial)
8407         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8408         Refactor as tfile_target methods.
8409         (tfile_xfer_partial_features): Remove target_ops parameter.
8410         (init_tfile_ops): Delete.
8411         (_initialize_tracefile_tfile): Don't call it.
8412         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8413         (tracefile_has_stack, tracefile_has_registers)
8414         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8415         tracefile_target methods.
8416         (init_tracefile_ops): Delete.
8417         (tracefile_target::tracefile_target): New.
8418         * tracefile.h: Include "target.h".
8419         (tracefile_target): New class.
8420         (init_tracefile_ops): Delete.
8421
8422         * spu-multiarch.c (spu_multiarch_target): New class.
8423         (spu_ops): Now a spu_multiarch_target.
8424         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8425         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8426         (spu_search_memory, spu_mourn_inferior): Refactor as
8427         spu_multiarch_target methods.
8428         (init_spu_ops): Delete.
8429         (_initialize_spu_multiarch): Remove references to init_spu_ops,
8430         complete_target_initialization.
8431
8432         * ravenscar-thread.c (ravenscar_thread_target): New class.
8433         (ravenscar_ops): Now a ravenscar_thread_target.
8434         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8435         (ravenscar_thread_alive, ravenscar_pid_to_str)
8436         (ravenscar_fetch_registers, ravenscar_store_registers)
8437         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8438         (ravenscar_stopped_by_hw_breakpoint)
8439         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8440         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8441         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8442         methods.
8443         (init_ravenscar_thread_ops): Delete.
8444         (_initialize_ravenscar): Remove references to
8445         init_ravenscar_thread_ops and complete_target_initialization.
8446
8447         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8448         (bsd_uthread_target): New class.
8449         (bsd_uthread_ops): Now a bsd_uthread_target.
8450         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8451         (bsd_uthread_close, bsd_uthread_mourn_inferior)
8452         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8453         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8454         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8455         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8456         (bsd_uthread_target): Delete function.
8457         (_initialize_bsd_uthread): Remove reference to
8458         complete_target_initialization.
8459
8460         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
8461         (target_bfd): ... this new class.
8462         (target_bfd_xfer_partial, target_bfd_get_section_table)
8463         (target_bfd_close): Refactor as target_bfd methods.
8464         (target_bfd::~target_bfd): New.
8465         (target_bfd_reopen): Adjust.
8466         (target_bfd::close): New.
8467
8468         * record-btrace.c (record_btrace_target): New class.
8469         (record_btrace_ops): Now a record_btrace_target.
8470         (record_btrace_open, record_btrace_stop_recording)
8471         (record_btrace_disconnect, record_btrace_close)
8472         (record_btrace_async, record_btrace_info)
8473         (record_btrace_insn_history, record_btrace_insn_history_range)
8474         (record_btrace_insn_history_from, record_btrace_call_history)
8475         (record_btrace_call_history_range)
8476         (record_btrace_call_history_from, record_btrace_record_method)
8477         (record_btrace_is_replaying, record_btrace_will_replay)
8478         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8479         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8480         (record_btrace_store_registers, record_btrace_prepare_to_store)
8481         (record_btrace_to_get_unwinder)
8482         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8483         (record_btrace_commit_resume, record_btrace_wait)
8484         (record_btrace_stop, record_btrace_can_execute_reverse)
8485         (record_btrace_stopped_by_sw_breakpoint)
8486         (record_btrace_supports_stopped_by_sw_breakpoint)
8487         (record_btrace_stopped_by_hw_breakpoint)
8488         (record_btrace_supports_stopped_by_hw_breakpoint)
8489         (record_btrace_update_thread_list, record_btrace_thread_alive)
8490         (record_btrace_goto_begin, record_btrace_goto_end)
8491         (record_btrace_goto, record_btrace_stop_replaying_all)
8492         (record_btrace_execution_direction)
8493         (record_btrace_prepare_to_generate_core)
8494         (record_btrace_done_generating_core): Refactor as
8495         record_btrace_target methods.
8496         (init_record_btrace_ops): Delete.
8497         (_initialize_record_btrace): Remove reference to
8498         init_record_btrace_ops.
8499         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8500         the execution_direction global.
8501         (record_full_base_target, record_full_target)
8502         (record_full_core_target): New classes.
8503         (record_full_ops): Now a record_full_target.
8504         (record_full_core_ops): Now a record_full_core_target.
8505         (record_full_target::detach, record_full_target::disconnect)
8506         (record_full_core_target::disconnect)
8507         (record_full_target::mourn_inferior, record_full_target::kill):
8508         New.
8509         (record_full_open, record_full_close, record_full_async): Refactor
8510         as methods of the record_full_base_target class.
8511         (record_full_resume, record_full_commit_resume): Refactor
8512         as methods of the record_full_target class.
8513         (record_full_wait, record_full_stopped_by_watchpoint)
8514         (record_full_stopped_data_address)
8515         (record_full_stopped_by_sw_breakpoint)
8516         (record_full_supports_stopped_by_sw_breakpoint)
8517         (record_full_stopped_by_hw_breakpoint)
8518         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8519         methods of the record_full_base_target class.
8520         (record_full_store_registers, record_full_xfer_partial)
8521         (record_full_insert_breakpoint, record_full_remove_breakpoint):
8522         Refactor as methods of the record_full_target class.
8523         (record_full_can_execute_reverse, record_full_get_bookmark)
8524         (record_full_goto_bookmark, record_full_execution_direction)
8525         (record_full_record_method, record_full_info, record_full_delete)
8526         (record_full_is_replaying, record_full_will_replay)
8527         (record_full_goto_begin, record_full_goto_end, record_full_goto)
8528         (record_full_stop_replaying): Refactor as methods of the
8529         record_full_base_target class.
8530         (record_full_core_resume, record_full_core_kill)
8531         (record_full_core_fetch_registers)
8532         (record_full_core_prepare_to_store)
8533         (record_full_core_store_registers, record_full_core_xfer_partial)
8534         (record_full_core_insert_breakpoint)
8535         (record_full_core_remove_breakpoint)
8536         (record_full_core_has_execution): Refactor
8537         as methods of the record_full_core_target class.
8538         (record_full_base_target::supports_delete_record): New.
8539         (init_record_full_ops): Delete.
8540         (init_record_full_core_ops): Delete.
8541         (record_full_save): Refactor as method of the
8542         record_full_base_target class.
8543         (_initialize_record_full): Remove references to
8544         init_record_full_ops and init_record_full_core_ops.
8545
8546         * remote.c (remote_target, extended_remote_target): New classes.
8547         (remote_ops): Now a remote_target.
8548         (extended_remote_ops): Now an extended_remote_target.
8549         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8550         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8551         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8552         (remote_pass_signals, remote_set_syscall_catchpoint)
8553         (remote_program_signals, )
8554         (remote_thread_always_alive): Remove target_ops parameter.
8555         (remote_thread_alive, remote_thread_name)
8556         (remote_update_thread_list, remote_threads_extra_info)
8557         (remote_static_tracepoint_marker_at)
8558         (remote_static_tracepoint_markers_by_strid)
8559         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8560         (remote_open): Refactor as methods of remote_target.
8561         (extended_remote_open, extended_remote_detach)
8562         (extended_remote_attach, extended_remote_post_attach):
8563         (extended_remote_supports_disable_randomization)
8564         (extended_remote_create_inferior): : Refactor as method of
8565         extended_remote_target.
8566         (remote_set_permissions, remote_open_1, remote_detach)
8567         (remote_follow_fork, remote_follow_exec, remote_disconnect)
8568         (remote_resume, remote_commit_resume, remote_stop)
8569         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8570         (remote_terminal_ours, remote_wait, remote_fetch_registers)
8571         (remote_prepare_to_store, remote_store_registers)
8572         (remote_flash_erase, remote_flash_done, remote_files_info)
8573         (remote_kill, remote_mourn, remote_insert_breakpoint)
8574         (remote_remove_breakpoint, remote_insert_watchpoint)
8575         (remote_watchpoint_addr_within_range)
8576         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8577         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8578         (remote_supports_stopped_by_sw_breakpoint)
8579         (remote_stopped_by_hw_breakpoint)
8580         (remote_supports_stopped_by_hw_breakpoint)
8581         (remote_stopped_by_watchpoint, remote_stopped_data_address)
8582         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8583         (remote_verify_memory): Refactor as methods of remote_target.
8584         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8585         parameter.
8586         (remote_xfer_partial, remote_get_memory_xfer_limit)
8587         (remote_search_memory, remote_rcmd, remote_memory_map)
8588         (remote_pid_to_str, remote_get_thread_local_address)
8589         (remote_get_tib_address, remote_read_description): Refactor as
8590         methods of remote_target.
8591         (remote_target::fileio_open, remote_target::fileio_pwrite)
8592         (remote_target::fileio_pread, remote_target::fileio_close): New.
8593         (remote_hostio_readlink, remote_hostio_fstat)
8594         (remote_filesystem_is_local, remote_can_execute_reverse)
8595         (remote_supports_non_stop, remote_supports_disable_randomization)
8596         (remote_supports_multi_process, remote_supports_cond_breakpoints)
8597         (remote_supports_enable_disable_tracepoint)
8598         (remote_supports_string_tracing)
8599         (remote_can_run_breakpoint_commands, remote_trace_init)
8600         (remote_download_tracepoint, remote_can_download_tracepoint)
8601         (remote_download_trace_state_variable, remote_enable_tracepoint)
8602         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8603         (remote_trace_start, remote_get_trace_status)
8604         (remote_get_tracepoint_status, remote_trace_stop)
8605         (remote_trace_find, remote_get_trace_state_variable_value)
8606         (remote_save_trace_data, remote_get_raw_trace_data)
8607         (remote_set_disconnected_tracing, remote_core_of_thread)
8608         (remote_set_circular_trace_buffer, remote_traceframe_info)
8609         (remote_get_min_fast_tracepoint_insn_len)
8610         (remote_set_trace_buffer_size, remote_set_trace_notes)
8611         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8612         (remote_disable_btrace, remote_teardown_btrace)
8613         (remote_read_btrace, remote_btrace_conf)
8614         (remote_augmented_libraries_svr4_read, remote_load)
8615         (remote_pid_to_exec_file, remote_can_do_single_step)
8616         (remote_execution_direction, remote_thread_handle_to_thread_info):
8617         Refactor as methods of remote_target.
8618         (init_remote_ops, init_extended_remote_ops): Delete.
8619         (remote_can_async_p, remote_is_async_p, remote_async)
8620         (remote_thread_events, remote_upload_tracepoints)
8621         (remote_upload_trace_state_variables): Refactor as methods of
8622         remote_target.
8623         (_initialize_remote): Remove references to init_remote_ops and
8624         init_extended_remote_ops.
8625
8626         * remote-sim.c (gdbsim_target): New class.
8627         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8628         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8629         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8630         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8631         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8632         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8633         Refactor as methods of gdbsim_target.
8634         (gdbsim_ops): Now a gdbsim_target.
8635         (init_gdbsim_ops): Delete.
8636         (gdbsim_cntrl_c): Adjust.
8637         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8638
8639         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8640         (the_amd64_linux_nat_target): New.
8641         (amd64_linux_fetch_inferior_registers)
8642         (amd64_linux_store_inferior_registers): Refactor as methods of
8643         amd64_linux_nat_target.
8644         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
8645         * i386-linux-nat.c: Don't include "linux-nat.h".
8646         (i386_linux_nat_target): New class.
8647         (the_i386_linux_nat_target): New.
8648         (i386_linux_fetch_inferior_registers)
8649         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8650         as methods of i386_linux_nat_target.
8651         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
8652         * inf-child.c (inf_child_ops): Delete.
8653         (inf_child_fetch_inferior_registers)
8654         (inf_child_store_inferior_registers): Delete.
8655         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8656         methods of inf_child_target.
8657         (inf_child_target::supports_terminal_ours)
8658         (inf_child_target::terminal_init)
8659         (inf_child_target::terminal_inferior)
8660         (inf_child_target::terminal_ours_for_output)
8661         (inf_child_target::terminal_ours, inf_child_target::interrupt)
8662         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8663         New.
8664         (inf_child_open, inf_child_disconnect, inf_child_close)
8665         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8666         (inf_child_post_startup_inferior, inf_child_can_run)
8667         (inf_child_pid_to_exec_file): Refactor as methods of
8668         inf_child_target.
8669         (inf_child_follow_fork): Delete.
8670         (inf_child_target::can_create_inferior)
8671         (inf_child_target::can_attach): New.
8672         (inf_child_target::has_all_memory, inf_child_target::has_memory)
8673         (inf_child_target::has_stack, inf_child_target::has_registers)
8674         (inf_child_target::has_execution): New.
8675         (inf_child_fileio_open, inf_child_fileio_pwrite)
8676         (inf_child_fileio_pread, inf_child_fileio_fstat)
8677         (inf_child_fileio_close, inf_child_fileio_unlink)
8678         (inf_child_fileio_readlink, inf_child_use_agent)
8679         (inf_child_can_use_agent): Refactor as methods of
8680         inf_child_target.
8681         (return_zero, inf_child_target): Delete.
8682         (inf_child_target::inf_child_target): New.
8683         * inf-child.h: Include "target.h".
8684         (inf_child_target): Delete function prototype.
8685         (inf_child_target): New class.
8686         (inf_child_open_target, inf_child_mourn_inferior)
8687         (inf_child_maybe_unpush_target): Delete.
8688         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8689         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8690         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8691         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8692         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8693         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8694         (inf_ptrace_wait, inf_ptrace_xfer_partial)
8695         (inf_ptrace_thread_alive, inf_ptrace_files_info)
8696         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8697         methods of inf_ptrace_target.
8698         (inf_ptrace_target): Delete function.
8699         * inf-ptrace.h: Include "inf-child.h".
8700         (inf_ptrace_target): Delete function declaration.
8701         (inf_ptrace_target): New class.
8702         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8703         * linux-nat.c (linux_target): New.
8704         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8705         (linux_nat_target::~linux_nat_target): New.
8706         (linux_child_post_attach, linux_child_post_startup_inferior)
8707         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8708         (linux_child_remove_fork_catchpoint)
8709         (linux_child_insert_vfork_catchpoint)
8710         (linux_child_remove_vfork_catchpoint)
8711         (linux_child_insert_exec_catchpoint)
8712         (linux_child_remove_exec_catchpoint)
8713         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8714         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8715         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8716         (linux_nat_stopped_data_address)
8717         (linux_nat_stopped_by_sw_breakpoint)
8718         (linux_nat_supports_stopped_by_sw_breakpoint)
8719         (linux_nat_stopped_by_hw_breakpoint)
8720         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8721         (linux_nat_kill, linux_nat_mourn_inferior)
8722         (linux_nat_xfer_partial, linux_nat_thread_alive)
8723         (linux_nat_update_thread_list, linux_nat_pid_to_str)
8724         (linux_nat_thread_name, linux_child_pid_to_exec_file)
8725         (linux_child_static_tracepoint_markers_by_strid)
8726         (linux_nat_is_async_p, linux_nat_can_async_p)
8727         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8728         (linux_nat_supports_multi_process)
8729         (linux_nat_supports_disable_randomization, linux_nat_async)
8730         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8731         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8732         (linux_nat_fileio_open, linux_nat_fileio_readlink)
8733         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8734         methods of linux_nat_target.
8735         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8736         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8737         parameter.
8738         (check_stopped_by_watchpoint): Adjust.
8739         (linux_xfer_partial): Delete.
8740         (linux_target_install_ops, linux_target, linux_nat_add_target):
8741         Delete.
8742         (linux_nat_target::linux_nat_target): New.
8743         * linux-nat.h: Include "inf-ptrace.h".
8744         (linux_nat_target): New.
8745         (linux_target, linux_target_install_ops, linux_nat_add_target):
8746         Delete function declarations.
8747         (linux_target): Declare global.
8748         * linux-thread-db.c (thread_db_target): New.
8749         (thread_db_target::thread_db_target): New.
8750         (thread_db_ops): Delete.
8751         (the_thread_db_target): New.
8752         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8753         (thread_db_update_thread_list, thread_db_pid_to_str)
8754         (thread_db_extra_thread_info)
8755         (thread_db_thread_handle_to_thread_info)
8756         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8757         (thread_db_resume): Refactor as methods of thread_db_target.
8758         (init_thread_db_ops): Delete.
8759         (_initialize_thread_db): Remove reference to init_thread_db_ops.
8760         * x86-linux-nat.c: Don't include "linux-nat.h".
8761         (super_post_startup_inferior): Delete.
8762         (x86_linux_nat_target::~x86_linux_nat_target): New.
8763         (x86_linux_child_post_startup_inferior)
8764         (x86_linux_read_description, x86_linux_enable_btrace)
8765         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8766         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8767         methods of x86_linux_nat_target.
8768         (x86_linux_create_target): Delete.  Bits folded ...
8769         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
8770         pointer.
8771         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8772         (x86_linux_nat_target): New class.
8773         (x86_linux_create_target): Delete.
8774         (x86_linux_add_target): Now takes a linux_nat_target pointer.
8775         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8776         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8777         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8778         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8779         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8780         make extern.
8781         (x86_use_watchpoints): Delete.
8782         * x86-nat.h: Include "breakpoint.h" and "target.h".
8783         (x86_use_watchpoints): Delete.
8784         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8785         (x86_stopped_by_watchpoint, x86_stopped_data_address)
8786         (x86_insert_watchpoint, x86_remove_watchpoint)
8787         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8788         (x86_stopped_by_hw_breakpoint): New declarations.
8789         (x86_nat_target): New template class.
8790
8791         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8792         (the_ppc_linux_nat_target): New.
8793         (ppc_linux_fetch_inferior_registers)
8794         (ppc_linux_can_use_hw_breakpoint)
8795         (ppc_linux_region_ok_for_hw_watchpoint)
8796         (ppc_linux_ranged_break_num_registers)
8797         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8798         (ppc_linux_insert_mask_watchpoint)
8799         (ppc_linux_remove_mask_watchpoint)
8800         (ppc_linux_can_accel_watchpoint_condition)
8801         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8802         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8803         (ppc_linux_watchpoint_addr_within_range)
8804         (ppc_linux_masked_watch_num_registers)
8805         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8806         (ppc_linux_read_description): Refactor as methods of
8807         ppc_linux_nat_target.
8808         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8809
8810         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8811         (procfs_target): New class.
8812         (the_procfs_target): New.
8813         (procfs_target): Delete function.
8814         (procfs_auxv_parse, procfs_attach, procfs_detach)
8815         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8816         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8817         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8818         (procfs_create_inferior, procfs_update_thread_list)
8819         (procfs_thread_alive, procfs_pid_to_str)
8820         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8821         (procfs_stopped_data_address, procfs_insert_watchpoint)
8822         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8823         (proc_find_memory_regions, procfs_info_proc)
8824         (procfs_make_note_section): Refactor as methods of procfs_target.
8825         (_initialize_procfs): Adjust.
8826         * sol-thread.c (sol_thread_target): New class.
8827         (sol_thread_ops): Now a sol_thread_target.
8828         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8829         (sol_thread_fetch_registers, sol_thread_store_registers)
8830         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8831         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8832         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8833         (init_sol_thread_ops): Delete.
8834         (_initialize_sol_thread): Adjust.  Remove references to
8835         init_sol_thread_ops and complete_target_initialization.
8836
8837         * windows-nat.c (windows_nat_target): New class.
8838         (windows_fetch_inferior_registers)
8839         (windows_store_inferior_registers, windows_resume, windows_wait)
8840         (windows_attach, windows_detach, windows_pid_to_exec_file)
8841         (windows_files_info, windows_create_inferior)
8842         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8843         (windows_close, windows_pid_to_str, windows_xfer_partial)
8844         (windows_get_tib_address, windows_get_ada_task_ptid)
8845         (windows_thread_name, windows_thread_alive): Refactor as
8846         windows_nat_target methods.
8847         (do_initial_windows_stuff): Adjust.
8848         (windows_target): Delete function.
8849         (_initialize_windows_nat): Adjust.
8850
8851         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8852         (darwin_mourn_inferior, darwin_kill_inferior)
8853         (darwin_create_inferior, darwin_attach, darwin_detach)
8854         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8855         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8856         (darwin_supports_multi_process): Refactor as darwin_nat_target
8857         methods.
8858         (darwin_resume_to, darwin_files_info): Delete.
8859         (_initialize_darwin_inferior): Rename to ...
8860         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
8861         * darwin-nat.h: Include "inf-child.h".
8862         (darwin_nat_target): New class.
8863         (darwin_complete_target): Delete.
8864         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8865         (darwin_target): New.
8866         (i386_darwin_fetch_inferior_registers)
8867         (i386_darwin_store_inferior_registers): Refactor as methods of
8868         darwin_nat_target.
8869         (darwin_complete_target): Delete, with ...
8870         (_initialize_i386_darwin_nat): ... bits factored out here.
8871
8872         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8873         (the_alpha_linux_nat_target): New.
8874         (alpha_linux_register_u_offset): Refactor as
8875         alpha_linux_nat_target method.
8876         (_initialize_alpha_linux_nat): Adjust.
8877         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8878         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8879         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8880         methods of linux_nat_trad_target.
8881         (linux_trad_target): Delete.
8882         * linux-nat-trad.h (linux_trad_target): Delete function.
8883         (linux_nat_trad_target): New class.
8884         * mips-linux-nat.c (mips_linux_nat_target): New class.
8885         (super_fetch_registers, super_store_registers, super_close):
8886         Delete.
8887         (the_mips_linux_nat_target): New.
8888         (mips64_linux_regsets_fetch_registers)
8889         (mips64_linux_regsets_store_registers)
8890         (mips64_linux_fetch_registers, mips64_linux_store_registers)
8891         (mips_linux_register_u_offset, mips_linux_read_description)
8892         (mips_linux_can_use_hw_breakpoint)
8893         (mips_linux_stopped_by_watchpoint)
8894         (mips_linux_stopped_data_address)
8895         (mips_linux_region_ok_for_hw_watchpoint)
8896         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8897         (mips_linux_close): Refactor as methods of mips_linux_nat.
8898         (_initialize_mips_linux_nat): Adjust to C++ification.
8899
8900         * aix-thread.c (aix_thread_target): New class.
8901         (aix_thread_ops): Now an aix_thread_target.
8902         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8903         (aix_thread_fetch_registers, aix_thread_store_registers)
8904         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8905         (aix_thread_thread_alive, aix_thread_pid_to_str)
8906         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8907         Refactor as methods of aix_thread_target.
8908         (init_aix_thread_ops): Delete.
8909         (_initialize_aix_thread): Remove references to init_aix_thread_ops
8910         and complete_target_initialization.
8911         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8912         (rs6000_nat_target): New class.
8913         (the_rs6000_nat_target): New.
8914         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8915         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8916         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8917         (super_create_inferior): Delete.
8918         (_initialize_rs6000_nat): Adjust to C++ification.
8919
8920         * arm-linux-nat.c (arm_linux_nat_target): New class.
8921         (the_arm_linux_nat_target): New.
8922         (arm_linux_fetch_inferior_registers)
8923         (arm_linux_store_inferior_registers, arm_linux_read_description)
8924         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8925         (arm_linux_remove_hw_breakpoint)
8926         (arm_linux_region_ok_for_hw_watchpoint)
8927         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8928         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8929         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8930         arm_linux_nat_target.
8931         (_initialize_arm_linux_nat): Adjust to C++ification.
8932
8933         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8934         (the_aarch64_linux_nat_target): New.
8935         (aarch64_linux_fetch_inferior_registers)
8936         (aarch64_linux_store_inferior_registers)
8937         (aarch64_linux_child_post_startup_inferior)
8938         (aarch64_linux_read_description)
8939         (aarch64_linux_can_use_hw_breakpoint)
8940         (aarch64_linux_insert_hw_breakpoint)
8941         (aarch64_linux_remove_hw_breakpoint)
8942         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8943         (aarch64_linux_region_ok_for_hw_watchpoint)
8944         (aarch64_linux_stopped_data_address)
8945         (aarch64_linux_stopped_by_watchpoint)
8946         (aarch64_linux_watchpoint_addr_within_range)
8947         (aarch64_linux_can_do_single_step): Refactor as methods of
8948         aarch64_linux_nat_target.
8949         (super_post_startup_inferior): Delete.
8950         (_initialize_aarch64_linux_nat): Adjust to C++ification.
8951
8952         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8953         (the_hppa_linux_nat_target): New.
8954         (hppa_linux_fetch_inferior_registers)
8955         (hppa_linux_store_inferior_registers): Refactor as methods of
8956         hppa_linux_nat_target.
8957         (_initialize_hppa_linux_nat): Adjust to C++ification.
8958
8959         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8960         (the_ia64_linux_nat_target): New.
8961         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8962         (ia64_linux_stopped_data_address)
8963         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8964         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8965         ia64_linux_nat_target methods.
8966         (super_xfer_partial): Delete.
8967         (_initialize_ia64_linux_nat): Adjust to C++ification.
8968
8969         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8970         (the_m32r_linux_nat_target): New.
8971         (m32r_linux_fetch_inferior_registers)
8972         (m32r_linux_store_inferior_registers): Refactor as
8973         m32r_linux_nat_target methods.
8974         (_initialize_m32r_linux_nat): Adjust to C++ification.
8975
8976         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8977         (the_m68k_linux_nat_target): New.
8978         (m68k_linux_fetch_inferior_registers)
8979         (m68k_linux_store_inferior_registers): Refactor as
8980         m68k_linux_nat_target methods.
8981         (_initialize_m68k_linux_nat): Adjust to C++ification.
8982
8983         * s390-linux-nat.c (s390_linux_nat_target): New class.
8984         (the_s390_linux_nat_target): New.
8985         (s390_linux_fetch_inferior_registers)
8986         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8987         (s390_insert_watchpoint, s390_remove_watchpoint)
8988         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8989         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8990         (s390_auxv_parse, s390_read_description): Refactor as methods of
8991         s390_linux_nat_target.
8992         (_initialize_s390_nat): Adjust to C++ification.
8993
8994         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8995         (the_sparc_linux_nat_target): New.
8996         (_initialize_sparc_linux_nat): Adjust to C++ification.
8997         * sparc-nat.c (sparc_fetch_inferior_registers)
8998         (sparc_store_inferior_registers): Remove target_ops parameter.
8999         * sparc-nat.h (sparc_fetch_inferior_registers)
9000         (sparc_store_inferior_registers): Remove target_ops parameter.
9001         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9002         (the_sparc64_linux_nat_target): New.
9003         (_initialize_sparc64_linux_nat): Adjust to C++ification.
9004
9005         * spu-linux-nat.c (spu_linux_nat_target): New class.
9006         (the_spu_linux_nat_target): New.
9007         (spu_child_post_startup_inferior, spu_child_post_attach)
9008         (spu_child_wait, spu_fetch_inferior_registers)
9009         (spu_store_inferior_registers, spu_xfer_partial)
9010         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9011         methods.
9012         (_initialize_spu_nat): Adjust to C++ification.
9013
9014         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9015         (the_tilegx_linux_nat_target): New.
9016         (fetch_inferior_registers, store_inferior_registers):
9017         Refactor as methods.
9018         (_initialize_tile_linux_nat): Adjust to C++ification.
9019
9020         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9021         (the_xtensa_linux_nat_target): New.
9022         (xtensa_linux_fetch_inferior_registers)
9023         (xtensa_linux_store_inferior_registers): Refactor as
9024         xtensa_linux_nat_target methods.
9025         (_initialize_xtensa_linux_nat): Adjust to C++ification.
9026
9027         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9028         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9029         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9030         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9031         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9032         (fbsd_stopped_by_sw_breakpoint)
9033         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9034         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9035         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9036         (fbsd_post_startup_inferior, fbsd_post_attach)
9037         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9038         (fbsd_set_syscall_catchpoint)
9039         (super_xfer_partial, super_resume, super_wait)
9040         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9041         (fbsd_handle_debug_trap): Remove target_ops parameter.
9042         (fbsd_nat_add_target): Delete.
9043         * fbsd-nat.h: Include "inf-ptrace.h".
9044         (fbsd_nat_add_target): Delete.
9045         (USE_SIGTRAP_SIGINFO): Define.
9046         (fbsd_nat_target): New class.
9047
9048         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9049         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9050         (amd64bsd_target): Delete.
9051         * amd64-bsd-nat.h: New file.
9052         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9053         "x86-bsd-nat.h".
9054         (amd64_fbsd_nat_target): New class.
9055         (the_amd64_fbsd_nat_target): New.
9056         (amd64fbsd_read_description): Refactor as method of
9057         amd64_fbsd_nat_target.
9058         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9059         (_initialize_amd64fbsd_nat): Adjust to C++ification.
9060         * amd64-nat.h (amd64bsd_target): Delete function declaration.
9061         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9062         (i386bsd_store_inferior_registers): Remove target_ops parameter.
9063         (i386bsd_target): Delete.
9064         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9065         (i386bsd_fetch_inferior_registers)
9066         (i386bsd_store_inferior_registers): Declare.
9067         (i386_bsd_nat_target): New class.
9068         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9069         (the_i386_fbsd_nat_target): New.
9070         (i386fbsd_resume, i386fbsd_read_description): Refactor as
9071         i386_fbsd_nat_target methods.
9072         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9073         (_initialize_i386fbsd_nat): Adjust to C++ification.
9074         * x86-bsd-nat.c (super_mourn_inferior): Delete.
9075         (x86bsd_mourn_inferior, x86bsd_target): Delete.
9076         (_initialize_x86_bsd_nat): Adjust to C++ification.
9077         * x86-bsd-nat.h: Include "x86-nat.h".
9078         (x86bsd_target): Delete declaration.
9079         (x86bsd_nat_target): New class.
9080
9081         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9082         (the_aarch64_fbsd_nat_target): New.
9083         (aarch64_fbsd_fetch_inferior_registers)
9084         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9085         aarch64_fbsd_nat_target.
9086         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9087         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9088         (the_alpha_bsd_nat_target): New.
9089         (alphabsd_fetch_inferior_registers)
9090         (alphabsd_store_inferior_registers): Refactor as
9091         alpha_bsd_nat_target methods.
9092         (_initialize_alphabsd_nat): Refactor as methods of
9093         alpha_bsd_nat_target.
9094         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9095         (the_amd64_nbsd_nat_target): New.
9096         (_initialize_amd64nbsd_nat): Adjust to C++ification.
9097         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9098         (the_amd64_obsd_nat_target): New.
9099         (_initialize_amd64obsd_nat): Adjust to C++ification.
9100         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9101         (the_arm_fbsd_nat_target): New.
9102         (arm_fbsd_fetch_inferior_registers)
9103         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9104         (_initialize_arm_fbsd_nat): Refactor as methods of
9105         arm_fbsd_nat_target.
9106         (_initialize_arm_fbsd_nat): Adjust to C++ification.
9107         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9108         (the_arm_netbsd_nat_target): New.
9109         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9110         arm_netbsd_nat_target.
9111         (_initialize_arm_netbsd_nat): Adjust to C++ification.
9112         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9113         (the_hppa_nbsd_nat_target): New.
9114         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9115         hppa_nbsd_nat_target methods.
9116         (_initialize_hppanbsd_nat): Adjust to C++ification.
9117         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9118         (the_hppa_obsd_nat_target): New.
9119         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9120         methods of hppa_obsd_nat_target.
9121         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
9122         add_target.
9123         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9124         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
9125         add_target.
9126         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9127         (_initialize_i386obsd_nat): Use add_target.
9128         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9129         (the_m68k_bsd_nat_target): New.
9130         (m68kbsd_fetch_inferior_registers)
9131         (m68kbsd_store_inferior_registers): Refactor as methods of
9132         m68k_bsd_nat_target.
9133         (_initialize_m68kbsd_nat): Adjust to C++ification.
9134         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9135         (the_mips_fbsd_nat_target): New.
9136         (mips_fbsd_fetch_inferior_registers)
9137         (mips_fbsd_store_inferior_registers): Refactor as methods of
9138         mips_fbsd_nat_target.
9139         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
9140         add_target.
9141         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9142         (the_mips_nbsd_nat_target): New.
9143         (mipsnbsd_fetch_inferior_registers)
9144         (mipsnbsd_store_inferior_registers): Refactor as methods of
9145         mips_nbsd_nat_target.
9146         (_initialize_mipsnbsd_nat): Adjust to C++ification.
9147         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9148         (the_mips64_obsd_nat_target): New.
9149         (mips64obsd_fetch_inferior_registers)
9150         (mips64obsd_store_inferior_registers): Refactor as methods of
9151         mips64_obsd_nat_target.
9152         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
9153         add_target.
9154         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9155         nbsd_nat_target.
9156         * nbsd-nat.h: Include "inf-ptrace.h".
9157         (nbsd_nat_target): New class.
9158         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9159         (obsd_wait): Refactor as methods of obsd_nat_target.
9160         (obsd_add_target): Delete.
9161         * obsd-nat.h: Include "inf-ptrace.h".
9162         (obsd_nat_target): New class.
9163         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9164         (the_ppc_fbsd_nat_target): New.
9165         (ppcfbsd_fetch_inferior_registers)
9166         (ppcfbsd_store_inferior_registers): Refactor as methods of
9167         ppc_fbsd_nat_target.
9168         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
9169         add_target.
9170         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9171         (the_ppc_nbsd_nat_target): New.
9172         (ppcnbsd_fetch_inferior_registers)
9173         (ppcnbsd_store_inferior_registers): Refactor as methods of
9174         ppc_nbsd_nat_target.
9175         (_initialize_ppcnbsd_nat): Adjust to C++ification.
9176         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9177         (the_ppc_obsd_nat_target): New.
9178         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9179         methods of ppc_obsd_nat_target.
9180         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
9181         add_target.
9182         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9183         (the_sh_nbsd_nat_target): New.
9184         (shnbsd_fetch_inferior_registers)
9185         (shnbsd_store_inferior_registers): Refactor as methods of
9186         sh_nbsd_nat_target.
9187         (_initialize_shnbsd_nat): Adjust to C++ification.
9188         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9189         (inf_ptrace_xfer_partial): Delete.
9190         (sparc_xfer_partial, sparc_target): Delete.
9191         * sparc-nat.h (sparc_fetch_inferior_registers)
9192         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9193         (sparc_target): Delete function declaration.
9194         (sparc_target): New template class.
9195         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9196         (_initialize_sparcnbsd_nat): Adjust to C++ification.
9197         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9198         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
9199         add_target.
9200         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9201         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9202         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9203         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
9204         add_target.
9205         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9206         (the_vax_bsd_nat_target): New.
9207         (vaxbsd_fetch_inferior_registers)
9208         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9209         methods.
9210         (_initialize_vaxbsd_nat): Adjust to C++ification.
9211
9212         * bsd-kvm.c (bsd_kvm_target): New class.
9213         (bsd_kvm_ops): Now a bsd_kvm_target.
9214         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9215         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9216         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9217         bsd_kvm_target.
9218         (bsd_kvm_return_one): Delete.
9219         (bsd_kvm_add_target): Adjust to C++ification.
9220
9221         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9222         (nto_procfs_target_procfs): New classes.
9223         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9224         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9225         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9226         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9227         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9228         (procfs_remove_hw_breakpoint, procfs_resume)
9229         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9230         (procfs_kill_inferior, procfs_store_registers)
9231         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9232         as methods of nto_procfs_target.
9233         (nto_procfs_ops): Now an nto_procfs_target_procfs.
9234         (nto_native_ops): Delete.
9235         (procfs_open, procfs_native_open): Delete.
9236         (nto_native_ops): Now an nto_procfs_target_native.
9237         (init_procfs_targets): Adjust to C++ification.
9238         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9239         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9240         Refactor as methods of nto_procfs_target.
9241
9242         * go32-nat.c (go32_nat_target): New class.
9243         (the_go32_nat_target): New.
9244         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9245         (go32_store_registers, go32_xfer_partial, go32_files_info)
9246         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9247         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9248         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9249         (go32_pid_to_str): Refactor as methods of go32_nat_target.
9250         (go32_target): Delete.
9251         (_initialize_go32_nat): Adjust to C++ification.
9252
9253         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9254         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9255         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9256         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9257         gnu_nat_target.
9258         (gnu_target): Delete.
9259         * gnu-nat.h (gnu_target): Delete.
9260         (gnu_nat_target): New class.
9261         * i386-gnu-nat.c (gnu_base_target): New.
9262         (i386_gnu_nat_target): New class.
9263         (the_i386_gnu_nat_target): New.
9264         (_initialize_i386gnu_nat): Adjust to C++ification.
9265
9266 2018-05-02  Pedro Alves  <palves@redhat.com>
9267
9268         * bfd-target.c (target_bfd_xclose): Rename to ...
9269         (target_bfd_close): ... this.
9270         (target_bfd_reopen): Adjust.
9271         * target.c (target_close): Remove references to to_xclose.
9272         * target.h (target_ops::to_xclose): Delete.
9273         (target_ops::to_close): Update comments.
9274
9275 2018-05-02  Pedro Alves  <palves@redhat.com>
9276
9277         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9278         "linux-nat.h".
9279         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9280         * inf-ptrace.c (inf_ptrace_register_u_offset)
9281         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9282         (inf_ptrace_store_register, inf_ptrace_store_registers)
9283         (inf_ptrace_trad_target): Move to ...
9284         * linux-nat-trad.c: ... this new file.
9285         * linux-nat-trad.h: New file.
9286         * linux-nat.c (linux_target_install_ops): Make extern.
9287         (linux_trad_target): Delete.
9288         * linux-nat.h (linux_trad_target): Delete declaration.
9289         (linux_target_install_ops): Declare.
9290         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9291         "linux-nat.h".
9292
9293 2018-05-02  Pedro Alves  <palves@redhat.com>
9294
9295         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9296         procfs_target/add_target here.
9297         * procfs.c (procfs_target): Make static.
9298         (_initialize_procfs): Call add_target here.
9299         * procfs.h (struct target_ops): Remove forward declaration.
9300         (procfs_target): Remove declaration.
9301         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9302
9303 2018-05-02  Pedro Alves  <palves@redhat.com>
9304
9305         * procfs.c (procfs_stopped_by_watchpoint)
9306         (procfs_insert_watchpoint, procfs_remove_watchpoint)
9307         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9308         Forward declare.
9309         (procfs_use_watchpoints): Delete, move contents...
9310         (procfs_target): ... here.
9311         * procfs.h (procfs_use_watchpoints): Delete declaration.
9312         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9313         procfs_use_watchpoints.
9314         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9315         procfs_use_watchpoints.
9316
9317 2018-05-02  Tom Tromey  <tom@tromey.com>
9318
9319         PR python/20084:
9320         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9321         and var_zuinteger_unlimited.
9322         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9323         and PARAM_ZUINTEGER_UNLIMITED.
9324         (set_parameter_value): Handle var_zuinteger and
9325         var_zuinteger_unlimited.
9326         (add_setshow_generic): Likewise.
9327         (parmpy_init): Likewise.
9328
9329 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
9330
9331         PR rust/23124
9332         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9333         pointer is not null before dereferencing it.
9334
9335 2018-04-30  Tom Tromey  <tom@tromey.com>
9336
9337         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9338         is_mi_like_p.
9339
9340 2018-04-30  Tom Tromey  <tom@tromey.com>
9341
9342         * breakpoint.c (mention): Remove use of is_mi_like_p.
9343         (print_mention_ranged_breakpoint): Likewise.
9344         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9345         of is_mi_like_p.
9346
9347 2018-04-30  Tom Tromey  <tom@tromey.com>
9348
9349         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9350
9351 2018-04-30  Tom Tromey  <tom@tromey.com>
9352
9353         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9354         (info_spu_event_command): Remove some uses of is_mi_like_p.
9355
9356 2018-04-30  Tom Tromey  <tom@tromey.com>
9357
9358         * python/py-framefilter.c (py_print_single_arg)
9359         (enumerate_locals, py_print_args, py_print_frame): Remove some
9360         uses of is_mi_like_p.
9361
9362 2018-04-30  Tom Tromey  <tom@tromey.com>
9363
9364         * ui-out.c: Update.
9365         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9366         * ui-out.h (ui_out::is_mi_like_p): Now const.
9367         (ui_out::do_is_mi_like_p): Now const.
9368         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9369
9370 2018-04-30  Tom Tromey  <tom@tromey.com>
9371
9372         * varobj.c (varobj_set_visualizer): Use new_reference.
9373         * python/python.c (gdbpy_decode_line): Use new_reference.
9374         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9375         new_reference.
9376
9377 2018-04-30  Tom Tromey  <tom@tromey.com>
9378
9379         * varobj.c (install_new_value): Use new_reference.
9380         * value.h (value_incref): Return void.  Swap intro comment with
9381         value_decref.
9382         * value.c (set_value_parent): Use new_reference.
9383         (value_incref): Return void.  Update intro comment.
9384         (release_value): Use new_reference.
9385         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9386
9387 2018-04-30  Tom Tromey  <tom@tromey.com>
9388
9389         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9390         * gdb_bfd.h (new_bfd_ref): Remove.
9391         (gdb_bfd_open): Update comment.
9392         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9393         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9394         (gdb_bfd_fdopenr): Use new_reference.
9395         * exec.c (exec_file_attach): Use new_reference.
9396
9397 2018-04-30  Tom Tromey  <tom@tromey.com>
9398
9399         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9400         method.
9401
9402 2018-04-30  Tom Tromey  <tom@tromey.com>
9403
9404         * jit.c (jit_read_code_entry): Use type_align.
9405         * i386-tdep.c (i386_gdbarch_init): Don't call
9406         set_gdbarch_long_long_align_bit.
9407         * gdbarch.sh: Remove long_long_align_bit.
9408         * gdbarch.c, gdbarch.h: Rebuild.
9409         * arc-tdep.c (arc_type_align): New function.
9410         (arc_gdbarch_init): Use arc_type_align.  Don't call
9411         set_gdbarch_long_long_align_bit.
9412
9413 2018-04-30  Tom Tromey  <tom@tromey.com>
9414
9415         * rust-lang.c (rust_type_alignment): Remove.
9416         (rust_composite_type): Use type_align.
9417
9418 2018-04-30  Tom Tromey  <tom@tromey.com>
9419
9420         * NEWS: Mention Type.align.
9421         * python/py-type.c (typy_get_alignof): New function.
9422         (type_object_getset): Add "alignof".
9423
9424 2018-04-30  Tom Tromey  <tom@tromey.com>
9425
9426         PR exp/17095:
9427         * NEWS: Update.
9428         * std-operator.def (UNOP_ALIGNOF): New operator.
9429         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9430         New.
9431         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9432         * c-lang.c (c_op_print_tab): Add alignof.
9433         * c-exp.y (ALIGNOF): New token.
9434         (exp): Add "ALIGNOF" production.
9435         (ident_tokens): Add _Alignof and alignof.
9436
9437 2018-04-30  Tom Tromey  <tom@tromey.com>
9438
9439         * i386-tdep.c (i386_type_align): New function.
9440         (i386_gdbarch_init): Update.
9441         * gdbarch.sh (type_align): New method.
9442         * gdbarch.c, gdbarch.h: Rebuild.
9443         * arch-utils.h (default_type_align): Declare.
9444         * arch-utils.c (default_type_align): New function.
9445         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9446         (struct type) <align_log2>: New field.
9447         <instance_flags>: Now a bitfield.
9448         (TYPE_RAW_ALIGN): New macro.
9449         (type_align, type_raw_align, set_type_align): Declare.
9450         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9451         functions.
9452         * dwarf2read.c (quirk_rust_enum): Set type alignment.
9453         (get_alignment, maybe_set_alignment): New functions.
9454         (read_structure_type, read_enumeration_type, read_array_type)
9455         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9456         (read_subrange_type, read_base_type): Set type alignment.
9457
9458 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
9459
9460         * dwarf2read.c (read_index_from_section): Use bool.
9461
9462 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
9463
9464         PR gdb/22950
9465         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9466         with #ifdef.
9467
9468 2018-04-29  John Reiser  <jreiser@BitWagon.com>
9469
9470         PR build/22873
9471         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9472         last step, and do it atomically.
9473
9474 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
9475
9476         * compile/compile-c-types.c (convert_int, convert_float):
9477         Update for C FE v1.
9478
9479 2018-04-27  Tom Tromey  <tom@tromey.com>
9480
9481         PR rust/22545:
9482         * rust-lang.c (rust_inclusive_range_type_p): New function.
9483         (rust_range): Handle inclusive ranges.
9484         (rust_compute_range): Likewise.
9485         * rust-exp.y (struct rust_op) <inclusive>: New field.
9486         (DOTDOTEQ): New constant.
9487         (range_expr): Add "..=" productions.
9488         (operator_tokens): Add "..=" token.
9489         (ast_range): Add "inclusive" parameter.
9490         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9491         ranges.
9492         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9493         bounds values.
9494         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9495         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9496         Update comments.
9497         * expprint.c (print_subexp_standard): Handle new bounds values.
9498         (dump_subexp_body_standard): Likewise.
9499
9500 2018-04-27  Tom Tromey  <tom@tromey.com>
9501
9502         * configure: Rebuild.
9503         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9504         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9505         "OVERRIDE".
9506         (class symbol_needs_eval_context): Likewise.
9507         * dwarf2read.c (mock_mapped_index::symbol_name_count)
9508         (mock_mapped_index::symbol_name_at): Use "override".  Remove
9509         "virtual".
9510         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9511         "override".
9512         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9513         * aarch64-tdep.c (instruction_reader::read): Use "override".
9514         (instruction_reader_test::read): Likewise.
9515         * arm-tdep.c (instruction_reader::read): Use "override".
9516         (instruction_reader_thumb::read): Likewise.
9517
9518 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
9519
9520         PR remote/9665
9521         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9522         instead of remote_send.
9523         (remote_send): Remove.
9524
9525 2018-04-26  Pedro Alves  <palves@redhat.com>
9526
9527         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9528         find_function_start_sal instead of find_pc_line.
9529
9530 2018-04-26  Pedro Alves  <palves@redhat.com>
9531
9532         * breakpoint.c (set_breakpoint_location_function): Handle
9533         mst_data_gnu_ifunc.
9534         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9535         * elfread.c (elf_symtab_read): Give data symbols with
9536         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9537         (elf_rel_plt_read): Update comment.
9538         * linespec.c (convert_linespec_to_sals): Handle
9539         mst_data_gnu_ifunc.
9540         (minsym_found): Handle mst_data_gnu_ifunc.
9541         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9542         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9543         * parse.c (find_minsym_type_and_address): Handle
9544         mst_data_gnu_ifunc.
9545         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9546         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9547         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9548         comment.
9549         <mst_data_gnu_ifunc>: New enumerator.
9550
9551 2018-04-26  Pedro Alves  <palves@redhat.com>
9552
9553         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9554         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
9555         'want_trampoline' parameter by a lookup_msym_prefer parameter.
9556         Handle it.
9557         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9558         (lookup_minimal_symbol_by_pc): Adjust.
9559         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9560         (lookup_solib_trampoline_symbol_by_pc): Adjust.
9561         * minsyms.h (lookup_msym_prefer): New enum.
9562         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9563         parameter by a lookup_msym_prefer parameter.
9564
9565 2018-04-26  Pedro Alves  <palves@redhat.com>
9566
9567         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9568         ends in "@plt" instead of looking at the symbol's section.
9569
9570 2018-04-26  Pedro Alves  <palves@redhat.com>
9571
9572         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
9573         all references.
9574         (find_pc_partial_function_gnu_ifunc): Rename to ...
9575         (find_pc_partial_function): ... this, and remove references to
9576         'is_gnu_ifunc_p'.
9577         (find_pc_partial_function): Delete old implementation.
9578         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9579
9580 2018-04-26  Pedro Alves  <palves@redhat.com>
9581
9582         * linespec.c (struct bound_minimal_symbol_search_key): New.
9583         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
9584         skip first line if we found a GNU ifunc minimal symbol by name.
9585         (compare_msymbols): Change parameters to work with a destructured
9586         lhs minsym.
9587         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9588         functions.
9589
9590 2018-04-26  Pedro Alves  <palves@redhat.com>
9591
9592         * breakpoint.c (set_breakpoint_location_function): Don't resolve
9593         ifunc targets here.  Instead, if we have an ifunc minsym, use its
9594         address/name.
9595         (add_location_to_breakpoint): Store the minsym and the objfile in
9596         the breakpoint location.
9597         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9598         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9599         Record the minsym in the sal.
9600         * symtab.h (symtab_and_line) <msymbol>: New field.
9601
9602 2018-04-26  Pedro Alves  <palves@redhat.com>
9603
9604         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9605         unless we actually resolved the ifunc.
9606
9607 2018-04-26  Pedro Alves  <palves@redhat.com>
9608
9609         * c-exp.y (variable production): Prefer ifunc minsyms over
9610         regular function symbols.
9611         * symtab.c (find_gnu_ifunc): New function.
9612         * minsyms.h (lookup_msym_prefer): New enum.
9613         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9614         parameter by a lookup_msym_prefer parameter.
9615         * symtab.h (find_gnu_ifunc): New declaration.
9616
9617 2018-04-26  Pedro Alves  <palves@redhat.com>
9618
9619         * blockframe.c (find_gnu_ifunc_target_type): New function.
9620         (find_function_type): New.
9621         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9622         return a value with a memory address.
9623         (eval_call): For calls to GNU ifunc functions, try to find the
9624         type of the target function from the type that the resolver
9625         returns.
9626         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9627         symbols.
9628         * infcall.c (find_function_return_type): Delete.
9629         (find_function_addr): Add 'function_type' parameter.  For calls to
9630         GNU ifunc functions, try to find the type of the target function
9631         from the type that the resolver returns, and return it via
9632         FUNCTION_TYPE.
9633         (call_function_by_hand_dummy): Adjust to use the function type
9634         returned by find_function_addr.
9635         (find_function_addr): Add 'function_type' parameter and move
9636         description here.
9637         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9638         declarations.
9639
9640 2018-04-26  Pedro Alves  <palves@redhat.com>
9641
9642         * c-exp.y (variable production): Skip finding an alias for ifunc
9643         symbols.
9644
9645 2018-04-26  Pedro Alves  <palves@redhat.com>
9646
9647         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9648
9649 2018-04-25  Pedro Alves  <palves@redhat.com>
9650
9651         * infcmd.c (kill_command): Print the pid as string, not the whole
9652         thread's ptid.  Add comment.  s/has been killed/killed/ in output
9653         message.
9654         * remote.c (remote_detach_1): Print the pid as string, not the
9655         whole thread's ptid.
9656
9657 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9658             Sergio Durigan Junior  <sergiodj@redhat.com>
9659             Pedro Alves  <palves@redhat.com>
9660
9661         * infcmd.c (kill_command): Print message when inferior has
9662         been killed.
9663         * inferior.c (print_inferior_events): Remove 'static'.  Set as
9664         '1'.
9665         (add_inferior): Improve message printed when
9666         'print_inferior_events' is on.
9667         (exit_inferior): Remove message printed when
9668         'print_inferior_events' is on.
9669         (detach_inferior): Improve message printed when
9670         'print_inferior_events' is on.
9671         (initialize_inferiors): Use 'add_inferior_silent' to set
9672         'current_inferior_'.
9673         * inferior.h (print_inferior_events): Declare here as
9674         'extern'.
9675         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9676         '[Detaching...]' messages when 'print_inferior_events' is on.
9677         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
9678         as prefix/suffix for messages.  Remove periods.  Fix erroneous
9679         'Detaching after fork from child...', replace it by '... from
9680         parent...'.
9681         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9682         prefix/suffix when printing 'Detaching...' messages.  Print
9683         them when 'print_inferior_events' is on.
9684         * remote.c (remote_detach_1): Print message when detaching
9685         from inferior and '!is_fork_parent'.
9686
9687 2018-04-24  Tom Tromey  <tom@tromey.com>
9688
9689         * cli-out.h: Reindent.
9690
9691 2018-04-24  Tom Tromey  <tom@tromey.com>
9692
9693         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9694         (cli_ui_out::do_field_string): Use fputs_filtered.
9695         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9696
9697 2018-04-23  Tom Tromey  <tom@tromey.com>
9698
9699         * guile/scm-frame.c (gdbscm_frame_read_var): Use
9700         gdb::unique_xmalloc_ptr.
9701
9702 2018-04-23  Tom Tromey  <tom@tromey.com>
9703
9704         * configure: Rebuild.
9705
9706 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
9707
9708         PR gdb/23095
9709         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9710         prepare_for_testing.  Set normal_bp to r_debug_state if target
9711         is bsd.
9712
9713 2018-04-21  Pedro Alves  <palves@redhat.com>
9714             Rajendra SY  <rajendra.sy@gmail.com>
9715
9716         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9717         * remote.c (extended_remote_attach): In all-stop mode, mark the
9718         thread as executing.
9719
9720 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9721
9722         * thread.c (thread_apply_all_command): Fix comment.
9723         (thread_command): Fix comment.
9724
9725 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
9726
9727         * common/tdesc.h (tdesc_create_feature): Remove xml filename
9728         parameter.
9729         * features/aarch64-core.c (create_feature_aarch64_core):
9730         Regenerate.
9731         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9732         Likewise.
9733         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9734         Likewise.
9735         * features/i386/32bit-avx512.c
9736         (create_feature_i386_32bit_avx512): Likewise.
9737         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9738         Likewise.
9739         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9740         Likewise.
9741         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9742         Likewise.
9743         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9744         Likewise.
9745         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9746         Likewise.
9747         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9748         Likewise.
9749         * features/i386/64bit-avx512.c
9750         (create_feature_i386_64bit_avx512): Likewise.
9751         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9752         Likewise.
9753         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9754         Likewise.
9755         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9756         Likewise.
9757         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9758         Likewise.
9759         * features/i386/64bit-segments.c
9760         (create_feature_i386_64bit_segments): Likewise.
9761         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9762         Likewise.
9763         * features/i386/x32-core.c
9764         (create_feature_i386_x32_core): Likewise.
9765         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9766         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9767         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9768         * target-descriptions.c: In generated code, don't pass xml
9769         filename.
9770
9771 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9772
9773         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9774         (print_xml_feature::visit_post): Likewise.
9775         (print_xml_feature::visit): Likewise.
9776         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9777         (print_xml_feature): Add new class.
9778         * regformats/regdat.sh: Null xmltarget on feature targets.
9779         * target-descriptions.c (struct target_desc): Add xmltarget.
9780         (maintenance_check_tdesc_xml_convert): Add unittest function.
9781         (tdesc_get_features_xml): Add function to get xml.
9782         (maintenance_check_xml_descriptions): Test xml generation.
9783         * xml-tdesc.c (string_read_description_xml): Add function.
9784         * xml-tdesc.h (string_read_description_xml): Add declaration.
9785
9786 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9787
9788         * features/Makefile: Add feature marker to targets with new style
9789         target descriptions.
9790         * regformats/aarch64.dat: Regenerate.
9791         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9792         * regformats/i386/amd64-avx-linux.dat: Likewise.
9793         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9794         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9795         * regformats/i386/amd64-linux.dat: Likewise.
9796         * regformats/i386/amd64-mpx-linux.dat: Likewise.
9797         * regformats/i386/amd64.dat: Likewise.
9798         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9799         * regformats/i386/i386-avx-linux.dat: Likewise.
9800         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9801         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9802         * regformats/i386/i386-linux.dat: Likewise.
9803         * regformats/i386/i386-mmx-linux.dat: Likewise.
9804         * regformats/i386/i386-mpx-linux.dat: Likewise.
9805         * regformats/i386/i386.dat: Likewise.
9806         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9807         * regformats/i386/x32-avx-linux.dat: Likewise.
9808         * regformats/i386/x32-linux.dat: Likewise.
9809         * regformats/tic6x-c62x-linux.dat: Likewise.
9810         * regformats/tic6x-c64x-linux.dat: Likewise.
9811         * regformats/tic6x-c64xp-linux.dat: Likewise.
9812         * regformats/regdat.sh: Parse feature marker.
9813
9814 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9815
9816         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9817         (tdesc_osabi_name): Likewise.
9818         * target-descriptions.c (tdesc_architecture_name): Add new
9819         function.
9820         (tdesc_osabi_name): Likewise.
9821
9822 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9823
9824         * common/tdesc.c (tdesc_predefined_type): Move to here.
9825         (tdesc_named_type): Likewise.
9826         (tdesc_create_vector): Likewise.
9827         (tdesc_create_struct): Likewise.
9828         (tdesc_set_struct_size): Likewise.
9829         (tdesc_create_union): Likewise.
9830         (tdesc_create_flags): Likewise.
9831         (tdesc_create_enum): Likewise.
9832         (tdesc_add_field): Likewise.
9833         (tdesc_add_typed_bitfield): Likewise.
9834         (tdesc_add_bitfield): Likewise.
9835         (tdesc_add_flag): Likewise.
9836         (tdesc_add_enum_value): Likewise.
9837         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9838         (struct tdesc_type_vector): Likewise.
9839         (struct tdesc_type_field): Likewise.
9840         (struct tdesc_type_with_fields): Likewise.
9841         (tdesc_create_enum): Add declaration.
9842         (tdesc_add_typed_bitfield): Likewise.
9843         (tdesc_add_enum_value): Likewise.
9844         * target-descriptions.c (tdesc_type_field): Move from here.
9845         (tdesc_type_builtin): Likewise.
9846         (tdesc_type_vector): Likewise.
9847         (tdesc_type_with_fields): Likewise.
9848         (tdesc_predefined_types): Likewise.
9849         (tdesc_named_type): Likewise.
9850         (tdesc_create_vector): Likewise.
9851         (tdesc_create_struct): Likewise.
9852         (tdesc_set_struct_size): Likewise.
9853         (tdesc_create_union): Likewise.
9854         (tdesc_create_flags): Likewise.
9855         (tdesc_create_enum): Likewise.
9856         (tdesc_add_field): Likewise.
9857         (tdesc_add_typed_bitfield): Likewise.
9858         (tdesc_add_bitfield): Likewise.
9859         (tdesc_add_flag): Likewise.
9860         (tdesc_add_enum_value): Likewise.
9861         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9862         (tdesc_add_typed_bitfield): Likewise.
9863         (tdesc_add_enum_value): Likewise.
9864
9865 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9866
9867         * common/tdesc.c (tdesc_feature::accept): Move to here.
9868         (tdesc_feature::operator==): Likewise.
9869         (tdesc_create_reg): Likewise.
9870         * common/tdesc.h (tdesc_type_kind): Likewise.
9871         (struct tdesc_type): Likewise.
9872         (struct tdesc_feature): Likewise.
9873         * regformats/regdat.sh: Create a feature.
9874         * target-descriptions.c (tdesc_type_kind): Move from here.
9875         (tdesc_type): Likewise.
9876         (tdesc_type_up): Likewise.
9877         (tdesc_feature): Likewise.
9878         (tdesc_create_reg): Likewise.
9879
9880 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9881
9882         * Makefile.in: Add arch/tdesc.c
9883         * common/tdesc.c: New file.
9884         * common/tdesc.h (tdesc_element_visitor): Move to here.
9885         (tdesc_element): Likewise.
9886         (tdesc_reg): Likewise.
9887         (tdesc_reg_up): Likewise.
9888         * regformats/regdef.h (reg): Add offset to constructors.
9889         * target-descriptions.c (tdesc_element_visitor): Move from here.
9890         (tdesc_element): Likewise.
9891         (tdesc_reg): Likewise.
9892         (tdesc_reg_up): Likewise.
9893
9894 2018-04-17  Tom Tromey  <tom@tromey.com>
9895
9896         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9897         discriminant field.
9898
9899 2018-04-17  Tom Tromey  <tom@tromey.com>
9900
9901         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9902
9903 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9904
9905         * symtab.c (print_symbol_info): Skip printing filename and line
9906         number when `last' is NULL.
9907         (symtab_symbol_info): Use empty string instead of NULL for first
9908         invocation of print_symbol_info.
9909         (rbreak_command): Pass NULL to `last' parameter of
9910         print_symbol_info.
9911
9912 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
9913
9914         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9915         instead of nullptr.
9916
9917 2018-04-16  Pedro Alves  <palves@redhat.com>
9918
9919         * MAINTAINERS (sh): Remove.
9920         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9921         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9922         (ALLDEPFILES): Remove sh64-tdep.c.
9923         * NEWS: Mentions that support for SH-5/SH64 is removed.
9924         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9925         (sh*-*-openbsd*): Ditto.
9926         (sh64-*-elf*): Remove.
9927         (sh*): Remove.
9928         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9929         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9930         * sh-tdep.c: No longer include "sh64-tdep.h".
9931         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9932         * sh64-tdep.c, sh64-tdep.h: Remove files.
9933
9934 2018-04-16  Pedro Alves  <palves@redhat.com>
9935
9936         * MAINTAINERS: Remove m88k.
9937         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9938         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9939         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9940         * NEWS: Mention that support for m88k was removed.
9941         * configure.host (m88*-*-*): Remove support.
9942         * configure.nat (m88k-*-*): Remove support.
9943         * configure.tgt (m88*-*-openbsd*): Remove.
9944         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9945
9946 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
9947
9948         * configure.tgt (x86_tobjs): New variable.
9949         (amd64_tobjs, i386_tobjs): Use it.
9950
9951 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9952
9953         * symtab.c (print_symbol_info): Precede the symbol definition by
9954         the line number when available.
9955         * NEWS: Advertise this enhancement.
9956
9957 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9958
9959         * NEWS (New options): announce set/show record btrace cpu.
9960         * btrace.c: Include record-btrace.h.
9961         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9962         the vendor is unknown.
9963         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
9964         Maybe overwrite the btrace configuration's cpu.
9965         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
9966         (btrace_fetch): Add cpu parameter.  Update callers.
9967         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9968         Maybe overwrite the btrace configuration's cpu.  Skip enabling
9969         errata workarounds if the vendor is unknown.
9970         * python/py-record-btrace.c: Include record-btrace.h.
9971         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9972         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9973         * record-btrace.c (record_btrace_cpu_state_kind): New.
9974         (record_btrace_cpu): New.
9975         (set_record_btrace_cpu_cmdlist): New.
9976         (record_btrace_get_cpu): New.
9977         (require_btrace_thread, record_btrace_info)
9978         (record_btrace_resume_thread): Call record_btrace_get_cpu.
9979         (cmd_set_record_btrace_cpu_none): New.
9980         (cmd_set_record_btrace_cpu_auto): New.
9981         (cmd_set_record_btrace_cpu): New.
9982         (cmd_show_record_btrace_cpu): New.
9983         (_initialize_record_btrace): Initialize set/show record btrace cpu
9984         commands.
9985         * record-btrace.h (record_btrace_get_cpu): New.
9986
9987 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9988
9989         * record.c (set_record_command): Fix typo in message.
9990
9991 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9992
9993         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9994
9995 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9996
9997         * infrun.c (process_event_stop_test): Call
9998         gdbarch_in_indirect_branch_thunk.
9999         * gdbarch.sh (in_indirect_branch_thunk): New.
10000         * gdbarch.c: Regenerated.
10001         * gdbarch.h: Regenerated.
10002         * x86-tdep.h: New.
10003         * x86-tdep.c: New.
10004         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10005         (HFILES_NO_SRCDIR): Add x86-tdep.h.
10006         (ALLDEPFILES): Add x86-tdep.c.
10007         * arch-utils.h (default_in_indirect_branch_thunk): New.
10008         * arch-utils.c (default_in_indirect_branch_thunk): New.
10009         * i386-tdep: Include x86-tdep.h.
10010         (i386_in_indirect_branch_thunk): New.
10011         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10012         function.
10013         * amd64-tdep: Include x86-tdep.h.
10014         (amd64_in_indirect_branch_thunk): New.
10015         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10016
10017 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
10018
10019         PR gdb/23053
10020         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10021         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10022         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10023         regression.
10024
10025 2018-04-12  Tom Tromey  <tom@tromey.com>
10026
10027         * rust-lang.c (rust_print_struct_def): Remove univariant code.
10028         (rust_evaluate_subexp): Likewise.
10029
10030 2018-04-12  Pedro Alves  <palves@redhat.com>
10031
10032         * procfs.c (procfs_detach): Make forward declaration's prototype
10033         match definition's protototype.
10034         (proc_get_LDT_entry): Remove stale do_cleanups call.
10035
10036 2018-04-12  Pedro Alves  <palves@redhat.com>
10037
10038         * target.h (target_ops::to_has_exited): Delete.
10039         (target_has_exited): Delete.
10040         * target-delegates.c: Regenerate.
10041
10042 2018-04-11  Pedro Alves  <palves@redhat.com>
10043
10044         * target.c (fileio_fh_t::t): Add comment.
10045         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10046         (target_fileio_close): Handle a NULL target.
10047         (invalidate_fileio_fh): New.
10048         (target_close): Call it.
10049         * remote.c (remote_hostio_send_command): No longer check whether
10050         remote_desc is open.
10051
10052 2018-04-11  Pedro Alves  <palves@redhat.com>
10053
10054         * target.c (fileio_fh_t): Make it a named struct instead of a
10055         typedef.
10056         (fileio_fh_t::is_closed): New method.
10057         (DEF_VEC_O (fileio_fh_t)): Remove.
10058         (fileio_fhandles): Now a std::vector.
10059         (is_closed_fileio_fh): Delete.
10060         (acquire_fileio_fd): Adjust.  Rename parameters.
10061         (release_fileio_fd): Adjust.
10062         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10063         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10064         (target_fileio_close): Adjust.
10065
10066 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
10067
10068         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10069         index.
10070
10071 2018-04-10  Pedro Alves  <palves@redhat.com>
10072
10073         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10074         (scoped_finish_thread_state): New class.
10075         * infcmd.c (run_command_1): Use it instead of finish_thread_state
10076         cleanup.
10077         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10078         (fetch_inferior_event, normal_stop): Likewise.
10079         * thread.c (finish_thread_state_cleanup): Delete.
10080
10081 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10082             Pedro Alves  <palves@redhat.com>
10083
10084         * value.c: Include "selftest.h" and "common/array-view.h".
10085         (struct range) <operator ==>: New.
10086         (test_ranges_contain): New.
10087         (check_ranges_vector): New.
10088         (test_insert_into_bit_range_vector): New.
10089         (_initialize_values): Register selftests.
10090         * common/array-view.h (operator==, operator!=): New.
10091
10092 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10093
10094         * common/gdb_vecs.h (unordered_remove): Add overload that takes
10095         an iterator.
10096         * inline-frame.c: Include <algorithm>.
10097         (struct inline_state): Add constructor.
10098         (inline_state_s): Remove.
10099         (DEF_VEC_O(inline_state_s)): Remove.
10100         (inline_states): Change type to std::vector.
10101         (find_inline_frame_state): Adjust to std::vector.
10102         (allocate_inline_frame_state): Remove.
10103         (clear_inline_frame_state): Adjust to std::vector.
10104         (skip_inline_frames): Adjust to std::vector.
10105
10106 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10107
10108         * tracepoint.h (struct trace_state_variable): Add constructor.
10109         <name>: Change type to std::string.
10110         * tracepoint.c (tsv_s): Remove.
10111         (DEF_VEC_O(tsv_s)): Remove.
10112         (tvariables): Change to std::vector.
10113         (create_trace_state_variable): Adjust to std::vector.
10114         (find_trace_state_variable): Likewise.
10115         (find_trace_state_variable_by_number): Likewise.
10116         (delete_trace_state_variable): Likewise.
10117         (trace_variable_command): Adjust to std::string.
10118         (delete_trace_variable_command): Likewise.
10119         (tvariables_info_1): Adjust to std::vector.
10120         (save_trace_state_variables): Likewise.
10121         (start_tracing): Likewise.
10122         (merge_uploaded_trace_state_variables): Adjust to std::vector
10123         and std::string.
10124         * target.h (struct target_ops)
10125         <to_download_trace_state_variable>: Pass reference to
10126         trace_state_variable.
10127         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10128         * target-delegates.c: Re-generate.
10129         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10130         (mi_tsv_deleted): Likewise.
10131         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10132         * remote.c (remote_download_trace_state_variable): Change
10133         pointer to reference and adjust.
10134         * make-target-delegates (parse_argtypes): Handle references.
10135         (write_function_header): Likewise.
10136         (munge_type): Likewise.
10137
10138 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10139
10140         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10141         string_view-selftests.c.
10142         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10143         testsuite.
10144         * unittests/basic_string_view/cons/char/1.cc: Likewise.
10145         * unittests/basic_string_view/cons/char/2.cc: Likewise.
10146         * unittests/basic_string_view/cons/char/3.cc: Likewise.
10147         * unittests/basic_string_view/element_access/char/1.cc:
10148         Likewise.
10149         * unittests/basic_string_view/element_access/char/empty.cc:
10150         Likewise.
10151         * unittests/basic_string_view/element_access/char/front_back.cc:
10152         Likewise.
10153         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10154         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10155         Likewise.
10156         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10157         Likewise.
10158         * unittests/basic_string_view/modifiers/swap/char/1.cc:
10159         Likewise.
10160         * unittests/basic_string_view/operations/compare/char/1.cc:
10161         Likewise.
10162         * unittests/basic_string_view/operations/compare/char/13650.cc:
10163         Likewise.
10164         * unittests/basic_string_view/operations/copy/char/1.cc:
10165         Likewise.
10166         * unittests/basic_string_view/operations/data/char/1.cc:
10167         Likewise.
10168         * unittests/basic_string_view/operations/find/char/1.cc:
10169         Likewise.
10170         * unittests/basic_string_view/operations/find/char/2.cc:
10171         Likewise.
10172         * unittests/basic_string_view/operations/find/char/3.cc:
10173         Likewise.
10174         * unittests/basic_string_view/operations/find/char/4.cc:
10175         Likewise.
10176         * unittests/basic_string_view/operations/rfind/char/1.cc:
10177         Likewise.
10178         * unittests/basic_string_view/operations/rfind/char/2.cc:
10179         Likewise.
10180         * unittests/basic_string_view/operations/rfind/char/3.cc:
10181         Likewise.
10182         * unittests/basic_string_view/operations/substr/char/1.cc:
10183         Likewise.
10184         * unittests/basic_string_view/operators/char/2.cc: Likewise.
10185         * unittests/string_view-selftests.c: New file.
10186
10187 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10188
10189         * unittests/basic_string_view/capacity/1.cc: New file.
10190         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10191         * unittests/basic_string_view/cons/char/1.cc: New file.
10192         * unittests/basic_string_view/cons/char/2.cc: New file.
10193         * unittests/basic_string_view/cons/char/3.cc: New file.
10194         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10195         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10196         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10197         * unittests/basic_string_view/element_access/char/1.cc: New file.
10198         * unittests/basic_string_view/element_access/char/2.cc: New file.
10199         * unittests/basic_string_view/element_access/char/empty.cc: New file.
10200         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10201         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10202         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10203         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10204         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10205         * unittests/basic_string_view/include.cc: New file.
10206         * unittests/basic_string_view/inserters/char/1.cc: New file.
10207         * unittests/basic_string_view/inserters/char/2.cc: New file.
10208         * unittests/basic_string_view/inserters/char/3.cc: New file.
10209         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10210         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10211         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10212         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10213         * unittests/basic_string_view/literals/types.cc: New file.
10214         * unittests/basic_string_view/literals/values.cc: New file.
10215         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10216         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10217         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10218         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10219         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10220         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10221         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10222         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10223         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10224         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10225         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10226         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10227         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10228         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10229         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10230         * unittests/basic_string_view/operations/data/char/1.cc: New file.
10231         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10232         * unittests/basic_string_view/operations/find/char/1.cc: New file.
10233         * unittests/basic_string_view/operations/find/char/2.cc: New file.
10234         * unittests/basic_string_view/operations/find/char/3.cc: New file.
10235         * unittests/basic_string_view/operations/find/char/4.cc: New file.
10236         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10237         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10238         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10239         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10240         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10241         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10242         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10243         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10244         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10245         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10246         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10247         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10248         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10249         * unittests/basic_string_view/operators/char/2.cc: New file.
10250         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10251         * unittests/basic_string_view/range_access/char/1.cc: New file.
10252         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10253         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10254         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10255         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10256         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10257         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10258         * unittests/basic_string_view/requirements/typedefs.cc: New file.
10259         * unittests/basic_string_view/typedefs.cc: New file.
10260         * unittests/basic_string_view/types/1.cc: New file.
10261
10262 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10263
10264         * common/gdb_string_view.h: Remove libstdc++ implementation
10265         details, adjust to gdb reality.
10266         * common/gdb_string_view.tcc: Likewise.
10267         * cli/cli-script.c (struct string_view): Remove.
10268         (user_args) <m_args>: Change element type to gdb::string_view.
10269         (user_args::insert_args): Adjust.
10270
10271 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10272
10273         * common/gdb_string_view.h: New file.
10274         * common/gdb_string_view.tcc: New file.
10275
10276 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10277
10278         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10279         * configure: Re-generate.
10280
10281 2018-04-09  Pedro Alves  <palves@redhat.com>
10282
10283         * gdbarch.sh: Include "observable.h" instead of "observer.h".
10284         (set_target_gdbarch): Call
10285         gdb::observers::architecture_changed.notify instead of
10286         observer_notify_architecture_changed.
10287
10288 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10289
10290         * tracepoint.c (struct current_traceframe_cleanup): Remove.
10291         (do_restore_current_traceframe_cleanup): Remove.
10292         (restore_current_traceframe_cleanup_dtor): Remove.
10293         (make_cleanup_restore_current_traceframe): Remove.
10294         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10295         New.
10296         * tracepoint.h (struct scoped_restore_current_traceframe): New.
10297         * infrun.c (fetch_inferior_event): Use
10298         scoped_restore_current_traceframe.
10299
10300 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10301
10302         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10303         Remove.
10304         <n_allocated_type_units>: Remove.
10305         <all_type_units>: Change to std::vector.
10306         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10307         to std::vector change.
10308         (dwarf2_per_objfile::get_cutu): Likewise.
10309         (dwarf2_per_objfile::get_tu): Likewise.
10310         (create_signatured_type_table_from_index): Likewise.
10311         (create_signatured_type_table_from_debug_names): Likewise.
10312         (dw2_symtab_iter_next): Likewise.
10313         (dw2_print_stats): Likewise.
10314         (dw2_expand_all_symtabs): Likewise.
10315         (dw2_expand_marked_cus): Likewise.
10316         (dw2_debug_names_iterator::next): Likewise.
10317         (dwarf2_initialize_objfile): Likewise.
10318         (add_signatured_type_cu_to_table): Likewise.
10319         (create_all_type_units): Likewise.
10320         (add_type_unit): Likewise.
10321         (struct tu_abbrev_offset): Add constructor.
10322         (build_type_psymtabs_1): Adjust to std::vector change.
10323         (print_tu_stats): Likewise.
10324         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10325         (write_debug_names): Likewise.
10326
10327 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10328
10329         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10330         Make an std::vector.
10331         <n_comp_units>: Remove.
10332         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10333         to std::vector change.
10334         (dwarf2_per_objfile::get_cutu): Likewise.
10335         (dwarf2_per_objfile::get_cu): Likewise.
10336         (create_cus_from_index): Likewise.
10337         (create_addrmap_from_index): Likewise.
10338         (create_addrmap_from_aranges): Likewise.
10339         (dwarf2_read_index): Likewise.
10340         (dw2_find_last_source_symtab): Likewise.
10341         (dw2_map_symtabs_matching_filename): Likewise.
10342         (dw2_symtab_iter_next): Likewise.
10343         (dw2_print_stats): Likewise.
10344         (dw2_expand_all_symtabs): Likewise.
10345         (dw2_expand_symtabs_with_fullname): Likewise.
10346         (dw2_expand_marked_cus): Likewise.
10347         (dw2_map_symbol_filenames): Likewise.
10348         (create_cus_from_debug_names): Likewise.
10349         (dwarf2_read_debug_names): Likewise.
10350         (dw2_debug_names_iterator::next): Likewise.
10351         (dwarf2_initialize_objfile): Likewise.
10352         (set_partial_user): Likewise.
10353         (dwarf2_build_psymtabs_hard): Likewise.
10354         (read_comp_units_from_section): Remove arguments, adjust to
10355         std::vector change.
10356         (create_all_comp_units): Adjust to std::vector and
10357         read_comp_units_from_section changes.
10358         (dwarf2_find_containing_comp_unit): Adjust to std::vector
10359         change.
10360         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10361         (psyms_seen_size): Likewise.
10362         (write_gdbindex): Likewise.
10363         (write_debug_names): Likewise.
10364
10365 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10366
10367         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10368         with dwarf2_per_objfile.
10369         (create_cus_from_index): Likewise.
10370         (create_signatured_type_table_from_index): Likewise.
10371         (dwarf2_read_index): Likewise.
10372         (dwarf2_initialize_objfile): Likewise.
10373         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
10374         per_cu rather than get_dwarf2_per_objfile.
10375
10376 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10377
10378         * dwarf2read.h (struct signatured_type): Forward declare.
10379         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10380         New methods.
10381         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10382         (dw2_get_cutu): ...this.
10383         (dwarf2_per_objfile::get_cu): Rename from...
10384         (dw2_get_cu): ...this.
10385         (dwarf2_per_objfile::get_tu): New.
10386         (create_addrmap_from_index): Adjust.
10387         (create_addrmap_from_aranges): Adjust.
10388         (dw2_find_last_source_symtab): Adjust.
10389         (dw2_map_symtabs_matching_filename): Adjust.
10390         (dw2_symtab_iter_next): Adjust.
10391         (dw2_print_stats): Adjust.
10392         (dw2_expand_all_symtabs): Adjust.
10393         (dw2_expand_symtabs_with_fullname): Adjust.
10394         (dw2_expand_marked_cus): Adjust.
10395         (dw_expand_symtabs_matching_file_matcher): Adjust.
10396         (dw2_map_symbol_filenames): Adjust.
10397         (dw2_debug_names_iterator::next): Adjust.
10398         (dwarf2_initialize_objfile): Adjust.
10399         (set_partial_user): Adjust.
10400         (dwarf2_build_psymtabs_hard): Adjust.
10401
10402 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10403
10404         * dwarf2read.c (create_signatured_type_table_from_debug_names):
10405         Remove unused variables.
10406         (dw2_map_symtabs_matching_filename): Likewise.
10407         (dwarf2_record_block_ranges): Likewise.
10408         (dwarf2_read_addr_index): Likewise.
10409         (follow_die_offset): Likewise.
10410
10411 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10412
10413         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10414         to symbol_file_add_main.
10415
10416 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10417
10418         PR mi/22299
10419         * mi/mi-console.c (do_fputc_async_safe): New.
10420         (mi_console_file::write_async_safe): New.
10421         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10422         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10423         New.
10424         * ui-file.c (ui_file::putstrn): Adjust call to
10425         fputstrn_unfiltered.
10426         * utils.c (printchar): Replace do_fputs and do_fprintf
10427         parameters by do_fputc.
10428         (fputstr_filtered): Adjust call to printchar.
10429         (fputstr_unfiltered): Likewise.
10430         (fputstrn_filtered): Likewise.
10431         (fputstrn_unfiltered): Add do_fputc parameter, pass to
10432         printchar.
10433         * utils.h (do_fputc_ftype): New typedef.
10434         (fputstrn_unfiltered): Add do_fputc parameter.
10435
10436 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10437
10438         * regformats/i386/i386-avx.dat: Remove.
10439
10440 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10441
10442         PR gdb/22979
10443         * amd64-tdep.c (amd64_none_init_abi): New function.
10444         (amd64_x32_none_init_abi): New function.
10445         (_initialize_amd64_tdep): Register handlers for x86-64 and
10446         x64_32 with GDB_OSABI_NONE.
10447         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10448         GDB_OSABI_NONE osabi.
10449
10450 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10451
10452         PR gdb/22980
10453         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10454         GDB_OSABI_NONE.
10455         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10456         * osabi.c (gdb_osabi_names): Add "unknown" entry.
10457
10458 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10459
10460         * common/byte-vector.h (char_vector): New type.
10461         * target.h (target_read_alloc): Return
10462         gdb::optional<byte_vector>.
10463         (target_read_stralloc): Return gdb::optional<char_vector>.
10464         (target_get_osdata): Return gdb::optional<char_vector>.
10465         * target.c (target_read_alloc_1): Templatize.  Replacement
10466         manual memory management with vector.
10467         (target_read_alloc): Change return type, adjust.
10468         (target_read_stralloc): Change return type, adjust.
10469         (target_get_osdata): Change return type, adjust.
10470         * auxv.c (struct auxv_info) <length>: Remove.
10471         <data>: Change type to gdb::optional<byte_vector>.
10472         (auxv_inferior_data_cleanup): Free auxv_info with delete.
10473         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10474         (target_auxv_search): Adjust.
10475         (fprint_target_auxv): Adjust.
10476         * avr-tdep.c (avr_io_reg_read_command): Adjust.
10477         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10478         (linux_make_corefile_notes): Adjust.
10479         * osdata.c (get_osdata): Adjust.
10480         * remote.c (remote_get_threads_with_qxfer): Adjust.
10481         (remote_memory_map): Adjust.
10482         (remote_traceframe_info): Adjust.
10483         (btrace_read_config): Adjust.
10484         (remote_read_btrace): Adjust.
10485         (remote_pid_to_exec_file): Adjust.
10486         * solib-aix.c (solib_aix_get_library_list): Adjust.
10487         * solib-dsbt.c (decode_loadmap): Don't free buf.
10488         (dsbt_get_initial_loadmaps): Adjust.
10489         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10490         * solib-target.c (solib_target_current_sos): Adjust.
10491         * tracepoint.c (sdata_make_value): Adjust.
10492         * xml-support.c (xinclude_start_include): Adjust.
10493         (xml_fetch_content_from_file): Adjust.
10494         * xml-support.h (xml_fetch_another): Change return type.
10495         (xml_fetch_content_from_file): Change return type.
10496         * xml-syscall.c (xml_init_syscalls_info): Adjust.
10497         * xml-tdesc.c (file_read_description_xml): Adjust.
10498         (fetch_available_features_from_target): Change return type.
10499         (target_fetch_description_xml): Adjust.
10500         (target_read_description_xml): Adjust.
10501
10502 2018-04-06  Tom Tromey  <tom@tromey.com>
10503
10504         * value.c (~value): Update.
10505         (struct value) <contents>: Now unique_xmalloc_ptr.
10506         (value_contents_bits_eq, allocate_value_contents)
10507         (value_contents_raw, value_contents_all_raw)
10508         (value_contents_for_printing, value_contents_for_printing_const)
10509         (set_value_enclosing_type): Update.
10510
10511 2018-04-06  Tom Tromey  <tom@tromey.com>
10512
10513         * value.c (range_s): Remove typedef, VEC.
10514         (struct range): Add operator<.
10515         (range_lessthan): Remove.
10516         (ranges_contain): Change type.
10517         (~value): Update.
10518         (struct value) <unavailable, optimized_out>: Now std::vector.
10519         (value_entirely_available)
10520         (value_entirely_covered_by_range_vector)
10521         (value_entirely_unavailable, value_entirely_optimized_out):
10522         Update.
10523         (insert_into_bit_range_vector): Change argument type.
10524         (find_first_range_overlap): Likewise.
10525         (struct ranges_and_idx, value_contents_bits_eq)
10526         (require_not_optimized_out, require_available): Update.
10527         (ranges_copy_adjusted): Change argument types.
10528         (value_optimized_out, value_copy, value_fetch_lazy): Update.
10529
10530 2018-04-06  Tom Tromey  <tom@tromey.com>
10531
10532         * value.c (~value): Update.
10533         (struct value) <parent>: Now a value_ref_ptr.
10534         (value_parent, set_value_parent, value_address, value_copy):
10535         Update.
10536
10537 2018-04-06  Tom Tromey  <tom@tromey.com>
10538
10539         * value.c (struct value): Add constructor, destructor, and member
10540         initializers.
10541         (allocate_value_lazy, value_decref): Update.
10542
10543 2018-04-06  Tom Tromey  <tom@tromey.com>
10544
10545         * value.c (struct value) <released, next>: Remove.
10546         (all_values): Now a std::vector.
10547         (allocate_value_lazy): Update.
10548         (value_next): Remove.
10549         (value_mark, value_free_to_mark, release_value)
10550         (value_release_to_mark): Update.
10551
10552 2018-04-06  Tom Tromey  <tom@tromey.com>
10553
10554         * value.h (fetch_subexp_value, value_release_to_mark): Update.
10555         (free_value_chain): Remove.
10556         * value.c (free_value_chain): Remove.
10557         (value_release_to_mark): Return a std::vector.
10558         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10559         std::vector.
10560         (check_condition): Update.
10561         * eval.c (fetch_subexp_value): Change "val_chain" to a
10562         std::vector.
10563         * breakpoint.c (update_watchpoint): Update.
10564         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10565
10566 2018-04-06  Tom Tromey  <tom@tromey.com>
10567
10568         * value.h (free_all_values): Remove.
10569         * value.c (free_all_values): Remove.
10570
10571 2018-04-06  Tom Tromey  <tom@tromey.com>
10572
10573         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10574         (value_history_chain, value_history_count): Remove.
10575         (value_history): New global.
10576         (record_latest_value, access_value_history, show_values)
10577         (preserve_values): Update.
10578
10579 2018-04-06  Tom Tromey  <tom@tromey.com>
10580
10581         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10582         * varobj.c (varobj_set_display_format, varobj_set_value)
10583         (install_default_visualizer, construct_visualizer)
10584         (install_new_value, ~varobj, varobj_get_value_type)
10585         (my_value_of_variable, varobj_editable_p): Update.
10586         * c-varobj.c (c_describe_child, c_value_of_variable)
10587         (cplus_number_of_children, cplus_describe_child): Update.
10588         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10589         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10590         (ada_value_of_variable, ada_value_is_changeable_p): Update.
10591
10592 2018-04-06  Tom Tromey  <tom@tromey.com>
10593
10594         * printcmd.c (last_examine_address): Change type to
10595         value_ref_ptr.
10596         (do_examine, x_command): Update.
10597
10598 2018-04-06  Tom Tromey  <tom@tromey.com>
10599
10600         * value.c (release_value): Update.
10601         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10602         (struct bpstats) <val>: Now a value_ref_ptr.
10603         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10604         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10605         (~watchpoint, print_it_watchpoint, watch_command_1)
10606         (invalidate_bp_value_on_memory_change): Update.
10607
10608 2018-04-06  Tom Tromey  <tom@tromey.com>
10609
10610         * varobj.c (varobj_clear_saved_item)
10611         (update_dynamic_varobj_children, install_new_value, ~varobj):
10612         Update.
10613         * value.h (value_incref): Move declaration earlier.
10614         (value_decref): Rename from value_free.
10615         (struct value_ref_policy): New.
10616         (value_ref_ptr): New typedef.
10617         (struct value_deleter): Remove.
10618         (gdb_value_up): Remove typedef.
10619         (release_value): Change return type.
10620         (release_value_or_incref): Remove.
10621         * value.c (set_value_parent): Update.
10622         (value_incref): Change return type.
10623         (value_decref): Rename from value_free.
10624         (value_free_to_mark, free_all_values, free_value_chain): Update.
10625         (release_value): Return value_ref_ptr.
10626         (release_value_or_incref): Remove.
10627         (record_latest_value, set_internalvar, clear_internalvar):
10628         Update.
10629         * stack.c (info_frame_command): Don't call value_free.
10630         * python/py-value.c (valpy_dealloc, valpy_new)
10631         (value_to_value_object): Update.
10632         * printcmd.c (do_examine): Update.
10633         * opencl-lang.c (lval_func_free_closure): Update.
10634         * mi/mi-main.c (register_changed_p): Don't call value_free.
10635         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10636         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10637         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10638         value_free.
10639         * guile/scm-value.c (vlscm_free_value_smob)
10640         (vlscm_scm_from_value): Update.
10641         * frame.c (frame_register_unwind, frame_unwind_register_signed)
10642         (frame_unwind_register_unsigned, get_frame_register_bytes)
10643         (put_frame_register_bytes): Don't call value_free.
10644         * findvar.c (address_from_register): Don't call value_free.
10645         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10646         * dwarf2loc.c (entry_data_value_free_closure)
10647         (value_of_dwarf_reg_entry, free_pieced_value_closure)
10648         (dwarf2_evaluate_loc_desc_full): Update.
10649         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10650         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10651         (~watchpoint, watch_command_1)
10652         (invalidate_bp_value_on_memory_change): Update.
10653         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10654
10655 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
10656
10657         PR gdb/23022
10658         * warning.m4: Add -Wno-error=deprecated-register.
10659         * configure: Re-generate.
10660
10661 2018-04-05  Tom Tromey  <tom@tromey.com>
10662
10663         * linespec.h: Remove include of "vec.h".
10664
10665 2018-04-05  Tom Tromey  <tom@tromey.com>
10666
10667         * linespec.c (typep): Remove typedef.
10668         (find_methods, find_superclass_methods): Take a std::vector.
10669         (find_method): Use std::vector.
10670
10671 2018-04-05  Tom Tromey  <tom@tromey.com>
10672
10673         * utils.c (compare_strings): Remove.
10674         * utils.h (compare_strings): Remove.
10675         * objc-lang.h (find_imps): Update.
10676         * objc-lang.c (find_methods): Take a std::vector.
10677         (uniquify_strings, find_imps): Likewise.
10678         * linespec.c (find_methods): Take a std::vector.
10679         (decode_objc): Use std::vector.
10680         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10681         a std::vector.
10682         (find_method, find_function_symbols): Use std::vector.
10683
10684 2018-04-05  Tom Tromey  <tom@tromey.com>
10685
10686         * completer.c (completion_tracker::completion_tracker): Remove
10687         cast.
10688         (completion_tracker::discard_completions): Likewise.
10689         * breakpoint.c (ambiguous_names_p): Remove cast.
10690         * ada-lang.c (_initialize_ada_language): Remove cast.
10691         * utils.h (streq): Update.
10692         (streq_hash): Add new declaration.
10693         * utils.c (streq): Return bool.
10694         (streq_hash): New function.
10695
10696 2018-04-05  Tom Tromey  <tom@tromey.com>
10697
10698         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10699         Remove a string copy.
10700
10701 2018-04-05  Tom Tromey  <tom@tromey.com>
10702
10703         * linespec.c (filter_results): Use std::vector.
10704         (decode_line_2, decode_line_full): Update.
10705
10706 2018-04-05  Tom Tromey  <tom@tromey.com>
10707
10708         * linespec.c (canonical_to_fullform): Return std::string.
10709         (filter_results): Update.
10710         (struct decode_line_2_item): Add constructor.
10711         <fullform, displayform>: Now std::string.
10712         (decode_line_2_compare_items): Now a std::sort comparator.
10713         (decode_line_2): Update.
10714
10715 2018-04-05  Tom Tromey  <tom@tromey.com>
10716
10717         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10718         (unexpected_linespec_error): Update.
10719         (linespec_parse_basic, parse_linespec): Update.
10720
10721 2018-04-05  Tom Tromey  <tom@tromey.com>
10722
10723         * linespec.c (linespec_parse_basic): Reindent.
10724
10725 2018-04-05  Tom Tromey  <tom@tromey.com>
10726
10727         * minsyms.h (iterate_over_minimal_symbols): Update.
10728         * minsyms.c (iterate_over_minimal_symbols): Take a
10729         gdb::function_view.
10730         * linespec.c (struct collect_minsyms): Remove.
10731         (compare_msyms): Now a std::sort comparator.
10732         (add_minsym): Add parameters.
10733         (search_minsyms_for_name): Update.  Use std::vector.
10734
10735 2018-04-03  Tom Tromey  <tom@tromey.com>
10736
10737         * mipsread.c (read_alphacoff_dynamic_symtab): Use
10738         gdb::byte_vector.
10739
10740 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10741
10742         * MAINTAINERS (Write After Approval): Add Weimin Pan.
10743
10744 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10745
10746         PR gdb/16959
10747         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
10748         printing static type.
10749
10750 2018-04-01  Tom Tromey  <tom@tromey.com>
10751
10752         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10753         (rs6000_xfer_shared_libraries): Update.
10754
10755 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
10756
10757         * common/gdb_vecs.h (char_ptr): Remove.
10758         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10759
10760 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10761
10762         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10763         with std::vector.
10764         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10765
10766 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10767
10768         * tracepoint.h (struct uploaded_tp): Initialize fields.
10769         <actions, step_actions, cmd_strings>: Change type to
10770         std::vector<char *>.
10771         * tracepoint.c (get_uploaded_tp): Allocate with new.
10772         (free_uploaded_tps): Free with delete.
10773         (parse_tracepoint_definition): Adjust to std::vector change.
10774         * breakpoint.c (read_uploaded_action): Likewise.
10775         (create_tracepoint_from_upload): Likewise.
10776         * ctf.c (ctf_write_uploaded_tp): Likewise.
10777         (SET_ARRAY_FIELD): Likewise.
10778         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10779
10780 2018-03-30  Tom Tromey  <tom@tromey.com>
10781
10782         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
10783         std::unique_ptr.
10784         (svr4_keep_data_in_core): Update.
10785         (svr4_read_so_list): Update.
10786
10787 2018-03-30  Tom Tromey  <tom@tromey.com>
10788
10789         * windows-nat.c (handle_output_debug_string, handle_exception):
10790         Update.
10791         * target.h (target_read_string): Update.
10792         * target.c (target_read_string): Change "string" to
10793         unique_xmalloc_ptr.
10794         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10795         Update.
10796         * solib-frv.c (frv_current_sos): Update.
10797         * solib-dsbt.c (dsbt_current_sos): Update.
10798         * solib-darwin.c (darwin_current_sos): Update.
10799         * linux-thread-db.c (inferior_has_bug): Update.
10800         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10801         Update.  Remove alloca.
10802         * ada-lang.c (ada_main_name): Update.
10803
10804 2018-03-30  Tom Tromey  <tom@tromey.com>
10805
10806         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10807         (struct dwo_file_deleter): New.
10808         (dwo_file_up): New typedef.
10809         (open_and_init_dwo_file): Use dwo_file_up.
10810         (free_dwo_file_cleanup): Remove.
10811
10812 2018-03-30  Tom Tromey  <tom@tromey.com>
10813
10814         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10815         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10816
10817 2018-03-30  Tom Tromey  <tom@tromey.com>
10818
10819         * dwarf2read.c (class free_cached_comp_units): New class.
10820         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10821         (free_cached_comp_units): Remove function.
10822
10823 2018-03-30  Tom Tromey  <tom@tromey.com>
10824
10825         * utils.h (make_cleanup_unpush_target): Remove.
10826         * inf-ptrace.c (struct target_unpusher): New.
10827         (target_unpush_up) New typedef.
10828         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10829         target_unpush_up.
10830         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10831
10832 2018-03-27  Tom Tromey  <tom@tromey.com>
10833
10834         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10835
10836 2018-03-27  Pedro Alves  <palves@redhat.com>
10837             Tom Tromey  <tom@tromey.com>
10838
10839         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10840         destructor.  Now a class.
10841         (gdb_readline_wrapper_cleanup): Remove function.
10842         (gdb_readline_wrapper): Remove cleanups.
10843
10844 2018-03-27  Tom Tromey  <tom@tromey.com>
10845
10846         * typeprint.h (struct type_print_options) <local_typedefs,
10847         global_typedefs>: Remove "struct" keyword.
10848         (class typedef_hash_table): New class.
10849         (recursively_update_typedef_hash, add_template_parameters)
10850         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10851         (find_typedef_in_hash): Don't declare.
10852         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10853         (typedef_hash_table::recursively_update): Rename from
10854         recursively_update_typedef_hash.  Now a member.
10855         (typedef_hash_table::add_template_parameters): Rename from
10856         add_template_parameters.  Now a member.
10857         (typedef_hash_table::typedef_hash_table): Now a constructor;
10858         rename from create_typedef_hash.
10859         (typedef_hash_table::~typedef_hash_table): Now a destructor;
10860         rename from free_typedef_hash.
10861         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10862         (do_free_global_table): Remove.
10863         (typedef_hash_table::typedef_hash_table): New constructor; renamed
10864         from copy_type_recursive.
10865         (create_global_typedef_table): Remove.
10866         (typedef_hash_table::find_global_typedef): Now a member of
10867         typedef_hash_table.
10868         (typedef_hash_table::find_typedef): Rename from
10869         find_typedef_in_hash; now a member.
10870         (whatis_exp): Update.
10871         * extension.h (struct ext_lang_type_printers): Add constructor and
10872         destructor.
10873         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10874         declare.
10875         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10876         Now a constructor; rename from start_ext_lang_type_printers.
10877         (ext_lang_type_printers): Now a destructor; rename from
10878         free_ext_lang_type_printers.
10879         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10880         Update.
10881         (c_type_print_base_struct_union): Update.  Remove cleanups.
10882
10883 2018-03-27  Tom Tromey  <tom@tromey.com>
10884
10885         * dwarf-index-write.c: Include <cmath>.
10886
10887 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10888
10889         * NEWS: Add entry describing new "set|show varsize-limit" command.
10890         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10891         command.
10892         * printcmd.c (_initialize_printcmd): Add "set var" alias of
10893         "set variable".
10894
10895 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
10896
10897         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10898         dwarf-index-write.c
10899         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10900         * dwarf-index-common.c: New file.
10901         * dwarf-index-common.h: New file.
10902         * dwarf-index-write.c: New file.
10903         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10904         (struct dwarf2_section_info): Move from here.
10905         (dwarf2_section_info_def): Likewise.
10906         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10907         (offset_type): Likewise.
10908         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10909         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10910         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10911         (byte_swap): Likewise.
10912         (MAYBE_SWAP): Likewise.
10913         (dwarf2_per_cu_ptr): Likewise.
10914         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10915         (struct tu_stats): Likewise.
10916         (struct dwarf2_per_objfile): Likewise.
10917         (struct dwarf2_per_cu_data): Likewise.
10918         (struct signatured_type): Likewise.
10919         (sig_type_ptr): Likewise.
10920         (DEF_VEC_P (sig_type_ptr)): Likewise.
10921         (INDEX4_SUFFIX): Likewise.
10922         (INDEX5_SUFFIX): Likewise.
10923         (DEBUG_STR_SUFFIX): Likewise.
10924         (dwarf2_read_section): Make non-static.
10925         (mapped_index_string_hash): Move from here.
10926         (dwarf5_djb_hash): Likewise.
10927         (file_write): Likewise.
10928         (class data_buf): Likewise.
10929         (struct symtab_index_entry): Likewise.
10930         (struct mapped_symtab): Likewise.
10931         (find_slot): Likewise.
10932         (hash_expand): Likewise.
10933         (add_index_entry): Likewise.
10934         (uniquify_cu_indices): Likewise.
10935         (class c_str_view): Likewise.
10936         (class c_str_view_hasher): Likewise.
10937         (class vector_hasher): Likewise.
10938         (write_hash_table): Likewise.
10939         (psym_index_map): Likewise.
10940         (struct addrmap_index_data): Likewise.
10941         (add_address_entry): Likewise.
10942         (add_address_entry_worker): Likewise.
10943         (write_address_map): Likewise.
10944         (symbol_kind): Likewise.
10945         (write_psymbols): Likewise.
10946         (struct signatured_type_index_data): Likewise.
10947         (write_one_signatured_type): Likewise.
10948         (recursively_count_psymbols): Likewise.
10949         (recursively_write_psymbols): Likewise.
10950         (class debug_names): Likewise.
10951         (check_dwarf64_offsets): Likewise.
10952         (psyms_seen_size): Likewise.
10953         (write_gdbindex): Likewise.
10954         (write_debug_names): Likewise.
10955         (assert_file_size): Likewise.
10956         (write_psymtabs_to_index): Likewise.
10957         (save_gdb_index_command): Likewise.
10958         (_initialize_dwarf2_read): Don't register the "save gdb-index"
10959         command.
10960         * dwarf2read.h: New file.
10961
10962 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10963
10964         PR gdb/22670
10965         * dwarf2read.c (dwarf2_physname): Do not return the demangled
10966         symbol name if the CU's language stores symbol names in linkage
10967         format.
10968         * language.h (struct language_defn)
10969         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
10970         all instances of this struct.
10971
10972 2018-03-26  Tom Tromey  <tom@tromey.com>
10973
10974         * stack.c (backtrace_command_1): Remove verbose code.
10975
10976 2018-03-26  Tom Tromey  <tom@tromey.com>
10977
10978         * python/py-framefilter.c (py_print_type): Don't catch
10979         exceptions.  Return void.
10980         (py_print_value): Likewise.
10981         (py_print_single_arg): Likewise.
10982         (enumerate_args): Don't catch exceptions.
10983         (py_print_args): Likewise.
10984         (py_print_frame): Likewise.
10985         (gdbpy_apply_frame_filter): Catch exceptions here.
10986
10987 2018-03-26  Tom Tromey  <tom@tromey.com>
10988
10989         * stack.c (_initialize_stack): Remove trailing newlines from help
10990         text.  Add "Usage" line to "backtrace" help.
10991
10992 2018-03-26  Tom Tromey  <tom@tromey.com>
10993
10994         PR python/16486:
10995         * python/py-framefilter.c (py_print_args): Call wrap_hint.
10996
10997 2018-03-26  Tom Tromey  <tom@tromey.com>
10998
10999         * python/py-framefilter.c (py_print_single_arg): Return
11000         EXT_LANG_BT_ERROR from catch.
11001
11002 2018-03-26  Tom Tromey  <tom@tromey.com>
11003
11004         PR backtrace/15584:
11005         * stack.c (backtrace_command_1): Move some code into no-filters
11006         "if".
11007
11008 2018-03-26  Tom Tromey  <tom@tromey.com>
11009
11010         * python/py-framefilter.c (throw_quit_or_print_exception): New
11011         function.
11012         (gdbpy_apply_frame_filter): Use it.
11013
11014 2018-03-26  Tom Tromey  <tom@tromey.com>
11015
11016         PR cli/17716:
11017         * python/py-framefilter.c (py_print_type, py_print_value)
11018         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11019         RETURN_MASK_ERROR.
11020
11021 2018-03-26  Tom Tromey  <tom@tromey.com>
11022
11023         * python/py-framefilter.c (enumerate_args): Use
11024         gdb::unique_xmalloc_ptr.
11025
11026 2018-03-26  Tom Tromey  <tom@tromey.com>
11027
11028         * python/py-framefilter.c (py_print_frame): Return
11029         EXT_LANG_BT_OK.
11030         (gdbpy_apply_frame_filter): Update comment.
11031         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11032         Remove.
11033         <EXT_LANG_BT_NO_FILTERS>: Change value.
11034
11035 2018-03-26  Tom Tromey  <tom@tromey.com>
11036
11037         PR backtrace/15582:
11038         * stack.c (backtrace_command): Parse "hide" argument.
11039         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11040         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11041         constant.
11042
11043 2018-03-26  Tom Tromey  <tom@tromey.com>
11044
11045         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11046         add "flags".
11047         (backtrace_command): Remove "fulltrace", add "flags".
11048
11049 2018-03-26  Tom Tromey  <tom@tromey.com>
11050
11051         * stack.c (backtrace_command): Rewrite command line parsing.
11052
11053 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11054
11055         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11056
11057 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11058
11059         * filename-seen-cache.h: Add include guard.
11060
11061 2018-03-26  Keith Seitz  <keiths@redhat.com>
11062
11063         * symfile.c (place_section): Remove "struct" from section_addr_info
11064         in comment.
11065         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11066         "struct" keyword from section_addr_info.
11067
11068 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
11069
11070         * regformats/regdef.h (reg): Add constructors.
11071
11072 2018-03-25  Pedro Alves  <palves@redhat.com>
11073
11074         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11075         if then/else bodies in var_func_name extraction.
11076
11077 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
11078
11079         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11080         lookup_minimal_symbol() to find symbol entry.
11081         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11082
11083 2018-03-23  Keith Seitz  <keiths@redhat.com>
11084
11085         PR c++/22968
11086         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11087         nested type definitions for C++, too.
11088
11089 2018-03-23  Tom Tromey  <tom@tromey.com>
11090
11091         * machoread.c (struct oso_el): Add a constructor.  Don't define as
11092         a typedef.
11093         (macho_register_oso): Remove.
11094         (macho_symtab_read): Take a std::vector.
11095         (oso_el_compare_name): Now a std::sort comparator.
11096         (macho_symfile_read_all_oso): Take a std::vector.
11097         (macho_symfile_read): Use std::vector.  Remove cleanups.
11098
11099 2018-03-22  Tom Tromey  <tom@tromey.com>
11100
11101         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11102         (record_full_goto_bookmark): Use std::string.
11103
11104 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11105
11106         PR tdep/18295
11107         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11108         a single mask.
11109
11110 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11111
11112         * rs6000-tdep.c (store_insn_p): New function.
11113         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11114         and cr_reg to their unshifted values. Use store_insn_p to
11115         match LR saves using either R1 or fdata->alloca_reg. Use
11116         store_insn_p to match CR saves. Set alloca_reg_offset
11117         when alloca_reg and framep are set. Remove lr_reg shift
11118         when assigning to fdata->lr_register.
11119
11120 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11121
11122         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11123         command line args instead of emitting a warning.
11124
11125 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11126
11127         * tracepoint.h (struct static_tracepoint_marker): Initialize
11128         fields, define default constructor, move constructor and move
11129         assignment, disable the rest.
11130         <str_id, extra>: Make std::string.
11131         (release_static_tracepoint_marker): Remove.
11132         (free_current_marker): Remove.
11133         * tracepoint.c (free_current_marker): Remove.
11134         (parse_static_tracepoint_marker_definition): Adjust to
11135         std::string, use new hex2str overload.
11136         (release_static_tracepoint_marker): Remove.
11137         (print_one_static_tracepoint_marker): Get marker by reference
11138         and adjust to std::string.
11139         (info_static_tracepoint_markers_command): Adjust to std::vector
11140         changes
11141         * target.h (static_tracepoint_marker_p): Remove typedef.
11142         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11143         (struct target_ops) <to_static_tracepoint_marker_at>: Return
11144         bool.
11145         <to_static_tracepoint_markers_by_strid>: Return std::vector.
11146         * target-debug.h
11147         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11148         (target_debug_print_std_vector_static_tracepoint_marker): New.
11149         (target_debug_print_struct_static_tracepoint_marker_p): Rename
11150         to...
11151         (target_debug_print_static_tracepoint_marker_p): ... this.
11152         * target-delegates.c: Re-generate.
11153         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11154         Make std::string.
11155         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11156         (decode_static_tracepoint_spec): Adjust to std::vector.
11157         (tracepoint_print_one_detail): Adjust to std::string.
11158         (strace_marker_decode_location): Adjust to std::string.
11159         (update_static_tracepoint): Adjust to std::string, remove call
11160         to release_static_tracepoint_marker.
11161         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11162         Adjust to std::vector.
11163         * remote.c (remote_static_tracepoint_marker_at): Return bool.
11164         (remote_static_tracepoint_markers_by_strid): Adjust to
11165         std::vector.
11166         * common/rsp-low.h (hex2str): New overload with explicit count
11167         of bytes.
11168         * common/rsp-low.c (hex2str): New overload with explicit count
11169         of bytes.
11170         * unittests/rsp-low-selftests.c (test_hex2str): New function.
11171         (_initialize_rsp_low_selftests): Add test_hex2str test.
11172         * unittests/tracepoint-selftests.c
11173         (test_parse_static_tracepoint_marker_definition): Adjust to
11174         std::string.
11175
11176 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11177
11178         * tracepoint.c (parse_static_tracepoint_marker_definition):
11179         Consider case where the definition is followed by more
11180         definitions.
11181         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11182         tracepoint-selftests.c.
11183         * unittests/tracepoint-selftests.c: New.
11184
11185 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11186
11187         * MAINTAINERS (Write After Approval): Add Pedro Franco de
11188         Carvalho.
11189
11190 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11191
11192         * symtab.c (find_pc_sect_line): fixed indentation.
11193
11194 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11195
11196         * symtab.c (find_pc_sect_line): now uses binary search.
11197
11198 2018-03-19  Tom Tromey  <tom@tromey.com>
11199
11200         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11201         "IDENT" production.
11202
11203 2018-03-19  Pedro Alves  <palves@redhat.com>
11204             Tom Tromey  <tom@tromey.com>
11205
11206         * unittests/observable-selftests.c: New file.
11207         * common/observable.h: New file.
11208         * observable.h: New file.
11209         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11210         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11211         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11212         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11213         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11214         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11215         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11216         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11217         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11218         python/py-breakpoint.c, python/py-finishbreakpoint.c,
11219         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11220         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11221         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11222         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11223         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11224         tui/tui-interp.c, valops.c: Update all users.
11225         * tui/tui-hooks.c (tui_bp_created_observer)
11226         (tui_bp_deleted_observer, tui_bp_modified_observer)
11227         (tui_inferior_exit_observer, tui_before_prompt_observer)
11228         (tui_normal_stop_observer, tui_register_changed_observer):
11229         Remove.
11230         (tui_observers_token): New global.
11231         (attach_or_detach, tui_attach_detach_observers): New functions.
11232         (tui_install_hooks, tui_remove_hooks): Use
11233         tui_attach_detach_observers.
11234         * record-btrace.c (record_btrace_thread_observer): Remove.
11235         (record_btrace_thread_observer_token): New global.
11236         * observer.sh: Remove.
11237         * observer.c: Rename to observable.c.
11238         * observable.c (namespace gdb_observers): Define new objects.
11239         (observer_debug): Move into gdb_observers namespace.
11240         (struct observer, struct observer_list, xalloc_observer_list_node)
11241         (xfree_observer_list_node, generic_observer_attach)
11242         (generic_observer_detach, generic_observer_notify): Remove.
11243         (_initialize_observer): Update.
11244         Don't include observer.inc.
11245         * Makefile.in (generated_files): Remove observer.h, observer.inc.
11246         (clean mostlyclean): Likewise.
11247         (observer.h, observer.inc): Remove targets.
11248         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11249         (COMMON_SFILES): Use observable.c, not observer.c.
11250         * .gitignore: Remove observer.h.
11251
11252 2018-03-18  Tom Tromey  <tom@tromey.com>
11253
11254         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11255         gdb::def_vector.
11256         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11257
11258 2018-03-17  Tom Tromey  <tom@tromey.com>
11259
11260         * auto-load.c (auto_load_objfile_script_1): Use std::string.
11261
11262 2018-03-17  Tom Tromey  <tom@tromey.com>
11263
11264         * target.c (class scoped_target_fd): New.
11265         (target_fileio_close_cleanup): Remove.
11266         (target_fileio_read_alloc_1): Use scoped_target_fd.
11267
11268 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
11269
11270         * silent-rules.mk: New.
11271         * Makefile.in: Include silent-rules.mk
11272         (srcdir, VPATH, top_srcdir): Move up.
11273         (COMPILE): Add ECHO_CXX.
11274         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11275         (init.c): Add ECHO_INIT_C.
11276         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11277         (version.c): Add ECHO_GEN.
11278         (printcmd.o): Add ECHO_CXX.
11279         (target-float.o): Add ECHO_CXX.
11280         (ada-exp.o): Add ECHO_CXX.
11281         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11282         (insight$(EXEEXT)): Add ECHO_CXXLD.
11283         * gnulib/configure.ac: Add AM_SILENT_RULES.
11284         * gnulib/aclocal.m4: Re-generate.
11285         * gnulib/configure: Re-generate.
11286         * gnulib/import/Makefile.in: Re-generate.
11287
11288 2018-03-16  Tom Tromey  <tom@tromey.com>
11289
11290         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11291         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11292         * utils.c (do_free_section_addr_info)
11293         (make_cleanup_free_section_addr_info): Remove.
11294         * symfile.h (struct other_sections): Add constructor.
11295         (struct section_addr_info): Remove.
11296         (section_addr_info): New typedef.
11297         (struct sym_fns) <sym_offsets>: Change type of parameter.
11298         (build_section_addr_info_from_objfile)
11299         (relative_addr_info_to_section_offsets, addr_info_make_relative)
11300         (default_symfile_offsets, symbol_file_add)
11301         (symbol_file_add_from_bfd)
11302         (build_section_addr_info_from_section_table): Update.
11303         (alloc_section_addr_info, free_section_addr_info): Don't declare.
11304         * symfile.c (alloc_section_addr_info): Remove.
11305         (build_section_addr_info_from_section_table): Change return type.
11306         Update.
11307         (build_section_addr_info_from_bfd)
11308         (build_section_addr_info_from_objfile): Likewise.
11309         (free_section_addr_info): Remove.
11310         (relative_addr_info_to_section_offsets): Change type of "addrs".
11311         (addrs_section_compar): Now a std::sort comparator.
11312         (addrs_section_sort): Change return type.
11313         (addr_info_make_relative): Change type of "addrs".  Update.
11314         (default_symfile_offsets, syms_from_objfile_1)
11315         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11316         (symbol_file_add_separate): Update.
11317         (symbol_file_add): Change type of "addrs".  Update.
11318         (add_symbol_file_command): Update.  Remove cleanups.
11319         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
11320         cleanups.
11321         * symfile-debug.c (debug_sym_offsets): Change type of "info".
11322         * solib.c (solib_read_symbols): Update.
11323         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
11324         * machoread.c (macho_symfile_offsets): Update.
11325         * jit.c (jit_bfd_try_read_symtab): Update.
11326
11327 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
11328
11329         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11330         unittests/utils-selftests.c.
11331         * unittests/utils-selftests.c: New file.
11332
11333 2018-03-14  Tom Tromey  <tom@tromey.com>
11334
11335         PR cli/14977:
11336         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11337         for NULL.
11338
11339 2018-03-14  Tom Tromey  <tom@tromey.com>
11340
11341         PR cli/19918:
11342         * printcmd.c (printf_pointer): Allow "-" in format.
11343
11344 2018-03-14  Tom Tromey  <tom@tromey.com>
11345
11346         * printcmd.c (_initialize_printcmd): Add usage to printf.
11347
11348 2018-03-14  Yao Qi  <qiyao@sourceware.org>
11349
11350         * MAINTAINERS: Update my email address.
11351
11352 2018-03-13  Tom Tromey  <tom@tromey.com>
11353
11354         * machoread.c (macho_check_dsym): Change filenamep to a
11355         std::string*.
11356         (macho_symfile_read): Update.
11357         * symfile.c (load_command): Use std::string.
11358
11359 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11360
11361         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11362         to error message string.
11363         (riscv_register_name): Use xsnprintf instead of sprintf.
11364         (riscv_insn::fetch_instruction): Use gdb_assert instead of
11365         internal_error.
11366         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11367         error.
11368         (riscv_push_dummy_call): Likewise.
11369
11370 2018-03-12  Tom Tromey  <tom@tromey.com>
11371
11372         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11373         Use gdb::byte_vector.
11374         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11375
11376 2018-03-12  Yao Qi  <yao.qi@linaro.org>
11377
11378         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11379         parameter type to readable_regcache.
11380         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11381         the declaration.
11382
11383 2018-03-11  Tom Tromey  <tom@tromey.com>
11384
11385         * dwarf2read.c (struct nextfield): Add initializers.
11386         (struct nextfnfield): Remove.
11387         (struct fnfieldlist): Add initializers.  Remove "length" and
11388         "head", use std::vector.
11389         (struct decl_field_list): Remove.
11390         (struct field_info): Add initializers.
11391         <fields, baseclasses>: Now std::vector.
11392         <nbaseclasses, nfnfields, typedef_field_list_count,
11393         nested_types_list_count>: Remove.
11394         (dwarf2_add_field, dwarf2_add_type_defn)
11395         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11396         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11397         (process_structure_scope): Update.
11398
11399 2018-03-11  Tom Tromey  <tom@tromey.com>
11400
11401         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11402         for use by std::sort.
11403         (build_type_psymtabs_1): Use std::vector.
11404
11405 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
11406
11407         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11408         and LIBMPFR in the printed configuration.
11409
11410 2018-03-08  Tom Tromey  <tom@tromey.com>
11411
11412         * source.c (get_filename_and_charpos): Use scoped_fd.
11413         * nto-procfs.c (procfs_open_1): Use scoped_fd.
11414         (procfs_pidlist): Likewise.
11415         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11416         (iterate_over_mappings): Likewise.
11417
11418 2018-03-08  Tom Tromey  <tom@tromey.com>
11419
11420         * infcall.c (struct call_return_meta_info)
11421         <stack_temporaries_enabled>: Remove.
11422         (get_call_return_value, call_function_by_hand_dummy): Update.
11423         * thread.c (disable_thread_stack_temporaries): Remove.
11424         (enable_thread_stack_temporaries): Remove.
11425         (thread_stack_temporaries_enabled_p): Return bool.
11426         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11427         (get_last_thread_stack_temporary): Update.
11428         * eval.c (evaluate_subexp): Update.
11429         * gdbthread.h (class enable_thread_stack_temporaries): Now a
11430         class, not a function.
11431         (value_ptr, value_vec): Remove typedefs.
11432         (class thread_info) <stack_temporaries_enabled>: Now bool.
11433         <stack_temporaries>: Now a std::vector.
11434         (thread_stack_temporaries_enabled_p)
11435         (value_in_thread_stack_temporaries): Return bool.
11436
11437 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
11438
11439         * remote.c (putpkt_binary): Fix omitted bytes reporting.
11440         (getpkt_or_notif_sane_1): Likewise.
11441
11442 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11443
11444         * build-id.c (build_id_to_debug_bfd): Use std::string.
11445
11446 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11447
11448         * build-id.c (find_separate_debug_file_by_buildid): Return
11449         std::string.
11450         * build-id.h (find_separate_debug_file_by_buildid): Return
11451         std::string.
11452         * coffread.c (coff_symfile_read): Adjust to std::string.
11453         * elfread.c (elf_symfile_read): Adjust to std::string.
11454         * symfile.c (separate_debug_file_exists): Change parameter to
11455         std::string.
11456         (find_separate_debug_file): Return std::string.
11457         (find_separate_debug_file_by_debuglink): Return std::string.
11458         * symfile.h (find_separate_debug_file_by_debuglink): Return
11459         std::string.
11460
11461 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11462
11463         * common/xml-utils.c (xml_escape_text): Move code to...
11464         (xml_escape_text_append): ... this new function.
11465         * common/xml-utils.h (xml_escape_text_append): New declaration.
11466         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11467         New function.
11468         (_initialize_xml_utils): register test_xml_escape_text_append as
11469         a selftest.
11470
11471 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
11472
11473         * defs.h: Remove MAX_REGISTER_SIZE.
11474         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11475         asserts.
11476         * python/py-unwind.c (pyuw_sniffer): Likewise.
11477
11478 2018-03-07  Tom Tromey  <tom@tromey.com>
11479
11480         * linux-tdep.c (linux_info_proc): Update.
11481         * target.h (struct target_ops) <to_fileio_readlink>: Return
11482         optional<string>.
11483         (target_fileio_readlink): Return optional<string>.
11484         * remote.c (remote_hostio_readlink): Return optional<string>.
11485         * inf-child.c (inf_child_fileio_readlink): Return
11486         optional<string>.
11487         * target.c (target_fileio_readlink): Return optional<string>.
11488
11489 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
11490
11491         * regcache.c (cooked_read_test): Add riscv to the list of
11492         architectures that have a save_reggroup.
11493
11494 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11495
11496         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11497         value is not a dynamic class object.
11498
11499 2018-03-06  Tom Tromey  <tom@tromey.com>
11500
11501         * rust-exp.y: Formatting fixes.
11502
11503 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11504
11505         * riscv-tdep.c (riscv_register_name): Remove target description
11506         support.
11507         (riscv_gdbarch_init): Remove target description check.
11508
11509 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11510
11511         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11512         comment.
11513         * riscv-tdep.h: Likewise.
11514
11515 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11516
11517         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11518         (riscv_pseudo_register_write): Delete.
11519         (riscv_gdbarch_init): Remove all use of pseudo registers.
11520
11521 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11522
11523         * record-btrace.c (btrace_print_lines): Replace cleanup
11524         parameter with RAII equivalents.
11525         (btrace_insn_history): Replace cleanup with RAII equivalents.
11526         * ui-out.h (make_cleanup_ui_out_list_begin_end,
11527         make_cleanup_ui_out_tuple_begin_end): Remove.
11528         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11529         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11530         make_cleanup_ui_out_list_begin_end): Remove.
11531
11532 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11533
11534         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11535         parameter types to std::vector.  Use bool.
11536         (record_btrace_wait): Replace VEC(tp_t) with
11537         std::vector<thread_info *>.
11538         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11539
11540 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11541
11542         * record-btrace.c (record_btrace_disable_callback): Remove.
11543         (struct scoped_btrace_disable): New.
11544         (record_btrace_open): Use scoped_btrace_disable.
11545
11546 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11547
11548         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11549         reading values from registers.
11550
11551 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11552
11553         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11554         where appropriate.
11555
11556 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11557
11558         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11559         change parameter type.  Use GDB's print functions, and use
11560         core_addr_to_string where appropriate.
11561         (riscv_push_dummy_call): Use core_addr_to_string where
11562         appropriate, update call to riscv_print_arg_location, and reindent
11563         a few lines.
11564         (riscv_return_value): Update call to riscv_print_arg_location.
11565
11566 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11567             Tim Newsome <tim@sifive.com>
11568             Albert Ou <a0u@eecs.berkeley.edu>
11569             Darius Rad <darius@bluespec.com>
11570
11571         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11572         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11573         (ALLDEPFILES): Add riscv-tdep.c
11574         * configure.tgt: Add riscv support.
11575         * riscv-tdep.c: New file.
11576         * riscv-tdep.h: New file.
11577         * NEWS: Mention new target.
11578         * MAINTAINERS: Add entry for riscv.
11579
11580 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11581
11582         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11583         fields within aggregates.
11584
11585 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
11586
11587         * record-btrace.c (btrace_print_lines): Change type of flags to
11588         gdb_disassembly_flags.
11589
11590 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11591
11592         * fbsd-nat.c: Include "inf-ptrace.h".
11593         (USE_SIGTRAP_SIGINFO): Conditionally define.
11594         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11595         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11596         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11597         function.
11598         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11599         Likewise.
11600         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11601         Likewise.
11602         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11603         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11604         "supports_stopped_by_hw_breakpoint" target methods.
11605
11606 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11607
11608         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11609         * fbsd-nat.c (debug_fbsd_nat): New variable.
11610         (show_fbsd_nat_debug): New function.
11611         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11612         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11613
11614 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11615
11616         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11617         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11618         prototype.
11619         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11620         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11621         method.
11622
11623 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11624
11625         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11626         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11627
11628 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11629
11630         * charset.c (struct charset_vector): New.
11631         (charsets): Change type to charset_vector.
11632         (find_charset_names): Adjust.
11633         (add_one): Adjust.
11634         (_initialize_charset): Adjust.
11635
11636 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11637
11638         * progspace.h (struct program_space) <deleted_solibs>: Change
11639         type to std::vector<std::string>.
11640         * progspace.c (clear_program_space_solib_cache): Adjust.
11641         * breakpoint.c (print_solib_event): Adjust.
11642         (check_status_catch_solib): Adjust.
11643         * solib.c (update_solib_list): Adjust.
11644         * ui-out.h (class ui_out) <field_string>: New overload.
11645         * ui-out.c (ui_out::field_string): New overload.
11646
11647 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11648
11649         * progspace.h (struct program_space): Add constructor and
11650         destructor, initialize fields.
11651         (add_program_space): Remove.
11652         * progspace.c (add_program_space): Rename to...
11653         (program_space::program_space): ... this.
11654         (release_program_space): Rename to...
11655         (program_space::~program_space): ... this.
11656         (delete_program_space): Use delete to delete program_space.
11657         (initialize_progspace): Use new to allocate program_space.
11658         * inferior.c (add_inferior_with_spaces): Likewise.
11659         (clone_inferior_command): Likewise.
11660         * infrun.c (follow_fork_inferior): Likewise.
11661         (handle_vfork_child_exec_or_exit): Likewise.
11662
11663 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11664
11665         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11666         (delim_string_to_char_ptr_vec): Return std::vector of
11667         gdb::unique_xmalloc_ptr.
11668         (dirnames_to_char_ptr_vec_append): Take std::vector of
11669         gdb::unique_xmalloc_ptr.
11670         (dirnames_to_char_ptr_vec): Return std::vector of
11671         gdb::unique_xmalloc_ptr.
11672         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11673         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11674         (delim_string_to_char_ptr_vec): Return an std::vector of
11675         gdb::unique_xmalloc_ptr, adjust the code.
11676         (dirnames_to_char_ptr_vec_append): Take an std::vector of
11677         gdb::unique_xmalloc_ptr, adjust the code.
11678         (dirnames_to_char_ptr_vec): Return an std::vector of
11679         gdb::unique_xmalloc_ptr, adjust the code.
11680         * auto-load.c (auto_load_safe_path_vec): Change type to
11681         std::vector of gdb::unique_xmalloc_ptr.
11682         (auto_load_expand_dir_vars): Return an std::vector of
11683         gdb::unique_xmalloc_ptr, adjust the code.
11684         (auto_load_safe_path_vec_update): Adjust.
11685         (filename_is_in_auto_load_safe_path_vec): Adjust.
11686         (auto_load_objfile_script_1): Adjust.
11687         * build-id.c (build_id_to_debug_bfd): Adjust.
11688         * linux-thread-db.c (thread_db_load_search): Adjust.
11689         * source.c (add_path): Adjust.
11690         (openp): Adjust.
11691         * symfile.c (find_separate_debug_file): Adjust.
11692         * utils.c (do_free_char_ptr_vec): Remove.
11693         (make_cleanup_free_char_ptr_vec): Remove.
11694
11695 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
11696
11697         PR gdb/22907
11698         * common/pathstuff.c: Conditionally include "<windows.h>".
11699
11700 2018-03-01  Georg Sauthoff  <mail@georg.so>
11701
11702         PR gdb/22888
11703         * gcore.in: Quote variables and switch interpreter to bash.
11704
11705 2018-03-01  Tom Tromey  <tom@tromey.com>
11706
11707         * dwarf2read.c (alloc_discriminant_info): Fix default_index
11708         assertion.  Add assertion for discriminant_index.
11709         (quirk_rust_enum): Use correct base type name in univariant case.
11710
11711 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
11712
11713         * record.c (get_call_history_modifiers): Return a
11714         record_print_flags.
11715         (cmd_record_call_history): Adjust.
11716         * record-btrace.c (record_btrace_call_history): Adjust.
11717         (record_btrace_call_history_range): Adjust.
11718         (record_btrace_call_history_from): Adjust.
11719         * target-debug.h (target_debug_print_record_print_flags): New.
11720         * target-delegates.c: Re-generate.
11721         * target.c (target_call_history): Change flags type.
11722         (target_call_history_from): Likewise.
11723         (target_call_history_range): Likewise.
11724         * target.h (struct target_ops) <target_call_history>: Likewise.
11725         (target_call_history_from): Likewise.
11726         (target_call_history_range): Likewise.
11727
11728 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11729             Simon Marchi  <simon.marchi@polymtl.ca>
11730
11731         * common/common-utils.c: Include "sys/stat.h".
11732         (is_regular_file): Move here from "source.c"; change return
11733         type to "bool".
11734         * common/common-utils.h (is_regular_file): New prototype.
11735         * common/pathstuff.c (contains_dir_separator): New function.
11736         * common/pathstuff.h (contains_dir_separator): New prototype.
11737         * source.c: Don't include "sys/stat.h".
11738         (is_regular_file): Move to "common/common-utils.c".
11739
11740 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11741
11742         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11743         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11744         * auto-load.c: Include "common/pathstuff.h".
11745         * common/common-def.h (current_directory): Move here.
11746         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11747         function.
11748         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11749         prototype.
11750         * common/pathstuff.c: New file.
11751         * common/pathstuff.h: New file.
11752         * compile/compile.c: Include "common/pathstuff.h".
11753         * defs.h (current_directory): Move to "common/common-defs.h".
11754         * dwarf2read.c: Include "common/pathstuff.h".
11755         * exec.c: Likewise.
11756         * guile/scm-safe-call.c: Likewise.
11757         * linux-thread-db.c: Likewise.
11758         * main.c: Likewise.
11759         * nto-tdep.c: Likewise.
11760         * objfiles.c: Likewise.
11761         * source.c: Likewise.
11762         * symtab.c: Likewise.
11763         * utils.c: Include "common/pathstuff.h".
11764         (gdb_realpath): Move to "common/pathstuff.c".
11765         (gdb_realpath_keepfile): Likewise.
11766         (gdb_abspath): Likewise.
11767         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11768         (gdb_realpath_keepfile): Likewise.
11769         (gdb_abspath): Likewise.
11770
11771 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
11772
11773         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11774         wildcard process pid for super_resume for kernels with a
11775         specific bug.
11776
11777 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
11778
11779         * compile/compile.c (get_args): Add additional comments
11780         explaining function.
11781
11782 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
11783             Tom Tromey  <tom@tromey.com>
11784
11785         * target.h (memory_write_request_s): Remove typedef.  Don't define
11786         VEC.
11787         (target_write_memory_blocks): Change argument to std::vector.
11788         (struct memory_write_request): Add constructor.
11789         * target-memory.c (compare_block_starting_address): Return bool.
11790         Change argument types.
11791         (claim_memory): Change arguments to use std::vector.
11792         (split_regular_and_flash_blocks, blocks_to_erase)
11793         (compute_garbled_blocks): Likewise.
11794         (cleanup_request_data, cleanup_write_requests_vector): Remove.
11795         (target_write_memory_blocks): Change argument to std::vector.
11796         * symfile.c (struct load_section_data): Add constructor and
11797         destructor.  Use std::vector for "requests".
11798         (struct load_progress_data): Add initializers.
11799         (load_section_callback): Update.  Use "new".
11800         (clear_memory_write_data): Remove.
11801         (generic_load): Update.
11802
11803 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
11804
11805         * arch/aarch64.h: Use common/tdesc.h.
11806
11807 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11808
11809         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11810         architecture with a 64-bit ABI.
11811
11812 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11813
11814         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11815         ahead of target description loading.
11816
11817 2018-02-26  Tom Tromey  <tom@tromey.com>
11818
11819         * stack.c (backtrace_command_1): Update.
11820         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11821         of "flags".
11822         * python/py-framefilter.c (py_print_frame)
11823         (gdbpy_apply_frame_filter): Change type of "flags".
11824         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11825         of "flags".
11826         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11827         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11828         * extension.h (enum frame_filter_flag): Rename from
11829         frame_filter_flags.
11830         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11831         (apply_ext_lang_frame_filter): Change type of "flags".
11832         * extension.c (apply_ext_lang_frame_filter): Change type of
11833         "flags".
11834         * extension-priv.h (struct extension_language_ops)
11835         <apply_frame_filter>: Change type of "flags".
11836
11837 2018-02-26  Tom Tromey  <tom@tromey.com>
11838
11839         PR python/16497:
11840         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11841         off-by-one in py_end computation.
11842         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11843         PRINT_MORE_FRAMES.
11844         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11845         constant.
11846
11847 2018-02-26  Tom Tromey  <tom@tromey.com>
11848
11849         * dwarf2read.c (struct variant_field): New.
11850         (struct nextfield) <variant>: New field.
11851         (dwarf2_add_field): Handle DW_TAG_variant_part.
11852         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11853         discriminated union.
11854         (read_structure_type): Handle DW_TAG_variant_part.
11855         (handle_struct_member_die): New function, extracted from
11856         process_structure_scope.  Handle DW_TAG_variant.
11857         (process_structure_scope): Handle discriminated unions.  Call
11858         handle_struct_member_die.
11859
11860 2018-02-26  Tom Tromey  <tom@tromey.com>
11861
11862         * rust-lang.h (rust_last_path_segment): Declare.
11863         * rust-lang.c (rust_last_path_segment): Now public.  Change
11864         contract.
11865         (struct disr_info): Remove.
11866         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11867         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11868         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11869         (rust_enum_p, rust_enum_variant): New function.
11870         (rust_underscore_fields): Remove "offset" parameter.
11871         (rust_print_enum): New function.
11872         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11873         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11874         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
11875         enums.
11876         (rust_internal_print_type): New function, from rust_print_type.
11877         Remove enum code.
11878         (rust_print_type): Call rust_internal_print_type.
11879         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11880         Update enum handling.
11881         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11882         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11883         (rust_union_quirks): New functions.
11884         (process_full_comp_unit, process_full_type_unit): Call
11885         rust_union_quirks.
11886         (process_structure_scope): Update rust_unions if necessary.
11887
11888 2018-02-26  Tom Tromey  <tom@tromey.com>
11889
11890         * value.h (value_union_variant): Declare.
11891         * valops.c (value_union_variant): New function.
11892         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11893         (struct discriminant_info): New.
11894         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11895         enumerator.
11896         (struct main_type) <flag_discriminated_union>: New field.
11897
11898 2018-02-26  Tom Tromey  <tom@tromey.com>
11899
11900         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11901         unittests/unpack-selftests.c.
11902         * unittests/unpack-selftests.c: New file.
11903         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11904
11905 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11906
11907         * dwarf2read.c (struct partial_die_info) <read>: New method.
11908         (read_partial_die): Remove the declaration.
11909         (load_partial_dies): Update.
11910         (partial_die_info::partial_die_info):
11911         (read_partial_die): Change it to partial_die_info::read.
11912
11913 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11914
11915         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11916         (fixup_partial_die): Remove declaration.
11917         (scan_partial_symbols): Update.
11918         (partial_die_parent_scope): Likewise.
11919         (partial_die_full_name): Likewise.
11920         (fixup_partial_die): Change it to partial_die_info::fixup.
11921
11922 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11923
11924         * dwarf2read.c (read_partial_die): Update the declaration.
11925         (load_partial_dies): Caller update.
11926         (read_partial_die): Remove one argument abbrev_len.
11927
11928 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11929
11930         * dwarf2read.c (struct partial_die_info): Add ctor, delete
11931         assignment operator.
11932         (load_partial_dies): Use ctor and copy ctor.
11933         (read_partial_die): Update.
11934         (dwarf2_cu::find_partial_die): Use ctor.
11935
11936 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11937
11938         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11939         (find_partial_die_in_comp_unit): Change it to
11940         dwarf2_cu::find_partial_die.
11941         (find_partial_die): Update.
11942
11943 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11944
11945         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11946         is NULL.
11947
11948 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11949
11950         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11951
11952 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
11953
11954         * arch/amd64.h: Use common/tdesc.h.
11955         * arch/i386.c: Likewise.
11956         * arch/i386.h: Likewise.
11957         * arch/tic6x.c: Likewise.
11958         * arch/tdesc.h: Move file from here...
11959         * common/tdesc.h: ...to here.
11960         * features/aarch64-core.c: Regenerate.
11961         * features/aarch64-fpu.c: Regenerate.
11962         * features/i386/32bit-avx.c: Regenerate.
11963         * features/i386/32bit-avx512.c: Regenerate.
11964         * features/i386/32bit-core.c: Regenerate.
11965         * features/i386/32bit-linux.c: Regenerate.
11966         * features/i386/32bit-mpx.c: Regenerate.
11967         * features/i386/32bit-pkeys.c: Regenerate.
11968         * features/i386/32bit-sse.c: Regenerate.
11969         * features/i386/64bit-avx.c: Regenerate.
11970         * features/i386/64bit-avx512.c: Regenerate.
11971         * features/i386/64bit-core.c: Regenerate.
11972         * features/i386/64bit-linux.c: Regenerate.
11973         * features/i386/64bit-mpx.c: Regenerate.
11974         * features/i386/64bit-pkeys.c: Regenerate.
11975         * features/i386/64bit-segments.c: Regenerate.
11976         * features/i386/64bit-sse.c: Regenerate.
11977         * features/i386/x32-core.c: Regenerate.
11978         * features/tic6x-c6xp.c: Regenerate.
11979         * features/tic6x-core.c: Regenerate.
11980         * features/tic6x-gp.c: Regenerate.
11981         * target-descriptions.c: Use common/tdesc.h.
11982         * target-descriptions.h: Likewise.
11983
11984 2018-02-24  Tom Tromey  <tom@tromey.com>
11985
11986         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11987         (try_thread_db_load_from_dir, thread_db_load_search): Use
11988         std::string.
11989         (info_auto_load_libthread_db_compare): Return bool.  Change
11990         argument types.
11991         (info_auto_load_libthread_db): Use std::vector, std::string.
11992         Remove cleanups.
11993
11994 2018-02-24  Tom Tromey  <tom@tromey.com>
11995
11996         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11997         std::string.
11998         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11999         std::string*.
12000         * gdbarch.c: Rebuild.
12001         * gdbarch.h: Rebuild.
12002         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12003         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12004         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12005         std::string*.
12006
12007 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
12008
12009         * gdbtypes.h (sect_offset): Change type to uint64_t.
12010         (sect_offset_str): New function.
12011         * dwarf2read.c (create_addrmap_from_aranges): Use
12012         sect_offset_str.
12013         (error_check_comp_unit_head): Likewise.
12014         (create_debug_type_hash_table): Likewise.
12015         (read_cutu_die_from_dwo): Likewise.
12016         (init_cutu_and_read_dies): Likewise.
12017         (init_cutu_and_read_dies_no_follow): Likewise.
12018         (process_psymtab_comp_unit_reader): Likewise.
12019         (partial_die_parent_scope): Likewise.
12020         (peek_die_abbrev): Likewise.
12021         (process_queue): Likewise.
12022         (dwarf2_physname): Likewise.
12023         (read_namespace_alias): Likewise.
12024         (read_import_statement): Likewise.
12025         (create_dwo_cu_reader): Likewise.
12026         (create_cus_hash_table): Likewise.
12027         (lookup_dwo_cutu): Likewise.
12028         (inherit_abstract_dies): Likewise.
12029         (read_func_scope): Likewise.
12030         (read_call_site_scope): Likewise.
12031         (dwarf2_add_member_fn): Likewise.
12032         (read_common_block): Likewise.
12033         (read_module_type): Likewise.
12034         (read_typedef): Likewise.
12035         (read_subrange_type): Likewise.
12036         (load_partial_dies): Likewise.
12037         (read_partial_die): Likewise.
12038         (find_partial_die): Likewise.
12039         (read_str_index): Likewise.
12040         (dwarf2_string_attr): Likewise.
12041         (build_error_marker_type): Likewise.
12042         (lookup_die_type): Likewise.
12043         (dump_die_shallow): Likewise.
12044         (follow_die_ref): Likewise.
12045         (dwarf2_fetch_die_loc_sect_off): Likewise.
12046         (dwarf2_fetch_constant_bytes): Likewise.
12047         (follow_die_sig): Likewise.
12048         (get_signatured_type): Likewise.
12049         (get_DW_AT_signature_type): Likewise.
12050         (dwarf2_find_containing_comp_unit): Likewise.
12051         (set_die_type): Likewise.
12052
12053 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
12054
12055         * arch/aarch64.c: Include "common-defs.h".
12056         * arch/amd64.c: Likewise.
12057         * arch/i386.c: Likewise.
12058
12059 2018-02-21  Tom Tromey  <tom@tromey.com>
12060
12061         * value.h: (extract_field_op): Update.
12062         * eval.c (extract_field_op): Return a const char *.
12063         * expression.h (parse_expression_for_completion): Update.
12064         * completer.c (complete_expression): Update.
12065         (add_struct_fields): Make fieldname const.
12066         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12067         (mark_completion_tag, parse_exp_in_context_1): Update.
12068         (parse_expression_for_completion): Change "name" to
12069         unique_xmalloc_ptr*.
12070
12071 2018-02-21  Tom Tromey  <tom@tromey.com>
12072
12073         * infcall.c (call_function_by_hand_dummy): Use std::vector.
12074
12075 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12076
12077         * avr-tdep.c (avr_read_pc): Change parameter type to
12078         readable_regcache.
12079         * gdbarch.sh (read_pc): Likewise.
12080         * gdbarch.c: Re-generated.
12081         * gdbarch.h: Re-generated.
12082         * hppa-tdep.c (hppa_read_pc): Change parameter type to
12083         readable_regcache.
12084         * ia64-tdep.c (ia64_read_pc): Likewise.
12085         * mips-tdep.c (mips_read_pc): Likewise.
12086         * spu-tdep.c (spu_read_pc): Likewise.
12087
12088 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12089
12090         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12091         * regcache-dump.c: New file.
12092         * regcache.c: Move register_dump to regcache-dump.c.
12093         (maintenance_print_registers): Likewise.
12094         (maintenance_print_raw_registers): Likewise.
12095         (maintenance_print_cooked_registers): Likewise.
12096         (maintenance_print_register_groups): Likewise.
12097         (maintenance_print_remote_registers): Likewise.
12098         (_initialize_regcache): Likewise.
12099         * regcache.h (register_dump): Moved from regcache.c.
12100
12101 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12102
12103         * regcache.c (regcache::regcache): Update.
12104         (regcache::invalidate): Move it to detached_regcache::invalidate.
12105         (get_thread_arch_aspace_regcache): Update.
12106         (regcache::raw_update): Update.
12107         (regcache::cooked_read): Remove some code.
12108         (regcache::cooked_read_value): Likewise.
12109         (regcache::raw_write): Remove assert on m_readonly_p.
12110         (regcache::raw_supply_integer): Move it to
12111         detached_regcache::raw_supply_integer.
12112         (regcache::raw_supply_zeroed): Likewise.
12113         * regcache.h (detached_regcache) <raw_supply_integer>: New
12114         declaration.
12115         <raw_supply_zeroed, invalidate>: Likewise.
12116         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12117         <invalidate>: Likewise.
12118         <m_readonly_p>: Removed.
12119
12120 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12121
12122         * infcmd.c (get_return_value): Let stop_regs point to
12123         get_current_regcache.
12124         * regcache.c (regcache::regcache): Remove.
12125         (register_dump_reg_buffer): New class.
12126         (regcache_print): Adjust.
12127         * regcache.h (regcache): Remove constructors.
12128
12129 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12130
12131         * regcache.c (class register_dump): New class.
12132         (register_dump_regcache, register_dump_none): New class.
12133         (register_dump_remote, register_dump_groups): New class.
12134         (regcache_print): Update.
12135         * regcache.h (regcache_dump_what): Move it to regcache.c.
12136         (regcache) <dump>: Remove.
12137
12138 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12139
12140         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12141          reg_buffer_rw *.
12142         (jit_unwind_reg_set_impl): Call raw_supply.
12143         (jit_frame_sniffer): Use reg_buffer_rw.
12144         * record-full.c (record_full_core_regbuf): Change its type.
12145         (record_full_core_open_1): Use reg_buffer_rw.
12146         (record_full_close): Likewise.
12147         (record_full_core_fetch_registers): Use regcache->raw_supply.
12148         (record_full_core_store_registers): Likewise.
12149         * regcache.c (regcache::get_register_status): Move it to
12150         reg_buffer.
12151         (regcache_raw_set_cached_value): Remove.
12152         (regcache::raw_set_cached_value): Remove.
12153         (regcache::raw_write): Call raw_supply.
12154         (regcache::raw_supply): Move it to reg_buffer_rw.
12155         * regcache.h (regcache_raw_set_cached_value): Remove.
12156         (reg_buffer_rw): New class.
12157
12158 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12159
12160         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12161         readonly_detached_regcache.
12162         (dummy_frame_prev_register): Use regcache->cooked_read.
12163         * frame.c (frame_save_as_regcache): Change return type.
12164         (frame_pop): Update.
12165         * frame.h (frame_save_as_regcache): Update declaration.
12166         * inferior.h (get_infcall_suspend_state_regcache): Update
12167         declaration.
12168         * infrun.c (infcall_suspend_state) <registers>: use
12169         readonly_detached_regcache.
12170         (save_infcall_suspend_state): Don't use regcache_dup.
12171         (get_infcall_suspend_state_regcache): Change return type.
12172         * linux-fork.c (struct fork_info) <savedregs>: Change to
12173         readonly_detached_regcache.
12174         <pc>: New field.
12175         (fork_save_infrun_state): Don't use regcache_dup.
12176         (info_checkpoints_command): Adjust.
12177         * mi/mi-main.c (register_changed_p): Update declaration.
12178         (mi_cmd_data_list_changed_registers): Use
12179         readonly_detached_regcache.
12180         (register_changed_p): Change parameter type to
12181         readonly_detached_regcache.
12182         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12183         readonly_detached_regcache.
12184         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12185         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12186         New.
12187         (regcache::save): Move it to reg_buffer.
12188         (regcache::restore): Change parameter type.
12189         (regcache_dup): Remove.
12190         * regcache.h (reg_buffer) <save>: New method.
12191         (readonly_detached_regcache): New class.
12192         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12193         readonly_detached_regcache.
12194         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12195
12196 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12197
12198         * frame.c (frame_save_as_regcache): Use regcache method save.
12199         (frame_pop): Use regcache method restore.
12200         * infrun.c (restore_infcall_suspend_state): Likewise.
12201         * linux-fork.c (fork_load_infrun_state): Likewise.
12202         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12203         save.
12204         * regcache.c (regcache_save): Remove.
12205         (regcache::restore): More asserts.
12206         (regcache_cpy): Remove.
12207         * regcache.h (regcache_save): Remove the declaration.
12208         (regcache::restore): Move from private to public.
12209         Remove the friend declaration of regcache_cpy.
12210         (regcache_cpy): Remove declaration.
12211
12212 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12213
12214         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12215         parameter type to 'readable_regcache *'.
12216         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12217         * arm-tdep.c (arm_neon_quad_read): Likewise.
12218         (arm_pseudo_read): Likewise.
12219         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12220         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12221         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12222         * gdbarch.c: Re-generated.
12223         * gdbarch.h: Re-generated.
12224         * gdbarch.sh (pseudo_register_read): Change parameter type to
12225         'readable_regcache *'.
12226         (pseudo_register_read_value): Likewise.
12227         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12228         (h8300_pseudo_register_read): Likewise.
12229         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12230         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12231         (i386_pseudo_register_read_into_value): Likewise.
12232         (i386_pseudo_register_read_value): Likewise.
12233         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12234         declaration.
12235         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12236         * m32c-tdep.c (m32c_raw_read): Likewise.
12237         (m32c_read_flg): Likewise.
12238         (m32c_banked_register): Likewise.
12239         (m32c_banked_read): Likewise.
12240         (m32c_sb_read): Likewise.
12241         (m32c_part_read): Likewise.
12242         (m32c_cat_read): Likewise.
12243         (m32c_r3r2r1r0_read): Likewise.
12244         (m32c_pseudo_register_read): Likewise.
12245         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12246         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12247         (mep_pseudo_cr64_read): Likewise.
12248         (mep_pseudo_register_read): Likewise.
12249         * mips-tdep.c (mips_pseudo_register_read): Likewise.
12250         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12251         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12252         * regcache.c (regcache::raw_read): Move it to readable_regcache.
12253         (regcache::cooked_read): Likewise.
12254         (regcache::cooked_read_value): Likewise.
12255         (regcache_cooked_read_signed):
12256         (regcache::cooked_read): Likewise.
12257         * regcache.h (readable_regcache): New class.
12258         (regcache): Inherit readable_regcache.  Move some methods to
12259         readable_regcache.
12260         * rl78-tdep.c (rl78_pseudo_register_read): Change
12261         parameter type to 'readable_regcache *'.
12262         * rs6000-tdep.c (do_regcache_raw_read): Remove.
12263         (e500_pseudo_register_read): Change parameter type to
12264         'readable_regcache *'.
12265         (dfp_pseudo_register_read): Likewise.
12266         (vsx_pseudo_register_read): Likewise.
12267         (efpr_pseudo_register_read): Likewise.
12268         * s390-tdep.c (s390_pseudo_register_read): Likewise.
12269         * sh-tdep.c (sh_pseudo_register_read): Likewise.
12270         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12271         (sh64_pseudo_register_read): Likewise.
12272         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12273         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12274         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12275         (spu_pseudo_register_read): Likewise.
12276         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12277         (xtensa_pseudo_register_read): Likewise.
12278
12279 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12280
12281         * regcache.c (regcache::regcache): Call reg_buffer ctor.
12282         (regcache::arch): Move it to reg_buffer::arch.
12283         (regcache::register_buffer): Likewise.
12284         (regcache::assert_regnum): Likewise.
12285         (regcache::num_raw_registers): Likewise.
12286         * regcache.h (reg_buffer): New class.
12287         (regcache): Inherit reg_buffer.
12288
12289 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
12290
12291         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12292         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12293
12294 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
12295
12296         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12297
12298 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
12299
12300         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12301         (SFILES): Remove common/*.c files.
12302         (COMMON_OBS): Remove some *.o files built from common/*.c files.
12303         * common/common.host: Add common reference.
12304         * configure.ac: Likewise.
12305         * configure: Regenerate.
12306
12307 2018-02-16  Yao Qi  <yao.qi@linaro.org>
12308
12309         * block.c (block_namespace_info): Inherit allocate_on_obstack.
12310         (block_initialize_namespace): Use new.
12311         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12312         (dwarf2_free_objfile): Use delete.
12313         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12314         (copy_type_recursive): Use new.
12315         * gdb_obstack.h (allocate_on_obstack): New.
12316
12317 2018-02-15  Yao Qi  <yao.qi@linaro.org>
12318
12319         PR gdb/22849
12320         * inferior.c (exit_inferior_1): Reset inf->control.
12321
12322 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
12323
12324         * ada-lang.c (ada_to_fixed_value_create): Delete advance
12325         declaration.
12326
12327 2018-02-14  Pedro Alves  <palves@redhat.com>
12328
12329         * frame-unwind.c (frame_unwind_try_unwinder): Always call
12330         frame_cleanup_after_sniffer on exception.
12331
12332 2018-02-14  Tom Tromey  <tom@tromey.com>
12333
12334         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12335         const.
12336         (solib_bfd_open): Make pathname const.
12337         * solib.c (solib_bfd_open): Make pathname const.
12338         * solib-spu.c (spu_bfd_fopen): Make name const.
12339         (spu_bfd_open): Make pathname const.
12340         * solib-darwin.c (darwin_bfd_open): Make pathname const.
12341         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12342
12343 2018-02-14  Tom Tromey  <tom@tromey.com>
12344
12345         * symfile.c (symfile_bfd_open): Update.
12346         * source.h (openp, source_full_path_of, find_and_open_source):
12347         Change argument type to unique_xmalloc_ptr.
12348         * source.c (openp): Take a unique_xmalloc_ptr.
12349         (source_full_path_of, find_and_open_source): Likewise.
12350         (open_source_file, symtab_to_fullname): Update.
12351         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12352         unique_xmalloc_ptr.
12353         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12354         (exec_file_find): Update.
12355         * psymtab.c (psymtab_to_fullname): Update.
12356         * nto-tdep.h (nto_find_and_open_solib): Update.
12357         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12358         unique_xmalloc_ptr.
12359         * exec.c (exec_file_attach): Update.
12360         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12361         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12362
12363 2018-02-14  Tom Tromey  <tom@tromey.com>
12364
12365         * solib.c: Include source.h.
12366         * nto-tdep.c: Include source.h.
12367         * mi/mi-cmd-env.c: Include source.h.
12368         * infcmd.c: Include source.h.
12369         * exec.c: Include source.h.
12370         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12371         (add_path, directory_switch, source_path, init_source_path): Move
12372         declarations...
12373         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12374         (add_path, directory_switch, source_path, init_source_path):
12375         ...here.
12376
12377 2018-02-14  Tom Tromey  <tom@tromey.com>
12378
12379         * solist.h (exec_file_find, solib_find): Return
12380         unique_xmalloc_ptr.
12381         (solib_bfd_fopen): Take a const char *.
12382         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12383         (exec_file_find, solib_find): Likewise.
12384         (solib_bfd_fopen): Do not take ownership of "pathname".
12385         (solib_bfd_open): Use unique_xmalloc_ptr.
12386         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12387         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12388         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12389         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12390
12391 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
12392
12393         * ada-lang.c (name_match_type_from_name): Remove reference to
12394         ada_name_for_lookup in function's documentation.
12395         * ada-lang.h (ada_name_for_lookup): Delete declaration.
12396
12397 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12398
12399         * defs.h (enum openp_flags): New enum.
12400         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12401         Move to enum openp_flags.
12402         (openp_flags): New enum flags.
12403         (openp): Change parameter type to openp_flags.
12404         * source.c (openp): Change parameter type to openp_flags.
12405         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12406         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12407
12408 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12409
12410         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12411         per-command.
12412
12413 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12414
12415         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12416         into...
12417         (class dwarf2_queue_guard): ...the destructor of this new class.
12418         (dw2_do_instantiate_symtab): Create instance of the new class
12419         dwarf2_queue_guard, remove cleanup.
12420
12421 2018-02-09  Tom Tromey  <tom@tromey.com>
12422
12423         * source.c (find_source_lines): Don't reference past the end of
12424         the vector.
12425
12426 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12427
12428         * remote.c (remote_btrace_maybe_reopen): Change error message.
12429         * btrace.c (btrace_enable): Likewise.
12430         (parse_xml_btrace): Likewise.
12431         (parse_xml_btrace_conf): Likewise.
12432
12433 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12434
12435         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12436         (linux_enable_pt, linux_enable_bts): Call
12437         diagnose_perf_event_open_fail.
12438
12439 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12440
12441         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12442         Remove parameter and change return type.  Update callers.  Move it.
12443         (linux_enable_bts, linux_enable_pt): Improve error message.
12444         (linux_enable_pt): Remove zero buffer size check.
12445         (linux_enable_btrace): Improve error messages.  Remove NULL return
12446         check.
12447
12448 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12449
12450         * btrace.c (btrace_enable): Remove target_supports_btrace call.
12451         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12452         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12453         (linux_supports_pt, linux_supports_btrace): Remove.
12454         (linux_enable_bts): Call cpu_supports_bts.
12455         * nat/linux-btrace.h (linux_supports_btrace): Remove.
12456         * remote.c (remote_supports_btrace): Remove.
12457         (init_remote_ops): Remove remote_supports_btrace.
12458         * target-delegates.c: Regenerated.
12459         * target.c (target_supports_btrace): Remove.
12460         * target.h (target_ops) <to_supports_btrace>: Remove
12461         (target_supports_btrace): Remove.
12462         * x86-linux-nat.c (x86_linux_create_target): Remove
12463         linux_supports_btrace.
12464
12465 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12466
12467         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12468         btrace failed.
12469         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12470         exception and use message in own exception.
12471
12472 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12473
12474         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12475         (perf_event_pt_event_type): Use gdb_file_up.
12476         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12477         scoped_fd, and scoped_mmap.
12478
12479 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12480
12481         * common/scoped_mmap.h: New.
12482         * unittests/scoped_mmap-selftest.c: New.
12483         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12484         unittests/scoped_mmap-selftest.c.
12485
12486 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12487
12488         * common/scoped_fd.h: New.
12489         * unittests/scoped_fd-selftest.c: New.
12490         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12491         unittests/scoped_fd-selftest.c.
12492
12493 2018-02-09  Tom Tromey  <tom@tromey.com>
12494
12495         * auto-load.c (auto_load_section_scripts): Use
12496         gdb::unique_xmalloc_ptr.
12497
12498 2018-02-09  Tom Tromey  <tom@tromey.com>
12499
12500         * auto-load.c (execute_script_contents): Use std::string.
12501
12502 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
12503
12504         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12505         Python function, rather than a new command.
12506
12507 2018-02-08  Tom Tromey  <tom@tromey.com>
12508
12509         * solib.c (solib_find_1): Use std::string.
12510         (solib_bfd_fopen): Use unique_xmalloc_ptr.
12511
12512 2018-02-08  Tom Tromey  <tom@tromey.com>
12513
12514         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12515
12516 2018-02-08  Tom Tromey  <tom@tromey.com>
12517
12518         * source.c (find_source_lines): Use gdb::def_vector.
12519
12520 2018-02-08  Tom Tromey  <tom@tromey.com>
12521
12522         * macrocmd.c (struct temporary_macro_definition): New.
12523         (macro_define_command): Use temporary_macro_definition.  Remove
12524         cleanups.
12525         (free_macro_definition_ptr): Remove.
12526
12527 2018-02-08  Tom Tromey  <tom@tromey.com>
12528
12529         * macroexp.c (maybe_expand): Use std::string.
12530
12531 2018-02-08  Tom Tromey  <tom@tromey.com>
12532
12533         * macroexp.c (struct macro_buffer): Add initializers for some
12534         members.
12535         (init_buffer, init_shared_buffer, free_buffer)
12536         (free_buffer_return_text): Remove.
12537         (macro_buffer): New constructors.
12538         (~macro_buffer): New destructor.
12539         (macro_buffer::set_shared): New method.
12540         (macro_buffer::resize_buffer, macro_buffer::appendc)
12541         (macro_buffer::appendmem): Now methods, not free functions.
12542         (set_token, append_tokens_without_splicing, stringify)
12543         (macro_stringify): Update.
12544         (gather_arguments): Change return type.  Remove argc_p argument,
12545         add args_ptr argument.  Use std::vector.
12546         (substitute_args): Remove argc argument.  Accept std::vector.
12547         (expand): Update.  Use std::vector.
12548         (scan, macro_expand, macro_expand_next): Update.
12549
12550 2018-02-08  Tom Tromey  <tom@tromey.com>
12551
12552         * symtab.c (default_collect_symbol_completion_matches_break_on):
12553         Use unique_xmalloc_ptr.
12554         * macroscope.h: (sal_macro_scope, user_macro_scope)
12555         (default_macro_scope): Return unique_xmalloc_ptr.
12556         * macroscope.c (sal_macro_scope, user_macro_scope)
12557         (default_macro_scope): Return unique_xmalloc_ptr.
12558         * macroexp.h (macro_expand, macro_expand_once): Return
12559         unique_xmalloc_ptr.
12560         * macroexp.c (macro_expand, macro_expand_once): Return
12561         unique_xmalloc_ptr.
12562         * macrocmd.c (macro_expand_command, macro_expand_once_command)
12563         (info_macro_command, info_macros_command): Use
12564         unique_xmalloc_ptr.
12565         * compile/compile-c-support.c (write_macro_definitions): Use
12566         unique_xmalloc_ptr.
12567         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12568
12569 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
12570
12571         * value.c (value_static_field): Assign field type instead of
12572         containing type when returning an optimized out value.
12573
12574 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12575
12576         * ft32-tdep.c (ft32_read_pc): Remove.
12577         (ft32_write_pc): Remove.
12578         (ft32_gdbarch_init): Update.
12579         * m32r-tdep.c (m32r_read_pc): Remove.
12580         (m32r_gdbarch_init): Update.
12581         * mep-tdep.c (mep_read_pc): Remove.
12582         (mep_gdbarch_init): Update.
12583         * microblaze-tdep.c (microblaze_write_pc): Remove.
12584         (microblaze_gdbarch_init): Update.
12585         * mn10300-tdep.c (mn10300_read_pc): Remove.
12586         (mn10300_write_pc): Remove.
12587         (mn10300_gdbarch_init): Update.
12588         * moxie-tdep.c (moxie_read_pc): Remove.
12589         (moxie_write_pc): Remove.
12590         (moxie_gdbarch_init): Update.
12591
12592 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12593
12594         * expprint.c (print_subexp_standard): Handle
12595         OP_F77_UNDETERMINED_ARGLIST.
12596         (dump_subexp_body_standard): Likewise.
12597
12598 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
12599
12600         * target-descriptions.c (tdesc_element_visitor) Add empty
12601         implementations.
12602         (tdesc_type): Move make_gdb_type from here.
12603         (tdesc_type_builtin): Likewise.
12604         (tdesc_type_vector): Likewise.
12605         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12606         (make_gdb_type_struct): Move from tdesc_type_with_fields.
12607         (make_gdb_type_union): Likewise.
12608         (make_gdb_type_flags): Likewise.
12609         (make_gdb_type_enum): Likewise.
12610         (make_gdb_type): New function.
12611         (tdesc_register_type): Use static make_gdb_type.
12612
12613 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
12614
12615         * infcmd.c (default_print_one_register_info): Align natural-format
12616         column values consistently one under another.
12617         (pad_to_column): New function.
12618
12619 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
12620
12621         * dwarf2read.c (dwarf2_physname): Move commment.
12622
12623 2018-02-01  Leszek Swirski  <leszeks@google.com>
12624
12625         * varobj.c (varobj_formatted_print_options): Allow recursive
12626         pretty printing if pretty printing is enabled.
12627
12628 2018-02-01  Leszek Swirski  <leszeks@google.com>
12629
12630         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12631         names after a structop as a filename.
12632
12633 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12634
12635         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12636         (arm_record_coproc_data_proc): Likewise.
12637
12638 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12639
12640         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12641
12642 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
12643
12644         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12645         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12646
12647 2018-01-31  Pedro Alves  <palves@redhat.com>
12648
12649         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12650         * inflow.c (child_terminal_save_inferior): Wrap reference to
12651         tcgetpgrp in HAVE_TERMIOS_H.
12652         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12653         _WIN32.
12654         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12655         always iterate over all inferiors.
12656         (gdbsim_cntrl_c): Adjust.
12657         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12658
12659 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12660
12661         * gdbtypes.c (lookup_array_range_type): Make sure the array's
12662         index type is objfile-owned if the element type is as well.
12663
12664 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12665
12666         GDB 8.1 released.
12667
12668 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12669
12670         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12671         "features/s390x-linux64.c".
12672         (_initialize_s390_linux_tdep): Remove initialization of tdescs
12673         s390_linux32 and s390x_linux64.
12674         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12675         default tdesc.
12676         * s390-tdep.c: Include "features/s390-linux32.c" and
12677         "features/s390x-linux64.c".
12678         (s390_tdesc_valid): Add check for tdesc_has_registers.
12679         (s390_gdbarch_init): Make sure there is always a valid tdesc.
12680         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12681         tdesc_s390x_linux64.
12682         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12683         tdesc_s390x_linux64 to...
12684         * s390-tdep.h: ...here.
12685
12686 2018-01-30  Pedro Alves  <palves@redhat.com>
12687
12688         PR gdb/13211
12689         * config.in, configure: Regenerate.
12690         * configure.ac: Check for getpgid.
12691         * go32-nat.c (go32_pass_ctrlc): New.
12692         (go32_target): Install it.
12693         * inf-child.c (inf_child_target): Install
12694         child_terminal_save_inferior, child_pass_ctrlc and
12695         child_interrupt.
12696         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12697         (inf_ptrace_target): No longer install it.
12698         * infcmd.c (interrupt_target_1): Adjust.
12699         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12700         (child_interrupt): Declare.
12701         (inferior::terminal_state): New.
12702         * inflow.c (struct terminal_info): Update comments.
12703         (inferior_process_group): Delete.
12704         (terminal_is_ours): Delete.
12705         (gdb_tty_state): New.
12706         (child_terminal_init): Adjust.
12707         (is_gdb_terminal, sharing_input_terminal_1)
12708         (sharing_input_terminal): New functions.
12709         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
12710         Set the process's actual process group in the foreground if
12711         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
12712         mark terminal as the inferior's if not sharing GDB's terminal.
12713         Don't check attach_flag.
12714         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12715         pass down a target_terminal_state.
12716         (child_terminal_save_inferior): New, factored out from ...
12717         (child_terminal_ours_1): ... this.  Handle
12718         target_terminal_state::is_ours_for_output.
12719         (child_interrupt, child_pass_ctrlc): New.
12720         (inflow_inferior_exit): Clear the inferior's terminal_state.
12721         (copy_terminal_info): Copy the inferior's terminal state.
12722         (_initialize_inflow): Remove reference to terminal_is_ours.
12723         * inflow.h (inferior_process_group): Delete.
12724         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12725         * procfs.c (procfs_target): Don't install procfs_interrupt.
12726         (procfs_interrupt): Delete.
12727         * remote.c (remote_serial_quit_handler): Adjust.
12728         (remote_interrupt): Remove ptid parameter.  Adjust.
12729         * target-delegates.c: Regenerate.
12730         * target.c: Include "terminal.h".
12731         (target_terminal::terminal_state): Rename to ...
12732         (target_terminal::m_terminal_state): ... this.
12733         (target_terminal::init): Adjust.
12734         (target_terminal::inferior): Adjust to per-inferior
12735         terminal_state.
12736         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12737         (target_terminal::ours, target_terminal::ours_for_output): Use
12738         target_terminal_is_ours_kind.
12739         (target_interrupt): Remove ptid parameter.  Adjust.
12740         (default_target_pass_ctrlc): Adjust.
12741         * target.h (target_ops::to_terminal_save_inferior): New field.
12742         (target_ops::to_interrupt): Remove ptid_t parameter.
12743         (target_interrupt): Remove ptid_t parameter.  Update comment.
12744         (target_pass_ctrlc): Update comment.
12745         * target/target.h (target_terminal_state): New scoped enum,
12746         factored out of ...
12747         (target_terminal::terminal_state): ... here.
12748         (target_terminal::inferior): Update comments.
12749         (target_terminal::restore_inferior): New.
12750         (target_terminal::is_inferior, target_terminal::is_ours)
12751         (target_terminal::is_ours_for_output): Adjust.
12752         (target_terminal::scoped_restore_terminal_state): Adjust to
12753         rename, and call restore_inferior() instead of inferior().
12754         (target_terminal::scoped_restore_terminal_state::m_state): Change
12755         type.
12756         (target_terminal::terminal_state): Rename to ...
12757         (target_terminal::m_terminal_state): ... this and change type.
12758
12759 2018-01-30  Pedro Alves  <palves@redhat.com>
12760
12761         * linux-nat.c (wait_for_signal): New function.
12762         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12763         directly.
12764         (async_terminal_is_ours)
12765         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12766         (linux_nat_add_target): Don't override
12767         to_terminal_inferior/to_terminal_ours.
12768
12769 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
12770
12771         * remote.c (remote_follow_fork): Don't call "detach_inferior".
12772
12773 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
12774
12775         * dwarf2read.c (free_dwo_files): Add forward-declaration.
12776         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12777         dwarf2_per_objfile_free here.
12778         (dwarf2_per_objfile_free): Remove.
12779         (_initialize_dwarf2_read): Don't register
12780         dwarf2_per_objfile_free as a registry cleanup.
12781
12782 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
12783
12784         Avoid compilation errors in MinGW native builds
12785
12786         The error is triggered by including python-internal.h, and the
12787         error message is:
12788
12789              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12790                       from build-gnulib/import/math.h:27,
12791                       from d:/usr/Python26/include/pyport.h:235,
12792                       from d:/usr/Python26/include/Python.h:58,
12793                       from python/python-internal.h:94,
12794                       from python/py-arch.c:24:
12795              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12796         using ::hypot;
12797                 ^~~~~
12798
12799         This happens because Python headers define 'hypot' to expand t
12800         '_hypot' in the Windows builds.
12801         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12802         'hypoth'.  This avoids a compilation error.
12803
12804 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12805
12806         * MAINTAINERS (Write After Approval): Fix ordering.
12807
12808 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12809
12810         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12811
12812 2018-01-26  Alan Modra  <amodra@gmail.com>
12813
12814         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12815         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12816         Remove nop.  Make const.  Comment.
12817         (powerpc32_plt_stub_so_2): New.
12818         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12819         Correct count.  Update uses.
12820         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12821         Move common code reading PLT entry word.  Correct
12822         powerpc32_plt_stub PLT address calculation.
12823         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12824         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12825         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12826         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12827         (ppc64_standard_linkage8): Likewise.
12828         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12829         Correct insns description.
12830         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12831
12832 2018-01-24  Pedro Alves  <palves@redhat.com>
12833
12834         GCC PR libstdc++/83906
12835         * gdbtypes.c (operator==(const dynamic_prop &,
12836         const dynamic_prop &)): New.
12837         (operator==(const range_bounds &, const range_bounds &)): New.
12838         (check_types_equal): Use them instead of memcmp.
12839         * gdbtypes.h (operator==(const dynamic_prop &,
12840         const dynamic_prop &)): Declare.
12841         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12842         (operator==(const range_bounds &, const range_bounds &)): Declare.
12843         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12844
12845 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12846
12847         * s390-linux-tdep.c (s390_record_address_mask)
12848         (s390_record_calc_disp_common, s390_record_calc_disp)
12849         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12850         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12851         (s390_process_record): Move to s390-tdep.c.
12852         (s390_linux_init_abi_any): Adjust.
12853         * s390-tdep.c (s390_record_address_mask)
12854         (s390_record_calc_disp_common, s390_record_calc_disp)
12855         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12856         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12857         (s390_process_record): Moved from s390-linux-tdep.c
12858         (s390_gdbarch_init): Adjust.
12859
12860 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12861
12862         * s390-linux-nat.c (s390-tdep.h): New include.
12863         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12864         (HFILES_NO_SRCDIR): Add s390-tdep.h.
12865         (ALLDEPFILES): Add s390-tdep.c.
12866         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12867         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12868         * s390-tdep.h: ...this.  New file.
12869         * s390-linux-tdep.c (s390-tdep.h): New include.
12870         (_initialize_s390_tdep): Rename to...
12871         (_initialize_s390_linux_tdep): ...this and adjust.
12872         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12873         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12874         s390-tdep.h.
12875         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12876         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12877         (s390_is_partial_instruction, s390_software_single_step)
12878         (is_non_branch_ril, s390_displaced_step_copy_insn)
12879         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12880         (s390_prologue_data, s390_addr, s390_store, s390_load)
12881         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12882         (s390_register_call_saved, s390_guess_tracepoint_registers)
12883         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12884         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12885         (s390_pseudo_register_name, s390_pseudo_register_type)
12886         (s390_pseudo_register_read, s390_pseudo_register_write)
12887         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12888         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12889         (s390_addr_bits_remove, s390_address_class_type_flags)
12890         (s390_address_class_type_flags_to_name)
12891         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12892         (s390_function_arg_float, s390_function_arg_vector)
12893         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12894         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12895         (s390_frame_align, s390_register_return_value, s390_return_value)
12896         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12897         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12898         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12899         (s390_trad_frame_prev_register, s390_unwind_cache)
12900         (s390_prologue_frame_unwind_cache)
12901         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12902         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12903         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12904         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12905         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12906         (s390_frame_base_address, s390_local_base_address)
12907         (s390_frame_base, s390_gcc_target_options)
12908         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12909         (s390_validate_reg_range, s390_tdesc_valid)
12910         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12911         * s390-tdep.c: ...this.  New file.
12912
12913 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12914
12915         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12916         (s390_process_record, s390_gdbarch_tdep_alloc)
12917         (s390_linux_init_abi_any): Use/set new hook.
12918
12919 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12920
12921         * s390-linux-tdep.c (osabi.h): New include.
12922         (s390_linux_init_abi_31, s390_linux_init_abi_64)
12923         (s390_linux_init_abi_any): New functions.
12924         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12925
12926 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12927
12928         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12929         tdesc_has_registers check
12930
12931 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12932
12933         * s390-linux-tdep.c (s390_tdesc_valid): New function.
12934         (s390_validate_reg_range): New macro.
12935         (s390_gdbarch_init): Adjust.
12936
12937 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12938
12939         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12940         (s390_gdbarch_tdep_alloc): Adjust.
12941         (s390_gdbarch_init): Adjust.
12942
12943 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12944
12945         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12946         <have_tdb>: Change type to bool.
12947         (s390_gdbarch_tdep_alloc): Adjust.
12948         (s390_gdbarch_init): Adjust.
12949
12950 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12951
12952         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12953         (gdbarch_tdep) <have_upper, have_vx>: New fields.
12954         (s390_gdbarch_tdep_alloc): New function.
12955         (s390_gdbarch_init): Allocate tdep at start and use its fields
12956         instead of separate variables.
12957
12958 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12959
12960         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12961         when looking for cached gdbarch and add comment for remaining.
12962
12963 2018-01-22  Pedro Alves  <palves@redhat.com>
12964             Sergio Durigan Junior  <sergiodj@redhat.com>
12965
12966         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12967         case.
12968
12969 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
12970
12971         * MAINTAINERS: Update my company e-mail address.
12972
12973 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12974
12975         * regcache.c (cooked_write_test): New function.
12976         (_initialize_regcache): Register the test.
12977
12978 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12979
12980         * ia64-tdep.c (ia64_pseudo_register_read): Call
12981         regcache->cooked_read instead of regcache_cooked_read_unsigned.
12982         * m32c-tdep.c (m32c_cat_read): Likewise.
12983         (m32c_r3r2r1r0_read): Likewise.
12984         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12985         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12986
12987 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12988
12989         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12990         method raw_read instead of regcache_raw_read.
12991         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12992         * arm-tdep.c (arm_neon_quad_read): Likewise.
12993         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12994         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12995         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12996         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12997         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12998         (i386_pseudo_register_read_into_value): Likewise.
12999         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13000         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13001         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13002         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13003         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13004         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
13005         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13006         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
13007         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13008
13009 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13010
13011         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13012         * configure.tgt: Remove target mt.
13013         * mt-tdep.c: Remove.
13014         * regcache.c (cooked_read_test): Remove the check for mt.
13015
13016 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13017
13018         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13019         instead of gdbarch_pseudo_register_read_value.
13020
13021 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13022
13023         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13024         language is Ada.
13025
13026 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13027
13028         * linespec.c (create_sals_line_offset): Remove code that preserved
13029         the symtab_and_line's line number.
13030
13031 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13032
13033         * varobj.c (varobj_create): Don't set valid_block when creating a
13034         floating varobj.
13035
13036 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13037
13038         * varobj.c (varobj_create): Remove out of date comment.
13039
13040 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13041
13042         PR mi/20395
13043         * ada-exp.y (write_var_from_sym): Pass extra parameter when
13044         updating innermost block.
13045         * parse.c (innermost_block_tracker::update): Take extra type
13046         parameter, and check types match before updating innermost block.
13047         (write_dollar_variable): Update innermost block for registers.
13048         * parser-defs.h (enum innermost_block_tracker_type): New enum.
13049         (innermost_block_tracker::innermost_block_tracker): Initialise
13050         m_types member.
13051         (innermost_block_tracker::reset): Take type parameter.
13052         (innermost_block_tracker::update): Take type parameter, and pass
13053         type through as needed.
13054         (innermost_block_tracker::m_types): New member.
13055         * varobj.c (varobj_create): Pass type when reseting innermost
13056         block.
13057
13058 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13059
13060         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13061         * ada-lang.c (resolve_subexp): Likewise.
13062         * breakpoint.c (set_breakpoint_condition) Likewise.
13063         (watch_command_1) Likewise.
13064         * c-exp.y (variable): Likewise.
13065         * d-exp.y (PrimaryExpression): Likewise.
13066         * f-exp.y (variable): Likewise.
13067         * go-exp.y (variable): Likewise.
13068         * m2-exp.y (variable): Likewise.
13069         * objfiles.c (objfile::~objfile): Likewise.
13070         * p-exp.y (variable): Likewise.
13071         * parse.c (innermost_block): Change type.
13072         * parser-defs.h (class innermost_block_tracker): New.
13073         (innermost_block): Change to innermost_block_tracker.
13074         * printcmd.c (display_command): Switch to innermost_block API.
13075         (do_one_display): Likewise.
13076         * rust-exp.y (do_one_display): Likewise.
13077         * symfile.c (clear_symtab_users): Likewise.
13078         * varobj.c (varobj_create): Switch to innermost_block API, replace
13079         use of innermost_block with block stored on varobj object.
13080
13081 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13082
13083         * expression.h (innermost_block): Remove declaration.
13084         * varobj.c: Add 'parser-defs.h' include.
13085
13086 2018-01-19  Tom Tromey  <tom@tromey.com>
13087
13088         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13089         symbols in the static and global blocks.
13090
13091 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
13092
13093         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13094         gdb_ptrace.h, and move including gdb_wait.h ...
13095         * nat/linux-ptrace.h: ... to here.
13096
13097 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13098
13099         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13100         inf_ptrace_detach_success.
13101         (inf_ptrace_detach_success): Add inferior parameter, use it
13102         instead of inferior_ptid, pass it to detach_inferior.
13103         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13104         parameter.
13105         * inferior.c (detach_inferior): Add overload that takes an
13106         inferior object.
13107         * inferior.h (detach_inferior): Likewise.
13108         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13109         use inferior_ptid, adjust call to inf_ptrace_detach_success.
13110         * linux-thread-db.c (thread_db_detach): Use inf parameter.
13111
13112 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13113
13114         * target.h (struct target_ops) <to_detach>: Add inferior
13115         parameter.
13116         (target_detach): Likewise.
13117         * target.c (dispose_inferior): Pass inferior down.
13118         (target_detach): Pass inferior down.  Assert that it is equal to
13119         the current inferior.
13120         * aix-thread.c (aix_thread_detach): Pass inferior down.
13121         * corefile.c (core_file_command): Pass current_inferior() down.
13122         * corelow.c (core_detach): Add inferior parameter.
13123         * darwin-nat.c (darwin_detach): Likewise.
13124         * gnu-nat.c (gnu_detach): Likewise.
13125         * inf-ptrace.c (inf_ptrace_detach): Likewise.
13126         * infcmd.c (detach_command): Pass current_inferior() down to
13127         target_detach.
13128         * infrun.c (follow_fork_inferior): Pass parent_inf to
13129         target_detach.
13130         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13131         target_detach.
13132         * linux-nat.c (linux_nat_detach): Add inferior parameter.
13133         * linux-thread-db.c (thread_db_detach): Likewise.
13134         * nto-procfs.c (procfs_detach): Likewise.
13135         * procfs.c (procfs_detach): Likewise.
13136         * record.c (record_detach): Likewise.
13137         * record.h (struct inferior): Forward-declare.
13138         (record_detach): Add inferior parameter.
13139         * remote-sim.c (gdbsim_detach): Likewise.
13140         * remote.c (remote_detach_1): Likewise.
13141         (remote_detach): Likewise.
13142         (extended_remote_detach): Likewise.
13143         * sol-thread.c (sol_thread_detach): Likewise.
13144         * target-debug.h (target_debug_print_inferior_p): New macro.
13145         * target-delegates.c: Re-generate.
13146         * top.c (kill_or_detach): Pass inferior down to target_detach.
13147         * windows-nat.c (windows_detach): Add inferior parameter.
13148
13149 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13150
13151         * target.h (struct target_ops) <to_detach>: Remove args
13152         parameter.
13153         (target_detach): Likewise.
13154         * target.c (dispose_inferior): Adjust.
13155         (target_detach): Remove args parameter, adjust.
13156         * aix-thread.c (aix_thread_detach): Adjust.
13157         * corefile.c (core_file_command): Adjust.
13158         * corelow.c (core_detach): Adjust.
13159         * darwin-nat.c (darwin_detach): Adjust.
13160         * gnu-nat.c (gnu_detach): Adjust.
13161         * inf-ptrace.c (inf_ptrace_detach): Adjust.
13162         * infcmd.c (detach_command): Adjust
13163         * infrun.c (follow_fork_inferior): Adjust.
13164         (handle_vfork_child_exec_or_exit): Adjust.
13165         * linux-fork.c (linux_fork_detach): Remove args parameter.
13166         * linux-fork.h (linux_fork_detach): Likewise.
13167         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13168         * linux-thread-db.c (thread_db_detach): Likewise.
13169         * nto-procfs.c (procfs_detach): Likewise.
13170         * procfs.c (procfs_detach): Likewise.
13171         (do_detach): Remove signo parameter.
13172         * record.c (record_detach): Remove args parameter.
13173         * record.h (record_detach): Likewise.
13174         * remote-sim.c (gdbsim_detach): Likewise.
13175         * remote.c (remote_detach_1): Likewise.
13176         (remote_detach): Likewise.
13177         (extended_remote_detach): Likewise.
13178         * sol-thread.c (sol_thread_detach): Likewise.
13179         * target-delegates.c: Re-generate.
13180         * top.c (struct qt_args) <args>: Remove field.
13181         (kill_or_detach): Don't pass args.
13182         (quit_force): Don't set args.
13183         * windows-nat.c (windows_detach): Remove args parameter.
13184
13185 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13186
13187         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13188         (arm_linux_init_abi): Install it.
13189
13190 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13191
13192         * osabi.c (gdb_osabi_names): Extend the regexp for
13193         arm-linux-gnueabihf.
13194
13195 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13196
13197         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13198         m_abbrevs.
13199         (abbrev_table::add_abbrev): Update.
13200         (abbrev_table::lookup_abbrev): Update.
13201
13202 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13203
13204         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13205
13206 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
13207
13208         * compile/compile.c (compile_to_object): Convert "triplet_rx"
13209         to "std::string".
13210
13211 2018-01-17  Tom Tromey  <tom@tromey.com>
13212
13213         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
13214
13215 2018-01-17  Tom Tromey  <tom@tromey.com>
13216
13217         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13218         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13219         (create_array_type_with_stride): Update.
13220         * dwarf2read.c (set_die_type): Update.
13221
13222 2018-01-17  Tom Tromey  <tom@tromey.com>
13223
13224         * dwarf2read.c (delayed_method_info): Remove typedef.
13225         (dwarf2_cu::method_info): Now a std::vector.
13226         (add_to_method_list): Update.
13227         (free_delayed_list): Remove.
13228         (compute_delayed_physnames): Update.
13229         (process_full_comp_unit, process_full_type_unit): Clear the method
13230         list.  Remove cleanups.
13231         (psymtab_include_file_name): Add name_holder parameter.  Use
13232         unique_xmalloc_ptr.
13233         (dwarf_decode_lines): Update.
13234
13235 2018-01-17  Tom Tromey  <tom@tromey.com>
13236             Simon Marchi  <simon.marchi@ericsson.com>
13237
13238         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13239         (dwarf2_per_objfile::free_cached_comp_units)
13240         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13241         (init_cutu_and_read_dies_no_follow): Update.
13242         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13243         (dwarf2_cu::~dwarf2_cu): New.
13244         (free_heap_comp_unit, free_stack_comp_unit): Remove.
13245         (age_cached_comp_units, free_one_cached_comp_unit): Update.
13246
13247 2018-01-17  Tom Tromey  <tom@tromey.com>
13248             Simon Marchi  <simon.marchi@ericsson.com>
13249
13250         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13251         (struct die_reader_specs) <abbrev_table>: New member.
13252         (struct abbrev_table): Add constructor.
13253         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13254         <abbrev_obstack>: Now an auto_obstack.
13255         (abbrev_table_up): New typedef.
13256         (init_cu_die_reader): Add abbrev_table parameter.
13257         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13258         Add result_dwo_abbrev_table.
13259         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13260         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13261         Update.
13262         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13263         parameter.
13264         (skip_children): Update.
13265         (abbrev_table::alloc_abbrev): Rename from
13266         abbrev_table_alloc_abbrev.
13267         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13268         (abbrev_table::lookup_abbrev): Rename from
13269         abbrev_table_lookup_abbrev.
13270         (abbrev_table_read_table): Return abbrev_table_up.
13271         (abbrev_table_free, abbrev_table_free_cleanup)
13272         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13273         (load_partial_dies): Update.
13274
13275 2018-01-17  Tom Tromey  <tom@tromey.com>
13276
13277         * dwarf2read.c (dwarf2_compute_name): Update comment.
13278         (read_func_scope, read_variable): Update.
13279         (new_symbol): Remove.
13280         (new_symbol_full): Rename to new_symbol.
13281
13282 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
13283
13284         PR gdb/16577
13285         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13286         a warning instead of throwing an error, set section size to 0 and return
13287         NULL.
13288         * gdb_bfd.h (gdb_bfd_map_section): Update description.
13289
13290 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13291
13292         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13293         std::string.
13294         (linux_ptrace_attach_fail_reason_string): Likewise.
13295         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13296         Likewise.
13297         (linux_ptrace_attach_fail_reason_string): Likewise.
13298         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13299
13300 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13301
13302         * linux-nat.c (linux_nat_attach): Remove xstrdup.
13303
13304 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
13305
13306         PR gdb/21559
13307         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13308         checking for fs_base/gs_base fields in struct user_regs_struct.
13309         * configure: Regenerate.
13310
13311 2018-01-17  Yao Qi  <yao.qi@linaro.org>
13312
13313         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13314         function.
13315         (aarch64_linux_init_abi): Install it to gdbarch hook
13316         gcc_target_options.
13317
13318 2018-01-15  Pedro Alves  <palves@redhat.com>
13319
13320         * common/signals-state-save-restore.c
13321         (save_original_signals_state): Fix typos.
13322
13323 2017-01-12  Tom Tromey  <tom@tromey.com>
13324             Sergio Durigan Junior  <sergiodj@redhat.com>
13325
13326         * Makefile.in (install-only): Install gdb-add-index.
13327
13328 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
13329
13330         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13331
13332 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13333
13334         * infrun.c (keep_going_pass_signal): Clear step-over info when
13335         insert_breakpoints fails.
13336
13337 2018-01-11  Pedro Alves  <palves@redhat.com>
13338
13339         PR gdb/22583
13340         * infrun.c (resume): Rename to ...
13341         (resume_1): ... this.
13342         (resume): Reimplement as wrapper around resume_1.
13343
13344 2018-01-11  Pedro Alves  <palves@redhat.com>
13345
13346         PR remote/22597
13347         * remote.c (remote_parse_stop_reply): Default to the last-set
13348         general thread instead of to 'magic_null_ptid'.
13349
13350 2018-01-10  Pedro Alves  <palves@redhat.com>
13351
13352         * language.h (language_get_symbol_name_matcher): Rename ...
13353         (get_symbol_name_matcher): ... this.
13354         * language.c (language_get_symbol_name_matcher): Ditto.
13355         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13356         callers adjusted.
13357
13358 2018-01-10  Pedro Alves  <palves@redhat.com>
13359
13360         PR gdb/22670
13361         * dwarf2read.c
13362         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13363         Adjust to use language_get_symbol_name_matcher instead of
13364         language_defn::la_get_symbol_name_matcher.
13365         * language.c (language_get_symbol_name_matcher): If in Ada mode
13366         and the lookup name is a verbatim match, return Ada's matcher.
13367         * language.h (language_get_symbol_name_matcher): Adjust comment.
13368         (ada_lookup_name_info::verbatim_p):: New method.
13369
13370 2018-01-10  Pedro Alves  <palves@redhat.com>
13371
13372         PR gdb/22670
13373         * ada-lang.c (ada_collect_symbol_completion_matches): If the
13374         minsym's language is language_auto or language_cplus, pass down
13375         language_ada instead.
13376         * symtab.c (compare_symbol_name): Don't frob symbol language here.
13377
13378 2018-01-10  Pedro Alves  <palves@redhat.com>
13379
13380         PR gdb/22670
13381         * minsyms.c (linkage_name_str): New function.
13382         (iterate_over_minimal_symbols): Use it.
13383
13384 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13385
13386         * NEWS: Document that 'info proc' now works on FreeBSD.
13387
13388 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13389
13390         * configure.ac: Check for kinfo_getfile in libutil.
13391         * configure: Regenerate.
13392         * config.in: Regenerate.
13393         * fbsd-nat.c: Include "fbsd-tdep.h".
13394         (fbsd_fetch_cmdline): New.
13395         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13396         rather than calling error.
13397         (fbsd_info_proc): New.
13398         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13399         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13400         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13401
13402 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13403
13404         * fbsd-nat.c (struct free_deleter): Remove.
13405         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13406
13407 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13408
13409         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13410         NULL for an empty pathname.
13411
13412 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13413
13414         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13415         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13416         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13417         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13418         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13419         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13420         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13421         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13422         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13423         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13424         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13425         (fbsd_core_fetch_timeval, fbsd_print_sigset)
13426         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13427         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
13428         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13429
13430 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
13431
13432         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13433         (gnu_xfer_auxv): New function.
13434         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13435         TARGET_OBJECT_AUXV.
13436
13437 2018-01-08  Yao Qi  <yao.qi@linaro.org>
13438             Simon Marchi  <simon.marchi@ericsson.com>
13439
13440         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13441         common/selftest.c.
13442         (COMMON_OBS): Remove selftest.o.
13443         * configure.ac: Append selftest-arch.c and common/selftest.c to
13444         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
13445         * configure: Re-generated.
13446         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13447         GDB_SELF_TEST.
13448         (maintenance_info_selftests): Likewise.
13449
13450 2018-01-08  Xavier Roirand  <roirand@adacore.com>
13451
13452         * ada-valprint.c (val_print_packed_array_elements): Use
13453         proper number of elements when printing an array indexed
13454         by an enumeration type.
13455
13456 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13457
13458         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13459         (dw2_get_file_names_reader): Adjust.
13460         (lookup_dwo_signatured_type): Adjust.
13461         (lookup_dwp_signatured_type): Adjust.
13462         (lookup_signatured_type): Adjust.
13463         (create_type_unit_group): Adjust.
13464         (get_type_unit_group): Adjust.
13465         (process_psymtab_comp_unit_reader): Adjust.
13466         (build_type_psymtabs_reader): Adjust.
13467         (scan_partial_symbols): Adjust.
13468         (add_partial_symbol): Adjust.
13469         (add_partial_subprogram): Adjust.
13470         (peek_die_abbrev): Adjust.
13471         (fixup_go_packaging): Adjust.
13472         (process_imported_unit_die): Adjust.
13473         (dwarf2_compute_name): Adjust.
13474         (dwarf2_physname): Adjust.
13475         (read_import_statement): Adjust.
13476         (handle_DW_AT_stmt_list): Adjust.
13477         (read_file_scope): Adjust.
13478         (read_func_scope): Adjust.
13479         (read_lexical_block_scope): Adjust.
13480         (read_call_site_scope): Adjust.
13481         (read_variable): Adjust.
13482         (dwarf2_rnglists_process): Adjust.
13483         (dwarf2_ranges_process): Adjust.
13484         (dwarf2_ranges_read): Adjust.
13485         (dwarf2_get_pc_bounds): Adjust.
13486         (dwarf2_record_block_ranges): Adjust.
13487         (dwarf2_add_field): Adjust.
13488         (dwarf2_add_member_fn): Adjust.
13489         (read_structure_type): Adjust.
13490         (process_structure_scope): Adjust.
13491         (read_enumeration_type): Adjust.
13492         (read_array_type): Adjust.
13493         (mark_common_block_symbol_computed): Adjust.
13494         (read_common_block): Adjust.
13495         (read_namespace_type): Adjust.
13496         (read_namespace): Adjust.
13497         (read_module_type): Adjust.
13498         (read_tag_pointer_type): Adjust.
13499         (read_tag_ptr_to_member_type): Adjust.
13500         (read_tag_string_type): Adjust.
13501         (read_subroutine_type): Adjust.
13502         (read_typedef): Adjust.
13503         (read_base_type): Adjust.
13504         (attr_to_dynamic_prop): Adjust.
13505         (read_subrange_type): Adjust.
13506         (read_unspecified_type): Adjust.
13507         (dwarf2_read_abbrevs): Adjust.
13508         (load_partial_dies): Adjust.
13509         (read_partial_die): Adjust.
13510         (find_partial_die): Adjust.
13511         (guess_partial_die_structure_name): Adjust.
13512         (fixup_partial_die): Adjust.
13513         (read_attribute_value): Adjust.
13514         (read_addr_index): Adjust.
13515         (read_addr_index_from_leb128): Adjust.
13516         (read_str_index): Adjust.
13517         (dwarf2_string_attr): Adjust.
13518         (get_debug_line_section): Adjust.
13519         (dwarf_decode_line_header): Adjust.
13520         (lnp_state_machine::check_line_address): Adjust.
13521         (dwarf_decode_lines_1): Adjust.
13522         (dwarf_decode_lines): Adjust.
13523         (dwarf2_start_symtab): Adjust.
13524         (var_decode_location): Adjust.
13525         (new_symbol_full): Adjust.
13526         (dwarf2_const_value_data): Adjust.
13527         (dwarf2_const_value_attr): Adjust.
13528         (dwarf2_const_value): Adjust.
13529         (die_type): Adjust.
13530         (die_containing_type): Adjust.
13531         (build_error_marker_type): Adjust.
13532         (lookup_die_type): Adjust.
13533         (guess_full_die_structure_name): Adjust.
13534         (anonymous_struct_prefix): Adjust.
13535         (determine_prefix): Adjust.
13536         (dwarf2_name): Adjust.
13537         (follow_die_ref_or_sig): Adjust.
13538         (follow_die_offset): Adjust.
13539         (follow_die_ref): Adjust.
13540         (follow_die_sig_1): Adjust.
13541         (follow_die_sig): Adjust.
13542         (get_signatured_type): Adjust.
13543         (get_DW_AT_signature_type): Adjust.
13544         (decode_locdesc): Adjust.
13545         (dwarf_decode_macros): Adjust.
13546         (cu_debug_loc_section): Adjust.
13547         (fill_in_loclist_baton): Adjust.
13548         (dwarf2_symbol_mark_computed): Adjust.
13549         (init_one_comp_unit): Don't assign
13550         dwarf2_cu::dwarf2_per_objfile.
13551         (set_die_type): Adjust.
13552
13553 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13554
13555         * dwarf2read.c (struct mapped_debug_names): Add constructor.
13556         <dwarf2_per_objfile>: New field.
13557         (dwarf2_per_objfile): Remove global.
13558         (get_dwarf2_per_objfile): New function.
13559         (set_dwarf2_per_objfile): New function.
13560         (dwarf2_build_psymtabs_hard): Change objfile parameter to
13561         dwarf2_per_objfile.
13562         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13563         (read_abbrev_offset): Likewise.
13564         (read_indirect_string): Likewise.
13565         (read_indirect_line_string): Likewise.
13566         (read_indirect_string_at_offset): Likewise.
13567         (read_indirect_string_from_dwz): Likewise.
13568         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13569         dwarf2_per_objfile.
13570         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13571         (create_all_comp_units): Change objfile parameter to
13572         dwarf2_per_objfile.
13573         (create_all_type_units): Likewise.
13574         (process_queue): Add dwarf2_per_objfile parameter.
13575         (read_and_check_comp_unit_head): Likewise.
13576         (lookup_dwo_unit_in_dwp): Likewise.
13577         (get_dwp_file): Likewise.
13578         (process_cu_includes): Likewise.
13579         (struct free_dwo_file_cleanup_data): New struct.
13580         (dwarf2_has_info): Use get_dwarf2_per_objfile and
13581         set_dwarf2_per_objfile.
13582         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13583         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13584         context, adjust calls.
13585         (dw2_instantiate_symtab): Likewise.
13586         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13587         (dw2_get_cu): Likewise.
13588         (create_cu_from_index_list): Change objfile parameter to
13589         dwarf2_per_objfile.
13590         (create_cus_from_index_list): Get dwarf2_per_objfile from
13591         context, adjust calls.
13592         (create_cus_from_index): Likewise.
13593         (create_signatured_type_table_from_index): Change objfile
13594         parameter to dwarf2_per_objfile.
13595         (create_signatured_type_table_from_debug_names): Change objfile
13596         parameter to dwarf2_per_objfile.
13597         (create_addrmap_from_index): Likewise.
13598         (create_addrmap_from_aranges): Likewise.
13599         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13600         (dw2_setup): Remove.
13601         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13602         context.
13603         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13604         get_dwarf2_per_objfile.
13605         (dw2_forget_cached_source_info): Likewise.
13606         (dw2_map_symtabs_matching_filename): Likewise.
13607         (struct dw2_symtab_iterator) <index>: Remove.
13608         <dwarf2_per_objfile>: New field.
13609         (dw2_symtab_iter_init): Replace index parameter with
13610         dwarf2_per_objfile.
13611         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13612         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13613         (dw2_print_stats): Likewise.
13614         (dw2_dump): Likewise.
13615         (dw2_expand_symtabs_for_function): Likewise.
13616         (dw2_expand_all_symtabs): Likewise.
13617         (dw2_expand_symtabs_with_fullname): Likewise.
13618         (dw2_expand_marked_cus): Replace index and objfile parameters
13619         with dwarf2_per_objfile.
13620         (dw_expand_symtabs_matching_file_matcher): Add
13621         dwarf2_per_objfile parameter and adjust calls.
13622         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13623         adjust calls.
13624         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13625         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13626         adjust calls.
13627         (create_cus_from_debug_names_list): Replace objfile parameter
13628         with dwarf2_per_objfile and adjust calls.
13629         (create_cus_from_debug_names): Likewise.
13630         (dwarf2_read_debug_names): Likewise.
13631         (mapped_debug_names::namei_to_name): Adjust call.
13632         (dw2_debug_names_iterator::next): Likewise.
13633         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13634         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13635         (dw2_debug_names_dump): Likewise.
13636         (dw2_debug_names_expand_symtabs_for_function): Likewise.
13637         (dw2_debug_names_expand_symtabs_matching): Likewise.
13638         (dwarf2_initialize_objfile): Likewise.
13639         (dwarf2_build_psymtabs): Likewise.
13640         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13641         this_cu.
13642         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13643         (read_and_check_comp_unit_head): Likewise.
13644         (read_abbrev_offset): Likewise.
13645         (create_debug_type_hash_table): Likewise.
13646         (create_debug_types_hash_table): Likewise.
13647         (create_all_type_units): Replace objfile parameter with
13648         dwarf2_per_objfile.
13649         (add_type_unit): Add dwarf2_per_objfile parameter.
13650         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13651         with dwarf2_per_objfile.
13652         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13653         (lookup_dwp_signatured_type): Likewise.
13654         (lookup_signatured_type): Likewise.
13655         (read_cutu_die_from_dwo): Likewise.
13656         (init_tu_and_read_dwo_dies): Likewise.
13657         (init_cutu_and_read_dies): Likewise.
13658         (init_cutu_and_read_dies_no_follow): Likewise.
13659         (allocate_type_unit_groups_table): Add objfile parameter.
13660         (create_type_unit_group): Use dwarf2_per_objfile from cu.
13661         (get_type_unit_group): Likewise.
13662         (process_psymtab_comp_unit): Update call.
13663         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13664         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13665         (print_tu_stats): Likewise.
13666         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13667         in void* parameter.
13668         (build_type_psymtabs): Change objfile parameter to
13669         dwarf2_per_objfile.
13670         (process_skeletonless_type_unit): Use dwarf2_per_objfile
13671         passed in void* parameter.
13672         (process_skeletonless_type_units): Change objfile parameter to
13673         dwarf2_per_objfile.
13674         (set_partial_user): Likewise.
13675         (dwarf2_build_psymtabs_hard): Likewise.
13676         (read_comp_units_from_section): Likewise.
13677         (create_all_comp_units): Likewise.
13678         (scan_partial_symbols): Update calls.
13679         (add_partial_symbol): Likewise.
13680         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13681         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13682         (process_queue): Add dwarf2_per_objfile parameter.
13683         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13684         (compute_compunit_symtab_includes): Likewise.
13685         (process_cu_includes): Add dwarf2_per_objfile parameter.
13686         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13687         (process_full_type_unit): Likewise.
13688         (process_imported_unit_die): Update call.
13689         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13690         (read_file_scope): Likewise.
13691         (allocate_dwo_file_hash_table): Add objfile parameter.
13692         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13693         (create_cus_hash_table): Likewise.
13694         (create_dwp_hash_table): Likewise.
13695         (create_dwo_unit_in_dwp_v1): Likewise.
13696         (create_dwp_v2_section): Likewise.
13697         (create_dwo_unit_in_dwp_v2): Likewise.
13698         (lookup_dwo_unit_in_dwp): Likewise.
13699         (try_open_dwop_file): Likewise.
13700         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13701         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13702         cleanup to include a reference to dwarf2_per_objfile.
13703         (open_dwp_file): Add dwarf2_per_objfile parameter.
13704         (open_and_init_dwp_file): Likewise.
13705         (get_dwp_file): Likewise.
13706         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13707         (queue_and_load_all_dwo_tus): Update call.
13708         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13709         data.
13710         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13711         (dwarf2_ranges_process): Likewise.
13712         (dwarf2_get_pc_bounds): Likewise.
13713         (mark_common_block_symbol_computed): Likewise.
13714         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13715         (dwarf2_read_abbrevs): Update call.
13716         (read_partial_die): Use dwarf2_per_objfile from cu.
13717         (find_partial_die): Likewise.
13718         (fixup_partial_die): Likewise.
13719         (read_attribute_value): Likewise.
13720         (read_indirect_string_at_offset_from): Add objfile parameter.
13721         (read_indirect_string_at_offset): Add dwarf2_per_objfile
13722         parameter.
13723         (read_indirect_string_from_dwz): Add objfile parameter.
13724         (read_indirect_string): Add objfile parameter.
13725         (read_addr_index_1): Add dwarf2_per_objfile parameter.
13726         (read_addr_index): Use dwarf2_per_objfile from cu.
13727         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13728         call dw2_setup.
13729         (read_str_index): Use dwarf2_per_objfile from cu.
13730         (get_debug_line_section): Likewise.
13731         (read_formatted_entries): Add dwarf2_per_objfile parameter.
13732         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13733         (new_symbol_full): Use dwarf2_per_objfile from cu.
13734         (build_error_marker_type): Likewise.
13735         (lookup_die_type): Likewise.
13736         (determine_prefix): Likewise.
13737         (follow_die_offset): Likewise.
13738         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13739         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13740         (dwarf2_fetch_die_type_sect_off): Likewise.
13741         (dwarf2_get_die_type): Likewise.
13742         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13743         (get_signatured_type): Likewise.
13744         (get_DW_AT_signature_type): Likewise.
13745         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13746         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13747         (cu_debug_loc_section): Likewise.
13748         (fill_in_loclist_baton): Likewise.
13749         (dwarf2_symbol_mark_computed): Likewise.
13750         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13751         dwarf2_per_objfile.
13752         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13753         parameter.
13754         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13755         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13756         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13757         (set_die_type): Use dwarf2_free_objfile from cu.
13758         (get_die_type_at_offset): Likewise.
13759         (dwarf2_per_objfile_free): Don't assign global variable.
13760         (debug_names) <constructor>: Add dwarf2_per_objfile
13761         parameter, update m_debugstrlookup construction.
13762         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13763         parameter.
13764         <m_dwarf2_per_objfile>: New field.
13765         <lookup>: Use m_dwarf2_per_objfile.
13766         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13767         (psyms_seen_size): Likewise.
13768         (write_gdbindex): Replace objfile parameter with
13769         dwarf2_per_objfile.
13770         (write_debug_names): Likewise.
13771         (write_psymtabs_to_index): Likewise.
13772         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13773         calls.
13774
13775 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13776
13777         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13778         <dwarf2_per_objfile>: New field.
13779         (struct dwarf2_per_cu_data) <objfile>: Remove.
13780         <dwarf2_per_objfile>: New field.
13781         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13782         of objfile.
13783         (create_signatured_type_table_from_index): Likewise.
13784         (create_debug_type_hash_table): Likewise.
13785         (fill_in_sig_entry_from_dwo_entry): Likewise.
13786         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13787         (create_type_unit_group): Assign dwarf2_per_objfile instead of
13788         objfile.
13789         (create_partial_symtab): Access objfile through
13790         dwarf2_per_objfile.
13791         (process_psymtab_comp_unit_reader): Likewise.
13792         (read_comp_units_from_section): Likewise.
13793         (scan_partial_symbols): Likewise.
13794         (add_partial_symbol): Likewise.
13795         (add_partial_subprogram): Likewise.
13796         (peek_die_abbrev): Likewise.
13797         (fixup_go_packaging): Likewise.
13798         (process_full_comp_unit): Likewise.
13799         (process_full_type_unit): Likewise.
13800         (process_imported_unit_die): Likewise.
13801         (dwarf2_compute_name): Likewise.
13802         (dwarf2_physname): Likewise.
13803         (read_import_statement): Likewise.
13804         (create_cus_hash_table): Assign dwarf2_physname instead of
13805         objfile.
13806         (read_func_scope): Access objfile through dwarf2_per_objfile.
13807         (read_lexical_block_scope): Likewise.
13808         (read_call_site_scope): Likewise.
13809         (read_variable): Likewise.
13810         (dwarf2_rnglists_process): Likewise.
13811         (dwarf2_ranges_process): Likewise.
13812         (dwarf2_ranges_read): Likewise.
13813         (dwarf2_record_block_ranges): Likewise.
13814         (dwarf2_add_field): Likewise.
13815         (dwarf2_add_member_fn): Likewise.
13816         (read_structure_type): Likewise.
13817         (process_structure_scope): Likewise.
13818         (read_enumeration_type): Likewise.
13819         (read_array_type): Likewise.
13820         (read_common_block): Likewise.
13821         (read_namespace_type): Likewise.
13822         (read_namespace): Likewise.
13823         (read_module_type): Likewise.
13824         (read_tag_pointer_type): Likewise.
13825         (read_tag_ptr_to_member_type): Likewise.
13826         (read_tag_string_type): Likewise.
13827         (read_subroutine_type): Likewise.
13828         (read_typedef): Likewise.
13829         (read_base_type): Likewise.
13830         (attr_to_dynamic_prop): Likewise.
13831         (read_subrange_type): Likewise.
13832         (read_unspecified_type): Likewise.
13833         (load_partial_dies): Likewise.
13834         (read_partial_die): Likewise.
13835         (find_partial_die): Likewise.
13836         (guess_partial_die_structure_name): Likewise.
13837         (fixup_partial_die): Likewise.
13838         (read_attribute_value): Likewise.
13839         (read_addr_index_from_leb128): Likewise.
13840         (dwarf2_read_addr_index): Likewise.
13841         (dwarf2_string_attr): Likewise.
13842         (lnp_state_machine::check_line_address): Likewise.
13843         (dwarf_decode_lines_1): Likewise.
13844         (dwarf_decode_lines): Likewise.
13845         (dwarf2_start_symtab): Likewise.
13846         (var_decode_location): Likewise.
13847         (new_symbol_full): Likewise.
13848         (dwarf2_const_value_data): Likewise.
13849         (dwarf2_const_value_attr): Likewise.
13850         (dwarf2_const_value): Likewise.
13851         (die_type): Likewise.
13852         (die_containing_type): Likewise.
13853         (lookup_die_type): Likewise.
13854         (guess_full_die_structure_name): Likewise.
13855         (anonymous_struct_prefix): Likewise.
13856         (dwarf2_name): Likewise.
13857         (follow_die_ref_or_sig): Likewise.
13858         (follow_die_offset): Likewise.
13859         (follow_die_ref): Likewise.
13860         (dwarf2_fetch_die_loc_sect_off): Likewise.
13861         (dwarf2_fetch_constant_bytes): Likewise.
13862         (dwarf2_fetch_die_type_sect_off): Likewise.
13863         (dwarf2_get_die_type): Likewise.
13864         (follow_die_sig): Likewise.
13865         (decode_locdesc): Likewise.
13866         (dwarf2_per_cu_objfile): Likewise.
13867         (dwarf2_per_cu_text_offset): Likewise.
13868         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13869         objfile.
13870         (set_die_type): Access objfile through
13871         dwarf2_per_objfile.
13872
13873 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13874
13875         * valprint.c (converted_character_d): Remove typedef.
13876         (DEF_VEC_O (converted_character_d)): Remove.
13877         (count_next_character): Use std::vector.
13878         (print_converted_chars_to_obstack): Likewise.
13879         (generic_printstr): Likewise.
13880
13881 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13882
13883         * xml-support.h (struct gdb_xml_value): Add constructor.
13884         <value>: Change type to unique_xmalloc_ptr.
13885         (gdb_xml_value_s): Remove typedef.
13886         (DEF_VEC_O (gdb_xml_value_s)): Remove.
13887         (gdb_xml_element_start_handler): Change parameter type to
13888         std::vector.
13889         (xml_find_attribute): Likewise.
13890         * xml-support.c (xml_find_attribute): Change parameter type to
13891         std::vector and adjust.
13892         (gdb_xml_values_cleanup): Remove.
13893         (gdb_xml_parser::start_element): Adjust to std::vector.
13894         (xinclude_start_include): Change paraeter type to std::vector
13895         and adjust.
13896         * btrace.c (check_xml_btrace_version): Likewise.
13897         (parse_xml_btrace_block): Likewise.
13898         (parse_xml_btrace_pt_config_cpu): Likewise.
13899         (parse_xml_btrace_pt): Likewise.
13900         (parse_xml_btrace_conf_bts): Likewise.
13901         (parse_xml_btrace_conf_pt): Likewise.
13902         * memory-map.c (memory_map_start_memory): Likewise.
13903         (memory_map_start_property): Likewise.
13904         * osdata.c (osdata_start_osdata): Likewise.
13905         (osdata_start_item): Likewise.
13906         (osdata_start_column): Likewise.
13907         * remote.c (start_thread): Likewise.
13908         * solib-aix.c (library_list_start_library): Likewise.
13909         (library_list_start_list): Likewise.
13910         * solib-svr4.c (library_list_start_library): Likewise.
13911         (svr4_library_list_start_list): Likewise.
13912         * solib-target.c (library_list_start_segment): Likewise.
13913         (library_list_start_section): Likewise.
13914         (library_list_start_library): Likewise.
13915         (library_list_start_list): Likewise.
13916         * tracepoint.c (traceframe_info_start_memory): Likewise.
13917         (traceframe_info_start_tvar): Likewise.
13918         * xml-syscall.c (syscall_start_syscall): Likewise.
13919         * xml-tdesc.c (tdesc_start_target): Likewise.
13920         (tdesc_start_feature): Likewise.
13921         (tdesc_start_reg): Likewise.
13922         (tdesc_start_union): Likewise.
13923         (tdesc_start_struct): Likewise.
13924         (tdesc_start_flags): Likewise.
13925         (tdesc_start_enum): Likewise.
13926         (tdesc_start_field): Likewise.
13927         (tdesc_start_enum_value): Likewise.
13928         (tdesc_start_vector): Likewise.
13929
13930 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13931
13932         * extension.h (struct xmethod_worker) <clone>: Remove.
13933         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13934         Remove.
13935         (python_xmethod_worker::clone): Remove.
13936         * valops.c (find_overload_match): Use std::move instead of
13937         clone.
13938
13939 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13940
13941         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13942         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13943         <free_xmethod_worker_data>: Remove.
13944         <get_matching_xmethod_workers>: Chance VEC to std::vector.
13945         <get_xmethod_arg_types>: Remove.
13946         <get_xmethod_result_type>: Remove.
13947         <invoke_xmethod>: Remove.
13948         * extension.c (new_xmethod_worker): Remove.
13949         (clone_xmethod_worker): Remove.
13950         (get_matching_xmethod_workers): Return void, pass std::vector by
13951         pointer.
13952         (get_xmethod_arg_types): Rename to...
13953         (xmethod_worker::get_arg_types): ... this, and adjust.
13954         (get_xmethod_result_type): Rename to...
13955         (xmethod_worker::get_result_type): ... this, and adjust.
13956         (invoke_xmethod): Remove.
13957         (free_xmethod_worker): Remove.
13958         (free_xmethod_worker_vec): Remove.
13959         * extension.h (enum ext_lang_rc): Move here from
13960         extension-priv.h.
13961         (struct xmethod_worker): Add constructor and destructor.
13962         <data>: Remove.
13963         <value>: Remove.
13964         <invoke, clone, do_get_result_type, do_get_arg_types>: New
13965         virtual pure methods.
13966         <get_arg_types, get_result_type>: New methods.
13967         (xmethod_worker_ptr): Remove typedef.
13968         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13969         (xmethod_worker_vec): Remove typedef.
13970         (xmethod_worker_up): New typedef.
13971         (invoke_xmethod): Remove.
13972         (clone_xmethod_worker): Remove.
13973         (free_xmethod_worker): Remove.
13974         (free_xmethod_worker_vec): Remove.
13975         (get_xmethod_arg_types): Remove.
13976         (get_xmethod_result_type): Remove.
13977         * valops.c (find_method_list): Use std::vector, don't use
13978         intermediate vector.
13979         (value_find_oload_method_list): Use std::vector.
13980         (find_overload_match): Use std::vector.
13981         (find_oload_champ): Use std::vector.
13982         * value.c (value_free): Use operator delete.
13983         (value_of_xmethod): Rename to...
13984         (value_from_xmethod): ... this.  Don't assign
13985         xmethod_worker::value, take rvalue-reference.
13986         (result_type_of_xmethod): Adjust.
13987         (call_xmethod): Adjust.
13988         * value.h: Include extension.h.
13989         (struct xmethod_worker): Don't forward-declare.
13990         (value_of_xmethod): Rename to...
13991         (value_from_xmethod): ... this, take rvalue-reference.
13992         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13993         (struct python_xmethod_worker): ... this, add constructor and
13994         destructor.
13995         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13996         (gdbpy_free_xmethod_worker_data): Rename to...
13997         (python_xmethod_worker::~python_xmethod_worker): ... this and
13998         adjust.
13999         (gdbpy_clone_xmethod_worker_data): Rename to...
14000         (python_xmethod_worker::clone): ... this and adjust.
14001         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14002         temporary vector.
14003         (gdbpy_get_xmethod_arg_types): Rename to...
14004         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14005         (gdbpy_get_xmethod_result_type): Rename to...
14006         (python_xmethod_worker::do_get_result_type): ... this and
14007         adjust.
14008         (gdbpy_invoke_xmethod): Rename to...
14009         (python_xmethod_worker::invoke): ... this and adjust.
14010         (new_python_xmethod_worker): Rename to...
14011         (python_xmethod_worker::python_xmethod_worker): ... this and
14012         adjust.
14013         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14014         Remove.
14015         (gdbpy_free_xmethod_worker_data): Remove.
14016         (gdbpy_get_matching_xmethod_workers): Use std::vector.
14017         (gdbpy_get_xmethod_arg_types): Remove.
14018         (gdbpy_get_xmethod_result_type): Remove.
14019         (gdbpy_invoke_xmethod): Remove.
14020         * python/python.c (python_extension_ops): Remove obsolete
14021         callbacks.
14022
14023 2018-01-05  Pedro Alves  <palves@redhat.com>
14024
14025         PR gdb/18653
14026         * common/signals-state-save-restore.c
14027         (save_original_signals_state): New parameter 'quiet'.  Warn if we
14028         find a custom handler preinstalled, instead of internal erroring.
14029         But only warn if !quiet.
14030         * common/signals-state-save-restore.h
14031         (save_original_signals_state): New parameter 'quiet'.
14032         * main.c (captured_main_1): Move save_original_signals_state call
14033         after option handling, and pass QUIET.
14034
14035 2018-01-05  Pedro Alves  <palves@redhat.com>
14036
14037         * spu-tdep.c (spu_catch_start): Pass
14038         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14039
14040 2018-01-05  Pedro Alves  <palves@redhat.com>
14041
14042         PR gdb/22670
14043         * ada-lang.c (literal_symbol_name_matcher): New function.
14044         (ada_get_symbol_name_matcher): Use it for
14045         symbol_name_match_type::SEARCH_NAME.
14046         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
14047         it down instead of assuming symbol_name_match_type::FULL.
14048         * block.h (block_lookup_symbol): New parameter 'match_type'.
14049         * c-valprint.c (print_unpacked_pointer): Use
14050         lookup_symbol_search_name instead of lookup_symbol.
14051         * compile/compile-object-load.c (get_out_value_type): Pass down
14052         symbol_name_match_type::SEARCH_NAME.
14053         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14054         symbol_name_match_type::FULL.
14055         * cp-support.c (cp_get_symbol_name_matcher): Handle
14056         symbol_name_match_type::SEARCH_NAME.
14057         * infrun.c (insert_exception_resume_breakpoint): Use
14058         lookup_symbol_search_name.
14059         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14060         * psymtab.c (maintenance_check_psymtabs): Use
14061         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14062         * stack.c (print_frame_args): Use lookup_symbol_search_name and
14063         SYMBOL_SEARCH_NAME.
14064         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14065         if symbol_name_match_type::SEARCH_NAME.
14066         (lookup_symbol_in_language): Pass down
14067         symbol_name_match_type::FULL.
14068         (lookup_symbol_search_name): New.
14069         (lookup_language_this): Pass down
14070         symbol_name_match_type::SEARCH_NAME.
14071         (lookup_symbol_aux, lookup_local_symbol): New parameter
14072         'match_type'.  Pass it down.
14073         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14074         (lookup_symbol_search_name): New declaration.
14075         (lookup_symbol_in_block): New 'match_type' parameter.
14076
14077 2018-01-05  Pedro Alves  <palves@redhat.com>
14078
14079         PR gdb/22670
14080         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14081         ada_lookup_symbol.
14082         (ada_lookup_symbol): Reimplement in terms of
14083         ada_lookup_symbol_list, bits factored out from
14084         ada_lookup_encoded_symbol.
14085
14086 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14087
14088         * ada-exp.y (write_object_renaming): When subscripting an array
14089         using a symbol as the index, pass the block in call to
14090         ada_lookup_encoded_symbol when looking that symbol up.
14091
14092 2018-01-05  Jerome Guitton  <guitton@adacore.com>
14093
14094         * ada-lang.c (ada_array_length): Use ada_index_type instead of
14095         TYPE_INDEX_TYPE.
14096
14097 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14098
14099         * ada-lang.c (ada_to_fixed_value_create): Add handling of
14100         the case where VALUE_LVAL (val0) is not lval_memory.
14101
14102 2018-01-05  Xavier Roirand  <roirand@adacore.com>
14103
14104         * ada-valprint.c (print_optional_low_bound): Handle
14105         character-indexed array printing like boolean-indexed array
14106         printing.
14107
14108 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14109
14110         * NEWS: Create a new section for the next release branch.
14111         Rename the section of the current branch, now that it has
14112         been cut.
14113
14114 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14115
14116         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14117         * version.in: Bump version to 8.1.50.DATE-git.
14118
14119 2018-01-03  Xavier Roirand  <roirand@adacore.com>
14120
14121         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14122         Add field.
14123         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14124         Add field.
14125         (default_exception_support_info) <catch_handlers_sym>: Add field.
14126         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14127         (ada_exception_name_addr_1): Add "catch handlers" handling.
14128         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14129         Update all callers.
14130         (create_excep_cond_exprs) <ex>: Add parameter.
14131         (re_set_exception): Update create_excep_cond_exprs call.
14132         (print_it_exception, print_one_exception, print_mention_exception)
14133         (print_recreate_exception): Add "catch handler" handling.
14134         (allocate_location_catch_handlers, re_set_catch_handlers)
14135         (check_status_catch_handlers, print_it_catch_handlers)
14136         (print_one_catch_handlers, print_mention_catch_handlers)
14137         (print_recreate_catch_handlers): New function.
14138         (catch_handlers_breakpoint_ops): New variable.
14139         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14140         Add parameter.  Add "catch handler" handling.
14141         (ada_exception_sym_name, ada_exception_breakpoint_ops):
14142         Add "catch handler" handling.
14143         (ada_exception_catchpoint_cond_string): Add "catch handler"
14144         handling.
14145         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14146         call.
14147         (catch_ada_handlers_command): New function.
14148         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14149         operations structure.
14150         (_initialize_ada_language): Add "catch handlers" command entry.
14151         * NEWS: Document "catch handlers" feature.
14152
14153 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14154
14155         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14156         account when creating the array type of the slice.
14157         (ada_value_slice): Likewise.
14158
14159 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14160
14161         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14162         New enum value.
14163         (create_array_type_with_stride): Add byte_stride_prop parameter.
14164         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14165         New parameter.  Update all callers in this file.
14166         (array_type_has_dynamic_stride): New function.
14167         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14168         of arrays with dynamic byte strides.
14169         * dwarf2read.c (read_array_type): Add support for dynamic
14170         DW_AT_byte_stride attributes.
14171
14172 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14173
14174         * dwarf2read.c (read_unspecified_type): Treat
14175         DW_TAG_enumeration_type DIEs from Ada units as stubs.
14176
14177 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14178
14179         Update copyright year range in all GDB files.
14180
14181 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14182
14183         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14184         and gdb/testsuite/gdb.base/step-line.c.
14185
14186 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14187
14188         * copyright.py (main): Dump the contents of
14189         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14190         even if BY_HAND is empty.
14191
14192 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14193
14194         * top.c (print_gdb_version): Update Copyright year in version
14195         message.
14196
14197 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14198
14199         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14200
14201 For older changes see ChangeLog-2017.
14202 \f
14203 Local Variables:
14204 mode: change-log
14205 left-margin: 8
14206 fill-column: 74
14207 version-control: never
14208 coding: utf-8
14209 End: