Aarch64: Move pseudo defines to header
[external/binutils.git] / gdb / ChangeLog
1 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
2
3         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
4         (AARCH64_D0_REGNUM): Likewise.
5         (AARCH64_S0_REGNUM): Likewise.
6         (AARCH64_H0_REGNUM): Likewise.
7         (AARCH64_B0_REGNUM): Likewise.
8         (AARCH64_SVE_V0_REGNUM): Likewise.
9         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
10         (AARCH64_D0_REGNUM): Likewise.
11         (AARCH64_S0_REGNUM): Likewise.
12         (AARCH64_H0_REGNUM): Likewise.
13         (AARCH64_B0_REGNUM): Likewise.
14         (AARCH64_SVE_V0_REGNUM): Likewise.
15
16 2018-10-01  Gary Benson <gbenson@redhat.com>
17
18         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
19         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
20         prfpregset_t instead of gdb_prfpregset_t.
21         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
22         * configure, config.in: Rebuild.
23
24 2018-10-01  Gary Benson <gbenson@redhat.com>
25
26         * common/gdb_proc_service.h: New file, factored out from...
27         * gdb_proc_service.h: Moved common code to the above file.
28         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
29
30 2018-10-01  Gary Benson <gbenson@redhat.com>
31
32         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
33         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
34
35 2018-10-01  Gary Benson <gbenson@redhat.com>
36
37         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
38         (AC_CHECK_HEADERS): Check for linux/elf.h.
39         * configure, config.in: Rebuild.
40         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
41         doesn't define elf_fpregset_t.
42
43 2018-10-01  Gary Benson <gbenson@redhat.com>
44
45         * gdb_proc_service.h: Whitespace change.
46
47 2018-10-01  Tom Tromey  <tom@tromey.com>
48
49         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
50         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
51         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
52
53 2018-10-01  Tom Tromey  <tom@tromey.com>
54
55         * README: Minor change.
56
57 2018-09-30  Pedro Alves  <palves@redhat.com>
58
59         * darwin-nat-info.c (darwin_debug_regions_recurse)
60         (info_mach_exceptions_command): Remove unused local variables.
61         * darwin-nat.c (darwin_decode_notify_message)
62         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
63         (darwin_stop_inferior, darwin_setup_exceptions)
64         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
65         (darwin_nat_target::attach, darwin_nat_target::detach)
66         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
67         local variables.
68         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
69         variables.
70
71 2018-09-29  Tom Tromey  <tom@tromey.com>
72
73         * README: Remove some leftover text.
74
75 2018-09-29  Tom Tromey  <tom@tromey.com>
76
77         * PROBLEMS: Rewrite.
78         * README: Update.
79
80 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
81
82         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
83         case with explicit breakpoint kind.
84         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
85         'additional_info' and related logic.
86         (riscv_debug_breakpoints): New variable.
87         (riscv_breakpoint_kind_from_pc): Use the length of the existing
88         instruction to determine the breakpoint kind.
89         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
90         flag.  Update description of 'set/show riscv
91         use-compressed-breakpoints' flag.
92
93 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
94
95         (NEWS): Mention changes to frame related commands.
96         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
97         (add_prefix_cmd_suppress_notification): New function.
98         (add_com_suppress_notification): Call
99         add_cmd_suppress_notification.
100         * command.h (add_cmd_suppress_notification): Declare.
101         (add_prefix_cmd_suppress_notification): Declare.
102         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
103         (parse_frame_specification): Moved from stack.c, with
104         simplification to handle a single argument.
105         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
106         switch to the selected frame.  Add a header comment.
107         * stack.c: Remove 'safe-ctype.h' include.
108         (find_frame_for_function): Add declaration.
109         (find_frame_for_address): New function.
110         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
111         (frame_selection_by_function_completer): New function.
112         (info_frame_command): Rename to...
113         (info_frame_command_core): ...this, and update parameter types.
114         (select_frame_command): Rename to...
115         (select_frame_command_core): ...this, and update parameter types.
116         (frame_command): Rename to...
117         (frame_command_core): ...this, and update parameter types.
118         (class frame_command_helper): New class to wrap implementations of
119         frame related sub-commands.
120         (frame_apply_cmd_list): New static global.
121         (frame_cmd_list): Make static.
122         (select_frame_cmd_list): New global for sub-commands.
123         (info_frame_cmd_list): New global for sub-commands.
124         (_initialize_stack): Register sub-commands for 'frame',
125         'select-frame', and 'info frame'.  Update 'frame apply' commands
126         to use frame_apply_cmd_list.  Move function local static
127         frame_apply_list to file static frame_apply_cmd_list for
128         consistency.
129         * stack.h (select_frame_command): Delete declarationn.
130         (select_frame_for_mi): Declare new function.
131
132 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
133
134         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
135         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
136         and NOP.
137
138 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
139
140         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
141
142 2018-09-26  Tom Tromey  <tom@tromey.com>
143
144         * valops.c (auto_abandon): Remove dead code.
145
146 2018-09-26  Tom Tromey  <tom@tromey.com>
147
148         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
149
150 2018-09-24  Tom Tromey  <tom@tromey.com>
151
152         * common/pathstuff.c (get_standard_cache_dir): Make
153         "xdg_cache_home" and "home" const.
154         * top.c (init_history): Make "tmpenv" const.
155         * main.c (get_init_files): Make "homedir" const.
156
157 2018-09-23  Tom Tromey  <tom@tromey.com>
158
159         PR python/18852:
160         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
161
162 2018-09-23  Tom Tromey  <tom@tromey.com>
163
164         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
165         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
166         * python/python-internal.h (gdbpy_handle_exception): Declare.
167         * python/py-utils.c (gdbpy_handle_exception): New function.
168
169 2018-09-23  Tom Tromey  <tom@tromey.com>
170
171         PR python/17284:
172         * python/py-type.c (typy_template_argument): Check for negative
173         argument number.
174
175 2018-09-23  Tom Tromey  <tom@tromey.com>
176
177         PR python/14062:
178         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
179
180 2018-09-23  Tom Tromey  <tom@tromey.com>
181
182         PR python/18170:
183         * python/py-value.c (valpy_int): Allow conversion from pointer
184         type.
185
186 2018-09-23  Tom Tromey  <tom@tromey.com>
187
188         PR python/20126:
189         * python/py-value.c (valpy_int): Respect type sign.
190
191 2018-09-23  Tom Tromey  <tom@tromey.com>
192
193         PR python/18352;
194         * python/py-value.c (valpy_float): Allow conversions from int or
195         char.
196         (valpy_int, valpy_long): Allow conversions from float.
197
198 2018-09-23  Tom Tromey  <tom@tromey.com>
199
200         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
201         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
202
203 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
204
205         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
206         __sighndlr.
207         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
208
209 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
210
211         * windows-nat.c (windows_nat_target::wait): Remove a spurious
212         target_terminal::ours().
213
214 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
215
216         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
217         of vl to ULONGEST.
218
219 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
220
221         * breakpoint.c (update_inserted_breakpoint_locations): Remove
222         redundant condition.
223
224 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
225
226         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
227
228         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
229         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
230         * sol-thread.c (ps_pdmodel): Don't guard definition.
231
232         * procfs.c: Fix formatting.
233
234         * procfs.c (sysset_t_alloc): Remove.
235         (create_procinfo): Use XNEW instead of sysset_t_alloc.
236         (procfs_debug_inferior): Likewise.
237         (procfs_set_exec_trap): Likewise.
238         (proc_set_traced_sysentry): Don't allocate argp dynamically.
239         (proc_set_traced_sysexit): Likewise.
240
241         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
242         (dead_procinfo): Likewise.
243         (proc_warn): Likewise.
244         (proc_error): Likewise.
245         (proc_get_LDT_entry): Likewise.
246         (do_attach): Likewise.
247         (procfs_target::pid_to_str): Likewise.
248         (iterate_over_mappings): Likewise.
249
250         * procfs.c (create_procinfo): Fix ARI warning.
251         (proc_get_status): Likewise.
252         (proc_stop_process): Likewise.
253         (proc_run_process): Likewise.
254         (proc_kill): Likewise.
255         (proc_get_LDT_entry): Likewise.
256         (procfs_find_LDT_entry): Likewise.
257         (proc_update_threads): Likewise.
258         (proc_iterate_over_threads): Likewise.
259         (do_attach): Likewise.
260         (procfs_xfer_memory): Likewise.
261         (invalidate_cache): Likewise.
262         (procfs_target::resume): Likewise.
263         (procfs_init_inferior): Likewise.
264         (procfs_set_exec_trap): Likewise.
265         (procfs_target::thread_alive): Likewise.
266         (procfs_target::pid_to_exec_file): Likewise.
267         (iterate_over_mappings): Likewise.
268         (procfs_target::make_corefile_notes): Likewise.
269         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
270
271         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
272         (procfs_find_LDT_entry): Likewise.
273         * sol-thread.c (ps_lgetLDT): Likewise.
274
275 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
276
277         PR tdep/17903
278         * procfs.c (procfs_target): Declare pid_to_exec_file.
279         (procfs_target::pid_to_exec_file): New.
280
281 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
282
283         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
284         renaming.
285         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
286         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
287
288 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
289
290         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
291         (supply_fpregset, fill_fpregset): Move ...
292         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
293         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
294         Remove references to ioctl-based procfs.
295         Include <sys/reg.h>.
296         Remove PR_MODEL_NATIVE guards.
297         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
298         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
299
300 2018-09-19  Xavier Roirand  <roirand@adacore.com>
301
302         PR gdb/20981:
303         * solib-darwin.c (darwin_get_dyld_bfd): New function.
304         (darwin_solib_get_all_image_info_addr_at_init): Update call.
305         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
306
307 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
308
309         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
310         (fbsd_print_sockaddr_in6): Likewise.
311
312 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
313             Chris January  <chris.january@arm.com>
314
315         * eval.c (skip_undetermined_arglist): Skip argument list helper.
316         (evaluate_subexp_standard): Return a dummy type when
317         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
318         OP_F77_UNDETERMINED_ARGLIST case.
319         * expression.h (enum noside): Update comment.
320
321 2018-09-19  George Vasick <george.vasick@oracle.com>
322
323         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
324
325 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
326             April Chin <april.chin@oracle.com>
327             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
328
329         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
330         uint_t lwpid_t.
331         (create_procinfo): Print pids in /proc without leading zeros.
332
333 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
334
335         * nios2-tdep.c (nios2_gcc_target_options): New.
336         (nios2_gdb_arch_init): Install new hook.
337
338 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
339
340         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
341         New file.
342         * update-gnulib.sh: Apply patch.
343         * configure: Re-generate.
344
345 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
346
347         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
348         description.  Make "info proc" command descriptions more
349         consistent.
350
351 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
352
353         * NEWS: Mention 'info proc files' command.
354
355 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
356
357         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
358         descriptors for IP_FILES and IP_ALL.
359
360 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
361
362         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
363         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
364         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
365         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
366         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
367         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
368         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
369         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
370         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
371         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
372         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
373         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
374         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
375         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
376         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
377         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
378         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
379         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
380         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
381         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
382         (struct fbsd_sockaddr_un): New types.
383         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
384         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
385         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
386         (fbsd_core_info_proc_files): New functions.
387         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
388         IP_ALL.
389         * fbsd-tdep.h (fbsd_info_proc_files_header)
390         (fbsd_info_proc_files_entry): New.
391
392 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
393
394         * defs.h (enum info_proc_what) [IP_FILES]: New value.
395         * infcmd.c (info_proc_cmd_files): New function.
396         (_initialize_infcmd): Register 'info proc files' command.
397
398 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
399
400         * gnulib/aclocal-m4-deps.mk: Re-generate.
401         * gnulib/aclocal.m4: Re-generate.
402         * gnulib/config.in: Re-generate.
403         * gnulib/configure: Re-generate.
404         * gnulib/import/Makefile.am: Re-generate.
405         * gnulib/import/Makefile.in: Re-generate.
406         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
407         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
408         * gnulib/import/arpa_inet.in.h: New file.
409         * gnulib/import/inet_ntop.c: New file.
410         * gnulib/import/m4/arpa_inet_h.m4: New file.
411         * gnulib/import/m4/inet_ntop.m4: New file.
412         * gnulib/import/m4/netinet_in_h.m4: New file.
413         * gnulib/import/m4/socklen.m4: New file.
414         * gnulib/import/m4/sockpfaf.m4: New file.
415         * gnulib/import/m4/stdalign.m4: New file.
416         * gnulib/import/m4/sys_uio_h.m4: New file.
417         * gnulib/import/netinet_in.in.h: New file.
418         * gnulib/import/stdalign.in.h: New file.
419         * gnulib/import/sys_socket.c: New file.
420         * gnulib/import/sys_socket.in.h: New file.
421         * gnulib/import/sys_uio.in.h: New file.
422         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
423         module.
424
425 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
426
427         * gnulib/aclocal-m4-deps.mk: New file.
428         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
429         deterministically.
430
431 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
432
433         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
434         KVE_PATH.
435
436 2018-09-18  Tom Tromey  <tom@tromey.com>
437
438         * compile/compile-object-load.c (struct
439         link_hash_table_cleanup_data): Add constructor and destructor.
440         Use DISABLE_COPY_AND_ASSIGN.
441         (~link_hash_table_cleanup_data): Rename from
442         link_hash_table_free.  Now a destructor.
443         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
444
445 2018-09-18  Tom Tromey  <tom@tromey.com>
446
447         * compile/compile-object-run.c (do_module_cleanup): Use delete.
448         * compile/compile-object-load.c (struct munmap_list): Move to
449         header file.
450         (munmap_list::add): Rename from munmap_list_add; rewrite.
451         (munmap_list::~munmap_list): Rename from munmap_list_free.
452         (munmap_listp_free_cleanup): Remove.
453         (compile_object_load): Update.
454         * compile/compile-object-load.h (struct munmap_list): Move from
455         compile-object-load.c.  Rewrite.
456
457 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
458
459         * aarch64-tdep.c (pass_in_v): Use register size.
460         (aarch64_extract_return_value): Likewise.
461         (aarch64_store_return_value): Likewise.
462
463 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
464
465         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
466         rlim_t.
467
468 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
469
470         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
471         Fix short help line.
472
473 2018-09-17  Tom Tromey  <tom@tromey.com>
474
475         PR python/20445:
476         * configure: Rebuild.
477         * configure.ac: Conditionally use -DNDEBUG for Python.
478
479 2018-09-17  Tom Tromey  <tom@tromey.com>
480
481         * configure: Rebuild.
482         * configure.ac: Use gmp as a library dependency when checking for
483         mpfr.
484
485 2018-09-17  Pedro Alves  <palves@redhat.com>
486
487         * python/py-inferior.c (find_inferior_object): Delete.
488
489 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
490
491         * compile/compile-cplus-types.c
492         (compile_cplus_instance::enter_scope): Don't use new_scope after
493         std::move.
494
495 2018-09-17  Tom Tromey  <tom@tromey.com>
496
497         * common/pathstuff.c (get_standard_cache_dir): Use
498         ~/Library/Caches on macOS.
499         * common/pathstuff.h (get_standard_cache_dir): Update comment.
500
501 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
502
503         PR python/23669
504         * breakpoint.c (commands_cmd_element): New.
505         (_initialize_breakpoint): Assign commands_cmd_element.
506         * breakpoint.h (commands_cmd_element): New.
507         * cli/cli-script.c (while_cmd_element, if_command,
508         define_cmd_element): New.
509         (command_name_equals): Remove.
510         (process_next_line): Compare commands by pointer, not by name.
511         (_initialize_cli_script): Assign the various cmd_list_element
512         variables.
513         * compile/compile.c (compile_cmd_element): New.
514         (_initialize_compile): Assign compile_cmd_element.
515         * compile/compile.h (compile_cmd_element): New.
516         * guile/guile.c (guile_cmd_element): New.
517         (install_gdb_commands): Assign guile_cmd_element.
518         * guile/guile.h (guile_cmd_element): New.
519         * python/python.c (python_cmd_element): New.
520         (_initialize_python): Assign python_cmd_element.
521         * python/python.h (python_cmd_element): New.
522         * tracepoint.c (while_stepping_cmd_element): New.
523         (_initialize_tracepoint): Assign while_stepping_cmd_element.
524         * tracepoint.h (while_stepping_cmd_element): New.
525
526 2018-09-17  Tom Tromey  <tom@tromey.com>
527
528         * infrun.c (save_infcall_suspend_state): Return
529         infcall_suspend_state_up.
530         (save_infcall_control_state): Return infcall_control_state_up.
531         * inferior.h (save_infcall_suspend_state)
532         (save_infcall_control_state): Declare later.  Return unique
533         pointers.
534
535 2018-09-17  Tom Tromey  <tom@tromey.com>
536
537         * infrun.c (struct stop_context): Declare constructor,
538         destructor, "changed" method.
539         (stop_context::stop_context): Rename from save_stop_context.
540         (stop_context::~stop_context): Rename from
541         release_stop_context_cleanup.
542         (normal_stop): Update.
543         (stop_context::changed): Rename from stop_context_changed.  Return
544         bool.
545
546 2018-09-17  Tom Tromey  <tom@tromey.com>
547
548         * inferior.h (struct infcall_suspend_state_deleter): New.
549         (infcall_suspend_state_up): New typedef.
550         (struct infcall_control_state_deleter): New.
551         (infcall_control_state_up): New typedef.
552         (make_cleanup_restore_infcall_suspend_state)
553         (make_cleanup_restore_infcall_control_state): Don't declare.
554         * infcall.c (call_function_by_hand_dummy): Update.
555         * infrun.c (do_restore_infcall_suspend_state_cleanup)
556         (make_cleanup_restore_infcall_suspend_state): Remove.
557         (do_restore_infcall_control_state_cleanup)
558         (make_cleanup_restore_infcall_control_state): Remove.
559
560 2018-09-17  Tom Tromey  <tom@tromey.com>
561
562         * gdbthread.h (struct thread_control_state): Add initializer.
563         (class thread_info) <control>: Remove initializer.
564         * inferior.h (struct inferior_control_state): Add initializer.
565         (class inferior) <control>: Remove initializer.
566         (exit_inferior_1): Update.
567         * infrun.c (struct infcall_control_state): Add constructors.
568         (save_infcall_control_state): Use new.
569         (restore_infcall_control_state, discard_infcall_control_state):
570         Use delete.
571
572 2018-09-17  Tom Tromey  <tom@tromey.com>
573
574         * infrun.c (struct infcall_suspend_state) <registers>: Now a
575         unique_ptr.
576         <siginfo_data>: Now a unique_xmalloc_ptr.
577         (save_infcall_suspend_state, restore_infcall_suspend_state)
578         (discard_infcall_suspend_state)
579         (get_infcall_suspend_state_regcache): Update.
580
581 2018-09-17  Tom Tromey  <tom@tromey.com>
582
583         * gdbthread.h (struct thread_suspend_state): Add initializers.
584         (class thread_info) <suspend>: Remove initializer.
585         * infrun.c (struct infcall_suspend_state): Add initializers.
586         (save_infcall_suspend_state): Use new.
587         (discard_infcall_suspend_state): Use delete.
588
589 2018-09-16  Tom Tromey  <tom@tromey.com>
590
591         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
592         Remove.
593         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
594         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
595         (py_varobj_iter_new): Likewise.
596         (py_varobj_get_iterator): Use gdbpy_ref.
597
598 2018-09-16  Tom Tromey  <tom@tromey.com>
599
600         * python/py-threadevent.c (py_get_event_thread): Simplify.
601         * python/py-inferior.c (infpy_thread_from_thread_handle):
602         Return immediately after calling thread_to_thread_object.  Use
603         Py_RETURN_NONE.
604         (thread_to_thread_object): Set the exception on a NULL return.
605
606 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
607
608         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
609
610 2018-09-16  Tom Tromey  <tom@tromey.com>
611
612         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
613         Remove.
614
615 2018-09-16  Tom Tromey  <tom@tromey.com>
616
617         * python/python-internal.h (thread_to_thread_object): Change
618         return type.
619         * python/py-inferior.c (thread_to_thread_object): Return a new
620         reference.
621         (infpy_thread_from_thread_handle): Update.
622         * python/py-infthread.c (gdbpy_selected_thread): Update.
623         * python/py-stopevent.c (create_stop_event_object): Update.
624         * python/py-threadevent.c (py_get_event_thread): Return a new
625         reference.
626         (py_get_event_thread): Update.
627         * python/py-event.h (py_get_event_thread): Change return type.
628         * python/py-continueevent.c (create_continue_event_object):
629         Update.
630
631 2018-09-16  Tom Tromey  <tom@tromey.com>
632
633         * python/py-progspace.c (pspy_get_objfiles): Update.
634         * python/python-internal.h (objfile_to_objfile_object): Change
635         return type.
636         * python/py-newobjfileevent.c (create_new_objfile_event_object):
637         Update.
638         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
639         Update.
640         * python/python.c (gdbpy_get_current_objfile): Update.
641         (gdbpy_objfiles): Update.
642         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
643         Update.
644         (objfile_to_objfile_object): Return a new reference.
645         * python/py-symtab.c (stpy_get_objfile): Update.
646         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
647         Update.
648
649 2018-09-16  Tom Tromey  <tom@tromey.com>
650
651         * python/py-inferior.c (infpy_get_progspace): Update.
652         * python/python-internal.h (pspace_to_pspace_object): Change
653         return type.
654         * python/py-newobjfileevent.c
655         (create_clear_objfiles_event_object): Update.
656         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
657         Update.
658         * python/python.c (gdbpy_get_current_progspace): Update.
659         (gdbpy_progspaces): Update.
660         * python/py-progspace.c (pspace_to_pspace_object): Return a new
661         reference.
662         * python/py-objfile.c (objfpy_get_progspace): Update.
663         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
664         Update.
665
666 2018-09-16  Tom Tromey  <tom@tromey.com>
667
668         * python/lib/gdb/__init__.py (current_progspace, objfiles)
669         (solib_name, block_for_pc, find_pc_line): New functions.
670         (execute_unwinders): Update.
671         * python/py-block.c (gdbpy_block_for_pc): Remove.
672         * python/py-inferior.c (infpy_get_progspace): New function.
673         (inferior_object_getset) <progspace>: Add.
674         * python/py-progspace.c (pspy_objfiles): Rewrite.
675         (pspy_solib_name, pspy_block_for_pc)
676         (pspy_find_pc_line, pspy_is_valid): New functions.
677         (progspace_object_methods): Add entries for solib_name,
678         block_for_pc, find_pc_line, is_valid.
679         * python/python-internal.h (gdbpy_block_for_pc)
680         (build_objfiles_list): Don't declare.
681         * python/python.c: Don't include solib.h.
682         (gdbpy_solib_name, gdbpy_find_pc_line)
683         (gdbpy_get_current_progspace, build_objfiles_list)
684         (gdbpy_objfiles): Remove.
685         (GdbMethods) <current_progspace, objfiles, block_for_pc,
686         solib_name, find_pc_line>: Remove entries.
687
688 2018-09-16  Tom Tromey  <tom@tromey.com>
689
690         * top.c (new_ui_command): Use GNU style for metasyntactic
691         variables.
692         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
693         variables.
694         * maint.c (maintenance_translate_address): Remove "<>" around
695         text.
696         * interps.c (interpreter_exec_cmd): Use GNU style for
697         metasyntactic variables.
698         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
699         metasyntactic variables.
700         * tracepoint.c (tfind_range_command): Use GNU style for
701         metasyntactic variables.
702         (tfind_outside_command): Likewise.
703         (_initialize_tracepoint): Likewise.
704         * remote.c (extended_remote_target::create_inferior): Use GNU
705         style for metasyntactic variables.
706         * sparc64-tdep.c (adi_examine_command): Use GNU style for
707         metasyntactic variables.
708         (adi_assign_command): Likewise.
709
710 2018-09-16  Tom Tromey  <tom@tromey.com>
711
712         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
713         metasyntactic variables.  Print message if no disassembler options
714         are available.
715
716 2018-09-15  Tom Tromey  <tom@tromey.com>
717
718         * infcmd.c (get_inferior_args): Return const char *.
719         * inferior.h (get_inferior_args): Return type now const.
720         * linux-tdep.c (linux_fill_prpsinfo): Update.
721         * procfs.c (procfs_target::make_corefile_notes): Update.
722
723 2018-09-07  Tom Tromey  <tom@tromey.com>
724
725         * python/python.c (execute_gdb_command): Call bpstat_do_actions
726         inside the TRY.
727
728 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
729
730         * nios2-tdep.c (nios2_type_align): New.
731         (nios2_gdb_arch_init): Install type_align hook.
732
733 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
734
735         * eval.c (fake_method::fake_method): Call xzalloc directly for a
736         type that is neither object file owned, nor gdbarch owned.
737         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
738         gdbarch is non-NULL.
739         (alloc_type_instance): Allocate non-objfile owned types on the
740         gdbarch obstack.
741         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
742         using TYPE_ALLOC to ensure memory is allocated on the correct
743         obstack.
744         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
745         obstack, or the gdbarch obstack.
746         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
747
748 2018-09-14  Tom Tromey  <tom@tromey.com>
749
750         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
751         block.
752
753 2018-09-14  Tom Tromey  <tom@tromey.com>
754
755         * nat/fork-inferior.c (get_startup_shell): Remove "static".
756
757 2018-09-13  Tom Tromey  <tom@tromey.com>
758
759         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
760         static.
761
762 2018-09-13  Tom Tromey  <tom@tromey.com>
763
764         * exec.c (try_open_exec_file): Use std::string.
765
766 2018-09-13  Tom Tromey  <tom@tromey.com>
767
768         * utils.h (gdb_bfd_errmsg): Return std::string.
769         * exec.c (exec_file_attach): Update.
770         * compile/compile-object-load.c (compile_object_load): Update.
771         * utils.c (gdb_bfd_errmsg): Return std::string.
772
773 2018-09-13  Tom Tromey  <tom@tromey.com>
774
775         * procfs.c (struct procinfo_deleter): New.
776         (procinfo_up): New typedef.
777         (do_destroy_procinfo_cleanup): Remove.
778         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
779
780 2018-09-13  Tom Tromey  <tom@tromey.com>
781
782         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
783
784 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
785 2018-09-13  Tom Tromey  <tom@tromey.com>
786
787         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
788         (pspy_get_objfiles): New function.
789         (progspace_object_methods): New.
790         (pspace_object_type): Add tp_methods callback.
791         * python/python-internal.h (build_objfiles_list): New
792         declaration.
793         * python/python.c (build_objfiles_list): New function.
794         (gdbpy_objfiles): Implement using build_objfiles_list.
795         * NEWS: Mention the Progspace.objfiles method.
796
797 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
798
799         * python/py-inferior.c (infpy_get_progspace): New function.
800         (inferior_object_getset): Add progspace property.
801         * NEWS: Mention the new property.
802
803 2018-09-13  Tom Tromey  <tom@tromey.com>
804
805         PR rust/23650:
806         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
807
808 2018-09-13  Tom Tromey  <tom@tromey.com>
809
810         PR rust/23626:
811         * rust-lang.c (rust_enum_variant): Now static.
812         (rust_empty_enum_p): New function.
813         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
814         Handle empty enum.
815
816 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
817
818         * python/py-inferior.c (infpy_repr): New.
819         (inferior_object_type): Register infpy_repr.
820         * python/py-objfile.c (objfpy_repr): New.
821         (objfile_object_type): Register objfpy_repr.
822
823 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
824
825         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
826
827 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
828
829         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
830         typo.
831
832 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
833
834         * common/common-utils.c: Don't include '<sys/stat.h>'.
835         (is_regular_file): Move to...
836         * common/filestuff.c (is_regular_file): ... here.
837         * common/common-utils.h (is_regular_file): Move to...
838         * common/filestuff.h (is_regular_file): ... here.
839
840 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
841
842         * skip.c (debug_skip): New variable.
843         (skiplist_entry::do_skip_file_p): Add debug output.
844         (skiplist_entry::do_skip_gfile_p): Likewise.
845         (skiplist_entry::skip_function_p): Likewise.
846         (_initialize_step_skip): Create debug command.
847         * NEWS: Mention set/show debug skip.
848
849 2018-09-11  Xavier Roirand  <roirand@adacore.com>
850
851         * darwin-nat.c (should_disable_startup_with_shell):
852         New function.
853         (darwin_nat_target::create_inferior): Add call.
854
855 2018-09-11  Xavier Roirand  <roirand@adacore.com>
856
857         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
858         inf_port, msg_state>: Initialize.
859         (struct darwin_thread_info) <signaled, single_step>: Change
860         type and initialize.
861         (struct darwin_thread_info) <event>: Initialize.
862
863 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
864
865         PR gdb/23555
866         PR gdb/23558
867         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
868         guesses.
869
870 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
871
872         Revert:
873         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
874
875         PR gdb/23555
876         PR gdb/23558
877         * gnulib/aclocal.m4: Regenerate.
878         * gnulib/config.in: Regenerate.
879         * gnulib/configure: Regenerate.
880         * gnulib/import/Makefile.am: Update.
881         * gnulib/import/Makefile.in: Update.
882         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
883         * gnulib/import/_Noreturn.h: ... this.
884         * gnulib/import/alloca.in.h: Update.
885         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
886         * gnulib/import/arg-nonnull.h: ... this.
887         * gnulib/import/assure.h: Update.
888         * gnulib/import/at-func.c: Update.
889         * gnulib/import/basename-lgpl.c: Update.
890         * gnulib/import/extra/snippet/c++defs.h: Rename to...
891         * gnulib/import/c++defs.h: ... this.
892         * gnulib/import/canonicalize-lgpl.c: Update.
893         * gnulib/import/cdefs.h: Update.
894         * gnulib/import/chdir-long.c: Update.
895         * gnulib/import/chdir-long.h: Update.
896         * gnulib/import/cloexec.c: Update.
897         * gnulib/import/cloexec.h: Update.
898         * gnulib/import/close.c: Update.
899         * gnulib/import/closedir.c: Update.
900         * gnulib/import/config.charset: Update.
901         * gnulib/import/dirent-private.h: Update.
902         * gnulib/import/dirent.in.h: Update.
903         * gnulib/import/dirfd.c: Update.
904         * gnulib/import/dirname-lgpl.c: Update.
905         * gnulib/import/dirname.h: Update.
906         * gnulib/import/dosname.h: Update.
907         * gnulib/import/dup-safer-flag.c: Update.
908         * gnulib/import/dup-safer.c: Update.
909         * gnulib/import/dup.c: Update.
910         * gnulib/import/dup2.c: Update.
911         * gnulib/import/errno.in.h: Update.
912         * gnulib/import/error.c: Update.
913         * gnulib/import/error.h: Update.
914         * gnulib/import/exitfail.c: Update.
915         * gnulib/import/exitfail.h: Update.
916         * gnulib/import/extra/update-copyright: Update.
917         * gnulib/import/fchdir.c: Update.
918         * gnulib/import/fcntl.c: Update.
919         * gnulib/import/fcntl.in.h: Update.
920         * gnulib/import/fd-hook.c: Update.
921         * gnulib/import/fd-hook.h: Update.
922         * gnulib/import/fd-safer-flag.c: Update.
923         * gnulib/import/fd-safer.c: Update.
924         * gnulib/import/fdopendir.c: Update.
925         * gnulib/import/filename.h: Update.
926         * gnulib/import/filenamecat-lgpl.c: Update.
927         * gnulib/import/filenamecat.h: Update.
928         * gnulib/import/flexmember.h: Update.
929         * gnulib/import/float+.h: Update.
930         * gnulib/import/float.c: Update.
931         * gnulib/import/float.in.h: Update.
932         * gnulib/import/fnmatch.c: Update.
933         * gnulib/import/fnmatch.in.h: Update.
934         * gnulib/import/fnmatch_loop.c: Update.
935         * gnulib/import/fpucw.h: Update.
936         * gnulib/import/frexp.c: Update.
937         * gnulib/import/frexpl.c: Update.
938         * gnulib/import/fstat.c: Update.
939         * gnulib/import/fstatat.c: Update.
940         * gnulib/import/getcwd-lgpl.c: Update.
941         * gnulib/import/getcwd.c: Update.
942         * gnulib/import/getdtablesize.c: Update.
943         * gnulib/import/getlogin_r.c: Update.
944         * gnulib/import/getprogname.c: Update.
945         * gnulib/import/getprogname.h: Update.
946         * gnulib/import/gettext.h: Update.
947         * gnulib/import/gettimeofday.c: Update.
948         * gnulib/import/glob-libc.h: Update.
949         * gnulib/import/glob.c: Update.
950         * gnulib/import/glob.in.h: Update.
951         * gnulib/import/glob_internal.h: Update.
952         * gnulib/import/glob_pattern_p.c: Update.
953         * gnulib/import/globfree.c: Update.
954         * gnulib/import/hard-locale.c: Update.
955         * gnulib/import/hard-locale.h: Update.
956         * gnulib/import/intprops.h: Update.
957         * gnulib/import/inttypes.in.h: Update.
958         * gnulib/import/isnan.c: Update.
959         * gnulib/import/isnand-nolibm.h: Update.
960         * gnulib/import/isnand.c: Update.
961         * gnulib/import/isnanl-nolibm.h: Update.
962         * gnulib/import/isnanl.c: Update.
963         * gnulib/import/itold.c: Update.
964         * gnulib/import/libc-config.h: Update.
965         * gnulib/import/limits.in.h: Update.
966         * gnulib/import/localcharset.c: Update.
967         * gnulib/import/localcharset.h: Update.
968         * gnulib/import/localtime-buffer.c: Update.
969         * gnulib/import/localtime-buffer.h: Update.
970         * gnulib/import/lstat.c: Update.
971         * gnulib/import/m4/00gnulib.m4: Update.
972         * gnulib/import/m4/__inline.m4: Update.
973         * gnulib/import/m4/absolute-header.m4: Update.
974         * gnulib/import/m4/alloca.m4: Update.
975         * gnulib/import/m4/builtin-expect.m4: Update.
976         * gnulib/import/m4/canonicalize.m4: Update.
977         * gnulib/import/m4/chdir-long.m4: Update.
978         * gnulib/import/m4/close.m4: Update.
979         * gnulib/import/m4/closedir.m4: Update.
980         * gnulib/import/m4/configmake.m4: Update.
981         * gnulib/import/m4/d-ino.m4: Update.
982         * gnulib/import/m4/d-type.m4: Update.
983         * gnulib/import/m4/dirent_h.m4: Update.
984         * gnulib/import/m4/dirfd.m4: Update.
985         * gnulib/import/m4/dirname.m4: Update.
986         * gnulib/import/m4/double-slash-root.m4: Update.
987         * gnulib/import/m4/dup.m4: Update.
988         * gnulib/import/m4/dup2.m4: Update.
989         * gnulib/import/m4/eealloc.m4: Update.
990         * gnulib/import/m4/environ.m4: Update.
991         * gnulib/import/m4/errno_h.m4: Update.
992         * gnulib/import/m4/error.m4: Update.
993         * gnulib/import/m4/exponentd.m4: Update.
994         * gnulib/import/m4/exponentl.m4: Update.
995         * gnulib/import/m4/extensions.m4: Update.
996         * gnulib/import/m4/extern-inline.m4: Update.
997         * gnulib/import/m4/fchdir.m4: Update.
998         * gnulib/import/m4/fcntl-o.m4: Update.
999         * gnulib/import/m4/fcntl.m4: Update.
1000         * gnulib/import/m4/fcntl_h.m4: Update.
1001         * gnulib/import/m4/fdopendir.m4: Update.
1002         * gnulib/import/m4/filenamecat.m4: Update.
1003         * gnulib/import/m4/flexmember.m4: Update.
1004         * gnulib/import/m4/float_h.m4: Update.
1005         * gnulib/import/m4/fnmatch.m4: Update.
1006         * gnulib/import/m4/fnmatch_h.m4: Update.
1007         * gnulib/import/m4/fpieee.m4: Update.
1008         * gnulib/import/m4/frexp.m4: Update.
1009         * gnulib/import/m4/frexpl.m4: Update.
1010         * gnulib/import/m4/fstat.m4: Update.
1011         * gnulib/import/m4/fstatat.m4: Update.
1012         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1013         * gnulib/import/m4/getcwd-path-max.m4: Update.
1014         * gnulib/import/m4/getcwd.m4: Update.
1015         * gnulib/import/m4/getdtablesize.m4: Update.
1016         * gnulib/import/m4/getlogin.m4: Update.
1017         * gnulib/import/m4/getlogin_r.m4: Update.
1018         * gnulib/import/m4/getpagesize.m4: Update.
1019         * gnulib/import/m4/getprogname.m4: Update.
1020         * gnulib/import/m4/gettimeofday.m4: Update.
1021         * gnulib/import/m4/glibc21.m4: Update.
1022         * gnulib/import/m4/glob.m4: Update.
1023         * gnulib/import/m4/glob_h.m4: Update.
1024         * gnulib/import/m4/gnulib-cache.m4: Update.
1025         * gnulib/import/m4/gnulib-common.m4: Update.
1026         * gnulib/import/m4/gnulib-comp.m4: Update.
1027         * gnulib/import/m4/gnulib-tool.m4: Update.
1028         * gnulib/import/m4/hard-locale.m4: Update.
1029         * gnulib/import/m4/include_next.m4: Update.
1030         * gnulib/import/m4/inttypes-pri.m4: Update.
1031         * gnulib/import/m4/inttypes.m4: Update.
1032         * gnulib/import/m4/isnand.m4: Update.
1033         * gnulib/import/m4/isnanl.m4: Update.
1034         * gnulib/import/m4/largefile.m4: Update.
1035         * gnulib/import/m4/limits-h.m4: Update.
1036         * gnulib/import/m4/localcharset.m4: Update.
1037         * gnulib/import/m4/locale-fr.m4: Update.
1038         * gnulib/import/m4/locale-ja.m4: Update.
1039         * gnulib/import/m4/locale-zh.m4: Update.
1040         * gnulib/import/m4/localtime-buffer.m4: Update.
1041         * gnulib/import/m4/longlong.m4: Update.
1042         * gnulib/import/m4/lstat.m4: Update.
1043         * gnulib/import/m4/malloc.m4: Update.
1044         * gnulib/import/m4/malloca.m4: Update.
1045         * gnulib/import/m4/math_h.m4: Update.
1046         * gnulib/import/m4/mbrtowc.m4: Update.
1047         * gnulib/import/m4/mbsinit.m4: Update.
1048         * gnulib/import/m4/mbsrtowcs.m4: Update.
1049         * gnulib/import/m4/mbstate_t.m4: Update.
1050         * gnulib/import/m4/memchr.m4: Update.
1051         * gnulib/import/m4/memmem.m4: Update.
1052         * gnulib/import/m4/mempcpy.m4: Update.
1053         * gnulib/import/m4/memrchr.m4: Update.
1054         * gnulib/import/m4/mkdir.m4: Update.
1055         * gnulib/import/m4/mkstemp.m4: Update.
1056         * gnulib/import/m4/mmap-anon.m4: Update.
1057         * gnulib/import/m4/mode_t.m4: Update.
1058         * gnulib/import/m4/msvc-inval.m4: Update.
1059         * gnulib/import/m4/msvc-nothrow.m4: Update.
1060         * gnulib/import/m4/multiarch.m4: Update.
1061         * gnulib/import/m4/nocrash.m4: Update.
1062         * gnulib/import/m4/off_t.m4: Update.
1063         * gnulib/import/m4/onceonly.m4: Update.
1064         * gnulib/import/m4/open-cloexec.m4: Update.
1065         * gnulib/import/m4/open.m4: Update.
1066         * gnulib/import/m4/openat.m4: Update.
1067         * gnulib/import/m4/opendir.m4: Update.
1068         * gnulib/import/m4/pathmax.m4: Update.
1069         * gnulib/import/m4/rawmemchr.m4: Update.
1070         * gnulib/import/m4/readdir.m4: Update.
1071         * gnulib/import/m4/readlink.m4: Update.
1072         * gnulib/import/m4/realloc.m4: Update.
1073         * gnulib/import/m4/rename.m4: Update.
1074         * gnulib/import/m4/rewinddir.m4: Update.
1075         * gnulib/import/m4/rmdir.m4: Update.
1076         * gnulib/import/m4/save-cwd.m4: Update.
1077         * gnulib/import/m4/secure_getenv.m4: Update.
1078         * gnulib/import/m4/setenv.m4: Update.
1079         * gnulib/import/m4/signal_h.m4: Update.
1080         * gnulib/import/m4/ssize_t.m4: Update.
1081         * gnulib/import/m4/stat-time.m4: Update.
1082         * gnulib/import/m4/stat.m4: Update.
1083         * gnulib/import/m4/std-gnu11.m4: Update.
1084         * gnulib/import/m4/stdbool.m4: Update.
1085         * gnulib/import/m4/stddef_h.m4: Update.
1086         * gnulib/import/m4/stdint.m4: Update.
1087         * gnulib/import/m4/stdio_h.m4: Update.
1088         * gnulib/import/m4/stdlib_h.m4: Update.
1089         * gnulib/import/m4/strchrnul.m4: Update.
1090         * gnulib/import/m4/strdup.m4: Update.
1091         * gnulib/import/m4/strerror.m4: Update.
1092         * gnulib/import/m4/string_h.m4: Update.
1093         * gnulib/import/m4/strstr.m4: Update.
1094         * gnulib/import/m4/strtok_r.m4: Update.
1095         * gnulib/import/m4/sys_socket_h.m4: Update.
1096         * gnulib/import/m4/sys_stat_h.m4: Update.
1097         * gnulib/import/m4/sys_time_h.m4: Update.
1098         * gnulib/import/m4/sys_types_h.m4: Update.
1099         * gnulib/import/m4/tempname.m4: Update.
1100         * gnulib/import/m4/time_h.m4: Update.
1101         * gnulib/import/m4/unistd-safer.m4: Update.
1102         * gnulib/import/m4/unistd_h.m4: Update.
1103         * gnulib/import/m4/warn-on-use.m4: Update.
1104         * gnulib/import/m4/wchar_h.m4: Update.
1105         * gnulib/import/m4/wchar_t.m4: Update.
1106         * gnulib/import/m4/wctype_h.m4: Update.
1107         * gnulib/import/m4/wint_t.m4: Update.
1108         * gnulib/import/malloc.c: Update.
1109         * gnulib/import/malloc/scratch_buffer.h: Update.
1110         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1111         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1112         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1113         * gnulib/import/malloca.c: Update.
1114         * gnulib/import/malloca.h: Update.
1115         * gnulib/import/malloca.valgrind: Update.
1116         * gnulib/import/math.in.h: Update.
1117         * gnulib/import/mbrtowc.c: Update.
1118         * gnulib/import/mbsinit.c: Update.
1119         * gnulib/import/mbsrtowcs-impl.h: Update.
1120         * gnulib/import/mbsrtowcs-state.c: Update.
1121         * gnulib/import/mbsrtowcs.c: Update.
1122         * gnulib/import/memchr.c: Update.
1123         * gnulib/import/memmem.c: Update.
1124         * gnulib/import/mempcpy.c: Update.
1125         * gnulib/import/memrchr.c: Update.
1126         * gnulib/import/mkdir.c: Update.
1127         * gnulib/import/mkstemp.c: Update.
1128         * gnulib/import/msvc-inval.c: Update.
1129         * gnulib/import/msvc-inval.h: Update.
1130         * gnulib/import/msvc-nothrow.c: Update.
1131         * gnulib/import/msvc-nothrow.h: Update.
1132         * gnulib/import/open.c: Update.
1133         * gnulib/import/openat-die.c: Update.
1134         * gnulib/import/openat-priv.h: Update.
1135         * gnulib/import/openat-proc.c: Update.
1136         * gnulib/import/openat.c: Update.
1137         * gnulib/import/openat.h: Update.
1138         * gnulib/import/opendir.c: Update.
1139         * gnulib/import/pathmax.h: Update.
1140         * gnulib/import/pipe-safer.c: Update.
1141         * gnulib/import/rawmemchr.c: Update.
1142         * gnulib/import/readdir.c: Update.
1143         * gnulib/import/readlink.c: Update.
1144         * gnulib/import/realloc.c: Update.
1145         * gnulib/import/ref-add.sin: Update.
1146         * gnulib/import/ref-del.sin: Update.
1147         * gnulib/import/rename.c: Update.
1148         * gnulib/import/rewinddir.c: Update.
1149         * gnulib/import/rmdir.c: Update.
1150         * gnulib/import/same-inode.h: Update.
1151         * gnulib/import/save-cwd.c: Update.
1152         * gnulib/import/save-cwd.h: Update.
1153         * gnulib/import/scratch_buffer.h: Update.
1154         * gnulib/import/secure_getenv.c: Update.
1155         * gnulib/import/setenv.c: Update.
1156         * gnulib/import/signal.in.h: Update.
1157         * gnulib/import/stat-time.c: Update.
1158         * gnulib/import/stat-time.h: Update.
1159         * gnulib/import/stat-w32.c: Update.
1160         * gnulib/import/stat-w32.h: Update.
1161         * gnulib/import/stat.c: Update.
1162         * gnulib/import/stdbool.in.h: Update.
1163         * gnulib/import/stddef.in.h: Update.
1164         * gnulib/import/stdint.in.h: Update.
1165         * gnulib/import/stdio.in.h: Update.
1166         * gnulib/import/stdlib.in.h: Update.
1167         * gnulib/import/str-two-way.h: Update.
1168         * gnulib/import/strchrnul.c: Update.
1169         * gnulib/import/strdup.c: Update.
1170         * gnulib/import/streq.h: Update.
1171         * gnulib/import/strerror-override.c: Update.
1172         * gnulib/import/strerror-override.h: Update.
1173         * gnulib/import/strerror.c: Update.
1174         * gnulib/import/string.in.h: Update.
1175         * gnulib/import/stripslash.c: Update.
1176         * gnulib/import/strnlen1.c: Update.
1177         * gnulib/import/strnlen1.h: Update.
1178         * gnulib/import/strstr.c: Update.
1179         * gnulib/import/strtok_r.c: Update.
1180         * gnulib/import/sys_stat.in.h: Update.
1181         * gnulib/import/sys_time.in.h: Update.
1182         * gnulib/import/sys_types.in.h: Update.
1183         * gnulib/import/tempname.c: Update.
1184         * gnulib/import/tempname.h: Update.
1185         * gnulib/import/time.in.h: Update.
1186         * gnulib/import/unistd--.h: Update.
1187         * gnulib/import/unistd-safer.h: Update.
1188         * gnulib/import/unistd.in.h: Update.
1189         * gnulib/import/unsetenv.c: Update.
1190         * gnulib/import/verify.h: Update.
1191         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1192         * gnulib/import/wchar.in.h: Update.
1193         * gnulib/import/wctype.in.h: Update.
1194         * gnulib/import/xalloc-oversized.h: Update.
1195         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1196         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1197
1198 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
1199
1200         * record-btrace.c (get_thread_current_frame): Remove
1201         old_inferior_ptid.
1202
1203 2018-09-10  Jerome Guitton  <guitton@adacore.com>
1204
1205         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1206         with check_tag to 1 if and only if the type is tagged and the
1207         component being searched cannot been found in the current
1208         view. Otherwise, always call ada_to_fixed_type with
1209         check_tag to 0.
1210
1211 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1212
1213         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1214         declaration.
1215         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1216         * ada-varobj.c (ada_varobj_get_number_of_children,
1217         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1218
1219 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1220
1221         * ada-valprint.c (ada_value_print): Use type instead of
1222         enclosing type.
1223
1224 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1225
1226         * ada-lang.c (ada_value_subscript): Handle case when parameter is
1227         an array of access to unconstrained array.
1228
1229 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1230
1231         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1232         (ada_check_typedef): Use it.
1233
1234 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1235
1236         * ada-varobj.c (ada_varobj_describe_struct_child)
1237         (ada_varobj_describe_child): Handle union case like struct one.
1238
1239 2018-09-10  Tom Tromey  <tom@tromey.com>
1240
1241         PR python/18380:
1242         * python/python.c (_initialize_python): Make example in "python"
1243         help work in Python 3.
1244
1245 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
1246
1247         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1248         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
1249         $(EXEEXT) to the script, as it is not a program.
1250
1251 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
1252
1253         * python/py-prettyprint.c (pretty_print_one_value): Return
1254         gdbpy_ref<>.
1255         (print_string_repr): Adjust.
1256         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1257         * python/python-internal.h (apply_varobj_pretty_printer): Return
1258         gdbpy_ref<>.
1259         * varobj.c (varobj_value_get_print_value): Adjust.
1260
1261 2018-09-08  Tom Tromey  <tom@tromey.com>
1262
1263         PR python/16047:
1264         * python/py-prettyprint.c (pretty_print_one_value): Check for
1265         to_string method.
1266
1267 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1268
1269         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1270         replace_operator_with_call.
1271
1272 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1273
1274         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1275
1276 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1277
1278         * ada-typeprint.c (print_range): Print the bounds using TYPE
1279         rather than its TYPE_TARGET_TYPE.
1280
1281 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1282
1283         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1284         call to ada_to_fixed_value_create.
1285
1286 2018-09-08  Jerome Guitton  <guitton@adacore.com>
1287
1288         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1289
1290 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1291
1292         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1293         by calls to error.
1294
1295 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1296
1297         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1298         Move update of loop variable "fi".
1299
1300 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1301
1302         * ada-lang.c (value_assign_to_component): In the case of
1303         big-endian targets, extract the bits of the given VAL
1304         using an src_offset of zero if container is not a scalar.
1305
1306 2018-09-06  Simon Ser  <contact@emersion.fr>
1307
1308         PR gdb/23105
1309         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1310         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1311         * fbsd-tdep.c (fbsd_make_note_desc): New.
1312         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1313         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1314         * target.h (enum target_object) Add FreeBSD-specific
1315         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1316
1317 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1318
1319         * compile/compile-c.h (generate_c_for_variable_locations):
1320         Change reference to pointer.
1321         * compile/compile-c-support.c (compile_program) <compute>:
1322         Likewise.
1323         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1324         (generate_c_for_for_one_variable): Likewise
1325         (generate_c_for_variable_locations): Likewise
1326         * compile/compile-c-types.c (compile_c_instance::convert_type):
1327         Likewise
1328         * compile/compile-cplus-symbols.c (convert_one_symbol):
1329         std::move the scope passed to enter_scope.
1330         * compile/compile-cplus-types.c
1331         (compile_cplus_instance::enter_scope): Make parameter
1332         rvalue-reference.
1333         (compile_cplus_instance::new_scope): Change reference to
1334         pointer.
1335         (compile_cplus_instance::convert_type): Likewise
1336         (compile_cplus_convert_typedef): std::move the scope passed to
1337         enter_scope.
1338         (compile_cplus_convert_struct_or_union): Likewise.
1339         (compile_cplus_convert_enum): Likewise.
1340         (compile_cplus_convert_namespace): Likewise.
1341         * compile/compile-cplus.h (compile_cplus_instance)
1342         <enter_scope>: Make parameter rvalue-reference.
1343         * compile/compile-internal.h (compile_instance)
1344         <get_cached_type>: Likewise
1345         * compile/compile-loc2c.c (push): Likewise
1346         (pushf): Likewise
1347         (unary): Likewise
1348         (binary): Likewise
1349         (print_label): Likewise
1350         (pushf_register_address): Likewise
1351         (pushf_register): Likewise
1352         (do_compile_dwarf_expr_to_c): Likewise
1353         (compile_dwarf_expr_to_c): Likewise
1354         (compile_dwarf_bounds_to_c): Likewise
1355         * compile/compile.c (compile_instance::get_cached_type):
1356         Likewise
1357         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1358         (compile_dwarf_bounds_to_c): Likewise
1359         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1360         (dwarf2_compile_property_to_c): Likewise
1361         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1362         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1363         Likewise
1364
1365 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1366
1367         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1368         * tui/tui-data.c (init_content_element): Don't initialize it.
1369
1370 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1371
1372         * tui/tui-data.h (struct tui_win_info)
1373         <detail::opaque>: Remove.
1374         * tui/tui-data.c (init_win_info): Remove assignment.
1375
1376 2018-09-05  Tom Tromey  <tom@tromey.com>
1377
1378         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1379         -Wformat-nonliteral.
1380         * target-float.c (host_float_ops<T>::to_string)
1381         (host_float_ops<T>::from_string): Use
1382         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1383         * configure: Rebuild.
1384
1385 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1386
1387         * printcmd.c (printf_c_string): Use
1388         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1389         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1390
1391 2018-09-05  Tom Tromey  <tom@tromey.com>
1392
1393         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1394
1395 2018-09-05  Tom de Vries  <tdevries@suse.de>
1396
1397         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1398         with resolve_abstract_p == true.
1399         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1400         defaulting to false. Propagate resolve_abstract_p to
1401         dwarf2_fetch_die_loc_sect_off.
1402         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1403         parameter, defaulting to false.
1404         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1405         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1406         parameter.
1407         * dwarf2read.h (struct die_info): Forward-declare.
1408         (die_info_ptr): New typedef.
1409         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1410
1411 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
1412
1413         GDB 8.2 released.
1414
1415 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1416             Pedro Alves  <palves@redhat.com>
1417
1418         * gnulib/Makefile.in (aclocal_m4_deps): Move to
1419         "aclocal-m4-deps.mk".  Include file here.
1420         $(srcdir)/aclocal.m4: Add "configure.ac".
1421         * gnulib/aclocal-m4-deps.mk: New file.
1422         * gnulib/update-gnulib.sh: Automatically update
1423         "aclocal-m4-deps.mk".
1424
1425 2018-09-04  Tom Tromey  <tom@tromey.com>
1426
1427         * configure: Rebuild.
1428         * configure.ac: Remove multi-ice code.
1429
1430 2018-09-04  Tom Tromey  <tom@tromey.com>
1431
1432         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1433         (ada-exp.o): Update.
1434
1435 2018-09-04  Tom Tromey  <tom@tromey.com>
1436
1437         * Makefile.in (printcmd.o, target-float.o): Remove.
1438         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1439
1440 2018-09-04  Tom Tromey  <tom@tromey.com>
1441
1442         * gnulib/Makefile.in: Remove obsolete comment.
1443         * Makefile.in: Remove obsolete comment.
1444
1445 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
1446
1447         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1448         line with '+'.
1449
1450 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1451
1452         * riscv-tdep.c: Add 'prologue-value.h' include.
1453         (struct riscv_unwind_cache): New struct.
1454         (riscv_debug_unwinder): New global.
1455         (riscv_scan_prologue): Update arguments, capture register details
1456         from prologue scan.
1457         (riscv_skip_prologue): Reformat arguments line, move end of
1458         prologue calculation into riscv_scan_prologue.
1459         (riscv_frame_cache): Update return type, create
1460         riscv_unwind_cache, scan the prologue, and fill in remaining cache
1461         details.
1462         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1463         (riscv_frame_prev_register): Use the trad_frame within the
1464         riscv_unwind_cache.
1465         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1466         flag.
1467
1468 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1469
1470         * trad-frame.h (trad_frame_set_realreg): Declare.
1471         (trad_frame_set_addr): Declare.
1472         * trad-frame.c (trad_frame_set_realreg): Define new function.
1473         (trad_frame_set_addr): Define new function.
1474         (trad_frame_set_reg_realreg): Use new function.
1475         (trad_frame_set_reg_addr): Use new function.
1476
1477 2018-09-01  Keith Seitz  <keiths@redhat.com>
1478
1479         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1480         pulongest instead of "%lld".
1481         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1482         ATTRIBUTE_UNUSED.
1483
1484 2018-08-31  Tom Tromey  <tom@tromey.com>
1485
1486         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1487         variant part type.
1488
1489 2018-08-31  Pedro Alves  <palves@redhat.com>
1490
1491         * gdbarch.h: Regenerate.
1492
1493 2018-08-31  Pedro Alves  <palves@redhat.com>
1494
1495         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1496         * target.h (Hardware watchpoint interfaces): Describe
1497         continuable/steppable/non-steppable watchpoints.
1498         * gdbarch.h, gdbarch.c: Regenerate.
1499
1500 2018-08-31  Pedro Alves  <palves@redhat.com>
1501
1502         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1503         Delete.
1504         * s390-linux-nat.c
1505         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1506         * target.h (target_ops::have_continuable_watchpoint): Delete.
1507         (target_have_continuable_watchpoint): Delete.
1508         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1509         * target-delegates.c: Regenerate.
1510
1511 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1512
1513         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1514         the files present in "gnulib/import/m4/".
1515
1516 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1517
1518         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1519         c.sw, c.swsp, and c.sdsp.
1520
1521 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1522
1523         * riscv-tdep.c (struct riscv_inferior_data): Delete.
1524         (riscv_read_misa_reg): Don't cache value read into inferior data.
1525         (riscv_new_inferior_data): Delete.
1526         (riscv_inferior_data_cleanup): Delete.
1527         (riscv_inferior_data): Delete.
1528         (riscv_invalidate_inferior_data): Delete.
1529         (_initialize_riscv_tdep): Remove initialisation of inferior data.
1530
1531 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
1532
1533         * compile/compile-cplus-types.c
1534         (compile_cplus_instance::leave_scope): Take the address of scope
1535         object.
1536         (compile_cplus_instance::convert_qualified_base): Compare quals
1537         to 0.
1538
1539 2018-08-30  Keith Seitz  <keiths@redhat.com>
1540
1541         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1542         Use "%s" and host_address_to_string instead of "%p" in printf.
1543
1544 2018-08-29  Keith Seitz  <keiths@redhat.com>
1545
1546         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1547         and compile-cplus-types.c.
1548         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1549         * c-lang.c (cplus_language_defn): Set C++ compile functions.
1550         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1551         Declare.
1552         * compile/compile-c-support.c: Include compile-cplus.h.
1553         (load_libcompile): Templatize.
1554         (get_compile_context): "New" function.
1555         (c_get_compile_context): Use get_compile_context.
1556         (cplus_get_compile_context): New function.
1557         (cplus_push_user_expression, cplus_pop_user_expression)
1558         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1559         (cplus_compute_program): Define new structs/functions.
1560         * compile/compile-cplus-symmbols.c: New file.
1561         * compile/compile-cplus-types.c: New file.
1562         * compile/compile-cplus.h: New file.
1563         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1564         Declare.
1565         * compile/compile-object-load.c (get_out_value_type): Use
1566         strncmp_iw when comparing symbol names.
1567         (compile_object_load): Add mst_bss and mst_data.
1568         * compile/compile.c (_initialize_compile): Remove
1569         -Wno-implicit-function-declaration from `compile_args'.
1570         * compile/gcc-cp-plugin.h: New file.
1571         * NEWS: Mention C++ compile support and new debug options.
1572
1573 2018-08-29  Keith Seitz  <keiths@redhat.com>
1574
1575         * linespec.c (collect_info::add_symbol): Make virtual.
1576         (struct symbol_searcher_collect_info): New struct.
1577         (symbol_searcher::find_all_symbols): New method.
1578         * symtab.h (class symbol_searcher): New class.
1579
1580 2018-08-29  Keith Seitz  <keiths@redhat.com>
1581
1582         * linespec.c (struct linespec) <function_symbols, label_symbols>:
1583         Change to vector of block_symbol.  Update all users.
1584         (struct collect_info) <symbols>: Likewise.
1585         (collect_info::add_symbol): Take block_symbol as argument.
1586         Update all callers.
1587         (decode_compound_collector) <m_symbols>: Change type to vector
1588         of block_symbol.  Update all users.
1589         (decode_compound_collector::operator ()): Change parameter type
1590         to block_symbol.
1591         (find_method, find_function_symbols, find_linespec_symbols)
1592         (find_label_symbols_in_block, find_label_symbols): Change symbol
1593         vectors to block_symbol vectors.
1594         * symtab.h (symbol_found_callback_ftype): Change parameter type to
1595         block_symbol.
1596
1597 2018-08-29  Keith Seitz  <keiths@redhat.com>
1598
1599         * linespec.c (symbolp): Remove typedef and VEC definitions.
1600         (bound_minimal_symbol_d): Likewise.
1601
1602 2018-08-29  Keith Seitz  <keiths@redhat.com>
1603
1604         * linespec.c (decode_compound_collector::decode_compound_collector):
1605         Remove initialization for `m_symtabs'.
1606         (decode_compound_collector::release_symbols): Change return type
1607         to std::vector.  Update all callers.
1608         (class decode_compound_collector) <m_symbols>: Change type to
1609         std::vector.
1610         (lookup_prefix_sym): Change return type to std::vector.  Update all
1611         callers.
1612         (compare_symbols): Remove.
1613         (std_compare_symbols): Rename to `compare_symbols'.
1614         (find_method): Change `sym_classes' parameter to std::vector.
1615         Update all callers.  Use std::sort to sort sym_classes.
1616         (find_linespec_symbols): Remove cleanup.
1617
1618 2018-08-29  Keith Seitz  <keiths@redhat.com>
1619
1620         * linespec.c (struct linespec) <minimal_symbols>: Change type to
1621         std::vector.  Update all users.
1622         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1623         (struct collect_info) <minimal_symbols>: Likewise.
1624         (compare_msymbols): Return bool.  Change parameters to const
1625         bound_minimal_symbol references.
1626         (find_method, find_function_symbols, find_linespec_symbols): Change
1627         `minsyms' parameter to std::vector.  Update all callers.
1628
1629 2018-08-29  Keith Seitz  <keiths@redhat.com>
1630
1631         * linespec.c (struct linespec) <label_symbols>: Change type to
1632         std::vector.  Update all users.
1633         (find_label_symbols_in_block): Change `result' parameter to
1634         std::vector.  Update all callers.
1635         (find_label_symbols): Return std::vector.  Update all callers.
1636
1637 2018-08-29  Keith Seitz  <keiths@redhat.com>
1638
1639         * linespec.c (struct linespec) <function_symbols>: Change type to
1640         std::vector.  Update all users.
1641         (struct collect_info) <function_symbols>: Likewise.
1642         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1643         (std_compare_symbols): New function.
1644         (find_method, find_function_symbols, find_linespec_symbols)
1645         (find_label_symbols_in_block): Change `symbols' parameter to
1646         std::vector.  Update all callers.
1647         (find_label_symbols): Likewise for `function_symbols' and
1648         `label_funcs_ret'.
1649
1650 2018-08-29  Keith Seitz  <keiths@redhat.com>
1651
1652         * linespec.c (symtab_vector_up): Define.
1653         (struct linespec) <file_symtabs>: Change type to std::vector *.
1654         Update all uses.
1655         (struct collect_info) <file_symtabs>: Likewise.
1656         (collect_symtabs_from_filename): Return symtab_vector_up.
1657         Update all callers.
1658         (decode_objc): Remove cleanup.
1659         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1660         (symtab_collector::release_symtabs): Return symtab_vector_up.
1661         Update all callers.
1662         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1663         Update all users.
1664         (collect_symtabs_from_filename, symtabs_from_filename): Return
1665         symtab_vector_up.  Update all callers.
1666
1667 2018-08-29  Tom Tromey  <tom@tromey.com>
1668
1669         * csky-tdep.c (csky_analyze_prologue): Use
1670         core_addr_to_string_nz.
1671
1672 2018-08-29  Tom Tromey  <tom@tromey.com>
1673
1674         * windows-nat.c (struct xlate_exception) <them>: Change type to
1675         DWORD.
1676         (xlate): Fix formatting.  Remove last entry.
1677         (struct xlate_exception, xlate): Comment out.
1678         (windows_nat_target::resume): Use ranged for.
1679
1680 2018-08-29  Jim Wilson  <jimw@sifive.com>
1681
1682         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1683         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1684         of NT_PRFPREG.
1685         (riscv_linux_nat_target::store_registers): Likewise.
1686
1687 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1688
1689         PR gdb/23555
1690         PR gdb/23558
1691         * gnulib/aclocal.m4: Regenerate.
1692         * gnulib/config.in: Regenerate.
1693         * gnulib/configure: Regenerate.
1694         * gnulib/import/Makefile.am: Update.
1695         * gnulib/import/Makefile.in: Update.
1696         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1697         * gnulib/import/_Noreturn.h: ... this.
1698         * gnulib/import/alloca.in.h: Update.
1699         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1700         * gnulib/import/arg-nonnull.h: ... this.
1701         * gnulib/import/assure.h: Update.
1702         * gnulib/import/at-func.c: Update.
1703         * gnulib/import/basename-lgpl.c: Update.
1704         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1705         * gnulib/import/c++defs.h: ... this.
1706         * gnulib/import/canonicalize-lgpl.c: Update.
1707         * gnulib/import/cdefs.h: Update.
1708         * gnulib/import/chdir-long.c: Update.
1709         * gnulib/import/chdir-long.h: Update.
1710         * gnulib/import/cloexec.c: Update.
1711         * gnulib/import/cloexec.h: Update.
1712         * gnulib/import/close.c: Update.
1713         * gnulib/import/closedir.c: Update.
1714         * gnulib/import/config.charset: Update.
1715         * gnulib/import/dirent-private.h: Update.
1716         * gnulib/import/dirent.in.h: Update.
1717         * gnulib/import/dirfd.c: Update.
1718         * gnulib/import/dirname-lgpl.c: Update.
1719         * gnulib/import/dirname.h: Update.
1720         * gnulib/import/dosname.h: Update.
1721         * gnulib/import/dup-safer-flag.c: Update.
1722         * gnulib/import/dup-safer.c: Update.
1723         * gnulib/import/dup.c: Update.
1724         * gnulib/import/dup2.c: Update.
1725         * gnulib/import/errno.in.h: Update.
1726         * gnulib/import/error.c: Update.
1727         * gnulib/import/error.h: Update.
1728         * gnulib/import/exitfail.c: Update.
1729         * gnulib/import/exitfail.h: Update.
1730         * gnulib/import/extra/update-copyright: Update.
1731         * gnulib/import/fchdir.c: Update.
1732         * gnulib/import/fcntl.c: Update.
1733         * gnulib/import/fcntl.in.h: Update.
1734         * gnulib/import/fd-hook.c: Update.
1735         * gnulib/import/fd-hook.h: Update.
1736         * gnulib/import/fd-safer-flag.c: Update.
1737         * gnulib/import/fd-safer.c: Update.
1738         * gnulib/import/fdopendir.c: Update.
1739         * gnulib/import/filename.h: Update.
1740         * gnulib/import/filenamecat-lgpl.c: Update.
1741         * gnulib/import/filenamecat.h: Update.
1742         * gnulib/import/flexmember.h: Update.
1743         * gnulib/import/float+.h: Update.
1744         * gnulib/import/float.c: Update.
1745         * gnulib/import/float.in.h: Update.
1746         * gnulib/import/fnmatch.c: Update.
1747         * gnulib/import/fnmatch.in.h: Update.
1748         * gnulib/import/fnmatch_loop.c: Update.
1749         * gnulib/import/fpucw.h: Update.
1750         * gnulib/import/frexp.c: Update.
1751         * gnulib/import/frexpl.c: Update.
1752         * gnulib/import/fstat.c: Update.
1753         * gnulib/import/fstatat.c: Update.
1754         * gnulib/import/getcwd-lgpl.c: Update.
1755         * gnulib/import/getcwd.c: Update.
1756         * gnulib/import/getdtablesize.c: Update.
1757         * gnulib/import/getlogin_r.c: Update.
1758         * gnulib/import/getprogname.c: Update.
1759         * gnulib/import/getprogname.h: Update.
1760         * gnulib/import/gettext.h: Update.
1761         * gnulib/import/gettimeofday.c: Update.
1762         * gnulib/import/glob-libc.h: Update.
1763         * gnulib/import/glob.c: Update.
1764         * gnulib/import/glob.in.h: Update.
1765         * gnulib/import/glob_internal.h: Update.
1766         * gnulib/import/glob_pattern_p.c: Update.
1767         * gnulib/import/globfree.c: Update.
1768         * gnulib/import/hard-locale.c: Update.
1769         * gnulib/import/hard-locale.h: Update.
1770         * gnulib/import/intprops.h: Update.
1771         * gnulib/import/inttypes.in.h: Update.
1772         * gnulib/import/isnan.c: Update.
1773         * gnulib/import/isnand-nolibm.h: Update.
1774         * gnulib/import/isnand.c: Update.
1775         * gnulib/import/isnanl-nolibm.h: Update.
1776         * gnulib/import/isnanl.c: Update.
1777         * gnulib/import/itold.c: Update.
1778         * gnulib/import/libc-config.h: Update.
1779         * gnulib/import/limits.in.h: Update.
1780         * gnulib/import/localcharset.c: Update.
1781         * gnulib/import/localcharset.h: Update.
1782         * gnulib/import/localtime-buffer.c: Update.
1783         * gnulib/import/localtime-buffer.h: Update.
1784         * gnulib/import/lstat.c: Update.
1785         * gnulib/import/m4/00gnulib.m4: Update.
1786         * gnulib/import/m4/__inline.m4: Update.
1787         * gnulib/import/m4/absolute-header.m4: Update.
1788         * gnulib/import/m4/alloca.m4: Update.
1789         * gnulib/import/m4/builtin-expect.m4: Update.
1790         * gnulib/import/m4/canonicalize.m4: Update.
1791         * gnulib/import/m4/chdir-long.m4: Update.
1792         * gnulib/import/m4/close.m4: Update.
1793         * gnulib/import/m4/closedir.m4: Update.
1794         * gnulib/import/m4/configmake.m4: Update.
1795         * gnulib/import/m4/d-ino.m4: Update.
1796         * gnulib/import/m4/d-type.m4: Update.
1797         * gnulib/import/m4/dirent_h.m4: Update.
1798         * gnulib/import/m4/dirfd.m4: Update.
1799         * gnulib/import/m4/dirname.m4: Update.
1800         * gnulib/import/m4/double-slash-root.m4: Update.
1801         * gnulib/import/m4/dup.m4: Update.
1802         * gnulib/import/m4/dup2.m4: Update.
1803         * gnulib/import/m4/eealloc.m4: Update.
1804         * gnulib/import/m4/environ.m4: Update.
1805         * gnulib/import/m4/errno_h.m4: Update.
1806         * gnulib/import/m4/error.m4: Update.
1807         * gnulib/import/m4/exponentd.m4: Update.
1808         * gnulib/import/m4/exponentl.m4: Update.
1809         * gnulib/import/m4/extensions.m4: Update.
1810         * gnulib/import/m4/extern-inline.m4: Update.
1811         * gnulib/import/m4/fchdir.m4: Update.
1812         * gnulib/import/m4/fcntl-o.m4: Update.
1813         * gnulib/import/m4/fcntl.m4: Update.
1814         * gnulib/import/m4/fcntl_h.m4: Update.
1815         * gnulib/import/m4/fdopendir.m4: Update.
1816         * gnulib/import/m4/filenamecat.m4: Update.
1817         * gnulib/import/m4/flexmember.m4: Update.
1818         * gnulib/import/m4/float_h.m4: Update.
1819         * gnulib/import/m4/fnmatch.m4: Update.
1820         * gnulib/import/m4/fnmatch_h.m4: Update.
1821         * gnulib/import/m4/fpieee.m4: Update.
1822         * gnulib/import/m4/frexp.m4: Update.
1823         * gnulib/import/m4/frexpl.m4: Update.
1824         * gnulib/import/m4/fstat.m4: Update.
1825         * gnulib/import/m4/fstatat.m4: Update.
1826         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1827         * gnulib/import/m4/getcwd-path-max.m4: Update.
1828         * gnulib/import/m4/getcwd.m4: Update.
1829         * gnulib/import/m4/getdtablesize.m4: Update.
1830         * gnulib/import/m4/getlogin.m4: Update.
1831         * gnulib/import/m4/getlogin_r.m4: Update.
1832         * gnulib/import/m4/getpagesize.m4: Update.
1833         * gnulib/import/m4/getprogname.m4: Update.
1834         * gnulib/import/m4/gettimeofday.m4: Update.
1835         * gnulib/import/m4/glibc21.m4: Update.
1836         * gnulib/import/m4/glob.m4: Update.
1837         * gnulib/import/m4/glob_h.m4: Update.
1838         * gnulib/import/m4/gnulib-cache.m4: Update.
1839         * gnulib/import/m4/gnulib-common.m4: Update.
1840         * gnulib/import/m4/gnulib-comp.m4: Update.
1841         * gnulib/import/m4/gnulib-tool.m4: Update.
1842         * gnulib/import/m4/hard-locale.m4: Update.
1843         * gnulib/import/m4/include_next.m4: Update.
1844         * gnulib/import/m4/inttypes-pri.m4: Update.
1845         * gnulib/import/m4/inttypes.m4: Update.
1846         * gnulib/import/m4/isnand.m4: Update.
1847         * gnulib/import/m4/isnanl.m4: Update.
1848         * gnulib/import/m4/largefile.m4: Update.
1849         * gnulib/import/m4/limits-h.m4: Update.
1850         * gnulib/import/m4/localcharset.m4: Update.
1851         * gnulib/import/m4/locale-fr.m4: Update.
1852         * gnulib/import/m4/locale-ja.m4: Update.
1853         * gnulib/import/m4/locale-zh.m4: Update.
1854         * gnulib/import/m4/localtime-buffer.m4: Update.
1855         * gnulib/import/m4/longlong.m4: Update.
1856         * gnulib/import/m4/lstat.m4: Update.
1857         * gnulib/import/m4/malloc.m4: Update.
1858         * gnulib/import/m4/malloca.m4: Update.
1859         * gnulib/import/m4/math_h.m4: Update.
1860         * gnulib/import/m4/mbrtowc.m4: Update.
1861         * gnulib/import/m4/mbsinit.m4: Update.
1862         * gnulib/import/m4/mbsrtowcs.m4: Update.
1863         * gnulib/import/m4/mbstate_t.m4: Update.
1864         * gnulib/import/m4/memchr.m4: Update.
1865         * gnulib/import/m4/memmem.m4: Update.
1866         * gnulib/import/m4/mempcpy.m4: Update.
1867         * gnulib/import/m4/memrchr.m4: Update.
1868         * gnulib/import/m4/mkdir.m4: Update.
1869         * gnulib/import/m4/mkstemp.m4: Update.
1870         * gnulib/import/m4/mmap-anon.m4: Update.
1871         * gnulib/import/m4/mode_t.m4: Update.
1872         * gnulib/import/m4/msvc-inval.m4: Update.
1873         * gnulib/import/m4/msvc-nothrow.m4: Update.
1874         * gnulib/import/m4/multiarch.m4: Update.
1875         * gnulib/import/m4/nocrash.m4: Update.
1876         * gnulib/import/m4/off_t.m4: Update.
1877         * gnulib/import/m4/onceonly.m4: Update.
1878         * gnulib/import/m4/open-cloexec.m4: Update.
1879         * gnulib/import/m4/open.m4: Update.
1880         * gnulib/import/m4/openat.m4: Update.
1881         * gnulib/import/m4/opendir.m4: Update.
1882         * gnulib/import/m4/pathmax.m4: Update.
1883         * gnulib/import/m4/rawmemchr.m4: Update.
1884         * gnulib/import/m4/readdir.m4: Update.
1885         * gnulib/import/m4/readlink.m4: Update.
1886         * gnulib/import/m4/realloc.m4: Update.
1887         * gnulib/import/m4/rename.m4: Update.
1888         * gnulib/import/m4/rewinddir.m4: Update.
1889         * gnulib/import/m4/rmdir.m4: Update.
1890         * gnulib/import/m4/save-cwd.m4: Update.
1891         * gnulib/import/m4/secure_getenv.m4: Update.
1892         * gnulib/import/m4/setenv.m4: Update.
1893         * gnulib/import/m4/signal_h.m4: Update.
1894         * gnulib/import/m4/ssize_t.m4: Update.
1895         * gnulib/import/m4/stat-time.m4: Update.
1896         * gnulib/import/m4/stat.m4: Update.
1897         * gnulib/import/m4/std-gnu11.m4: Update.
1898         * gnulib/import/m4/stdbool.m4: Update.
1899         * gnulib/import/m4/stddef_h.m4: Update.
1900         * gnulib/import/m4/stdint.m4: Update.
1901         * gnulib/import/m4/stdio_h.m4: Update.
1902         * gnulib/import/m4/stdlib_h.m4: Update.
1903         * gnulib/import/m4/strchrnul.m4: Update.
1904         * gnulib/import/m4/strdup.m4: Update.
1905         * gnulib/import/m4/strerror.m4: Update.
1906         * gnulib/import/m4/string_h.m4: Update.
1907         * gnulib/import/m4/strstr.m4: Update.
1908         * gnulib/import/m4/strtok_r.m4: Update.
1909         * gnulib/import/m4/sys_socket_h.m4: Update.
1910         * gnulib/import/m4/sys_stat_h.m4: Update.
1911         * gnulib/import/m4/sys_time_h.m4: Update.
1912         * gnulib/import/m4/sys_types_h.m4: Update.
1913         * gnulib/import/m4/tempname.m4: Update.
1914         * gnulib/import/m4/time_h.m4: Update.
1915         * gnulib/import/m4/unistd-safer.m4: Update.
1916         * gnulib/import/m4/unistd_h.m4: Update.
1917         * gnulib/import/m4/warn-on-use.m4: Update.
1918         * gnulib/import/m4/wchar_h.m4: Update.
1919         * gnulib/import/m4/wchar_t.m4: Update.
1920         * gnulib/import/m4/wctype_h.m4: Update.
1921         * gnulib/import/m4/wint_t.m4: Update.
1922         * gnulib/import/malloc.c: Update.
1923         * gnulib/import/malloc/scratch_buffer.h: Update.
1924         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1925         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1926         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1927         * gnulib/import/malloca.c: Update.
1928         * gnulib/import/malloca.h: Update.
1929         * gnulib/import/malloca.valgrind: Update.
1930         * gnulib/import/math.in.h: Update.
1931         * gnulib/import/mbrtowc.c: Update.
1932         * gnulib/import/mbsinit.c: Update.
1933         * gnulib/import/mbsrtowcs-impl.h: Update.
1934         * gnulib/import/mbsrtowcs-state.c: Update.
1935         * gnulib/import/mbsrtowcs.c: Update.
1936         * gnulib/import/memchr.c: Update.
1937         * gnulib/import/memmem.c: Update.
1938         * gnulib/import/mempcpy.c: Update.
1939         * gnulib/import/memrchr.c: Update.
1940         * gnulib/import/mkdir.c: Update.
1941         * gnulib/import/mkstemp.c: Update.
1942         * gnulib/import/msvc-inval.c: Update.
1943         * gnulib/import/msvc-inval.h: Update.
1944         * gnulib/import/msvc-nothrow.c: Update.
1945         * gnulib/import/msvc-nothrow.h: Update.
1946         * gnulib/import/open.c: Update.
1947         * gnulib/import/openat-die.c: Update.
1948         * gnulib/import/openat-priv.h: Update.
1949         * gnulib/import/openat-proc.c: Update.
1950         * gnulib/import/openat.c: Update.
1951         * gnulib/import/openat.h: Update.
1952         * gnulib/import/opendir.c: Update.
1953         * gnulib/import/pathmax.h: Update.
1954         * gnulib/import/pipe-safer.c: Update.
1955         * gnulib/import/rawmemchr.c: Update.
1956         * gnulib/import/readdir.c: Update.
1957         * gnulib/import/readlink.c: Update.
1958         * gnulib/import/realloc.c: Update.
1959         * gnulib/import/ref-add.sin: Update.
1960         * gnulib/import/ref-del.sin: Update.
1961         * gnulib/import/rename.c: Update.
1962         * gnulib/import/rewinddir.c: Update.
1963         * gnulib/import/rmdir.c: Update.
1964         * gnulib/import/same-inode.h: Update.
1965         * gnulib/import/save-cwd.c: Update.
1966         * gnulib/import/save-cwd.h: Update.
1967         * gnulib/import/scratch_buffer.h: Update.
1968         * gnulib/import/secure_getenv.c: Update.
1969         * gnulib/import/setenv.c: Update.
1970         * gnulib/import/signal.in.h: Update.
1971         * gnulib/import/stat-time.c: Update.
1972         * gnulib/import/stat-time.h: Update.
1973         * gnulib/import/stat-w32.c: Update.
1974         * gnulib/import/stat-w32.h: Update.
1975         * gnulib/import/stat.c: Update.
1976         * gnulib/import/stdbool.in.h: Update.
1977         * gnulib/import/stddef.in.h: Update.
1978         * gnulib/import/stdint.in.h: Update.
1979         * gnulib/import/stdio.in.h: Update.
1980         * gnulib/import/stdlib.in.h: Update.
1981         * gnulib/import/str-two-way.h: Update.
1982         * gnulib/import/strchrnul.c: Update.
1983         * gnulib/import/strdup.c: Update.
1984         * gnulib/import/streq.h: Update.
1985         * gnulib/import/strerror-override.c: Update.
1986         * gnulib/import/strerror-override.h: Update.
1987         * gnulib/import/strerror.c: Update.
1988         * gnulib/import/string.in.h: Update.
1989         * gnulib/import/stripslash.c: Update.
1990         * gnulib/import/strnlen1.c: Update.
1991         * gnulib/import/strnlen1.h: Update.
1992         * gnulib/import/strstr.c: Update.
1993         * gnulib/import/strtok_r.c: Update.
1994         * gnulib/import/sys_stat.in.h: Update.
1995         * gnulib/import/sys_time.in.h: Update.
1996         * gnulib/import/sys_types.in.h: Update.
1997         * gnulib/import/tempname.c: Update.
1998         * gnulib/import/tempname.h: Update.
1999         * gnulib/import/time.in.h: Update.
2000         * gnulib/import/unistd--.h: Update.
2001         * gnulib/import/unistd-safer.h: Update.
2002         * gnulib/import/unistd.in.h: Update.
2003         * gnulib/import/unsetenv.c: Update.
2004         * gnulib/import/verify.h: Update.
2005         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2006         * gnulib/import/wchar.in.h: Update.
2007         * gnulib/import/wctype.in.h: Update.
2008         * gnulib/import/xalloc-oversized.h: Update.
2009         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2010         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2011
2012 2018-08-16  Gary Benson <gbenson@redhat.com>
2013
2014         PR gdb/13000:
2015         * gdb/main.c (captured_main_1): Exit with nonzero status
2016         in batch mode if the last command to be executed failed.
2017         * NEWS: Mention the above.
2018
2019 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
2020
2021         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2022         end of warning message.
2023
2024 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2025
2026         PR gdb/22943:
2027         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2028         (aarch64_extract_return_value): Use
2029         aapcs_is_vfp_call_or_return_candidate.
2030         (aarch64_return_in_memory): Likewise.
2031         (aarch64_store_return_value): Likewise.
2032
2033 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2034
2035         * aarch64-tdep.c
2036         (aapcs_is_vfp_call_or_return_candidate): Make static
2037         (pass_in_v_or_stack): Remove function.
2038         (pass_in_v_vfp_candidate): New function.
2039         (aarch64_push_dummy_call): Check for float register candidates.
2040
2041 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2042
2043         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2044         (aapcs_is_vfp_call_or_return_candidate_1): New function.
2045         (aapcs_is_vfp_call_or_return_candidate): Likewise.
2046
2047 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
2048
2049         PR build/23399
2050         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2051         (struct ipa_sym_addresses): Rename to...
2052         (struct ipa_sym_addresses_common): ... this.
2053         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2054
2055 2018-08-28  Tom Tromey  <tom@tromey.com>
2056
2057         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2058         (token_fifo): Now a std::vector.
2059         (yylex, c_parse): Update.
2060         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2061         (token_fifo): Now a std::vector.
2062         (yylex, d_parse): Update.
2063         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2064         (token_fifo): Now a std::vector.
2065         (yylex, go_parse): Update.
2066
2067 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
2068
2069         * parser-defs.h (struct type_stack) <elements>: Change type to
2070         std::vector<union type_stack_elt>.
2071         <depth, size>: Remove.
2072         * parse.c (parse_exp_in_context_1): Adjust.
2073         (type_stack_reserve): Remove.
2074         (check_type_stack_depth): Remove.
2075         (insert_into_type_stack): Adjust to std::vector.
2076         (insert_type): Likewise.
2077         (push_type): Likewise.
2078         (push_type_int): Likewise.
2079         (insert_type_address_space): Likewise.
2080         (pop_type): Likewise.
2081         (pop_type_int): Likewise.
2082         (pop_typelist): Likewise.
2083         (pop_type_stack): Likewise.
2084         (append_type_stack): Likewise.
2085         (push_type_stack): Likewise.
2086         (get_type_stack): Likewise.
2087         (type_stack_cleanup): Likewise.
2088         (push_typelist): Likewise.
2089         (follow_types): Likewise.
2090         (_initialize_parse): Likewise.
2091
2092 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2093
2094         * NEWS: Mention csky target.
2095
2096 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
2097             Hafiz Abid Qadeer  <abidh@codesourcery.com>
2098             Don Breazeal  <donb@codesourcery.com>
2099
2100         * csky-linux-tdep.c: New file.
2101         * csky-tdep.c: Likewise.
2102         * csky-tdep.h: Likewise.
2103         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2104         csky-tdep.o.
2105         (HFILES_NO_SRCDIR): Add csky-tdep.h.
2106         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2107         * configure.tgt: Add csky support.
2108
2109 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
2110
2111         * python/py-framefilter.c (py_print_frame): Print frame architecture
2112         when printing on an MI output.
2113
2114 2018-08-27  Tom Tromey  <tom@tromey.com>
2115
2116         PR build/23087:
2117         * configure: Rebuild.
2118         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2119
2120 2018-08-27  Tom Tromey  <tom@tromey.com>
2121
2122         * aarch64-linux-tdep.c
2123         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2124         casts to int.
2125
2126 2018-08-27  Tom Tromey  <tom@tromey.com>
2127
2128         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2129         unsigned.
2130         (ppc64_standard_linkage1, ppc64_standard_linkage2)
2131         (ppc64_standard_linkage3, ppc64_standard_linkage4)
2132         (ppc64_standard_linkage5, ppc64_standard_linkage6)
2133         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2134         unsigned.
2135
2136 2018-08-27  Tom Tromey  <tom@tromey.com>
2137
2138         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2139         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2140
2141 2018-08-27  Tom Tromey  <tom@tromey.com>
2142
2143         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2144         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2145         ULONGEST_MAX.
2146         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2147         ULONGEST_MAX.
2148         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2149         ULONGEST_MAX.
2150         * sparc-linux-tdep.c (sparc32_linux_sigframe)
2151         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2152         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2153         ULONGEST_MAX.
2154         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2155         (ppc64_linux_sigaction_tramp_frame)
2156         (ppc32_linux_sighandler_tramp_frame)
2157         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2158         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2159         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2160         * mn10300-linux-tdep.c (am33_linux_sigframe)
2161         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2162         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2163         * mips-linux-tdep.c (mips_linux_o32_sigframe)
2164         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2165         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2166         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2167         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2168         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2169         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2170         * microblaze-linux-tdep.c
2171         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2172         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2173         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2174         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2175         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2176         * common/common-types.h (ULONGEST_MAX): New define.
2177         (CORE_ADDR_MAX): Fix formatting.
2178         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2179         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2180         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2181         (arm_linux_rt_sigreturn_tramp_frame)
2182         (arm_eabi_linux_sigreturn_tramp_frame)
2183         (arm_eabi_linux_rt_sigreturn_tramp_frame)
2184         (thumb2_eabi_linux_sigreturn_tramp_frame)
2185         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2186         (arm_linux_restart_syscall_tramp_frame)
2187         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2188         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2189         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2190         ULONGEST_MAX.
2191         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2192
2193 2018-08-27  Tom Tromey  <tom@tromey.com>
2194
2195         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2196         CORE_ADDR_MAX.
2197         * mips-tdep.c (mips_deal_with_atomic_sequence)
2198         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2199         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2200         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2201         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2202         CORE_ADDR_MAX.
2203         * aarch64-tdep.c (aarch64_software_single_step): Use
2204         CORE_ADDR_MAX.
2205
2206 2018-08-27  Tom Tromey  <tom@tromey.com>
2207
2208         * linespec.c (complete_linespec_component): Add cast to "char".
2209         * completer.c (completion_tracker::build_completion_result): Add
2210         cast to "char".
2211
2212 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2213
2214         * solist.h (struct solist, struct target_so_ops): Fix
2215         indentation.
2216
2217 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2218
2219         * ada-tasks.c (ada_task_info_s): Remove typedef.
2220         (DEF_VEC_O(ada_task_info_s)): Remove.
2221         (struct ada_tasks_inferior_data): Initialize fields.
2222         <task_list>: Make an std::vector.
2223         (get_ada_tasks_inferior_data): Allocate with new.
2224         (ada_get_task_number): Adjust.
2225         (get_task_number_from_id): Likewise.
2226         (valid_task_id): Likewise.
2227         (ada_get_task_info_from_ptid): Likewise.
2228         (iterate_over_live_ada_tasks): Likewise.
2229         (add_ada_task): Likewise.
2230         (read_known_tasks): Likewise.
2231         (ada_build_task_list): Likewise.
2232         (print_ada_task_info): Likewise.
2233         (info_task): Likewise.
2234         (task_command_1): Likewise.
2235
2236 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2237
2238         * ada-lang.c (add_angle_brackets): Return std::string.
2239
2240 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
2241
2242         * python/py-threadevent.c (py_get_event_thread): Initialize
2243         pythread.
2244
2245 2018-08-24  Pedro Alves  <palves@redhat.com>
2246
2247         * python/py-bpevent.c (create_breakpoint_event_object): Use
2248         copy-initialization.
2249         * python/py-continueevent.c (emit_continue_event): Use
2250         copy-initialization.
2251         * python/py-exitedevent.c (create_exited_event_object): Return a
2252         gdbpy_ref<>.
2253         (emit_exited_event): Use copy-initialization.
2254         * python/py-inferior.c (python_new_inferior)
2255         (python_inferior_deleted, add_thread_object): Use
2256         copy-initialization.
2257         * python/py-infevents.c (create_inferior_call_event_object)
2258         (create_register_changed_event_object)
2259         (create_memory_changed_event_object): Return a gdbpy_ref<>.
2260         (emit_inferior_call_event, emit_memory_changed_event)
2261         (emit_register_changed_event): Use copy-initialization.
2262         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2263         Return a gdbpy_ref<>.
2264         (emit_new_objfile_event): Use copy-initialization.
2265         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2266         (emit_clear_objfiles_event): Use copy-initialization.
2267         * python/py-signalevent.c (create_signal_event_object): Use
2268         copy-initialization.
2269         * python/py-threadevent.c (create_thread_event_object): Use
2270         copy-initialization.
2271
2272 2018-08-24  Pedro Alves  <palves@redhat.com>
2273             Simon Marchi  <simon.marchi@ericsson.com>
2274
2275         PR gdb/23379
2276         * python/py-continueevent.c: Include "gdbthread.h".
2277         (create_continue_event_object): Add intro comment.  Add 'ptid'
2278         parameter.  Use it to find thread to pass to
2279         create_thread_event_object.
2280         (emit_continue_event): Pass PTID down to
2281         create_continue_event_object.
2282         * python/py-event.h (py_get_event_thread): Declare.
2283         (create_thread_event_object): Remove default from 'thread'
2284         parameter.
2285         * python/py-stopevent.c (create_stop_event_object): Use
2286         py_get_event_thread.
2287         * python/py-threadevent.c (get_event_thread): Rename to ...
2288         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2289         and use it to find the thread.
2290         (create_thread_event_object): Assert that THREAD isn't null.
2291         Don't find the event thread here.
2292
2293 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
2294
2295         * block.h (blockrange, blockranges): New struct declarations.
2296         (struct block): Add new field named `ranges'.
2297         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2298         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2299         macros for accessing ranges in struct block.
2300         (make_blockranges): New declaration.
2301         block.c (make_blockranges): New function.
2302         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2303         for block.
2304         * symtab.h (find_pc_partial_function): Add new parameter `block'.
2305         * blockframe.c (cache_pc_function_block): New static global.
2306         (clear_pc_function_cache): Clear cache_pc_function_block.
2307         (find_pc_partial_function): Move comment to symtab.h.  Add
2308         support for non-contiguous blocks.
2309         * cli/cli-cmds.c (block.h): Include.
2310         (print_disassembly): Handle printing of non-contiguous blocks.
2311         (disassemble_current_function): Likewise.
2312         (disassemble_command): Likewise.
2313
2314         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2315         BLOCK_START.
2316         * blockframe.c (get_pc_function_start): Likewise.
2317         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2318         (gcc_symbol_address): Likewise.
2319         * compile/compile-object-run.c (compile_object_run): Likewise.
2320         * compile/compile.c (get_expr_block_and_pc): Likewise.
2321         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2322         (func_addr_to_tail_call_list): Likewise.
2323         * findvar.c (default_read_var_value): Likewise.
2324         * inline-frame.c (inline_frame_this_id): Likewise.
2325         (skip-inline_frames): Likewise.
2326         * infcmd.c (until_next_command): Likewise.
2327         * linespec.c (convert_linespec_to_sals): Likewise.
2328         * parse.c (parse_exp_in_context_1): Likewise.
2329         * printcmd.c (build_address_symbolic): likewise.
2330         (info_address_command): Likewise.
2331         symtab.c (find_function_start_sal): Likewise.
2332         (skip_prologue_sal): Likewise.
2333         (find_function_alias_target): Likewise.
2334         (find_gnu_ifunc): Likewise.
2335         * stack.c (find_frame_funname): Likewise.
2336         * symtab.c (fixup_symbol_section): Likewise.
2337         (find_function_start_sal): Likewise.
2338         (skip_prologue_sal): Likewsie.
2339         (find_function_alias_target): Likewise.
2340         (find_gnu_ifunc): Likewise.
2341         * tracepoint.c (info_scope_command): Likewise.
2342         * value.c (value_fn_field): Likewise.
2343
2344         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2345         in place of find_pc_partial_function.
2346         * blockframe.c (find_function_entry_range_from_pc): New function.
2347         * symtab.h (find_function_entry_range_from_pc): Declare and document.
2348         * objfiles.c (objfile_relocate1): Relocate start and end addresses
2349         for each range in a block.
2350
2351
2352 2018-08-23  Xavier Roirand  <roirand@adacore.com>
2353
2354         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2355         incrementation.
2356
2357 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2358
2359         * solib-svr4.c (read_program_headers_from_bfd): Return
2360         gdb::optional<gdb::byte_vector>.
2361         (svr4_exec_displacement): Adjust.
2362
2363 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2364
2365         * solib-svr4.c (read_program_header): Return
2366         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2367         (find_program_interpreter): Return
2368         gdb::optional<gdb::byte_vector>.
2369         (scan_dyntag_auxv): Adjust.
2370         (enable_break): Adjust.
2371         (svr4_exec_displacement): Adjust.
2372
2373 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2374
2375         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2376         * inf-child.c (inf_child_target::terminal_save_inferior): New.
2377
2378 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2379
2380         * guile/scm-string.c (gdbscm_scm_from_printf): Use
2381         string_vprintf.
2382         * guile/scm-utils.c (gdbscm_printf): Likewise.
2383         * serial.c (serial_printf): Likewise.
2384         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2385
2386 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
2387
2388         * stack.c (print_frame): Print frame architecture when printing on
2389         an MI output.
2390         * NEWS: Mention new "arch" attribute in frame output.
2391
2392 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2393
2394         * arch/aarch64.h (aarch64_regnum): Update comment.
2395
2396 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2397
2398         * NEWS: Add SVE to 8.2 section.
2399
2400 2018-08-21  Pedro Alves  <palves@redhat.com>
2401
2402         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2403         out from gdbscm_parse_function_args.
2404         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2405         gdbscm_parse_function_args_1.
2406
2407 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
2408
2409         PR gdb/17816
2410         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2411         operator.
2412
2413 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
2414
2415         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2416
2417 2018-08-19  Michael Spang  <spang@google.com>
2418
2419         PR gdb/11786
2420         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2421         for PT_TLS segments.
2422
2423 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
2424
2425         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2426         dwarf_variable_value.
2427         * dwarf2-frame.c (class dwarf_expr_executor):
2428         Add override for dwarf_variable_value.
2429         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2430         (class symbol_needs_eval_context): Likewise.
2431         (indirect_synthetic_pointer): Add forward declaration.
2432         (sect_variable_value): New function.
2433         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2434         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2435         for DW_OP_GNU_variable_value.
2436
2437 2018-08-16  Tom Tromey  <tom@tromey.com>
2438
2439         * top.c (read_command_file): Update.
2440         (command_line_input): Remove "repeat" argument.
2441         * ada-lang.c (get_selections): Update.
2442         * linespec.c (decode_line_2): Update.
2443         * defs.h (command_line_input): Remove argument.
2444         * cli/cli-script.c (read_next_line): Update.
2445         * python/py-gdb-readline.c: Update.
2446
2447 2018-08-17  Tom Tromey  <tom@tromey.com>
2448
2449         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2450         command_line_input.
2451
2452 2018-08-15  Tom Tromey  <tom@tromey.com>
2453
2454         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2455
2456 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
2457
2458         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2459         If used, use find_pc_partial_function to find address range
2460         to disassemble.
2461         * mi/mi-main.c (mi_cmd_list_features): Report
2462         "data-disassemble-a-option" feature.
2463         * NEWS: Mention new -data-disassemble option -a.
2464
2465 2018-08-13  Tom Tromey  <tom@tromey.com>
2466
2467         * common/common-defs.h (_FORTIFY_SOURCE): Define.
2468
2469 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2470
2471         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2472         (aarch64_linux_collect_sve_regset): Likewise.
2473         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2474         * regcache.h (regcache_map_entry_size): New function.
2475
2476 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2477
2478         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2479         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2480         (SVE_HEADER_VL_LENGTH): Likewise.
2481         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2482         (SVE_HEADER_FLAGS_LENGTH): Likewise.
2483         (SVE_HEADER_RESERVED_LENGTH): Likewise.
2484         (SVE_HEADER_SIZE_OFFSET): Likewise.
2485         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2486         (SVE_HEADER_VL_OFFSET): Likewise.
2487         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2488         (SVE_HEADER_FLAGS_OFFSET): Likewise.
2489         (SVE_HEADER_RESERVED_OFFSET): Likewise.
2490         (SVE_HEADER_SIZE): Likewise.
2491         (aarch64_linux_core_read_vq): Add function.
2492         (aarch64_linux_core_read_description): Check for SVE section.
2493
2494 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2495
2496         * aarch64-fbsd-tdep.c
2497         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2498         collect_size.
2499         * aarch64-linux-tdep.c
2500         (aarch64_linux_iterate_over_regset_sections): Likewise.
2501         * alpha-linux-tdep.c
2502         (alpha_linux_iterate_over_regset_sections):
2503         * alpha-nbsd-tdep.c
2504         (alphanbsd_iterate_over_regset_sections): Likewise.
2505         * amd64-fbsd-tdep.c
2506         (amd64fbsd_iterate_over_regset_sections): Likewise.
2507         * amd64-linux-tdep.c
2508         (amd64_linux_iterate_over_regset_sections): Likewise.
2509         * arm-bsd-tdep.c
2510         (armbsd_iterate_over_regset_sections): Likewise.
2511         * arm-fbsd-tdep.c
2512         (arm_fbsd_iterate_over_regset_sections): Likewise.
2513         * arm-linux-tdep.c
2514         (arm_linux_iterate_over_regset_sections): Likewise.
2515         * corelow.c (get_core_registers_cb): Likewise.
2516         (core_target::fetch_registers): Likewise.
2517         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2518         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2519         * gdbarch.h (void): Regenerate.
2520         * gdbarch.sh: Add supply_size and collect_size.
2521         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2522         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2523         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2524         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2525         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2526         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2527         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2528         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2529         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2530         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2531         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2532         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2533         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2534         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2535         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2536         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2537         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2538         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2539         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2540         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2541         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2542         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2543         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2544         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2545         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2546         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2547         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2548         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2549         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2550         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2551
2552 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
2553
2554         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2555         with string_printf.
2556
2557 2018-08-10  Keith Seitz  <keiths@redhat.com>
2558
2559         * compile/compile-c-support.c (add_code_header, add_code_footer):
2560         Move into policy class.
2561         (c_push_user_expression, pop_user_expression_nop)
2562         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2563         (compile_program): New host class.
2564         (c_compile_program): New typedef.
2565         (c_compute_porgram): Use c_compile_program.
2566
2567 2018-08-10  Keith Seitz  <keiths@redhat.com>
2568
2569         * compile/compile-internal.h (compile_instance::~compile_instance):
2570         Remove calls to htab_delete.
2571         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2572         * compile.c (compile_instance::compile_instance): Initialize
2573         htab unique pointers.
2574         (compile_instance::get_cached_type, compile_instance::insert_type)
2575         (compile_instance::error_symbol_once): Update for unique_ptr.
2576
2577 2018-08-10  Keith Seitz  <keiths@redhat.com>
2578
2579         * compile/compile-c-symbols.c (struct symbol_error)
2580         (hash_symbol_error, eq_symbol_error, del_symbol_error)
2581         (compile_instance::insert_symbol_error)
2582         (compile_instance::error_symbol_once): Move to ...
2583         * compile/compile.c: ... here.
2584
2585 2018-08-10  Keith Seitz  <keiths@redhat.com>
2586
2587         * compile/compile-c-support.c (c_get_compile_context): Use `new'
2588         instead of `new_compile_instance'.
2589         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2590         Update description.
2591         If the symbol error map is not initialized, create it.
2592         (generate_c_for_for_one_symbol): Do not check/initialize
2593         the symbol error map.
2594         * compile/compile-c-types.c (compile_c_instance): Make a class.
2595         Update all callers.
2596         (compile_instance::compile_instance): Initialize the type cache.
2597         (get_cached_type): New function.
2598         (insert_type): Update description.
2599         (compile_c_instance::m_default_cflags): Define.
2600         (convert_type): Update description.  Use get_cached_type.
2601         (delete_instance): Moved to destructor.
2602         (new_compile_instance): Moved to constructor.
2603         * compile/compile-c.h (compile_c_instance): Make class inheriting
2604         from compile_instance.
2605         <base>: Remove field.
2606         <type_map, symbol_err_map>: Move to base class.
2607         <c_plugin>: Rename to `m_plugin' and remove pointer type.
2608         * compile/compile-internal.h (compile_instance): Make class.
2609         <type_map_t, symbol_err_map_t>: Define.
2610         <fe>: Rename to `m_gcc_fe'.
2611         <scope, block, gcc_target_options>: Add `m_' prefix.
2612         <m_type_map, m_symbol_err_map>: New fields, moved from
2613         compile_c_instance.
2614         <destroy>: Remove.
2615         (convert_type, new_compile_instance): Remove.
2616         * compile/compile.c (cleanup_compile_instance): Remove.
2617         (compile_to_object): Use unique_ptr to eliminate cleanups.
2618         (compile_instance::set_print_callback, compile_instance::version)
2619         (compile_instance::set_verbose)
2620         (compile_instance::set_driver_filename)
2621         (compile_instance::set_triplet_regexp)
2622         (compile_instance::set_arguments)
2623         (compile_instance::set_source_file)
2624         (compile_instance::compile): Define.
2625
2626 2018-08-10  Keith Seitz  <keiths@redhat.com>
2627
2628         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2629         * compile/compile-c-types.c: Define GCC_METHODN macros and include
2630         gcc-c-fe.def to define C plugin.
2631         (delete_instance): Delete `c_plugin'.
2632         (new_compile_instance): Initialize `c_plugin'.
2633         * compile/compile-c.h: Include gcc_c_plugin.h.
2634         (struct compile_c_instance) <c_plugin>: New member.
2635         * gcc-c-plugin.h: New file.
2636         Update all callers with API change.
2637
2638 2018-08-10  Keith Seitz  <keiths@redhat.com>
2639
2640         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2641         (HFILES_NO_SRCDIR): ... to here.
2642         Add compile-internal.h and compile-c.h.
2643         * compile/compile-c-support.c: Include compile-c.h.
2644         * compile/compile-c-symbols.c: Include compile-c.h.
2645         (generate_c_for_variable_locations): Update comment.
2646         * compile/compile-c-types.c: Include compile-c.h.
2647         * compile/compile-c.h: New file -- moved C language declarations
2648         from other files here.
2649         * compile/compile-internal.h: Do not include hashtab.h or
2650         common/enum-flags.h.
2651         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2652         (gcc_convert_symbol, gcc_symbol_address)
2653         (generate_c_for_variable_locations, c_get_mode_for_size)
2654         (c_get_range_decl_name): Definitions moved to compile-c.h.
2655         * compile/compile-loc2c.c: Include compile-c.h.
2656
2657 2018-08-10  Keith Seitz  <keiths@redhat.com>
2658
2659         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2660         (c_symbol_substitution_name): ... this.
2661         Update all callers.
2662
2663 2018-08-10  Keith Seitz  <keiths@redhat.com>
2664
2665         * compile/compile-c-support.c (c_compute_program): Use
2666         unique_xmalloc_ptr to eliminate cleanup.
2667         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2668         Return a unique_xmalloc_ptr and eliminate cleanup.
2669         * compile/compile-internal.h (generate_c_for_variable_locations):
2670         Return unique_xmalloc_ptr and update description.
2671
2672 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
2673
2674         * corelow.c (core_target::get_core_register_section): Rename
2675         min_size to section_min_size.
2676
2677 2018-08-09  Jim Wilson  <jimw@sifive.com>
2678
2679         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2680         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2681         * NEWS: Mention new GNU/Linux RISC-V target.
2682         * configure.host: Add riscv*-*-linux*.
2683         * configure.nat: Add riscv*.
2684         * configure.tgt: Add riscv*-*-linux*.
2685         * riscv-linux-nat.c: New file.
2686         * riscv-linux-tdep.c: New file.
2687
2688 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2689
2690         * infrun.c (resume): Make static, add forward declaration.
2691         (proceed): Update header comment.
2692         * infrun.h (resume): Delete declaration.
2693
2694 2018-08-09  Tom Tromey  <tom@tromey.com>
2695
2696         * riscv-tdep.h: Minor formatting fixes.
2697
2698 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
2699
2700         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2701         * dwarf-index-cache.c (create_dir_and_check): Likewise.
2702         (test_mkdir_recursive): Likewise.
2703         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2704
2705 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2706
2707         * valarith.c (value_subscripted_rvalue): If an array is not in
2708         memory, and we don't know the upper bound, then we can't know that
2709         the requested element exists or not.
2710
2711 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
2712
2713         * target.c (str_comma_list_concat_elem): Fix typo in comment.
2714         (target_options_to_string): Add comment.
2715
2716 2018-08-08  Tom Tromey  <tom@tromey.com>
2717
2718         * unittests/scoped_mmap-selftests.c: Check result of "write".
2719
2720 2018-08-08  Jim Wilson  <jimw@sifive.com>
2721
2722         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2723         (decode_register_index_short): New.
2724         (decode_j_type_insn, decode_cj_type_insn): New.
2725         (decode_b_type_insn, decode_cb_type_insn): New.
2726         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
2727         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
2728         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2729         is_c_sw_insn instead of is_sw_insn.
2730         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2731         (riscv_software_single_step): New.
2732         * riscv-tdep.h (riscv_software_single_step): Declare.
2733
2734         * riscv-tdep.c (riscv_isa_xlen): Drop static.
2735         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2736
2737 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2738
2739         PR gdb/18050:
2740         * target.c (dispose_inferior): Don't dispose of inferiors that are
2741         already killed.
2742
2743 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2744
2745         * remote.c (remote_target::download_tracepoint): Change char* to
2746         const char*.
2747
2748 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
2749
2750         * target.h (target_options_to_string): Return an std::string.
2751         * target.c (str_comma_list_concat_elem): Return void, use
2752         std::string.
2753         (do_option): Likewise.
2754         (target_options_to_string): Return an std::string.
2755         * linux-nat.c (linux_nat_target::wait): Adjust.
2756         * target-debug.h (target_debug_print_options): Adjust.
2757
2758 2018-08-07  Tom Tromey  <tom@tromey.com>
2759
2760         * Makefile.in (CPPFLAGS): New variable.
2761         (INTERNAL_CPPFLAGS): Use it.
2762
2763 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2764
2765         * NEWS: Mention the index cache.
2766
2767 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2768
2769         * common/pathstuff.h (get_standard_cache_dir): New.
2770         * common/pathstuff.c (get_standard_cache_dir): New.
2771         * build-id.h (build_id_to_string): New.
2772         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2773         DEBUG_STR_SUFFIX): Move to here.
2774         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2775         DEBUG_STR_SUFFIX): Move from there.
2776         (write_psymtabs_to_index): Make non-static, add basename
2777         parameter.  Write to temporary files, rename when done.
2778         (save_gdb_index_command): Adjust call to
2779         write_psymtabs_to_index.
2780         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2781         field.
2782         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2783         (get_gdb_index_contents_from_cache): New.
2784         (get_gdb_index_contents_from_cache_dwz): New.
2785         (dwarf2_initialize_objfile): Read index from cache.
2786         (dwarf2_build_psymtabs): Save to index.
2787         * dwarf-index-cache.h: New file.
2788         * dwarf-index-cache.c: New file.
2789         * dwarf-index-write.h: New file.
2790
2791 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2792
2793         * gnulib/aclocal.m4: Re-generate.
2794         * gnulib/config.in: Re-generate.
2795         * gnulib/configure: Re-generate.
2796         * gnulib/import/Makefile.am: Re-generate.
2797         * gnulib/import/Makefile.in: Re-generate.
2798         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2799         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2800         * gnulib/import/m4/mkdir.m4: New file.
2801         * gnulib/import/mkdir.c: New file.
2802         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2803         module.
2804
2805 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2806
2807         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2808         * common/scoped_mmap.c: New file.
2809         * common/scoped_mmap.h (destroy): New method.
2810         (~scoped_mmap, reset): Use destroy.
2811         (scoped_mmap): New move constructor.
2812         (mmap_file): New declaration.
2813         * unittests/scoped_mmap-selftests.c (test_normal,
2814         test_invalid_filename, run_tests): New functions.
2815         (_initialize_scoped_mmap_selftests): Register selftest.
2816
2817 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2818
2819         * dwarf2read.c (read_gdb_index_from_section): Rename to...
2820         (read_gdb_index_from_buffer): ... this.  Remove section
2821         parameter, add buffer parameter.
2822         (get_gdb_index_contents_ftype,
2823         get_gdb_index_contents_dwz_ftype): New typedefs.
2824         (dwarf2_read_gdb_index): Add callback parameters to get the
2825         index contents.
2826         (get_gdb_index_contents_from_section): New.
2827         (dwarf2_initialize_objfile): Update call to
2828         dwarf2_read_gdb_index.
2829
2830 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2831
2832         * common/filestuff.h (gdb_fopen_cloexec): New overload.
2833         (gdb_open_cloexec): Likewise.
2834         * nat/linux-osdata.c (command_from_pid): Use string_printf.
2835         (commandline_from_pid): Likewise.
2836         (linux_xfer_osdata_threads): Likewise.
2837         (linux_xfer_osdata_fds): Likewise.
2838         * ada-lang.c (is_package_name): Likewise.
2839         * auxv.c (procfs_xfer_auxv): Likewise.
2840         * breakpoint.c (print_one_breakpoint_location): Use
2841         uiout::field_fmt.
2842         (print_one_catch_solib): Use string_printf.
2843         * coff-pe-read.c (add_pe_exported_sym): Likewise.
2844         (add_pe_forwarded_sym): Likewise.
2845         * dwarf2read.c (create_type_unit_group): Likewise.
2846         (build_error_marker_type): Likewise.
2847         * infcall.c (get_function_name): Likewise.
2848         * valprint.c (print_converted_chars_to_obstack): Likewise.
2849         * xtensa-tdep.c (xtensa_register_type): Likewise.
2850
2851 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
2852
2853         * remote.c (remote_target::download_tracepoint): Fix format
2854         string errors.
2855
2856 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2857
2858         * tracefile.c: Include common/byte-vector.h.
2859         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
2860         with trace_regblock_size if needed.  Update uses of buf.
2861
2862 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2863
2864         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2865         std::vector<unsigned char>.
2866         * tracepoint.c (collection_list::collection_list): Remove
2867         m_regs_mask initializer from initializer list.  Resize
2868         m_regs_mask using the largest remote register number.
2869         (collection_list::add_remote_register): Remove size check on
2870         m_regs_mask.  Use at to access element.
2871         (collection_list::stringify): Change type of temp_buf to
2872         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
2873         stringify the register mask.  Use pack_hex_byte for the register
2874         mask.
2875
2876 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2877
2878         * tracepoint.h (class collection_list) <add_register>: Remove.
2879         <add_remote_register, add_ax_registers, add_local_register>:
2880         Declare.
2881         <add_memrange>: Add scope parameter.
2882         * tracepoint.c (encode_actions_1): Likewise.
2883         (collection_list::add_register): Rename to ...
2884         (collection_list::add_remote_register): ... this.  Update
2885         comment.
2886         (collection_list::add_ax_registers, add_local_register): New
2887         methods.
2888         (collection_list::add_memrange): Add scope parameter.  Call
2889         add_local_register instead of add_register.
2890         (finalize_tracepoint_aexpr): New function.
2891         (collection_list::collect_symbol): Update calls to add_memrange.
2892         Call add_local_register instead of add_register.  Call
2893         add_ax_registers.  Call finalize_tracepoint_aexpr.
2894         (encode_actions_1): Get remote regnos for $reg action.  Call
2895         add_remote_register, add_ax_registers, and add_local_register.
2896         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
2897         (validate_actionline): Call finalize_tracepoint_aexpr.
2898
2899 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2900
2901         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
2902         Replace array buf with gdb::char_vector buf, of size
2903         get_remote_packet_size ().  Replace references to buf and
2904         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
2905         and xsnprintf with snprintf.  Raise errors if the buffer is too
2906         small.
2907
2908 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2909
2910         * remote.c (remote_target::download_tracepoint): Fix the has_more
2911         predicate in the QTDP action list iteration.
2912
2913 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2914
2915         * remote.c (remote_target::download_tracepoint): Fix indentation
2916         in for block.
2917
2918 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2919
2920         * proc-api.c (_initialize_proc_api): Remove c, unused.
2921         * procfs.c (procfs_init_inferior): Remove signals, unused.
2922         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
2923         unused.
2924
2925 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
2926             Andrew Burgess  <andrew.burgess@embecosm.com>
2927
2928         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
2929         'W_STOPCODE (0)' as this could be ambiguous.
2930
2931 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2932
2933         * ser-tcp.c (net_open): Fix thinko when deciding whether to
2934         disable TCP's Nagle algorithm (use "ai_protocol" instead of
2935         "ai_socktype").
2936
2937 2018-08-02  Tom Tromey  <tom@tromey.com>
2938
2939         PR symtab/16842.
2940         * dwarf2read.c (read_func_scope): Set symtab on template parameter
2941         symbols.
2942         (process_structure_scope): Likewise.
2943
2944 2018-08-02  Xavier Roirand  <roirand@adacore.com>
2945
2946         PR gdb/22629:
2947         * darwin-nat.c (darwin_kill_inferior): Fix handling of
2948         kill inferior.
2949
2950 2018-08-02  Tom Tromey  <tom@tromey.com>
2951
2952         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
2953         (darwin_suspend_inferior, darwin_resume_inferior)
2954         (darwin_decode_notify_message, darwin_resume_inferior_threads)
2955         (darwin_check_new_threads): Check result of get_darwin_inferior.
2956
2957 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
2958
2959         GDB 8.1.1 released.
2960
2961 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
2962
2963         * varobj.c (varobj_get_path_expr_parent): Report an error if
2964         parent is a dynamic varobj.
2965
2966 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2967
2968         * gnulib/aclocal.m4: Re-generate.
2969         * gnulib/config.in: Re-generate.
2970         * gnulib/configure: Re-generate.
2971         * gnulib/import/Makefile.in: Re-generate.
2972         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2973         * gnulib/import/m4/onceonly.m4: Re-generate.
2974
2975 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
2976
2977         * target-descriptions.c (struct xml_test_tdesc): New.
2978         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
2979         (record_xml_tdesc): Update.
2980         (maintenance_check_xml_descriptions): Update.
2981         * target-descriptions.h (record_xml_tdesc): Update comment.
2982
2983 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2984
2985         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
2986         checking array bounds are defined.
2987
2988 2018-07-30  Tom Tromey  <tom@tromey.com>
2989
2990         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
2991         irreflexivity violation.
2992
2993 2018-07-30  Tom Tromey  <tom@tromey.com>
2994
2995         * cli/cli-decode.c (lookup_cmd): Remove lint code.
2996         * value.c (unpack_long): Remove lint code.
2997         * valops.c (value_ind): Remove lint code.
2998         * valarith.c (value_x_binop, value_x_unop, value_equal)
2999         (value_pos): Remove lint code.
3000
3001 2018-07-28  Tom de Vries  <tdevries@suse.de>
3002
3003         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3004         with undefined upper bound as <optimized out>.
3005
3006 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
3007
3008         * gcore.in: Rename variable "name" to "prefix".  Expand
3009         "usage" text.
3010
3011 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
3012
3013         * windows-nat.c (windows_nat_target::create_inferior): Update to
3014         call close() in global namespace.
3015
3016 2018-07-26  Tom Tromey  <tom@tromey.com>
3017
3018         * dwarf-index-write.c (add_address_entry): Don't add objfile
3019         offsets.
3020         * dbxread.c (find_stab_function): Rename from
3021         find_stab_function_addr.  Return a bound_minimal_symbol.
3022         (read_dbx_symtab): Use raw_text_low, raw_text_high.
3023         Don't add objfile offsets.
3024         (end_psymtab): Use raw_text_low, raw_text_high,
3025         MSYMBOL_VALUE_RAW_ADDRESS.
3026         (read_ofile_symtab): Update.
3027         (process_one_symbol): Update.
3028         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3029         offsets.
3030         (dw2_relocate): Remove.
3031         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3032         searching addrmap.
3033         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3034         Update.
3035         (process_psymtab_comp_unit_reader, add_partial_symbol)
3036         (add_partial_subprogram, dwarf2_ranges_read): Update.
3037         (load_partial_dies): Update.
3038         (add_address_entry): Don't add objfile offsets.
3039         (dwarf2_build_include_psymtabs): Update.
3040         (create_addrmap_from_aranges): Don't add objfile offsets.
3041         (dw2_find_pc_sect_compunit_symtab): Update.
3042         * mdebugread.c (parse_symbol): Don't add objfile offsets.
3043         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3044         Update.
3045         (parse_partial_symbols): Don't add objfile offsets.  Use
3046         raw_text_low, raw_text_high.  Update.
3047         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3048         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3049         or call 'relocate' quick function.  Clear psymbol_map.
3050         * psympriv.h (struct partial_symbol) <address>: Add section
3051         offset.
3052         <set_unrelocated_address>: Rename from set_address.
3053         <raw_text_low, raw_text_high>: New methods.
3054         <text_low, text_high>: Add objfile parameter.
3055         (add_psymbol_to_bcache): Add 'section' parameter.  Call
3056         set_unrelocated_address.
3057         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3058         (find_pc_psymbol): Update.
3059         (fixup_psymbol_section, relocate_psymtabs): Remove.
3060         (dump_psymtab, psym_functions): Update.
3061         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3062         parameter.
3063         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3064         (start_psymtab_common): Update.
3065         * symfile-debug.c (debug_qf_relocate): Remove.
3066         (debug_sym_quick_functions): Update.
3067         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3068         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3069         Update.
3070
3071 2018-07-26  Tom Tromey  <tromey@redhat.com>
3072
3073         * dbxread.c (end_psymtab): Use text_high_valid and
3074         text_low_valid.
3075         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3076         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3077         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3078         Update comment.
3079         <text_low_valid, text_high_valid>: New fields.
3080         <set_text_low, set_text_high>: Update.
3081         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3082
3083 2018-07-26  Tom Tromey  <tom@tromey.com>
3084
3085         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3086         Update.
3087         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3088         textlow and texthigh fields.
3089         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3090         Update.
3091         * mdebugread.c (parse_lines, parse_partial_symbols)
3092         (psymtab_to_symtab_1): Update.
3093         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3094         Rename fields.  Update comment.  Now private.
3095         <text_low, text_high, set_text_low, set_text_high>: New methods.
3096         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3097         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3098         (start_psymtab_common, maintenance_info_psymtabs)
3099         (maintenance_check_psymtabs): Update.
3100         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3101         texthigh fields.
3102         (scan_xcoff_symtab): Update.
3103
3104 2018-07-26  Tom Tromey  <tromey@redhat.com>
3105
3106         * psympriv.h (struct partial_symbol) <unrelocated_address,
3107         address, set_address>: New methods.
3108         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3109         (fixup_psymbol_section, relocate_psymtabs): Update.
3110         (print_partial_symbols): Add 'objfile' parameter.  Update.
3111         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3112         Update.
3113
3114 2018-07-26  Tom Tromey  <tom@tromey.com>
3115
3116         * dwarf-index-write.c (write_psymbols, debug_names::insert)
3117         (debug_names::write_psymbols): Update.
3118         * psympriv.h (struct partial_symbol): Derive from
3119         general_symbol_info.
3120         <obj_section>: New method.
3121         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3122         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3123         (find_pc_sect_psymbol, fixup_psymbol_section)
3124         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3125         (print_partial_symbols, recursively_search_psymtabs)
3126         (compare_psymbols, psymbol_hash, psymbol_compare)
3127         (add_psymbol_to_bcache, maintenance_check_psymtabs)
3128         (psymbol_name_matches, psym_fill_psymbol_map): Update.
3129
3130 2018-07-26  Tom Tromey  <tromey@redhat.com>
3131
3132         * dbxread.c (end_psymtab): Remove dead code.
3133
3134 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
3135
3136         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3137         DWARF unwinders are disabled.
3138         * dwarf2-frame.c: Add dwarf2read.h include.
3139         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3140         disabled.
3141         (dwarf2_frame_unwinders_enabled_p): Define.
3142         (show_dwarf_unwinders_enabled_p): New function.
3143         (_initialize_dwarf2_frame): Register switch to control DWARF
3144         unwinder use.
3145         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3146         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3147         (show_dwarf_cmdlist): Remove static keyword.
3148         * dwarf2read.h (set_dwarf_cmdlist): Declare.
3149         (show_dwarf_cmdlist): Declare.
3150         * NEWS: Document new feature.
3151
3152 2018-07-26  Tom de Vries  <tdevries@suse.de>
3153
3154         PR breakpoints/23366
3155         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3156
3157 2018-07-26  Tom de Vries  <tdevries@suse.de>
3158
3159         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3160         DW_AT_count can't be translated to a dynamic prop.
3161
3162 2018-07-25  Tom de Vries  <tdevries@suse.de>
3163
3164         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3165         try/catch.
3166
3167 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
3168
3169         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3170
3171 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
3172
3173         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3174
3175 2018-07-24  Keith Seitz  <keiths@redhat.comt
3176
3177         PR symtab/23010
3178         * dwarf2read.c (dw2_add_symbol_to_list): New function.
3179         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3180         instead of add_symbol_to_list.
3181         (read_file_scope): Call prepare_one_comp_unit before reading
3182         any other DIEs.
3183
3184 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
3185
3186         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3187
3188 2018-07-24  Tom Tromey  <tom@tromey.com>
3189
3190         * utils.c (malloc, realloc, free): Don't declare.
3191         * configure, config.in: Rebuild.
3192         * configure.ac: Don't check for declarations of free, malloc, or
3193         realloc.
3194
3195 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3196
3197         * aarch64-linux-nat.c
3198         (aarch64_linux_nat_target::stopped_data_address): Remove unused
3199         variable.
3200         * arm-linux-nat.c (fetch_regs): Likewise.
3201         (store_regs): Likewise.
3202         (fetch_vfp_regs): Likewise.
3203         (store_vfp_regs): Likewise.
3204         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3205         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3206         (arm_linux_nat_target::insert_watchpoint): Likewise.
3207         (arm_linux_nat_target::remove_watchpoint): Likewise.
3208         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3209         Likewise.
3210         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3211         Likewise.
3212         * ppc-linux-nat.c (fetch_register): Likewise.
3213         (fetch_all_gp_regs): Likewise.
3214         (fetch_ppc_registers): Likewise.
3215         (store_all_gp_regs): Likewise.
3216         (store_ppc_registers): Likewise.
3217         (hwdebug_insert_point): Likewise.
3218         (can_use_watchpoint_cond_accel): Likewise.
3219         * remote-sim.c (gdb_os_write_stdout): Likewise.
3220
3221 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3222             Tom Tromey  <tom@tromey.com>
3223
3224         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3225         test for it.
3226         * configure: Rebuild.
3227
3228 2018-07-22  Tom Tromey  <tom@tromey.com>
3229
3230         * regformats/regdat.sh: Define xmltarget_${name} inside
3231         #ifndef IN_PROCESS_AGENT.
3232
3233 2018-07-22  Tom Tromey  <tom@tromey.com>
3234
3235         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3236
3237 2018-07-22  Tom Tromey  <tom@tromey.com>
3238
3239         * symfile.c (reread_symbols): Notify iter, not objfile.
3240
3241 2018-07-22  Tom Tromey  <tom@tromey.com>
3242
3243         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3244         Use arch_ops.
3245         (ravenscar_thread_target::prepare_to_store): Likewise.
3246
3247 2018-07-22  Tom Tromey  <tom@tromey.com>
3248
3249         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3250         unused variable.  Call value_fetch_lazy when needed.
3251         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3252         Remove unused variable.  Call value_fetch_lazy when needed.
3253
3254 2018-07-22  Tom Tromey  <tom@tromey.com>
3255
3256         * m32c-tdep.c (mark_dma): Return void.
3257         (make_regs): Remove unused declarations.
3258
3259 2018-07-22  Tom Tromey  <tom@tromey.com>
3260
3261         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3262         cmdscm_get_valid_command_smob_arg_unsafe for effect.
3263         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3264         bkscm_get_valid_block_smob_arg_unsafe for effect.
3265
3266 2018-07-22  Tom Tromey  <tom@tromey.com>
3267
3268         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3269         value_type.
3270
3271 2018-07-22  Tom Tromey  <tom@tromey.com>
3272
3273         * windows-nat.c (saved_context): Conditionally define.
3274         * remote.c (remote_target::remote_btrace_maybe_reopen):
3275         Conditionally declare "warned".
3276         * inflow.c (sigquit_ours): Conditionally define.
3277         (new_tty): Move "tty" declaration inside #if.
3278         * guile/guile.c (guile_datadir): Conditionally define.
3279         * charset.c (set_be_le_names): Move some declarations inside #if.
3280         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3281         #if.
3282         (parse_xml_btrace_conf): Likewise.
3283
3284 2018-07-22  Tom Tromey  <tom@tromey.com>
3285
3286         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3287
3288 2018-07-22  Tom Tromey  <tom@tromey.com>
3289
3290         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3291         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3292         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3293         * buildsym-legacy.c (get_macro_table): Remove unused variable.
3294         * stack.c (frame_apply_level_command): Remove unused variable.
3295         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3296         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3297         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3298         unused variable.
3299         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3300         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3301         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3302         variable.
3303         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3304         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3305         variable.
3306         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3307         Remove unused variable.
3308         * cli/cli-script.c (recurse_read_control_structure): Remove unused
3309         variable.
3310         * common/tdesc.c (print_xml_feature::visit): Remove unused
3311         variable.
3312         * compile/compile-object-load.c (store_regs): Remove unused
3313         variables.
3314         * complaints.c (clear_complaints): Remove unused variable.
3315         * corelow.c (core_target_open): Remove unused variable.
3316         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3317         variable.
3318         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3319         variable.
3320         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3321         variable.
3322         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3323         variable.
3324         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3325         variable.
3326         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3327         variable.
3328         * ia64-tdep.c (examine_prologue): Remove unused variable.
3329         * infcall.c (run_inferior_call): Remove unused variable.
3330         * inferior.c (exit_inferior): Remove unused variable.
3331         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3332         * linespec.c (decode_line_2): Remove unused variable.
3333         * linux-nat.c (super_close): Remove.
3334         * linux-tdep.c (linux_info_proc): Remove unused variable.
3335         * mi/mi-main.c (mi_execute_command): Remove unused variable.
3336         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3337         Remove unused variable.
3338         * parse.c (find_minsym_type_and_address): Remove unused variable.
3339         * printcmd.c (info_symbol_command, printf_floating): Remove unused
3340         variable.
3341         * python/py-breakpoint.c (bppy_set_commands): Remove unused
3342         variable.
3343         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3344         variables.
3345         * record-btrace.c (record_btrace_target::store_registers): Remove
3346         unused variable.
3347         (cmd_show_record_btrace_cpu): Remove unused variable.
3348         * riscv-tdep.c (riscv_register_reggroup_p)
3349         (riscv_push_dummy_call, riscv_return_value): Remove unused
3350         variable.
3351         * rust-exp.y (literal): Remove unused variable.
3352         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3353         unused variable.
3354         <STRUCTOP_ANONYMOUS>: Likewise.
3355         * s390-linux-tdep.c (s390_linux_init_abi_31)
3356         (s390_linux_init_abi_64): Remove unused variable.
3357         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3358         (file_select_thread, net_windows_open, _initialize_ser_windows):
3359         Remove unused variables.
3360         * symtab.c (find_pc_sect_line): Remove unused variable.
3361         * target-memory.c (compute_garbled_blocks): Remove unused
3362         variable.
3363         (target_write_memory_blocks): Remove unused variable.
3364         * target.c (target_stack::unpush): Remove unused variables.
3365         * tracepoint.c (start_tracing, all_tracepoint_actions)
3366         (merge_uploaded_trace_state_variables)
3367         (print_one_static_tracepoint_marker): Remove unused variable.
3368         * unittests/basic_string_view/element_access/char/1.cc (test01):
3369         Remove unused variable.
3370         * windows-nat.c (windows_continue, windows_add_all_dlls)
3371         (do_initial_windows_stuff, windows_nat_target::create_inferior):
3372         Remove unused variables.
3373
3374 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
3375
3376         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3377         attr_profile in HAVE_ELF.
3378         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3379         HAVE_ELF.
3380
3381 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
3382
3383         * frame.c (frame_register_unwind): Change parameter name.
3384         (frame_unwind_register): Likewise.
3385         (frame_unwind_register_value): Likewise.
3386         (frame_unwind_register_signed): Likewise.
3387         (frame_unwind_register_unsigned): Likewise.
3388         * frame.h (frame_register_unwind): Likewise.
3389         (frame_unwind_register): Likewise.
3390         (frame_unwind_register_value): Likewise.
3391         (frame_unwind_register_signed): Likewise.
3392         (frame_unwind_register_unsigned): Likewise.
3393         (frame_unwind_arch): Likewise.
3394
3395 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3396
3397         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3398         ISA maintenance.
3399
3400 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3401
3402         * mips-linux-nat.c (mips_linux_nat_target::read_description):
3403         Call `get_ptrace_pid' rather than extracting the ptrace PID by
3404         hand.
3405
3406 2018-07-20  Keith Seitz  <keiths@redhat.com>
3407
3408         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3409         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3410         m_compunit_symtab, m_language>: Add "m_" prefix.
3411         Update all uses.
3412         * buildsym.c: Update all uses.
3413
3414 2018-07-20  Tom Tromey  <tom@tromey.com>
3415
3416         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3417         * buildsym.h (record_line_ftype): Remove typedef.
3418
3419 2018-07-20  Tom Tromey  <tom@tromey.com>
3420
3421         * buildsym-legacy.h (augment_type_symtab): Don't declare.
3422         (end_expandable_symtab): Likewise.
3423         (end_symtab_get_static_block): Likewise.
3424         (end_symtab_from_static_block): Likewise.
3425         * buildsym-legacy.c (augment_type_symtab): Remove.
3426         (end_expandable_symtab): Remove.
3427         (end_symtab_get_static_block): Remove.
3428         (end_symtab_from_static_block): Remove.
3429
3430 2018-07-20  Tom Tromey  <tom@tromey.com>
3431
3432         * dwarf2read.c: Include buildsym.h.
3433         (struct dwarf2_cu) <builder>: New method.
3434         (fixup_go_packaging): Update.
3435         (process_full_comp_unit, process_full_type_unit): Update.  Don't
3436         use scoped_free_pendings.
3437         (using_directives): Add "cu" parameter, remove "language".
3438         (read_import_statement, setup_type_unit_groups, )
3439         (read_func_scope, read_lexical_block_scope)
3440         (dwarf2_record_block_ranges, read_namespace): Update.
3441         (lnp_state_machine::lnp_state_machine): Add cu parameter.
3442         (lnp_state_machine::handle_end_sequence): Update.
3443         (class lnp_state_machine) <m_cu>: New member.
3444         <m_record_line_callback>: Remove.
3445         <m_currently_recording_lines>: New member.
3446         (lnp_state_machine::handle_set_file): Update.
3447         (noop_record_line): Remove.
3448         (dwarf_record_line_p): Add cu parameter.
3449         (dwarf_record_line_1, dwarf_finish_line): Likewise.
3450         (lnp_state_machine::record_line)
3451         (lnp_state_machine::lnp_state_machine)
3452         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3453         (dwarf_decode_lines): Update.
3454         (dwarf2_start_subfile): Add cu parameter.
3455         (dwarf2_start_symtab, new_symbol): Update.
3456         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3457         Remove dwarf2_per_objfile parameter.
3458         (dwarf_decode_macros): Update.
3459
3460 2018-07-20  Tom Tromey  <tom@tromey.com>
3461
3462         * stabsread.c (define_symbol): Update.
3463         * buildsym-legacy.h (get_buildsym_compunit): Declare.
3464         * dwarf2read.c (new_symbol): Update.
3465         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3466         * cp-namespace.c: Include buildsym.h.
3467         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3468         * buildsym-legacy.c (get_buildsym_compunit): New function.
3469
3470 2018-07-20  Tom Tromey  <tom@tromey.com>
3471
3472         * xcoffread.c: Include buildsym-legacy.h.
3473         * windows-nat.c: Include buildsym-legacy.h.
3474         * stabsread.c: Include buildsym-legacy.h.
3475         * mdebugread.c: Include buildsym-legacy.h.
3476         * buildsym-legacy.h: New file.
3477         * buildsym-legacy.c: New file, from buildsym.c.
3478         * go32-nat.c: Include buildsym-legacy.h.
3479         * dwarf2read.c: Include buildsym-legacy.h.
3480         * dbxread.c: Include buildsym-legacy.h.
3481         * cp-namespace.c: Include buildsym-legacy.h.
3482         * coffread.c: Include buildsym-legacy.h.
3483         * buildsym.h: Move some contents to buildsym-legacy.h.
3484         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
3485         buildsym-legacy.c.
3486         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3487
3488 2018-07-20  Tom Tromey  <tom@tromey.com>
3489
3490         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3491         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3492         (buildsym_compunit::buildsym_compunit)
3493         (buildsym_compunit::~buildsym_compunit)
3494         (buildsym_compunit::get_macro_table): Define.
3495
3496 2018-07-20  Tom Tromey  <tom@tromey.com>
3497
3498         * buildsym.c (reset_symtab_globals): Remove.
3499         (buildsym_compunit::end_symtab_from_static_block): Update.
3500         (buildsym_compunit::augment_type_symtab): Update.
3501         (end_symtab_from_static_block): Call free_buildsym_compunit.
3502         (augment_type_symtab, end_symtab, end_expandable_symtab):
3503         Likewise.
3504
3505 2018-07-20  Tom Tromey  <tom@tromey.com>
3506
3507         * arch-utils.c: Do not include buildsym.h.
3508         * mipsread.c: Do not include buildsym.h.
3509         * machoread.c: Do not include buildsym.h.
3510         * elfread.c: Do not include buildsym.h.
3511
3512 2018-07-20  Tom Tromey  <tom@tromey.com>
3513
3514         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3515         initialization.
3516         (buildsym_compunit): Add new constructor.
3517         (struct buildsym_compunit) <get_last_source_file, finish_block,
3518         record_block_range, start_subfile, patch_subfile_names,
3519         push_subfile, pop_subfile, record_line, get_compunit_symtab,
3520         set_last_source_start_addr, get_last_source_start_addr,
3521         get_local_using_directives, set_local_using_directives,
3522         get_global_using_directives, outermost_context_p,
3523         get_current_context_stack, get_context_stack_depth,
3524         get_current_subfile, get_local_symbols, get_file_symbols,
3525         get_global_symbols, record_debugformat, record_producer,
3526         push_context, pop_context, end_symtab_get_static_block,
3527         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3528         New public methods.
3529         <record_pending_block, finish_block_internal, make_blockvector,
3530         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3531         private methods.
3532         Update all users.
3533
3534 2018-05-22  Tom Tromey  <tom@tromey.com>
3535
3536         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3537         parameter.
3538         (finish_block_internal): Update.
3539
3540 2018-07-20  Tom Tromey  <tom@tromey.com>
3541
3542         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3543         parameter.
3544         (finish_block_internal): Update.
3545
3546 2018-07-20  Tom Tromey  <tom@tromey.com>
3547
3548         * buildsym.h (EXTERN): Don't define or undef.
3549         * buildsym.c (EXTERN): Don't define.
3550
3551 2018-07-20  Tom Tromey  <tom@tromey.com>
3552
3553         * buildsym.c: Remove TODO comment.
3554
3555 2018-07-20  Tom Tromey  <tom@tromey.com>
3556
3557         * coffread.c (coff_symtab_read): Update.
3558         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3559         (xcoff_new_init): Update.
3560         * mipsread.c (mipscoff_new_init): Update.
3561         * mdebugread.c (mdebug_build_psymtabs): Update.
3562         * elfread.c (elf_new_init): Update.
3563         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3564         Update.
3565         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3566         (coffstab_build_psymtabs, elfstab_build_psymtabs)
3567         (stabsect_build_psymtabs): Update.
3568         * buildsym.h (buildsym_init): Don't declare.
3569         * buildsym.c: Update comment.
3570         (prepare_for_building): Remove.
3571         (start_symtab, restart_symtab): Update.
3572         (reset_symtab_globals): Update comment.
3573         (buildsym_init): Remove.
3574
3575 2018-07-20  Tom Tromey  <tom@tromey.com>
3576
3577         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3578         * stabsread.c (patch_block_stabs, define_symbol, read_type)
3579         (read_enum_type, common_block_start, common_block_end)
3580         (cleanup_undefined_types_1, finish_global_stabs): Update.
3581         * mdebugread.c (psymtab_to_symtab_1): Update.
3582         * dwarf2read.c (fixup_go_packaging, read_func_scope)
3583         (read_lexical_block_scope, new_symbol): Update.
3584         * dbxread.c (process_one_symbol): Update.
3585         * coffread.c (coff_symtab_read, process_coff_symbol)
3586         (coff_read_enum_type): Update.
3587         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3588         declare.
3589         (get_local_symbols, get_file_symbols, get_global_symbols): New
3590         functions.
3591         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3592         m_global_symbols.
3593         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3594         (~scoped_free_pendings): Update.
3595         (finish_block, prepare_for_building, reset_symtab_globals)
3596         (end_symtab_get_static_block, end_symtab_with_blockvector)
3597         (augment_type_symtab, push_context): Update.
3598         (get_local_symbols, get_file_symbols, get_global_symbols): New
3599         functions.
3600         (buildsym_init): Update.
3601
3602 2018-07-20  Tom Tromey  <tom@tromey.com>
3603
3604         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3605         (process_full_type_unit): Likewise.
3606         (dwarf2_start_symtab): Set list_in_scope.
3607
3608 2018-07-20  Tom Tromey  <tom@tromey.com>
3609
3610         * dwarf2read.c (process_psymtab_comp_unit_reader)
3611         (build_type_psymtabs_reader): Do not set list_in_scope.
3612
3613 2018-07-20  Tom Tromey  <tom@tromey.com>
3614
3615         * buildsym.c (free_pendings): Remove.
3616         (add_symbol_to_list, scoped_free_pendings)
3617         (finish_block_internal, buildsym_init): Update.
3618
3619 2018-07-20  Tom Tromey  <tom@tromey.com>
3620
3621         * xcoffread.c (read_xcoff_symtab): Update.
3622         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3623         Update.
3624         * dbxread.c (process_one_symbol): Update.
3625         * coffread.c (coff_symtab_read): Update.
3626         * buildsym.h (finish_block): Update.
3627         * buildsym.c (finish_block): Remove "listhead" argument.
3628         (end_symtab_get_static_block): Update.
3629
3630 2018-07-20  Tom Tromey  <tom@tromey.com>
3631
3632         * buildsym.h (class scoped_free_pendings): Remove constructor.
3633         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3634         method.
3635         <m_pending_block_obstack, m_pending_blocks>: New members.
3636         (pending_block_obstack, pending_blocks): Remove.
3637         (scoped_free_pendings::scoped_free_pendings): Default.
3638         (~scoped_free_pendings): Update.
3639         (free_pending_blocks): Remove.
3640         (finish_block_internal, record_pending_block, make_blockvector)
3641         (end_symtab_get_static_block, augment_type_symtab, push_context)
3642         (buildsym_init): Update.
3643
3644 2018-07-20  Tom Tromey  <tom@tromey.com>
3645
3646         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3647         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3648         members.
3649         (pending_addrmap, pending_addrmap_obstack)
3650         (pending_addrmap_interesting): Remove.
3651         (scoped_free_pendings, record_block_range, make_blockvector)
3652         (prepare_for_building, reset_symtab_globals, buildsym_init):
3653         Update.
3654
3655 2018-07-20  Tom Tromey  <tom@tromey.com>
3656
3657         * xcoffread.c (process_linenos): Update.
3658         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3659         * mdebugread.c (psymtab_to_symtab_1): Update.
3660         * dwarf2read.c (setup_type_unit_groups)
3661         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3662         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3663         * dbxread.c (process_one_symbol): Update.
3664         * coffread.c (coff_symtab_read, enter_linenos)
3665         (process_coff_symbol): Update.
3666         * buildsym.h (current_subfile): Don't declare.
3667         (get_current_subfile): Declare.
3668         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3669         member.
3670         (start_subfile, free_buildsym_compunit, push_subfile)
3671         (prepare_for_building, start_symtab): Update.
3672         (get_current_subfile): New function.
3673
3674 2018-07-20  Tom Tromey  <tom@tromey.com>
3675
3676         * coffread.c (coff_symtab_read): Update.
3677         * xcoffread.c (read_xcoff_symtab): Update.
3678         * dwarf2read.c (new_symbol): Update.
3679         (read_func_scope, read_lexical_block_scope): Update.
3680         * dbxread.c (process_one_symbol): Update.
3681         * buildsym.h (context_stack, context_stack_depth): Don't declare.
3682         (outermost_context_p): Remove macro.
3683         (outermost_context_p, get_current_context_stack)
3684         (get_context_stack_depth): Declare.
3685         (pop_context): Return struct context_stack.
3686         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3687         member.
3688         (context_stack_size): Remove.
3689         (INITIAL_CONTEXT_STACK_SIZE): Remove.
3690         (prepare_for_building, end_symtab_get_static_block)
3691         (augment_type_symtab, push_context): Update.
3692         (pop_context): Return struct context_stack.
3693         (outermost_context_p, get_current_context_stack)
3694         (get_context_stack_depth): New functions.
3695         (buildsym_init): Update.
3696
3697 2018-07-20  Tom Tromey  <tom@tromey.com>
3698
3699         * rust-exp.y: Now a pure parser.  Update all rules.
3700         (%union): Move earlier.
3701         (current_parser, work_obstack): Remove globals.
3702         (rust_parser, ~rust_parser): Update.
3703         (class rust_parser) <copy_name, concat3, crate_name, super_name,
3704         lex_character, lex_number, lex_string, lex_identifier,
3705         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3706         convert_name, convert_params_to_expression,
3707         convert_ast_to_expression, ast_basic_type, ast_operation,
3708         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3709         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3710         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3711         ast_array_type, ast_slice_type, ast_reference_type,
3712         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3713         (rust_parse): Update.
3714         (rustyyerror, rustyylex): Add parser parameter.
3715         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3716         (rust_lex_stringish_test, rust_lex_test_sequence)
3717         (rust_lex_test_trailing_dot, rust_lex_test_completion)
3718         (rust_lex_test_push_back, rust_lex_tests): Update.
3719
3720 2018-07-19  Pedro Alves  <palves@redhat.com>
3721
3722         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3723         gdb::unique_xmalloc_ptr.
3724         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3725         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3726         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3727         copy-initialization.
3728         * guile/scm-pretty-print.c (ppscm_print_children): Use
3729         gdb::unique_xmalloc_ptr instead of cleanups.
3730         (gdbscm_apply_val_pretty_printer): Remove cleanups.
3731         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3732         gdb::unique_xmalloc_ptr.
3733         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3734         Adjust to use gdb::unique_xmalloc_ptr.
3735         * guile/scm-utils.c (extract_arg): Adjust.
3736         * guile/scm-value.c (gdbscm_value_field): Adjust to use
3737         gdb::unique_xmalloc_ptr instead of a cleanup.
3738
3739 2018-07-19  Tom Tromey  <tom@tromey.com>
3740
3741         * utils.c (do_value_free_to_mark)
3742         (make_cleanup_value_free_to_mark): Remove.
3743         * utils.h (make_cleanup_value_free_to_mark): Remove.
3744
3745 2018-07-19  Pedro Alves  <palves@redhat.com>
3746
3747         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3748         forwarding reference.
3749
3750 2018-07-18  Pedro Alves  <palves@redhat.com>
3751
3752         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3753         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
3754         cleanup.
3755
3756 2018-07-18  Pedro Alves  <palves@redhat.com>
3757
3758         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3759         exceptions.
3760         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3761         (gdbscm_wrap): New.
3762         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3763         directly instead of a cleanup.
3764         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3765         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3766         (vlscm_binop_gdbthrow): New, factored out from ...
3767         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3768         (vlscm_rich_compare): Use gdbscm_wrap.
3769         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3770         instead of a cleanup.
3771         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3772         cleanup.
3773         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3774         Use xfree directly instead of a cleanup.
3775         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3776         Adjust to use gdbscm_wrap and scoped_value_mark.
3777         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3778         (gdbscm_value_address, gdbscm_value_dereference)
3779         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3780         scoped_value_mark.
3781         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3782         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3783         scoped_value_mark.
3784         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3785         gdbscm_wrap and scoped_value_mark.
3786         (gdbscm_value_to_string): Use xfree directly instead of a
3787         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3788         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3789         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3790         scoped_value_mark.
3791         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3792         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3793         scoped_value_mark.
3794         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3795         gdbscm_wrap.
3796
3797 2018-07-18  Tom de Vries  <tdevries@suse.de>
3798
3799         * findvar.c (default_read_var_value): Also resolve dynamic type for
3800         LOC_OPTIMIZED_OUT vars.
3801
3802 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
3803
3804         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3805         decoding.
3806
3807 2018-07-17  Tom Tromey  <tom@tromey.com>
3808
3809         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3810         (compute_enum_list, pascm_set_param_value_x)
3811         (gdbscm_parameter_value): Update.
3812         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3813         (gdbscm_scm_to_host_string): Update.
3814         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3815         Update.
3816         * guile/scm-cmd.c (cmdscm_add_completion): Update.
3817         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3818         * guile/scm-string.c (gdbscm_scm_to_string): Return
3819         unique_xmalloc_ptr.
3820         (gdbscm_scm_to_host_string): Likewise.
3821
3822 2018-07-17  Tom Tromey  <tom@tromey.com>
3823
3824         * guile/guile.c (gdbscm_eval_from_control_command): Update.
3825         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3826         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3827         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3828         unique_xmalloc_ptr.
3829
3830 2018-07-17  Tom Tromey  <tom@tromey.com>
3831
3832         * guile/scm-param.c (pascm_signal_setshow_error): Update.
3833         * guile/guile-internal.h (gdbscm_exception_message_to_string):
3834         Update.
3835         * guile/scm-cmd.c (cmdscm_function): Update.
3836         * guile/scm-pretty-print.c
3837         (ppscm_print_exception_unless_memory_error): Update.
3838         * guile/scm-exception.c (gdbscm_exception_message_to_string):
3839         Return unique_xmalloc_ptr.
3840
3841 2018-07-17  Tom Tromey  <tom@tromey.com>
3842
3843         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3844         Use string_printf.
3845
3846 2018-07-17  Jim Wilson  <jimw@sifive.com>
3847
3848         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3849         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
3850         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
3851         unecessary braces after EF_RISCV_RVC test.  Delete call to
3852         set_gdbarch_decr_pc_after_break.
3853
3854         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3855         RISCV_LAST_FP_REGNUM + 1.
3856         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3857
3858 2018-07-17  Tom Tromey  <tom@tromey.com>
3859
3860         * configure.ac: Remove --disable-gdbcli.
3861         * configure: Rebuild.
3862         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3863         (SUBDIR_CLI_CFLAGS): Remove.
3864         (SFILES): Use SUBDIR_CLI_SRCS.
3865         (COMMON_OBS): Use SUBDIR_CLI_OBS.
3866
3867 2018-07-17  Tom Tromey  <tom@tromey.com>
3868
3869         PR gdb/18624:
3870         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3871
3872 2018-07-16  Jim Wilson  <jimw@sifive.com>
3873
3874         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3875
3876 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3877
3878         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3879         variable.
3880         (libunwind_frame_sniffer): Likewise.
3881         (libunwind_frame_prev_register): Likewise.
3882         (libunwind_sigtramp_frame_sniffer): Likewise.
3883         * ia64-tdep.c (ia64_access_reg): Likewise.
3884         (ia64_access_rse_reg): Likewise.
3885         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
3886         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
3887
3888 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3889
3890         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
3891
3892 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3893
3894         * remote-sim.c (gdbsim_target::close,
3895         gdbsim_target::mourn_inferior): Remove unused variables.
3896
3897 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
3898
3899         * ia64-tdep.c (ktab_buf): New global.
3900         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
3901         (get_kernel_table): Adjust.
3902
3903 2018-07-16  Tom Tromey  <tom@tromey.com>
3904
3905         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
3906         * dwarf2read.c (using_directives, new_symbol): Use
3907         outermost_context_p.
3908         * dbxread.c (process_one_symbol): Use outermost_context_p.
3909         * coffread.c (coff_symtab_read): Use outermost_context_p.
3910
3911 2018-07-16  Tom Tromey  <tom@tromey.com>
3912
3913         * dwarf2read.c (using_directives, read_func_scope)
3914         (read_lexical_block_scope): Update.
3915         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
3916         * buildsym.h (local_using_directives, global_using_directives):
3917         Don't declare.
3918         (get_local_using_directives, set_local_using_directives)
3919         (get_global_using_directives): Declare.
3920         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
3921         m_global_using_directives>: New members.
3922         (finish_block_internal, prepare_for_building)
3923         (reset_symtab_globals, end_symtab_get_static_block)
3924         (push_context): Update.
3925         (get_local_using_directives, set_local_using_directives)
3926         (get_global_using_directives): New functions.
3927         (buildsym_init): Update.
3928
3929 2018-07-16  Tom Tromey  <tom@tromey.com>
3930
3931         * xcoffread.c (xcoff_initial_scan): Don't call
3932         free_pending_blocks.
3933         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
3934         * buildsym.h (class scoped_free_pendings): Add constructor.
3935         (free_pending_blocks): Don't declare.
3936         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
3937         (free_pending_blocks): Now static.
3938
3939 2018-07-16  Tom Tromey  <tom@tromey.com>
3940
3941         * buildsym.h (push_subfile, pop_subfile): Update declarations.
3942         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
3943         member.
3944         (struct subfile_stack): Remove.
3945         (subfile_stack): Remove.
3946         (push_subfile, pop_subfile, buildsym_init): Update.
3947
3948 2018-07-16  Tom Tromey  <tom@tromey.com>
3949
3950         * buildsym.c (push_subfile): Use gdb_assert.
3951         (pop_subfile): Use gdb_assert.
3952
3953 2018-07-16  Tom Tromey  <tom@tromey.com>
3954
3955         * buildsym.h (merge_symbol_lists): Remove.
3956         * buildsym.c (merge_symbol_lists): Remove.
3957
3958 2018-07-16  Tom Tromey  <tom@tromey.com>
3959
3960         * stabsread.c (scan_file_globals): Update comment.
3961         * stabsread.h (scan_file_globals): Move from buildsym.h.
3962         * buildsym.h (scan_file_globals): Move to stabsread.h.
3963
3964 2018-07-16  Tom Tromey  <tom@tromey.com>
3965
3966         * xcoffread.c (xcoff_new_init): Update.
3967         * mipsread.c (mipscoff_new_init): Update.
3968         * mdebugread.c (mdebug_build_psymtabs): Update.
3969         * elfread.c (elf_new_init): Update.
3970         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
3971         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
3972         * buildsym.h (buildsym_new_init): Don't declare.
3973         * buildsym.c (buildsym_new_init): Remove.
3974
3975 2018-07-16  Tom Tromey  <tom@tromey.com>
3976
3977         * stabsread.h (within_function): Move from buildsym.h.
3978         * stabsread.c (start_stabs): Clear within_function.
3979         * coffread.c (coff_start_symtab): Clear within_function.
3980         * buildsym.h (within_function): Move to stabsread.h.
3981         * buildsym.c (prepare_for_building): Update.
3982
3983 2018-07-16  Tom Tromey  <tom@tromey.com>
3984
3985         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
3986         * dwarf2read.c (dwarf2_start_symtab): Don't set
3987         processing_gcc_compilation.
3988         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
3989
3990 2018-07-16  Tom Tromey  <tom@tromey.com>
3991
3992         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
3993         (next_symbol_text_func): Move from buildsym.h.
3994         * stabsread.c (hashname): Move from buildsym.c.
3995         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
3996         (next_symbol_text_func, hashname): Move to stabsread.h.
3997         * buildsym.c: Don't include bcache.h
3998         (hashname): Move to stasbread.c.
3999
4000 2018-07-16  Tom Tromey  <tom@tromey.com>
4001
4002         * buildsym.h (context_stack_size): Don't declare.
4003         * buildsym.c (context_stack_size): New global.
4004
4005 2018-07-16  Tom Tromey  <tom@tromey.com>
4006
4007         * dbxread.c (processing_acc_compilation): New global.
4008         * buildsym.h (processing_acc_compilation): Don't declare.
4009
4010 2018-07-16  Tom Tromey  <tom@tromey.com>
4011
4012         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4013         * dbxread.c (read_ofile_symtab): Update.
4014         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4015         * buildsym.h (last_source_start_addr): Remove.
4016         (set_last_source_start_addr, get_last_source_start_addr):
4017         Declare.
4018         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4019         parameter.
4020         (struct buildsym_compunit) <m_last_source_start_addr>: New
4021         member.
4022         (prepare_for_building): Remove start_addr parameter.
4023         (start_symtab, restart_symtab, end_symtab_get_static_block)
4024         (end_symtab_with_blockvector): Update.
4025         (set_last_source_start_addr, get_last_source_start_addr): New
4026         functions.
4027
4028 2018-07-16  Tom Tromey  <tom@tromey.com>
4029
4030         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4031         member.
4032         (have_line_numbers): Remove.
4033         (record_line, prepare_for_building, end_symtab_get_static_block)
4034         (augment_type_symtab): Update.
4035
4036 2018-07-16  Tom Tromey  <tom@tromey.com>
4037
4038         * buildsym.c (~buildsym_compunit): Free the macro table.
4039         (struct buildsym_compunit) <get_macro_table, release_macros>: New
4040         methods.
4041         <m_pending_macros>: New member.
4042         (pending_macros): Remove.
4043         (~scoped_free_pendings, get_macro_table, prepare_for_building)
4044         (reset_symtab_globals, end_symtab_get_static_block)
4045         (end_symtab_with_blockvector, augment_type_symtab)
4046         (buildsym_init): Update.
4047
4048 2018-07-16  Tom Tromey  <tom@tromey.com>
4049
4050         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4051         parameter.
4052         (buildsym_compunit::set_last_source_file): New method.
4053         <m_last_source_file>: New member.
4054         (prepare_for_building): Remove "name" parameter.
4055         (start_symtab, restart_symtab, reset_symtab_globals): Update.
4056         (last_source_file): Remove.
4057         (set_last_source_file, get_last_source_file): Update.
4058
4059 2018-07-16  Tom Tromey  <tom@tromey.com>
4060
4061         * buildsym.c (prepare_for_building): Add assert.
4062
4063 2018-07-16  Tom Tromey  <tom@tromey.com>
4064
4065         * buildsym.c (~buildsym_compunit): Update.
4066         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4067         (start_subfile, patch_subfile_names)
4068         (end_symtab_with_blockvector): Update.
4069
4070 2018-07-16  Tom Tromey  <tom@tromey.com>
4071
4072         * buildsym.c (struct buildsym_compunit): Add constructor,
4073         destructor, initializers.
4074         (start_buildsym_compunit): Remove.
4075         (free_buildsym_compunit): Use "delete".
4076         (start_symtab, restart_symtab): Use "new".
4077
4078 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
4079
4080         * symfile.c (set_objfile_default_section_offset): Remove struct
4081         keyword.
4082
4083 2018-07-14  Stafford Horne  <shorne@gmail.com>
4084
4085         * (Responsible Maintainers): Add myself as or1k maintainer.
4086
4087 2018-07-13  Tom Tromey  <tom@tromey.com>
4088
4089         * symfile.c (set_objfile_default_section_offset): Use extra braces
4090         around initializer.
4091
4092 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4093
4094         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4095         non-branching basr.
4096
4097 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4098
4099         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4100         unittests/cli-utils-selftests.c
4101         * unittests/cli-utils-selftests.c: New file.
4102
4103 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4104
4105         * NEWS: Mention new commands. Mention change to 'thread apply'.
4106
4107 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4108
4109         * thread.c (thr_try_catch_cmd): New function.
4110         (thread_apply_all_command): Handle qcs flags.
4111         (thread_apply_command): Handle qcs flags.
4112         (taas_command): New function.
4113         (tfaas_command): New function.
4114         (_initialize_thread): Update to setup the new commands 'taas
4115         and 'tfaas'. Change doc string for 'thread apply'.
4116
4117 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4118
4119         * stack.c: (trailing_outermost_frame): New function, mostly
4120         extracted from backtrace_command_1.
4121         (leading_innermost_frame): New function.
4122         (backtrace_command_1): Update to call trailing_outermost_frame.
4123         (frame_apply_command_count): New function.
4124         (frame_apply_level_command): New function.
4125         (frame_apply_all_command): New function.
4126         (frame_apply_command): New function.
4127         (faas_command): New function.
4128         (frame_cmd_list): New variable.
4129         (_initialize_stack): Update to setup the new commands 'frame apply'
4130         and 'faas'.
4131
4132 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4133
4134         * cli-utils.c (number_or_range_parser::get_number): Only handle
4135         numbers or convenience var as numbers.
4136         (parse_flags): New function.
4137         (parse_flags_qcs): New function.
4138         (number_or_range_parser::finished): Ensure parsing end is detected
4139         before end of string.
4140         * cli-utils.h (parse_flags): New function.
4141         (parse_flags_qcs): New function.
4142         (number_or_range_parser): Remove m_finished bool.
4143         (number_or_range_parser::skip_range): Set m_in_range to false.
4144
4145 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
4146
4147         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4148         on Windows.
4149
4150 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4151             Jan Kratochvil  <jan.kratochvil@redhat.com>
4152             Paul Fertser  <fercerpav@gmail.com>
4153             Tsutomu Seki  <sekiriki@gmail.com>
4154             Pedro Alves  <palves@redhat.com>
4155
4156         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4157         'unittests/parse-connection-spec-selftests.c'.
4158         (COMMON_SFILES): Add 'common/netstuff.c'.
4159         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4160         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4161         * common/netstuff.c: New file.
4162         * common/netstuff.h: New file.
4163         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4164         (wait_for_connect): Update comment.  New parameter
4165         'gdb::optional<int> sock' instead of 'struct serial *scb'.
4166         Use 'sock' directly instead of 'scb->fd'.
4167         (try_connect): New function, with code from 'net_open'.
4168         (net_open): Rewrite main loop to deal with multiple
4169         sockets/addresses.  Handle IPv6-style hostnames; implement
4170         support for IPv6 connections.
4171         * unittests/parse-connection-spec-selftests.c: New file.
4172
4173 2018-07-11  Pedro Alves  <palves@redhat.com>
4174
4175         PR gdb/23377
4176         * remote.c (remote_target::remote_detach_pid): Call
4177         set_current_process.
4178
4179 2018-07-11  Pedro Alves  <palves@redhat.com>
4180
4181         * h8300-tdep.c (h8300_gdbarch_init): Remove
4182         set_gdbarch_ecoff_reg_to_regnum calls.
4183
4184 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4185
4186         PR c++/23373
4187         * c-typeprint.c (c_type_print_base_struct_union): Don't print
4188         offsets/sizes for static members of a class/struct.
4189
4190 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
4191
4192         * target-descriptions.c (tdesc_register_bitsize): Rename.
4193         * target-descriptions.h (tdesc_register_bitsize): Likewise.
4194         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4195         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4196
4197 2018-07-10  Tom Tromey  <tom@tromey.com>
4198
4199         * breakpoint.c (moribund_locations): Now static and a
4200         std::vector.
4201         (breakpoint_init_inferior, moribund_breakpoint_here_p)
4202         (build_bpstat_chain, update_global_location_list)
4203         (breakpoint_retire_moribund): Update.
4204         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
4205         VEC.
4206
4207 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4208
4209         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4210         (riscv_register_reggroup_p): Use new function, remove unneeded
4211         parenthesis.
4212         (riscv_push_dummy_call): Extend assert to compare against xlen or
4213         flen based on register type.
4214
4215 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4216
4217         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4218
4219 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4220
4221         * remote.c (show_hardware_watchpoint_limit): New function.
4222         (show_hardware_watchpoint_length_limit): New function.
4223         (show_hardware_breakpoint_limit): New function.
4224         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4225         where appropriate, update help text.
4226
4227 2018-07-09  Tom Tromey  <tom@tromey.com>
4228
4229         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4230         (CLIBS): Don't mention NAT_CLIBS.
4231
4232 2018-07-09  Tom Tromey  <tom@tromey.com>
4233
4234         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4235         (LIBGDB_OBS, clean mostlyclean): Update.
4236         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4237
4238 2018-07-09  Tom Tromey  <tom@tromey.com>
4239
4240         * Makefile.in (%.c: %.y): Use ECHO_YACC.
4241         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
4242         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4243
4244 2018-07-09  Tom Tromey  <tom@tromey.com>
4245
4246         * Makefile.in (ALLDEPFILES): Remove exec.c.
4247         (COMMON_OBS): Remove exec.o.
4248         (COMMON_SFILES): Add exec.c.
4249
4250 2018-07-09  Tom Tromey  <tom@tromey.com>
4251
4252         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4253
4254 2018-07-09  Tom Tromey  <tom@tromey.com>
4255
4256         * Makefile.in (clean mostlyclean): Remove stamp-version.
4257         (version.c): Depend on stamp-version.
4258         (stamp-version): New rule, from version.c rule.
4259
4260 2018-07-09  Tom Tromey  <tom@tromey.com>
4261
4262         * Makefile.in (init.c): Depend on stamp-init.
4263         (stamp-init): New rule, from init.c rule.
4264         (clean mostlyclean): Remove stamp-init.
4265
4266 2018-07-09  Tom Tromey  <tom@tromey.com>
4267
4268         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4269         SUBDIR_GCC_COMPILE_SRCS.
4270
4271 2018-07-09  Tom Tromey  <tom@tromey.com>
4272
4273         * Makefile.in (init.c): Remove some unused sed rules.
4274
4275 2018-07-09  Tom Tromey  <tom@tromey.com>
4276
4277         * Makefile.in (TSOBS): Remove.
4278         (INIT_FILES): Update.
4279         (LIBGDB_OBS): Update.
4280         (COMMON_SFILES): Add inflow.c.
4281         (SFILES): Remove inflow.c.
4282
4283 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
4284
4285         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4286
4287 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
4288
4289         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4290         get_saveloc_name, is_signal_frame_name, step_name,
4291         init_remote_name, create_addr_space_name,
4292         destroy_addr_space_name, search_unwind_table_name,
4293         find_dyn_list_name): Constify.
4294
4295 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
4296
4297         * darwin-nat.c (darwin_pthread_kill): New function.
4298         (darwin_resume_thread): Use darwin_pthread_kill.
4299
4300 2018-07-05  Tom de Vries  <tdevries@suse.de>
4301
4302         * macroexp.c (macro_buffer) <operator=>: New member function.
4303
4304 2018-07-04  Tom Tromey  <tom@tromey.com>
4305
4306         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4307
4308 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
4309
4310         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4311         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4312         * maint.c: Likewise.
4313         * top.c: Likewise.
4314
4315 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4316
4317         * NEWS: Create a new section for the next release branch.
4318         Rename the section of the current branch, now that it has
4319         been cut.
4320
4321 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4322
4323         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4324         * version.in: Bump version to 8.2.50.DATE-git.
4325
4326 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
4327             Pedro Alves  <palves@redhat.com>
4328
4329         * linux-nat.c (linux_init_ptrace): Rename to ...
4330         (linux_init_ptrace_procfs): ... this.  Call
4331         linux_proc_init_warnings.
4332         (linux_nat_target::post_attach)
4333         (linux_nat_target::post_startup_inferior): Adjust.
4334         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4335         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4336
4337 2018-07-04  Tom de Vries  <tdevries@suse.de>
4338
4339         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4340         check ...
4341         (read_comp_unit_head): ... here.
4342
4343 2018-07-03  Tom Tromey  <tom@tromey.com>
4344
4345         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4346         (stop_tracing, tstatus_command)
4347         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4348         (print_one_static_tracepoint_marker): Update.
4349         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4350         std::vector.
4351         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
4352         VEC.
4353         (all_tracepoints, static_tracepoints_here): Return std::vector.
4354
4355 2018-07-03  Tom Tromey  <tom@tromey.com>
4356
4357         * common/ptid.c (ptid_equal): Remove.
4358         * common/ptid.h (ptid_equal): Don't declare.
4359         * ada-tasks.c: Update.
4360         * breakpoint.c: Update.
4361         * common/agent.c: Update.
4362         * corelow.c: Update.
4363         * darwin-nat-info.c: Update.
4364         * darwin-nat.c: Update.
4365         * dcache.c: Update.
4366         * dtrace-probe.c: Update.
4367         * dummy-frame.c: Update.
4368         * fbsd-nat.c: Update.
4369         * frame.c: Update.
4370         * gdbthread.h: Update.
4371         * gnu-nat.c: Update.
4372         * go32-nat.c: Update.
4373         * inf-loop.c: Update.
4374         * inf-ptrace.c: Update.
4375         * infcall.c: Update.
4376         * infcmd.c: Update.
4377         * inflow.c: Update.
4378         * infrun.c: Update.
4379         * linux-fork.c: Update.
4380         * linux-nat.c: Update.
4381         * linux-thread-db.c: Update.
4382         * mi/mi-cmd-var.c: Update.
4383         * mi/mi-interp.c: Update.
4384         * mi/mi-main.c: Update.
4385         * nto-procfs.c: Update.
4386         * ppc-linux-tdep.c: Update.
4387         * procfs.c: Update.
4388         * python/py-inferior.c: Update.
4389         * python/py-record-btrace.c: Update.
4390         * python/py-record.c: Update.
4391         * ravenscar-thread.c: Update.
4392         * regcache.c: Update.
4393         * remote-sim.c: Update.
4394         * remote.c: Update.
4395         * sol-thread.c: Update.
4396         * solib.c: Update.
4397         * target.c: Update.
4398         * tui/tui-stack.c: Update.
4399         * varobj.c: Update.
4400         * windows-nat.c: Update.
4401         * windows-tdep.c: Update.
4402
4403 2018-07-03  Tom Tromey  <tom@tromey.com>
4404
4405         * common/ptid.c (ptid_match): Remove.
4406         * common/ptid.h (ptid_match): Don't declare.
4407         * fbsd-nat.c: Update.
4408         * infcmd.c: Update.
4409         * infrun.c: Update.
4410         * linux-nat.c: Update.
4411         * record-btrace.c: Update.
4412         * regcache.c: Update.
4413         * remote.c: Update.
4414
4415 2018-07-03  Tom Tromey  <tom@tromey.com>
4416
4417         * common/ptid.c (ptid_tid_p): Remove.
4418         * common/ptid.h (ptid_tid_p): Don't declare.
4419         * sol-thread.c: Update.
4420
4421 2018-07-03  Tom Tromey  <tom@tromey.com>
4422
4423         * common/ptid.c (ptid_lwp_p): Remove.
4424         * common/ptid.h (ptid_lwp_p): Don't declare.
4425         * fbsd-nat.c: Update.
4426         * linux-nat.c: Update.
4427         * nat/linux-procfs.c: Update.
4428         * nat/x86-linux-dregs.c: Update.
4429         * sol-thread.c: Update.
4430
4431 2018-07-03  Tom Tromey  <tom@tromey.com>
4432
4433         * common/ptid.c (ptid_is_pid): Remove.
4434         * common/ptid.h (ptid_is_pid): Don't declare.
4435         * infrun.c: Update.
4436         * linux-nat.c: Update.
4437         * mi/mi-interp.c: Update.
4438         * remote.c: Update.
4439         * thread.c: Update.
4440
4441 2018-07-03  Tom Tromey  <tom@tromey.com>
4442
4443         * common/ptid.c (ptid_get_tid): Remove.
4444         * common/ptid.h (ptid_get_tid): Don't declare.
4445         * ada-tasks.c: Update.
4446         * aix-thread.c: Update.
4447         * bsd-uthread.c: Update.
4448         * darwin-nat.c: Update.
4449         * fbsd-nat.c: Update.
4450         * i386-darwin-nat.c: Update.
4451         * infrun.c: Update.
4452         * linux-tdep.c: Update.
4453         * nto-procfs.c: Update.
4454         * ppc-ravenscar-thread.c: Update.
4455         * python/py-infthread.c: Update.
4456         * ravenscar-thread.c: Update.
4457         * sol-thread.c: Update.
4458         * sparc-ravenscar-thread.c: Update.
4459         * windows-nat.c: Update.
4460
4461 2018-07-03  Tom Tromey  <tom@tromey.com>
4462
4463         * common/ptid.c (ptid_get_lwp): Remove.
4464         * common/ptid.h (ptid_get_lwp): Don't declare.
4465         * aarch64-linux-nat.c: Update.
4466         * ada-tasks.c: Update.
4467         * aix-thread.c: Update.
4468         * amd64-linux-nat.c: Update.
4469         * arm-linux-nat.c: Update.
4470         * corelow.c: Update.
4471         * fbsd-nat.c: Update.
4472         * fbsd-tdep.c: Update.
4473         * gnu-nat.c: Update.
4474         * i386-cygwin-tdep.c: Update.
4475         * i386-gnu-nat.c: Update.
4476         * i386-linux-nat.c: Update.
4477         * ia64-linux-nat.c: Update.
4478         * inf-ptrace.c: Update.
4479         * infrun.c: Update.
4480         * linux-fork.c: Update.
4481         * linux-nat.c: Update.
4482         * linux-tdep.c: Update.
4483         * linux-thread-db.c: Update.
4484         * mips-linux-nat.c: Update.
4485         * nat/aarch64-linux-hw-point.c: Update.
4486         * nat/aarch64-linux.c: Update.
4487         * nat/linux-btrace.c: Update.
4488         * nat/linux-osdata.c: Update.
4489         * nat/linux-procfs.c: Update.
4490         * nat/x86-linux-dregs.c: Update.
4491         * obsd-nat.c: Update.
4492         * ppc-fbsd-nat.c: Update.
4493         * ppc-linux-nat.c: Update.
4494         * procfs.c: Update.
4495         * python/py-infthread.c: Update.
4496         * ravenscar-thread.c: Update.
4497         * remote.c: Update.
4498         * s390-linux-nat.c: Update.
4499         * sol-thread.c: Update.
4500         * sol2-tdep.c: Update.
4501         * spu-linux-nat.c: Update.
4502         * x86-linux-nat.c: Update.
4503         * xtensa-linux-nat.c: Update.
4504
4505 2018-07-03  Tom Tromey  <tom@tromey.com>
4506
4507         * common/ptid.c (ptid_get_pid): Remove.
4508         * common/ptid.h (ptid_get_pid): Don't declare.
4509         * aarch64-linux-nat.c: Update.
4510         * ada-lang.c: Update.
4511         * aix-thread.c: Update.
4512         * alpha-bsd-nat.c: Update.
4513         * amd64-fbsd-nat.c: Update.
4514         * amd64-linux-nat.c: Update.
4515         * arm-linux-nat.c: Update.
4516         * arm-nbsd-nat.c: Update.
4517         * auxv.c: Update.
4518         * break-catch-syscall.c: Update.
4519         * breakpoint.c: Update.
4520         * bsd-uthread.c: Update.
4521         * corelow.c: Update.
4522         * ctf.c: Update.
4523         * darwin-nat.c: Update.
4524         * fbsd-nat.c: Update.
4525         * fbsd-tdep.c: Update.
4526         * gcore.c: Update.
4527         * gnu-nat.c: Update.
4528         * hppa-nbsd-nat.c: Update.
4529         * hppa-obsd-nat.c: Update.
4530         * i386-fbsd-nat.c: Update.
4531         * ia64-linux-nat.c: Update.
4532         * inf-ptrace.c: Update.
4533         * infcmd.c: Update.
4534         * inferior.c: Update.
4535         * inferior.h: Update.
4536         * inflow.c: Update.
4537         * infrun.c: Update.
4538         * linux-fork.c: Update.
4539         * linux-nat.c: Update.
4540         * linux-tdep.c: Update.
4541         * linux-thread-db.c: Update.
4542         * m68k-bsd-nat.c: Update.
4543         * mi/mi-interp.c: Update.
4544         * mi/mi-main.c: Update.
4545         * mips-linux-nat.c: Update.
4546         * mips-nbsd-nat.c: Update.
4547         * mips64-obsd-nat.c: Update.
4548         * nat/aarch64-linux-hw-point.c: Update.
4549         * nat/aarch64-linux.c: Update.
4550         * nat/linux-btrace.c: Update.
4551         * nat/linux-osdata.c: Update.
4552         * nat/linux-procfs.c: Update.
4553         * nat/x86-linux-dregs.c: Update.
4554         * nto-procfs.c: Update.
4555         * obsd-nat.c: Update.
4556         * ppc-linux-nat.c: Update.
4557         * ppc-nbsd-nat.c: Update.
4558         * ppc-obsd-nat.c: Update.
4559         * proc-service.c: Update.
4560         * procfs.c: Update.
4561         * python/py-inferior.c: Update.
4562         * python/py-infthread.c: Update.
4563         * ravenscar-thread.c: Update.
4564         * record.c: Update.
4565         * remote-sim.c: Update.
4566         * remote.c: Update.
4567         * rs6000-nat.c: Update.
4568         * s390-linux-nat.c: Update.
4569         * sh-nbsd-nat.c: Update.
4570         * sol-thread.c: Update.
4571         * sparc-nat.c: Update.
4572         * sparc64-tdep.c: Update.
4573         * spu-linux-nat.c: Update.
4574         * spu-tdep.c: Update.
4575         * target-debug.h: Update.
4576         * target.c: Update.
4577         * thread.c: Update.
4578         * tid-parse.c: Update.
4579         * tracefile-tfile.c: Update.
4580         * vax-bsd-nat.c: Update.
4581         * windows-nat.c: Update.
4582         * x86-linux-nat.c: Update.
4583         * x86-nat.c: Update.
4584
4585 2018-07-03  Tom Tromey  <tom@tromey.com>
4586
4587         * common/ptid.c (pid_to_ptid): Remove.
4588         * common/ptid.h (pid_to_ptid): Don't declare.
4589         * aix-thread.c: Update.
4590         * arm-linux-nat.c: Update.
4591         * common/ptid.c: Update.
4592         * common/ptid.h: Update.
4593         * corelow.c: Update.
4594         * ctf.c: Update.
4595         * darwin-nat.c: Update.
4596         * fbsd-nat.c: Update.
4597         * fork-child.c: Update.
4598         * gnu-nat.c: Update.
4599         * go32-nat.c: Update.
4600         * inf-ptrace.c: Update.
4601         * infcmd.c: Update.
4602         * inferior.c: Update.
4603         * infrun.c: Update.
4604         * linux-fork.c: Update.
4605         * linux-nat.c: Update.
4606         * nat/aarch64-linux-hw-point.c: Update.
4607         * nat/fork-inferior.c: Update.
4608         * nat/x86-linux-dregs.c: Update.
4609         * nto-procfs.c: Update.
4610         * obsd-nat.c: Update.
4611         * procfs.c: Update.
4612         * progspace.c: Update.
4613         * remote.c: Update.
4614         * rs6000-nat.c: Update.
4615         * s390-linux-nat.c: Update.
4616         * sol-thread.c: Update.
4617         * spu-linux-nat.c: Update.
4618         * target.c: Update.
4619         * top.c: Update.
4620         * tracefile-tfile.c: Update.
4621         * windows-nat.c: Update.
4622
4623 2018-07-03  Tom Tromey  <tom@tromey.com>
4624
4625         * common/ptid.h (ptid_build): Don't declare.
4626         * common/ptid.c (ptid_build): Remove.
4627         * aix-thread.c: Update.
4628         * bsd-kvm.c: Update.
4629         * bsd-uthread.c: Update.
4630         * common/agent.c: Update.
4631         * common/ptid.c: Update.
4632         * common/ptid.h: Update.
4633         * corelow.c: Update.
4634         * darwin-nat.c: Update.
4635         * fbsd-nat.c: Update.
4636         * gnu-nat.c: Update.
4637         * linux-fork.c: Update.
4638         * linux-nat.c: Update.
4639         * linux-thread-db.c: Update.
4640         * nat/linux-osdata.c: Update.
4641         * nat/linux-procfs.c: Update.
4642         * nto-procfs.c: Update.
4643         * obsd-nat.c: Update.
4644         * proc-service.c: Update.
4645         * procfs.c: Update.
4646         * ravenscar-thread.c: Update.
4647         * remote-sim.c: Update.
4648         * remote.c: Update.
4649         * sol-thread.c: Update.
4650         * target.c: Update.
4651         * windows-nat.c: Update.
4652
4653 2018-07-03  Tom Tromey  <tom@tromey.com>
4654
4655         * infrun.c (follow_exec): Use exit_inferior_silent.
4656         * inferior.c (exit_inferior_num_silent): Remove.
4657         * inferior.h (exit_inferior_num_silent): Don't declare.
4658
4659 2018-07-03  Tom Tromey  <tom@tromey.com>
4660
4661         PR cli/23340:
4662         * darwin-nat.c (darwin_attach_pid): Reset inferior and
4663         inferior_ptid on error.
4664
4665 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
4666             Simon Marchi  <simon.marchi@polymtl.ca>
4667
4668         PR tdep/8282
4669         * disasm.h (gdb_disassembler): Add
4670         `m_disassembler_options_holder'. member
4671         * disasm.c (get_all_disassembler_options): New function.
4672         (gdb_disassembler::gdb_disassembler): Use it.
4673         (gdb_buffered_insn_length_init_dis): Likewise.
4674         (gdb_buffered_insn_length): Adjust accordingly.
4675         (set_disassembler_options): Handle options with arguments.
4676         (show_disassembler_options_sfunc): Likewise.  Add a leading new
4677         line if showing options with descriptions.
4678         (disassembler_options_completer): Adapt to using the
4679         `disasm_options_and_args_t' structure.
4680         * mips-tdep.c (mips_disassembler_options): New variable.
4681         (mips_disassembler_options_o32): Likewise.
4682         (mips_disassembler_options_n32): Likewise.
4683         (mips_disassembler_options_n64): Likewise.
4684         (gdb_print_insn_mips): Don't set `disassembler_options'.
4685         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4686         functions.
4687         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4688         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
4689         `gdbarch_disassembler_options_implicit' and
4690         `gdbarch_valid_disassembler_options'.
4691         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4692         `disasm_options_and_args_t' structure.
4693         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4694         method.
4695         (valid_disassembler_options): Switch from `disasm_options_t' to
4696         the `disasm_options_and_args_t' structure.
4697         * NEWS: Document `set disassembler-options' support for the MIPS
4698         target.
4699         * gdbarch.h: Regenerate.
4700         * gdbarch.c: Regenerate.
4701
4702 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4703
4704         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4705
4706 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
4707
4708         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4709         parameter in call to amd64_target_description.
4710         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4711         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4712         (amd64fbsd_init_abi): Likewise.
4713         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4714         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4715         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4716         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4717
4718 2018-06-29  Pedro Alves  <palves@redhat.com>
4719
4720         * gdb/amd64-tdep.h (amd64_create_target_description): Add
4721         "segments" parameter.
4722         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4723         (_initialize_amd64_tdep): Update call to
4724         amd64_create_target_description.
4725         (amd64_target_description): Add "segments" parameter.  Adjust
4726         the implementation to use it.
4727         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4728         call to amd64_create_target_description.
4729         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4730         * gdb/arch/amd64.h (amd64_create_target_description): Add
4731         "segments" register.
4732         * gdb/arch/amd64.c (amd64_create_target_description): Add
4733         "segments" parameter.  Call create_feature_i386_64bit_segments
4734         only if SEGMENTS is true.
4735         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4736         call to amd64_create_target_description.
4737
4738 2018-06-29  Pedro Alves  <palves@redhat.com>
4739
4740         * thread.c (thread_target_id_str): New, factored out from ...
4741         (print_thread_info_1): ... here.  Use it to compute the max
4742         "Target Id" column width.
4743
4744 2018-06-29  Pedro Alves  <palves@redhat.com>
4745
4746         * remote.c (remote_target::extra_thread_info): Delete
4747         'display_buf' and 'n' locals.  from the cache, regardless of
4748         packet mechanims is in use.  Use cache for qThreadExtra and qP
4749         methods too.
4750
4751 2018-06-29  Pedro Alves  <palves@redhat.com>
4752
4753         * blockframe.c (find_pc_sect_containing_function): New function.
4754         * breakpoint.c (print_breakpoint_location): Don't call
4755         find_pc_sect_function.
4756         * linespec.c (create_sals_line_offset): Record the location's
4757         symbol in the sal.
4758         * linespec.c (convert_address_location_to_sals): Fill in sal's
4759         symbol with find_pc_sect_containing_function.
4760         * symtab.c (find_function_start_sal): Rename to ...
4761         (find_function_start_sal_1): ... this.
4762         (find_function_start_sal): Reimplement as wrapper around
4763         find_function_start_sal_1, and use
4764         find_pc_sect_containing_function to fill in the sal's symbol.
4765         (find_function_start_sal(symbol*, bool)): Adjust.
4766         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4767         comments.
4768         (find_pc_sect_containing_function): Declare.
4769
4770 2018-06-29  Pedro Alves  <palves@redhat.com>
4771
4772         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4773         true if the the location has no symbol.
4774
4775 2018-06-28  Tom Tromey  <tom@tromey.com>
4776
4777         * NEWS: Mention --enable-codesign.
4778         * silent-rules.mk (ECHO_SIGN): New variable.
4779         * configure.ac: Add --enable-codesign.
4780         * configure: Rebuild.
4781         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4782         (gdb$(EXEEXT)): Optionally invoke codesign.
4783
4784 2018-06-28  Pedro Alves  <palves@redhat.com>
4785
4786         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4787         comments.
4788         (switch_to_thread_no_regs): Adjust comment.
4789         * infcmd.c (stop_pc): Delete.
4790         (post_create_inferior, info_program_command): Replace references
4791         to stop_pc with references to thread_info->suspend.stop_pc.
4792         * inferior.h (stop_pc): Delete declaration.
4793         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4794         (handle_inferior_event_1, handle_signal_stop)
4795         (process_event_stop_test, keep_going_stepped_thread)
4796         (handle_step_into_function, handle_step_into_function_backward)
4797         (print_stop_location): Replace references to stop_pc with
4798         references to thread_info->suspend.stop_pc.
4799         (struct infcall_suspend_state) <stop_pc>: Delete field.
4800         (save_infcall_suspend_state, restore_infcall_suspend_state):
4801         Remove references to inf_stat->stop_pc.
4802         * linux-fork.c (fork_load_infrun_state): Likewise.
4803         * record-btrace.c (record_btrace_set_replay): Likewise.
4804         * record-full.c (record_full_goto_entry): Likewise.
4805         * remote.c (print_one_stopped_thread): Likewise.
4806         * target.c (target_resume): Extend comment.
4807         * thread.c (set_executing_thread): New.
4808         (set_executing): Use it.
4809         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4810         Remove references to stop_pc.
4811
4812 2018-06-28  Pedro Alves  <palves@redhat.com>
4813
4814         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4815         Moving fetching stop_pc until after ecs->event_thread is refreshed.
4816
4817 2018-06-28  Tom Tromey  <tom@tromey.com>
4818
4819         * coffread.c (coff_symfile_finish): Update.
4820         * xcoffread.c (xcoff_symfile_finish): Update.
4821         * elfread.c (elf_symfile_finish): Update.
4822         * symfile.h (dwarf2_free_objfile): Don't declare.
4823         * dwarf2read.c (_initialize_dwarf2_read): Use
4824         register_objfile_data_with_cleanup.
4825         (dwarf2_free_objfile): Now static.  Change signature.
4826
4827 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4828
4829         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4830         option "-o" to add-symbol-file-load to add an offset to each
4831         section's load address.
4832         * symfile.c (set_objfile_default_section_offset): New function.
4833
4834 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4835
4836         * symfile.c (add_symbol_file_command): Make sure that sections
4837         with the same name are sorted in the same order.
4838
4839 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4840
4841         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4842         require the second argument.  If omitted, load sections at the
4843         addresses specified in the file.
4844
4845 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4846
4847         * symfile.c (symbol_file_command, symbol_file_add_main_1)
4848         (_initialize_symfile): Add option "-o" to symbol-file to add an
4849         offset to each section of the symbol file.
4850
4851 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4852
4853         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4854
4855 2018-06-27  Tom Tromey  <tom@tromey.com>
4856
4857         * stack.c (_initialize_stack): Update "func" help text.
4858
4859 2018-06-27  Tom Tromey  <tom@tromey.com>
4860
4861         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4862         std::vector.
4863         (unwind_infopy_str, pyuw_create_unwind_info)
4864         (unwind_infopy_add_saved_register, pyuw_sniffer)
4865         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4866         Update.
4867         (struct saved_reg): Add constructor.
4868         <value>: Now a gdbpy_ref<>.
4869
4870 2018-06-27  Tom Tromey  <tom@tromey.com>
4871
4872         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4873
4874 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4875
4876         * gdb-gdb.py.in: Format using autopep8.
4877
4878 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4879
4880         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4881         (type_lookup_function): Recognize CORE_ADDR values.
4882
4883 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4884
4885         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
4886         print tag_name.
4887
4888 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4889
4890         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
4891         <__lt__>: Add.
4892
4893 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4894
4895         * gdb-gdb.py: Move to...
4896         * gdb-gdb.py.in: ... here.
4897         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
4898         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
4899         dependencies.
4900         (distclean): Remove gdb-gdb.py when cleaning.
4901         (gdb-gdb.py, gdb-gdb.gdb): New rules.
4902         * configure: Re-generate.
4903
4904 2018-06-27  Pedro Alves  <palves@redhat.com>
4905
4906         * proc-service.c (get_ps_regcache): New.
4907         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4908         (ps_lsetfpregs): Use it.
4909
4910 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
4911
4912         PR gdb/21695
4913         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
4914         (dwarf_decode_lines_1): Adjust.
4915
4916 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4917
4918         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
4919         override.
4920         <info_proc>: Likewise.
4921
4922 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
4923
4924         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
4925         to windows_fetch_one_register, and only handle the case of
4926         fetching one register.  Move the code that reloads the context
4927         and iterates over all registers if R is negative to...
4928         (windows_nat_target::fetch_registers): ... here.
4929         (do_windows_store_inferior_registers): Rename to
4930         windows_store_one_register, and only handle the case of storing
4931         one register.  Move the code that handles the case where r is
4932         negative to...
4933         (windows_nat_target::store_registers) ... here.
4934
4935 2018-06-26  Tom Tromey  <tom@tromey.com>
4936
4937         PR rust/22574:
4938         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
4939         * rust-lang.c (rust_print_struct_def): Add podata parameter.
4940         Update.
4941         (rust_internal_print_type): Add podata parameter.
4942         (rust_print_type): Update.
4943
4944 2018-06-26  Tom Tromey  <tom@tromey.com>
4945
4946         * typeprint.h (struct print_offset_data) <update, finish,
4947         maybe_print_hole>: New methods.
4948         <indentation>: New constant.
4949         * typeprint.c (print_offset_data::indentation): Define.
4950         (print_offset_data::maybe_print_hole, print_offset_data::update)
4951         (print_offset_data::finish): Move from c-typeprint.c and rename.
4952         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
4953         (print_spaces_filtered_with_print_options): Update.
4954         (c_print_type_union_field_offset, maybe_print_hole)
4955         (c_print_type_struct_field_offset): Move to typeprint.c and
4956         rename.
4957         (c_type_print_base_struct_union): Update.
4958
4959 2018-06-25  Pedro Alves  <palves@redhat.com>
4960
4961         * gdbthread.h (thread_info_ref, delete_thread)
4962         (delete_thread_silent, first_thread_of_inferior)
4963         (any_thread_of_inferior, switch_to_thread)
4964         (enable_thread_stack_temporaries)
4965         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4966         (get_last_thread_stack_temporary)
4967         (value_in_thread_stack_temporaries, can_access_registers_thread):
4968         Spell out "struct thread_info" instead of just "thread_info".
4969         * inferior.h (notice_new_inferior): Likewise.
4970
4971 2018-06-25  Pedro Alves  <palves@redhat.com>
4972
4973         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4974         pass thread_info pointer to delete_thread.
4975         (windows_nat_target::detach): Pass inferior pointer to
4976         detach_inferior.
4977         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
4978         delete_thread.
4979         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
4980         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
4981         and pass a thread_info pointer to delete_thread.
4982         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
4983         pass thread_info pointer to delete_thread.
4984         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
4985         delete_thread_silent call.
4986         * procfs.c (procfs_target::detach): Pass inferior pointer to
4987         detach_inferior.
4988         (procfs_target::wait): Pass thread_info pointer to delete_thread.
4989         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
4990         delete_thread_silent call.
4991         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
4992         pass thread_info pointer to delete_thread.
4993         (windows_nat_target::detach): Pass inferior pointer to
4994         delete_inferior.
4995
4996 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
4997
4998         * regcache.c (readable_regcache::read_part): Fix asserts.
4999         (reg_buffer::raw_collect_part): New function.
5000         (regcache::write_part): Fix asserts.
5001         (reg_buffer::raw_supply_part): New function.
5002         (regcache::transfer_regset_register): New helper function.
5003         (regcache::transfer_regset): Call new functions.
5004         (regcache_supply_regset): Use gdb_byte*.
5005         (regcache::supply_regset): Likewise.
5006         (regcache_collect_regset): Likewise.
5007         (regcache::collect_regset): Likewise.
5008         * regcache.h (reg_buffer::raw_collect_part): New declaration.
5009         (reg_buffer::raw_supply_part): Likewise.
5010         (regcache::transfer_regset_register): Likewise.
5011         (regcache::transfer_regset): Use gdb_byte*.
5012
5013 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5014
5015         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5016
5017 2018-06-21  Pedro Alves  <palves@redhat.com>
5018
5019         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5020         instead of a ptid_t.  All callers adjusted.
5021         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
5022         adjusted.
5023         (print_ada_task_info, display_current_task_id, task_command_1):
5024         Adjust.
5025         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5026         inferior_thread.
5027         (breakpoint_kind): Adjust.
5028         (remove_breakpoints_pid): Rename to ...
5029         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
5030         pointer.  All callers adjusted.
5031         (bpstat_clear_actions): Use inferior_thread.
5032         (get_bpstat_thread): New.
5033         (bpstat_do_actions): Use it.
5034         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5035         to take a thread_info pointer.  All callers adjusted.
5036         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5037         (breakpoint_re_set_thread): Use inferior_thread.
5038         * breakpoint.h (struct inferior): Forward declare.
5039         (bpstat_stop_status): Update.
5040         (remove_breakpoints_pid): Delete.
5041         (remove_breakpoints_inf): New.
5042         * bsd-uthread.c (bsd_uthread_target::wait)
5043         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5044         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5045         (maint_btrace_packet_history_cmd)
5046         (maint_btrace_clear_packet_history_cmd): Adjust.
5047         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5048         inferior_thread.
5049         * cli/cli-interp.c: Include "inferior.h".
5050         * common/refcounted-object.h (struct
5051         refcounted_object_ref_policy): New.
5052         * compile/compile-object-load.c: Include gdbthread.h.
5053         (store_regs): Use inferior_thread.
5054         * corelow.c (core_target::close): Use current_inferior.
5055         (core_target_open): Adjust to use first_thread_of_inferior and use
5056         the current inferior.
5057         * ctf.c (ctf_target::close): Adjust to use current_inferior.
5058         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5059         <thread>: ... this new field.  All references adjusted.
5060         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5061         Take a thread_info pointer instead of a ptid_t.
5062         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5063         (dummy_frame_discard, register_dummy_frame_dtor): Take a
5064         thread_info pointer instead of a ptid_t.
5065         * elfread.c: Include "inferior.h".
5066         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5067         Use inferior_thread.
5068         * eval.c (evaluate_subexp): Likewise.
5069         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5070         inferior_thread.
5071         * gdb_proc_service.h (struct thread_info): Forward declare.
5072         (struct ps_prochandle) <ptid>: Delete, replaced by ...
5073         <thread>: ... this new field.  All references adjusted.
5074         * gdbarch.h, gdbarch.c: Regenerate.
5075         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5076         'thread' parameter.  All implementations and callers adjusted.
5077         * gdbthread.h (thread_info) <set_running>: New method.
5078         (delete_thread, delete_thread_silent): Take a thread_info pointer
5079         instead of a ptid.
5080         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5081         (first_thread_of_process): Delete, replaced by ...
5082         (first_thread_of_inferior): ... this new function.  All callers
5083         adjusted.
5084         (any_live_thread_of_process): Delete, replaced by ...
5085         (any_live_thread_of_inferior): ... this new function.  All callers
5086         adjusted.
5087         (switch_to_thread, switch_to_no_thread): Declare.
5088         (is_executing): Delete.
5089         (enable_thread_stack_temporaries): Update comment.
5090         <enable_thread_stack_temporaries>: Take a thread_info pointer
5091         instead of a ptid_t.  Incref the thread.
5092         <~enable_thread_stack_temporaries>: Decref the thread.
5093         <m_ptid>: Delete
5094         <m_thr>: New.
5095         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5096         (get_last_thread_stack_temporary)
5097         (value_in_thread_stack_temporaries, can_access_registers_thread):
5098         Take a thread_info pointer instead of a ptid_t.  All callers
5099         adjusted.
5100         * infcall.c (get_call_return_value): Use inferior_thread.
5101         (run_inferior_call): Work with thread pointers instead of ptid_t.
5102         (call_function_by_hand_dummy): Work with thread pointers instead
5103         of ptid_t.  Use thread_info_ref.
5104         * infcmd.c (proceed_thread_callback): Access thread's state
5105         directly.
5106         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5107         access thread's state directly.
5108         (continue_command): Use inferior_thread.
5109         (info_program_command): Use find_thread_ptid and access thread
5110         state directly.
5111         (proceed_after_attach_callback): Use thread state directly.
5112         (notice_new_inferior): Take a thread_info pointer instead of a
5113         ptid_t.  All callers adjusted.
5114         (exit_inferior): Take an inferior pointer instead of a pid.  All
5115         callers adjusted.
5116         (exit_inferior_silent): New.
5117         (detach_inferior): Delete.
5118         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5119         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5120         (detach_inferior_command, kill_inferior_command): Use
5121         find_inferior_id instead of valid_gdb_inferior_id and
5122         gdb_inferior_id_to_pid.
5123         (inferior_command): Use inferior and thread pointers.
5124         * inferior.h (struct thread_info): Forward declare.
5125         (notice_new_inferior): Take a thread_info pointer instead of a
5126         ptid_t.  All callers adjusted.
5127         (detach_inferior): Delete declaration.
5128         (exit_inferior, exit_inferior_silent): Take an inferior pointer
5129         instead of a pid.  All callers adjusted.
5130         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5131         (valid_gdb_inferior_id): Delete.
5132         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5133         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5134         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5135         ...
5136         <inf>: ... this new field.
5137         <step_ptid>: Delete, replaced by ...
5138         <step_thread>: ... this new field.
5139         (get_displaced_stepping_state): Take an inferior pointer instead
5140         of a pid.  All callers adjusted.
5141         (displaced_step_in_progress_any_inferior): Adjust.
5142         (displaced_step_in_progress_thread): Take a thread pointer instead
5143         of a ptid_t.  All callers adjusted.
5144         (displaced_step_in_progress, add_displaced_stepping_state): Take
5145         an inferior pointer instead of a pid.  All callers adjusted.
5146         (get_displaced_step_closure_by_addr): Adjust.
5147         (remove_displaced_stepping_state): Take an inferior pointer
5148         instead of a pid.  All callers adjusted.
5149         (displaced_step_prepare_throw, displaced_step_prepare)
5150         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5151         All callers adjusted.
5152         (start_step_over): Adjust.
5153         (infrun_thread_ptid_changed): Remove bit updating ptids in the
5154         displaced step queue.
5155         (do_target_resume): Adjust.
5156         (fetch_inferior_event): Use inferior_thread.
5157         (context_switch, get_inferior_stop_soon): Take an
5158         execution_control_state pointer instead of a ptid_t.  All callers
5159         adjusted.
5160         (switch_to_thread_cleanup): Delete.
5161         (stop_all_threads): Use scoped_restore_current_thread.
5162         * inline-frame.c: Include "gdbthread.h".
5163         (inline_state) <inline_state>: Take a thread pointer instead of a
5164         ptid_t.  All callers adjusted.
5165         <ptid>: Delete, replaced by ...
5166         <thread>: ... this new field.
5167         (find_inline_frame_state): Take a thread pointer instead of a
5168         ptid_t.  All callers adjusted.
5169         (skip_inline_frames, step_into_inline_frame)
5170         (inline_skipped_frames, inline_skipped_symbol): Take a thread
5171         pointer instead of a ptid_t.  All callers adjusted.
5172         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5173         (inline_skipped_frames, inline_skipped_symbol): Likewise.
5174         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5175         pointers directly.
5176         * linux-nat.c (get_detach_signal): Likewise.
5177         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5178         (thread_db_notice_clone): Adjust.
5179         (thread_db_find_new_threads_silently)
5180         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5181         a thread pointer instead of a ptid_t.  All callers adjusted.
5182         * mi/mi-cmd-var.c: Include "inferior.h".
5183         (mi_cmd_var_update_iter): Update to use thread pointers.
5184         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5185         inferior directly.
5186         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5187         out to ...
5188         (mi_output_running): ... this new function.
5189         (mi_on_resume_1): Adjust to use it.
5190         (mi_user_selected_context_changed): Adjust to use inferior_thread.
5191         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5192         directly.
5193         (interrupt_thread_callback): : Adjust to use thread and inferior
5194         pointers.
5195         * proc-service.c: Include "gdbthread.h".
5196         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5197         * progspace-and-thread.c: Include "inferior.h".
5198         * progspace.c: Include "inferior.h".
5199         * python/py-exitedevent.c (create_exited_event_object): Adjust to
5200         hold a reference to an inferior_object.
5201         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5202         inferior_thread.
5203         * python/py-inferior.c (struct inferior_object): Give the type a
5204         tag name instead of a typedef.
5205         (python_on_normal_stop): No need to check if the current thread is
5206         listed.
5207         (inferior_to_inferior_object): Change return type to
5208         inferior_object.  All callers adjusted.
5209         (find_thread_object): Delete, bits factored out to ...
5210         (thread_to_thread_object): ... this new function.
5211         * python/py-infthread.c (create_thread_object): Use
5212         inferior_to_inferior_object.
5213         (thpy_is_stopped): Use thread pointer directly.
5214         (gdbpy_selected_thread): Use inferior_thread.
5215         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5216         field, replaced with ...
5217         <thread>: ... this new field.  All users adjusted.
5218         (btpy_insn_or_gap_new): Drop const.
5219         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
5220         callers adjusted.
5221         * python/py-record.c: Include "gdbthread.h".
5222         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5223         a ptid_t.  All callers adjusted.
5224         (gdbpy_current_recording): Use inferior_thread.
5225         * python/py-record.h (recpy_record_object) <ptid>: Delete
5226         field, replaced with ...
5227         <thread>: ... this new field.  All users adjusted.
5228         (recpy_element_object) <ptid>: Delete
5229         field, replaced with ...
5230         <thread>: ... this new field.  All users adjusted.
5231         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5232         a ptid_t.  All callers adjusted.
5233         * python/py-threadevent.c: Include "gdbthread.h".
5234         (get_event_thread): Use thread_to_thread_object.
5235         * python/python-internal.h (struct inferior_object): Forward
5236         declare.
5237         (find_thread_object, find_inferior_object): Delete declarations.
5238         (thread_to_thread_object, inferior_to_inferior_object): New
5239         declarations.
5240         * record-btrace.c: Include "inferior.h".
5241         (require_btrace_thread): Use inferior_thread.
5242         (record_btrace_frame_sniffer)
5243         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5244         (get_thread_current_frame): Use scoped_restore_current_thread and
5245         switch_to_thread.
5246         (get_thread_current_frame): Use thread pointer directly.
5247         (record_btrace_replay_at_breakpoint): Use thread's inferior
5248         pointer directly.
5249         * record-full.c: Include "inferior.h".
5250         * regcache.c: Include "gdbthread.h".
5251         (get_thread_arch_regcache): Use the inferior's address space
5252         directly.
5253         (get_thread_regcache, registers_changed_thread): New.
5254         * regcache.h (get_thread_regcache(thread_info *thread)): New
5255         overload.
5256         (registers_changed_thread): New.
5257         (remote_target) <remote_detach_1>: Swap order of parameters.
5258         (remote_add_thread): <remote_add_thread>: Return the new thread.
5259         (get_remote_thread_info(ptid_t)): New overload.
5260         (remote_target::remote_notice_new_inferior): Use thread pointers
5261         directly.
5262         (remote_target::process_initial_stop_replies): Use
5263         thread_info::set_running.
5264         (remote_target::remote_detach_1, remote_target::detach)
5265         (extended_remote_target::detach): Adjust.
5266         * stack.c (frame_show_address): Use inferior_thread.
5267         * target-debug.h (target_debug_print_thread_info_pp): New.
5268         * target-delegates.c: Regenerate.
5269         * target.c (default_thread_address_space): Delete.
5270         (memory_xfer_partial_1): Use current_inferior.
5271         (target_detach): Use current_inferior.
5272         (target_thread_address_space): Delete.
5273         (generic_mourn_inferior): Use current_inferior.
5274         * target.h (struct target_ops) <thread_address_space>: Delete.
5275         (target_thread_address_space): Delete.
5276         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
5277         pointers directly.
5278         (delete_thread_1, delete_thread, delete_thread_silent): Take a
5279         thread pointer instead of a ptid_t.  Adjust all callers.
5280         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5281         (first_thread_of_process): Delete, replaced by ...
5282         (first_thread_of_inferior): ... this new function.  All callers
5283         adjusted.
5284         (any_thread_of_process): Rename to ...
5285         (any_thread_of_inferior): ... this, and take an inferior pointer.
5286         (any_live_thread_of_process): Rename to ...
5287         (any_live_thread_of_inferior): ... this, and take an inferior
5288         pointer.
5289         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5290         (value_in_thread_stack_temporaries)
5291         (get_last_thread_stack_temporary): Take a thread pointer instead
5292         of a ptid_t.  Adjust all callers.
5293         (thread_info::set_running): New.
5294         (validate_registers_access): Use inferior_thread.
5295         (can_access_registers_ptid): Rename to ...
5296         (can_access_registers_thread): ... this, and take a thread
5297         pointer.
5298         (print_thread_info_1): Adjust to compare thread pointers instead
5299         of ptids.
5300         (switch_to_no_thread, switch_to_thread): Make extern.
5301         (scoped_restore_current_thread::~scoped_restore_current_thread):
5302         Use m_thread pointer directly.
5303         (scoped_restore_current_thread::scoped_restore_current_thread):
5304         Use inferior_thread.
5305         (thread_command): Use thread pointer directly.
5306         (thread_num_make_value_helper): Use inferior_thread.
5307         * top.c (execute_command): Use inferior_thread.
5308         * tui/tui-interp.c: Include "inferior.h".
5309         * varobj.c (varobj_create): Use inferior_thread.
5310         (value_of_root_1): Use find_thread_global_id instead of
5311         global_thread_id_to_ptid.
5312
5313 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
5314
5315         * regcache.c (readable_regcache::read_part): Avoid memcpy when
5316         possible.
5317         (regcache::write_part): Likewise.
5318         (readable_regcache::cooked_read_part): Update comment.
5319         (readable_regcache::cooked_write_part): Likewise.
5320         * regcache.h: (readable_regcache::read_part): Likewise.
5321         (regcache::write_part): Likewise.
5322
5323 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
5324             Dirk Schubert  <dirk.schubert@arm.com>
5325
5326         * aarch64-linux-nat.c (post_attach): New.
5327         (aarch64_linux_nat_target::post_attach): Override post_attach to
5328         record the number of hardware debug registers.
5329
5330 2018-06-20  Tom Tromey  <tom@tromey.com>
5331
5332         * python/py-param.c (add_setshow_generic): Make parameters const.
5333         (parmpy_init): Update.
5334
5335 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5336
5337         * regcache.h (regcache_cooked_read_ftype): Rename to...
5338         (register_read_ftype): ...this, change type to function_view.
5339         (class reg_buffer) <save>: Remove src parameter.
5340         (readonly_detached_regcache) <readonly_detached_regcache>: Make
5341         parameter non-const in first overload.  Remove src parameter in
5342         second overload.
5343         * regcache.c (do_cooked_read): Remove.
5344         (readonly_detached_regcache::readonly_detached_regcache): Make
5345         parameter non-const, adjust call to other constructor.
5346         (reg_buffer::save): Remove src parameter.
5347         * frame.c (do_frame_register_read): Remove.
5348         (frame_save_as_regcache): Use lambda function.
5349         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5350         parameter to ppu2spu_data *.
5351         (ppu2spu_sniffer): Use lambda function.
5352
5353 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5354
5355         * record-full.c (record_full_target::insert_breakpoint): Remove
5356         "struct" keyword, add const.
5357
5358 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
5359
5360         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5361         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5362         * configure.ac: Remove AC_PREREQ, add missing quoting.
5363         * gnulib/configure.ac: Modernize usage of
5364         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
5365         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5366         (AUTOMAKE_VERSION): Bump to 1.15.1.
5367         * configure: Re-generate.
5368         * config.in: Re-generate.
5369         * aclocal.m4: Re-generate.
5370         * gnulib/aclocal.m4: Re-generate.
5371         * gnulib/config.in: Re-generate.
5372         * gnulib/configure: Re-generate.
5373         * gnulib/import/Makefile.in: Re-generate.
5374
5375 2018-06-19  Pedro Alves  <palves@redhat.com>
5376
5377         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5378         (lookup_minimal_symbol_by_pc_section): ... here with
5379         gdb_assert_not_reached added.
5380
5381 2018-06-19  Pedro Alves  <palves@redhat.com>
5382
5383         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5384         parameter with a block parameter.  Compare location's block symbol
5385         with the frame's block instead of addresses.
5386         (skip_inline_frames): Pass the current block instead of the
5387         frame's address.  Break out as soon as we determine the frame
5388         should not be skipped.
5389
5390 2018-06-18  Tom Tromey  <tom@tromey.com>
5391
5392         * solib-aix.c (solib_aix_get_section_offsets): Return
5393         unique_xmalloc_ptr.
5394         (solib_aix_solib_create_inferior_hook): Update.
5395
5396 2018-06-18  Tom Tromey  <tom@tromey.com>
5397
5398         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5399
5400 2018-06-18  Tom Tromey  <tom@tromey.com>
5401
5402         * solib-frv.c (frv_relocate_main_executable): Use
5403         unique_xmalloc_ptr.
5404         * solib-dsbt.c (dsbt_relocate_main_executable): Use
5405         unique_xmalloc_ptr.
5406
5407 2018-06-18  Tom Tromey  <tom@tromey.com>
5408
5409         * objfiles.h (inhibit_section_map_updates): Update.
5410         (resume_section_map_updates, resume_section_map_updates_cleanup):
5411         Remove.
5412         * solib-svr4.c (svr4_handle_solib_event): Update.
5413         * objfiles.c (inhibit_section_map_updates): Return
5414         scoped_restore_tmpl<int>.
5415         (resume_section_map_updates, resume_section_map_updates_cleanup):
5416         Remove.
5417
5418 2018-06-18  Tom Tromey  <tom@tromey.com>
5419
5420         * valprint.h (read_string): Update.
5421         * valprint.c (read_string): Change type of "buffer".
5422         (val_print_string): Update.
5423         * python/py-value.c (valpy_string): Update.
5424         * language.h (struct language_defn) <la_get_string>: Change
5425         type of "buffer".
5426         (default_get_string, c_get_string): Update.
5427         * language.c (default_get_string): Change type of "buffer".
5428         * guile/scm-value.c (gdbscm_value_to_string): Update.
5429         * c-lang.c (c_get_string): Change type of "buffer".
5430
5431 2018-06-18  Tom Tromey  <tom@tromey.com>
5432
5433         * ser-mingw.c (struct pipe_state_destroyer): New.
5434         (pipe_state_up): New typedef.
5435         (cleanup_pipe_state): Remove.
5436         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
5437
5438 2018-06-18  Tom Tromey  <tom@tromey.com>
5439
5440         * rust-lang.h (rust_yyerror): Don't declare.
5441         * rust-lang.c (rust_language_defn): Update.
5442         * rust-exp.y (yyerror): Now static.
5443         * parse.c (parse_exp_in_context_1): Update.
5444         * p-lang.h (p_yyerror): Don't declare.
5445         * p-lang.c (p_language_defn): Update.
5446         * p-exp.y (yyerror): Now static.
5447         * opencl-lang.c (opencl_language_defn): Update.
5448         * objc-lang.c (objc_language_defn): Update.
5449         * m2-lang.h (m2_yyerror): Don't declare.
5450         * m2-lang.c (m2_language_defn): Update.
5451         * m2-exp.y (yyerror): Now static.
5452         * language.h (struct language_defn) <la_error>: Remove.
5453         * language.c (unk_lang_error): Remove.
5454         (unknown_language_defn, auto_language_defn): Remove.
5455         * go-lang.h (go_yyerror): Don't declare.
5456         * go-lang.c (go_language_defn): Update.
5457         * go-exp.y (yyerror): Now static.
5458         * f-lang.h (f_yyerror): Don't declare.
5459         * f-lang.c (f_language_defn): Update.
5460         * f-exp.y (yyerror): Now static.
5461         * d-lang.h (d_yyerror): Don't declare.
5462         * d-lang.c (d_language_defn): Update.
5463         * d-exp.y (yyerror): Now static.
5464         * c-lang.h (c_yyerror): Don't declare.
5465         * c-lang.c (c_language_defn, cplus_language_defn)
5466         (asm_language_defn, minimal_language_defn): Update.
5467         * c-exp.y (yyerror): Now static.
5468         * ada-lang.h (ada_yyerror): Don't declare.
5469         * ada-lang.c (ada_language_defn): Update.
5470         * ada-exp.y (yyerror): Now static.
5471
5472 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5473
5474         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5475         (store_sveregs_to_thread): Likewise.
5476         (aarch64_linux_fetch_inferior_registers): Check for SVE.
5477         (aarch64_linux_store_inferior_registers): Likewise.
5478         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5479         function.
5480         (aarch64_sve_regs_copy_to_regcache): Likewise.
5481         (aarch64_sve_regs_copy_from_regcache): Likewise.
5482         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5483         declaration.
5484         (aarch64_sve_regs_copy_to_regcache): Likewise.
5485         (aarch64_sve_regs_copy_from_regcache): Likewise.
5486         (sve_context): Structure from Linux headers.
5487         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5488         (SVE_SIG_ZREG_SIZE): Likewise.
5489         (SVE_SIG_PREG_SIZE): Likewise.
5490         (SVE_SIG_FFR_SIZE): Likewise.
5491         (SVE_SIG_REGS_OFFSET): Likewise.
5492         (SVE_SIG_ZREGS_OFFSET): Likewise.
5493         (SVE_SIG_ZREG_OFFSET): Likewise.
5494         (SVE_SIG_ZREGS_SIZE): Likewise.
5495         (SVE_SIG_PREGS_OFFSET): Likewise.
5496         (SVE_SIG_PREG_OFFSET): Likewise.
5497         (SVE_SIG_PREGS_SIZE): Likewise.
5498         (SVE_SIG_FFR_OFFSET): Likewise.
5499         (SVE_SIG_REGS_SIZE): Likewise.
5500         (SVE_SIG_CONTEXT_SIZE): Likewise.
5501         (SVE_PT_REGS_MASK): Likewise.
5502         (SVE_PT_REGS_FPSIMD): Likewise.
5503         (SVE_PT_REGS_SVE): Likewise.
5504         (SVE_PT_VL_INHERIT): Likewise.
5505         (SVE_PT_VL_ONEXEC): Likewise.
5506         (SVE_PT_REGS_OFFSET): Likewise.
5507         (SVE_PT_FPSIMD_OFFSET): Likewise.
5508         (SVE_PT_FPSIMD_SIZE): Likewise.
5509         (SVE_PT_SVE_ZREG_SIZE): Likewise.
5510         (SVE_PT_SVE_PREG_SIZE): Likewise.
5511         (SVE_PT_SVE_FFR_SIZE): Likewise.
5512         (SVE_PT_SVE_FPSR_SIZE): Likewise.
5513         (SVE_PT_SVE_FPCR_SIZE): Likewise.
5514         (__SVE_SIG_TO_PT): Likewise.
5515         (SVE_PT_SVE_OFFSET): Likewise.
5516         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5517         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5518         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5519         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5520         (SVE_PT_SVE_PREG_OFFSET): Likewise.
5521         (SVE_PT_SVE_PREGS_SIZE): Likewise.
5522         (SVE_PT_SVE_FFR_OFFSET): Likewise.
5523         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5524         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5525         (SVE_PT_SVE_SIZE): Likewise.
5526         (SVE_PT_SIZE): Likewise.
5527         (HAS_SVE_STATE): New define.
5528
5529 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5530
5531         * nat/aarch64-sve-linux-sigcontext.h: New file.
5532         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5533         new files.
5534         (SVE_VQ_MIN): Likewise.
5535         (SVE_VQ_MAX): Likewise.
5536         (SVE_VL_MIN): Likewise.
5537         (SVE_VL_MAX): Likewise.
5538         (SVE_NUM_ZREGS): Likewise.
5539         (SVE_NUM_PREGS): Likewise.
5540         (sve_vl_valid): Likewise.
5541         (struct user_sve_header): Likewise.
5542
5543 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
5544             Richard Bunt <Richard.Bunt@arm.com>
5545
5546         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5547         was requested by GDB.
5548
5549 2018-06-15  Tom de Vries  <tdevries@suse.de>
5550
5551         * MAINTAINERS (Write After Approval): Add Tom de Vries.
5552
5553 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
5554
5555         * gnulib/update-gnulib.sh: Print expected versions of
5556         autoconf/aclocal.
5557
5558 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
5559
5560         * arch-utils.c (default_type_align): Use type_length_units.
5561         * gdbtypes.c (type_align): Use type_length_units.
5562
5563 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5564
5565         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5566         of 'define' command.
5567
5568 2018-06-14  Tom de Vries  <tdevries@suse.de>
5569
5570         PR cli/22573
5571         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5572         get_no_prettyformat_print_options.
5573
5574 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5575
5576         * sparc-nat.h: Include target.h.
5577         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5578         <fetch_registers>: Remove this argument in function call.
5579         <store_registers>: Remove this argument in function call, remove
5580         extra semicolon.
5581         <low_forget_process>: Call sparc64_forget_process instead of
5582         sparc_forget_process.
5583
5584 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5585
5586         * procfs.c (_initialize_procfs): Use add_inf_child_target.
5587         (procfs_target::make_corefile_notes): Adjust to new
5588         target_read_alloc return type.
5589
5590 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5591             Stephen Roberts  <stephen.roberts@arm.com>
5592
5593         PR gdb/22882
5594         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5595         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5596         Move should_notify_stop local into more inner scope.
5597
5598 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5599             Stephen Roberts  <stephen.roberts@arm.com>
5600
5601         PR gdb/22882
5602         * infrun.c (resume_1): Add call to mark_async_event_handler.
5603
5604 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5605
5606         * infrun.c (do_target_wait): Change old version of $pc printed.
5607
5608 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5609
5610         * dwarf2read.c (read_index_from_section): Rename to...
5611         (read_gdb_index_from_section): ... this, update all callers.
5612         (dwarf2_read_index): Rename to...
5613         (dwarf2_read_gdb_index): ... this, update all callers.
5614
5615 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
5616
5617         * gdb/hppa-linux-nat.c
5618         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5619         hppa_linux_nat_target::fetch_registers.
5620
5621 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5622
5623         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5624         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5625         (AARCH64_DWARF_SVE_FFR): Likewise.
5626         (AARCH64_DWARF_SVE_P0): Likewise.
5627         (AARCH64_DWARF_SVE_Z0): Likewise.
5628
5629 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5630
5631         * common/common-regcache.h (raw_compare): New function.
5632         * regcache.c (regcache::raw_compare): Likewise.
5633         * regcache.h (regcache::raw_compare): New declaration.
5634
5635 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5636
5637         * common/common-regcache.h (reg_buffer_common): New structure.
5638         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5639         (reg_buffer::raw_supply): Likewise.
5640         (reg_buffer::raw_supply_integer): Likewise.
5641         (reg_buffer::raw_supply_zeroed): Likewise.
5642         (reg_buffer::raw_collect): Likewise.
5643         (reg_buffer::raw_collect_integer): Likewise.
5644         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5645         (reg_buffer::raw_supply): Likewise.
5646         (reg_buffer::raw_supply_integer): Likewise.
5647         (reg_buffer::raw_supply_zeroed): Likewise.
5648         (reg_buffer::raw_collect): Likewise.
5649         (reg_buffer::raw_collect_integer): Likewise.
5650
5651 2018-06-10  Tom Tromey  <tom@tromey.com>
5652
5653         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
5654         (class remote_state) <stop_reply_queue>: Now std::vector.
5655         (remote_state::~remote_state)
5656         (remote_target::stop_reply_queue_length): Update.
5657         (struct queue_iter_param, remove_child_of_pending_fork)
5658         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5659         (check_pending_event_prevents_wildcard_vcont_callback)
5660         (remove_stop_reply_for_inferior)
5661         (remove_stop_reply_of_remote_state)
5662         (remote_notif_remove_once_on_match)
5663         (stop_reply_match_ptid_and_ws)
5664         (remote_kill_child_of_pending_fork): Remove.
5665         (remote_target::remove_new_fork_children)
5666         (remote_target::check_pending_events_prevent_wildcard_vcont)
5667         (remote_target::discard_pending_stop_replies)
5668         (remote_target::discard_pending_stop_replies_in_queue)
5669         (remote_target::remote_notif_remove_queued_reply)
5670         (remote_target::queued_stop_reply)
5671         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5672         (remote_target::wait, remote_target::kill_new_fork_children)
5673         (remote_target::async): Update.
5674
5675 2018-06-10  Tom Tromey  <tom@tromey.com>
5676
5677         * record-full.c (record_full_arch_list_cleanups): Remove.
5678         (record_full_message): Use try/catch.
5679         (record_full_wait_cleanups): Remove.
5680         (record_full_wait_1): Use try/catch.
5681         (record_full_restore): Likewise.
5682
5683 2018-06-10  Tom Tromey  <tom@tromey.com>
5684
5685         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
5686         declare VEC.  Add constructor.
5687         <in_target_beneath>: Now bool.
5688         (record_full_breakpoints): Now a std::vector, static.
5689         (record_full_sync_record_breakpoints)
5690         (record_full_init_record_breakpoints)
5691         (record_full_target::insert_breakpoint)
5692         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
5693
5694 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5695
5696         * dwarf2read.c (process_cu_includes): Remove struct keyword.
5697         * serial.c (serial_interface_lookup): Remove struct keyword.
5698
5699 2018-06-10  Tom Tromey  <tom@tromey.com>
5700
5701         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5702         method.
5703         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5704         a method.
5705         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5706         method.
5707         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5708         "beneath" as a method.
5709         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5710         Use "beneath" as a method.
5711
5712 2018-06-10  Tom Tromey  <tom@tromey.com>
5713
5714         * tracefile.c (struct trace_file_writer_deleter): New.
5715         <operator()>: Rename from trace_file_writer_xfree.
5716         (trace_file_writer_up): New typedef.
5717         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5718
5719 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5720
5721         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5722         <m_registers, m_register_status>: Change type to
5723         std::unique_ptr.
5724         * regcache.c (reg_buffer::reg_buffer): Use new instead of
5725         XCNEWVEC.
5726
5727 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5728
5729         * common/common-regcache.h (enum register_status): Add
5730         underlying type "signed char".
5731         * regcache.h (reg_buffer) <m_register_status>: Change type to
5732         register_status *.
5733         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5734         register_status instead of signed char.
5735         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5736         (reg_buffer::get_register_status): Remove cast.
5737         (readable_regcache::raw_read): Remove cast.
5738         (readable_regcache::cooked_read): Remove cast.
5739
5740 2018-06-09  Tom Tromey  <tom@tromey.com>
5741
5742         * source.c (reverse_search_command, forward_search_command): Use
5743         scoped_fd.
5744
5745 2018-06-09  Tom Tromey  <tom@tromey.com>
5746
5747         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
5748         (serial_ops_list): Now static, std::vector.
5749         (serial_interface_lookup, serial_add_interface): Update.
5750
5751 2018-06-09  Tom Tromey  <tom@tromey.com>
5752
5753         * dwarf2read.c (process_cu_includes): Update.
5754         (process_full_comp_unit): Update.
5755         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5756         std::vector.
5757
5758 2018-06-08  Paul Koning  <paul_koning@dell.com>
5759
5760         PR gdb/23252
5761
5762         * python/python.c (do_start_initialization):
5763         Avoid call to internal Python API.
5764         (init__gdb_module): New function.
5765
5766 2018-06-08  Gary Benson <gbenson@redhat.com>
5767
5768         * linux-thread-db.c (valprint.h): New include.
5769         (struct check_thread_db_info): New structure.
5770         (check_thread_db_on_load, tdb_testinfo): New static globals.
5771         (check_thread_db, check_thread_db_callback): New functions.
5772         (try_thread_db_load_1): Run integrity checks if requested.
5773         (maintenance_check_libthread_db): New function.
5774         (_initialize_thread_db): Register "maint check libthread-db"
5775         and "maint set/show check-libthread-db".
5776         * NEWS: Mention the above new commands.
5777
5778 2018-06-08  Tom Tromey  <tom@tromey.com>
5779
5780         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5781         now a method.
5782
5783 2018-06-08  Tom Tromey  <tom@tromey.com>
5784
5785         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5786
5787 2018-06-08  Tom Tromey  <tom@tromey.com>
5788
5789         * common/btrace-common.h (struct btrace_data): Add constructor,
5790         destructor, move assignment operator.
5791         <empty, clear, fini>: New methods.
5792         <format>: Initialize.
5793         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5794         (btrace_data_empty): Don't declare.
5795         * common/btrace-common.c (btrace_data_init): Remove.
5796         (btrace_data::fini): Rename from btrace_data_fini.
5797         (btrace_data::empty): Rename from btrace_data_empty.
5798         (btrace_data::clear): Rename from btrace_data_clear.  Return
5799         bool.
5800         * btrace.h (make_cleanup_btrace_data): Don't declare.
5801         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5802         (parse_xml_btrace): Update.
5803         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5804         (maint_btrace_clear_packet_history_cmd): Update.
5805
5806 2018-06-07  Pedro Alves  <palves@redhat.com>
5807
5808         * target.h (target_ops) <beneath>: Now a method.  All references
5809         updated.
5810         (class target_stack): New.
5811         * target.c (g_target_stack): New.
5812         (g_current_top_target): Delete.
5813         (current_top_target): Get the top target out of g_target_stack.
5814         (target_stack::push, target_stack::unpush): New.
5815         (push_target, unpush_target): Reimplement.
5816         (target_is_pushed): Reimplement in terms of g_target_stack.
5817         (target_ops::beneath, target_stack::find_beneath): New.
5818
5819 2018-06-07  Pedro Alves  <palves@redhat.com>
5820
5821         * target.h (find_target_beneath): Delete declaration.
5822         * target.c (find_target_beneath): Delete definition.
5823         * aix-thread.c: All callers of find_target_beneath adjusted to
5824         call target_ops::beneath instead.
5825         * bsd-uthread.c: Likewise.
5826         * linux-thread-db.c: Likewise.
5827         * ravenscar-thread.c: Likewise.
5828         * sol-thread.c: Likewise.
5829         * spu-multiarch.c: Likewise.
5830
5831 2018-06-07  Pedro Alves  <palves@redhat.com>
5832
5833         * target.h (target_ops) <beneath>: Now a method.  All references
5834         updated.
5835         (target_ops) <m_beneath>: New.
5836         * target.c (target_ops::beneath): New.
5837         * corelow.c: Adjust all references to target_ops::beneath.
5838         * linux-thread-db.c: Likewise.
5839         * make-target-delegates: Likewise.
5840         * record-btrace.c: Likewise.
5841         * record-full.c: Likewise.
5842         * remote.c: Likewise.
5843         * target.c: Likewise.
5844         * target-delegates.c: Regenerate.
5845
5846 2018-06-07  Pedro Alves  <palves@redhat.com>
5847
5848         * target.h (target_stack): Delete.
5849         (current_top_target): Declare function.
5850         * target.c (target_stack): Delete.
5851         (g_current_top_target): New.
5852         (current_top_target): New function.
5853         * auxv.c: Use current_top_target instead of target_stack
5854         throughout.
5855         * avr-tdep.c: Likewise.
5856         * breakpoint.c: Likewise.
5857         * corefile.c: Likewise.
5858         * elfread.c: Likewise.
5859         * eval.c: Likewise.
5860         * exceptions.c: Likewise.
5861         * frame.c: Likewise.
5862         * gdbarch-selftests.c: Likewise.
5863         * gnu-v3-abi.c: Likewise.
5864         * ia64-tdep.c: Likewise.
5865         * ia64-vms-tdep.c: Likewise.
5866         * infcall.c: Likewise.
5867         * infcmd.c: Likewise.
5868         * infrun.c: Likewise.
5869         * linespec.c: Likewise.
5870         * linux-tdep.c: Likewise.
5871         * minsyms.c: Likewise.
5872         * ppc-linux-nat.c: Likewise.
5873         * ppc-linux-tdep.c: Likewise.
5874         * procfs.c: Likewise.
5875         * regcache.c: Likewise.
5876         * remote.c: Likewise.
5877         * rs6000-tdep.c: Likewise.
5878         * s390-linux-nat.c: Likewise.
5879         * s390-tdep.c: Likewise.
5880         * solib-aix.c: Likewise.
5881         * solib-darwin.c: Likewise.
5882         * solib-dsbt.c: Likewise.
5883         * solib-spu.c: Likewise.
5884         * solib-svr4.c: Likewise.
5885         * solib-target.c: Likewise.
5886         * sparc-tdep.c: Likewise.
5887         * sparc64-tdep.c: Likewise.
5888         * spu-tdep.c: Likewise.
5889         * symfile.c: Likewise.
5890         * symtab.c: Likewise.
5891         * target-descriptions.c: Likewise.
5892         * target-memory.c: Likewise.
5893         * target.c: Likewise.
5894         * target.h: Likewise.
5895         * tracefile-tfile.c: Likewise.
5896         * tracepoint.c: Likewise.
5897         * valops.c: Likewise.
5898         * valprint.c: Likewise.
5899         * value.c: Likewise.
5900         * windows-tdep.c: Likewise.
5901         * mi/mi-main.c: Likewise.
5902
5903 2018-06-07  Tom Tromey  <tom@tromey.com>
5904
5905         * valprint.h (build_address_symbolic): Declare.
5906         * printcmd.c (print_address_symbolic): Update.
5907         (build_address_symbolic): Change "name" and "filename" to
5908         std::string.
5909         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
5910         Update.
5911         * defs.h (build_address_symbolic): Remove declaration.
5912
5913 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
5914
5915         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
5916         (aarch64_vnv_type): Add function.
5917         (aarch64_pseudo_register_name): Add V regs for SVE.
5918         (aarch64_pseudo_register_type): Likewise.
5919         (aarch64_pseudo_register_reggroup_p): Likewise.
5920         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
5921         (aarch64_pseudo_read_value): Add V regs for SVE.
5922         (aarch64_pseudo_write_2): Use V0 offset for SVE
5923         (aarch64_pseudo_write): Add V regs for SVE.
5924         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
5925
5926 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
5927
5928         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
5929         (sve_vl_from_vq): Likewise.
5930
5931 2018-06-05  Tom Tromey  <tom@tromey.com>
5932
5933         * cli/cli-cmds.c (show_version): Update.
5934         * top.c (print_gdb_version): Add "interactive" parameter.
5935         Update.
5936         * main.c (captured_main_1): Update.
5937         * top.h (print_gdb_version): Add "interactive" parameter and a
5938         comment.
5939
5940 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
5941
5942         * common/enum-flags.h: Add trailing semicolon to example in
5943         comment.
5944
5945 2018-06-05  Tom Tromey  <tom@tromey.com>
5946
5947         PR cli/12326:
5948         * NEWS: Add entry about pager.
5949         * utils.c (pagination_disabled_for_command): New global.
5950         (prompt_for_continue): Allow "c" response to prompt.
5951         (reinitialize_more_filter): Clear
5952         pagination_disabled_for_command.
5953         (fputs_maybe_filtered): Check pagination_disabled_for_command.
5954
5955 2018-06-04  Tom Tromey  <tom@tromey.com>
5956
5957         * ada-lang.h (ada_lookup_symbol_list): Update.
5958         * ada-lang.c (resolve_subexp): Update.
5959         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
5960         parameter.
5961         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
5962         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
5963         results parameter to std::vector.
5964         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
5965         Update.
5966         * ada-exp.y (block_lookup): Update.
5967         (select_possible_type_sym): Change type of syms.  Remove nsyms
5968         parameter.
5969         (write_var_or_type, write_name_assoc): Update.
5970
5971 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
5972
5973         * windows-nat.c (windows_nat_target::xfer_partial): Return
5974         TARGET_XFER_E_IO if we need to delegate to the target beneath
5975         but BENEATH is NULL.
5976
5977 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
5978
5979         * Makefile.in (config.status): Add configure.nat as a
5980         dependency.
5981
5982 2018-06-04  Tom Tromey  <tom@tromey.com>
5983
5984         * cp-name-parser.y (cpname_state): Add method declarations.
5985         (HANDLE_QUAL): Update.
5986         (cpname_state::d_grab, cpname_state::fill_comp)
5987         (cpname_state::make_operator, cpname_state::make_dtor)
5988         (cpname_state::make_builtin_type, cpname_state::make_name)
5989         (cpname_state::d_qualify, cpname_state::d_int_type)
5990         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
5991         (%union): Move earlier.
5992
5993 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5994
5995         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
5996
5997 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
5998
5999         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6000         (aarch64_pseudo_write_1): Likewise.
6001         (aarch64_pseudo_read_value): Use helper.
6002         (aarch64_pseudo_write): Likewise.
6003
6004 2018-06-04  Pedro Alves  <palves@redhat.com>
6005
6006         * darwin-nat.c (darwin_ops): Delete.
6007         (darwin_attach_pid): Use get_native_target.
6008
6009 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6010
6011         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6012         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6013
6014 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6015
6016         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6017         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6018         (aarch64_gdbarch_init): Check for SVE.
6019         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6020
6021 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6022
6023         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6024         * aarch64-tdep.h (aarch64_read_description): Likewise.
6025         * arch/aarch64.c (aarch64_create_target_description): Likewise.
6026         * arch/aarch64.h (aarch64_create_target_description): Likewise.
6027         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6028         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6029         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6030
6031 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6032
6033         * value.c (value_fetch_lazy_bitfield): New.
6034         (value_fetch_lazy_memory): New.
6035         (value_fetch_lazy_register): New.
6036         (value_fetch_lazy): Factor out to smaller functions.
6037
6038 2018-06-01  Tom Tromey  <tom@tromey.com>
6039
6040         * cp-name-parser.y (backslashable, represented): Now const.
6041
6042 2018-06-01  Tom Tromey  <tom@tromey.com>
6043
6044         * cp-name-parser.y: Include parser-defs.h.
6045         (parser_fprintf): Remove declaration.
6046
6047 2018-06-01  Tom Tromey  <tom@tromey.com>
6048
6049         * cp-name-parser.y: Use %pure-parser, %lex-param, and
6050         %parse-param.
6051         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6052         (global_result): Remove globals.
6053         (struct cpname_state): New.
6054         (yyparse): Don't declare.
6055         (yylex, yyerror): Move declarations after %union.
6056         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6057         (make_name): Add state parameter.
6058         Update all callers.
6059         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6060         parameter.
6061         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6062         Update.
6063         (yylex): Add lvalp, state parameters.
6064         (yyerror): Add state parameter.
6065         (cp_demangled_name_to_comp): Update.
6066
6067 2018-06-01  Tom Tromey  <tom@tromey.com>
6068
6069         * cp-name-parser.y (parser_fprintf): Declare.
6070         (GDB_YY_REMAP_PREFIX): Define.
6071         Include yy-remap.h.  Don't redefine yy* identifiers.
6072
6073 2018-06-01  Tom Tromey  <tom@tromey.com>
6074
6075         * python/py-type.c (typy_legacy_template_argument): Update.
6076         * cp-support.h (cp_demangled_name_to_comp): Update.
6077         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6078         parameter to be a "std::string *".
6079         (main): Update.
6080
6081 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
6082
6083         * ada-lex.l: Include "diagnostics.h" instead of
6084         "common/diagnostics.h".
6085         * unittests/environ-selftests.c: Likewise.
6086         * common/diagnostics.h: Moved to ../include.
6087
6088 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
6089
6090         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6091         to language_mode_manual while calling breakpoint_re_set_one.
6092
6093 2018-06-01  Tom Tromey  <tom@tromey.com>
6094
6095         * valops.c (value_cast_structs, destructor_name_p): Update.
6096         * symtab.c (gdb_mangle_name): Update.
6097         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6098         Update.
6099         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6100         (pascal_object_print_value_fields, pascal_object_print_value):
6101         Update.
6102         * p-typeprint.c (pascal_type_print_derivation_info): Update.
6103         * linespec.c (find_methods): Update.
6104         * gdbtypes.h (type_name_no_tag): Remove.
6105         (type_name_or_error): Rename from type_name_no_tag_or_error.
6106         * gdbtypes.c (type_name_no_tag): Remove.
6107         (type_name_or_error): Rename from type_name_no_tag_or_error.
6108         (lookup_struct_elt_type, check_typedef): Update.
6109         * expprint.c (print_subexp_standard): Update.
6110         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6111         * d-namespace.c (d_lookup_nested_symbol): Update.
6112         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6113         (cp_print_class_member): Update.
6114         * cp-namespace.c (cp_lookup_nested_symbol): Update.
6115         * completer.c (add_struct_fields): Update.
6116         * c-typeprint.c (cp_type_print_derivation_info)
6117         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6118         Update.
6119         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6120         (ada_prefer_type, ada_is_exception_sym): Update.
6121
6122 2018-06-01  Tom Tromey  <tom@tromey.com>
6123
6124         * valops.c (enum_constant_from_type, value_namespace_elt)
6125         (value_maybe_namespace_elt): Update.
6126         * valarith.c (find_size_for_pointer_math): Update.
6127         * target-descriptions.c (make_gdb_type): Update.
6128         * symmisc.c (print_symbol): Update.
6129         * stabsread.c (define_symbol, read_type)
6130         (complain_about_struct_wipeout, add_undefined_type)
6131         (cleanup_undefined_types_1): Update.
6132         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6133         (rust_range_type_p, val_print_struct, rust_print_struct_def)
6134         (rust_internal_print_type, rust_composite_type)
6135         (rust_evaluate_funcall, rust_evaluate_subexp)
6136         (rust_inclusive_range_type_p): Update.
6137         * python/py-type.c (typy_get_tag): Update.
6138         * p-typeprint.c (pascal_type_print_base): Update.
6139         * mdebugread.c (parse_symbol, parse_type): Update.
6140         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6141         Update.
6142         * guile/scm-type.c (gdbscm_type_tag): Update.
6143         * go-lang.c (sixg_string_p): Update.
6144         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6145         Update.
6146         * gdbtypes.h (struct main_type) <tag_name>: Remove.
6147         (TYPE_TAG_NAME): Remove.
6148         * gdbtypes.c (type_name_no_tag): Simplify.
6149         (check_typedef, check_types_equal, recursive_dump_type)
6150         (copy_type_recursive, arch_composite_type): Update.
6151         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
6152         in summary mode when needed.
6153         * eval.c (evaluate_funcall): Update.
6154         * dwarf2read.c (fixup_go_packaging, read_structure_type)
6155         (process_structure_scope, read_enumeration_type)
6156         (read_namespace_type, read_module_type, determine_prefix): Update.
6157         * cp-support.c (inspect_type): Update.
6158         * coffread.c (process_coff_symbol, decode_base_type): Update.
6159         * c-varobj.c (c_is_path_expr_parent): Update.
6160         * c-typeprint.c (c_type_print_base_struct_union): Update.
6161         (c_type_print_base_1): Update.  Print struct/class/union/enum in
6162         summary when using C language.
6163         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6164         (gen_maybe_namespace_elt): Update.
6165         * ada-lang.c (ada_type_name): Simplify.
6166         (empty_record, ada_template_to_fixed_record_type_1)
6167         (template_to_static_fixed_type)
6168         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6169
6170 2018-06-01  Tom Tromey  <tom@tromey.com>
6171
6172         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6173         c_print_type.
6174         * c-typeprint.c (c_print_type_1): Add "language" parameter.
6175         (c_print_type): Update.
6176         (c_print_type): New overload.
6177         (c_type_print_varspec_prefix, c_type_print_args)
6178         (c_type_print_varspec_suffix, c_print_type_no_offsets)
6179         (c_type_print_base_struct_union, c_type_print_base_1)
6180         (cp_type_print_method_args): Add "language" parameter.
6181         (c_type_print_base): Update.
6182         * c-lang.h (c_print_type): Add new overload.
6183
6184 2018-06-01  Tom Tromey  <tom@tromey.com>
6185
6186         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6187         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6188
6189 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
6190
6191         * aarch64-tdep.c (aarch64_sve_register_names): New const
6192         var.
6193         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6194         (AARCH64_SVE_Z_REGS_NUM): New define.
6195         (AARCH64_SVE_P_REGS_NUM): Likewise.
6196         (AARCH64_SVE_NUM_REGS): Likewise.
6197
6198 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
6199
6200         * nat/linux-ptrace.h [__alpha__]
6201         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6202         definitions.
6203
6204 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
6205
6206         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6207         the endianness selected.
6208         * NEWS: Document `set endian auto' mode operation update.
6209
6210 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6211
6212         * Makefile.in: Add new header.
6213         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6214         (sve_vl_from_vg): Likewise.
6215         (sve_vq_from_vl): Likewise.
6216         (sve_vl_from_vq): Likewise.
6217         (sve_vq_from_vg): Likewise.
6218         (sve_vg_from_vq): Likewise.
6219         * configure.nat: Add new c file.
6220         * nat/aarch64-sve-linux-ptrace.c: New file.
6221         * nat/aarch64-sve-linux-ptrace.h: New file.
6222
6223 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6224
6225         * aarch64-linux-nat.c (aarch64_linux_read_description):
6226         Add parmeter zero.
6227         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6228         Likewise.
6229         * aarch64-tdep.c (tdesc_aarch64_list): Add.
6230         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6231         (aarch64_gdbarch_init): Add parmeter zero.
6232         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6233         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6234         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6235         parmeter.
6236         * doc/gdb.texinfo: Describe SVE feature
6237         * features/aarch64-sve.c: New file.
6238
6239 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
6240
6241         PR gdb/23210
6242         * gdbarch.sh (significant_addr_bit): Default to zero when
6243         not set by target architecture.
6244         * gdbarch.c: Re-generated.
6245         * utils.c (address_significant): Update.
6246
6247 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
6248
6249         * stack.c (func_command): Remove trailing newline in call to error.
6250
6251 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6252
6253         * regcache.h (regcache_raw_collect): Remove, update callers to
6254         use regcache::raw_collect.
6255         * regcache.c (regcache_raw_collect): Remove.
6256
6257 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6258
6259         * regcache.h (regcache_raw_supply): Remove, update callers to
6260         use detached_regcache::raw_supply.
6261         * regcache.c (regcache_raw_supply): Remove.
6262
6263 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6264
6265         * regcache.h (regcache_cooked_write_part): Remove, update
6266         callers to use regcache::cooked_write_part.
6267         * regcache.c (regcache_cooked_write_part): Remove.
6268
6269 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6270
6271         * regcache.h (regcache_cooked_read_part): Remove, update callers
6272         to use readable_regcache::cooked_read_part.
6273         * regcache.c (regcache_cooked_read_part): Remove.
6274
6275 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6276
6277         * regcache.h (regcache_cooked_read_value): Remove, update
6278         callers to use readable_regcache::cooked_read_value.
6279         * regcache.c (regcache_cooked_read_value): Remove.
6280
6281 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6282
6283         * regcache.h (regcache_cooked_write): Remove, update callers to
6284         use regcache::cooked_write.
6285         * regcache.c (regcache_cooked_write): Remove.
6286
6287 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6288
6289         * regcache.h (regcache_invalidate): Remove, update callers to
6290         use detached_regcache::invalidate instead.
6291         * regcache.c (regcache_invalidate): Remove.
6292
6293 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6294
6295         * regcache.h (regcache_raw_write_part): Remove, update callers
6296         to use regcache::raw_write_part instead.
6297         * regcache.c (regcache_raw_write_part): Remove.
6298
6299 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6300
6301         * regcache.h (regcache_raw_read_part): Remove, update callers to
6302         use readable_regcache::raw_read_part instead.
6303         * regcache.c (regcache_raw_read_part): Remove.
6304
6305 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6306
6307         * regcache.h (regcache_cooked_read): Remove, update callers to
6308         use readable_regcache::cooked_read instead.
6309         * regcache.c (regcache_cooked_read): Remove.
6310
6311 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6312
6313         * regcache.h (regcache_raw_write): Remove, update callers to use
6314         regcache::raw_write instead.
6315         * regcache.c (regcache_raw_write): Remove.
6316
6317 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6318
6319         * regcache.h (regcache_raw_read): Remove, update callers to use
6320         readable_regcache::raw_read instead.
6321         * regcache.c (regcache_raw_read): Remove.
6322
6323 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6324
6325         * regcache.h (regcache_raw_update): Remove, update callers to
6326         use readable_regcache::raw_update instead.
6327         * regcache.c (regcache_raw_update): Remove.
6328
6329 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6330
6331         * regcache.h (regcache_register_status): Remove, update callers
6332         to use reg_buffer::get_register_status directly instead.
6333         * regcache.c (regcache_register_status): Remove.
6334
6335 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6336
6337         * regcache.h (regcache_get_ptid): Remove, update all callers to
6338         call regcache::ptid instead.
6339         * regcache.c (regcache_get_ptid): Remove.
6340
6341 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6342
6343         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6344
6345 2018-05-30  Pedro Alves  <palves@redhat.com>
6346
6347         * common/common-exceptions.h (exception_rethrow): Use
6348         ATTRIBUTE_NORETURN.
6349
6350 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
6351
6352         * breakpoint.c (print_solib_event, check_status_catch_solib):
6353         Remove struct keyword in range-based for loops.
6354         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6355         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6356         Likewise.
6357         * linespec.c (find_superclass_methods, search_minsyms_for_name):
6358         Likewise.
6359         * symfile.c (addr_info_make_relative): Likewise.
6360         * thread.c (value_in_thread_stack_temporaries): Likewise.
6361
6362 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
6363
6364         PR gdb/16841
6365         * valops.c (value_struct_elt_for_reference): Call check_typedef on
6366         aggregate type to get its real type before accessing it.
6367
6368 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
6369
6370         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6371         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6372         * coff-pe-read.c (add_pe_forwarded_sym): Replace
6373         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6374         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6375         * jit.c (jit_breakpoint_re_set_internal): Likewise.
6376         * printcmd.c (info_address_command): Likewise.
6377
6378 2018-05-29  Tom Tromey  <tom@tromey.com>
6379
6380         * windows-nat.c (handle_exception): Update fall-through comment.
6381
6382 2018-05-29  Tom Tromey  <tom@tromey.com>
6383
6384         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
6385         (struct program_space) <added_solibs>: Now a std::vector.
6386         * breakpoint.c (print_solib_event): Update.
6387         (check_status_catch_solib): Update.
6388         * progspace.c (clear_program_space_solib_cache): Update.
6389         * solib.c (update_solib_list): Update.
6390
6391 2018-05-29  Tom Tromey  <tom@tromey.com>
6392
6393         * python/py-type.c (typy_richcompare): Update.
6394         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6395         * gdbtypes.h (types_deeply_equal): Return bool.
6396         (types_equal): Likewise.
6397         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
6398         declare VEC.
6399         (check_types_equal): Change worklist to std::vector.  Return
6400         bool.
6401         (struct type_equality_entry): Add constructor.
6402         (compare_maybe_null_strings): Return bool.
6403         (check_types_worklist): Return bool.  Change worklist to
6404         std::vector.
6405         (types_deeply_equal): Use std::vector.
6406         (types_equal): Return bool.
6407         (compare_maybe_null_strings): Simplify.
6408
6409 2018-05-29  Tom Tromey  <tom@tromey.com>
6410
6411         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
6412
6413 2018-05-29  Tom Tromey  <tom@tromey.com>
6414
6415         * objc-lang.h: Don't include cp-support.h.
6416         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
6417         declare VEC.
6418
6419 2018-05-27  Tom Tromey  <tom@tromey.com>
6420
6421         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6422
6423 2018-05-25  Tom Tromey  <tom@tromey.com>
6424
6425         * value.c (value::location): Initialize.
6426
6427 2018-05-25  Tom Tromey  <tom@tromey.com>
6428
6429         * dbxread.c (init_bincl_list): Remove.
6430         (bincl_list): Now a std::vector.
6431         (bincls_allocated, next_bincl): Remove.
6432         (free_bincl_list, do_free_bincl_list_cleanup)
6433         (make_cleanup_free_bincl_list): Remove.
6434         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6435         unique_xmalloc_ptr.
6436         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6437         (struct header_file_location): Add constructor.
6438         (add_bincl_to_list): Remove.
6439
6440 2018-05-25  Tom Tromey  <tom@tromey.com>
6441
6442         * tui/tui.c (tui_enable): Update.
6443         * mi/mi-interp.c (mi_interp::init): Update.
6444         * interps.h (class interp) <name>: New method.
6445         <m_name>: Rename from name.
6446         (~scoped_restore_interp): Update.
6447         * interps.c (interp::interp): Update.
6448         (interp_add, interp_set, interp_lookup_existing)
6449         (current_interp_named_p): Update.
6450
6451 2018-05-25  Tom Tromey  <tom@tromey.com>
6452
6453         * interps.c (interp_name): Remove.
6454         * mi/mi-interp.c (mi_interp::init): Update.
6455         * interps.h (interp_name): Remove.
6456         (~scoped_restore_interp): Update.
6457         * tui/tui.c (tui_enable): Update.
6458
6459 2018-05-25  Tom Tromey  <tom@tromey.com>
6460
6461         * utils.c (fputs_maybe_filtered): Update.
6462         * linespec.c (decode_line_full): Update.
6463         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6464         (mi_print_breakpoint_for_event, mi_solib_loaded)
6465         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6466         (mi_user_selected_context_changed): Update.
6467         * mi/mi-main.c (mi_execute_command): Update.
6468         * cli/cli-script.c (execute_control_command): Update.
6469         * python/python.c (execute_gdb_command): Update.
6470         * solib.c (info_sharedlibrary_command): Update.
6471         * interps.c (interp_ui_out): Remove.
6472         * interps.h (interp_ui_out): Remove.
6473
6474 2018-05-25  Tom Tromey  <tom@tromey.com>
6475
6476         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6477         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6478         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6479
6480 2018-05-25  Tom Tromey  <tom@tromey.com>
6481
6482         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6483         * interps.c (interp_exec): Use scoped_restore.
6484
6485 2018-05-25  Tom Tromey  <tom@tromey.com>
6486
6487         * remote.c (remote_target::remote_file_get): Use
6488         gdb::byte_vector.
6489         (remote_target::remote_file_put): Likewise.
6490
6491 2018-05-25  Tom Tromey  <tom@tromey.com>
6492
6493         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6494         a std::string.
6495         (get_pe_section_index, add_pe_exported_sym): Update.
6496         (read_pe_exported_syms): Use gdb::def_vector.
6497
6498 2018-05-25  Tom Tromey  <tom@tromey.com>
6499
6500         * frame.c (remove_prev_frame): Remove.
6501         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6502
6503 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
6504
6505         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6506         Remove prototypes.
6507         * mips-linux-nat.c (supply_fpregset): Always call
6508         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6509         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6510         `mips_fill_fpregset'.
6511         * mips-linux-tdep.c (mips_supply_fpregset)
6512         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6513         (mips_fill_fpregset_wrapper): Remove functions.
6514         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6515         (mips_linux_fpregset): Remove variable.
6516         (mips_linux_iterate_over_regset_sections): Use
6517         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6518         (mips_linux_o32_sigframe_init): Remove comment.
6519
6520 2018-05-25  Pedro Alves  <palves@redhat.com>
6521
6522         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6523         (struct readahead_cache, struct packet_reg, struct
6524         remote_arch_state, class remote_state): Move higher up in the
6525         file.
6526         (remote_target::m_remote_state): Now an object instead of a pointer.
6527         (remote_target::get_remote_state): Adjust.
6528
6529 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6530
6531         * stack.c (select_and_print_frame): Delete.
6532         (struct function_bounds): Move struct within function.
6533         (func_command): Most content moved into new function
6534         find_frame_for_function, use new function, print result, add
6535         function comment.
6536         (find_frame_for_function): New function, now returns a result.
6537
6538 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6539
6540         * stack.c (iterate_over_block_arg_vars): Fix comment.
6541         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6542
6543 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6544
6545         PR gdb/23203
6546         * frame.c
6547         (scoped_restore_selected_frame::scoped_restore_selected_frame):
6548         Define.
6549         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6550         Define.
6551         * frame.h (class scoped_restore_selected_frame): New class.
6552         * stack.c (print_frame_local_vars): Remove catching and rethrowing
6553         of any exception, use scoped_restore_selected_frame to restore the
6554         frame instead.
6555
6556 2018-05-24  Pedro Alves  <palves@redhat.com>
6557
6558         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6559         override.
6560
6561 2018-05-23  Tom Tromey  <tom@tromey.com>
6562
6563         * complaints.c (struct complaints): Remove.
6564         (symfile_complaint_book): Remove.
6565         (series): New global.
6566         (complaint_internal): Update.
6567         (clear_complaints): Update.
6568
6569 2018-05-23  Tom Tromey  <tom@tromey.com>
6570
6571         * complaints.c (counters): New global.
6572         (struct complain): Remove.
6573         (struct complaints) <root>: Remove.
6574         (complaint_sentinel): Remove.
6575         (symfile_complaint_book): Update.
6576         (find_complaint) Remove.
6577         (complaint_internal, clear_complaints): Update.
6578
6579 2018-05-23  Tom Tromey  <tom@tromey.com>
6580
6581         * complaints.c (struct complain) <file, line>: Remove.
6582         (find_complaint): Remove file, line parameters.
6583         (complaint_internal): Update.
6584
6585 2018-05-23  Tom Tromey  <tom@tromey.com>
6586
6587         * complaints.c (vcomplaint): Remove.
6588         (complaint_internal) Merge in contents of vcomplaint.
6589
6590 2018-05-23  Tom Tromey  <tom@tromey.com>
6591
6592         * complaints.c (struct complaints) <explanation>: Remove.
6593         (symfile_explanations): Remove.
6594         (symfile_complaint_book): Update.
6595         (vcomplaint): Update.
6596         (struct explanation): Remove.
6597
6598 2018-05-23  Tom Tromey  <tom@tromey.com>
6599
6600         * complaints.c (symfile_complaints): Remove.
6601         (complaint_internal): Remove "complaints" parameter.
6602         (clear_complaints, vcomplaint): Remove "c" parameter.
6603         (get_complaints): Remove.
6604         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6605         (dwarf2_debug_line_missing_file_complaint)
6606         (dwarf2_debug_line_missing_end_sequence_complaint)
6607         (dwarf2_complex_location_expr_complaint)
6608         (dwarf2_const_value_length_mismatch_complaint)
6609         (dwarf2_section_buffer_overflow_complaint)
6610         (dwarf2_macro_malformed_definition_complaint)
6611         (dwarf2_invalid_attrib_class_complaint)
6612         (create_addrmap_from_index, dw2_symtab_iter_next)
6613         (dw2_expand_marked_cus)
6614         (dw2_debug_names_iterator::find_vec_in_debug_names)
6615         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6616         (create_debug_type_hash_table, init_cutu_and_read_dies)
6617         (partial_die_parent_scope, add_partial_enumeration)
6618         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6619         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6620         (read_import_statement, read_file_scope, create_dwo_cu_reader)
6621         (create_cus_hash_table, create_dwp_hash_table)
6622         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6623         (dwarf2_rnglists_process, dwarf2_ranges_process)
6624         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6625         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6626         (handle_struct_member_die, process_structure_scope)
6627         (read_array_type, read_common_block, read_module_type)
6628         (read_tag_pointer_type, read_typedef, read_base_type)
6629         (read_subrange_type, load_partial_dies, partial_die_info::read)
6630         (partial_die_info::read, partial_die_info::read)
6631         (partial_die_info::read, read_checked_initial_length_and_offset)
6632         (dwarf2_string_attr, read_formatted_entries)
6633         (dwarf_decode_line_header)
6634         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6635         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6636         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6637         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6638         (get_signatured_type, get_DW_AT_signature_type)
6639         (decode_locdesc, file_file_name, consume_improper_spaces)
6640         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6641         (dwarf_decode_macro_bytes, dwarf_decode_macros)
6642         (dwarf2_symbol_mark_computed, set_die_type)
6643         (read_attribute_value): Update.
6644         * stap-probe.c (handle_stap_probe, get_stap_base_address):
6645         Update.
6646         * dbxread.c (unknown_symtype_complaint)
6647         (lbrac_mismatch_complaint, repeated_header_complaint)
6648         (set_namestring, function_outside_compilation_unit_complaint)
6649         (read_dbx_symtab, process_one_symbol): Update.
6650         * gdbtypes.c (stub_noname_complaint): Update.
6651         * windows-nat.c (handle_unload_dll): Update.
6652         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6653         (decode_base_type): Update.
6654         * xcoffread.c (bf_notfound_complaint, ef_complaint)
6655         (eb_complaint, record_include_begin, record_include_end)
6656         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6657         (process_xcoff_symbol, read_symbol)
6658         (function_outside_compilation_unit_complaint)
6659         (scan_xcoff_symtab): Update.
6660         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6661         * buildsym.c (finish_block_internal, make_blockvector)
6662         (end_symtab_get_static_block, augment_type_symtab): Update.
6663         * dtrace-probe.c (dtrace_process_dof)
6664         (dtrace_static_probe_ops::get_probes): Update.
6665         * complaints.h (struct complaint): Don't declare.
6666         (symfile_complaints): Remove.
6667         (complaint_internal): Remove "complaints" parameter.
6668         (complaint): Likewise.
6669         (clear_complaints): Likewise.
6670         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6671         (reread_symbols): Update.
6672         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6673         (dwarf2_frame_cache, decode_frame_entry): Update.
6674         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6675         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6676         (info_selectors_command): Update.
6677         * macrotab.c (macro_include, check_for_redefinition)
6678         (macro_undef): Update.
6679         * objfiles.c (filter_overlapping_sections): Update.
6680         * stabsread.c (invalid_cpp_abbrev_complaint)
6681         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6682         (define_symbol, error_type, read_type, rs6000_builtin_type)
6683         (stabs_method_name_from_physname, read_member_functions)
6684         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6685         (attach_fields_to_type, complain_about_struct_wipeout)
6686         (read_range_type, read_args, common_block_start)
6687         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6688         Update.
6689         * mdebugread.c (index_complaint, unknown_ext_complaint)
6690         (basic_type_complaint, bad_tag_guess_complaint)
6691         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6692         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6693         (parse_procedure, parse_lines)
6694         (function_outside_compilation_unit_complaint)
6695         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6696         (bad_tag_guess_complaint, reg_value_complaint): Update.
6697         * cp-support.c (demangled_name_complaint): Update.
6698         * macroscope.c (sal_macro_scope): Update.
6699         * dwarf-index-write.c (class debug_names): Update.
6700
6701 2018-05-23  Tom Tromey  <tom@tromey.com>
6702
6703         * complaints.c (clear_complaints): Remove "noisy" parameter.
6704         * complaints.h (clear_complaints): Update.
6705         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6706         (reread_symbols): Update.
6707
6708 2018-05-23  Tom Tromey  <tom@tromey.com>
6709
6710         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6711         SUBSEQUENT_MESSAGE.
6712         (vcomplaint, clear_complaints): Update.
6713         (symfile_explanations): Remove some messages.
6714
6715 2018-05-23  Tom Tromey  <tom@tromey.com>
6716
6717         * complaints.c (internal_complaint): Remove.
6718         * complaints.h (internal_complaint): Remove.
6719
6720 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6721
6722         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6723
6724 2018-05-22  Pedro Alves  <palves@redhat.com>
6725
6726         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6727         (remote_fileio_badfd, remote_fileio_return_errno)
6728         (remote_fileio_return_success, remote_fileio_func_open)
6729         (remote_fileio_func_open, remote_fileio_func_close)
6730         (remote_fileio_func_read, remote_fileio_func_write)
6731         (remote_fileio_func_lseek, remote_fileio_func_rename)
6732         (remote_fileio_func_unlink, remote_fileio_func_stat)
6733         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6734         (remote_fileio_func_isatty, remote_fileio_func_system): Add
6735         remote_target parameter.
6736         (remote_fio_func_map) <func>: Add remote_target parameter.
6737         (do_remote_fileio_request, remote_fileio_request):
6738         * remote-fileio.h (remote_fileio_request):
6739         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6740         remote_target parameter.
6741         (remote_notif_process, handle_notification): Adjust to pass down
6742         the remote.
6743         (remote_notif_state_allocate): Add remote_target parameter.  Save
6744         it.
6745         * remote-notif.h (struct remote_target): Forward declare.
6746         (struct notif_client) <parse, ack, can_get_pending_events>: Add
6747         remote_target parameter.
6748         (struct remote_notif_state) <remote>: New field.
6749         (remote_notif_ack, remote_notif_parse): Add remote_target
6750         parameter.
6751         (remote_notif_state_allocate, remote_notif_state_allocate): Add
6752         remote_target parameter.
6753         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6754         (threads_listing_context, rmt_thread_action, protocol_feature)
6755         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6756         (packet_result, struct threads_listing_context, remote_state):
6757         Move definitions and declarations higher up.
6758         (remote_target) <~remote_target>: Declare.
6759         (remote_download_command_source, remote_file_put, remote_file_get)
6760         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6761         (remote_hostio_pread_vFile, remote_hostio_send_command)
6762         (remote_hostio_set_filesystem, remote_hostio_open)
6763         (remote_hostio_close, remote_hostio_unlink, remote_state)
6764         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6765         (get_memory_write_packet_size, get_memory_read_packet_size)
6766         (append_pending_thread_resumptions, remote_detach_1)
6767         (append_resumption, remote_resume_with_vcont)
6768         (add_current_inferior_and_thread, wait_ns, wait_as)
6769         (process_stop_reply, remote_notice_new_inferior)
6770         (process_initial_stop_replies, remote_add_thread)
6771         (btrace_sync_conf, remote_btrace_maybe_reopen)
6772         (remove_new_fork_children, kill_new_fork_children)
6773         (discard_pending_stop_replies, stop_reply_queue_length)
6774         (check_pending_events_prevent_wildcard_vcont)
6775         (discard_pending_stop_replies_in_queue, stop_reply)
6776         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6777         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6778         (remote_interrupt_as, remote_interrupt_ns)
6779         (remote_get_noisy_reply, remote_query_attached)
6780         (remote_add_inferior, remote_current_thread, get_current_thread)
6781         (set_thread, set_general_thread, set_continue_thread)
6782         (set_general_process, write_ptid)
6783         (remote_unpack_thread_info_response, remote_get_threadinfo)
6784         (parse_threadlist_response, remote_get_threadlist)
6785         (remote_threadlist_iterator, remote_get_threads_with_ql)
6786         (remote_get_threads_with_qxfer)
6787         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6788         (get_offsets, remote_check_symbols, remote_supported_packet)
6789         (remote_query_supported, remote_packet_size)
6790         (remote_serial_quit_handler, remote_detach_pid)
6791         (remote_vcont_probe, remote_resume_with_hc)
6792         (send_interrupt_sequence, interrupt_query)
6793         (remote_notif_get_pending_events, fetch_register_using_p)
6794         (send_g_packet, process_g_packet, fetch_registers_using_g)
6795         (store_register_using_P, store_registers_using_G)
6796         (set_remote_traceframe, check_binary_download)
6797         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6798         (remote_xfer_live_readonly_partial, remote_read_bytes)
6799         (remote_send_printf, remote_flash_write, readchar)
6800         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6801         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6802         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6803         (extended_remote_disable_randomization, extended_remote_run)
6804         (send_environment_packet, extended_remote_environment_support)
6805         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6806         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6807         (packet_command): Now methods of ...
6808         (remote_target): ... this class.
6809         (m_remote_state) <remote_target>: New field.
6810         (struct remote_state) <stop_reply_queue,
6811         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6812         fields.
6813         (remote_state::remote_state): Allocate stop_reply_queue.
6814         (remote_state): Delete global.
6815         (get_remote_state_raw): Delete.
6816         (remote_target::get_remote_state): Allocate m_remote_state on
6817         demand.
6818         (get_current_remote_target): New.
6819         (remote_ops, extended_remote_ops): Delete.
6820         (wait_forever_enabled_p, remote_async_inferior_event_token):
6821         Delete, moved to struct remote_state.
6822         (remote_target::close): Delete self.  Destruction bits split to
6823         ...
6824         (remote_target::~remote_target): ... this.
6825         (show_memory_packet_size): Adjust to use
6826         get_current_remote_target.
6827         (struct protocol_feature) <func>: Add remote_target parameter.
6828         All callers adjusted.
6829         (curr_quit_handler_target): New.
6830         (remote_serial_quit_handler): Reimplement.
6831         (remote_target::open_1): Adjust to use get_current_remote_target.
6832         Heap-allocate remote_target/extended_remote_target instances.
6833         (vcont_builder::vcont_builder): Add remote_target parameter, and
6834         save it in m_remote.  All callers adjusted.
6835         (vcont_builder::m_remote): New field.
6836         (vcont_builder::restart, vcont_builder::flush)
6837         (vcont_builder::push_action): Use it.
6838         (remote_target::commit_resume): Use it.
6839         (struct queue_iter_param) <remote>: New field.
6840         (remote_target::remove_new_fork_children): Fill in 'remote' field.
6841         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6842         (check_pending_event_prevents_wildcard_vcont_callback)
6843         (remote_target::check_pending_events_prevent_wildcard_vcont)
6844         (remote_target::discard_pending_stop_replies)
6845         (remote_target::discard_pending_stop_replies_in_queue)
6846         (remote_target::remote_notif_remove_queued_reply): Fill in
6847         'remote' field.
6848         (remote_notif_get_pending_events): New.
6849         (remote_target::readchar, remote_target::remote_serial_write):
6850         Save/restore curr_quit_handler_target.
6851         (putpkt): New.
6852         (kill_new_fork_children): Fill in 'remote' field.
6853         (packet_command): Use get_current_remote_target, defer to
6854         remote_target method of same name.
6855         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6856         parameter, and save it in m_remote.  All callers adjusted.
6857         (scoped_remote_fd::release): Use m_remote.
6858         (scoped_remote_fd::m_remote): New field.
6859         (remote_file_put, remote_file_get, remote_file_delete): Use
6860         get_current_remote_target, defer to remote_target method of same
6861         name.
6862         (remote_btrace_reset): Add remote_state paremeter.  Update all
6863         callers.
6864         (remote_async_inferior_event_handler). Pass down 'data'.
6865         (remote_new_objfile): Use get_current_remote_target.
6866         (remote_target::vcont_r_supported): New.
6867         (set_range_stepping): Use get_current_remote_target and
6868         remote_target::vcont_r_supported.
6869         (_initialize_remote): Don't allocate 'remote_state' and
6870         'stop_reply_queue' globals.
6871         * remote.h (struct remote_target): Forward declare.
6872         (getpkt, putpkt, remote_notif_get_pending_events): Add
6873         'remote_target' parameter.
6874
6875 2018-05-22  Pedro Alves  <palves@redhat.com>
6876
6877         * remote.c (vcont_builder): Now a class.  Make all data members
6878         private.
6879         (vcont_builder) <vcont_builder, restart, flush, push_action>:
6880         Declare methods.
6881         (vcont_builder_restart): Rename to ...
6882         (vcont_builder::restart): ... this.
6883         (vcont_builder_flush): Rename to ...
6884         (vcont_builder::flush): ... this.
6885         (vcont_builder_push_action): Rename to ...
6886         (vcont_builder::push_action): ... this.
6887         (remote_target::commit_resume): Adjust.
6888
6889 2018-05-22  Pedro Alves  <palves@redhat.com>
6890
6891         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
6892         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
6893         (get_fixed_memory_packet_size): New.
6894         (get_memory_packet_size): Use it.
6895         (set_memory_packet_size): Don't override the config size with
6896         DEFAULT_MAX_MEMORY_PACKET_SIZE.
6897         (show_memory_packet_size): Use get_fixed_memory_packet_size.
6898         Don't refer to get_memory_packet_size if not connected to a remote
6899         target.  Show "(default)" if configured size is 0.
6900
6901 2018-05-22  Pedro Alves  <palves@redhat.com>
6902
6903         * remote.c (remote_target::mourn_inferior): Move
6904         discard_pending_stop_replies call here from ...
6905         (_initialize_remote): ... here.
6906
6907 2018-05-22  Pedro Alves  <palves@redhat.com>
6908
6909         * remote.c (compare_section_command): Remove set_general_process
6910         call.
6911
6912 2018-05-22  Pedro Alves  <palves@redhat.com>
6913
6914         * remote.c (struct packet_reg, struct remote_arch_state):
6915         Move higher up in the file.
6916         (remote_state) <m_arch_states>: Store remote_arch_state values
6917         instead of remote_arch_state pointers.
6918         (remote_state::get_remote_arch_state): Adjust.
6919
6920 2018-05-22  Pedro Alves  <palves@redhat.com>
6921
6922         * remote.c: Include <unordered_map>.
6923         (remote_state): Now a class.
6924         (remote_state) <get_remote_arch_state>: Declare method.
6925         <get_remote_arch_state>: New field.
6926         (remote_arch_state) <remote_arch_state>: Declare ctor.
6927         <regs>: Now a unique_ptr.
6928         (remote_gdbarch_data_handle): Delete.
6929         (get_remote_arch_state): Delete.
6930         (remote_state::get_remote_arch_state): New.
6931         (get_remote_state): Adjust to call remote_state's
6932         get_remote_arch_state method.
6933         (init_remote_state): Delete, bits factored out to ...
6934         (remote_arch_state::remote_arch_state): ... this new method.
6935         (get_remote_packet_size, get_memory_packet_size)
6936         (process_g_packet, remote_target::fetch_registers)
6937         (remote_target::prepare_to_store, store_registers_using_G)
6938         (remote_target::store_registers, remote_target::get_trace_status):
6939         Adjust to call remote_state's method.
6940         (_initialize_remote): Remove reference to
6941         remote_gdbarch_data_handle.
6942
6943 2018-05-22  Pedro Alves  <palves@redhat.com>
6944
6945         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
6946         pread>: New method declarations.
6947         (remote_target::open_1): Adjust.
6948         (readahead_cache_invalidate): Rename to ...
6949         (readahead_cache::invalidate): ... this, and adjust to be a class
6950         method.
6951         (readahead_cache_invalidate_fd): Rename to ...
6952         (readahead_cache::invalidate_fd): ... this, and adjust to be a
6953         class method.
6954         (remote_hostio_pwrite): Adjust.
6955         (remote_hostio_pread_from_cache): Rename to ...
6956         (readahead_cache::pread): ... this, and adjust to be a class
6957         method.
6958         (remote_hostio_close): Adjust.
6959
6960 2018-05-22  Pedro Alves  <palves@redhat.com>
6961
6962         * remote.c (remote_hostio_close_cleanup): Delete.
6963         (class scoped_remote_fd): New.
6964         (remote_file_put, remote_file_get): Use it.
6965
6966 2018-05-22  Pedro Alves  <palves@redhat.com>
6967
6968         (struct vCont_action_support): Use bool and initialize all fields.
6969         (struct readahead_cache): Initialize all fields.
6970         (remote_state): Use bool and initialize all fields.
6971         (remote_state::remote_state, remote_state::~remote_state): New.
6972         (new_remote_state): Delete.
6973         (_initialize_remote): Use new to allocate remote_state.
6974
6975 2018-05-22  Pedro Alves  <palves@redhat.com>
6976             張俊芝  <zjz@zjz.name>
6977
6978         PR gdb/22973
6979         * c-exp.y: Include "c-support.h".
6980         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
6981         of tolower.  Use c_ident_is_alpha to scan names.
6982         * c-lang.c: Include "c-support.h".
6983         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
6984         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
6985         * c-support.h: New file, with bits factored out from ...
6986         * cp-name-parser.y: ... this file.
6987         Include "c-support.h".
6988         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
6989         c-support.h and renamed.
6990         (symbol_end, yylex): Adjust.
6991
6992 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
6993
6994         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
6995         parameter type to CORE_ADDR.
6996         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
6997         parameter type in declaration to CORE_ADDR.
6998         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
6999         target_auxv_search to get AT_HWCAP and use the result to get the
7000         target description.
7001         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7002         to CORE_ADDR. Remove the cast of the return value to unsigned
7003         long. Fix error predicate of target_auxv_search.
7004         (ppc_linux_nat_target::read_description): Change the type of the
7005         hwcap variable to CORE_ADDR.
7006
7007 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7008
7009         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7010         if the size of fpscr is larger than 32 bits.
7011
7012 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7013
7014         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7015         (ppc32_linux_vsxregmap): New global.
7016         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7017         regcache_supply_regset, and regcache_collect_regset.
7018         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7019         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7020         (fetch_vsx_register, store_vsx_register): Remove.
7021         (fetch_vsx_registers): Add regno parameter. Get regset using
7022         ppc_linux_vsxregset. Use regset to supply registers.
7023         (store_vsx_registers): Add regno parameter. Get regset using
7024         ppc_linux_vsxregset. Use regset to collect registers.
7025         (fetch_register): Call fetch_vsx_registers instead of
7026         fetch_vsx_register.
7027         (store_register): Call store_vsx_registers instead of
7028         store_vsx_register.
7029         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7030         new regno parameter.
7031         (store_ppc_registers): Call store_vsx_registers with -1 for the
7032         new regno parameter.
7033         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7034         (ppc_collect_vsxregset): Remove.
7035
7036 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7037
7038         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7039         offset fields.
7040         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7041         for vector register offset fields.
7042         (ppc64_fbsd_reg_offsets): Likewise.
7043         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7044         to vector register offset fields.
7045         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7046         to vector register offset fields.
7047         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7048         vector register offset fields.
7049         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7050         initializers for vector register offset fields.
7051         (rs6000_aix64_reg_offsets): Likewise.
7052         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7053         (ppc_supply_vrregset): Remove.
7054         (ppc_collect_vrregset): Remove.
7055         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7056         (ppc_linux_vrregset) : New function.
7057         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7058         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7059         (ppc32_linux_vrregset): Remove.
7060         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7061         and use result instead of ppc32_linux_vrregset.
7062         (ppc32_linux_reg_offsets): Remove initializers for vector register
7063         offset fields.
7064         (ppc64_linux_reg_offsets): Likewise.
7065         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7066         * ppc-linux-nat.c: Include regset.h.
7067         (gdb_vrregset_t): Adjust comment to account for little-endian
7068         mode.
7069         (supply_vrregset, fill_vrregset): Remove.
7070         (fetch_altivec_register, store_altivec_register): Remove.
7071         (fetch_altivec_registers): Add regno parameter. Get regset using
7072         ppc_linux_vrregset. Use regset to supply registers.
7073         (store_altivec_registers): Add regno parameter. Get regset using
7074         ppc_linux_vrregset. Use regset to collect registers.
7075         (fetch_register): Call fetch_altivec_registers instead of
7076         fetch_altivec_register.
7077         (store_register): Call store_altivec_registers instead of
7078         store_altivec_register.
7079         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7080         the new regno parameter.
7081         (store_ppc_registers): Call store_altivec_registers with -1 for
7082         the new regno parameter.
7083
7084 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7085
7086         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7087         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7088         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7089         (gdb_vrregset_t): Change array type size to
7090         PPC_LINUX_SIZEOF_VRREGSET.
7091         (gdb_vsxregset_t): Change array type size to
7092         PPC_LINUX_SIZEOF_VSXREGSET.
7093         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7094         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7095         PPC_LINUX_SIZEOF_VSXREGSET.
7096
7097 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7098
7099         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7100         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7101         nat/ppc-linux.c.
7102         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7103         ppc_linux_target_wordsize with tid.
7104         (ppc_linux_nat_target::read_description): Call ppc_linux_target
7105         wordsize with tid.
7106         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7107         (ppc64_64bit_inferior_p): Add static and inline specifiers.
7108         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7109         tid parameter. Remove static specifier.
7110         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7111         (ppc_linux_target_wordsize): New declaration.
7112
7113 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7114
7115         * arch/ppc-linux-common.c: New file.
7116         * arch/ppc-linux-common.h: New file.
7117         * arch/ppc-linux-tdesc.h: New file.
7118         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7119         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7120         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7121         arch/ppc-linux-tdesc.h.
7122         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7123         arch/ppc-linux-tdesc.h.
7124         (ppc_linux_nat_target::read_description): Remove target
7125         description matching code. Fill a ppc_linux_features struct and
7126         call ppc_linux_match_description with it. Move comment about ISA
7127         2.05 to ppc-linux-common.c.
7128         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7129         arch/ppc-linux-tdesc.h.
7130         (ppc_linux_core_read_description): Remove target description
7131         matching code. Fill a ppc_linux_features struct and call
7132         ppc_linux_match_description with it.
7133         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7134         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7135         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7136         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7137         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7138         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7139         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7140         (tdesc_powerpc_e500l): Remove.
7141
7142 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
7143
7144         * ada-lang.c (catch_assert_command): Pass empty string instead
7145         of NULL for excep_string argument.
7146
7147 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7148
7149         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7150         the width of the requested register exceeds the width of the
7151         `ptrace' data type.
7152
7153 2018-05-21  Tom Tromey  <tom@tromey.com>
7154
7155         * printcmd.c (output_command): Remove.
7156         (output_command_const): Rename to output_command.
7157         * valprint.h (output_command): Rename from output_command_const.
7158         * tracepoint.c (trace_dump_actions): Call output_command.
7159
7160 2018-05-21  Tom Tromey  <tom@tromey.com>
7161
7162         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7163         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7164         * ada-lang.h (create_ada_exception_catchpoint): Update.
7165         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7166         std::string.
7167         (create_excep_cond_exprs, ~ada_catchpoint)
7168         (should_stop_exception, print_one_exception)
7169         (print_mention_exception, print_recreate_exception): Update.
7170         (ada_get_next_arg): Remove.
7171         (catch_ada_exception_command_split): Use std::string.  Change type
7172         of "excep_string", "cond_string".
7173         (catch_ada_exception_command): Update.
7174         (create_ada_exception_catchpoint): Change type of excep_string.
7175         (ada_exception_sal): Remove excep_string parameter.
7176         (~ada_catchpoint): Remove.
7177
7178 2018-05-21  Tom Tromey  <tom@tromey.com>
7179
7180         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7181         cleanup.
7182
7183 2018-05-21  Tom Tromey  <tom@tromey.com>
7184
7185         * ada-lang.c (ada_exception_message_1, ada_exception_message):
7186         Return unique_xmalloc_ptr.
7187         (print_it_exception): Update.
7188
7189 2018-05-21  Tom Tromey  <tom@tromey.com>
7190
7191         * tracepoint.c (trace_dump_actions): Use std::string.
7192
7193 2018-05-21  Tom Tromey  <tom@tromey.com>
7194
7195         * symfile.c (reread_symbols): Use std::string for original_name.
7196
7197 2018-05-21  Tom Tromey  <tom@tromey.com>
7198
7199         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7200         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
7201         constructor.
7202
7203 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
7204
7205         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7206         instance to...
7207         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7208         * objfiles.c (get_objfile_bfd_data): Allocate
7209         objfile_per_bfd_storage with obstack_new when allocating on
7210         obstack.
7211
7212 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7213
7214         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7215         OBSTACK_ZALLOC.
7216         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7217         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7218         * mdebugread.c (mdebug_build_psymtabs): Likewise.
7219         (add_pending): Likewise.
7220         (parse_symbol): Likewise.
7221         (parse_partial_symbols): Likewise.
7222         (psymtab_to_symtab_1): Likewise.
7223         (new_psymtab): Likewise.
7224         (elfmdebug_build_psymtabs): Likewise.
7225         * minsyms.c (terminate_minimal_symbol_table): Likewise.
7226         * objfiles.c (get_objfile_bfd_data): Likewise.
7227         (objfile_register_static_link): Likewise.
7228         * psymtab.c (allocate_psymtab): Likewise.
7229         * stabsread.c (read_member_functions): Likewise.
7230         * xcoffread.c (xcoff_end_psymtab): Likewise.
7231
7232 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7233
7234         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7235         compiler supports std::is_trivially_constructible.
7236         * common/poison.h: Include obstack.h.
7237         (IsMallocable): Define to is_trivially_constructible if the
7238         compiler supports it, define to true_type otherwise.
7239         (xobnew): New.
7240         (XOBNEW): Redefine.
7241         (xobnewvec): New.
7242         (XOBNEWVEC): Redefine.
7243         * gdb_obstack.h (obstack_zalloc): New.
7244         (OBSTACK_ZALLOC): Redefine.
7245         (obstack_calloc): New.
7246         (OBSTACK_CALLOC): Redefine.
7247         (obstack_new): New.
7248         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7249         (gdbarch_obstack): New declaration in gdbarch.h, definition in
7250         gdbarch.c.
7251         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7252         obstack_calloc/obstack_zalloc.
7253         (gdbarch_obstack_zalloc): Remove.
7254         * target-descriptions.c (tdesc_data_init): Use obstack_new.
7255
7256 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7257
7258         * stack.c (backtrace_command_1): Remove useless variable int i.
7259
7260 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7261
7262         * stack.c (print_frame_info): Fix comment.
7263
7264 2018-05-18  Tom Tromey  <tom@tromey.com>
7265
7266         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7267         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7268         (~dwarf2_per_objfile): Update
7269         (dwarf2_get_dwz_file): Use new.
7270         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7271         unique_ptr.
7272
7273 2018-05-18  Tom Tromey  <tom@tromey.com>
7274
7275         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7276         unique_ptr.
7277         * dwarf2read.c (struct dwp_file): Add constructor and
7278         initializers.
7279         (open_and_init_dwp_file): Return a unique_ptr.
7280         (dwarf2_per_objfile, create_dwp_hash_table)
7281         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7282         (lookup_dwo_unit_in_dwp): Update.
7283         (open_and_init_dwp_file, get_dwp_file): Update.
7284
7285 2018-05-18  Tom Tromey  <tom@tromey.com>
7286
7287         * dwarf2read.c (dwarf2_per_objfile): Update.
7288         (struct mapped_index): Add initializers.
7289         (dwarf2_read_index): Use new.
7290         (dw2_symtab_iter_init): Update.
7291         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7292         unique_ptr.
7293
7294 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7295
7296         * dwarf2read.c (mapped_index) <total_size>: Remove.
7297
7298 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7299
7300         * unittests/format_pieces-selftests.c (test_format_specifier):
7301         Add ARI comments.
7302
7303 2018-05-18  Tom Tromey  <tom@tromey.com>
7304
7305         * c-typeprint.c (maybe_print_hole): New function.
7306         (c_print_type_struct_field_offset): Update.
7307         (c_type_print_base_struct_union): Call maybe_print_hole.
7308
7309 2018-05-17  Keith Seitz  <keiths@redhat.com>
7310
7311         * breakpoint.c (build_bpstat_chain): New function, moved from
7312         bpstat_stop_status.
7313         (bpstat_stop_status): Add optional parameter, `stop_chain'.
7314         If no stop chain is passed, call build_bpstat_chain to build it.
7315         * breakpoint.h (build_bpstat_chain): Declare.
7316         (bpstat_stop_status): Move documentation here from breakpoint.c.
7317         * infrun.c (handle_signal_stop): Before eliding inlined frames,
7318         build the stop chain and pass it to skip_inline_frames.
7319         Pass this stop chain to bpstat_stop_status.
7320         * inline-frame.c: Include breakpoint.h.
7321         (stopped_by_user_bp_inline_frame): New function.
7322         (skip_inline_frames): Add parameter `stop_chain'.
7323         Move documention to inline-frame.h.
7324         If non-NULL, use stopped_by_user_bp_inline_frame to determine
7325         whether the frame should be elided.
7326         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7327         Add moved documentation and update for new parameter.
7328
7329 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7330
7331         PR cli/14975
7332         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7333         unittests/format_pieces-selftests.c.
7334         * common/format.h (format_piece) <operator==>: New.
7335         (format_pieces) <operator[]>: Remove.
7336         * common/format.c (format_pieces::format_pieces): Handle \e.
7337         * unittests/format_pieces-selftests.c: New.
7338
7339 2018-05-17  Tom Tromey  <tom@tromey.com>
7340
7341         PR symtab/23010:
7342         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7343         (dw2_instantiate_symtab): Add skip_partial parameter.
7344         (dw2_find_last_source_symtab, dw2_map_expand_apply)
7345         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7346         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7347         (dw2_expand_symtabs_matching_one)
7348         (dw2_find_pc_sect_compunit_symtab)
7349         (dw2_debug_names_lookup_symbol)
7350         (dw2_debug_names_expand_symtabs_for_function): Update.
7351         (init_cutu_and_read_dies): Add skip_partial parameter.
7352         (process_psymtab_comp_unit, build_type_psymtabs_1)
7353         (process_skeletonless_type_unit, load_partial_comp_unit)
7354         (psymtab_to_symtab_1): Update.
7355         (load_full_comp_unit): Add skip_partial parameter.
7356         (process_imported_unit_die, dwarf2_read_addr_index)
7357         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7358         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7359         (read_signatured_type): Update.
7360
7361 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7362
7363         * value.c (release_value): Remove unused variable.
7364         (record_latest_value): Likewise.
7365         (access_value_history): Likewise.
7366         (preserve_values): Likewise.
7367
7368 2018-05-17  Tom Tromey  <tom@tromey.com>
7369
7370         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7371         Initialize.
7372
7373 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
7374
7375         PR gdb/22286
7376         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7377         Also handle registers whose width is not a multiple of
7378         PTRACE_TYPE_RET.
7379         (linux_nat_trad_target::store_register): Likewise.
7380
7381 2018-05-16  Tom Tromey  <tom@tromey.com>
7382
7383         * gdbcore.h (core_bfd): Redefine.
7384         * corelow.c (core_target::close): Update.
7385         (core_target_open): Update.
7386         * progspace.h (struct program_space) <cbfd>: Now a
7387         gdb_bfd_ref_ptr.
7388
7389 2018-05-16  Tom Tromey  <tom@tromey.com>
7390
7391         PR cli/19551:
7392         * symfile-add-flags.h (enum symfile_add_flags)
7393         <SYMFILE_NOT_FILENAME>: New constant.
7394         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
7395         objfile name from BFD.
7396         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7397         * minidebug.c (find_separate_debug_file_in_section): Put
7398         ".gnu_debugdata" into BFD's file name.
7399
7400 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
7401
7402         * regcache.c (regcache_read_ftype, regcache_write_ftype):
7403         Remove.
7404
7405 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
7406
7407         PR binutils/21446
7408         * aarch64-tdep.c (aarch64_analyze_prologue,
7409         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7410         Indicate not interested in errors.
7411
7412 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7413
7414         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7415         Supply the MIPS_ZERO_REGNUM register.
7416
7417 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7418
7419         * mips-tdep.c (mask_address_var): Make variable static.
7420
7421 2018-05-14  Tom Tromey  <tom@tromey.com>
7422
7423         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7424
7425 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
7426
7427         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7428         FXSAVE_ADDR for the mxcsr register.
7429
7430 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
7431
7432         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7433
7434 2018-05-11  Pedro Alves  <palves@redhat.com>
7435
7436         * corelow.c (core_target) <core_target>: No longer inline.
7437         Initialize m_core_gdbarch, m_core_vec and build the section table
7438         here.
7439         <~core_target>: New.
7440         <core_gdbarch, get_core_register_section>: New methods.
7441         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7442         factored out from ...
7443         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7444         (core_ops): Delete.
7445         (sniff_core_bfd): Add gdbarch parameter.
7446         (core_close): Delete, merged into ...
7447         (core_target::close): ... here.  Delete self.
7448         (core_close_cleanup): Delete.
7449         (core_target_open): Allocate a core_target on the heap.  Use a
7450         unique_ptr instead of a cleanup.  Bits moved into the core_target
7451         ctor.  Adjust to use core_target methods instead of globals.
7452         (get_core_register_section): Rename to ...
7453         (core_target::get_core_register_section): ... this and adjust.
7454         (struct get_core_registers_cb_data): New.
7455         (get_core_registers_cb): Use it.  Use bool.
7456         (core_target::fetch_registers, core_target::files_info)
7457         (core_target::xfer_partial, core_target::read_description)
7458         (core_target::pid_to, core_target::thread_name): Adjust to
7459         reference class fields instead of globals.
7460         * target.h (struct target_ops_deleter, target_ops_up): New.
7461
7462 2018-05-11  Pedro Alves  <palves@redhat.com>
7463
7464         * corefile.c (core_file_command): Move to corelow.c.
7465         * corelow.c (the_core_target): Delete.
7466         (core_file_command): Moved from corefile.c.  Check exec_bfd
7467         instead of the_core_target.  Use target_detach instead of calling
7468         into the_core_target directly.
7469         (maybe_say_no_core_file_now): New.
7470         (core_target::detach): Use it.
7471         (_initialize_corelow): Remove references to the_core_target.
7472         * gdbcore.h (the_core_target): Delete.
7473
7474 2018-05-11  Tom Tromey  <tromey@redhat.com>
7475             Pedro Alves  <palves@redhat.com>
7476
7477         * corefile.c (core_bfd): Remove.
7478         * gdbcore.h (core_bfd): Now a macro.
7479         * progspace.h (struct program_space) <cbfd>: New field.
7480
7481 2018-05-11  Tom Tromey  <tom@tromey.com>
7482
7483         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7484         gdb::def_vector.
7485
7486 2018-05-10  Tom Tromey  <tom@tromey.com>
7487
7488         * configure: Rebuild.
7489         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7490
7491 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
7492
7493         PR server/23158:
7494         * regformats/regdat.sh: Adjust script, following the addition
7495         of the new expedite_regs parameter to init_target_desc.
7496
7497 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
7498     
7499         PR gdb/23127
7500         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7501         set_gdbarch_significant_addr_bit.
7502         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7503         set_gdbarch_significant_addr_bit.
7504         * utils.c (address_significant): Update to sign extend addr.
7505
7506 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
7507
7508         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7509         (xtensa_linux_init_abi): Limit tdep->num_regs by
7510         tdep->num_nopriv_regs.
7511         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7512         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7513         not initialized.
7514
7515 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
7516
7517         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7518
7519 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
7520
7521         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7522         (I387_MXCSR_INIT_VAL): New constant.
7523         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7524         buffer if it was supplied by the inferior.
7525         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7526         (i387_xsave_get_clear_bv): New function.
7527         (i387_supply_xsave): Only read x87 control registers from the
7528         xsave buffer if the feature is enabled, and the state will have
7529         been written, otherwise, provide a suitable default.
7530         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7531         including x87 control registers.  Update control registers if they
7532         have changed from the default value, and mark features as enabled
7533         as required.
7534         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7535
7536 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
7537
7538         * spu-tdep.c (info_spu_event_command): Fix output formatting.
7539
7540 2018-05-07  Tom Tromey  <tom@tromey.com>
7541
7542         * configure: Rebuild.
7543         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7544
7545 2018-05-07  Tom Tromey  <tom@tromey.com>
7546
7547         PR tdep/20362:
7548         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7549         bit.  Use correct value for VDIV.
7550
7551 2018-05-04  Tom Tromey  <tom@tromey.com>
7552
7553         * configure: Rebuild.
7554         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7555
7556 2018-05-04  Tom Tromey  <tom@tromey.com>
7557
7558         * linux-record.c (record_linux_system_call) <case
7559         RECORD_SYS_RECVFROM>: Add "break".
7560
7561 2018-05-04  Tom Tromey  <tom@tromey.com>
7562
7563         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7564         Add missing "break".
7565         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7566         Add missing "break".
7567
7568 2018-05-04  Tom Tromey  <tom@tromey.com>
7569
7570         * rs6000-tdep.c (ppc_process_record_op4)
7571         (ppc_process_record_op63): Add fall-through comment.
7572
7573 2018-05-04  Tom Tromey  <tom@tromey.com>
7574
7575         * i386-tdep.c (i386_process_record): Add fall-through comment.
7576
7577 2018-05-04  Tom Tromey  <tom@tromey.com>
7578
7579         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7580         comment.
7581
7582 2018-05-04  Tom Tromey  <tom@tromey.com>
7583
7584         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7585         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7586         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7587         comment.
7588         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7589         comment.
7590         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7591         comment.
7592
7593 2018-05-04  Tom Tromey  <tom@tromey.com>
7594
7595         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7596
7597 2018-05-04  Tom Tromey  <tom@tromey.com>
7598
7599         * s390-tdep.c (s390_process_record): Fix fall-through comments.
7600         * xcoffread.c (scan_xcoff_symtab): Move comment later.
7601         * symfile.c (section_is_mapped): Fix fall-through comment.
7602         * stabsread.c (define_symbol, read_member_functions): Fix
7603         fall-through comment.
7604         * s390-linux-tdep.c (s390_process_record): Fix fall-through
7605         comment.
7606         * remote.c (remote_wait_as): Fix fall-through comment.
7607         * p-exp.y (yylex): Fix fall-through comment.
7608         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7609         comment.
7610         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7611         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7612         * jv-exp.y (yylex): Fix fall-through comment.
7613         * go-exp.y (lex_one_token): Fix fall-through comment.
7614         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7615         fall-through comment.
7616         * f-exp.y (yylex): Fix fall-through comment.
7617         * dwarf2read.c (process_die): Fix fall-through comments.
7618         * dbxread.c (process_one_symbol): Fix fall-through comment.
7619         * d-exp.y (lex_one_token): Fix fall-through comment.
7620         * cp-name-parser.y (yylex): Fix fall-through comment.
7621         * coffread.c (coff_symtab_read): Fix fall-through comment.
7622         * c-exp.y (lex_one_token): Fix fall-through comment.
7623         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7624         comment.
7625         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7626         comment.
7627
7628 2018-05-04  Tom Tromey  <tom@tromey.com>
7629
7630         PR python/22730:
7631         * NEWS: Mention gdb.execute change.
7632         * gdbcmd.h (execute_control_command): Don't declare.
7633         * python/python.c (execute_gdb_command): Use read_command_lines_1,
7634         execute_control_commands, execute_control_commands_to_string.
7635         * cli/cli-script.h (execute_control_commands)
7636         (execute_control_commands_to_string): Declare.
7637         (execute_control_command): Add from_tty parameter.
7638         * cli/cli-script.c (execute_control_commands)
7639         (execute_control_commands_to_string): New functions.
7640         (execute_user_command): Use execute_control_commands.
7641         (execute_control_command_1): Add "from_tty" parameter.  Update.
7642         (execute_control_command): Likewise.
7643
7644 2018-05-04  Tom Tromey  <tom@tromey.com>
7645
7646         PR python/22731:
7647         * NEWS: Mention that breakpoint commands are writable.
7648         * python/py-breakpoint.c (bppy_set_commands): New function.
7649         (breakpoint_object_getset) <"commands">: Use it.
7650
7651 2018-05-04  Tom Tromey  <tom@tromey.com>
7652
7653         * tracepoint.c (actions_command): Update.
7654         * mi/mi-cmd-break.c (mi_command_line_array)
7655         (mi_command_line_array_cnt, mi_command_line_array_ptr)
7656         (mi_read_next_line): Remove.
7657         (mi_cmd_break_commands): Update.
7658         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7659         function_view.
7660         * cli/cli-script.c (get_command_line): Update.
7661         (process_next_line): Use function_view.  Constify.
7662         (recurse_read_control_structure, read_command_lines)
7663         (read_command_lines_1): Change argument types to function_view.
7664         (do_define_command, document_command): Update.
7665         * breakpoint.h (check_tracepoint_command): Don't declare.
7666         * breakpoint.c (check_tracepoint_command): Remove.
7667         (commands_command_1, create_tracepoint_from_upload): Update.
7668
7669 2018-05-04  Tom Tromey  <tom@tromey.com>
7670
7671         PR gdb/11750:
7672         * cli/cli-script.h (enum command_control_type) <define_control>:
7673         New constant.
7674         * cli/cli-script.c (multi_line_command_p): Handle define_control.
7675         (build_command_line, execute_control_command_1)
7676         (process_next_line): Likewise.
7677         (do_define_command): New function, extracted from define_command.
7678         (define_command): Use it.
7679
7680 2018-05-04  Tom Tromey  <tom@tromey.com>
7681
7682         * tracepoint.c (actions_command): Update.
7683         * cli/cli-script.h (read_command_lines): Update.
7684         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7685         (MAX_TMPBUF): Remove define.
7686         (define_command): Use string_printf.
7687         (document_command): Likewise.
7688         * breakpoint.c (commands_command_1): Update.
7689
7690 2018-05-04  Tom Tromey  <tom@tromey.com>
7691
7692         * top.c (execute_command): Update.
7693         * cli/cli-script.h (print_command_lines): Now varargs.
7694         * cli/cli-script.c (print_command_lines): Now varargs.
7695         (execute_control_command_1) <case while_control, case if_control>:
7696         Update.
7697
7698 2018-05-04  Tom Tromey  <tom@tromey.com>
7699
7700         * tracepoint.c (all_tracepoint_actions): Rename from
7701         all_tracepoint_actions_and_cleanup.  Change return type.
7702         (actions_command, encode_actions_1, encode_actions)
7703         (trace_dump_actions, tdump_command): Update.
7704         * remote.c (remote_download_command_source): Update.
7705         * python/python.c (gdbpy_eval_from_control_command)
7706         (python_command, python_interactive_command): Update.
7707         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7708         * guile/guile.c (guile_command)
7709         (gdbscm_eval_from_control_command, guile_command): Update.
7710         * compile/compile.c (compile_code_command)
7711         (compile_print_command, compile_to_object): Update.
7712         * cli/cli-script.h (struct command_lines_deleter): New.
7713         (counted_command_line): New typedef.
7714         (struct command_line): Add constructor, destructor.
7715         <body_list>: Remove.
7716         <body_list_0, body_list_1>: New members.
7717         (command_line_up): Remove typedef.
7718         (read_command_lines, read_command_lines_1, get_command_line):
7719         Update.
7720         (copy_command_lines): Don't declare.
7721         * cli/cli-script.c (build_command_line): Use "new".
7722         (get_command_line): Return counted_command_line.
7723         (print_command_lines, execute_user_command)
7724         (execute_control_command_1, while_command, if_command): Update.
7725         (realloc_body_list): Remove.
7726         (process_next_line, recurse_read_control_structure): Update.
7727         (read_command_lines, read_command_lines_1): Return counted_command_line.
7728         (free_command_lines): Use "delete".
7729         (copy_command_lines): Remove.
7730         (define_command, document_command, show_user_1): Update.
7731         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7732         a counted_command_line.
7733         * breakpoint.h (counted_command_line): Remove typedef.
7734         (breakpoint_set_commands): Update.
7735         * breakpoint.c (check_no_tracepoint_commands)
7736         (validate_commands_for_breakpoint): Update.
7737         (breakpoint_set_commands): Change commands to be a
7738         counted_command_line.
7739         (commands_command_1, update_dprintf_command_list)
7740         (create_tracepoint_from_upload): Update.
7741
7742 2018-05-04  Tom Tromey  <tom@tromey.com>
7743
7744         * cli/cli-decode.h (cmd_list_element): New constructor.
7745         (~cmd_list_element): New destructor.
7746         (struct cmd_list_element): Add initializers.
7747         * cli/cli-decode.c (do_add_cmd): Use "new".
7748         (delete_cmd): Use "delete".
7749
7750 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7751             Pedro Alves <palves@redhat.com>
7752
7753         PR breakpoints/19806 and support for PR external/20207.
7754         * NEWS: Mention Aarch64 watchpoint improvements.
7755         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7756         watchpoints and PR external/20207 watchpoints.
7757         * nat/aarch64-linux-hw-point.c
7758         (kernel_supports_any_contiguous_range): New.
7759         (aarch64_watchpoint_offset): New.
7760         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7761         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7762         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7763         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7764         next_addr_orig_p.  Support PR external/20207 watchpoints.
7765         (aarch64_downgrade_regs): New.
7766         (aarch64_dr_state_insert_one_point): New parameters offset and
7767         addr_orig.
7768         (aarch64_dr_state_remove_one_point): Likewise.
7769         (aarch64_handle_breakpoint): Update caller.
7770         (aarch64_handle_aligned_watchpoint): Likewise.
7771         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7772         aligned_offset.
7773         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7774         aarch64_downgrade_regs.
7775         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7776         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7777         (DR_CONTROL_MASK): ... this.
7778         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7779         (unsigned int aarch64_watchpoint_offset): New prototype.
7780         (aarch64_linux_set_debug_regs): Remove const from state.
7781         * utils.c (align_up, align_down): Move to ...
7782         * common/common-utils.c (align_up, align_down): ... here.
7783         * utils.h (align_up, align_down): Move to ...
7784         * common/common-utils.h (align_up, align_down): ... here.
7785
7786 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
7787
7788         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7789         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7790         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7791         Re-implement to match the ABI as summarized in GCC's
7792         gcc/config/sparc/sparc.c.  All callers updated.
7793         (sparc32_store_arguments): Remove assertion.
7794
7795 2018-05-04  Tom Tromey  <tom@tromey.com>
7796
7797         * printcmd.c: Don't include tui.h.
7798         (decode_format): Use skip_spaces.
7799
7800 2018-05-04  Tom Tromey  <tom@tromey.com>
7801
7802         PR gdb/22619:
7803         * printcmd.c (last_count): New global.
7804         (x_command): Use saved count when repeating.
7805
7806 2018-05-04  Tom Tromey  <tom@tromey.com>
7807
7808         * nto-procfs.c (do_closedir_cleanup): Remove.
7809         (procfs_pidlist): Use gdb_dir_up.
7810         * procfs.c (do_closedir_cleanup): Remove.
7811         (proc_update_threads): Use gdb_dir_up.
7812         * common/filestuff.h (struct gdb_dir_deleter): New.
7813         (gdb_dir_up): New typedef.
7814
7815 2018-05-04  Tom Tromey  <tom@tromey.com>
7816
7817         * ada-lang.c (print_mention_exception): Use std::string.
7818
7819 2018-05-04  Tom Tromey  <tom@tromey.com>
7820
7821         * ada-lang.c (create_excep_cond_exprs): Update.
7822         (ada_exception_catchpoint_cond_string): Use std::string.
7823
7824 2018-05-04  Tom Tromey  <tom@tromey.com>
7825
7826         * ada-lang.c (xget_renaming_scope): Return std::string.
7827         (old_renaming_is_invisible): Update.
7828
7829 2018-05-04  Tom Tromey  <tom@tromey.com>
7830
7831         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7832         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7833
7834 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7835
7836         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7837
7838 2018-05-04  Tom Tromey  <tom@tromey.com>
7839
7840         * remote.c (remote_query_supported_append): Change type.
7841         (remote_check_symbols): Update.
7842
7843 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
7844
7845         PR gdb/11420
7846         * configure.ac: Prepend libpython.
7847         * python/python-config.py: Likewise.
7848         * configure: Regenerate.
7849
7850 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7851
7852         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7853
7854 2018-05-03  Pedro Alves  <palves@redhat.com>
7855
7856         * s390-linux-nat.c
7857         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7858         override.  Write 'true' instead of '1'.
7859         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7860         declaration.
7861
7862 2018-05-02  Pedro Alves  <palves@redhat.com>
7863
7864         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7865         add_inf_child_target.
7866         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7867         add_inf_child_target.
7868         * aix-thread.c (aix_thread_target_info): New.
7869         (aix_thread_target) <shortname, longname, doc>: Delete.
7870         <info>: New.
7871         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7872         add_inf_child_target.
7873         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7874         add_inf_child_target.
7875         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7876         add_inf_child_target.
7877         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7878         add_inf_child_target.
7879         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7880         add_inf_child_target.
7881         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7882         add_inf_child_target.
7883         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7884         add_inf_child_target.
7885         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
7886         add_inf_child_target.
7887         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
7888         add_inf_child_target.
7889         * bfd-target.c (target_bfd_target_info): New.
7890         (target_bfd) <shortname, longname, doc>: Delete.
7891         <info>: New.
7892         * bsd-kvm.c (bsd_kvm_target_info): New.
7893         (bsd_kvm_target) <shortname, longname, doc>: Delete.
7894         <info>: New.
7895         (bsd_kvm_target::open): Rename to ...
7896         (bsd_kvm_target_open): ... this.  Adjust.
7897         * bsd-uthread.c (bsd_uthread_target_info): New.
7898         (bsd_uthread_target) <shortname, longname, doc>: Delete.
7899         <info>: New.
7900         * corefile.c (core_file_command): Adjust.
7901         * corelow.c (core_target_info): New.
7902         (core_target) <shortname, longname, doc>: Delete.
7903         <info>: New.
7904         (core_target::open): Rename to ...
7905         (core_target_open): ... this.  Adjust.
7906         * ctf.c (ctf_target_info): New.
7907         (ctf_target) <shortname, longname, doc>: Delete.
7908         <info>: New.
7909         (ctf_target::open): Rename to ...
7910         (ctf_target_open): ... this.
7911         (_initialize_ctf): Adjust.
7912         * exec.c (exec_target_info): New.
7913         (exec_target) <shortname, longname, doc>: Delete.
7914         <info>: New.
7915         (exec_target::open): Rename to ...
7916         (exec_target_open): ... this.
7917         * gdbcore.h (core_target_open): Declare.
7918         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
7919         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
7920         add_inf_child_target.
7921         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
7922         add_inf_child_target.
7923         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
7924         add_inf_child_target.
7925         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
7926         add_inf_child_target.
7927         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
7928         add_inf_child_target.
7929         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
7930         add_inf_child_target.
7931         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
7932         add_inf_child_target.
7933         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
7934         add_inf_child_target.
7935         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
7936         add_inf_child_target.
7937         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
7938         add_inf_child_target.
7939         * inf-child.c (inf_child_target_info): New.
7940         (inf_child_target::info): New.
7941         (inf_child_open_target): Remove 'target' parameter.  Use
7942         get_native_target instead.
7943         (inf_child_target::open): Delete.
7944         (add_inf_child_target): New.
7945         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
7946         Delete.
7947         <info>: New.
7948         (add_inf_child_target): Declare.
7949         (inf_child_open_target): Declare.
7950         * linux-thread-db.c (thread_db_target_info): New.
7951         (thread_db_target) <shortname, longname, doc>: Delete.
7952         <info>: New.
7953         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
7954         add_inf_child_target.
7955         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
7956         add_inf_child_target.
7957         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
7958         add_inf_child_target.
7959         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
7960         add_inf_child_target.
7961         * make-target-delegates (print_class): Adjust.
7962         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
7963         add_inf_child_target.
7964         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
7965         add_inf_child_target.
7966         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
7967         add_inf_child_target.
7968         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
7969         add_inf_child_target.
7970         * nto-procfs.c (nto_native_target_info): New.
7971         (nto_procfs_target_native) <shortname, longname, doc>:
7972         Delete.
7973         <info>: New.
7974         (nto_procfs_target_info): New.
7975         (nto_procfs_target_procfs) <shortname, longname, doc>:
7976         Delete.
7977         <info>: New.
7978         (init_procfs_targets): Adjust.
7979         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
7980         add_inf_child_target.
7981         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
7982         add_inf_child_target.
7983         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
7984         add_inf_child_target.
7985         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
7986         add_inf_child_target.
7987         * ravenscar-thread.c (ravenscar_target_info): New.
7988         (ravenscar_thread_target) <shortname, longname, doc>:
7989         Delete.
7990         <info>: New.
7991         * record-btrace.c (record_btrace_target_info):
7992         (record_btrace_target) <shortname, longname, doc>: Delete.
7993         <info>: New.
7994         (record_btrace_target::open): Rename to ...
7995         (record_btrace_target_open): ... this.  Adjust.
7996         * record-full.c (record_longname, record_doc): New.
7997         (record_full_base_target) <shortname, longname, doc>: Delete.
7998         <info>: New.
7999         (record_full_target_info): New.
8000         (record_full_target): <shortname>: Delete.
8001         <info>: New.
8002         (record_full_core_open_1, record_full_open_1): Update comments.
8003         (record_full_base_target::open): Rename to ...
8004         (record_full_open): ... this.
8005         (cmd_record_full_restore): Update.
8006         (_initialize_record_full): Update.
8007         * remote-sim.c (remote_sim_target_info): New.
8008         (gdbsim_target) <shortname, longname, doc>: Delete.
8009         <info>: New.
8010         (gdbsim_target::open): Rename to ...
8011         (gdbsim_target_open): ... this.
8012         (_initialize_remote_sim): Adjust.
8013         * remote.c (remote_doc): New.
8014         (remote_target_info): New.
8015         (remote_target) <shortname, longname, doc>: Delete.
8016         <info>: New.
8017         (extended_remote_target_info): New.
8018         (extended_remote_target) <shortname, longname, doc>: Delete.
8019         <info>: New.
8020         (remote_target::open_1): Make static.  Adjust.
8021         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8022         * s390-linux-nat.c (_initialize_s390_nat): Use
8023         add_inf_child_target.
8024         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8025         add_inf_child_target.
8026         * sol-thread.c (thread_db_target_info): New.
8027         (sol_thread_target) <shortname, longname, doc>: Delete.
8028         <info>: New.
8029         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8030         add_inf_child_target.
8031         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8032         add_inf_child_target.
8033         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8034         add_inf_child_target.
8035         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8036         add_inf_child_target.
8037         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8038         add_inf_child_target.
8039         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8040         add_inf_child_target.
8041         * spu-linux-nat.c (_initialize_spu_nat): Use
8042         add_inf_child_target.
8043         * spu-multiarch.c (spu_multiarch_target_info): New.
8044         (spu_multiarch_target) <shortname, longname, doc>: Delete.
8045         <info>: New.
8046         * target-delegates.c: Regenerate.
8047         * target.c: Include <unordered_map>.
8048         (target_ops_p): Delete.
8049         (DEF_VEC_P(target_ops_p)): Delete.
8050         (target_factories): New.
8051         (test_target_info): New.
8052         (test_target_ops::info): New.
8053         (open_target): Adjust to use target_factories.
8054         (add_target_with_completer): Rename to ...
8055         (add_target): ... this.  Change prototype.  Register target_info
8056         and open callback in target_factories.  Register target_info in
8057         command context instead of target_ops.
8058         (add_target): Delete old implementation.
8059         (add_deprecated_target_alias): Change prototype.  Adjust.
8060         (the_native_target): New.
8061         (set_native_target, get_native_target): New.
8062         (find_default_run_target): Use the_native_target.
8063         (find_attach_target, find_run_target): Simplify.
8064         (target_ops::open): Delete.
8065         (dummy_target_info): New.
8066         (dummy_target::shortname, dummy_target::longname)
8067         (dummy_target::doc): Delete.
8068         (dummy_target::info): New.
8069         (debug_target::shortname, debug_target::longname)
8070         (debug_target::doc): Delete.
8071         (debug_target::info): New.
8072         * target.h (struct target_info): New.
8073         (target_ops::~target_ops): Add comment.
8074         (target_ops::info): New.
8075         (target_ops::shortname, target_ops::longname, target_ops::doc): No
8076         longer virtual.  Implement in terms of target_info.
8077         (set_native_target, get_native_target): Declare.
8078         (target_open_ftype): New.
8079         (add_target, add_target_with_completer)
8080         (add_deprecated_target_alias): Change prototype.
8081         (test_target) <shortname, longname, doc>: Delete.
8082         <info>: New.
8083         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8084         add_inf_child_target.
8085         * tracefile-tfile.c (tfile_target_info): New.
8086         (tfile_target) <shortname, longname, doc>: Delete.
8087         <info>: New.
8088         (tfile_target::open): Rename to ...
8089         (tfile_target_open): ... this.
8090         (_initialize_tracefile_tfile): Adjust.
8091         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8092         add_inf_child_target.
8093         * windows-nat.c (_initialize_windows_nat): Use
8094         add_inf_child_target.
8095         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8096         add_inf_child_target.
8097
8098 2018-05-02  Pedro Alves  <palves@redhat.com>
8099
8100         * linux-nat.h (linux_nat_target) <low_new_thread,
8101         low_delete_thread, low_new_fork, low_forget_process,
8102         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8103         New virtual methods.
8104         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8105         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8106         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8107         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8108         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8109         Delete.
8110         * linux-fork.c (delete_fork): Adjust to call low method.
8111         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8112         (linux_nat_new_fork, linux_nat_forget_process_hook)
8113         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8114         (linux_nat_status_is_event):
8115         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8116         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8117         to call low method.
8118         (sigtrap_is_event): Rename to ...
8119         (linux_nat_target::low_status_is_event): ... this.
8120         (linux_nat_set_status_is_event): Delete.
8121         (save_stop_reason, linux_nat_wait_1)
8122         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8123         low methods.
8124         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8125         (linux_nat_set_new_fork, linux_nat_set_forget_process)
8126         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8127         (linux_nat_set_prepare_to_resume): Delete.
8128         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8129         low virtual methods.
8130         * amd64-linux-nat.c: Likewise.
8131         * arm-linux-nat.c: Likewise.
8132         * i386-linux-nat.c: Likewise.
8133         * ia64-linux-nat.c: Likewise.
8134         * mips-linux-nat.c: Likewise.
8135         * ppc-linux-nat.c: Likewise.
8136         * s390-linux-nat.c: Likewise.
8137         * sparc64-linux-nat.c: Likewise.
8138         * x86-linux-nat.c: Likewise.
8139         * x86-linux-nat.h: Include "nat/x86-linux.h".
8140         (x86_linux_nat_target) <low_new_fork, low_forget_process,
8141         low_prepare_to_resume, low_new_thread, low_delete_thread>:
8142         Override methods.
8143
8144 2018-05-02  Pedro Alves  <palves@redhat.com>
8145
8146         * target.h (target_ops)
8147         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8148         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8149         stopped_by_watchpoint, have_continuable_watchpoint,
8150         stopped_data_address, watchpoint_addr_within_range,
8151         can_accel_watchpoint_condition, can_run, thread_alive,
8152         has_all_memory, has_memory, has_stack, has_registers,
8153         has_execution, can_async_p, is_async_p, supports_non_stop,
8154         always_non_stop_p, can_execute_reverse, supports_multi_process,
8155         supports_enable_disable_tracepoint,
8156         supports_disable_randomization, supports_string_tracing,
8157         supports_evaluation_of_breakpoint_conditions,
8158         can_run_breakpoint_commands, filesystem_is_local,
8159         can_download_tracepoint, get_trace_state_variable_value,
8160         set_trace_notes, get_tib_address, use_agent, can_use_agent,
8161         record_is_replaying, record_will_replay,
8162         augmented_libraries_svr4_read>: Adjust to return bool.
8163         * aarch64-linux-nat.c: All implementations adjusted.
8164         * aix-thread.c: All implementations adjusted.
8165         * arm-linux-nat.c: All implementations adjusted.
8166         * breakpoint.c: All implementations adjusted.
8167         * bsd-kvm.c: All implementations adjusted.
8168         * bsd-uthread.c: All implementations adjusted.
8169         * corelow.c: All implementations adjusted.
8170         * ctf.c: All implementations adjusted.
8171         * darwin-nat.c: All implementations adjusted.
8172         * darwin-nat.h: All implementations adjusted.
8173         * exec.c: All implementations adjusted.
8174         * fbsd-nat.c: All implementations adjusted.
8175         * fbsd-nat.h: All implementations adjusted.
8176         * gnu-nat.c: All implementations adjusted.
8177         * gnu-nat.h: All implementations adjusted.
8178         * go32-nat.c: All implementations adjusted.
8179         * ia64-linux-nat.c: All implementations adjusted.
8180         * inf-child.c: All implementations adjusted.
8181         * inf-child.h: All implementations adjusted.
8182         * inf-ptrace.c: All implementations adjusted.
8183         * inf-ptrace.h: All implementations adjusted.
8184         * linux-nat.c: All implementations adjusted.
8185         * linux-nat.h: All implementations adjusted.
8186         * mips-linux-nat.c: All implementations adjusted.
8187         * nto-procfs.c: All implementations adjusted.
8188         * ppc-linux-nat.c: All implementations adjusted.
8189         * procfs.c: All implementations adjusted.
8190         * ravenscar-thread.c: All implementations adjusted.
8191         * record-btrace.c: All implementations adjusted.
8192         * record-full.c: All implementations adjusted.
8193         * remote-sim.c: All implementations adjusted.
8194         * remote.c: All implementations adjusted.
8195         * s390-linux-nat.c: All implementations adjusted.
8196         * sol-thread.c: All implementations adjusted.
8197         * spu-multiarch.c: All implementations adjusted.
8198         * target-delegates.c: All implementations adjusted.
8199         * target.c: All implementations adjusted.
8200         * target.h: All implementations adjusted.
8201         * tracefile-tfile.c: All implementations adjusted.
8202         * tracefile.c: All implementations adjusted.
8203         * tracefile.h: All implementations adjusted.
8204         * windows-nat.c: All implementations adjusted.
8205         * x86-linux-nat.h: All implementations adjusted.
8206         * x86-nat.h: All implementations adjusted.
8207
8208 2018-05-02  Pedro Alves  <palves@redhat.com>
8209
8210         * make-target-delegates (scan_target_h): Don't trim lines here.
8211         Replace sequences of tabs and/or whitespace with a single
8212         whitespace.
8213         (top level, parsing methods): Trim each line before processing it
8214         here.
8215
8216 2018-05-02  Pedro Alves  <palves@redhat.com>
8217             John Baldwin  <jhb@freebsd.org>
8218
8219         * target.h (enum strata) <debug_stratum>: New.
8220         (struct target_ops) <all delegation methods>: Replace by C++
8221         virtual methods, and drop "to_" prefix.  All references updated
8222         throughout.
8223         <to_shortname, to_longname, to_doc, to_data,
8224         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8225         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8226         virtual methods.  All references updated throughout.
8227         <can_attach, supports_terminal_ours, can_create_inferior,
8228         get_thread_control_capabilities, attach_no_wait>: New
8229         virtual methods.
8230         <insert_breakpoint, remove_breakpoint>: Now
8231         TARGET_DEFAULT_NORETURN methods.
8232         <info_proc>: Now returns bool.
8233         <to_magic>: Delete.
8234         (OPS_MAGIC): Delete.
8235         (current_target): Delete.  All references replaced by references
8236         to ...
8237         (target_stack): ... this.  New.
8238         (target_shortname, target_longname): Adjust.
8239         (target_can_run): Now a function declaration.
8240         (default_child_has_all_memory, default_child_has_memory)
8241         (default_child_has_stack, default_child_has_registers)
8242         (default_child_has_execution): Remove target_ops parameter.
8243         (complete_target_initialization): Delete.
8244         (memory_breakpoint_target): New template class.
8245         (test_target_ops): Refactor as a C++ class with virtual methods.
8246         * make-target-delegates (NAME_PART): Tighten.
8247         (POINTER_PART, CP_SYMBOL): New.
8248         (SIMPLE_RETURN_PART): Reimplement.
8249         (VEC_RETURN_PART): Expect less.
8250         (RETURN_PART, VIRTUAL_PART): New.
8251         (METHOD): Adjust to C++ virtual methods.
8252         (scan_target_h): Remove reference to C99.
8253         (dname): Output "target_ops::" prefix.
8254         (write_function_header): Adjust to output a C++ class method.
8255         (write_declaration): New.
8256         (write_delegator): Adjust to output a C++ class method.
8257         (tdname): Output "dummy_target::" prefix.
8258         (write_tdefault, write_debugmethod): Adjust to output a C++ class
8259         method.
8260         (tdefault_names, debug_names): Delete.
8261         (return_types, tdefaults, styles, argtypes_array): New.
8262         (top level): All methods are delegators.
8263         (print_class): New.
8264         (top level): Print dummy_target and debug_target classes.
8265         * target-delegates.c: Regenerate.
8266         * target-debug.h (target_debug_print_enum_info_proc_what)
8267         (target_debug_print_thread_control_capabilities)
8268         (target_debug_print_thread_info_p): New.
8269         * target.c (dummy_target): Delete.
8270         (the_dummy_target, the_debug_target): New.
8271         (target_stack): Now extern.
8272         (set_targetdebug): Push/unpush debug target.
8273         (default_child_has_all_memory, default_child_has_memory)
8274         (default_child_has_stack, default_child_has_registers)
8275         (default_child_has_execution): Remove target_ops parameter.
8276         (complete_target_initialization): Delete.
8277         (add_target_with_completer): No longer call
8278         complete_target_initialization.
8279         (target_supports_terminal_ours): Use regular delegation.
8280         (update_current_target): Delete.
8281         (push_target): No longer check magic number.  Don't call
8282         update_current_target.
8283         (unpush_target): Don't call update_current_target.
8284         (target_is_pushed): No longer check magic number.
8285         (target_require_runnable): Skip for all stratums over
8286         process_stratum.
8287         (target_ops::info_proc): New.
8288         (target_info_proc): Use find_target_at and
8289         find_default_run_target.
8290         (target_supports_disable_randomization): Use regular delegation.
8291         (target_get_osdata): Use find_target_at.
8292         (target_ops::open, target_ops::close, target_ops::can_attach)
8293         (target_ops::attach, target_ops::can_create_inferior)
8294         (target_ops::create_inferior, target_ops::can_run)
8295         (target_can_run): New.
8296         (default_fileio_target): Use regular delegation.
8297         (target_ops::fileio_open, target_ops::fileio_pwrite)
8298         (target_ops::fileio_pread, target_ops::fileio_fstat)
8299         (target_ops::fileio_close, target_ops::fileio_unlink)
8300         (target_ops::fileio_readlink): New.
8301         (target_fileio_open_1, target_fileio_unlink)
8302         (target_fileio_readlink): Always call the target method.  Handle
8303         FILEIO_ENOSYS.
8304         (return_zero, return_zero_has_execution): Delete.
8305         (init_dummy_target): Delete.
8306         (dummy_target::dummy_target, dummy_target::shortname)
8307         (dummy_target::longname, dummy_target::doc)
8308         (debug_target::debug_target, debug_target::shortname)
8309         (debug_target::longname, debug_target::doc): New.
8310         (target_supports_delete_record): Use regular delegation.
8311         (setup_target_debug): Delete.
8312         (maintenance_print_target_stack): Skip debug_stratum.
8313         (initialize_targets): Instantiate the_dummy_target and
8314         the_debug_target.
8315         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
8316         use target_stack.
8317         (target_auxv_search, fprint_target_auxv): Adjust.
8318         (info_auxv_command): Adjust to use target_stack.
8319         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8320         * exceptions.c (print_flush): Handle a NULL target_stack.
8321         * regcache.c (target_ops_no_register): Refactor as class with
8322         virtual methods.
8323
8324         * exec.c (exec_target): New class.
8325         (exec_ops): Now an exec_target.
8326         (exec_open, exec_close_1, exec_get_section_table)
8327         (exec_xfer_partial, exec_files_info, exec_has_memory)
8328         (exec_make_note_section): Refactor as exec_target methods.
8329         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8330         Delete.
8331         (exec_target::find_memory_regions): New.
8332         (_initialize_exec): Don't call init_exec_ops.
8333         * gdbcore.h (exec_file_clear): Delete.
8334
8335         * corefile.c (core_target): Delete.
8336         (core_file_command): Adjust.
8337         * corelow.c (core_target): New class.
8338         (the_core_target): New.
8339         (core_close): Remove target_ops parameter.
8340         (core_close_cleanup): Adjust.
8341         (core_target::close): New.
8342         (core_open, core_detach, get_core_registers, core_files_info)
8343         (core_xfer_partial, core_thread_alive, core_read_description)
8344         (core_pid_to_str, core_thread_name, core_has_memory)
8345         (core_has_stack, core_has_registers, core_info_proc): Rework as
8346         core_target methods.
8347         (ignore, core_remove_breakpoint, init_core_ops): Delete.
8348         (_initialize_corelow): Initialize the_core_target.
8349         * gdbcore.h (core_target): Delete.
8350         (the_core_target): New.
8351
8352         * ctf.c: (ctf_target): New class.
8353         (ctf_ops): Now a ctf_target.
8354         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8355         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8356         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8357         methods.
8358         (init_ctf_ops): Delete.
8359         (_initialize_ctf): Don't call it.
8360         * tracefile-tfile.c (tfile_target): New class.
8361         (tfile_ops): Now a tfile_target.
8362         (tfile_open, tfile_close, tfile_files_info)
8363         (tfile_get_tracepoint_status, tfile_trace_find)
8364         (tfile_fetch_registers, tfile_xfer_partial)
8365         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8366         Refactor as tfile_target methods.
8367         (tfile_xfer_partial_features): Remove target_ops parameter.
8368         (init_tfile_ops): Delete.
8369         (_initialize_tracefile_tfile): Don't call it.
8370         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8371         (tracefile_has_stack, tracefile_has_registers)
8372         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8373         tracefile_target methods.
8374         (init_tracefile_ops): Delete.
8375         (tracefile_target::tracefile_target): New.
8376         * tracefile.h: Include "target.h".
8377         (tracefile_target): New class.
8378         (init_tracefile_ops): Delete.
8379
8380         * spu-multiarch.c (spu_multiarch_target): New class.
8381         (spu_ops): Now a spu_multiarch_target.
8382         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8383         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8384         (spu_search_memory, spu_mourn_inferior): Refactor as
8385         spu_multiarch_target methods.
8386         (init_spu_ops): Delete.
8387         (_initialize_spu_multiarch): Remove references to init_spu_ops,
8388         complete_target_initialization.
8389
8390         * ravenscar-thread.c (ravenscar_thread_target): New class.
8391         (ravenscar_ops): Now a ravenscar_thread_target.
8392         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8393         (ravenscar_thread_alive, ravenscar_pid_to_str)
8394         (ravenscar_fetch_registers, ravenscar_store_registers)
8395         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8396         (ravenscar_stopped_by_hw_breakpoint)
8397         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8398         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8399         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8400         methods.
8401         (init_ravenscar_thread_ops): Delete.
8402         (_initialize_ravenscar): Remove references to
8403         init_ravenscar_thread_ops and complete_target_initialization.
8404
8405         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8406         (bsd_uthread_target): New class.
8407         (bsd_uthread_ops): Now a bsd_uthread_target.
8408         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8409         (bsd_uthread_close, bsd_uthread_mourn_inferior)
8410         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8411         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8412         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8413         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8414         (bsd_uthread_target): Delete function.
8415         (_initialize_bsd_uthread): Remove reference to
8416         complete_target_initialization.
8417
8418         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
8419         (target_bfd): ... this new class.
8420         (target_bfd_xfer_partial, target_bfd_get_section_table)
8421         (target_bfd_close): Refactor as target_bfd methods.
8422         (target_bfd::~target_bfd): New.
8423         (target_bfd_reopen): Adjust.
8424         (target_bfd::close): New.
8425
8426         * record-btrace.c (record_btrace_target): New class.
8427         (record_btrace_ops): Now a record_btrace_target.
8428         (record_btrace_open, record_btrace_stop_recording)
8429         (record_btrace_disconnect, record_btrace_close)
8430         (record_btrace_async, record_btrace_info)
8431         (record_btrace_insn_history, record_btrace_insn_history_range)
8432         (record_btrace_insn_history_from, record_btrace_call_history)
8433         (record_btrace_call_history_range)
8434         (record_btrace_call_history_from, record_btrace_record_method)
8435         (record_btrace_is_replaying, record_btrace_will_replay)
8436         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8437         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8438         (record_btrace_store_registers, record_btrace_prepare_to_store)
8439         (record_btrace_to_get_unwinder)
8440         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8441         (record_btrace_commit_resume, record_btrace_wait)
8442         (record_btrace_stop, record_btrace_can_execute_reverse)
8443         (record_btrace_stopped_by_sw_breakpoint)
8444         (record_btrace_supports_stopped_by_sw_breakpoint)
8445         (record_btrace_stopped_by_hw_breakpoint)
8446         (record_btrace_supports_stopped_by_hw_breakpoint)
8447         (record_btrace_update_thread_list, record_btrace_thread_alive)
8448         (record_btrace_goto_begin, record_btrace_goto_end)
8449         (record_btrace_goto, record_btrace_stop_replaying_all)
8450         (record_btrace_execution_direction)
8451         (record_btrace_prepare_to_generate_core)
8452         (record_btrace_done_generating_core): Refactor as
8453         record_btrace_target methods.
8454         (init_record_btrace_ops): Delete.
8455         (_initialize_record_btrace): Remove reference to
8456         init_record_btrace_ops.
8457         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8458         the execution_direction global.
8459         (record_full_base_target, record_full_target)
8460         (record_full_core_target): New classes.
8461         (record_full_ops): Now a record_full_target.
8462         (record_full_core_ops): Now a record_full_core_target.
8463         (record_full_target::detach, record_full_target::disconnect)
8464         (record_full_core_target::disconnect)
8465         (record_full_target::mourn_inferior, record_full_target::kill):
8466         New.
8467         (record_full_open, record_full_close, record_full_async): Refactor
8468         as methods of the record_full_base_target class.
8469         (record_full_resume, record_full_commit_resume): Refactor
8470         as methods of the record_full_target class.
8471         (record_full_wait, record_full_stopped_by_watchpoint)
8472         (record_full_stopped_data_address)
8473         (record_full_stopped_by_sw_breakpoint)
8474         (record_full_supports_stopped_by_sw_breakpoint)
8475         (record_full_stopped_by_hw_breakpoint)
8476         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8477         methods of the record_full_base_target class.
8478         (record_full_store_registers, record_full_xfer_partial)
8479         (record_full_insert_breakpoint, record_full_remove_breakpoint):
8480         Refactor as methods of the record_full_target class.
8481         (record_full_can_execute_reverse, record_full_get_bookmark)
8482         (record_full_goto_bookmark, record_full_execution_direction)
8483         (record_full_record_method, record_full_info, record_full_delete)
8484         (record_full_is_replaying, record_full_will_replay)
8485         (record_full_goto_begin, record_full_goto_end, record_full_goto)
8486         (record_full_stop_replaying): Refactor as methods of the
8487         record_full_base_target class.
8488         (record_full_core_resume, record_full_core_kill)
8489         (record_full_core_fetch_registers)
8490         (record_full_core_prepare_to_store)
8491         (record_full_core_store_registers, record_full_core_xfer_partial)
8492         (record_full_core_insert_breakpoint)
8493         (record_full_core_remove_breakpoint)
8494         (record_full_core_has_execution): Refactor
8495         as methods of the record_full_core_target class.
8496         (record_full_base_target::supports_delete_record): New.
8497         (init_record_full_ops): Delete.
8498         (init_record_full_core_ops): Delete.
8499         (record_full_save): Refactor as method of the
8500         record_full_base_target class.
8501         (_initialize_record_full): Remove references to
8502         init_record_full_ops and init_record_full_core_ops.
8503
8504         * remote.c (remote_target, extended_remote_target): New classes.
8505         (remote_ops): Now a remote_target.
8506         (extended_remote_ops): Now an extended_remote_target.
8507         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8508         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8509         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8510         (remote_pass_signals, remote_set_syscall_catchpoint)
8511         (remote_program_signals, )
8512         (remote_thread_always_alive): Remove target_ops parameter.
8513         (remote_thread_alive, remote_thread_name)
8514         (remote_update_thread_list, remote_threads_extra_info)
8515         (remote_static_tracepoint_marker_at)
8516         (remote_static_tracepoint_markers_by_strid)
8517         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8518         (remote_open): Refactor as methods of remote_target.
8519         (extended_remote_open, extended_remote_detach)
8520         (extended_remote_attach, extended_remote_post_attach):
8521         (extended_remote_supports_disable_randomization)
8522         (extended_remote_create_inferior): : Refactor as method of
8523         extended_remote_target.
8524         (remote_set_permissions, remote_open_1, remote_detach)
8525         (remote_follow_fork, remote_follow_exec, remote_disconnect)
8526         (remote_resume, remote_commit_resume, remote_stop)
8527         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8528         (remote_terminal_ours, remote_wait, remote_fetch_registers)
8529         (remote_prepare_to_store, remote_store_registers)
8530         (remote_flash_erase, remote_flash_done, remote_files_info)
8531         (remote_kill, remote_mourn, remote_insert_breakpoint)
8532         (remote_remove_breakpoint, remote_insert_watchpoint)
8533         (remote_watchpoint_addr_within_range)
8534         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8535         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8536         (remote_supports_stopped_by_sw_breakpoint)
8537         (remote_stopped_by_hw_breakpoint)
8538         (remote_supports_stopped_by_hw_breakpoint)
8539         (remote_stopped_by_watchpoint, remote_stopped_data_address)
8540         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8541         (remote_verify_memory): Refactor as methods of remote_target.
8542         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8543         parameter.
8544         (remote_xfer_partial, remote_get_memory_xfer_limit)
8545         (remote_search_memory, remote_rcmd, remote_memory_map)
8546         (remote_pid_to_str, remote_get_thread_local_address)
8547         (remote_get_tib_address, remote_read_description): Refactor as
8548         methods of remote_target.
8549         (remote_target::fileio_open, remote_target::fileio_pwrite)
8550         (remote_target::fileio_pread, remote_target::fileio_close): New.
8551         (remote_hostio_readlink, remote_hostio_fstat)
8552         (remote_filesystem_is_local, remote_can_execute_reverse)
8553         (remote_supports_non_stop, remote_supports_disable_randomization)
8554         (remote_supports_multi_process, remote_supports_cond_breakpoints)
8555         (remote_supports_enable_disable_tracepoint)
8556         (remote_supports_string_tracing)
8557         (remote_can_run_breakpoint_commands, remote_trace_init)
8558         (remote_download_tracepoint, remote_can_download_tracepoint)
8559         (remote_download_trace_state_variable, remote_enable_tracepoint)
8560         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8561         (remote_trace_start, remote_get_trace_status)
8562         (remote_get_tracepoint_status, remote_trace_stop)
8563         (remote_trace_find, remote_get_trace_state_variable_value)
8564         (remote_save_trace_data, remote_get_raw_trace_data)
8565         (remote_set_disconnected_tracing, remote_core_of_thread)
8566         (remote_set_circular_trace_buffer, remote_traceframe_info)
8567         (remote_get_min_fast_tracepoint_insn_len)
8568         (remote_set_trace_buffer_size, remote_set_trace_notes)
8569         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8570         (remote_disable_btrace, remote_teardown_btrace)
8571         (remote_read_btrace, remote_btrace_conf)
8572         (remote_augmented_libraries_svr4_read, remote_load)
8573         (remote_pid_to_exec_file, remote_can_do_single_step)
8574         (remote_execution_direction, remote_thread_handle_to_thread_info):
8575         Refactor as methods of remote_target.
8576         (init_remote_ops, init_extended_remote_ops): Delete.
8577         (remote_can_async_p, remote_is_async_p, remote_async)
8578         (remote_thread_events, remote_upload_tracepoints)
8579         (remote_upload_trace_state_variables): Refactor as methods of
8580         remote_target.
8581         (_initialize_remote): Remove references to init_remote_ops and
8582         init_extended_remote_ops.
8583
8584         * remote-sim.c (gdbsim_target): New class.
8585         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8586         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8587         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8588         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8589         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8590         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8591         Refactor as methods of gdbsim_target.
8592         (gdbsim_ops): Now a gdbsim_target.
8593         (init_gdbsim_ops): Delete.
8594         (gdbsim_cntrl_c): Adjust.
8595         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8596
8597         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8598         (the_amd64_linux_nat_target): New.
8599         (amd64_linux_fetch_inferior_registers)
8600         (amd64_linux_store_inferior_registers): Refactor as methods of
8601         amd64_linux_nat_target.
8602         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
8603         * i386-linux-nat.c: Don't include "linux-nat.h".
8604         (i386_linux_nat_target): New class.
8605         (the_i386_linux_nat_target): New.
8606         (i386_linux_fetch_inferior_registers)
8607         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8608         as methods of i386_linux_nat_target.
8609         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
8610         * inf-child.c (inf_child_ops): Delete.
8611         (inf_child_fetch_inferior_registers)
8612         (inf_child_store_inferior_registers): Delete.
8613         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8614         methods of inf_child_target.
8615         (inf_child_target::supports_terminal_ours)
8616         (inf_child_target::terminal_init)
8617         (inf_child_target::terminal_inferior)
8618         (inf_child_target::terminal_ours_for_output)
8619         (inf_child_target::terminal_ours, inf_child_target::interrupt)
8620         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8621         New.
8622         (inf_child_open, inf_child_disconnect, inf_child_close)
8623         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8624         (inf_child_post_startup_inferior, inf_child_can_run)
8625         (inf_child_pid_to_exec_file): Refactor as methods of
8626         inf_child_target.
8627         (inf_child_follow_fork): Delete.
8628         (inf_child_target::can_create_inferior)
8629         (inf_child_target::can_attach): New.
8630         (inf_child_target::has_all_memory, inf_child_target::has_memory)
8631         (inf_child_target::has_stack, inf_child_target::has_registers)
8632         (inf_child_target::has_execution): New.
8633         (inf_child_fileio_open, inf_child_fileio_pwrite)
8634         (inf_child_fileio_pread, inf_child_fileio_fstat)
8635         (inf_child_fileio_close, inf_child_fileio_unlink)
8636         (inf_child_fileio_readlink, inf_child_use_agent)
8637         (inf_child_can_use_agent): Refactor as methods of
8638         inf_child_target.
8639         (return_zero, inf_child_target): Delete.
8640         (inf_child_target::inf_child_target): New.
8641         * inf-child.h: Include "target.h".
8642         (inf_child_target): Delete function prototype.
8643         (inf_child_target): New class.
8644         (inf_child_open_target, inf_child_mourn_inferior)
8645         (inf_child_maybe_unpush_target): Delete.
8646         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8647         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8648         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8649         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8650         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8651         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8652         (inf_ptrace_wait, inf_ptrace_xfer_partial)
8653         (inf_ptrace_thread_alive, inf_ptrace_files_info)
8654         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8655         methods of inf_ptrace_target.
8656         (inf_ptrace_target): Delete function.
8657         * inf-ptrace.h: Include "inf-child.h".
8658         (inf_ptrace_target): Delete function declaration.
8659         (inf_ptrace_target): New class.
8660         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8661         * linux-nat.c (linux_target): New.
8662         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8663         (linux_nat_target::~linux_nat_target): New.
8664         (linux_child_post_attach, linux_child_post_startup_inferior)
8665         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8666         (linux_child_remove_fork_catchpoint)
8667         (linux_child_insert_vfork_catchpoint)
8668         (linux_child_remove_vfork_catchpoint)
8669         (linux_child_insert_exec_catchpoint)
8670         (linux_child_remove_exec_catchpoint)
8671         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8672         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8673         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8674         (linux_nat_stopped_data_address)
8675         (linux_nat_stopped_by_sw_breakpoint)
8676         (linux_nat_supports_stopped_by_sw_breakpoint)
8677         (linux_nat_stopped_by_hw_breakpoint)
8678         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8679         (linux_nat_kill, linux_nat_mourn_inferior)
8680         (linux_nat_xfer_partial, linux_nat_thread_alive)
8681         (linux_nat_update_thread_list, linux_nat_pid_to_str)
8682         (linux_nat_thread_name, linux_child_pid_to_exec_file)
8683         (linux_child_static_tracepoint_markers_by_strid)
8684         (linux_nat_is_async_p, linux_nat_can_async_p)
8685         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8686         (linux_nat_supports_multi_process)
8687         (linux_nat_supports_disable_randomization, linux_nat_async)
8688         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8689         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8690         (linux_nat_fileio_open, linux_nat_fileio_readlink)
8691         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8692         methods of linux_nat_target.
8693         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8694         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8695         parameter.
8696         (check_stopped_by_watchpoint): Adjust.
8697         (linux_xfer_partial): Delete.
8698         (linux_target_install_ops, linux_target, linux_nat_add_target):
8699         Delete.
8700         (linux_nat_target::linux_nat_target): New.
8701         * linux-nat.h: Include "inf-ptrace.h".
8702         (linux_nat_target): New.
8703         (linux_target, linux_target_install_ops, linux_nat_add_target):
8704         Delete function declarations.
8705         (linux_target): Declare global.
8706         * linux-thread-db.c (thread_db_target): New.
8707         (thread_db_target::thread_db_target): New.
8708         (thread_db_ops): Delete.
8709         (the_thread_db_target): New.
8710         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8711         (thread_db_update_thread_list, thread_db_pid_to_str)
8712         (thread_db_extra_thread_info)
8713         (thread_db_thread_handle_to_thread_info)
8714         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8715         (thread_db_resume): Refactor as methods of thread_db_target.
8716         (init_thread_db_ops): Delete.
8717         (_initialize_thread_db): Remove reference to init_thread_db_ops.
8718         * x86-linux-nat.c: Don't include "linux-nat.h".
8719         (super_post_startup_inferior): Delete.
8720         (x86_linux_nat_target::~x86_linux_nat_target): New.
8721         (x86_linux_child_post_startup_inferior)
8722         (x86_linux_read_description, x86_linux_enable_btrace)
8723         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8724         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8725         methods of x86_linux_nat_target.
8726         (x86_linux_create_target): Delete.  Bits folded ...
8727         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
8728         pointer.
8729         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8730         (x86_linux_nat_target): New class.
8731         (x86_linux_create_target): Delete.
8732         (x86_linux_add_target): Now takes a linux_nat_target pointer.
8733         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8734         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8735         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8736         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8737         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8738         make extern.
8739         (x86_use_watchpoints): Delete.
8740         * x86-nat.h: Include "breakpoint.h" and "target.h".
8741         (x86_use_watchpoints): Delete.
8742         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8743         (x86_stopped_by_watchpoint, x86_stopped_data_address)
8744         (x86_insert_watchpoint, x86_remove_watchpoint)
8745         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8746         (x86_stopped_by_hw_breakpoint): New declarations.
8747         (x86_nat_target): New template class.
8748
8749         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8750         (the_ppc_linux_nat_target): New.
8751         (ppc_linux_fetch_inferior_registers)
8752         (ppc_linux_can_use_hw_breakpoint)
8753         (ppc_linux_region_ok_for_hw_watchpoint)
8754         (ppc_linux_ranged_break_num_registers)
8755         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8756         (ppc_linux_insert_mask_watchpoint)
8757         (ppc_linux_remove_mask_watchpoint)
8758         (ppc_linux_can_accel_watchpoint_condition)
8759         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8760         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8761         (ppc_linux_watchpoint_addr_within_range)
8762         (ppc_linux_masked_watch_num_registers)
8763         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8764         (ppc_linux_read_description): Refactor as methods of
8765         ppc_linux_nat_target.
8766         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8767
8768         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8769         (procfs_target): New class.
8770         (the_procfs_target): New.
8771         (procfs_target): Delete function.
8772         (procfs_auxv_parse, procfs_attach, procfs_detach)
8773         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8774         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8775         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8776         (procfs_create_inferior, procfs_update_thread_list)
8777         (procfs_thread_alive, procfs_pid_to_str)
8778         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8779         (procfs_stopped_data_address, procfs_insert_watchpoint)
8780         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8781         (proc_find_memory_regions, procfs_info_proc)
8782         (procfs_make_note_section): Refactor as methods of procfs_target.
8783         (_initialize_procfs): Adjust.
8784         * sol-thread.c (sol_thread_target): New class.
8785         (sol_thread_ops): Now a sol_thread_target.
8786         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8787         (sol_thread_fetch_registers, sol_thread_store_registers)
8788         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8789         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8790         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8791         (init_sol_thread_ops): Delete.
8792         (_initialize_sol_thread): Adjust.  Remove references to
8793         init_sol_thread_ops and complete_target_initialization.
8794
8795         * windows-nat.c (windows_nat_target): New class.
8796         (windows_fetch_inferior_registers)
8797         (windows_store_inferior_registers, windows_resume, windows_wait)
8798         (windows_attach, windows_detach, windows_pid_to_exec_file)
8799         (windows_files_info, windows_create_inferior)
8800         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8801         (windows_close, windows_pid_to_str, windows_xfer_partial)
8802         (windows_get_tib_address, windows_get_ada_task_ptid)
8803         (windows_thread_name, windows_thread_alive): Refactor as
8804         windows_nat_target methods.
8805         (do_initial_windows_stuff): Adjust.
8806         (windows_target): Delete function.
8807         (_initialize_windows_nat): Adjust.
8808
8809         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8810         (darwin_mourn_inferior, darwin_kill_inferior)
8811         (darwin_create_inferior, darwin_attach, darwin_detach)
8812         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8813         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8814         (darwin_supports_multi_process): Refactor as darwin_nat_target
8815         methods.
8816         (darwin_resume_to, darwin_files_info): Delete.
8817         (_initialize_darwin_inferior): Rename to ...
8818         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
8819         * darwin-nat.h: Include "inf-child.h".
8820         (darwin_nat_target): New class.
8821         (darwin_complete_target): Delete.
8822         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8823         (darwin_target): New.
8824         (i386_darwin_fetch_inferior_registers)
8825         (i386_darwin_store_inferior_registers): Refactor as methods of
8826         darwin_nat_target.
8827         (darwin_complete_target): Delete, with ...
8828         (_initialize_i386_darwin_nat): ... bits factored out here.
8829
8830         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8831         (the_alpha_linux_nat_target): New.
8832         (alpha_linux_register_u_offset): Refactor as
8833         alpha_linux_nat_target method.
8834         (_initialize_alpha_linux_nat): Adjust.
8835         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8836         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8837         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8838         methods of linux_nat_trad_target.
8839         (linux_trad_target): Delete.
8840         * linux-nat-trad.h (linux_trad_target): Delete function.
8841         (linux_nat_trad_target): New class.
8842         * mips-linux-nat.c (mips_linux_nat_target): New class.
8843         (super_fetch_registers, super_store_registers, super_close):
8844         Delete.
8845         (the_mips_linux_nat_target): New.
8846         (mips64_linux_regsets_fetch_registers)
8847         (mips64_linux_regsets_store_registers)
8848         (mips64_linux_fetch_registers, mips64_linux_store_registers)
8849         (mips_linux_register_u_offset, mips_linux_read_description)
8850         (mips_linux_can_use_hw_breakpoint)
8851         (mips_linux_stopped_by_watchpoint)
8852         (mips_linux_stopped_data_address)
8853         (mips_linux_region_ok_for_hw_watchpoint)
8854         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8855         (mips_linux_close): Refactor as methods of mips_linux_nat.
8856         (_initialize_mips_linux_nat): Adjust to C++ification.
8857
8858         * aix-thread.c (aix_thread_target): New class.
8859         (aix_thread_ops): Now an aix_thread_target.
8860         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8861         (aix_thread_fetch_registers, aix_thread_store_registers)
8862         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8863         (aix_thread_thread_alive, aix_thread_pid_to_str)
8864         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8865         Refactor as methods of aix_thread_target.
8866         (init_aix_thread_ops): Delete.
8867         (_initialize_aix_thread): Remove references to init_aix_thread_ops
8868         and complete_target_initialization.
8869         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8870         (rs6000_nat_target): New class.
8871         (the_rs6000_nat_target): New.
8872         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8873         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8874         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8875         (super_create_inferior): Delete.
8876         (_initialize_rs6000_nat): Adjust to C++ification.
8877
8878         * arm-linux-nat.c (arm_linux_nat_target): New class.
8879         (the_arm_linux_nat_target): New.
8880         (arm_linux_fetch_inferior_registers)
8881         (arm_linux_store_inferior_registers, arm_linux_read_description)
8882         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8883         (arm_linux_remove_hw_breakpoint)
8884         (arm_linux_region_ok_for_hw_watchpoint)
8885         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
8886         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
8887         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
8888         arm_linux_nat_target.
8889         (_initialize_arm_linux_nat): Adjust to C++ification.
8890
8891         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
8892         (the_aarch64_linux_nat_target): New.
8893         (aarch64_linux_fetch_inferior_registers)
8894         (aarch64_linux_store_inferior_registers)
8895         (aarch64_linux_child_post_startup_inferior)
8896         (aarch64_linux_read_description)
8897         (aarch64_linux_can_use_hw_breakpoint)
8898         (aarch64_linux_insert_hw_breakpoint)
8899         (aarch64_linux_remove_hw_breakpoint)
8900         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
8901         (aarch64_linux_region_ok_for_hw_watchpoint)
8902         (aarch64_linux_stopped_data_address)
8903         (aarch64_linux_stopped_by_watchpoint)
8904         (aarch64_linux_watchpoint_addr_within_range)
8905         (aarch64_linux_can_do_single_step): Refactor as methods of
8906         aarch64_linux_nat_target.
8907         (super_post_startup_inferior): Delete.
8908         (_initialize_aarch64_linux_nat): Adjust to C++ification.
8909
8910         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
8911         (the_hppa_linux_nat_target): New.
8912         (hppa_linux_fetch_inferior_registers)
8913         (hppa_linux_store_inferior_registers): Refactor as methods of
8914         hppa_linux_nat_target.
8915         (_initialize_hppa_linux_nat): Adjust to C++ification.
8916
8917         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
8918         (the_ia64_linux_nat_target): New.
8919         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
8920         (ia64_linux_stopped_data_address)
8921         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
8922         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
8923         ia64_linux_nat_target methods.
8924         (super_xfer_partial): Delete.
8925         (_initialize_ia64_linux_nat): Adjust to C++ification.
8926
8927         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
8928         (the_m32r_linux_nat_target): New.
8929         (m32r_linux_fetch_inferior_registers)
8930         (m32r_linux_store_inferior_registers): Refactor as
8931         m32r_linux_nat_target methods.
8932         (_initialize_m32r_linux_nat): Adjust to C++ification.
8933
8934         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
8935         (the_m68k_linux_nat_target): New.
8936         (m68k_linux_fetch_inferior_registers)
8937         (m68k_linux_store_inferior_registers): Refactor as
8938         m68k_linux_nat_target methods.
8939         (_initialize_m68k_linux_nat): Adjust to C++ification.
8940
8941         * s390-linux-nat.c (s390_linux_nat_target): New class.
8942         (the_s390_linux_nat_target): New.
8943         (s390_linux_fetch_inferior_registers)
8944         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
8945         (s390_insert_watchpoint, s390_remove_watchpoint)
8946         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
8947         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
8948         (s390_auxv_parse, s390_read_description): Refactor as methods of
8949         s390_linux_nat_target.
8950         (_initialize_s390_nat): Adjust to C++ification.
8951
8952         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
8953         (the_sparc_linux_nat_target): New.
8954         (_initialize_sparc_linux_nat): Adjust to C++ification.
8955         * sparc-nat.c (sparc_fetch_inferior_registers)
8956         (sparc_store_inferior_registers): Remove target_ops parameter.
8957         * sparc-nat.h (sparc_fetch_inferior_registers)
8958         (sparc_store_inferior_registers): Remove target_ops parameter.
8959         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
8960         (the_sparc64_linux_nat_target): New.
8961         (_initialize_sparc64_linux_nat): Adjust to C++ification.
8962
8963         * spu-linux-nat.c (spu_linux_nat_target): New class.
8964         (the_spu_linux_nat_target): New.
8965         (spu_child_post_startup_inferior, spu_child_post_attach)
8966         (spu_child_wait, spu_fetch_inferior_registers)
8967         (spu_store_inferior_registers, spu_xfer_partial)
8968         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
8969         methods.
8970         (_initialize_spu_nat): Adjust to C++ification.
8971
8972         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
8973         (the_tilegx_linux_nat_target): New.
8974         (fetch_inferior_registers, store_inferior_registers):
8975         Refactor as methods.
8976         (_initialize_tile_linux_nat): Adjust to C++ification.
8977
8978         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
8979         (the_xtensa_linux_nat_target): New.
8980         (xtensa_linux_fetch_inferior_registers)
8981         (xtensa_linux_store_inferior_registers): Refactor as
8982         xtensa_linux_nat_target methods.
8983         (_initialize_xtensa_linux_nat): Adjust to C++ification.
8984
8985         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
8986         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
8987         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
8988         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
8989         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
8990         (fbsd_stopped_by_sw_breakpoint)
8991         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
8992         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
8993         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
8994         (fbsd_post_startup_inferior, fbsd_post_attach)
8995         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
8996         (fbsd_set_syscall_catchpoint)
8997         (super_xfer_partial, super_resume, super_wait)
8998         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
8999         (fbsd_handle_debug_trap): Remove target_ops parameter.
9000         (fbsd_nat_add_target): Delete.
9001         * fbsd-nat.h: Include "inf-ptrace.h".
9002         (fbsd_nat_add_target): Delete.
9003         (USE_SIGTRAP_SIGINFO): Define.
9004         (fbsd_nat_target): New class.
9005
9006         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9007         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9008         (amd64bsd_target): Delete.
9009         * amd64-bsd-nat.h: New file.
9010         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9011         "x86-bsd-nat.h".
9012         (amd64_fbsd_nat_target): New class.
9013         (the_amd64_fbsd_nat_target): New.
9014         (amd64fbsd_read_description): Refactor as method of
9015         amd64_fbsd_nat_target.
9016         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9017         (_initialize_amd64fbsd_nat): Adjust to C++ification.
9018         * amd64-nat.h (amd64bsd_target): Delete function declaration.
9019         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9020         (i386bsd_store_inferior_registers): Remove target_ops parameter.
9021         (i386bsd_target): Delete.
9022         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9023         (i386bsd_fetch_inferior_registers)
9024         (i386bsd_store_inferior_registers): Declare.
9025         (i386_bsd_nat_target): New class.
9026         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9027         (the_i386_fbsd_nat_target): New.
9028         (i386fbsd_resume, i386fbsd_read_description): Refactor as
9029         i386_fbsd_nat_target methods.
9030         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9031         (_initialize_i386fbsd_nat): Adjust to C++ification.
9032         * x86-bsd-nat.c (super_mourn_inferior): Delete.
9033         (x86bsd_mourn_inferior, x86bsd_target): Delete.
9034         (_initialize_x86_bsd_nat): Adjust to C++ification.
9035         * x86-bsd-nat.h: Include "x86-nat.h".
9036         (x86bsd_target): Delete declaration.
9037         (x86bsd_nat_target): New class.
9038
9039         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9040         (the_aarch64_fbsd_nat_target): New.
9041         (aarch64_fbsd_fetch_inferior_registers)
9042         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9043         aarch64_fbsd_nat_target.
9044         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9045         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9046         (the_alpha_bsd_nat_target): New.
9047         (alphabsd_fetch_inferior_registers)
9048         (alphabsd_store_inferior_registers): Refactor as
9049         alpha_bsd_nat_target methods.
9050         (_initialize_alphabsd_nat): Refactor as methods of
9051         alpha_bsd_nat_target.
9052         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9053         (the_amd64_nbsd_nat_target): New.
9054         (_initialize_amd64nbsd_nat): Adjust to C++ification.
9055         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9056         (the_amd64_obsd_nat_target): New.
9057         (_initialize_amd64obsd_nat): Adjust to C++ification.
9058         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9059         (the_arm_fbsd_nat_target): New.
9060         (arm_fbsd_fetch_inferior_registers)
9061         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9062         (_initialize_arm_fbsd_nat): Refactor as methods of
9063         arm_fbsd_nat_target.
9064         (_initialize_arm_fbsd_nat): Adjust to C++ification.
9065         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9066         (the_arm_netbsd_nat_target): New.
9067         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9068         arm_netbsd_nat_target.
9069         (_initialize_arm_netbsd_nat): Adjust to C++ification.
9070         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9071         (the_hppa_nbsd_nat_target): New.
9072         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9073         hppa_nbsd_nat_target methods.
9074         (_initialize_hppanbsd_nat): Adjust to C++ification.
9075         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9076         (the_hppa_obsd_nat_target): New.
9077         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9078         methods of hppa_obsd_nat_target.
9079         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
9080         add_target.
9081         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9082         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
9083         add_target.
9084         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9085         (_initialize_i386obsd_nat): Use add_target.
9086         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9087         (the_m68k_bsd_nat_target): New.
9088         (m68kbsd_fetch_inferior_registers)
9089         (m68kbsd_store_inferior_registers): Refactor as methods of
9090         m68k_bsd_nat_target.
9091         (_initialize_m68kbsd_nat): Adjust to C++ification.
9092         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9093         (the_mips_fbsd_nat_target): New.
9094         (mips_fbsd_fetch_inferior_registers)
9095         (mips_fbsd_store_inferior_registers): Refactor as methods of
9096         mips_fbsd_nat_target.
9097         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
9098         add_target.
9099         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9100         (the_mips_nbsd_nat_target): New.
9101         (mipsnbsd_fetch_inferior_registers)
9102         (mipsnbsd_store_inferior_registers): Refactor as methods of
9103         mips_nbsd_nat_target.
9104         (_initialize_mipsnbsd_nat): Adjust to C++ification.
9105         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9106         (the_mips64_obsd_nat_target): New.
9107         (mips64obsd_fetch_inferior_registers)
9108         (mips64obsd_store_inferior_registers): Refactor as methods of
9109         mips64_obsd_nat_target.
9110         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
9111         add_target.
9112         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9113         nbsd_nat_target.
9114         * nbsd-nat.h: Include "inf-ptrace.h".
9115         (nbsd_nat_target): New class.
9116         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9117         (obsd_wait): Refactor as methods of obsd_nat_target.
9118         (obsd_add_target): Delete.
9119         * obsd-nat.h: Include "inf-ptrace.h".
9120         (obsd_nat_target): New class.
9121         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9122         (the_ppc_fbsd_nat_target): New.
9123         (ppcfbsd_fetch_inferior_registers)
9124         (ppcfbsd_store_inferior_registers): Refactor as methods of
9125         ppc_fbsd_nat_target.
9126         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
9127         add_target.
9128         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9129         (the_ppc_nbsd_nat_target): New.
9130         (ppcnbsd_fetch_inferior_registers)
9131         (ppcnbsd_store_inferior_registers): Refactor as methods of
9132         ppc_nbsd_nat_target.
9133         (_initialize_ppcnbsd_nat): Adjust to C++ification.
9134         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9135         (the_ppc_obsd_nat_target): New.
9136         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9137         methods of ppc_obsd_nat_target.
9138         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
9139         add_target.
9140         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9141         (the_sh_nbsd_nat_target): New.
9142         (shnbsd_fetch_inferior_registers)
9143         (shnbsd_store_inferior_registers): Refactor as methods of
9144         sh_nbsd_nat_target.
9145         (_initialize_shnbsd_nat): Adjust to C++ification.
9146         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9147         (inf_ptrace_xfer_partial): Delete.
9148         (sparc_xfer_partial, sparc_target): Delete.
9149         * sparc-nat.h (sparc_fetch_inferior_registers)
9150         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9151         (sparc_target): Delete function declaration.
9152         (sparc_target): New template class.
9153         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9154         (_initialize_sparcnbsd_nat): Adjust to C++ification.
9155         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9156         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
9157         add_target.
9158         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9159         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9160         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9161         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
9162         add_target.
9163         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9164         (the_vax_bsd_nat_target): New.
9165         (vaxbsd_fetch_inferior_registers)
9166         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9167         methods.
9168         (_initialize_vaxbsd_nat): Adjust to C++ification.
9169
9170         * bsd-kvm.c (bsd_kvm_target): New class.
9171         (bsd_kvm_ops): Now a bsd_kvm_target.
9172         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9173         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9174         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9175         bsd_kvm_target.
9176         (bsd_kvm_return_one): Delete.
9177         (bsd_kvm_add_target): Adjust to C++ification.
9178
9179         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9180         (nto_procfs_target_procfs): New classes.
9181         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9182         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9183         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9184         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9185         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9186         (procfs_remove_hw_breakpoint, procfs_resume)
9187         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9188         (procfs_kill_inferior, procfs_store_registers)
9189         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9190         as methods of nto_procfs_target.
9191         (nto_procfs_ops): Now an nto_procfs_target_procfs.
9192         (nto_native_ops): Delete.
9193         (procfs_open, procfs_native_open): Delete.
9194         (nto_native_ops): Now an nto_procfs_target_native.
9195         (init_procfs_targets): Adjust to C++ification.
9196         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9197         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9198         Refactor as methods of nto_procfs_target.
9199
9200         * go32-nat.c (go32_nat_target): New class.
9201         (the_go32_nat_target): New.
9202         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9203         (go32_store_registers, go32_xfer_partial, go32_files_info)
9204         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9205         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9206         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9207         (go32_pid_to_str): Refactor as methods of go32_nat_target.
9208         (go32_target): Delete.
9209         (_initialize_go32_nat): Adjust to C++ification.
9210
9211         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9212         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9213         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9214         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9215         gnu_nat_target.
9216         (gnu_target): Delete.
9217         * gnu-nat.h (gnu_target): Delete.
9218         (gnu_nat_target): New class.
9219         * i386-gnu-nat.c (gnu_base_target): New.
9220         (i386_gnu_nat_target): New class.
9221         (the_i386_gnu_nat_target): New.
9222         (_initialize_i386gnu_nat): Adjust to C++ification.
9223
9224 2018-05-02  Pedro Alves  <palves@redhat.com>
9225
9226         * bfd-target.c (target_bfd_xclose): Rename to ...
9227         (target_bfd_close): ... this.
9228         (target_bfd_reopen): Adjust.
9229         * target.c (target_close): Remove references to to_xclose.
9230         * target.h (target_ops::to_xclose): Delete.
9231         (target_ops::to_close): Update comments.
9232
9233 2018-05-02  Pedro Alves  <palves@redhat.com>
9234
9235         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9236         "linux-nat.h".
9237         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9238         * inf-ptrace.c (inf_ptrace_register_u_offset)
9239         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9240         (inf_ptrace_store_register, inf_ptrace_store_registers)
9241         (inf_ptrace_trad_target): Move to ...
9242         * linux-nat-trad.c: ... this new file.
9243         * linux-nat-trad.h: New file.
9244         * linux-nat.c (linux_target_install_ops): Make extern.
9245         (linux_trad_target): Delete.
9246         * linux-nat.h (linux_trad_target): Delete declaration.
9247         (linux_target_install_ops): Declare.
9248         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9249         "linux-nat.h".
9250
9251 2018-05-02  Pedro Alves  <palves@redhat.com>
9252
9253         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9254         procfs_target/add_target here.
9255         * procfs.c (procfs_target): Make static.
9256         (_initialize_procfs): Call add_target here.
9257         * procfs.h (struct target_ops): Remove forward declaration.
9258         (procfs_target): Remove declaration.
9259         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9260
9261 2018-05-02  Pedro Alves  <palves@redhat.com>
9262
9263         * procfs.c (procfs_stopped_by_watchpoint)
9264         (procfs_insert_watchpoint, procfs_remove_watchpoint)
9265         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9266         Forward declare.
9267         (procfs_use_watchpoints): Delete, move contents...
9268         (procfs_target): ... here.
9269         * procfs.h (procfs_use_watchpoints): Delete declaration.
9270         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9271         procfs_use_watchpoints.
9272         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9273         procfs_use_watchpoints.
9274
9275 2018-05-02  Tom Tromey  <tom@tromey.com>
9276
9277         PR python/20084:
9278         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9279         and var_zuinteger_unlimited.
9280         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9281         and PARAM_ZUINTEGER_UNLIMITED.
9282         (set_parameter_value): Handle var_zuinteger and
9283         var_zuinteger_unlimited.
9284         (add_setshow_generic): Likewise.
9285         (parmpy_init): Likewise.
9286
9287 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
9288
9289         PR rust/23124
9290         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9291         pointer is not null before dereferencing it.
9292
9293 2018-04-30  Tom Tromey  <tom@tromey.com>
9294
9295         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9296         is_mi_like_p.
9297
9298 2018-04-30  Tom Tromey  <tom@tromey.com>
9299
9300         * breakpoint.c (mention): Remove use of is_mi_like_p.
9301         (print_mention_ranged_breakpoint): Likewise.
9302         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9303         of is_mi_like_p.
9304
9305 2018-04-30  Tom Tromey  <tom@tromey.com>
9306
9307         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9308
9309 2018-04-30  Tom Tromey  <tom@tromey.com>
9310
9311         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9312         (info_spu_event_command): Remove some uses of is_mi_like_p.
9313
9314 2018-04-30  Tom Tromey  <tom@tromey.com>
9315
9316         * python/py-framefilter.c (py_print_single_arg)
9317         (enumerate_locals, py_print_args, py_print_frame): Remove some
9318         uses of is_mi_like_p.
9319
9320 2018-04-30  Tom Tromey  <tom@tromey.com>
9321
9322         * ui-out.c: Update.
9323         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9324         * ui-out.h (ui_out::is_mi_like_p): Now const.
9325         (ui_out::do_is_mi_like_p): Now const.
9326         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9327
9328 2018-04-30  Tom Tromey  <tom@tromey.com>
9329
9330         * varobj.c (varobj_set_visualizer): Use new_reference.
9331         * python/python.c (gdbpy_decode_line): Use new_reference.
9332         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9333         new_reference.
9334
9335 2018-04-30  Tom Tromey  <tom@tromey.com>
9336
9337         * varobj.c (install_new_value): Use new_reference.
9338         * value.h (value_incref): Return void.  Swap intro comment with
9339         value_decref.
9340         * value.c (set_value_parent): Use new_reference.
9341         (value_incref): Return void.  Update intro comment.
9342         (release_value): Use new_reference.
9343         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9344
9345 2018-04-30  Tom Tromey  <tom@tromey.com>
9346
9347         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9348         * gdb_bfd.h (new_bfd_ref): Remove.
9349         (gdb_bfd_open): Update comment.
9350         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9351         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9352         (gdb_bfd_fdopenr): Use new_reference.
9353         * exec.c (exec_file_attach): Use new_reference.
9354
9355 2018-04-30  Tom Tromey  <tom@tromey.com>
9356
9357         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9358         method.
9359
9360 2018-04-30  Tom Tromey  <tom@tromey.com>
9361
9362         * jit.c (jit_read_code_entry): Use type_align.
9363         * i386-tdep.c (i386_gdbarch_init): Don't call
9364         set_gdbarch_long_long_align_bit.
9365         * gdbarch.sh: Remove long_long_align_bit.
9366         * gdbarch.c, gdbarch.h: Rebuild.
9367         * arc-tdep.c (arc_type_align): New function.
9368         (arc_gdbarch_init): Use arc_type_align.  Don't call
9369         set_gdbarch_long_long_align_bit.
9370
9371 2018-04-30  Tom Tromey  <tom@tromey.com>
9372
9373         * rust-lang.c (rust_type_alignment): Remove.
9374         (rust_composite_type): Use type_align.
9375
9376 2018-04-30  Tom Tromey  <tom@tromey.com>
9377
9378         * NEWS: Mention Type.align.
9379         * python/py-type.c (typy_get_alignof): New function.
9380         (type_object_getset): Add "alignof".
9381
9382 2018-04-30  Tom Tromey  <tom@tromey.com>
9383
9384         PR exp/17095:
9385         * NEWS: Update.
9386         * std-operator.def (UNOP_ALIGNOF): New operator.
9387         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9388         New.
9389         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9390         * c-lang.c (c_op_print_tab): Add alignof.
9391         * c-exp.y (ALIGNOF): New token.
9392         (exp): Add "ALIGNOF" production.
9393         (ident_tokens): Add _Alignof and alignof.
9394
9395 2018-04-30  Tom Tromey  <tom@tromey.com>
9396
9397         * i386-tdep.c (i386_type_align): New function.
9398         (i386_gdbarch_init): Update.
9399         * gdbarch.sh (type_align): New method.
9400         * gdbarch.c, gdbarch.h: Rebuild.
9401         * arch-utils.h (default_type_align): Declare.
9402         * arch-utils.c (default_type_align): New function.
9403         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9404         (struct type) <align_log2>: New field.
9405         <instance_flags>: Now a bitfield.
9406         (TYPE_RAW_ALIGN): New macro.
9407         (type_align, type_raw_align, set_type_align): Declare.
9408         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9409         functions.
9410         * dwarf2read.c (quirk_rust_enum): Set type alignment.
9411         (get_alignment, maybe_set_alignment): New functions.
9412         (read_structure_type, read_enumeration_type, read_array_type)
9413         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9414         (read_subrange_type, read_base_type): Set type alignment.
9415
9416 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
9417
9418         * dwarf2read.c (read_index_from_section): Use bool.
9419
9420 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
9421
9422         PR gdb/22950
9423         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9424         with #ifdef.
9425
9426 2018-04-29  John Reiser  <jreiser@BitWagon.com>
9427
9428         PR build/22873
9429         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9430         last step, and do it atomically.
9431
9432 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
9433
9434         * compile/compile-c-types.c (convert_int, convert_float):
9435         Update for C FE v1.
9436
9437 2018-04-27  Tom Tromey  <tom@tromey.com>
9438
9439         PR rust/22545:
9440         * rust-lang.c (rust_inclusive_range_type_p): New function.
9441         (rust_range): Handle inclusive ranges.
9442         (rust_compute_range): Likewise.
9443         * rust-exp.y (struct rust_op) <inclusive>: New field.
9444         (DOTDOTEQ): New constant.
9445         (range_expr): Add "..=" productions.
9446         (operator_tokens): Add "..=" token.
9447         (ast_range): Add "inclusive" parameter.
9448         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9449         ranges.
9450         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9451         bounds values.
9452         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9453         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9454         Update comments.
9455         * expprint.c (print_subexp_standard): Handle new bounds values.
9456         (dump_subexp_body_standard): Likewise.
9457
9458 2018-04-27  Tom Tromey  <tom@tromey.com>
9459
9460         * configure: Rebuild.
9461         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9462         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9463         "OVERRIDE".
9464         (class symbol_needs_eval_context): Likewise.
9465         * dwarf2read.c (mock_mapped_index::symbol_name_count)
9466         (mock_mapped_index::symbol_name_at): Use "override".  Remove
9467         "virtual".
9468         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9469         "override".
9470         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9471         * aarch64-tdep.c (instruction_reader::read): Use "override".
9472         (instruction_reader_test::read): Likewise.
9473         * arm-tdep.c (instruction_reader::read): Use "override".
9474         (instruction_reader_thumb::read): Likewise.
9475
9476 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
9477
9478         PR remote/9665
9479         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9480         instead of remote_send.
9481         (remote_send): Remove.
9482
9483 2018-04-26  Pedro Alves  <palves@redhat.com>
9484
9485         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9486         find_function_start_sal instead of find_pc_line.
9487
9488 2018-04-26  Pedro Alves  <palves@redhat.com>
9489
9490         * breakpoint.c (set_breakpoint_location_function): Handle
9491         mst_data_gnu_ifunc.
9492         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9493         * elfread.c (elf_symtab_read): Give data symbols with
9494         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9495         (elf_rel_plt_read): Update comment.
9496         * linespec.c (convert_linespec_to_sals): Handle
9497         mst_data_gnu_ifunc.
9498         (minsym_found): Handle mst_data_gnu_ifunc.
9499         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9500         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9501         * parse.c (find_minsym_type_and_address): Handle
9502         mst_data_gnu_ifunc.
9503         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9504         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9505         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9506         comment.
9507         <mst_data_gnu_ifunc>: New enumerator.
9508
9509 2018-04-26  Pedro Alves  <palves@redhat.com>
9510
9511         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9512         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
9513         'want_trampoline' parameter by a lookup_msym_prefer parameter.
9514         Handle it.
9515         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9516         (lookup_minimal_symbol_by_pc): Adjust.
9517         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9518         (lookup_solib_trampoline_symbol_by_pc): Adjust.
9519         * minsyms.h (lookup_msym_prefer): New enum.
9520         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9521         parameter by a lookup_msym_prefer parameter.
9522
9523 2018-04-26  Pedro Alves  <palves@redhat.com>
9524
9525         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9526         ends in "@plt" instead of looking at the symbol's section.
9527
9528 2018-04-26  Pedro Alves  <palves@redhat.com>
9529
9530         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
9531         all references.
9532         (find_pc_partial_function_gnu_ifunc): Rename to ...
9533         (find_pc_partial_function): ... this, and remove references to
9534         'is_gnu_ifunc_p'.
9535         (find_pc_partial_function): Delete old implementation.
9536         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9537
9538 2018-04-26  Pedro Alves  <palves@redhat.com>
9539
9540         * linespec.c (struct bound_minimal_symbol_search_key): New.
9541         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
9542         skip first line if we found a GNU ifunc minimal symbol by name.
9543         (compare_msymbols): Change parameters to work with a destructured
9544         lhs minsym.
9545         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9546         functions.
9547
9548 2018-04-26  Pedro Alves  <palves@redhat.com>
9549
9550         * breakpoint.c (set_breakpoint_location_function): Don't resolve
9551         ifunc targets here.  Instead, if we have an ifunc minsym, use its
9552         address/name.
9553         (add_location_to_breakpoint): Store the minsym and the objfile in
9554         the breakpoint location.
9555         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9556         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9557         Record the minsym in the sal.
9558         * symtab.h (symtab_and_line) <msymbol>: New field.
9559
9560 2018-04-26  Pedro Alves  <palves@redhat.com>
9561
9562         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9563         unless we actually resolved the ifunc.
9564
9565 2018-04-26  Pedro Alves  <palves@redhat.com>
9566
9567         * c-exp.y (variable production): Prefer ifunc minsyms over
9568         regular function symbols.
9569         * symtab.c (find_gnu_ifunc): New function.
9570         * minsyms.h (lookup_msym_prefer): New enum.
9571         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9572         parameter by a lookup_msym_prefer parameter.
9573         * symtab.h (find_gnu_ifunc): New declaration.
9574
9575 2018-04-26  Pedro Alves  <palves@redhat.com>
9576
9577         * blockframe.c (find_gnu_ifunc_target_type): New function.
9578         (find_function_type): New.
9579         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9580         return a value with a memory address.
9581         (eval_call): For calls to GNU ifunc functions, try to find the
9582         type of the target function from the type that the resolver
9583         returns.
9584         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9585         symbols.
9586         * infcall.c (find_function_return_type): Delete.
9587         (find_function_addr): Add 'function_type' parameter.  For calls to
9588         GNU ifunc functions, try to find the type of the target function
9589         from the type that the resolver returns, and return it via
9590         FUNCTION_TYPE.
9591         (call_function_by_hand_dummy): Adjust to use the function type
9592         returned by find_function_addr.
9593         (find_function_addr): Add 'function_type' parameter and move
9594         description here.
9595         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9596         declarations.
9597
9598 2018-04-26  Pedro Alves  <palves@redhat.com>
9599
9600         * c-exp.y (variable production): Skip finding an alias for ifunc
9601         symbols.
9602
9603 2018-04-26  Pedro Alves  <palves@redhat.com>
9604
9605         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9606
9607 2018-04-25  Pedro Alves  <palves@redhat.com>
9608
9609         * infcmd.c (kill_command): Print the pid as string, not the whole
9610         thread's ptid.  Add comment.  s/has been killed/killed/ in output
9611         message.
9612         * remote.c (remote_detach_1): Print the pid as string, not the
9613         whole thread's ptid.
9614
9615 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9616             Sergio Durigan Junior  <sergiodj@redhat.com>
9617             Pedro Alves  <palves@redhat.com>
9618
9619         * infcmd.c (kill_command): Print message when inferior has
9620         been killed.
9621         * inferior.c (print_inferior_events): Remove 'static'.  Set as
9622         '1'.
9623         (add_inferior): Improve message printed when
9624         'print_inferior_events' is on.
9625         (exit_inferior): Remove message printed when
9626         'print_inferior_events' is on.
9627         (detach_inferior): Improve message printed when
9628         'print_inferior_events' is on.
9629         (initialize_inferiors): Use 'add_inferior_silent' to set
9630         'current_inferior_'.
9631         * inferior.h (print_inferior_events): Declare here as
9632         'extern'.
9633         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9634         '[Detaching...]' messages when 'print_inferior_events' is on.
9635         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
9636         as prefix/suffix for messages.  Remove periods.  Fix erroneous
9637         'Detaching after fork from child...', replace it by '... from
9638         parent...'.
9639         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9640         prefix/suffix when printing 'Detaching...' messages.  Print
9641         them when 'print_inferior_events' is on.
9642         * remote.c (remote_detach_1): Print message when detaching
9643         from inferior and '!is_fork_parent'.
9644
9645 2018-04-24  Tom Tromey  <tom@tromey.com>
9646
9647         * cli-out.h: Reindent.
9648
9649 2018-04-24  Tom Tromey  <tom@tromey.com>
9650
9651         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9652         (cli_ui_out::do_field_string): Use fputs_filtered.
9653         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9654
9655 2018-04-23  Tom Tromey  <tom@tromey.com>
9656
9657         * guile/scm-frame.c (gdbscm_frame_read_var): Use
9658         gdb::unique_xmalloc_ptr.
9659
9660 2018-04-23  Tom Tromey  <tom@tromey.com>
9661
9662         * configure: Rebuild.
9663
9664 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
9665
9666         PR gdb/23095
9667         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9668         prepare_for_testing.  Set normal_bp to r_debug_state if target
9669         is bsd.
9670
9671 2018-04-21  Pedro Alves  <palves@redhat.com>
9672             Rajendra SY  <rajendra.sy@gmail.com>
9673
9674         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9675         * remote.c (extended_remote_attach): In all-stop mode, mark the
9676         thread as executing.
9677
9678 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9679
9680         * thread.c (thread_apply_all_command): Fix comment.
9681         (thread_command): Fix comment.
9682
9683 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
9684
9685         * common/tdesc.h (tdesc_create_feature): Remove xml filename
9686         parameter.
9687         * features/aarch64-core.c (create_feature_aarch64_core):
9688         Regenerate.
9689         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9690         Likewise.
9691         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9692         Likewise.
9693         * features/i386/32bit-avx512.c
9694         (create_feature_i386_32bit_avx512): Likewise.
9695         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9696         Likewise.
9697         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9698         Likewise.
9699         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9700         Likewise.
9701         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9702         Likewise.
9703         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9704         Likewise.
9705         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9706         Likewise.
9707         * features/i386/64bit-avx512.c
9708         (create_feature_i386_64bit_avx512): Likewise.
9709         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9710         Likewise.
9711         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9712         Likewise.
9713         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9714         Likewise.
9715         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9716         Likewise.
9717         * features/i386/64bit-segments.c
9718         (create_feature_i386_64bit_segments): Likewise.
9719         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9720         Likewise.
9721         * features/i386/x32-core.c
9722         (create_feature_i386_x32_core): Likewise.
9723         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9724         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9725         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9726         * target-descriptions.c: In generated code, don't pass xml
9727         filename.
9728
9729 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9730
9731         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9732         (print_xml_feature::visit_post): Likewise.
9733         (print_xml_feature::visit): Likewise.
9734         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9735         (print_xml_feature): Add new class.
9736         * regformats/regdat.sh: Null xmltarget on feature targets.
9737         * target-descriptions.c (struct target_desc): Add xmltarget.
9738         (maintenance_check_tdesc_xml_convert): Add unittest function.
9739         (tdesc_get_features_xml): Add function to get xml.
9740         (maintenance_check_xml_descriptions): Test xml generation.
9741         * xml-tdesc.c (string_read_description_xml): Add function.
9742         * xml-tdesc.h (string_read_description_xml): Add declaration.
9743
9744 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9745
9746         * features/Makefile: Add feature marker to targets with new style
9747         target descriptions.
9748         * regformats/aarch64.dat: Regenerate.
9749         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9750         * regformats/i386/amd64-avx-linux.dat: Likewise.
9751         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9752         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9753         * regformats/i386/amd64-linux.dat: Likewise.
9754         * regformats/i386/amd64-mpx-linux.dat: Likewise.
9755         * regformats/i386/amd64.dat: Likewise.
9756         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9757         * regformats/i386/i386-avx-linux.dat: Likewise.
9758         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9759         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9760         * regformats/i386/i386-linux.dat: Likewise.
9761         * regformats/i386/i386-mmx-linux.dat: Likewise.
9762         * regformats/i386/i386-mpx-linux.dat: Likewise.
9763         * regformats/i386/i386.dat: Likewise.
9764         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9765         * regformats/i386/x32-avx-linux.dat: Likewise.
9766         * regformats/i386/x32-linux.dat: Likewise.
9767         * regformats/tic6x-c62x-linux.dat: Likewise.
9768         * regformats/tic6x-c64x-linux.dat: Likewise.
9769         * regformats/tic6x-c64xp-linux.dat: Likewise.
9770         * regformats/regdat.sh: Parse feature marker.
9771
9772 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9773
9774         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9775         (tdesc_osabi_name): Likewise.
9776         * target-descriptions.c (tdesc_architecture_name): Add new
9777         function.
9778         (tdesc_osabi_name): Likewise.
9779
9780 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9781
9782         * common/tdesc.c (tdesc_predefined_type): Move to here.
9783         (tdesc_named_type): Likewise.
9784         (tdesc_create_vector): Likewise.
9785         (tdesc_create_struct): Likewise.
9786         (tdesc_set_struct_size): Likewise.
9787         (tdesc_create_union): Likewise.
9788         (tdesc_create_flags): Likewise.
9789         (tdesc_create_enum): Likewise.
9790         (tdesc_add_field): Likewise.
9791         (tdesc_add_typed_bitfield): Likewise.
9792         (tdesc_add_bitfield): Likewise.
9793         (tdesc_add_flag): Likewise.
9794         (tdesc_add_enum_value): Likewise.
9795         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9796         (struct tdesc_type_vector): Likewise.
9797         (struct tdesc_type_field): Likewise.
9798         (struct tdesc_type_with_fields): Likewise.
9799         (tdesc_create_enum): Add declaration.
9800         (tdesc_add_typed_bitfield): Likewise.
9801         (tdesc_add_enum_value): Likewise.
9802         * target-descriptions.c (tdesc_type_field): Move from here.
9803         (tdesc_type_builtin): Likewise.
9804         (tdesc_type_vector): Likewise.
9805         (tdesc_type_with_fields): Likewise.
9806         (tdesc_predefined_types): Likewise.
9807         (tdesc_named_type): Likewise.
9808         (tdesc_create_vector): Likewise.
9809         (tdesc_create_struct): Likewise.
9810         (tdesc_set_struct_size): Likewise.
9811         (tdesc_create_union): Likewise.
9812         (tdesc_create_flags): Likewise.
9813         (tdesc_create_enum): Likewise.
9814         (tdesc_add_field): Likewise.
9815         (tdesc_add_typed_bitfield): Likewise.
9816         (tdesc_add_bitfield): Likewise.
9817         (tdesc_add_flag): Likewise.
9818         (tdesc_add_enum_value): Likewise.
9819         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9820         (tdesc_add_typed_bitfield): Likewise.
9821         (tdesc_add_enum_value): Likewise.
9822
9823 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9824
9825         * common/tdesc.c (tdesc_feature::accept): Move to here.
9826         (tdesc_feature::operator==): Likewise.
9827         (tdesc_create_reg): Likewise.
9828         * common/tdesc.h (tdesc_type_kind): Likewise.
9829         (struct tdesc_type): Likewise.
9830         (struct tdesc_feature): Likewise.
9831         * regformats/regdat.sh: Create a feature.
9832         * target-descriptions.c (tdesc_type_kind): Move from here.
9833         (tdesc_type): Likewise.
9834         (tdesc_type_up): Likewise.
9835         (tdesc_feature): Likewise.
9836         (tdesc_create_reg): Likewise.
9837
9838 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9839
9840         * Makefile.in: Add arch/tdesc.c
9841         * common/tdesc.c: New file.
9842         * common/tdesc.h (tdesc_element_visitor): Move to here.
9843         (tdesc_element): Likewise.
9844         (tdesc_reg): Likewise.
9845         (tdesc_reg_up): Likewise.
9846         * regformats/regdef.h (reg): Add offset to constructors.
9847         * target-descriptions.c (tdesc_element_visitor): Move from here.
9848         (tdesc_element): Likewise.
9849         (tdesc_reg): Likewise.
9850         (tdesc_reg_up): Likewise.
9851
9852 2018-04-17  Tom Tromey  <tom@tromey.com>
9853
9854         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9855         discriminant field.
9856
9857 2018-04-17  Tom Tromey  <tom@tromey.com>
9858
9859         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9860
9861 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9862
9863         * symtab.c (print_symbol_info): Skip printing filename and line
9864         number when `last' is NULL.
9865         (symtab_symbol_info): Use empty string instead of NULL for first
9866         invocation of print_symbol_info.
9867         (rbreak_command): Pass NULL to `last' parameter of
9868         print_symbol_info.
9869
9870 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
9871
9872         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9873         instead of nullptr.
9874
9875 2018-04-16  Pedro Alves  <palves@redhat.com>
9876
9877         * MAINTAINERS (sh): Remove.
9878         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9879         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9880         (ALLDEPFILES): Remove sh64-tdep.c.
9881         * NEWS: Mentions that support for SH-5/SH64 is removed.
9882         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9883         (sh*-*-openbsd*): Ditto.
9884         (sh64-*-elf*): Remove.
9885         (sh*): Remove.
9886         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
9887         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
9888         * sh-tdep.c: No longer include "sh64-tdep.h".
9889         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
9890         * sh64-tdep.c, sh64-tdep.h: Remove files.
9891
9892 2018-04-16  Pedro Alves  <palves@redhat.com>
9893
9894         * MAINTAINERS: Remove m88k.
9895         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
9896         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
9897         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
9898         * NEWS: Mention that support for m88k was removed.
9899         * configure.host (m88*-*-*): Remove support.
9900         * configure.nat (m88k-*-*): Remove support.
9901         * configure.tgt (m88*-*-openbsd*): Remove.
9902         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
9903
9904 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
9905
9906         * configure.tgt (x86_tobjs): New variable.
9907         (amd64_tobjs, i386_tobjs): Use it.
9908
9909 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9910
9911         * symtab.c (print_symbol_info): Precede the symbol definition by
9912         the line number when available.
9913         * NEWS: Advertise this enhancement.
9914
9915 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9916
9917         * NEWS (New options): announce set/show record btrace cpu.
9918         * btrace.c: Include record-btrace.h.
9919         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
9920         the vendor is unknown.
9921         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
9922         Maybe overwrite the btrace configuration's cpu.
9923         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
9924         (btrace_fetch): Add cpu parameter.  Update callers.
9925         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
9926         Maybe overwrite the btrace configuration's cpu.  Skip enabling
9927         errata workarounds if the vendor is unknown.
9928         * python/py-record-btrace.c: Include record-btrace.h.
9929         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
9930         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
9931         * record-btrace.c (record_btrace_cpu_state_kind): New.
9932         (record_btrace_cpu): New.
9933         (set_record_btrace_cpu_cmdlist): New.
9934         (record_btrace_get_cpu): New.
9935         (require_btrace_thread, record_btrace_info)
9936         (record_btrace_resume_thread): Call record_btrace_get_cpu.
9937         (cmd_set_record_btrace_cpu_none): New.
9938         (cmd_set_record_btrace_cpu_auto): New.
9939         (cmd_set_record_btrace_cpu): New.
9940         (cmd_show_record_btrace_cpu): New.
9941         (_initialize_record_btrace): Initialize set/show record btrace cpu
9942         commands.
9943         * record-btrace.h (record_btrace_get_cpu): New.
9944
9945 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9946
9947         * record.c (set_record_command): Fix typo in message.
9948
9949 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9950
9951         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
9952
9953 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
9954
9955         * infrun.c (process_event_stop_test): Call
9956         gdbarch_in_indirect_branch_thunk.
9957         * gdbarch.sh (in_indirect_branch_thunk): New.
9958         * gdbarch.c: Regenerated.
9959         * gdbarch.h: Regenerated.
9960         * x86-tdep.h: New.
9961         * x86-tdep.c: New.
9962         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
9963         (HFILES_NO_SRCDIR): Add x86-tdep.h.
9964         (ALLDEPFILES): Add x86-tdep.c.
9965         * arch-utils.h (default_in_indirect_branch_thunk): New.
9966         * arch-utils.c (default_in_indirect_branch_thunk): New.
9967         * i386-tdep: Include x86-tdep.h.
9968         (i386_in_indirect_branch_thunk): New.
9969         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
9970         function.
9971         * amd64-tdep: Include x86-tdep.h.
9972         (amd64_in_indirect_branch_thunk): New.
9973         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
9974
9975 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9976
9977         PR gdb/23053
9978         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
9979         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
9980         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
9981         regression.
9982
9983 2018-04-12  Tom Tromey  <tom@tromey.com>
9984
9985         * rust-lang.c (rust_print_struct_def): Remove univariant code.
9986         (rust_evaluate_subexp): Likewise.
9987
9988 2018-04-12  Pedro Alves  <palves@redhat.com>
9989
9990         * procfs.c (procfs_detach): Make forward declaration's prototype
9991         match definition's protototype.
9992         (proc_get_LDT_entry): Remove stale do_cleanups call.
9993
9994 2018-04-12  Pedro Alves  <palves@redhat.com>
9995
9996         * target.h (target_ops::to_has_exited): Delete.
9997         (target_has_exited): Delete.
9998         * target-delegates.c: Regenerate.
9999
10000 2018-04-11  Pedro Alves  <palves@redhat.com>
10001
10002         * target.c (fileio_fh_t::t): Add comment.
10003         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10004         (target_fileio_close): Handle a NULL target.
10005         (invalidate_fileio_fh): New.
10006         (target_close): Call it.
10007         * remote.c (remote_hostio_send_command): No longer check whether
10008         remote_desc is open.
10009
10010 2018-04-11  Pedro Alves  <palves@redhat.com>
10011
10012         * target.c (fileio_fh_t): Make it a named struct instead of a
10013         typedef.
10014         (fileio_fh_t::is_closed): New method.
10015         (DEF_VEC_O (fileio_fh_t)): Remove.
10016         (fileio_fhandles): Now a std::vector.
10017         (is_closed_fileio_fh): Delete.
10018         (acquire_fileio_fd): Adjust.  Rename parameters.
10019         (release_fileio_fd): Adjust.
10020         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10021         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10022         (target_fileio_close): Adjust.
10023
10024 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
10025
10026         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10027         index.
10028
10029 2018-04-10  Pedro Alves  <palves@redhat.com>
10030
10031         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10032         (scoped_finish_thread_state): New class.
10033         * infcmd.c (run_command_1): Use it instead of finish_thread_state
10034         cleanup.
10035         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10036         (fetch_inferior_event, normal_stop): Likewise.
10037         * thread.c (finish_thread_state_cleanup): Delete.
10038
10039 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10040             Pedro Alves  <palves@redhat.com>
10041
10042         * value.c: Include "selftest.h" and "common/array-view.h".
10043         (struct range) <operator ==>: New.
10044         (test_ranges_contain): New.
10045         (check_ranges_vector): New.
10046         (test_insert_into_bit_range_vector): New.
10047         (_initialize_values): Register selftests.
10048         * common/array-view.h (operator==, operator!=): New.
10049
10050 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10051
10052         * common/gdb_vecs.h (unordered_remove): Add overload that takes
10053         an iterator.
10054         * inline-frame.c: Include <algorithm>.
10055         (struct inline_state): Add constructor.
10056         (inline_state_s): Remove.
10057         (DEF_VEC_O(inline_state_s)): Remove.
10058         (inline_states): Change type to std::vector.
10059         (find_inline_frame_state): Adjust to std::vector.
10060         (allocate_inline_frame_state): Remove.
10061         (clear_inline_frame_state): Adjust to std::vector.
10062         (skip_inline_frames): Adjust to std::vector.
10063
10064 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10065
10066         * tracepoint.h (struct trace_state_variable): Add constructor.
10067         <name>: Change type to std::string.
10068         * tracepoint.c (tsv_s): Remove.
10069         (DEF_VEC_O(tsv_s)): Remove.
10070         (tvariables): Change to std::vector.
10071         (create_trace_state_variable): Adjust to std::vector.
10072         (find_trace_state_variable): Likewise.
10073         (find_trace_state_variable_by_number): Likewise.
10074         (delete_trace_state_variable): Likewise.
10075         (trace_variable_command): Adjust to std::string.
10076         (delete_trace_variable_command): Likewise.
10077         (tvariables_info_1): Adjust to std::vector.
10078         (save_trace_state_variables): Likewise.
10079         (start_tracing): Likewise.
10080         (merge_uploaded_trace_state_variables): Adjust to std::vector
10081         and std::string.
10082         * target.h (struct target_ops)
10083         <to_download_trace_state_variable>: Pass reference to
10084         trace_state_variable.
10085         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10086         * target-delegates.c: Re-generate.
10087         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10088         (mi_tsv_deleted): Likewise.
10089         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10090         * remote.c (remote_download_trace_state_variable): Change
10091         pointer to reference and adjust.
10092         * make-target-delegates (parse_argtypes): Handle references.
10093         (write_function_header): Likewise.
10094         (munge_type): Likewise.
10095
10096 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10097
10098         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10099         string_view-selftests.c.
10100         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10101         testsuite.
10102         * unittests/basic_string_view/cons/char/1.cc: Likewise.
10103         * unittests/basic_string_view/cons/char/2.cc: Likewise.
10104         * unittests/basic_string_view/cons/char/3.cc: Likewise.
10105         * unittests/basic_string_view/element_access/char/1.cc:
10106         Likewise.
10107         * unittests/basic_string_view/element_access/char/empty.cc:
10108         Likewise.
10109         * unittests/basic_string_view/element_access/char/front_back.cc:
10110         Likewise.
10111         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10112         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10113         Likewise.
10114         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10115         Likewise.
10116         * unittests/basic_string_view/modifiers/swap/char/1.cc:
10117         Likewise.
10118         * unittests/basic_string_view/operations/compare/char/1.cc:
10119         Likewise.
10120         * unittests/basic_string_view/operations/compare/char/13650.cc:
10121         Likewise.
10122         * unittests/basic_string_view/operations/copy/char/1.cc:
10123         Likewise.
10124         * unittests/basic_string_view/operations/data/char/1.cc:
10125         Likewise.
10126         * unittests/basic_string_view/operations/find/char/1.cc:
10127         Likewise.
10128         * unittests/basic_string_view/operations/find/char/2.cc:
10129         Likewise.
10130         * unittests/basic_string_view/operations/find/char/3.cc:
10131         Likewise.
10132         * unittests/basic_string_view/operations/find/char/4.cc:
10133         Likewise.
10134         * unittests/basic_string_view/operations/rfind/char/1.cc:
10135         Likewise.
10136         * unittests/basic_string_view/operations/rfind/char/2.cc:
10137         Likewise.
10138         * unittests/basic_string_view/operations/rfind/char/3.cc:
10139         Likewise.
10140         * unittests/basic_string_view/operations/substr/char/1.cc:
10141         Likewise.
10142         * unittests/basic_string_view/operators/char/2.cc: Likewise.
10143         * unittests/string_view-selftests.c: New file.
10144
10145 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10146
10147         * unittests/basic_string_view/capacity/1.cc: New file.
10148         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10149         * unittests/basic_string_view/cons/char/1.cc: New file.
10150         * unittests/basic_string_view/cons/char/2.cc: New file.
10151         * unittests/basic_string_view/cons/char/3.cc: New file.
10152         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10153         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10154         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10155         * unittests/basic_string_view/element_access/char/1.cc: New file.
10156         * unittests/basic_string_view/element_access/char/2.cc: New file.
10157         * unittests/basic_string_view/element_access/char/empty.cc: New file.
10158         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10159         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10160         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10161         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10162         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10163         * unittests/basic_string_view/include.cc: New file.
10164         * unittests/basic_string_view/inserters/char/1.cc: New file.
10165         * unittests/basic_string_view/inserters/char/2.cc: New file.
10166         * unittests/basic_string_view/inserters/char/3.cc: New file.
10167         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10168         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10169         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10170         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10171         * unittests/basic_string_view/literals/types.cc: New file.
10172         * unittests/basic_string_view/literals/values.cc: New file.
10173         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10174         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10175         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10176         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10177         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10178         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10179         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10180         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10181         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10182         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10183         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10184         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10185         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10186         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10187         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10188         * unittests/basic_string_view/operations/data/char/1.cc: New file.
10189         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10190         * unittests/basic_string_view/operations/find/char/1.cc: New file.
10191         * unittests/basic_string_view/operations/find/char/2.cc: New file.
10192         * unittests/basic_string_view/operations/find/char/3.cc: New file.
10193         * unittests/basic_string_view/operations/find/char/4.cc: New file.
10194         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10195         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10196         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10197         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10198         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10199         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10200         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10201         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10202         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10203         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10204         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10205         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10206         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10207         * unittests/basic_string_view/operators/char/2.cc: New file.
10208         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10209         * unittests/basic_string_view/range_access/char/1.cc: New file.
10210         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10211         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10212         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10213         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10214         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10215         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10216         * unittests/basic_string_view/requirements/typedefs.cc: New file.
10217         * unittests/basic_string_view/typedefs.cc: New file.
10218         * unittests/basic_string_view/types/1.cc: New file.
10219
10220 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10221
10222         * common/gdb_string_view.h: Remove libstdc++ implementation
10223         details, adjust to gdb reality.
10224         * common/gdb_string_view.tcc: Likewise.
10225         * cli/cli-script.c (struct string_view): Remove.
10226         (user_args) <m_args>: Change element type to gdb::string_view.
10227         (user_args::insert_args): Adjust.
10228
10229 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10230
10231         * common/gdb_string_view.h: New file.
10232         * common/gdb_string_view.tcc: New file.
10233
10234 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10235
10236         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10237         * configure: Re-generate.
10238
10239 2018-04-09  Pedro Alves  <palves@redhat.com>
10240
10241         * gdbarch.sh: Include "observable.h" instead of "observer.h".
10242         (set_target_gdbarch): Call
10243         gdb::observers::architecture_changed.notify instead of
10244         observer_notify_architecture_changed.
10245
10246 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10247
10248         * tracepoint.c (struct current_traceframe_cleanup): Remove.
10249         (do_restore_current_traceframe_cleanup): Remove.
10250         (restore_current_traceframe_cleanup_dtor): Remove.
10251         (make_cleanup_restore_current_traceframe): Remove.
10252         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10253         New.
10254         * tracepoint.h (struct scoped_restore_current_traceframe): New.
10255         * infrun.c (fetch_inferior_event): Use
10256         scoped_restore_current_traceframe.
10257
10258 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10259
10260         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10261         Remove.
10262         <n_allocated_type_units>: Remove.
10263         <all_type_units>: Change to std::vector.
10264         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10265         to std::vector change.
10266         (dwarf2_per_objfile::get_cutu): Likewise.
10267         (dwarf2_per_objfile::get_tu): Likewise.
10268         (create_signatured_type_table_from_index): Likewise.
10269         (create_signatured_type_table_from_debug_names): Likewise.
10270         (dw2_symtab_iter_next): Likewise.
10271         (dw2_print_stats): Likewise.
10272         (dw2_expand_all_symtabs): Likewise.
10273         (dw2_expand_marked_cus): Likewise.
10274         (dw2_debug_names_iterator::next): Likewise.
10275         (dwarf2_initialize_objfile): Likewise.
10276         (add_signatured_type_cu_to_table): Likewise.
10277         (create_all_type_units): Likewise.
10278         (add_type_unit): Likewise.
10279         (struct tu_abbrev_offset): Add constructor.
10280         (build_type_psymtabs_1): Adjust to std::vector change.
10281         (print_tu_stats): Likewise.
10282         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10283         (write_debug_names): Likewise.
10284
10285 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10286
10287         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10288         Make an std::vector.
10289         <n_comp_units>: Remove.
10290         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10291         to std::vector change.
10292         (dwarf2_per_objfile::get_cutu): Likewise.
10293         (dwarf2_per_objfile::get_cu): Likewise.
10294         (create_cus_from_index): Likewise.
10295         (create_addrmap_from_index): Likewise.
10296         (create_addrmap_from_aranges): Likewise.
10297         (dwarf2_read_index): Likewise.
10298         (dw2_find_last_source_symtab): Likewise.
10299         (dw2_map_symtabs_matching_filename): Likewise.
10300         (dw2_symtab_iter_next): Likewise.
10301         (dw2_print_stats): Likewise.
10302         (dw2_expand_all_symtabs): Likewise.
10303         (dw2_expand_symtabs_with_fullname): Likewise.
10304         (dw2_expand_marked_cus): Likewise.
10305         (dw2_map_symbol_filenames): Likewise.
10306         (create_cus_from_debug_names): Likewise.
10307         (dwarf2_read_debug_names): Likewise.
10308         (dw2_debug_names_iterator::next): Likewise.
10309         (dwarf2_initialize_objfile): Likewise.
10310         (set_partial_user): Likewise.
10311         (dwarf2_build_psymtabs_hard): Likewise.
10312         (read_comp_units_from_section): Remove arguments, adjust to
10313         std::vector change.
10314         (create_all_comp_units): Adjust to std::vector and
10315         read_comp_units_from_section changes.
10316         (dwarf2_find_containing_comp_unit): Adjust to std::vector
10317         change.
10318         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10319         (psyms_seen_size): Likewise.
10320         (write_gdbindex): Likewise.
10321         (write_debug_names): Likewise.
10322
10323 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10324
10325         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10326         with dwarf2_per_objfile.
10327         (create_cus_from_index): Likewise.
10328         (create_signatured_type_table_from_index): Likewise.
10329         (dwarf2_read_index): Likewise.
10330         (dwarf2_initialize_objfile): Likewise.
10331         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
10332         per_cu rather than get_dwarf2_per_objfile.
10333
10334 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10335
10336         * dwarf2read.h (struct signatured_type): Forward declare.
10337         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10338         New methods.
10339         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10340         (dw2_get_cutu): ...this.
10341         (dwarf2_per_objfile::get_cu): Rename from...
10342         (dw2_get_cu): ...this.
10343         (dwarf2_per_objfile::get_tu): New.
10344         (create_addrmap_from_index): Adjust.
10345         (create_addrmap_from_aranges): Adjust.
10346         (dw2_find_last_source_symtab): Adjust.
10347         (dw2_map_symtabs_matching_filename): Adjust.
10348         (dw2_symtab_iter_next): Adjust.
10349         (dw2_print_stats): Adjust.
10350         (dw2_expand_all_symtabs): Adjust.
10351         (dw2_expand_symtabs_with_fullname): Adjust.
10352         (dw2_expand_marked_cus): Adjust.
10353         (dw_expand_symtabs_matching_file_matcher): Adjust.
10354         (dw2_map_symbol_filenames): Adjust.
10355         (dw2_debug_names_iterator::next): Adjust.
10356         (dwarf2_initialize_objfile): Adjust.
10357         (set_partial_user): Adjust.
10358         (dwarf2_build_psymtabs_hard): Adjust.
10359
10360 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10361
10362         * dwarf2read.c (create_signatured_type_table_from_debug_names):
10363         Remove unused variables.
10364         (dw2_map_symtabs_matching_filename): Likewise.
10365         (dwarf2_record_block_ranges): Likewise.
10366         (dwarf2_read_addr_index): Likewise.
10367         (follow_die_offset): Likewise.
10368
10369 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10370
10371         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10372         to symbol_file_add_main.
10373
10374 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10375
10376         PR mi/22299
10377         * mi/mi-console.c (do_fputc_async_safe): New.
10378         (mi_console_file::write_async_safe): New.
10379         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10380         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10381         New.
10382         * ui-file.c (ui_file::putstrn): Adjust call to
10383         fputstrn_unfiltered.
10384         * utils.c (printchar): Replace do_fputs and do_fprintf
10385         parameters by do_fputc.
10386         (fputstr_filtered): Adjust call to printchar.
10387         (fputstr_unfiltered): Likewise.
10388         (fputstrn_filtered): Likewise.
10389         (fputstrn_unfiltered): Add do_fputc parameter, pass to
10390         printchar.
10391         * utils.h (do_fputc_ftype): New typedef.
10392         (fputstrn_unfiltered): Add do_fputc parameter.
10393
10394 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10395
10396         * regformats/i386/i386-avx.dat: Remove.
10397
10398 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10399
10400         PR gdb/22979
10401         * amd64-tdep.c (amd64_none_init_abi): New function.
10402         (amd64_x32_none_init_abi): New function.
10403         (_initialize_amd64_tdep): Register handlers for x86-64 and
10404         x64_32 with GDB_OSABI_NONE.
10405         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10406         GDB_OSABI_NONE osabi.
10407
10408 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10409
10410         PR gdb/22980
10411         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10412         GDB_OSABI_NONE.
10413         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10414         * osabi.c (gdb_osabi_names): Add "unknown" entry.
10415
10416 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10417
10418         * common/byte-vector.h (char_vector): New type.
10419         * target.h (target_read_alloc): Return
10420         gdb::optional<byte_vector>.
10421         (target_read_stralloc): Return gdb::optional<char_vector>.
10422         (target_get_osdata): Return gdb::optional<char_vector>.
10423         * target.c (target_read_alloc_1): Templatize.  Replacement
10424         manual memory management with vector.
10425         (target_read_alloc): Change return type, adjust.
10426         (target_read_stralloc): Change return type, adjust.
10427         (target_get_osdata): Change return type, adjust.
10428         * auxv.c (struct auxv_info) <length>: Remove.
10429         <data>: Change type to gdb::optional<byte_vector>.
10430         (auxv_inferior_data_cleanup): Free auxv_info with delete.
10431         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10432         (target_auxv_search): Adjust.
10433         (fprint_target_auxv): Adjust.
10434         * avr-tdep.c (avr_io_reg_read_command): Adjust.
10435         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10436         (linux_make_corefile_notes): Adjust.
10437         * osdata.c (get_osdata): Adjust.
10438         * remote.c (remote_get_threads_with_qxfer): Adjust.
10439         (remote_memory_map): Adjust.
10440         (remote_traceframe_info): Adjust.
10441         (btrace_read_config): Adjust.
10442         (remote_read_btrace): Adjust.
10443         (remote_pid_to_exec_file): Adjust.
10444         * solib-aix.c (solib_aix_get_library_list): Adjust.
10445         * solib-dsbt.c (decode_loadmap): Don't free buf.
10446         (dsbt_get_initial_loadmaps): Adjust.
10447         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10448         * solib-target.c (solib_target_current_sos): Adjust.
10449         * tracepoint.c (sdata_make_value): Adjust.
10450         * xml-support.c (xinclude_start_include): Adjust.
10451         (xml_fetch_content_from_file): Adjust.
10452         * xml-support.h (xml_fetch_another): Change return type.
10453         (xml_fetch_content_from_file): Change return type.
10454         * xml-syscall.c (xml_init_syscalls_info): Adjust.
10455         * xml-tdesc.c (file_read_description_xml): Adjust.
10456         (fetch_available_features_from_target): Change return type.
10457         (target_fetch_description_xml): Adjust.
10458         (target_read_description_xml): Adjust.
10459
10460 2018-04-06  Tom Tromey  <tom@tromey.com>
10461
10462         * value.c (~value): Update.
10463         (struct value) <contents>: Now unique_xmalloc_ptr.
10464         (value_contents_bits_eq, allocate_value_contents)
10465         (value_contents_raw, value_contents_all_raw)
10466         (value_contents_for_printing, value_contents_for_printing_const)
10467         (set_value_enclosing_type): Update.
10468
10469 2018-04-06  Tom Tromey  <tom@tromey.com>
10470
10471         * value.c (range_s): Remove typedef, VEC.
10472         (struct range): Add operator<.
10473         (range_lessthan): Remove.
10474         (ranges_contain): Change type.
10475         (~value): Update.
10476         (struct value) <unavailable, optimized_out>: Now std::vector.
10477         (value_entirely_available)
10478         (value_entirely_covered_by_range_vector)
10479         (value_entirely_unavailable, value_entirely_optimized_out):
10480         Update.
10481         (insert_into_bit_range_vector): Change argument type.
10482         (find_first_range_overlap): Likewise.
10483         (struct ranges_and_idx, value_contents_bits_eq)
10484         (require_not_optimized_out, require_available): Update.
10485         (ranges_copy_adjusted): Change argument types.
10486         (value_optimized_out, value_copy, value_fetch_lazy): Update.
10487
10488 2018-04-06  Tom Tromey  <tom@tromey.com>
10489
10490         * value.c (~value): Update.
10491         (struct value) <parent>: Now a value_ref_ptr.
10492         (value_parent, set_value_parent, value_address, value_copy):
10493         Update.
10494
10495 2018-04-06  Tom Tromey  <tom@tromey.com>
10496
10497         * value.c (struct value): Add constructor, destructor, and member
10498         initializers.
10499         (allocate_value_lazy, value_decref): Update.
10500
10501 2018-04-06  Tom Tromey  <tom@tromey.com>
10502
10503         * value.c (struct value) <released, next>: Remove.
10504         (all_values): Now a std::vector.
10505         (allocate_value_lazy): Update.
10506         (value_next): Remove.
10507         (value_mark, value_free_to_mark, release_value)
10508         (value_release_to_mark): Update.
10509
10510 2018-04-06  Tom Tromey  <tom@tromey.com>
10511
10512         * value.h (fetch_subexp_value, value_release_to_mark): Update.
10513         (free_value_chain): Remove.
10514         * value.c (free_value_chain): Remove.
10515         (value_release_to_mark): Return a std::vector.
10516         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10517         std::vector.
10518         (check_condition): Update.
10519         * eval.c (fetch_subexp_value): Change "val_chain" to a
10520         std::vector.
10521         * breakpoint.c (update_watchpoint): Update.
10522         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10523
10524 2018-04-06  Tom Tromey  <tom@tromey.com>
10525
10526         * value.h (free_all_values): Remove.
10527         * value.c (free_all_values): Remove.
10528
10529 2018-04-06  Tom Tromey  <tom@tromey.com>
10530
10531         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10532         (value_history_chain, value_history_count): Remove.
10533         (value_history): New global.
10534         (record_latest_value, access_value_history, show_values)
10535         (preserve_values): Update.
10536
10537 2018-04-06  Tom Tromey  <tom@tromey.com>
10538
10539         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10540         * varobj.c (varobj_set_display_format, varobj_set_value)
10541         (install_default_visualizer, construct_visualizer)
10542         (install_new_value, ~varobj, varobj_get_value_type)
10543         (my_value_of_variable, varobj_editable_p): Update.
10544         * c-varobj.c (c_describe_child, c_value_of_variable)
10545         (cplus_number_of_children, cplus_describe_child): Update.
10546         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10547         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10548         (ada_value_of_variable, ada_value_is_changeable_p): Update.
10549
10550 2018-04-06  Tom Tromey  <tom@tromey.com>
10551
10552         * printcmd.c (last_examine_address): Change type to
10553         value_ref_ptr.
10554         (do_examine, x_command): Update.
10555
10556 2018-04-06  Tom Tromey  <tom@tromey.com>
10557
10558         * value.c (release_value): Update.
10559         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10560         (struct bpstats) <val>: Now a value_ref_ptr.
10561         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10562         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10563         (~watchpoint, print_it_watchpoint, watch_command_1)
10564         (invalidate_bp_value_on_memory_change): Update.
10565
10566 2018-04-06  Tom Tromey  <tom@tromey.com>
10567
10568         * varobj.c (varobj_clear_saved_item)
10569         (update_dynamic_varobj_children, install_new_value, ~varobj):
10570         Update.
10571         * value.h (value_incref): Move declaration earlier.
10572         (value_decref): Rename from value_free.
10573         (struct value_ref_policy): New.
10574         (value_ref_ptr): New typedef.
10575         (struct value_deleter): Remove.
10576         (gdb_value_up): Remove typedef.
10577         (release_value): Change return type.
10578         (release_value_or_incref): Remove.
10579         * value.c (set_value_parent): Update.
10580         (value_incref): Change return type.
10581         (value_decref): Rename from value_free.
10582         (value_free_to_mark, free_all_values, free_value_chain): Update.
10583         (release_value): Return value_ref_ptr.
10584         (release_value_or_incref): Remove.
10585         (record_latest_value, set_internalvar, clear_internalvar):
10586         Update.
10587         * stack.c (info_frame_command): Don't call value_free.
10588         * python/py-value.c (valpy_dealloc, valpy_new)
10589         (value_to_value_object): Update.
10590         * printcmd.c (do_examine): Update.
10591         * opencl-lang.c (lval_func_free_closure): Update.
10592         * mi/mi-main.c (register_changed_p): Don't call value_free.
10593         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10594         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10595         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10596         value_free.
10597         * guile/scm-value.c (vlscm_free_value_smob)
10598         (vlscm_scm_from_value): Update.
10599         * frame.c (frame_register_unwind, frame_unwind_register_signed)
10600         (frame_unwind_register_unsigned, get_frame_register_bytes)
10601         (put_frame_register_bytes): Don't call value_free.
10602         * findvar.c (address_from_register): Don't call value_free.
10603         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10604         * dwarf2loc.c (entry_data_value_free_closure)
10605         (value_of_dwarf_reg_entry, free_pieced_value_closure)
10606         (dwarf2_evaluate_loc_desc_full): Update.
10607         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10608         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10609         (~watchpoint, watch_command_1)
10610         (invalidate_bp_value_on_memory_change): Update.
10611         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10612
10613 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
10614
10615         PR gdb/23022
10616         * warning.m4: Add -Wno-error=deprecated-register.
10617         * configure: Re-generate.
10618
10619 2018-04-05  Tom Tromey  <tom@tromey.com>
10620
10621         * linespec.h: Remove include of "vec.h".
10622
10623 2018-04-05  Tom Tromey  <tom@tromey.com>
10624
10625         * linespec.c (typep): Remove typedef.
10626         (find_methods, find_superclass_methods): Take a std::vector.
10627         (find_method): Use std::vector.
10628
10629 2018-04-05  Tom Tromey  <tom@tromey.com>
10630
10631         * utils.c (compare_strings): Remove.
10632         * utils.h (compare_strings): Remove.
10633         * objc-lang.h (find_imps): Update.
10634         * objc-lang.c (find_methods): Take a std::vector.
10635         (uniquify_strings, find_imps): Likewise.
10636         * linespec.c (find_methods): Take a std::vector.
10637         (decode_objc): Use std::vector.
10638         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10639         a std::vector.
10640         (find_method, find_function_symbols): Use std::vector.
10641
10642 2018-04-05  Tom Tromey  <tom@tromey.com>
10643
10644         * completer.c (completion_tracker::completion_tracker): Remove
10645         cast.
10646         (completion_tracker::discard_completions): Likewise.
10647         * breakpoint.c (ambiguous_names_p): Remove cast.
10648         * ada-lang.c (_initialize_ada_language): Remove cast.
10649         * utils.h (streq): Update.
10650         (streq_hash): Add new declaration.
10651         * utils.c (streq): Return bool.
10652         (streq_hash): New function.
10653
10654 2018-04-05  Tom Tromey  <tom@tromey.com>
10655
10656         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10657         Remove a string copy.
10658
10659 2018-04-05  Tom Tromey  <tom@tromey.com>
10660
10661         * linespec.c (filter_results): Use std::vector.
10662         (decode_line_2, decode_line_full): Update.
10663
10664 2018-04-05  Tom Tromey  <tom@tromey.com>
10665
10666         * linespec.c (canonical_to_fullform): Return std::string.
10667         (filter_results): Update.
10668         (struct decode_line_2_item): Add constructor.
10669         <fullform, displayform>: Now std::string.
10670         (decode_line_2_compare_items): Now a std::sort comparator.
10671         (decode_line_2): Update.
10672
10673 2018-04-05  Tom Tromey  <tom@tromey.com>
10674
10675         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10676         (unexpected_linespec_error): Update.
10677         (linespec_parse_basic, parse_linespec): Update.
10678
10679 2018-04-05  Tom Tromey  <tom@tromey.com>
10680
10681         * linespec.c (linespec_parse_basic): Reindent.
10682
10683 2018-04-05  Tom Tromey  <tom@tromey.com>
10684
10685         * minsyms.h (iterate_over_minimal_symbols): Update.
10686         * minsyms.c (iterate_over_minimal_symbols): Take a
10687         gdb::function_view.
10688         * linespec.c (struct collect_minsyms): Remove.
10689         (compare_msyms): Now a std::sort comparator.
10690         (add_minsym): Add parameters.
10691         (search_minsyms_for_name): Update.  Use std::vector.
10692
10693 2018-04-03  Tom Tromey  <tom@tromey.com>
10694
10695         * mipsread.c (read_alphacoff_dynamic_symtab): Use
10696         gdb::byte_vector.
10697
10698 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10699
10700         * MAINTAINERS (Write After Approval): Add Weimin Pan.
10701
10702 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10703
10704         PR gdb/16959
10705         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
10706         printing static type.
10707
10708 2018-04-01  Tom Tromey  <tom@tromey.com>
10709
10710         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10711         (rs6000_xfer_shared_libraries): Update.
10712
10713 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
10714
10715         * common/gdb_vecs.h (char_ptr): Remove.
10716         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10717
10718 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10719
10720         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10721         with std::vector.
10722         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10723
10724 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10725
10726         * tracepoint.h (struct uploaded_tp): Initialize fields.
10727         <actions, step_actions, cmd_strings>: Change type to
10728         std::vector<char *>.
10729         * tracepoint.c (get_uploaded_tp): Allocate with new.
10730         (free_uploaded_tps): Free with delete.
10731         (parse_tracepoint_definition): Adjust to std::vector change.
10732         * breakpoint.c (read_uploaded_action): Likewise.
10733         (create_tracepoint_from_upload): Likewise.
10734         * ctf.c (ctf_write_uploaded_tp): Likewise.
10735         (SET_ARRAY_FIELD): Likewise.
10736         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10737
10738 2018-03-30  Tom Tromey  <tom@tromey.com>
10739
10740         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
10741         std::unique_ptr.
10742         (svr4_keep_data_in_core): Update.
10743         (svr4_read_so_list): Update.
10744
10745 2018-03-30  Tom Tromey  <tom@tromey.com>
10746
10747         * windows-nat.c (handle_output_debug_string, handle_exception):
10748         Update.
10749         * target.h (target_read_string): Update.
10750         * target.c (target_read_string): Change "string" to
10751         unique_xmalloc_ptr.
10752         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10753         Update.
10754         * solib-frv.c (frv_current_sos): Update.
10755         * solib-dsbt.c (dsbt_current_sos): Update.
10756         * solib-darwin.c (darwin_current_sos): Update.
10757         * linux-thread-db.c (inferior_has_bug): Update.
10758         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10759         Update.  Remove alloca.
10760         * ada-lang.c (ada_main_name): Update.
10761
10762 2018-03-30  Tom Tromey  <tom@tromey.com>
10763
10764         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10765         (struct dwo_file_deleter): New.
10766         (dwo_file_up): New typedef.
10767         (open_and_init_dwo_file): Use dwo_file_up.
10768         (free_dwo_file_cleanup): Remove.
10769
10770 2018-03-30  Tom Tromey  <tom@tromey.com>
10771
10772         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10773         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10774
10775 2018-03-30  Tom Tromey  <tom@tromey.com>
10776
10777         * dwarf2read.c (class free_cached_comp_units): New class.
10778         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10779         (free_cached_comp_units): Remove function.
10780
10781 2018-03-30  Tom Tromey  <tom@tromey.com>
10782
10783         * utils.h (make_cleanup_unpush_target): Remove.
10784         * inf-ptrace.c (struct target_unpusher): New.
10785         (target_unpush_up) New typedef.
10786         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10787         target_unpush_up.
10788         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10789
10790 2018-03-27  Tom Tromey  <tom@tromey.com>
10791
10792         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10793
10794 2018-03-27  Pedro Alves  <palves@redhat.com>
10795             Tom Tromey  <tom@tromey.com>
10796
10797         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10798         destructor.  Now a class.
10799         (gdb_readline_wrapper_cleanup): Remove function.
10800         (gdb_readline_wrapper): Remove cleanups.
10801
10802 2018-03-27  Tom Tromey  <tom@tromey.com>
10803
10804         * typeprint.h (struct type_print_options) <local_typedefs,
10805         global_typedefs>: Remove "struct" keyword.
10806         (class typedef_hash_table): New class.
10807         (recursively_update_typedef_hash, add_template_parameters)
10808         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10809         (find_typedef_in_hash): Don't declare.
10810         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10811         (typedef_hash_table::recursively_update): Rename from
10812         recursively_update_typedef_hash.  Now a member.
10813         (typedef_hash_table::add_template_parameters): Rename from
10814         add_template_parameters.  Now a member.
10815         (typedef_hash_table::typedef_hash_table): Now a constructor;
10816         rename from create_typedef_hash.
10817         (typedef_hash_table::~typedef_hash_table): Now a destructor;
10818         rename from free_typedef_hash.
10819         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10820         (do_free_global_table): Remove.
10821         (typedef_hash_table::typedef_hash_table): New constructor; renamed
10822         from copy_type_recursive.
10823         (create_global_typedef_table): Remove.
10824         (typedef_hash_table::find_global_typedef): Now a member of
10825         typedef_hash_table.
10826         (typedef_hash_table::find_typedef): Rename from
10827         find_typedef_in_hash; now a member.
10828         (whatis_exp): Update.
10829         * extension.h (struct ext_lang_type_printers): Add constructor and
10830         destructor.
10831         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10832         declare.
10833         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10834         Now a constructor; rename from start_ext_lang_type_printers.
10835         (ext_lang_type_printers): Now a destructor; rename from
10836         free_ext_lang_type_printers.
10837         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10838         Update.
10839         (c_type_print_base_struct_union): Update.  Remove cleanups.
10840
10841 2018-03-27  Tom Tromey  <tom@tromey.com>
10842
10843         * dwarf-index-write.c: Include <cmath>.
10844
10845 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10846
10847         * NEWS: Add entry describing new "set|show varsize-limit" command.
10848         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10849         command.
10850         * printcmd.c (_initialize_printcmd): Add "set var" alias of
10851         "set variable".
10852
10853 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
10854
10855         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10856         dwarf-index-write.c
10857         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10858         * dwarf-index-common.c: New file.
10859         * dwarf-index-common.h: New file.
10860         * dwarf-index-write.c: New file.
10861         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10862         (struct dwarf2_section_info): Move from here.
10863         (dwarf2_section_info_def): Likewise.
10864         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10865         (offset_type): Likewise.
10866         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10867         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10868         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10869         (byte_swap): Likewise.
10870         (MAYBE_SWAP): Likewise.
10871         (dwarf2_per_cu_ptr): Likewise.
10872         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10873         (struct tu_stats): Likewise.
10874         (struct dwarf2_per_objfile): Likewise.
10875         (struct dwarf2_per_cu_data): Likewise.
10876         (struct signatured_type): Likewise.
10877         (sig_type_ptr): Likewise.
10878         (DEF_VEC_P (sig_type_ptr)): Likewise.
10879         (INDEX4_SUFFIX): Likewise.
10880         (INDEX5_SUFFIX): Likewise.
10881         (DEBUG_STR_SUFFIX): Likewise.
10882         (dwarf2_read_section): Make non-static.
10883         (mapped_index_string_hash): Move from here.
10884         (dwarf5_djb_hash): Likewise.
10885         (file_write): Likewise.
10886         (class data_buf): Likewise.
10887         (struct symtab_index_entry): Likewise.
10888         (struct mapped_symtab): Likewise.
10889         (find_slot): Likewise.
10890         (hash_expand): Likewise.
10891         (add_index_entry): Likewise.
10892         (uniquify_cu_indices): Likewise.
10893         (class c_str_view): Likewise.
10894         (class c_str_view_hasher): Likewise.
10895         (class vector_hasher): Likewise.
10896         (write_hash_table): Likewise.
10897         (psym_index_map): Likewise.
10898         (struct addrmap_index_data): Likewise.
10899         (add_address_entry): Likewise.
10900         (add_address_entry_worker): Likewise.
10901         (write_address_map): Likewise.
10902         (symbol_kind): Likewise.
10903         (write_psymbols): Likewise.
10904         (struct signatured_type_index_data): Likewise.
10905         (write_one_signatured_type): Likewise.
10906         (recursively_count_psymbols): Likewise.
10907         (recursively_write_psymbols): Likewise.
10908         (class debug_names): Likewise.
10909         (check_dwarf64_offsets): Likewise.
10910         (psyms_seen_size): Likewise.
10911         (write_gdbindex): Likewise.
10912         (write_debug_names): Likewise.
10913         (assert_file_size): Likewise.
10914         (write_psymtabs_to_index): Likewise.
10915         (save_gdb_index_command): Likewise.
10916         (_initialize_dwarf2_read): Don't register the "save gdb-index"
10917         command.
10918         * dwarf2read.h: New file.
10919
10920 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10921
10922         PR gdb/22670
10923         * dwarf2read.c (dwarf2_physname): Do not return the demangled
10924         symbol name if the CU's language stores symbol names in linkage
10925         format.
10926         * language.h (struct language_defn)
10927         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
10928         all instances of this struct.
10929
10930 2018-03-26  Tom Tromey  <tom@tromey.com>
10931
10932         * stack.c (backtrace_command_1): Remove verbose code.
10933
10934 2018-03-26  Tom Tromey  <tom@tromey.com>
10935
10936         * python/py-framefilter.c (py_print_type): Don't catch
10937         exceptions.  Return void.
10938         (py_print_value): Likewise.
10939         (py_print_single_arg): Likewise.
10940         (enumerate_args): Don't catch exceptions.
10941         (py_print_args): Likewise.
10942         (py_print_frame): Likewise.
10943         (gdbpy_apply_frame_filter): Catch exceptions here.
10944
10945 2018-03-26  Tom Tromey  <tom@tromey.com>
10946
10947         * stack.c (_initialize_stack): Remove trailing newlines from help
10948         text.  Add "Usage" line to "backtrace" help.
10949
10950 2018-03-26  Tom Tromey  <tom@tromey.com>
10951
10952         PR python/16486:
10953         * python/py-framefilter.c (py_print_args): Call wrap_hint.
10954
10955 2018-03-26  Tom Tromey  <tom@tromey.com>
10956
10957         * python/py-framefilter.c (py_print_single_arg): Return
10958         EXT_LANG_BT_ERROR from catch.
10959
10960 2018-03-26  Tom Tromey  <tom@tromey.com>
10961
10962         PR backtrace/15584:
10963         * stack.c (backtrace_command_1): Move some code into no-filters
10964         "if".
10965
10966 2018-03-26  Tom Tromey  <tom@tromey.com>
10967
10968         * python/py-framefilter.c (throw_quit_or_print_exception): New
10969         function.
10970         (gdbpy_apply_frame_filter): Use it.
10971
10972 2018-03-26  Tom Tromey  <tom@tromey.com>
10973
10974         PR cli/17716:
10975         * python/py-framefilter.c (py_print_type, py_print_value)
10976         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
10977         RETURN_MASK_ERROR.
10978
10979 2018-03-26  Tom Tromey  <tom@tromey.com>
10980
10981         * python/py-framefilter.c (enumerate_args): Use
10982         gdb::unique_xmalloc_ptr.
10983
10984 2018-03-26  Tom Tromey  <tom@tromey.com>
10985
10986         * python/py-framefilter.c (py_print_frame): Return
10987         EXT_LANG_BT_OK.
10988         (gdbpy_apply_frame_filter): Update comment.
10989         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
10990         Remove.
10991         <EXT_LANG_BT_NO_FILTERS>: Change value.
10992
10993 2018-03-26  Tom Tromey  <tom@tromey.com>
10994
10995         PR backtrace/15582:
10996         * stack.c (backtrace_command): Parse "hide" argument.
10997         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
10998         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
10999         constant.
11000
11001 2018-03-26  Tom Tromey  <tom@tromey.com>
11002
11003         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11004         add "flags".
11005         (backtrace_command): Remove "fulltrace", add "flags".
11006
11007 2018-03-26  Tom Tromey  <tom@tromey.com>
11008
11009         * stack.c (backtrace_command): Rewrite command line parsing.
11010
11011 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11012
11013         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11014
11015 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11016
11017         * filename-seen-cache.h: Add include guard.
11018
11019 2018-03-26  Keith Seitz  <keiths@redhat.com>
11020
11021         * symfile.c (place_section): Remove "struct" from section_addr_info
11022         in comment.
11023         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11024         "struct" keyword from section_addr_info.
11025
11026 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
11027
11028         * regformats/regdef.h (reg): Add constructors.
11029
11030 2018-03-25  Pedro Alves  <palves@redhat.com>
11031
11032         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11033         if then/else bodies in var_func_name extraction.
11034
11035 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
11036
11037         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11038         lookup_minimal_symbol() to find symbol entry.
11039         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11040
11041 2018-03-23  Keith Seitz  <keiths@redhat.com>
11042
11043         PR c++/22968
11044         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11045         nested type definitions for C++, too.
11046
11047 2018-03-23  Tom Tromey  <tom@tromey.com>
11048
11049         * machoread.c (struct oso_el): Add a constructor.  Don't define as
11050         a typedef.
11051         (macho_register_oso): Remove.
11052         (macho_symtab_read): Take a std::vector.
11053         (oso_el_compare_name): Now a std::sort comparator.
11054         (macho_symfile_read_all_oso): Take a std::vector.
11055         (macho_symfile_read): Use std::vector.  Remove cleanups.
11056
11057 2018-03-22  Tom Tromey  <tom@tromey.com>
11058
11059         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11060         (record_full_goto_bookmark): Use std::string.
11061
11062 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11063
11064         PR tdep/18295
11065         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11066         a single mask.
11067
11068 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11069
11070         * rs6000-tdep.c (store_insn_p): New function.
11071         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11072         and cr_reg to their unshifted values. Use store_insn_p to
11073         match LR saves using either R1 or fdata->alloca_reg. Use
11074         store_insn_p to match CR saves. Set alloca_reg_offset
11075         when alloca_reg and framep are set. Remove lr_reg shift
11076         when assigning to fdata->lr_register.
11077
11078 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11079
11080         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11081         command line args instead of emitting a warning.
11082
11083 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11084
11085         * tracepoint.h (struct static_tracepoint_marker): Initialize
11086         fields, define default constructor, move constructor and move
11087         assignment, disable the rest.
11088         <str_id, extra>: Make std::string.
11089         (release_static_tracepoint_marker): Remove.
11090         (free_current_marker): Remove.
11091         * tracepoint.c (free_current_marker): Remove.
11092         (parse_static_tracepoint_marker_definition): Adjust to
11093         std::string, use new hex2str overload.
11094         (release_static_tracepoint_marker): Remove.
11095         (print_one_static_tracepoint_marker): Get marker by reference
11096         and adjust to std::string.
11097         (info_static_tracepoint_markers_command): Adjust to std::vector
11098         changes
11099         * target.h (static_tracepoint_marker_p): Remove typedef.
11100         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11101         (struct target_ops) <to_static_tracepoint_marker_at>: Return
11102         bool.
11103         <to_static_tracepoint_markers_by_strid>: Return std::vector.
11104         * target-debug.h
11105         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11106         (target_debug_print_std_vector_static_tracepoint_marker): New.
11107         (target_debug_print_struct_static_tracepoint_marker_p): Rename
11108         to...
11109         (target_debug_print_static_tracepoint_marker_p): ... this.
11110         * target-delegates.c: Re-generate.
11111         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11112         Make std::string.
11113         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11114         (decode_static_tracepoint_spec): Adjust to std::vector.
11115         (tracepoint_print_one_detail): Adjust to std::string.
11116         (strace_marker_decode_location): Adjust to std::string.
11117         (update_static_tracepoint): Adjust to std::string, remove call
11118         to release_static_tracepoint_marker.
11119         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11120         Adjust to std::vector.
11121         * remote.c (remote_static_tracepoint_marker_at): Return bool.
11122         (remote_static_tracepoint_markers_by_strid): Adjust to
11123         std::vector.
11124         * common/rsp-low.h (hex2str): New overload with explicit count
11125         of bytes.
11126         * common/rsp-low.c (hex2str): New overload with explicit count
11127         of bytes.
11128         * unittests/rsp-low-selftests.c (test_hex2str): New function.
11129         (_initialize_rsp_low_selftests): Add test_hex2str test.
11130         * unittests/tracepoint-selftests.c
11131         (test_parse_static_tracepoint_marker_definition): Adjust to
11132         std::string.
11133
11134 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11135
11136         * tracepoint.c (parse_static_tracepoint_marker_definition):
11137         Consider case where the definition is followed by more
11138         definitions.
11139         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11140         tracepoint-selftests.c.
11141         * unittests/tracepoint-selftests.c: New.
11142
11143 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11144
11145         * MAINTAINERS (Write After Approval): Add Pedro Franco de
11146         Carvalho.
11147
11148 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11149
11150         * symtab.c (find_pc_sect_line): fixed indentation.
11151
11152 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11153
11154         * symtab.c (find_pc_sect_line): now uses binary search.
11155
11156 2018-03-19  Tom Tromey  <tom@tromey.com>
11157
11158         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11159         "IDENT" production.
11160
11161 2018-03-19  Pedro Alves  <palves@redhat.com>
11162             Tom Tromey  <tom@tromey.com>
11163
11164         * unittests/observable-selftests.c: New file.
11165         * common/observable.h: New file.
11166         * observable.h: New file.
11167         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11168         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11169         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11170         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11171         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11172         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11173         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11174         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11175         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11176         python/py-breakpoint.c, python/py-finishbreakpoint.c,
11177         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11178         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11179         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11180         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11181         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11182         tui/tui-interp.c, valops.c: Update all users.
11183         * tui/tui-hooks.c (tui_bp_created_observer)
11184         (tui_bp_deleted_observer, tui_bp_modified_observer)
11185         (tui_inferior_exit_observer, tui_before_prompt_observer)
11186         (tui_normal_stop_observer, tui_register_changed_observer):
11187         Remove.
11188         (tui_observers_token): New global.
11189         (attach_or_detach, tui_attach_detach_observers): New functions.
11190         (tui_install_hooks, tui_remove_hooks): Use
11191         tui_attach_detach_observers.
11192         * record-btrace.c (record_btrace_thread_observer): Remove.
11193         (record_btrace_thread_observer_token): New global.
11194         * observer.sh: Remove.
11195         * observer.c: Rename to observable.c.
11196         * observable.c (namespace gdb_observers): Define new objects.
11197         (observer_debug): Move into gdb_observers namespace.
11198         (struct observer, struct observer_list, xalloc_observer_list_node)
11199         (xfree_observer_list_node, generic_observer_attach)
11200         (generic_observer_detach, generic_observer_notify): Remove.
11201         (_initialize_observer): Update.
11202         Don't include observer.inc.
11203         * Makefile.in (generated_files): Remove observer.h, observer.inc.
11204         (clean mostlyclean): Likewise.
11205         (observer.h, observer.inc): Remove targets.
11206         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11207         (COMMON_SFILES): Use observable.c, not observer.c.
11208         * .gitignore: Remove observer.h.
11209
11210 2018-03-18  Tom Tromey  <tom@tromey.com>
11211
11212         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11213         gdb::def_vector.
11214         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11215
11216 2018-03-17  Tom Tromey  <tom@tromey.com>
11217
11218         * auto-load.c (auto_load_objfile_script_1): Use std::string.
11219
11220 2018-03-17  Tom Tromey  <tom@tromey.com>
11221
11222         * target.c (class scoped_target_fd): New.
11223         (target_fileio_close_cleanup): Remove.
11224         (target_fileio_read_alloc_1): Use scoped_target_fd.
11225
11226 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
11227
11228         * silent-rules.mk: New.
11229         * Makefile.in: Include silent-rules.mk
11230         (srcdir, VPATH, top_srcdir): Move up.
11231         (COMPILE): Add ECHO_CXX.
11232         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11233         (init.c): Add ECHO_INIT_C.
11234         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11235         (version.c): Add ECHO_GEN.
11236         (printcmd.o): Add ECHO_CXX.
11237         (target-float.o): Add ECHO_CXX.
11238         (ada-exp.o): Add ECHO_CXX.
11239         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11240         (insight$(EXEEXT)): Add ECHO_CXXLD.
11241         * gnulib/configure.ac: Add AM_SILENT_RULES.
11242         * gnulib/aclocal.m4: Re-generate.
11243         * gnulib/configure: Re-generate.
11244         * gnulib/import/Makefile.in: Re-generate.
11245
11246 2018-03-16  Tom Tromey  <tom@tromey.com>
11247
11248         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11249         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11250         * utils.c (do_free_section_addr_info)
11251         (make_cleanup_free_section_addr_info): Remove.
11252         * symfile.h (struct other_sections): Add constructor.
11253         (struct section_addr_info): Remove.
11254         (section_addr_info): New typedef.
11255         (struct sym_fns) <sym_offsets>: Change type of parameter.
11256         (build_section_addr_info_from_objfile)
11257         (relative_addr_info_to_section_offsets, addr_info_make_relative)
11258         (default_symfile_offsets, symbol_file_add)
11259         (symbol_file_add_from_bfd)
11260         (build_section_addr_info_from_section_table): Update.
11261         (alloc_section_addr_info, free_section_addr_info): Don't declare.
11262         * symfile.c (alloc_section_addr_info): Remove.
11263         (build_section_addr_info_from_section_table): Change return type.
11264         Update.
11265         (build_section_addr_info_from_bfd)
11266         (build_section_addr_info_from_objfile): Likewise.
11267         (free_section_addr_info): Remove.
11268         (relative_addr_info_to_section_offsets): Change type of "addrs".
11269         (addrs_section_compar): Now a std::sort comparator.
11270         (addrs_section_sort): Change return type.
11271         (addr_info_make_relative): Change type of "addrs".  Update.
11272         (default_symfile_offsets, syms_from_objfile_1)
11273         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11274         (symbol_file_add_separate): Update.
11275         (symbol_file_add): Change type of "addrs".  Update.
11276         (add_symbol_file_command): Update.  Remove cleanups.
11277         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
11278         cleanups.
11279         * symfile-debug.c (debug_sym_offsets): Change type of "info".
11280         * solib.c (solib_read_symbols): Update.
11281         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
11282         * machoread.c (macho_symfile_offsets): Update.
11283         * jit.c (jit_bfd_try_read_symtab): Update.
11284
11285 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
11286
11287         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11288         unittests/utils-selftests.c.
11289         * unittests/utils-selftests.c: New file.
11290
11291 2018-03-14  Tom Tromey  <tom@tromey.com>
11292
11293         PR cli/14977:
11294         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11295         for NULL.
11296
11297 2018-03-14  Tom Tromey  <tom@tromey.com>
11298
11299         PR cli/19918:
11300         * printcmd.c (printf_pointer): Allow "-" in format.
11301
11302 2018-03-14  Tom Tromey  <tom@tromey.com>
11303
11304         * printcmd.c (_initialize_printcmd): Add usage to printf.
11305
11306 2018-03-14  Yao Qi  <qiyao@sourceware.org>
11307
11308         * MAINTAINERS: Update my email address.
11309
11310 2018-03-13  Tom Tromey  <tom@tromey.com>
11311
11312         * machoread.c (macho_check_dsym): Change filenamep to a
11313         std::string*.
11314         (macho_symfile_read): Update.
11315         * symfile.c (load_command): Use std::string.
11316
11317 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11318
11319         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11320         to error message string.
11321         (riscv_register_name): Use xsnprintf instead of sprintf.
11322         (riscv_insn::fetch_instruction): Use gdb_assert instead of
11323         internal_error.
11324         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11325         error.
11326         (riscv_push_dummy_call): Likewise.
11327
11328 2018-03-12  Tom Tromey  <tom@tromey.com>
11329
11330         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11331         Use gdb::byte_vector.
11332         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11333
11334 2018-03-12  Yao Qi  <yao.qi@linaro.org>
11335
11336         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11337         parameter type to readable_regcache.
11338         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11339         the declaration.
11340
11341 2018-03-11  Tom Tromey  <tom@tromey.com>
11342
11343         * dwarf2read.c (struct nextfield): Add initializers.
11344         (struct nextfnfield): Remove.
11345         (struct fnfieldlist): Add initializers.  Remove "length" and
11346         "head", use std::vector.
11347         (struct decl_field_list): Remove.
11348         (struct field_info): Add initializers.
11349         <fields, baseclasses>: Now std::vector.
11350         <nbaseclasses, nfnfields, typedef_field_list_count,
11351         nested_types_list_count>: Remove.
11352         (dwarf2_add_field, dwarf2_add_type_defn)
11353         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11354         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11355         (process_structure_scope): Update.
11356
11357 2018-03-11  Tom Tromey  <tom@tromey.com>
11358
11359         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11360         for use by std::sort.
11361         (build_type_psymtabs_1): Use std::vector.
11362
11363 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
11364
11365         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11366         and LIBMPFR in the printed configuration.
11367
11368 2018-03-08  Tom Tromey  <tom@tromey.com>
11369
11370         * source.c (get_filename_and_charpos): Use scoped_fd.
11371         * nto-procfs.c (procfs_open_1): Use scoped_fd.
11372         (procfs_pidlist): Likewise.
11373         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11374         (iterate_over_mappings): Likewise.
11375
11376 2018-03-08  Tom Tromey  <tom@tromey.com>
11377
11378         * infcall.c (struct call_return_meta_info)
11379         <stack_temporaries_enabled>: Remove.
11380         (get_call_return_value, call_function_by_hand_dummy): Update.
11381         * thread.c (disable_thread_stack_temporaries): Remove.
11382         (enable_thread_stack_temporaries): Remove.
11383         (thread_stack_temporaries_enabled_p): Return bool.
11384         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11385         (get_last_thread_stack_temporary): Update.
11386         * eval.c (evaluate_subexp): Update.
11387         * gdbthread.h (class enable_thread_stack_temporaries): Now a
11388         class, not a function.
11389         (value_ptr, value_vec): Remove typedefs.
11390         (class thread_info) <stack_temporaries_enabled>: Now bool.
11391         <stack_temporaries>: Now a std::vector.
11392         (thread_stack_temporaries_enabled_p)
11393         (value_in_thread_stack_temporaries): Return bool.
11394
11395 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
11396
11397         * remote.c (putpkt_binary): Fix omitted bytes reporting.
11398         (getpkt_or_notif_sane_1): Likewise.
11399
11400 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11401
11402         * build-id.c (build_id_to_debug_bfd): Use std::string.
11403
11404 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11405
11406         * build-id.c (find_separate_debug_file_by_buildid): Return
11407         std::string.
11408         * build-id.h (find_separate_debug_file_by_buildid): Return
11409         std::string.
11410         * coffread.c (coff_symfile_read): Adjust to std::string.
11411         * elfread.c (elf_symfile_read): Adjust to std::string.
11412         * symfile.c (separate_debug_file_exists): Change parameter to
11413         std::string.
11414         (find_separate_debug_file): Return std::string.
11415         (find_separate_debug_file_by_debuglink): Return std::string.
11416         * symfile.h (find_separate_debug_file_by_debuglink): Return
11417         std::string.
11418
11419 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11420
11421         * common/xml-utils.c (xml_escape_text): Move code to...
11422         (xml_escape_text_append): ... this new function.
11423         * common/xml-utils.h (xml_escape_text_append): New declaration.
11424         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11425         New function.
11426         (_initialize_xml_utils): register test_xml_escape_text_append as
11427         a selftest.
11428
11429 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
11430
11431         * defs.h: Remove MAX_REGISTER_SIZE.
11432         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11433         asserts.
11434         * python/py-unwind.c (pyuw_sniffer): Likewise.
11435
11436 2018-03-07  Tom Tromey  <tom@tromey.com>
11437
11438         * linux-tdep.c (linux_info_proc): Update.
11439         * target.h (struct target_ops) <to_fileio_readlink>: Return
11440         optional<string>.
11441         (target_fileio_readlink): Return optional<string>.
11442         * remote.c (remote_hostio_readlink): Return optional<string>.
11443         * inf-child.c (inf_child_fileio_readlink): Return
11444         optional<string>.
11445         * target.c (target_fileio_readlink): Return optional<string>.
11446
11447 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
11448
11449         * regcache.c (cooked_read_test): Add riscv to the list of
11450         architectures that have a save_reggroup.
11451
11452 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11453
11454         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11455         value is not a dynamic class object.
11456
11457 2018-03-06  Tom Tromey  <tom@tromey.com>
11458
11459         * rust-exp.y: Formatting fixes.
11460
11461 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11462
11463         * riscv-tdep.c (riscv_register_name): Remove target description
11464         support.
11465         (riscv_gdbarch_init): Remove target description check.
11466
11467 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11468
11469         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11470         comment.
11471         * riscv-tdep.h: Likewise.
11472
11473 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11474
11475         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11476         (riscv_pseudo_register_write): Delete.
11477         (riscv_gdbarch_init): Remove all use of pseudo registers.
11478
11479 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11480
11481         * record-btrace.c (btrace_print_lines): Replace cleanup
11482         parameter with RAII equivalents.
11483         (btrace_insn_history): Replace cleanup with RAII equivalents.
11484         * ui-out.h (make_cleanup_ui_out_list_begin_end,
11485         make_cleanup_ui_out_tuple_begin_end): Remove.
11486         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11487         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11488         make_cleanup_ui_out_list_begin_end): Remove.
11489
11490 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11491
11492         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11493         parameter types to std::vector.  Use bool.
11494         (record_btrace_wait): Replace VEC(tp_t) with
11495         std::vector<thread_info *>.
11496         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11497
11498 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11499
11500         * record-btrace.c (record_btrace_disable_callback): Remove.
11501         (struct scoped_btrace_disable): New.
11502         (record_btrace_open): Use scoped_btrace_disable.
11503
11504 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11505
11506         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11507         reading values from registers.
11508
11509 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11510
11511         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11512         where appropriate.
11513
11514 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11515
11516         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11517         change parameter type.  Use GDB's print functions, and use
11518         core_addr_to_string where appropriate.
11519         (riscv_push_dummy_call): Use core_addr_to_string where
11520         appropriate, update call to riscv_print_arg_location, and reindent
11521         a few lines.
11522         (riscv_return_value): Update call to riscv_print_arg_location.
11523
11524 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11525             Tim Newsome <tim@sifive.com>
11526             Albert Ou <a0u@eecs.berkeley.edu>
11527             Darius Rad <darius@bluespec.com>
11528
11529         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11530         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11531         (ALLDEPFILES): Add riscv-tdep.c
11532         * configure.tgt: Add riscv support.
11533         * riscv-tdep.c: New file.
11534         * riscv-tdep.h: New file.
11535         * NEWS: Mention new target.
11536         * MAINTAINERS: Add entry for riscv.
11537
11538 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11539
11540         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11541         fields within aggregates.
11542
11543 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
11544
11545         * record-btrace.c (btrace_print_lines): Change type of flags to
11546         gdb_disassembly_flags.
11547
11548 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11549
11550         * fbsd-nat.c: Include "inf-ptrace.h".
11551         (USE_SIGTRAP_SIGINFO): Conditionally define.
11552         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11553         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11554         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11555         function.
11556         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11557         Likewise.
11558         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11559         Likewise.
11560         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11561         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11562         "supports_stopped_by_hw_breakpoint" target methods.
11563
11564 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11565
11566         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11567         * fbsd-nat.c (debug_fbsd_nat): New variable.
11568         (show_fbsd_nat_debug): New function.
11569         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11570         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11571
11572 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11573
11574         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11575         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11576         prototype.
11577         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11578         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11579         method.
11580
11581 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11582
11583         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11584         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11585
11586 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11587
11588         * charset.c (struct charset_vector): New.
11589         (charsets): Change type to charset_vector.
11590         (find_charset_names): Adjust.
11591         (add_one): Adjust.
11592         (_initialize_charset): Adjust.
11593
11594 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11595
11596         * progspace.h (struct program_space) <deleted_solibs>: Change
11597         type to std::vector<std::string>.
11598         * progspace.c (clear_program_space_solib_cache): Adjust.
11599         * breakpoint.c (print_solib_event): Adjust.
11600         (check_status_catch_solib): Adjust.
11601         * solib.c (update_solib_list): Adjust.
11602         * ui-out.h (class ui_out) <field_string>: New overload.
11603         * ui-out.c (ui_out::field_string): New overload.
11604
11605 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11606
11607         * progspace.h (struct program_space): Add constructor and
11608         destructor, initialize fields.
11609         (add_program_space): Remove.
11610         * progspace.c (add_program_space): Rename to...
11611         (program_space::program_space): ... this.
11612         (release_program_space): Rename to...
11613         (program_space::~program_space): ... this.
11614         (delete_program_space): Use delete to delete program_space.
11615         (initialize_progspace): Use new to allocate program_space.
11616         * inferior.c (add_inferior_with_spaces): Likewise.
11617         (clone_inferior_command): Likewise.
11618         * infrun.c (follow_fork_inferior): Likewise.
11619         (handle_vfork_child_exec_or_exit): Likewise.
11620
11621 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11622
11623         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11624         (delim_string_to_char_ptr_vec): Return std::vector of
11625         gdb::unique_xmalloc_ptr.
11626         (dirnames_to_char_ptr_vec_append): Take std::vector of
11627         gdb::unique_xmalloc_ptr.
11628         (dirnames_to_char_ptr_vec): Return std::vector of
11629         gdb::unique_xmalloc_ptr.
11630         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11631         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11632         (delim_string_to_char_ptr_vec): Return an std::vector of
11633         gdb::unique_xmalloc_ptr, adjust the code.
11634         (dirnames_to_char_ptr_vec_append): Take an std::vector of
11635         gdb::unique_xmalloc_ptr, adjust the code.
11636         (dirnames_to_char_ptr_vec): Return an std::vector of
11637         gdb::unique_xmalloc_ptr, adjust the code.
11638         * auto-load.c (auto_load_safe_path_vec): Change type to
11639         std::vector of gdb::unique_xmalloc_ptr.
11640         (auto_load_expand_dir_vars): Return an std::vector of
11641         gdb::unique_xmalloc_ptr, adjust the code.
11642         (auto_load_safe_path_vec_update): Adjust.
11643         (filename_is_in_auto_load_safe_path_vec): Adjust.
11644         (auto_load_objfile_script_1): Adjust.
11645         * build-id.c (build_id_to_debug_bfd): Adjust.
11646         * linux-thread-db.c (thread_db_load_search): Adjust.
11647         * source.c (add_path): Adjust.
11648         (openp): Adjust.
11649         * symfile.c (find_separate_debug_file): Adjust.
11650         * utils.c (do_free_char_ptr_vec): Remove.
11651         (make_cleanup_free_char_ptr_vec): Remove.
11652
11653 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
11654
11655         PR gdb/22907
11656         * common/pathstuff.c: Conditionally include "<windows.h>".
11657
11658 2018-03-01  Georg Sauthoff  <mail@georg.so>
11659
11660         PR gdb/22888
11661         * gcore.in: Quote variables and switch interpreter to bash.
11662
11663 2018-03-01  Tom Tromey  <tom@tromey.com>
11664
11665         * dwarf2read.c (alloc_discriminant_info): Fix default_index
11666         assertion.  Add assertion for discriminant_index.
11667         (quirk_rust_enum): Use correct base type name in univariant case.
11668
11669 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
11670
11671         * record.c (get_call_history_modifiers): Return a
11672         record_print_flags.
11673         (cmd_record_call_history): Adjust.
11674         * record-btrace.c (record_btrace_call_history): Adjust.
11675         (record_btrace_call_history_range): Adjust.
11676         (record_btrace_call_history_from): Adjust.
11677         * target-debug.h (target_debug_print_record_print_flags): New.
11678         * target-delegates.c: Re-generate.
11679         * target.c (target_call_history): Change flags type.
11680         (target_call_history_from): Likewise.
11681         (target_call_history_range): Likewise.
11682         * target.h (struct target_ops) <target_call_history>: Likewise.
11683         (target_call_history_from): Likewise.
11684         (target_call_history_range): Likewise.
11685
11686 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11687             Simon Marchi  <simon.marchi@polymtl.ca>
11688
11689         * common/common-utils.c: Include "sys/stat.h".
11690         (is_regular_file): Move here from "source.c"; change return
11691         type to "bool".
11692         * common/common-utils.h (is_regular_file): New prototype.
11693         * common/pathstuff.c (contains_dir_separator): New function.
11694         * common/pathstuff.h (contains_dir_separator): New prototype.
11695         * source.c: Don't include "sys/stat.h".
11696         (is_regular_file): Move to "common/common-utils.c".
11697
11698 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11699
11700         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11701         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11702         * auto-load.c: Include "common/pathstuff.h".
11703         * common/common-def.h (current_directory): Move here.
11704         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11705         function.
11706         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11707         prototype.
11708         * common/pathstuff.c: New file.
11709         * common/pathstuff.h: New file.
11710         * compile/compile.c: Include "common/pathstuff.h".
11711         * defs.h (current_directory): Move to "common/common-defs.h".
11712         * dwarf2read.c: Include "common/pathstuff.h".
11713         * exec.c: Likewise.
11714         * guile/scm-safe-call.c: Likewise.
11715         * linux-thread-db.c: Likewise.
11716         * main.c: Likewise.
11717         * nto-tdep.c: Likewise.
11718         * objfiles.c: Likewise.
11719         * source.c: Likewise.
11720         * symtab.c: Likewise.
11721         * utils.c: Include "common/pathstuff.h".
11722         (gdb_realpath): Move to "common/pathstuff.c".
11723         (gdb_realpath_keepfile): Likewise.
11724         (gdb_abspath): Likewise.
11725         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11726         (gdb_realpath_keepfile): Likewise.
11727         (gdb_abspath): Likewise.
11728
11729 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
11730
11731         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11732         wildcard process pid for super_resume for kernels with a
11733         specific bug.
11734
11735 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
11736
11737         * compile/compile.c (get_args): Add additional comments
11738         explaining function.
11739
11740 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
11741             Tom Tromey  <tom@tromey.com>
11742
11743         * target.h (memory_write_request_s): Remove typedef.  Don't define
11744         VEC.
11745         (target_write_memory_blocks): Change argument to std::vector.
11746         (struct memory_write_request): Add constructor.
11747         * target-memory.c (compare_block_starting_address): Return bool.
11748         Change argument types.
11749         (claim_memory): Change arguments to use std::vector.
11750         (split_regular_and_flash_blocks, blocks_to_erase)
11751         (compute_garbled_blocks): Likewise.
11752         (cleanup_request_data, cleanup_write_requests_vector): Remove.
11753         (target_write_memory_blocks): Change argument to std::vector.
11754         * symfile.c (struct load_section_data): Add constructor and
11755         destructor.  Use std::vector for "requests".
11756         (struct load_progress_data): Add initializers.
11757         (load_section_callback): Update.  Use "new".
11758         (clear_memory_write_data): Remove.
11759         (generic_load): Update.
11760
11761 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
11762
11763         * arch/aarch64.h: Use common/tdesc.h.
11764
11765 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11766
11767         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11768         architecture with a 64-bit ABI.
11769
11770 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11771
11772         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11773         ahead of target description loading.
11774
11775 2018-02-26  Tom Tromey  <tom@tromey.com>
11776
11777         * stack.c (backtrace_command_1): Update.
11778         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11779         of "flags".
11780         * python/py-framefilter.c (py_print_frame)
11781         (gdbpy_apply_frame_filter): Change type of "flags".
11782         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11783         of "flags".
11784         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11785         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11786         * extension.h (enum frame_filter_flag): Rename from
11787         frame_filter_flags.
11788         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11789         (apply_ext_lang_frame_filter): Change type of "flags".
11790         * extension.c (apply_ext_lang_frame_filter): Change type of
11791         "flags".
11792         * extension-priv.h (struct extension_language_ops)
11793         <apply_frame_filter>: Change type of "flags".
11794
11795 2018-02-26  Tom Tromey  <tom@tromey.com>
11796
11797         PR python/16497:
11798         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11799         off-by-one in py_end computation.
11800         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11801         PRINT_MORE_FRAMES.
11802         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11803         constant.
11804
11805 2018-02-26  Tom Tromey  <tom@tromey.com>
11806
11807         * dwarf2read.c (struct variant_field): New.
11808         (struct nextfield) <variant>: New field.
11809         (dwarf2_add_field): Handle DW_TAG_variant_part.
11810         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11811         discriminated union.
11812         (read_structure_type): Handle DW_TAG_variant_part.
11813         (handle_struct_member_die): New function, extracted from
11814         process_structure_scope.  Handle DW_TAG_variant.
11815         (process_structure_scope): Handle discriminated unions.  Call
11816         handle_struct_member_die.
11817
11818 2018-02-26  Tom Tromey  <tom@tromey.com>
11819
11820         * rust-lang.h (rust_last_path_segment): Declare.
11821         * rust-lang.c (rust_last_path_segment): Now public.  Change
11822         contract.
11823         (struct disr_info): Remove.
11824         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11825         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11826         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11827         (rust_enum_p, rust_enum_variant): New function.
11828         (rust_underscore_fields): Remove "offset" parameter.
11829         (rust_print_enum): New function.
11830         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11831         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11832         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
11833         enums.
11834         (rust_internal_print_type): New function, from rust_print_type.
11835         Remove enum code.
11836         (rust_print_type): Call rust_internal_print_type.
11837         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11838         Update enum handling.
11839         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11840         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11841         (rust_union_quirks): New functions.
11842         (process_full_comp_unit, process_full_type_unit): Call
11843         rust_union_quirks.
11844         (process_structure_scope): Update rust_unions if necessary.
11845
11846 2018-02-26  Tom Tromey  <tom@tromey.com>
11847
11848         * value.h (value_union_variant): Declare.
11849         * valops.c (value_union_variant): New function.
11850         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11851         (struct discriminant_info): New.
11852         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11853         enumerator.
11854         (struct main_type) <flag_discriminated_union>: New field.
11855
11856 2018-02-26  Tom Tromey  <tom@tromey.com>
11857
11858         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11859         unittests/unpack-selftests.c.
11860         * unittests/unpack-selftests.c: New file.
11861         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11862
11863 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11864
11865         * dwarf2read.c (struct partial_die_info) <read>: New method.
11866         (read_partial_die): Remove the declaration.
11867         (load_partial_dies): Update.
11868         (partial_die_info::partial_die_info):
11869         (read_partial_die): Change it to partial_die_info::read.
11870
11871 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11872
11873         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11874         (fixup_partial_die): Remove declaration.
11875         (scan_partial_symbols): Update.
11876         (partial_die_parent_scope): Likewise.
11877         (partial_die_full_name): Likewise.
11878         (fixup_partial_die): Change it to partial_die_info::fixup.
11879
11880 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11881
11882         * dwarf2read.c (read_partial_die): Update the declaration.
11883         (load_partial_dies): Caller update.
11884         (read_partial_die): Remove one argument abbrev_len.
11885
11886 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11887
11888         * dwarf2read.c (struct partial_die_info): Add ctor, delete
11889         assignment operator.
11890         (load_partial_dies): Use ctor and copy ctor.
11891         (read_partial_die): Update.
11892         (dwarf2_cu::find_partial_die): Use ctor.
11893
11894 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11895
11896         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
11897         (find_partial_die_in_comp_unit): Change it to
11898         dwarf2_cu::find_partial_die.
11899         (find_partial_die): Update.
11900
11901 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11902
11903         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
11904         is NULL.
11905
11906 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11907
11908         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
11909
11910 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
11911
11912         * arch/amd64.h: Use common/tdesc.h.
11913         * arch/i386.c: Likewise.
11914         * arch/i386.h: Likewise.
11915         * arch/tic6x.c: Likewise.
11916         * arch/tdesc.h: Move file from here...
11917         * common/tdesc.h: ...to here.
11918         * features/aarch64-core.c: Regenerate.
11919         * features/aarch64-fpu.c: Regenerate.
11920         * features/i386/32bit-avx.c: Regenerate.
11921         * features/i386/32bit-avx512.c: Regenerate.
11922         * features/i386/32bit-core.c: Regenerate.
11923         * features/i386/32bit-linux.c: Regenerate.
11924         * features/i386/32bit-mpx.c: Regenerate.
11925         * features/i386/32bit-pkeys.c: Regenerate.
11926         * features/i386/32bit-sse.c: Regenerate.
11927         * features/i386/64bit-avx.c: Regenerate.
11928         * features/i386/64bit-avx512.c: Regenerate.
11929         * features/i386/64bit-core.c: Regenerate.
11930         * features/i386/64bit-linux.c: Regenerate.
11931         * features/i386/64bit-mpx.c: Regenerate.
11932         * features/i386/64bit-pkeys.c: Regenerate.
11933         * features/i386/64bit-segments.c: Regenerate.
11934         * features/i386/64bit-sse.c: Regenerate.
11935         * features/i386/x32-core.c: Regenerate.
11936         * features/tic6x-c6xp.c: Regenerate.
11937         * features/tic6x-core.c: Regenerate.
11938         * features/tic6x-gp.c: Regenerate.
11939         * target-descriptions.c: Use common/tdesc.h.
11940         * target-descriptions.h: Likewise.
11941
11942 2018-02-24  Tom Tromey  <tom@tromey.com>
11943
11944         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
11945         (try_thread_db_load_from_dir, thread_db_load_search): Use
11946         std::string.
11947         (info_auto_load_libthread_db_compare): Return bool.  Change
11948         argument types.
11949         (info_auto_load_libthread_db): Use std::vector, std::string.
11950         Remove cleanups.
11951
11952 2018-02-24  Tom Tromey  <tom@tromey.com>
11953
11954         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
11955         std::string.
11956         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
11957         std::string*.
11958         * gdbarch.c: Rebuild.
11959         * gdbarch.h: Rebuild.
11960         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
11961         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
11962         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
11963         std::string*.
11964
11965 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
11966
11967         * gdbtypes.h (sect_offset): Change type to uint64_t.
11968         (sect_offset_str): New function.
11969         * dwarf2read.c (create_addrmap_from_aranges): Use
11970         sect_offset_str.
11971         (error_check_comp_unit_head): Likewise.
11972         (create_debug_type_hash_table): Likewise.
11973         (read_cutu_die_from_dwo): Likewise.
11974         (init_cutu_and_read_dies): Likewise.
11975         (init_cutu_and_read_dies_no_follow): Likewise.
11976         (process_psymtab_comp_unit_reader): Likewise.
11977         (partial_die_parent_scope): Likewise.
11978         (peek_die_abbrev): Likewise.
11979         (process_queue): Likewise.
11980         (dwarf2_physname): Likewise.
11981         (read_namespace_alias): Likewise.
11982         (read_import_statement): Likewise.
11983         (create_dwo_cu_reader): Likewise.
11984         (create_cus_hash_table): Likewise.
11985         (lookup_dwo_cutu): Likewise.
11986         (inherit_abstract_dies): Likewise.
11987         (read_func_scope): Likewise.
11988         (read_call_site_scope): Likewise.
11989         (dwarf2_add_member_fn): Likewise.
11990         (read_common_block): Likewise.
11991         (read_module_type): Likewise.
11992         (read_typedef): Likewise.
11993         (read_subrange_type): Likewise.
11994         (load_partial_dies): Likewise.
11995         (read_partial_die): Likewise.
11996         (find_partial_die): Likewise.
11997         (read_str_index): Likewise.
11998         (dwarf2_string_attr): Likewise.
11999         (build_error_marker_type): Likewise.
12000         (lookup_die_type): Likewise.
12001         (dump_die_shallow): Likewise.
12002         (follow_die_ref): Likewise.
12003         (dwarf2_fetch_die_loc_sect_off): Likewise.
12004         (dwarf2_fetch_constant_bytes): Likewise.
12005         (follow_die_sig): Likewise.
12006         (get_signatured_type): Likewise.
12007         (get_DW_AT_signature_type): Likewise.
12008         (dwarf2_find_containing_comp_unit): Likewise.
12009         (set_die_type): Likewise.
12010
12011 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
12012
12013         * arch/aarch64.c: Include "common-defs.h".
12014         * arch/amd64.c: Likewise.
12015         * arch/i386.c: Likewise.
12016
12017 2018-02-21  Tom Tromey  <tom@tromey.com>
12018
12019         * value.h: (extract_field_op): Update.
12020         * eval.c (extract_field_op): Return a const char *.
12021         * expression.h (parse_expression_for_completion): Update.
12022         * completer.c (complete_expression): Update.
12023         (add_struct_fields): Make fieldname const.
12024         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12025         (mark_completion_tag, parse_exp_in_context_1): Update.
12026         (parse_expression_for_completion): Change "name" to
12027         unique_xmalloc_ptr*.
12028
12029 2018-02-21  Tom Tromey  <tom@tromey.com>
12030
12031         * infcall.c (call_function_by_hand_dummy): Use std::vector.
12032
12033 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12034
12035         * avr-tdep.c (avr_read_pc): Change parameter type to
12036         readable_regcache.
12037         * gdbarch.sh (read_pc): Likewise.
12038         * gdbarch.c: Re-generated.
12039         * gdbarch.h: Re-generated.
12040         * hppa-tdep.c (hppa_read_pc): Change parameter type to
12041         readable_regcache.
12042         * ia64-tdep.c (ia64_read_pc): Likewise.
12043         * mips-tdep.c (mips_read_pc): Likewise.
12044         * spu-tdep.c (spu_read_pc): Likewise.
12045
12046 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12047
12048         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12049         * regcache-dump.c: New file.
12050         * regcache.c: Move register_dump to regcache-dump.c.
12051         (maintenance_print_registers): Likewise.
12052         (maintenance_print_raw_registers): Likewise.
12053         (maintenance_print_cooked_registers): Likewise.
12054         (maintenance_print_register_groups): Likewise.
12055         (maintenance_print_remote_registers): Likewise.
12056         (_initialize_regcache): Likewise.
12057         * regcache.h (register_dump): Moved from regcache.c.
12058
12059 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12060
12061         * regcache.c (regcache::regcache): Update.
12062         (regcache::invalidate): Move it to detached_regcache::invalidate.
12063         (get_thread_arch_aspace_regcache): Update.
12064         (regcache::raw_update): Update.
12065         (regcache::cooked_read): Remove some code.
12066         (regcache::cooked_read_value): Likewise.
12067         (regcache::raw_write): Remove assert on m_readonly_p.
12068         (regcache::raw_supply_integer): Move it to
12069         detached_regcache::raw_supply_integer.
12070         (regcache::raw_supply_zeroed): Likewise.
12071         * regcache.h (detached_regcache) <raw_supply_integer>: New
12072         declaration.
12073         <raw_supply_zeroed, invalidate>: Likewise.
12074         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12075         <invalidate>: Likewise.
12076         <m_readonly_p>: Removed.
12077
12078 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12079
12080         * infcmd.c (get_return_value): Let stop_regs point to
12081         get_current_regcache.
12082         * regcache.c (regcache::regcache): Remove.
12083         (register_dump_reg_buffer): New class.
12084         (regcache_print): Adjust.
12085         * regcache.h (regcache): Remove constructors.
12086
12087 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12088
12089         * regcache.c (class register_dump): New class.
12090         (register_dump_regcache, register_dump_none): New class.
12091         (register_dump_remote, register_dump_groups): New class.
12092         (regcache_print): Update.
12093         * regcache.h (regcache_dump_what): Move it to regcache.c.
12094         (regcache) <dump>: Remove.
12095
12096 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12097
12098         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12099          reg_buffer_rw *.
12100         (jit_unwind_reg_set_impl): Call raw_supply.
12101         (jit_frame_sniffer): Use reg_buffer_rw.
12102         * record-full.c (record_full_core_regbuf): Change its type.
12103         (record_full_core_open_1): Use reg_buffer_rw.
12104         (record_full_close): Likewise.
12105         (record_full_core_fetch_registers): Use regcache->raw_supply.
12106         (record_full_core_store_registers): Likewise.
12107         * regcache.c (regcache::get_register_status): Move it to
12108         reg_buffer.
12109         (regcache_raw_set_cached_value): Remove.
12110         (regcache::raw_set_cached_value): Remove.
12111         (regcache::raw_write): Call raw_supply.
12112         (regcache::raw_supply): Move it to reg_buffer_rw.
12113         * regcache.h (regcache_raw_set_cached_value): Remove.
12114         (reg_buffer_rw): New class.
12115
12116 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12117
12118         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12119         readonly_detached_regcache.
12120         (dummy_frame_prev_register): Use regcache->cooked_read.
12121         * frame.c (frame_save_as_regcache): Change return type.
12122         (frame_pop): Update.
12123         * frame.h (frame_save_as_regcache): Update declaration.
12124         * inferior.h (get_infcall_suspend_state_regcache): Update
12125         declaration.
12126         * infrun.c (infcall_suspend_state) <registers>: use
12127         readonly_detached_regcache.
12128         (save_infcall_suspend_state): Don't use regcache_dup.
12129         (get_infcall_suspend_state_regcache): Change return type.
12130         * linux-fork.c (struct fork_info) <savedregs>: Change to
12131         readonly_detached_regcache.
12132         <pc>: New field.
12133         (fork_save_infrun_state): Don't use regcache_dup.
12134         (info_checkpoints_command): Adjust.
12135         * mi/mi-main.c (register_changed_p): Update declaration.
12136         (mi_cmd_data_list_changed_registers): Use
12137         readonly_detached_regcache.
12138         (register_changed_p): Change parameter type to
12139         readonly_detached_regcache.
12140         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12141         readonly_detached_regcache.
12142         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12143         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12144         New.
12145         (regcache::save): Move it to reg_buffer.
12146         (regcache::restore): Change parameter type.
12147         (regcache_dup): Remove.
12148         * regcache.h (reg_buffer) <save>: New method.
12149         (readonly_detached_regcache): New class.
12150         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12151         readonly_detached_regcache.
12152         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12153
12154 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12155
12156         * frame.c (frame_save_as_regcache): Use regcache method save.
12157         (frame_pop): Use regcache method restore.
12158         * infrun.c (restore_infcall_suspend_state): Likewise.
12159         * linux-fork.c (fork_load_infrun_state): Likewise.
12160         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12161         save.
12162         * regcache.c (regcache_save): Remove.
12163         (regcache::restore): More asserts.
12164         (regcache_cpy): Remove.
12165         * regcache.h (regcache_save): Remove the declaration.
12166         (regcache::restore): Move from private to public.
12167         Remove the friend declaration of regcache_cpy.
12168         (regcache_cpy): Remove declaration.
12169
12170 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12171
12172         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12173         parameter type to 'readable_regcache *'.
12174         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12175         * arm-tdep.c (arm_neon_quad_read): Likewise.
12176         (arm_pseudo_read): Likewise.
12177         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12178         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12179         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12180         * gdbarch.c: Re-generated.
12181         * gdbarch.h: Re-generated.
12182         * gdbarch.sh (pseudo_register_read): Change parameter type to
12183         'readable_regcache *'.
12184         (pseudo_register_read_value): Likewise.
12185         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12186         (h8300_pseudo_register_read): Likewise.
12187         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12188         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12189         (i386_pseudo_register_read_into_value): Likewise.
12190         (i386_pseudo_register_read_value): Likewise.
12191         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12192         declaration.
12193         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12194         * m32c-tdep.c (m32c_raw_read): Likewise.
12195         (m32c_read_flg): Likewise.
12196         (m32c_banked_register): Likewise.
12197         (m32c_banked_read): Likewise.
12198         (m32c_sb_read): Likewise.
12199         (m32c_part_read): Likewise.
12200         (m32c_cat_read): Likewise.
12201         (m32c_r3r2r1r0_read): Likewise.
12202         (m32c_pseudo_register_read): Likewise.
12203         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12204         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12205         (mep_pseudo_cr64_read): Likewise.
12206         (mep_pseudo_register_read): Likewise.
12207         * mips-tdep.c (mips_pseudo_register_read): Likewise.
12208         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12209         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12210         * regcache.c (regcache::raw_read): Move it to readable_regcache.
12211         (regcache::cooked_read): Likewise.
12212         (regcache::cooked_read_value): Likewise.
12213         (regcache_cooked_read_signed):
12214         (regcache::cooked_read): Likewise.
12215         * regcache.h (readable_regcache): New class.
12216         (regcache): Inherit readable_regcache.  Move some methods to
12217         readable_regcache.
12218         * rl78-tdep.c (rl78_pseudo_register_read): Change
12219         parameter type to 'readable_regcache *'.
12220         * rs6000-tdep.c (do_regcache_raw_read): Remove.
12221         (e500_pseudo_register_read): Change parameter type to
12222         'readable_regcache *'.
12223         (dfp_pseudo_register_read): Likewise.
12224         (vsx_pseudo_register_read): Likewise.
12225         (efpr_pseudo_register_read): Likewise.
12226         * s390-tdep.c (s390_pseudo_register_read): Likewise.
12227         * sh-tdep.c (sh_pseudo_register_read): Likewise.
12228         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12229         (sh64_pseudo_register_read): Likewise.
12230         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12231         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12232         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12233         (spu_pseudo_register_read): Likewise.
12234         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12235         (xtensa_pseudo_register_read): Likewise.
12236
12237 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12238
12239         * regcache.c (regcache::regcache): Call reg_buffer ctor.
12240         (regcache::arch): Move it to reg_buffer::arch.
12241         (regcache::register_buffer): Likewise.
12242         (regcache::assert_regnum): Likewise.
12243         (regcache::num_raw_registers): Likewise.
12244         * regcache.h (reg_buffer): New class.
12245         (regcache): Inherit reg_buffer.
12246
12247 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
12248
12249         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12250         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12251
12252 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
12253
12254         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12255
12256 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
12257
12258         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12259         (SFILES): Remove common/*.c files.
12260         (COMMON_OBS): Remove some *.o files built from common/*.c files.
12261         * common/common.host: Add common reference.
12262         * configure.ac: Likewise.
12263         * configure: Regenerate.
12264
12265 2018-02-16  Yao Qi  <yao.qi@linaro.org>
12266
12267         * block.c (block_namespace_info): Inherit allocate_on_obstack.
12268         (block_initialize_namespace): Use new.
12269         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12270         (dwarf2_free_objfile): Use delete.
12271         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12272         (copy_type_recursive): Use new.
12273         * gdb_obstack.h (allocate_on_obstack): New.
12274
12275 2018-02-15  Yao Qi  <yao.qi@linaro.org>
12276
12277         PR gdb/22849
12278         * inferior.c (exit_inferior_1): Reset inf->control.
12279
12280 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
12281
12282         * ada-lang.c (ada_to_fixed_value_create): Delete advance
12283         declaration.
12284
12285 2018-02-14  Pedro Alves  <palves@redhat.com>
12286
12287         * frame-unwind.c (frame_unwind_try_unwinder): Always call
12288         frame_cleanup_after_sniffer on exception.
12289
12290 2018-02-14  Tom Tromey  <tom@tromey.com>
12291
12292         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12293         const.
12294         (solib_bfd_open): Make pathname const.
12295         * solib.c (solib_bfd_open): Make pathname const.
12296         * solib-spu.c (spu_bfd_fopen): Make name const.
12297         (spu_bfd_open): Make pathname const.
12298         * solib-darwin.c (darwin_bfd_open): Make pathname const.
12299         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12300
12301 2018-02-14  Tom Tromey  <tom@tromey.com>
12302
12303         * symfile.c (symfile_bfd_open): Update.
12304         * source.h (openp, source_full_path_of, find_and_open_source):
12305         Change argument type to unique_xmalloc_ptr.
12306         * source.c (openp): Take a unique_xmalloc_ptr.
12307         (source_full_path_of, find_and_open_source): Likewise.
12308         (open_source_file, symtab_to_fullname): Update.
12309         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12310         unique_xmalloc_ptr.
12311         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12312         (exec_file_find): Update.
12313         * psymtab.c (psymtab_to_fullname): Update.
12314         * nto-tdep.h (nto_find_and_open_solib): Update.
12315         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12316         unique_xmalloc_ptr.
12317         * exec.c (exec_file_attach): Update.
12318         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12319         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12320
12321 2018-02-14  Tom Tromey  <tom@tromey.com>
12322
12323         * solib.c: Include source.h.
12324         * nto-tdep.c: Include source.h.
12325         * mi/mi-cmd-env.c: Include source.h.
12326         * infcmd.c: Include source.h.
12327         * exec.c: Include source.h.
12328         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12329         (add_path, directory_switch, source_path, init_source_path): Move
12330         declarations...
12331         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12332         (add_path, directory_switch, source_path, init_source_path):
12333         ...here.
12334
12335 2018-02-14  Tom Tromey  <tom@tromey.com>
12336
12337         * solist.h (exec_file_find, solib_find): Return
12338         unique_xmalloc_ptr.
12339         (solib_bfd_fopen): Take a const char *.
12340         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12341         (exec_file_find, solib_find): Likewise.
12342         (solib_bfd_fopen): Do not take ownership of "pathname".
12343         (solib_bfd_open): Use unique_xmalloc_ptr.
12344         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12345         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12346         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12347         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12348
12349 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
12350
12351         * ada-lang.c (name_match_type_from_name): Remove reference to
12352         ada_name_for_lookup in function's documentation.
12353         * ada-lang.h (ada_name_for_lookup): Delete declaration.
12354
12355 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12356
12357         * defs.h (enum openp_flags): New enum.
12358         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12359         Move to enum openp_flags.
12360         (openp_flags): New enum flags.
12361         (openp): Change parameter type to openp_flags.
12362         * source.c (openp): Change parameter type to openp_flags.
12363         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12364         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12365
12366 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12367
12368         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12369         per-command.
12370
12371 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12372
12373         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12374         into...
12375         (class dwarf2_queue_guard): ...the destructor of this new class.
12376         (dw2_do_instantiate_symtab): Create instance of the new class
12377         dwarf2_queue_guard, remove cleanup.
12378
12379 2018-02-09  Tom Tromey  <tom@tromey.com>
12380
12381         * source.c (find_source_lines): Don't reference past the end of
12382         the vector.
12383
12384 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12385
12386         * remote.c (remote_btrace_maybe_reopen): Change error message.
12387         * btrace.c (btrace_enable): Likewise.
12388         (parse_xml_btrace): Likewise.
12389         (parse_xml_btrace_conf): Likewise.
12390
12391 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12392
12393         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12394         (linux_enable_pt, linux_enable_bts): Call
12395         diagnose_perf_event_open_fail.
12396
12397 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12398
12399         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12400         Remove parameter and change return type.  Update callers.  Move it.
12401         (linux_enable_bts, linux_enable_pt): Improve error message.
12402         (linux_enable_pt): Remove zero buffer size check.
12403         (linux_enable_btrace): Improve error messages.  Remove NULL return
12404         check.
12405
12406 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12407
12408         * btrace.c (btrace_enable): Remove target_supports_btrace call.
12409         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12410         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12411         (linux_supports_pt, linux_supports_btrace): Remove.
12412         (linux_enable_bts): Call cpu_supports_bts.
12413         * nat/linux-btrace.h (linux_supports_btrace): Remove.
12414         * remote.c (remote_supports_btrace): Remove.
12415         (init_remote_ops): Remove remote_supports_btrace.
12416         * target-delegates.c: Regenerated.
12417         * target.c (target_supports_btrace): Remove.
12418         * target.h (target_ops) <to_supports_btrace>: Remove
12419         (target_supports_btrace): Remove.
12420         * x86-linux-nat.c (x86_linux_create_target): Remove
12421         linux_supports_btrace.
12422
12423 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12424
12425         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12426         btrace failed.
12427         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12428         exception and use message in own exception.
12429
12430 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12431
12432         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12433         (perf_event_pt_event_type): Use gdb_file_up.
12434         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12435         scoped_fd, and scoped_mmap.
12436
12437 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12438
12439         * common/scoped_mmap.h: New.
12440         * unittests/scoped_mmap-selftest.c: New.
12441         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12442         unittests/scoped_mmap-selftest.c.
12443
12444 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12445
12446         * common/scoped_fd.h: New.
12447         * unittests/scoped_fd-selftest.c: New.
12448         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12449         unittests/scoped_fd-selftest.c.
12450
12451 2018-02-09  Tom Tromey  <tom@tromey.com>
12452
12453         * auto-load.c (auto_load_section_scripts): Use
12454         gdb::unique_xmalloc_ptr.
12455
12456 2018-02-09  Tom Tromey  <tom@tromey.com>
12457
12458         * auto-load.c (execute_script_contents): Use std::string.
12459
12460 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
12461
12462         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12463         Python function, rather than a new command.
12464
12465 2018-02-08  Tom Tromey  <tom@tromey.com>
12466
12467         * solib.c (solib_find_1): Use std::string.
12468         (solib_bfd_fopen): Use unique_xmalloc_ptr.
12469
12470 2018-02-08  Tom Tromey  <tom@tromey.com>
12471
12472         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12473
12474 2018-02-08  Tom Tromey  <tom@tromey.com>
12475
12476         * source.c (find_source_lines): Use gdb::def_vector.
12477
12478 2018-02-08  Tom Tromey  <tom@tromey.com>
12479
12480         * macrocmd.c (struct temporary_macro_definition): New.
12481         (macro_define_command): Use temporary_macro_definition.  Remove
12482         cleanups.
12483         (free_macro_definition_ptr): Remove.
12484
12485 2018-02-08  Tom Tromey  <tom@tromey.com>
12486
12487         * macroexp.c (maybe_expand): Use std::string.
12488
12489 2018-02-08  Tom Tromey  <tom@tromey.com>
12490
12491         * macroexp.c (struct macro_buffer): Add initializers for some
12492         members.
12493         (init_buffer, init_shared_buffer, free_buffer)
12494         (free_buffer_return_text): Remove.
12495         (macro_buffer): New constructors.
12496         (~macro_buffer): New destructor.
12497         (macro_buffer::set_shared): New method.
12498         (macro_buffer::resize_buffer, macro_buffer::appendc)
12499         (macro_buffer::appendmem): Now methods, not free functions.
12500         (set_token, append_tokens_without_splicing, stringify)
12501         (macro_stringify): Update.
12502         (gather_arguments): Change return type.  Remove argc_p argument,
12503         add args_ptr argument.  Use std::vector.
12504         (substitute_args): Remove argc argument.  Accept std::vector.
12505         (expand): Update.  Use std::vector.
12506         (scan, macro_expand, macro_expand_next): Update.
12507
12508 2018-02-08  Tom Tromey  <tom@tromey.com>
12509
12510         * symtab.c (default_collect_symbol_completion_matches_break_on):
12511         Use unique_xmalloc_ptr.
12512         * macroscope.h: (sal_macro_scope, user_macro_scope)
12513         (default_macro_scope): Return unique_xmalloc_ptr.
12514         * macroscope.c (sal_macro_scope, user_macro_scope)
12515         (default_macro_scope): Return unique_xmalloc_ptr.
12516         * macroexp.h (macro_expand, macro_expand_once): Return
12517         unique_xmalloc_ptr.
12518         * macroexp.c (macro_expand, macro_expand_once): Return
12519         unique_xmalloc_ptr.
12520         * macrocmd.c (macro_expand_command, macro_expand_once_command)
12521         (info_macro_command, info_macros_command): Use
12522         unique_xmalloc_ptr.
12523         * compile/compile-c-support.c (write_macro_definitions): Use
12524         unique_xmalloc_ptr.
12525         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12526
12527 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
12528
12529         * value.c (value_static_field): Assign field type instead of
12530         containing type when returning an optimized out value.
12531
12532 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12533
12534         * ft32-tdep.c (ft32_read_pc): Remove.
12535         (ft32_write_pc): Remove.
12536         (ft32_gdbarch_init): Update.
12537         * m32r-tdep.c (m32r_read_pc): Remove.
12538         (m32r_gdbarch_init): Update.
12539         * mep-tdep.c (mep_read_pc): Remove.
12540         (mep_gdbarch_init): Update.
12541         * microblaze-tdep.c (microblaze_write_pc): Remove.
12542         (microblaze_gdbarch_init): Update.
12543         * mn10300-tdep.c (mn10300_read_pc): Remove.
12544         (mn10300_write_pc): Remove.
12545         (mn10300_gdbarch_init): Update.
12546         * moxie-tdep.c (moxie_read_pc): Remove.
12547         (moxie_write_pc): Remove.
12548         (moxie_gdbarch_init): Update.
12549
12550 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12551
12552         * expprint.c (print_subexp_standard): Handle
12553         OP_F77_UNDETERMINED_ARGLIST.
12554         (dump_subexp_body_standard): Likewise.
12555
12556 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
12557
12558         * target-descriptions.c (tdesc_element_visitor) Add empty
12559         implementations.
12560         (tdesc_type): Move make_gdb_type from here.
12561         (tdesc_type_builtin): Likewise.
12562         (tdesc_type_vector): Likewise.
12563         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12564         (make_gdb_type_struct): Move from tdesc_type_with_fields.
12565         (make_gdb_type_union): Likewise.
12566         (make_gdb_type_flags): Likewise.
12567         (make_gdb_type_enum): Likewise.
12568         (make_gdb_type): New function.
12569         (tdesc_register_type): Use static make_gdb_type.
12570
12571 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
12572
12573         * infcmd.c (default_print_one_register_info): Align natural-format
12574         column values consistently one under another.
12575         (pad_to_column): New function.
12576
12577 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
12578
12579         * dwarf2read.c (dwarf2_physname): Move commment.
12580
12581 2018-02-01  Leszek Swirski  <leszeks@google.com>
12582
12583         * varobj.c (varobj_formatted_print_options): Allow recursive
12584         pretty printing if pretty printing is enabled.
12585
12586 2018-02-01  Leszek Swirski  <leszeks@google.com>
12587
12588         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12589         names after a structop as a filename.
12590
12591 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12592
12593         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12594         (arm_record_coproc_data_proc): Likewise.
12595
12596 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12597
12598         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12599
12600 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
12601
12602         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12603         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12604
12605 2018-01-31  Pedro Alves  <palves@redhat.com>
12606
12607         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12608         * inflow.c (child_terminal_save_inferior): Wrap reference to
12609         tcgetpgrp in HAVE_TERMIOS_H.
12610         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12611         _WIN32.
12612         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12613         always iterate over all inferiors.
12614         (gdbsim_cntrl_c): Adjust.
12615         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12616
12617 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12618
12619         * gdbtypes.c (lookup_array_range_type): Make sure the array's
12620         index type is objfile-owned if the element type is as well.
12621
12622 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12623
12624         GDB 8.1 released.
12625
12626 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12627
12628         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12629         "features/s390x-linux64.c".
12630         (_initialize_s390_linux_tdep): Remove initialization of tdescs
12631         s390_linux32 and s390x_linux64.
12632         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12633         default tdesc.
12634         * s390-tdep.c: Include "features/s390-linux32.c" and
12635         "features/s390x-linux64.c".
12636         (s390_tdesc_valid): Add check for tdesc_has_registers.
12637         (s390_gdbarch_init): Make sure there is always a valid tdesc.
12638         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12639         tdesc_s390x_linux64.
12640         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12641         tdesc_s390x_linux64 to...
12642         * s390-tdep.h: ...here.
12643
12644 2018-01-30  Pedro Alves  <palves@redhat.com>
12645
12646         PR gdb/13211
12647         * config.in, configure: Regenerate.
12648         * configure.ac: Check for getpgid.
12649         * go32-nat.c (go32_pass_ctrlc): New.
12650         (go32_target): Install it.
12651         * inf-child.c (inf_child_target): Install
12652         child_terminal_save_inferior, child_pass_ctrlc and
12653         child_interrupt.
12654         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12655         (inf_ptrace_target): No longer install it.
12656         * infcmd.c (interrupt_target_1): Adjust.
12657         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12658         (child_interrupt): Declare.
12659         (inferior::terminal_state): New.
12660         * inflow.c (struct terminal_info): Update comments.
12661         (inferior_process_group): Delete.
12662         (terminal_is_ours): Delete.
12663         (gdb_tty_state): New.
12664         (child_terminal_init): Adjust.
12665         (is_gdb_terminal, sharing_input_terminal_1)
12666         (sharing_input_terminal): New functions.
12667         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
12668         Set the process's actual process group in the foreground if
12669         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
12670         mark terminal as the inferior's if not sharing GDB's terminal.
12671         Don't check attach_flag.
12672         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12673         pass down a target_terminal_state.
12674         (child_terminal_save_inferior): New, factored out from ...
12675         (child_terminal_ours_1): ... this.  Handle
12676         target_terminal_state::is_ours_for_output.
12677         (child_interrupt, child_pass_ctrlc): New.
12678         (inflow_inferior_exit): Clear the inferior's terminal_state.
12679         (copy_terminal_info): Copy the inferior's terminal state.
12680         (_initialize_inflow): Remove reference to terminal_is_ours.
12681         * inflow.h (inferior_process_group): Delete.
12682         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12683         * procfs.c (procfs_target): Don't install procfs_interrupt.
12684         (procfs_interrupt): Delete.
12685         * remote.c (remote_serial_quit_handler): Adjust.
12686         (remote_interrupt): Remove ptid parameter.  Adjust.
12687         * target-delegates.c: Regenerate.
12688         * target.c: Include "terminal.h".
12689         (target_terminal::terminal_state): Rename to ...
12690         (target_terminal::m_terminal_state): ... this.
12691         (target_terminal::init): Adjust.
12692         (target_terminal::inferior): Adjust to per-inferior
12693         terminal_state.
12694         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12695         (target_terminal::ours, target_terminal::ours_for_output): Use
12696         target_terminal_is_ours_kind.
12697         (target_interrupt): Remove ptid parameter.  Adjust.
12698         (default_target_pass_ctrlc): Adjust.
12699         * target.h (target_ops::to_terminal_save_inferior): New field.
12700         (target_ops::to_interrupt): Remove ptid_t parameter.
12701         (target_interrupt): Remove ptid_t parameter.  Update comment.
12702         (target_pass_ctrlc): Update comment.
12703         * target/target.h (target_terminal_state): New scoped enum,
12704         factored out of ...
12705         (target_terminal::terminal_state): ... here.
12706         (target_terminal::inferior): Update comments.
12707         (target_terminal::restore_inferior): New.
12708         (target_terminal::is_inferior, target_terminal::is_ours)
12709         (target_terminal::is_ours_for_output): Adjust.
12710         (target_terminal::scoped_restore_terminal_state): Adjust to
12711         rename, and call restore_inferior() instead of inferior().
12712         (target_terminal::scoped_restore_terminal_state::m_state): Change
12713         type.
12714         (target_terminal::terminal_state): Rename to ...
12715         (target_terminal::m_terminal_state): ... this and change type.
12716
12717 2018-01-30  Pedro Alves  <palves@redhat.com>
12718
12719         * linux-nat.c (wait_for_signal): New function.
12720         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12721         directly.
12722         (async_terminal_is_ours)
12723         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12724         (linux_nat_add_target): Don't override
12725         to_terminal_inferior/to_terminal_ours.
12726
12727 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
12728
12729         * remote.c (remote_follow_fork): Don't call "detach_inferior".
12730
12731 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
12732
12733         * dwarf2read.c (free_dwo_files): Add forward-declaration.
12734         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12735         dwarf2_per_objfile_free here.
12736         (dwarf2_per_objfile_free): Remove.
12737         (_initialize_dwarf2_read): Don't register
12738         dwarf2_per_objfile_free as a registry cleanup.
12739
12740 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
12741
12742         Avoid compilation errors in MinGW native builds
12743
12744         The error is triggered by including python-internal.h, and the
12745         error message is:
12746
12747              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12748                       from build-gnulib/import/math.h:27,
12749                       from d:/usr/Python26/include/pyport.h:235,
12750                       from d:/usr/Python26/include/Python.h:58,
12751                       from python/python-internal.h:94,
12752                       from python/py-arch.c:24:
12753              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12754         using ::hypot;
12755                 ^~~~~
12756
12757         This happens because Python headers define 'hypot' to expand t
12758         '_hypot' in the Windows builds.
12759         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12760         'hypoth'.  This avoids a compilation error.
12761
12762 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12763
12764         * MAINTAINERS (Write After Approval): Fix ordering.
12765
12766 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12767
12768         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12769
12770 2018-01-26  Alan Modra  <amodra@gmail.com>
12771
12772         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12773         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12774         Remove nop.  Make const.  Comment.
12775         (powerpc32_plt_stub_so_2): New.
12776         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12777         Correct count.  Update uses.
12778         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12779         Move common code reading PLT entry word.  Correct
12780         powerpc32_plt_stub PLT address calculation.
12781         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12782         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12783         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12784         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12785         (ppc64_standard_linkage8): Likewise.
12786         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12787         Correct insns description.
12788         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12789
12790 2018-01-24  Pedro Alves  <palves@redhat.com>
12791
12792         GCC PR libstdc++/83906
12793         * gdbtypes.c (operator==(const dynamic_prop &,
12794         const dynamic_prop &)): New.
12795         (operator==(const range_bounds &, const range_bounds &)): New.
12796         (check_types_equal): Use them instead of memcmp.
12797         * gdbtypes.h (operator==(const dynamic_prop &,
12798         const dynamic_prop &)): Declare.
12799         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12800         (operator==(const range_bounds &, const range_bounds &)): Declare.
12801         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12802
12803 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12804
12805         * s390-linux-tdep.c (s390_record_address_mask)
12806         (s390_record_calc_disp_common, s390_record_calc_disp)
12807         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12808         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12809         (s390_process_record): Move to s390-tdep.c.
12810         (s390_linux_init_abi_any): Adjust.
12811         * s390-tdep.c (s390_record_address_mask)
12812         (s390_record_calc_disp_common, s390_record_calc_disp)
12813         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12814         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12815         (s390_process_record): Moved from s390-linux-tdep.c
12816         (s390_gdbarch_init): Adjust.
12817
12818 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12819
12820         * s390-linux-nat.c (s390-tdep.h): New include.
12821         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12822         (HFILES_NO_SRCDIR): Add s390-tdep.h.
12823         (ALLDEPFILES): Add s390-tdep.c.
12824         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12825         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12826         * s390-tdep.h: ...this.  New file.
12827         * s390-linux-tdep.c (s390-tdep.h): New include.
12828         (_initialize_s390_tdep): Rename to...
12829         (_initialize_s390_linux_tdep): ...this and adjust.
12830         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12831         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12832         s390-tdep.h.
12833         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12834         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12835         (s390_is_partial_instruction, s390_software_single_step)
12836         (is_non_branch_ril, s390_displaced_step_copy_insn)
12837         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12838         (s390_prologue_data, s390_addr, s390_store, s390_load)
12839         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12840         (s390_register_call_saved, s390_guess_tracepoint_registers)
12841         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12842         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12843         (s390_pseudo_register_name, s390_pseudo_register_type)
12844         (s390_pseudo_register_read, s390_pseudo_register_write)
12845         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12846         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12847         (s390_addr_bits_remove, s390_address_class_type_flags)
12848         (s390_address_class_type_flags_to_name)
12849         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12850         (s390_function_arg_float, s390_function_arg_vector)
12851         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12852         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12853         (s390_frame_align, s390_register_return_value, s390_return_value)
12854         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12855         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12856         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12857         (s390_trad_frame_prev_register, s390_unwind_cache)
12858         (s390_prologue_frame_unwind_cache)
12859         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12860         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12861         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12862         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12863         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12864         (s390_frame_base_address, s390_local_base_address)
12865         (s390_frame_base, s390_gcc_target_options)
12866         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12867         (s390_validate_reg_range, s390_tdesc_valid)
12868         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12869         * s390-tdep.c: ...this.  New file.
12870
12871 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12872
12873         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12874         (s390_process_record, s390_gdbarch_tdep_alloc)
12875         (s390_linux_init_abi_any): Use/set new hook.
12876
12877 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12878
12879         * s390-linux-tdep.c (osabi.h): New include.
12880         (s390_linux_init_abi_31, s390_linux_init_abi_64)
12881         (s390_linux_init_abi_any): New functions.
12882         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12883
12884 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12885
12886         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
12887         tdesc_has_registers check
12888
12889 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12890
12891         * s390-linux-tdep.c (s390_tdesc_valid): New function.
12892         (s390_validate_reg_range): New macro.
12893         (s390_gdbarch_init): Adjust.
12894
12895 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12896
12897         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
12898         (s390_gdbarch_tdep_alloc): Adjust.
12899         (s390_gdbarch_init): Adjust.
12900
12901 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12902
12903         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
12904         <have_tdb>: Change type to bool.
12905         (s390_gdbarch_tdep_alloc): Adjust.
12906         (s390_gdbarch_init): Adjust.
12907
12908 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12909
12910         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
12911         (gdbarch_tdep) <have_upper, have_vx>: New fields.
12912         (s390_gdbarch_tdep_alloc): New function.
12913         (s390_gdbarch_init): Allocate tdep at start and use its fields
12914         instead of separate variables.
12915
12916 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12917
12918         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
12919         when looking for cached gdbarch and add comment for remaining.
12920
12921 2018-01-22  Pedro Alves  <palves@redhat.com>
12922             Sergio Durigan Junior  <sergiodj@redhat.com>
12923
12924         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
12925         case.
12926
12927 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
12928
12929         * MAINTAINERS: Update my company e-mail address.
12930
12931 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12932
12933         * regcache.c (cooked_write_test): New function.
12934         (_initialize_regcache): Register the test.
12935
12936 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12937
12938         * ia64-tdep.c (ia64_pseudo_register_read): Call
12939         regcache->cooked_read instead of regcache_cooked_read_unsigned.
12940         * m32c-tdep.c (m32c_cat_read): Likewise.
12941         (m32c_r3r2r1r0_read): Likewise.
12942         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12943         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12944
12945 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12946
12947         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
12948         method raw_read instead of regcache_raw_read.
12949         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12950         * arm-tdep.c (arm_neon_quad_read): Likewise.
12951         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12952         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12953         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12954         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
12955         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12956         (i386_pseudo_register_read_into_value): Likewise.
12957         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12958         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12959         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12960         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
12961         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
12962         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
12963         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12964         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
12965         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
12966
12967 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12968
12969         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
12970         * configure.tgt: Remove target mt.
12971         * mt-tdep.c: Remove.
12972         * regcache.c (cooked_read_test): Remove the check for mt.
12973
12974 2018-01-22  Yao Qi  <yao.qi@linaro.org>
12975
12976         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
12977         instead of gdbarch_pseudo_register_read_value.
12978
12979 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12980
12981         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
12982         language is Ada.
12983
12984 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
12985
12986         * linespec.c (create_sals_line_offset): Remove code that preserved
12987         the symtab_and_line's line number.
12988
12989 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12990
12991         * varobj.c (varobj_create): Don't set valid_block when creating a
12992         floating varobj.
12993
12994 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12995
12996         * varobj.c (varobj_create): Remove out of date comment.
12997
12998 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
12999
13000         PR mi/20395
13001         * ada-exp.y (write_var_from_sym): Pass extra parameter when
13002         updating innermost block.
13003         * parse.c (innermost_block_tracker::update): Take extra type
13004         parameter, and check types match before updating innermost block.
13005         (write_dollar_variable): Update innermost block for registers.
13006         * parser-defs.h (enum innermost_block_tracker_type): New enum.
13007         (innermost_block_tracker::innermost_block_tracker): Initialise
13008         m_types member.
13009         (innermost_block_tracker::reset): Take type parameter.
13010         (innermost_block_tracker::update): Take type parameter, and pass
13011         type through as needed.
13012         (innermost_block_tracker::m_types): New member.
13013         * varobj.c (varobj_create): Pass type when reseting innermost
13014         block.
13015
13016 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13017
13018         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13019         * ada-lang.c (resolve_subexp): Likewise.
13020         * breakpoint.c (set_breakpoint_condition) Likewise.
13021         (watch_command_1) Likewise.
13022         * c-exp.y (variable): Likewise.
13023         * d-exp.y (PrimaryExpression): Likewise.
13024         * f-exp.y (variable): Likewise.
13025         * go-exp.y (variable): Likewise.
13026         * m2-exp.y (variable): Likewise.
13027         * objfiles.c (objfile::~objfile): Likewise.
13028         * p-exp.y (variable): Likewise.
13029         * parse.c (innermost_block): Change type.
13030         * parser-defs.h (class innermost_block_tracker): New.
13031         (innermost_block): Change to innermost_block_tracker.
13032         * printcmd.c (display_command): Switch to innermost_block API.
13033         (do_one_display): Likewise.
13034         * rust-exp.y (do_one_display): Likewise.
13035         * symfile.c (clear_symtab_users): Likewise.
13036         * varobj.c (varobj_create): Switch to innermost_block API, replace
13037         use of innermost_block with block stored on varobj object.
13038
13039 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13040
13041         * expression.h (innermost_block): Remove declaration.
13042         * varobj.c: Add 'parser-defs.h' include.
13043
13044 2018-01-19  Tom Tromey  <tom@tromey.com>
13045
13046         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13047         symbols in the static and global blocks.
13048
13049 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
13050
13051         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13052         gdb_ptrace.h, and move including gdb_wait.h ...
13053         * nat/linux-ptrace.h: ... to here.
13054
13055 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13056
13057         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13058         inf_ptrace_detach_success.
13059         (inf_ptrace_detach_success): Add inferior parameter, use it
13060         instead of inferior_ptid, pass it to detach_inferior.
13061         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13062         parameter.
13063         * inferior.c (detach_inferior): Add overload that takes an
13064         inferior object.
13065         * inferior.h (detach_inferior): Likewise.
13066         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13067         use inferior_ptid, adjust call to inf_ptrace_detach_success.
13068         * linux-thread-db.c (thread_db_detach): Use inf parameter.
13069
13070 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13071
13072         * target.h (struct target_ops) <to_detach>: Add inferior
13073         parameter.
13074         (target_detach): Likewise.
13075         * target.c (dispose_inferior): Pass inferior down.
13076         (target_detach): Pass inferior down.  Assert that it is equal to
13077         the current inferior.
13078         * aix-thread.c (aix_thread_detach): Pass inferior down.
13079         * corefile.c (core_file_command): Pass current_inferior() down.
13080         * corelow.c (core_detach): Add inferior parameter.
13081         * darwin-nat.c (darwin_detach): Likewise.
13082         * gnu-nat.c (gnu_detach): Likewise.
13083         * inf-ptrace.c (inf_ptrace_detach): Likewise.
13084         * infcmd.c (detach_command): Pass current_inferior() down to
13085         target_detach.
13086         * infrun.c (follow_fork_inferior): Pass parent_inf to
13087         target_detach.
13088         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13089         target_detach.
13090         * linux-nat.c (linux_nat_detach): Add inferior parameter.
13091         * linux-thread-db.c (thread_db_detach): Likewise.
13092         * nto-procfs.c (procfs_detach): Likewise.
13093         * procfs.c (procfs_detach): Likewise.
13094         * record.c (record_detach): Likewise.
13095         * record.h (struct inferior): Forward-declare.
13096         (record_detach): Add inferior parameter.
13097         * remote-sim.c (gdbsim_detach): Likewise.
13098         * remote.c (remote_detach_1): Likewise.
13099         (remote_detach): Likewise.
13100         (extended_remote_detach): Likewise.
13101         * sol-thread.c (sol_thread_detach): Likewise.
13102         * target-debug.h (target_debug_print_inferior_p): New macro.
13103         * target-delegates.c: Re-generate.
13104         * top.c (kill_or_detach): Pass inferior down to target_detach.
13105         * windows-nat.c (windows_detach): Add inferior parameter.
13106
13107 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13108
13109         * target.h (struct target_ops) <to_detach>: Remove args
13110         parameter.
13111         (target_detach): Likewise.
13112         * target.c (dispose_inferior): Adjust.
13113         (target_detach): Remove args parameter, adjust.
13114         * aix-thread.c (aix_thread_detach): Adjust.
13115         * corefile.c (core_file_command): Adjust.
13116         * corelow.c (core_detach): Adjust.
13117         * darwin-nat.c (darwin_detach): Adjust.
13118         * gnu-nat.c (gnu_detach): Adjust.
13119         * inf-ptrace.c (inf_ptrace_detach): Adjust.
13120         * infcmd.c (detach_command): Adjust
13121         * infrun.c (follow_fork_inferior): Adjust.
13122         (handle_vfork_child_exec_or_exit): Adjust.
13123         * linux-fork.c (linux_fork_detach): Remove args parameter.
13124         * linux-fork.h (linux_fork_detach): Likewise.
13125         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13126         * linux-thread-db.c (thread_db_detach): Likewise.
13127         * nto-procfs.c (procfs_detach): Likewise.
13128         * procfs.c (procfs_detach): Likewise.
13129         (do_detach): Remove signo parameter.
13130         * record.c (record_detach): Remove args parameter.
13131         * record.h (record_detach): Likewise.
13132         * remote-sim.c (gdbsim_detach): Likewise.
13133         * remote.c (remote_detach_1): Likewise.
13134         (remote_detach): Likewise.
13135         (extended_remote_detach): Likewise.
13136         * sol-thread.c (sol_thread_detach): Likewise.
13137         * target-delegates.c: Re-generate.
13138         * top.c (struct qt_args) <args>: Remove field.
13139         (kill_or_detach): Don't pass args.
13140         (quit_force): Don't set args.
13141         * windows-nat.c (windows_detach): Remove args parameter.
13142
13143 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13144
13145         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13146         (arm_linux_init_abi): Install it.
13147
13148 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13149
13150         * osabi.c (gdb_osabi_names): Extend the regexp for
13151         arm-linux-gnueabihf.
13152
13153 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13154
13155         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13156         m_abbrevs.
13157         (abbrev_table::add_abbrev): Update.
13158         (abbrev_table::lookup_abbrev): Update.
13159
13160 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13161
13162         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13163
13164 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
13165
13166         * compile/compile.c (compile_to_object): Convert "triplet_rx"
13167         to "std::string".
13168
13169 2018-01-17  Tom Tromey  <tom@tromey.com>
13170
13171         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
13172
13173 2018-01-17  Tom Tromey  <tom@tromey.com>
13174
13175         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13176         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13177         (create_array_type_with_stride): Update.
13178         * dwarf2read.c (set_die_type): Update.
13179
13180 2018-01-17  Tom Tromey  <tom@tromey.com>
13181
13182         * dwarf2read.c (delayed_method_info): Remove typedef.
13183         (dwarf2_cu::method_info): Now a std::vector.
13184         (add_to_method_list): Update.
13185         (free_delayed_list): Remove.
13186         (compute_delayed_physnames): Update.
13187         (process_full_comp_unit, process_full_type_unit): Clear the method
13188         list.  Remove cleanups.
13189         (psymtab_include_file_name): Add name_holder parameter.  Use
13190         unique_xmalloc_ptr.
13191         (dwarf_decode_lines): Update.
13192
13193 2018-01-17  Tom Tromey  <tom@tromey.com>
13194             Simon Marchi  <simon.marchi@ericsson.com>
13195
13196         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13197         (dwarf2_per_objfile::free_cached_comp_units)
13198         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13199         (init_cutu_and_read_dies_no_follow): Update.
13200         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13201         (dwarf2_cu::~dwarf2_cu): New.
13202         (free_heap_comp_unit, free_stack_comp_unit): Remove.
13203         (age_cached_comp_units, free_one_cached_comp_unit): Update.
13204
13205 2018-01-17  Tom Tromey  <tom@tromey.com>
13206             Simon Marchi  <simon.marchi@ericsson.com>
13207
13208         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13209         (struct die_reader_specs) <abbrev_table>: New member.
13210         (struct abbrev_table): Add constructor.
13211         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13212         <abbrev_obstack>: Now an auto_obstack.
13213         (abbrev_table_up): New typedef.
13214         (init_cu_die_reader): Add abbrev_table parameter.
13215         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13216         Add result_dwo_abbrev_table.
13217         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13218         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13219         Update.
13220         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13221         parameter.
13222         (skip_children): Update.
13223         (abbrev_table::alloc_abbrev): Rename from
13224         abbrev_table_alloc_abbrev.
13225         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13226         (abbrev_table::lookup_abbrev): Rename from
13227         abbrev_table_lookup_abbrev.
13228         (abbrev_table_read_table): Return abbrev_table_up.
13229         (abbrev_table_free, abbrev_table_free_cleanup)
13230         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13231         (load_partial_dies): Update.
13232
13233 2018-01-17  Tom Tromey  <tom@tromey.com>
13234
13235         * dwarf2read.c (dwarf2_compute_name): Update comment.
13236         (read_func_scope, read_variable): Update.
13237         (new_symbol): Remove.
13238         (new_symbol_full): Rename to new_symbol.
13239
13240 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
13241
13242         PR gdb/16577
13243         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13244         a warning instead of throwing an error, set section size to 0 and return
13245         NULL.
13246         * gdb_bfd.h (gdb_bfd_map_section): Update description.
13247
13248 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13249
13250         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13251         std::string.
13252         (linux_ptrace_attach_fail_reason_string): Likewise.
13253         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13254         Likewise.
13255         (linux_ptrace_attach_fail_reason_string): Likewise.
13256         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13257
13258 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13259
13260         * linux-nat.c (linux_nat_attach): Remove xstrdup.
13261
13262 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
13263
13264         PR gdb/21559
13265         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13266         checking for fs_base/gs_base fields in struct user_regs_struct.
13267         * configure: Regenerate.
13268
13269 2018-01-17  Yao Qi  <yao.qi@linaro.org>
13270
13271         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13272         function.
13273         (aarch64_linux_init_abi): Install it to gdbarch hook
13274         gcc_target_options.
13275
13276 2018-01-15  Pedro Alves  <palves@redhat.com>
13277
13278         * common/signals-state-save-restore.c
13279         (save_original_signals_state): Fix typos.
13280
13281 2017-01-12  Tom Tromey  <tom@tromey.com>
13282             Sergio Durigan Junior  <sergiodj@redhat.com>
13283
13284         * Makefile.in (install-only): Install gdb-add-index.
13285
13286 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
13287
13288         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13289
13290 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13291
13292         * infrun.c (keep_going_pass_signal): Clear step-over info when
13293         insert_breakpoints fails.
13294
13295 2018-01-11  Pedro Alves  <palves@redhat.com>
13296
13297         PR gdb/22583
13298         * infrun.c (resume): Rename to ...
13299         (resume_1): ... this.
13300         (resume): Reimplement as wrapper around resume_1.
13301
13302 2018-01-11  Pedro Alves  <palves@redhat.com>
13303
13304         PR remote/22597
13305         * remote.c (remote_parse_stop_reply): Default to the last-set
13306         general thread instead of to 'magic_null_ptid'.
13307
13308 2018-01-10  Pedro Alves  <palves@redhat.com>
13309
13310         * language.h (language_get_symbol_name_matcher): Rename ...
13311         (get_symbol_name_matcher): ... this.
13312         * language.c (language_get_symbol_name_matcher): Ditto.
13313         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13314         callers adjusted.
13315
13316 2018-01-10  Pedro Alves  <palves@redhat.com>
13317
13318         PR gdb/22670
13319         * dwarf2read.c
13320         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13321         Adjust to use language_get_symbol_name_matcher instead of
13322         language_defn::la_get_symbol_name_matcher.
13323         * language.c (language_get_symbol_name_matcher): If in Ada mode
13324         and the lookup name is a verbatim match, return Ada's matcher.
13325         * language.h (language_get_symbol_name_matcher): Adjust comment.
13326         (ada_lookup_name_info::verbatim_p):: New method.
13327
13328 2018-01-10  Pedro Alves  <palves@redhat.com>
13329
13330         PR gdb/22670
13331         * ada-lang.c (ada_collect_symbol_completion_matches): If the
13332         minsym's language is language_auto or language_cplus, pass down
13333         language_ada instead.
13334         * symtab.c (compare_symbol_name): Don't frob symbol language here.
13335
13336 2018-01-10  Pedro Alves  <palves@redhat.com>
13337
13338         PR gdb/22670
13339         * minsyms.c (linkage_name_str): New function.
13340         (iterate_over_minimal_symbols): Use it.
13341
13342 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13343
13344         * NEWS: Document that 'info proc' now works on FreeBSD.
13345
13346 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13347
13348         * configure.ac: Check for kinfo_getfile in libutil.
13349         * configure: Regenerate.
13350         * config.in: Regenerate.
13351         * fbsd-nat.c: Include "fbsd-tdep.h".
13352         (fbsd_fetch_cmdline): New.
13353         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13354         rather than calling error.
13355         (fbsd_info_proc): New.
13356         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13357         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13358         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13359
13360 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13361
13362         * fbsd-nat.c (struct free_deleter): Remove.
13363         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13364
13365 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13366
13367         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13368         NULL for an empty pathname.
13369
13370 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13371
13372         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13373         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13374         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13375         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13376         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13377         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13378         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13379         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13380         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13381         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13382         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13383         (fbsd_core_fetch_timeval, fbsd_print_sigset)
13384         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13385         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
13386         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13387
13388 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
13389
13390         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13391         (gnu_xfer_auxv): New function.
13392         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13393         TARGET_OBJECT_AUXV.
13394
13395 2018-01-08  Yao Qi  <yao.qi@linaro.org>
13396             Simon Marchi  <simon.marchi@ericsson.com>
13397
13398         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13399         common/selftest.c.
13400         (COMMON_OBS): Remove selftest.o.
13401         * configure.ac: Append selftest-arch.c and common/selftest.c to
13402         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
13403         * configure: Re-generated.
13404         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13405         GDB_SELF_TEST.
13406         (maintenance_info_selftests): Likewise.
13407
13408 2018-01-08  Xavier Roirand  <roirand@adacore.com>
13409
13410         * ada-valprint.c (val_print_packed_array_elements): Use
13411         proper number of elements when printing an array indexed
13412         by an enumeration type.
13413
13414 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13415
13416         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13417         (dw2_get_file_names_reader): Adjust.
13418         (lookup_dwo_signatured_type): Adjust.
13419         (lookup_dwp_signatured_type): Adjust.
13420         (lookup_signatured_type): Adjust.
13421         (create_type_unit_group): Adjust.
13422         (get_type_unit_group): Adjust.
13423         (process_psymtab_comp_unit_reader): Adjust.
13424         (build_type_psymtabs_reader): Adjust.
13425         (scan_partial_symbols): Adjust.
13426         (add_partial_symbol): Adjust.
13427         (add_partial_subprogram): Adjust.
13428         (peek_die_abbrev): Adjust.
13429         (fixup_go_packaging): Adjust.
13430         (process_imported_unit_die): Adjust.
13431         (dwarf2_compute_name): Adjust.
13432         (dwarf2_physname): Adjust.
13433         (read_import_statement): Adjust.
13434         (handle_DW_AT_stmt_list): Adjust.
13435         (read_file_scope): Adjust.
13436         (read_func_scope): Adjust.
13437         (read_lexical_block_scope): Adjust.
13438         (read_call_site_scope): Adjust.
13439         (read_variable): Adjust.
13440         (dwarf2_rnglists_process): Adjust.
13441         (dwarf2_ranges_process): Adjust.
13442         (dwarf2_ranges_read): Adjust.
13443         (dwarf2_get_pc_bounds): Adjust.
13444         (dwarf2_record_block_ranges): Adjust.
13445         (dwarf2_add_field): Adjust.
13446         (dwarf2_add_member_fn): Adjust.
13447         (read_structure_type): Adjust.
13448         (process_structure_scope): Adjust.
13449         (read_enumeration_type): Adjust.
13450         (read_array_type): Adjust.
13451         (mark_common_block_symbol_computed): Adjust.
13452         (read_common_block): Adjust.
13453         (read_namespace_type): Adjust.
13454         (read_namespace): Adjust.
13455         (read_module_type): Adjust.
13456         (read_tag_pointer_type): Adjust.
13457         (read_tag_ptr_to_member_type): Adjust.
13458         (read_tag_string_type): Adjust.
13459         (read_subroutine_type): Adjust.
13460         (read_typedef): Adjust.
13461         (read_base_type): Adjust.
13462         (attr_to_dynamic_prop): Adjust.
13463         (read_subrange_type): Adjust.
13464         (read_unspecified_type): Adjust.
13465         (dwarf2_read_abbrevs): Adjust.
13466         (load_partial_dies): Adjust.
13467         (read_partial_die): Adjust.
13468         (find_partial_die): Adjust.
13469         (guess_partial_die_structure_name): Adjust.
13470         (fixup_partial_die): Adjust.
13471         (read_attribute_value): Adjust.
13472         (read_addr_index): Adjust.
13473         (read_addr_index_from_leb128): Adjust.
13474         (read_str_index): Adjust.
13475         (dwarf2_string_attr): Adjust.
13476         (get_debug_line_section): Adjust.
13477         (dwarf_decode_line_header): Adjust.
13478         (lnp_state_machine::check_line_address): Adjust.
13479         (dwarf_decode_lines_1): Adjust.
13480         (dwarf_decode_lines): Adjust.
13481         (dwarf2_start_symtab): Adjust.
13482         (var_decode_location): Adjust.
13483         (new_symbol_full): Adjust.
13484         (dwarf2_const_value_data): Adjust.
13485         (dwarf2_const_value_attr): Adjust.
13486         (dwarf2_const_value): Adjust.
13487         (die_type): Adjust.
13488         (die_containing_type): Adjust.
13489         (build_error_marker_type): Adjust.
13490         (lookup_die_type): Adjust.
13491         (guess_full_die_structure_name): Adjust.
13492         (anonymous_struct_prefix): Adjust.
13493         (determine_prefix): Adjust.
13494         (dwarf2_name): Adjust.
13495         (follow_die_ref_or_sig): Adjust.
13496         (follow_die_offset): Adjust.
13497         (follow_die_ref): Adjust.
13498         (follow_die_sig_1): Adjust.
13499         (follow_die_sig): Adjust.
13500         (get_signatured_type): Adjust.
13501         (get_DW_AT_signature_type): Adjust.
13502         (decode_locdesc): Adjust.
13503         (dwarf_decode_macros): Adjust.
13504         (cu_debug_loc_section): Adjust.
13505         (fill_in_loclist_baton): Adjust.
13506         (dwarf2_symbol_mark_computed): Adjust.
13507         (init_one_comp_unit): Don't assign
13508         dwarf2_cu::dwarf2_per_objfile.
13509         (set_die_type): Adjust.
13510
13511 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13512
13513         * dwarf2read.c (struct mapped_debug_names): Add constructor.
13514         <dwarf2_per_objfile>: New field.
13515         (dwarf2_per_objfile): Remove global.
13516         (get_dwarf2_per_objfile): New function.
13517         (set_dwarf2_per_objfile): New function.
13518         (dwarf2_build_psymtabs_hard): Change objfile parameter to
13519         dwarf2_per_objfile.
13520         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13521         (read_abbrev_offset): Likewise.
13522         (read_indirect_string): Likewise.
13523         (read_indirect_line_string): Likewise.
13524         (read_indirect_string_at_offset): Likewise.
13525         (read_indirect_string_from_dwz): Likewise.
13526         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13527         dwarf2_per_objfile.
13528         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13529         (create_all_comp_units): Change objfile parameter to
13530         dwarf2_per_objfile.
13531         (create_all_type_units): Likewise.
13532         (process_queue): Add dwarf2_per_objfile parameter.
13533         (read_and_check_comp_unit_head): Likewise.
13534         (lookup_dwo_unit_in_dwp): Likewise.
13535         (get_dwp_file): Likewise.
13536         (process_cu_includes): Likewise.
13537         (struct free_dwo_file_cleanup_data): New struct.
13538         (dwarf2_has_info): Use get_dwarf2_per_objfile and
13539         set_dwarf2_per_objfile.
13540         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13541         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13542         context, adjust calls.
13543         (dw2_instantiate_symtab): Likewise.
13544         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13545         (dw2_get_cu): Likewise.
13546         (create_cu_from_index_list): Change objfile parameter to
13547         dwarf2_per_objfile.
13548         (create_cus_from_index_list): Get dwarf2_per_objfile from
13549         context, adjust calls.
13550         (create_cus_from_index): Likewise.
13551         (create_signatured_type_table_from_index): Change objfile
13552         parameter to dwarf2_per_objfile.
13553         (create_signatured_type_table_from_debug_names): Change objfile
13554         parameter to dwarf2_per_objfile.
13555         (create_addrmap_from_index): Likewise.
13556         (create_addrmap_from_aranges): Likewise.
13557         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13558         (dw2_setup): Remove.
13559         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13560         context.
13561         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13562         get_dwarf2_per_objfile.
13563         (dw2_forget_cached_source_info): Likewise.
13564         (dw2_map_symtabs_matching_filename): Likewise.
13565         (struct dw2_symtab_iterator) <index>: Remove.
13566         <dwarf2_per_objfile>: New field.
13567         (dw2_symtab_iter_init): Replace index parameter with
13568         dwarf2_per_objfile.
13569         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13570         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13571         (dw2_print_stats): Likewise.
13572         (dw2_dump): Likewise.
13573         (dw2_expand_symtabs_for_function): Likewise.
13574         (dw2_expand_all_symtabs): Likewise.
13575         (dw2_expand_symtabs_with_fullname): Likewise.
13576         (dw2_expand_marked_cus): Replace index and objfile parameters
13577         with dwarf2_per_objfile.
13578         (dw_expand_symtabs_matching_file_matcher): Add
13579         dwarf2_per_objfile parameter and adjust calls.
13580         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13581         adjust calls.
13582         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13583         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13584         adjust calls.
13585         (create_cus_from_debug_names_list): Replace objfile parameter
13586         with dwarf2_per_objfile and adjust calls.
13587         (create_cus_from_debug_names): Likewise.
13588         (dwarf2_read_debug_names): Likewise.
13589         (mapped_debug_names::namei_to_name): Adjust call.
13590         (dw2_debug_names_iterator::next): Likewise.
13591         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13592         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13593         (dw2_debug_names_dump): Likewise.
13594         (dw2_debug_names_expand_symtabs_for_function): Likewise.
13595         (dw2_debug_names_expand_symtabs_matching): Likewise.
13596         (dwarf2_initialize_objfile): Likewise.
13597         (dwarf2_build_psymtabs): Likewise.
13598         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13599         this_cu.
13600         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13601         (read_and_check_comp_unit_head): Likewise.
13602         (read_abbrev_offset): Likewise.
13603         (create_debug_type_hash_table): Likewise.
13604         (create_debug_types_hash_table): Likewise.
13605         (create_all_type_units): Replace objfile parameter with
13606         dwarf2_per_objfile.
13607         (add_type_unit): Add dwarf2_per_objfile parameter.
13608         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13609         with dwarf2_per_objfile.
13610         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13611         (lookup_dwp_signatured_type): Likewise.
13612         (lookup_signatured_type): Likewise.
13613         (read_cutu_die_from_dwo): Likewise.
13614         (init_tu_and_read_dwo_dies): Likewise.
13615         (init_cutu_and_read_dies): Likewise.
13616         (init_cutu_and_read_dies_no_follow): Likewise.
13617         (allocate_type_unit_groups_table): Add objfile parameter.
13618         (create_type_unit_group): Use dwarf2_per_objfile from cu.
13619         (get_type_unit_group): Likewise.
13620         (process_psymtab_comp_unit): Update call.
13621         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13622         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13623         (print_tu_stats): Likewise.
13624         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13625         in void* parameter.
13626         (build_type_psymtabs): Change objfile parameter to
13627         dwarf2_per_objfile.
13628         (process_skeletonless_type_unit): Use dwarf2_per_objfile
13629         passed in void* parameter.
13630         (process_skeletonless_type_units): Change objfile parameter to
13631         dwarf2_per_objfile.
13632         (set_partial_user): Likewise.
13633         (dwarf2_build_psymtabs_hard): Likewise.
13634         (read_comp_units_from_section): Likewise.
13635         (create_all_comp_units): Likewise.
13636         (scan_partial_symbols): Update calls.
13637         (add_partial_symbol): Likewise.
13638         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13639         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13640         (process_queue): Add dwarf2_per_objfile parameter.
13641         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13642         (compute_compunit_symtab_includes): Likewise.
13643         (process_cu_includes): Add dwarf2_per_objfile parameter.
13644         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13645         (process_full_type_unit): Likewise.
13646         (process_imported_unit_die): Update call.
13647         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13648         (read_file_scope): Likewise.
13649         (allocate_dwo_file_hash_table): Add objfile parameter.
13650         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13651         (create_cus_hash_table): Likewise.
13652         (create_dwp_hash_table): Likewise.
13653         (create_dwo_unit_in_dwp_v1): Likewise.
13654         (create_dwp_v2_section): Likewise.
13655         (create_dwo_unit_in_dwp_v2): Likewise.
13656         (lookup_dwo_unit_in_dwp): Likewise.
13657         (try_open_dwop_file): Likewise.
13658         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13659         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13660         cleanup to include a reference to dwarf2_per_objfile.
13661         (open_dwp_file): Add dwarf2_per_objfile parameter.
13662         (open_and_init_dwp_file): Likewise.
13663         (get_dwp_file): Likewise.
13664         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13665         (queue_and_load_all_dwo_tus): Update call.
13666         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13667         data.
13668         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13669         (dwarf2_ranges_process): Likewise.
13670         (dwarf2_get_pc_bounds): Likewise.
13671         (mark_common_block_symbol_computed): Likewise.
13672         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13673         (dwarf2_read_abbrevs): Update call.
13674         (read_partial_die): Use dwarf2_per_objfile from cu.
13675         (find_partial_die): Likewise.
13676         (fixup_partial_die): Likewise.
13677         (read_attribute_value): Likewise.
13678         (read_indirect_string_at_offset_from): Add objfile parameter.
13679         (read_indirect_string_at_offset): Add dwarf2_per_objfile
13680         parameter.
13681         (read_indirect_string_from_dwz): Add objfile parameter.
13682         (read_indirect_string): Add objfile parameter.
13683         (read_addr_index_1): Add dwarf2_per_objfile parameter.
13684         (read_addr_index): Use dwarf2_per_objfile from cu.
13685         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13686         call dw2_setup.
13687         (read_str_index): Use dwarf2_per_objfile from cu.
13688         (get_debug_line_section): Likewise.
13689         (read_formatted_entries): Add dwarf2_per_objfile parameter.
13690         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13691         (new_symbol_full): Use dwarf2_per_objfile from cu.
13692         (build_error_marker_type): Likewise.
13693         (lookup_die_type): Likewise.
13694         (determine_prefix): Likewise.
13695         (follow_die_offset): Likewise.
13696         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13697         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13698         (dwarf2_fetch_die_type_sect_off): Likewise.
13699         (dwarf2_get_die_type): Likewise.
13700         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13701         (get_signatured_type): Likewise.
13702         (get_DW_AT_signature_type): Likewise.
13703         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13704         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13705         (cu_debug_loc_section): Likewise.
13706         (fill_in_loclist_baton): Likewise.
13707         (dwarf2_symbol_mark_computed): Likewise.
13708         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13709         dwarf2_per_objfile.
13710         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13711         parameter.
13712         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13713         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13714         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13715         (set_die_type): Use dwarf2_free_objfile from cu.
13716         (get_die_type_at_offset): Likewise.
13717         (dwarf2_per_objfile_free): Don't assign global variable.
13718         (debug_names) <constructor>: Add dwarf2_per_objfile
13719         parameter, update m_debugstrlookup construction.
13720         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13721         parameter.
13722         <m_dwarf2_per_objfile>: New field.
13723         <lookup>: Use m_dwarf2_per_objfile.
13724         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13725         (psyms_seen_size): Likewise.
13726         (write_gdbindex): Replace objfile parameter with
13727         dwarf2_per_objfile.
13728         (write_debug_names): Likewise.
13729         (write_psymtabs_to_index): Likewise.
13730         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13731         calls.
13732
13733 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13734
13735         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13736         <dwarf2_per_objfile>: New field.
13737         (struct dwarf2_per_cu_data) <objfile>: Remove.
13738         <dwarf2_per_objfile>: New field.
13739         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13740         of objfile.
13741         (create_signatured_type_table_from_index): Likewise.
13742         (create_debug_type_hash_table): Likewise.
13743         (fill_in_sig_entry_from_dwo_entry): Likewise.
13744         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13745         (create_type_unit_group): Assign dwarf2_per_objfile instead of
13746         objfile.
13747         (create_partial_symtab): Access objfile through
13748         dwarf2_per_objfile.
13749         (process_psymtab_comp_unit_reader): Likewise.
13750         (read_comp_units_from_section): Likewise.
13751         (scan_partial_symbols): Likewise.
13752         (add_partial_symbol): Likewise.
13753         (add_partial_subprogram): Likewise.
13754         (peek_die_abbrev): Likewise.
13755         (fixup_go_packaging): Likewise.
13756         (process_full_comp_unit): Likewise.
13757         (process_full_type_unit): Likewise.
13758         (process_imported_unit_die): Likewise.
13759         (dwarf2_compute_name): Likewise.
13760         (dwarf2_physname): Likewise.
13761         (read_import_statement): Likewise.
13762         (create_cus_hash_table): Assign dwarf2_physname instead of
13763         objfile.
13764         (read_func_scope): Access objfile through dwarf2_per_objfile.
13765         (read_lexical_block_scope): Likewise.
13766         (read_call_site_scope): Likewise.
13767         (read_variable): Likewise.
13768         (dwarf2_rnglists_process): Likewise.
13769         (dwarf2_ranges_process): Likewise.
13770         (dwarf2_ranges_read): Likewise.
13771         (dwarf2_record_block_ranges): Likewise.
13772         (dwarf2_add_field): Likewise.
13773         (dwarf2_add_member_fn): Likewise.
13774         (read_structure_type): Likewise.
13775         (process_structure_scope): Likewise.
13776         (read_enumeration_type): Likewise.
13777         (read_array_type): Likewise.
13778         (read_common_block): Likewise.
13779         (read_namespace_type): Likewise.
13780         (read_namespace): Likewise.
13781         (read_module_type): Likewise.
13782         (read_tag_pointer_type): Likewise.
13783         (read_tag_ptr_to_member_type): Likewise.
13784         (read_tag_string_type): Likewise.
13785         (read_subroutine_type): Likewise.
13786         (read_typedef): Likewise.
13787         (read_base_type): Likewise.
13788         (attr_to_dynamic_prop): Likewise.
13789         (read_subrange_type): Likewise.
13790         (read_unspecified_type): Likewise.
13791         (load_partial_dies): Likewise.
13792         (read_partial_die): Likewise.
13793         (find_partial_die): Likewise.
13794         (guess_partial_die_structure_name): Likewise.
13795         (fixup_partial_die): Likewise.
13796         (read_attribute_value): Likewise.
13797         (read_addr_index_from_leb128): Likewise.
13798         (dwarf2_read_addr_index): Likewise.
13799         (dwarf2_string_attr): Likewise.
13800         (lnp_state_machine::check_line_address): Likewise.
13801         (dwarf_decode_lines_1): Likewise.
13802         (dwarf_decode_lines): Likewise.
13803         (dwarf2_start_symtab): Likewise.
13804         (var_decode_location): Likewise.
13805         (new_symbol_full): Likewise.
13806         (dwarf2_const_value_data): Likewise.
13807         (dwarf2_const_value_attr): Likewise.
13808         (dwarf2_const_value): Likewise.
13809         (die_type): Likewise.
13810         (die_containing_type): Likewise.
13811         (lookup_die_type): Likewise.
13812         (guess_full_die_structure_name): Likewise.
13813         (anonymous_struct_prefix): Likewise.
13814         (dwarf2_name): Likewise.
13815         (follow_die_ref_or_sig): Likewise.
13816         (follow_die_offset): Likewise.
13817         (follow_die_ref): Likewise.
13818         (dwarf2_fetch_die_loc_sect_off): Likewise.
13819         (dwarf2_fetch_constant_bytes): Likewise.
13820         (dwarf2_fetch_die_type_sect_off): Likewise.
13821         (dwarf2_get_die_type): Likewise.
13822         (follow_die_sig): Likewise.
13823         (decode_locdesc): Likewise.
13824         (dwarf2_per_cu_objfile): Likewise.
13825         (dwarf2_per_cu_text_offset): Likewise.
13826         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13827         objfile.
13828         (set_die_type): Access objfile through
13829         dwarf2_per_objfile.
13830
13831 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13832
13833         * valprint.c (converted_character_d): Remove typedef.
13834         (DEF_VEC_O (converted_character_d)): Remove.
13835         (count_next_character): Use std::vector.
13836         (print_converted_chars_to_obstack): Likewise.
13837         (generic_printstr): Likewise.
13838
13839 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13840
13841         * xml-support.h (struct gdb_xml_value): Add constructor.
13842         <value>: Change type to unique_xmalloc_ptr.
13843         (gdb_xml_value_s): Remove typedef.
13844         (DEF_VEC_O (gdb_xml_value_s)): Remove.
13845         (gdb_xml_element_start_handler): Change parameter type to
13846         std::vector.
13847         (xml_find_attribute): Likewise.
13848         * xml-support.c (xml_find_attribute): Change parameter type to
13849         std::vector and adjust.
13850         (gdb_xml_values_cleanup): Remove.
13851         (gdb_xml_parser::start_element): Adjust to std::vector.
13852         (xinclude_start_include): Change paraeter type to std::vector
13853         and adjust.
13854         * btrace.c (check_xml_btrace_version): Likewise.
13855         (parse_xml_btrace_block): Likewise.
13856         (parse_xml_btrace_pt_config_cpu): Likewise.
13857         (parse_xml_btrace_pt): Likewise.
13858         (parse_xml_btrace_conf_bts): Likewise.
13859         (parse_xml_btrace_conf_pt): Likewise.
13860         * memory-map.c (memory_map_start_memory): Likewise.
13861         (memory_map_start_property): Likewise.
13862         * osdata.c (osdata_start_osdata): Likewise.
13863         (osdata_start_item): Likewise.
13864         (osdata_start_column): Likewise.
13865         * remote.c (start_thread): Likewise.
13866         * solib-aix.c (library_list_start_library): Likewise.
13867         (library_list_start_list): Likewise.
13868         * solib-svr4.c (library_list_start_library): Likewise.
13869         (svr4_library_list_start_list): Likewise.
13870         * solib-target.c (library_list_start_segment): Likewise.
13871         (library_list_start_section): Likewise.
13872         (library_list_start_library): Likewise.
13873         (library_list_start_list): Likewise.
13874         * tracepoint.c (traceframe_info_start_memory): Likewise.
13875         (traceframe_info_start_tvar): Likewise.
13876         * xml-syscall.c (syscall_start_syscall): Likewise.
13877         * xml-tdesc.c (tdesc_start_target): Likewise.
13878         (tdesc_start_feature): Likewise.
13879         (tdesc_start_reg): Likewise.
13880         (tdesc_start_union): Likewise.
13881         (tdesc_start_struct): Likewise.
13882         (tdesc_start_flags): Likewise.
13883         (tdesc_start_enum): Likewise.
13884         (tdesc_start_field): Likewise.
13885         (tdesc_start_enum_value): Likewise.
13886         (tdesc_start_vector): Likewise.
13887
13888 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13889
13890         * extension.h (struct xmethod_worker) <clone>: Remove.
13891         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
13892         Remove.
13893         (python_xmethod_worker::clone): Remove.
13894         * valops.c (find_overload_match): Use std::move instead of
13895         clone.
13896
13897 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13898
13899         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
13900         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
13901         <free_xmethod_worker_data>: Remove.
13902         <get_matching_xmethod_workers>: Chance VEC to std::vector.
13903         <get_xmethod_arg_types>: Remove.
13904         <get_xmethod_result_type>: Remove.
13905         <invoke_xmethod>: Remove.
13906         * extension.c (new_xmethod_worker): Remove.
13907         (clone_xmethod_worker): Remove.
13908         (get_matching_xmethod_workers): Return void, pass std::vector by
13909         pointer.
13910         (get_xmethod_arg_types): Rename to...
13911         (xmethod_worker::get_arg_types): ... this, and adjust.
13912         (get_xmethod_result_type): Rename to...
13913         (xmethod_worker::get_result_type): ... this, and adjust.
13914         (invoke_xmethod): Remove.
13915         (free_xmethod_worker): Remove.
13916         (free_xmethod_worker_vec): Remove.
13917         * extension.h (enum ext_lang_rc): Move here from
13918         extension-priv.h.
13919         (struct xmethod_worker): Add constructor and destructor.
13920         <data>: Remove.
13921         <value>: Remove.
13922         <invoke, clone, do_get_result_type, do_get_arg_types>: New
13923         virtual pure methods.
13924         <get_arg_types, get_result_type>: New methods.
13925         (xmethod_worker_ptr): Remove typedef.
13926         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
13927         (xmethod_worker_vec): Remove typedef.
13928         (xmethod_worker_up): New typedef.
13929         (invoke_xmethod): Remove.
13930         (clone_xmethod_worker): Remove.
13931         (free_xmethod_worker): Remove.
13932         (free_xmethod_worker_vec): Remove.
13933         (get_xmethod_arg_types): Remove.
13934         (get_xmethod_result_type): Remove.
13935         * valops.c (find_method_list): Use std::vector, don't use
13936         intermediate vector.
13937         (value_find_oload_method_list): Use std::vector.
13938         (find_overload_match): Use std::vector.
13939         (find_oload_champ): Use std::vector.
13940         * value.c (value_free): Use operator delete.
13941         (value_of_xmethod): Rename to...
13942         (value_from_xmethod): ... this.  Don't assign
13943         xmethod_worker::value, take rvalue-reference.
13944         (result_type_of_xmethod): Adjust.
13945         (call_xmethod): Adjust.
13946         * value.h: Include extension.h.
13947         (struct xmethod_worker): Don't forward-declare.
13948         (value_of_xmethod): Rename to...
13949         (value_from_xmethod): ... this, take rvalue-reference.
13950         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
13951         (struct python_xmethod_worker): ... this, add constructor and
13952         destructor.
13953         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
13954         (gdbpy_free_xmethod_worker_data): Rename to...
13955         (python_xmethod_worker::~python_xmethod_worker): ... this and
13956         adjust.
13957         (gdbpy_clone_xmethod_worker_data): Rename to...
13958         (python_xmethod_worker::clone): ... this and adjust.
13959         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
13960         temporary vector.
13961         (gdbpy_get_xmethod_arg_types): Rename to...
13962         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
13963         (gdbpy_get_xmethod_result_type): Rename to...
13964         (python_xmethod_worker::do_get_result_type): ... this and
13965         adjust.
13966         (gdbpy_invoke_xmethod): Rename to...
13967         (python_xmethod_worker::invoke): ... this and adjust.
13968         (new_python_xmethod_worker): Rename to...
13969         (python_xmethod_worker::python_xmethod_worker): ... this and
13970         adjust.
13971         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
13972         Remove.
13973         (gdbpy_free_xmethod_worker_data): Remove.
13974         (gdbpy_get_matching_xmethod_workers): Use std::vector.
13975         (gdbpy_get_xmethod_arg_types): Remove.
13976         (gdbpy_get_xmethod_result_type): Remove.
13977         (gdbpy_invoke_xmethod): Remove.
13978         * python/python.c (python_extension_ops): Remove obsolete
13979         callbacks.
13980
13981 2018-01-05  Pedro Alves  <palves@redhat.com>
13982
13983         PR gdb/18653
13984         * common/signals-state-save-restore.c
13985         (save_original_signals_state): New parameter 'quiet'.  Warn if we
13986         find a custom handler preinstalled, instead of internal erroring.
13987         But only warn if !quiet.
13988         * common/signals-state-save-restore.h
13989         (save_original_signals_state): New parameter 'quiet'.
13990         * main.c (captured_main_1): Move save_original_signals_state call
13991         after option handling, and pass QUIET.
13992
13993 2018-01-05  Pedro Alves  <palves@redhat.com>
13994
13995         * spu-tdep.c (spu_catch_start): Pass
13996         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
13997
13998 2018-01-05  Pedro Alves  <palves@redhat.com>
13999
14000         PR gdb/22670
14001         * ada-lang.c (literal_symbol_name_matcher): New function.
14002         (ada_get_symbol_name_matcher): Use it for
14003         symbol_name_match_type::SEARCH_NAME.
14004         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
14005         it down instead of assuming symbol_name_match_type::FULL.
14006         * block.h (block_lookup_symbol): New parameter 'match_type'.
14007         * c-valprint.c (print_unpacked_pointer): Use
14008         lookup_symbol_search_name instead of lookup_symbol.
14009         * compile/compile-object-load.c (get_out_value_type): Pass down
14010         symbol_name_match_type::SEARCH_NAME.
14011         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14012         symbol_name_match_type::FULL.
14013         * cp-support.c (cp_get_symbol_name_matcher): Handle
14014         symbol_name_match_type::SEARCH_NAME.
14015         * infrun.c (insert_exception_resume_breakpoint): Use
14016         lookup_symbol_search_name.
14017         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14018         * psymtab.c (maintenance_check_psymtabs): Use
14019         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14020         * stack.c (print_frame_args): Use lookup_symbol_search_name and
14021         SYMBOL_SEARCH_NAME.
14022         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14023         if symbol_name_match_type::SEARCH_NAME.
14024         (lookup_symbol_in_language): Pass down
14025         symbol_name_match_type::FULL.
14026         (lookup_symbol_search_name): New.
14027         (lookup_language_this): Pass down
14028         symbol_name_match_type::SEARCH_NAME.
14029         (lookup_symbol_aux, lookup_local_symbol): New parameter
14030         'match_type'.  Pass it down.
14031         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14032         (lookup_symbol_search_name): New declaration.
14033         (lookup_symbol_in_block): New 'match_type' parameter.
14034
14035 2018-01-05  Pedro Alves  <palves@redhat.com>
14036
14037         PR gdb/22670
14038         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14039         ada_lookup_symbol.
14040         (ada_lookup_symbol): Reimplement in terms of
14041         ada_lookup_symbol_list, bits factored out from
14042         ada_lookup_encoded_symbol.
14043
14044 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14045
14046         * ada-exp.y (write_object_renaming): When subscripting an array
14047         using a symbol as the index, pass the block in call to
14048         ada_lookup_encoded_symbol when looking that symbol up.
14049
14050 2018-01-05  Jerome Guitton  <guitton@adacore.com>
14051
14052         * ada-lang.c (ada_array_length): Use ada_index_type instead of
14053         TYPE_INDEX_TYPE.
14054
14055 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14056
14057         * ada-lang.c (ada_to_fixed_value_create): Add handling of
14058         the case where VALUE_LVAL (val0) is not lval_memory.
14059
14060 2018-01-05  Xavier Roirand  <roirand@adacore.com>
14061
14062         * ada-valprint.c (print_optional_low_bound): Handle
14063         character-indexed array printing like boolean-indexed array
14064         printing.
14065
14066 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14067
14068         * NEWS: Create a new section for the next release branch.
14069         Rename the section of the current branch, now that it has
14070         been cut.
14071
14072 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14073
14074         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14075         * version.in: Bump version to 8.1.50.DATE-git.
14076
14077 2018-01-03  Xavier Roirand  <roirand@adacore.com>
14078
14079         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14080         Add field.
14081         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14082         Add field.
14083         (default_exception_support_info) <catch_handlers_sym>: Add field.
14084         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14085         (ada_exception_name_addr_1): Add "catch handlers" handling.
14086         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14087         Update all callers.
14088         (create_excep_cond_exprs) <ex>: Add parameter.
14089         (re_set_exception): Update create_excep_cond_exprs call.
14090         (print_it_exception, print_one_exception, print_mention_exception)
14091         (print_recreate_exception): Add "catch handler" handling.
14092         (allocate_location_catch_handlers, re_set_catch_handlers)
14093         (check_status_catch_handlers, print_it_catch_handlers)
14094         (print_one_catch_handlers, print_mention_catch_handlers)
14095         (print_recreate_catch_handlers): New function.
14096         (catch_handlers_breakpoint_ops): New variable.
14097         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14098         Add parameter.  Add "catch handler" handling.
14099         (ada_exception_sym_name, ada_exception_breakpoint_ops):
14100         Add "catch handler" handling.
14101         (ada_exception_catchpoint_cond_string): Add "catch handler"
14102         handling.
14103         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14104         call.
14105         (catch_ada_handlers_command): New function.
14106         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14107         operations structure.
14108         (_initialize_ada_language): Add "catch handlers" command entry.
14109         * NEWS: Document "catch handlers" feature.
14110
14111 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14112
14113         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14114         account when creating the array type of the slice.
14115         (ada_value_slice): Likewise.
14116
14117 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14118
14119         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14120         New enum value.
14121         (create_array_type_with_stride): Add byte_stride_prop parameter.
14122         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14123         New parameter.  Update all callers in this file.
14124         (array_type_has_dynamic_stride): New function.
14125         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14126         of arrays with dynamic byte strides.
14127         * dwarf2read.c (read_array_type): Add support for dynamic
14128         DW_AT_byte_stride attributes.
14129
14130 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14131
14132         * dwarf2read.c (read_unspecified_type): Treat
14133         DW_TAG_enumeration_type DIEs from Ada units as stubs.
14134
14135 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14136
14137         Update copyright year range in all GDB files.
14138
14139 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14140
14141         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14142         and gdb/testsuite/gdb.base/step-line.c.
14143
14144 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14145
14146         * copyright.py (main): Dump the contents of
14147         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14148         even if BY_HAND is empty.
14149
14150 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14151
14152         * top.c (print_gdb_version): Update Copyright year in version
14153         message.
14154
14155 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14156
14157         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14158
14159 For older changes see ChangeLog-2017.
14160 \f
14161 Local Variables:
14162 mode: change-log
14163 left-margin: 8
14164 fill-column: 74
14165 version-control: never
14166 coding: utf-8
14167 End: