Avoid two uninitialized warnings from gcc
[external/binutils.git] / gdb / ChangeLog
1 2018-10-03  Tom Tromey  <tom@tromey.com>
2
3         * guile/scm-value.c (gdbscm_value_to_string): Initialize
4         "buffer_contents".
5         * coffread.c (coff_symtab_read): Initialize "newobj".
6
7 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
8
9         * dwarf2read.c (read_func_scope): Remove struct keyword in
10         range-based for.
11
12 2018-10-03  Tom Tromey  <tom@tromey.com>
13
14         * README: Mention --enable-ubsan.
15         * NEWS: Mention --enable-ubsan.
16         * acinclude.m4: Include sanitize.m4.
17         * configure: Rebuild.
18         * configure.ac: Call AM_GDB_UBSAN.
19         * sanitize.m4: New file.
20
21 2018-10-03  Tom Tromey  <tom@tromey.com>
22
23         * expression.h (enum exp_opcode): Use uint8_t as base type.
24         * expprint.c (op_name): Handle invalid opcodes.
25
26 2018-10-03  Tom Tromey  <tom@tromey.com>
27
28         * parse.c (prefixify_expression): Add assert.
29         (parse_exp_in_context_1): Throw exception if the expression is
30         empty.
31
32 2018-10-03  Tom Tromey  <tom@tromey.com>
33
34         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
35
36 2018-10-03  Tom Tromey  <tom@tromey.com>
37
38         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
39
40 2018-10-03  Tom Tromey  <tom@tromey.com>
41
42         * dwarf2read.c (read_subrange_type): Make "negative_mask"
43         unsigned.
44
45 2018-10-03  Tom Tromey  <tom@tromey.com>
46
47         * findvar.c (extract_integer): Do work in an unsigned type.
48
49 2018-10-03  Tom Tromey  <tom@tromey.com>
50
51         * common/enum-flags.h (enum_flags::operator~): Add static assert.
52         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
53         base type.
54         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
55         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
56         type.
57         * c-lang.h (enum c_string_type_values): Use unsigned as base
58         type.
59         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
60
61 2018-10-03  Tom Tromey  <tom@tromey.com>
62
63         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
64         <~dwarf2_frame_state_reg_info>: Update.
65         <dwarf2_frame_state_reg_info>: Update.
66         <alloc_regs>: Add assertion.  Update.
67         <reg>: Now a std::vector.
68         <num_regs>: Remove.
69         <swap>: Update.
70         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
71         (execute_cfa_program_test, dwarf2_frame_cache): Update.
72
73 2018-10-03  Tom Tromey  <tom@tromey.com>
74
75         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
76
77 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
78
79         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
80
81 2018-10-02  Tom Tromey  <tom@tromey.com>
82
83         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
84
85 2018-10-02  John Darrington <john@darrington.wattle.id.au>
86
87         * NEWS: Mention changed commands.
88         * ser-uds.c: New file.
89         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
90         * configure: Regenerate.
91         * Makefile.in: Add new file.
92         * serial.c (serial_open): Check if filename is a socket
93           and lookup the appropriate interface accordingly.
94
95 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
96
97         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
98         define.
99         (AARCH64_EXTRA_MAGIC): Likewise.
100         (AARCH64_FPSIMD_MAGIC): Likewise.
101         (AARCH64_SVE_MAGIC): Likewise.
102         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
103         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
104         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
105         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
106         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
107         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
108         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
109         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
110         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
111         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
112         (read_aarch64_ctx): Add function.
113         (aarch64_linux_sigframe_init): Detect FP registers.
114
115 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
116
117         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
118         (AARCH64_D0_REGNUM): Likewise.
119         (AARCH64_S0_REGNUM): Likewise.
120         (AARCH64_H0_REGNUM): Likewise.
121         (AARCH64_B0_REGNUM): Likewise.
122         (AARCH64_SVE_V0_REGNUM): Likewise.
123         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
124         (AARCH64_D0_REGNUM): Likewise.
125         (AARCH64_S0_REGNUM): Likewise.
126         (AARCH64_H0_REGNUM): Likewise.
127         (AARCH64_B0_REGNUM): Likewise.
128         (AARCH64_SVE_V0_REGNUM): Likewise.
129
130 2018-10-01  Gary Benson <gbenson@redhat.com>
131
132         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
133         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
134         prfpregset_t instead of gdb_prfpregset_t.
135         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
136         * configure, config.in: Rebuild.
137
138 2018-10-01  Gary Benson <gbenson@redhat.com>
139
140         * common/gdb_proc_service.h: New file, factored out from...
141         * gdb_proc_service.h: Moved common code to the above file.
142         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
143
144 2018-10-01  Gary Benson <gbenson@redhat.com>
145
146         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
147         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
148
149 2018-10-01  Gary Benson <gbenson@redhat.com>
150
151         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
152         (AC_CHECK_HEADERS): Check for linux/elf.h.
153         * configure, config.in: Rebuild.
154         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
155         doesn't define elf_fpregset_t.
156
157 2018-10-01  Gary Benson <gbenson@redhat.com>
158
159         * gdb_proc_service.h: Whitespace change.
160
161 2018-10-01  Tom Tromey  <tom@tromey.com>
162
163         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
164         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
165         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
166
167 2018-10-01  Tom Tromey  <tom@tromey.com>
168
169         * README: Minor change.
170
171 2018-09-30  Pedro Alves  <palves@redhat.com>
172
173         * darwin-nat-info.c (darwin_debug_regions_recurse)
174         (info_mach_exceptions_command): Remove unused local variables.
175         * darwin-nat.c (darwin_decode_notify_message)
176         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
177         (darwin_stop_inferior, darwin_setup_exceptions)
178         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
179         (darwin_nat_target::attach, darwin_nat_target::detach)
180         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
181         local variables.
182         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
183         variables.
184
185 2018-09-29  Tom Tromey  <tom@tromey.com>
186
187         * README: Remove some leftover text.
188
189 2018-09-29  Tom Tromey  <tom@tromey.com>
190
191         * PROBLEMS: Rewrite.
192         * README: Update.
193
194 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
195
196         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
197         case with explicit breakpoint kind.
198         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
199         'additional_info' and related logic.
200         (riscv_debug_breakpoints): New variable.
201         (riscv_breakpoint_kind_from_pc): Use the length of the existing
202         instruction to determine the breakpoint kind.
203         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
204         flag.  Update description of 'set/show riscv
205         use-compressed-breakpoints' flag.
206
207 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
208
209         (NEWS): Mention changes to frame related commands.
210         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
211         (add_prefix_cmd_suppress_notification): New function.
212         (add_com_suppress_notification): Call
213         add_cmd_suppress_notification.
214         * command.h (add_cmd_suppress_notification): Declare.
215         (add_prefix_cmd_suppress_notification): Declare.
216         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
217         (parse_frame_specification): Moved from stack.c, with
218         simplification to handle a single argument.
219         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
220         switch to the selected frame.  Add a header comment.
221         * stack.c: Remove 'safe-ctype.h' include.
222         (find_frame_for_function): Add declaration.
223         (find_frame_for_address): New function.
224         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
225         (frame_selection_by_function_completer): New function.
226         (info_frame_command): Rename to...
227         (info_frame_command_core): ...this, and update parameter types.
228         (select_frame_command): Rename to...
229         (select_frame_command_core): ...this, and update parameter types.
230         (frame_command): Rename to...
231         (frame_command_core): ...this, and update parameter types.
232         (class frame_command_helper): New class to wrap implementations of
233         frame related sub-commands.
234         (frame_apply_cmd_list): New static global.
235         (frame_cmd_list): Make static.
236         (select_frame_cmd_list): New global for sub-commands.
237         (info_frame_cmd_list): New global for sub-commands.
238         (_initialize_stack): Register sub-commands for 'frame',
239         'select-frame', and 'info frame'.  Update 'frame apply' commands
240         to use frame_apply_cmd_list.  Move function local static
241         frame_apply_list to file static frame_apply_cmd_list for
242         consistency.
243         * stack.h (select_frame_command): Delete declarationn.
244         (select_frame_for_mi): Declare new function.
245
246 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
247
248         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
249         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
250         and NOP.
251
252 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
253
254         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
255
256 2018-09-26  Tom Tromey  <tom@tromey.com>
257
258         * valops.c (auto_abandon): Remove dead code.
259
260 2018-09-26  Tom Tromey  <tom@tromey.com>
261
262         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
263
264 2018-09-24  Tom Tromey  <tom@tromey.com>
265
266         * common/pathstuff.c (get_standard_cache_dir): Make
267         "xdg_cache_home" and "home" const.
268         * top.c (init_history): Make "tmpenv" const.
269         * main.c (get_init_files): Make "homedir" const.
270
271 2018-09-23  Tom Tromey  <tom@tromey.com>
272
273         PR python/18852:
274         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
275
276 2018-09-23  Tom Tromey  <tom@tromey.com>
277
278         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
279         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
280         * python/python-internal.h (gdbpy_handle_exception): Declare.
281         * python/py-utils.c (gdbpy_handle_exception): New function.
282
283 2018-09-23  Tom Tromey  <tom@tromey.com>
284
285         PR python/17284:
286         * python/py-type.c (typy_template_argument): Check for negative
287         argument number.
288
289 2018-09-23  Tom Tromey  <tom@tromey.com>
290
291         PR python/14062:
292         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
293
294 2018-09-23  Tom Tromey  <tom@tromey.com>
295
296         PR python/18170:
297         * python/py-value.c (valpy_int): Allow conversion from pointer
298         type.
299
300 2018-09-23  Tom Tromey  <tom@tromey.com>
301
302         PR python/20126:
303         * python/py-value.c (valpy_int): Respect type sign.
304
305 2018-09-23  Tom Tromey  <tom@tromey.com>
306
307         PR python/18352;
308         * python/py-value.c (valpy_float): Allow conversions from int or
309         char.
310         (valpy_int, valpy_long): Allow conversions from float.
311
312 2018-09-23  Tom Tromey  <tom@tromey.com>
313
314         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
315         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
316
317 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
318
319         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
320         __sighndlr.
321         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
322
323 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
324
325         * windows-nat.c (windows_nat_target::wait): Remove a spurious
326         target_terminal::ours().
327
328 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
329
330         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
331         of vl to ULONGEST.
332
333 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
334
335         * breakpoint.c (update_inserted_breakpoint_locations): Remove
336         redundant condition.
337
338 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
339
340         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
341
342         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
343         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
344         * sol-thread.c (ps_pdmodel): Don't guard definition.
345
346         * procfs.c: Fix formatting.
347
348         * procfs.c (sysset_t_alloc): Remove.
349         (create_procinfo): Use XNEW instead of sysset_t_alloc.
350         (procfs_debug_inferior): Likewise.
351         (procfs_set_exec_trap): Likewise.
352         (proc_set_traced_sysentry): Don't allocate argp dynamically.
353         (proc_set_traced_sysexit): Likewise.
354
355         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
356         (dead_procinfo): Likewise.
357         (proc_warn): Likewise.
358         (proc_error): Likewise.
359         (proc_get_LDT_entry): Likewise.
360         (do_attach): Likewise.
361         (procfs_target::pid_to_str): Likewise.
362         (iterate_over_mappings): Likewise.
363
364         * procfs.c (create_procinfo): Fix ARI warning.
365         (proc_get_status): Likewise.
366         (proc_stop_process): Likewise.
367         (proc_run_process): Likewise.
368         (proc_kill): Likewise.
369         (proc_get_LDT_entry): Likewise.
370         (procfs_find_LDT_entry): Likewise.
371         (proc_update_threads): Likewise.
372         (proc_iterate_over_threads): Likewise.
373         (do_attach): Likewise.
374         (procfs_xfer_memory): Likewise.
375         (invalidate_cache): Likewise.
376         (procfs_target::resume): Likewise.
377         (procfs_init_inferior): Likewise.
378         (procfs_set_exec_trap): Likewise.
379         (procfs_target::thread_alive): Likewise.
380         (procfs_target::pid_to_exec_file): Likewise.
381         (iterate_over_mappings): Likewise.
382         (procfs_target::make_corefile_notes): Likewise.
383         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
384
385         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
386         (procfs_find_LDT_entry): Likewise.
387         * sol-thread.c (ps_lgetLDT): Likewise.
388
389 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
390
391         PR tdep/17903
392         * procfs.c (procfs_target): Declare pid_to_exec_file.
393         (procfs_target::pid_to_exec_file): New.
394
395 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
396
397         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
398         renaming.
399         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
400         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
401
402 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
403
404         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
405         (supply_fpregset, fill_fpregset): Move ...
406         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
407         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
408         Remove references to ioctl-based procfs.
409         Include <sys/reg.h>.
410         Remove PR_MODEL_NATIVE guards.
411         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
412         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
413
414 2018-09-19  Xavier Roirand  <roirand@adacore.com>
415
416         PR gdb/20981:
417         * solib-darwin.c (darwin_get_dyld_bfd): New function.
418         (darwin_solib_get_all_image_info_addr_at_init): Update call.
419         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
420
421 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
422
423         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
424         (fbsd_print_sockaddr_in6): Likewise.
425
426 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
427             Chris January  <chris.january@arm.com>
428
429         * eval.c (skip_undetermined_arglist): Skip argument list helper.
430         (evaluate_subexp_standard): Return a dummy type when
431         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
432         OP_F77_UNDETERMINED_ARGLIST case.
433         * expression.h (enum noside): Update comment.
434
435 2018-09-19  George Vasick <george.vasick@oracle.com>
436
437         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
438
439 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
440             April Chin <april.chin@oracle.com>
441             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
442
443         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
444         uint_t lwpid_t.
445         (create_procinfo): Print pids in /proc without leading zeros.
446
447 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
448
449         * nios2-tdep.c (nios2_gcc_target_options): New.
450         (nios2_gdb_arch_init): Install new hook.
451
452 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
453
454         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
455         New file.
456         * update-gnulib.sh: Apply patch.
457         * configure: Re-generate.
458
459 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
460
461         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
462         description.  Make "info proc" command descriptions more
463         consistent.
464
465 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
466
467         * NEWS: Mention 'info proc files' command.
468
469 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
470
471         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
472         descriptors for IP_FILES and IP_ALL.
473
474 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
475
476         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
477         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
478         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
479         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
480         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
481         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
482         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
483         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
484         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
485         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
486         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
487         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
488         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
489         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
490         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
491         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
492         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
493         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
494         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
495         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
496         (struct fbsd_sockaddr_un): New types.
497         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
498         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
499         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
500         (fbsd_core_info_proc_files): New functions.
501         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
502         IP_ALL.
503         * fbsd-tdep.h (fbsd_info_proc_files_header)
504         (fbsd_info_proc_files_entry): New.
505
506 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
507
508         * defs.h (enum info_proc_what) [IP_FILES]: New value.
509         * infcmd.c (info_proc_cmd_files): New function.
510         (_initialize_infcmd): Register 'info proc files' command.
511
512 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
513
514         * gnulib/aclocal-m4-deps.mk: Re-generate.
515         * gnulib/aclocal.m4: Re-generate.
516         * gnulib/config.in: Re-generate.
517         * gnulib/configure: Re-generate.
518         * gnulib/import/Makefile.am: Re-generate.
519         * gnulib/import/Makefile.in: Re-generate.
520         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
521         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
522         * gnulib/import/arpa_inet.in.h: New file.
523         * gnulib/import/inet_ntop.c: New file.
524         * gnulib/import/m4/arpa_inet_h.m4: New file.
525         * gnulib/import/m4/inet_ntop.m4: New file.
526         * gnulib/import/m4/netinet_in_h.m4: New file.
527         * gnulib/import/m4/socklen.m4: New file.
528         * gnulib/import/m4/sockpfaf.m4: New file.
529         * gnulib/import/m4/stdalign.m4: New file.
530         * gnulib/import/m4/sys_uio_h.m4: New file.
531         * gnulib/import/netinet_in.in.h: New file.
532         * gnulib/import/stdalign.in.h: New file.
533         * gnulib/import/sys_socket.c: New file.
534         * gnulib/import/sys_socket.in.h: New file.
535         * gnulib/import/sys_uio.in.h: New file.
536         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
537         module.
538
539 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
540
541         * gnulib/aclocal-m4-deps.mk: New file.
542         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
543         deterministically.
544
545 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
546
547         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
548         KVE_PATH.
549
550 2018-09-18  Tom Tromey  <tom@tromey.com>
551
552         * compile/compile-object-load.c (struct
553         link_hash_table_cleanup_data): Add constructor and destructor.
554         Use DISABLE_COPY_AND_ASSIGN.
555         (~link_hash_table_cleanup_data): Rename from
556         link_hash_table_free.  Now a destructor.
557         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
558
559 2018-09-18  Tom Tromey  <tom@tromey.com>
560
561         * compile/compile-object-run.c (do_module_cleanup): Use delete.
562         * compile/compile-object-load.c (struct munmap_list): Move to
563         header file.
564         (munmap_list::add): Rename from munmap_list_add; rewrite.
565         (munmap_list::~munmap_list): Rename from munmap_list_free.
566         (munmap_listp_free_cleanup): Remove.
567         (compile_object_load): Update.
568         * compile/compile-object-load.h (struct munmap_list): Move from
569         compile-object-load.c.  Rewrite.
570
571 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
572
573         * aarch64-tdep.c (pass_in_v): Use register size.
574         (aarch64_extract_return_value): Likewise.
575         (aarch64_store_return_value): Likewise.
576
577 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
578
579         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
580         rlim_t.
581
582 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
583
584         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
585         Fix short help line.
586
587 2018-09-17  Tom Tromey  <tom@tromey.com>
588
589         PR python/20445:
590         * configure: Rebuild.
591         * configure.ac: Conditionally use -DNDEBUG for Python.
592
593 2018-09-17  Tom Tromey  <tom@tromey.com>
594
595         * configure: Rebuild.
596         * configure.ac: Use gmp as a library dependency when checking for
597         mpfr.
598
599 2018-09-17  Pedro Alves  <palves@redhat.com>
600
601         * python/py-inferior.c (find_inferior_object): Delete.
602
603 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
604
605         * compile/compile-cplus-types.c
606         (compile_cplus_instance::enter_scope): Don't use new_scope after
607         std::move.
608
609 2018-09-17  Tom Tromey  <tom@tromey.com>
610
611         * common/pathstuff.c (get_standard_cache_dir): Use
612         ~/Library/Caches on macOS.
613         * common/pathstuff.h (get_standard_cache_dir): Update comment.
614
615 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
616
617         PR python/23669
618         * breakpoint.c (commands_cmd_element): New.
619         (_initialize_breakpoint): Assign commands_cmd_element.
620         * breakpoint.h (commands_cmd_element): New.
621         * cli/cli-script.c (while_cmd_element, if_command,
622         define_cmd_element): New.
623         (command_name_equals): Remove.
624         (process_next_line): Compare commands by pointer, not by name.
625         (_initialize_cli_script): Assign the various cmd_list_element
626         variables.
627         * compile/compile.c (compile_cmd_element): New.
628         (_initialize_compile): Assign compile_cmd_element.
629         * compile/compile.h (compile_cmd_element): New.
630         * guile/guile.c (guile_cmd_element): New.
631         (install_gdb_commands): Assign guile_cmd_element.
632         * guile/guile.h (guile_cmd_element): New.
633         * python/python.c (python_cmd_element): New.
634         (_initialize_python): Assign python_cmd_element.
635         * python/python.h (python_cmd_element): New.
636         * tracepoint.c (while_stepping_cmd_element): New.
637         (_initialize_tracepoint): Assign while_stepping_cmd_element.
638         * tracepoint.h (while_stepping_cmd_element): New.
639
640 2018-09-17  Tom Tromey  <tom@tromey.com>
641
642         * infrun.c (save_infcall_suspend_state): Return
643         infcall_suspend_state_up.
644         (save_infcall_control_state): Return infcall_control_state_up.
645         * inferior.h (save_infcall_suspend_state)
646         (save_infcall_control_state): Declare later.  Return unique
647         pointers.
648
649 2018-09-17  Tom Tromey  <tom@tromey.com>
650
651         * infrun.c (struct stop_context): Declare constructor,
652         destructor, "changed" method.
653         (stop_context::stop_context): Rename from save_stop_context.
654         (stop_context::~stop_context): Rename from
655         release_stop_context_cleanup.
656         (normal_stop): Update.
657         (stop_context::changed): Rename from stop_context_changed.  Return
658         bool.
659
660 2018-09-17  Tom Tromey  <tom@tromey.com>
661
662         * inferior.h (struct infcall_suspend_state_deleter): New.
663         (infcall_suspend_state_up): New typedef.
664         (struct infcall_control_state_deleter): New.
665         (infcall_control_state_up): New typedef.
666         (make_cleanup_restore_infcall_suspend_state)
667         (make_cleanup_restore_infcall_control_state): Don't declare.
668         * infcall.c (call_function_by_hand_dummy): Update.
669         * infrun.c (do_restore_infcall_suspend_state_cleanup)
670         (make_cleanup_restore_infcall_suspend_state): Remove.
671         (do_restore_infcall_control_state_cleanup)
672         (make_cleanup_restore_infcall_control_state): Remove.
673
674 2018-09-17  Tom Tromey  <tom@tromey.com>
675
676         * gdbthread.h (struct thread_control_state): Add initializer.
677         (class thread_info) <control>: Remove initializer.
678         * inferior.h (struct inferior_control_state): Add initializer.
679         (class inferior) <control>: Remove initializer.
680         (exit_inferior_1): Update.
681         * infrun.c (struct infcall_control_state): Add constructors.
682         (save_infcall_control_state): Use new.
683         (restore_infcall_control_state, discard_infcall_control_state):
684         Use delete.
685
686 2018-09-17  Tom Tromey  <tom@tromey.com>
687
688         * infrun.c (struct infcall_suspend_state) <registers>: Now a
689         unique_ptr.
690         <siginfo_data>: Now a unique_xmalloc_ptr.
691         (save_infcall_suspend_state, restore_infcall_suspend_state)
692         (discard_infcall_suspend_state)
693         (get_infcall_suspend_state_regcache): Update.
694
695 2018-09-17  Tom Tromey  <tom@tromey.com>
696
697         * gdbthread.h (struct thread_suspend_state): Add initializers.
698         (class thread_info) <suspend>: Remove initializer.
699         * infrun.c (struct infcall_suspend_state): Add initializers.
700         (save_infcall_suspend_state): Use new.
701         (discard_infcall_suspend_state): Use delete.
702
703 2018-09-16  Tom Tromey  <tom@tromey.com>
704
705         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
706         Remove.
707         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
708         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
709         (py_varobj_iter_new): Likewise.
710         (py_varobj_get_iterator): Use gdbpy_ref.
711
712 2018-09-16  Tom Tromey  <tom@tromey.com>
713
714         * python/py-threadevent.c (py_get_event_thread): Simplify.
715         * python/py-inferior.c (infpy_thread_from_thread_handle):
716         Return immediately after calling thread_to_thread_object.  Use
717         Py_RETURN_NONE.
718         (thread_to_thread_object): Set the exception on a NULL return.
719
720 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
721
722         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
723
724 2018-09-16  Tom Tromey  <tom@tromey.com>
725
726         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
727         Remove.
728
729 2018-09-16  Tom Tromey  <tom@tromey.com>
730
731         * python/python-internal.h (thread_to_thread_object): Change
732         return type.
733         * python/py-inferior.c (thread_to_thread_object): Return a new
734         reference.
735         (infpy_thread_from_thread_handle): Update.
736         * python/py-infthread.c (gdbpy_selected_thread): Update.
737         * python/py-stopevent.c (create_stop_event_object): Update.
738         * python/py-threadevent.c (py_get_event_thread): Return a new
739         reference.
740         (py_get_event_thread): Update.
741         * python/py-event.h (py_get_event_thread): Change return type.
742         * python/py-continueevent.c (create_continue_event_object):
743         Update.
744
745 2018-09-16  Tom Tromey  <tom@tromey.com>
746
747         * python/py-progspace.c (pspy_get_objfiles): Update.
748         * python/python-internal.h (objfile_to_objfile_object): Change
749         return type.
750         * python/py-newobjfileevent.c (create_new_objfile_event_object):
751         Update.
752         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
753         Update.
754         * python/python.c (gdbpy_get_current_objfile): Update.
755         (gdbpy_objfiles): Update.
756         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
757         Update.
758         (objfile_to_objfile_object): Return a new reference.
759         * python/py-symtab.c (stpy_get_objfile): Update.
760         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
761         Update.
762
763 2018-09-16  Tom Tromey  <tom@tromey.com>
764
765         * python/py-inferior.c (infpy_get_progspace): Update.
766         * python/python-internal.h (pspace_to_pspace_object): Change
767         return type.
768         * python/py-newobjfileevent.c
769         (create_clear_objfiles_event_object): Update.
770         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
771         Update.
772         * python/python.c (gdbpy_get_current_progspace): Update.
773         (gdbpy_progspaces): Update.
774         * python/py-progspace.c (pspace_to_pspace_object): Return a new
775         reference.
776         * python/py-objfile.c (objfpy_get_progspace): Update.
777         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
778         Update.
779
780 2018-09-16  Tom Tromey  <tom@tromey.com>
781
782         * python/lib/gdb/__init__.py (current_progspace, objfiles)
783         (solib_name, block_for_pc, find_pc_line): New functions.
784         (execute_unwinders): Update.
785         * python/py-block.c (gdbpy_block_for_pc): Remove.
786         * python/py-inferior.c (infpy_get_progspace): New function.
787         (inferior_object_getset) <progspace>: Add.
788         * python/py-progspace.c (pspy_objfiles): Rewrite.
789         (pspy_solib_name, pspy_block_for_pc)
790         (pspy_find_pc_line, pspy_is_valid): New functions.
791         (progspace_object_methods): Add entries for solib_name,
792         block_for_pc, find_pc_line, is_valid.
793         * python/python-internal.h (gdbpy_block_for_pc)
794         (build_objfiles_list): Don't declare.
795         * python/python.c: Don't include solib.h.
796         (gdbpy_solib_name, gdbpy_find_pc_line)
797         (gdbpy_get_current_progspace, build_objfiles_list)
798         (gdbpy_objfiles): Remove.
799         (GdbMethods) <current_progspace, objfiles, block_for_pc,
800         solib_name, find_pc_line>: Remove entries.
801
802 2018-09-16  Tom Tromey  <tom@tromey.com>
803
804         * top.c (new_ui_command): Use GNU style for metasyntactic
805         variables.
806         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
807         variables.
808         * maint.c (maintenance_translate_address): Remove "<>" around
809         text.
810         * interps.c (interpreter_exec_cmd): Use GNU style for
811         metasyntactic variables.
812         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
813         metasyntactic variables.
814         * tracepoint.c (tfind_range_command): Use GNU style for
815         metasyntactic variables.
816         (tfind_outside_command): Likewise.
817         (_initialize_tracepoint): Likewise.
818         * remote.c (extended_remote_target::create_inferior): Use GNU
819         style for metasyntactic variables.
820         * sparc64-tdep.c (adi_examine_command): Use GNU style for
821         metasyntactic variables.
822         (adi_assign_command): Likewise.
823
824 2018-09-16  Tom Tromey  <tom@tromey.com>
825
826         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
827         metasyntactic variables.  Print message if no disassembler options
828         are available.
829
830 2018-09-15  Tom Tromey  <tom@tromey.com>
831
832         * infcmd.c (get_inferior_args): Return const char *.
833         * inferior.h (get_inferior_args): Return type now const.
834         * linux-tdep.c (linux_fill_prpsinfo): Update.
835         * procfs.c (procfs_target::make_corefile_notes): Update.
836
837 2018-09-07  Tom Tromey  <tom@tromey.com>
838
839         * python/python.c (execute_gdb_command): Call bpstat_do_actions
840         inside the TRY.
841
842 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
843
844         * nios2-tdep.c (nios2_type_align): New.
845         (nios2_gdb_arch_init): Install type_align hook.
846
847 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
848
849         * eval.c (fake_method::fake_method): Call xzalloc directly for a
850         type that is neither object file owned, nor gdbarch owned.
851         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
852         gdbarch is non-NULL.
853         (alloc_type_instance): Allocate non-objfile owned types on the
854         gdbarch obstack.
855         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
856         using TYPE_ALLOC to ensure memory is allocated on the correct
857         obstack.
858         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
859         obstack, or the gdbarch obstack.
860         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
861
862 2018-09-14  Tom Tromey  <tom@tromey.com>
863
864         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
865         block.
866
867 2018-09-14  Tom Tromey  <tom@tromey.com>
868
869         * nat/fork-inferior.c (get_startup_shell): Remove "static".
870
871 2018-09-13  Tom Tromey  <tom@tromey.com>
872
873         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
874         static.
875
876 2018-09-13  Tom Tromey  <tom@tromey.com>
877
878         * exec.c (try_open_exec_file): Use std::string.
879
880 2018-09-13  Tom Tromey  <tom@tromey.com>
881
882         * utils.h (gdb_bfd_errmsg): Return std::string.
883         * exec.c (exec_file_attach): Update.
884         * compile/compile-object-load.c (compile_object_load): Update.
885         * utils.c (gdb_bfd_errmsg): Return std::string.
886
887 2018-09-13  Tom Tromey  <tom@tromey.com>
888
889         * procfs.c (struct procinfo_deleter): New.
890         (procinfo_up): New typedef.
891         (do_destroy_procinfo_cleanup): Remove.
892         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
893
894 2018-09-13  Tom Tromey  <tom@tromey.com>
895
896         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
897
898 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
899 2018-09-13  Tom Tromey  <tom@tromey.com>
900
901         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
902         (pspy_get_objfiles): New function.
903         (progspace_object_methods): New.
904         (pspace_object_type): Add tp_methods callback.
905         * python/python-internal.h (build_objfiles_list): New
906         declaration.
907         * python/python.c (build_objfiles_list): New function.
908         (gdbpy_objfiles): Implement using build_objfiles_list.
909         * NEWS: Mention the Progspace.objfiles method.
910
911 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
912
913         * python/py-inferior.c (infpy_get_progspace): New function.
914         (inferior_object_getset): Add progspace property.
915         * NEWS: Mention the new property.
916
917 2018-09-13  Tom Tromey  <tom@tromey.com>
918
919         PR rust/23650:
920         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
921
922 2018-09-13  Tom Tromey  <tom@tromey.com>
923
924         PR rust/23626:
925         * rust-lang.c (rust_enum_variant): Now static.
926         (rust_empty_enum_p): New function.
927         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
928         Handle empty enum.
929
930 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
931
932         * python/py-inferior.c (infpy_repr): New.
933         (inferior_object_type): Register infpy_repr.
934         * python/py-objfile.c (objfpy_repr): New.
935         (objfile_object_type): Register objfpy_repr.
936
937 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
938
939         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
940
941 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
942
943         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
944         typo.
945
946 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
947
948         * common/common-utils.c: Don't include '<sys/stat.h>'.
949         (is_regular_file): Move to...
950         * common/filestuff.c (is_regular_file): ... here.
951         * common/common-utils.h (is_regular_file): Move to...
952         * common/filestuff.h (is_regular_file): ... here.
953
954 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
955
956         * skip.c (debug_skip): New variable.
957         (skiplist_entry::do_skip_file_p): Add debug output.
958         (skiplist_entry::do_skip_gfile_p): Likewise.
959         (skiplist_entry::skip_function_p): Likewise.
960         (_initialize_step_skip): Create debug command.
961         * NEWS: Mention set/show debug skip.
962
963 2018-09-11  Xavier Roirand  <roirand@adacore.com>
964
965         * darwin-nat.c (should_disable_startup_with_shell):
966         New function.
967         (darwin_nat_target::create_inferior): Add call.
968
969 2018-09-11  Xavier Roirand  <roirand@adacore.com>
970
971         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
972         inf_port, msg_state>: Initialize.
973         (struct darwin_thread_info) <signaled, single_step>: Change
974         type and initialize.
975         (struct darwin_thread_info) <event>: Initialize.
976
977 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
978
979         PR gdb/23555
980         PR gdb/23558
981         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
982         guesses.
983
984 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
985
986         Revert:
987         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
988
989         PR gdb/23555
990         PR gdb/23558
991         * gnulib/aclocal.m4: Regenerate.
992         * gnulib/config.in: Regenerate.
993         * gnulib/configure: Regenerate.
994         * gnulib/import/Makefile.am: Update.
995         * gnulib/import/Makefile.in: Update.
996         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
997         * gnulib/import/_Noreturn.h: ... this.
998         * gnulib/import/alloca.in.h: Update.
999         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1000         * gnulib/import/arg-nonnull.h: ... this.
1001         * gnulib/import/assure.h: Update.
1002         * gnulib/import/at-func.c: Update.
1003         * gnulib/import/basename-lgpl.c: Update.
1004         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1005         * gnulib/import/c++defs.h: ... this.
1006         * gnulib/import/canonicalize-lgpl.c: Update.
1007         * gnulib/import/cdefs.h: Update.
1008         * gnulib/import/chdir-long.c: Update.
1009         * gnulib/import/chdir-long.h: Update.
1010         * gnulib/import/cloexec.c: Update.
1011         * gnulib/import/cloexec.h: Update.
1012         * gnulib/import/close.c: Update.
1013         * gnulib/import/closedir.c: Update.
1014         * gnulib/import/config.charset: Update.
1015         * gnulib/import/dirent-private.h: Update.
1016         * gnulib/import/dirent.in.h: Update.
1017         * gnulib/import/dirfd.c: Update.
1018         * gnulib/import/dirname-lgpl.c: Update.
1019         * gnulib/import/dirname.h: Update.
1020         * gnulib/import/dosname.h: Update.
1021         * gnulib/import/dup-safer-flag.c: Update.
1022         * gnulib/import/dup-safer.c: Update.
1023         * gnulib/import/dup.c: Update.
1024         * gnulib/import/dup2.c: Update.
1025         * gnulib/import/errno.in.h: Update.
1026         * gnulib/import/error.c: Update.
1027         * gnulib/import/error.h: Update.
1028         * gnulib/import/exitfail.c: Update.
1029         * gnulib/import/exitfail.h: Update.
1030         * gnulib/import/extra/update-copyright: Update.
1031         * gnulib/import/fchdir.c: Update.
1032         * gnulib/import/fcntl.c: Update.
1033         * gnulib/import/fcntl.in.h: Update.
1034         * gnulib/import/fd-hook.c: Update.
1035         * gnulib/import/fd-hook.h: Update.
1036         * gnulib/import/fd-safer-flag.c: Update.
1037         * gnulib/import/fd-safer.c: Update.
1038         * gnulib/import/fdopendir.c: Update.
1039         * gnulib/import/filename.h: Update.
1040         * gnulib/import/filenamecat-lgpl.c: Update.
1041         * gnulib/import/filenamecat.h: Update.
1042         * gnulib/import/flexmember.h: Update.
1043         * gnulib/import/float+.h: Update.
1044         * gnulib/import/float.c: Update.
1045         * gnulib/import/float.in.h: Update.
1046         * gnulib/import/fnmatch.c: Update.
1047         * gnulib/import/fnmatch.in.h: Update.
1048         * gnulib/import/fnmatch_loop.c: Update.
1049         * gnulib/import/fpucw.h: Update.
1050         * gnulib/import/frexp.c: Update.
1051         * gnulib/import/frexpl.c: Update.
1052         * gnulib/import/fstat.c: Update.
1053         * gnulib/import/fstatat.c: Update.
1054         * gnulib/import/getcwd-lgpl.c: Update.
1055         * gnulib/import/getcwd.c: Update.
1056         * gnulib/import/getdtablesize.c: Update.
1057         * gnulib/import/getlogin_r.c: Update.
1058         * gnulib/import/getprogname.c: Update.
1059         * gnulib/import/getprogname.h: Update.
1060         * gnulib/import/gettext.h: Update.
1061         * gnulib/import/gettimeofday.c: Update.
1062         * gnulib/import/glob-libc.h: Update.
1063         * gnulib/import/glob.c: Update.
1064         * gnulib/import/glob.in.h: Update.
1065         * gnulib/import/glob_internal.h: Update.
1066         * gnulib/import/glob_pattern_p.c: Update.
1067         * gnulib/import/globfree.c: Update.
1068         * gnulib/import/hard-locale.c: Update.
1069         * gnulib/import/hard-locale.h: Update.
1070         * gnulib/import/intprops.h: Update.
1071         * gnulib/import/inttypes.in.h: Update.
1072         * gnulib/import/isnan.c: Update.
1073         * gnulib/import/isnand-nolibm.h: Update.
1074         * gnulib/import/isnand.c: Update.
1075         * gnulib/import/isnanl-nolibm.h: Update.
1076         * gnulib/import/isnanl.c: Update.
1077         * gnulib/import/itold.c: Update.
1078         * gnulib/import/libc-config.h: Update.
1079         * gnulib/import/limits.in.h: Update.
1080         * gnulib/import/localcharset.c: Update.
1081         * gnulib/import/localcharset.h: Update.
1082         * gnulib/import/localtime-buffer.c: Update.
1083         * gnulib/import/localtime-buffer.h: Update.
1084         * gnulib/import/lstat.c: Update.
1085         * gnulib/import/m4/00gnulib.m4: Update.
1086         * gnulib/import/m4/__inline.m4: Update.
1087         * gnulib/import/m4/absolute-header.m4: Update.
1088         * gnulib/import/m4/alloca.m4: Update.
1089         * gnulib/import/m4/builtin-expect.m4: Update.
1090         * gnulib/import/m4/canonicalize.m4: Update.
1091         * gnulib/import/m4/chdir-long.m4: Update.
1092         * gnulib/import/m4/close.m4: Update.
1093         * gnulib/import/m4/closedir.m4: Update.
1094         * gnulib/import/m4/configmake.m4: Update.
1095         * gnulib/import/m4/d-ino.m4: Update.
1096         * gnulib/import/m4/d-type.m4: Update.
1097         * gnulib/import/m4/dirent_h.m4: Update.
1098         * gnulib/import/m4/dirfd.m4: Update.
1099         * gnulib/import/m4/dirname.m4: Update.
1100         * gnulib/import/m4/double-slash-root.m4: Update.
1101         * gnulib/import/m4/dup.m4: Update.
1102         * gnulib/import/m4/dup2.m4: Update.
1103         * gnulib/import/m4/eealloc.m4: Update.
1104         * gnulib/import/m4/environ.m4: Update.
1105         * gnulib/import/m4/errno_h.m4: Update.
1106         * gnulib/import/m4/error.m4: Update.
1107         * gnulib/import/m4/exponentd.m4: Update.
1108         * gnulib/import/m4/exponentl.m4: Update.
1109         * gnulib/import/m4/extensions.m4: Update.
1110         * gnulib/import/m4/extern-inline.m4: Update.
1111         * gnulib/import/m4/fchdir.m4: Update.
1112         * gnulib/import/m4/fcntl-o.m4: Update.
1113         * gnulib/import/m4/fcntl.m4: Update.
1114         * gnulib/import/m4/fcntl_h.m4: Update.
1115         * gnulib/import/m4/fdopendir.m4: Update.
1116         * gnulib/import/m4/filenamecat.m4: Update.
1117         * gnulib/import/m4/flexmember.m4: Update.
1118         * gnulib/import/m4/float_h.m4: Update.
1119         * gnulib/import/m4/fnmatch.m4: Update.
1120         * gnulib/import/m4/fnmatch_h.m4: Update.
1121         * gnulib/import/m4/fpieee.m4: Update.
1122         * gnulib/import/m4/frexp.m4: Update.
1123         * gnulib/import/m4/frexpl.m4: Update.
1124         * gnulib/import/m4/fstat.m4: Update.
1125         * gnulib/import/m4/fstatat.m4: Update.
1126         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1127         * gnulib/import/m4/getcwd-path-max.m4: Update.
1128         * gnulib/import/m4/getcwd.m4: Update.
1129         * gnulib/import/m4/getdtablesize.m4: Update.
1130         * gnulib/import/m4/getlogin.m4: Update.
1131         * gnulib/import/m4/getlogin_r.m4: Update.
1132         * gnulib/import/m4/getpagesize.m4: Update.
1133         * gnulib/import/m4/getprogname.m4: Update.
1134         * gnulib/import/m4/gettimeofday.m4: Update.
1135         * gnulib/import/m4/glibc21.m4: Update.
1136         * gnulib/import/m4/glob.m4: Update.
1137         * gnulib/import/m4/glob_h.m4: Update.
1138         * gnulib/import/m4/gnulib-cache.m4: Update.
1139         * gnulib/import/m4/gnulib-common.m4: Update.
1140         * gnulib/import/m4/gnulib-comp.m4: Update.
1141         * gnulib/import/m4/gnulib-tool.m4: Update.
1142         * gnulib/import/m4/hard-locale.m4: Update.
1143         * gnulib/import/m4/include_next.m4: Update.
1144         * gnulib/import/m4/inttypes-pri.m4: Update.
1145         * gnulib/import/m4/inttypes.m4: Update.
1146         * gnulib/import/m4/isnand.m4: Update.
1147         * gnulib/import/m4/isnanl.m4: Update.
1148         * gnulib/import/m4/largefile.m4: Update.
1149         * gnulib/import/m4/limits-h.m4: Update.
1150         * gnulib/import/m4/localcharset.m4: Update.
1151         * gnulib/import/m4/locale-fr.m4: Update.
1152         * gnulib/import/m4/locale-ja.m4: Update.
1153         * gnulib/import/m4/locale-zh.m4: Update.
1154         * gnulib/import/m4/localtime-buffer.m4: Update.
1155         * gnulib/import/m4/longlong.m4: Update.
1156         * gnulib/import/m4/lstat.m4: Update.
1157         * gnulib/import/m4/malloc.m4: Update.
1158         * gnulib/import/m4/malloca.m4: Update.
1159         * gnulib/import/m4/math_h.m4: Update.
1160         * gnulib/import/m4/mbrtowc.m4: Update.
1161         * gnulib/import/m4/mbsinit.m4: Update.
1162         * gnulib/import/m4/mbsrtowcs.m4: Update.
1163         * gnulib/import/m4/mbstate_t.m4: Update.
1164         * gnulib/import/m4/memchr.m4: Update.
1165         * gnulib/import/m4/memmem.m4: Update.
1166         * gnulib/import/m4/mempcpy.m4: Update.
1167         * gnulib/import/m4/memrchr.m4: Update.
1168         * gnulib/import/m4/mkdir.m4: Update.
1169         * gnulib/import/m4/mkstemp.m4: Update.
1170         * gnulib/import/m4/mmap-anon.m4: Update.
1171         * gnulib/import/m4/mode_t.m4: Update.
1172         * gnulib/import/m4/msvc-inval.m4: Update.
1173         * gnulib/import/m4/msvc-nothrow.m4: Update.
1174         * gnulib/import/m4/multiarch.m4: Update.
1175         * gnulib/import/m4/nocrash.m4: Update.
1176         * gnulib/import/m4/off_t.m4: Update.
1177         * gnulib/import/m4/onceonly.m4: Update.
1178         * gnulib/import/m4/open-cloexec.m4: Update.
1179         * gnulib/import/m4/open.m4: Update.
1180         * gnulib/import/m4/openat.m4: Update.
1181         * gnulib/import/m4/opendir.m4: Update.
1182         * gnulib/import/m4/pathmax.m4: Update.
1183         * gnulib/import/m4/rawmemchr.m4: Update.
1184         * gnulib/import/m4/readdir.m4: Update.
1185         * gnulib/import/m4/readlink.m4: Update.
1186         * gnulib/import/m4/realloc.m4: Update.
1187         * gnulib/import/m4/rename.m4: Update.
1188         * gnulib/import/m4/rewinddir.m4: Update.
1189         * gnulib/import/m4/rmdir.m4: Update.
1190         * gnulib/import/m4/save-cwd.m4: Update.
1191         * gnulib/import/m4/secure_getenv.m4: Update.
1192         * gnulib/import/m4/setenv.m4: Update.
1193         * gnulib/import/m4/signal_h.m4: Update.
1194         * gnulib/import/m4/ssize_t.m4: Update.
1195         * gnulib/import/m4/stat-time.m4: Update.
1196         * gnulib/import/m4/stat.m4: Update.
1197         * gnulib/import/m4/std-gnu11.m4: Update.
1198         * gnulib/import/m4/stdbool.m4: Update.
1199         * gnulib/import/m4/stddef_h.m4: Update.
1200         * gnulib/import/m4/stdint.m4: Update.
1201         * gnulib/import/m4/stdio_h.m4: Update.
1202         * gnulib/import/m4/stdlib_h.m4: Update.
1203         * gnulib/import/m4/strchrnul.m4: Update.
1204         * gnulib/import/m4/strdup.m4: Update.
1205         * gnulib/import/m4/strerror.m4: Update.
1206         * gnulib/import/m4/string_h.m4: Update.
1207         * gnulib/import/m4/strstr.m4: Update.
1208         * gnulib/import/m4/strtok_r.m4: Update.
1209         * gnulib/import/m4/sys_socket_h.m4: Update.
1210         * gnulib/import/m4/sys_stat_h.m4: Update.
1211         * gnulib/import/m4/sys_time_h.m4: Update.
1212         * gnulib/import/m4/sys_types_h.m4: Update.
1213         * gnulib/import/m4/tempname.m4: Update.
1214         * gnulib/import/m4/time_h.m4: Update.
1215         * gnulib/import/m4/unistd-safer.m4: Update.
1216         * gnulib/import/m4/unistd_h.m4: Update.
1217         * gnulib/import/m4/warn-on-use.m4: Update.
1218         * gnulib/import/m4/wchar_h.m4: Update.
1219         * gnulib/import/m4/wchar_t.m4: Update.
1220         * gnulib/import/m4/wctype_h.m4: Update.
1221         * gnulib/import/m4/wint_t.m4: Update.
1222         * gnulib/import/malloc.c: Update.
1223         * gnulib/import/malloc/scratch_buffer.h: Update.
1224         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1225         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1226         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1227         * gnulib/import/malloca.c: Update.
1228         * gnulib/import/malloca.h: Update.
1229         * gnulib/import/malloca.valgrind: Update.
1230         * gnulib/import/math.in.h: Update.
1231         * gnulib/import/mbrtowc.c: Update.
1232         * gnulib/import/mbsinit.c: Update.
1233         * gnulib/import/mbsrtowcs-impl.h: Update.
1234         * gnulib/import/mbsrtowcs-state.c: Update.
1235         * gnulib/import/mbsrtowcs.c: Update.
1236         * gnulib/import/memchr.c: Update.
1237         * gnulib/import/memmem.c: Update.
1238         * gnulib/import/mempcpy.c: Update.
1239         * gnulib/import/memrchr.c: Update.
1240         * gnulib/import/mkdir.c: Update.
1241         * gnulib/import/mkstemp.c: Update.
1242         * gnulib/import/msvc-inval.c: Update.
1243         * gnulib/import/msvc-inval.h: Update.
1244         * gnulib/import/msvc-nothrow.c: Update.
1245         * gnulib/import/msvc-nothrow.h: Update.
1246         * gnulib/import/open.c: Update.
1247         * gnulib/import/openat-die.c: Update.
1248         * gnulib/import/openat-priv.h: Update.
1249         * gnulib/import/openat-proc.c: Update.
1250         * gnulib/import/openat.c: Update.
1251         * gnulib/import/openat.h: Update.
1252         * gnulib/import/opendir.c: Update.
1253         * gnulib/import/pathmax.h: Update.
1254         * gnulib/import/pipe-safer.c: Update.
1255         * gnulib/import/rawmemchr.c: Update.
1256         * gnulib/import/readdir.c: Update.
1257         * gnulib/import/readlink.c: Update.
1258         * gnulib/import/realloc.c: Update.
1259         * gnulib/import/ref-add.sin: Update.
1260         * gnulib/import/ref-del.sin: Update.
1261         * gnulib/import/rename.c: Update.
1262         * gnulib/import/rewinddir.c: Update.
1263         * gnulib/import/rmdir.c: Update.
1264         * gnulib/import/same-inode.h: Update.
1265         * gnulib/import/save-cwd.c: Update.
1266         * gnulib/import/save-cwd.h: Update.
1267         * gnulib/import/scratch_buffer.h: Update.
1268         * gnulib/import/secure_getenv.c: Update.
1269         * gnulib/import/setenv.c: Update.
1270         * gnulib/import/signal.in.h: Update.
1271         * gnulib/import/stat-time.c: Update.
1272         * gnulib/import/stat-time.h: Update.
1273         * gnulib/import/stat-w32.c: Update.
1274         * gnulib/import/stat-w32.h: Update.
1275         * gnulib/import/stat.c: Update.
1276         * gnulib/import/stdbool.in.h: Update.
1277         * gnulib/import/stddef.in.h: Update.
1278         * gnulib/import/stdint.in.h: Update.
1279         * gnulib/import/stdio.in.h: Update.
1280         * gnulib/import/stdlib.in.h: Update.
1281         * gnulib/import/str-two-way.h: Update.
1282         * gnulib/import/strchrnul.c: Update.
1283         * gnulib/import/strdup.c: Update.
1284         * gnulib/import/streq.h: Update.
1285         * gnulib/import/strerror-override.c: Update.
1286         * gnulib/import/strerror-override.h: Update.
1287         * gnulib/import/strerror.c: Update.
1288         * gnulib/import/string.in.h: Update.
1289         * gnulib/import/stripslash.c: Update.
1290         * gnulib/import/strnlen1.c: Update.
1291         * gnulib/import/strnlen1.h: Update.
1292         * gnulib/import/strstr.c: Update.
1293         * gnulib/import/strtok_r.c: Update.
1294         * gnulib/import/sys_stat.in.h: Update.
1295         * gnulib/import/sys_time.in.h: Update.
1296         * gnulib/import/sys_types.in.h: Update.
1297         * gnulib/import/tempname.c: Update.
1298         * gnulib/import/tempname.h: Update.
1299         * gnulib/import/time.in.h: Update.
1300         * gnulib/import/unistd--.h: Update.
1301         * gnulib/import/unistd-safer.h: Update.
1302         * gnulib/import/unistd.in.h: Update.
1303         * gnulib/import/unsetenv.c: Update.
1304         * gnulib/import/verify.h: Update.
1305         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1306         * gnulib/import/wchar.in.h: Update.
1307         * gnulib/import/wctype.in.h: Update.
1308         * gnulib/import/xalloc-oversized.h: Update.
1309         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1310         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1311
1312 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
1313
1314         * record-btrace.c (get_thread_current_frame): Remove
1315         old_inferior_ptid.
1316
1317 2018-09-10  Jerome Guitton  <guitton@adacore.com>
1318
1319         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1320         with check_tag to 1 if and only if the type is tagged and the
1321         component being searched cannot been found in the current
1322         view. Otherwise, always call ada_to_fixed_type with
1323         check_tag to 0.
1324
1325 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1326
1327         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1328         declaration.
1329         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1330         * ada-varobj.c (ada_varobj_get_number_of_children,
1331         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1332
1333 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1334
1335         * ada-valprint.c (ada_value_print): Use type instead of
1336         enclosing type.
1337
1338 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1339
1340         * ada-lang.c (ada_value_subscript): Handle case when parameter is
1341         an array of access to unconstrained array.
1342
1343 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1344
1345         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1346         (ada_check_typedef): Use it.
1347
1348 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1349
1350         * ada-varobj.c (ada_varobj_describe_struct_child)
1351         (ada_varobj_describe_child): Handle union case like struct one.
1352
1353 2018-09-10  Tom Tromey  <tom@tromey.com>
1354
1355         PR python/18380:
1356         * python/python.c (_initialize_python): Make example in "python"
1357         help work in Python 3.
1358
1359 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
1360
1361         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1362         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
1363         $(EXEEXT) to the script, as it is not a program.
1364
1365 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
1366
1367         * python/py-prettyprint.c (pretty_print_one_value): Return
1368         gdbpy_ref<>.
1369         (print_string_repr): Adjust.
1370         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1371         * python/python-internal.h (apply_varobj_pretty_printer): Return
1372         gdbpy_ref<>.
1373         * varobj.c (varobj_value_get_print_value): Adjust.
1374
1375 2018-09-08  Tom Tromey  <tom@tromey.com>
1376
1377         PR python/16047:
1378         * python/py-prettyprint.c (pretty_print_one_value): Check for
1379         to_string method.
1380
1381 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1382
1383         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1384         replace_operator_with_call.
1385
1386 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1387
1388         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1389
1390 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1391
1392         * ada-typeprint.c (print_range): Print the bounds using TYPE
1393         rather than its TYPE_TARGET_TYPE.
1394
1395 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1396
1397         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1398         call to ada_to_fixed_value_create.
1399
1400 2018-09-08  Jerome Guitton  <guitton@adacore.com>
1401
1402         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1403
1404 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1405
1406         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1407         by calls to error.
1408
1409 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1410
1411         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1412         Move update of loop variable "fi".
1413
1414 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1415
1416         * ada-lang.c (value_assign_to_component): In the case of
1417         big-endian targets, extract the bits of the given VAL
1418         using an src_offset of zero if container is not a scalar.
1419
1420 2018-09-06  Simon Ser  <contact@emersion.fr>
1421
1422         PR gdb/23105
1423         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1424         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1425         * fbsd-tdep.c (fbsd_make_note_desc): New.
1426         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1427         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1428         * target.h (enum target_object) Add FreeBSD-specific
1429         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1430
1431 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1432
1433         * compile/compile-c.h (generate_c_for_variable_locations):
1434         Change reference to pointer.
1435         * compile/compile-c-support.c (compile_program) <compute>:
1436         Likewise.
1437         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1438         (generate_c_for_for_one_variable): Likewise
1439         (generate_c_for_variable_locations): Likewise
1440         * compile/compile-c-types.c (compile_c_instance::convert_type):
1441         Likewise
1442         * compile/compile-cplus-symbols.c (convert_one_symbol):
1443         std::move the scope passed to enter_scope.
1444         * compile/compile-cplus-types.c
1445         (compile_cplus_instance::enter_scope): Make parameter
1446         rvalue-reference.
1447         (compile_cplus_instance::new_scope): Change reference to
1448         pointer.
1449         (compile_cplus_instance::convert_type): Likewise
1450         (compile_cplus_convert_typedef): std::move the scope passed to
1451         enter_scope.
1452         (compile_cplus_convert_struct_or_union): Likewise.
1453         (compile_cplus_convert_enum): Likewise.
1454         (compile_cplus_convert_namespace): Likewise.
1455         * compile/compile-cplus.h (compile_cplus_instance)
1456         <enter_scope>: Make parameter rvalue-reference.
1457         * compile/compile-internal.h (compile_instance)
1458         <get_cached_type>: Likewise
1459         * compile/compile-loc2c.c (push): Likewise
1460         (pushf): Likewise
1461         (unary): Likewise
1462         (binary): Likewise
1463         (print_label): Likewise
1464         (pushf_register_address): Likewise
1465         (pushf_register): Likewise
1466         (do_compile_dwarf_expr_to_c): Likewise
1467         (compile_dwarf_expr_to_c): Likewise
1468         (compile_dwarf_bounds_to_c): Likewise
1469         * compile/compile.c (compile_instance::get_cached_type):
1470         Likewise
1471         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1472         (compile_dwarf_bounds_to_c): Likewise
1473         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1474         (dwarf2_compile_property_to_c): Likewise
1475         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1476         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1477         Likewise
1478
1479 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1480
1481         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1482         * tui/tui-data.c (init_content_element): Don't initialize it.
1483
1484 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1485
1486         * tui/tui-data.h (struct tui_win_info)
1487         <detail::opaque>: Remove.
1488         * tui/tui-data.c (init_win_info): Remove assignment.
1489
1490 2018-09-05  Tom Tromey  <tom@tromey.com>
1491
1492         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1493         -Wformat-nonliteral.
1494         * target-float.c (host_float_ops<T>::to_string)
1495         (host_float_ops<T>::from_string): Use
1496         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1497         * configure: Rebuild.
1498
1499 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1500
1501         * printcmd.c (printf_c_string): Use
1502         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1503         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1504
1505 2018-09-05  Tom Tromey  <tom@tromey.com>
1506
1507         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1508
1509 2018-09-05  Tom de Vries  <tdevries@suse.de>
1510
1511         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1512         with resolve_abstract_p == true.
1513         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1514         defaulting to false. Propagate resolve_abstract_p to
1515         dwarf2_fetch_die_loc_sect_off.
1516         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1517         parameter, defaulting to false.
1518         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1519         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1520         parameter.
1521         * dwarf2read.h (struct die_info): Forward-declare.
1522         (die_info_ptr): New typedef.
1523         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1524
1525 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
1526
1527         GDB 8.2 released.
1528
1529 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1530             Pedro Alves  <palves@redhat.com>
1531
1532         * gnulib/Makefile.in (aclocal_m4_deps): Move to
1533         "aclocal-m4-deps.mk".  Include file here.
1534         $(srcdir)/aclocal.m4: Add "configure.ac".
1535         * gnulib/aclocal-m4-deps.mk: New file.
1536         * gnulib/update-gnulib.sh: Automatically update
1537         "aclocal-m4-deps.mk".
1538
1539 2018-09-04  Tom Tromey  <tom@tromey.com>
1540
1541         * configure: Rebuild.
1542         * configure.ac: Remove multi-ice code.
1543
1544 2018-09-04  Tom Tromey  <tom@tromey.com>
1545
1546         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1547         (ada-exp.o): Update.
1548
1549 2018-09-04  Tom Tromey  <tom@tromey.com>
1550
1551         * Makefile.in (printcmd.o, target-float.o): Remove.
1552         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1553
1554 2018-09-04  Tom Tromey  <tom@tromey.com>
1555
1556         * gnulib/Makefile.in: Remove obsolete comment.
1557         * Makefile.in: Remove obsolete comment.
1558
1559 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
1560
1561         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1562         line with '+'.
1563
1564 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1565
1566         * riscv-tdep.c: Add 'prologue-value.h' include.
1567         (struct riscv_unwind_cache): New struct.
1568         (riscv_debug_unwinder): New global.
1569         (riscv_scan_prologue): Update arguments, capture register details
1570         from prologue scan.
1571         (riscv_skip_prologue): Reformat arguments line, move end of
1572         prologue calculation into riscv_scan_prologue.
1573         (riscv_frame_cache): Update return type, create
1574         riscv_unwind_cache, scan the prologue, and fill in remaining cache
1575         details.
1576         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1577         (riscv_frame_prev_register): Use the trad_frame within the
1578         riscv_unwind_cache.
1579         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1580         flag.
1581
1582 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1583
1584         * trad-frame.h (trad_frame_set_realreg): Declare.
1585         (trad_frame_set_addr): Declare.
1586         * trad-frame.c (trad_frame_set_realreg): Define new function.
1587         (trad_frame_set_addr): Define new function.
1588         (trad_frame_set_reg_realreg): Use new function.
1589         (trad_frame_set_reg_addr): Use new function.
1590
1591 2018-09-01  Keith Seitz  <keiths@redhat.com>
1592
1593         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1594         pulongest instead of "%lld".
1595         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1596         ATTRIBUTE_UNUSED.
1597
1598 2018-08-31  Tom Tromey  <tom@tromey.com>
1599
1600         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1601         variant part type.
1602
1603 2018-08-31  Pedro Alves  <palves@redhat.com>
1604
1605         * gdbarch.h: Regenerate.
1606
1607 2018-08-31  Pedro Alves  <palves@redhat.com>
1608
1609         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1610         * target.h (Hardware watchpoint interfaces): Describe
1611         continuable/steppable/non-steppable watchpoints.
1612         * gdbarch.h, gdbarch.c: Regenerate.
1613
1614 2018-08-31  Pedro Alves  <palves@redhat.com>
1615
1616         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1617         Delete.
1618         * s390-linux-nat.c
1619         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1620         * target.h (target_ops::have_continuable_watchpoint): Delete.
1621         (target_have_continuable_watchpoint): Delete.
1622         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1623         * target-delegates.c: Regenerate.
1624
1625 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1626
1627         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1628         the files present in "gnulib/import/m4/".
1629
1630 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1631
1632         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1633         c.sw, c.swsp, and c.sdsp.
1634
1635 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1636
1637         * riscv-tdep.c (struct riscv_inferior_data): Delete.
1638         (riscv_read_misa_reg): Don't cache value read into inferior data.
1639         (riscv_new_inferior_data): Delete.
1640         (riscv_inferior_data_cleanup): Delete.
1641         (riscv_inferior_data): Delete.
1642         (riscv_invalidate_inferior_data): Delete.
1643         (_initialize_riscv_tdep): Remove initialisation of inferior data.
1644
1645 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
1646
1647         * compile/compile-cplus-types.c
1648         (compile_cplus_instance::leave_scope): Take the address of scope
1649         object.
1650         (compile_cplus_instance::convert_qualified_base): Compare quals
1651         to 0.
1652
1653 2018-08-30  Keith Seitz  <keiths@redhat.com>
1654
1655         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1656         Use "%s" and host_address_to_string instead of "%p" in printf.
1657
1658 2018-08-29  Keith Seitz  <keiths@redhat.com>
1659
1660         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1661         and compile-cplus-types.c.
1662         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1663         * c-lang.c (cplus_language_defn): Set C++ compile functions.
1664         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1665         Declare.
1666         * compile/compile-c-support.c: Include compile-cplus.h.
1667         (load_libcompile): Templatize.
1668         (get_compile_context): "New" function.
1669         (c_get_compile_context): Use get_compile_context.
1670         (cplus_get_compile_context): New function.
1671         (cplus_push_user_expression, cplus_pop_user_expression)
1672         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1673         (cplus_compute_program): Define new structs/functions.
1674         * compile/compile-cplus-symmbols.c: New file.
1675         * compile/compile-cplus-types.c: New file.
1676         * compile/compile-cplus.h: New file.
1677         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1678         Declare.
1679         * compile/compile-object-load.c (get_out_value_type): Use
1680         strncmp_iw when comparing symbol names.
1681         (compile_object_load): Add mst_bss and mst_data.
1682         * compile/compile.c (_initialize_compile): Remove
1683         -Wno-implicit-function-declaration from `compile_args'.
1684         * compile/gcc-cp-plugin.h: New file.
1685         * NEWS: Mention C++ compile support and new debug options.
1686
1687 2018-08-29  Keith Seitz  <keiths@redhat.com>
1688
1689         * linespec.c (collect_info::add_symbol): Make virtual.
1690         (struct symbol_searcher_collect_info): New struct.
1691         (symbol_searcher::find_all_symbols): New method.
1692         * symtab.h (class symbol_searcher): New class.
1693
1694 2018-08-29  Keith Seitz  <keiths@redhat.com>
1695
1696         * linespec.c (struct linespec) <function_symbols, label_symbols>:
1697         Change to vector of block_symbol.  Update all users.
1698         (struct collect_info) <symbols>: Likewise.
1699         (collect_info::add_symbol): Take block_symbol as argument.
1700         Update all callers.
1701         (decode_compound_collector) <m_symbols>: Change type to vector
1702         of block_symbol.  Update all users.
1703         (decode_compound_collector::operator ()): Change parameter type
1704         to block_symbol.
1705         (find_method, find_function_symbols, find_linespec_symbols)
1706         (find_label_symbols_in_block, find_label_symbols): Change symbol
1707         vectors to block_symbol vectors.
1708         * symtab.h (symbol_found_callback_ftype): Change parameter type to
1709         block_symbol.
1710
1711 2018-08-29  Keith Seitz  <keiths@redhat.com>
1712
1713         * linespec.c (symbolp): Remove typedef and VEC definitions.
1714         (bound_minimal_symbol_d): Likewise.
1715
1716 2018-08-29  Keith Seitz  <keiths@redhat.com>
1717
1718         * linespec.c (decode_compound_collector::decode_compound_collector):
1719         Remove initialization for `m_symtabs'.
1720         (decode_compound_collector::release_symbols): Change return type
1721         to std::vector.  Update all callers.
1722         (class decode_compound_collector) <m_symbols>: Change type to
1723         std::vector.
1724         (lookup_prefix_sym): Change return type to std::vector.  Update all
1725         callers.
1726         (compare_symbols): Remove.
1727         (std_compare_symbols): Rename to `compare_symbols'.
1728         (find_method): Change `sym_classes' parameter to std::vector.
1729         Update all callers.  Use std::sort to sort sym_classes.
1730         (find_linespec_symbols): Remove cleanup.
1731
1732 2018-08-29  Keith Seitz  <keiths@redhat.com>
1733
1734         * linespec.c (struct linespec) <minimal_symbols>: Change type to
1735         std::vector.  Update all users.
1736         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1737         (struct collect_info) <minimal_symbols>: Likewise.
1738         (compare_msymbols): Return bool.  Change parameters to const
1739         bound_minimal_symbol references.
1740         (find_method, find_function_symbols, find_linespec_symbols): Change
1741         `minsyms' parameter to std::vector.  Update all callers.
1742
1743 2018-08-29  Keith Seitz  <keiths@redhat.com>
1744
1745         * linespec.c (struct linespec) <label_symbols>: Change type to
1746         std::vector.  Update all users.
1747         (find_label_symbols_in_block): Change `result' parameter to
1748         std::vector.  Update all callers.
1749         (find_label_symbols): Return std::vector.  Update all callers.
1750
1751 2018-08-29  Keith Seitz  <keiths@redhat.com>
1752
1753         * linespec.c (struct linespec) <function_symbols>: Change type to
1754         std::vector.  Update all users.
1755         (struct collect_info) <function_symbols>: Likewise.
1756         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1757         (std_compare_symbols): New function.
1758         (find_method, find_function_symbols, find_linespec_symbols)
1759         (find_label_symbols_in_block): Change `symbols' parameter to
1760         std::vector.  Update all callers.
1761         (find_label_symbols): Likewise for `function_symbols' and
1762         `label_funcs_ret'.
1763
1764 2018-08-29  Keith Seitz  <keiths@redhat.com>
1765
1766         * linespec.c (symtab_vector_up): Define.
1767         (struct linespec) <file_symtabs>: Change type to std::vector *.
1768         Update all uses.
1769         (struct collect_info) <file_symtabs>: Likewise.
1770         (collect_symtabs_from_filename): Return symtab_vector_up.
1771         Update all callers.
1772         (decode_objc): Remove cleanup.
1773         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1774         (symtab_collector::release_symtabs): Return symtab_vector_up.
1775         Update all callers.
1776         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1777         Update all users.
1778         (collect_symtabs_from_filename, symtabs_from_filename): Return
1779         symtab_vector_up.  Update all callers.
1780
1781 2018-08-29  Tom Tromey  <tom@tromey.com>
1782
1783         * csky-tdep.c (csky_analyze_prologue): Use
1784         core_addr_to_string_nz.
1785
1786 2018-08-29  Tom Tromey  <tom@tromey.com>
1787
1788         * windows-nat.c (struct xlate_exception) <them>: Change type to
1789         DWORD.
1790         (xlate): Fix formatting.  Remove last entry.
1791         (struct xlate_exception, xlate): Comment out.
1792         (windows_nat_target::resume): Use ranged for.
1793
1794 2018-08-29  Jim Wilson  <jimw@sifive.com>
1795
1796         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1797         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1798         of NT_PRFPREG.
1799         (riscv_linux_nat_target::store_registers): Likewise.
1800
1801 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1802
1803         PR gdb/23555
1804         PR gdb/23558
1805         * gnulib/aclocal.m4: Regenerate.
1806         * gnulib/config.in: Regenerate.
1807         * gnulib/configure: Regenerate.
1808         * gnulib/import/Makefile.am: Update.
1809         * gnulib/import/Makefile.in: Update.
1810         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1811         * gnulib/import/_Noreturn.h: ... this.
1812         * gnulib/import/alloca.in.h: Update.
1813         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1814         * gnulib/import/arg-nonnull.h: ... this.
1815         * gnulib/import/assure.h: Update.
1816         * gnulib/import/at-func.c: Update.
1817         * gnulib/import/basename-lgpl.c: Update.
1818         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1819         * gnulib/import/c++defs.h: ... this.
1820         * gnulib/import/canonicalize-lgpl.c: Update.
1821         * gnulib/import/cdefs.h: Update.
1822         * gnulib/import/chdir-long.c: Update.
1823         * gnulib/import/chdir-long.h: Update.
1824         * gnulib/import/cloexec.c: Update.
1825         * gnulib/import/cloexec.h: Update.
1826         * gnulib/import/close.c: Update.
1827         * gnulib/import/closedir.c: Update.
1828         * gnulib/import/config.charset: Update.
1829         * gnulib/import/dirent-private.h: Update.
1830         * gnulib/import/dirent.in.h: Update.
1831         * gnulib/import/dirfd.c: Update.
1832         * gnulib/import/dirname-lgpl.c: Update.
1833         * gnulib/import/dirname.h: Update.
1834         * gnulib/import/dosname.h: Update.
1835         * gnulib/import/dup-safer-flag.c: Update.
1836         * gnulib/import/dup-safer.c: Update.
1837         * gnulib/import/dup.c: Update.
1838         * gnulib/import/dup2.c: Update.
1839         * gnulib/import/errno.in.h: Update.
1840         * gnulib/import/error.c: Update.
1841         * gnulib/import/error.h: Update.
1842         * gnulib/import/exitfail.c: Update.
1843         * gnulib/import/exitfail.h: Update.
1844         * gnulib/import/extra/update-copyright: Update.
1845         * gnulib/import/fchdir.c: Update.
1846         * gnulib/import/fcntl.c: Update.
1847         * gnulib/import/fcntl.in.h: Update.
1848         * gnulib/import/fd-hook.c: Update.
1849         * gnulib/import/fd-hook.h: Update.
1850         * gnulib/import/fd-safer-flag.c: Update.
1851         * gnulib/import/fd-safer.c: Update.
1852         * gnulib/import/fdopendir.c: Update.
1853         * gnulib/import/filename.h: Update.
1854         * gnulib/import/filenamecat-lgpl.c: Update.
1855         * gnulib/import/filenamecat.h: Update.
1856         * gnulib/import/flexmember.h: Update.
1857         * gnulib/import/float+.h: Update.
1858         * gnulib/import/float.c: Update.
1859         * gnulib/import/float.in.h: Update.
1860         * gnulib/import/fnmatch.c: Update.
1861         * gnulib/import/fnmatch.in.h: Update.
1862         * gnulib/import/fnmatch_loop.c: Update.
1863         * gnulib/import/fpucw.h: Update.
1864         * gnulib/import/frexp.c: Update.
1865         * gnulib/import/frexpl.c: Update.
1866         * gnulib/import/fstat.c: Update.
1867         * gnulib/import/fstatat.c: Update.
1868         * gnulib/import/getcwd-lgpl.c: Update.
1869         * gnulib/import/getcwd.c: Update.
1870         * gnulib/import/getdtablesize.c: Update.
1871         * gnulib/import/getlogin_r.c: Update.
1872         * gnulib/import/getprogname.c: Update.
1873         * gnulib/import/getprogname.h: Update.
1874         * gnulib/import/gettext.h: Update.
1875         * gnulib/import/gettimeofday.c: Update.
1876         * gnulib/import/glob-libc.h: Update.
1877         * gnulib/import/glob.c: Update.
1878         * gnulib/import/glob.in.h: Update.
1879         * gnulib/import/glob_internal.h: Update.
1880         * gnulib/import/glob_pattern_p.c: Update.
1881         * gnulib/import/globfree.c: Update.
1882         * gnulib/import/hard-locale.c: Update.
1883         * gnulib/import/hard-locale.h: Update.
1884         * gnulib/import/intprops.h: Update.
1885         * gnulib/import/inttypes.in.h: Update.
1886         * gnulib/import/isnan.c: Update.
1887         * gnulib/import/isnand-nolibm.h: Update.
1888         * gnulib/import/isnand.c: Update.
1889         * gnulib/import/isnanl-nolibm.h: Update.
1890         * gnulib/import/isnanl.c: Update.
1891         * gnulib/import/itold.c: Update.
1892         * gnulib/import/libc-config.h: Update.
1893         * gnulib/import/limits.in.h: Update.
1894         * gnulib/import/localcharset.c: Update.
1895         * gnulib/import/localcharset.h: Update.
1896         * gnulib/import/localtime-buffer.c: Update.
1897         * gnulib/import/localtime-buffer.h: Update.
1898         * gnulib/import/lstat.c: Update.
1899         * gnulib/import/m4/00gnulib.m4: Update.
1900         * gnulib/import/m4/__inline.m4: Update.
1901         * gnulib/import/m4/absolute-header.m4: Update.
1902         * gnulib/import/m4/alloca.m4: Update.
1903         * gnulib/import/m4/builtin-expect.m4: Update.
1904         * gnulib/import/m4/canonicalize.m4: Update.
1905         * gnulib/import/m4/chdir-long.m4: Update.
1906         * gnulib/import/m4/close.m4: Update.
1907         * gnulib/import/m4/closedir.m4: Update.
1908         * gnulib/import/m4/configmake.m4: Update.
1909         * gnulib/import/m4/d-ino.m4: Update.
1910         * gnulib/import/m4/d-type.m4: Update.
1911         * gnulib/import/m4/dirent_h.m4: Update.
1912         * gnulib/import/m4/dirfd.m4: Update.
1913         * gnulib/import/m4/dirname.m4: Update.
1914         * gnulib/import/m4/double-slash-root.m4: Update.
1915         * gnulib/import/m4/dup.m4: Update.
1916         * gnulib/import/m4/dup2.m4: Update.
1917         * gnulib/import/m4/eealloc.m4: Update.
1918         * gnulib/import/m4/environ.m4: Update.
1919         * gnulib/import/m4/errno_h.m4: Update.
1920         * gnulib/import/m4/error.m4: Update.
1921         * gnulib/import/m4/exponentd.m4: Update.
1922         * gnulib/import/m4/exponentl.m4: Update.
1923         * gnulib/import/m4/extensions.m4: Update.
1924         * gnulib/import/m4/extern-inline.m4: Update.
1925         * gnulib/import/m4/fchdir.m4: Update.
1926         * gnulib/import/m4/fcntl-o.m4: Update.
1927         * gnulib/import/m4/fcntl.m4: Update.
1928         * gnulib/import/m4/fcntl_h.m4: Update.
1929         * gnulib/import/m4/fdopendir.m4: Update.
1930         * gnulib/import/m4/filenamecat.m4: Update.
1931         * gnulib/import/m4/flexmember.m4: Update.
1932         * gnulib/import/m4/float_h.m4: Update.
1933         * gnulib/import/m4/fnmatch.m4: Update.
1934         * gnulib/import/m4/fnmatch_h.m4: Update.
1935         * gnulib/import/m4/fpieee.m4: Update.
1936         * gnulib/import/m4/frexp.m4: Update.
1937         * gnulib/import/m4/frexpl.m4: Update.
1938         * gnulib/import/m4/fstat.m4: Update.
1939         * gnulib/import/m4/fstatat.m4: Update.
1940         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1941         * gnulib/import/m4/getcwd-path-max.m4: Update.
1942         * gnulib/import/m4/getcwd.m4: Update.
1943         * gnulib/import/m4/getdtablesize.m4: Update.
1944         * gnulib/import/m4/getlogin.m4: Update.
1945         * gnulib/import/m4/getlogin_r.m4: Update.
1946         * gnulib/import/m4/getpagesize.m4: Update.
1947         * gnulib/import/m4/getprogname.m4: Update.
1948         * gnulib/import/m4/gettimeofday.m4: Update.
1949         * gnulib/import/m4/glibc21.m4: Update.
1950         * gnulib/import/m4/glob.m4: Update.
1951         * gnulib/import/m4/glob_h.m4: Update.
1952         * gnulib/import/m4/gnulib-cache.m4: Update.
1953         * gnulib/import/m4/gnulib-common.m4: Update.
1954         * gnulib/import/m4/gnulib-comp.m4: Update.
1955         * gnulib/import/m4/gnulib-tool.m4: Update.
1956         * gnulib/import/m4/hard-locale.m4: Update.
1957         * gnulib/import/m4/include_next.m4: Update.
1958         * gnulib/import/m4/inttypes-pri.m4: Update.
1959         * gnulib/import/m4/inttypes.m4: Update.
1960         * gnulib/import/m4/isnand.m4: Update.
1961         * gnulib/import/m4/isnanl.m4: Update.
1962         * gnulib/import/m4/largefile.m4: Update.
1963         * gnulib/import/m4/limits-h.m4: Update.
1964         * gnulib/import/m4/localcharset.m4: Update.
1965         * gnulib/import/m4/locale-fr.m4: Update.
1966         * gnulib/import/m4/locale-ja.m4: Update.
1967         * gnulib/import/m4/locale-zh.m4: Update.
1968         * gnulib/import/m4/localtime-buffer.m4: Update.
1969         * gnulib/import/m4/longlong.m4: Update.
1970         * gnulib/import/m4/lstat.m4: Update.
1971         * gnulib/import/m4/malloc.m4: Update.
1972         * gnulib/import/m4/malloca.m4: Update.
1973         * gnulib/import/m4/math_h.m4: Update.
1974         * gnulib/import/m4/mbrtowc.m4: Update.
1975         * gnulib/import/m4/mbsinit.m4: Update.
1976         * gnulib/import/m4/mbsrtowcs.m4: Update.
1977         * gnulib/import/m4/mbstate_t.m4: Update.
1978         * gnulib/import/m4/memchr.m4: Update.
1979         * gnulib/import/m4/memmem.m4: Update.
1980         * gnulib/import/m4/mempcpy.m4: Update.
1981         * gnulib/import/m4/memrchr.m4: Update.
1982         * gnulib/import/m4/mkdir.m4: Update.
1983         * gnulib/import/m4/mkstemp.m4: Update.
1984         * gnulib/import/m4/mmap-anon.m4: Update.
1985         * gnulib/import/m4/mode_t.m4: Update.
1986         * gnulib/import/m4/msvc-inval.m4: Update.
1987         * gnulib/import/m4/msvc-nothrow.m4: Update.
1988         * gnulib/import/m4/multiarch.m4: Update.
1989         * gnulib/import/m4/nocrash.m4: Update.
1990         * gnulib/import/m4/off_t.m4: Update.
1991         * gnulib/import/m4/onceonly.m4: Update.
1992         * gnulib/import/m4/open-cloexec.m4: Update.
1993         * gnulib/import/m4/open.m4: Update.
1994         * gnulib/import/m4/openat.m4: Update.
1995         * gnulib/import/m4/opendir.m4: Update.
1996         * gnulib/import/m4/pathmax.m4: Update.
1997         * gnulib/import/m4/rawmemchr.m4: Update.
1998         * gnulib/import/m4/readdir.m4: Update.
1999         * gnulib/import/m4/readlink.m4: Update.
2000         * gnulib/import/m4/realloc.m4: Update.
2001         * gnulib/import/m4/rename.m4: Update.
2002         * gnulib/import/m4/rewinddir.m4: Update.
2003         * gnulib/import/m4/rmdir.m4: Update.
2004         * gnulib/import/m4/save-cwd.m4: Update.
2005         * gnulib/import/m4/secure_getenv.m4: Update.
2006         * gnulib/import/m4/setenv.m4: Update.
2007         * gnulib/import/m4/signal_h.m4: Update.
2008         * gnulib/import/m4/ssize_t.m4: Update.
2009         * gnulib/import/m4/stat-time.m4: Update.
2010         * gnulib/import/m4/stat.m4: Update.
2011         * gnulib/import/m4/std-gnu11.m4: Update.
2012         * gnulib/import/m4/stdbool.m4: Update.
2013         * gnulib/import/m4/stddef_h.m4: Update.
2014         * gnulib/import/m4/stdint.m4: Update.
2015         * gnulib/import/m4/stdio_h.m4: Update.
2016         * gnulib/import/m4/stdlib_h.m4: Update.
2017         * gnulib/import/m4/strchrnul.m4: Update.
2018         * gnulib/import/m4/strdup.m4: Update.
2019         * gnulib/import/m4/strerror.m4: Update.
2020         * gnulib/import/m4/string_h.m4: Update.
2021         * gnulib/import/m4/strstr.m4: Update.
2022         * gnulib/import/m4/strtok_r.m4: Update.
2023         * gnulib/import/m4/sys_socket_h.m4: Update.
2024         * gnulib/import/m4/sys_stat_h.m4: Update.
2025         * gnulib/import/m4/sys_time_h.m4: Update.
2026         * gnulib/import/m4/sys_types_h.m4: Update.
2027         * gnulib/import/m4/tempname.m4: Update.
2028         * gnulib/import/m4/time_h.m4: Update.
2029         * gnulib/import/m4/unistd-safer.m4: Update.
2030         * gnulib/import/m4/unistd_h.m4: Update.
2031         * gnulib/import/m4/warn-on-use.m4: Update.
2032         * gnulib/import/m4/wchar_h.m4: Update.
2033         * gnulib/import/m4/wchar_t.m4: Update.
2034         * gnulib/import/m4/wctype_h.m4: Update.
2035         * gnulib/import/m4/wint_t.m4: Update.
2036         * gnulib/import/malloc.c: Update.
2037         * gnulib/import/malloc/scratch_buffer.h: Update.
2038         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2039         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2040         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2041         * gnulib/import/malloca.c: Update.
2042         * gnulib/import/malloca.h: Update.
2043         * gnulib/import/malloca.valgrind: Update.
2044         * gnulib/import/math.in.h: Update.
2045         * gnulib/import/mbrtowc.c: Update.
2046         * gnulib/import/mbsinit.c: Update.
2047         * gnulib/import/mbsrtowcs-impl.h: Update.
2048         * gnulib/import/mbsrtowcs-state.c: Update.
2049         * gnulib/import/mbsrtowcs.c: Update.
2050         * gnulib/import/memchr.c: Update.
2051         * gnulib/import/memmem.c: Update.
2052         * gnulib/import/mempcpy.c: Update.
2053         * gnulib/import/memrchr.c: Update.
2054         * gnulib/import/mkdir.c: Update.
2055         * gnulib/import/mkstemp.c: Update.
2056         * gnulib/import/msvc-inval.c: Update.
2057         * gnulib/import/msvc-inval.h: Update.
2058         * gnulib/import/msvc-nothrow.c: Update.
2059         * gnulib/import/msvc-nothrow.h: Update.
2060         * gnulib/import/open.c: Update.
2061         * gnulib/import/openat-die.c: Update.
2062         * gnulib/import/openat-priv.h: Update.
2063         * gnulib/import/openat-proc.c: Update.
2064         * gnulib/import/openat.c: Update.
2065         * gnulib/import/openat.h: Update.
2066         * gnulib/import/opendir.c: Update.
2067         * gnulib/import/pathmax.h: Update.
2068         * gnulib/import/pipe-safer.c: Update.
2069         * gnulib/import/rawmemchr.c: Update.
2070         * gnulib/import/readdir.c: Update.
2071         * gnulib/import/readlink.c: Update.
2072         * gnulib/import/realloc.c: Update.
2073         * gnulib/import/ref-add.sin: Update.
2074         * gnulib/import/ref-del.sin: Update.
2075         * gnulib/import/rename.c: Update.
2076         * gnulib/import/rewinddir.c: Update.
2077         * gnulib/import/rmdir.c: Update.
2078         * gnulib/import/same-inode.h: Update.
2079         * gnulib/import/save-cwd.c: Update.
2080         * gnulib/import/save-cwd.h: Update.
2081         * gnulib/import/scratch_buffer.h: Update.
2082         * gnulib/import/secure_getenv.c: Update.
2083         * gnulib/import/setenv.c: Update.
2084         * gnulib/import/signal.in.h: Update.
2085         * gnulib/import/stat-time.c: Update.
2086         * gnulib/import/stat-time.h: Update.
2087         * gnulib/import/stat-w32.c: Update.
2088         * gnulib/import/stat-w32.h: Update.
2089         * gnulib/import/stat.c: Update.
2090         * gnulib/import/stdbool.in.h: Update.
2091         * gnulib/import/stddef.in.h: Update.
2092         * gnulib/import/stdint.in.h: Update.
2093         * gnulib/import/stdio.in.h: Update.
2094         * gnulib/import/stdlib.in.h: Update.
2095         * gnulib/import/str-two-way.h: Update.
2096         * gnulib/import/strchrnul.c: Update.
2097         * gnulib/import/strdup.c: Update.
2098         * gnulib/import/streq.h: Update.
2099         * gnulib/import/strerror-override.c: Update.
2100         * gnulib/import/strerror-override.h: Update.
2101         * gnulib/import/strerror.c: Update.
2102         * gnulib/import/string.in.h: Update.
2103         * gnulib/import/stripslash.c: Update.
2104         * gnulib/import/strnlen1.c: Update.
2105         * gnulib/import/strnlen1.h: Update.
2106         * gnulib/import/strstr.c: Update.
2107         * gnulib/import/strtok_r.c: Update.
2108         * gnulib/import/sys_stat.in.h: Update.
2109         * gnulib/import/sys_time.in.h: Update.
2110         * gnulib/import/sys_types.in.h: Update.
2111         * gnulib/import/tempname.c: Update.
2112         * gnulib/import/tempname.h: Update.
2113         * gnulib/import/time.in.h: Update.
2114         * gnulib/import/unistd--.h: Update.
2115         * gnulib/import/unistd-safer.h: Update.
2116         * gnulib/import/unistd.in.h: Update.
2117         * gnulib/import/unsetenv.c: Update.
2118         * gnulib/import/verify.h: Update.
2119         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2120         * gnulib/import/wchar.in.h: Update.
2121         * gnulib/import/wctype.in.h: Update.
2122         * gnulib/import/xalloc-oversized.h: Update.
2123         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2124         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2125
2126 2018-08-16  Gary Benson <gbenson@redhat.com>
2127
2128         PR gdb/13000:
2129         * gdb/main.c (captured_main_1): Exit with nonzero status
2130         in batch mode if the last command to be executed failed.
2131         * NEWS: Mention the above.
2132
2133 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
2134
2135         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2136         end of warning message.
2137
2138 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2139
2140         PR gdb/22943:
2141         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2142         (aarch64_extract_return_value): Use
2143         aapcs_is_vfp_call_or_return_candidate.
2144         (aarch64_return_in_memory): Likewise.
2145         (aarch64_store_return_value): Likewise.
2146
2147 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2148
2149         * aarch64-tdep.c
2150         (aapcs_is_vfp_call_or_return_candidate): Make static
2151         (pass_in_v_or_stack): Remove function.
2152         (pass_in_v_vfp_candidate): New function.
2153         (aarch64_push_dummy_call): Check for float register candidates.
2154
2155 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2156
2157         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2158         (aapcs_is_vfp_call_or_return_candidate_1): New function.
2159         (aapcs_is_vfp_call_or_return_candidate): Likewise.
2160
2161 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
2162
2163         PR build/23399
2164         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2165         (struct ipa_sym_addresses): Rename to...
2166         (struct ipa_sym_addresses_common): ... this.
2167         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2168
2169 2018-08-28  Tom Tromey  <tom@tromey.com>
2170
2171         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2172         (token_fifo): Now a std::vector.
2173         (yylex, c_parse): Update.
2174         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2175         (token_fifo): Now a std::vector.
2176         (yylex, d_parse): Update.
2177         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2178         (token_fifo): Now a std::vector.
2179         (yylex, go_parse): Update.
2180
2181 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
2182
2183         * parser-defs.h (struct type_stack) <elements>: Change type to
2184         std::vector<union type_stack_elt>.
2185         <depth, size>: Remove.
2186         * parse.c (parse_exp_in_context_1): Adjust.
2187         (type_stack_reserve): Remove.
2188         (check_type_stack_depth): Remove.
2189         (insert_into_type_stack): Adjust to std::vector.
2190         (insert_type): Likewise.
2191         (push_type): Likewise.
2192         (push_type_int): Likewise.
2193         (insert_type_address_space): Likewise.
2194         (pop_type): Likewise.
2195         (pop_type_int): Likewise.
2196         (pop_typelist): Likewise.
2197         (pop_type_stack): Likewise.
2198         (append_type_stack): Likewise.
2199         (push_type_stack): Likewise.
2200         (get_type_stack): Likewise.
2201         (type_stack_cleanup): Likewise.
2202         (push_typelist): Likewise.
2203         (follow_types): Likewise.
2204         (_initialize_parse): Likewise.
2205
2206 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2207
2208         * NEWS: Mention csky target.
2209
2210 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
2211             Hafiz Abid Qadeer  <abidh@codesourcery.com>
2212             Don Breazeal  <donb@codesourcery.com>
2213
2214         * csky-linux-tdep.c: New file.
2215         * csky-tdep.c: Likewise.
2216         * csky-tdep.h: Likewise.
2217         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2218         csky-tdep.o.
2219         (HFILES_NO_SRCDIR): Add csky-tdep.h.
2220         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2221         * configure.tgt: Add csky support.
2222
2223 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
2224
2225         * python/py-framefilter.c (py_print_frame): Print frame architecture
2226         when printing on an MI output.
2227
2228 2018-08-27  Tom Tromey  <tom@tromey.com>
2229
2230         PR build/23087:
2231         * configure: Rebuild.
2232         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2233
2234 2018-08-27  Tom Tromey  <tom@tromey.com>
2235
2236         * aarch64-linux-tdep.c
2237         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2238         casts to int.
2239
2240 2018-08-27  Tom Tromey  <tom@tromey.com>
2241
2242         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2243         unsigned.
2244         (ppc64_standard_linkage1, ppc64_standard_linkage2)
2245         (ppc64_standard_linkage3, ppc64_standard_linkage4)
2246         (ppc64_standard_linkage5, ppc64_standard_linkage6)
2247         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2248         unsigned.
2249
2250 2018-08-27  Tom Tromey  <tom@tromey.com>
2251
2252         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2253         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2254
2255 2018-08-27  Tom Tromey  <tom@tromey.com>
2256
2257         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2258         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2259         ULONGEST_MAX.
2260         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2261         ULONGEST_MAX.
2262         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2263         ULONGEST_MAX.
2264         * sparc-linux-tdep.c (sparc32_linux_sigframe)
2265         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2266         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2267         ULONGEST_MAX.
2268         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2269         (ppc64_linux_sigaction_tramp_frame)
2270         (ppc32_linux_sighandler_tramp_frame)
2271         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2272         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2273         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2274         * mn10300-linux-tdep.c (am33_linux_sigframe)
2275         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2276         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2277         * mips-linux-tdep.c (mips_linux_o32_sigframe)
2278         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2279         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2280         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2281         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2282         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2283         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2284         * microblaze-linux-tdep.c
2285         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2286         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2287         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2288         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2289         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2290         * common/common-types.h (ULONGEST_MAX): New define.
2291         (CORE_ADDR_MAX): Fix formatting.
2292         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2293         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2294         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2295         (arm_linux_rt_sigreturn_tramp_frame)
2296         (arm_eabi_linux_sigreturn_tramp_frame)
2297         (arm_eabi_linux_rt_sigreturn_tramp_frame)
2298         (thumb2_eabi_linux_sigreturn_tramp_frame)
2299         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2300         (arm_linux_restart_syscall_tramp_frame)
2301         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2302         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2303         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2304         ULONGEST_MAX.
2305         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2306
2307 2018-08-27  Tom Tromey  <tom@tromey.com>
2308
2309         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2310         CORE_ADDR_MAX.
2311         * mips-tdep.c (mips_deal_with_atomic_sequence)
2312         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2313         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2314         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2315         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2316         CORE_ADDR_MAX.
2317         * aarch64-tdep.c (aarch64_software_single_step): Use
2318         CORE_ADDR_MAX.
2319
2320 2018-08-27  Tom Tromey  <tom@tromey.com>
2321
2322         * linespec.c (complete_linespec_component): Add cast to "char".
2323         * completer.c (completion_tracker::build_completion_result): Add
2324         cast to "char".
2325
2326 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2327
2328         * solist.h (struct solist, struct target_so_ops): Fix
2329         indentation.
2330
2331 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2332
2333         * ada-tasks.c (ada_task_info_s): Remove typedef.
2334         (DEF_VEC_O(ada_task_info_s)): Remove.
2335         (struct ada_tasks_inferior_data): Initialize fields.
2336         <task_list>: Make an std::vector.
2337         (get_ada_tasks_inferior_data): Allocate with new.
2338         (ada_get_task_number): Adjust.
2339         (get_task_number_from_id): Likewise.
2340         (valid_task_id): Likewise.
2341         (ada_get_task_info_from_ptid): Likewise.
2342         (iterate_over_live_ada_tasks): Likewise.
2343         (add_ada_task): Likewise.
2344         (read_known_tasks): Likewise.
2345         (ada_build_task_list): Likewise.
2346         (print_ada_task_info): Likewise.
2347         (info_task): Likewise.
2348         (task_command_1): Likewise.
2349
2350 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2351
2352         * ada-lang.c (add_angle_brackets): Return std::string.
2353
2354 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
2355
2356         * python/py-threadevent.c (py_get_event_thread): Initialize
2357         pythread.
2358
2359 2018-08-24  Pedro Alves  <palves@redhat.com>
2360
2361         * python/py-bpevent.c (create_breakpoint_event_object): Use
2362         copy-initialization.
2363         * python/py-continueevent.c (emit_continue_event): Use
2364         copy-initialization.
2365         * python/py-exitedevent.c (create_exited_event_object): Return a
2366         gdbpy_ref<>.
2367         (emit_exited_event): Use copy-initialization.
2368         * python/py-inferior.c (python_new_inferior)
2369         (python_inferior_deleted, add_thread_object): Use
2370         copy-initialization.
2371         * python/py-infevents.c (create_inferior_call_event_object)
2372         (create_register_changed_event_object)
2373         (create_memory_changed_event_object): Return a gdbpy_ref<>.
2374         (emit_inferior_call_event, emit_memory_changed_event)
2375         (emit_register_changed_event): Use copy-initialization.
2376         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2377         Return a gdbpy_ref<>.
2378         (emit_new_objfile_event): Use copy-initialization.
2379         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2380         (emit_clear_objfiles_event): Use copy-initialization.
2381         * python/py-signalevent.c (create_signal_event_object): Use
2382         copy-initialization.
2383         * python/py-threadevent.c (create_thread_event_object): Use
2384         copy-initialization.
2385
2386 2018-08-24  Pedro Alves  <palves@redhat.com>
2387             Simon Marchi  <simon.marchi@ericsson.com>
2388
2389         PR gdb/23379
2390         * python/py-continueevent.c: Include "gdbthread.h".
2391         (create_continue_event_object): Add intro comment.  Add 'ptid'
2392         parameter.  Use it to find thread to pass to
2393         create_thread_event_object.
2394         (emit_continue_event): Pass PTID down to
2395         create_continue_event_object.
2396         * python/py-event.h (py_get_event_thread): Declare.
2397         (create_thread_event_object): Remove default from 'thread'
2398         parameter.
2399         * python/py-stopevent.c (create_stop_event_object): Use
2400         py_get_event_thread.
2401         * python/py-threadevent.c (get_event_thread): Rename to ...
2402         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2403         and use it to find the thread.
2404         (create_thread_event_object): Assert that THREAD isn't null.
2405         Don't find the event thread here.
2406
2407 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
2408
2409         * block.h (blockrange, blockranges): New struct declarations.
2410         (struct block): Add new field named `ranges'.
2411         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2412         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2413         macros for accessing ranges in struct block.
2414         (make_blockranges): New declaration.
2415         block.c (make_blockranges): New function.
2416         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2417         for block.
2418         * symtab.h (find_pc_partial_function): Add new parameter `block'.
2419         * blockframe.c (cache_pc_function_block): New static global.
2420         (clear_pc_function_cache): Clear cache_pc_function_block.
2421         (find_pc_partial_function): Move comment to symtab.h.  Add
2422         support for non-contiguous blocks.
2423         * cli/cli-cmds.c (block.h): Include.
2424         (print_disassembly): Handle printing of non-contiguous blocks.
2425         (disassemble_current_function): Likewise.
2426         (disassemble_command): Likewise.
2427
2428         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2429         BLOCK_START.
2430         * blockframe.c (get_pc_function_start): Likewise.
2431         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2432         (gcc_symbol_address): Likewise.
2433         * compile/compile-object-run.c (compile_object_run): Likewise.
2434         * compile/compile.c (get_expr_block_and_pc): Likewise.
2435         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2436         (func_addr_to_tail_call_list): Likewise.
2437         * findvar.c (default_read_var_value): Likewise.
2438         * inline-frame.c (inline_frame_this_id): Likewise.
2439         (skip-inline_frames): Likewise.
2440         * infcmd.c (until_next_command): Likewise.
2441         * linespec.c (convert_linespec_to_sals): Likewise.
2442         * parse.c (parse_exp_in_context_1): Likewise.
2443         * printcmd.c (build_address_symbolic): likewise.
2444         (info_address_command): Likewise.
2445         symtab.c (find_function_start_sal): Likewise.
2446         (skip_prologue_sal): Likewise.
2447         (find_function_alias_target): Likewise.
2448         (find_gnu_ifunc): Likewise.
2449         * stack.c (find_frame_funname): Likewise.
2450         * symtab.c (fixup_symbol_section): Likewise.
2451         (find_function_start_sal): Likewise.
2452         (skip_prologue_sal): Likewsie.
2453         (find_function_alias_target): Likewise.
2454         (find_gnu_ifunc): Likewise.
2455         * tracepoint.c (info_scope_command): Likewise.
2456         * value.c (value_fn_field): Likewise.
2457
2458         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2459         in place of find_pc_partial_function.
2460         * blockframe.c (find_function_entry_range_from_pc): New function.
2461         * symtab.h (find_function_entry_range_from_pc): Declare and document.
2462         * objfiles.c (objfile_relocate1): Relocate start and end addresses
2463         for each range in a block.
2464
2465
2466 2018-08-23  Xavier Roirand  <roirand@adacore.com>
2467
2468         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2469         incrementation.
2470
2471 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2472
2473         * solib-svr4.c (read_program_headers_from_bfd): Return
2474         gdb::optional<gdb::byte_vector>.
2475         (svr4_exec_displacement): Adjust.
2476
2477 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2478
2479         * solib-svr4.c (read_program_header): Return
2480         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2481         (find_program_interpreter): Return
2482         gdb::optional<gdb::byte_vector>.
2483         (scan_dyntag_auxv): Adjust.
2484         (enable_break): Adjust.
2485         (svr4_exec_displacement): Adjust.
2486
2487 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2488
2489         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2490         * inf-child.c (inf_child_target::terminal_save_inferior): New.
2491
2492 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2493
2494         * guile/scm-string.c (gdbscm_scm_from_printf): Use
2495         string_vprintf.
2496         * guile/scm-utils.c (gdbscm_printf): Likewise.
2497         * serial.c (serial_printf): Likewise.
2498         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2499
2500 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
2501
2502         * stack.c (print_frame): Print frame architecture when printing on
2503         an MI output.
2504         * NEWS: Mention new "arch" attribute in frame output.
2505
2506 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2507
2508         * arch/aarch64.h (aarch64_regnum): Update comment.
2509
2510 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2511
2512         * NEWS: Add SVE to 8.2 section.
2513
2514 2018-08-21  Pedro Alves  <palves@redhat.com>
2515
2516         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2517         out from gdbscm_parse_function_args.
2518         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2519         gdbscm_parse_function_args_1.
2520
2521 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
2522
2523         PR gdb/17816
2524         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2525         operator.
2526
2527 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
2528
2529         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2530
2531 2018-08-19  Michael Spang  <spang@google.com>
2532
2533         PR gdb/11786
2534         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2535         for PT_TLS segments.
2536
2537 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
2538
2539         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2540         dwarf_variable_value.
2541         * dwarf2-frame.c (class dwarf_expr_executor):
2542         Add override for dwarf_variable_value.
2543         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2544         (class symbol_needs_eval_context): Likewise.
2545         (indirect_synthetic_pointer): Add forward declaration.
2546         (sect_variable_value): New function.
2547         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2548         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2549         for DW_OP_GNU_variable_value.
2550
2551 2018-08-16  Tom Tromey  <tom@tromey.com>
2552
2553         * top.c (read_command_file): Update.
2554         (command_line_input): Remove "repeat" argument.
2555         * ada-lang.c (get_selections): Update.
2556         * linespec.c (decode_line_2): Update.
2557         * defs.h (command_line_input): Remove argument.
2558         * cli/cli-script.c (read_next_line): Update.
2559         * python/py-gdb-readline.c: Update.
2560
2561 2018-08-17  Tom Tromey  <tom@tromey.com>
2562
2563         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2564         command_line_input.
2565
2566 2018-08-15  Tom Tromey  <tom@tromey.com>
2567
2568         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2569
2570 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
2571
2572         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2573         If used, use find_pc_partial_function to find address range
2574         to disassemble.
2575         * mi/mi-main.c (mi_cmd_list_features): Report
2576         "data-disassemble-a-option" feature.
2577         * NEWS: Mention new -data-disassemble option -a.
2578
2579 2018-08-13  Tom Tromey  <tom@tromey.com>
2580
2581         * common/common-defs.h (_FORTIFY_SOURCE): Define.
2582
2583 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2584
2585         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2586         (aarch64_linux_collect_sve_regset): Likewise.
2587         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2588         * regcache.h (regcache_map_entry_size): New function.
2589
2590 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2591
2592         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2593         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2594         (SVE_HEADER_VL_LENGTH): Likewise.
2595         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2596         (SVE_HEADER_FLAGS_LENGTH): Likewise.
2597         (SVE_HEADER_RESERVED_LENGTH): Likewise.
2598         (SVE_HEADER_SIZE_OFFSET): Likewise.
2599         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2600         (SVE_HEADER_VL_OFFSET): Likewise.
2601         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2602         (SVE_HEADER_FLAGS_OFFSET): Likewise.
2603         (SVE_HEADER_RESERVED_OFFSET): Likewise.
2604         (SVE_HEADER_SIZE): Likewise.
2605         (aarch64_linux_core_read_vq): Add function.
2606         (aarch64_linux_core_read_description): Check for SVE section.
2607
2608 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2609
2610         * aarch64-fbsd-tdep.c
2611         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2612         collect_size.
2613         * aarch64-linux-tdep.c
2614         (aarch64_linux_iterate_over_regset_sections): Likewise.
2615         * alpha-linux-tdep.c
2616         (alpha_linux_iterate_over_regset_sections):
2617         * alpha-nbsd-tdep.c
2618         (alphanbsd_iterate_over_regset_sections): Likewise.
2619         * amd64-fbsd-tdep.c
2620         (amd64fbsd_iterate_over_regset_sections): Likewise.
2621         * amd64-linux-tdep.c
2622         (amd64_linux_iterate_over_regset_sections): Likewise.
2623         * arm-bsd-tdep.c
2624         (armbsd_iterate_over_regset_sections): Likewise.
2625         * arm-fbsd-tdep.c
2626         (arm_fbsd_iterate_over_regset_sections): Likewise.
2627         * arm-linux-tdep.c
2628         (arm_linux_iterate_over_regset_sections): Likewise.
2629         * corelow.c (get_core_registers_cb): Likewise.
2630         (core_target::fetch_registers): Likewise.
2631         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2632         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2633         * gdbarch.h (void): Regenerate.
2634         * gdbarch.sh: Add supply_size and collect_size.
2635         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2636         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2637         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2638         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2639         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2640         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2641         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2642         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2643         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2644         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2645         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2646         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2647         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2648         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2649         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2650         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2651         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2652         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2653         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2654         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2655         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2656         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2657         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2658         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2659         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2660         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2661         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2662         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2663         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2664         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2665
2666 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
2667
2668         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2669         with string_printf.
2670
2671 2018-08-10  Keith Seitz  <keiths@redhat.com>
2672
2673         * compile/compile-c-support.c (add_code_header, add_code_footer):
2674         Move into policy class.
2675         (c_push_user_expression, pop_user_expression_nop)
2676         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2677         (compile_program): New host class.
2678         (c_compile_program): New typedef.
2679         (c_compute_porgram): Use c_compile_program.
2680
2681 2018-08-10  Keith Seitz  <keiths@redhat.com>
2682
2683         * compile/compile-internal.h (compile_instance::~compile_instance):
2684         Remove calls to htab_delete.
2685         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2686         * compile.c (compile_instance::compile_instance): Initialize
2687         htab unique pointers.
2688         (compile_instance::get_cached_type, compile_instance::insert_type)
2689         (compile_instance::error_symbol_once): Update for unique_ptr.
2690
2691 2018-08-10  Keith Seitz  <keiths@redhat.com>
2692
2693         * compile/compile-c-symbols.c (struct symbol_error)
2694         (hash_symbol_error, eq_symbol_error, del_symbol_error)
2695         (compile_instance::insert_symbol_error)
2696         (compile_instance::error_symbol_once): Move to ...
2697         * compile/compile.c: ... here.
2698
2699 2018-08-10  Keith Seitz  <keiths@redhat.com>
2700
2701         * compile/compile-c-support.c (c_get_compile_context): Use `new'
2702         instead of `new_compile_instance'.
2703         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2704         Update description.
2705         If the symbol error map is not initialized, create it.
2706         (generate_c_for_for_one_symbol): Do not check/initialize
2707         the symbol error map.
2708         * compile/compile-c-types.c (compile_c_instance): Make a class.
2709         Update all callers.
2710         (compile_instance::compile_instance): Initialize the type cache.
2711         (get_cached_type): New function.
2712         (insert_type): Update description.
2713         (compile_c_instance::m_default_cflags): Define.
2714         (convert_type): Update description.  Use get_cached_type.
2715         (delete_instance): Moved to destructor.
2716         (new_compile_instance): Moved to constructor.
2717         * compile/compile-c.h (compile_c_instance): Make class inheriting
2718         from compile_instance.
2719         <base>: Remove field.
2720         <type_map, symbol_err_map>: Move to base class.
2721         <c_plugin>: Rename to `m_plugin' and remove pointer type.
2722         * compile/compile-internal.h (compile_instance): Make class.
2723         <type_map_t, symbol_err_map_t>: Define.
2724         <fe>: Rename to `m_gcc_fe'.
2725         <scope, block, gcc_target_options>: Add `m_' prefix.
2726         <m_type_map, m_symbol_err_map>: New fields, moved from
2727         compile_c_instance.
2728         <destroy>: Remove.
2729         (convert_type, new_compile_instance): Remove.
2730         * compile/compile.c (cleanup_compile_instance): Remove.
2731         (compile_to_object): Use unique_ptr to eliminate cleanups.
2732         (compile_instance::set_print_callback, compile_instance::version)
2733         (compile_instance::set_verbose)
2734         (compile_instance::set_driver_filename)
2735         (compile_instance::set_triplet_regexp)
2736         (compile_instance::set_arguments)
2737         (compile_instance::set_source_file)
2738         (compile_instance::compile): Define.
2739
2740 2018-08-10  Keith Seitz  <keiths@redhat.com>
2741
2742         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2743         * compile/compile-c-types.c: Define GCC_METHODN macros and include
2744         gcc-c-fe.def to define C plugin.
2745         (delete_instance): Delete `c_plugin'.
2746         (new_compile_instance): Initialize `c_plugin'.
2747         * compile/compile-c.h: Include gcc_c_plugin.h.
2748         (struct compile_c_instance) <c_plugin>: New member.
2749         * gcc-c-plugin.h: New file.
2750         Update all callers with API change.
2751
2752 2018-08-10  Keith Seitz  <keiths@redhat.com>
2753
2754         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2755         (HFILES_NO_SRCDIR): ... to here.
2756         Add compile-internal.h and compile-c.h.
2757         * compile/compile-c-support.c: Include compile-c.h.
2758         * compile/compile-c-symbols.c: Include compile-c.h.
2759         (generate_c_for_variable_locations): Update comment.
2760         * compile/compile-c-types.c: Include compile-c.h.
2761         * compile/compile-c.h: New file -- moved C language declarations
2762         from other files here.
2763         * compile/compile-internal.h: Do not include hashtab.h or
2764         common/enum-flags.h.
2765         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2766         (gcc_convert_symbol, gcc_symbol_address)
2767         (generate_c_for_variable_locations, c_get_mode_for_size)
2768         (c_get_range_decl_name): Definitions moved to compile-c.h.
2769         * compile/compile-loc2c.c: Include compile-c.h.
2770
2771 2018-08-10  Keith Seitz  <keiths@redhat.com>
2772
2773         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2774         (c_symbol_substitution_name): ... this.
2775         Update all callers.
2776
2777 2018-08-10  Keith Seitz  <keiths@redhat.com>
2778
2779         * compile/compile-c-support.c (c_compute_program): Use
2780         unique_xmalloc_ptr to eliminate cleanup.
2781         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2782         Return a unique_xmalloc_ptr and eliminate cleanup.
2783         * compile/compile-internal.h (generate_c_for_variable_locations):
2784         Return unique_xmalloc_ptr and update description.
2785
2786 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
2787
2788         * corelow.c (core_target::get_core_register_section): Rename
2789         min_size to section_min_size.
2790
2791 2018-08-09  Jim Wilson  <jimw@sifive.com>
2792
2793         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2794         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2795         * NEWS: Mention new GNU/Linux RISC-V target.
2796         * configure.host: Add riscv*-*-linux*.
2797         * configure.nat: Add riscv*.
2798         * configure.tgt: Add riscv*-*-linux*.
2799         * riscv-linux-nat.c: New file.
2800         * riscv-linux-tdep.c: New file.
2801
2802 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2803
2804         * infrun.c (resume): Make static, add forward declaration.
2805         (proceed): Update header comment.
2806         * infrun.h (resume): Delete declaration.
2807
2808 2018-08-09  Tom Tromey  <tom@tromey.com>
2809
2810         * riscv-tdep.h: Minor formatting fixes.
2811
2812 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
2813
2814         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2815         * dwarf-index-cache.c (create_dir_and_check): Likewise.
2816         (test_mkdir_recursive): Likewise.
2817         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2818
2819 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2820
2821         * valarith.c (value_subscripted_rvalue): If an array is not in
2822         memory, and we don't know the upper bound, then we can't know that
2823         the requested element exists or not.
2824
2825 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
2826
2827         * target.c (str_comma_list_concat_elem): Fix typo in comment.
2828         (target_options_to_string): Add comment.
2829
2830 2018-08-08  Tom Tromey  <tom@tromey.com>
2831
2832         * unittests/scoped_mmap-selftests.c: Check result of "write".
2833
2834 2018-08-08  Jim Wilson  <jimw@sifive.com>
2835
2836         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2837         (decode_register_index_short): New.
2838         (decode_j_type_insn, decode_cj_type_insn): New.
2839         (decode_b_type_insn, decode_cb_type_insn): New.
2840         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
2841         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
2842         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2843         is_c_sw_insn instead of is_sw_insn.
2844         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2845         (riscv_software_single_step): New.
2846         * riscv-tdep.h (riscv_software_single_step): Declare.
2847
2848         * riscv-tdep.c (riscv_isa_xlen): Drop static.
2849         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2850
2851 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2852
2853         PR gdb/18050:
2854         * target.c (dispose_inferior): Don't dispose of inferiors that are
2855         already killed.
2856
2857 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2858
2859         * remote.c (remote_target::download_tracepoint): Change char* to
2860         const char*.
2861
2862 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
2863
2864         * target.h (target_options_to_string): Return an std::string.
2865         * target.c (str_comma_list_concat_elem): Return void, use
2866         std::string.
2867         (do_option): Likewise.
2868         (target_options_to_string): Return an std::string.
2869         * linux-nat.c (linux_nat_target::wait): Adjust.
2870         * target-debug.h (target_debug_print_options): Adjust.
2871
2872 2018-08-07  Tom Tromey  <tom@tromey.com>
2873
2874         * Makefile.in (CPPFLAGS): New variable.
2875         (INTERNAL_CPPFLAGS): Use it.
2876
2877 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2878
2879         * NEWS: Mention the index cache.
2880
2881 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2882
2883         * common/pathstuff.h (get_standard_cache_dir): New.
2884         * common/pathstuff.c (get_standard_cache_dir): New.
2885         * build-id.h (build_id_to_string): New.
2886         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2887         DEBUG_STR_SUFFIX): Move to here.
2888         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2889         DEBUG_STR_SUFFIX): Move from there.
2890         (write_psymtabs_to_index): Make non-static, add basename
2891         parameter.  Write to temporary files, rename when done.
2892         (save_gdb_index_command): Adjust call to
2893         write_psymtabs_to_index.
2894         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2895         field.
2896         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2897         (get_gdb_index_contents_from_cache): New.
2898         (get_gdb_index_contents_from_cache_dwz): New.
2899         (dwarf2_initialize_objfile): Read index from cache.
2900         (dwarf2_build_psymtabs): Save to index.
2901         * dwarf-index-cache.h: New file.
2902         * dwarf-index-cache.c: New file.
2903         * dwarf-index-write.h: New file.
2904
2905 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2906
2907         * gnulib/aclocal.m4: Re-generate.
2908         * gnulib/config.in: Re-generate.
2909         * gnulib/configure: Re-generate.
2910         * gnulib/import/Makefile.am: Re-generate.
2911         * gnulib/import/Makefile.in: Re-generate.
2912         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2913         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2914         * gnulib/import/m4/mkdir.m4: New file.
2915         * gnulib/import/mkdir.c: New file.
2916         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2917         module.
2918
2919 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2920
2921         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2922         * common/scoped_mmap.c: New file.
2923         * common/scoped_mmap.h (destroy): New method.
2924         (~scoped_mmap, reset): Use destroy.
2925         (scoped_mmap): New move constructor.
2926         (mmap_file): New declaration.
2927         * unittests/scoped_mmap-selftests.c (test_normal,
2928         test_invalid_filename, run_tests): New functions.
2929         (_initialize_scoped_mmap_selftests): Register selftest.
2930
2931 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2932
2933         * dwarf2read.c (read_gdb_index_from_section): Rename to...
2934         (read_gdb_index_from_buffer): ... this.  Remove section
2935         parameter, add buffer parameter.
2936         (get_gdb_index_contents_ftype,
2937         get_gdb_index_contents_dwz_ftype): New typedefs.
2938         (dwarf2_read_gdb_index): Add callback parameters to get the
2939         index contents.
2940         (get_gdb_index_contents_from_section): New.
2941         (dwarf2_initialize_objfile): Update call to
2942         dwarf2_read_gdb_index.
2943
2944 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2945
2946         * common/filestuff.h (gdb_fopen_cloexec): New overload.
2947         (gdb_open_cloexec): Likewise.
2948         * nat/linux-osdata.c (command_from_pid): Use string_printf.
2949         (commandline_from_pid): Likewise.
2950         (linux_xfer_osdata_threads): Likewise.
2951         (linux_xfer_osdata_fds): Likewise.
2952         * ada-lang.c (is_package_name): Likewise.
2953         * auxv.c (procfs_xfer_auxv): Likewise.
2954         * breakpoint.c (print_one_breakpoint_location): Use
2955         uiout::field_fmt.
2956         (print_one_catch_solib): Use string_printf.
2957         * coff-pe-read.c (add_pe_exported_sym): Likewise.
2958         (add_pe_forwarded_sym): Likewise.
2959         * dwarf2read.c (create_type_unit_group): Likewise.
2960         (build_error_marker_type): Likewise.
2961         * infcall.c (get_function_name): Likewise.
2962         * valprint.c (print_converted_chars_to_obstack): Likewise.
2963         * xtensa-tdep.c (xtensa_register_type): Likewise.
2964
2965 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
2966
2967         * remote.c (remote_target::download_tracepoint): Fix format
2968         string errors.
2969
2970 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2971
2972         * tracefile.c: Include common/byte-vector.h.
2973         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
2974         with trace_regblock_size if needed.  Update uses of buf.
2975
2976 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2977
2978         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
2979         std::vector<unsigned char>.
2980         * tracepoint.c (collection_list::collection_list): Remove
2981         m_regs_mask initializer from initializer list.  Resize
2982         m_regs_mask using the largest remote register number.
2983         (collection_list::add_remote_register): Remove size check on
2984         m_regs_mask.  Use at to access element.
2985         (collection_list::stringify): Change type of temp_buf to
2986         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
2987         stringify the register mask.  Use pack_hex_byte for the register
2988         mask.
2989
2990 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
2991
2992         * tracepoint.h (class collection_list) <add_register>: Remove.
2993         <add_remote_register, add_ax_registers, add_local_register>:
2994         Declare.
2995         <add_memrange>: Add scope parameter.
2996         * tracepoint.c (encode_actions_1): Likewise.
2997         (collection_list::add_register): Rename to ...
2998         (collection_list::add_remote_register): ... this.  Update
2999         comment.
3000         (collection_list::add_ax_registers, add_local_register): New
3001         methods.
3002         (collection_list::add_memrange): Add scope parameter.  Call
3003         add_local_register instead of add_register.
3004         (finalize_tracepoint_aexpr): New function.
3005         (collection_list::collect_symbol): Update calls to add_memrange.
3006         Call add_local_register instead of add_register.  Call
3007         add_ax_registers.  Call finalize_tracepoint_aexpr.
3008         (encode_actions_1): Get remote regnos for $reg action.  Call
3009         add_remote_register, add_ax_registers, and add_local_register.
3010         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
3011         (validate_actionline): Call finalize_tracepoint_aexpr.
3012
3013 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3014
3015         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3016         Replace array buf with gdb::char_vector buf, of size
3017         get_remote_packet_size ().  Replace references to buf and
3018         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
3019         and xsnprintf with snprintf.  Raise errors if the buffer is too
3020         small.
3021
3022 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3023
3024         * remote.c (remote_target::download_tracepoint): Fix the has_more
3025         predicate in the QTDP action list iteration.
3026
3027 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3028
3029         * remote.c (remote_target::download_tracepoint): Fix indentation
3030         in for block.
3031
3032 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3033
3034         * proc-api.c (_initialize_proc_api): Remove c, unused.
3035         * procfs.c (procfs_init_inferior): Remove signals, unused.
3036         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3037         unused.
3038
3039 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
3040             Andrew Burgess  <andrew.burgess@embecosm.com>
3041
3042         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3043         'W_STOPCODE (0)' as this could be ambiguous.
3044
3045 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
3046
3047         * ser-tcp.c (net_open): Fix thinko when deciding whether to
3048         disable TCP's Nagle algorithm (use "ai_protocol" instead of
3049         "ai_socktype").
3050
3051 2018-08-02  Tom Tromey  <tom@tromey.com>
3052
3053         PR symtab/16842.
3054         * dwarf2read.c (read_func_scope): Set symtab on template parameter
3055         symbols.
3056         (process_structure_scope): Likewise.
3057
3058 2018-08-02  Xavier Roirand  <roirand@adacore.com>
3059
3060         PR gdb/22629:
3061         * darwin-nat.c (darwin_kill_inferior): Fix handling of
3062         kill inferior.
3063
3064 2018-08-02  Tom Tromey  <tom@tromey.com>
3065
3066         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3067         (darwin_suspend_inferior, darwin_resume_inferior)
3068         (darwin_decode_notify_message, darwin_resume_inferior_threads)
3069         (darwin_check_new_threads): Check result of get_darwin_inferior.
3070
3071 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
3072
3073         GDB 8.1.1 released.
3074
3075 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
3076
3077         * varobj.c (varobj_get_path_expr_parent): Report an error if
3078         parent is a dynamic varobj.
3079
3080 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3081
3082         * gnulib/aclocal.m4: Re-generate.
3083         * gnulib/config.in: Re-generate.
3084         * gnulib/configure: Re-generate.
3085         * gnulib/import/Makefile.in: Re-generate.
3086         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3087         * gnulib/import/m4/onceonly.m4: Re-generate.
3088
3089 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3090
3091         * target-descriptions.c (struct xml_test_tdesc): New.
3092         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3093         (record_xml_tdesc): Update.
3094         (maintenance_check_xml_descriptions): Update.
3095         * target-descriptions.h (record_xml_tdesc): Update comment.
3096
3097 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3098
3099         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3100         checking array bounds are defined.
3101
3102 2018-07-30  Tom Tromey  <tom@tromey.com>
3103
3104         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3105         irreflexivity violation.
3106
3107 2018-07-30  Tom Tromey  <tom@tromey.com>
3108
3109         * cli/cli-decode.c (lookup_cmd): Remove lint code.
3110         * value.c (unpack_long): Remove lint code.
3111         * valops.c (value_ind): Remove lint code.
3112         * valarith.c (value_x_binop, value_x_unop, value_equal)
3113         (value_pos): Remove lint code.
3114
3115 2018-07-28  Tom de Vries  <tdevries@suse.de>
3116
3117         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3118         with undefined upper bound as <optimized out>.
3119
3120 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
3121
3122         * gcore.in: Rename variable "name" to "prefix".  Expand
3123         "usage" text.
3124
3125 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
3126
3127         * windows-nat.c (windows_nat_target::create_inferior): Update to
3128         call close() in global namespace.
3129
3130 2018-07-26  Tom Tromey  <tom@tromey.com>
3131
3132         * dwarf-index-write.c (add_address_entry): Don't add objfile
3133         offsets.
3134         * dbxread.c (find_stab_function): Rename from
3135         find_stab_function_addr.  Return a bound_minimal_symbol.
3136         (read_dbx_symtab): Use raw_text_low, raw_text_high.
3137         Don't add objfile offsets.
3138         (end_psymtab): Use raw_text_low, raw_text_high,
3139         MSYMBOL_VALUE_RAW_ADDRESS.
3140         (read_ofile_symtab): Update.
3141         (process_one_symbol): Update.
3142         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3143         offsets.
3144         (dw2_relocate): Remove.
3145         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3146         searching addrmap.
3147         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3148         Update.
3149         (process_psymtab_comp_unit_reader, add_partial_symbol)
3150         (add_partial_subprogram, dwarf2_ranges_read): Update.
3151         (load_partial_dies): Update.
3152         (add_address_entry): Don't add objfile offsets.
3153         (dwarf2_build_include_psymtabs): Update.
3154         (create_addrmap_from_aranges): Don't add objfile offsets.
3155         (dw2_find_pc_sect_compunit_symtab): Update.
3156         * mdebugread.c (parse_symbol): Don't add objfile offsets.
3157         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3158         Update.
3159         (parse_partial_symbols): Don't add objfile offsets.  Use
3160         raw_text_low, raw_text_high.  Update.
3161         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3162         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3163         or call 'relocate' quick function.  Clear psymbol_map.
3164         * psympriv.h (struct partial_symbol) <address>: Add section
3165         offset.
3166         <set_unrelocated_address>: Rename from set_address.
3167         <raw_text_low, raw_text_high>: New methods.
3168         <text_low, text_high>: Add objfile parameter.
3169         (add_psymbol_to_bcache): Add 'section' parameter.  Call
3170         set_unrelocated_address.
3171         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3172         (find_pc_psymbol): Update.
3173         (fixup_psymbol_section, relocate_psymtabs): Remove.
3174         (dump_psymtab, psym_functions): Update.
3175         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3176         parameter.
3177         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3178         (start_psymtab_common): Update.
3179         * symfile-debug.c (debug_qf_relocate): Remove.
3180         (debug_sym_quick_functions): Update.
3181         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3182         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3183         Update.
3184
3185 2018-07-26  Tom Tromey  <tromey@redhat.com>
3186
3187         * dbxread.c (end_psymtab): Use text_high_valid and
3188         text_low_valid.
3189         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3190         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3191         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3192         Update comment.
3193         <text_low_valid, text_high_valid>: New fields.
3194         <set_text_low, set_text_high>: Update.
3195         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3196
3197 2018-07-26  Tom Tromey  <tom@tromey.com>
3198
3199         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3200         Update.
3201         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3202         textlow and texthigh fields.
3203         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3204         Update.
3205         * mdebugread.c (parse_lines, parse_partial_symbols)
3206         (psymtab_to_symtab_1): Update.
3207         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3208         Rename fields.  Update comment.  Now private.
3209         <text_low, text_high, set_text_low, set_text_high>: New methods.
3210         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3211         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3212         (start_psymtab_common, maintenance_info_psymtabs)
3213         (maintenance_check_psymtabs): Update.
3214         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3215         texthigh fields.
3216         (scan_xcoff_symtab): Update.
3217
3218 2018-07-26  Tom Tromey  <tromey@redhat.com>
3219
3220         * psympriv.h (struct partial_symbol) <unrelocated_address,
3221         address, set_address>: New methods.
3222         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3223         (fixup_psymbol_section, relocate_psymtabs): Update.
3224         (print_partial_symbols): Add 'objfile' parameter.  Update.
3225         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3226         Update.
3227
3228 2018-07-26  Tom Tromey  <tom@tromey.com>
3229
3230         * dwarf-index-write.c (write_psymbols, debug_names::insert)
3231         (debug_names::write_psymbols): Update.
3232         * psympriv.h (struct partial_symbol): Derive from
3233         general_symbol_info.
3234         <obj_section>: New method.
3235         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3236         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3237         (find_pc_sect_psymbol, fixup_psymbol_section)
3238         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3239         (print_partial_symbols, recursively_search_psymtabs)
3240         (compare_psymbols, psymbol_hash, psymbol_compare)
3241         (add_psymbol_to_bcache, maintenance_check_psymtabs)
3242         (psymbol_name_matches, psym_fill_psymbol_map): Update.
3243
3244 2018-07-26  Tom Tromey  <tromey@redhat.com>
3245
3246         * dbxread.c (end_psymtab): Remove dead code.
3247
3248 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
3249
3250         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3251         DWARF unwinders are disabled.
3252         * dwarf2-frame.c: Add dwarf2read.h include.
3253         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3254         disabled.
3255         (dwarf2_frame_unwinders_enabled_p): Define.
3256         (show_dwarf_unwinders_enabled_p): New function.
3257         (_initialize_dwarf2_frame): Register switch to control DWARF
3258         unwinder use.
3259         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3260         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3261         (show_dwarf_cmdlist): Remove static keyword.
3262         * dwarf2read.h (set_dwarf_cmdlist): Declare.
3263         (show_dwarf_cmdlist): Declare.
3264         * NEWS: Document new feature.
3265
3266 2018-07-26  Tom de Vries  <tdevries@suse.de>
3267
3268         PR breakpoints/23366
3269         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3270
3271 2018-07-26  Tom de Vries  <tdevries@suse.de>
3272
3273         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3274         DW_AT_count can't be translated to a dynamic prop.
3275
3276 2018-07-25  Tom de Vries  <tdevries@suse.de>
3277
3278         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3279         try/catch.
3280
3281 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
3282
3283         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3284
3285 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
3286
3287         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3288
3289 2018-07-24  Keith Seitz  <keiths@redhat.comt
3290
3291         PR symtab/23010
3292         * dwarf2read.c (dw2_add_symbol_to_list): New function.
3293         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3294         instead of add_symbol_to_list.
3295         (read_file_scope): Call prepare_one_comp_unit before reading
3296         any other DIEs.
3297
3298 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
3299
3300         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3301
3302 2018-07-24  Tom Tromey  <tom@tromey.com>
3303
3304         * utils.c (malloc, realloc, free): Don't declare.
3305         * configure, config.in: Rebuild.
3306         * configure.ac: Don't check for declarations of free, malloc, or
3307         realloc.
3308
3309 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3310
3311         * aarch64-linux-nat.c
3312         (aarch64_linux_nat_target::stopped_data_address): Remove unused
3313         variable.
3314         * arm-linux-nat.c (fetch_regs): Likewise.
3315         (store_regs): Likewise.
3316         (fetch_vfp_regs): Likewise.
3317         (store_vfp_regs): Likewise.
3318         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3319         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3320         (arm_linux_nat_target::insert_watchpoint): Likewise.
3321         (arm_linux_nat_target::remove_watchpoint): Likewise.
3322         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3323         Likewise.
3324         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3325         Likewise.
3326         * ppc-linux-nat.c (fetch_register): Likewise.
3327         (fetch_all_gp_regs): Likewise.
3328         (fetch_ppc_registers): Likewise.
3329         (store_all_gp_regs): Likewise.
3330         (store_ppc_registers): Likewise.
3331         (hwdebug_insert_point): Likewise.
3332         (can_use_watchpoint_cond_accel): Likewise.
3333         * remote-sim.c (gdb_os_write_stdout): Likewise.
3334
3335 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3336             Tom Tromey  <tom@tromey.com>
3337
3338         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3339         test for it.
3340         * configure: Rebuild.
3341
3342 2018-07-22  Tom Tromey  <tom@tromey.com>
3343
3344         * regformats/regdat.sh: Define xmltarget_${name} inside
3345         #ifndef IN_PROCESS_AGENT.
3346
3347 2018-07-22  Tom Tromey  <tom@tromey.com>
3348
3349         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3350
3351 2018-07-22  Tom Tromey  <tom@tromey.com>
3352
3353         * symfile.c (reread_symbols): Notify iter, not objfile.
3354
3355 2018-07-22  Tom Tromey  <tom@tromey.com>
3356
3357         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3358         Use arch_ops.
3359         (ravenscar_thread_target::prepare_to_store): Likewise.
3360
3361 2018-07-22  Tom Tromey  <tom@tromey.com>
3362
3363         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3364         unused variable.  Call value_fetch_lazy when needed.
3365         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3366         Remove unused variable.  Call value_fetch_lazy when needed.
3367
3368 2018-07-22  Tom Tromey  <tom@tromey.com>
3369
3370         * m32c-tdep.c (mark_dma): Return void.
3371         (make_regs): Remove unused declarations.
3372
3373 2018-07-22  Tom Tromey  <tom@tromey.com>
3374
3375         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3376         cmdscm_get_valid_command_smob_arg_unsafe for effect.
3377         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3378         bkscm_get_valid_block_smob_arg_unsafe for effect.
3379
3380 2018-07-22  Tom Tromey  <tom@tromey.com>
3381
3382         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3383         value_type.
3384
3385 2018-07-22  Tom Tromey  <tom@tromey.com>
3386
3387         * windows-nat.c (saved_context): Conditionally define.
3388         * remote.c (remote_target::remote_btrace_maybe_reopen):
3389         Conditionally declare "warned".
3390         * inflow.c (sigquit_ours): Conditionally define.
3391         (new_tty): Move "tty" declaration inside #if.
3392         * guile/guile.c (guile_datadir): Conditionally define.
3393         * charset.c (set_be_le_names): Move some declarations inside #if.
3394         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3395         #if.
3396         (parse_xml_btrace_conf): Likewise.
3397
3398 2018-07-22  Tom Tromey  <tom@tromey.com>
3399
3400         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3401
3402 2018-07-22  Tom Tromey  <tom@tromey.com>
3403
3404         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3405         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3406         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3407         * buildsym-legacy.c (get_macro_table): Remove unused variable.
3408         * stack.c (frame_apply_level_command): Remove unused variable.
3409         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3410         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3411         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3412         unused variable.
3413         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3414         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3415         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3416         variable.
3417         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3418         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3419         variable.
3420         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3421         Remove unused variable.
3422         * cli/cli-script.c (recurse_read_control_structure): Remove unused
3423         variable.
3424         * common/tdesc.c (print_xml_feature::visit): Remove unused
3425         variable.
3426         * compile/compile-object-load.c (store_regs): Remove unused
3427         variables.
3428         * complaints.c (clear_complaints): Remove unused variable.
3429         * corelow.c (core_target_open): Remove unused variable.
3430         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3431         variable.
3432         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3433         variable.
3434         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3435         variable.
3436         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3437         variable.
3438         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3439         variable.
3440         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3441         variable.
3442         * ia64-tdep.c (examine_prologue): Remove unused variable.
3443         * infcall.c (run_inferior_call): Remove unused variable.
3444         * inferior.c (exit_inferior): Remove unused variable.
3445         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3446         * linespec.c (decode_line_2): Remove unused variable.
3447         * linux-nat.c (super_close): Remove.
3448         * linux-tdep.c (linux_info_proc): Remove unused variable.
3449         * mi/mi-main.c (mi_execute_command): Remove unused variable.
3450         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3451         Remove unused variable.
3452         * parse.c (find_minsym_type_and_address): Remove unused variable.
3453         * printcmd.c (info_symbol_command, printf_floating): Remove unused
3454         variable.
3455         * python/py-breakpoint.c (bppy_set_commands): Remove unused
3456         variable.
3457         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3458         variables.
3459         * record-btrace.c (record_btrace_target::store_registers): Remove
3460         unused variable.
3461         (cmd_show_record_btrace_cpu): Remove unused variable.
3462         * riscv-tdep.c (riscv_register_reggroup_p)
3463         (riscv_push_dummy_call, riscv_return_value): Remove unused
3464         variable.
3465         * rust-exp.y (literal): Remove unused variable.
3466         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3467         unused variable.
3468         <STRUCTOP_ANONYMOUS>: Likewise.
3469         * s390-linux-tdep.c (s390_linux_init_abi_31)
3470         (s390_linux_init_abi_64): Remove unused variable.
3471         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3472         (file_select_thread, net_windows_open, _initialize_ser_windows):
3473         Remove unused variables.
3474         * symtab.c (find_pc_sect_line): Remove unused variable.
3475         * target-memory.c (compute_garbled_blocks): Remove unused
3476         variable.
3477         (target_write_memory_blocks): Remove unused variable.
3478         * target.c (target_stack::unpush): Remove unused variables.
3479         * tracepoint.c (start_tracing, all_tracepoint_actions)
3480         (merge_uploaded_trace_state_variables)
3481         (print_one_static_tracepoint_marker): Remove unused variable.
3482         * unittests/basic_string_view/element_access/char/1.cc (test01):
3483         Remove unused variable.
3484         * windows-nat.c (windows_continue, windows_add_all_dlls)
3485         (do_initial_windows_stuff, windows_nat_target::create_inferior):
3486         Remove unused variables.
3487
3488 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
3489
3490         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3491         attr_profile in HAVE_ELF.
3492         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3493         HAVE_ELF.
3494
3495 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
3496
3497         * frame.c (frame_register_unwind): Change parameter name.
3498         (frame_unwind_register): Likewise.
3499         (frame_unwind_register_value): Likewise.
3500         (frame_unwind_register_signed): Likewise.
3501         (frame_unwind_register_unsigned): Likewise.
3502         * frame.h (frame_register_unwind): Likewise.
3503         (frame_unwind_register): Likewise.
3504         (frame_unwind_register_value): Likewise.
3505         (frame_unwind_register_signed): Likewise.
3506         (frame_unwind_register_unsigned): Likewise.
3507         (frame_unwind_arch): Likewise.
3508
3509 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3510
3511         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3512         ISA maintenance.
3513
3514 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3515
3516         * mips-linux-nat.c (mips_linux_nat_target::read_description):
3517         Call `get_ptrace_pid' rather than extracting the ptrace PID by
3518         hand.
3519
3520 2018-07-20  Keith Seitz  <keiths@redhat.com>
3521
3522         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3523         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3524         m_compunit_symtab, m_language>: Add "m_" prefix.
3525         Update all uses.
3526         * buildsym.c: Update all uses.
3527
3528 2018-07-20  Tom Tromey  <tom@tromey.com>
3529
3530         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3531         * buildsym.h (record_line_ftype): Remove typedef.
3532
3533 2018-07-20  Tom Tromey  <tom@tromey.com>
3534
3535         * buildsym-legacy.h (augment_type_symtab): Don't declare.
3536         (end_expandable_symtab): Likewise.
3537         (end_symtab_get_static_block): Likewise.
3538         (end_symtab_from_static_block): Likewise.
3539         * buildsym-legacy.c (augment_type_symtab): Remove.
3540         (end_expandable_symtab): Remove.
3541         (end_symtab_get_static_block): Remove.
3542         (end_symtab_from_static_block): Remove.
3543
3544 2018-07-20  Tom Tromey  <tom@tromey.com>
3545
3546         * dwarf2read.c: Include buildsym.h.
3547         (struct dwarf2_cu) <builder>: New method.
3548         (fixup_go_packaging): Update.
3549         (process_full_comp_unit, process_full_type_unit): Update.  Don't
3550         use scoped_free_pendings.
3551         (using_directives): Add "cu" parameter, remove "language".
3552         (read_import_statement, setup_type_unit_groups, )
3553         (read_func_scope, read_lexical_block_scope)
3554         (dwarf2_record_block_ranges, read_namespace): Update.
3555         (lnp_state_machine::lnp_state_machine): Add cu parameter.
3556         (lnp_state_machine::handle_end_sequence): Update.
3557         (class lnp_state_machine) <m_cu>: New member.
3558         <m_record_line_callback>: Remove.
3559         <m_currently_recording_lines>: New member.
3560         (lnp_state_machine::handle_set_file): Update.
3561         (noop_record_line): Remove.
3562         (dwarf_record_line_p): Add cu parameter.
3563         (dwarf_record_line_1, dwarf_finish_line): Likewise.
3564         (lnp_state_machine::record_line)
3565         (lnp_state_machine::lnp_state_machine)
3566         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3567         (dwarf_decode_lines): Update.
3568         (dwarf2_start_subfile): Add cu parameter.
3569         (dwarf2_start_symtab, new_symbol): Update.
3570         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3571         Remove dwarf2_per_objfile parameter.
3572         (dwarf_decode_macros): Update.
3573
3574 2018-07-20  Tom Tromey  <tom@tromey.com>
3575
3576         * stabsread.c (define_symbol): Update.
3577         * buildsym-legacy.h (get_buildsym_compunit): Declare.
3578         * dwarf2read.c (new_symbol): Update.
3579         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3580         * cp-namespace.c: Include buildsym.h.
3581         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3582         * buildsym-legacy.c (get_buildsym_compunit): New function.
3583
3584 2018-07-20  Tom Tromey  <tom@tromey.com>
3585
3586         * xcoffread.c: Include buildsym-legacy.h.
3587         * windows-nat.c: Include buildsym-legacy.h.
3588         * stabsread.c: Include buildsym-legacy.h.
3589         * mdebugread.c: Include buildsym-legacy.h.
3590         * buildsym-legacy.h: New file.
3591         * buildsym-legacy.c: New file, from buildsym.c.
3592         * go32-nat.c: Include buildsym-legacy.h.
3593         * dwarf2read.c: Include buildsym-legacy.h.
3594         * dbxread.c: Include buildsym-legacy.h.
3595         * cp-namespace.c: Include buildsym-legacy.h.
3596         * coffread.c: Include buildsym-legacy.h.
3597         * buildsym.h: Move some contents to buildsym-legacy.h.
3598         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
3599         buildsym-legacy.c.
3600         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3601
3602 2018-07-20  Tom Tromey  <tom@tromey.com>
3603
3604         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3605         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3606         (buildsym_compunit::buildsym_compunit)
3607         (buildsym_compunit::~buildsym_compunit)
3608         (buildsym_compunit::get_macro_table): Define.
3609
3610 2018-07-20  Tom Tromey  <tom@tromey.com>
3611
3612         * buildsym.c (reset_symtab_globals): Remove.
3613         (buildsym_compunit::end_symtab_from_static_block): Update.
3614         (buildsym_compunit::augment_type_symtab): Update.
3615         (end_symtab_from_static_block): Call free_buildsym_compunit.
3616         (augment_type_symtab, end_symtab, end_expandable_symtab):
3617         Likewise.
3618
3619 2018-07-20  Tom Tromey  <tom@tromey.com>
3620
3621         * arch-utils.c: Do not include buildsym.h.
3622         * mipsread.c: Do not include buildsym.h.
3623         * machoread.c: Do not include buildsym.h.
3624         * elfread.c: Do not include buildsym.h.
3625
3626 2018-07-20  Tom Tromey  <tom@tromey.com>
3627
3628         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3629         initialization.
3630         (buildsym_compunit): Add new constructor.
3631         (struct buildsym_compunit) <get_last_source_file, finish_block,
3632         record_block_range, start_subfile, patch_subfile_names,
3633         push_subfile, pop_subfile, record_line, get_compunit_symtab,
3634         set_last_source_start_addr, get_last_source_start_addr,
3635         get_local_using_directives, set_local_using_directives,
3636         get_global_using_directives, outermost_context_p,
3637         get_current_context_stack, get_context_stack_depth,
3638         get_current_subfile, get_local_symbols, get_file_symbols,
3639         get_global_symbols, record_debugformat, record_producer,
3640         push_context, pop_context, end_symtab_get_static_block,
3641         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3642         New public methods.
3643         <record_pending_block, finish_block_internal, make_blockvector,
3644         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3645         private methods.
3646         Update all users.
3647
3648 2018-05-22  Tom Tromey  <tom@tromey.com>
3649
3650         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3651         parameter.
3652         (finish_block_internal): Update.
3653
3654 2018-07-20  Tom Tromey  <tom@tromey.com>
3655
3656         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3657         parameter.
3658         (finish_block_internal): Update.
3659
3660 2018-07-20  Tom Tromey  <tom@tromey.com>
3661
3662         * buildsym.h (EXTERN): Don't define or undef.
3663         * buildsym.c (EXTERN): Don't define.
3664
3665 2018-07-20  Tom Tromey  <tom@tromey.com>
3666
3667         * buildsym.c: Remove TODO comment.
3668
3669 2018-07-20  Tom Tromey  <tom@tromey.com>
3670
3671         * coffread.c (coff_symtab_read): Update.
3672         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3673         (xcoff_new_init): Update.
3674         * mipsread.c (mipscoff_new_init): Update.
3675         * mdebugread.c (mdebug_build_psymtabs): Update.
3676         * elfread.c (elf_new_init): Update.
3677         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3678         Update.
3679         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3680         (coffstab_build_psymtabs, elfstab_build_psymtabs)
3681         (stabsect_build_psymtabs): Update.
3682         * buildsym.h (buildsym_init): Don't declare.
3683         * buildsym.c: Update comment.
3684         (prepare_for_building): Remove.
3685         (start_symtab, restart_symtab): Update.
3686         (reset_symtab_globals): Update comment.
3687         (buildsym_init): Remove.
3688
3689 2018-07-20  Tom Tromey  <tom@tromey.com>
3690
3691         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3692         * stabsread.c (patch_block_stabs, define_symbol, read_type)
3693         (read_enum_type, common_block_start, common_block_end)
3694         (cleanup_undefined_types_1, finish_global_stabs): Update.
3695         * mdebugread.c (psymtab_to_symtab_1): Update.
3696         * dwarf2read.c (fixup_go_packaging, read_func_scope)
3697         (read_lexical_block_scope, new_symbol): Update.
3698         * dbxread.c (process_one_symbol): Update.
3699         * coffread.c (coff_symtab_read, process_coff_symbol)
3700         (coff_read_enum_type): Update.
3701         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3702         declare.
3703         (get_local_symbols, get_file_symbols, get_global_symbols): New
3704         functions.
3705         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3706         m_global_symbols.
3707         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3708         (~scoped_free_pendings): Update.
3709         (finish_block, prepare_for_building, reset_symtab_globals)
3710         (end_symtab_get_static_block, end_symtab_with_blockvector)
3711         (augment_type_symtab, push_context): Update.
3712         (get_local_symbols, get_file_symbols, get_global_symbols): New
3713         functions.
3714         (buildsym_init): Update.
3715
3716 2018-07-20  Tom Tromey  <tom@tromey.com>
3717
3718         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3719         (process_full_type_unit): Likewise.
3720         (dwarf2_start_symtab): Set list_in_scope.
3721
3722 2018-07-20  Tom Tromey  <tom@tromey.com>
3723
3724         * dwarf2read.c (process_psymtab_comp_unit_reader)
3725         (build_type_psymtabs_reader): Do not set list_in_scope.
3726
3727 2018-07-20  Tom Tromey  <tom@tromey.com>
3728
3729         * buildsym.c (free_pendings): Remove.
3730         (add_symbol_to_list, scoped_free_pendings)
3731         (finish_block_internal, buildsym_init): Update.
3732
3733 2018-07-20  Tom Tromey  <tom@tromey.com>
3734
3735         * xcoffread.c (read_xcoff_symtab): Update.
3736         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3737         Update.
3738         * dbxread.c (process_one_symbol): Update.
3739         * coffread.c (coff_symtab_read): Update.
3740         * buildsym.h (finish_block): Update.
3741         * buildsym.c (finish_block): Remove "listhead" argument.
3742         (end_symtab_get_static_block): Update.
3743
3744 2018-07-20  Tom Tromey  <tom@tromey.com>
3745
3746         * buildsym.h (class scoped_free_pendings): Remove constructor.
3747         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3748         method.
3749         <m_pending_block_obstack, m_pending_blocks>: New members.
3750         (pending_block_obstack, pending_blocks): Remove.
3751         (scoped_free_pendings::scoped_free_pendings): Default.
3752         (~scoped_free_pendings): Update.
3753         (free_pending_blocks): Remove.
3754         (finish_block_internal, record_pending_block, make_blockvector)
3755         (end_symtab_get_static_block, augment_type_symtab, push_context)
3756         (buildsym_init): Update.
3757
3758 2018-07-20  Tom Tromey  <tom@tromey.com>
3759
3760         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3761         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3762         members.
3763         (pending_addrmap, pending_addrmap_obstack)
3764         (pending_addrmap_interesting): Remove.
3765         (scoped_free_pendings, record_block_range, make_blockvector)
3766         (prepare_for_building, reset_symtab_globals, buildsym_init):
3767         Update.
3768
3769 2018-07-20  Tom Tromey  <tom@tromey.com>
3770
3771         * xcoffread.c (process_linenos): Update.
3772         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3773         * mdebugread.c (psymtab_to_symtab_1): Update.
3774         * dwarf2read.c (setup_type_unit_groups)
3775         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3776         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3777         * dbxread.c (process_one_symbol): Update.
3778         * coffread.c (coff_symtab_read, enter_linenos)
3779         (process_coff_symbol): Update.
3780         * buildsym.h (current_subfile): Don't declare.
3781         (get_current_subfile): Declare.
3782         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3783         member.
3784         (start_subfile, free_buildsym_compunit, push_subfile)
3785         (prepare_for_building, start_symtab): Update.
3786         (get_current_subfile): New function.
3787
3788 2018-07-20  Tom Tromey  <tom@tromey.com>
3789
3790         * coffread.c (coff_symtab_read): Update.
3791         * xcoffread.c (read_xcoff_symtab): Update.
3792         * dwarf2read.c (new_symbol): Update.
3793         (read_func_scope, read_lexical_block_scope): Update.
3794         * dbxread.c (process_one_symbol): Update.
3795         * buildsym.h (context_stack, context_stack_depth): Don't declare.
3796         (outermost_context_p): Remove macro.
3797         (outermost_context_p, get_current_context_stack)
3798         (get_context_stack_depth): Declare.
3799         (pop_context): Return struct context_stack.
3800         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3801         member.
3802         (context_stack_size): Remove.
3803         (INITIAL_CONTEXT_STACK_SIZE): Remove.
3804         (prepare_for_building, end_symtab_get_static_block)
3805         (augment_type_symtab, push_context): Update.
3806         (pop_context): Return struct context_stack.
3807         (outermost_context_p, get_current_context_stack)
3808         (get_context_stack_depth): New functions.
3809         (buildsym_init): Update.
3810
3811 2018-07-20  Tom Tromey  <tom@tromey.com>
3812
3813         * rust-exp.y: Now a pure parser.  Update all rules.
3814         (%union): Move earlier.
3815         (current_parser, work_obstack): Remove globals.
3816         (rust_parser, ~rust_parser): Update.
3817         (class rust_parser) <copy_name, concat3, crate_name, super_name,
3818         lex_character, lex_number, lex_string, lex_identifier,
3819         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3820         convert_name, convert_params_to_expression,
3821         convert_ast_to_expression, ast_basic_type, ast_operation,
3822         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3823         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3824         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3825         ast_array_type, ast_slice_type, ast_reference_type,
3826         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3827         (rust_parse): Update.
3828         (rustyyerror, rustyylex): Add parser parameter.
3829         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3830         (rust_lex_stringish_test, rust_lex_test_sequence)
3831         (rust_lex_test_trailing_dot, rust_lex_test_completion)
3832         (rust_lex_test_push_back, rust_lex_tests): Update.
3833
3834 2018-07-19  Pedro Alves  <palves@redhat.com>
3835
3836         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3837         gdb::unique_xmalloc_ptr.
3838         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3839         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3840         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3841         copy-initialization.
3842         * guile/scm-pretty-print.c (ppscm_print_children): Use
3843         gdb::unique_xmalloc_ptr instead of cleanups.
3844         (gdbscm_apply_val_pretty_printer): Remove cleanups.
3845         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3846         gdb::unique_xmalloc_ptr.
3847         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3848         Adjust to use gdb::unique_xmalloc_ptr.
3849         * guile/scm-utils.c (extract_arg): Adjust.
3850         * guile/scm-value.c (gdbscm_value_field): Adjust to use
3851         gdb::unique_xmalloc_ptr instead of a cleanup.
3852
3853 2018-07-19  Tom Tromey  <tom@tromey.com>
3854
3855         * utils.c (do_value_free_to_mark)
3856         (make_cleanup_value_free_to_mark): Remove.
3857         * utils.h (make_cleanup_value_free_to_mark): Remove.
3858
3859 2018-07-19  Pedro Alves  <palves@redhat.com>
3860
3861         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3862         forwarding reference.
3863
3864 2018-07-18  Pedro Alves  <palves@redhat.com>
3865
3866         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3867         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
3868         cleanup.
3869
3870 2018-07-18  Pedro Alves  <palves@redhat.com>
3871
3872         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3873         exceptions.
3874         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3875         (gdbscm_wrap): New.
3876         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3877         directly instead of a cleanup.
3878         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3879         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3880         (vlscm_binop_gdbthrow): New, factored out from ...
3881         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3882         (vlscm_rich_compare): Use gdbscm_wrap.
3883         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3884         instead of a cleanup.
3885         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3886         cleanup.
3887         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3888         Use xfree directly instead of a cleanup.
3889         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3890         Adjust to use gdbscm_wrap and scoped_value_mark.
3891         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3892         (gdbscm_value_address, gdbscm_value_dereference)
3893         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3894         scoped_value_mark.
3895         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3896         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3897         scoped_value_mark.
3898         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3899         gdbscm_wrap and scoped_value_mark.
3900         (gdbscm_value_to_string): Use xfree directly instead of a
3901         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3902         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3903         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3904         scoped_value_mark.
3905         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3906         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3907         scoped_value_mark.
3908         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3909         gdbscm_wrap.
3910
3911 2018-07-18  Tom de Vries  <tdevries@suse.de>
3912
3913         * findvar.c (default_read_var_value): Also resolve dynamic type for
3914         LOC_OPTIMIZED_OUT vars.
3915
3916 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
3917
3918         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3919         decoding.
3920
3921 2018-07-17  Tom Tromey  <tom@tromey.com>
3922
3923         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3924         (compute_enum_list, pascm_set_param_value_x)
3925         (gdbscm_parameter_value): Update.
3926         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3927         (gdbscm_scm_to_host_string): Update.
3928         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3929         Update.
3930         * guile/scm-cmd.c (cmdscm_add_completion): Update.
3931         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
3932         * guile/scm-string.c (gdbscm_scm_to_string): Return
3933         unique_xmalloc_ptr.
3934         (gdbscm_scm_to_host_string): Likewise.
3935
3936 2018-07-17  Tom Tromey  <tom@tromey.com>
3937
3938         * guile/guile.c (gdbscm_eval_from_control_command): Update.
3939         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
3940         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
3941         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
3942         unique_xmalloc_ptr.
3943
3944 2018-07-17  Tom Tromey  <tom@tromey.com>
3945
3946         * guile/scm-param.c (pascm_signal_setshow_error): Update.
3947         * guile/guile-internal.h (gdbscm_exception_message_to_string):
3948         Update.
3949         * guile/scm-cmd.c (cmdscm_function): Update.
3950         * guile/scm-pretty-print.c
3951         (ppscm_print_exception_unless_memory_error): Update.
3952         * guile/scm-exception.c (gdbscm_exception_message_to_string):
3953         Return unique_xmalloc_ptr.
3954
3955 2018-07-17  Tom Tromey  <tom@tromey.com>
3956
3957         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
3958         Use string_printf.
3959
3960 2018-07-17  Jim Wilson  <jimw@sifive.com>
3961
3962         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
3963         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
3964         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
3965         unecessary braces after EF_RISCV_RVC test.  Delete call to
3966         set_gdbarch_decr_pc_after_break.
3967
3968         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
3969         RISCV_LAST_FP_REGNUM + 1.
3970         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
3971
3972 2018-07-17  Tom Tromey  <tom@tromey.com>
3973
3974         * configure.ac: Remove --disable-gdbcli.
3975         * configure: Rebuild.
3976         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
3977         (SUBDIR_CLI_CFLAGS): Remove.
3978         (SFILES): Use SUBDIR_CLI_SRCS.
3979         (COMMON_OBS): Use SUBDIR_CLI_OBS.
3980
3981 2018-07-17  Tom Tromey  <tom@tromey.com>
3982
3983         PR gdb/18624:
3984         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
3985
3986 2018-07-16  Jim Wilson  <jimw@sifive.com>
3987
3988         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
3989
3990 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
3991
3992         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
3993         variable.
3994         (libunwind_frame_sniffer): Likewise.
3995         (libunwind_frame_prev_register): Likewise.
3996         (libunwind_sigtramp_frame_sniffer): Likewise.
3997         * ia64-tdep.c (ia64_access_reg): Likewise.
3998         (ia64_access_rse_reg): Likewise.
3999         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4000         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4001
4002 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4003
4004         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4005
4006 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4007
4008         * remote-sim.c (gdbsim_target::close,
4009         gdbsim_target::mourn_inferior): Remove unused variables.
4010
4011 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
4012
4013         * ia64-tdep.c (ktab_buf): New global.
4014         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4015         (get_kernel_table): Adjust.
4016
4017 2018-07-16  Tom Tromey  <tom@tromey.com>
4018
4019         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4020         * dwarf2read.c (using_directives, new_symbol): Use
4021         outermost_context_p.
4022         * dbxread.c (process_one_symbol): Use outermost_context_p.
4023         * coffread.c (coff_symtab_read): Use outermost_context_p.
4024
4025 2018-07-16  Tom Tromey  <tom@tromey.com>
4026
4027         * dwarf2read.c (using_directives, read_func_scope)
4028         (read_lexical_block_scope): Update.
4029         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4030         * buildsym.h (local_using_directives, global_using_directives):
4031         Don't declare.
4032         (get_local_using_directives, set_local_using_directives)
4033         (get_global_using_directives): Declare.
4034         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4035         m_global_using_directives>: New members.
4036         (finish_block_internal, prepare_for_building)
4037         (reset_symtab_globals, end_symtab_get_static_block)
4038         (push_context): Update.
4039         (get_local_using_directives, set_local_using_directives)
4040         (get_global_using_directives): New functions.
4041         (buildsym_init): Update.
4042
4043 2018-07-16  Tom Tromey  <tom@tromey.com>
4044
4045         * xcoffread.c (xcoff_initial_scan): Don't call
4046         free_pending_blocks.
4047         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4048         * buildsym.h (class scoped_free_pendings): Add constructor.
4049         (free_pending_blocks): Don't declare.
4050         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4051         (free_pending_blocks): Now static.
4052
4053 2018-07-16  Tom Tromey  <tom@tromey.com>
4054
4055         * buildsym.h (push_subfile, pop_subfile): Update declarations.
4056         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4057         member.
4058         (struct subfile_stack): Remove.
4059         (subfile_stack): Remove.
4060         (push_subfile, pop_subfile, buildsym_init): Update.
4061
4062 2018-07-16  Tom Tromey  <tom@tromey.com>
4063
4064         * buildsym.c (push_subfile): Use gdb_assert.
4065         (pop_subfile): Use gdb_assert.
4066
4067 2018-07-16  Tom Tromey  <tom@tromey.com>
4068
4069         * buildsym.h (merge_symbol_lists): Remove.
4070         * buildsym.c (merge_symbol_lists): Remove.
4071
4072 2018-07-16  Tom Tromey  <tom@tromey.com>
4073
4074         * stabsread.c (scan_file_globals): Update comment.
4075         * stabsread.h (scan_file_globals): Move from buildsym.h.
4076         * buildsym.h (scan_file_globals): Move to stabsread.h.
4077
4078 2018-07-16  Tom Tromey  <tom@tromey.com>
4079
4080         * xcoffread.c (xcoff_new_init): Update.
4081         * mipsread.c (mipscoff_new_init): Update.
4082         * mdebugread.c (mdebug_build_psymtabs): Update.
4083         * elfread.c (elf_new_init): Update.
4084         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4085         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4086         * buildsym.h (buildsym_new_init): Don't declare.
4087         * buildsym.c (buildsym_new_init): Remove.
4088
4089 2018-07-16  Tom Tromey  <tom@tromey.com>
4090
4091         * stabsread.h (within_function): Move from buildsym.h.
4092         * stabsread.c (start_stabs): Clear within_function.
4093         * coffread.c (coff_start_symtab): Clear within_function.
4094         * buildsym.h (within_function): Move to stabsread.h.
4095         * buildsym.c (prepare_for_building): Update.
4096
4097 2018-07-16  Tom Tromey  <tom@tromey.com>
4098
4099         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4100         * dwarf2read.c (dwarf2_start_symtab): Don't set
4101         processing_gcc_compilation.
4102         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4103
4104 2018-07-16  Tom Tromey  <tom@tromey.com>
4105
4106         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4107         (next_symbol_text_func): Move from buildsym.h.
4108         * stabsread.c (hashname): Move from buildsym.c.
4109         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4110         (next_symbol_text_func, hashname): Move to stabsread.h.
4111         * buildsym.c: Don't include bcache.h
4112         (hashname): Move to stasbread.c.
4113
4114 2018-07-16  Tom Tromey  <tom@tromey.com>
4115
4116         * buildsym.h (context_stack_size): Don't declare.
4117         * buildsym.c (context_stack_size): New global.
4118
4119 2018-07-16  Tom Tromey  <tom@tromey.com>
4120
4121         * dbxread.c (processing_acc_compilation): New global.
4122         * buildsym.h (processing_acc_compilation): Don't declare.
4123
4124 2018-07-16  Tom Tromey  <tom@tromey.com>
4125
4126         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4127         * dbxread.c (read_ofile_symtab): Update.
4128         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4129         * buildsym.h (last_source_start_addr): Remove.
4130         (set_last_source_start_addr, get_last_source_start_addr):
4131         Declare.
4132         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4133         parameter.
4134         (struct buildsym_compunit) <m_last_source_start_addr>: New
4135         member.
4136         (prepare_for_building): Remove start_addr parameter.
4137         (start_symtab, restart_symtab, end_symtab_get_static_block)
4138         (end_symtab_with_blockvector): Update.
4139         (set_last_source_start_addr, get_last_source_start_addr): New
4140         functions.
4141
4142 2018-07-16  Tom Tromey  <tom@tromey.com>
4143
4144         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4145         member.
4146         (have_line_numbers): Remove.
4147         (record_line, prepare_for_building, end_symtab_get_static_block)
4148         (augment_type_symtab): Update.
4149
4150 2018-07-16  Tom Tromey  <tom@tromey.com>
4151
4152         * buildsym.c (~buildsym_compunit): Free the macro table.
4153         (struct buildsym_compunit) <get_macro_table, release_macros>: New
4154         methods.
4155         <m_pending_macros>: New member.
4156         (pending_macros): Remove.
4157         (~scoped_free_pendings, get_macro_table, prepare_for_building)
4158         (reset_symtab_globals, end_symtab_get_static_block)
4159         (end_symtab_with_blockvector, augment_type_symtab)
4160         (buildsym_init): Update.
4161
4162 2018-07-16  Tom Tromey  <tom@tromey.com>
4163
4164         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4165         parameter.
4166         (buildsym_compunit::set_last_source_file): New method.
4167         <m_last_source_file>: New member.
4168         (prepare_for_building): Remove "name" parameter.
4169         (start_symtab, restart_symtab, reset_symtab_globals): Update.
4170         (last_source_file): Remove.
4171         (set_last_source_file, get_last_source_file): Update.
4172
4173 2018-07-16  Tom Tromey  <tom@tromey.com>
4174
4175         * buildsym.c (prepare_for_building): Add assert.
4176
4177 2018-07-16  Tom Tromey  <tom@tromey.com>
4178
4179         * buildsym.c (~buildsym_compunit): Update.
4180         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4181         (start_subfile, patch_subfile_names)
4182         (end_symtab_with_blockvector): Update.
4183
4184 2018-07-16  Tom Tromey  <tom@tromey.com>
4185
4186         * buildsym.c (struct buildsym_compunit): Add constructor,
4187         destructor, initializers.
4188         (start_buildsym_compunit): Remove.
4189         (free_buildsym_compunit): Use "delete".
4190         (start_symtab, restart_symtab): Use "new".
4191
4192 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
4193
4194         * symfile.c (set_objfile_default_section_offset): Remove struct
4195         keyword.
4196
4197 2018-07-14  Stafford Horne  <shorne@gmail.com>
4198
4199         * (Responsible Maintainers): Add myself as or1k maintainer.
4200
4201 2018-07-13  Tom Tromey  <tom@tromey.com>
4202
4203         * symfile.c (set_objfile_default_section_offset): Use extra braces
4204         around initializer.
4205
4206 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4207
4208         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4209         non-branching basr.
4210
4211 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4212
4213         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4214         unittests/cli-utils-selftests.c
4215         * unittests/cli-utils-selftests.c: New file.
4216
4217 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4218
4219         * NEWS: Mention new commands. Mention change to 'thread apply'.
4220
4221 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4222
4223         * thread.c (thr_try_catch_cmd): New function.
4224         (thread_apply_all_command): Handle qcs flags.
4225         (thread_apply_command): Handle qcs flags.
4226         (taas_command): New function.
4227         (tfaas_command): New function.
4228         (_initialize_thread): Update to setup the new commands 'taas
4229         and 'tfaas'. Change doc string for 'thread apply'.
4230
4231 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4232
4233         * stack.c: (trailing_outermost_frame): New function, mostly
4234         extracted from backtrace_command_1.
4235         (leading_innermost_frame): New function.
4236         (backtrace_command_1): Update to call trailing_outermost_frame.
4237         (frame_apply_command_count): New function.
4238         (frame_apply_level_command): New function.
4239         (frame_apply_all_command): New function.
4240         (frame_apply_command): New function.
4241         (faas_command): New function.
4242         (frame_cmd_list): New variable.
4243         (_initialize_stack): Update to setup the new commands 'frame apply'
4244         and 'faas'.
4245
4246 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4247
4248         * cli-utils.c (number_or_range_parser::get_number): Only handle
4249         numbers or convenience var as numbers.
4250         (parse_flags): New function.
4251         (parse_flags_qcs): New function.
4252         (number_or_range_parser::finished): Ensure parsing end is detected
4253         before end of string.
4254         * cli-utils.h (parse_flags): New function.
4255         (parse_flags_qcs): New function.
4256         (number_or_range_parser): Remove m_finished bool.
4257         (number_or_range_parser::skip_range): Set m_in_range to false.
4258
4259 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
4260
4261         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4262         on Windows.
4263
4264 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4265             Jan Kratochvil  <jan.kratochvil@redhat.com>
4266             Paul Fertser  <fercerpav@gmail.com>
4267             Tsutomu Seki  <sekiriki@gmail.com>
4268             Pedro Alves  <palves@redhat.com>
4269
4270         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4271         'unittests/parse-connection-spec-selftests.c'.
4272         (COMMON_SFILES): Add 'common/netstuff.c'.
4273         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4274         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4275         * common/netstuff.c: New file.
4276         * common/netstuff.h: New file.
4277         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4278         (wait_for_connect): Update comment.  New parameter
4279         'gdb::optional<int> sock' instead of 'struct serial *scb'.
4280         Use 'sock' directly instead of 'scb->fd'.
4281         (try_connect): New function, with code from 'net_open'.
4282         (net_open): Rewrite main loop to deal with multiple
4283         sockets/addresses.  Handle IPv6-style hostnames; implement
4284         support for IPv6 connections.
4285         * unittests/parse-connection-spec-selftests.c: New file.
4286
4287 2018-07-11  Pedro Alves  <palves@redhat.com>
4288
4289         PR gdb/23377
4290         * remote.c (remote_target::remote_detach_pid): Call
4291         set_current_process.
4292
4293 2018-07-11  Pedro Alves  <palves@redhat.com>
4294
4295         * h8300-tdep.c (h8300_gdbarch_init): Remove
4296         set_gdbarch_ecoff_reg_to_regnum calls.
4297
4298 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4299
4300         PR c++/23373
4301         * c-typeprint.c (c_type_print_base_struct_union): Don't print
4302         offsets/sizes for static members of a class/struct.
4303
4304 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
4305
4306         * target-descriptions.c (tdesc_register_bitsize): Rename.
4307         * target-descriptions.h (tdesc_register_bitsize): Likewise.
4308         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4309         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4310
4311 2018-07-10  Tom Tromey  <tom@tromey.com>
4312
4313         * breakpoint.c (moribund_locations): Now static and a
4314         std::vector.
4315         (breakpoint_init_inferior, moribund_breakpoint_here_p)
4316         (build_bpstat_chain, update_global_location_list)
4317         (breakpoint_retire_moribund): Update.
4318         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
4319         VEC.
4320
4321 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4322
4323         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4324         (riscv_register_reggroup_p): Use new function, remove unneeded
4325         parenthesis.
4326         (riscv_push_dummy_call): Extend assert to compare against xlen or
4327         flen based on register type.
4328
4329 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4330
4331         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4332
4333 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4334
4335         * remote.c (show_hardware_watchpoint_limit): New function.
4336         (show_hardware_watchpoint_length_limit): New function.
4337         (show_hardware_breakpoint_limit): New function.
4338         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4339         where appropriate, update help text.
4340
4341 2018-07-09  Tom Tromey  <tom@tromey.com>
4342
4343         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4344         (CLIBS): Don't mention NAT_CLIBS.
4345
4346 2018-07-09  Tom Tromey  <tom@tromey.com>
4347
4348         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4349         (LIBGDB_OBS, clean mostlyclean): Update.
4350         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4351
4352 2018-07-09  Tom Tromey  <tom@tromey.com>
4353
4354         * Makefile.in (%.c: %.y): Use ECHO_YACC.
4355         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
4356         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4357
4358 2018-07-09  Tom Tromey  <tom@tromey.com>
4359
4360         * Makefile.in (ALLDEPFILES): Remove exec.c.
4361         (COMMON_OBS): Remove exec.o.
4362         (COMMON_SFILES): Add exec.c.
4363
4364 2018-07-09  Tom Tromey  <tom@tromey.com>
4365
4366         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4367
4368 2018-07-09  Tom Tromey  <tom@tromey.com>
4369
4370         * Makefile.in (clean mostlyclean): Remove stamp-version.
4371         (version.c): Depend on stamp-version.
4372         (stamp-version): New rule, from version.c rule.
4373
4374 2018-07-09  Tom Tromey  <tom@tromey.com>
4375
4376         * Makefile.in (init.c): Depend on stamp-init.
4377         (stamp-init): New rule, from init.c rule.
4378         (clean mostlyclean): Remove stamp-init.
4379
4380 2018-07-09  Tom Tromey  <tom@tromey.com>
4381
4382         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4383         SUBDIR_GCC_COMPILE_SRCS.
4384
4385 2018-07-09  Tom Tromey  <tom@tromey.com>
4386
4387         * Makefile.in (init.c): Remove some unused sed rules.
4388
4389 2018-07-09  Tom Tromey  <tom@tromey.com>
4390
4391         * Makefile.in (TSOBS): Remove.
4392         (INIT_FILES): Update.
4393         (LIBGDB_OBS): Update.
4394         (COMMON_SFILES): Add inflow.c.
4395         (SFILES): Remove inflow.c.
4396
4397 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
4398
4399         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4400
4401 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
4402
4403         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4404         get_saveloc_name, is_signal_frame_name, step_name,
4405         init_remote_name, create_addr_space_name,
4406         destroy_addr_space_name, search_unwind_table_name,
4407         find_dyn_list_name): Constify.
4408
4409 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
4410
4411         * darwin-nat.c (darwin_pthread_kill): New function.
4412         (darwin_resume_thread): Use darwin_pthread_kill.
4413
4414 2018-07-05  Tom de Vries  <tdevries@suse.de>
4415
4416         * macroexp.c (macro_buffer) <operator=>: New member function.
4417
4418 2018-07-04  Tom Tromey  <tom@tromey.com>
4419
4420         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4421
4422 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
4423
4424         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4425         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4426         * maint.c: Likewise.
4427         * top.c: Likewise.
4428
4429 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4430
4431         * NEWS: Create a new section for the next release branch.
4432         Rename the section of the current branch, now that it has
4433         been cut.
4434
4435 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4436
4437         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4438         * version.in: Bump version to 8.2.50.DATE-git.
4439
4440 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
4441             Pedro Alves  <palves@redhat.com>
4442
4443         * linux-nat.c (linux_init_ptrace): Rename to ...
4444         (linux_init_ptrace_procfs): ... this.  Call
4445         linux_proc_init_warnings.
4446         (linux_nat_target::post_attach)
4447         (linux_nat_target::post_startup_inferior): Adjust.
4448         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4449         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4450
4451 2018-07-04  Tom de Vries  <tdevries@suse.de>
4452
4453         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4454         check ...
4455         (read_comp_unit_head): ... here.
4456
4457 2018-07-03  Tom Tromey  <tom@tromey.com>
4458
4459         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4460         (stop_tracing, tstatus_command)
4461         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4462         (print_one_static_tracepoint_marker): Update.
4463         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4464         std::vector.
4465         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
4466         VEC.
4467         (all_tracepoints, static_tracepoints_here): Return std::vector.
4468
4469 2018-07-03  Tom Tromey  <tom@tromey.com>
4470
4471         * common/ptid.c (ptid_equal): Remove.
4472         * common/ptid.h (ptid_equal): Don't declare.
4473         * ada-tasks.c: Update.
4474         * breakpoint.c: Update.
4475         * common/agent.c: Update.
4476         * corelow.c: Update.
4477         * darwin-nat-info.c: Update.
4478         * darwin-nat.c: Update.
4479         * dcache.c: Update.
4480         * dtrace-probe.c: Update.
4481         * dummy-frame.c: Update.
4482         * fbsd-nat.c: Update.
4483         * frame.c: Update.
4484         * gdbthread.h: Update.
4485         * gnu-nat.c: Update.
4486         * go32-nat.c: Update.
4487         * inf-loop.c: Update.
4488         * inf-ptrace.c: Update.
4489         * infcall.c: Update.
4490         * infcmd.c: Update.
4491         * inflow.c: Update.
4492         * infrun.c: Update.
4493         * linux-fork.c: Update.
4494         * linux-nat.c: Update.
4495         * linux-thread-db.c: Update.
4496         * mi/mi-cmd-var.c: Update.
4497         * mi/mi-interp.c: Update.
4498         * mi/mi-main.c: Update.
4499         * nto-procfs.c: Update.
4500         * ppc-linux-tdep.c: Update.
4501         * procfs.c: Update.
4502         * python/py-inferior.c: Update.
4503         * python/py-record-btrace.c: Update.
4504         * python/py-record.c: Update.
4505         * ravenscar-thread.c: Update.
4506         * regcache.c: Update.
4507         * remote-sim.c: Update.
4508         * remote.c: Update.
4509         * sol-thread.c: Update.
4510         * solib.c: Update.
4511         * target.c: Update.
4512         * tui/tui-stack.c: Update.
4513         * varobj.c: Update.
4514         * windows-nat.c: Update.
4515         * windows-tdep.c: Update.
4516
4517 2018-07-03  Tom Tromey  <tom@tromey.com>
4518
4519         * common/ptid.c (ptid_match): Remove.
4520         * common/ptid.h (ptid_match): Don't declare.
4521         * fbsd-nat.c: Update.
4522         * infcmd.c: Update.
4523         * infrun.c: Update.
4524         * linux-nat.c: Update.
4525         * record-btrace.c: Update.
4526         * regcache.c: Update.
4527         * remote.c: Update.
4528
4529 2018-07-03  Tom Tromey  <tom@tromey.com>
4530
4531         * common/ptid.c (ptid_tid_p): Remove.
4532         * common/ptid.h (ptid_tid_p): Don't declare.
4533         * sol-thread.c: Update.
4534
4535 2018-07-03  Tom Tromey  <tom@tromey.com>
4536
4537         * common/ptid.c (ptid_lwp_p): Remove.
4538         * common/ptid.h (ptid_lwp_p): Don't declare.
4539         * fbsd-nat.c: Update.
4540         * linux-nat.c: Update.
4541         * nat/linux-procfs.c: Update.
4542         * nat/x86-linux-dregs.c: Update.
4543         * sol-thread.c: Update.
4544
4545 2018-07-03  Tom Tromey  <tom@tromey.com>
4546
4547         * common/ptid.c (ptid_is_pid): Remove.
4548         * common/ptid.h (ptid_is_pid): Don't declare.
4549         * infrun.c: Update.
4550         * linux-nat.c: Update.
4551         * mi/mi-interp.c: Update.
4552         * remote.c: Update.
4553         * thread.c: Update.
4554
4555 2018-07-03  Tom Tromey  <tom@tromey.com>
4556
4557         * common/ptid.c (ptid_get_tid): Remove.
4558         * common/ptid.h (ptid_get_tid): Don't declare.
4559         * ada-tasks.c: Update.
4560         * aix-thread.c: Update.
4561         * bsd-uthread.c: Update.
4562         * darwin-nat.c: Update.
4563         * fbsd-nat.c: Update.
4564         * i386-darwin-nat.c: Update.
4565         * infrun.c: Update.
4566         * linux-tdep.c: Update.
4567         * nto-procfs.c: Update.
4568         * ppc-ravenscar-thread.c: Update.
4569         * python/py-infthread.c: Update.
4570         * ravenscar-thread.c: Update.
4571         * sol-thread.c: Update.
4572         * sparc-ravenscar-thread.c: Update.
4573         * windows-nat.c: Update.
4574
4575 2018-07-03  Tom Tromey  <tom@tromey.com>
4576
4577         * common/ptid.c (ptid_get_lwp): Remove.
4578         * common/ptid.h (ptid_get_lwp): Don't declare.
4579         * aarch64-linux-nat.c: Update.
4580         * ada-tasks.c: Update.
4581         * aix-thread.c: Update.
4582         * amd64-linux-nat.c: Update.
4583         * arm-linux-nat.c: Update.
4584         * corelow.c: Update.
4585         * fbsd-nat.c: Update.
4586         * fbsd-tdep.c: Update.
4587         * gnu-nat.c: Update.
4588         * i386-cygwin-tdep.c: Update.
4589         * i386-gnu-nat.c: Update.
4590         * i386-linux-nat.c: Update.
4591         * ia64-linux-nat.c: Update.
4592         * inf-ptrace.c: Update.
4593         * infrun.c: Update.
4594         * linux-fork.c: Update.
4595         * linux-nat.c: Update.
4596         * linux-tdep.c: Update.
4597         * linux-thread-db.c: Update.
4598         * mips-linux-nat.c: Update.
4599         * nat/aarch64-linux-hw-point.c: Update.
4600         * nat/aarch64-linux.c: Update.
4601         * nat/linux-btrace.c: Update.
4602         * nat/linux-osdata.c: Update.
4603         * nat/linux-procfs.c: Update.
4604         * nat/x86-linux-dregs.c: Update.
4605         * obsd-nat.c: Update.
4606         * ppc-fbsd-nat.c: Update.
4607         * ppc-linux-nat.c: Update.
4608         * procfs.c: Update.
4609         * python/py-infthread.c: Update.
4610         * ravenscar-thread.c: Update.
4611         * remote.c: Update.
4612         * s390-linux-nat.c: Update.
4613         * sol-thread.c: Update.
4614         * sol2-tdep.c: Update.
4615         * spu-linux-nat.c: Update.
4616         * x86-linux-nat.c: Update.
4617         * xtensa-linux-nat.c: Update.
4618
4619 2018-07-03  Tom Tromey  <tom@tromey.com>
4620
4621         * common/ptid.c (ptid_get_pid): Remove.
4622         * common/ptid.h (ptid_get_pid): Don't declare.
4623         * aarch64-linux-nat.c: Update.
4624         * ada-lang.c: Update.
4625         * aix-thread.c: Update.
4626         * alpha-bsd-nat.c: Update.
4627         * amd64-fbsd-nat.c: Update.
4628         * amd64-linux-nat.c: Update.
4629         * arm-linux-nat.c: Update.
4630         * arm-nbsd-nat.c: Update.
4631         * auxv.c: Update.
4632         * break-catch-syscall.c: Update.
4633         * breakpoint.c: Update.
4634         * bsd-uthread.c: Update.
4635         * corelow.c: Update.
4636         * ctf.c: Update.
4637         * darwin-nat.c: Update.
4638         * fbsd-nat.c: Update.
4639         * fbsd-tdep.c: Update.
4640         * gcore.c: Update.
4641         * gnu-nat.c: Update.
4642         * hppa-nbsd-nat.c: Update.
4643         * hppa-obsd-nat.c: Update.
4644         * i386-fbsd-nat.c: Update.
4645         * ia64-linux-nat.c: Update.
4646         * inf-ptrace.c: Update.
4647         * infcmd.c: Update.
4648         * inferior.c: Update.
4649         * inferior.h: Update.
4650         * inflow.c: Update.
4651         * infrun.c: Update.
4652         * linux-fork.c: Update.
4653         * linux-nat.c: Update.
4654         * linux-tdep.c: Update.
4655         * linux-thread-db.c: Update.
4656         * m68k-bsd-nat.c: Update.
4657         * mi/mi-interp.c: Update.
4658         * mi/mi-main.c: Update.
4659         * mips-linux-nat.c: Update.
4660         * mips-nbsd-nat.c: Update.
4661         * mips64-obsd-nat.c: Update.
4662         * nat/aarch64-linux-hw-point.c: Update.
4663         * nat/aarch64-linux.c: Update.
4664         * nat/linux-btrace.c: Update.
4665         * nat/linux-osdata.c: Update.
4666         * nat/linux-procfs.c: Update.
4667         * nat/x86-linux-dregs.c: Update.
4668         * nto-procfs.c: Update.
4669         * obsd-nat.c: Update.
4670         * ppc-linux-nat.c: Update.
4671         * ppc-nbsd-nat.c: Update.
4672         * ppc-obsd-nat.c: Update.
4673         * proc-service.c: Update.
4674         * procfs.c: Update.
4675         * python/py-inferior.c: Update.
4676         * python/py-infthread.c: Update.
4677         * ravenscar-thread.c: Update.
4678         * record.c: Update.
4679         * remote-sim.c: Update.
4680         * remote.c: Update.
4681         * rs6000-nat.c: Update.
4682         * s390-linux-nat.c: Update.
4683         * sh-nbsd-nat.c: Update.
4684         * sol-thread.c: Update.
4685         * sparc-nat.c: Update.
4686         * sparc64-tdep.c: Update.
4687         * spu-linux-nat.c: Update.
4688         * spu-tdep.c: Update.
4689         * target-debug.h: Update.
4690         * target.c: Update.
4691         * thread.c: Update.
4692         * tid-parse.c: Update.
4693         * tracefile-tfile.c: Update.
4694         * vax-bsd-nat.c: Update.
4695         * windows-nat.c: Update.
4696         * x86-linux-nat.c: Update.
4697         * x86-nat.c: Update.
4698
4699 2018-07-03  Tom Tromey  <tom@tromey.com>
4700
4701         * common/ptid.c (pid_to_ptid): Remove.
4702         * common/ptid.h (pid_to_ptid): Don't declare.
4703         * aix-thread.c: Update.
4704         * arm-linux-nat.c: Update.
4705         * common/ptid.c: Update.
4706         * common/ptid.h: Update.
4707         * corelow.c: Update.
4708         * ctf.c: Update.
4709         * darwin-nat.c: Update.
4710         * fbsd-nat.c: Update.
4711         * fork-child.c: Update.
4712         * gnu-nat.c: Update.
4713         * go32-nat.c: Update.
4714         * inf-ptrace.c: Update.
4715         * infcmd.c: Update.
4716         * inferior.c: Update.
4717         * infrun.c: Update.
4718         * linux-fork.c: Update.
4719         * linux-nat.c: Update.
4720         * nat/aarch64-linux-hw-point.c: Update.
4721         * nat/fork-inferior.c: Update.
4722         * nat/x86-linux-dregs.c: Update.
4723         * nto-procfs.c: Update.
4724         * obsd-nat.c: Update.
4725         * procfs.c: Update.
4726         * progspace.c: Update.
4727         * remote.c: Update.
4728         * rs6000-nat.c: Update.
4729         * s390-linux-nat.c: Update.
4730         * sol-thread.c: Update.
4731         * spu-linux-nat.c: Update.
4732         * target.c: Update.
4733         * top.c: Update.
4734         * tracefile-tfile.c: Update.
4735         * windows-nat.c: Update.
4736
4737 2018-07-03  Tom Tromey  <tom@tromey.com>
4738
4739         * common/ptid.h (ptid_build): Don't declare.
4740         * common/ptid.c (ptid_build): Remove.
4741         * aix-thread.c: Update.
4742         * bsd-kvm.c: Update.
4743         * bsd-uthread.c: Update.
4744         * common/agent.c: Update.
4745         * common/ptid.c: Update.
4746         * common/ptid.h: Update.
4747         * corelow.c: Update.
4748         * darwin-nat.c: Update.
4749         * fbsd-nat.c: Update.
4750         * gnu-nat.c: Update.
4751         * linux-fork.c: Update.
4752         * linux-nat.c: Update.
4753         * linux-thread-db.c: Update.
4754         * nat/linux-osdata.c: Update.
4755         * nat/linux-procfs.c: Update.
4756         * nto-procfs.c: Update.
4757         * obsd-nat.c: Update.
4758         * proc-service.c: Update.
4759         * procfs.c: Update.
4760         * ravenscar-thread.c: Update.
4761         * remote-sim.c: Update.
4762         * remote.c: Update.
4763         * sol-thread.c: Update.
4764         * target.c: Update.
4765         * windows-nat.c: Update.
4766
4767 2018-07-03  Tom Tromey  <tom@tromey.com>
4768
4769         * infrun.c (follow_exec): Use exit_inferior_silent.
4770         * inferior.c (exit_inferior_num_silent): Remove.
4771         * inferior.h (exit_inferior_num_silent): Don't declare.
4772
4773 2018-07-03  Tom Tromey  <tom@tromey.com>
4774
4775         PR cli/23340:
4776         * darwin-nat.c (darwin_attach_pid): Reset inferior and
4777         inferior_ptid on error.
4778
4779 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
4780             Simon Marchi  <simon.marchi@polymtl.ca>
4781
4782         PR tdep/8282
4783         * disasm.h (gdb_disassembler): Add
4784         `m_disassembler_options_holder'. member
4785         * disasm.c (get_all_disassembler_options): New function.
4786         (gdb_disassembler::gdb_disassembler): Use it.
4787         (gdb_buffered_insn_length_init_dis): Likewise.
4788         (gdb_buffered_insn_length): Adjust accordingly.
4789         (set_disassembler_options): Handle options with arguments.
4790         (show_disassembler_options_sfunc): Likewise.  Add a leading new
4791         line if showing options with descriptions.
4792         (disassembler_options_completer): Adapt to using the
4793         `disasm_options_and_args_t' structure.
4794         * mips-tdep.c (mips_disassembler_options): New variable.
4795         (mips_disassembler_options_o32): Likewise.
4796         (mips_disassembler_options_n32): Likewise.
4797         (mips_disassembler_options_n64): Likewise.
4798         (gdb_print_insn_mips): Don't set `disassembler_options'.
4799         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4800         functions.
4801         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4802         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
4803         `gdbarch_disassembler_options_implicit' and
4804         `gdbarch_valid_disassembler_options'.
4805         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4806         `disasm_options_and_args_t' structure.
4807         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4808         method.
4809         (valid_disassembler_options): Switch from `disasm_options_t' to
4810         the `disasm_options_and_args_t' structure.
4811         * NEWS: Document `set disassembler-options' support for the MIPS
4812         target.
4813         * gdbarch.h: Regenerate.
4814         * gdbarch.c: Regenerate.
4815
4816 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4817
4818         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4819
4820 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
4821
4822         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4823         parameter in call to amd64_target_description.
4824         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4825         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4826         (amd64fbsd_init_abi): Likewise.
4827         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4828         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4829         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4830         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4831
4832 2018-06-29  Pedro Alves  <palves@redhat.com>
4833
4834         * gdb/amd64-tdep.h (amd64_create_target_description): Add
4835         "segments" parameter.
4836         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4837         (_initialize_amd64_tdep): Update call to
4838         amd64_create_target_description.
4839         (amd64_target_description): Add "segments" parameter.  Adjust
4840         the implementation to use it.
4841         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4842         call to amd64_create_target_description.
4843         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4844         * gdb/arch/amd64.h (amd64_create_target_description): Add
4845         "segments" register.
4846         * gdb/arch/amd64.c (amd64_create_target_description): Add
4847         "segments" parameter.  Call create_feature_i386_64bit_segments
4848         only if SEGMENTS is true.
4849         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4850         call to amd64_create_target_description.
4851
4852 2018-06-29  Pedro Alves  <palves@redhat.com>
4853
4854         * thread.c (thread_target_id_str): New, factored out from ...
4855         (print_thread_info_1): ... here.  Use it to compute the max
4856         "Target Id" column width.
4857
4858 2018-06-29  Pedro Alves  <palves@redhat.com>
4859
4860         * remote.c (remote_target::extra_thread_info): Delete
4861         'display_buf' and 'n' locals.  from the cache, regardless of
4862         packet mechanims is in use.  Use cache for qThreadExtra and qP
4863         methods too.
4864
4865 2018-06-29  Pedro Alves  <palves@redhat.com>
4866
4867         * blockframe.c (find_pc_sect_containing_function): New function.
4868         * breakpoint.c (print_breakpoint_location): Don't call
4869         find_pc_sect_function.
4870         * linespec.c (create_sals_line_offset): Record the location's
4871         symbol in the sal.
4872         * linespec.c (convert_address_location_to_sals): Fill in sal's
4873         symbol with find_pc_sect_containing_function.
4874         * symtab.c (find_function_start_sal): Rename to ...
4875         (find_function_start_sal_1): ... this.
4876         (find_function_start_sal): Reimplement as wrapper around
4877         find_function_start_sal_1, and use
4878         find_pc_sect_containing_function to fill in the sal's symbol.
4879         (find_function_start_sal(symbol*, bool)): Adjust.
4880         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4881         comments.
4882         (find_pc_sect_containing_function): Declare.
4883
4884 2018-06-29  Pedro Alves  <palves@redhat.com>
4885
4886         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4887         true if the the location has no symbol.
4888
4889 2018-06-28  Tom Tromey  <tom@tromey.com>
4890
4891         * NEWS: Mention --enable-codesign.
4892         * silent-rules.mk (ECHO_SIGN): New variable.
4893         * configure.ac: Add --enable-codesign.
4894         * configure: Rebuild.
4895         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4896         (gdb$(EXEEXT)): Optionally invoke codesign.
4897
4898 2018-06-28  Pedro Alves  <palves@redhat.com>
4899
4900         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4901         comments.
4902         (switch_to_thread_no_regs): Adjust comment.
4903         * infcmd.c (stop_pc): Delete.
4904         (post_create_inferior, info_program_command): Replace references
4905         to stop_pc with references to thread_info->suspend.stop_pc.
4906         * inferior.h (stop_pc): Delete declaration.
4907         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4908         (handle_inferior_event_1, handle_signal_stop)
4909         (process_event_stop_test, keep_going_stepped_thread)
4910         (handle_step_into_function, handle_step_into_function_backward)
4911         (print_stop_location): Replace references to stop_pc with
4912         references to thread_info->suspend.stop_pc.
4913         (struct infcall_suspend_state) <stop_pc>: Delete field.
4914         (save_infcall_suspend_state, restore_infcall_suspend_state):
4915         Remove references to inf_stat->stop_pc.
4916         * linux-fork.c (fork_load_infrun_state): Likewise.
4917         * record-btrace.c (record_btrace_set_replay): Likewise.
4918         * record-full.c (record_full_goto_entry): Likewise.
4919         * remote.c (print_one_stopped_thread): Likewise.
4920         * target.c (target_resume): Extend comment.
4921         * thread.c (set_executing_thread): New.
4922         (set_executing): Use it.
4923         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4924         Remove references to stop_pc.
4925
4926 2018-06-28  Pedro Alves  <palves@redhat.com>
4927
4928         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4929         Moving fetching stop_pc until after ecs->event_thread is refreshed.
4930
4931 2018-06-28  Tom Tromey  <tom@tromey.com>
4932
4933         * coffread.c (coff_symfile_finish): Update.
4934         * xcoffread.c (xcoff_symfile_finish): Update.
4935         * elfread.c (elf_symfile_finish): Update.
4936         * symfile.h (dwarf2_free_objfile): Don't declare.
4937         * dwarf2read.c (_initialize_dwarf2_read): Use
4938         register_objfile_data_with_cleanup.
4939         (dwarf2_free_objfile): Now static.  Change signature.
4940
4941 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4942
4943         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
4944         option "-o" to add-symbol-file-load to add an offset to each
4945         section's load address.
4946         * symfile.c (set_objfile_default_section_offset): New function.
4947
4948 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4949
4950         * symfile.c (add_symbol_file_command): Make sure that sections
4951         with the same name are sorted in the same order.
4952
4953 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4954
4955         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
4956         require the second argument.  If omitted, load sections at the
4957         addresses specified in the file.
4958
4959 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4960
4961         * symfile.c (symbol_file_command, symbol_file_add_main_1)
4962         (_initialize_symfile): Add option "-o" to symbol-file to add an
4963         offset to each section of the symbol file.
4964
4965 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
4966
4967         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
4968
4969 2018-06-27  Tom Tromey  <tom@tromey.com>
4970
4971         * stack.c (_initialize_stack): Update "func" help text.
4972
4973 2018-06-27  Tom Tromey  <tom@tromey.com>
4974
4975         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
4976         std::vector.
4977         (unwind_infopy_str, pyuw_create_unwind_info)
4978         (unwind_infopy_add_saved_register, pyuw_sniffer)
4979         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
4980         Update.
4981         (struct saved_reg): Add constructor.
4982         <value>: Now a gdbpy_ref<>.
4983
4984 2018-06-27  Tom Tromey  <tom@tromey.com>
4985
4986         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
4987
4988 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4989
4990         * gdb-gdb.py.in: Format using autopep8.
4991
4992 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4993
4994         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
4995         (type_lookup_function): Recognize CORE_ADDR values.
4996
4997 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
4998
4999         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5000         print tag_name.
5001
5002 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5003
5004         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5005         <__lt__>: Add.
5006
5007 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5008
5009         * gdb-gdb.py: Move to...
5010         * gdb-gdb.py.in: ... here.
5011         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5012         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5013         dependencies.
5014         (distclean): Remove gdb-gdb.py when cleaning.
5015         (gdb-gdb.py, gdb-gdb.gdb): New rules.
5016         * configure: Re-generate.
5017
5018 2018-06-27  Pedro Alves  <palves@redhat.com>
5019
5020         * proc-service.c (get_ps_regcache): New.
5021         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5022         (ps_lsetfpregs): Use it.
5023
5024 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
5025
5026         PR gdb/21695
5027         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5028         (dwarf_decode_lines_1): Adjust.
5029
5030 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5031
5032         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5033         override.
5034         <info_proc>: Likewise.
5035
5036 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
5037
5038         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5039         to windows_fetch_one_register, and only handle the case of
5040         fetching one register.  Move the code that reloads the context
5041         and iterates over all registers if R is negative to...
5042         (windows_nat_target::fetch_registers): ... here.
5043         (do_windows_store_inferior_registers): Rename to
5044         windows_store_one_register, and only handle the case of storing
5045         one register.  Move the code that handles the case where r is
5046         negative to...
5047         (windows_nat_target::store_registers) ... here.
5048
5049 2018-06-26  Tom Tromey  <tom@tromey.com>
5050
5051         PR rust/22574:
5052         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5053         * rust-lang.c (rust_print_struct_def): Add podata parameter.
5054         Update.
5055         (rust_internal_print_type): Add podata parameter.
5056         (rust_print_type): Update.
5057
5058 2018-06-26  Tom Tromey  <tom@tromey.com>
5059
5060         * typeprint.h (struct print_offset_data) <update, finish,
5061         maybe_print_hole>: New methods.
5062         <indentation>: New constant.
5063         * typeprint.c (print_offset_data::indentation): Define.
5064         (print_offset_data::maybe_print_hole, print_offset_data::update)
5065         (print_offset_data::finish): Move from c-typeprint.c and rename.
5066         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5067         (print_spaces_filtered_with_print_options): Update.
5068         (c_print_type_union_field_offset, maybe_print_hole)
5069         (c_print_type_struct_field_offset): Move to typeprint.c and
5070         rename.
5071         (c_type_print_base_struct_union): Update.
5072
5073 2018-06-25  Pedro Alves  <palves@redhat.com>
5074
5075         * gdbthread.h (thread_info_ref, delete_thread)
5076         (delete_thread_silent, first_thread_of_inferior)
5077         (any_thread_of_inferior, switch_to_thread)
5078         (enable_thread_stack_temporaries)
5079         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5080         (get_last_thread_stack_temporary)
5081         (value_in_thread_stack_temporaries, can_access_registers_thread):
5082         Spell out "struct thread_info" instead of just "thread_info".
5083         * inferior.h (notice_new_inferior): Likewise.
5084
5085 2018-06-25  Pedro Alves  <palves@redhat.com>
5086
5087         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5088         pass thread_info pointer to delete_thread.
5089         (windows_nat_target::detach): Pass inferior pointer to
5090         detach_inferior.
5091         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5092         delete_thread.
5093         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5094         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5095         and pass a thread_info pointer to delete_thread.
5096         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5097         pass thread_info pointer to delete_thread.
5098         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5099         delete_thread_silent call.
5100         * procfs.c (procfs_target::detach): Pass inferior pointer to
5101         detach_inferior.
5102         (procfs_target::wait): Pass thread_info pointer to delete_thread.
5103         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5104         delete_thread_silent call.
5105         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5106         pass thread_info pointer to delete_thread.
5107         (windows_nat_target::detach): Pass inferior pointer to
5108         delete_inferior.
5109
5110 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5111
5112         * regcache.c (readable_regcache::read_part): Fix asserts.
5113         (reg_buffer::raw_collect_part): New function.
5114         (regcache::write_part): Fix asserts.
5115         (reg_buffer::raw_supply_part): New function.
5116         (regcache::transfer_regset_register): New helper function.
5117         (regcache::transfer_regset): Call new functions.
5118         (regcache_supply_regset): Use gdb_byte*.
5119         (regcache::supply_regset): Likewise.
5120         (regcache_collect_regset): Likewise.
5121         (regcache::collect_regset): Likewise.
5122         * regcache.h (reg_buffer::raw_collect_part): New declaration.
5123         (reg_buffer::raw_supply_part): Likewise.
5124         (regcache::transfer_regset_register): Likewise.
5125         (regcache::transfer_regset): Use gdb_byte*.
5126
5127 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5128
5129         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5130
5131 2018-06-21  Pedro Alves  <palves@redhat.com>
5132
5133         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5134         instead of a ptid_t.  All callers adjusted.
5135         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
5136         adjusted.
5137         (print_ada_task_info, display_current_task_id, task_command_1):
5138         Adjust.
5139         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5140         inferior_thread.
5141         (breakpoint_kind): Adjust.
5142         (remove_breakpoints_pid): Rename to ...
5143         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
5144         pointer.  All callers adjusted.
5145         (bpstat_clear_actions): Use inferior_thread.
5146         (get_bpstat_thread): New.
5147         (bpstat_do_actions): Use it.
5148         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5149         to take a thread_info pointer.  All callers adjusted.
5150         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5151         (breakpoint_re_set_thread): Use inferior_thread.
5152         * breakpoint.h (struct inferior): Forward declare.
5153         (bpstat_stop_status): Update.
5154         (remove_breakpoints_pid): Delete.
5155         (remove_breakpoints_inf): New.
5156         * bsd-uthread.c (bsd_uthread_target::wait)
5157         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5158         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5159         (maint_btrace_packet_history_cmd)
5160         (maint_btrace_clear_packet_history_cmd): Adjust.
5161         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5162         inferior_thread.
5163         * cli/cli-interp.c: Include "inferior.h".
5164         * common/refcounted-object.h (struct
5165         refcounted_object_ref_policy): New.
5166         * compile/compile-object-load.c: Include gdbthread.h.
5167         (store_regs): Use inferior_thread.
5168         * corelow.c (core_target::close): Use current_inferior.
5169         (core_target_open): Adjust to use first_thread_of_inferior and use
5170         the current inferior.
5171         * ctf.c (ctf_target::close): Adjust to use current_inferior.
5172         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5173         <thread>: ... this new field.  All references adjusted.
5174         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5175         Take a thread_info pointer instead of a ptid_t.
5176         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5177         (dummy_frame_discard, register_dummy_frame_dtor): Take a
5178         thread_info pointer instead of a ptid_t.
5179         * elfread.c: Include "inferior.h".
5180         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5181         Use inferior_thread.
5182         * eval.c (evaluate_subexp): Likewise.
5183         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5184         inferior_thread.
5185         * gdb_proc_service.h (struct thread_info): Forward declare.
5186         (struct ps_prochandle) <ptid>: Delete, replaced by ...
5187         <thread>: ... this new field.  All references adjusted.
5188         * gdbarch.h, gdbarch.c: Regenerate.
5189         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5190         'thread' parameter.  All implementations and callers adjusted.
5191         * gdbthread.h (thread_info) <set_running>: New method.
5192         (delete_thread, delete_thread_silent): Take a thread_info pointer
5193         instead of a ptid.
5194         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5195         (first_thread_of_process): Delete, replaced by ...
5196         (first_thread_of_inferior): ... this new function.  All callers
5197         adjusted.
5198         (any_live_thread_of_process): Delete, replaced by ...
5199         (any_live_thread_of_inferior): ... this new function.  All callers
5200         adjusted.
5201         (switch_to_thread, switch_to_no_thread): Declare.
5202         (is_executing): Delete.
5203         (enable_thread_stack_temporaries): Update comment.
5204         <enable_thread_stack_temporaries>: Take a thread_info pointer
5205         instead of a ptid_t.  Incref the thread.
5206         <~enable_thread_stack_temporaries>: Decref the thread.
5207         <m_ptid>: Delete
5208         <m_thr>: New.
5209         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5210         (get_last_thread_stack_temporary)
5211         (value_in_thread_stack_temporaries, can_access_registers_thread):
5212         Take a thread_info pointer instead of a ptid_t.  All callers
5213         adjusted.
5214         * infcall.c (get_call_return_value): Use inferior_thread.
5215         (run_inferior_call): Work with thread pointers instead of ptid_t.
5216         (call_function_by_hand_dummy): Work with thread pointers instead
5217         of ptid_t.  Use thread_info_ref.
5218         * infcmd.c (proceed_thread_callback): Access thread's state
5219         directly.
5220         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5221         access thread's state directly.
5222         (continue_command): Use inferior_thread.
5223         (info_program_command): Use find_thread_ptid and access thread
5224         state directly.
5225         (proceed_after_attach_callback): Use thread state directly.
5226         (notice_new_inferior): Take a thread_info pointer instead of a
5227         ptid_t.  All callers adjusted.
5228         (exit_inferior): Take an inferior pointer instead of a pid.  All
5229         callers adjusted.
5230         (exit_inferior_silent): New.
5231         (detach_inferior): Delete.
5232         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5233         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5234         (detach_inferior_command, kill_inferior_command): Use
5235         find_inferior_id instead of valid_gdb_inferior_id and
5236         gdb_inferior_id_to_pid.
5237         (inferior_command): Use inferior and thread pointers.
5238         * inferior.h (struct thread_info): Forward declare.
5239         (notice_new_inferior): Take a thread_info pointer instead of a
5240         ptid_t.  All callers adjusted.
5241         (detach_inferior): Delete declaration.
5242         (exit_inferior, exit_inferior_silent): Take an inferior pointer
5243         instead of a pid.  All callers adjusted.
5244         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5245         (valid_gdb_inferior_id): Delete.
5246         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5247         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5248         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5249         ...
5250         <inf>: ... this new field.
5251         <step_ptid>: Delete, replaced by ...
5252         <step_thread>: ... this new field.
5253         (get_displaced_stepping_state): Take an inferior pointer instead
5254         of a pid.  All callers adjusted.
5255         (displaced_step_in_progress_any_inferior): Adjust.
5256         (displaced_step_in_progress_thread): Take a thread pointer instead
5257         of a ptid_t.  All callers adjusted.
5258         (displaced_step_in_progress, add_displaced_stepping_state): Take
5259         an inferior pointer instead of a pid.  All callers adjusted.
5260         (get_displaced_step_closure_by_addr): Adjust.
5261         (remove_displaced_stepping_state): Take an inferior pointer
5262         instead of a pid.  All callers adjusted.
5263         (displaced_step_prepare_throw, displaced_step_prepare)
5264         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5265         All callers adjusted.
5266         (start_step_over): Adjust.
5267         (infrun_thread_ptid_changed): Remove bit updating ptids in the
5268         displaced step queue.
5269         (do_target_resume): Adjust.
5270         (fetch_inferior_event): Use inferior_thread.
5271         (context_switch, get_inferior_stop_soon): Take an
5272         execution_control_state pointer instead of a ptid_t.  All callers
5273         adjusted.
5274         (switch_to_thread_cleanup): Delete.
5275         (stop_all_threads): Use scoped_restore_current_thread.
5276         * inline-frame.c: Include "gdbthread.h".
5277         (inline_state) <inline_state>: Take a thread pointer instead of a
5278         ptid_t.  All callers adjusted.
5279         <ptid>: Delete, replaced by ...
5280         <thread>: ... this new field.
5281         (find_inline_frame_state): Take a thread pointer instead of a
5282         ptid_t.  All callers adjusted.
5283         (skip_inline_frames, step_into_inline_frame)
5284         (inline_skipped_frames, inline_skipped_symbol): Take a thread
5285         pointer instead of a ptid_t.  All callers adjusted.
5286         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5287         (inline_skipped_frames, inline_skipped_symbol): Likewise.
5288         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5289         pointers directly.
5290         * linux-nat.c (get_detach_signal): Likewise.
5291         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5292         (thread_db_notice_clone): Adjust.
5293         (thread_db_find_new_threads_silently)
5294         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5295         a thread pointer instead of a ptid_t.  All callers adjusted.
5296         * mi/mi-cmd-var.c: Include "inferior.h".
5297         (mi_cmd_var_update_iter): Update to use thread pointers.
5298         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5299         inferior directly.
5300         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5301         out to ...
5302         (mi_output_running): ... this new function.
5303         (mi_on_resume_1): Adjust to use it.
5304         (mi_user_selected_context_changed): Adjust to use inferior_thread.
5305         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5306         directly.
5307         (interrupt_thread_callback): : Adjust to use thread and inferior
5308         pointers.
5309         * proc-service.c: Include "gdbthread.h".
5310         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5311         * progspace-and-thread.c: Include "inferior.h".
5312         * progspace.c: Include "inferior.h".
5313         * python/py-exitedevent.c (create_exited_event_object): Adjust to
5314         hold a reference to an inferior_object.
5315         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5316         inferior_thread.
5317         * python/py-inferior.c (struct inferior_object): Give the type a
5318         tag name instead of a typedef.
5319         (python_on_normal_stop): No need to check if the current thread is
5320         listed.
5321         (inferior_to_inferior_object): Change return type to
5322         inferior_object.  All callers adjusted.
5323         (find_thread_object): Delete, bits factored out to ...
5324         (thread_to_thread_object): ... this new function.
5325         * python/py-infthread.c (create_thread_object): Use
5326         inferior_to_inferior_object.
5327         (thpy_is_stopped): Use thread pointer directly.
5328         (gdbpy_selected_thread): Use inferior_thread.
5329         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5330         field, replaced with ...
5331         <thread>: ... this new field.  All users adjusted.
5332         (btpy_insn_or_gap_new): Drop const.
5333         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
5334         callers adjusted.
5335         * python/py-record.c: Include "gdbthread.h".
5336         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5337         a ptid_t.  All callers adjusted.
5338         (gdbpy_current_recording): Use inferior_thread.
5339         * python/py-record.h (recpy_record_object) <ptid>: Delete
5340         field, replaced with ...
5341         <thread>: ... this new field.  All users adjusted.
5342         (recpy_element_object) <ptid>: Delete
5343         field, replaced with ...
5344         <thread>: ... this new field.  All users adjusted.
5345         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5346         a ptid_t.  All callers adjusted.
5347         * python/py-threadevent.c: Include "gdbthread.h".
5348         (get_event_thread): Use thread_to_thread_object.
5349         * python/python-internal.h (struct inferior_object): Forward
5350         declare.
5351         (find_thread_object, find_inferior_object): Delete declarations.
5352         (thread_to_thread_object, inferior_to_inferior_object): New
5353         declarations.
5354         * record-btrace.c: Include "inferior.h".
5355         (require_btrace_thread): Use inferior_thread.
5356         (record_btrace_frame_sniffer)
5357         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5358         (get_thread_current_frame): Use scoped_restore_current_thread and
5359         switch_to_thread.
5360         (get_thread_current_frame): Use thread pointer directly.
5361         (record_btrace_replay_at_breakpoint): Use thread's inferior
5362         pointer directly.
5363         * record-full.c: Include "inferior.h".
5364         * regcache.c: Include "gdbthread.h".
5365         (get_thread_arch_regcache): Use the inferior's address space
5366         directly.
5367         (get_thread_regcache, registers_changed_thread): New.
5368         * regcache.h (get_thread_regcache(thread_info *thread)): New
5369         overload.
5370         (registers_changed_thread): New.
5371         (remote_target) <remote_detach_1>: Swap order of parameters.
5372         (remote_add_thread): <remote_add_thread>: Return the new thread.
5373         (get_remote_thread_info(ptid_t)): New overload.
5374         (remote_target::remote_notice_new_inferior): Use thread pointers
5375         directly.
5376         (remote_target::process_initial_stop_replies): Use
5377         thread_info::set_running.
5378         (remote_target::remote_detach_1, remote_target::detach)
5379         (extended_remote_target::detach): Adjust.
5380         * stack.c (frame_show_address): Use inferior_thread.
5381         * target-debug.h (target_debug_print_thread_info_pp): New.
5382         * target-delegates.c: Regenerate.
5383         * target.c (default_thread_address_space): Delete.
5384         (memory_xfer_partial_1): Use current_inferior.
5385         (target_detach): Use current_inferior.
5386         (target_thread_address_space): Delete.
5387         (generic_mourn_inferior): Use current_inferior.
5388         * target.h (struct target_ops) <thread_address_space>: Delete.
5389         (target_thread_address_space): Delete.
5390         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
5391         pointers directly.
5392         (delete_thread_1, delete_thread, delete_thread_silent): Take a
5393         thread pointer instead of a ptid_t.  Adjust all callers.
5394         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5395         (first_thread_of_process): Delete, replaced by ...
5396         (first_thread_of_inferior): ... this new function.  All callers
5397         adjusted.
5398         (any_thread_of_process): Rename to ...
5399         (any_thread_of_inferior): ... this, and take an inferior pointer.
5400         (any_live_thread_of_process): Rename to ...
5401         (any_live_thread_of_inferior): ... this, and take an inferior
5402         pointer.
5403         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5404         (value_in_thread_stack_temporaries)
5405         (get_last_thread_stack_temporary): Take a thread pointer instead
5406         of a ptid_t.  Adjust all callers.
5407         (thread_info::set_running): New.
5408         (validate_registers_access): Use inferior_thread.
5409         (can_access_registers_ptid): Rename to ...
5410         (can_access_registers_thread): ... this, and take a thread
5411         pointer.
5412         (print_thread_info_1): Adjust to compare thread pointers instead
5413         of ptids.
5414         (switch_to_no_thread, switch_to_thread): Make extern.
5415         (scoped_restore_current_thread::~scoped_restore_current_thread):
5416         Use m_thread pointer directly.
5417         (scoped_restore_current_thread::scoped_restore_current_thread):
5418         Use inferior_thread.
5419         (thread_command): Use thread pointer directly.
5420         (thread_num_make_value_helper): Use inferior_thread.
5421         * top.c (execute_command): Use inferior_thread.
5422         * tui/tui-interp.c: Include "inferior.h".
5423         * varobj.c (varobj_create): Use inferior_thread.
5424         (value_of_root_1): Use find_thread_global_id instead of
5425         global_thread_id_to_ptid.
5426
5427 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
5428
5429         * regcache.c (readable_regcache::read_part): Avoid memcpy when
5430         possible.
5431         (regcache::write_part): Likewise.
5432         (readable_regcache::cooked_read_part): Update comment.
5433         (readable_regcache::cooked_write_part): Likewise.
5434         * regcache.h: (readable_regcache::read_part): Likewise.
5435         (regcache::write_part): Likewise.
5436
5437 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
5438             Dirk Schubert  <dirk.schubert@arm.com>
5439
5440         * aarch64-linux-nat.c (post_attach): New.
5441         (aarch64_linux_nat_target::post_attach): Override post_attach to
5442         record the number of hardware debug registers.
5443
5444 2018-06-20  Tom Tromey  <tom@tromey.com>
5445
5446         * python/py-param.c (add_setshow_generic): Make parameters const.
5447         (parmpy_init): Update.
5448
5449 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5450
5451         * regcache.h (regcache_cooked_read_ftype): Rename to...
5452         (register_read_ftype): ...this, change type to function_view.
5453         (class reg_buffer) <save>: Remove src parameter.
5454         (readonly_detached_regcache) <readonly_detached_regcache>: Make
5455         parameter non-const in first overload.  Remove src parameter in
5456         second overload.
5457         * regcache.c (do_cooked_read): Remove.
5458         (readonly_detached_regcache::readonly_detached_regcache): Make
5459         parameter non-const, adjust call to other constructor.
5460         (reg_buffer::save): Remove src parameter.
5461         * frame.c (do_frame_register_read): Remove.
5462         (frame_save_as_regcache): Use lambda function.
5463         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5464         parameter to ppu2spu_data *.
5465         (ppu2spu_sniffer): Use lambda function.
5466
5467 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5468
5469         * record-full.c (record_full_target::insert_breakpoint): Remove
5470         "struct" keyword, add const.
5471
5472 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
5473
5474         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5475         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5476         * configure.ac: Remove AC_PREREQ, add missing quoting.
5477         * gnulib/configure.ac: Modernize usage of
5478         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
5479         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5480         (AUTOMAKE_VERSION): Bump to 1.15.1.
5481         * configure: Re-generate.
5482         * config.in: Re-generate.
5483         * aclocal.m4: Re-generate.
5484         * gnulib/aclocal.m4: Re-generate.
5485         * gnulib/config.in: Re-generate.
5486         * gnulib/configure: Re-generate.
5487         * gnulib/import/Makefile.in: Re-generate.
5488
5489 2018-06-19  Pedro Alves  <palves@redhat.com>
5490
5491         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5492         (lookup_minimal_symbol_by_pc_section): ... here with
5493         gdb_assert_not_reached added.
5494
5495 2018-06-19  Pedro Alves  <palves@redhat.com>
5496
5497         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5498         parameter with a block parameter.  Compare location's block symbol
5499         with the frame's block instead of addresses.
5500         (skip_inline_frames): Pass the current block instead of the
5501         frame's address.  Break out as soon as we determine the frame
5502         should not be skipped.
5503
5504 2018-06-18  Tom Tromey  <tom@tromey.com>
5505
5506         * solib-aix.c (solib_aix_get_section_offsets): Return
5507         unique_xmalloc_ptr.
5508         (solib_aix_solib_create_inferior_hook): Update.
5509
5510 2018-06-18  Tom Tromey  <tom@tromey.com>
5511
5512         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5513
5514 2018-06-18  Tom Tromey  <tom@tromey.com>
5515
5516         * solib-frv.c (frv_relocate_main_executable): Use
5517         unique_xmalloc_ptr.
5518         * solib-dsbt.c (dsbt_relocate_main_executable): Use
5519         unique_xmalloc_ptr.
5520
5521 2018-06-18  Tom Tromey  <tom@tromey.com>
5522
5523         * objfiles.h (inhibit_section_map_updates): Update.
5524         (resume_section_map_updates, resume_section_map_updates_cleanup):
5525         Remove.
5526         * solib-svr4.c (svr4_handle_solib_event): Update.
5527         * objfiles.c (inhibit_section_map_updates): Return
5528         scoped_restore_tmpl<int>.
5529         (resume_section_map_updates, resume_section_map_updates_cleanup):
5530         Remove.
5531
5532 2018-06-18  Tom Tromey  <tom@tromey.com>
5533
5534         * valprint.h (read_string): Update.
5535         * valprint.c (read_string): Change type of "buffer".
5536         (val_print_string): Update.
5537         * python/py-value.c (valpy_string): Update.
5538         * language.h (struct language_defn) <la_get_string>: Change
5539         type of "buffer".
5540         (default_get_string, c_get_string): Update.
5541         * language.c (default_get_string): Change type of "buffer".
5542         * guile/scm-value.c (gdbscm_value_to_string): Update.
5543         * c-lang.c (c_get_string): Change type of "buffer".
5544
5545 2018-06-18  Tom Tromey  <tom@tromey.com>
5546
5547         * ser-mingw.c (struct pipe_state_destroyer): New.
5548         (pipe_state_up): New typedef.
5549         (cleanup_pipe_state): Remove.
5550         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
5551
5552 2018-06-18  Tom Tromey  <tom@tromey.com>
5553
5554         * rust-lang.h (rust_yyerror): Don't declare.
5555         * rust-lang.c (rust_language_defn): Update.
5556         * rust-exp.y (yyerror): Now static.
5557         * parse.c (parse_exp_in_context_1): Update.
5558         * p-lang.h (p_yyerror): Don't declare.
5559         * p-lang.c (p_language_defn): Update.
5560         * p-exp.y (yyerror): Now static.
5561         * opencl-lang.c (opencl_language_defn): Update.
5562         * objc-lang.c (objc_language_defn): Update.
5563         * m2-lang.h (m2_yyerror): Don't declare.
5564         * m2-lang.c (m2_language_defn): Update.
5565         * m2-exp.y (yyerror): Now static.
5566         * language.h (struct language_defn) <la_error>: Remove.
5567         * language.c (unk_lang_error): Remove.
5568         (unknown_language_defn, auto_language_defn): Remove.
5569         * go-lang.h (go_yyerror): Don't declare.
5570         * go-lang.c (go_language_defn): Update.
5571         * go-exp.y (yyerror): Now static.
5572         * f-lang.h (f_yyerror): Don't declare.
5573         * f-lang.c (f_language_defn): Update.
5574         * f-exp.y (yyerror): Now static.
5575         * d-lang.h (d_yyerror): Don't declare.
5576         * d-lang.c (d_language_defn): Update.
5577         * d-exp.y (yyerror): Now static.
5578         * c-lang.h (c_yyerror): Don't declare.
5579         * c-lang.c (c_language_defn, cplus_language_defn)
5580         (asm_language_defn, minimal_language_defn): Update.
5581         * c-exp.y (yyerror): Now static.
5582         * ada-lang.h (ada_yyerror): Don't declare.
5583         * ada-lang.c (ada_language_defn): Update.
5584         * ada-exp.y (yyerror): Now static.
5585
5586 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5587
5588         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5589         (store_sveregs_to_thread): Likewise.
5590         (aarch64_linux_fetch_inferior_registers): Check for SVE.
5591         (aarch64_linux_store_inferior_registers): Likewise.
5592         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5593         function.
5594         (aarch64_sve_regs_copy_to_regcache): Likewise.
5595         (aarch64_sve_regs_copy_from_regcache): Likewise.
5596         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5597         declaration.
5598         (aarch64_sve_regs_copy_to_regcache): Likewise.
5599         (aarch64_sve_regs_copy_from_regcache): Likewise.
5600         (sve_context): Structure from Linux headers.
5601         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5602         (SVE_SIG_ZREG_SIZE): Likewise.
5603         (SVE_SIG_PREG_SIZE): Likewise.
5604         (SVE_SIG_FFR_SIZE): Likewise.
5605         (SVE_SIG_REGS_OFFSET): Likewise.
5606         (SVE_SIG_ZREGS_OFFSET): Likewise.
5607         (SVE_SIG_ZREG_OFFSET): Likewise.
5608         (SVE_SIG_ZREGS_SIZE): Likewise.
5609         (SVE_SIG_PREGS_OFFSET): Likewise.
5610         (SVE_SIG_PREG_OFFSET): Likewise.
5611         (SVE_SIG_PREGS_SIZE): Likewise.
5612         (SVE_SIG_FFR_OFFSET): Likewise.
5613         (SVE_SIG_REGS_SIZE): Likewise.
5614         (SVE_SIG_CONTEXT_SIZE): Likewise.
5615         (SVE_PT_REGS_MASK): Likewise.
5616         (SVE_PT_REGS_FPSIMD): Likewise.
5617         (SVE_PT_REGS_SVE): Likewise.
5618         (SVE_PT_VL_INHERIT): Likewise.
5619         (SVE_PT_VL_ONEXEC): Likewise.
5620         (SVE_PT_REGS_OFFSET): Likewise.
5621         (SVE_PT_FPSIMD_OFFSET): Likewise.
5622         (SVE_PT_FPSIMD_SIZE): Likewise.
5623         (SVE_PT_SVE_ZREG_SIZE): Likewise.
5624         (SVE_PT_SVE_PREG_SIZE): Likewise.
5625         (SVE_PT_SVE_FFR_SIZE): Likewise.
5626         (SVE_PT_SVE_FPSR_SIZE): Likewise.
5627         (SVE_PT_SVE_FPCR_SIZE): Likewise.
5628         (__SVE_SIG_TO_PT): Likewise.
5629         (SVE_PT_SVE_OFFSET): Likewise.
5630         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5631         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5632         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5633         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5634         (SVE_PT_SVE_PREG_OFFSET): Likewise.
5635         (SVE_PT_SVE_PREGS_SIZE): Likewise.
5636         (SVE_PT_SVE_FFR_OFFSET): Likewise.
5637         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5638         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5639         (SVE_PT_SVE_SIZE): Likewise.
5640         (SVE_PT_SIZE): Likewise.
5641         (HAS_SVE_STATE): New define.
5642
5643 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5644
5645         * nat/aarch64-sve-linux-sigcontext.h: New file.
5646         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5647         new files.
5648         (SVE_VQ_MIN): Likewise.
5649         (SVE_VQ_MAX): Likewise.
5650         (SVE_VL_MIN): Likewise.
5651         (SVE_VL_MAX): Likewise.
5652         (SVE_NUM_ZREGS): Likewise.
5653         (SVE_NUM_PREGS): Likewise.
5654         (sve_vl_valid): Likewise.
5655         (struct user_sve_header): Likewise.
5656
5657 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
5658             Richard Bunt <Richard.Bunt@arm.com>
5659
5660         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5661         was requested by GDB.
5662
5663 2018-06-15  Tom de Vries  <tdevries@suse.de>
5664
5665         * MAINTAINERS (Write After Approval): Add Tom de Vries.
5666
5667 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
5668
5669         * gnulib/update-gnulib.sh: Print expected versions of
5670         autoconf/aclocal.
5671
5672 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
5673
5674         * arch-utils.c (default_type_align): Use type_length_units.
5675         * gdbtypes.c (type_align): Use type_length_units.
5676
5677 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5678
5679         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5680         of 'define' command.
5681
5682 2018-06-14  Tom de Vries  <tdevries@suse.de>
5683
5684         PR cli/22573
5685         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5686         get_no_prettyformat_print_options.
5687
5688 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5689
5690         * sparc-nat.h: Include target.h.
5691         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5692         <fetch_registers>: Remove this argument in function call.
5693         <store_registers>: Remove this argument in function call, remove
5694         extra semicolon.
5695         <low_forget_process>: Call sparc64_forget_process instead of
5696         sparc_forget_process.
5697
5698 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5699
5700         * procfs.c (_initialize_procfs): Use add_inf_child_target.
5701         (procfs_target::make_corefile_notes): Adjust to new
5702         target_read_alloc return type.
5703
5704 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5705             Stephen Roberts  <stephen.roberts@arm.com>
5706
5707         PR gdb/22882
5708         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5709         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5710         Move should_notify_stop local into more inner scope.
5711
5712 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5713             Stephen Roberts  <stephen.roberts@arm.com>
5714
5715         PR gdb/22882
5716         * infrun.c (resume_1): Add call to mark_async_event_handler.
5717
5718 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5719
5720         * infrun.c (do_target_wait): Change old version of $pc printed.
5721
5722 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5723
5724         * dwarf2read.c (read_index_from_section): Rename to...
5725         (read_gdb_index_from_section): ... this, update all callers.
5726         (dwarf2_read_index): Rename to...
5727         (dwarf2_read_gdb_index): ... this, update all callers.
5728
5729 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
5730
5731         * gdb/hppa-linux-nat.c
5732         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5733         hppa_linux_nat_target::fetch_registers.
5734
5735 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5736
5737         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5738         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5739         (AARCH64_DWARF_SVE_FFR): Likewise.
5740         (AARCH64_DWARF_SVE_P0): Likewise.
5741         (AARCH64_DWARF_SVE_Z0): Likewise.
5742
5743 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5744
5745         * common/common-regcache.h (raw_compare): New function.
5746         * regcache.c (regcache::raw_compare): Likewise.
5747         * regcache.h (regcache::raw_compare): New declaration.
5748
5749 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5750
5751         * common/common-regcache.h (reg_buffer_common): New structure.
5752         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5753         (reg_buffer::raw_supply): Likewise.
5754         (reg_buffer::raw_supply_integer): Likewise.
5755         (reg_buffer::raw_supply_zeroed): Likewise.
5756         (reg_buffer::raw_collect): Likewise.
5757         (reg_buffer::raw_collect_integer): Likewise.
5758         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5759         (reg_buffer::raw_supply): Likewise.
5760         (reg_buffer::raw_supply_integer): Likewise.
5761         (reg_buffer::raw_supply_zeroed): Likewise.
5762         (reg_buffer::raw_collect): Likewise.
5763         (reg_buffer::raw_collect_integer): Likewise.
5764
5765 2018-06-10  Tom Tromey  <tom@tromey.com>
5766
5767         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
5768         (class remote_state) <stop_reply_queue>: Now std::vector.
5769         (remote_state::~remote_state)
5770         (remote_target::stop_reply_queue_length): Update.
5771         (struct queue_iter_param, remove_child_of_pending_fork)
5772         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5773         (check_pending_event_prevents_wildcard_vcont_callback)
5774         (remove_stop_reply_for_inferior)
5775         (remove_stop_reply_of_remote_state)
5776         (remote_notif_remove_once_on_match)
5777         (stop_reply_match_ptid_and_ws)
5778         (remote_kill_child_of_pending_fork): Remove.
5779         (remote_target::remove_new_fork_children)
5780         (remote_target::check_pending_events_prevent_wildcard_vcont)
5781         (remote_target::discard_pending_stop_replies)
5782         (remote_target::discard_pending_stop_replies_in_queue)
5783         (remote_target::remote_notif_remove_queued_reply)
5784         (remote_target::queued_stop_reply)
5785         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5786         (remote_target::wait, remote_target::kill_new_fork_children)
5787         (remote_target::async): Update.
5788
5789 2018-06-10  Tom Tromey  <tom@tromey.com>
5790
5791         * record-full.c (record_full_arch_list_cleanups): Remove.
5792         (record_full_message): Use try/catch.
5793         (record_full_wait_cleanups): Remove.
5794         (record_full_wait_1): Use try/catch.
5795         (record_full_restore): Likewise.
5796
5797 2018-06-10  Tom Tromey  <tom@tromey.com>
5798
5799         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
5800         declare VEC.  Add constructor.
5801         <in_target_beneath>: Now bool.
5802         (record_full_breakpoints): Now a std::vector, static.
5803         (record_full_sync_record_breakpoints)
5804         (record_full_init_record_breakpoints)
5805         (record_full_target::insert_breakpoint)
5806         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
5807
5808 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5809
5810         * dwarf2read.c (process_cu_includes): Remove struct keyword.
5811         * serial.c (serial_interface_lookup): Remove struct keyword.
5812
5813 2018-06-10  Tom Tromey  <tom@tromey.com>
5814
5815         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5816         method.
5817         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5818         a method.
5819         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5820         method.
5821         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5822         "beneath" as a method.
5823         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5824         Use "beneath" as a method.
5825
5826 2018-06-10  Tom Tromey  <tom@tromey.com>
5827
5828         * tracefile.c (struct trace_file_writer_deleter): New.
5829         <operator()>: Rename from trace_file_writer_xfree.
5830         (trace_file_writer_up): New typedef.
5831         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5832
5833 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5834
5835         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5836         <m_registers, m_register_status>: Change type to
5837         std::unique_ptr.
5838         * regcache.c (reg_buffer::reg_buffer): Use new instead of
5839         XCNEWVEC.
5840
5841 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5842
5843         * common/common-regcache.h (enum register_status): Add
5844         underlying type "signed char".
5845         * regcache.h (reg_buffer) <m_register_status>: Change type to
5846         register_status *.
5847         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5848         register_status instead of signed char.
5849         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5850         (reg_buffer::get_register_status): Remove cast.
5851         (readable_regcache::raw_read): Remove cast.
5852         (readable_regcache::cooked_read): Remove cast.
5853
5854 2018-06-09  Tom Tromey  <tom@tromey.com>
5855
5856         * source.c (reverse_search_command, forward_search_command): Use
5857         scoped_fd.
5858
5859 2018-06-09  Tom Tromey  <tom@tromey.com>
5860
5861         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
5862         (serial_ops_list): Now static, std::vector.
5863         (serial_interface_lookup, serial_add_interface): Update.
5864
5865 2018-06-09  Tom Tromey  <tom@tromey.com>
5866
5867         * dwarf2read.c (process_cu_includes): Update.
5868         (process_full_comp_unit): Update.
5869         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5870         std::vector.
5871
5872 2018-06-08  Paul Koning  <paul_koning@dell.com>
5873
5874         PR gdb/23252
5875
5876         * python/python.c (do_start_initialization):
5877         Avoid call to internal Python API.
5878         (init__gdb_module): New function.
5879
5880 2018-06-08  Gary Benson <gbenson@redhat.com>
5881
5882         * linux-thread-db.c (valprint.h): New include.
5883         (struct check_thread_db_info): New structure.
5884         (check_thread_db_on_load, tdb_testinfo): New static globals.
5885         (check_thread_db, check_thread_db_callback): New functions.
5886         (try_thread_db_load_1): Run integrity checks if requested.
5887         (maintenance_check_libthread_db): New function.
5888         (_initialize_thread_db): Register "maint check libthread-db"
5889         and "maint set/show check-libthread-db".
5890         * NEWS: Mention the above new commands.
5891
5892 2018-06-08  Tom Tromey  <tom@tromey.com>
5893
5894         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5895         now a method.
5896
5897 2018-06-08  Tom Tromey  <tom@tromey.com>
5898
5899         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5900
5901 2018-06-08  Tom Tromey  <tom@tromey.com>
5902
5903         * common/btrace-common.h (struct btrace_data): Add constructor,
5904         destructor, move assignment operator.
5905         <empty, clear, fini>: New methods.
5906         <format>: Initialize.
5907         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5908         (btrace_data_empty): Don't declare.
5909         * common/btrace-common.c (btrace_data_init): Remove.
5910         (btrace_data::fini): Rename from btrace_data_fini.
5911         (btrace_data::empty): Rename from btrace_data_empty.
5912         (btrace_data::clear): Rename from btrace_data_clear.  Return
5913         bool.
5914         * btrace.h (make_cleanup_btrace_data): Don't declare.
5915         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5916         (parse_xml_btrace): Update.
5917         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5918         (maint_btrace_clear_packet_history_cmd): Update.
5919
5920 2018-06-07  Pedro Alves  <palves@redhat.com>
5921
5922         * target.h (target_ops) <beneath>: Now a method.  All references
5923         updated.
5924         (class target_stack): New.
5925         * target.c (g_target_stack): New.
5926         (g_current_top_target): Delete.
5927         (current_top_target): Get the top target out of g_target_stack.
5928         (target_stack::push, target_stack::unpush): New.
5929         (push_target, unpush_target): Reimplement.
5930         (target_is_pushed): Reimplement in terms of g_target_stack.
5931         (target_ops::beneath, target_stack::find_beneath): New.
5932
5933 2018-06-07  Pedro Alves  <palves@redhat.com>
5934
5935         * target.h (find_target_beneath): Delete declaration.
5936         * target.c (find_target_beneath): Delete definition.
5937         * aix-thread.c: All callers of find_target_beneath adjusted to
5938         call target_ops::beneath instead.
5939         * bsd-uthread.c: Likewise.
5940         * linux-thread-db.c: Likewise.
5941         * ravenscar-thread.c: Likewise.
5942         * sol-thread.c: Likewise.
5943         * spu-multiarch.c: Likewise.
5944
5945 2018-06-07  Pedro Alves  <palves@redhat.com>
5946
5947         * target.h (target_ops) <beneath>: Now a method.  All references
5948         updated.
5949         (target_ops) <m_beneath>: New.
5950         * target.c (target_ops::beneath): New.
5951         * corelow.c: Adjust all references to target_ops::beneath.
5952         * linux-thread-db.c: Likewise.
5953         * make-target-delegates: Likewise.
5954         * record-btrace.c: Likewise.
5955         * record-full.c: Likewise.
5956         * remote.c: Likewise.
5957         * target.c: Likewise.
5958         * target-delegates.c: Regenerate.
5959
5960 2018-06-07  Pedro Alves  <palves@redhat.com>
5961
5962         * target.h (target_stack): Delete.
5963         (current_top_target): Declare function.
5964         * target.c (target_stack): Delete.
5965         (g_current_top_target): New.
5966         (current_top_target): New function.
5967         * auxv.c: Use current_top_target instead of target_stack
5968         throughout.
5969         * avr-tdep.c: Likewise.
5970         * breakpoint.c: Likewise.
5971         * corefile.c: Likewise.
5972         * elfread.c: Likewise.
5973         * eval.c: Likewise.
5974         * exceptions.c: Likewise.
5975         * frame.c: Likewise.
5976         * gdbarch-selftests.c: Likewise.
5977         * gnu-v3-abi.c: Likewise.
5978         * ia64-tdep.c: Likewise.
5979         * ia64-vms-tdep.c: Likewise.
5980         * infcall.c: Likewise.
5981         * infcmd.c: Likewise.
5982         * infrun.c: Likewise.
5983         * linespec.c: Likewise.
5984         * linux-tdep.c: Likewise.
5985         * minsyms.c: Likewise.
5986         * ppc-linux-nat.c: Likewise.
5987         * ppc-linux-tdep.c: Likewise.
5988         * procfs.c: Likewise.
5989         * regcache.c: Likewise.
5990         * remote.c: Likewise.
5991         * rs6000-tdep.c: Likewise.
5992         * s390-linux-nat.c: Likewise.
5993         * s390-tdep.c: Likewise.
5994         * solib-aix.c: Likewise.
5995         * solib-darwin.c: Likewise.
5996         * solib-dsbt.c: Likewise.
5997         * solib-spu.c: Likewise.
5998         * solib-svr4.c: Likewise.
5999         * solib-target.c: Likewise.
6000         * sparc-tdep.c: Likewise.
6001         * sparc64-tdep.c: Likewise.
6002         * spu-tdep.c: Likewise.
6003         * symfile.c: Likewise.
6004         * symtab.c: Likewise.
6005         * target-descriptions.c: Likewise.
6006         * target-memory.c: Likewise.
6007         * target.c: Likewise.
6008         * target.h: Likewise.
6009         * tracefile-tfile.c: Likewise.
6010         * tracepoint.c: Likewise.
6011         * valops.c: Likewise.
6012         * valprint.c: Likewise.
6013         * value.c: Likewise.
6014         * windows-tdep.c: Likewise.
6015         * mi/mi-main.c: Likewise.
6016
6017 2018-06-07  Tom Tromey  <tom@tromey.com>
6018
6019         * valprint.h (build_address_symbolic): Declare.
6020         * printcmd.c (print_address_symbolic): Update.
6021         (build_address_symbolic): Change "name" and "filename" to
6022         std::string.
6023         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6024         Update.
6025         * defs.h (build_address_symbolic): Remove declaration.
6026
6027 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
6028
6029         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6030         (aarch64_vnv_type): Add function.
6031         (aarch64_pseudo_register_name): Add V regs for SVE.
6032         (aarch64_pseudo_register_type): Likewise.
6033         (aarch64_pseudo_register_reggroup_p): Likewise.
6034         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6035         (aarch64_pseudo_read_value): Add V regs for SVE.
6036         (aarch64_pseudo_write_2): Use V0 offset for SVE
6037         (aarch64_pseudo_write): Add V regs for SVE.
6038         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6039
6040 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6041
6042         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6043         (sve_vl_from_vq): Likewise.
6044
6045 2018-06-05  Tom Tromey  <tom@tromey.com>
6046
6047         * cli/cli-cmds.c (show_version): Update.
6048         * top.c (print_gdb_version): Add "interactive" parameter.
6049         Update.
6050         * main.c (captured_main_1): Update.
6051         * top.h (print_gdb_version): Add "interactive" parameter and a
6052         comment.
6053
6054 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
6055
6056         * common/enum-flags.h: Add trailing semicolon to example in
6057         comment.
6058
6059 2018-06-05  Tom Tromey  <tom@tromey.com>
6060
6061         PR cli/12326:
6062         * NEWS: Add entry about pager.
6063         * utils.c (pagination_disabled_for_command): New global.
6064         (prompt_for_continue): Allow "c" response to prompt.
6065         (reinitialize_more_filter): Clear
6066         pagination_disabled_for_command.
6067         (fputs_maybe_filtered): Check pagination_disabled_for_command.
6068
6069 2018-06-04  Tom Tromey  <tom@tromey.com>
6070
6071         * ada-lang.h (ada_lookup_symbol_list): Update.
6072         * ada-lang.c (resolve_subexp): Update.
6073         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
6074         parameter.
6075         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6076         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6077         results parameter to std::vector.
6078         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6079         Update.
6080         * ada-exp.y (block_lookup): Update.
6081         (select_possible_type_sym): Change type of syms.  Remove nsyms
6082         parameter.
6083         (write_var_or_type, write_name_assoc): Update.
6084
6085 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
6086
6087         * windows-nat.c (windows_nat_target::xfer_partial): Return
6088         TARGET_XFER_E_IO if we need to delegate to the target beneath
6089         but BENEATH is NULL.
6090
6091 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
6092
6093         * Makefile.in (config.status): Add configure.nat as a
6094         dependency.
6095
6096 2018-06-04  Tom Tromey  <tom@tromey.com>
6097
6098         * cp-name-parser.y (cpname_state): Add method declarations.
6099         (HANDLE_QUAL): Update.
6100         (cpname_state::d_grab, cpname_state::fill_comp)
6101         (cpname_state::make_operator, cpname_state::make_dtor)
6102         (cpname_state::make_builtin_type, cpname_state::make_name)
6103         (cpname_state::d_qualify, cpname_state::d_int_type)
6104         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6105         (%union): Move earlier.
6106
6107 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6108
6109         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6110
6111 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6112
6113         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6114         (aarch64_pseudo_write_1): Likewise.
6115         (aarch64_pseudo_read_value): Use helper.
6116         (aarch64_pseudo_write): Likewise.
6117
6118 2018-06-04  Pedro Alves  <palves@redhat.com>
6119
6120         * darwin-nat.c (darwin_ops): Delete.
6121         (darwin_attach_pid): Use get_native_target.
6122
6123 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6124
6125         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6126         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6127
6128 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6129
6130         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6131         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6132         (aarch64_gdbarch_init): Check for SVE.
6133         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6134
6135 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6136
6137         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6138         * aarch64-tdep.h (aarch64_read_description): Likewise.
6139         * arch/aarch64.c (aarch64_create_target_description): Likewise.
6140         * arch/aarch64.h (aarch64_create_target_description): Likewise.
6141         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6142         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6143         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6144
6145 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6146
6147         * value.c (value_fetch_lazy_bitfield): New.
6148         (value_fetch_lazy_memory): New.
6149         (value_fetch_lazy_register): New.
6150         (value_fetch_lazy): Factor out to smaller functions.
6151
6152 2018-06-01  Tom Tromey  <tom@tromey.com>
6153
6154         * cp-name-parser.y (backslashable, represented): Now const.
6155
6156 2018-06-01  Tom Tromey  <tom@tromey.com>
6157
6158         * cp-name-parser.y: Include parser-defs.h.
6159         (parser_fprintf): Remove declaration.
6160
6161 2018-06-01  Tom Tromey  <tom@tromey.com>
6162
6163         * cp-name-parser.y: Use %pure-parser, %lex-param, and
6164         %parse-param.
6165         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6166         (global_result): Remove globals.
6167         (struct cpname_state): New.
6168         (yyparse): Don't declare.
6169         (yylex, yyerror): Move declarations after %union.
6170         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6171         (make_name): Add state parameter.
6172         Update all callers.
6173         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6174         parameter.
6175         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6176         Update.
6177         (yylex): Add lvalp, state parameters.
6178         (yyerror): Add state parameter.
6179         (cp_demangled_name_to_comp): Update.
6180
6181 2018-06-01  Tom Tromey  <tom@tromey.com>
6182
6183         * cp-name-parser.y (parser_fprintf): Declare.
6184         (GDB_YY_REMAP_PREFIX): Define.
6185         Include yy-remap.h.  Don't redefine yy* identifiers.
6186
6187 2018-06-01  Tom Tromey  <tom@tromey.com>
6188
6189         * python/py-type.c (typy_legacy_template_argument): Update.
6190         * cp-support.h (cp_demangled_name_to_comp): Update.
6191         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6192         parameter to be a "std::string *".
6193         (main): Update.
6194
6195 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
6196
6197         * ada-lex.l: Include "diagnostics.h" instead of
6198         "common/diagnostics.h".
6199         * unittests/environ-selftests.c: Likewise.
6200         * common/diagnostics.h: Moved to ../include.
6201
6202 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
6203
6204         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6205         to language_mode_manual while calling breakpoint_re_set_one.
6206
6207 2018-06-01  Tom Tromey  <tom@tromey.com>
6208
6209         * valops.c (value_cast_structs, destructor_name_p): Update.
6210         * symtab.c (gdb_mangle_name): Update.
6211         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6212         Update.
6213         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6214         (pascal_object_print_value_fields, pascal_object_print_value):
6215         Update.
6216         * p-typeprint.c (pascal_type_print_derivation_info): Update.
6217         * linespec.c (find_methods): Update.
6218         * gdbtypes.h (type_name_no_tag): Remove.
6219         (type_name_or_error): Rename from type_name_no_tag_or_error.
6220         * gdbtypes.c (type_name_no_tag): Remove.
6221         (type_name_or_error): Rename from type_name_no_tag_or_error.
6222         (lookup_struct_elt_type, check_typedef): Update.
6223         * expprint.c (print_subexp_standard): Update.
6224         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6225         * d-namespace.c (d_lookup_nested_symbol): Update.
6226         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6227         (cp_print_class_member): Update.
6228         * cp-namespace.c (cp_lookup_nested_symbol): Update.
6229         * completer.c (add_struct_fields): Update.
6230         * c-typeprint.c (cp_type_print_derivation_info)
6231         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6232         Update.
6233         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6234         (ada_prefer_type, ada_is_exception_sym): Update.
6235
6236 2018-06-01  Tom Tromey  <tom@tromey.com>
6237
6238         * valops.c (enum_constant_from_type, value_namespace_elt)
6239         (value_maybe_namespace_elt): Update.
6240         * valarith.c (find_size_for_pointer_math): Update.
6241         * target-descriptions.c (make_gdb_type): Update.
6242         * symmisc.c (print_symbol): Update.
6243         * stabsread.c (define_symbol, read_type)
6244         (complain_about_struct_wipeout, add_undefined_type)
6245         (cleanup_undefined_types_1): Update.
6246         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6247         (rust_range_type_p, val_print_struct, rust_print_struct_def)
6248         (rust_internal_print_type, rust_composite_type)
6249         (rust_evaluate_funcall, rust_evaluate_subexp)
6250         (rust_inclusive_range_type_p): Update.
6251         * python/py-type.c (typy_get_tag): Update.
6252         * p-typeprint.c (pascal_type_print_base): Update.
6253         * mdebugread.c (parse_symbol, parse_type): Update.
6254         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6255         Update.
6256         * guile/scm-type.c (gdbscm_type_tag): Update.
6257         * go-lang.c (sixg_string_p): Update.
6258         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6259         Update.
6260         * gdbtypes.h (struct main_type) <tag_name>: Remove.
6261         (TYPE_TAG_NAME): Remove.
6262         * gdbtypes.c (type_name_no_tag): Simplify.
6263         (check_typedef, check_types_equal, recursive_dump_type)
6264         (copy_type_recursive, arch_composite_type): Update.
6265         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
6266         in summary mode when needed.
6267         * eval.c (evaluate_funcall): Update.
6268         * dwarf2read.c (fixup_go_packaging, read_structure_type)
6269         (process_structure_scope, read_enumeration_type)
6270         (read_namespace_type, read_module_type, determine_prefix): Update.
6271         * cp-support.c (inspect_type): Update.
6272         * coffread.c (process_coff_symbol, decode_base_type): Update.
6273         * c-varobj.c (c_is_path_expr_parent): Update.
6274         * c-typeprint.c (c_type_print_base_struct_union): Update.
6275         (c_type_print_base_1): Update.  Print struct/class/union/enum in
6276         summary when using C language.
6277         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6278         (gen_maybe_namespace_elt): Update.
6279         * ada-lang.c (ada_type_name): Simplify.
6280         (empty_record, ada_template_to_fixed_record_type_1)
6281         (template_to_static_fixed_type)
6282         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6283
6284 2018-06-01  Tom Tromey  <tom@tromey.com>
6285
6286         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6287         c_print_type.
6288         * c-typeprint.c (c_print_type_1): Add "language" parameter.
6289         (c_print_type): Update.
6290         (c_print_type): New overload.
6291         (c_type_print_varspec_prefix, c_type_print_args)
6292         (c_type_print_varspec_suffix, c_print_type_no_offsets)
6293         (c_type_print_base_struct_union, c_type_print_base_1)
6294         (cp_type_print_method_args): Add "language" parameter.
6295         (c_type_print_base): Update.
6296         * c-lang.h (c_print_type): Add new overload.
6297
6298 2018-06-01  Tom Tromey  <tom@tromey.com>
6299
6300         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6301         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6302
6303 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
6304
6305         * aarch64-tdep.c (aarch64_sve_register_names): New const
6306         var.
6307         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6308         (AARCH64_SVE_Z_REGS_NUM): New define.
6309         (AARCH64_SVE_P_REGS_NUM): Likewise.
6310         (AARCH64_SVE_NUM_REGS): Likewise.
6311
6312 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
6313
6314         * nat/linux-ptrace.h [__alpha__]
6315         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6316         definitions.
6317
6318 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
6319
6320         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6321         the endianness selected.
6322         * NEWS: Document `set endian auto' mode operation update.
6323
6324 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6325
6326         * Makefile.in: Add new header.
6327         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6328         (sve_vl_from_vg): Likewise.
6329         (sve_vq_from_vl): Likewise.
6330         (sve_vl_from_vq): Likewise.
6331         (sve_vq_from_vg): Likewise.
6332         (sve_vg_from_vq): Likewise.
6333         * configure.nat: Add new c file.
6334         * nat/aarch64-sve-linux-ptrace.c: New file.
6335         * nat/aarch64-sve-linux-ptrace.h: New file.
6336
6337 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6338
6339         * aarch64-linux-nat.c (aarch64_linux_read_description):
6340         Add parmeter zero.
6341         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6342         Likewise.
6343         * aarch64-tdep.c (tdesc_aarch64_list): Add.
6344         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6345         (aarch64_gdbarch_init): Add parmeter zero.
6346         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6347         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6348         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6349         parmeter.
6350         * doc/gdb.texinfo: Describe SVE feature
6351         * features/aarch64-sve.c: New file.
6352
6353 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
6354
6355         PR gdb/23210
6356         * gdbarch.sh (significant_addr_bit): Default to zero when
6357         not set by target architecture.
6358         * gdbarch.c: Re-generated.
6359         * utils.c (address_significant): Update.
6360
6361 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
6362
6363         * stack.c (func_command): Remove trailing newline in call to error.
6364
6365 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6366
6367         * regcache.h (regcache_raw_collect): Remove, update callers to
6368         use regcache::raw_collect.
6369         * regcache.c (regcache_raw_collect): Remove.
6370
6371 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6372
6373         * regcache.h (regcache_raw_supply): Remove, update callers to
6374         use detached_regcache::raw_supply.
6375         * regcache.c (regcache_raw_supply): Remove.
6376
6377 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6378
6379         * regcache.h (regcache_cooked_write_part): Remove, update
6380         callers to use regcache::cooked_write_part.
6381         * regcache.c (regcache_cooked_write_part): Remove.
6382
6383 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6384
6385         * regcache.h (regcache_cooked_read_part): Remove, update callers
6386         to use readable_regcache::cooked_read_part.
6387         * regcache.c (regcache_cooked_read_part): Remove.
6388
6389 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6390
6391         * regcache.h (regcache_cooked_read_value): Remove, update
6392         callers to use readable_regcache::cooked_read_value.
6393         * regcache.c (regcache_cooked_read_value): Remove.
6394
6395 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6396
6397         * regcache.h (regcache_cooked_write): Remove, update callers to
6398         use regcache::cooked_write.
6399         * regcache.c (regcache_cooked_write): Remove.
6400
6401 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6402
6403         * regcache.h (regcache_invalidate): Remove, update callers to
6404         use detached_regcache::invalidate instead.
6405         * regcache.c (regcache_invalidate): Remove.
6406
6407 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6408
6409         * regcache.h (regcache_raw_write_part): Remove, update callers
6410         to use regcache::raw_write_part instead.
6411         * regcache.c (regcache_raw_write_part): Remove.
6412
6413 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6414
6415         * regcache.h (regcache_raw_read_part): Remove, update callers to
6416         use readable_regcache::raw_read_part instead.
6417         * regcache.c (regcache_raw_read_part): Remove.
6418
6419 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6420
6421         * regcache.h (regcache_cooked_read): Remove, update callers to
6422         use readable_regcache::cooked_read instead.
6423         * regcache.c (regcache_cooked_read): Remove.
6424
6425 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6426
6427         * regcache.h (regcache_raw_write): Remove, update callers to use
6428         regcache::raw_write instead.
6429         * regcache.c (regcache_raw_write): Remove.
6430
6431 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6432
6433         * regcache.h (regcache_raw_read): Remove, update callers to use
6434         readable_regcache::raw_read instead.
6435         * regcache.c (regcache_raw_read): Remove.
6436
6437 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6438
6439         * regcache.h (regcache_raw_update): Remove, update callers to
6440         use readable_regcache::raw_update instead.
6441         * regcache.c (regcache_raw_update): Remove.
6442
6443 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6444
6445         * regcache.h (regcache_register_status): Remove, update callers
6446         to use reg_buffer::get_register_status directly instead.
6447         * regcache.c (regcache_register_status): Remove.
6448
6449 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6450
6451         * regcache.h (regcache_get_ptid): Remove, update all callers to
6452         call regcache::ptid instead.
6453         * regcache.c (regcache_get_ptid): Remove.
6454
6455 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6456
6457         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6458
6459 2018-05-30  Pedro Alves  <palves@redhat.com>
6460
6461         * common/common-exceptions.h (exception_rethrow): Use
6462         ATTRIBUTE_NORETURN.
6463
6464 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
6465
6466         * breakpoint.c (print_solib_event, check_status_catch_solib):
6467         Remove struct keyword in range-based for loops.
6468         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6469         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6470         Likewise.
6471         * linespec.c (find_superclass_methods, search_minsyms_for_name):
6472         Likewise.
6473         * symfile.c (addr_info_make_relative): Likewise.
6474         * thread.c (value_in_thread_stack_temporaries): Likewise.
6475
6476 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
6477
6478         PR gdb/16841
6479         * valops.c (value_struct_elt_for_reference): Call check_typedef on
6480         aggregate type to get its real type before accessing it.
6481
6482 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
6483
6484         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6485         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6486         * coff-pe-read.c (add_pe_forwarded_sym): Replace
6487         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6488         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6489         * jit.c (jit_breakpoint_re_set_internal): Likewise.
6490         * printcmd.c (info_address_command): Likewise.
6491
6492 2018-05-29  Tom Tromey  <tom@tromey.com>
6493
6494         * windows-nat.c (handle_exception): Update fall-through comment.
6495
6496 2018-05-29  Tom Tromey  <tom@tromey.com>
6497
6498         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
6499         (struct program_space) <added_solibs>: Now a std::vector.
6500         * breakpoint.c (print_solib_event): Update.
6501         (check_status_catch_solib): Update.
6502         * progspace.c (clear_program_space_solib_cache): Update.
6503         * solib.c (update_solib_list): Update.
6504
6505 2018-05-29  Tom Tromey  <tom@tromey.com>
6506
6507         * python/py-type.c (typy_richcompare): Update.
6508         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6509         * gdbtypes.h (types_deeply_equal): Return bool.
6510         (types_equal): Likewise.
6511         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
6512         declare VEC.
6513         (check_types_equal): Change worklist to std::vector.  Return
6514         bool.
6515         (struct type_equality_entry): Add constructor.
6516         (compare_maybe_null_strings): Return bool.
6517         (check_types_worklist): Return bool.  Change worklist to
6518         std::vector.
6519         (types_deeply_equal): Use std::vector.
6520         (types_equal): Return bool.
6521         (compare_maybe_null_strings): Simplify.
6522
6523 2018-05-29  Tom Tromey  <tom@tromey.com>
6524
6525         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
6526
6527 2018-05-29  Tom Tromey  <tom@tromey.com>
6528
6529         * objc-lang.h: Don't include cp-support.h.
6530         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
6531         declare VEC.
6532
6533 2018-05-27  Tom Tromey  <tom@tromey.com>
6534
6535         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6536
6537 2018-05-25  Tom Tromey  <tom@tromey.com>
6538
6539         * value.c (value::location): Initialize.
6540
6541 2018-05-25  Tom Tromey  <tom@tromey.com>
6542
6543         * dbxread.c (init_bincl_list): Remove.
6544         (bincl_list): Now a std::vector.
6545         (bincls_allocated, next_bincl): Remove.
6546         (free_bincl_list, do_free_bincl_list_cleanup)
6547         (make_cleanup_free_bincl_list): Remove.
6548         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6549         unique_xmalloc_ptr.
6550         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6551         (struct header_file_location): Add constructor.
6552         (add_bincl_to_list): Remove.
6553
6554 2018-05-25  Tom Tromey  <tom@tromey.com>
6555
6556         * tui/tui.c (tui_enable): Update.
6557         * mi/mi-interp.c (mi_interp::init): Update.
6558         * interps.h (class interp) <name>: New method.
6559         <m_name>: Rename from name.
6560         (~scoped_restore_interp): Update.
6561         * interps.c (interp::interp): Update.
6562         (interp_add, interp_set, interp_lookup_existing)
6563         (current_interp_named_p): Update.
6564
6565 2018-05-25  Tom Tromey  <tom@tromey.com>
6566
6567         * interps.c (interp_name): Remove.
6568         * mi/mi-interp.c (mi_interp::init): Update.
6569         * interps.h (interp_name): Remove.
6570         (~scoped_restore_interp): Update.
6571         * tui/tui.c (tui_enable): Update.
6572
6573 2018-05-25  Tom Tromey  <tom@tromey.com>
6574
6575         * utils.c (fputs_maybe_filtered): Update.
6576         * linespec.c (decode_line_full): Update.
6577         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6578         (mi_print_breakpoint_for_event, mi_solib_loaded)
6579         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6580         (mi_user_selected_context_changed): Update.
6581         * mi/mi-main.c (mi_execute_command): Update.
6582         * cli/cli-script.c (execute_control_command): Update.
6583         * python/python.c (execute_gdb_command): Update.
6584         * solib.c (info_sharedlibrary_command): Update.
6585         * interps.c (interp_ui_out): Remove.
6586         * interps.h (interp_ui_out): Remove.
6587
6588 2018-05-25  Tom Tromey  <tom@tromey.com>
6589
6590         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6591         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6592         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6593
6594 2018-05-25  Tom Tromey  <tom@tromey.com>
6595
6596         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6597         * interps.c (interp_exec): Use scoped_restore.
6598
6599 2018-05-25  Tom Tromey  <tom@tromey.com>
6600
6601         * remote.c (remote_target::remote_file_get): Use
6602         gdb::byte_vector.
6603         (remote_target::remote_file_put): Likewise.
6604
6605 2018-05-25  Tom Tromey  <tom@tromey.com>
6606
6607         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6608         a std::string.
6609         (get_pe_section_index, add_pe_exported_sym): Update.
6610         (read_pe_exported_syms): Use gdb::def_vector.
6611
6612 2018-05-25  Tom Tromey  <tom@tromey.com>
6613
6614         * frame.c (remove_prev_frame): Remove.
6615         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6616
6617 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
6618
6619         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6620         Remove prototypes.
6621         * mips-linux-nat.c (supply_fpregset): Always call
6622         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6623         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6624         `mips_fill_fpregset'.
6625         * mips-linux-tdep.c (mips_supply_fpregset)
6626         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6627         (mips_fill_fpregset_wrapper): Remove functions.
6628         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6629         (mips_linux_fpregset): Remove variable.
6630         (mips_linux_iterate_over_regset_sections): Use
6631         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6632         (mips_linux_o32_sigframe_init): Remove comment.
6633
6634 2018-05-25  Pedro Alves  <palves@redhat.com>
6635
6636         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6637         (struct readahead_cache, struct packet_reg, struct
6638         remote_arch_state, class remote_state): Move higher up in the
6639         file.
6640         (remote_target::m_remote_state): Now an object instead of a pointer.
6641         (remote_target::get_remote_state): Adjust.
6642
6643 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6644
6645         * stack.c (select_and_print_frame): Delete.
6646         (struct function_bounds): Move struct within function.
6647         (func_command): Most content moved into new function
6648         find_frame_for_function, use new function, print result, add
6649         function comment.
6650         (find_frame_for_function): New function, now returns a result.
6651
6652 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6653
6654         * stack.c (iterate_over_block_arg_vars): Fix comment.
6655         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6656
6657 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6658
6659         PR gdb/23203
6660         * frame.c
6661         (scoped_restore_selected_frame::scoped_restore_selected_frame):
6662         Define.
6663         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6664         Define.
6665         * frame.h (class scoped_restore_selected_frame): New class.
6666         * stack.c (print_frame_local_vars): Remove catching and rethrowing
6667         of any exception, use scoped_restore_selected_frame to restore the
6668         frame instead.
6669
6670 2018-05-24  Pedro Alves  <palves@redhat.com>
6671
6672         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6673         override.
6674
6675 2018-05-23  Tom Tromey  <tom@tromey.com>
6676
6677         * complaints.c (struct complaints): Remove.
6678         (symfile_complaint_book): Remove.
6679         (series): New global.
6680         (complaint_internal): Update.
6681         (clear_complaints): Update.
6682
6683 2018-05-23  Tom Tromey  <tom@tromey.com>
6684
6685         * complaints.c (counters): New global.
6686         (struct complain): Remove.
6687         (struct complaints) <root>: Remove.
6688         (complaint_sentinel): Remove.
6689         (symfile_complaint_book): Update.
6690         (find_complaint) Remove.
6691         (complaint_internal, clear_complaints): Update.
6692
6693 2018-05-23  Tom Tromey  <tom@tromey.com>
6694
6695         * complaints.c (struct complain) <file, line>: Remove.
6696         (find_complaint): Remove file, line parameters.
6697         (complaint_internal): Update.
6698
6699 2018-05-23  Tom Tromey  <tom@tromey.com>
6700
6701         * complaints.c (vcomplaint): Remove.
6702         (complaint_internal) Merge in contents of vcomplaint.
6703
6704 2018-05-23  Tom Tromey  <tom@tromey.com>
6705
6706         * complaints.c (struct complaints) <explanation>: Remove.
6707         (symfile_explanations): Remove.
6708         (symfile_complaint_book): Update.
6709         (vcomplaint): Update.
6710         (struct explanation): Remove.
6711
6712 2018-05-23  Tom Tromey  <tom@tromey.com>
6713
6714         * complaints.c (symfile_complaints): Remove.
6715         (complaint_internal): Remove "complaints" parameter.
6716         (clear_complaints, vcomplaint): Remove "c" parameter.
6717         (get_complaints): Remove.
6718         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6719         (dwarf2_debug_line_missing_file_complaint)
6720         (dwarf2_debug_line_missing_end_sequence_complaint)
6721         (dwarf2_complex_location_expr_complaint)
6722         (dwarf2_const_value_length_mismatch_complaint)
6723         (dwarf2_section_buffer_overflow_complaint)
6724         (dwarf2_macro_malformed_definition_complaint)
6725         (dwarf2_invalid_attrib_class_complaint)
6726         (create_addrmap_from_index, dw2_symtab_iter_next)
6727         (dw2_expand_marked_cus)
6728         (dw2_debug_names_iterator::find_vec_in_debug_names)
6729         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6730         (create_debug_type_hash_table, init_cutu_and_read_dies)
6731         (partial_die_parent_scope, add_partial_enumeration)
6732         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6733         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6734         (read_import_statement, read_file_scope, create_dwo_cu_reader)
6735         (create_cus_hash_table, create_dwp_hash_table)
6736         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6737         (dwarf2_rnglists_process, dwarf2_ranges_process)
6738         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6739         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6740         (handle_struct_member_die, process_structure_scope)
6741         (read_array_type, read_common_block, read_module_type)
6742         (read_tag_pointer_type, read_typedef, read_base_type)
6743         (read_subrange_type, load_partial_dies, partial_die_info::read)
6744         (partial_die_info::read, partial_die_info::read)
6745         (partial_die_info::read, read_checked_initial_length_and_offset)
6746         (dwarf2_string_attr, read_formatted_entries)
6747         (dwarf_decode_line_header)
6748         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6749         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6750         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6751         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6752         (get_signatured_type, get_DW_AT_signature_type)
6753         (decode_locdesc, file_file_name, consume_improper_spaces)
6754         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6755         (dwarf_decode_macro_bytes, dwarf_decode_macros)
6756         (dwarf2_symbol_mark_computed, set_die_type)
6757         (read_attribute_value): Update.
6758         * stap-probe.c (handle_stap_probe, get_stap_base_address):
6759         Update.
6760         * dbxread.c (unknown_symtype_complaint)
6761         (lbrac_mismatch_complaint, repeated_header_complaint)
6762         (set_namestring, function_outside_compilation_unit_complaint)
6763         (read_dbx_symtab, process_one_symbol): Update.
6764         * gdbtypes.c (stub_noname_complaint): Update.
6765         * windows-nat.c (handle_unload_dll): Update.
6766         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6767         (decode_base_type): Update.
6768         * xcoffread.c (bf_notfound_complaint, ef_complaint)
6769         (eb_complaint, record_include_begin, record_include_end)
6770         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6771         (process_xcoff_symbol, read_symbol)
6772         (function_outside_compilation_unit_complaint)
6773         (scan_xcoff_symtab): Update.
6774         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6775         * buildsym.c (finish_block_internal, make_blockvector)
6776         (end_symtab_get_static_block, augment_type_symtab): Update.
6777         * dtrace-probe.c (dtrace_process_dof)
6778         (dtrace_static_probe_ops::get_probes): Update.
6779         * complaints.h (struct complaint): Don't declare.
6780         (symfile_complaints): Remove.
6781         (complaint_internal): Remove "complaints" parameter.
6782         (complaint): Likewise.
6783         (clear_complaints): Likewise.
6784         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6785         (reread_symbols): Update.
6786         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6787         (dwarf2_frame_cache, decode_frame_entry): Update.
6788         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6789         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6790         (info_selectors_command): Update.
6791         * macrotab.c (macro_include, check_for_redefinition)
6792         (macro_undef): Update.
6793         * objfiles.c (filter_overlapping_sections): Update.
6794         * stabsread.c (invalid_cpp_abbrev_complaint)
6795         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6796         (define_symbol, error_type, read_type, rs6000_builtin_type)
6797         (stabs_method_name_from_physname, read_member_functions)
6798         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6799         (attach_fields_to_type, complain_about_struct_wipeout)
6800         (read_range_type, read_args, common_block_start)
6801         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6802         Update.
6803         * mdebugread.c (index_complaint, unknown_ext_complaint)
6804         (basic_type_complaint, bad_tag_guess_complaint)
6805         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6806         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6807         (parse_procedure, parse_lines)
6808         (function_outside_compilation_unit_complaint)
6809         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6810         (bad_tag_guess_complaint, reg_value_complaint): Update.
6811         * cp-support.c (demangled_name_complaint): Update.
6812         * macroscope.c (sal_macro_scope): Update.
6813         * dwarf-index-write.c (class debug_names): Update.
6814
6815 2018-05-23  Tom Tromey  <tom@tromey.com>
6816
6817         * complaints.c (clear_complaints): Remove "noisy" parameter.
6818         * complaints.h (clear_complaints): Update.
6819         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6820         (reread_symbols): Update.
6821
6822 2018-05-23  Tom Tromey  <tom@tromey.com>
6823
6824         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6825         SUBSEQUENT_MESSAGE.
6826         (vcomplaint, clear_complaints): Update.
6827         (symfile_explanations): Remove some messages.
6828
6829 2018-05-23  Tom Tromey  <tom@tromey.com>
6830
6831         * complaints.c (internal_complaint): Remove.
6832         * complaints.h (internal_complaint): Remove.
6833
6834 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6835
6836         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6837
6838 2018-05-22  Pedro Alves  <palves@redhat.com>
6839
6840         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6841         (remote_fileio_badfd, remote_fileio_return_errno)
6842         (remote_fileio_return_success, remote_fileio_func_open)
6843         (remote_fileio_func_open, remote_fileio_func_close)
6844         (remote_fileio_func_read, remote_fileio_func_write)
6845         (remote_fileio_func_lseek, remote_fileio_func_rename)
6846         (remote_fileio_func_unlink, remote_fileio_func_stat)
6847         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6848         (remote_fileio_func_isatty, remote_fileio_func_system): Add
6849         remote_target parameter.
6850         (remote_fio_func_map) <func>: Add remote_target parameter.
6851         (do_remote_fileio_request, remote_fileio_request):
6852         * remote-fileio.h (remote_fileio_request):
6853         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6854         remote_target parameter.
6855         (remote_notif_process, handle_notification): Adjust to pass down
6856         the remote.
6857         (remote_notif_state_allocate): Add remote_target parameter.  Save
6858         it.
6859         * remote-notif.h (struct remote_target): Forward declare.
6860         (struct notif_client) <parse, ack, can_get_pending_events>: Add
6861         remote_target parameter.
6862         (struct remote_notif_state) <remote>: New field.
6863         (remote_notif_ack, remote_notif_parse): Add remote_target
6864         parameter.
6865         (remote_notif_state_allocate, remote_notif_state_allocate): Add
6866         remote_target parameter.
6867         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6868         (threads_listing_context, rmt_thread_action, protocol_feature)
6869         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6870         (packet_result, struct threads_listing_context, remote_state):
6871         Move definitions and declarations higher up.
6872         (remote_target) <~remote_target>: Declare.
6873         (remote_download_command_source, remote_file_put, remote_file_get)
6874         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6875         (remote_hostio_pread_vFile, remote_hostio_send_command)
6876         (remote_hostio_set_filesystem, remote_hostio_open)
6877         (remote_hostio_close, remote_hostio_unlink, remote_state)
6878         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6879         (get_memory_write_packet_size, get_memory_read_packet_size)
6880         (append_pending_thread_resumptions, remote_detach_1)
6881         (append_resumption, remote_resume_with_vcont)
6882         (add_current_inferior_and_thread, wait_ns, wait_as)
6883         (process_stop_reply, remote_notice_new_inferior)
6884         (process_initial_stop_replies, remote_add_thread)
6885         (btrace_sync_conf, remote_btrace_maybe_reopen)
6886         (remove_new_fork_children, kill_new_fork_children)
6887         (discard_pending_stop_replies, stop_reply_queue_length)
6888         (check_pending_events_prevent_wildcard_vcont)
6889         (discard_pending_stop_replies_in_queue, stop_reply)
6890         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6891         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6892         (remote_interrupt_as, remote_interrupt_ns)
6893         (remote_get_noisy_reply, remote_query_attached)
6894         (remote_add_inferior, remote_current_thread, get_current_thread)
6895         (set_thread, set_general_thread, set_continue_thread)
6896         (set_general_process, write_ptid)
6897         (remote_unpack_thread_info_response, remote_get_threadinfo)
6898         (parse_threadlist_response, remote_get_threadlist)
6899         (remote_threadlist_iterator, remote_get_threads_with_ql)
6900         (remote_get_threads_with_qxfer)
6901         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6902         (get_offsets, remote_check_symbols, remote_supported_packet)
6903         (remote_query_supported, remote_packet_size)
6904         (remote_serial_quit_handler, remote_detach_pid)
6905         (remote_vcont_probe, remote_resume_with_hc)
6906         (send_interrupt_sequence, interrupt_query)
6907         (remote_notif_get_pending_events, fetch_register_using_p)
6908         (send_g_packet, process_g_packet, fetch_registers_using_g)
6909         (store_register_using_P, store_registers_using_G)
6910         (set_remote_traceframe, check_binary_download)
6911         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6912         (remote_xfer_live_readonly_partial, remote_read_bytes)
6913         (remote_send_printf, remote_flash_write, readchar)
6914         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6915         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6916         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6917         (extended_remote_disable_randomization, extended_remote_run)
6918         (send_environment_packet, extended_remote_environment_support)
6919         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6920         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6921         (packet_command): Now methods of ...
6922         (remote_target): ... this class.
6923         (m_remote_state) <remote_target>: New field.
6924         (struct remote_state) <stop_reply_queue,
6925         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6926         fields.
6927         (remote_state::remote_state): Allocate stop_reply_queue.
6928         (remote_state): Delete global.
6929         (get_remote_state_raw): Delete.
6930         (remote_target::get_remote_state): Allocate m_remote_state on
6931         demand.
6932         (get_current_remote_target): New.
6933         (remote_ops, extended_remote_ops): Delete.
6934         (wait_forever_enabled_p, remote_async_inferior_event_token):
6935         Delete, moved to struct remote_state.
6936         (remote_target::close): Delete self.  Destruction bits split to
6937         ...
6938         (remote_target::~remote_target): ... this.
6939         (show_memory_packet_size): Adjust to use
6940         get_current_remote_target.
6941         (struct protocol_feature) <func>: Add remote_target parameter.
6942         All callers adjusted.
6943         (curr_quit_handler_target): New.
6944         (remote_serial_quit_handler): Reimplement.
6945         (remote_target::open_1): Adjust to use get_current_remote_target.
6946         Heap-allocate remote_target/extended_remote_target instances.
6947         (vcont_builder::vcont_builder): Add remote_target parameter, and
6948         save it in m_remote.  All callers adjusted.
6949         (vcont_builder::m_remote): New field.
6950         (vcont_builder::restart, vcont_builder::flush)
6951         (vcont_builder::push_action): Use it.
6952         (remote_target::commit_resume): Use it.
6953         (struct queue_iter_param) <remote>: New field.
6954         (remote_target::remove_new_fork_children): Fill in 'remote' field.
6955         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
6956         (check_pending_event_prevents_wildcard_vcont_callback)
6957         (remote_target::check_pending_events_prevent_wildcard_vcont)
6958         (remote_target::discard_pending_stop_replies)
6959         (remote_target::discard_pending_stop_replies_in_queue)
6960         (remote_target::remote_notif_remove_queued_reply): Fill in
6961         'remote' field.
6962         (remote_notif_get_pending_events): New.
6963         (remote_target::readchar, remote_target::remote_serial_write):
6964         Save/restore curr_quit_handler_target.
6965         (putpkt): New.
6966         (kill_new_fork_children): Fill in 'remote' field.
6967         (packet_command): Use get_current_remote_target, defer to
6968         remote_target method of same name.
6969         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
6970         parameter, and save it in m_remote.  All callers adjusted.
6971         (scoped_remote_fd::release): Use m_remote.
6972         (scoped_remote_fd::m_remote): New field.
6973         (remote_file_put, remote_file_get, remote_file_delete): Use
6974         get_current_remote_target, defer to remote_target method of same
6975         name.
6976         (remote_btrace_reset): Add remote_state paremeter.  Update all
6977         callers.
6978         (remote_async_inferior_event_handler). Pass down 'data'.
6979         (remote_new_objfile): Use get_current_remote_target.
6980         (remote_target::vcont_r_supported): New.
6981         (set_range_stepping): Use get_current_remote_target and
6982         remote_target::vcont_r_supported.
6983         (_initialize_remote): Don't allocate 'remote_state' and
6984         'stop_reply_queue' globals.
6985         * remote.h (struct remote_target): Forward declare.
6986         (getpkt, putpkt, remote_notif_get_pending_events): Add
6987         'remote_target' parameter.
6988
6989 2018-05-22  Pedro Alves  <palves@redhat.com>
6990
6991         * remote.c (vcont_builder): Now a class.  Make all data members
6992         private.
6993         (vcont_builder) <vcont_builder, restart, flush, push_action>:
6994         Declare methods.
6995         (vcont_builder_restart): Rename to ...
6996         (vcont_builder::restart): ... this.
6997         (vcont_builder_flush): Rename to ...
6998         (vcont_builder::flush): ... this.
6999         (vcont_builder_push_action): Rename to ...
7000         (vcont_builder::push_action): ... this.
7001         (remote_target::commit_resume): Adjust.
7002
7003 2018-05-22  Pedro Alves  <palves@redhat.com>
7004
7005         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7006         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7007         (get_fixed_memory_packet_size): New.
7008         (get_memory_packet_size): Use it.
7009         (set_memory_packet_size): Don't override the config size with
7010         DEFAULT_MAX_MEMORY_PACKET_SIZE.
7011         (show_memory_packet_size): Use get_fixed_memory_packet_size.
7012         Don't refer to get_memory_packet_size if not connected to a remote
7013         target.  Show "(default)" if configured size is 0.
7014
7015 2018-05-22  Pedro Alves  <palves@redhat.com>
7016
7017         * remote.c (remote_target::mourn_inferior): Move
7018         discard_pending_stop_replies call here from ...
7019         (_initialize_remote): ... here.
7020
7021 2018-05-22  Pedro Alves  <palves@redhat.com>
7022
7023         * remote.c (compare_section_command): Remove set_general_process
7024         call.
7025
7026 2018-05-22  Pedro Alves  <palves@redhat.com>
7027
7028         * remote.c (struct packet_reg, struct remote_arch_state):
7029         Move higher up in the file.
7030         (remote_state) <m_arch_states>: Store remote_arch_state values
7031         instead of remote_arch_state pointers.
7032         (remote_state::get_remote_arch_state): Adjust.
7033
7034 2018-05-22  Pedro Alves  <palves@redhat.com>
7035
7036         * remote.c: Include <unordered_map>.
7037         (remote_state): Now a class.
7038         (remote_state) <get_remote_arch_state>: Declare method.
7039         <get_remote_arch_state>: New field.
7040         (remote_arch_state) <remote_arch_state>: Declare ctor.
7041         <regs>: Now a unique_ptr.
7042         (remote_gdbarch_data_handle): Delete.
7043         (get_remote_arch_state): Delete.
7044         (remote_state::get_remote_arch_state): New.
7045         (get_remote_state): Adjust to call remote_state's
7046         get_remote_arch_state method.
7047         (init_remote_state): Delete, bits factored out to ...
7048         (remote_arch_state::remote_arch_state): ... this new method.
7049         (get_remote_packet_size, get_memory_packet_size)
7050         (process_g_packet, remote_target::fetch_registers)
7051         (remote_target::prepare_to_store, store_registers_using_G)
7052         (remote_target::store_registers, remote_target::get_trace_status):
7053         Adjust to call remote_state's method.
7054         (_initialize_remote): Remove reference to
7055         remote_gdbarch_data_handle.
7056
7057 2018-05-22  Pedro Alves  <palves@redhat.com>
7058
7059         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7060         pread>: New method declarations.
7061         (remote_target::open_1): Adjust.
7062         (readahead_cache_invalidate): Rename to ...
7063         (readahead_cache::invalidate): ... this, and adjust to be a class
7064         method.
7065         (readahead_cache_invalidate_fd): Rename to ...
7066         (readahead_cache::invalidate_fd): ... this, and adjust to be a
7067         class method.
7068         (remote_hostio_pwrite): Adjust.
7069         (remote_hostio_pread_from_cache): Rename to ...
7070         (readahead_cache::pread): ... this, and adjust to be a class
7071         method.
7072         (remote_hostio_close): Adjust.
7073
7074 2018-05-22  Pedro Alves  <palves@redhat.com>
7075
7076         * remote.c (remote_hostio_close_cleanup): Delete.
7077         (class scoped_remote_fd): New.
7078         (remote_file_put, remote_file_get): Use it.
7079
7080 2018-05-22  Pedro Alves  <palves@redhat.com>
7081
7082         (struct vCont_action_support): Use bool and initialize all fields.
7083         (struct readahead_cache): Initialize all fields.
7084         (remote_state): Use bool and initialize all fields.
7085         (remote_state::remote_state, remote_state::~remote_state): New.
7086         (new_remote_state): Delete.
7087         (_initialize_remote): Use new to allocate remote_state.
7088
7089 2018-05-22  Pedro Alves  <palves@redhat.com>
7090             張俊芝  <zjz@zjz.name>
7091
7092         PR gdb/22973
7093         * c-exp.y: Include "c-support.h".
7094         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7095         of tolower.  Use c_ident_is_alpha to scan names.
7096         * c-lang.c: Include "c-support.h".
7097         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7098         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7099         * c-support.h: New file, with bits factored out from ...
7100         * cp-name-parser.y: ... this file.
7101         Include "c-support.h".
7102         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7103         c-support.h and renamed.
7104         (symbol_end, yylex): Adjust.
7105
7106 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7107
7108         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7109         parameter type to CORE_ADDR.
7110         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7111         parameter type in declaration to CORE_ADDR.
7112         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7113         target_auxv_search to get AT_HWCAP and use the result to get the
7114         target description.
7115         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7116         to CORE_ADDR. Remove the cast of the return value to unsigned
7117         long. Fix error predicate of target_auxv_search.
7118         (ppc_linux_nat_target::read_description): Change the type of the
7119         hwcap variable to CORE_ADDR.
7120
7121 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7122
7123         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7124         if the size of fpscr is larger than 32 bits.
7125
7126 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7127
7128         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7129         (ppc32_linux_vsxregmap): New global.
7130         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7131         regcache_supply_regset, and regcache_collect_regset.
7132         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7133         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7134         (fetch_vsx_register, store_vsx_register): Remove.
7135         (fetch_vsx_registers): Add regno parameter. Get regset using
7136         ppc_linux_vsxregset. Use regset to supply registers.
7137         (store_vsx_registers): Add regno parameter. Get regset using
7138         ppc_linux_vsxregset. Use regset to collect registers.
7139         (fetch_register): Call fetch_vsx_registers instead of
7140         fetch_vsx_register.
7141         (store_register): Call store_vsx_registers instead of
7142         store_vsx_register.
7143         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7144         new regno parameter.
7145         (store_ppc_registers): Call store_vsx_registers with -1 for the
7146         new regno parameter.
7147         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7148         (ppc_collect_vsxregset): Remove.
7149
7150 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7151
7152         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7153         offset fields.
7154         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7155         for vector register offset fields.
7156         (ppc64_fbsd_reg_offsets): Likewise.
7157         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7158         to vector register offset fields.
7159         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7160         to vector register offset fields.
7161         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7162         vector register offset fields.
7163         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7164         initializers for vector register offset fields.
7165         (rs6000_aix64_reg_offsets): Likewise.
7166         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7167         (ppc_supply_vrregset): Remove.
7168         (ppc_collect_vrregset): Remove.
7169         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7170         (ppc_linux_vrregset) : New function.
7171         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7172         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7173         (ppc32_linux_vrregset): Remove.
7174         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7175         and use result instead of ppc32_linux_vrregset.
7176         (ppc32_linux_reg_offsets): Remove initializers for vector register
7177         offset fields.
7178         (ppc64_linux_reg_offsets): Likewise.
7179         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7180         * ppc-linux-nat.c: Include regset.h.
7181         (gdb_vrregset_t): Adjust comment to account for little-endian
7182         mode.
7183         (supply_vrregset, fill_vrregset): Remove.
7184         (fetch_altivec_register, store_altivec_register): Remove.
7185         (fetch_altivec_registers): Add regno parameter. Get regset using
7186         ppc_linux_vrregset. Use regset to supply registers.
7187         (store_altivec_registers): Add regno parameter. Get regset using
7188         ppc_linux_vrregset. Use regset to collect registers.
7189         (fetch_register): Call fetch_altivec_registers instead of
7190         fetch_altivec_register.
7191         (store_register): Call store_altivec_registers instead of
7192         store_altivec_register.
7193         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7194         the new regno parameter.
7195         (store_ppc_registers): Call store_altivec_registers with -1 for
7196         the new regno parameter.
7197
7198 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7199
7200         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7201         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7202         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7203         (gdb_vrregset_t): Change array type size to
7204         PPC_LINUX_SIZEOF_VRREGSET.
7205         (gdb_vsxregset_t): Change array type size to
7206         PPC_LINUX_SIZEOF_VSXREGSET.
7207         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7208         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7209         PPC_LINUX_SIZEOF_VSXREGSET.
7210
7211 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7212
7213         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7214         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7215         nat/ppc-linux.c.
7216         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7217         ppc_linux_target_wordsize with tid.
7218         (ppc_linux_nat_target::read_description): Call ppc_linux_target
7219         wordsize with tid.
7220         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7221         (ppc64_64bit_inferior_p): Add static and inline specifiers.
7222         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7223         tid parameter. Remove static specifier.
7224         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7225         (ppc_linux_target_wordsize): New declaration.
7226
7227 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7228
7229         * arch/ppc-linux-common.c: New file.
7230         * arch/ppc-linux-common.h: New file.
7231         * arch/ppc-linux-tdesc.h: New file.
7232         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7233         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7234         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7235         arch/ppc-linux-tdesc.h.
7236         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7237         arch/ppc-linux-tdesc.h.
7238         (ppc_linux_nat_target::read_description): Remove target
7239         description matching code. Fill a ppc_linux_features struct and
7240         call ppc_linux_match_description with it. Move comment about ISA
7241         2.05 to ppc-linux-common.c.
7242         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7243         arch/ppc-linux-tdesc.h.
7244         (ppc_linux_core_read_description): Remove target description
7245         matching code. Fill a ppc_linux_features struct and call
7246         ppc_linux_match_description with it.
7247         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7248         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7249         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7250         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7251         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7252         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7253         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7254         (tdesc_powerpc_e500l): Remove.
7255
7256 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
7257
7258         * ada-lang.c (catch_assert_command): Pass empty string instead
7259         of NULL for excep_string argument.
7260
7261 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7262
7263         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7264         the width of the requested register exceeds the width of the
7265         `ptrace' data type.
7266
7267 2018-05-21  Tom Tromey  <tom@tromey.com>
7268
7269         * printcmd.c (output_command): Remove.
7270         (output_command_const): Rename to output_command.
7271         * valprint.h (output_command): Rename from output_command_const.
7272         * tracepoint.c (trace_dump_actions): Call output_command.
7273
7274 2018-05-21  Tom Tromey  <tom@tromey.com>
7275
7276         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7277         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7278         * ada-lang.h (create_ada_exception_catchpoint): Update.
7279         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7280         std::string.
7281         (create_excep_cond_exprs, ~ada_catchpoint)
7282         (should_stop_exception, print_one_exception)
7283         (print_mention_exception, print_recreate_exception): Update.
7284         (ada_get_next_arg): Remove.
7285         (catch_ada_exception_command_split): Use std::string.  Change type
7286         of "excep_string", "cond_string".
7287         (catch_ada_exception_command): Update.
7288         (create_ada_exception_catchpoint): Change type of excep_string.
7289         (ada_exception_sal): Remove excep_string parameter.
7290         (~ada_catchpoint): Remove.
7291
7292 2018-05-21  Tom Tromey  <tom@tromey.com>
7293
7294         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7295         cleanup.
7296
7297 2018-05-21  Tom Tromey  <tom@tromey.com>
7298
7299         * ada-lang.c (ada_exception_message_1, ada_exception_message):
7300         Return unique_xmalloc_ptr.
7301         (print_it_exception): Update.
7302
7303 2018-05-21  Tom Tromey  <tom@tromey.com>
7304
7305         * tracepoint.c (trace_dump_actions): Use std::string.
7306
7307 2018-05-21  Tom Tromey  <tom@tromey.com>
7308
7309         * symfile.c (reread_symbols): Use std::string for original_name.
7310
7311 2018-05-21  Tom Tromey  <tom@tromey.com>
7312
7313         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7314         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
7315         constructor.
7316
7317 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
7318
7319         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7320         instance to...
7321         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7322         * objfiles.c (get_objfile_bfd_data): Allocate
7323         objfile_per_bfd_storage with obstack_new when allocating on
7324         obstack.
7325
7326 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7327
7328         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7329         OBSTACK_ZALLOC.
7330         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7331         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7332         * mdebugread.c (mdebug_build_psymtabs): Likewise.
7333         (add_pending): Likewise.
7334         (parse_symbol): Likewise.
7335         (parse_partial_symbols): Likewise.
7336         (psymtab_to_symtab_1): Likewise.
7337         (new_psymtab): Likewise.
7338         (elfmdebug_build_psymtabs): Likewise.
7339         * minsyms.c (terminate_minimal_symbol_table): Likewise.
7340         * objfiles.c (get_objfile_bfd_data): Likewise.
7341         (objfile_register_static_link): Likewise.
7342         * psymtab.c (allocate_psymtab): Likewise.
7343         * stabsread.c (read_member_functions): Likewise.
7344         * xcoffread.c (xcoff_end_psymtab): Likewise.
7345
7346 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7347
7348         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7349         compiler supports std::is_trivially_constructible.
7350         * common/poison.h: Include obstack.h.
7351         (IsMallocable): Define to is_trivially_constructible if the
7352         compiler supports it, define to true_type otherwise.
7353         (xobnew): New.
7354         (XOBNEW): Redefine.
7355         (xobnewvec): New.
7356         (XOBNEWVEC): Redefine.
7357         * gdb_obstack.h (obstack_zalloc): New.
7358         (OBSTACK_ZALLOC): Redefine.
7359         (obstack_calloc): New.
7360         (OBSTACK_CALLOC): Redefine.
7361         (obstack_new): New.
7362         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7363         (gdbarch_obstack): New declaration in gdbarch.h, definition in
7364         gdbarch.c.
7365         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7366         obstack_calloc/obstack_zalloc.
7367         (gdbarch_obstack_zalloc): Remove.
7368         * target-descriptions.c (tdesc_data_init): Use obstack_new.
7369
7370 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7371
7372         * stack.c (backtrace_command_1): Remove useless variable int i.
7373
7374 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7375
7376         * stack.c (print_frame_info): Fix comment.
7377
7378 2018-05-18  Tom Tromey  <tom@tromey.com>
7379
7380         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7381         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7382         (~dwarf2_per_objfile): Update
7383         (dwarf2_get_dwz_file): Use new.
7384         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7385         unique_ptr.
7386
7387 2018-05-18  Tom Tromey  <tom@tromey.com>
7388
7389         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7390         unique_ptr.
7391         * dwarf2read.c (struct dwp_file): Add constructor and
7392         initializers.
7393         (open_and_init_dwp_file): Return a unique_ptr.
7394         (dwarf2_per_objfile, create_dwp_hash_table)
7395         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7396         (lookup_dwo_unit_in_dwp): Update.
7397         (open_and_init_dwp_file, get_dwp_file): Update.
7398
7399 2018-05-18  Tom Tromey  <tom@tromey.com>
7400
7401         * dwarf2read.c (dwarf2_per_objfile): Update.
7402         (struct mapped_index): Add initializers.
7403         (dwarf2_read_index): Use new.
7404         (dw2_symtab_iter_init): Update.
7405         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7406         unique_ptr.
7407
7408 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7409
7410         * dwarf2read.c (mapped_index) <total_size>: Remove.
7411
7412 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7413
7414         * unittests/format_pieces-selftests.c (test_format_specifier):
7415         Add ARI comments.
7416
7417 2018-05-18  Tom Tromey  <tom@tromey.com>
7418
7419         * c-typeprint.c (maybe_print_hole): New function.
7420         (c_print_type_struct_field_offset): Update.
7421         (c_type_print_base_struct_union): Call maybe_print_hole.
7422
7423 2018-05-17  Keith Seitz  <keiths@redhat.com>
7424
7425         * breakpoint.c (build_bpstat_chain): New function, moved from
7426         bpstat_stop_status.
7427         (bpstat_stop_status): Add optional parameter, `stop_chain'.
7428         If no stop chain is passed, call build_bpstat_chain to build it.
7429         * breakpoint.h (build_bpstat_chain): Declare.
7430         (bpstat_stop_status): Move documentation here from breakpoint.c.
7431         * infrun.c (handle_signal_stop): Before eliding inlined frames,
7432         build the stop chain and pass it to skip_inline_frames.
7433         Pass this stop chain to bpstat_stop_status.
7434         * inline-frame.c: Include breakpoint.h.
7435         (stopped_by_user_bp_inline_frame): New function.
7436         (skip_inline_frames): Add parameter `stop_chain'.
7437         Move documention to inline-frame.h.
7438         If non-NULL, use stopped_by_user_bp_inline_frame to determine
7439         whether the frame should be elided.
7440         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7441         Add moved documentation and update for new parameter.
7442
7443 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7444
7445         PR cli/14975
7446         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7447         unittests/format_pieces-selftests.c.
7448         * common/format.h (format_piece) <operator==>: New.
7449         (format_pieces) <operator[]>: Remove.
7450         * common/format.c (format_pieces::format_pieces): Handle \e.
7451         * unittests/format_pieces-selftests.c: New.
7452
7453 2018-05-17  Tom Tromey  <tom@tromey.com>
7454
7455         PR symtab/23010:
7456         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7457         (dw2_instantiate_symtab): Add skip_partial parameter.
7458         (dw2_find_last_source_symtab, dw2_map_expand_apply)
7459         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7460         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7461         (dw2_expand_symtabs_matching_one)
7462         (dw2_find_pc_sect_compunit_symtab)
7463         (dw2_debug_names_lookup_symbol)
7464         (dw2_debug_names_expand_symtabs_for_function): Update.
7465         (init_cutu_and_read_dies): Add skip_partial parameter.
7466         (process_psymtab_comp_unit, build_type_psymtabs_1)
7467         (process_skeletonless_type_unit, load_partial_comp_unit)
7468         (psymtab_to_symtab_1): Update.
7469         (load_full_comp_unit): Add skip_partial parameter.
7470         (process_imported_unit_die, dwarf2_read_addr_index)
7471         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7472         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7473         (read_signatured_type): Update.
7474
7475 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7476
7477         * value.c (release_value): Remove unused variable.
7478         (record_latest_value): Likewise.
7479         (access_value_history): Likewise.
7480         (preserve_values): Likewise.
7481
7482 2018-05-17  Tom Tromey  <tom@tromey.com>
7483
7484         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7485         Initialize.
7486
7487 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
7488
7489         PR gdb/22286
7490         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7491         Also handle registers whose width is not a multiple of
7492         PTRACE_TYPE_RET.
7493         (linux_nat_trad_target::store_register): Likewise.
7494
7495 2018-05-16  Tom Tromey  <tom@tromey.com>
7496
7497         * gdbcore.h (core_bfd): Redefine.
7498         * corelow.c (core_target::close): Update.
7499         (core_target_open): Update.
7500         * progspace.h (struct program_space) <cbfd>: Now a
7501         gdb_bfd_ref_ptr.
7502
7503 2018-05-16  Tom Tromey  <tom@tromey.com>
7504
7505         PR cli/19551:
7506         * symfile-add-flags.h (enum symfile_add_flags)
7507         <SYMFILE_NOT_FILENAME>: New constant.
7508         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
7509         objfile name from BFD.
7510         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7511         * minidebug.c (find_separate_debug_file_in_section): Put
7512         ".gnu_debugdata" into BFD's file name.
7513
7514 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
7515
7516         * regcache.c (regcache_read_ftype, regcache_write_ftype):
7517         Remove.
7518
7519 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
7520
7521         PR binutils/21446
7522         * aarch64-tdep.c (aarch64_analyze_prologue,
7523         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7524         Indicate not interested in errors.
7525
7526 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7527
7528         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7529         Supply the MIPS_ZERO_REGNUM register.
7530
7531 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7532
7533         * mips-tdep.c (mask_address_var): Make variable static.
7534
7535 2018-05-14  Tom Tromey  <tom@tromey.com>
7536
7537         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7538
7539 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
7540
7541         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7542         FXSAVE_ADDR for the mxcsr register.
7543
7544 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
7545
7546         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7547
7548 2018-05-11  Pedro Alves  <palves@redhat.com>
7549
7550         * corelow.c (core_target) <core_target>: No longer inline.
7551         Initialize m_core_gdbarch, m_core_vec and build the section table
7552         here.
7553         <~core_target>: New.
7554         <core_gdbarch, get_core_register_section>: New methods.
7555         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7556         factored out from ...
7557         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7558         (core_ops): Delete.
7559         (sniff_core_bfd): Add gdbarch parameter.
7560         (core_close): Delete, merged into ...
7561         (core_target::close): ... here.  Delete self.
7562         (core_close_cleanup): Delete.
7563         (core_target_open): Allocate a core_target on the heap.  Use a
7564         unique_ptr instead of a cleanup.  Bits moved into the core_target
7565         ctor.  Adjust to use core_target methods instead of globals.
7566         (get_core_register_section): Rename to ...
7567         (core_target::get_core_register_section): ... this and adjust.
7568         (struct get_core_registers_cb_data): New.
7569         (get_core_registers_cb): Use it.  Use bool.
7570         (core_target::fetch_registers, core_target::files_info)
7571         (core_target::xfer_partial, core_target::read_description)
7572         (core_target::pid_to, core_target::thread_name): Adjust to
7573         reference class fields instead of globals.
7574         * target.h (struct target_ops_deleter, target_ops_up): New.
7575
7576 2018-05-11  Pedro Alves  <palves@redhat.com>
7577
7578         * corefile.c (core_file_command): Move to corelow.c.
7579         * corelow.c (the_core_target): Delete.
7580         (core_file_command): Moved from corefile.c.  Check exec_bfd
7581         instead of the_core_target.  Use target_detach instead of calling
7582         into the_core_target directly.
7583         (maybe_say_no_core_file_now): New.
7584         (core_target::detach): Use it.
7585         (_initialize_corelow): Remove references to the_core_target.
7586         * gdbcore.h (the_core_target): Delete.
7587
7588 2018-05-11  Tom Tromey  <tromey@redhat.com>
7589             Pedro Alves  <palves@redhat.com>
7590
7591         * corefile.c (core_bfd): Remove.
7592         * gdbcore.h (core_bfd): Now a macro.
7593         * progspace.h (struct program_space) <cbfd>: New field.
7594
7595 2018-05-11  Tom Tromey  <tom@tromey.com>
7596
7597         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7598         gdb::def_vector.
7599
7600 2018-05-10  Tom Tromey  <tom@tromey.com>
7601
7602         * configure: Rebuild.
7603         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7604
7605 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
7606
7607         PR server/23158:
7608         * regformats/regdat.sh: Adjust script, following the addition
7609         of the new expedite_regs parameter to init_target_desc.
7610
7611 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
7612     
7613         PR gdb/23127
7614         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7615         set_gdbarch_significant_addr_bit.
7616         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7617         set_gdbarch_significant_addr_bit.
7618         * utils.c (address_significant): Update to sign extend addr.
7619
7620 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
7621
7622         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7623         (xtensa_linux_init_abi): Limit tdep->num_regs by
7624         tdep->num_nopriv_regs.
7625         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7626         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7627         not initialized.
7628
7629 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
7630
7631         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7632
7633 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
7634
7635         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7636         (I387_MXCSR_INIT_VAL): New constant.
7637         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7638         buffer if it was supplied by the inferior.
7639         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7640         (i387_xsave_get_clear_bv): New function.
7641         (i387_supply_xsave): Only read x87 control registers from the
7642         xsave buffer if the feature is enabled, and the state will have
7643         been written, otherwise, provide a suitable default.
7644         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7645         including x87 control registers.  Update control registers if they
7646         have changed from the default value, and mark features as enabled
7647         as required.
7648         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7649
7650 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
7651
7652         * spu-tdep.c (info_spu_event_command): Fix output formatting.
7653
7654 2018-05-07  Tom Tromey  <tom@tromey.com>
7655
7656         * configure: Rebuild.
7657         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7658
7659 2018-05-07  Tom Tromey  <tom@tromey.com>
7660
7661         PR tdep/20362:
7662         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7663         bit.  Use correct value for VDIV.
7664
7665 2018-05-04  Tom Tromey  <tom@tromey.com>
7666
7667         * configure: Rebuild.
7668         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7669
7670 2018-05-04  Tom Tromey  <tom@tromey.com>
7671
7672         * linux-record.c (record_linux_system_call) <case
7673         RECORD_SYS_RECVFROM>: Add "break".
7674
7675 2018-05-04  Tom Tromey  <tom@tromey.com>
7676
7677         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7678         Add missing "break".
7679         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7680         Add missing "break".
7681
7682 2018-05-04  Tom Tromey  <tom@tromey.com>
7683
7684         * rs6000-tdep.c (ppc_process_record_op4)
7685         (ppc_process_record_op63): Add fall-through comment.
7686
7687 2018-05-04  Tom Tromey  <tom@tromey.com>
7688
7689         * i386-tdep.c (i386_process_record): Add fall-through comment.
7690
7691 2018-05-04  Tom Tromey  <tom@tromey.com>
7692
7693         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7694         comment.
7695
7696 2018-05-04  Tom Tromey  <tom@tromey.com>
7697
7698         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7699         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7700         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7701         comment.
7702         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7703         comment.
7704         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7705         comment.
7706
7707 2018-05-04  Tom Tromey  <tom@tromey.com>
7708
7709         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7710
7711 2018-05-04  Tom Tromey  <tom@tromey.com>
7712
7713         * s390-tdep.c (s390_process_record): Fix fall-through comments.
7714         * xcoffread.c (scan_xcoff_symtab): Move comment later.
7715         * symfile.c (section_is_mapped): Fix fall-through comment.
7716         * stabsread.c (define_symbol, read_member_functions): Fix
7717         fall-through comment.
7718         * s390-linux-tdep.c (s390_process_record): Fix fall-through
7719         comment.
7720         * remote.c (remote_wait_as): Fix fall-through comment.
7721         * p-exp.y (yylex): Fix fall-through comment.
7722         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7723         comment.
7724         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7725         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7726         * jv-exp.y (yylex): Fix fall-through comment.
7727         * go-exp.y (lex_one_token): Fix fall-through comment.
7728         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7729         fall-through comment.
7730         * f-exp.y (yylex): Fix fall-through comment.
7731         * dwarf2read.c (process_die): Fix fall-through comments.
7732         * dbxread.c (process_one_symbol): Fix fall-through comment.
7733         * d-exp.y (lex_one_token): Fix fall-through comment.
7734         * cp-name-parser.y (yylex): Fix fall-through comment.
7735         * coffread.c (coff_symtab_read): Fix fall-through comment.
7736         * c-exp.y (lex_one_token): Fix fall-through comment.
7737         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7738         comment.
7739         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7740         comment.
7741
7742 2018-05-04  Tom Tromey  <tom@tromey.com>
7743
7744         PR python/22730:
7745         * NEWS: Mention gdb.execute change.
7746         * gdbcmd.h (execute_control_command): Don't declare.
7747         * python/python.c (execute_gdb_command): Use read_command_lines_1,
7748         execute_control_commands, execute_control_commands_to_string.
7749         * cli/cli-script.h (execute_control_commands)
7750         (execute_control_commands_to_string): Declare.
7751         (execute_control_command): Add from_tty parameter.
7752         * cli/cli-script.c (execute_control_commands)
7753         (execute_control_commands_to_string): New functions.
7754         (execute_user_command): Use execute_control_commands.
7755         (execute_control_command_1): Add "from_tty" parameter.  Update.
7756         (execute_control_command): Likewise.
7757
7758 2018-05-04  Tom Tromey  <tom@tromey.com>
7759
7760         PR python/22731:
7761         * NEWS: Mention that breakpoint commands are writable.
7762         * python/py-breakpoint.c (bppy_set_commands): New function.
7763         (breakpoint_object_getset) <"commands">: Use it.
7764
7765 2018-05-04  Tom Tromey  <tom@tromey.com>
7766
7767         * tracepoint.c (actions_command): Update.
7768         * mi/mi-cmd-break.c (mi_command_line_array)
7769         (mi_command_line_array_cnt, mi_command_line_array_ptr)
7770         (mi_read_next_line): Remove.
7771         (mi_cmd_break_commands): Update.
7772         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7773         function_view.
7774         * cli/cli-script.c (get_command_line): Update.
7775         (process_next_line): Use function_view.  Constify.
7776         (recurse_read_control_structure, read_command_lines)
7777         (read_command_lines_1): Change argument types to function_view.
7778         (do_define_command, document_command): Update.
7779         * breakpoint.h (check_tracepoint_command): Don't declare.
7780         * breakpoint.c (check_tracepoint_command): Remove.
7781         (commands_command_1, create_tracepoint_from_upload): Update.
7782
7783 2018-05-04  Tom Tromey  <tom@tromey.com>
7784
7785         PR gdb/11750:
7786         * cli/cli-script.h (enum command_control_type) <define_control>:
7787         New constant.
7788         * cli/cli-script.c (multi_line_command_p): Handle define_control.
7789         (build_command_line, execute_control_command_1)
7790         (process_next_line): Likewise.
7791         (do_define_command): New function, extracted from define_command.
7792         (define_command): Use it.
7793
7794 2018-05-04  Tom Tromey  <tom@tromey.com>
7795
7796         * tracepoint.c (actions_command): Update.
7797         * cli/cli-script.h (read_command_lines): Update.
7798         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7799         (MAX_TMPBUF): Remove define.
7800         (define_command): Use string_printf.
7801         (document_command): Likewise.
7802         * breakpoint.c (commands_command_1): Update.
7803
7804 2018-05-04  Tom Tromey  <tom@tromey.com>
7805
7806         * top.c (execute_command): Update.
7807         * cli/cli-script.h (print_command_lines): Now varargs.
7808         * cli/cli-script.c (print_command_lines): Now varargs.
7809         (execute_control_command_1) <case while_control, case if_control>:
7810         Update.
7811
7812 2018-05-04  Tom Tromey  <tom@tromey.com>
7813
7814         * tracepoint.c (all_tracepoint_actions): Rename from
7815         all_tracepoint_actions_and_cleanup.  Change return type.
7816         (actions_command, encode_actions_1, encode_actions)
7817         (trace_dump_actions, tdump_command): Update.
7818         * remote.c (remote_download_command_source): Update.
7819         * python/python.c (gdbpy_eval_from_control_command)
7820         (python_command, python_interactive_command): Update.
7821         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7822         * guile/guile.c (guile_command)
7823         (gdbscm_eval_from_control_command, guile_command): Update.
7824         * compile/compile.c (compile_code_command)
7825         (compile_print_command, compile_to_object): Update.
7826         * cli/cli-script.h (struct command_lines_deleter): New.
7827         (counted_command_line): New typedef.
7828         (struct command_line): Add constructor, destructor.
7829         <body_list>: Remove.
7830         <body_list_0, body_list_1>: New members.
7831         (command_line_up): Remove typedef.
7832         (read_command_lines, read_command_lines_1, get_command_line):
7833         Update.
7834         (copy_command_lines): Don't declare.
7835         * cli/cli-script.c (build_command_line): Use "new".
7836         (get_command_line): Return counted_command_line.
7837         (print_command_lines, execute_user_command)
7838         (execute_control_command_1, while_command, if_command): Update.
7839         (realloc_body_list): Remove.
7840         (process_next_line, recurse_read_control_structure): Update.
7841         (read_command_lines, read_command_lines_1): Return counted_command_line.
7842         (free_command_lines): Use "delete".
7843         (copy_command_lines): Remove.
7844         (define_command, document_command, show_user_1): Update.
7845         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7846         a counted_command_line.
7847         * breakpoint.h (counted_command_line): Remove typedef.
7848         (breakpoint_set_commands): Update.
7849         * breakpoint.c (check_no_tracepoint_commands)
7850         (validate_commands_for_breakpoint): Update.
7851         (breakpoint_set_commands): Change commands to be a
7852         counted_command_line.
7853         (commands_command_1, update_dprintf_command_list)
7854         (create_tracepoint_from_upload): Update.
7855
7856 2018-05-04  Tom Tromey  <tom@tromey.com>
7857
7858         * cli/cli-decode.h (cmd_list_element): New constructor.
7859         (~cmd_list_element): New destructor.
7860         (struct cmd_list_element): Add initializers.
7861         * cli/cli-decode.c (do_add_cmd): Use "new".
7862         (delete_cmd): Use "delete".
7863
7864 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7865             Pedro Alves <palves@redhat.com>
7866
7867         PR breakpoints/19806 and support for PR external/20207.
7868         * NEWS: Mention Aarch64 watchpoint improvements.
7869         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7870         watchpoints and PR external/20207 watchpoints.
7871         * nat/aarch64-linux-hw-point.c
7872         (kernel_supports_any_contiguous_range): New.
7873         (aarch64_watchpoint_offset): New.
7874         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7875         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7876         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7877         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7878         next_addr_orig_p.  Support PR external/20207 watchpoints.
7879         (aarch64_downgrade_regs): New.
7880         (aarch64_dr_state_insert_one_point): New parameters offset and
7881         addr_orig.
7882         (aarch64_dr_state_remove_one_point): Likewise.
7883         (aarch64_handle_breakpoint): Update caller.
7884         (aarch64_handle_aligned_watchpoint): Likewise.
7885         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7886         aligned_offset.
7887         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7888         aarch64_downgrade_regs.
7889         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7890         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7891         (DR_CONTROL_MASK): ... this.
7892         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7893         (unsigned int aarch64_watchpoint_offset): New prototype.
7894         (aarch64_linux_set_debug_regs): Remove const from state.
7895         * utils.c (align_up, align_down): Move to ...
7896         * common/common-utils.c (align_up, align_down): ... here.
7897         * utils.h (align_up, align_down): Move to ...
7898         * common/common-utils.h (align_up, align_down): ... here.
7899
7900 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
7901
7902         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7903         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7904         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7905         Re-implement to match the ABI as summarized in GCC's
7906         gcc/config/sparc/sparc.c.  All callers updated.
7907         (sparc32_store_arguments): Remove assertion.
7908
7909 2018-05-04  Tom Tromey  <tom@tromey.com>
7910
7911         * printcmd.c: Don't include tui.h.
7912         (decode_format): Use skip_spaces.
7913
7914 2018-05-04  Tom Tromey  <tom@tromey.com>
7915
7916         PR gdb/22619:
7917         * printcmd.c (last_count): New global.
7918         (x_command): Use saved count when repeating.
7919
7920 2018-05-04  Tom Tromey  <tom@tromey.com>
7921
7922         * nto-procfs.c (do_closedir_cleanup): Remove.
7923         (procfs_pidlist): Use gdb_dir_up.
7924         * procfs.c (do_closedir_cleanup): Remove.
7925         (proc_update_threads): Use gdb_dir_up.
7926         * common/filestuff.h (struct gdb_dir_deleter): New.
7927         (gdb_dir_up): New typedef.
7928
7929 2018-05-04  Tom Tromey  <tom@tromey.com>
7930
7931         * ada-lang.c (print_mention_exception): Use std::string.
7932
7933 2018-05-04  Tom Tromey  <tom@tromey.com>
7934
7935         * ada-lang.c (create_excep_cond_exprs): Update.
7936         (ada_exception_catchpoint_cond_string): Use std::string.
7937
7938 2018-05-04  Tom Tromey  <tom@tromey.com>
7939
7940         * ada-lang.c (xget_renaming_scope): Return std::string.
7941         (old_renaming_is_invisible): Update.
7942
7943 2018-05-04  Tom Tromey  <tom@tromey.com>
7944
7945         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
7946         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
7947
7948 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
7949
7950         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
7951
7952 2018-05-04  Tom Tromey  <tom@tromey.com>
7953
7954         * remote.c (remote_query_supported_append): Change type.
7955         (remote_check_symbols): Update.
7956
7957 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
7958
7959         PR gdb/11420
7960         * configure.ac: Prepend libpython.
7961         * python/python-config.py: Likewise.
7962         * configure: Regenerate.
7963
7964 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
7965
7966         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
7967
7968 2018-05-03  Pedro Alves  <palves@redhat.com>
7969
7970         * s390-linux-nat.c
7971         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
7972         override.  Write 'true' instead of '1'.
7973         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
7974         declaration.
7975
7976 2018-05-02  Pedro Alves  <palves@redhat.com>
7977
7978         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
7979         add_inf_child_target.
7980         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
7981         add_inf_child_target.
7982         * aix-thread.c (aix_thread_target_info): New.
7983         (aix_thread_target) <shortname, longname, doc>: Delete.
7984         <info>: New.
7985         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
7986         add_inf_child_target.
7987         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
7988         add_inf_child_target.
7989         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
7990         add_inf_child_target.
7991         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
7992         add_inf_child_target.
7993         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
7994         add_inf_child_target.
7995         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
7996         add_inf_child_target.
7997         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
7998         add_inf_child_target.
7999         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8000         add_inf_child_target.
8001         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8002         add_inf_child_target.
8003         * bfd-target.c (target_bfd_target_info): New.
8004         (target_bfd) <shortname, longname, doc>: Delete.
8005         <info>: New.
8006         * bsd-kvm.c (bsd_kvm_target_info): New.
8007         (bsd_kvm_target) <shortname, longname, doc>: Delete.
8008         <info>: New.
8009         (bsd_kvm_target::open): Rename to ...
8010         (bsd_kvm_target_open): ... this.  Adjust.
8011         * bsd-uthread.c (bsd_uthread_target_info): New.
8012         (bsd_uthread_target) <shortname, longname, doc>: Delete.
8013         <info>: New.
8014         * corefile.c (core_file_command): Adjust.
8015         * corelow.c (core_target_info): New.
8016         (core_target) <shortname, longname, doc>: Delete.
8017         <info>: New.
8018         (core_target::open): Rename to ...
8019         (core_target_open): ... this.  Adjust.
8020         * ctf.c (ctf_target_info): New.
8021         (ctf_target) <shortname, longname, doc>: Delete.
8022         <info>: New.
8023         (ctf_target::open): Rename to ...
8024         (ctf_target_open): ... this.
8025         (_initialize_ctf): Adjust.
8026         * exec.c (exec_target_info): New.
8027         (exec_target) <shortname, longname, doc>: Delete.
8028         <info>: New.
8029         (exec_target::open): Rename to ...
8030         (exec_target_open): ... this.
8031         * gdbcore.h (core_target_open): Declare.
8032         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8033         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8034         add_inf_child_target.
8035         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8036         add_inf_child_target.
8037         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8038         add_inf_child_target.
8039         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8040         add_inf_child_target.
8041         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8042         add_inf_child_target.
8043         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8044         add_inf_child_target.
8045         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8046         add_inf_child_target.
8047         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8048         add_inf_child_target.
8049         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8050         add_inf_child_target.
8051         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8052         add_inf_child_target.
8053         * inf-child.c (inf_child_target_info): New.
8054         (inf_child_target::info): New.
8055         (inf_child_open_target): Remove 'target' parameter.  Use
8056         get_native_target instead.
8057         (inf_child_target::open): Delete.
8058         (add_inf_child_target): New.
8059         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8060         Delete.
8061         <info>: New.
8062         (add_inf_child_target): Declare.
8063         (inf_child_open_target): Declare.
8064         * linux-thread-db.c (thread_db_target_info): New.
8065         (thread_db_target) <shortname, longname, doc>: Delete.
8066         <info>: New.
8067         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8068         add_inf_child_target.
8069         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8070         add_inf_child_target.
8071         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8072         add_inf_child_target.
8073         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8074         add_inf_child_target.
8075         * make-target-delegates (print_class): Adjust.
8076         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8077         add_inf_child_target.
8078         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8079         add_inf_child_target.
8080         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8081         add_inf_child_target.
8082         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8083         add_inf_child_target.
8084         * nto-procfs.c (nto_native_target_info): New.
8085         (nto_procfs_target_native) <shortname, longname, doc>:
8086         Delete.
8087         <info>: New.
8088         (nto_procfs_target_info): New.
8089         (nto_procfs_target_procfs) <shortname, longname, doc>:
8090         Delete.
8091         <info>: New.
8092         (init_procfs_targets): Adjust.
8093         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8094         add_inf_child_target.
8095         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8096         add_inf_child_target.
8097         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8098         add_inf_child_target.
8099         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8100         add_inf_child_target.
8101         * ravenscar-thread.c (ravenscar_target_info): New.
8102         (ravenscar_thread_target) <shortname, longname, doc>:
8103         Delete.
8104         <info>: New.
8105         * record-btrace.c (record_btrace_target_info):
8106         (record_btrace_target) <shortname, longname, doc>: Delete.
8107         <info>: New.
8108         (record_btrace_target::open): Rename to ...
8109         (record_btrace_target_open): ... this.  Adjust.
8110         * record-full.c (record_longname, record_doc): New.
8111         (record_full_base_target) <shortname, longname, doc>: Delete.
8112         <info>: New.
8113         (record_full_target_info): New.
8114         (record_full_target): <shortname>: Delete.
8115         <info>: New.
8116         (record_full_core_open_1, record_full_open_1): Update comments.
8117         (record_full_base_target::open): Rename to ...
8118         (record_full_open): ... this.
8119         (cmd_record_full_restore): Update.
8120         (_initialize_record_full): Update.
8121         * remote-sim.c (remote_sim_target_info): New.
8122         (gdbsim_target) <shortname, longname, doc>: Delete.
8123         <info>: New.
8124         (gdbsim_target::open): Rename to ...
8125         (gdbsim_target_open): ... this.
8126         (_initialize_remote_sim): Adjust.
8127         * remote.c (remote_doc): New.
8128         (remote_target_info): New.
8129         (remote_target) <shortname, longname, doc>: Delete.
8130         <info>: New.
8131         (extended_remote_target_info): New.
8132         (extended_remote_target) <shortname, longname, doc>: Delete.
8133         <info>: New.
8134         (remote_target::open_1): Make static.  Adjust.
8135         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8136         * s390-linux-nat.c (_initialize_s390_nat): Use
8137         add_inf_child_target.
8138         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8139         add_inf_child_target.
8140         * sol-thread.c (thread_db_target_info): New.
8141         (sol_thread_target) <shortname, longname, doc>: Delete.
8142         <info>: New.
8143         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8144         add_inf_child_target.
8145         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8146         add_inf_child_target.
8147         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8148         add_inf_child_target.
8149         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8150         add_inf_child_target.
8151         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8152         add_inf_child_target.
8153         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8154         add_inf_child_target.
8155         * spu-linux-nat.c (_initialize_spu_nat): Use
8156         add_inf_child_target.
8157         * spu-multiarch.c (spu_multiarch_target_info): New.
8158         (spu_multiarch_target) <shortname, longname, doc>: Delete.
8159         <info>: New.
8160         * target-delegates.c: Regenerate.
8161         * target.c: Include <unordered_map>.
8162         (target_ops_p): Delete.
8163         (DEF_VEC_P(target_ops_p)): Delete.
8164         (target_factories): New.
8165         (test_target_info): New.
8166         (test_target_ops::info): New.
8167         (open_target): Adjust to use target_factories.
8168         (add_target_with_completer): Rename to ...
8169         (add_target): ... this.  Change prototype.  Register target_info
8170         and open callback in target_factories.  Register target_info in
8171         command context instead of target_ops.
8172         (add_target): Delete old implementation.
8173         (add_deprecated_target_alias): Change prototype.  Adjust.
8174         (the_native_target): New.
8175         (set_native_target, get_native_target): New.
8176         (find_default_run_target): Use the_native_target.
8177         (find_attach_target, find_run_target): Simplify.
8178         (target_ops::open): Delete.
8179         (dummy_target_info): New.
8180         (dummy_target::shortname, dummy_target::longname)
8181         (dummy_target::doc): Delete.
8182         (dummy_target::info): New.
8183         (debug_target::shortname, debug_target::longname)
8184         (debug_target::doc): Delete.
8185         (debug_target::info): New.
8186         * target.h (struct target_info): New.
8187         (target_ops::~target_ops): Add comment.
8188         (target_ops::info): New.
8189         (target_ops::shortname, target_ops::longname, target_ops::doc): No
8190         longer virtual.  Implement in terms of target_info.
8191         (set_native_target, get_native_target): Declare.
8192         (target_open_ftype): New.
8193         (add_target, add_target_with_completer)
8194         (add_deprecated_target_alias): Change prototype.
8195         (test_target) <shortname, longname, doc>: Delete.
8196         <info>: New.
8197         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8198         add_inf_child_target.
8199         * tracefile-tfile.c (tfile_target_info): New.
8200         (tfile_target) <shortname, longname, doc>: Delete.
8201         <info>: New.
8202         (tfile_target::open): Rename to ...
8203         (tfile_target_open): ... this.
8204         (_initialize_tracefile_tfile): Adjust.
8205         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8206         add_inf_child_target.
8207         * windows-nat.c (_initialize_windows_nat): Use
8208         add_inf_child_target.
8209         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8210         add_inf_child_target.
8211
8212 2018-05-02  Pedro Alves  <palves@redhat.com>
8213
8214         * linux-nat.h (linux_nat_target) <low_new_thread,
8215         low_delete_thread, low_new_fork, low_forget_process,
8216         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8217         New virtual methods.
8218         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8219         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8220         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8221         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8222         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8223         Delete.
8224         * linux-fork.c (delete_fork): Adjust to call low method.
8225         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8226         (linux_nat_new_fork, linux_nat_forget_process_hook)
8227         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8228         (linux_nat_status_is_event):
8229         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8230         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8231         to call low method.
8232         (sigtrap_is_event): Rename to ...
8233         (linux_nat_target::low_status_is_event): ... this.
8234         (linux_nat_set_status_is_event): Delete.
8235         (save_stop_reason, linux_nat_wait_1)
8236         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8237         low methods.
8238         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8239         (linux_nat_set_new_fork, linux_nat_set_forget_process)
8240         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8241         (linux_nat_set_prepare_to_resume): Delete.
8242         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8243         low virtual methods.
8244         * amd64-linux-nat.c: Likewise.
8245         * arm-linux-nat.c: Likewise.
8246         * i386-linux-nat.c: Likewise.
8247         * ia64-linux-nat.c: Likewise.
8248         * mips-linux-nat.c: Likewise.
8249         * ppc-linux-nat.c: Likewise.
8250         * s390-linux-nat.c: Likewise.
8251         * sparc64-linux-nat.c: Likewise.
8252         * x86-linux-nat.c: Likewise.
8253         * x86-linux-nat.h: Include "nat/x86-linux.h".
8254         (x86_linux_nat_target) <low_new_fork, low_forget_process,
8255         low_prepare_to_resume, low_new_thread, low_delete_thread>:
8256         Override methods.
8257
8258 2018-05-02  Pedro Alves  <palves@redhat.com>
8259
8260         * target.h (target_ops)
8261         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8262         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8263         stopped_by_watchpoint, have_continuable_watchpoint,
8264         stopped_data_address, watchpoint_addr_within_range,
8265         can_accel_watchpoint_condition, can_run, thread_alive,
8266         has_all_memory, has_memory, has_stack, has_registers,
8267         has_execution, can_async_p, is_async_p, supports_non_stop,
8268         always_non_stop_p, can_execute_reverse, supports_multi_process,
8269         supports_enable_disable_tracepoint,
8270         supports_disable_randomization, supports_string_tracing,
8271         supports_evaluation_of_breakpoint_conditions,
8272         can_run_breakpoint_commands, filesystem_is_local,
8273         can_download_tracepoint, get_trace_state_variable_value,
8274         set_trace_notes, get_tib_address, use_agent, can_use_agent,
8275         record_is_replaying, record_will_replay,
8276         augmented_libraries_svr4_read>: Adjust to return bool.
8277         * aarch64-linux-nat.c: All implementations adjusted.
8278         * aix-thread.c: All implementations adjusted.
8279         * arm-linux-nat.c: All implementations adjusted.
8280         * breakpoint.c: All implementations adjusted.
8281         * bsd-kvm.c: All implementations adjusted.
8282         * bsd-uthread.c: All implementations adjusted.
8283         * corelow.c: All implementations adjusted.
8284         * ctf.c: All implementations adjusted.
8285         * darwin-nat.c: All implementations adjusted.
8286         * darwin-nat.h: All implementations adjusted.
8287         * exec.c: All implementations adjusted.
8288         * fbsd-nat.c: All implementations adjusted.
8289         * fbsd-nat.h: All implementations adjusted.
8290         * gnu-nat.c: All implementations adjusted.
8291         * gnu-nat.h: All implementations adjusted.
8292         * go32-nat.c: All implementations adjusted.
8293         * ia64-linux-nat.c: All implementations adjusted.
8294         * inf-child.c: All implementations adjusted.
8295         * inf-child.h: All implementations adjusted.
8296         * inf-ptrace.c: All implementations adjusted.
8297         * inf-ptrace.h: All implementations adjusted.
8298         * linux-nat.c: All implementations adjusted.
8299         * linux-nat.h: All implementations adjusted.
8300         * mips-linux-nat.c: All implementations adjusted.
8301         * nto-procfs.c: All implementations adjusted.
8302         * ppc-linux-nat.c: All implementations adjusted.
8303         * procfs.c: All implementations adjusted.
8304         * ravenscar-thread.c: All implementations adjusted.
8305         * record-btrace.c: All implementations adjusted.
8306         * record-full.c: All implementations adjusted.
8307         * remote-sim.c: All implementations adjusted.
8308         * remote.c: All implementations adjusted.
8309         * s390-linux-nat.c: All implementations adjusted.
8310         * sol-thread.c: All implementations adjusted.
8311         * spu-multiarch.c: All implementations adjusted.
8312         * target-delegates.c: All implementations adjusted.
8313         * target.c: All implementations adjusted.
8314         * target.h: All implementations adjusted.
8315         * tracefile-tfile.c: All implementations adjusted.
8316         * tracefile.c: All implementations adjusted.
8317         * tracefile.h: All implementations adjusted.
8318         * windows-nat.c: All implementations adjusted.
8319         * x86-linux-nat.h: All implementations adjusted.
8320         * x86-nat.h: All implementations adjusted.
8321
8322 2018-05-02  Pedro Alves  <palves@redhat.com>
8323
8324         * make-target-delegates (scan_target_h): Don't trim lines here.
8325         Replace sequences of tabs and/or whitespace with a single
8326         whitespace.
8327         (top level, parsing methods): Trim each line before processing it
8328         here.
8329
8330 2018-05-02  Pedro Alves  <palves@redhat.com>
8331             John Baldwin  <jhb@freebsd.org>
8332
8333         * target.h (enum strata) <debug_stratum>: New.
8334         (struct target_ops) <all delegation methods>: Replace by C++
8335         virtual methods, and drop "to_" prefix.  All references updated
8336         throughout.
8337         <to_shortname, to_longname, to_doc, to_data,
8338         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8339         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8340         virtual methods.  All references updated throughout.
8341         <can_attach, supports_terminal_ours, can_create_inferior,
8342         get_thread_control_capabilities, attach_no_wait>: New
8343         virtual methods.
8344         <insert_breakpoint, remove_breakpoint>: Now
8345         TARGET_DEFAULT_NORETURN methods.
8346         <info_proc>: Now returns bool.
8347         <to_magic>: Delete.
8348         (OPS_MAGIC): Delete.
8349         (current_target): Delete.  All references replaced by references
8350         to ...
8351         (target_stack): ... this.  New.
8352         (target_shortname, target_longname): Adjust.
8353         (target_can_run): Now a function declaration.
8354         (default_child_has_all_memory, default_child_has_memory)
8355         (default_child_has_stack, default_child_has_registers)
8356         (default_child_has_execution): Remove target_ops parameter.
8357         (complete_target_initialization): Delete.
8358         (memory_breakpoint_target): New template class.
8359         (test_target_ops): Refactor as a C++ class with virtual methods.
8360         * make-target-delegates (NAME_PART): Tighten.
8361         (POINTER_PART, CP_SYMBOL): New.
8362         (SIMPLE_RETURN_PART): Reimplement.
8363         (VEC_RETURN_PART): Expect less.
8364         (RETURN_PART, VIRTUAL_PART): New.
8365         (METHOD): Adjust to C++ virtual methods.
8366         (scan_target_h): Remove reference to C99.
8367         (dname): Output "target_ops::" prefix.
8368         (write_function_header): Adjust to output a C++ class method.
8369         (write_declaration): New.
8370         (write_delegator): Adjust to output a C++ class method.
8371         (tdname): Output "dummy_target::" prefix.
8372         (write_tdefault, write_debugmethod): Adjust to output a C++ class
8373         method.
8374         (tdefault_names, debug_names): Delete.
8375         (return_types, tdefaults, styles, argtypes_array): New.
8376         (top level): All methods are delegators.
8377         (print_class): New.
8378         (top level): Print dummy_target and debug_target classes.
8379         * target-delegates.c: Regenerate.
8380         * target-debug.h (target_debug_print_enum_info_proc_what)
8381         (target_debug_print_thread_control_capabilities)
8382         (target_debug_print_thread_info_p): New.
8383         * target.c (dummy_target): Delete.
8384         (the_dummy_target, the_debug_target): New.
8385         (target_stack): Now extern.
8386         (set_targetdebug): Push/unpush debug target.
8387         (default_child_has_all_memory, default_child_has_memory)
8388         (default_child_has_stack, default_child_has_registers)
8389         (default_child_has_execution): Remove target_ops parameter.
8390         (complete_target_initialization): Delete.
8391         (add_target_with_completer): No longer call
8392         complete_target_initialization.
8393         (target_supports_terminal_ours): Use regular delegation.
8394         (update_current_target): Delete.
8395         (push_target): No longer check magic number.  Don't call
8396         update_current_target.
8397         (unpush_target): Don't call update_current_target.
8398         (target_is_pushed): No longer check magic number.
8399         (target_require_runnable): Skip for all stratums over
8400         process_stratum.
8401         (target_ops::info_proc): New.
8402         (target_info_proc): Use find_target_at and
8403         find_default_run_target.
8404         (target_supports_disable_randomization): Use regular delegation.
8405         (target_get_osdata): Use find_target_at.
8406         (target_ops::open, target_ops::close, target_ops::can_attach)
8407         (target_ops::attach, target_ops::can_create_inferior)
8408         (target_ops::create_inferior, target_ops::can_run)
8409         (target_can_run): New.
8410         (default_fileio_target): Use regular delegation.
8411         (target_ops::fileio_open, target_ops::fileio_pwrite)
8412         (target_ops::fileio_pread, target_ops::fileio_fstat)
8413         (target_ops::fileio_close, target_ops::fileio_unlink)
8414         (target_ops::fileio_readlink): New.
8415         (target_fileio_open_1, target_fileio_unlink)
8416         (target_fileio_readlink): Always call the target method.  Handle
8417         FILEIO_ENOSYS.
8418         (return_zero, return_zero_has_execution): Delete.
8419         (init_dummy_target): Delete.
8420         (dummy_target::dummy_target, dummy_target::shortname)
8421         (dummy_target::longname, dummy_target::doc)
8422         (debug_target::debug_target, debug_target::shortname)
8423         (debug_target::longname, debug_target::doc): New.
8424         (target_supports_delete_record): Use regular delegation.
8425         (setup_target_debug): Delete.
8426         (maintenance_print_target_stack): Skip debug_stratum.
8427         (initialize_targets): Instantiate the_dummy_target and
8428         the_debug_target.
8429         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
8430         use target_stack.
8431         (target_auxv_search, fprint_target_auxv): Adjust.
8432         (info_auxv_command): Adjust to use target_stack.
8433         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8434         * exceptions.c (print_flush): Handle a NULL target_stack.
8435         * regcache.c (target_ops_no_register): Refactor as class with
8436         virtual methods.
8437
8438         * exec.c (exec_target): New class.
8439         (exec_ops): Now an exec_target.
8440         (exec_open, exec_close_1, exec_get_section_table)
8441         (exec_xfer_partial, exec_files_info, exec_has_memory)
8442         (exec_make_note_section): Refactor as exec_target methods.
8443         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8444         Delete.
8445         (exec_target::find_memory_regions): New.
8446         (_initialize_exec): Don't call init_exec_ops.
8447         * gdbcore.h (exec_file_clear): Delete.
8448
8449         * corefile.c (core_target): Delete.
8450         (core_file_command): Adjust.
8451         * corelow.c (core_target): New class.
8452         (the_core_target): New.
8453         (core_close): Remove target_ops parameter.
8454         (core_close_cleanup): Adjust.
8455         (core_target::close): New.
8456         (core_open, core_detach, get_core_registers, core_files_info)
8457         (core_xfer_partial, core_thread_alive, core_read_description)
8458         (core_pid_to_str, core_thread_name, core_has_memory)
8459         (core_has_stack, core_has_registers, core_info_proc): Rework as
8460         core_target methods.
8461         (ignore, core_remove_breakpoint, init_core_ops): Delete.
8462         (_initialize_corelow): Initialize the_core_target.
8463         * gdbcore.h (core_target): Delete.
8464         (the_core_target): New.
8465
8466         * ctf.c: (ctf_target): New class.
8467         (ctf_ops): Now a ctf_target.
8468         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8469         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8470         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8471         methods.
8472         (init_ctf_ops): Delete.
8473         (_initialize_ctf): Don't call it.
8474         * tracefile-tfile.c (tfile_target): New class.
8475         (tfile_ops): Now a tfile_target.
8476         (tfile_open, tfile_close, tfile_files_info)
8477         (tfile_get_tracepoint_status, tfile_trace_find)
8478         (tfile_fetch_registers, tfile_xfer_partial)
8479         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8480         Refactor as tfile_target methods.
8481         (tfile_xfer_partial_features): Remove target_ops parameter.
8482         (init_tfile_ops): Delete.
8483         (_initialize_tracefile_tfile): Don't call it.
8484         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8485         (tracefile_has_stack, tracefile_has_registers)
8486         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8487         tracefile_target methods.
8488         (init_tracefile_ops): Delete.
8489         (tracefile_target::tracefile_target): New.
8490         * tracefile.h: Include "target.h".
8491         (tracefile_target): New class.
8492         (init_tracefile_ops): Delete.
8493
8494         * spu-multiarch.c (spu_multiarch_target): New class.
8495         (spu_ops): Now a spu_multiarch_target.
8496         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8497         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8498         (spu_search_memory, spu_mourn_inferior): Refactor as
8499         spu_multiarch_target methods.
8500         (init_spu_ops): Delete.
8501         (_initialize_spu_multiarch): Remove references to init_spu_ops,
8502         complete_target_initialization.
8503
8504         * ravenscar-thread.c (ravenscar_thread_target): New class.
8505         (ravenscar_ops): Now a ravenscar_thread_target.
8506         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8507         (ravenscar_thread_alive, ravenscar_pid_to_str)
8508         (ravenscar_fetch_registers, ravenscar_store_registers)
8509         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8510         (ravenscar_stopped_by_hw_breakpoint)
8511         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8512         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8513         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8514         methods.
8515         (init_ravenscar_thread_ops): Delete.
8516         (_initialize_ravenscar): Remove references to
8517         init_ravenscar_thread_ops and complete_target_initialization.
8518
8519         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8520         (bsd_uthread_target): New class.
8521         (bsd_uthread_ops): Now a bsd_uthread_target.
8522         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8523         (bsd_uthread_close, bsd_uthread_mourn_inferior)
8524         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8525         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8526         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8527         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8528         (bsd_uthread_target): Delete function.
8529         (_initialize_bsd_uthread): Remove reference to
8530         complete_target_initialization.
8531
8532         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
8533         (target_bfd): ... this new class.
8534         (target_bfd_xfer_partial, target_bfd_get_section_table)
8535         (target_bfd_close): Refactor as target_bfd methods.
8536         (target_bfd::~target_bfd): New.
8537         (target_bfd_reopen): Adjust.
8538         (target_bfd::close): New.
8539
8540         * record-btrace.c (record_btrace_target): New class.
8541         (record_btrace_ops): Now a record_btrace_target.
8542         (record_btrace_open, record_btrace_stop_recording)
8543         (record_btrace_disconnect, record_btrace_close)
8544         (record_btrace_async, record_btrace_info)
8545         (record_btrace_insn_history, record_btrace_insn_history_range)
8546         (record_btrace_insn_history_from, record_btrace_call_history)
8547         (record_btrace_call_history_range)
8548         (record_btrace_call_history_from, record_btrace_record_method)
8549         (record_btrace_is_replaying, record_btrace_will_replay)
8550         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8551         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8552         (record_btrace_store_registers, record_btrace_prepare_to_store)
8553         (record_btrace_to_get_unwinder)
8554         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8555         (record_btrace_commit_resume, record_btrace_wait)
8556         (record_btrace_stop, record_btrace_can_execute_reverse)
8557         (record_btrace_stopped_by_sw_breakpoint)
8558         (record_btrace_supports_stopped_by_sw_breakpoint)
8559         (record_btrace_stopped_by_hw_breakpoint)
8560         (record_btrace_supports_stopped_by_hw_breakpoint)
8561         (record_btrace_update_thread_list, record_btrace_thread_alive)
8562         (record_btrace_goto_begin, record_btrace_goto_end)
8563         (record_btrace_goto, record_btrace_stop_replaying_all)
8564         (record_btrace_execution_direction)
8565         (record_btrace_prepare_to_generate_core)
8566         (record_btrace_done_generating_core): Refactor as
8567         record_btrace_target methods.
8568         (init_record_btrace_ops): Delete.
8569         (_initialize_record_btrace): Remove reference to
8570         init_record_btrace_ops.
8571         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8572         the execution_direction global.
8573         (record_full_base_target, record_full_target)
8574         (record_full_core_target): New classes.
8575         (record_full_ops): Now a record_full_target.
8576         (record_full_core_ops): Now a record_full_core_target.
8577         (record_full_target::detach, record_full_target::disconnect)
8578         (record_full_core_target::disconnect)
8579         (record_full_target::mourn_inferior, record_full_target::kill):
8580         New.
8581         (record_full_open, record_full_close, record_full_async): Refactor
8582         as methods of the record_full_base_target class.
8583         (record_full_resume, record_full_commit_resume): Refactor
8584         as methods of the record_full_target class.
8585         (record_full_wait, record_full_stopped_by_watchpoint)
8586         (record_full_stopped_data_address)
8587         (record_full_stopped_by_sw_breakpoint)
8588         (record_full_supports_stopped_by_sw_breakpoint)
8589         (record_full_stopped_by_hw_breakpoint)
8590         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8591         methods of the record_full_base_target class.
8592         (record_full_store_registers, record_full_xfer_partial)
8593         (record_full_insert_breakpoint, record_full_remove_breakpoint):
8594         Refactor as methods of the record_full_target class.
8595         (record_full_can_execute_reverse, record_full_get_bookmark)
8596         (record_full_goto_bookmark, record_full_execution_direction)
8597         (record_full_record_method, record_full_info, record_full_delete)
8598         (record_full_is_replaying, record_full_will_replay)
8599         (record_full_goto_begin, record_full_goto_end, record_full_goto)
8600         (record_full_stop_replaying): Refactor as methods of the
8601         record_full_base_target class.
8602         (record_full_core_resume, record_full_core_kill)
8603         (record_full_core_fetch_registers)
8604         (record_full_core_prepare_to_store)
8605         (record_full_core_store_registers, record_full_core_xfer_partial)
8606         (record_full_core_insert_breakpoint)
8607         (record_full_core_remove_breakpoint)
8608         (record_full_core_has_execution): Refactor
8609         as methods of the record_full_core_target class.
8610         (record_full_base_target::supports_delete_record): New.
8611         (init_record_full_ops): Delete.
8612         (init_record_full_core_ops): Delete.
8613         (record_full_save): Refactor as method of the
8614         record_full_base_target class.
8615         (_initialize_record_full): Remove references to
8616         init_record_full_ops and init_record_full_core_ops.
8617
8618         * remote.c (remote_target, extended_remote_target): New classes.
8619         (remote_ops): Now a remote_target.
8620         (extended_remote_ops): Now an extended_remote_target.
8621         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8622         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8623         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8624         (remote_pass_signals, remote_set_syscall_catchpoint)
8625         (remote_program_signals, )
8626         (remote_thread_always_alive): Remove target_ops parameter.
8627         (remote_thread_alive, remote_thread_name)
8628         (remote_update_thread_list, remote_threads_extra_info)
8629         (remote_static_tracepoint_marker_at)
8630         (remote_static_tracepoint_markers_by_strid)
8631         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8632         (remote_open): Refactor as methods of remote_target.
8633         (extended_remote_open, extended_remote_detach)
8634         (extended_remote_attach, extended_remote_post_attach):
8635         (extended_remote_supports_disable_randomization)
8636         (extended_remote_create_inferior): : Refactor as method of
8637         extended_remote_target.
8638         (remote_set_permissions, remote_open_1, remote_detach)
8639         (remote_follow_fork, remote_follow_exec, remote_disconnect)
8640         (remote_resume, remote_commit_resume, remote_stop)
8641         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8642         (remote_terminal_ours, remote_wait, remote_fetch_registers)
8643         (remote_prepare_to_store, remote_store_registers)
8644         (remote_flash_erase, remote_flash_done, remote_files_info)
8645         (remote_kill, remote_mourn, remote_insert_breakpoint)
8646         (remote_remove_breakpoint, remote_insert_watchpoint)
8647         (remote_watchpoint_addr_within_range)
8648         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8649         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8650         (remote_supports_stopped_by_sw_breakpoint)
8651         (remote_stopped_by_hw_breakpoint)
8652         (remote_supports_stopped_by_hw_breakpoint)
8653         (remote_stopped_by_watchpoint, remote_stopped_data_address)
8654         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8655         (remote_verify_memory): Refactor as methods of remote_target.
8656         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8657         parameter.
8658         (remote_xfer_partial, remote_get_memory_xfer_limit)
8659         (remote_search_memory, remote_rcmd, remote_memory_map)
8660         (remote_pid_to_str, remote_get_thread_local_address)
8661         (remote_get_tib_address, remote_read_description): Refactor as
8662         methods of remote_target.
8663         (remote_target::fileio_open, remote_target::fileio_pwrite)
8664         (remote_target::fileio_pread, remote_target::fileio_close): New.
8665         (remote_hostio_readlink, remote_hostio_fstat)
8666         (remote_filesystem_is_local, remote_can_execute_reverse)
8667         (remote_supports_non_stop, remote_supports_disable_randomization)
8668         (remote_supports_multi_process, remote_supports_cond_breakpoints)
8669         (remote_supports_enable_disable_tracepoint)
8670         (remote_supports_string_tracing)
8671         (remote_can_run_breakpoint_commands, remote_trace_init)
8672         (remote_download_tracepoint, remote_can_download_tracepoint)
8673         (remote_download_trace_state_variable, remote_enable_tracepoint)
8674         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8675         (remote_trace_start, remote_get_trace_status)
8676         (remote_get_tracepoint_status, remote_trace_stop)
8677         (remote_trace_find, remote_get_trace_state_variable_value)
8678         (remote_save_trace_data, remote_get_raw_trace_data)
8679         (remote_set_disconnected_tracing, remote_core_of_thread)
8680         (remote_set_circular_trace_buffer, remote_traceframe_info)
8681         (remote_get_min_fast_tracepoint_insn_len)
8682         (remote_set_trace_buffer_size, remote_set_trace_notes)
8683         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8684         (remote_disable_btrace, remote_teardown_btrace)
8685         (remote_read_btrace, remote_btrace_conf)
8686         (remote_augmented_libraries_svr4_read, remote_load)
8687         (remote_pid_to_exec_file, remote_can_do_single_step)
8688         (remote_execution_direction, remote_thread_handle_to_thread_info):
8689         Refactor as methods of remote_target.
8690         (init_remote_ops, init_extended_remote_ops): Delete.
8691         (remote_can_async_p, remote_is_async_p, remote_async)
8692         (remote_thread_events, remote_upload_tracepoints)
8693         (remote_upload_trace_state_variables): Refactor as methods of
8694         remote_target.
8695         (_initialize_remote): Remove references to init_remote_ops and
8696         init_extended_remote_ops.
8697
8698         * remote-sim.c (gdbsim_target): New class.
8699         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8700         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8701         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8702         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8703         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8704         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8705         Refactor as methods of gdbsim_target.
8706         (gdbsim_ops): Now a gdbsim_target.
8707         (init_gdbsim_ops): Delete.
8708         (gdbsim_cntrl_c): Adjust.
8709         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8710
8711         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8712         (the_amd64_linux_nat_target): New.
8713         (amd64_linux_fetch_inferior_registers)
8714         (amd64_linux_store_inferior_registers): Refactor as methods of
8715         amd64_linux_nat_target.
8716         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
8717         * i386-linux-nat.c: Don't include "linux-nat.h".
8718         (i386_linux_nat_target): New class.
8719         (the_i386_linux_nat_target): New.
8720         (i386_linux_fetch_inferior_registers)
8721         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8722         as methods of i386_linux_nat_target.
8723         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
8724         * inf-child.c (inf_child_ops): Delete.
8725         (inf_child_fetch_inferior_registers)
8726         (inf_child_store_inferior_registers): Delete.
8727         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8728         methods of inf_child_target.
8729         (inf_child_target::supports_terminal_ours)
8730         (inf_child_target::terminal_init)
8731         (inf_child_target::terminal_inferior)
8732         (inf_child_target::terminal_ours_for_output)
8733         (inf_child_target::terminal_ours, inf_child_target::interrupt)
8734         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8735         New.
8736         (inf_child_open, inf_child_disconnect, inf_child_close)
8737         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8738         (inf_child_post_startup_inferior, inf_child_can_run)
8739         (inf_child_pid_to_exec_file): Refactor as methods of
8740         inf_child_target.
8741         (inf_child_follow_fork): Delete.
8742         (inf_child_target::can_create_inferior)
8743         (inf_child_target::can_attach): New.
8744         (inf_child_target::has_all_memory, inf_child_target::has_memory)
8745         (inf_child_target::has_stack, inf_child_target::has_registers)
8746         (inf_child_target::has_execution): New.
8747         (inf_child_fileio_open, inf_child_fileio_pwrite)
8748         (inf_child_fileio_pread, inf_child_fileio_fstat)
8749         (inf_child_fileio_close, inf_child_fileio_unlink)
8750         (inf_child_fileio_readlink, inf_child_use_agent)
8751         (inf_child_can_use_agent): Refactor as methods of
8752         inf_child_target.
8753         (return_zero, inf_child_target): Delete.
8754         (inf_child_target::inf_child_target): New.
8755         * inf-child.h: Include "target.h".
8756         (inf_child_target): Delete function prototype.
8757         (inf_child_target): New class.
8758         (inf_child_open_target, inf_child_mourn_inferior)
8759         (inf_child_maybe_unpush_target): Delete.
8760         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8761         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8762         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8763         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8764         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8765         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8766         (inf_ptrace_wait, inf_ptrace_xfer_partial)
8767         (inf_ptrace_thread_alive, inf_ptrace_files_info)
8768         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8769         methods of inf_ptrace_target.
8770         (inf_ptrace_target): Delete function.
8771         * inf-ptrace.h: Include "inf-child.h".
8772         (inf_ptrace_target): Delete function declaration.
8773         (inf_ptrace_target): New class.
8774         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8775         * linux-nat.c (linux_target): New.
8776         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8777         (linux_nat_target::~linux_nat_target): New.
8778         (linux_child_post_attach, linux_child_post_startup_inferior)
8779         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8780         (linux_child_remove_fork_catchpoint)
8781         (linux_child_insert_vfork_catchpoint)
8782         (linux_child_remove_vfork_catchpoint)
8783         (linux_child_insert_exec_catchpoint)
8784         (linux_child_remove_exec_catchpoint)
8785         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8786         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8787         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8788         (linux_nat_stopped_data_address)
8789         (linux_nat_stopped_by_sw_breakpoint)
8790         (linux_nat_supports_stopped_by_sw_breakpoint)
8791         (linux_nat_stopped_by_hw_breakpoint)
8792         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8793         (linux_nat_kill, linux_nat_mourn_inferior)
8794         (linux_nat_xfer_partial, linux_nat_thread_alive)
8795         (linux_nat_update_thread_list, linux_nat_pid_to_str)
8796         (linux_nat_thread_name, linux_child_pid_to_exec_file)
8797         (linux_child_static_tracepoint_markers_by_strid)
8798         (linux_nat_is_async_p, linux_nat_can_async_p)
8799         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8800         (linux_nat_supports_multi_process)
8801         (linux_nat_supports_disable_randomization, linux_nat_async)
8802         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8803         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8804         (linux_nat_fileio_open, linux_nat_fileio_readlink)
8805         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8806         methods of linux_nat_target.
8807         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8808         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8809         parameter.
8810         (check_stopped_by_watchpoint): Adjust.
8811         (linux_xfer_partial): Delete.
8812         (linux_target_install_ops, linux_target, linux_nat_add_target):
8813         Delete.
8814         (linux_nat_target::linux_nat_target): New.
8815         * linux-nat.h: Include "inf-ptrace.h".
8816         (linux_nat_target): New.
8817         (linux_target, linux_target_install_ops, linux_nat_add_target):
8818         Delete function declarations.
8819         (linux_target): Declare global.
8820         * linux-thread-db.c (thread_db_target): New.
8821         (thread_db_target::thread_db_target): New.
8822         (thread_db_ops): Delete.
8823         (the_thread_db_target): New.
8824         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8825         (thread_db_update_thread_list, thread_db_pid_to_str)
8826         (thread_db_extra_thread_info)
8827         (thread_db_thread_handle_to_thread_info)
8828         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8829         (thread_db_resume): Refactor as methods of thread_db_target.
8830         (init_thread_db_ops): Delete.
8831         (_initialize_thread_db): Remove reference to init_thread_db_ops.
8832         * x86-linux-nat.c: Don't include "linux-nat.h".
8833         (super_post_startup_inferior): Delete.
8834         (x86_linux_nat_target::~x86_linux_nat_target): New.
8835         (x86_linux_child_post_startup_inferior)
8836         (x86_linux_read_description, x86_linux_enable_btrace)
8837         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8838         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8839         methods of x86_linux_nat_target.
8840         (x86_linux_create_target): Delete.  Bits folded ...
8841         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
8842         pointer.
8843         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8844         (x86_linux_nat_target): New class.
8845         (x86_linux_create_target): Delete.
8846         (x86_linux_add_target): Now takes a linux_nat_target pointer.
8847         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8848         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8849         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8850         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8851         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8852         make extern.
8853         (x86_use_watchpoints): Delete.
8854         * x86-nat.h: Include "breakpoint.h" and "target.h".
8855         (x86_use_watchpoints): Delete.
8856         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8857         (x86_stopped_by_watchpoint, x86_stopped_data_address)
8858         (x86_insert_watchpoint, x86_remove_watchpoint)
8859         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8860         (x86_stopped_by_hw_breakpoint): New declarations.
8861         (x86_nat_target): New template class.
8862
8863         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8864         (the_ppc_linux_nat_target): New.
8865         (ppc_linux_fetch_inferior_registers)
8866         (ppc_linux_can_use_hw_breakpoint)
8867         (ppc_linux_region_ok_for_hw_watchpoint)
8868         (ppc_linux_ranged_break_num_registers)
8869         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8870         (ppc_linux_insert_mask_watchpoint)
8871         (ppc_linux_remove_mask_watchpoint)
8872         (ppc_linux_can_accel_watchpoint_condition)
8873         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8874         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8875         (ppc_linux_watchpoint_addr_within_range)
8876         (ppc_linux_masked_watch_num_registers)
8877         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8878         (ppc_linux_read_description): Refactor as methods of
8879         ppc_linux_nat_target.
8880         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8881
8882         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8883         (procfs_target): New class.
8884         (the_procfs_target): New.
8885         (procfs_target): Delete function.
8886         (procfs_auxv_parse, procfs_attach, procfs_detach)
8887         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8888         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8889         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8890         (procfs_create_inferior, procfs_update_thread_list)
8891         (procfs_thread_alive, procfs_pid_to_str)
8892         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8893         (procfs_stopped_data_address, procfs_insert_watchpoint)
8894         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8895         (proc_find_memory_regions, procfs_info_proc)
8896         (procfs_make_note_section): Refactor as methods of procfs_target.
8897         (_initialize_procfs): Adjust.
8898         * sol-thread.c (sol_thread_target): New class.
8899         (sol_thread_ops): Now a sol_thread_target.
8900         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8901         (sol_thread_fetch_registers, sol_thread_store_registers)
8902         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8903         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8904         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8905         (init_sol_thread_ops): Delete.
8906         (_initialize_sol_thread): Adjust.  Remove references to
8907         init_sol_thread_ops and complete_target_initialization.
8908
8909         * windows-nat.c (windows_nat_target): New class.
8910         (windows_fetch_inferior_registers)
8911         (windows_store_inferior_registers, windows_resume, windows_wait)
8912         (windows_attach, windows_detach, windows_pid_to_exec_file)
8913         (windows_files_info, windows_create_inferior)
8914         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8915         (windows_close, windows_pid_to_str, windows_xfer_partial)
8916         (windows_get_tib_address, windows_get_ada_task_ptid)
8917         (windows_thread_name, windows_thread_alive): Refactor as
8918         windows_nat_target methods.
8919         (do_initial_windows_stuff): Adjust.
8920         (windows_target): Delete function.
8921         (_initialize_windows_nat): Adjust.
8922
8923         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8924         (darwin_mourn_inferior, darwin_kill_inferior)
8925         (darwin_create_inferior, darwin_attach, darwin_detach)
8926         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8927         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8928         (darwin_supports_multi_process): Refactor as darwin_nat_target
8929         methods.
8930         (darwin_resume_to, darwin_files_info): Delete.
8931         (_initialize_darwin_inferior): Rename to ...
8932         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
8933         * darwin-nat.h: Include "inf-child.h".
8934         (darwin_nat_target): New class.
8935         (darwin_complete_target): Delete.
8936         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
8937         (darwin_target): New.
8938         (i386_darwin_fetch_inferior_registers)
8939         (i386_darwin_store_inferior_registers): Refactor as methods of
8940         darwin_nat_target.
8941         (darwin_complete_target): Delete, with ...
8942         (_initialize_i386_darwin_nat): ... bits factored out here.
8943
8944         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
8945         (the_alpha_linux_nat_target): New.
8946         (alpha_linux_register_u_offset): Refactor as
8947         alpha_linux_nat_target method.
8948         (_initialize_alpha_linux_nat): Adjust.
8949         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
8950         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
8951         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
8952         methods of linux_nat_trad_target.
8953         (linux_trad_target): Delete.
8954         * linux-nat-trad.h (linux_trad_target): Delete function.
8955         (linux_nat_trad_target): New class.
8956         * mips-linux-nat.c (mips_linux_nat_target): New class.
8957         (super_fetch_registers, super_store_registers, super_close):
8958         Delete.
8959         (the_mips_linux_nat_target): New.
8960         (mips64_linux_regsets_fetch_registers)
8961         (mips64_linux_regsets_store_registers)
8962         (mips64_linux_fetch_registers, mips64_linux_store_registers)
8963         (mips_linux_register_u_offset, mips_linux_read_description)
8964         (mips_linux_can_use_hw_breakpoint)
8965         (mips_linux_stopped_by_watchpoint)
8966         (mips_linux_stopped_data_address)
8967         (mips_linux_region_ok_for_hw_watchpoint)
8968         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
8969         (mips_linux_close): Refactor as methods of mips_linux_nat.
8970         (_initialize_mips_linux_nat): Adjust to C++ification.
8971
8972         * aix-thread.c (aix_thread_target): New class.
8973         (aix_thread_ops): Now an aix_thread_target.
8974         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
8975         (aix_thread_fetch_registers, aix_thread_store_registers)
8976         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
8977         (aix_thread_thread_alive, aix_thread_pid_to_str)
8978         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
8979         Refactor as methods of aix_thread_target.
8980         (init_aix_thread_ops): Delete.
8981         (_initialize_aix_thread): Remove references to init_aix_thread_ops
8982         and complete_target_initialization.
8983         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
8984         (rs6000_nat_target): New class.
8985         (the_rs6000_nat_target): New.
8986         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
8987         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
8988         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
8989         (super_create_inferior): Delete.
8990         (_initialize_rs6000_nat): Adjust to C++ification.
8991
8992         * arm-linux-nat.c (arm_linux_nat_target): New class.
8993         (the_arm_linux_nat_target): New.
8994         (arm_linux_fetch_inferior_registers)
8995         (arm_linux_store_inferior_registers, arm_linux_read_description)
8996         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
8997         (arm_linux_remove_hw_breakpoint)
8998         (arm_linux_region_ok_for_hw_watchpoint)
8999         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9000         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9001         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9002         arm_linux_nat_target.
9003         (_initialize_arm_linux_nat): Adjust to C++ification.
9004
9005         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9006         (the_aarch64_linux_nat_target): New.
9007         (aarch64_linux_fetch_inferior_registers)
9008         (aarch64_linux_store_inferior_registers)
9009         (aarch64_linux_child_post_startup_inferior)
9010         (aarch64_linux_read_description)
9011         (aarch64_linux_can_use_hw_breakpoint)
9012         (aarch64_linux_insert_hw_breakpoint)
9013         (aarch64_linux_remove_hw_breakpoint)
9014         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9015         (aarch64_linux_region_ok_for_hw_watchpoint)
9016         (aarch64_linux_stopped_data_address)
9017         (aarch64_linux_stopped_by_watchpoint)
9018         (aarch64_linux_watchpoint_addr_within_range)
9019         (aarch64_linux_can_do_single_step): Refactor as methods of
9020         aarch64_linux_nat_target.
9021         (super_post_startup_inferior): Delete.
9022         (_initialize_aarch64_linux_nat): Adjust to C++ification.
9023
9024         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9025         (the_hppa_linux_nat_target): New.
9026         (hppa_linux_fetch_inferior_registers)
9027         (hppa_linux_store_inferior_registers): Refactor as methods of
9028         hppa_linux_nat_target.
9029         (_initialize_hppa_linux_nat): Adjust to C++ification.
9030
9031         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9032         (the_ia64_linux_nat_target): New.
9033         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9034         (ia64_linux_stopped_data_address)
9035         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9036         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9037         ia64_linux_nat_target methods.
9038         (super_xfer_partial): Delete.
9039         (_initialize_ia64_linux_nat): Adjust to C++ification.
9040
9041         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9042         (the_m32r_linux_nat_target): New.
9043         (m32r_linux_fetch_inferior_registers)
9044         (m32r_linux_store_inferior_registers): Refactor as
9045         m32r_linux_nat_target methods.
9046         (_initialize_m32r_linux_nat): Adjust to C++ification.
9047
9048         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9049         (the_m68k_linux_nat_target): New.
9050         (m68k_linux_fetch_inferior_registers)
9051         (m68k_linux_store_inferior_registers): Refactor as
9052         m68k_linux_nat_target methods.
9053         (_initialize_m68k_linux_nat): Adjust to C++ification.
9054
9055         * s390-linux-nat.c (s390_linux_nat_target): New class.
9056         (the_s390_linux_nat_target): New.
9057         (s390_linux_fetch_inferior_registers)
9058         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9059         (s390_insert_watchpoint, s390_remove_watchpoint)
9060         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9061         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9062         (s390_auxv_parse, s390_read_description): Refactor as methods of
9063         s390_linux_nat_target.
9064         (_initialize_s390_nat): Adjust to C++ification.
9065
9066         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9067         (the_sparc_linux_nat_target): New.
9068         (_initialize_sparc_linux_nat): Adjust to C++ification.
9069         * sparc-nat.c (sparc_fetch_inferior_registers)
9070         (sparc_store_inferior_registers): Remove target_ops parameter.
9071         * sparc-nat.h (sparc_fetch_inferior_registers)
9072         (sparc_store_inferior_registers): Remove target_ops parameter.
9073         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9074         (the_sparc64_linux_nat_target): New.
9075         (_initialize_sparc64_linux_nat): Adjust to C++ification.
9076
9077         * spu-linux-nat.c (spu_linux_nat_target): New class.
9078         (the_spu_linux_nat_target): New.
9079         (spu_child_post_startup_inferior, spu_child_post_attach)
9080         (spu_child_wait, spu_fetch_inferior_registers)
9081         (spu_store_inferior_registers, spu_xfer_partial)
9082         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9083         methods.
9084         (_initialize_spu_nat): Adjust to C++ification.
9085
9086         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9087         (the_tilegx_linux_nat_target): New.
9088         (fetch_inferior_registers, store_inferior_registers):
9089         Refactor as methods.
9090         (_initialize_tile_linux_nat): Adjust to C++ification.
9091
9092         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9093         (the_xtensa_linux_nat_target): New.
9094         (xtensa_linux_fetch_inferior_registers)
9095         (xtensa_linux_store_inferior_registers): Refactor as
9096         xtensa_linux_nat_target methods.
9097         (_initialize_xtensa_linux_nat): Adjust to C++ification.
9098
9099         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9100         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9101         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9102         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9103         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9104         (fbsd_stopped_by_sw_breakpoint)
9105         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9106         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9107         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9108         (fbsd_post_startup_inferior, fbsd_post_attach)
9109         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9110         (fbsd_set_syscall_catchpoint)
9111         (super_xfer_partial, super_resume, super_wait)
9112         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9113         (fbsd_handle_debug_trap): Remove target_ops parameter.
9114         (fbsd_nat_add_target): Delete.
9115         * fbsd-nat.h: Include "inf-ptrace.h".
9116         (fbsd_nat_add_target): Delete.
9117         (USE_SIGTRAP_SIGINFO): Define.
9118         (fbsd_nat_target): New class.
9119
9120         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9121         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9122         (amd64bsd_target): Delete.
9123         * amd64-bsd-nat.h: New file.
9124         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9125         "x86-bsd-nat.h".
9126         (amd64_fbsd_nat_target): New class.
9127         (the_amd64_fbsd_nat_target): New.
9128         (amd64fbsd_read_description): Refactor as method of
9129         amd64_fbsd_nat_target.
9130         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9131         (_initialize_amd64fbsd_nat): Adjust to C++ification.
9132         * amd64-nat.h (amd64bsd_target): Delete function declaration.
9133         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9134         (i386bsd_store_inferior_registers): Remove target_ops parameter.
9135         (i386bsd_target): Delete.
9136         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9137         (i386bsd_fetch_inferior_registers)
9138         (i386bsd_store_inferior_registers): Declare.
9139         (i386_bsd_nat_target): New class.
9140         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9141         (the_i386_fbsd_nat_target): New.
9142         (i386fbsd_resume, i386fbsd_read_description): Refactor as
9143         i386_fbsd_nat_target methods.
9144         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9145         (_initialize_i386fbsd_nat): Adjust to C++ification.
9146         * x86-bsd-nat.c (super_mourn_inferior): Delete.
9147         (x86bsd_mourn_inferior, x86bsd_target): Delete.
9148         (_initialize_x86_bsd_nat): Adjust to C++ification.
9149         * x86-bsd-nat.h: Include "x86-nat.h".
9150         (x86bsd_target): Delete declaration.
9151         (x86bsd_nat_target): New class.
9152
9153         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9154         (the_aarch64_fbsd_nat_target): New.
9155         (aarch64_fbsd_fetch_inferior_registers)
9156         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9157         aarch64_fbsd_nat_target.
9158         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9159         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9160         (the_alpha_bsd_nat_target): New.
9161         (alphabsd_fetch_inferior_registers)
9162         (alphabsd_store_inferior_registers): Refactor as
9163         alpha_bsd_nat_target methods.
9164         (_initialize_alphabsd_nat): Refactor as methods of
9165         alpha_bsd_nat_target.
9166         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9167         (the_amd64_nbsd_nat_target): New.
9168         (_initialize_amd64nbsd_nat): Adjust to C++ification.
9169         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9170         (the_amd64_obsd_nat_target): New.
9171         (_initialize_amd64obsd_nat): Adjust to C++ification.
9172         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9173         (the_arm_fbsd_nat_target): New.
9174         (arm_fbsd_fetch_inferior_registers)
9175         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9176         (_initialize_arm_fbsd_nat): Refactor as methods of
9177         arm_fbsd_nat_target.
9178         (_initialize_arm_fbsd_nat): Adjust to C++ification.
9179         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9180         (the_arm_netbsd_nat_target): New.
9181         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9182         arm_netbsd_nat_target.
9183         (_initialize_arm_netbsd_nat): Adjust to C++ification.
9184         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9185         (the_hppa_nbsd_nat_target): New.
9186         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9187         hppa_nbsd_nat_target methods.
9188         (_initialize_hppanbsd_nat): Adjust to C++ification.
9189         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9190         (the_hppa_obsd_nat_target): New.
9191         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9192         methods of hppa_obsd_nat_target.
9193         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
9194         add_target.
9195         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9196         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
9197         add_target.
9198         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9199         (_initialize_i386obsd_nat): Use add_target.
9200         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9201         (the_m68k_bsd_nat_target): New.
9202         (m68kbsd_fetch_inferior_registers)
9203         (m68kbsd_store_inferior_registers): Refactor as methods of
9204         m68k_bsd_nat_target.
9205         (_initialize_m68kbsd_nat): Adjust to C++ification.
9206         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9207         (the_mips_fbsd_nat_target): New.
9208         (mips_fbsd_fetch_inferior_registers)
9209         (mips_fbsd_store_inferior_registers): Refactor as methods of
9210         mips_fbsd_nat_target.
9211         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
9212         add_target.
9213         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9214         (the_mips_nbsd_nat_target): New.
9215         (mipsnbsd_fetch_inferior_registers)
9216         (mipsnbsd_store_inferior_registers): Refactor as methods of
9217         mips_nbsd_nat_target.
9218         (_initialize_mipsnbsd_nat): Adjust to C++ification.
9219         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9220         (the_mips64_obsd_nat_target): New.
9221         (mips64obsd_fetch_inferior_registers)
9222         (mips64obsd_store_inferior_registers): Refactor as methods of
9223         mips64_obsd_nat_target.
9224         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
9225         add_target.
9226         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9227         nbsd_nat_target.
9228         * nbsd-nat.h: Include "inf-ptrace.h".
9229         (nbsd_nat_target): New class.
9230         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9231         (obsd_wait): Refactor as methods of obsd_nat_target.
9232         (obsd_add_target): Delete.
9233         * obsd-nat.h: Include "inf-ptrace.h".
9234         (obsd_nat_target): New class.
9235         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9236         (the_ppc_fbsd_nat_target): New.
9237         (ppcfbsd_fetch_inferior_registers)
9238         (ppcfbsd_store_inferior_registers): Refactor as methods of
9239         ppc_fbsd_nat_target.
9240         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
9241         add_target.
9242         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9243         (the_ppc_nbsd_nat_target): New.
9244         (ppcnbsd_fetch_inferior_registers)
9245         (ppcnbsd_store_inferior_registers): Refactor as methods of
9246         ppc_nbsd_nat_target.
9247         (_initialize_ppcnbsd_nat): Adjust to C++ification.
9248         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9249         (the_ppc_obsd_nat_target): New.
9250         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9251         methods of ppc_obsd_nat_target.
9252         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
9253         add_target.
9254         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9255         (the_sh_nbsd_nat_target): New.
9256         (shnbsd_fetch_inferior_registers)
9257         (shnbsd_store_inferior_registers): Refactor as methods of
9258         sh_nbsd_nat_target.
9259         (_initialize_shnbsd_nat): Adjust to C++ification.
9260         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9261         (inf_ptrace_xfer_partial): Delete.
9262         (sparc_xfer_partial, sparc_target): Delete.
9263         * sparc-nat.h (sparc_fetch_inferior_registers)
9264         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9265         (sparc_target): Delete function declaration.
9266         (sparc_target): New template class.
9267         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9268         (_initialize_sparcnbsd_nat): Adjust to C++ification.
9269         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9270         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
9271         add_target.
9272         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9273         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9274         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9275         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
9276         add_target.
9277         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9278         (the_vax_bsd_nat_target): New.
9279         (vaxbsd_fetch_inferior_registers)
9280         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9281         methods.
9282         (_initialize_vaxbsd_nat): Adjust to C++ification.
9283
9284         * bsd-kvm.c (bsd_kvm_target): New class.
9285         (bsd_kvm_ops): Now a bsd_kvm_target.
9286         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9287         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9288         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9289         bsd_kvm_target.
9290         (bsd_kvm_return_one): Delete.
9291         (bsd_kvm_add_target): Adjust to C++ification.
9292
9293         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9294         (nto_procfs_target_procfs): New classes.
9295         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9296         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9297         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9298         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9299         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9300         (procfs_remove_hw_breakpoint, procfs_resume)
9301         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9302         (procfs_kill_inferior, procfs_store_registers)
9303         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9304         as methods of nto_procfs_target.
9305         (nto_procfs_ops): Now an nto_procfs_target_procfs.
9306         (nto_native_ops): Delete.
9307         (procfs_open, procfs_native_open): Delete.
9308         (nto_native_ops): Now an nto_procfs_target_native.
9309         (init_procfs_targets): Adjust to C++ification.
9310         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9311         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9312         Refactor as methods of nto_procfs_target.
9313
9314         * go32-nat.c (go32_nat_target): New class.
9315         (the_go32_nat_target): New.
9316         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9317         (go32_store_registers, go32_xfer_partial, go32_files_info)
9318         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9319         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9320         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9321         (go32_pid_to_str): Refactor as methods of go32_nat_target.
9322         (go32_target): Delete.
9323         (_initialize_go32_nat): Adjust to C++ification.
9324
9325         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9326         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9327         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9328         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9329         gnu_nat_target.
9330         (gnu_target): Delete.
9331         * gnu-nat.h (gnu_target): Delete.
9332         (gnu_nat_target): New class.
9333         * i386-gnu-nat.c (gnu_base_target): New.
9334         (i386_gnu_nat_target): New class.
9335         (the_i386_gnu_nat_target): New.
9336         (_initialize_i386gnu_nat): Adjust to C++ification.
9337
9338 2018-05-02  Pedro Alves  <palves@redhat.com>
9339
9340         * bfd-target.c (target_bfd_xclose): Rename to ...
9341         (target_bfd_close): ... this.
9342         (target_bfd_reopen): Adjust.
9343         * target.c (target_close): Remove references to to_xclose.
9344         * target.h (target_ops::to_xclose): Delete.
9345         (target_ops::to_close): Update comments.
9346
9347 2018-05-02  Pedro Alves  <palves@redhat.com>
9348
9349         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9350         "linux-nat.h".
9351         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9352         * inf-ptrace.c (inf_ptrace_register_u_offset)
9353         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9354         (inf_ptrace_store_register, inf_ptrace_store_registers)
9355         (inf_ptrace_trad_target): Move to ...
9356         * linux-nat-trad.c: ... this new file.
9357         * linux-nat-trad.h: New file.
9358         * linux-nat.c (linux_target_install_ops): Make extern.
9359         (linux_trad_target): Delete.
9360         * linux-nat.h (linux_trad_target): Delete declaration.
9361         (linux_target_install_ops): Declare.
9362         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9363         "linux-nat.h".
9364
9365 2018-05-02  Pedro Alves  <palves@redhat.com>
9366
9367         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9368         procfs_target/add_target here.
9369         * procfs.c (procfs_target): Make static.
9370         (_initialize_procfs): Call add_target here.
9371         * procfs.h (struct target_ops): Remove forward declaration.
9372         (procfs_target): Remove declaration.
9373         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9374
9375 2018-05-02  Pedro Alves  <palves@redhat.com>
9376
9377         * procfs.c (procfs_stopped_by_watchpoint)
9378         (procfs_insert_watchpoint, procfs_remove_watchpoint)
9379         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9380         Forward declare.
9381         (procfs_use_watchpoints): Delete, move contents...
9382         (procfs_target): ... here.
9383         * procfs.h (procfs_use_watchpoints): Delete declaration.
9384         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9385         procfs_use_watchpoints.
9386         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9387         procfs_use_watchpoints.
9388
9389 2018-05-02  Tom Tromey  <tom@tromey.com>
9390
9391         PR python/20084:
9392         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9393         and var_zuinteger_unlimited.
9394         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9395         and PARAM_ZUINTEGER_UNLIMITED.
9396         (set_parameter_value): Handle var_zuinteger and
9397         var_zuinteger_unlimited.
9398         (add_setshow_generic): Likewise.
9399         (parmpy_init): Likewise.
9400
9401 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
9402
9403         PR rust/23124
9404         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9405         pointer is not null before dereferencing it.
9406
9407 2018-04-30  Tom Tromey  <tom@tromey.com>
9408
9409         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9410         is_mi_like_p.
9411
9412 2018-04-30  Tom Tromey  <tom@tromey.com>
9413
9414         * breakpoint.c (mention): Remove use of is_mi_like_p.
9415         (print_mention_ranged_breakpoint): Likewise.
9416         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9417         of is_mi_like_p.
9418
9419 2018-04-30  Tom Tromey  <tom@tromey.com>
9420
9421         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9422
9423 2018-04-30  Tom Tromey  <tom@tromey.com>
9424
9425         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9426         (info_spu_event_command): Remove some uses of is_mi_like_p.
9427
9428 2018-04-30  Tom Tromey  <tom@tromey.com>
9429
9430         * python/py-framefilter.c (py_print_single_arg)
9431         (enumerate_locals, py_print_args, py_print_frame): Remove some
9432         uses of is_mi_like_p.
9433
9434 2018-04-30  Tom Tromey  <tom@tromey.com>
9435
9436         * ui-out.c: Update.
9437         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9438         * ui-out.h (ui_out::is_mi_like_p): Now const.
9439         (ui_out::do_is_mi_like_p): Now const.
9440         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9441
9442 2018-04-30  Tom Tromey  <tom@tromey.com>
9443
9444         * varobj.c (varobj_set_visualizer): Use new_reference.
9445         * python/python.c (gdbpy_decode_line): Use new_reference.
9446         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9447         new_reference.
9448
9449 2018-04-30  Tom Tromey  <tom@tromey.com>
9450
9451         * varobj.c (install_new_value): Use new_reference.
9452         * value.h (value_incref): Return void.  Swap intro comment with
9453         value_decref.
9454         * value.c (set_value_parent): Use new_reference.
9455         (value_incref): Return void.  Update intro comment.
9456         (release_value): Use new_reference.
9457         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9458
9459 2018-04-30  Tom Tromey  <tom@tromey.com>
9460
9461         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9462         * gdb_bfd.h (new_bfd_ref): Remove.
9463         (gdb_bfd_open): Update comment.
9464         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9465         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9466         (gdb_bfd_fdopenr): Use new_reference.
9467         * exec.c (exec_file_attach): Use new_reference.
9468
9469 2018-04-30  Tom Tromey  <tom@tromey.com>
9470
9471         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9472         method.
9473
9474 2018-04-30  Tom Tromey  <tom@tromey.com>
9475
9476         * jit.c (jit_read_code_entry): Use type_align.
9477         * i386-tdep.c (i386_gdbarch_init): Don't call
9478         set_gdbarch_long_long_align_bit.
9479         * gdbarch.sh: Remove long_long_align_bit.
9480         * gdbarch.c, gdbarch.h: Rebuild.
9481         * arc-tdep.c (arc_type_align): New function.
9482         (arc_gdbarch_init): Use arc_type_align.  Don't call
9483         set_gdbarch_long_long_align_bit.
9484
9485 2018-04-30  Tom Tromey  <tom@tromey.com>
9486
9487         * rust-lang.c (rust_type_alignment): Remove.
9488         (rust_composite_type): Use type_align.
9489
9490 2018-04-30  Tom Tromey  <tom@tromey.com>
9491
9492         * NEWS: Mention Type.align.
9493         * python/py-type.c (typy_get_alignof): New function.
9494         (type_object_getset): Add "alignof".
9495
9496 2018-04-30  Tom Tromey  <tom@tromey.com>
9497
9498         PR exp/17095:
9499         * NEWS: Update.
9500         * std-operator.def (UNOP_ALIGNOF): New operator.
9501         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9502         New.
9503         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9504         * c-lang.c (c_op_print_tab): Add alignof.
9505         * c-exp.y (ALIGNOF): New token.
9506         (exp): Add "ALIGNOF" production.
9507         (ident_tokens): Add _Alignof and alignof.
9508
9509 2018-04-30  Tom Tromey  <tom@tromey.com>
9510
9511         * i386-tdep.c (i386_type_align): New function.
9512         (i386_gdbarch_init): Update.
9513         * gdbarch.sh (type_align): New method.
9514         * gdbarch.c, gdbarch.h: Rebuild.
9515         * arch-utils.h (default_type_align): Declare.
9516         * arch-utils.c (default_type_align): New function.
9517         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9518         (struct type) <align_log2>: New field.
9519         <instance_flags>: Now a bitfield.
9520         (TYPE_RAW_ALIGN): New macro.
9521         (type_align, type_raw_align, set_type_align): Declare.
9522         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9523         functions.
9524         * dwarf2read.c (quirk_rust_enum): Set type alignment.
9525         (get_alignment, maybe_set_alignment): New functions.
9526         (read_structure_type, read_enumeration_type, read_array_type)
9527         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9528         (read_subrange_type, read_base_type): Set type alignment.
9529
9530 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
9531
9532         * dwarf2read.c (read_index_from_section): Use bool.
9533
9534 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
9535
9536         PR gdb/22950
9537         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9538         with #ifdef.
9539
9540 2018-04-29  John Reiser  <jreiser@BitWagon.com>
9541
9542         PR build/22873
9543         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9544         last step, and do it atomically.
9545
9546 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
9547
9548         * compile/compile-c-types.c (convert_int, convert_float):
9549         Update for C FE v1.
9550
9551 2018-04-27  Tom Tromey  <tom@tromey.com>
9552
9553         PR rust/22545:
9554         * rust-lang.c (rust_inclusive_range_type_p): New function.
9555         (rust_range): Handle inclusive ranges.
9556         (rust_compute_range): Likewise.
9557         * rust-exp.y (struct rust_op) <inclusive>: New field.
9558         (DOTDOTEQ): New constant.
9559         (range_expr): Add "..=" productions.
9560         (operator_tokens): Add "..=" token.
9561         (ast_range): Add "inclusive" parameter.
9562         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9563         ranges.
9564         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9565         bounds values.
9566         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9567         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9568         Update comments.
9569         * expprint.c (print_subexp_standard): Handle new bounds values.
9570         (dump_subexp_body_standard): Likewise.
9571
9572 2018-04-27  Tom Tromey  <tom@tromey.com>
9573
9574         * configure: Rebuild.
9575         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9576         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9577         "OVERRIDE".
9578         (class symbol_needs_eval_context): Likewise.
9579         * dwarf2read.c (mock_mapped_index::symbol_name_count)
9580         (mock_mapped_index::symbol_name_at): Use "override".  Remove
9581         "virtual".
9582         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9583         "override".
9584         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9585         * aarch64-tdep.c (instruction_reader::read): Use "override".
9586         (instruction_reader_test::read): Likewise.
9587         * arm-tdep.c (instruction_reader::read): Use "override".
9588         (instruction_reader_thumb::read): Likewise.
9589
9590 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
9591
9592         PR remote/9665
9593         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9594         instead of remote_send.
9595         (remote_send): Remove.
9596
9597 2018-04-26  Pedro Alves  <palves@redhat.com>
9598
9599         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9600         find_function_start_sal instead of find_pc_line.
9601
9602 2018-04-26  Pedro Alves  <palves@redhat.com>
9603
9604         * breakpoint.c (set_breakpoint_location_function): Handle
9605         mst_data_gnu_ifunc.
9606         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9607         * elfread.c (elf_symtab_read): Give data symbols with
9608         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9609         (elf_rel_plt_read): Update comment.
9610         * linespec.c (convert_linespec_to_sals): Handle
9611         mst_data_gnu_ifunc.
9612         (minsym_found): Handle mst_data_gnu_ifunc.
9613         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9614         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9615         * parse.c (find_minsym_type_and_address): Handle
9616         mst_data_gnu_ifunc.
9617         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9618         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9619         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9620         comment.
9621         <mst_data_gnu_ifunc>: New enumerator.
9622
9623 2018-04-26  Pedro Alves  <palves@redhat.com>
9624
9625         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9626         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
9627         'want_trampoline' parameter by a lookup_msym_prefer parameter.
9628         Handle it.
9629         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9630         (lookup_minimal_symbol_by_pc): Adjust.
9631         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9632         (lookup_solib_trampoline_symbol_by_pc): Adjust.
9633         * minsyms.h (lookup_msym_prefer): New enum.
9634         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9635         parameter by a lookup_msym_prefer parameter.
9636
9637 2018-04-26  Pedro Alves  <palves@redhat.com>
9638
9639         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9640         ends in "@plt" instead of looking at the symbol's section.
9641
9642 2018-04-26  Pedro Alves  <palves@redhat.com>
9643
9644         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
9645         all references.
9646         (find_pc_partial_function_gnu_ifunc): Rename to ...
9647         (find_pc_partial_function): ... this, and remove references to
9648         'is_gnu_ifunc_p'.
9649         (find_pc_partial_function): Delete old implementation.
9650         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9651
9652 2018-04-26  Pedro Alves  <palves@redhat.com>
9653
9654         * linespec.c (struct bound_minimal_symbol_search_key): New.
9655         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
9656         skip first line if we found a GNU ifunc minimal symbol by name.
9657         (compare_msymbols): Change parameters to work with a destructured
9658         lhs minsym.
9659         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9660         functions.
9661
9662 2018-04-26  Pedro Alves  <palves@redhat.com>
9663
9664         * breakpoint.c (set_breakpoint_location_function): Don't resolve
9665         ifunc targets here.  Instead, if we have an ifunc minsym, use its
9666         address/name.
9667         (add_location_to_breakpoint): Store the minsym and the objfile in
9668         the breakpoint location.
9669         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9670         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9671         Record the minsym in the sal.
9672         * symtab.h (symtab_and_line) <msymbol>: New field.
9673
9674 2018-04-26  Pedro Alves  <palves@redhat.com>
9675
9676         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9677         unless we actually resolved the ifunc.
9678
9679 2018-04-26  Pedro Alves  <palves@redhat.com>
9680
9681         * c-exp.y (variable production): Prefer ifunc minsyms over
9682         regular function symbols.
9683         * symtab.c (find_gnu_ifunc): New function.
9684         * minsyms.h (lookup_msym_prefer): New enum.
9685         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9686         parameter by a lookup_msym_prefer parameter.
9687         * symtab.h (find_gnu_ifunc): New declaration.
9688
9689 2018-04-26  Pedro Alves  <palves@redhat.com>
9690
9691         * blockframe.c (find_gnu_ifunc_target_type): New function.
9692         (find_function_type): New.
9693         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9694         return a value with a memory address.
9695         (eval_call): For calls to GNU ifunc functions, try to find the
9696         type of the target function from the type that the resolver
9697         returns.
9698         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9699         symbols.
9700         * infcall.c (find_function_return_type): Delete.
9701         (find_function_addr): Add 'function_type' parameter.  For calls to
9702         GNU ifunc functions, try to find the type of the target function
9703         from the type that the resolver returns, and return it via
9704         FUNCTION_TYPE.
9705         (call_function_by_hand_dummy): Adjust to use the function type
9706         returned by find_function_addr.
9707         (find_function_addr): Add 'function_type' parameter and move
9708         description here.
9709         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9710         declarations.
9711
9712 2018-04-26  Pedro Alves  <palves@redhat.com>
9713
9714         * c-exp.y (variable production): Skip finding an alias for ifunc
9715         symbols.
9716
9717 2018-04-26  Pedro Alves  <palves@redhat.com>
9718
9719         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9720
9721 2018-04-25  Pedro Alves  <palves@redhat.com>
9722
9723         * infcmd.c (kill_command): Print the pid as string, not the whole
9724         thread's ptid.  Add comment.  s/has been killed/killed/ in output
9725         message.
9726         * remote.c (remote_detach_1): Print the pid as string, not the
9727         whole thread's ptid.
9728
9729 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9730             Sergio Durigan Junior  <sergiodj@redhat.com>
9731             Pedro Alves  <palves@redhat.com>
9732
9733         * infcmd.c (kill_command): Print message when inferior has
9734         been killed.
9735         * inferior.c (print_inferior_events): Remove 'static'.  Set as
9736         '1'.
9737         (add_inferior): Improve message printed when
9738         'print_inferior_events' is on.
9739         (exit_inferior): Remove message printed when
9740         'print_inferior_events' is on.
9741         (detach_inferior): Improve message printed when
9742         'print_inferior_events' is on.
9743         (initialize_inferiors): Use 'add_inferior_silent' to set
9744         'current_inferior_'.
9745         * inferior.h (print_inferior_events): Declare here as
9746         'extern'.
9747         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9748         '[Detaching...]' messages when 'print_inferior_events' is on.
9749         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
9750         as prefix/suffix for messages.  Remove periods.  Fix erroneous
9751         'Detaching after fork from child...', replace it by '... from
9752         parent...'.
9753         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9754         prefix/suffix when printing 'Detaching...' messages.  Print
9755         them when 'print_inferior_events' is on.
9756         * remote.c (remote_detach_1): Print message when detaching
9757         from inferior and '!is_fork_parent'.
9758
9759 2018-04-24  Tom Tromey  <tom@tromey.com>
9760
9761         * cli-out.h: Reindent.
9762
9763 2018-04-24  Tom Tromey  <tom@tromey.com>
9764
9765         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9766         (cli_ui_out::do_field_string): Use fputs_filtered.
9767         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9768
9769 2018-04-23  Tom Tromey  <tom@tromey.com>
9770
9771         * guile/scm-frame.c (gdbscm_frame_read_var): Use
9772         gdb::unique_xmalloc_ptr.
9773
9774 2018-04-23  Tom Tromey  <tom@tromey.com>
9775
9776         * configure: Rebuild.
9777
9778 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
9779
9780         PR gdb/23095
9781         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9782         prepare_for_testing.  Set normal_bp to r_debug_state if target
9783         is bsd.
9784
9785 2018-04-21  Pedro Alves  <palves@redhat.com>
9786             Rajendra SY  <rajendra.sy@gmail.com>
9787
9788         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9789         * remote.c (extended_remote_attach): In all-stop mode, mark the
9790         thread as executing.
9791
9792 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9793
9794         * thread.c (thread_apply_all_command): Fix comment.
9795         (thread_command): Fix comment.
9796
9797 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
9798
9799         * common/tdesc.h (tdesc_create_feature): Remove xml filename
9800         parameter.
9801         * features/aarch64-core.c (create_feature_aarch64_core):
9802         Regenerate.
9803         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9804         Likewise.
9805         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9806         Likewise.
9807         * features/i386/32bit-avx512.c
9808         (create_feature_i386_32bit_avx512): Likewise.
9809         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9810         Likewise.
9811         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9812         Likewise.
9813         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9814         Likewise.
9815         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9816         Likewise.
9817         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9818         Likewise.
9819         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9820         Likewise.
9821         * features/i386/64bit-avx512.c
9822         (create_feature_i386_64bit_avx512): Likewise.
9823         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9824         Likewise.
9825         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9826         Likewise.
9827         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9828         Likewise.
9829         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9830         Likewise.
9831         * features/i386/64bit-segments.c
9832         (create_feature_i386_64bit_segments): Likewise.
9833         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9834         Likewise.
9835         * features/i386/x32-core.c
9836         (create_feature_i386_x32_core): Likewise.
9837         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9838         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9839         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9840         * target-descriptions.c: In generated code, don't pass xml
9841         filename.
9842
9843 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9844
9845         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9846         (print_xml_feature::visit_post): Likewise.
9847         (print_xml_feature::visit): Likewise.
9848         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9849         (print_xml_feature): Add new class.
9850         * regformats/regdat.sh: Null xmltarget on feature targets.
9851         * target-descriptions.c (struct target_desc): Add xmltarget.
9852         (maintenance_check_tdesc_xml_convert): Add unittest function.
9853         (tdesc_get_features_xml): Add function to get xml.
9854         (maintenance_check_xml_descriptions): Test xml generation.
9855         * xml-tdesc.c (string_read_description_xml): Add function.
9856         * xml-tdesc.h (string_read_description_xml): Add declaration.
9857
9858 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9859
9860         * features/Makefile: Add feature marker to targets with new style
9861         target descriptions.
9862         * regformats/aarch64.dat: Regenerate.
9863         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9864         * regformats/i386/amd64-avx-linux.dat: Likewise.
9865         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9866         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9867         * regformats/i386/amd64-linux.dat: Likewise.
9868         * regformats/i386/amd64-mpx-linux.dat: Likewise.
9869         * regformats/i386/amd64.dat: Likewise.
9870         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9871         * regformats/i386/i386-avx-linux.dat: Likewise.
9872         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9873         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9874         * regformats/i386/i386-linux.dat: Likewise.
9875         * regformats/i386/i386-mmx-linux.dat: Likewise.
9876         * regformats/i386/i386-mpx-linux.dat: Likewise.
9877         * regformats/i386/i386.dat: Likewise.
9878         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9879         * regformats/i386/x32-avx-linux.dat: Likewise.
9880         * regformats/i386/x32-linux.dat: Likewise.
9881         * regformats/tic6x-c62x-linux.dat: Likewise.
9882         * regformats/tic6x-c64x-linux.dat: Likewise.
9883         * regformats/tic6x-c64xp-linux.dat: Likewise.
9884         * regformats/regdat.sh: Parse feature marker.
9885
9886 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9887
9888         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9889         (tdesc_osabi_name): Likewise.
9890         * target-descriptions.c (tdesc_architecture_name): Add new
9891         function.
9892         (tdesc_osabi_name): Likewise.
9893
9894 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9895
9896         * common/tdesc.c (tdesc_predefined_type): Move to here.
9897         (tdesc_named_type): Likewise.
9898         (tdesc_create_vector): Likewise.
9899         (tdesc_create_struct): Likewise.
9900         (tdesc_set_struct_size): Likewise.
9901         (tdesc_create_union): Likewise.
9902         (tdesc_create_flags): Likewise.
9903         (tdesc_create_enum): Likewise.
9904         (tdesc_add_field): Likewise.
9905         (tdesc_add_typed_bitfield): Likewise.
9906         (tdesc_add_bitfield): Likewise.
9907         (tdesc_add_flag): Likewise.
9908         (tdesc_add_enum_value): Likewise.
9909         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9910         (struct tdesc_type_vector): Likewise.
9911         (struct tdesc_type_field): Likewise.
9912         (struct tdesc_type_with_fields): Likewise.
9913         (tdesc_create_enum): Add declaration.
9914         (tdesc_add_typed_bitfield): Likewise.
9915         (tdesc_add_enum_value): Likewise.
9916         * target-descriptions.c (tdesc_type_field): Move from here.
9917         (tdesc_type_builtin): Likewise.
9918         (tdesc_type_vector): Likewise.
9919         (tdesc_type_with_fields): Likewise.
9920         (tdesc_predefined_types): Likewise.
9921         (tdesc_named_type): Likewise.
9922         (tdesc_create_vector): Likewise.
9923         (tdesc_create_struct): Likewise.
9924         (tdesc_set_struct_size): Likewise.
9925         (tdesc_create_union): Likewise.
9926         (tdesc_create_flags): Likewise.
9927         (tdesc_create_enum): Likewise.
9928         (tdesc_add_field): Likewise.
9929         (tdesc_add_typed_bitfield): Likewise.
9930         (tdesc_add_bitfield): Likewise.
9931         (tdesc_add_flag): Likewise.
9932         (tdesc_add_enum_value): Likewise.
9933         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
9934         (tdesc_add_typed_bitfield): Likewise.
9935         (tdesc_add_enum_value): Likewise.
9936
9937 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9938
9939         * common/tdesc.c (tdesc_feature::accept): Move to here.
9940         (tdesc_feature::operator==): Likewise.
9941         (tdesc_create_reg): Likewise.
9942         * common/tdesc.h (tdesc_type_kind): Likewise.
9943         (struct tdesc_type): Likewise.
9944         (struct tdesc_feature): Likewise.
9945         * regformats/regdat.sh: Create a feature.
9946         * target-descriptions.c (tdesc_type_kind): Move from here.
9947         (tdesc_type): Likewise.
9948         (tdesc_type_up): Likewise.
9949         (tdesc_feature): Likewise.
9950         (tdesc_create_reg): Likewise.
9951
9952 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9953
9954         * Makefile.in: Add arch/tdesc.c
9955         * common/tdesc.c: New file.
9956         * common/tdesc.h (tdesc_element_visitor): Move to here.
9957         (tdesc_element): Likewise.
9958         (tdesc_reg): Likewise.
9959         (tdesc_reg_up): Likewise.
9960         * regformats/regdef.h (reg): Add offset to constructors.
9961         * target-descriptions.c (tdesc_element_visitor): Move from here.
9962         (tdesc_element): Likewise.
9963         (tdesc_reg): Likewise.
9964         (tdesc_reg_up): Likewise.
9965
9966 2018-04-17  Tom Tromey  <tom@tromey.com>
9967
9968         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
9969         discriminant field.
9970
9971 2018-04-17  Tom Tromey  <tom@tromey.com>
9972
9973         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
9974
9975 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9976
9977         * symtab.c (print_symbol_info): Skip printing filename and line
9978         number when `last' is NULL.
9979         (symtab_symbol_info): Use empty string instead of NULL for first
9980         invocation of print_symbol_info.
9981         (rbreak_command): Pass NULL to `last' parameter of
9982         print_symbol_info.
9983
9984 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
9985
9986         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
9987         instead of nullptr.
9988
9989 2018-04-16  Pedro Alves  <palves@redhat.com>
9990
9991         * MAINTAINERS (sh): Remove.
9992         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
9993         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
9994         (ALLDEPFILES): Remove sh64-tdep.c.
9995         * NEWS: Mentions that support for SH-5/SH64 is removed.
9996         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
9997         (sh*-*-openbsd*): Ditto.
9998         (sh64-*-elf*): Remove.
9999         (sh*): Remove.
10000         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10001         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10002         * sh-tdep.c: No longer include "sh64-tdep.h".
10003         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10004         * sh64-tdep.c, sh64-tdep.h: Remove files.
10005
10006 2018-04-16  Pedro Alves  <palves@redhat.com>
10007
10008         * MAINTAINERS: Remove m88k.
10009         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10010         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10011         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10012         * NEWS: Mention that support for m88k was removed.
10013         * configure.host (m88*-*-*): Remove support.
10014         * configure.nat (m88k-*-*): Remove support.
10015         * configure.tgt (m88*-*-openbsd*): Remove.
10016         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10017
10018 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
10019
10020         * configure.tgt (x86_tobjs): New variable.
10021         (amd64_tobjs, i386_tobjs): Use it.
10022
10023 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10024
10025         * symtab.c (print_symbol_info): Precede the symbol definition by
10026         the line number when available.
10027         * NEWS: Advertise this enhancement.
10028
10029 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10030
10031         * NEWS (New options): announce set/show record btrace cpu.
10032         * btrace.c: Include record-btrace.h.
10033         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10034         the vendor is unknown.
10035         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
10036         Maybe overwrite the btrace configuration's cpu.
10037         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
10038         (btrace_fetch): Add cpu parameter.  Update callers.
10039         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10040         Maybe overwrite the btrace configuration's cpu.  Skip enabling
10041         errata workarounds if the vendor is unknown.
10042         * python/py-record-btrace.c: Include record-btrace.h.
10043         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10044         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10045         * record-btrace.c (record_btrace_cpu_state_kind): New.
10046         (record_btrace_cpu): New.
10047         (set_record_btrace_cpu_cmdlist): New.
10048         (record_btrace_get_cpu): New.
10049         (require_btrace_thread, record_btrace_info)
10050         (record_btrace_resume_thread): Call record_btrace_get_cpu.
10051         (cmd_set_record_btrace_cpu_none): New.
10052         (cmd_set_record_btrace_cpu_auto): New.
10053         (cmd_set_record_btrace_cpu): New.
10054         (cmd_show_record_btrace_cpu): New.
10055         (_initialize_record_btrace): Initialize set/show record btrace cpu
10056         commands.
10057         * record-btrace.h (record_btrace_get_cpu): New.
10058
10059 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10060
10061         * record.c (set_record_command): Fix typo in message.
10062
10063 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10064
10065         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10066
10067 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10068
10069         * infrun.c (process_event_stop_test): Call
10070         gdbarch_in_indirect_branch_thunk.
10071         * gdbarch.sh (in_indirect_branch_thunk): New.
10072         * gdbarch.c: Regenerated.
10073         * gdbarch.h: Regenerated.
10074         * x86-tdep.h: New.
10075         * x86-tdep.c: New.
10076         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10077         (HFILES_NO_SRCDIR): Add x86-tdep.h.
10078         (ALLDEPFILES): Add x86-tdep.c.
10079         * arch-utils.h (default_in_indirect_branch_thunk): New.
10080         * arch-utils.c (default_in_indirect_branch_thunk): New.
10081         * i386-tdep: Include x86-tdep.h.
10082         (i386_in_indirect_branch_thunk): New.
10083         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10084         function.
10085         * amd64-tdep: Include x86-tdep.h.
10086         (amd64_in_indirect_branch_thunk): New.
10087         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10088
10089 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
10090
10091         PR gdb/23053
10092         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10093         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10094         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10095         regression.
10096
10097 2018-04-12  Tom Tromey  <tom@tromey.com>
10098
10099         * rust-lang.c (rust_print_struct_def): Remove univariant code.
10100         (rust_evaluate_subexp): Likewise.
10101
10102 2018-04-12  Pedro Alves  <palves@redhat.com>
10103
10104         * procfs.c (procfs_detach): Make forward declaration's prototype
10105         match definition's protototype.
10106         (proc_get_LDT_entry): Remove stale do_cleanups call.
10107
10108 2018-04-12  Pedro Alves  <palves@redhat.com>
10109
10110         * target.h (target_ops::to_has_exited): Delete.
10111         (target_has_exited): Delete.
10112         * target-delegates.c: Regenerate.
10113
10114 2018-04-11  Pedro Alves  <palves@redhat.com>
10115
10116         * target.c (fileio_fh_t::t): Add comment.
10117         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10118         (target_fileio_close): Handle a NULL target.
10119         (invalidate_fileio_fh): New.
10120         (target_close): Call it.
10121         * remote.c (remote_hostio_send_command): No longer check whether
10122         remote_desc is open.
10123
10124 2018-04-11  Pedro Alves  <palves@redhat.com>
10125
10126         * target.c (fileio_fh_t): Make it a named struct instead of a
10127         typedef.
10128         (fileio_fh_t::is_closed): New method.
10129         (DEF_VEC_O (fileio_fh_t)): Remove.
10130         (fileio_fhandles): Now a std::vector.
10131         (is_closed_fileio_fh): Delete.
10132         (acquire_fileio_fd): Adjust.  Rename parameters.
10133         (release_fileio_fd): Adjust.
10134         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10135         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10136         (target_fileio_close): Adjust.
10137
10138 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
10139
10140         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10141         index.
10142
10143 2018-04-10  Pedro Alves  <palves@redhat.com>
10144
10145         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10146         (scoped_finish_thread_state): New class.
10147         * infcmd.c (run_command_1): Use it instead of finish_thread_state
10148         cleanup.
10149         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10150         (fetch_inferior_event, normal_stop): Likewise.
10151         * thread.c (finish_thread_state_cleanup): Delete.
10152
10153 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10154             Pedro Alves  <palves@redhat.com>
10155
10156         * value.c: Include "selftest.h" and "common/array-view.h".
10157         (struct range) <operator ==>: New.
10158         (test_ranges_contain): New.
10159         (check_ranges_vector): New.
10160         (test_insert_into_bit_range_vector): New.
10161         (_initialize_values): Register selftests.
10162         * common/array-view.h (operator==, operator!=): New.
10163
10164 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10165
10166         * common/gdb_vecs.h (unordered_remove): Add overload that takes
10167         an iterator.
10168         * inline-frame.c: Include <algorithm>.
10169         (struct inline_state): Add constructor.
10170         (inline_state_s): Remove.
10171         (DEF_VEC_O(inline_state_s)): Remove.
10172         (inline_states): Change type to std::vector.
10173         (find_inline_frame_state): Adjust to std::vector.
10174         (allocate_inline_frame_state): Remove.
10175         (clear_inline_frame_state): Adjust to std::vector.
10176         (skip_inline_frames): Adjust to std::vector.
10177
10178 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10179
10180         * tracepoint.h (struct trace_state_variable): Add constructor.
10181         <name>: Change type to std::string.
10182         * tracepoint.c (tsv_s): Remove.
10183         (DEF_VEC_O(tsv_s)): Remove.
10184         (tvariables): Change to std::vector.
10185         (create_trace_state_variable): Adjust to std::vector.
10186         (find_trace_state_variable): Likewise.
10187         (find_trace_state_variable_by_number): Likewise.
10188         (delete_trace_state_variable): Likewise.
10189         (trace_variable_command): Adjust to std::string.
10190         (delete_trace_variable_command): Likewise.
10191         (tvariables_info_1): Adjust to std::vector.
10192         (save_trace_state_variables): Likewise.
10193         (start_tracing): Likewise.
10194         (merge_uploaded_trace_state_variables): Adjust to std::vector
10195         and std::string.
10196         * target.h (struct target_ops)
10197         <to_download_trace_state_variable>: Pass reference to
10198         trace_state_variable.
10199         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10200         * target-delegates.c: Re-generate.
10201         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10202         (mi_tsv_deleted): Likewise.
10203         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10204         * remote.c (remote_download_trace_state_variable): Change
10205         pointer to reference and adjust.
10206         * make-target-delegates (parse_argtypes): Handle references.
10207         (write_function_header): Likewise.
10208         (munge_type): Likewise.
10209
10210 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10211
10212         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10213         string_view-selftests.c.
10214         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10215         testsuite.
10216         * unittests/basic_string_view/cons/char/1.cc: Likewise.
10217         * unittests/basic_string_view/cons/char/2.cc: Likewise.
10218         * unittests/basic_string_view/cons/char/3.cc: Likewise.
10219         * unittests/basic_string_view/element_access/char/1.cc:
10220         Likewise.
10221         * unittests/basic_string_view/element_access/char/empty.cc:
10222         Likewise.
10223         * unittests/basic_string_view/element_access/char/front_back.cc:
10224         Likewise.
10225         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10226         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10227         Likewise.
10228         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10229         Likewise.
10230         * unittests/basic_string_view/modifiers/swap/char/1.cc:
10231         Likewise.
10232         * unittests/basic_string_view/operations/compare/char/1.cc:
10233         Likewise.
10234         * unittests/basic_string_view/operations/compare/char/13650.cc:
10235         Likewise.
10236         * unittests/basic_string_view/operations/copy/char/1.cc:
10237         Likewise.
10238         * unittests/basic_string_view/operations/data/char/1.cc:
10239         Likewise.
10240         * unittests/basic_string_view/operations/find/char/1.cc:
10241         Likewise.
10242         * unittests/basic_string_view/operations/find/char/2.cc:
10243         Likewise.
10244         * unittests/basic_string_view/operations/find/char/3.cc:
10245         Likewise.
10246         * unittests/basic_string_view/operations/find/char/4.cc:
10247         Likewise.
10248         * unittests/basic_string_view/operations/rfind/char/1.cc:
10249         Likewise.
10250         * unittests/basic_string_view/operations/rfind/char/2.cc:
10251         Likewise.
10252         * unittests/basic_string_view/operations/rfind/char/3.cc:
10253         Likewise.
10254         * unittests/basic_string_view/operations/substr/char/1.cc:
10255         Likewise.
10256         * unittests/basic_string_view/operators/char/2.cc: Likewise.
10257         * unittests/string_view-selftests.c: New file.
10258
10259 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10260
10261         * unittests/basic_string_view/capacity/1.cc: New file.
10262         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10263         * unittests/basic_string_view/cons/char/1.cc: New file.
10264         * unittests/basic_string_view/cons/char/2.cc: New file.
10265         * unittests/basic_string_view/cons/char/3.cc: New file.
10266         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10267         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10268         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10269         * unittests/basic_string_view/element_access/char/1.cc: New file.
10270         * unittests/basic_string_view/element_access/char/2.cc: New file.
10271         * unittests/basic_string_view/element_access/char/empty.cc: New file.
10272         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10273         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10274         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10275         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10276         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10277         * unittests/basic_string_view/include.cc: New file.
10278         * unittests/basic_string_view/inserters/char/1.cc: New file.
10279         * unittests/basic_string_view/inserters/char/2.cc: New file.
10280         * unittests/basic_string_view/inserters/char/3.cc: New file.
10281         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10282         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10283         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10284         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10285         * unittests/basic_string_view/literals/types.cc: New file.
10286         * unittests/basic_string_view/literals/values.cc: New file.
10287         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10288         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10289         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10290         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10291         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10292         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10293         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10294         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10295         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10296         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10297         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10298         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10299         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10300         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10301         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10302         * unittests/basic_string_view/operations/data/char/1.cc: New file.
10303         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10304         * unittests/basic_string_view/operations/find/char/1.cc: New file.
10305         * unittests/basic_string_view/operations/find/char/2.cc: New file.
10306         * unittests/basic_string_view/operations/find/char/3.cc: New file.
10307         * unittests/basic_string_view/operations/find/char/4.cc: New file.
10308         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10309         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10310         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10311         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10312         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10313         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10314         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10315         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10316         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10317         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10318         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10319         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10320         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10321         * unittests/basic_string_view/operators/char/2.cc: New file.
10322         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10323         * unittests/basic_string_view/range_access/char/1.cc: New file.
10324         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10325         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10326         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10327         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10328         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10329         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10330         * unittests/basic_string_view/requirements/typedefs.cc: New file.
10331         * unittests/basic_string_view/typedefs.cc: New file.
10332         * unittests/basic_string_view/types/1.cc: New file.
10333
10334 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10335
10336         * common/gdb_string_view.h: Remove libstdc++ implementation
10337         details, adjust to gdb reality.
10338         * common/gdb_string_view.tcc: Likewise.
10339         * cli/cli-script.c (struct string_view): Remove.
10340         (user_args) <m_args>: Change element type to gdb::string_view.
10341         (user_args::insert_args): Adjust.
10342
10343 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10344
10345         * common/gdb_string_view.h: New file.
10346         * common/gdb_string_view.tcc: New file.
10347
10348 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10349
10350         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10351         * configure: Re-generate.
10352
10353 2018-04-09  Pedro Alves  <palves@redhat.com>
10354
10355         * gdbarch.sh: Include "observable.h" instead of "observer.h".
10356         (set_target_gdbarch): Call
10357         gdb::observers::architecture_changed.notify instead of
10358         observer_notify_architecture_changed.
10359
10360 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10361
10362         * tracepoint.c (struct current_traceframe_cleanup): Remove.
10363         (do_restore_current_traceframe_cleanup): Remove.
10364         (restore_current_traceframe_cleanup_dtor): Remove.
10365         (make_cleanup_restore_current_traceframe): Remove.
10366         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10367         New.
10368         * tracepoint.h (struct scoped_restore_current_traceframe): New.
10369         * infrun.c (fetch_inferior_event): Use
10370         scoped_restore_current_traceframe.
10371
10372 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10373
10374         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10375         Remove.
10376         <n_allocated_type_units>: Remove.
10377         <all_type_units>: Change to std::vector.
10378         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10379         to std::vector change.
10380         (dwarf2_per_objfile::get_cutu): Likewise.
10381         (dwarf2_per_objfile::get_tu): Likewise.
10382         (create_signatured_type_table_from_index): Likewise.
10383         (create_signatured_type_table_from_debug_names): Likewise.
10384         (dw2_symtab_iter_next): Likewise.
10385         (dw2_print_stats): Likewise.
10386         (dw2_expand_all_symtabs): Likewise.
10387         (dw2_expand_marked_cus): Likewise.
10388         (dw2_debug_names_iterator::next): Likewise.
10389         (dwarf2_initialize_objfile): Likewise.
10390         (add_signatured_type_cu_to_table): Likewise.
10391         (create_all_type_units): Likewise.
10392         (add_type_unit): Likewise.
10393         (struct tu_abbrev_offset): Add constructor.
10394         (build_type_psymtabs_1): Adjust to std::vector change.
10395         (print_tu_stats): Likewise.
10396         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10397         (write_debug_names): Likewise.
10398
10399 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10400
10401         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10402         Make an std::vector.
10403         <n_comp_units>: Remove.
10404         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10405         to std::vector change.
10406         (dwarf2_per_objfile::get_cutu): Likewise.
10407         (dwarf2_per_objfile::get_cu): Likewise.
10408         (create_cus_from_index): Likewise.
10409         (create_addrmap_from_index): Likewise.
10410         (create_addrmap_from_aranges): Likewise.
10411         (dwarf2_read_index): Likewise.
10412         (dw2_find_last_source_symtab): Likewise.
10413         (dw2_map_symtabs_matching_filename): Likewise.
10414         (dw2_symtab_iter_next): Likewise.
10415         (dw2_print_stats): Likewise.
10416         (dw2_expand_all_symtabs): Likewise.
10417         (dw2_expand_symtabs_with_fullname): Likewise.
10418         (dw2_expand_marked_cus): Likewise.
10419         (dw2_map_symbol_filenames): Likewise.
10420         (create_cus_from_debug_names): Likewise.
10421         (dwarf2_read_debug_names): Likewise.
10422         (dw2_debug_names_iterator::next): Likewise.
10423         (dwarf2_initialize_objfile): Likewise.
10424         (set_partial_user): Likewise.
10425         (dwarf2_build_psymtabs_hard): Likewise.
10426         (read_comp_units_from_section): Remove arguments, adjust to
10427         std::vector change.
10428         (create_all_comp_units): Adjust to std::vector and
10429         read_comp_units_from_section changes.
10430         (dwarf2_find_containing_comp_unit): Adjust to std::vector
10431         change.
10432         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10433         (psyms_seen_size): Likewise.
10434         (write_gdbindex): Likewise.
10435         (write_debug_names): Likewise.
10436
10437 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10438
10439         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10440         with dwarf2_per_objfile.
10441         (create_cus_from_index): Likewise.
10442         (create_signatured_type_table_from_index): Likewise.
10443         (dwarf2_read_index): Likewise.
10444         (dwarf2_initialize_objfile): Likewise.
10445         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
10446         per_cu rather than get_dwarf2_per_objfile.
10447
10448 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10449
10450         * dwarf2read.h (struct signatured_type): Forward declare.
10451         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10452         New methods.
10453         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10454         (dw2_get_cutu): ...this.
10455         (dwarf2_per_objfile::get_cu): Rename from...
10456         (dw2_get_cu): ...this.
10457         (dwarf2_per_objfile::get_tu): New.
10458         (create_addrmap_from_index): Adjust.
10459         (create_addrmap_from_aranges): Adjust.
10460         (dw2_find_last_source_symtab): Adjust.
10461         (dw2_map_symtabs_matching_filename): Adjust.
10462         (dw2_symtab_iter_next): Adjust.
10463         (dw2_print_stats): Adjust.
10464         (dw2_expand_all_symtabs): Adjust.
10465         (dw2_expand_symtabs_with_fullname): Adjust.
10466         (dw2_expand_marked_cus): Adjust.
10467         (dw_expand_symtabs_matching_file_matcher): Adjust.
10468         (dw2_map_symbol_filenames): Adjust.
10469         (dw2_debug_names_iterator::next): Adjust.
10470         (dwarf2_initialize_objfile): Adjust.
10471         (set_partial_user): Adjust.
10472         (dwarf2_build_psymtabs_hard): Adjust.
10473
10474 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10475
10476         * dwarf2read.c (create_signatured_type_table_from_debug_names):
10477         Remove unused variables.
10478         (dw2_map_symtabs_matching_filename): Likewise.
10479         (dwarf2_record_block_ranges): Likewise.
10480         (dwarf2_read_addr_index): Likewise.
10481         (follow_die_offset): Likewise.
10482
10483 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10484
10485         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10486         to symbol_file_add_main.
10487
10488 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10489
10490         PR mi/22299
10491         * mi/mi-console.c (do_fputc_async_safe): New.
10492         (mi_console_file::write_async_safe): New.
10493         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10494         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10495         New.
10496         * ui-file.c (ui_file::putstrn): Adjust call to
10497         fputstrn_unfiltered.
10498         * utils.c (printchar): Replace do_fputs and do_fprintf
10499         parameters by do_fputc.
10500         (fputstr_filtered): Adjust call to printchar.
10501         (fputstr_unfiltered): Likewise.
10502         (fputstrn_filtered): Likewise.
10503         (fputstrn_unfiltered): Add do_fputc parameter, pass to
10504         printchar.
10505         * utils.h (do_fputc_ftype): New typedef.
10506         (fputstrn_unfiltered): Add do_fputc parameter.
10507
10508 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10509
10510         * regformats/i386/i386-avx.dat: Remove.
10511
10512 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10513
10514         PR gdb/22979
10515         * amd64-tdep.c (amd64_none_init_abi): New function.
10516         (amd64_x32_none_init_abi): New function.
10517         (_initialize_amd64_tdep): Register handlers for x86-64 and
10518         x64_32 with GDB_OSABI_NONE.
10519         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10520         GDB_OSABI_NONE osabi.
10521
10522 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10523
10524         PR gdb/22980
10525         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10526         GDB_OSABI_NONE.
10527         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10528         * osabi.c (gdb_osabi_names): Add "unknown" entry.
10529
10530 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10531
10532         * common/byte-vector.h (char_vector): New type.
10533         * target.h (target_read_alloc): Return
10534         gdb::optional<byte_vector>.
10535         (target_read_stralloc): Return gdb::optional<char_vector>.
10536         (target_get_osdata): Return gdb::optional<char_vector>.
10537         * target.c (target_read_alloc_1): Templatize.  Replacement
10538         manual memory management with vector.
10539         (target_read_alloc): Change return type, adjust.
10540         (target_read_stralloc): Change return type, adjust.
10541         (target_get_osdata): Change return type, adjust.
10542         * auxv.c (struct auxv_info) <length>: Remove.
10543         <data>: Change type to gdb::optional<byte_vector>.
10544         (auxv_inferior_data_cleanup): Free auxv_info with delete.
10545         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10546         (target_auxv_search): Adjust.
10547         (fprint_target_auxv): Adjust.
10548         * avr-tdep.c (avr_io_reg_read_command): Adjust.
10549         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10550         (linux_make_corefile_notes): Adjust.
10551         * osdata.c (get_osdata): Adjust.
10552         * remote.c (remote_get_threads_with_qxfer): Adjust.
10553         (remote_memory_map): Adjust.
10554         (remote_traceframe_info): Adjust.
10555         (btrace_read_config): Adjust.
10556         (remote_read_btrace): Adjust.
10557         (remote_pid_to_exec_file): Adjust.
10558         * solib-aix.c (solib_aix_get_library_list): Adjust.
10559         * solib-dsbt.c (decode_loadmap): Don't free buf.
10560         (dsbt_get_initial_loadmaps): Adjust.
10561         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10562         * solib-target.c (solib_target_current_sos): Adjust.
10563         * tracepoint.c (sdata_make_value): Adjust.
10564         * xml-support.c (xinclude_start_include): Adjust.
10565         (xml_fetch_content_from_file): Adjust.
10566         * xml-support.h (xml_fetch_another): Change return type.
10567         (xml_fetch_content_from_file): Change return type.
10568         * xml-syscall.c (xml_init_syscalls_info): Adjust.
10569         * xml-tdesc.c (file_read_description_xml): Adjust.
10570         (fetch_available_features_from_target): Change return type.
10571         (target_fetch_description_xml): Adjust.
10572         (target_read_description_xml): Adjust.
10573
10574 2018-04-06  Tom Tromey  <tom@tromey.com>
10575
10576         * value.c (~value): Update.
10577         (struct value) <contents>: Now unique_xmalloc_ptr.
10578         (value_contents_bits_eq, allocate_value_contents)
10579         (value_contents_raw, value_contents_all_raw)
10580         (value_contents_for_printing, value_contents_for_printing_const)
10581         (set_value_enclosing_type): Update.
10582
10583 2018-04-06  Tom Tromey  <tom@tromey.com>
10584
10585         * value.c (range_s): Remove typedef, VEC.
10586         (struct range): Add operator<.
10587         (range_lessthan): Remove.
10588         (ranges_contain): Change type.
10589         (~value): Update.
10590         (struct value) <unavailable, optimized_out>: Now std::vector.
10591         (value_entirely_available)
10592         (value_entirely_covered_by_range_vector)
10593         (value_entirely_unavailable, value_entirely_optimized_out):
10594         Update.
10595         (insert_into_bit_range_vector): Change argument type.
10596         (find_first_range_overlap): Likewise.
10597         (struct ranges_and_idx, value_contents_bits_eq)
10598         (require_not_optimized_out, require_available): Update.
10599         (ranges_copy_adjusted): Change argument types.
10600         (value_optimized_out, value_copy, value_fetch_lazy): Update.
10601
10602 2018-04-06  Tom Tromey  <tom@tromey.com>
10603
10604         * value.c (~value): Update.
10605         (struct value) <parent>: Now a value_ref_ptr.
10606         (value_parent, set_value_parent, value_address, value_copy):
10607         Update.
10608
10609 2018-04-06  Tom Tromey  <tom@tromey.com>
10610
10611         * value.c (struct value): Add constructor, destructor, and member
10612         initializers.
10613         (allocate_value_lazy, value_decref): Update.
10614
10615 2018-04-06  Tom Tromey  <tom@tromey.com>
10616
10617         * value.c (struct value) <released, next>: Remove.
10618         (all_values): Now a std::vector.
10619         (allocate_value_lazy): Update.
10620         (value_next): Remove.
10621         (value_mark, value_free_to_mark, release_value)
10622         (value_release_to_mark): Update.
10623
10624 2018-04-06  Tom Tromey  <tom@tromey.com>
10625
10626         * value.h (fetch_subexp_value, value_release_to_mark): Update.
10627         (free_value_chain): Remove.
10628         * value.c (free_value_chain): Remove.
10629         (value_release_to_mark): Return a std::vector.
10630         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10631         std::vector.
10632         (check_condition): Update.
10633         * eval.c (fetch_subexp_value): Change "val_chain" to a
10634         std::vector.
10635         * breakpoint.c (update_watchpoint): Update.
10636         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10637
10638 2018-04-06  Tom Tromey  <tom@tromey.com>
10639
10640         * value.h (free_all_values): Remove.
10641         * value.c (free_all_values): Remove.
10642
10643 2018-04-06  Tom Tromey  <tom@tromey.com>
10644
10645         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10646         (value_history_chain, value_history_count): Remove.
10647         (value_history): New global.
10648         (record_latest_value, access_value_history, show_values)
10649         (preserve_values): Update.
10650
10651 2018-04-06  Tom Tromey  <tom@tromey.com>
10652
10653         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10654         * varobj.c (varobj_set_display_format, varobj_set_value)
10655         (install_default_visualizer, construct_visualizer)
10656         (install_new_value, ~varobj, varobj_get_value_type)
10657         (my_value_of_variable, varobj_editable_p): Update.
10658         * c-varobj.c (c_describe_child, c_value_of_variable)
10659         (cplus_number_of_children, cplus_describe_child): Update.
10660         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10661         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10662         (ada_value_of_variable, ada_value_is_changeable_p): Update.
10663
10664 2018-04-06  Tom Tromey  <tom@tromey.com>
10665
10666         * printcmd.c (last_examine_address): Change type to
10667         value_ref_ptr.
10668         (do_examine, x_command): Update.
10669
10670 2018-04-06  Tom Tromey  <tom@tromey.com>
10671
10672         * value.c (release_value): Update.
10673         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10674         (struct bpstats) <val>: Now a value_ref_ptr.
10675         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10676         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10677         (~watchpoint, print_it_watchpoint, watch_command_1)
10678         (invalidate_bp_value_on_memory_change): Update.
10679
10680 2018-04-06  Tom Tromey  <tom@tromey.com>
10681
10682         * varobj.c (varobj_clear_saved_item)
10683         (update_dynamic_varobj_children, install_new_value, ~varobj):
10684         Update.
10685         * value.h (value_incref): Move declaration earlier.
10686         (value_decref): Rename from value_free.
10687         (struct value_ref_policy): New.
10688         (value_ref_ptr): New typedef.
10689         (struct value_deleter): Remove.
10690         (gdb_value_up): Remove typedef.
10691         (release_value): Change return type.
10692         (release_value_or_incref): Remove.
10693         * value.c (set_value_parent): Update.
10694         (value_incref): Change return type.
10695         (value_decref): Rename from value_free.
10696         (value_free_to_mark, free_all_values, free_value_chain): Update.
10697         (release_value): Return value_ref_ptr.
10698         (release_value_or_incref): Remove.
10699         (record_latest_value, set_internalvar, clear_internalvar):
10700         Update.
10701         * stack.c (info_frame_command): Don't call value_free.
10702         * python/py-value.c (valpy_dealloc, valpy_new)
10703         (value_to_value_object): Update.
10704         * printcmd.c (do_examine): Update.
10705         * opencl-lang.c (lval_func_free_closure): Update.
10706         * mi/mi-main.c (register_changed_p): Don't call value_free.
10707         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10708         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10709         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10710         value_free.
10711         * guile/scm-value.c (vlscm_free_value_smob)
10712         (vlscm_scm_from_value): Update.
10713         * frame.c (frame_register_unwind, frame_unwind_register_signed)
10714         (frame_unwind_register_unsigned, get_frame_register_bytes)
10715         (put_frame_register_bytes): Don't call value_free.
10716         * findvar.c (address_from_register): Don't call value_free.
10717         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10718         * dwarf2loc.c (entry_data_value_free_closure)
10719         (value_of_dwarf_reg_entry, free_pieced_value_closure)
10720         (dwarf2_evaluate_loc_desc_full): Update.
10721         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10722         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10723         (~watchpoint, watch_command_1)
10724         (invalidate_bp_value_on_memory_change): Update.
10725         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10726
10727 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
10728
10729         PR gdb/23022
10730         * warning.m4: Add -Wno-error=deprecated-register.
10731         * configure: Re-generate.
10732
10733 2018-04-05  Tom Tromey  <tom@tromey.com>
10734
10735         * linespec.h: Remove include of "vec.h".
10736
10737 2018-04-05  Tom Tromey  <tom@tromey.com>
10738
10739         * linespec.c (typep): Remove typedef.
10740         (find_methods, find_superclass_methods): Take a std::vector.
10741         (find_method): Use std::vector.
10742
10743 2018-04-05  Tom Tromey  <tom@tromey.com>
10744
10745         * utils.c (compare_strings): Remove.
10746         * utils.h (compare_strings): Remove.
10747         * objc-lang.h (find_imps): Update.
10748         * objc-lang.c (find_methods): Take a std::vector.
10749         (uniquify_strings, find_imps): Likewise.
10750         * linespec.c (find_methods): Take a std::vector.
10751         (decode_objc): Use std::vector.
10752         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10753         a std::vector.
10754         (find_method, find_function_symbols): Use std::vector.
10755
10756 2018-04-05  Tom Tromey  <tom@tromey.com>
10757
10758         * completer.c (completion_tracker::completion_tracker): Remove
10759         cast.
10760         (completion_tracker::discard_completions): Likewise.
10761         * breakpoint.c (ambiguous_names_p): Remove cast.
10762         * ada-lang.c (_initialize_ada_language): Remove cast.
10763         * utils.h (streq): Update.
10764         (streq_hash): Add new declaration.
10765         * utils.c (streq): Return bool.
10766         (streq_hash): New function.
10767
10768 2018-04-05  Tom Tromey  <tom@tromey.com>
10769
10770         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10771         Remove a string copy.
10772
10773 2018-04-05  Tom Tromey  <tom@tromey.com>
10774
10775         * linespec.c (filter_results): Use std::vector.
10776         (decode_line_2, decode_line_full): Update.
10777
10778 2018-04-05  Tom Tromey  <tom@tromey.com>
10779
10780         * linespec.c (canonical_to_fullform): Return std::string.
10781         (filter_results): Update.
10782         (struct decode_line_2_item): Add constructor.
10783         <fullform, displayform>: Now std::string.
10784         (decode_line_2_compare_items): Now a std::sort comparator.
10785         (decode_line_2): Update.
10786
10787 2018-04-05  Tom Tromey  <tom@tromey.com>
10788
10789         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10790         (unexpected_linespec_error): Update.
10791         (linespec_parse_basic, parse_linespec): Update.
10792
10793 2018-04-05  Tom Tromey  <tom@tromey.com>
10794
10795         * linespec.c (linespec_parse_basic): Reindent.
10796
10797 2018-04-05  Tom Tromey  <tom@tromey.com>
10798
10799         * minsyms.h (iterate_over_minimal_symbols): Update.
10800         * minsyms.c (iterate_over_minimal_symbols): Take a
10801         gdb::function_view.
10802         * linespec.c (struct collect_minsyms): Remove.
10803         (compare_msyms): Now a std::sort comparator.
10804         (add_minsym): Add parameters.
10805         (search_minsyms_for_name): Update.  Use std::vector.
10806
10807 2018-04-03  Tom Tromey  <tom@tromey.com>
10808
10809         * mipsread.c (read_alphacoff_dynamic_symtab): Use
10810         gdb::byte_vector.
10811
10812 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10813
10814         * MAINTAINERS (Write After Approval): Add Weimin Pan.
10815
10816 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10817
10818         PR gdb/16959
10819         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
10820         printing static type.
10821
10822 2018-04-01  Tom Tromey  <tom@tromey.com>
10823
10824         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10825         (rs6000_xfer_shared_libraries): Update.
10826
10827 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
10828
10829         * common/gdb_vecs.h (char_ptr): Remove.
10830         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10831
10832 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10833
10834         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10835         with std::vector.
10836         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10837
10838 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10839
10840         * tracepoint.h (struct uploaded_tp): Initialize fields.
10841         <actions, step_actions, cmd_strings>: Change type to
10842         std::vector<char *>.
10843         * tracepoint.c (get_uploaded_tp): Allocate with new.
10844         (free_uploaded_tps): Free with delete.
10845         (parse_tracepoint_definition): Adjust to std::vector change.
10846         * breakpoint.c (read_uploaded_action): Likewise.
10847         (create_tracepoint_from_upload): Likewise.
10848         * ctf.c (ctf_write_uploaded_tp): Likewise.
10849         (SET_ARRAY_FIELD): Likewise.
10850         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10851
10852 2018-03-30  Tom Tromey  <tom@tromey.com>
10853
10854         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
10855         std::unique_ptr.
10856         (svr4_keep_data_in_core): Update.
10857         (svr4_read_so_list): Update.
10858
10859 2018-03-30  Tom Tromey  <tom@tromey.com>
10860
10861         * windows-nat.c (handle_output_debug_string, handle_exception):
10862         Update.
10863         * target.h (target_read_string): Update.
10864         * target.c (target_read_string): Change "string" to
10865         unique_xmalloc_ptr.
10866         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10867         Update.
10868         * solib-frv.c (frv_current_sos): Update.
10869         * solib-dsbt.c (dsbt_current_sos): Update.
10870         * solib-darwin.c (darwin_current_sos): Update.
10871         * linux-thread-db.c (inferior_has_bug): Update.
10872         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10873         Update.  Remove alloca.
10874         * ada-lang.c (ada_main_name): Update.
10875
10876 2018-03-30  Tom Tromey  <tom@tromey.com>
10877
10878         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10879         (struct dwo_file_deleter): New.
10880         (dwo_file_up): New typedef.
10881         (open_and_init_dwo_file): Use dwo_file_up.
10882         (free_dwo_file_cleanup): Remove.
10883
10884 2018-03-30  Tom Tromey  <tom@tromey.com>
10885
10886         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10887         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10888
10889 2018-03-30  Tom Tromey  <tom@tromey.com>
10890
10891         * dwarf2read.c (class free_cached_comp_units): New class.
10892         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10893         (free_cached_comp_units): Remove function.
10894
10895 2018-03-30  Tom Tromey  <tom@tromey.com>
10896
10897         * utils.h (make_cleanup_unpush_target): Remove.
10898         * inf-ptrace.c (struct target_unpusher): New.
10899         (target_unpush_up) New typedef.
10900         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10901         target_unpush_up.
10902         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10903
10904 2018-03-27  Tom Tromey  <tom@tromey.com>
10905
10906         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10907
10908 2018-03-27  Pedro Alves  <palves@redhat.com>
10909             Tom Tromey  <tom@tromey.com>
10910
10911         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10912         destructor.  Now a class.
10913         (gdb_readline_wrapper_cleanup): Remove function.
10914         (gdb_readline_wrapper): Remove cleanups.
10915
10916 2018-03-27  Tom Tromey  <tom@tromey.com>
10917
10918         * typeprint.h (struct type_print_options) <local_typedefs,
10919         global_typedefs>: Remove "struct" keyword.
10920         (class typedef_hash_table): New class.
10921         (recursively_update_typedef_hash, add_template_parameters)
10922         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10923         (find_typedef_in_hash): Don't declare.
10924         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10925         (typedef_hash_table::recursively_update): Rename from
10926         recursively_update_typedef_hash.  Now a member.
10927         (typedef_hash_table::add_template_parameters): Rename from
10928         add_template_parameters.  Now a member.
10929         (typedef_hash_table::typedef_hash_table): Now a constructor;
10930         rename from create_typedef_hash.
10931         (typedef_hash_table::~typedef_hash_table): Now a destructor;
10932         rename from free_typedef_hash.
10933         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
10934         (do_free_global_table): Remove.
10935         (typedef_hash_table::typedef_hash_table): New constructor; renamed
10936         from copy_type_recursive.
10937         (create_global_typedef_table): Remove.
10938         (typedef_hash_table::find_global_typedef): Now a member of
10939         typedef_hash_table.
10940         (typedef_hash_table::find_typedef): Rename from
10941         find_typedef_in_hash; now a member.
10942         (whatis_exp): Update.
10943         * extension.h (struct ext_lang_type_printers): Add constructor and
10944         destructor.
10945         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
10946         declare.
10947         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
10948         Now a constructor; rename from start_ext_lang_type_printers.
10949         (ext_lang_type_printers): Now a destructor; rename from
10950         free_ext_lang_type_printers.
10951         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
10952         Update.
10953         (c_type_print_base_struct_union): Update.  Remove cleanups.
10954
10955 2018-03-27  Tom Tromey  <tom@tromey.com>
10956
10957         * dwarf-index-write.c: Include <cmath>.
10958
10959 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
10960
10961         * NEWS: Add entry describing new "set|show varsize-limit" command.
10962         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
10963         command.
10964         * printcmd.c (_initialize_printcmd): Add "set var" alias of
10965         "set variable".
10966
10967 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
10968
10969         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
10970         dwarf-index-write.c
10971         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
10972         * dwarf-index-common.c: New file.
10973         * dwarf-index-common.h: New file.
10974         * dwarf-index-write.c: New file.
10975         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
10976         (struct dwarf2_section_info): Move from here.
10977         (dwarf2_section_info_def): Likewise.
10978         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
10979         (offset_type): Likewise.
10980         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
10981         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
10982         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
10983         (byte_swap): Likewise.
10984         (MAYBE_SWAP): Likewise.
10985         (dwarf2_per_cu_ptr): Likewise.
10986         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
10987         (struct tu_stats): Likewise.
10988         (struct dwarf2_per_objfile): Likewise.
10989         (struct dwarf2_per_cu_data): Likewise.
10990         (struct signatured_type): Likewise.
10991         (sig_type_ptr): Likewise.
10992         (DEF_VEC_P (sig_type_ptr)): Likewise.
10993         (INDEX4_SUFFIX): Likewise.
10994         (INDEX5_SUFFIX): Likewise.
10995         (DEBUG_STR_SUFFIX): Likewise.
10996         (dwarf2_read_section): Make non-static.
10997         (mapped_index_string_hash): Move from here.
10998         (dwarf5_djb_hash): Likewise.
10999         (file_write): Likewise.
11000         (class data_buf): Likewise.
11001         (struct symtab_index_entry): Likewise.
11002         (struct mapped_symtab): Likewise.
11003         (find_slot): Likewise.
11004         (hash_expand): Likewise.
11005         (add_index_entry): Likewise.
11006         (uniquify_cu_indices): Likewise.
11007         (class c_str_view): Likewise.
11008         (class c_str_view_hasher): Likewise.
11009         (class vector_hasher): Likewise.
11010         (write_hash_table): Likewise.
11011         (psym_index_map): Likewise.
11012         (struct addrmap_index_data): Likewise.
11013         (add_address_entry): Likewise.
11014         (add_address_entry_worker): Likewise.
11015         (write_address_map): Likewise.
11016         (symbol_kind): Likewise.
11017         (write_psymbols): Likewise.
11018         (struct signatured_type_index_data): Likewise.
11019         (write_one_signatured_type): Likewise.
11020         (recursively_count_psymbols): Likewise.
11021         (recursively_write_psymbols): Likewise.
11022         (class debug_names): Likewise.
11023         (check_dwarf64_offsets): Likewise.
11024         (psyms_seen_size): Likewise.
11025         (write_gdbindex): Likewise.
11026         (write_debug_names): Likewise.
11027         (assert_file_size): Likewise.
11028         (write_psymtabs_to_index): Likewise.
11029         (save_gdb_index_command): Likewise.
11030         (_initialize_dwarf2_read): Don't register the "save gdb-index"
11031         command.
11032         * dwarf2read.h: New file.
11033
11034 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11035
11036         PR gdb/22670
11037         * dwarf2read.c (dwarf2_physname): Do not return the demangled
11038         symbol name if the CU's language stores symbol names in linkage
11039         format.
11040         * language.h (struct language_defn)
11041         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
11042         all instances of this struct.
11043
11044 2018-03-26  Tom Tromey  <tom@tromey.com>
11045
11046         * stack.c (backtrace_command_1): Remove verbose code.
11047
11048 2018-03-26  Tom Tromey  <tom@tromey.com>
11049
11050         * python/py-framefilter.c (py_print_type): Don't catch
11051         exceptions.  Return void.
11052         (py_print_value): Likewise.
11053         (py_print_single_arg): Likewise.
11054         (enumerate_args): Don't catch exceptions.
11055         (py_print_args): Likewise.
11056         (py_print_frame): Likewise.
11057         (gdbpy_apply_frame_filter): Catch exceptions here.
11058
11059 2018-03-26  Tom Tromey  <tom@tromey.com>
11060
11061         * stack.c (_initialize_stack): Remove trailing newlines from help
11062         text.  Add "Usage" line to "backtrace" help.
11063
11064 2018-03-26  Tom Tromey  <tom@tromey.com>
11065
11066         PR python/16486:
11067         * python/py-framefilter.c (py_print_args): Call wrap_hint.
11068
11069 2018-03-26  Tom Tromey  <tom@tromey.com>
11070
11071         * python/py-framefilter.c (py_print_single_arg): Return
11072         EXT_LANG_BT_ERROR from catch.
11073
11074 2018-03-26  Tom Tromey  <tom@tromey.com>
11075
11076         PR backtrace/15584:
11077         * stack.c (backtrace_command_1): Move some code into no-filters
11078         "if".
11079
11080 2018-03-26  Tom Tromey  <tom@tromey.com>
11081
11082         * python/py-framefilter.c (throw_quit_or_print_exception): New
11083         function.
11084         (gdbpy_apply_frame_filter): Use it.
11085
11086 2018-03-26  Tom Tromey  <tom@tromey.com>
11087
11088         PR cli/17716:
11089         * python/py-framefilter.c (py_print_type, py_print_value)
11090         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11091         RETURN_MASK_ERROR.
11092
11093 2018-03-26  Tom Tromey  <tom@tromey.com>
11094
11095         * python/py-framefilter.c (enumerate_args): Use
11096         gdb::unique_xmalloc_ptr.
11097
11098 2018-03-26  Tom Tromey  <tom@tromey.com>
11099
11100         * python/py-framefilter.c (py_print_frame): Return
11101         EXT_LANG_BT_OK.
11102         (gdbpy_apply_frame_filter): Update comment.
11103         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11104         Remove.
11105         <EXT_LANG_BT_NO_FILTERS>: Change value.
11106
11107 2018-03-26  Tom Tromey  <tom@tromey.com>
11108
11109         PR backtrace/15582:
11110         * stack.c (backtrace_command): Parse "hide" argument.
11111         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11112         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11113         constant.
11114
11115 2018-03-26  Tom Tromey  <tom@tromey.com>
11116
11117         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11118         add "flags".
11119         (backtrace_command): Remove "fulltrace", add "flags".
11120
11121 2018-03-26  Tom Tromey  <tom@tromey.com>
11122
11123         * stack.c (backtrace_command): Rewrite command line parsing.
11124
11125 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11126
11127         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11128
11129 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11130
11131         * filename-seen-cache.h: Add include guard.
11132
11133 2018-03-26  Keith Seitz  <keiths@redhat.com>
11134
11135         * symfile.c (place_section): Remove "struct" from section_addr_info
11136         in comment.
11137         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11138         "struct" keyword from section_addr_info.
11139
11140 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
11141
11142         * regformats/regdef.h (reg): Add constructors.
11143
11144 2018-03-25  Pedro Alves  <palves@redhat.com>
11145
11146         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11147         if then/else bodies in var_func_name extraction.
11148
11149 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
11150
11151         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11152         lookup_minimal_symbol() to find symbol entry.
11153         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11154
11155 2018-03-23  Keith Seitz  <keiths@redhat.com>
11156
11157         PR c++/22968
11158         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11159         nested type definitions for C++, too.
11160
11161 2018-03-23  Tom Tromey  <tom@tromey.com>
11162
11163         * machoread.c (struct oso_el): Add a constructor.  Don't define as
11164         a typedef.
11165         (macho_register_oso): Remove.
11166         (macho_symtab_read): Take a std::vector.
11167         (oso_el_compare_name): Now a std::sort comparator.
11168         (macho_symfile_read_all_oso): Take a std::vector.
11169         (macho_symfile_read): Use std::vector.  Remove cleanups.
11170
11171 2018-03-22  Tom Tromey  <tom@tromey.com>
11172
11173         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11174         (record_full_goto_bookmark): Use std::string.
11175
11176 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11177
11178         PR tdep/18295
11179         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11180         a single mask.
11181
11182 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11183
11184         * rs6000-tdep.c (store_insn_p): New function.
11185         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11186         and cr_reg to their unshifted values. Use store_insn_p to
11187         match LR saves using either R1 or fdata->alloca_reg. Use
11188         store_insn_p to match CR saves. Set alloca_reg_offset
11189         when alloca_reg and framep are set. Remove lr_reg shift
11190         when assigning to fdata->lr_register.
11191
11192 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11193
11194         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11195         command line args instead of emitting a warning.
11196
11197 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11198
11199         * tracepoint.h (struct static_tracepoint_marker): Initialize
11200         fields, define default constructor, move constructor and move
11201         assignment, disable the rest.
11202         <str_id, extra>: Make std::string.
11203         (release_static_tracepoint_marker): Remove.
11204         (free_current_marker): Remove.
11205         * tracepoint.c (free_current_marker): Remove.
11206         (parse_static_tracepoint_marker_definition): Adjust to
11207         std::string, use new hex2str overload.
11208         (release_static_tracepoint_marker): Remove.
11209         (print_one_static_tracepoint_marker): Get marker by reference
11210         and adjust to std::string.
11211         (info_static_tracepoint_markers_command): Adjust to std::vector
11212         changes
11213         * target.h (static_tracepoint_marker_p): Remove typedef.
11214         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11215         (struct target_ops) <to_static_tracepoint_marker_at>: Return
11216         bool.
11217         <to_static_tracepoint_markers_by_strid>: Return std::vector.
11218         * target-debug.h
11219         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11220         (target_debug_print_std_vector_static_tracepoint_marker): New.
11221         (target_debug_print_struct_static_tracepoint_marker_p): Rename
11222         to...
11223         (target_debug_print_static_tracepoint_marker_p): ... this.
11224         * target-delegates.c: Re-generate.
11225         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11226         Make std::string.
11227         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11228         (decode_static_tracepoint_spec): Adjust to std::vector.
11229         (tracepoint_print_one_detail): Adjust to std::string.
11230         (strace_marker_decode_location): Adjust to std::string.
11231         (update_static_tracepoint): Adjust to std::string, remove call
11232         to release_static_tracepoint_marker.
11233         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11234         Adjust to std::vector.
11235         * remote.c (remote_static_tracepoint_marker_at): Return bool.
11236         (remote_static_tracepoint_markers_by_strid): Adjust to
11237         std::vector.
11238         * common/rsp-low.h (hex2str): New overload with explicit count
11239         of bytes.
11240         * common/rsp-low.c (hex2str): New overload with explicit count
11241         of bytes.
11242         * unittests/rsp-low-selftests.c (test_hex2str): New function.
11243         (_initialize_rsp_low_selftests): Add test_hex2str test.
11244         * unittests/tracepoint-selftests.c
11245         (test_parse_static_tracepoint_marker_definition): Adjust to
11246         std::string.
11247
11248 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11249
11250         * tracepoint.c (parse_static_tracepoint_marker_definition):
11251         Consider case where the definition is followed by more
11252         definitions.
11253         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11254         tracepoint-selftests.c.
11255         * unittests/tracepoint-selftests.c: New.
11256
11257 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11258
11259         * MAINTAINERS (Write After Approval): Add Pedro Franco de
11260         Carvalho.
11261
11262 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11263
11264         * symtab.c (find_pc_sect_line): fixed indentation.
11265
11266 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11267
11268         * symtab.c (find_pc_sect_line): now uses binary search.
11269
11270 2018-03-19  Tom Tromey  <tom@tromey.com>
11271
11272         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11273         "IDENT" production.
11274
11275 2018-03-19  Pedro Alves  <palves@redhat.com>
11276             Tom Tromey  <tom@tromey.com>
11277
11278         * unittests/observable-selftests.c: New file.
11279         * common/observable.h: New file.
11280         * observable.h: New file.
11281         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11282         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11283         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11284         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11285         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11286         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11287         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11288         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11289         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11290         python/py-breakpoint.c, python/py-finishbreakpoint.c,
11291         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11292         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11293         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11294         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11295         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11296         tui/tui-interp.c, valops.c: Update all users.
11297         * tui/tui-hooks.c (tui_bp_created_observer)
11298         (tui_bp_deleted_observer, tui_bp_modified_observer)
11299         (tui_inferior_exit_observer, tui_before_prompt_observer)
11300         (tui_normal_stop_observer, tui_register_changed_observer):
11301         Remove.
11302         (tui_observers_token): New global.
11303         (attach_or_detach, tui_attach_detach_observers): New functions.
11304         (tui_install_hooks, tui_remove_hooks): Use
11305         tui_attach_detach_observers.
11306         * record-btrace.c (record_btrace_thread_observer): Remove.
11307         (record_btrace_thread_observer_token): New global.
11308         * observer.sh: Remove.
11309         * observer.c: Rename to observable.c.
11310         * observable.c (namespace gdb_observers): Define new objects.
11311         (observer_debug): Move into gdb_observers namespace.
11312         (struct observer, struct observer_list, xalloc_observer_list_node)
11313         (xfree_observer_list_node, generic_observer_attach)
11314         (generic_observer_detach, generic_observer_notify): Remove.
11315         (_initialize_observer): Update.
11316         Don't include observer.inc.
11317         * Makefile.in (generated_files): Remove observer.h, observer.inc.
11318         (clean mostlyclean): Likewise.
11319         (observer.h, observer.inc): Remove targets.
11320         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11321         (COMMON_SFILES): Use observable.c, not observer.c.
11322         * .gitignore: Remove observer.h.
11323
11324 2018-03-18  Tom Tromey  <tom@tromey.com>
11325
11326         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11327         gdb::def_vector.
11328         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11329
11330 2018-03-17  Tom Tromey  <tom@tromey.com>
11331
11332         * auto-load.c (auto_load_objfile_script_1): Use std::string.
11333
11334 2018-03-17  Tom Tromey  <tom@tromey.com>
11335
11336         * target.c (class scoped_target_fd): New.
11337         (target_fileio_close_cleanup): Remove.
11338         (target_fileio_read_alloc_1): Use scoped_target_fd.
11339
11340 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
11341
11342         * silent-rules.mk: New.
11343         * Makefile.in: Include silent-rules.mk
11344         (srcdir, VPATH, top_srcdir): Move up.
11345         (COMPILE): Add ECHO_CXX.
11346         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11347         (init.c): Add ECHO_INIT_C.
11348         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11349         (version.c): Add ECHO_GEN.
11350         (printcmd.o): Add ECHO_CXX.
11351         (target-float.o): Add ECHO_CXX.
11352         (ada-exp.o): Add ECHO_CXX.
11353         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11354         (insight$(EXEEXT)): Add ECHO_CXXLD.
11355         * gnulib/configure.ac: Add AM_SILENT_RULES.
11356         * gnulib/aclocal.m4: Re-generate.
11357         * gnulib/configure: Re-generate.
11358         * gnulib/import/Makefile.in: Re-generate.
11359
11360 2018-03-16  Tom Tromey  <tom@tromey.com>
11361
11362         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11363         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11364         * utils.c (do_free_section_addr_info)
11365         (make_cleanup_free_section_addr_info): Remove.
11366         * symfile.h (struct other_sections): Add constructor.
11367         (struct section_addr_info): Remove.
11368         (section_addr_info): New typedef.
11369         (struct sym_fns) <sym_offsets>: Change type of parameter.
11370         (build_section_addr_info_from_objfile)
11371         (relative_addr_info_to_section_offsets, addr_info_make_relative)
11372         (default_symfile_offsets, symbol_file_add)
11373         (symbol_file_add_from_bfd)
11374         (build_section_addr_info_from_section_table): Update.
11375         (alloc_section_addr_info, free_section_addr_info): Don't declare.
11376         * symfile.c (alloc_section_addr_info): Remove.
11377         (build_section_addr_info_from_section_table): Change return type.
11378         Update.
11379         (build_section_addr_info_from_bfd)
11380         (build_section_addr_info_from_objfile): Likewise.
11381         (free_section_addr_info): Remove.
11382         (relative_addr_info_to_section_offsets): Change type of "addrs".
11383         (addrs_section_compar): Now a std::sort comparator.
11384         (addrs_section_sort): Change return type.
11385         (addr_info_make_relative): Change type of "addrs".  Update.
11386         (default_symfile_offsets, syms_from_objfile_1)
11387         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11388         (symbol_file_add_separate): Update.
11389         (symbol_file_add): Change type of "addrs".  Update.
11390         (add_symbol_file_command): Update.  Remove cleanups.
11391         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
11392         cleanups.
11393         * symfile-debug.c (debug_sym_offsets): Change type of "info".
11394         * solib.c (solib_read_symbols): Update.
11395         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
11396         * machoread.c (macho_symfile_offsets): Update.
11397         * jit.c (jit_bfd_try_read_symtab): Update.
11398
11399 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
11400
11401         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11402         unittests/utils-selftests.c.
11403         * unittests/utils-selftests.c: New file.
11404
11405 2018-03-14  Tom Tromey  <tom@tromey.com>
11406
11407         PR cli/14977:
11408         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11409         for NULL.
11410
11411 2018-03-14  Tom Tromey  <tom@tromey.com>
11412
11413         PR cli/19918:
11414         * printcmd.c (printf_pointer): Allow "-" in format.
11415
11416 2018-03-14  Tom Tromey  <tom@tromey.com>
11417
11418         * printcmd.c (_initialize_printcmd): Add usage to printf.
11419
11420 2018-03-14  Yao Qi  <qiyao@sourceware.org>
11421
11422         * MAINTAINERS: Update my email address.
11423
11424 2018-03-13  Tom Tromey  <tom@tromey.com>
11425
11426         * machoread.c (macho_check_dsym): Change filenamep to a
11427         std::string*.
11428         (macho_symfile_read): Update.
11429         * symfile.c (load_command): Use std::string.
11430
11431 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11432
11433         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11434         to error message string.
11435         (riscv_register_name): Use xsnprintf instead of sprintf.
11436         (riscv_insn::fetch_instruction): Use gdb_assert instead of
11437         internal_error.
11438         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11439         error.
11440         (riscv_push_dummy_call): Likewise.
11441
11442 2018-03-12  Tom Tromey  <tom@tromey.com>
11443
11444         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11445         Use gdb::byte_vector.
11446         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11447
11448 2018-03-12  Yao Qi  <yao.qi@linaro.org>
11449
11450         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11451         parameter type to readable_regcache.
11452         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11453         the declaration.
11454
11455 2018-03-11  Tom Tromey  <tom@tromey.com>
11456
11457         * dwarf2read.c (struct nextfield): Add initializers.
11458         (struct nextfnfield): Remove.
11459         (struct fnfieldlist): Add initializers.  Remove "length" and
11460         "head", use std::vector.
11461         (struct decl_field_list): Remove.
11462         (struct field_info): Add initializers.
11463         <fields, baseclasses>: Now std::vector.
11464         <nbaseclasses, nfnfields, typedef_field_list_count,
11465         nested_types_list_count>: Remove.
11466         (dwarf2_add_field, dwarf2_add_type_defn)
11467         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11468         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11469         (process_structure_scope): Update.
11470
11471 2018-03-11  Tom Tromey  <tom@tromey.com>
11472
11473         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11474         for use by std::sort.
11475         (build_type_psymtabs_1): Use std::vector.
11476
11477 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
11478
11479         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11480         and LIBMPFR in the printed configuration.
11481
11482 2018-03-08  Tom Tromey  <tom@tromey.com>
11483
11484         * source.c (get_filename_and_charpos): Use scoped_fd.
11485         * nto-procfs.c (procfs_open_1): Use scoped_fd.
11486         (procfs_pidlist): Likewise.
11487         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11488         (iterate_over_mappings): Likewise.
11489
11490 2018-03-08  Tom Tromey  <tom@tromey.com>
11491
11492         * infcall.c (struct call_return_meta_info)
11493         <stack_temporaries_enabled>: Remove.
11494         (get_call_return_value, call_function_by_hand_dummy): Update.
11495         * thread.c (disable_thread_stack_temporaries): Remove.
11496         (enable_thread_stack_temporaries): Remove.
11497         (thread_stack_temporaries_enabled_p): Return bool.
11498         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11499         (get_last_thread_stack_temporary): Update.
11500         * eval.c (evaluate_subexp): Update.
11501         * gdbthread.h (class enable_thread_stack_temporaries): Now a
11502         class, not a function.
11503         (value_ptr, value_vec): Remove typedefs.
11504         (class thread_info) <stack_temporaries_enabled>: Now bool.
11505         <stack_temporaries>: Now a std::vector.
11506         (thread_stack_temporaries_enabled_p)
11507         (value_in_thread_stack_temporaries): Return bool.
11508
11509 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
11510
11511         * remote.c (putpkt_binary): Fix omitted bytes reporting.
11512         (getpkt_or_notif_sane_1): Likewise.
11513
11514 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11515
11516         * build-id.c (build_id_to_debug_bfd): Use std::string.
11517
11518 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11519
11520         * build-id.c (find_separate_debug_file_by_buildid): Return
11521         std::string.
11522         * build-id.h (find_separate_debug_file_by_buildid): Return
11523         std::string.
11524         * coffread.c (coff_symfile_read): Adjust to std::string.
11525         * elfread.c (elf_symfile_read): Adjust to std::string.
11526         * symfile.c (separate_debug_file_exists): Change parameter to
11527         std::string.
11528         (find_separate_debug_file): Return std::string.
11529         (find_separate_debug_file_by_debuglink): Return std::string.
11530         * symfile.h (find_separate_debug_file_by_debuglink): Return
11531         std::string.
11532
11533 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11534
11535         * common/xml-utils.c (xml_escape_text): Move code to...
11536         (xml_escape_text_append): ... this new function.
11537         * common/xml-utils.h (xml_escape_text_append): New declaration.
11538         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11539         New function.
11540         (_initialize_xml_utils): register test_xml_escape_text_append as
11541         a selftest.
11542
11543 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
11544
11545         * defs.h: Remove MAX_REGISTER_SIZE.
11546         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11547         asserts.
11548         * python/py-unwind.c (pyuw_sniffer): Likewise.
11549
11550 2018-03-07  Tom Tromey  <tom@tromey.com>
11551
11552         * linux-tdep.c (linux_info_proc): Update.
11553         * target.h (struct target_ops) <to_fileio_readlink>: Return
11554         optional<string>.
11555         (target_fileio_readlink): Return optional<string>.
11556         * remote.c (remote_hostio_readlink): Return optional<string>.
11557         * inf-child.c (inf_child_fileio_readlink): Return
11558         optional<string>.
11559         * target.c (target_fileio_readlink): Return optional<string>.
11560
11561 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
11562
11563         * regcache.c (cooked_read_test): Add riscv to the list of
11564         architectures that have a save_reggroup.
11565
11566 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11567
11568         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11569         value is not a dynamic class object.
11570
11571 2018-03-06  Tom Tromey  <tom@tromey.com>
11572
11573         * rust-exp.y: Formatting fixes.
11574
11575 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11576
11577         * riscv-tdep.c (riscv_register_name): Remove target description
11578         support.
11579         (riscv_gdbarch_init): Remove target description check.
11580
11581 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11582
11583         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11584         comment.
11585         * riscv-tdep.h: Likewise.
11586
11587 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11588
11589         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11590         (riscv_pseudo_register_write): Delete.
11591         (riscv_gdbarch_init): Remove all use of pseudo registers.
11592
11593 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11594
11595         * record-btrace.c (btrace_print_lines): Replace cleanup
11596         parameter with RAII equivalents.
11597         (btrace_insn_history): Replace cleanup with RAII equivalents.
11598         * ui-out.h (make_cleanup_ui_out_list_begin_end,
11599         make_cleanup_ui_out_tuple_begin_end): Remove.
11600         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11601         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11602         make_cleanup_ui_out_list_begin_end): Remove.
11603
11604 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11605
11606         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11607         parameter types to std::vector.  Use bool.
11608         (record_btrace_wait): Replace VEC(tp_t) with
11609         std::vector<thread_info *>.
11610         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11611
11612 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11613
11614         * record-btrace.c (record_btrace_disable_callback): Remove.
11615         (struct scoped_btrace_disable): New.
11616         (record_btrace_open): Use scoped_btrace_disable.
11617
11618 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11619
11620         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11621         reading values from registers.
11622
11623 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11624
11625         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11626         where appropriate.
11627
11628 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11629
11630         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11631         change parameter type.  Use GDB's print functions, and use
11632         core_addr_to_string where appropriate.
11633         (riscv_push_dummy_call): Use core_addr_to_string where
11634         appropriate, update call to riscv_print_arg_location, and reindent
11635         a few lines.
11636         (riscv_return_value): Update call to riscv_print_arg_location.
11637
11638 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11639             Tim Newsome <tim@sifive.com>
11640             Albert Ou <a0u@eecs.berkeley.edu>
11641             Darius Rad <darius@bluespec.com>
11642
11643         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11644         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11645         (ALLDEPFILES): Add riscv-tdep.c
11646         * configure.tgt: Add riscv support.
11647         * riscv-tdep.c: New file.
11648         * riscv-tdep.h: New file.
11649         * NEWS: Mention new target.
11650         * MAINTAINERS: Add entry for riscv.
11651
11652 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11653
11654         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11655         fields within aggregates.
11656
11657 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
11658
11659         * record-btrace.c (btrace_print_lines): Change type of flags to
11660         gdb_disassembly_flags.
11661
11662 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11663
11664         * fbsd-nat.c: Include "inf-ptrace.h".
11665         (USE_SIGTRAP_SIGINFO): Conditionally define.
11666         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11667         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11668         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11669         function.
11670         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11671         Likewise.
11672         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11673         Likewise.
11674         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11675         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11676         "supports_stopped_by_hw_breakpoint" target methods.
11677
11678 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11679
11680         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11681         * fbsd-nat.c (debug_fbsd_nat): New variable.
11682         (show_fbsd_nat_debug): New function.
11683         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11684         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11685
11686 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11687
11688         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11689         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11690         prototype.
11691         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11692         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11693         method.
11694
11695 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11696
11697         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11698         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11699
11700 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11701
11702         * charset.c (struct charset_vector): New.
11703         (charsets): Change type to charset_vector.
11704         (find_charset_names): Adjust.
11705         (add_one): Adjust.
11706         (_initialize_charset): Adjust.
11707
11708 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11709
11710         * progspace.h (struct program_space) <deleted_solibs>: Change
11711         type to std::vector<std::string>.
11712         * progspace.c (clear_program_space_solib_cache): Adjust.
11713         * breakpoint.c (print_solib_event): Adjust.
11714         (check_status_catch_solib): Adjust.
11715         * solib.c (update_solib_list): Adjust.
11716         * ui-out.h (class ui_out) <field_string>: New overload.
11717         * ui-out.c (ui_out::field_string): New overload.
11718
11719 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11720
11721         * progspace.h (struct program_space): Add constructor and
11722         destructor, initialize fields.
11723         (add_program_space): Remove.
11724         * progspace.c (add_program_space): Rename to...
11725         (program_space::program_space): ... this.
11726         (release_program_space): Rename to...
11727         (program_space::~program_space): ... this.
11728         (delete_program_space): Use delete to delete program_space.
11729         (initialize_progspace): Use new to allocate program_space.
11730         * inferior.c (add_inferior_with_spaces): Likewise.
11731         (clone_inferior_command): Likewise.
11732         * infrun.c (follow_fork_inferior): Likewise.
11733         (handle_vfork_child_exec_or_exit): Likewise.
11734
11735 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11736
11737         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11738         (delim_string_to_char_ptr_vec): Return std::vector of
11739         gdb::unique_xmalloc_ptr.
11740         (dirnames_to_char_ptr_vec_append): Take std::vector of
11741         gdb::unique_xmalloc_ptr.
11742         (dirnames_to_char_ptr_vec): Return std::vector of
11743         gdb::unique_xmalloc_ptr.
11744         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11745         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11746         (delim_string_to_char_ptr_vec): Return an std::vector of
11747         gdb::unique_xmalloc_ptr, adjust the code.
11748         (dirnames_to_char_ptr_vec_append): Take an std::vector of
11749         gdb::unique_xmalloc_ptr, adjust the code.
11750         (dirnames_to_char_ptr_vec): Return an std::vector of
11751         gdb::unique_xmalloc_ptr, adjust the code.
11752         * auto-load.c (auto_load_safe_path_vec): Change type to
11753         std::vector of gdb::unique_xmalloc_ptr.
11754         (auto_load_expand_dir_vars): Return an std::vector of
11755         gdb::unique_xmalloc_ptr, adjust the code.
11756         (auto_load_safe_path_vec_update): Adjust.
11757         (filename_is_in_auto_load_safe_path_vec): Adjust.
11758         (auto_load_objfile_script_1): Adjust.
11759         * build-id.c (build_id_to_debug_bfd): Adjust.
11760         * linux-thread-db.c (thread_db_load_search): Adjust.
11761         * source.c (add_path): Adjust.
11762         (openp): Adjust.
11763         * symfile.c (find_separate_debug_file): Adjust.
11764         * utils.c (do_free_char_ptr_vec): Remove.
11765         (make_cleanup_free_char_ptr_vec): Remove.
11766
11767 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
11768
11769         PR gdb/22907
11770         * common/pathstuff.c: Conditionally include "<windows.h>".
11771
11772 2018-03-01  Georg Sauthoff  <mail@georg.so>
11773
11774         PR gdb/22888
11775         * gcore.in: Quote variables and switch interpreter to bash.
11776
11777 2018-03-01  Tom Tromey  <tom@tromey.com>
11778
11779         * dwarf2read.c (alloc_discriminant_info): Fix default_index
11780         assertion.  Add assertion for discriminant_index.
11781         (quirk_rust_enum): Use correct base type name in univariant case.
11782
11783 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
11784
11785         * record.c (get_call_history_modifiers): Return a
11786         record_print_flags.
11787         (cmd_record_call_history): Adjust.
11788         * record-btrace.c (record_btrace_call_history): Adjust.
11789         (record_btrace_call_history_range): Adjust.
11790         (record_btrace_call_history_from): Adjust.
11791         * target-debug.h (target_debug_print_record_print_flags): New.
11792         * target-delegates.c: Re-generate.
11793         * target.c (target_call_history): Change flags type.
11794         (target_call_history_from): Likewise.
11795         (target_call_history_range): Likewise.
11796         * target.h (struct target_ops) <target_call_history>: Likewise.
11797         (target_call_history_from): Likewise.
11798         (target_call_history_range): Likewise.
11799
11800 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11801             Simon Marchi  <simon.marchi@polymtl.ca>
11802
11803         * common/common-utils.c: Include "sys/stat.h".
11804         (is_regular_file): Move here from "source.c"; change return
11805         type to "bool".
11806         * common/common-utils.h (is_regular_file): New prototype.
11807         * common/pathstuff.c (contains_dir_separator): New function.
11808         * common/pathstuff.h (contains_dir_separator): New prototype.
11809         * source.c: Don't include "sys/stat.h".
11810         (is_regular_file): Move to "common/common-utils.c".
11811
11812 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11813
11814         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11815         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11816         * auto-load.c: Include "common/pathstuff.h".
11817         * common/common-def.h (current_directory): Move here.
11818         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11819         function.
11820         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11821         prototype.
11822         * common/pathstuff.c: New file.
11823         * common/pathstuff.h: New file.
11824         * compile/compile.c: Include "common/pathstuff.h".
11825         * defs.h (current_directory): Move to "common/common-defs.h".
11826         * dwarf2read.c: Include "common/pathstuff.h".
11827         * exec.c: Likewise.
11828         * guile/scm-safe-call.c: Likewise.
11829         * linux-thread-db.c: Likewise.
11830         * main.c: Likewise.
11831         * nto-tdep.c: Likewise.
11832         * objfiles.c: Likewise.
11833         * source.c: Likewise.
11834         * symtab.c: Likewise.
11835         * utils.c: Include "common/pathstuff.h".
11836         (gdb_realpath): Move to "common/pathstuff.c".
11837         (gdb_realpath_keepfile): Likewise.
11838         (gdb_abspath): Likewise.
11839         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11840         (gdb_realpath_keepfile): Likewise.
11841         (gdb_abspath): Likewise.
11842
11843 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
11844
11845         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11846         wildcard process pid for super_resume for kernels with a
11847         specific bug.
11848
11849 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
11850
11851         * compile/compile.c (get_args): Add additional comments
11852         explaining function.
11853
11854 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
11855             Tom Tromey  <tom@tromey.com>
11856
11857         * target.h (memory_write_request_s): Remove typedef.  Don't define
11858         VEC.
11859         (target_write_memory_blocks): Change argument to std::vector.
11860         (struct memory_write_request): Add constructor.
11861         * target-memory.c (compare_block_starting_address): Return bool.
11862         Change argument types.
11863         (claim_memory): Change arguments to use std::vector.
11864         (split_regular_and_flash_blocks, blocks_to_erase)
11865         (compute_garbled_blocks): Likewise.
11866         (cleanup_request_data, cleanup_write_requests_vector): Remove.
11867         (target_write_memory_blocks): Change argument to std::vector.
11868         * symfile.c (struct load_section_data): Add constructor and
11869         destructor.  Use std::vector for "requests".
11870         (struct load_progress_data): Add initializers.
11871         (load_section_callback): Update.  Use "new".
11872         (clear_memory_write_data): Remove.
11873         (generic_load): Update.
11874
11875 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
11876
11877         * arch/aarch64.h: Use common/tdesc.h.
11878
11879 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11880
11881         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11882         architecture with a 64-bit ABI.
11883
11884 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11885
11886         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11887         ahead of target description loading.
11888
11889 2018-02-26  Tom Tromey  <tom@tromey.com>
11890
11891         * stack.c (backtrace_command_1): Update.
11892         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11893         of "flags".
11894         * python/py-framefilter.c (py_print_frame)
11895         (gdbpy_apply_frame_filter): Change type of "flags".
11896         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11897         of "flags".
11898         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11899         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11900         * extension.h (enum frame_filter_flag): Rename from
11901         frame_filter_flags.
11902         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11903         (apply_ext_lang_frame_filter): Change type of "flags".
11904         * extension.c (apply_ext_lang_frame_filter): Change type of
11905         "flags".
11906         * extension-priv.h (struct extension_language_ops)
11907         <apply_frame_filter>: Change type of "flags".
11908
11909 2018-02-26  Tom Tromey  <tom@tromey.com>
11910
11911         PR python/16497:
11912         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11913         off-by-one in py_end computation.
11914         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11915         PRINT_MORE_FRAMES.
11916         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11917         constant.
11918
11919 2018-02-26  Tom Tromey  <tom@tromey.com>
11920
11921         * dwarf2read.c (struct variant_field): New.
11922         (struct nextfield) <variant>: New field.
11923         (dwarf2_add_field): Handle DW_TAG_variant_part.
11924         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11925         discriminated union.
11926         (read_structure_type): Handle DW_TAG_variant_part.
11927         (handle_struct_member_die): New function, extracted from
11928         process_structure_scope.  Handle DW_TAG_variant.
11929         (process_structure_scope): Handle discriminated unions.  Call
11930         handle_struct_member_die.
11931
11932 2018-02-26  Tom Tromey  <tom@tromey.com>
11933
11934         * rust-lang.h (rust_last_path_segment): Declare.
11935         * rust-lang.c (rust_last_path_segment): Now public.  Change
11936         contract.
11937         (struct disr_info): Remove.
11938         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
11939         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
11940         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
11941         (rust_enum_p, rust_enum_variant): New function.
11942         (rust_underscore_fields): Remove "offset" parameter.
11943         (rust_print_enum): New function.
11944         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
11945         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
11946         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
11947         enums.
11948         (rust_internal_print_type): New function, from rust_print_type.
11949         Remove enum code.
11950         (rust_print_type): Call rust_internal_print_type.
11951         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
11952         Update enum handling.
11953         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
11954         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
11955         (rust_union_quirks): New functions.
11956         (process_full_comp_unit, process_full_type_unit): Call
11957         rust_union_quirks.
11958         (process_structure_scope): Update rust_unions if necessary.
11959
11960 2018-02-26  Tom Tromey  <tom@tromey.com>
11961
11962         * value.h (value_union_variant): Declare.
11963         * valops.c (value_union_variant): New function.
11964         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
11965         (struct discriminant_info): New.
11966         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
11967         enumerator.
11968         (struct main_type) <flag_discriminated_union>: New field.
11969
11970 2018-02-26  Tom Tromey  <tom@tromey.com>
11971
11972         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11973         unittests/unpack-selftests.c.
11974         * unittests/unpack-selftests.c: New file.
11975         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
11976
11977 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11978
11979         * dwarf2read.c (struct partial_die_info) <read>: New method.
11980         (read_partial_die): Remove the declaration.
11981         (load_partial_dies): Update.
11982         (partial_die_info::partial_die_info):
11983         (read_partial_die): Change it to partial_die_info::read.
11984
11985 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11986
11987         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
11988         (fixup_partial_die): Remove declaration.
11989         (scan_partial_symbols): Update.
11990         (partial_die_parent_scope): Likewise.
11991         (partial_die_full_name): Likewise.
11992         (fixup_partial_die): Change it to partial_die_info::fixup.
11993
11994 2018-02-26  Yao Qi  <yao.qi@linaro.org>
11995
11996         * dwarf2read.c (read_partial_die): Update the declaration.
11997         (load_partial_dies): Caller update.
11998         (read_partial_die): Remove one argument abbrev_len.
11999
12000 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12001
12002         * dwarf2read.c (struct partial_die_info): Add ctor, delete
12003         assignment operator.
12004         (load_partial_dies): Use ctor and copy ctor.
12005         (read_partial_die): Update.
12006         (dwarf2_cu::find_partial_die): Use ctor.
12007
12008 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12009
12010         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12011         (find_partial_die_in_comp_unit): Change it to
12012         dwarf2_cu::find_partial_die.
12013         (find_partial_die): Update.
12014
12015 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12016
12017         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12018         is NULL.
12019
12020 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12021
12022         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12023
12024 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
12025
12026         * arch/amd64.h: Use common/tdesc.h.
12027         * arch/i386.c: Likewise.
12028         * arch/i386.h: Likewise.
12029         * arch/tic6x.c: Likewise.
12030         * arch/tdesc.h: Move file from here...
12031         * common/tdesc.h: ...to here.
12032         * features/aarch64-core.c: Regenerate.
12033         * features/aarch64-fpu.c: Regenerate.
12034         * features/i386/32bit-avx.c: Regenerate.
12035         * features/i386/32bit-avx512.c: Regenerate.
12036         * features/i386/32bit-core.c: Regenerate.
12037         * features/i386/32bit-linux.c: Regenerate.
12038         * features/i386/32bit-mpx.c: Regenerate.
12039         * features/i386/32bit-pkeys.c: Regenerate.
12040         * features/i386/32bit-sse.c: Regenerate.
12041         * features/i386/64bit-avx.c: Regenerate.
12042         * features/i386/64bit-avx512.c: Regenerate.
12043         * features/i386/64bit-core.c: Regenerate.
12044         * features/i386/64bit-linux.c: Regenerate.
12045         * features/i386/64bit-mpx.c: Regenerate.
12046         * features/i386/64bit-pkeys.c: Regenerate.
12047         * features/i386/64bit-segments.c: Regenerate.
12048         * features/i386/64bit-sse.c: Regenerate.
12049         * features/i386/x32-core.c: Regenerate.
12050         * features/tic6x-c6xp.c: Regenerate.
12051         * features/tic6x-core.c: Regenerate.
12052         * features/tic6x-gp.c: Regenerate.
12053         * target-descriptions.c: Use common/tdesc.h.
12054         * target-descriptions.h: Likewise.
12055
12056 2018-02-24  Tom Tromey  <tom@tromey.com>
12057
12058         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12059         (try_thread_db_load_from_dir, thread_db_load_search): Use
12060         std::string.
12061         (info_auto_load_libthread_db_compare): Return bool.  Change
12062         argument types.
12063         (info_auto_load_libthread_db): Use std::vector, std::string.
12064         Remove cleanups.
12065
12066 2018-02-24  Tom Tromey  <tom@tromey.com>
12067
12068         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12069         std::string.
12070         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12071         std::string*.
12072         * gdbarch.c: Rebuild.
12073         * gdbarch.h: Rebuild.
12074         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12075         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12076         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12077         std::string*.
12078
12079 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
12080
12081         * gdbtypes.h (sect_offset): Change type to uint64_t.
12082         (sect_offset_str): New function.
12083         * dwarf2read.c (create_addrmap_from_aranges): Use
12084         sect_offset_str.
12085         (error_check_comp_unit_head): Likewise.
12086         (create_debug_type_hash_table): Likewise.
12087         (read_cutu_die_from_dwo): Likewise.
12088         (init_cutu_and_read_dies): Likewise.
12089         (init_cutu_and_read_dies_no_follow): Likewise.
12090         (process_psymtab_comp_unit_reader): Likewise.
12091         (partial_die_parent_scope): Likewise.
12092         (peek_die_abbrev): Likewise.
12093         (process_queue): Likewise.
12094         (dwarf2_physname): Likewise.
12095         (read_namespace_alias): Likewise.
12096         (read_import_statement): Likewise.
12097         (create_dwo_cu_reader): Likewise.
12098         (create_cus_hash_table): Likewise.
12099         (lookup_dwo_cutu): Likewise.
12100         (inherit_abstract_dies): Likewise.
12101         (read_func_scope): Likewise.
12102         (read_call_site_scope): Likewise.
12103         (dwarf2_add_member_fn): Likewise.
12104         (read_common_block): Likewise.
12105         (read_module_type): Likewise.
12106         (read_typedef): Likewise.
12107         (read_subrange_type): Likewise.
12108         (load_partial_dies): Likewise.
12109         (read_partial_die): Likewise.
12110         (find_partial_die): Likewise.
12111         (read_str_index): Likewise.
12112         (dwarf2_string_attr): Likewise.
12113         (build_error_marker_type): Likewise.
12114         (lookup_die_type): Likewise.
12115         (dump_die_shallow): Likewise.
12116         (follow_die_ref): Likewise.
12117         (dwarf2_fetch_die_loc_sect_off): Likewise.
12118         (dwarf2_fetch_constant_bytes): Likewise.
12119         (follow_die_sig): Likewise.
12120         (get_signatured_type): Likewise.
12121         (get_DW_AT_signature_type): Likewise.
12122         (dwarf2_find_containing_comp_unit): Likewise.
12123         (set_die_type): Likewise.
12124
12125 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
12126
12127         * arch/aarch64.c: Include "common-defs.h".
12128         * arch/amd64.c: Likewise.
12129         * arch/i386.c: Likewise.
12130
12131 2018-02-21  Tom Tromey  <tom@tromey.com>
12132
12133         * value.h: (extract_field_op): Update.
12134         * eval.c (extract_field_op): Return a const char *.
12135         * expression.h (parse_expression_for_completion): Update.
12136         * completer.c (complete_expression): Update.
12137         (add_struct_fields): Make fieldname const.
12138         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12139         (mark_completion_tag, parse_exp_in_context_1): Update.
12140         (parse_expression_for_completion): Change "name" to
12141         unique_xmalloc_ptr*.
12142
12143 2018-02-21  Tom Tromey  <tom@tromey.com>
12144
12145         * infcall.c (call_function_by_hand_dummy): Use std::vector.
12146
12147 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12148
12149         * avr-tdep.c (avr_read_pc): Change parameter type to
12150         readable_regcache.
12151         * gdbarch.sh (read_pc): Likewise.
12152         * gdbarch.c: Re-generated.
12153         * gdbarch.h: Re-generated.
12154         * hppa-tdep.c (hppa_read_pc): Change parameter type to
12155         readable_regcache.
12156         * ia64-tdep.c (ia64_read_pc): Likewise.
12157         * mips-tdep.c (mips_read_pc): Likewise.
12158         * spu-tdep.c (spu_read_pc): Likewise.
12159
12160 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12161
12162         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12163         * regcache-dump.c: New file.
12164         * regcache.c: Move register_dump to regcache-dump.c.
12165         (maintenance_print_registers): Likewise.
12166         (maintenance_print_raw_registers): Likewise.
12167         (maintenance_print_cooked_registers): Likewise.
12168         (maintenance_print_register_groups): Likewise.
12169         (maintenance_print_remote_registers): Likewise.
12170         (_initialize_regcache): Likewise.
12171         * regcache.h (register_dump): Moved from regcache.c.
12172
12173 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12174
12175         * regcache.c (regcache::regcache): Update.
12176         (regcache::invalidate): Move it to detached_regcache::invalidate.
12177         (get_thread_arch_aspace_regcache): Update.
12178         (regcache::raw_update): Update.
12179         (regcache::cooked_read): Remove some code.
12180         (regcache::cooked_read_value): Likewise.
12181         (regcache::raw_write): Remove assert on m_readonly_p.
12182         (regcache::raw_supply_integer): Move it to
12183         detached_regcache::raw_supply_integer.
12184         (regcache::raw_supply_zeroed): Likewise.
12185         * regcache.h (detached_regcache) <raw_supply_integer>: New
12186         declaration.
12187         <raw_supply_zeroed, invalidate>: Likewise.
12188         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12189         <invalidate>: Likewise.
12190         <m_readonly_p>: Removed.
12191
12192 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12193
12194         * infcmd.c (get_return_value): Let stop_regs point to
12195         get_current_regcache.
12196         * regcache.c (regcache::regcache): Remove.
12197         (register_dump_reg_buffer): New class.
12198         (regcache_print): Adjust.
12199         * regcache.h (regcache): Remove constructors.
12200
12201 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12202
12203         * regcache.c (class register_dump): New class.
12204         (register_dump_regcache, register_dump_none): New class.
12205         (register_dump_remote, register_dump_groups): New class.
12206         (regcache_print): Update.
12207         * regcache.h (regcache_dump_what): Move it to regcache.c.
12208         (regcache) <dump>: Remove.
12209
12210 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12211
12212         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12213          reg_buffer_rw *.
12214         (jit_unwind_reg_set_impl): Call raw_supply.
12215         (jit_frame_sniffer): Use reg_buffer_rw.
12216         * record-full.c (record_full_core_regbuf): Change its type.
12217         (record_full_core_open_1): Use reg_buffer_rw.
12218         (record_full_close): Likewise.
12219         (record_full_core_fetch_registers): Use regcache->raw_supply.
12220         (record_full_core_store_registers): Likewise.
12221         * regcache.c (regcache::get_register_status): Move it to
12222         reg_buffer.
12223         (regcache_raw_set_cached_value): Remove.
12224         (regcache::raw_set_cached_value): Remove.
12225         (regcache::raw_write): Call raw_supply.
12226         (regcache::raw_supply): Move it to reg_buffer_rw.
12227         * regcache.h (regcache_raw_set_cached_value): Remove.
12228         (reg_buffer_rw): New class.
12229
12230 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12231
12232         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12233         readonly_detached_regcache.
12234         (dummy_frame_prev_register): Use regcache->cooked_read.
12235         * frame.c (frame_save_as_regcache): Change return type.
12236         (frame_pop): Update.
12237         * frame.h (frame_save_as_regcache): Update declaration.
12238         * inferior.h (get_infcall_suspend_state_regcache): Update
12239         declaration.
12240         * infrun.c (infcall_suspend_state) <registers>: use
12241         readonly_detached_regcache.
12242         (save_infcall_suspend_state): Don't use regcache_dup.
12243         (get_infcall_suspend_state_regcache): Change return type.
12244         * linux-fork.c (struct fork_info) <savedregs>: Change to
12245         readonly_detached_regcache.
12246         <pc>: New field.
12247         (fork_save_infrun_state): Don't use regcache_dup.
12248         (info_checkpoints_command): Adjust.
12249         * mi/mi-main.c (register_changed_p): Update declaration.
12250         (mi_cmd_data_list_changed_registers): Use
12251         readonly_detached_regcache.
12252         (register_changed_p): Change parameter type to
12253         readonly_detached_regcache.
12254         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12255         readonly_detached_regcache.
12256         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12257         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12258         New.
12259         (regcache::save): Move it to reg_buffer.
12260         (regcache::restore): Change parameter type.
12261         (regcache_dup): Remove.
12262         * regcache.h (reg_buffer) <save>: New method.
12263         (readonly_detached_regcache): New class.
12264         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12265         readonly_detached_regcache.
12266         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12267
12268 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12269
12270         * frame.c (frame_save_as_regcache): Use regcache method save.
12271         (frame_pop): Use regcache method restore.
12272         * infrun.c (restore_infcall_suspend_state): Likewise.
12273         * linux-fork.c (fork_load_infrun_state): Likewise.
12274         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12275         save.
12276         * regcache.c (regcache_save): Remove.
12277         (regcache::restore): More asserts.
12278         (regcache_cpy): Remove.
12279         * regcache.h (regcache_save): Remove the declaration.
12280         (regcache::restore): Move from private to public.
12281         Remove the friend declaration of regcache_cpy.
12282         (regcache_cpy): Remove declaration.
12283
12284 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12285
12286         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12287         parameter type to 'readable_regcache *'.
12288         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12289         * arm-tdep.c (arm_neon_quad_read): Likewise.
12290         (arm_pseudo_read): Likewise.
12291         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12292         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12293         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12294         * gdbarch.c: Re-generated.
12295         * gdbarch.h: Re-generated.
12296         * gdbarch.sh (pseudo_register_read): Change parameter type to
12297         'readable_regcache *'.
12298         (pseudo_register_read_value): Likewise.
12299         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12300         (h8300_pseudo_register_read): Likewise.
12301         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12302         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12303         (i386_pseudo_register_read_into_value): Likewise.
12304         (i386_pseudo_register_read_value): Likewise.
12305         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12306         declaration.
12307         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12308         * m32c-tdep.c (m32c_raw_read): Likewise.
12309         (m32c_read_flg): Likewise.
12310         (m32c_banked_register): Likewise.
12311         (m32c_banked_read): Likewise.
12312         (m32c_sb_read): Likewise.
12313         (m32c_part_read): Likewise.
12314         (m32c_cat_read): Likewise.
12315         (m32c_r3r2r1r0_read): Likewise.
12316         (m32c_pseudo_register_read): Likewise.
12317         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12318         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12319         (mep_pseudo_cr64_read): Likewise.
12320         (mep_pseudo_register_read): Likewise.
12321         * mips-tdep.c (mips_pseudo_register_read): Likewise.
12322         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12323         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12324         * regcache.c (regcache::raw_read): Move it to readable_regcache.
12325         (regcache::cooked_read): Likewise.
12326         (regcache::cooked_read_value): Likewise.
12327         (regcache_cooked_read_signed):
12328         (regcache::cooked_read): Likewise.
12329         * regcache.h (readable_regcache): New class.
12330         (regcache): Inherit readable_regcache.  Move some methods to
12331         readable_regcache.
12332         * rl78-tdep.c (rl78_pseudo_register_read): Change
12333         parameter type to 'readable_regcache *'.
12334         * rs6000-tdep.c (do_regcache_raw_read): Remove.
12335         (e500_pseudo_register_read): Change parameter type to
12336         'readable_regcache *'.
12337         (dfp_pseudo_register_read): Likewise.
12338         (vsx_pseudo_register_read): Likewise.
12339         (efpr_pseudo_register_read): Likewise.
12340         * s390-tdep.c (s390_pseudo_register_read): Likewise.
12341         * sh-tdep.c (sh_pseudo_register_read): Likewise.
12342         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12343         (sh64_pseudo_register_read): Likewise.
12344         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12345         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12346         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12347         (spu_pseudo_register_read): Likewise.
12348         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12349         (xtensa_pseudo_register_read): Likewise.
12350
12351 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12352
12353         * regcache.c (regcache::regcache): Call reg_buffer ctor.
12354         (regcache::arch): Move it to reg_buffer::arch.
12355         (regcache::register_buffer): Likewise.
12356         (regcache::assert_regnum): Likewise.
12357         (regcache::num_raw_registers): Likewise.
12358         * regcache.h (reg_buffer): New class.
12359         (regcache): Inherit reg_buffer.
12360
12361 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
12362
12363         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12364         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12365
12366 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
12367
12368         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12369
12370 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
12371
12372         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12373         (SFILES): Remove common/*.c files.
12374         (COMMON_OBS): Remove some *.o files built from common/*.c files.
12375         * common/common.host: Add common reference.
12376         * configure.ac: Likewise.
12377         * configure: Regenerate.
12378
12379 2018-02-16  Yao Qi  <yao.qi@linaro.org>
12380
12381         * block.c (block_namespace_info): Inherit allocate_on_obstack.
12382         (block_initialize_namespace): Use new.
12383         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12384         (dwarf2_free_objfile): Use delete.
12385         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12386         (copy_type_recursive): Use new.
12387         * gdb_obstack.h (allocate_on_obstack): New.
12388
12389 2018-02-15  Yao Qi  <yao.qi@linaro.org>
12390
12391         PR gdb/22849
12392         * inferior.c (exit_inferior_1): Reset inf->control.
12393
12394 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
12395
12396         * ada-lang.c (ada_to_fixed_value_create): Delete advance
12397         declaration.
12398
12399 2018-02-14  Pedro Alves  <palves@redhat.com>
12400
12401         * frame-unwind.c (frame_unwind_try_unwinder): Always call
12402         frame_cleanup_after_sniffer on exception.
12403
12404 2018-02-14  Tom Tromey  <tom@tromey.com>
12405
12406         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12407         const.
12408         (solib_bfd_open): Make pathname const.
12409         * solib.c (solib_bfd_open): Make pathname const.
12410         * solib-spu.c (spu_bfd_fopen): Make name const.
12411         (spu_bfd_open): Make pathname const.
12412         * solib-darwin.c (darwin_bfd_open): Make pathname const.
12413         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12414
12415 2018-02-14  Tom Tromey  <tom@tromey.com>
12416
12417         * symfile.c (symfile_bfd_open): Update.
12418         * source.h (openp, source_full_path_of, find_and_open_source):
12419         Change argument type to unique_xmalloc_ptr.
12420         * source.c (openp): Take a unique_xmalloc_ptr.
12421         (source_full_path_of, find_and_open_source): Likewise.
12422         (open_source_file, symtab_to_fullname): Update.
12423         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12424         unique_xmalloc_ptr.
12425         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12426         (exec_file_find): Update.
12427         * psymtab.c (psymtab_to_fullname): Update.
12428         * nto-tdep.h (nto_find_and_open_solib): Update.
12429         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12430         unique_xmalloc_ptr.
12431         * exec.c (exec_file_attach): Update.
12432         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12433         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12434
12435 2018-02-14  Tom Tromey  <tom@tromey.com>
12436
12437         * solib.c: Include source.h.
12438         * nto-tdep.c: Include source.h.
12439         * mi/mi-cmd-env.c: Include source.h.
12440         * infcmd.c: Include source.h.
12441         * exec.c: Include source.h.
12442         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12443         (add_path, directory_switch, source_path, init_source_path): Move
12444         declarations...
12445         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12446         (add_path, directory_switch, source_path, init_source_path):
12447         ...here.
12448
12449 2018-02-14  Tom Tromey  <tom@tromey.com>
12450
12451         * solist.h (exec_file_find, solib_find): Return
12452         unique_xmalloc_ptr.
12453         (solib_bfd_fopen): Take a const char *.
12454         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12455         (exec_file_find, solib_find): Likewise.
12456         (solib_bfd_fopen): Do not take ownership of "pathname".
12457         (solib_bfd_open): Use unique_xmalloc_ptr.
12458         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12459         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12460         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12461         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12462
12463 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
12464
12465         * ada-lang.c (name_match_type_from_name): Remove reference to
12466         ada_name_for_lookup in function's documentation.
12467         * ada-lang.h (ada_name_for_lookup): Delete declaration.
12468
12469 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12470
12471         * defs.h (enum openp_flags): New enum.
12472         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12473         Move to enum openp_flags.
12474         (openp_flags): New enum flags.
12475         (openp): Change parameter type to openp_flags.
12476         * source.c (openp): Change parameter type to openp_flags.
12477         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12478         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12479
12480 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12481
12482         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12483         per-command.
12484
12485 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12486
12487         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12488         into...
12489         (class dwarf2_queue_guard): ...the destructor of this new class.
12490         (dw2_do_instantiate_symtab): Create instance of the new class
12491         dwarf2_queue_guard, remove cleanup.
12492
12493 2018-02-09  Tom Tromey  <tom@tromey.com>
12494
12495         * source.c (find_source_lines): Don't reference past the end of
12496         the vector.
12497
12498 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12499
12500         * remote.c (remote_btrace_maybe_reopen): Change error message.
12501         * btrace.c (btrace_enable): Likewise.
12502         (parse_xml_btrace): Likewise.
12503         (parse_xml_btrace_conf): Likewise.
12504
12505 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12506
12507         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12508         (linux_enable_pt, linux_enable_bts): Call
12509         diagnose_perf_event_open_fail.
12510
12511 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12512
12513         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12514         Remove parameter and change return type.  Update callers.  Move it.
12515         (linux_enable_bts, linux_enable_pt): Improve error message.
12516         (linux_enable_pt): Remove zero buffer size check.
12517         (linux_enable_btrace): Improve error messages.  Remove NULL return
12518         check.
12519
12520 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12521
12522         * btrace.c (btrace_enable): Remove target_supports_btrace call.
12523         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12524         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12525         (linux_supports_pt, linux_supports_btrace): Remove.
12526         (linux_enable_bts): Call cpu_supports_bts.
12527         * nat/linux-btrace.h (linux_supports_btrace): Remove.
12528         * remote.c (remote_supports_btrace): Remove.
12529         (init_remote_ops): Remove remote_supports_btrace.
12530         * target-delegates.c: Regenerated.
12531         * target.c (target_supports_btrace): Remove.
12532         * target.h (target_ops) <to_supports_btrace>: Remove
12533         (target_supports_btrace): Remove.
12534         * x86-linux-nat.c (x86_linux_create_target): Remove
12535         linux_supports_btrace.
12536
12537 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12538
12539         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12540         btrace failed.
12541         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12542         exception and use message in own exception.
12543
12544 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12545
12546         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12547         (perf_event_pt_event_type): Use gdb_file_up.
12548         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12549         scoped_fd, and scoped_mmap.
12550
12551 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12552
12553         * common/scoped_mmap.h: New.
12554         * unittests/scoped_mmap-selftest.c: New.
12555         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12556         unittests/scoped_mmap-selftest.c.
12557
12558 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12559
12560         * common/scoped_fd.h: New.
12561         * unittests/scoped_fd-selftest.c: New.
12562         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12563         unittests/scoped_fd-selftest.c.
12564
12565 2018-02-09  Tom Tromey  <tom@tromey.com>
12566
12567         * auto-load.c (auto_load_section_scripts): Use
12568         gdb::unique_xmalloc_ptr.
12569
12570 2018-02-09  Tom Tromey  <tom@tromey.com>
12571
12572         * auto-load.c (execute_script_contents): Use std::string.
12573
12574 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
12575
12576         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12577         Python function, rather than a new command.
12578
12579 2018-02-08  Tom Tromey  <tom@tromey.com>
12580
12581         * solib.c (solib_find_1): Use std::string.
12582         (solib_bfd_fopen): Use unique_xmalloc_ptr.
12583
12584 2018-02-08  Tom Tromey  <tom@tromey.com>
12585
12586         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12587
12588 2018-02-08  Tom Tromey  <tom@tromey.com>
12589
12590         * source.c (find_source_lines): Use gdb::def_vector.
12591
12592 2018-02-08  Tom Tromey  <tom@tromey.com>
12593
12594         * macrocmd.c (struct temporary_macro_definition): New.
12595         (macro_define_command): Use temporary_macro_definition.  Remove
12596         cleanups.
12597         (free_macro_definition_ptr): Remove.
12598
12599 2018-02-08  Tom Tromey  <tom@tromey.com>
12600
12601         * macroexp.c (maybe_expand): Use std::string.
12602
12603 2018-02-08  Tom Tromey  <tom@tromey.com>
12604
12605         * macroexp.c (struct macro_buffer): Add initializers for some
12606         members.
12607         (init_buffer, init_shared_buffer, free_buffer)
12608         (free_buffer_return_text): Remove.
12609         (macro_buffer): New constructors.
12610         (~macro_buffer): New destructor.
12611         (macro_buffer::set_shared): New method.
12612         (macro_buffer::resize_buffer, macro_buffer::appendc)
12613         (macro_buffer::appendmem): Now methods, not free functions.
12614         (set_token, append_tokens_without_splicing, stringify)
12615         (macro_stringify): Update.
12616         (gather_arguments): Change return type.  Remove argc_p argument,
12617         add args_ptr argument.  Use std::vector.
12618         (substitute_args): Remove argc argument.  Accept std::vector.
12619         (expand): Update.  Use std::vector.
12620         (scan, macro_expand, macro_expand_next): Update.
12621
12622 2018-02-08  Tom Tromey  <tom@tromey.com>
12623
12624         * symtab.c (default_collect_symbol_completion_matches_break_on):
12625         Use unique_xmalloc_ptr.
12626         * macroscope.h: (sal_macro_scope, user_macro_scope)
12627         (default_macro_scope): Return unique_xmalloc_ptr.
12628         * macroscope.c (sal_macro_scope, user_macro_scope)
12629         (default_macro_scope): Return unique_xmalloc_ptr.
12630         * macroexp.h (macro_expand, macro_expand_once): Return
12631         unique_xmalloc_ptr.
12632         * macroexp.c (macro_expand, macro_expand_once): Return
12633         unique_xmalloc_ptr.
12634         * macrocmd.c (macro_expand_command, macro_expand_once_command)
12635         (info_macro_command, info_macros_command): Use
12636         unique_xmalloc_ptr.
12637         * compile/compile-c-support.c (write_macro_definitions): Use
12638         unique_xmalloc_ptr.
12639         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12640
12641 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
12642
12643         * value.c (value_static_field): Assign field type instead of
12644         containing type when returning an optimized out value.
12645
12646 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12647
12648         * ft32-tdep.c (ft32_read_pc): Remove.
12649         (ft32_write_pc): Remove.
12650         (ft32_gdbarch_init): Update.
12651         * m32r-tdep.c (m32r_read_pc): Remove.
12652         (m32r_gdbarch_init): Update.
12653         * mep-tdep.c (mep_read_pc): Remove.
12654         (mep_gdbarch_init): Update.
12655         * microblaze-tdep.c (microblaze_write_pc): Remove.
12656         (microblaze_gdbarch_init): Update.
12657         * mn10300-tdep.c (mn10300_read_pc): Remove.
12658         (mn10300_write_pc): Remove.
12659         (mn10300_gdbarch_init): Update.
12660         * moxie-tdep.c (moxie_read_pc): Remove.
12661         (moxie_write_pc): Remove.
12662         (moxie_gdbarch_init): Update.
12663
12664 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12665
12666         * expprint.c (print_subexp_standard): Handle
12667         OP_F77_UNDETERMINED_ARGLIST.
12668         (dump_subexp_body_standard): Likewise.
12669
12670 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
12671
12672         * target-descriptions.c (tdesc_element_visitor) Add empty
12673         implementations.
12674         (tdesc_type): Move make_gdb_type from here.
12675         (tdesc_type_builtin): Likewise.
12676         (tdesc_type_vector): Likewise.
12677         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12678         (make_gdb_type_struct): Move from tdesc_type_with_fields.
12679         (make_gdb_type_union): Likewise.
12680         (make_gdb_type_flags): Likewise.
12681         (make_gdb_type_enum): Likewise.
12682         (make_gdb_type): New function.
12683         (tdesc_register_type): Use static make_gdb_type.
12684
12685 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
12686
12687         * infcmd.c (default_print_one_register_info): Align natural-format
12688         column values consistently one under another.
12689         (pad_to_column): New function.
12690
12691 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
12692
12693         * dwarf2read.c (dwarf2_physname): Move commment.
12694
12695 2018-02-01  Leszek Swirski  <leszeks@google.com>
12696
12697         * varobj.c (varobj_formatted_print_options): Allow recursive
12698         pretty printing if pretty printing is enabled.
12699
12700 2018-02-01  Leszek Swirski  <leszeks@google.com>
12701
12702         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12703         names after a structop as a filename.
12704
12705 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12706
12707         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12708         (arm_record_coproc_data_proc): Likewise.
12709
12710 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12711
12712         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12713
12714 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
12715
12716         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12717         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12718
12719 2018-01-31  Pedro Alves  <palves@redhat.com>
12720
12721         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12722         * inflow.c (child_terminal_save_inferior): Wrap reference to
12723         tcgetpgrp in HAVE_TERMIOS_H.
12724         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12725         _WIN32.
12726         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12727         always iterate over all inferiors.
12728         (gdbsim_cntrl_c): Adjust.
12729         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12730
12731 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12732
12733         * gdbtypes.c (lookup_array_range_type): Make sure the array's
12734         index type is objfile-owned if the element type is as well.
12735
12736 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12737
12738         GDB 8.1 released.
12739
12740 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12741
12742         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12743         "features/s390x-linux64.c".
12744         (_initialize_s390_linux_tdep): Remove initialization of tdescs
12745         s390_linux32 and s390x_linux64.
12746         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12747         default tdesc.
12748         * s390-tdep.c: Include "features/s390-linux32.c" and
12749         "features/s390x-linux64.c".
12750         (s390_tdesc_valid): Add check for tdesc_has_registers.
12751         (s390_gdbarch_init): Make sure there is always a valid tdesc.
12752         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12753         tdesc_s390x_linux64.
12754         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12755         tdesc_s390x_linux64 to...
12756         * s390-tdep.h: ...here.
12757
12758 2018-01-30  Pedro Alves  <palves@redhat.com>
12759
12760         PR gdb/13211
12761         * config.in, configure: Regenerate.
12762         * configure.ac: Check for getpgid.
12763         * go32-nat.c (go32_pass_ctrlc): New.
12764         (go32_target): Install it.
12765         * inf-child.c (inf_child_target): Install
12766         child_terminal_save_inferior, child_pass_ctrlc and
12767         child_interrupt.
12768         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12769         (inf_ptrace_target): No longer install it.
12770         * infcmd.c (interrupt_target_1): Adjust.
12771         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12772         (child_interrupt): Declare.
12773         (inferior::terminal_state): New.
12774         * inflow.c (struct terminal_info): Update comments.
12775         (inferior_process_group): Delete.
12776         (terminal_is_ours): Delete.
12777         (gdb_tty_state): New.
12778         (child_terminal_init): Adjust.
12779         (is_gdb_terminal, sharing_input_terminal_1)
12780         (sharing_input_terminal): New functions.
12781         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
12782         Set the process's actual process group in the foreground if
12783         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
12784         mark terminal as the inferior's if not sharing GDB's terminal.
12785         Don't check attach_flag.
12786         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12787         pass down a target_terminal_state.
12788         (child_terminal_save_inferior): New, factored out from ...
12789         (child_terminal_ours_1): ... this.  Handle
12790         target_terminal_state::is_ours_for_output.
12791         (child_interrupt, child_pass_ctrlc): New.
12792         (inflow_inferior_exit): Clear the inferior's terminal_state.
12793         (copy_terminal_info): Copy the inferior's terminal state.
12794         (_initialize_inflow): Remove reference to terminal_is_ours.
12795         * inflow.h (inferior_process_group): Delete.
12796         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12797         * procfs.c (procfs_target): Don't install procfs_interrupt.
12798         (procfs_interrupt): Delete.
12799         * remote.c (remote_serial_quit_handler): Adjust.
12800         (remote_interrupt): Remove ptid parameter.  Adjust.
12801         * target-delegates.c: Regenerate.
12802         * target.c: Include "terminal.h".
12803         (target_terminal::terminal_state): Rename to ...
12804         (target_terminal::m_terminal_state): ... this.
12805         (target_terminal::init): Adjust.
12806         (target_terminal::inferior): Adjust to per-inferior
12807         terminal_state.
12808         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12809         (target_terminal::ours, target_terminal::ours_for_output): Use
12810         target_terminal_is_ours_kind.
12811         (target_interrupt): Remove ptid parameter.  Adjust.
12812         (default_target_pass_ctrlc): Adjust.
12813         * target.h (target_ops::to_terminal_save_inferior): New field.
12814         (target_ops::to_interrupt): Remove ptid_t parameter.
12815         (target_interrupt): Remove ptid_t parameter.  Update comment.
12816         (target_pass_ctrlc): Update comment.
12817         * target/target.h (target_terminal_state): New scoped enum,
12818         factored out of ...
12819         (target_terminal::terminal_state): ... here.
12820         (target_terminal::inferior): Update comments.
12821         (target_terminal::restore_inferior): New.
12822         (target_terminal::is_inferior, target_terminal::is_ours)
12823         (target_terminal::is_ours_for_output): Adjust.
12824         (target_terminal::scoped_restore_terminal_state): Adjust to
12825         rename, and call restore_inferior() instead of inferior().
12826         (target_terminal::scoped_restore_terminal_state::m_state): Change
12827         type.
12828         (target_terminal::terminal_state): Rename to ...
12829         (target_terminal::m_terminal_state): ... this and change type.
12830
12831 2018-01-30  Pedro Alves  <palves@redhat.com>
12832
12833         * linux-nat.c (wait_for_signal): New function.
12834         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12835         directly.
12836         (async_terminal_is_ours)
12837         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12838         (linux_nat_add_target): Don't override
12839         to_terminal_inferior/to_terminal_ours.
12840
12841 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
12842
12843         * remote.c (remote_follow_fork): Don't call "detach_inferior".
12844
12845 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
12846
12847         * dwarf2read.c (free_dwo_files): Add forward-declaration.
12848         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12849         dwarf2_per_objfile_free here.
12850         (dwarf2_per_objfile_free): Remove.
12851         (_initialize_dwarf2_read): Don't register
12852         dwarf2_per_objfile_free as a registry cleanup.
12853
12854 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
12855
12856         Avoid compilation errors in MinGW native builds
12857
12858         The error is triggered by including python-internal.h, and the
12859         error message is:
12860
12861              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12862                       from build-gnulib/import/math.h:27,
12863                       from d:/usr/Python26/include/pyport.h:235,
12864                       from d:/usr/Python26/include/Python.h:58,
12865                       from python/python-internal.h:94,
12866                       from python/py-arch.c:24:
12867              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12868         using ::hypot;
12869                 ^~~~~
12870
12871         This happens because Python headers define 'hypot' to expand t
12872         '_hypot' in the Windows builds.
12873         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12874         'hypoth'.  This avoids a compilation error.
12875
12876 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12877
12878         * MAINTAINERS (Write After Approval): Fix ordering.
12879
12880 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12881
12882         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12883
12884 2018-01-26  Alan Modra  <amodra@gmail.com>
12885
12886         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12887         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12888         Remove nop.  Make const.  Comment.
12889         (powerpc32_plt_stub_so_2): New.
12890         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12891         Correct count.  Update uses.
12892         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12893         Move common code reading PLT entry word.  Correct
12894         powerpc32_plt_stub PLT address calculation.
12895         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12896         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12897         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12898         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12899         (ppc64_standard_linkage8): Likewise.
12900         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12901         Correct insns description.
12902         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12903
12904 2018-01-24  Pedro Alves  <palves@redhat.com>
12905
12906         GCC PR libstdc++/83906
12907         * gdbtypes.c (operator==(const dynamic_prop &,
12908         const dynamic_prop &)): New.
12909         (operator==(const range_bounds &, const range_bounds &)): New.
12910         (check_types_equal): Use them instead of memcmp.
12911         * gdbtypes.h (operator==(const dynamic_prop &,
12912         const dynamic_prop &)): Declare.
12913         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12914         (operator==(const range_bounds &, const range_bounds &)): Declare.
12915         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12916
12917 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12918
12919         * s390-linux-tdep.c (s390_record_address_mask)
12920         (s390_record_calc_disp_common, s390_record_calc_disp)
12921         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12922         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12923         (s390_process_record): Move to s390-tdep.c.
12924         (s390_linux_init_abi_any): Adjust.
12925         * s390-tdep.c (s390_record_address_mask)
12926         (s390_record_calc_disp_common, s390_record_calc_disp)
12927         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12928         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12929         (s390_process_record): Moved from s390-linux-tdep.c
12930         (s390_gdbarch_init): Adjust.
12931
12932 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12933
12934         * s390-linux-nat.c (s390-tdep.h): New include.
12935         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
12936         (HFILES_NO_SRCDIR): Add s390-tdep.h.
12937         (ALLDEPFILES): Add s390-tdep.c.
12938         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
12939         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
12940         * s390-tdep.h: ...this.  New file.
12941         * s390-linux-tdep.c (s390-tdep.h): New include.
12942         (_initialize_s390_tdep): Rename to...
12943         (_initialize_s390_linux_tdep): ...this and adjust.
12944         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
12945         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
12946         s390-tdep.h.
12947         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
12948         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
12949         (s390_is_partial_instruction, s390_software_single_step)
12950         (is_non_branch_ril, s390_displaced_step_copy_insn)
12951         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
12952         (s390_prologue_data, s390_addr, s390_store, s390_load)
12953         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
12954         (s390_register_call_saved, s390_guess_tracepoint_registers)
12955         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
12956         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
12957         (s390_pseudo_register_name, s390_pseudo_register_type)
12958         (s390_pseudo_register_read, s390_pseudo_register_write)
12959         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
12960         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
12961         (s390_addr_bits_remove, s390_address_class_type_flags)
12962         (s390_address_class_type_flags_to_name)
12963         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
12964         (s390_function_arg_float, s390_function_arg_vector)
12965         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
12966         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
12967         (s390_frame_align, s390_register_return_value, s390_return_value)
12968         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
12969         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
12970         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
12971         (s390_trad_frame_prev_register, s390_unwind_cache)
12972         (s390_prologue_frame_unwind_cache)
12973         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
12974         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
12975         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
12976         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
12977         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
12978         (s390_frame_base_address, s390_local_base_address)
12979         (s390_frame_base, s390_gcc_target_options)
12980         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
12981         (s390_validate_reg_range, s390_tdesc_valid)
12982         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
12983         * s390-tdep.c: ...this.  New file.
12984
12985 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12986
12987         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
12988         (s390_process_record, s390_gdbarch_tdep_alloc)
12989         (s390_linux_init_abi_any): Use/set new hook.
12990
12991 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12992
12993         * s390-linux-tdep.c (osabi.h): New include.
12994         (s390_linux_init_abi_31, s390_linux_init_abi_64)
12995         (s390_linux_init_abi_any): New functions.
12996         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
12997
12998 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12999
13000         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13001         tdesc_has_registers check
13002
13003 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13004
13005         * s390-linux-tdep.c (s390_tdesc_valid): New function.
13006         (s390_validate_reg_range): New macro.
13007         (s390_gdbarch_init): Adjust.
13008
13009 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13010
13011         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13012         (s390_gdbarch_tdep_alloc): Adjust.
13013         (s390_gdbarch_init): Adjust.
13014
13015 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13016
13017         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13018         <have_tdb>: Change type to bool.
13019         (s390_gdbarch_tdep_alloc): Adjust.
13020         (s390_gdbarch_init): Adjust.
13021
13022 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13023
13024         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13025         (gdbarch_tdep) <have_upper, have_vx>: New fields.
13026         (s390_gdbarch_tdep_alloc): New function.
13027         (s390_gdbarch_init): Allocate tdep at start and use its fields
13028         instead of separate variables.
13029
13030 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13031
13032         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13033         when looking for cached gdbarch and add comment for remaining.
13034
13035 2018-01-22  Pedro Alves  <palves@redhat.com>
13036             Sergio Durigan Junior  <sergiodj@redhat.com>
13037
13038         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13039         case.
13040
13041 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
13042
13043         * MAINTAINERS: Update my company e-mail address.
13044
13045 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13046
13047         * regcache.c (cooked_write_test): New function.
13048         (_initialize_regcache): Register the test.
13049
13050 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13051
13052         * ia64-tdep.c (ia64_pseudo_register_read): Call
13053         regcache->cooked_read instead of regcache_cooked_read_unsigned.
13054         * m32c-tdep.c (m32c_cat_read): Likewise.
13055         (m32c_r3r2r1r0_read): Likewise.
13056         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13057         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13058
13059 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13060
13061         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13062         method raw_read instead of regcache_raw_read.
13063         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13064         * arm-tdep.c (arm_neon_quad_read): Likewise.
13065         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13066         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13067         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13068         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13069         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13070         (i386_pseudo_register_read_into_value): Likewise.
13071         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13072         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13073         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13074         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13075         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13076         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
13077         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13078         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
13079         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13080
13081 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13082
13083         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13084         * configure.tgt: Remove target mt.
13085         * mt-tdep.c: Remove.
13086         * regcache.c (cooked_read_test): Remove the check for mt.
13087
13088 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13089
13090         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13091         instead of gdbarch_pseudo_register_read_value.
13092
13093 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13094
13095         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13096         language is Ada.
13097
13098 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13099
13100         * linespec.c (create_sals_line_offset): Remove code that preserved
13101         the symtab_and_line's line number.
13102
13103 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13104
13105         * varobj.c (varobj_create): Don't set valid_block when creating a
13106         floating varobj.
13107
13108 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13109
13110         * varobj.c (varobj_create): Remove out of date comment.
13111
13112 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13113
13114         PR mi/20395
13115         * ada-exp.y (write_var_from_sym): Pass extra parameter when
13116         updating innermost block.
13117         * parse.c (innermost_block_tracker::update): Take extra type
13118         parameter, and check types match before updating innermost block.
13119         (write_dollar_variable): Update innermost block for registers.
13120         * parser-defs.h (enum innermost_block_tracker_type): New enum.
13121         (innermost_block_tracker::innermost_block_tracker): Initialise
13122         m_types member.
13123         (innermost_block_tracker::reset): Take type parameter.
13124         (innermost_block_tracker::update): Take type parameter, and pass
13125         type through as needed.
13126         (innermost_block_tracker::m_types): New member.
13127         * varobj.c (varobj_create): Pass type when reseting innermost
13128         block.
13129
13130 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13131
13132         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13133         * ada-lang.c (resolve_subexp): Likewise.
13134         * breakpoint.c (set_breakpoint_condition) Likewise.
13135         (watch_command_1) Likewise.
13136         * c-exp.y (variable): Likewise.
13137         * d-exp.y (PrimaryExpression): Likewise.
13138         * f-exp.y (variable): Likewise.
13139         * go-exp.y (variable): Likewise.
13140         * m2-exp.y (variable): Likewise.
13141         * objfiles.c (objfile::~objfile): Likewise.
13142         * p-exp.y (variable): Likewise.
13143         * parse.c (innermost_block): Change type.
13144         * parser-defs.h (class innermost_block_tracker): New.
13145         (innermost_block): Change to innermost_block_tracker.
13146         * printcmd.c (display_command): Switch to innermost_block API.
13147         (do_one_display): Likewise.
13148         * rust-exp.y (do_one_display): Likewise.
13149         * symfile.c (clear_symtab_users): Likewise.
13150         * varobj.c (varobj_create): Switch to innermost_block API, replace
13151         use of innermost_block with block stored on varobj object.
13152
13153 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13154
13155         * expression.h (innermost_block): Remove declaration.
13156         * varobj.c: Add 'parser-defs.h' include.
13157
13158 2018-01-19  Tom Tromey  <tom@tromey.com>
13159
13160         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13161         symbols in the static and global blocks.
13162
13163 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
13164
13165         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13166         gdb_ptrace.h, and move including gdb_wait.h ...
13167         * nat/linux-ptrace.h: ... to here.
13168
13169 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13170
13171         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13172         inf_ptrace_detach_success.
13173         (inf_ptrace_detach_success): Add inferior parameter, use it
13174         instead of inferior_ptid, pass it to detach_inferior.
13175         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13176         parameter.
13177         * inferior.c (detach_inferior): Add overload that takes an
13178         inferior object.
13179         * inferior.h (detach_inferior): Likewise.
13180         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13181         use inferior_ptid, adjust call to inf_ptrace_detach_success.
13182         * linux-thread-db.c (thread_db_detach): Use inf parameter.
13183
13184 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13185
13186         * target.h (struct target_ops) <to_detach>: Add inferior
13187         parameter.
13188         (target_detach): Likewise.
13189         * target.c (dispose_inferior): Pass inferior down.
13190         (target_detach): Pass inferior down.  Assert that it is equal to
13191         the current inferior.
13192         * aix-thread.c (aix_thread_detach): Pass inferior down.
13193         * corefile.c (core_file_command): Pass current_inferior() down.
13194         * corelow.c (core_detach): Add inferior parameter.
13195         * darwin-nat.c (darwin_detach): Likewise.
13196         * gnu-nat.c (gnu_detach): Likewise.
13197         * inf-ptrace.c (inf_ptrace_detach): Likewise.
13198         * infcmd.c (detach_command): Pass current_inferior() down to
13199         target_detach.
13200         * infrun.c (follow_fork_inferior): Pass parent_inf to
13201         target_detach.
13202         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13203         target_detach.
13204         * linux-nat.c (linux_nat_detach): Add inferior parameter.
13205         * linux-thread-db.c (thread_db_detach): Likewise.
13206         * nto-procfs.c (procfs_detach): Likewise.
13207         * procfs.c (procfs_detach): Likewise.
13208         * record.c (record_detach): Likewise.
13209         * record.h (struct inferior): Forward-declare.
13210         (record_detach): Add inferior parameter.
13211         * remote-sim.c (gdbsim_detach): Likewise.
13212         * remote.c (remote_detach_1): Likewise.
13213         (remote_detach): Likewise.
13214         (extended_remote_detach): Likewise.
13215         * sol-thread.c (sol_thread_detach): Likewise.
13216         * target-debug.h (target_debug_print_inferior_p): New macro.
13217         * target-delegates.c: Re-generate.
13218         * top.c (kill_or_detach): Pass inferior down to target_detach.
13219         * windows-nat.c (windows_detach): Add inferior parameter.
13220
13221 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13222
13223         * target.h (struct target_ops) <to_detach>: Remove args
13224         parameter.
13225         (target_detach): Likewise.
13226         * target.c (dispose_inferior): Adjust.
13227         (target_detach): Remove args parameter, adjust.
13228         * aix-thread.c (aix_thread_detach): Adjust.
13229         * corefile.c (core_file_command): Adjust.
13230         * corelow.c (core_detach): Adjust.
13231         * darwin-nat.c (darwin_detach): Adjust.
13232         * gnu-nat.c (gnu_detach): Adjust.
13233         * inf-ptrace.c (inf_ptrace_detach): Adjust.
13234         * infcmd.c (detach_command): Adjust
13235         * infrun.c (follow_fork_inferior): Adjust.
13236         (handle_vfork_child_exec_or_exit): Adjust.
13237         * linux-fork.c (linux_fork_detach): Remove args parameter.
13238         * linux-fork.h (linux_fork_detach): Likewise.
13239         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13240         * linux-thread-db.c (thread_db_detach): Likewise.
13241         * nto-procfs.c (procfs_detach): Likewise.
13242         * procfs.c (procfs_detach): Likewise.
13243         (do_detach): Remove signo parameter.
13244         * record.c (record_detach): Remove args parameter.
13245         * record.h (record_detach): Likewise.
13246         * remote-sim.c (gdbsim_detach): Likewise.
13247         * remote.c (remote_detach_1): Likewise.
13248         (remote_detach): Likewise.
13249         (extended_remote_detach): Likewise.
13250         * sol-thread.c (sol_thread_detach): Likewise.
13251         * target-delegates.c: Re-generate.
13252         * top.c (struct qt_args) <args>: Remove field.
13253         (kill_or_detach): Don't pass args.
13254         (quit_force): Don't set args.
13255         * windows-nat.c (windows_detach): Remove args parameter.
13256
13257 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13258
13259         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13260         (arm_linux_init_abi): Install it.
13261
13262 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13263
13264         * osabi.c (gdb_osabi_names): Extend the regexp for
13265         arm-linux-gnueabihf.
13266
13267 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13268
13269         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13270         m_abbrevs.
13271         (abbrev_table::add_abbrev): Update.
13272         (abbrev_table::lookup_abbrev): Update.
13273
13274 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13275
13276         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13277
13278 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
13279
13280         * compile/compile.c (compile_to_object): Convert "triplet_rx"
13281         to "std::string".
13282
13283 2018-01-17  Tom Tromey  <tom@tromey.com>
13284
13285         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
13286
13287 2018-01-17  Tom Tromey  <tom@tromey.com>
13288
13289         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13290         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13291         (create_array_type_with_stride): Update.
13292         * dwarf2read.c (set_die_type): Update.
13293
13294 2018-01-17  Tom Tromey  <tom@tromey.com>
13295
13296         * dwarf2read.c (delayed_method_info): Remove typedef.
13297         (dwarf2_cu::method_info): Now a std::vector.
13298         (add_to_method_list): Update.
13299         (free_delayed_list): Remove.
13300         (compute_delayed_physnames): Update.
13301         (process_full_comp_unit, process_full_type_unit): Clear the method
13302         list.  Remove cleanups.
13303         (psymtab_include_file_name): Add name_holder parameter.  Use
13304         unique_xmalloc_ptr.
13305         (dwarf_decode_lines): Update.
13306
13307 2018-01-17  Tom Tromey  <tom@tromey.com>
13308             Simon Marchi  <simon.marchi@ericsson.com>
13309
13310         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13311         (dwarf2_per_objfile::free_cached_comp_units)
13312         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13313         (init_cutu_and_read_dies_no_follow): Update.
13314         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13315         (dwarf2_cu::~dwarf2_cu): New.
13316         (free_heap_comp_unit, free_stack_comp_unit): Remove.
13317         (age_cached_comp_units, free_one_cached_comp_unit): Update.
13318
13319 2018-01-17  Tom Tromey  <tom@tromey.com>
13320             Simon Marchi  <simon.marchi@ericsson.com>
13321
13322         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13323         (struct die_reader_specs) <abbrev_table>: New member.
13324         (struct abbrev_table): Add constructor.
13325         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13326         <abbrev_obstack>: Now an auto_obstack.
13327         (abbrev_table_up): New typedef.
13328         (init_cu_die_reader): Add abbrev_table parameter.
13329         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13330         Add result_dwo_abbrev_table.
13331         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13332         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13333         Update.
13334         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13335         parameter.
13336         (skip_children): Update.
13337         (abbrev_table::alloc_abbrev): Rename from
13338         abbrev_table_alloc_abbrev.
13339         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13340         (abbrev_table::lookup_abbrev): Rename from
13341         abbrev_table_lookup_abbrev.
13342         (abbrev_table_read_table): Return abbrev_table_up.
13343         (abbrev_table_free, abbrev_table_free_cleanup)
13344         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13345         (load_partial_dies): Update.
13346
13347 2018-01-17  Tom Tromey  <tom@tromey.com>
13348
13349         * dwarf2read.c (dwarf2_compute_name): Update comment.
13350         (read_func_scope, read_variable): Update.
13351         (new_symbol): Remove.
13352         (new_symbol_full): Rename to new_symbol.
13353
13354 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
13355
13356         PR gdb/16577
13357         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13358         a warning instead of throwing an error, set section size to 0 and return
13359         NULL.
13360         * gdb_bfd.h (gdb_bfd_map_section): Update description.
13361
13362 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13363
13364         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13365         std::string.
13366         (linux_ptrace_attach_fail_reason_string): Likewise.
13367         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13368         Likewise.
13369         (linux_ptrace_attach_fail_reason_string): Likewise.
13370         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13371
13372 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13373
13374         * linux-nat.c (linux_nat_attach): Remove xstrdup.
13375
13376 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
13377
13378         PR gdb/21559
13379         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13380         checking for fs_base/gs_base fields in struct user_regs_struct.
13381         * configure: Regenerate.
13382
13383 2018-01-17  Yao Qi  <yao.qi@linaro.org>
13384
13385         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13386         function.
13387         (aarch64_linux_init_abi): Install it to gdbarch hook
13388         gcc_target_options.
13389
13390 2018-01-15  Pedro Alves  <palves@redhat.com>
13391
13392         * common/signals-state-save-restore.c
13393         (save_original_signals_state): Fix typos.
13394
13395 2017-01-12  Tom Tromey  <tom@tromey.com>
13396             Sergio Durigan Junior  <sergiodj@redhat.com>
13397
13398         * Makefile.in (install-only): Install gdb-add-index.
13399
13400 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
13401
13402         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13403
13404 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13405
13406         * infrun.c (keep_going_pass_signal): Clear step-over info when
13407         insert_breakpoints fails.
13408
13409 2018-01-11  Pedro Alves  <palves@redhat.com>
13410
13411         PR gdb/22583
13412         * infrun.c (resume): Rename to ...
13413         (resume_1): ... this.
13414         (resume): Reimplement as wrapper around resume_1.
13415
13416 2018-01-11  Pedro Alves  <palves@redhat.com>
13417
13418         PR remote/22597
13419         * remote.c (remote_parse_stop_reply): Default to the last-set
13420         general thread instead of to 'magic_null_ptid'.
13421
13422 2018-01-10  Pedro Alves  <palves@redhat.com>
13423
13424         * language.h (language_get_symbol_name_matcher): Rename ...
13425         (get_symbol_name_matcher): ... this.
13426         * language.c (language_get_symbol_name_matcher): Ditto.
13427         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13428         callers adjusted.
13429
13430 2018-01-10  Pedro Alves  <palves@redhat.com>
13431
13432         PR gdb/22670
13433         * dwarf2read.c
13434         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13435         Adjust to use language_get_symbol_name_matcher instead of
13436         language_defn::la_get_symbol_name_matcher.
13437         * language.c (language_get_symbol_name_matcher): If in Ada mode
13438         and the lookup name is a verbatim match, return Ada's matcher.
13439         * language.h (language_get_symbol_name_matcher): Adjust comment.
13440         (ada_lookup_name_info::verbatim_p):: New method.
13441
13442 2018-01-10  Pedro Alves  <palves@redhat.com>
13443
13444         PR gdb/22670
13445         * ada-lang.c (ada_collect_symbol_completion_matches): If the
13446         minsym's language is language_auto or language_cplus, pass down
13447         language_ada instead.
13448         * symtab.c (compare_symbol_name): Don't frob symbol language here.
13449
13450 2018-01-10  Pedro Alves  <palves@redhat.com>
13451
13452         PR gdb/22670
13453         * minsyms.c (linkage_name_str): New function.
13454         (iterate_over_minimal_symbols): Use it.
13455
13456 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13457
13458         * NEWS: Document that 'info proc' now works on FreeBSD.
13459
13460 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13461
13462         * configure.ac: Check for kinfo_getfile in libutil.
13463         * configure: Regenerate.
13464         * config.in: Regenerate.
13465         * fbsd-nat.c: Include "fbsd-tdep.h".
13466         (fbsd_fetch_cmdline): New.
13467         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13468         rather than calling error.
13469         (fbsd_info_proc): New.
13470         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13471         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13472         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13473
13474 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13475
13476         * fbsd-nat.c (struct free_deleter): Remove.
13477         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13478
13479 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13480
13481         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13482         NULL for an empty pathname.
13483
13484 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13485
13486         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13487         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13488         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13489         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13490         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13491         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13492         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13493         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13494         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13495         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13496         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13497         (fbsd_core_fetch_timeval, fbsd_print_sigset)
13498         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13499         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
13500         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13501
13502 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
13503
13504         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13505         (gnu_xfer_auxv): New function.
13506         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13507         TARGET_OBJECT_AUXV.
13508
13509 2018-01-08  Yao Qi  <yao.qi@linaro.org>
13510             Simon Marchi  <simon.marchi@ericsson.com>
13511
13512         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13513         common/selftest.c.
13514         (COMMON_OBS): Remove selftest.o.
13515         * configure.ac: Append selftest-arch.c and common/selftest.c to
13516         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
13517         * configure: Re-generated.
13518         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13519         GDB_SELF_TEST.
13520         (maintenance_info_selftests): Likewise.
13521
13522 2018-01-08  Xavier Roirand  <roirand@adacore.com>
13523
13524         * ada-valprint.c (val_print_packed_array_elements): Use
13525         proper number of elements when printing an array indexed
13526         by an enumeration type.
13527
13528 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13529
13530         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13531         (dw2_get_file_names_reader): Adjust.
13532         (lookup_dwo_signatured_type): Adjust.
13533         (lookup_dwp_signatured_type): Adjust.
13534         (lookup_signatured_type): Adjust.
13535         (create_type_unit_group): Adjust.
13536         (get_type_unit_group): Adjust.
13537         (process_psymtab_comp_unit_reader): Adjust.
13538         (build_type_psymtabs_reader): Adjust.
13539         (scan_partial_symbols): Adjust.
13540         (add_partial_symbol): Adjust.
13541         (add_partial_subprogram): Adjust.
13542         (peek_die_abbrev): Adjust.
13543         (fixup_go_packaging): Adjust.
13544         (process_imported_unit_die): Adjust.
13545         (dwarf2_compute_name): Adjust.
13546         (dwarf2_physname): Adjust.
13547         (read_import_statement): Adjust.
13548         (handle_DW_AT_stmt_list): Adjust.
13549         (read_file_scope): Adjust.
13550         (read_func_scope): Adjust.
13551         (read_lexical_block_scope): Adjust.
13552         (read_call_site_scope): Adjust.
13553         (read_variable): Adjust.
13554         (dwarf2_rnglists_process): Adjust.
13555         (dwarf2_ranges_process): Adjust.
13556         (dwarf2_ranges_read): Adjust.
13557         (dwarf2_get_pc_bounds): Adjust.
13558         (dwarf2_record_block_ranges): Adjust.
13559         (dwarf2_add_field): Adjust.
13560         (dwarf2_add_member_fn): Adjust.
13561         (read_structure_type): Adjust.
13562         (process_structure_scope): Adjust.
13563         (read_enumeration_type): Adjust.
13564         (read_array_type): Adjust.
13565         (mark_common_block_symbol_computed): Adjust.
13566         (read_common_block): Adjust.
13567         (read_namespace_type): Adjust.
13568         (read_namespace): Adjust.
13569         (read_module_type): Adjust.
13570         (read_tag_pointer_type): Adjust.
13571         (read_tag_ptr_to_member_type): Adjust.
13572         (read_tag_string_type): Adjust.
13573         (read_subroutine_type): Adjust.
13574         (read_typedef): Adjust.
13575         (read_base_type): Adjust.
13576         (attr_to_dynamic_prop): Adjust.
13577         (read_subrange_type): Adjust.
13578         (read_unspecified_type): Adjust.
13579         (dwarf2_read_abbrevs): Adjust.
13580         (load_partial_dies): Adjust.
13581         (read_partial_die): Adjust.
13582         (find_partial_die): Adjust.
13583         (guess_partial_die_structure_name): Adjust.
13584         (fixup_partial_die): Adjust.
13585         (read_attribute_value): Adjust.
13586         (read_addr_index): Adjust.
13587         (read_addr_index_from_leb128): Adjust.
13588         (read_str_index): Adjust.
13589         (dwarf2_string_attr): Adjust.
13590         (get_debug_line_section): Adjust.
13591         (dwarf_decode_line_header): Adjust.
13592         (lnp_state_machine::check_line_address): Adjust.
13593         (dwarf_decode_lines_1): Adjust.
13594         (dwarf_decode_lines): Adjust.
13595         (dwarf2_start_symtab): Adjust.
13596         (var_decode_location): Adjust.
13597         (new_symbol_full): Adjust.
13598         (dwarf2_const_value_data): Adjust.
13599         (dwarf2_const_value_attr): Adjust.
13600         (dwarf2_const_value): Adjust.
13601         (die_type): Adjust.
13602         (die_containing_type): Adjust.
13603         (build_error_marker_type): Adjust.
13604         (lookup_die_type): Adjust.
13605         (guess_full_die_structure_name): Adjust.
13606         (anonymous_struct_prefix): Adjust.
13607         (determine_prefix): Adjust.
13608         (dwarf2_name): Adjust.
13609         (follow_die_ref_or_sig): Adjust.
13610         (follow_die_offset): Adjust.
13611         (follow_die_ref): Adjust.
13612         (follow_die_sig_1): Adjust.
13613         (follow_die_sig): Adjust.
13614         (get_signatured_type): Adjust.
13615         (get_DW_AT_signature_type): Adjust.
13616         (decode_locdesc): Adjust.
13617         (dwarf_decode_macros): Adjust.
13618         (cu_debug_loc_section): Adjust.
13619         (fill_in_loclist_baton): Adjust.
13620         (dwarf2_symbol_mark_computed): Adjust.
13621         (init_one_comp_unit): Don't assign
13622         dwarf2_cu::dwarf2_per_objfile.
13623         (set_die_type): Adjust.
13624
13625 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13626
13627         * dwarf2read.c (struct mapped_debug_names): Add constructor.
13628         <dwarf2_per_objfile>: New field.
13629         (dwarf2_per_objfile): Remove global.
13630         (get_dwarf2_per_objfile): New function.
13631         (set_dwarf2_per_objfile): New function.
13632         (dwarf2_build_psymtabs_hard): Change objfile parameter to
13633         dwarf2_per_objfile.
13634         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13635         (read_abbrev_offset): Likewise.
13636         (read_indirect_string): Likewise.
13637         (read_indirect_line_string): Likewise.
13638         (read_indirect_string_at_offset): Likewise.
13639         (read_indirect_string_from_dwz): Likewise.
13640         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13641         dwarf2_per_objfile.
13642         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13643         (create_all_comp_units): Change objfile parameter to
13644         dwarf2_per_objfile.
13645         (create_all_type_units): Likewise.
13646         (process_queue): Add dwarf2_per_objfile parameter.
13647         (read_and_check_comp_unit_head): Likewise.
13648         (lookup_dwo_unit_in_dwp): Likewise.
13649         (get_dwp_file): Likewise.
13650         (process_cu_includes): Likewise.
13651         (struct free_dwo_file_cleanup_data): New struct.
13652         (dwarf2_has_info): Use get_dwarf2_per_objfile and
13653         set_dwarf2_per_objfile.
13654         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13655         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13656         context, adjust calls.
13657         (dw2_instantiate_symtab): Likewise.
13658         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13659         (dw2_get_cu): Likewise.
13660         (create_cu_from_index_list): Change objfile parameter to
13661         dwarf2_per_objfile.
13662         (create_cus_from_index_list): Get dwarf2_per_objfile from
13663         context, adjust calls.
13664         (create_cus_from_index): Likewise.
13665         (create_signatured_type_table_from_index): Change objfile
13666         parameter to dwarf2_per_objfile.
13667         (create_signatured_type_table_from_debug_names): Change objfile
13668         parameter to dwarf2_per_objfile.
13669         (create_addrmap_from_index): Likewise.
13670         (create_addrmap_from_aranges): Likewise.
13671         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13672         (dw2_setup): Remove.
13673         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13674         context.
13675         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13676         get_dwarf2_per_objfile.
13677         (dw2_forget_cached_source_info): Likewise.
13678         (dw2_map_symtabs_matching_filename): Likewise.
13679         (struct dw2_symtab_iterator) <index>: Remove.
13680         <dwarf2_per_objfile>: New field.
13681         (dw2_symtab_iter_init): Replace index parameter with
13682         dwarf2_per_objfile.
13683         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13684         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13685         (dw2_print_stats): Likewise.
13686         (dw2_dump): Likewise.
13687         (dw2_expand_symtabs_for_function): Likewise.
13688         (dw2_expand_all_symtabs): Likewise.
13689         (dw2_expand_symtabs_with_fullname): Likewise.
13690         (dw2_expand_marked_cus): Replace index and objfile parameters
13691         with dwarf2_per_objfile.
13692         (dw_expand_symtabs_matching_file_matcher): Add
13693         dwarf2_per_objfile parameter and adjust calls.
13694         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13695         adjust calls.
13696         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13697         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13698         adjust calls.
13699         (create_cus_from_debug_names_list): Replace objfile parameter
13700         with dwarf2_per_objfile and adjust calls.
13701         (create_cus_from_debug_names): Likewise.
13702         (dwarf2_read_debug_names): Likewise.
13703         (mapped_debug_names::namei_to_name): Adjust call.
13704         (dw2_debug_names_iterator::next): Likewise.
13705         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13706         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13707         (dw2_debug_names_dump): Likewise.
13708         (dw2_debug_names_expand_symtabs_for_function): Likewise.
13709         (dw2_debug_names_expand_symtabs_matching): Likewise.
13710         (dwarf2_initialize_objfile): Likewise.
13711         (dwarf2_build_psymtabs): Likewise.
13712         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13713         this_cu.
13714         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13715         (read_and_check_comp_unit_head): Likewise.
13716         (read_abbrev_offset): Likewise.
13717         (create_debug_type_hash_table): Likewise.
13718         (create_debug_types_hash_table): Likewise.
13719         (create_all_type_units): Replace objfile parameter with
13720         dwarf2_per_objfile.
13721         (add_type_unit): Add dwarf2_per_objfile parameter.
13722         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13723         with dwarf2_per_objfile.
13724         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13725         (lookup_dwp_signatured_type): Likewise.
13726         (lookup_signatured_type): Likewise.
13727         (read_cutu_die_from_dwo): Likewise.
13728         (init_tu_and_read_dwo_dies): Likewise.
13729         (init_cutu_and_read_dies): Likewise.
13730         (init_cutu_and_read_dies_no_follow): Likewise.
13731         (allocate_type_unit_groups_table): Add objfile parameter.
13732         (create_type_unit_group): Use dwarf2_per_objfile from cu.
13733         (get_type_unit_group): Likewise.
13734         (process_psymtab_comp_unit): Update call.
13735         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13736         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13737         (print_tu_stats): Likewise.
13738         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13739         in void* parameter.
13740         (build_type_psymtabs): Change objfile parameter to
13741         dwarf2_per_objfile.
13742         (process_skeletonless_type_unit): Use dwarf2_per_objfile
13743         passed in void* parameter.
13744         (process_skeletonless_type_units): Change objfile parameter to
13745         dwarf2_per_objfile.
13746         (set_partial_user): Likewise.
13747         (dwarf2_build_psymtabs_hard): Likewise.
13748         (read_comp_units_from_section): Likewise.
13749         (create_all_comp_units): Likewise.
13750         (scan_partial_symbols): Update calls.
13751         (add_partial_symbol): Likewise.
13752         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13753         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13754         (process_queue): Add dwarf2_per_objfile parameter.
13755         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13756         (compute_compunit_symtab_includes): Likewise.
13757         (process_cu_includes): Add dwarf2_per_objfile parameter.
13758         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13759         (process_full_type_unit): Likewise.
13760         (process_imported_unit_die): Update call.
13761         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13762         (read_file_scope): Likewise.
13763         (allocate_dwo_file_hash_table): Add objfile parameter.
13764         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13765         (create_cus_hash_table): Likewise.
13766         (create_dwp_hash_table): Likewise.
13767         (create_dwo_unit_in_dwp_v1): Likewise.
13768         (create_dwp_v2_section): Likewise.
13769         (create_dwo_unit_in_dwp_v2): Likewise.
13770         (lookup_dwo_unit_in_dwp): Likewise.
13771         (try_open_dwop_file): Likewise.
13772         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13773         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13774         cleanup to include a reference to dwarf2_per_objfile.
13775         (open_dwp_file): Add dwarf2_per_objfile parameter.
13776         (open_and_init_dwp_file): Likewise.
13777         (get_dwp_file): Likewise.
13778         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13779         (queue_and_load_all_dwo_tus): Update call.
13780         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13781         data.
13782         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13783         (dwarf2_ranges_process): Likewise.
13784         (dwarf2_get_pc_bounds): Likewise.
13785         (mark_common_block_symbol_computed): Likewise.
13786         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13787         (dwarf2_read_abbrevs): Update call.
13788         (read_partial_die): Use dwarf2_per_objfile from cu.
13789         (find_partial_die): Likewise.
13790         (fixup_partial_die): Likewise.
13791         (read_attribute_value): Likewise.
13792         (read_indirect_string_at_offset_from): Add objfile parameter.
13793         (read_indirect_string_at_offset): Add dwarf2_per_objfile
13794         parameter.
13795         (read_indirect_string_from_dwz): Add objfile parameter.
13796         (read_indirect_string): Add objfile parameter.
13797         (read_addr_index_1): Add dwarf2_per_objfile parameter.
13798         (read_addr_index): Use dwarf2_per_objfile from cu.
13799         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13800         call dw2_setup.
13801         (read_str_index): Use dwarf2_per_objfile from cu.
13802         (get_debug_line_section): Likewise.
13803         (read_formatted_entries): Add dwarf2_per_objfile parameter.
13804         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13805         (new_symbol_full): Use dwarf2_per_objfile from cu.
13806         (build_error_marker_type): Likewise.
13807         (lookup_die_type): Likewise.
13808         (determine_prefix): Likewise.
13809         (follow_die_offset): Likewise.
13810         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13811         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13812         (dwarf2_fetch_die_type_sect_off): Likewise.
13813         (dwarf2_get_die_type): Likewise.
13814         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13815         (get_signatured_type): Likewise.
13816         (get_DW_AT_signature_type): Likewise.
13817         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13818         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13819         (cu_debug_loc_section): Likewise.
13820         (fill_in_loclist_baton): Likewise.
13821         (dwarf2_symbol_mark_computed): Likewise.
13822         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13823         dwarf2_per_objfile.
13824         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13825         parameter.
13826         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13827         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13828         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13829         (set_die_type): Use dwarf2_free_objfile from cu.
13830         (get_die_type_at_offset): Likewise.
13831         (dwarf2_per_objfile_free): Don't assign global variable.
13832         (debug_names) <constructor>: Add dwarf2_per_objfile
13833         parameter, update m_debugstrlookup construction.
13834         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13835         parameter.
13836         <m_dwarf2_per_objfile>: New field.
13837         <lookup>: Use m_dwarf2_per_objfile.
13838         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13839         (psyms_seen_size): Likewise.
13840         (write_gdbindex): Replace objfile parameter with
13841         dwarf2_per_objfile.
13842         (write_debug_names): Likewise.
13843         (write_psymtabs_to_index): Likewise.
13844         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13845         calls.
13846
13847 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13848
13849         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13850         <dwarf2_per_objfile>: New field.
13851         (struct dwarf2_per_cu_data) <objfile>: Remove.
13852         <dwarf2_per_objfile>: New field.
13853         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13854         of objfile.
13855         (create_signatured_type_table_from_index): Likewise.
13856         (create_debug_type_hash_table): Likewise.
13857         (fill_in_sig_entry_from_dwo_entry): Likewise.
13858         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13859         (create_type_unit_group): Assign dwarf2_per_objfile instead of
13860         objfile.
13861         (create_partial_symtab): Access objfile through
13862         dwarf2_per_objfile.
13863         (process_psymtab_comp_unit_reader): Likewise.
13864         (read_comp_units_from_section): Likewise.
13865         (scan_partial_symbols): Likewise.
13866         (add_partial_symbol): Likewise.
13867         (add_partial_subprogram): Likewise.
13868         (peek_die_abbrev): Likewise.
13869         (fixup_go_packaging): Likewise.
13870         (process_full_comp_unit): Likewise.
13871         (process_full_type_unit): Likewise.
13872         (process_imported_unit_die): Likewise.
13873         (dwarf2_compute_name): Likewise.
13874         (dwarf2_physname): Likewise.
13875         (read_import_statement): Likewise.
13876         (create_cus_hash_table): Assign dwarf2_physname instead of
13877         objfile.
13878         (read_func_scope): Access objfile through dwarf2_per_objfile.
13879         (read_lexical_block_scope): Likewise.
13880         (read_call_site_scope): Likewise.
13881         (read_variable): Likewise.
13882         (dwarf2_rnglists_process): Likewise.
13883         (dwarf2_ranges_process): Likewise.
13884         (dwarf2_ranges_read): Likewise.
13885         (dwarf2_record_block_ranges): Likewise.
13886         (dwarf2_add_field): Likewise.
13887         (dwarf2_add_member_fn): Likewise.
13888         (read_structure_type): Likewise.
13889         (process_structure_scope): Likewise.
13890         (read_enumeration_type): Likewise.
13891         (read_array_type): Likewise.
13892         (read_common_block): Likewise.
13893         (read_namespace_type): Likewise.
13894         (read_namespace): Likewise.
13895         (read_module_type): Likewise.
13896         (read_tag_pointer_type): Likewise.
13897         (read_tag_ptr_to_member_type): Likewise.
13898         (read_tag_string_type): Likewise.
13899         (read_subroutine_type): Likewise.
13900         (read_typedef): Likewise.
13901         (read_base_type): Likewise.
13902         (attr_to_dynamic_prop): Likewise.
13903         (read_subrange_type): Likewise.
13904         (read_unspecified_type): Likewise.
13905         (load_partial_dies): Likewise.
13906         (read_partial_die): Likewise.
13907         (find_partial_die): Likewise.
13908         (guess_partial_die_structure_name): Likewise.
13909         (fixup_partial_die): Likewise.
13910         (read_attribute_value): Likewise.
13911         (read_addr_index_from_leb128): Likewise.
13912         (dwarf2_read_addr_index): Likewise.
13913         (dwarf2_string_attr): Likewise.
13914         (lnp_state_machine::check_line_address): Likewise.
13915         (dwarf_decode_lines_1): Likewise.
13916         (dwarf_decode_lines): Likewise.
13917         (dwarf2_start_symtab): Likewise.
13918         (var_decode_location): Likewise.
13919         (new_symbol_full): Likewise.
13920         (dwarf2_const_value_data): Likewise.
13921         (dwarf2_const_value_attr): Likewise.
13922         (dwarf2_const_value): Likewise.
13923         (die_type): Likewise.
13924         (die_containing_type): Likewise.
13925         (lookup_die_type): Likewise.
13926         (guess_full_die_structure_name): Likewise.
13927         (anonymous_struct_prefix): Likewise.
13928         (dwarf2_name): Likewise.
13929         (follow_die_ref_or_sig): Likewise.
13930         (follow_die_offset): Likewise.
13931         (follow_die_ref): Likewise.
13932         (dwarf2_fetch_die_loc_sect_off): Likewise.
13933         (dwarf2_fetch_constant_bytes): Likewise.
13934         (dwarf2_fetch_die_type_sect_off): Likewise.
13935         (dwarf2_get_die_type): Likewise.
13936         (follow_die_sig): Likewise.
13937         (decode_locdesc): Likewise.
13938         (dwarf2_per_cu_objfile): Likewise.
13939         (dwarf2_per_cu_text_offset): Likewise.
13940         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
13941         objfile.
13942         (set_die_type): Access objfile through
13943         dwarf2_per_objfile.
13944
13945 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13946
13947         * valprint.c (converted_character_d): Remove typedef.
13948         (DEF_VEC_O (converted_character_d)): Remove.
13949         (count_next_character): Use std::vector.
13950         (print_converted_chars_to_obstack): Likewise.
13951         (generic_printstr): Likewise.
13952
13953 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13954
13955         * xml-support.h (struct gdb_xml_value): Add constructor.
13956         <value>: Change type to unique_xmalloc_ptr.
13957         (gdb_xml_value_s): Remove typedef.
13958         (DEF_VEC_O (gdb_xml_value_s)): Remove.
13959         (gdb_xml_element_start_handler): Change parameter type to
13960         std::vector.
13961         (xml_find_attribute): Likewise.
13962         * xml-support.c (xml_find_attribute): Change parameter type to
13963         std::vector and adjust.
13964         (gdb_xml_values_cleanup): Remove.
13965         (gdb_xml_parser::start_element): Adjust to std::vector.
13966         (xinclude_start_include): Change paraeter type to std::vector
13967         and adjust.
13968         * btrace.c (check_xml_btrace_version): Likewise.
13969         (parse_xml_btrace_block): Likewise.
13970         (parse_xml_btrace_pt_config_cpu): Likewise.
13971         (parse_xml_btrace_pt): Likewise.
13972         (parse_xml_btrace_conf_bts): Likewise.
13973         (parse_xml_btrace_conf_pt): Likewise.
13974         * memory-map.c (memory_map_start_memory): Likewise.
13975         (memory_map_start_property): Likewise.
13976         * osdata.c (osdata_start_osdata): Likewise.
13977         (osdata_start_item): Likewise.
13978         (osdata_start_column): Likewise.
13979         * remote.c (start_thread): Likewise.
13980         * solib-aix.c (library_list_start_library): Likewise.
13981         (library_list_start_list): Likewise.
13982         * solib-svr4.c (library_list_start_library): Likewise.
13983         (svr4_library_list_start_list): Likewise.
13984         * solib-target.c (library_list_start_segment): Likewise.
13985         (library_list_start_section): Likewise.
13986         (library_list_start_library): Likewise.
13987         (library_list_start_list): Likewise.
13988         * tracepoint.c (traceframe_info_start_memory): Likewise.
13989         (traceframe_info_start_tvar): Likewise.
13990         * xml-syscall.c (syscall_start_syscall): Likewise.
13991         * xml-tdesc.c (tdesc_start_target): Likewise.
13992         (tdesc_start_feature): Likewise.
13993         (tdesc_start_reg): Likewise.
13994         (tdesc_start_union): Likewise.
13995         (tdesc_start_struct): Likewise.
13996         (tdesc_start_flags): Likewise.
13997         (tdesc_start_enum): Likewise.
13998         (tdesc_start_field): Likewise.
13999         (tdesc_start_enum_value): Likewise.
14000         (tdesc_start_vector): Likewise.
14001
14002 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14003
14004         * extension.h (struct xmethod_worker) <clone>: Remove.
14005         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14006         Remove.
14007         (python_xmethod_worker::clone): Remove.
14008         * valops.c (find_overload_match): Use std::move instead of
14009         clone.
14010
14011 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14012
14013         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14014         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14015         <free_xmethod_worker_data>: Remove.
14016         <get_matching_xmethod_workers>: Chance VEC to std::vector.
14017         <get_xmethod_arg_types>: Remove.
14018         <get_xmethod_result_type>: Remove.
14019         <invoke_xmethod>: Remove.
14020         * extension.c (new_xmethod_worker): Remove.
14021         (clone_xmethod_worker): Remove.
14022         (get_matching_xmethod_workers): Return void, pass std::vector by
14023         pointer.
14024         (get_xmethod_arg_types): Rename to...
14025         (xmethod_worker::get_arg_types): ... this, and adjust.
14026         (get_xmethod_result_type): Rename to...
14027         (xmethod_worker::get_result_type): ... this, and adjust.
14028         (invoke_xmethod): Remove.
14029         (free_xmethod_worker): Remove.
14030         (free_xmethod_worker_vec): Remove.
14031         * extension.h (enum ext_lang_rc): Move here from
14032         extension-priv.h.
14033         (struct xmethod_worker): Add constructor and destructor.
14034         <data>: Remove.
14035         <value>: Remove.
14036         <invoke, clone, do_get_result_type, do_get_arg_types>: New
14037         virtual pure methods.
14038         <get_arg_types, get_result_type>: New methods.
14039         (xmethod_worker_ptr): Remove typedef.
14040         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14041         (xmethod_worker_vec): Remove typedef.
14042         (xmethod_worker_up): New typedef.
14043         (invoke_xmethod): Remove.
14044         (clone_xmethod_worker): Remove.
14045         (free_xmethod_worker): Remove.
14046         (free_xmethod_worker_vec): Remove.
14047         (get_xmethod_arg_types): Remove.
14048         (get_xmethod_result_type): Remove.
14049         * valops.c (find_method_list): Use std::vector, don't use
14050         intermediate vector.
14051         (value_find_oload_method_list): Use std::vector.
14052         (find_overload_match): Use std::vector.
14053         (find_oload_champ): Use std::vector.
14054         * value.c (value_free): Use operator delete.
14055         (value_of_xmethod): Rename to...
14056         (value_from_xmethod): ... this.  Don't assign
14057         xmethod_worker::value, take rvalue-reference.
14058         (result_type_of_xmethod): Adjust.
14059         (call_xmethod): Adjust.
14060         * value.h: Include extension.h.
14061         (struct xmethod_worker): Don't forward-declare.
14062         (value_of_xmethod): Rename to...
14063         (value_from_xmethod): ... this, take rvalue-reference.
14064         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14065         (struct python_xmethod_worker): ... this, add constructor and
14066         destructor.
14067         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14068         (gdbpy_free_xmethod_worker_data): Rename to...
14069         (python_xmethod_worker::~python_xmethod_worker): ... this and
14070         adjust.
14071         (gdbpy_clone_xmethod_worker_data): Rename to...
14072         (python_xmethod_worker::clone): ... this and adjust.
14073         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14074         temporary vector.
14075         (gdbpy_get_xmethod_arg_types): Rename to...
14076         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14077         (gdbpy_get_xmethod_result_type): Rename to...
14078         (python_xmethod_worker::do_get_result_type): ... this and
14079         adjust.
14080         (gdbpy_invoke_xmethod): Rename to...
14081         (python_xmethod_worker::invoke): ... this and adjust.
14082         (new_python_xmethod_worker): Rename to...
14083         (python_xmethod_worker::python_xmethod_worker): ... this and
14084         adjust.
14085         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14086         Remove.
14087         (gdbpy_free_xmethod_worker_data): Remove.
14088         (gdbpy_get_matching_xmethod_workers): Use std::vector.
14089         (gdbpy_get_xmethod_arg_types): Remove.
14090         (gdbpy_get_xmethod_result_type): Remove.
14091         (gdbpy_invoke_xmethod): Remove.
14092         * python/python.c (python_extension_ops): Remove obsolete
14093         callbacks.
14094
14095 2018-01-05  Pedro Alves  <palves@redhat.com>
14096
14097         PR gdb/18653
14098         * common/signals-state-save-restore.c
14099         (save_original_signals_state): New parameter 'quiet'.  Warn if we
14100         find a custom handler preinstalled, instead of internal erroring.
14101         But only warn if !quiet.
14102         * common/signals-state-save-restore.h
14103         (save_original_signals_state): New parameter 'quiet'.
14104         * main.c (captured_main_1): Move save_original_signals_state call
14105         after option handling, and pass QUIET.
14106
14107 2018-01-05  Pedro Alves  <palves@redhat.com>
14108
14109         * spu-tdep.c (spu_catch_start): Pass
14110         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14111
14112 2018-01-05  Pedro Alves  <palves@redhat.com>
14113
14114         PR gdb/22670
14115         * ada-lang.c (literal_symbol_name_matcher): New function.
14116         (ada_get_symbol_name_matcher): Use it for
14117         symbol_name_match_type::SEARCH_NAME.
14118         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
14119         it down instead of assuming symbol_name_match_type::FULL.
14120         * block.h (block_lookup_symbol): New parameter 'match_type'.
14121         * c-valprint.c (print_unpacked_pointer): Use
14122         lookup_symbol_search_name instead of lookup_symbol.
14123         * compile/compile-object-load.c (get_out_value_type): Pass down
14124         symbol_name_match_type::SEARCH_NAME.
14125         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14126         symbol_name_match_type::FULL.
14127         * cp-support.c (cp_get_symbol_name_matcher): Handle
14128         symbol_name_match_type::SEARCH_NAME.
14129         * infrun.c (insert_exception_resume_breakpoint): Use
14130         lookup_symbol_search_name.
14131         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14132         * psymtab.c (maintenance_check_psymtabs): Use
14133         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14134         * stack.c (print_frame_args): Use lookup_symbol_search_name and
14135         SYMBOL_SEARCH_NAME.
14136         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14137         if symbol_name_match_type::SEARCH_NAME.
14138         (lookup_symbol_in_language): Pass down
14139         symbol_name_match_type::FULL.
14140         (lookup_symbol_search_name): New.
14141         (lookup_language_this): Pass down
14142         symbol_name_match_type::SEARCH_NAME.
14143         (lookup_symbol_aux, lookup_local_symbol): New parameter
14144         'match_type'.  Pass it down.
14145         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14146         (lookup_symbol_search_name): New declaration.
14147         (lookup_symbol_in_block): New 'match_type' parameter.
14148
14149 2018-01-05  Pedro Alves  <palves@redhat.com>
14150
14151         PR gdb/22670
14152         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14153         ada_lookup_symbol.
14154         (ada_lookup_symbol): Reimplement in terms of
14155         ada_lookup_symbol_list, bits factored out from
14156         ada_lookup_encoded_symbol.
14157
14158 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14159
14160         * ada-exp.y (write_object_renaming): When subscripting an array
14161         using a symbol as the index, pass the block in call to
14162         ada_lookup_encoded_symbol when looking that symbol up.
14163
14164 2018-01-05  Jerome Guitton  <guitton@adacore.com>
14165
14166         * ada-lang.c (ada_array_length): Use ada_index_type instead of
14167         TYPE_INDEX_TYPE.
14168
14169 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14170
14171         * ada-lang.c (ada_to_fixed_value_create): Add handling of
14172         the case where VALUE_LVAL (val0) is not lval_memory.
14173
14174 2018-01-05  Xavier Roirand  <roirand@adacore.com>
14175
14176         * ada-valprint.c (print_optional_low_bound): Handle
14177         character-indexed array printing like boolean-indexed array
14178         printing.
14179
14180 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14181
14182         * NEWS: Create a new section for the next release branch.
14183         Rename the section of the current branch, now that it has
14184         been cut.
14185
14186 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14187
14188         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14189         * version.in: Bump version to 8.1.50.DATE-git.
14190
14191 2018-01-03  Xavier Roirand  <roirand@adacore.com>
14192
14193         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14194         Add field.
14195         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14196         Add field.
14197         (default_exception_support_info) <catch_handlers_sym>: Add field.
14198         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14199         (ada_exception_name_addr_1): Add "catch handlers" handling.
14200         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14201         Update all callers.
14202         (create_excep_cond_exprs) <ex>: Add parameter.
14203         (re_set_exception): Update create_excep_cond_exprs call.
14204         (print_it_exception, print_one_exception, print_mention_exception)
14205         (print_recreate_exception): Add "catch handler" handling.
14206         (allocate_location_catch_handlers, re_set_catch_handlers)
14207         (check_status_catch_handlers, print_it_catch_handlers)
14208         (print_one_catch_handlers, print_mention_catch_handlers)
14209         (print_recreate_catch_handlers): New function.
14210         (catch_handlers_breakpoint_ops): New variable.
14211         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14212         Add parameter.  Add "catch handler" handling.
14213         (ada_exception_sym_name, ada_exception_breakpoint_ops):
14214         Add "catch handler" handling.
14215         (ada_exception_catchpoint_cond_string): Add "catch handler"
14216         handling.
14217         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14218         call.
14219         (catch_ada_handlers_command): New function.
14220         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14221         operations structure.
14222         (_initialize_ada_language): Add "catch handlers" command entry.
14223         * NEWS: Document "catch handlers" feature.
14224
14225 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14226
14227         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14228         account when creating the array type of the slice.
14229         (ada_value_slice): Likewise.
14230
14231 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14232
14233         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14234         New enum value.
14235         (create_array_type_with_stride): Add byte_stride_prop parameter.
14236         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14237         New parameter.  Update all callers in this file.
14238         (array_type_has_dynamic_stride): New function.
14239         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14240         of arrays with dynamic byte strides.
14241         * dwarf2read.c (read_array_type): Add support for dynamic
14242         DW_AT_byte_stride attributes.
14243
14244 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14245
14246         * dwarf2read.c (read_unspecified_type): Treat
14247         DW_TAG_enumeration_type DIEs from Ada units as stubs.
14248
14249 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14250
14251         Update copyright year range in all GDB files.
14252
14253 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
14254
14255         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14256         and gdb/testsuite/gdb.base/step-line.c.
14257
14258 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14259
14260         * copyright.py (main): Dump the contents of
14261         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14262         even if BY_HAND is empty.
14263
14264 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14265
14266         * top.c (print_gdb_version): Update Copyright year in version
14267         message.
14268
14269 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14270
14271         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14272
14273 For older changes see ChangeLog-2017.
14274 \f
14275 Local Variables:
14276 mode: change-log
14277 left-margin: 8
14278 fill-column: 74
14279 version-control: never
14280 coding: utf-8
14281 End: