Fix undefined behavior, don't pass NULL to fwrite
[external/binutils.git] / gdb / ChangeLog
1 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
2
3         * dwarf-index-write.c (file_write): Don't write if the vector is
4         empty.
5
6 2018-10-05  Tom de Vries  <tdevries@suse.de>
7
8         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
9         PyArg_ParseTuple call.
10
11 2018-10-05  Tom de Vries  <tdevries@suse.de>
12
13         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
14         PyArg_ParseTuple call.
15
16 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
17
18         * psymtab.c (recursively_search_psymtabs): Reformat parameters
19         to avoid exceeding 80 characters per line limit.
20
21 2018-10-04  Tom Tromey  <tom@tromey.com>
22
23         * symfile.c (syms_from_objfile_1, finish_new_objfile)
24         (reread_symbols): Update.
25         * complaints.h (clear_complaints): Remove argument.
26         * complaints.c (enum complaint_series): Remove.
27         (series): Remove global.
28         (complaint_internal): Update.
29         (clear_complaints): Remove argument.
30
31 2018-10-04  Tom Tromey  <tom@tromey.com>
32
33         * symfile.c (symbol_file_add_with_addrs): Do not print "no
34         debugging symbols" message if there is a separate debug objfile.
35
36 2018-10-04  Tom Tromey  <tom@tromey.com>
37
38         PR cli/19551:
39         * symfile.c (symbol_file_add_with_addrs): Update output.
40         * psymtab.c (require_partial_symbols): Update output.
41
42 2018-10-04  Tom Tromey  <tom@tromey.com>
43
44         PR cli/22234:
45         * complaints.c: Emit \n.
46
47 2018-10-04  Tom Tromey  <tom@tromey.com>
48
49         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
50         (separate_debug_file_exists, find_separate_debug_file)
51         (add_symbol_file_command, reread_symbols, allocate_symtab)
52         (allocate_compunit_symtab): Use filtered printing, not
53         unfiltered.
54         * psymtab.c (require_partial_symbols, dump_psymtab)
55         (allocate_psymtab): Use filtered printing, not unfiltered.
56
57 2018-10-04  Tom Tromey  <tom@tromey.com>
58
59         * complaints.c (complaint_internal): Correctly check complaint
60         count.
61
62 2018-10-04  Tom Tromey  <tom@tromey.com>
63
64         * complaints.h (struct complaints): Remove declaration.
65         * complaints.c (clear_complaints): Remove an unused variable.
66
67 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
68
69         * MAINTAINERS (Write After Approval): Add self.
70
71 2018-10-03  Tom Tromey  <tom@tromey.com>
72
73         * guile/scm-value.c (gdbscm_value_to_string): Initialize
74         "buffer_contents".
75         * coffread.c (coff_symtab_read): Initialize "newobj".
76
77 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
78
79         * dwarf2read.c (read_func_scope): Remove struct keyword in
80         range-based for.
81
82 2018-10-03  Tom Tromey  <tom@tromey.com>
83
84         * README: Mention --enable-ubsan.
85         * NEWS: Mention --enable-ubsan.
86         * acinclude.m4: Include sanitize.m4.
87         * configure: Rebuild.
88         * configure.ac: Call AM_GDB_UBSAN.
89         * sanitize.m4: New file.
90
91 2018-10-03  Tom Tromey  <tom@tromey.com>
92
93         * expression.h (enum exp_opcode): Use uint8_t as base type.
94         * expprint.c (op_name): Handle invalid opcodes.
95
96 2018-10-03  Tom Tromey  <tom@tromey.com>
97
98         * parse.c (prefixify_expression): Add assert.
99         (parse_exp_in_context_1): Throw exception if the expression is
100         empty.
101
102 2018-10-03  Tom Tromey  <tom@tromey.com>
103
104         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
105
106 2018-10-03  Tom Tromey  <tom@tromey.com>
107
108         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
109
110 2018-10-03  Tom Tromey  <tom@tromey.com>
111
112         * dwarf2read.c (read_subrange_type): Make "negative_mask"
113         unsigned.
114
115 2018-10-03  Tom Tromey  <tom@tromey.com>
116
117         * findvar.c (extract_integer): Do work in an unsigned type.
118
119 2018-10-03  Tom Tromey  <tom@tromey.com>
120
121         * common/enum-flags.h (enum_flags::operator~): Add static assert.
122         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
123         base type.
124         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
125         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
126         type.
127         * c-lang.h (enum c_string_type_values): Use unsigned as base
128         type.
129         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
130
131 2018-10-03  Tom Tromey  <tom@tromey.com>
132
133         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
134         <~dwarf2_frame_state_reg_info>: Update.
135         <dwarf2_frame_state_reg_info>: Update.
136         <alloc_regs>: Add assertion.  Update.
137         <reg>: Now a std::vector.
138         <num_regs>: Remove.
139         <swap>: Update.
140         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
141         (execute_cfa_program_test, dwarf2_frame_cache): Update.
142
143 2018-10-03  Tom Tromey  <tom@tromey.com>
144
145         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
146
147 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
148
149         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
150
151 2018-10-02  Tom Tromey  <tom@tromey.com>
152
153         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
154
155 2018-10-02  John Darrington <john@darrington.wattle.id.au>
156
157         * NEWS: Mention changed commands.
158         * ser-uds.c: New file.
159         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
160         * configure: Regenerate.
161         * Makefile.in: Add new file.
162         * serial.c (serial_open): Check if filename is a socket
163           and lookup the appropriate interface accordingly.
164
165 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
166
167         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
168         define.
169         (AARCH64_EXTRA_MAGIC): Likewise.
170         (AARCH64_FPSIMD_MAGIC): Likewise.
171         (AARCH64_SVE_MAGIC): Likewise.
172         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
173         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
174         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
175         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
176         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
177         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
178         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
179         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
180         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
181         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
182         (read_aarch64_ctx): Add function.
183         (aarch64_linux_sigframe_init): Detect FP registers.
184
185 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
186
187         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
188         (AARCH64_D0_REGNUM): Likewise.
189         (AARCH64_S0_REGNUM): Likewise.
190         (AARCH64_H0_REGNUM): Likewise.
191         (AARCH64_B0_REGNUM): Likewise.
192         (AARCH64_SVE_V0_REGNUM): Likewise.
193         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
194         (AARCH64_D0_REGNUM): Likewise.
195         (AARCH64_S0_REGNUM): Likewise.
196         (AARCH64_H0_REGNUM): Likewise.
197         (AARCH64_B0_REGNUM): Likewise.
198         (AARCH64_SVE_V0_REGNUM): Likewise.
199
200 2018-10-01  Gary Benson <gbenson@redhat.com>
201
202         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
203         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
204         prfpregset_t instead of gdb_prfpregset_t.
205         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
206         * configure, config.in: Rebuild.
207
208 2018-10-01  Gary Benson <gbenson@redhat.com>
209
210         * common/gdb_proc_service.h: New file, factored out from...
211         * gdb_proc_service.h: Moved common code to the above file.
212         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
213
214 2018-10-01  Gary Benson <gbenson@redhat.com>
215
216         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
217         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
218
219 2018-10-01  Gary Benson <gbenson@redhat.com>
220
221         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
222         (AC_CHECK_HEADERS): Check for linux/elf.h.
223         * configure, config.in: Rebuild.
224         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
225         doesn't define elf_fpregset_t.
226
227 2018-10-01  Gary Benson <gbenson@redhat.com>
228
229         * gdb_proc_service.h: Whitespace change.
230
231 2018-10-01  Tom Tromey  <tom@tromey.com>
232
233         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
234         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
235         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
236
237 2018-10-01  Tom Tromey  <tom@tromey.com>
238
239         * README: Minor change.
240
241 2018-09-30  Pedro Alves  <palves@redhat.com>
242
243         * darwin-nat-info.c (darwin_debug_regions_recurse)
244         (info_mach_exceptions_command): Remove unused local variables.
245         * darwin-nat.c (darwin_decode_notify_message)
246         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
247         (darwin_stop_inferior, darwin_setup_exceptions)
248         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
249         (darwin_nat_target::attach, darwin_nat_target::detach)
250         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
251         local variables.
252         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
253         variables.
254
255 2018-09-29  Tom Tromey  <tom@tromey.com>
256
257         * README: Remove some leftover text.
258
259 2018-09-29  Tom Tromey  <tom@tromey.com>
260
261         * PROBLEMS: Rewrite.
262         * README: Update.
263
264 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
265
266         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
267         case with explicit breakpoint kind.
268         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
269         'additional_info' and related logic.
270         (riscv_debug_breakpoints): New variable.
271         (riscv_breakpoint_kind_from_pc): Use the length of the existing
272         instruction to determine the breakpoint kind.
273         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
274         flag.  Update description of 'set/show riscv
275         use-compressed-breakpoints' flag.
276
277 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
278
279         (NEWS): Mention changes to frame related commands.
280         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
281         (add_prefix_cmd_suppress_notification): New function.
282         (add_com_suppress_notification): Call
283         add_cmd_suppress_notification.
284         * command.h (add_cmd_suppress_notification): Declare.
285         (add_prefix_cmd_suppress_notification): Declare.
286         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
287         (parse_frame_specification): Moved from stack.c, with
288         simplification to handle a single argument.
289         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
290         switch to the selected frame.  Add a header comment.
291         * stack.c: Remove 'safe-ctype.h' include.
292         (find_frame_for_function): Add declaration.
293         (find_frame_for_address): New function.
294         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
295         (frame_selection_by_function_completer): New function.
296         (info_frame_command): Rename to...
297         (info_frame_command_core): ...this, and update parameter types.
298         (select_frame_command): Rename to...
299         (select_frame_command_core): ...this, and update parameter types.
300         (frame_command): Rename to...
301         (frame_command_core): ...this, and update parameter types.
302         (class frame_command_helper): New class to wrap implementations of
303         frame related sub-commands.
304         (frame_apply_cmd_list): New static global.
305         (frame_cmd_list): Make static.
306         (select_frame_cmd_list): New global for sub-commands.
307         (info_frame_cmd_list): New global for sub-commands.
308         (_initialize_stack): Register sub-commands for 'frame',
309         'select-frame', and 'info frame'.  Update 'frame apply' commands
310         to use frame_apply_cmd_list.  Move function local static
311         frame_apply_list to file static frame_apply_cmd_list for
312         consistency.
313         * stack.h (select_frame_command): Delete declarationn.
314         (select_frame_for_mi): Declare new function.
315
316 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
317
318         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
319         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
320         and NOP.
321
322 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
323
324         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
325
326 2018-09-26  Tom Tromey  <tom@tromey.com>
327
328         * valops.c (auto_abandon): Remove dead code.
329
330 2018-09-26  Tom Tromey  <tom@tromey.com>
331
332         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
333
334 2018-09-24  Tom Tromey  <tom@tromey.com>
335
336         * common/pathstuff.c (get_standard_cache_dir): Make
337         "xdg_cache_home" and "home" const.
338         * top.c (init_history): Make "tmpenv" const.
339         * main.c (get_init_files): Make "homedir" const.
340
341 2018-09-23  Tom Tromey  <tom@tromey.com>
342
343         PR python/18852:
344         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
345
346 2018-09-23  Tom Tromey  <tom@tromey.com>
347
348         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
349         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
350         * python/python-internal.h (gdbpy_handle_exception): Declare.
351         * python/py-utils.c (gdbpy_handle_exception): New function.
352
353 2018-09-23  Tom Tromey  <tom@tromey.com>
354
355         PR python/17284:
356         * python/py-type.c (typy_template_argument): Check for negative
357         argument number.
358
359 2018-09-23  Tom Tromey  <tom@tromey.com>
360
361         PR python/14062:
362         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
363
364 2018-09-23  Tom Tromey  <tom@tromey.com>
365
366         PR python/18170:
367         * python/py-value.c (valpy_int): Allow conversion from pointer
368         type.
369
370 2018-09-23  Tom Tromey  <tom@tromey.com>
371
372         PR python/20126:
373         * python/py-value.c (valpy_int): Respect type sign.
374
375 2018-09-23  Tom Tromey  <tom@tromey.com>
376
377         PR python/18352;
378         * python/py-value.c (valpy_float): Allow conversions from int or
379         char.
380         (valpy_int, valpy_long): Allow conversions from float.
381
382 2018-09-23  Tom Tromey  <tom@tromey.com>
383
384         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
385         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
386
387 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
388
389         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
390         __sighndlr.
391         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
392
393 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
394
395         * windows-nat.c (windows_nat_target::wait): Remove a spurious
396         target_terminal::ours().
397
398 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
399
400         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
401         of vl to ULONGEST.
402
403 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
404
405         * breakpoint.c (update_inserted_breakpoint_locations): Remove
406         redundant condition.
407
408 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
409
410         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
411
412         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
413         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
414         * sol-thread.c (ps_pdmodel): Don't guard definition.
415
416         * procfs.c: Fix formatting.
417
418         * procfs.c (sysset_t_alloc): Remove.
419         (create_procinfo): Use XNEW instead of sysset_t_alloc.
420         (procfs_debug_inferior): Likewise.
421         (procfs_set_exec_trap): Likewise.
422         (proc_set_traced_sysentry): Don't allocate argp dynamically.
423         (proc_set_traced_sysexit): Likewise.
424
425         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
426         (dead_procinfo): Likewise.
427         (proc_warn): Likewise.
428         (proc_error): Likewise.
429         (proc_get_LDT_entry): Likewise.
430         (do_attach): Likewise.
431         (procfs_target::pid_to_str): Likewise.
432         (iterate_over_mappings): Likewise.
433
434         * procfs.c (create_procinfo): Fix ARI warning.
435         (proc_get_status): Likewise.
436         (proc_stop_process): Likewise.
437         (proc_run_process): Likewise.
438         (proc_kill): Likewise.
439         (proc_get_LDT_entry): Likewise.
440         (procfs_find_LDT_entry): Likewise.
441         (proc_update_threads): Likewise.
442         (proc_iterate_over_threads): Likewise.
443         (do_attach): Likewise.
444         (procfs_xfer_memory): Likewise.
445         (invalidate_cache): Likewise.
446         (procfs_target::resume): Likewise.
447         (procfs_init_inferior): Likewise.
448         (procfs_set_exec_trap): Likewise.
449         (procfs_target::thread_alive): Likewise.
450         (procfs_target::pid_to_exec_file): Likewise.
451         (iterate_over_mappings): Likewise.
452         (procfs_target::make_corefile_notes): Likewise.
453         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
454
455         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
456         (procfs_find_LDT_entry): Likewise.
457         * sol-thread.c (ps_lgetLDT): Likewise.
458
459 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
460
461         PR tdep/17903
462         * procfs.c (procfs_target): Declare pid_to_exec_file.
463         (procfs_target::pid_to_exec_file): New.
464
465 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
466
467         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
468         renaming.
469         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
470         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
471
472 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
473
474         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
475         (supply_fpregset, fill_fpregset): Move ...
476         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
477         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
478         Remove references to ioctl-based procfs.
479         Include <sys/reg.h>.
480         Remove PR_MODEL_NATIVE guards.
481         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
482         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
483
484 2018-09-19  Xavier Roirand  <roirand@adacore.com>
485
486         PR gdb/20981:
487         * solib-darwin.c (darwin_get_dyld_bfd): New function.
488         (darwin_solib_get_all_image_info_addr_at_init): Update call.
489         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
490
491 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
492
493         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
494         (fbsd_print_sockaddr_in6): Likewise.
495
496 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
497             Chris January  <chris.january@arm.com>
498
499         * eval.c (skip_undetermined_arglist): Skip argument list helper.
500         (evaluate_subexp_standard): Return a dummy type when
501         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
502         OP_F77_UNDETERMINED_ARGLIST case.
503         * expression.h (enum noside): Update comment.
504
505 2018-09-19  George Vasick <george.vasick@oracle.com>
506
507         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
508
509 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
510             April Chin <april.chin@oracle.com>
511             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
512
513         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
514         uint_t lwpid_t.
515         (create_procinfo): Print pids in /proc without leading zeros.
516
517 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
518
519         * nios2-tdep.c (nios2_gcc_target_options): New.
520         (nios2_gdb_arch_init): Install new hook.
521
522 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
523
524         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
525         New file.
526         * update-gnulib.sh: Apply patch.
527         * configure: Re-generate.
528
529 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
530
531         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
532         description.  Make "info proc" command descriptions more
533         consistent.
534
535 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
536
537         * NEWS: Mention 'info proc files' command.
538
539 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
540
541         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
542         descriptors for IP_FILES and IP_ALL.
543
544 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
545
546         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
547         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
548         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
549         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
550         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
551         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
552         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
553         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
554         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
555         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
556         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
557         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
558         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
559         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
560         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
561         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
562         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
563         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
564         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
565         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
566         (struct fbsd_sockaddr_un): New types.
567         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
568         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
569         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
570         (fbsd_core_info_proc_files): New functions.
571         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
572         IP_ALL.
573         * fbsd-tdep.h (fbsd_info_proc_files_header)
574         (fbsd_info_proc_files_entry): New.
575
576 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
577
578         * defs.h (enum info_proc_what) [IP_FILES]: New value.
579         * infcmd.c (info_proc_cmd_files): New function.
580         (_initialize_infcmd): Register 'info proc files' command.
581
582 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
583
584         * gnulib/aclocal-m4-deps.mk: Re-generate.
585         * gnulib/aclocal.m4: Re-generate.
586         * gnulib/config.in: Re-generate.
587         * gnulib/configure: Re-generate.
588         * gnulib/import/Makefile.am: Re-generate.
589         * gnulib/import/Makefile.in: Re-generate.
590         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
591         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
592         * gnulib/import/arpa_inet.in.h: New file.
593         * gnulib/import/inet_ntop.c: New file.
594         * gnulib/import/m4/arpa_inet_h.m4: New file.
595         * gnulib/import/m4/inet_ntop.m4: New file.
596         * gnulib/import/m4/netinet_in_h.m4: New file.
597         * gnulib/import/m4/socklen.m4: New file.
598         * gnulib/import/m4/sockpfaf.m4: New file.
599         * gnulib/import/m4/stdalign.m4: New file.
600         * gnulib/import/m4/sys_uio_h.m4: New file.
601         * gnulib/import/netinet_in.in.h: New file.
602         * gnulib/import/stdalign.in.h: New file.
603         * gnulib/import/sys_socket.c: New file.
604         * gnulib/import/sys_socket.in.h: New file.
605         * gnulib/import/sys_uio.in.h: New file.
606         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
607         module.
608
609 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
610
611         * gnulib/aclocal-m4-deps.mk: New file.
612         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
613         deterministically.
614
615 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
616
617         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
618         KVE_PATH.
619
620 2018-09-18  Tom Tromey  <tom@tromey.com>
621
622         * compile/compile-object-load.c (struct
623         link_hash_table_cleanup_data): Add constructor and destructor.
624         Use DISABLE_COPY_AND_ASSIGN.
625         (~link_hash_table_cleanup_data): Rename from
626         link_hash_table_free.  Now a destructor.
627         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
628
629 2018-09-18  Tom Tromey  <tom@tromey.com>
630
631         * compile/compile-object-run.c (do_module_cleanup): Use delete.
632         * compile/compile-object-load.c (struct munmap_list): Move to
633         header file.
634         (munmap_list::add): Rename from munmap_list_add; rewrite.
635         (munmap_list::~munmap_list): Rename from munmap_list_free.
636         (munmap_listp_free_cleanup): Remove.
637         (compile_object_load): Update.
638         * compile/compile-object-load.h (struct munmap_list): Move from
639         compile-object-load.c.  Rewrite.
640
641 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
642
643         * aarch64-tdep.c (pass_in_v): Use register size.
644         (aarch64_extract_return_value): Likewise.
645         (aarch64_store_return_value): Likewise.
646
647 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
648
649         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
650         rlim_t.
651
652 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
653
654         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
655         Fix short help line.
656
657 2018-09-17  Tom Tromey  <tom@tromey.com>
658
659         PR python/20445:
660         * configure: Rebuild.
661         * configure.ac: Conditionally use -DNDEBUG for Python.
662
663 2018-09-17  Tom Tromey  <tom@tromey.com>
664
665         * configure: Rebuild.
666         * configure.ac: Use gmp as a library dependency when checking for
667         mpfr.
668
669 2018-09-17  Pedro Alves  <palves@redhat.com>
670
671         * python/py-inferior.c (find_inferior_object): Delete.
672
673 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
674
675         * compile/compile-cplus-types.c
676         (compile_cplus_instance::enter_scope): Don't use new_scope after
677         std::move.
678
679 2018-09-17  Tom Tromey  <tom@tromey.com>
680
681         * common/pathstuff.c (get_standard_cache_dir): Use
682         ~/Library/Caches on macOS.
683         * common/pathstuff.h (get_standard_cache_dir): Update comment.
684
685 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
686
687         PR python/23669
688         * breakpoint.c (commands_cmd_element): New.
689         (_initialize_breakpoint): Assign commands_cmd_element.
690         * breakpoint.h (commands_cmd_element): New.
691         * cli/cli-script.c (while_cmd_element, if_command,
692         define_cmd_element): New.
693         (command_name_equals): Remove.
694         (process_next_line): Compare commands by pointer, not by name.
695         (_initialize_cli_script): Assign the various cmd_list_element
696         variables.
697         * compile/compile.c (compile_cmd_element): New.
698         (_initialize_compile): Assign compile_cmd_element.
699         * compile/compile.h (compile_cmd_element): New.
700         * guile/guile.c (guile_cmd_element): New.
701         (install_gdb_commands): Assign guile_cmd_element.
702         * guile/guile.h (guile_cmd_element): New.
703         * python/python.c (python_cmd_element): New.
704         (_initialize_python): Assign python_cmd_element.
705         * python/python.h (python_cmd_element): New.
706         * tracepoint.c (while_stepping_cmd_element): New.
707         (_initialize_tracepoint): Assign while_stepping_cmd_element.
708         * tracepoint.h (while_stepping_cmd_element): New.
709
710 2018-09-17  Tom Tromey  <tom@tromey.com>
711
712         * infrun.c (save_infcall_suspend_state): Return
713         infcall_suspend_state_up.
714         (save_infcall_control_state): Return infcall_control_state_up.
715         * inferior.h (save_infcall_suspend_state)
716         (save_infcall_control_state): Declare later.  Return unique
717         pointers.
718
719 2018-09-17  Tom Tromey  <tom@tromey.com>
720
721         * infrun.c (struct stop_context): Declare constructor,
722         destructor, "changed" method.
723         (stop_context::stop_context): Rename from save_stop_context.
724         (stop_context::~stop_context): Rename from
725         release_stop_context_cleanup.
726         (normal_stop): Update.
727         (stop_context::changed): Rename from stop_context_changed.  Return
728         bool.
729
730 2018-09-17  Tom Tromey  <tom@tromey.com>
731
732         * inferior.h (struct infcall_suspend_state_deleter): New.
733         (infcall_suspend_state_up): New typedef.
734         (struct infcall_control_state_deleter): New.
735         (infcall_control_state_up): New typedef.
736         (make_cleanup_restore_infcall_suspend_state)
737         (make_cleanup_restore_infcall_control_state): Don't declare.
738         * infcall.c (call_function_by_hand_dummy): Update.
739         * infrun.c (do_restore_infcall_suspend_state_cleanup)
740         (make_cleanup_restore_infcall_suspend_state): Remove.
741         (do_restore_infcall_control_state_cleanup)
742         (make_cleanup_restore_infcall_control_state): Remove.
743
744 2018-09-17  Tom Tromey  <tom@tromey.com>
745
746         * gdbthread.h (struct thread_control_state): Add initializer.
747         (class thread_info) <control>: Remove initializer.
748         * inferior.h (struct inferior_control_state): Add initializer.
749         (class inferior) <control>: Remove initializer.
750         (exit_inferior_1): Update.
751         * infrun.c (struct infcall_control_state): Add constructors.
752         (save_infcall_control_state): Use new.
753         (restore_infcall_control_state, discard_infcall_control_state):
754         Use delete.
755
756 2018-09-17  Tom Tromey  <tom@tromey.com>
757
758         * infrun.c (struct infcall_suspend_state) <registers>: Now a
759         unique_ptr.
760         <siginfo_data>: Now a unique_xmalloc_ptr.
761         (save_infcall_suspend_state, restore_infcall_suspend_state)
762         (discard_infcall_suspend_state)
763         (get_infcall_suspend_state_regcache): Update.
764
765 2018-09-17  Tom Tromey  <tom@tromey.com>
766
767         * gdbthread.h (struct thread_suspend_state): Add initializers.
768         (class thread_info) <suspend>: Remove initializer.
769         * infrun.c (struct infcall_suspend_state): Add initializers.
770         (save_infcall_suspend_state): Use new.
771         (discard_infcall_suspend_state): Use delete.
772
773 2018-09-16  Tom Tromey  <tom@tromey.com>
774
775         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
776         Remove.
777         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
778         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
779         (py_varobj_iter_new): Likewise.
780         (py_varobj_get_iterator): Use gdbpy_ref.
781
782 2018-09-16  Tom Tromey  <tom@tromey.com>
783
784         * python/py-threadevent.c (py_get_event_thread): Simplify.
785         * python/py-inferior.c (infpy_thread_from_thread_handle):
786         Return immediately after calling thread_to_thread_object.  Use
787         Py_RETURN_NONE.
788         (thread_to_thread_object): Set the exception on a NULL return.
789
790 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
791
792         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
793
794 2018-09-16  Tom Tromey  <tom@tromey.com>
795
796         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
797         Remove.
798
799 2018-09-16  Tom Tromey  <tom@tromey.com>
800
801         * python/python-internal.h (thread_to_thread_object): Change
802         return type.
803         * python/py-inferior.c (thread_to_thread_object): Return a new
804         reference.
805         (infpy_thread_from_thread_handle): Update.
806         * python/py-infthread.c (gdbpy_selected_thread): Update.
807         * python/py-stopevent.c (create_stop_event_object): Update.
808         * python/py-threadevent.c (py_get_event_thread): Return a new
809         reference.
810         (py_get_event_thread): Update.
811         * python/py-event.h (py_get_event_thread): Change return type.
812         * python/py-continueevent.c (create_continue_event_object):
813         Update.
814
815 2018-09-16  Tom Tromey  <tom@tromey.com>
816
817         * python/py-progspace.c (pspy_get_objfiles): Update.
818         * python/python-internal.h (objfile_to_objfile_object): Change
819         return type.
820         * python/py-newobjfileevent.c (create_new_objfile_event_object):
821         Update.
822         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
823         Update.
824         * python/python.c (gdbpy_get_current_objfile): Update.
825         (gdbpy_objfiles): Update.
826         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
827         Update.
828         (objfile_to_objfile_object): Return a new reference.
829         * python/py-symtab.c (stpy_get_objfile): Update.
830         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
831         Update.
832
833 2018-09-16  Tom Tromey  <tom@tromey.com>
834
835         * python/py-inferior.c (infpy_get_progspace): Update.
836         * python/python-internal.h (pspace_to_pspace_object): Change
837         return type.
838         * python/py-newobjfileevent.c
839         (create_clear_objfiles_event_object): Update.
840         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
841         Update.
842         * python/python.c (gdbpy_get_current_progspace): Update.
843         (gdbpy_progspaces): Update.
844         * python/py-progspace.c (pspace_to_pspace_object): Return a new
845         reference.
846         * python/py-objfile.c (objfpy_get_progspace): Update.
847         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
848         Update.
849
850 2018-09-16  Tom Tromey  <tom@tromey.com>
851
852         * python/lib/gdb/__init__.py (current_progspace, objfiles)
853         (solib_name, block_for_pc, find_pc_line): New functions.
854         (execute_unwinders): Update.
855         * python/py-block.c (gdbpy_block_for_pc): Remove.
856         * python/py-inferior.c (infpy_get_progspace): New function.
857         (inferior_object_getset) <progspace>: Add.
858         * python/py-progspace.c (pspy_objfiles): Rewrite.
859         (pspy_solib_name, pspy_block_for_pc)
860         (pspy_find_pc_line, pspy_is_valid): New functions.
861         (progspace_object_methods): Add entries for solib_name,
862         block_for_pc, find_pc_line, is_valid.
863         * python/python-internal.h (gdbpy_block_for_pc)
864         (build_objfiles_list): Don't declare.
865         * python/python.c: Don't include solib.h.
866         (gdbpy_solib_name, gdbpy_find_pc_line)
867         (gdbpy_get_current_progspace, build_objfiles_list)
868         (gdbpy_objfiles): Remove.
869         (GdbMethods) <current_progspace, objfiles, block_for_pc,
870         solib_name, find_pc_line>: Remove entries.
871
872 2018-09-16  Tom Tromey  <tom@tromey.com>
873
874         * top.c (new_ui_command): Use GNU style for metasyntactic
875         variables.
876         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
877         variables.
878         * maint.c (maintenance_translate_address): Remove "<>" around
879         text.
880         * interps.c (interpreter_exec_cmd): Use GNU style for
881         metasyntactic variables.
882         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
883         metasyntactic variables.
884         * tracepoint.c (tfind_range_command): Use GNU style for
885         metasyntactic variables.
886         (tfind_outside_command): Likewise.
887         (_initialize_tracepoint): Likewise.
888         * remote.c (extended_remote_target::create_inferior): Use GNU
889         style for metasyntactic variables.
890         * sparc64-tdep.c (adi_examine_command): Use GNU style for
891         metasyntactic variables.
892         (adi_assign_command): Likewise.
893
894 2018-09-16  Tom Tromey  <tom@tromey.com>
895
896         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
897         metasyntactic variables.  Print message if no disassembler options
898         are available.
899
900 2018-09-15  Tom Tromey  <tom@tromey.com>
901
902         * infcmd.c (get_inferior_args): Return const char *.
903         * inferior.h (get_inferior_args): Return type now const.
904         * linux-tdep.c (linux_fill_prpsinfo): Update.
905         * procfs.c (procfs_target::make_corefile_notes): Update.
906
907 2018-09-07  Tom Tromey  <tom@tromey.com>
908
909         * python/python.c (execute_gdb_command): Call bpstat_do_actions
910         inside the TRY.
911
912 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
913
914         * nios2-tdep.c (nios2_type_align): New.
915         (nios2_gdb_arch_init): Install type_align hook.
916
917 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
918
919         * eval.c (fake_method::fake_method): Call xzalloc directly for a
920         type that is neither object file owned, nor gdbarch owned.
921         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
922         gdbarch is non-NULL.
923         (alloc_type_instance): Allocate non-objfile owned types on the
924         gdbarch obstack.
925         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
926         using TYPE_ALLOC to ensure memory is allocated on the correct
927         obstack.
928         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
929         obstack, or the gdbarch obstack.
930         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
931
932 2018-09-14  Tom Tromey  <tom@tromey.com>
933
934         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
935         block.
936
937 2018-09-14  Tom Tromey  <tom@tromey.com>
938
939         * nat/fork-inferior.c (get_startup_shell): Remove "static".
940
941 2018-09-13  Tom Tromey  <tom@tromey.com>
942
943         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
944         static.
945
946 2018-09-13  Tom Tromey  <tom@tromey.com>
947
948         * exec.c (try_open_exec_file): Use std::string.
949
950 2018-09-13  Tom Tromey  <tom@tromey.com>
951
952         * utils.h (gdb_bfd_errmsg): Return std::string.
953         * exec.c (exec_file_attach): Update.
954         * compile/compile-object-load.c (compile_object_load): Update.
955         * utils.c (gdb_bfd_errmsg): Return std::string.
956
957 2018-09-13  Tom Tromey  <tom@tromey.com>
958
959         * procfs.c (struct procinfo_deleter): New.
960         (procinfo_up): New typedef.
961         (do_destroy_procinfo_cleanup): Remove.
962         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
963
964 2018-09-13  Tom Tromey  <tom@tromey.com>
965
966         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
967
968 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
969 2018-09-13  Tom Tromey  <tom@tromey.com>
970
971         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
972         (pspy_get_objfiles): New function.
973         (progspace_object_methods): New.
974         (pspace_object_type): Add tp_methods callback.
975         * python/python-internal.h (build_objfiles_list): New
976         declaration.
977         * python/python.c (build_objfiles_list): New function.
978         (gdbpy_objfiles): Implement using build_objfiles_list.
979         * NEWS: Mention the Progspace.objfiles method.
980
981 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
982
983         * python/py-inferior.c (infpy_get_progspace): New function.
984         (inferior_object_getset): Add progspace property.
985         * NEWS: Mention the new property.
986
987 2018-09-13  Tom Tromey  <tom@tromey.com>
988
989         PR rust/23650:
990         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
991
992 2018-09-13  Tom Tromey  <tom@tromey.com>
993
994         PR rust/23626:
995         * rust-lang.c (rust_enum_variant): Now static.
996         (rust_empty_enum_p): New function.
997         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
998         Handle empty enum.
999
1000 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1001
1002         * python/py-inferior.c (infpy_repr): New.
1003         (inferior_object_type): Register infpy_repr.
1004         * python/py-objfile.c (objfpy_repr): New.
1005         (objfile_object_type): Register objfpy_repr.
1006
1007 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1008
1009         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1010
1011 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1012
1013         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1014         typo.
1015
1016 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1017
1018         * common/common-utils.c: Don't include '<sys/stat.h>'.
1019         (is_regular_file): Move to...
1020         * common/filestuff.c (is_regular_file): ... here.
1021         * common/common-utils.h (is_regular_file): Move to...
1022         * common/filestuff.h (is_regular_file): ... here.
1023
1024 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1025
1026         * skip.c (debug_skip): New variable.
1027         (skiplist_entry::do_skip_file_p): Add debug output.
1028         (skiplist_entry::do_skip_gfile_p): Likewise.
1029         (skiplist_entry::skip_function_p): Likewise.
1030         (_initialize_step_skip): Create debug command.
1031         * NEWS: Mention set/show debug skip.
1032
1033 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1034
1035         * darwin-nat.c (should_disable_startup_with_shell):
1036         New function.
1037         (darwin_nat_target::create_inferior): Add call.
1038
1039 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1040
1041         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1042         inf_port, msg_state>: Initialize.
1043         (struct darwin_thread_info) <signaled, single_step>: Change
1044         type and initialize.
1045         (struct darwin_thread_info) <event>: Initialize.
1046
1047 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1048
1049         PR gdb/23555
1050         PR gdb/23558
1051         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
1052         guesses.
1053
1054 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1055
1056         Revert:
1057         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1058
1059         PR gdb/23555
1060         PR gdb/23558
1061         * gnulib/aclocal.m4: Regenerate.
1062         * gnulib/config.in: Regenerate.
1063         * gnulib/configure: Regenerate.
1064         * gnulib/import/Makefile.am: Update.
1065         * gnulib/import/Makefile.in: Update.
1066         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1067         * gnulib/import/_Noreturn.h: ... this.
1068         * gnulib/import/alloca.in.h: Update.
1069         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1070         * gnulib/import/arg-nonnull.h: ... this.
1071         * gnulib/import/assure.h: Update.
1072         * gnulib/import/at-func.c: Update.
1073         * gnulib/import/basename-lgpl.c: Update.
1074         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1075         * gnulib/import/c++defs.h: ... this.
1076         * gnulib/import/canonicalize-lgpl.c: Update.
1077         * gnulib/import/cdefs.h: Update.
1078         * gnulib/import/chdir-long.c: Update.
1079         * gnulib/import/chdir-long.h: Update.
1080         * gnulib/import/cloexec.c: Update.
1081         * gnulib/import/cloexec.h: Update.
1082         * gnulib/import/close.c: Update.
1083         * gnulib/import/closedir.c: Update.
1084         * gnulib/import/config.charset: Update.
1085         * gnulib/import/dirent-private.h: Update.
1086         * gnulib/import/dirent.in.h: Update.
1087         * gnulib/import/dirfd.c: Update.
1088         * gnulib/import/dirname-lgpl.c: Update.
1089         * gnulib/import/dirname.h: Update.
1090         * gnulib/import/dosname.h: Update.
1091         * gnulib/import/dup-safer-flag.c: Update.
1092         * gnulib/import/dup-safer.c: Update.
1093         * gnulib/import/dup.c: Update.
1094         * gnulib/import/dup2.c: Update.
1095         * gnulib/import/errno.in.h: Update.
1096         * gnulib/import/error.c: Update.
1097         * gnulib/import/error.h: Update.
1098         * gnulib/import/exitfail.c: Update.
1099         * gnulib/import/exitfail.h: Update.
1100         * gnulib/import/extra/update-copyright: Update.
1101         * gnulib/import/fchdir.c: Update.
1102         * gnulib/import/fcntl.c: Update.
1103         * gnulib/import/fcntl.in.h: Update.
1104         * gnulib/import/fd-hook.c: Update.
1105         * gnulib/import/fd-hook.h: Update.
1106         * gnulib/import/fd-safer-flag.c: Update.
1107         * gnulib/import/fd-safer.c: Update.
1108         * gnulib/import/fdopendir.c: Update.
1109         * gnulib/import/filename.h: Update.
1110         * gnulib/import/filenamecat-lgpl.c: Update.
1111         * gnulib/import/filenamecat.h: Update.
1112         * gnulib/import/flexmember.h: Update.
1113         * gnulib/import/float+.h: Update.
1114         * gnulib/import/float.c: Update.
1115         * gnulib/import/float.in.h: Update.
1116         * gnulib/import/fnmatch.c: Update.
1117         * gnulib/import/fnmatch.in.h: Update.
1118         * gnulib/import/fnmatch_loop.c: Update.
1119         * gnulib/import/fpucw.h: Update.
1120         * gnulib/import/frexp.c: Update.
1121         * gnulib/import/frexpl.c: Update.
1122         * gnulib/import/fstat.c: Update.
1123         * gnulib/import/fstatat.c: Update.
1124         * gnulib/import/getcwd-lgpl.c: Update.
1125         * gnulib/import/getcwd.c: Update.
1126         * gnulib/import/getdtablesize.c: Update.
1127         * gnulib/import/getlogin_r.c: Update.
1128         * gnulib/import/getprogname.c: Update.
1129         * gnulib/import/getprogname.h: Update.
1130         * gnulib/import/gettext.h: Update.
1131         * gnulib/import/gettimeofday.c: Update.
1132         * gnulib/import/glob-libc.h: Update.
1133         * gnulib/import/glob.c: Update.
1134         * gnulib/import/glob.in.h: Update.
1135         * gnulib/import/glob_internal.h: Update.
1136         * gnulib/import/glob_pattern_p.c: Update.
1137         * gnulib/import/globfree.c: Update.
1138         * gnulib/import/hard-locale.c: Update.
1139         * gnulib/import/hard-locale.h: Update.
1140         * gnulib/import/intprops.h: Update.
1141         * gnulib/import/inttypes.in.h: Update.
1142         * gnulib/import/isnan.c: Update.
1143         * gnulib/import/isnand-nolibm.h: Update.
1144         * gnulib/import/isnand.c: Update.
1145         * gnulib/import/isnanl-nolibm.h: Update.
1146         * gnulib/import/isnanl.c: Update.
1147         * gnulib/import/itold.c: Update.
1148         * gnulib/import/libc-config.h: Update.
1149         * gnulib/import/limits.in.h: Update.
1150         * gnulib/import/localcharset.c: Update.
1151         * gnulib/import/localcharset.h: Update.
1152         * gnulib/import/localtime-buffer.c: Update.
1153         * gnulib/import/localtime-buffer.h: Update.
1154         * gnulib/import/lstat.c: Update.
1155         * gnulib/import/m4/00gnulib.m4: Update.
1156         * gnulib/import/m4/__inline.m4: Update.
1157         * gnulib/import/m4/absolute-header.m4: Update.
1158         * gnulib/import/m4/alloca.m4: Update.
1159         * gnulib/import/m4/builtin-expect.m4: Update.
1160         * gnulib/import/m4/canonicalize.m4: Update.
1161         * gnulib/import/m4/chdir-long.m4: Update.
1162         * gnulib/import/m4/close.m4: Update.
1163         * gnulib/import/m4/closedir.m4: Update.
1164         * gnulib/import/m4/configmake.m4: Update.
1165         * gnulib/import/m4/d-ino.m4: Update.
1166         * gnulib/import/m4/d-type.m4: Update.
1167         * gnulib/import/m4/dirent_h.m4: Update.
1168         * gnulib/import/m4/dirfd.m4: Update.
1169         * gnulib/import/m4/dirname.m4: Update.
1170         * gnulib/import/m4/double-slash-root.m4: Update.
1171         * gnulib/import/m4/dup.m4: Update.
1172         * gnulib/import/m4/dup2.m4: Update.
1173         * gnulib/import/m4/eealloc.m4: Update.
1174         * gnulib/import/m4/environ.m4: Update.
1175         * gnulib/import/m4/errno_h.m4: Update.
1176         * gnulib/import/m4/error.m4: Update.
1177         * gnulib/import/m4/exponentd.m4: Update.
1178         * gnulib/import/m4/exponentl.m4: Update.
1179         * gnulib/import/m4/extensions.m4: Update.
1180         * gnulib/import/m4/extern-inline.m4: Update.
1181         * gnulib/import/m4/fchdir.m4: Update.
1182         * gnulib/import/m4/fcntl-o.m4: Update.
1183         * gnulib/import/m4/fcntl.m4: Update.
1184         * gnulib/import/m4/fcntl_h.m4: Update.
1185         * gnulib/import/m4/fdopendir.m4: Update.
1186         * gnulib/import/m4/filenamecat.m4: Update.
1187         * gnulib/import/m4/flexmember.m4: Update.
1188         * gnulib/import/m4/float_h.m4: Update.
1189         * gnulib/import/m4/fnmatch.m4: Update.
1190         * gnulib/import/m4/fnmatch_h.m4: Update.
1191         * gnulib/import/m4/fpieee.m4: Update.
1192         * gnulib/import/m4/frexp.m4: Update.
1193         * gnulib/import/m4/frexpl.m4: Update.
1194         * gnulib/import/m4/fstat.m4: Update.
1195         * gnulib/import/m4/fstatat.m4: Update.
1196         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
1197         * gnulib/import/m4/getcwd-path-max.m4: Update.
1198         * gnulib/import/m4/getcwd.m4: Update.
1199         * gnulib/import/m4/getdtablesize.m4: Update.
1200         * gnulib/import/m4/getlogin.m4: Update.
1201         * gnulib/import/m4/getlogin_r.m4: Update.
1202         * gnulib/import/m4/getpagesize.m4: Update.
1203         * gnulib/import/m4/getprogname.m4: Update.
1204         * gnulib/import/m4/gettimeofday.m4: Update.
1205         * gnulib/import/m4/glibc21.m4: Update.
1206         * gnulib/import/m4/glob.m4: Update.
1207         * gnulib/import/m4/glob_h.m4: Update.
1208         * gnulib/import/m4/gnulib-cache.m4: Update.
1209         * gnulib/import/m4/gnulib-common.m4: Update.
1210         * gnulib/import/m4/gnulib-comp.m4: Update.
1211         * gnulib/import/m4/gnulib-tool.m4: Update.
1212         * gnulib/import/m4/hard-locale.m4: Update.
1213         * gnulib/import/m4/include_next.m4: Update.
1214         * gnulib/import/m4/inttypes-pri.m4: Update.
1215         * gnulib/import/m4/inttypes.m4: Update.
1216         * gnulib/import/m4/isnand.m4: Update.
1217         * gnulib/import/m4/isnanl.m4: Update.
1218         * gnulib/import/m4/largefile.m4: Update.
1219         * gnulib/import/m4/limits-h.m4: Update.
1220         * gnulib/import/m4/localcharset.m4: Update.
1221         * gnulib/import/m4/locale-fr.m4: Update.
1222         * gnulib/import/m4/locale-ja.m4: Update.
1223         * gnulib/import/m4/locale-zh.m4: Update.
1224         * gnulib/import/m4/localtime-buffer.m4: Update.
1225         * gnulib/import/m4/longlong.m4: Update.
1226         * gnulib/import/m4/lstat.m4: Update.
1227         * gnulib/import/m4/malloc.m4: Update.
1228         * gnulib/import/m4/malloca.m4: Update.
1229         * gnulib/import/m4/math_h.m4: Update.
1230         * gnulib/import/m4/mbrtowc.m4: Update.
1231         * gnulib/import/m4/mbsinit.m4: Update.
1232         * gnulib/import/m4/mbsrtowcs.m4: Update.
1233         * gnulib/import/m4/mbstate_t.m4: Update.
1234         * gnulib/import/m4/memchr.m4: Update.
1235         * gnulib/import/m4/memmem.m4: Update.
1236         * gnulib/import/m4/mempcpy.m4: Update.
1237         * gnulib/import/m4/memrchr.m4: Update.
1238         * gnulib/import/m4/mkdir.m4: Update.
1239         * gnulib/import/m4/mkstemp.m4: Update.
1240         * gnulib/import/m4/mmap-anon.m4: Update.
1241         * gnulib/import/m4/mode_t.m4: Update.
1242         * gnulib/import/m4/msvc-inval.m4: Update.
1243         * gnulib/import/m4/msvc-nothrow.m4: Update.
1244         * gnulib/import/m4/multiarch.m4: Update.
1245         * gnulib/import/m4/nocrash.m4: Update.
1246         * gnulib/import/m4/off_t.m4: Update.
1247         * gnulib/import/m4/onceonly.m4: Update.
1248         * gnulib/import/m4/open-cloexec.m4: Update.
1249         * gnulib/import/m4/open.m4: Update.
1250         * gnulib/import/m4/openat.m4: Update.
1251         * gnulib/import/m4/opendir.m4: Update.
1252         * gnulib/import/m4/pathmax.m4: Update.
1253         * gnulib/import/m4/rawmemchr.m4: Update.
1254         * gnulib/import/m4/readdir.m4: Update.
1255         * gnulib/import/m4/readlink.m4: Update.
1256         * gnulib/import/m4/realloc.m4: Update.
1257         * gnulib/import/m4/rename.m4: Update.
1258         * gnulib/import/m4/rewinddir.m4: Update.
1259         * gnulib/import/m4/rmdir.m4: Update.
1260         * gnulib/import/m4/save-cwd.m4: Update.
1261         * gnulib/import/m4/secure_getenv.m4: Update.
1262         * gnulib/import/m4/setenv.m4: Update.
1263         * gnulib/import/m4/signal_h.m4: Update.
1264         * gnulib/import/m4/ssize_t.m4: Update.
1265         * gnulib/import/m4/stat-time.m4: Update.
1266         * gnulib/import/m4/stat.m4: Update.
1267         * gnulib/import/m4/std-gnu11.m4: Update.
1268         * gnulib/import/m4/stdbool.m4: Update.
1269         * gnulib/import/m4/stddef_h.m4: Update.
1270         * gnulib/import/m4/stdint.m4: Update.
1271         * gnulib/import/m4/stdio_h.m4: Update.
1272         * gnulib/import/m4/stdlib_h.m4: Update.
1273         * gnulib/import/m4/strchrnul.m4: Update.
1274         * gnulib/import/m4/strdup.m4: Update.
1275         * gnulib/import/m4/strerror.m4: Update.
1276         * gnulib/import/m4/string_h.m4: Update.
1277         * gnulib/import/m4/strstr.m4: Update.
1278         * gnulib/import/m4/strtok_r.m4: Update.
1279         * gnulib/import/m4/sys_socket_h.m4: Update.
1280         * gnulib/import/m4/sys_stat_h.m4: Update.
1281         * gnulib/import/m4/sys_time_h.m4: Update.
1282         * gnulib/import/m4/sys_types_h.m4: Update.
1283         * gnulib/import/m4/tempname.m4: Update.
1284         * gnulib/import/m4/time_h.m4: Update.
1285         * gnulib/import/m4/unistd-safer.m4: Update.
1286         * gnulib/import/m4/unistd_h.m4: Update.
1287         * gnulib/import/m4/warn-on-use.m4: Update.
1288         * gnulib/import/m4/wchar_h.m4: Update.
1289         * gnulib/import/m4/wchar_t.m4: Update.
1290         * gnulib/import/m4/wctype_h.m4: Update.
1291         * gnulib/import/m4/wint_t.m4: Update.
1292         * gnulib/import/malloc.c: Update.
1293         * gnulib/import/malloc/scratch_buffer.h: Update.
1294         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
1295         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
1296         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
1297         * gnulib/import/malloca.c: Update.
1298         * gnulib/import/malloca.h: Update.
1299         * gnulib/import/malloca.valgrind: Update.
1300         * gnulib/import/math.in.h: Update.
1301         * gnulib/import/mbrtowc.c: Update.
1302         * gnulib/import/mbsinit.c: Update.
1303         * gnulib/import/mbsrtowcs-impl.h: Update.
1304         * gnulib/import/mbsrtowcs-state.c: Update.
1305         * gnulib/import/mbsrtowcs.c: Update.
1306         * gnulib/import/memchr.c: Update.
1307         * gnulib/import/memmem.c: Update.
1308         * gnulib/import/mempcpy.c: Update.
1309         * gnulib/import/memrchr.c: Update.
1310         * gnulib/import/mkdir.c: Update.
1311         * gnulib/import/mkstemp.c: Update.
1312         * gnulib/import/msvc-inval.c: Update.
1313         * gnulib/import/msvc-inval.h: Update.
1314         * gnulib/import/msvc-nothrow.c: Update.
1315         * gnulib/import/msvc-nothrow.h: Update.
1316         * gnulib/import/open.c: Update.
1317         * gnulib/import/openat-die.c: Update.
1318         * gnulib/import/openat-priv.h: Update.
1319         * gnulib/import/openat-proc.c: Update.
1320         * gnulib/import/openat.c: Update.
1321         * gnulib/import/openat.h: Update.
1322         * gnulib/import/opendir.c: Update.
1323         * gnulib/import/pathmax.h: Update.
1324         * gnulib/import/pipe-safer.c: Update.
1325         * gnulib/import/rawmemchr.c: Update.
1326         * gnulib/import/readdir.c: Update.
1327         * gnulib/import/readlink.c: Update.
1328         * gnulib/import/realloc.c: Update.
1329         * gnulib/import/ref-add.sin: Update.
1330         * gnulib/import/ref-del.sin: Update.
1331         * gnulib/import/rename.c: Update.
1332         * gnulib/import/rewinddir.c: Update.
1333         * gnulib/import/rmdir.c: Update.
1334         * gnulib/import/same-inode.h: Update.
1335         * gnulib/import/save-cwd.c: Update.
1336         * gnulib/import/save-cwd.h: Update.
1337         * gnulib/import/scratch_buffer.h: Update.
1338         * gnulib/import/secure_getenv.c: Update.
1339         * gnulib/import/setenv.c: Update.
1340         * gnulib/import/signal.in.h: Update.
1341         * gnulib/import/stat-time.c: Update.
1342         * gnulib/import/stat-time.h: Update.
1343         * gnulib/import/stat-w32.c: Update.
1344         * gnulib/import/stat-w32.h: Update.
1345         * gnulib/import/stat.c: Update.
1346         * gnulib/import/stdbool.in.h: Update.
1347         * gnulib/import/stddef.in.h: Update.
1348         * gnulib/import/stdint.in.h: Update.
1349         * gnulib/import/stdio.in.h: Update.
1350         * gnulib/import/stdlib.in.h: Update.
1351         * gnulib/import/str-two-way.h: Update.
1352         * gnulib/import/strchrnul.c: Update.
1353         * gnulib/import/strdup.c: Update.
1354         * gnulib/import/streq.h: Update.
1355         * gnulib/import/strerror-override.c: Update.
1356         * gnulib/import/strerror-override.h: Update.
1357         * gnulib/import/strerror.c: Update.
1358         * gnulib/import/string.in.h: Update.
1359         * gnulib/import/stripslash.c: Update.
1360         * gnulib/import/strnlen1.c: Update.
1361         * gnulib/import/strnlen1.h: Update.
1362         * gnulib/import/strstr.c: Update.
1363         * gnulib/import/strtok_r.c: Update.
1364         * gnulib/import/sys_stat.in.h: Update.
1365         * gnulib/import/sys_time.in.h: Update.
1366         * gnulib/import/sys_types.in.h: Update.
1367         * gnulib/import/tempname.c: Update.
1368         * gnulib/import/tempname.h: Update.
1369         * gnulib/import/time.in.h: Update.
1370         * gnulib/import/unistd--.h: Update.
1371         * gnulib/import/unistd-safer.h: Update.
1372         * gnulib/import/unistd.in.h: Update.
1373         * gnulib/import/unsetenv.c: Update.
1374         * gnulib/import/verify.h: Update.
1375         * gnulib/import/extra/snippet/warn-on-use.h: Update.
1376         * gnulib/import/wchar.in.h: Update.
1377         * gnulib/import/wctype.in.h: Update.
1378         * gnulib/import/xalloc-oversized.h: Update.
1379         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
1380         "53e2c179f26a890fa6685af4b6c1397ee370433b".
1381
1382 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
1383
1384         * record-btrace.c (get_thread_current_frame): Remove
1385         old_inferior_ptid.
1386
1387 2018-09-10  Jerome Guitton  <guitton@adacore.com>
1388
1389         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
1390         with check_tag to 1 if and only if the type is tagged and the
1391         component being searched cannot been found in the current
1392         view. Otherwise, always call ada_to_fixed_type with
1393         check_tag to 0.
1394
1395 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1396
1397         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
1398         declaration.
1399         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
1400         * ada-varobj.c (ada_varobj_get_number_of_children,
1401         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
1402
1403 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1404
1405         * ada-valprint.c (ada_value_print): Use type instead of
1406         enclosing type.
1407
1408 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1409
1410         * ada-lang.c (ada_value_subscript): Handle case when parameter is
1411         an array of access to unconstrained array.
1412
1413 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1414
1415         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
1416         (ada_check_typedef): Use it.
1417
1418 2018-09-10  Xavier Roirand  <roirand@adacore.com>
1419
1420         * ada-varobj.c (ada_varobj_describe_struct_child)
1421         (ada_varobj_describe_child): Handle union case like struct one.
1422
1423 2018-09-10  Tom Tromey  <tom@tromey.com>
1424
1425         PR python/18380:
1426         * python/python.c (_initialize_python): Make example in "python"
1427         help work in Python 3.
1428
1429 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
1430
1431         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
1432         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
1433         $(EXEEXT) to the script, as it is not a program.
1434
1435 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
1436
1437         * python/py-prettyprint.c (pretty_print_one_value): Return
1438         gdbpy_ref<>.
1439         (print_string_repr): Adjust.
1440         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
1441         * python/python-internal.h (apply_varobj_pretty_printer): Return
1442         gdbpy_ref<>.
1443         * varobj.c (varobj_value_get_print_value): Adjust.
1444
1445 2018-09-08  Tom Tromey  <tom@tromey.com>
1446
1447         PR python/16047:
1448         * python/py-prettyprint.c (pretty_print_one_value): Check for
1449         to_string method.
1450
1451 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1452
1453         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
1454         replace_operator_with_call.
1455
1456 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1457
1458         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
1459
1460 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1461
1462         * ada-typeprint.c (print_range): Print the bounds using TYPE
1463         rather than its TYPE_TARGET_TYPE.
1464
1465 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1466
1467         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
1468         call to ada_to_fixed_value_create.
1469
1470 2018-09-08  Jerome Guitton  <guitton@adacore.com>
1471
1472         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
1473
1474 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1475
1476         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
1477         by calls to error.
1478
1479 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1480
1481         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
1482         Move update of loop variable "fi".
1483
1484 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
1485
1486         * ada-lang.c (value_assign_to_component): In the case of
1487         big-endian targets, extract the bits of the given VAL
1488         using an src_offset of zero if container is not a scalar.
1489
1490 2018-09-06  Simon Ser  <contact@emersion.fr>
1491
1492         PR gdb/23105
1493         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
1494         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1495         * fbsd-tdep.c (fbsd_make_note_desc): New.
1496         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
1497         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
1498         * target.h (enum target_object) Add FreeBSD-specific
1499         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
1500
1501 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1502
1503         * compile/compile-c.h (generate_c_for_variable_locations):
1504         Change reference to pointer.
1505         * compile/compile-c-support.c (compile_program) <compute>:
1506         Likewise.
1507         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1508         (generate_c_for_for_one_variable): Likewise
1509         (generate_c_for_variable_locations): Likewise
1510         * compile/compile-c-types.c (compile_c_instance::convert_type):
1511         Likewise
1512         * compile/compile-cplus-symbols.c (convert_one_symbol):
1513         std::move the scope passed to enter_scope.
1514         * compile/compile-cplus-types.c
1515         (compile_cplus_instance::enter_scope): Make parameter
1516         rvalue-reference.
1517         (compile_cplus_instance::new_scope): Change reference to
1518         pointer.
1519         (compile_cplus_instance::convert_type): Likewise
1520         (compile_cplus_convert_typedef): std::move the scope passed to
1521         enter_scope.
1522         (compile_cplus_convert_struct_or_union): Likewise.
1523         (compile_cplus_convert_enum): Likewise.
1524         (compile_cplus_convert_namespace): Likewise.
1525         * compile/compile-cplus.h (compile_cplus_instance)
1526         <enter_scope>: Make parameter rvalue-reference.
1527         * compile/compile-internal.h (compile_instance)
1528         <get_cached_type>: Likewise
1529         * compile/compile-loc2c.c (push): Likewise
1530         (pushf): Likewise
1531         (unary): Likewise
1532         (binary): Likewise
1533         (print_label): Likewise
1534         (pushf_register_address): Likewise
1535         (pushf_register): Likewise
1536         (do_compile_dwarf_expr_to_c): Likewise
1537         (compile_dwarf_expr_to_c): Likewise
1538         (compile_dwarf_bounds_to_c): Likewise
1539         * compile/compile.c (compile_instance::get_cached_type):
1540         Likewise
1541         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
1542         (compile_dwarf_bounds_to_c): Likewise
1543         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
1544         (dwarf2_compile_property_to_c): Likewise
1545         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
1546         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
1547         Likewise
1548
1549 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1550
1551         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
1552         * tui/tui-data.c (init_content_element): Don't initialize it.
1553
1554 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
1555
1556         * tui/tui-data.h (struct tui_win_info)
1557         <detail::opaque>: Remove.
1558         * tui/tui-data.c (init_win_info): Remove assignment.
1559
1560 2018-09-05  Tom Tromey  <tom@tromey.com>
1561
1562         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
1563         -Wformat-nonliteral.
1564         * target-float.c (host_float_ops<T>::to_string)
1565         (host_float_ops<T>::from_string): Use
1566         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1567         * configure: Rebuild.
1568
1569 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
1570
1571         * printcmd.c (printf_c_string): Use
1572         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
1573         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
1574
1575 2018-09-05  Tom Tromey  <tom@tromey.com>
1576
1577         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
1578
1579 2018-09-05  Tom de Vries  <tdevries@suse.de>
1580
1581         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
1582         with resolve_abstract_p == true.
1583         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
1584         defaulting to false. Propagate resolve_abstract_p to
1585         dwarf2_fetch_die_loc_sect_off.
1586         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
1587         parameter, defaulting to false.
1588         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
1589         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
1590         parameter.
1591         * dwarf2read.h (struct die_info): Forward-declare.
1592         (die_info_ptr): New typedef.
1593         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
1594
1595 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
1596
1597         GDB 8.2 released.
1598
1599 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1600             Pedro Alves  <palves@redhat.com>
1601
1602         * gnulib/Makefile.in (aclocal_m4_deps): Move to
1603         "aclocal-m4-deps.mk".  Include file here.
1604         $(srcdir)/aclocal.m4: Add "configure.ac".
1605         * gnulib/aclocal-m4-deps.mk: New file.
1606         * gnulib/update-gnulib.sh: Automatically update
1607         "aclocal-m4-deps.mk".
1608
1609 2018-09-04  Tom Tromey  <tom@tromey.com>
1610
1611         * configure: Rebuild.
1612         * configure.ac: Remove multi-ice code.
1613
1614 2018-09-04  Tom Tromey  <tom@tromey.com>
1615
1616         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
1617         (ada-exp.o): Update.
1618
1619 2018-09-04  Tom Tromey  <tom@tromey.com>
1620
1621         * Makefile.in (printcmd.o, target-float.o): Remove.
1622         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
1623
1624 2018-09-04  Tom Tromey  <tom@tromey.com>
1625
1626         * gnulib/Makefile.in: Remove obsolete comment.
1627         * Makefile.in: Remove obsolete comment.
1628
1629 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
1630
1631         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
1632         line with '+'.
1633
1634 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1635
1636         * riscv-tdep.c: Add 'prologue-value.h' include.
1637         (struct riscv_unwind_cache): New struct.
1638         (riscv_debug_unwinder): New global.
1639         (riscv_scan_prologue): Update arguments, capture register details
1640         from prologue scan.
1641         (riscv_skip_prologue): Reformat arguments line, move end of
1642         prologue calculation into riscv_scan_prologue.
1643         (riscv_frame_cache): Update return type, create
1644         riscv_unwind_cache, scan the prologue, and fill in remaining cache
1645         details.
1646         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
1647         (riscv_frame_prev_register): Use the trad_frame within the
1648         riscv_unwind_cache.
1649         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
1650         flag.
1651
1652 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
1653
1654         * trad-frame.h (trad_frame_set_realreg): Declare.
1655         (trad_frame_set_addr): Declare.
1656         * trad-frame.c (trad_frame_set_realreg): Define new function.
1657         (trad_frame_set_addr): Define new function.
1658         (trad_frame_set_reg_realreg): Use new function.
1659         (trad_frame_set_reg_addr): Use new function.
1660
1661 2018-09-01  Keith Seitz  <keiths@redhat.com>
1662
1663         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
1664         pulongest instead of "%lld".
1665         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
1666         ATTRIBUTE_UNUSED.
1667
1668 2018-08-31  Tom Tromey  <tom@tromey.com>
1669
1670         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
1671         variant part type.
1672
1673 2018-08-31  Pedro Alves  <palves@redhat.com>
1674
1675         * gdbarch.h: Regenerate.
1676
1677 2018-08-31  Pedro Alves  <palves@redhat.com>
1678
1679         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
1680         * target.h (Hardware watchpoint interfaces): Describe
1681         continuable/steppable/non-steppable watchpoints.
1682         * gdbarch.h, gdbarch.c: Regenerate.
1683
1684 2018-08-31  Pedro Alves  <palves@redhat.com>
1685
1686         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
1687         Delete.
1688         * s390-linux-nat.c
1689         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
1690         * target.h (target_ops::have_continuable_watchpoint): Delete.
1691         (target_have_continuable_watchpoint): Delete.
1692         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
1693         * target-delegates.c: Regenerate.
1694
1695 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1696
1697         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
1698         the files present in "gnulib/import/m4/".
1699
1700 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1701
1702         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
1703         c.sw, c.swsp, and c.sdsp.
1704
1705 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
1706
1707         * riscv-tdep.c (struct riscv_inferior_data): Delete.
1708         (riscv_read_misa_reg): Don't cache value read into inferior data.
1709         (riscv_new_inferior_data): Delete.
1710         (riscv_inferior_data_cleanup): Delete.
1711         (riscv_inferior_data): Delete.
1712         (riscv_invalidate_inferior_data): Delete.
1713         (_initialize_riscv_tdep): Remove initialisation of inferior data.
1714
1715 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
1716
1717         * compile/compile-cplus-types.c
1718         (compile_cplus_instance::leave_scope): Take the address of scope
1719         object.
1720         (compile_cplus_instance::convert_qualified_base): Compare quals
1721         to 0.
1722
1723 2018-08-30  Keith Seitz  <keiths@redhat.com>
1724
1725         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
1726         Use "%s" and host_address_to_string instead of "%p" in printf.
1727
1728 2018-08-29  Keith Seitz  <keiths@redhat.com>
1729
1730         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
1731         and compile-cplus-types.c.
1732         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
1733         * c-lang.c (cplus_language_defn): Set C++ compile functions.
1734         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
1735         Declare.
1736         * compile/compile-c-support.c: Include compile-cplus.h.
1737         (load_libcompile): Templatize.
1738         (get_compile_context): "New" function.
1739         (c_get_compile_context): Use get_compile_context.
1740         (cplus_get_compile_context): New function.
1741         (cplus_push_user_expression, cplus_pop_user_expression)
1742         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
1743         (cplus_compute_program): Define new structs/functions.
1744         * compile/compile-cplus-symmbols.c: New file.
1745         * compile/compile-cplus-types.c: New file.
1746         * compile/compile-cplus.h: New file.
1747         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
1748         Declare.
1749         * compile/compile-object-load.c (get_out_value_type): Use
1750         strncmp_iw when comparing symbol names.
1751         (compile_object_load): Add mst_bss and mst_data.
1752         * compile/compile.c (_initialize_compile): Remove
1753         -Wno-implicit-function-declaration from `compile_args'.
1754         * compile/gcc-cp-plugin.h: New file.
1755         * NEWS: Mention C++ compile support and new debug options.
1756
1757 2018-08-29  Keith Seitz  <keiths@redhat.com>
1758
1759         * linespec.c (collect_info::add_symbol): Make virtual.
1760         (struct symbol_searcher_collect_info): New struct.
1761         (symbol_searcher::find_all_symbols): New method.
1762         * symtab.h (class symbol_searcher): New class.
1763
1764 2018-08-29  Keith Seitz  <keiths@redhat.com>
1765
1766         * linespec.c (struct linespec) <function_symbols, label_symbols>:
1767         Change to vector of block_symbol.  Update all users.
1768         (struct collect_info) <symbols>: Likewise.
1769         (collect_info::add_symbol): Take block_symbol as argument.
1770         Update all callers.
1771         (decode_compound_collector) <m_symbols>: Change type to vector
1772         of block_symbol.  Update all users.
1773         (decode_compound_collector::operator ()): Change parameter type
1774         to block_symbol.
1775         (find_method, find_function_symbols, find_linespec_symbols)
1776         (find_label_symbols_in_block, find_label_symbols): Change symbol
1777         vectors to block_symbol vectors.
1778         * symtab.h (symbol_found_callback_ftype): Change parameter type to
1779         block_symbol.
1780
1781 2018-08-29  Keith Seitz  <keiths@redhat.com>
1782
1783         * linespec.c (symbolp): Remove typedef and VEC definitions.
1784         (bound_minimal_symbol_d): Likewise.
1785
1786 2018-08-29  Keith Seitz  <keiths@redhat.com>
1787
1788         * linespec.c (decode_compound_collector::decode_compound_collector):
1789         Remove initialization for `m_symtabs'.
1790         (decode_compound_collector::release_symbols): Change return type
1791         to std::vector.  Update all callers.
1792         (class decode_compound_collector) <m_symbols>: Change type to
1793         std::vector.
1794         (lookup_prefix_sym): Change return type to std::vector.  Update all
1795         callers.
1796         (compare_symbols): Remove.
1797         (std_compare_symbols): Rename to `compare_symbols'.
1798         (find_method): Change `sym_classes' parameter to std::vector.
1799         Update all callers.  Use std::sort to sort sym_classes.
1800         (find_linespec_symbols): Remove cleanup.
1801
1802 2018-08-29  Keith Seitz  <keiths@redhat.com>
1803
1804         * linespec.c (struct linespec) <minimal_symbols>: Change type to
1805         std::vector.  Update all users.
1806         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
1807         (struct collect_info) <minimal_symbols>: Likewise.
1808         (compare_msymbols): Return bool.  Change parameters to const
1809         bound_minimal_symbol references.
1810         (find_method, find_function_symbols, find_linespec_symbols): Change
1811         `minsyms' parameter to std::vector.  Update all callers.
1812
1813 2018-08-29  Keith Seitz  <keiths@redhat.com>
1814
1815         * linespec.c (struct linespec) <label_symbols>: Change type to
1816         std::vector.  Update all users.
1817         (find_label_symbols_in_block): Change `result' parameter to
1818         std::vector.  Update all callers.
1819         (find_label_symbols): Return std::vector.  Update all callers.
1820
1821 2018-08-29  Keith Seitz  <keiths@redhat.com>
1822
1823         * linespec.c (struct linespec) <function_symbols>: Change type to
1824         std::vector.  Update all users.
1825         (struct collect_info) <function_symbols>: Likewise.
1826         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
1827         (std_compare_symbols): New function.
1828         (find_method, find_function_symbols, find_linespec_symbols)
1829         (find_label_symbols_in_block): Change `symbols' parameter to
1830         std::vector.  Update all callers.
1831         (find_label_symbols): Likewise for `function_symbols' and
1832         `label_funcs_ret'.
1833
1834 2018-08-29  Keith Seitz  <keiths@redhat.com>
1835
1836         * linespec.c (symtab_vector_up): Define.
1837         (struct linespec) <file_symtabs>: Change type to std::vector *.
1838         Update all uses.
1839         (struct collect_info) <file_symtabs>: Likewise.
1840         (collect_symtabs_from_filename): Return symtab_vector_up.
1841         Update all callers.
1842         (decode_objc): Remove cleanup.
1843         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
1844         (symtab_collector::release_symtabs): Return symtab_vector_up.
1845         Update all callers.
1846         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
1847         Update all users.
1848         (collect_symtabs_from_filename, symtabs_from_filename): Return
1849         symtab_vector_up.  Update all callers.
1850
1851 2018-08-29  Tom Tromey  <tom@tromey.com>
1852
1853         * csky-tdep.c (csky_analyze_prologue): Use
1854         core_addr_to_string_nz.
1855
1856 2018-08-29  Tom Tromey  <tom@tromey.com>
1857
1858         * windows-nat.c (struct xlate_exception) <them>: Change type to
1859         DWORD.
1860         (xlate): Fix formatting.  Remove last entry.
1861         (struct xlate_exception, xlate): Comment out.
1862         (windows_nat_target::resume): Use ranged for.
1863
1864 2018-08-29  Jim Wilson  <jimw@sifive.com>
1865
1866         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
1867         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
1868         of NT_PRFPREG.
1869         (riscv_linux_nat_target::store_registers): Likewise.
1870
1871 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1872
1873         PR gdb/23555
1874         PR gdb/23558
1875         * gnulib/aclocal.m4: Regenerate.
1876         * gnulib/config.in: Regenerate.
1877         * gnulib/configure: Regenerate.
1878         * gnulib/import/Makefile.am: Update.
1879         * gnulib/import/Makefile.in: Update.
1880         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
1881         * gnulib/import/_Noreturn.h: ... this.
1882         * gnulib/import/alloca.in.h: Update.
1883         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
1884         * gnulib/import/arg-nonnull.h: ... this.
1885         * gnulib/import/assure.h: Update.
1886         * gnulib/import/at-func.c: Update.
1887         * gnulib/import/basename-lgpl.c: Update.
1888         * gnulib/import/extra/snippet/c++defs.h: Rename to...
1889         * gnulib/import/c++defs.h: ... this.
1890         * gnulib/import/canonicalize-lgpl.c: Update.
1891         * gnulib/import/cdefs.h: Update.
1892         * gnulib/import/chdir-long.c: Update.
1893         * gnulib/import/chdir-long.h: Update.
1894         * gnulib/import/cloexec.c: Update.
1895         * gnulib/import/cloexec.h: Update.
1896         * gnulib/import/close.c: Update.
1897         * gnulib/import/closedir.c: Update.
1898         * gnulib/import/config.charset: Update.
1899         * gnulib/import/dirent-private.h: Update.
1900         * gnulib/import/dirent.in.h: Update.
1901         * gnulib/import/dirfd.c: Update.
1902         * gnulib/import/dirname-lgpl.c: Update.
1903         * gnulib/import/dirname.h: Update.
1904         * gnulib/import/dosname.h: Update.
1905         * gnulib/import/dup-safer-flag.c: Update.
1906         * gnulib/import/dup-safer.c: Update.
1907         * gnulib/import/dup.c: Update.
1908         * gnulib/import/dup2.c: Update.
1909         * gnulib/import/errno.in.h: Update.
1910         * gnulib/import/error.c: Update.
1911         * gnulib/import/error.h: Update.
1912         * gnulib/import/exitfail.c: Update.
1913         * gnulib/import/exitfail.h: Update.
1914         * gnulib/import/extra/update-copyright: Update.
1915         * gnulib/import/fchdir.c: Update.
1916         * gnulib/import/fcntl.c: Update.
1917         * gnulib/import/fcntl.in.h: Update.
1918         * gnulib/import/fd-hook.c: Update.
1919         * gnulib/import/fd-hook.h: Update.
1920         * gnulib/import/fd-safer-flag.c: Update.
1921         * gnulib/import/fd-safer.c: Update.
1922         * gnulib/import/fdopendir.c: Update.
1923         * gnulib/import/filename.h: Update.
1924         * gnulib/import/filenamecat-lgpl.c: Update.
1925         * gnulib/import/filenamecat.h: Update.
1926         * gnulib/import/flexmember.h: Update.
1927         * gnulib/import/float+.h: Update.
1928         * gnulib/import/float.c: Update.
1929         * gnulib/import/float.in.h: Update.
1930         * gnulib/import/fnmatch.c: Update.
1931         * gnulib/import/fnmatch.in.h: Update.
1932         * gnulib/import/fnmatch_loop.c: Update.
1933         * gnulib/import/fpucw.h: Update.
1934         * gnulib/import/frexp.c: Update.
1935         * gnulib/import/frexpl.c: Update.
1936         * gnulib/import/fstat.c: Update.
1937         * gnulib/import/fstatat.c: Update.
1938         * gnulib/import/getcwd-lgpl.c: Update.
1939         * gnulib/import/getcwd.c: Update.
1940         * gnulib/import/getdtablesize.c: Update.
1941         * gnulib/import/getlogin_r.c: Update.
1942         * gnulib/import/getprogname.c: Update.
1943         * gnulib/import/getprogname.h: Update.
1944         * gnulib/import/gettext.h: Update.
1945         * gnulib/import/gettimeofday.c: Update.
1946         * gnulib/import/glob-libc.h: Update.
1947         * gnulib/import/glob.c: Update.
1948         * gnulib/import/glob.in.h: Update.
1949         * gnulib/import/glob_internal.h: Update.
1950         * gnulib/import/glob_pattern_p.c: Update.
1951         * gnulib/import/globfree.c: Update.
1952         * gnulib/import/hard-locale.c: Update.
1953         * gnulib/import/hard-locale.h: Update.
1954         * gnulib/import/intprops.h: Update.
1955         * gnulib/import/inttypes.in.h: Update.
1956         * gnulib/import/isnan.c: Update.
1957         * gnulib/import/isnand-nolibm.h: Update.
1958         * gnulib/import/isnand.c: Update.
1959         * gnulib/import/isnanl-nolibm.h: Update.
1960         * gnulib/import/isnanl.c: Update.
1961         * gnulib/import/itold.c: Update.
1962         * gnulib/import/libc-config.h: Update.
1963         * gnulib/import/limits.in.h: Update.
1964         * gnulib/import/localcharset.c: Update.
1965         * gnulib/import/localcharset.h: Update.
1966         * gnulib/import/localtime-buffer.c: Update.
1967         * gnulib/import/localtime-buffer.h: Update.
1968         * gnulib/import/lstat.c: Update.
1969         * gnulib/import/m4/00gnulib.m4: Update.
1970         * gnulib/import/m4/__inline.m4: Update.
1971         * gnulib/import/m4/absolute-header.m4: Update.
1972         * gnulib/import/m4/alloca.m4: Update.
1973         * gnulib/import/m4/builtin-expect.m4: Update.
1974         * gnulib/import/m4/canonicalize.m4: Update.
1975         * gnulib/import/m4/chdir-long.m4: Update.
1976         * gnulib/import/m4/close.m4: Update.
1977         * gnulib/import/m4/closedir.m4: Update.
1978         * gnulib/import/m4/configmake.m4: Update.
1979         * gnulib/import/m4/d-ino.m4: Update.
1980         * gnulib/import/m4/d-type.m4: Update.
1981         * gnulib/import/m4/dirent_h.m4: Update.
1982         * gnulib/import/m4/dirfd.m4: Update.
1983         * gnulib/import/m4/dirname.m4: Update.
1984         * gnulib/import/m4/double-slash-root.m4: Update.
1985         * gnulib/import/m4/dup.m4: Update.
1986         * gnulib/import/m4/dup2.m4: Update.
1987         * gnulib/import/m4/eealloc.m4: Update.
1988         * gnulib/import/m4/environ.m4: Update.
1989         * gnulib/import/m4/errno_h.m4: Update.
1990         * gnulib/import/m4/error.m4: Update.
1991         * gnulib/import/m4/exponentd.m4: Update.
1992         * gnulib/import/m4/exponentl.m4: Update.
1993         * gnulib/import/m4/extensions.m4: Update.
1994         * gnulib/import/m4/extern-inline.m4: Update.
1995         * gnulib/import/m4/fchdir.m4: Update.
1996         * gnulib/import/m4/fcntl-o.m4: Update.
1997         * gnulib/import/m4/fcntl.m4: Update.
1998         * gnulib/import/m4/fcntl_h.m4: Update.
1999         * gnulib/import/m4/fdopendir.m4: Update.
2000         * gnulib/import/m4/filenamecat.m4: Update.
2001         * gnulib/import/m4/flexmember.m4: Update.
2002         * gnulib/import/m4/float_h.m4: Update.
2003         * gnulib/import/m4/fnmatch.m4: Update.
2004         * gnulib/import/m4/fnmatch_h.m4: Update.
2005         * gnulib/import/m4/fpieee.m4: Update.
2006         * gnulib/import/m4/frexp.m4: Update.
2007         * gnulib/import/m4/frexpl.m4: Update.
2008         * gnulib/import/m4/fstat.m4: Update.
2009         * gnulib/import/m4/fstatat.m4: Update.
2010         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2011         * gnulib/import/m4/getcwd-path-max.m4: Update.
2012         * gnulib/import/m4/getcwd.m4: Update.
2013         * gnulib/import/m4/getdtablesize.m4: Update.
2014         * gnulib/import/m4/getlogin.m4: Update.
2015         * gnulib/import/m4/getlogin_r.m4: Update.
2016         * gnulib/import/m4/getpagesize.m4: Update.
2017         * gnulib/import/m4/getprogname.m4: Update.
2018         * gnulib/import/m4/gettimeofday.m4: Update.
2019         * gnulib/import/m4/glibc21.m4: Update.
2020         * gnulib/import/m4/glob.m4: Update.
2021         * gnulib/import/m4/glob_h.m4: Update.
2022         * gnulib/import/m4/gnulib-cache.m4: Update.
2023         * gnulib/import/m4/gnulib-common.m4: Update.
2024         * gnulib/import/m4/gnulib-comp.m4: Update.
2025         * gnulib/import/m4/gnulib-tool.m4: Update.
2026         * gnulib/import/m4/hard-locale.m4: Update.
2027         * gnulib/import/m4/include_next.m4: Update.
2028         * gnulib/import/m4/inttypes-pri.m4: Update.
2029         * gnulib/import/m4/inttypes.m4: Update.
2030         * gnulib/import/m4/isnand.m4: Update.
2031         * gnulib/import/m4/isnanl.m4: Update.
2032         * gnulib/import/m4/largefile.m4: Update.
2033         * gnulib/import/m4/limits-h.m4: Update.
2034         * gnulib/import/m4/localcharset.m4: Update.
2035         * gnulib/import/m4/locale-fr.m4: Update.
2036         * gnulib/import/m4/locale-ja.m4: Update.
2037         * gnulib/import/m4/locale-zh.m4: Update.
2038         * gnulib/import/m4/localtime-buffer.m4: Update.
2039         * gnulib/import/m4/longlong.m4: Update.
2040         * gnulib/import/m4/lstat.m4: Update.
2041         * gnulib/import/m4/malloc.m4: Update.
2042         * gnulib/import/m4/malloca.m4: Update.
2043         * gnulib/import/m4/math_h.m4: Update.
2044         * gnulib/import/m4/mbrtowc.m4: Update.
2045         * gnulib/import/m4/mbsinit.m4: Update.
2046         * gnulib/import/m4/mbsrtowcs.m4: Update.
2047         * gnulib/import/m4/mbstate_t.m4: Update.
2048         * gnulib/import/m4/memchr.m4: Update.
2049         * gnulib/import/m4/memmem.m4: Update.
2050         * gnulib/import/m4/mempcpy.m4: Update.
2051         * gnulib/import/m4/memrchr.m4: Update.
2052         * gnulib/import/m4/mkdir.m4: Update.
2053         * gnulib/import/m4/mkstemp.m4: Update.
2054         * gnulib/import/m4/mmap-anon.m4: Update.
2055         * gnulib/import/m4/mode_t.m4: Update.
2056         * gnulib/import/m4/msvc-inval.m4: Update.
2057         * gnulib/import/m4/msvc-nothrow.m4: Update.
2058         * gnulib/import/m4/multiarch.m4: Update.
2059         * gnulib/import/m4/nocrash.m4: Update.
2060         * gnulib/import/m4/off_t.m4: Update.
2061         * gnulib/import/m4/onceonly.m4: Update.
2062         * gnulib/import/m4/open-cloexec.m4: Update.
2063         * gnulib/import/m4/open.m4: Update.
2064         * gnulib/import/m4/openat.m4: Update.
2065         * gnulib/import/m4/opendir.m4: Update.
2066         * gnulib/import/m4/pathmax.m4: Update.
2067         * gnulib/import/m4/rawmemchr.m4: Update.
2068         * gnulib/import/m4/readdir.m4: Update.
2069         * gnulib/import/m4/readlink.m4: Update.
2070         * gnulib/import/m4/realloc.m4: Update.
2071         * gnulib/import/m4/rename.m4: Update.
2072         * gnulib/import/m4/rewinddir.m4: Update.
2073         * gnulib/import/m4/rmdir.m4: Update.
2074         * gnulib/import/m4/save-cwd.m4: Update.
2075         * gnulib/import/m4/secure_getenv.m4: Update.
2076         * gnulib/import/m4/setenv.m4: Update.
2077         * gnulib/import/m4/signal_h.m4: Update.
2078         * gnulib/import/m4/ssize_t.m4: Update.
2079         * gnulib/import/m4/stat-time.m4: Update.
2080         * gnulib/import/m4/stat.m4: Update.
2081         * gnulib/import/m4/std-gnu11.m4: Update.
2082         * gnulib/import/m4/stdbool.m4: Update.
2083         * gnulib/import/m4/stddef_h.m4: Update.
2084         * gnulib/import/m4/stdint.m4: Update.
2085         * gnulib/import/m4/stdio_h.m4: Update.
2086         * gnulib/import/m4/stdlib_h.m4: Update.
2087         * gnulib/import/m4/strchrnul.m4: Update.
2088         * gnulib/import/m4/strdup.m4: Update.
2089         * gnulib/import/m4/strerror.m4: Update.
2090         * gnulib/import/m4/string_h.m4: Update.
2091         * gnulib/import/m4/strstr.m4: Update.
2092         * gnulib/import/m4/strtok_r.m4: Update.
2093         * gnulib/import/m4/sys_socket_h.m4: Update.
2094         * gnulib/import/m4/sys_stat_h.m4: Update.
2095         * gnulib/import/m4/sys_time_h.m4: Update.
2096         * gnulib/import/m4/sys_types_h.m4: Update.
2097         * gnulib/import/m4/tempname.m4: Update.
2098         * gnulib/import/m4/time_h.m4: Update.
2099         * gnulib/import/m4/unistd-safer.m4: Update.
2100         * gnulib/import/m4/unistd_h.m4: Update.
2101         * gnulib/import/m4/warn-on-use.m4: Update.
2102         * gnulib/import/m4/wchar_h.m4: Update.
2103         * gnulib/import/m4/wchar_t.m4: Update.
2104         * gnulib/import/m4/wctype_h.m4: Update.
2105         * gnulib/import/m4/wint_t.m4: Update.
2106         * gnulib/import/malloc.c: Update.
2107         * gnulib/import/malloc/scratch_buffer.h: Update.
2108         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2109         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2110         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2111         * gnulib/import/malloca.c: Update.
2112         * gnulib/import/malloca.h: Update.
2113         * gnulib/import/malloca.valgrind: Update.
2114         * gnulib/import/math.in.h: Update.
2115         * gnulib/import/mbrtowc.c: Update.
2116         * gnulib/import/mbsinit.c: Update.
2117         * gnulib/import/mbsrtowcs-impl.h: Update.
2118         * gnulib/import/mbsrtowcs-state.c: Update.
2119         * gnulib/import/mbsrtowcs.c: Update.
2120         * gnulib/import/memchr.c: Update.
2121         * gnulib/import/memmem.c: Update.
2122         * gnulib/import/mempcpy.c: Update.
2123         * gnulib/import/memrchr.c: Update.
2124         * gnulib/import/mkdir.c: Update.
2125         * gnulib/import/mkstemp.c: Update.
2126         * gnulib/import/msvc-inval.c: Update.
2127         * gnulib/import/msvc-inval.h: Update.
2128         * gnulib/import/msvc-nothrow.c: Update.
2129         * gnulib/import/msvc-nothrow.h: Update.
2130         * gnulib/import/open.c: Update.
2131         * gnulib/import/openat-die.c: Update.
2132         * gnulib/import/openat-priv.h: Update.
2133         * gnulib/import/openat-proc.c: Update.
2134         * gnulib/import/openat.c: Update.
2135         * gnulib/import/openat.h: Update.
2136         * gnulib/import/opendir.c: Update.
2137         * gnulib/import/pathmax.h: Update.
2138         * gnulib/import/pipe-safer.c: Update.
2139         * gnulib/import/rawmemchr.c: Update.
2140         * gnulib/import/readdir.c: Update.
2141         * gnulib/import/readlink.c: Update.
2142         * gnulib/import/realloc.c: Update.
2143         * gnulib/import/ref-add.sin: Update.
2144         * gnulib/import/ref-del.sin: Update.
2145         * gnulib/import/rename.c: Update.
2146         * gnulib/import/rewinddir.c: Update.
2147         * gnulib/import/rmdir.c: Update.
2148         * gnulib/import/same-inode.h: Update.
2149         * gnulib/import/save-cwd.c: Update.
2150         * gnulib/import/save-cwd.h: Update.
2151         * gnulib/import/scratch_buffer.h: Update.
2152         * gnulib/import/secure_getenv.c: Update.
2153         * gnulib/import/setenv.c: Update.
2154         * gnulib/import/signal.in.h: Update.
2155         * gnulib/import/stat-time.c: Update.
2156         * gnulib/import/stat-time.h: Update.
2157         * gnulib/import/stat-w32.c: Update.
2158         * gnulib/import/stat-w32.h: Update.
2159         * gnulib/import/stat.c: Update.
2160         * gnulib/import/stdbool.in.h: Update.
2161         * gnulib/import/stddef.in.h: Update.
2162         * gnulib/import/stdint.in.h: Update.
2163         * gnulib/import/stdio.in.h: Update.
2164         * gnulib/import/stdlib.in.h: Update.
2165         * gnulib/import/str-two-way.h: Update.
2166         * gnulib/import/strchrnul.c: Update.
2167         * gnulib/import/strdup.c: Update.
2168         * gnulib/import/streq.h: Update.
2169         * gnulib/import/strerror-override.c: Update.
2170         * gnulib/import/strerror-override.h: Update.
2171         * gnulib/import/strerror.c: Update.
2172         * gnulib/import/string.in.h: Update.
2173         * gnulib/import/stripslash.c: Update.
2174         * gnulib/import/strnlen1.c: Update.
2175         * gnulib/import/strnlen1.h: Update.
2176         * gnulib/import/strstr.c: Update.
2177         * gnulib/import/strtok_r.c: Update.
2178         * gnulib/import/sys_stat.in.h: Update.
2179         * gnulib/import/sys_time.in.h: Update.
2180         * gnulib/import/sys_types.in.h: Update.
2181         * gnulib/import/tempname.c: Update.
2182         * gnulib/import/tempname.h: Update.
2183         * gnulib/import/time.in.h: Update.
2184         * gnulib/import/unistd--.h: Update.
2185         * gnulib/import/unistd-safer.h: Update.
2186         * gnulib/import/unistd.in.h: Update.
2187         * gnulib/import/unsetenv.c: Update.
2188         * gnulib/import/verify.h: Update.
2189         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2190         * gnulib/import/wchar.in.h: Update.
2191         * gnulib/import/wctype.in.h: Update.
2192         * gnulib/import/xalloc-oversized.h: Update.
2193         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2194         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2195
2196 2018-08-16  Gary Benson <gbenson@redhat.com>
2197
2198         PR gdb/13000:
2199         * gdb/main.c (captured_main_1): Exit with nonzero status
2200         in batch mode if the last command to be executed failed.
2201         * NEWS: Mention the above.
2202
2203 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
2204
2205         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
2206         end of warning message.
2207
2208 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2209
2210         PR gdb/22943:
2211         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
2212         (aarch64_extract_return_value): Use
2213         aapcs_is_vfp_call_or_return_candidate.
2214         (aarch64_return_in_memory): Likewise.
2215         (aarch64_store_return_value): Likewise.
2216
2217 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2218
2219         * aarch64-tdep.c
2220         (aapcs_is_vfp_call_or_return_candidate): Make static
2221         (pass_in_v_or_stack): Remove function.
2222         (pass_in_v_vfp_candidate): New function.
2223         (aarch64_push_dummy_call): Check for float register candidates.
2224
2225 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
2226
2227         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
2228         (aapcs_is_vfp_call_or_return_candidate_1): New function.
2229         (aapcs_is_vfp_call_or_return_candidate): Likewise.
2230
2231 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
2232
2233         PR build/23399
2234         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
2235         (struct ipa_sym_addresses): Rename to...
2236         (struct ipa_sym_addresses_common): ... this.
2237         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
2238
2239 2018-08-28  Tom Tromey  <tom@tromey.com>
2240
2241         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2242         (token_fifo): Now a std::vector.
2243         (yylex, c_parse): Update.
2244         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2245         (token_fifo): Now a std::vector.
2246         (yylex, d_parse): Update.
2247         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
2248         (token_fifo): Now a std::vector.
2249         (yylex, go_parse): Update.
2250
2251 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
2252
2253         * parser-defs.h (struct type_stack) <elements>: Change type to
2254         std::vector<union type_stack_elt>.
2255         <depth, size>: Remove.
2256         * parse.c (parse_exp_in_context_1): Adjust.
2257         (type_stack_reserve): Remove.
2258         (check_type_stack_depth): Remove.
2259         (insert_into_type_stack): Adjust to std::vector.
2260         (insert_type): Likewise.
2261         (push_type): Likewise.
2262         (push_type_int): Likewise.
2263         (insert_type_address_space): Likewise.
2264         (pop_type): Likewise.
2265         (pop_type_int): Likewise.
2266         (pop_typelist): Likewise.
2267         (pop_type_stack): Likewise.
2268         (append_type_stack): Likewise.
2269         (push_type_stack): Likewise.
2270         (get_type_stack): Likewise.
2271         (type_stack_cleanup): Likewise.
2272         (push_typelist): Likewise.
2273         (follow_types): Likewise.
2274         (_initialize_parse): Likewise.
2275
2276 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2277
2278         * NEWS: Mention csky target.
2279
2280 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
2281             Hafiz Abid Qadeer  <abidh@codesourcery.com>
2282             Don Breazeal  <donb@codesourcery.com>
2283
2284         * csky-linux-tdep.c: New file.
2285         * csky-tdep.c: Likewise.
2286         * csky-tdep.h: Likewise.
2287         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
2288         csky-tdep.o.
2289         (HFILES_NO_SRCDIR): Add csky-tdep.h.
2290         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
2291         * configure.tgt: Add csky support.
2292
2293 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
2294
2295         * python/py-framefilter.c (py_print_frame): Print frame architecture
2296         when printing on an MI output.
2297
2298 2018-08-27  Tom Tromey  <tom@tromey.com>
2299
2300         PR build/23087:
2301         * configure: Rebuild.
2302         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
2303
2304 2018-08-27  Tom Tromey  <tom@tromey.com>
2305
2306         * aarch64-linux-tdep.c
2307         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
2308         casts to int.
2309
2310 2018-08-27  Tom Tromey  <tom@tromey.com>
2311
2312         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
2313         unsigned.
2314         (ppc64_standard_linkage1, ppc64_standard_linkage2)
2315         (ppc64_standard_linkage3, ppc64_standard_linkage4)
2316         (ppc64_standard_linkage5, ppc64_standard_linkage6)
2317         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
2318         unsigned.
2319
2320 2018-08-27  Tom Tromey  <tom@tromey.com>
2321
2322         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
2323         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
2324
2325 2018-08-27  Tom Tromey  <tom@tromey.com>
2326
2327         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
2328         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
2329         ULONGEST_MAX.
2330         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
2331         ULONGEST_MAX.
2332         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
2333         ULONGEST_MAX.
2334         * sparc-linux-tdep.c (sparc32_linux_sigframe)
2335         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
2336         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
2337         ULONGEST_MAX.
2338         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
2339         (ppc64_linux_sigaction_tramp_frame)
2340         (ppc32_linux_sighandler_tramp_frame)
2341         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2342         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
2343         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
2344         * mn10300-linux-tdep.c (am33_linux_sigframe)
2345         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
2346         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
2347         * mips-linux-tdep.c (mips_linux_o32_sigframe)
2348         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
2349         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
2350         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
2351         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
2352         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
2353         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
2354         * microblaze-linux-tdep.c
2355         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
2356         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
2357         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
2358         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
2359         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
2360         * common/common-types.h (ULONGEST_MAX): New define.
2361         (CORE_ADDR_MAX): Fix formatting.
2362         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
2363         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
2364         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
2365         (arm_linux_rt_sigreturn_tramp_frame)
2366         (arm_eabi_linux_sigreturn_tramp_frame)
2367         (arm_eabi_linux_rt_sigreturn_tramp_frame)
2368         (thumb2_eabi_linux_sigreturn_tramp_frame)
2369         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
2370         (arm_linux_restart_syscall_tramp_frame)
2371         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
2372         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
2373         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
2374         ULONGEST_MAX.
2375         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
2376
2377 2018-08-27  Tom Tromey  <tom@tromey.com>
2378
2379         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
2380         CORE_ADDR_MAX.
2381         * mips-tdep.c (mips_deal_with_atomic_sequence)
2382         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
2383         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
2384         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
2385         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
2386         CORE_ADDR_MAX.
2387         * aarch64-tdep.c (aarch64_software_single_step): Use
2388         CORE_ADDR_MAX.
2389
2390 2018-08-27  Tom Tromey  <tom@tromey.com>
2391
2392         * linespec.c (complete_linespec_component): Add cast to "char".
2393         * completer.c (completion_tracker::build_completion_result): Add
2394         cast to "char".
2395
2396 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2397
2398         * solist.h (struct solist, struct target_so_ops): Fix
2399         indentation.
2400
2401 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2402
2403         * ada-tasks.c (ada_task_info_s): Remove typedef.
2404         (DEF_VEC_O(ada_task_info_s)): Remove.
2405         (struct ada_tasks_inferior_data): Initialize fields.
2406         <task_list>: Make an std::vector.
2407         (get_ada_tasks_inferior_data): Allocate with new.
2408         (ada_get_task_number): Adjust.
2409         (get_task_number_from_id): Likewise.
2410         (valid_task_id): Likewise.
2411         (ada_get_task_info_from_ptid): Likewise.
2412         (iterate_over_live_ada_tasks): Likewise.
2413         (add_ada_task): Likewise.
2414         (read_known_tasks): Likewise.
2415         (ada_build_task_list): Likewise.
2416         (print_ada_task_info): Likewise.
2417         (info_task): Likewise.
2418         (task_command_1): Likewise.
2419
2420 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
2421
2422         * ada-lang.c (add_angle_brackets): Return std::string.
2423
2424 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
2425
2426         * python/py-threadevent.c (py_get_event_thread): Initialize
2427         pythread.
2428
2429 2018-08-24  Pedro Alves  <palves@redhat.com>
2430
2431         * python/py-bpevent.c (create_breakpoint_event_object): Use
2432         copy-initialization.
2433         * python/py-continueevent.c (emit_continue_event): Use
2434         copy-initialization.
2435         * python/py-exitedevent.c (create_exited_event_object): Return a
2436         gdbpy_ref<>.
2437         (emit_exited_event): Use copy-initialization.
2438         * python/py-inferior.c (python_new_inferior)
2439         (python_inferior_deleted, add_thread_object): Use
2440         copy-initialization.
2441         * python/py-infevents.c (create_inferior_call_event_object)
2442         (create_register_changed_event_object)
2443         (create_memory_changed_event_object): Return a gdbpy_ref<>.
2444         (emit_inferior_call_event, emit_memory_changed_event)
2445         (emit_register_changed_event): Use copy-initialization.
2446         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2447         Return a gdbpy_ref<>.
2448         (emit_new_objfile_event): Use copy-initialization.
2449         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
2450         (emit_clear_objfiles_event): Use copy-initialization.
2451         * python/py-signalevent.c (create_signal_event_object): Use
2452         copy-initialization.
2453         * python/py-threadevent.c (create_thread_event_object): Use
2454         copy-initialization.
2455
2456 2018-08-24  Pedro Alves  <palves@redhat.com>
2457             Simon Marchi  <simon.marchi@ericsson.com>
2458
2459         PR gdb/23379
2460         * python/py-continueevent.c: Include "gdbthread.h".
2461         (create_continue_event_object): Add intro comment.  Add 'ptid'
2462         parameter.  Use it to find thread to pass to
2463         create_thread_event_object.
2464         (emit_continue_event): Pass PTID down to
2465         create_continue_event_object.
2466         * python/py-event.h (py_get_event_thread): Declare.
2467         (create_thread_event_object): Remove default from 'thread'
2468         parameter.
2469         * python/py-stopevent.c (create_stop_event_object): Use
2470         py_get_event_thread.
2471         * python/py-threadevent.c (get_event_thread): Rename to ...
2472         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
2473         and use it to find the thread.
2474         (create_thread_event_object): Assert that THREAD isn't null.
2475         Don't find the event thread here.
2476
2477 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
2478
2479         * block.h (blockrange, blockranges): New struct declarations.
2480         (struct block): Add new field named `ranges'.
2481         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
2482         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
2483         macros for accessing ranges in struct block.
2484         (make_blockranges): New declaration.
2485         block.c (make_blockranges): New function.
2486         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
2487         for block.
2488         * symtab.h (find_pc_partial_function): Add new parameter `block'.
2489         * blockframe.c (cache_pc_function_block): New static global.
2490         (clear_pc_function_cache): Clear cache_pc_function_block.
2491         (find_pc_partial_function): Move comment to symtab.h.  Add
2492         support for non-contiguous blocks.
2493         * cli/cli-cmds.c (block.h): Include.
2494         (print_disassembly): Handle printing of non-contiguous blocks.
2495         (disassemble_current_function): Likewise.
2496         (disassemble_command): Likewise.
2497
2498         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
2499         BLOCK_START.
2500         * blockframe.c (get_pc_function_start): Likewise.
2501         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
2502         (gcc_symbol_address): Likewise.
2503         * compile/compile-object-run.c (compile_object_run): Likewise.
2504         * compile/compile.c (get_expr_block_and_pc): Likewise.
2505         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
2506         (func_addr_to_tail_call_list): Likewise.
2507         * findvar.c (default_read_var_value): Likewise.
2508         * inline-frame.c (inline_frame_this_id): Likewise.
2509         (skip-inline_frames): Likewise.
2510         * infcmd.c (until_next_command): Likewise.
2511         * linespec.c (convert_linespec_to_sals): Likewise.
2512         * parse.c (parse_exp_in_context_1): Likewise.
2513         * printcmd.c (build_address_symbolic): likewise.
2514         (info_address_command): Likewise.
2515         symtab.c (find_function_start_sal): Likewise.
2516         (skip_prologue_sal): Likewise.
2517         (find_function_alias_target): Likewise.
2518         (find_gnu_ifunc): Likewise.
2519         * stack.c (find_frame_funname): Likewise.
2520         * symtab.c (fixup_symbol_section): Likewise.
2521         (find_function_start_sal): Likewise.
2522         (skip_prologue_sal): Likewsie.
2523         (find_function_alias_target): Likewise.
2524         (find_gnu_ifunc): Likewise.
2525         * tracepoint.c (info_scope_command): Likewise.
2526         * value.c (value_fn_field): Likewise.
2527
2528         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
2529         in place of find_pc_partial_function.
2530         * blockframe.c (find_function_entry_range_from_pc): New function.
2531         * symtab.h (find_function_entry_range_from_pc): Declare and document.
2532         * objfiles.c (objfile_relocate1): Relocate start and end addresses
2533         for each range in a block.
2534
2535
2536 2018-08-23  Xavier Roirand  <roirand@adacore.com>
2537
2538         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
2539         incrementation.
2540
2541 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2542
2543         * solib-svr4.c (read_program_headers_from_bfd): Return
2544         gdb::optional<gdb::byte_vector>.
2545         (svr4_exec_displacement): Adjust.
2546
2547 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2548
2549         * solib-svr4.c (read_program_header): Return
2550         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
2551         (find_program_interpreter): Return
2552         gdb::optional<gdb::byte_vector>.
2553         (scan_dyntag_auxv): Adjust.
2554         (enable_break): Adjust.
2555         (svr4_exec_displacement): Adjust.
2556
2557 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2558
2559         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
2560         * inf-child.c (inf_child_target::terminal_save_inferior): New.
2561
2562 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
2563
2564         * guile/scm-string.c (gdbscm_scm_from_printf): Use
2565         string_vprintf.
2566         * guile/scm-utils.c (gdbscm_printf): Likewise.
2567         * serial.c (serial_printf): Likewise.
2568         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
2569
2570 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
2571
2572         * stack.c (print_frame): Print frame architecture when printing on
2573         an MI output.
2574         * NEWS: Mention new "arch" attribute in frame output.
2575
2576 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2577
2578         * arch/aarch64.h (aarch64_regnum): Update comment.
2579
2580 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
2581
2582         * NEWS: Add SVE to 8.2 section.
2583
2584 2018-08-21  Pedro Alves  <palves@redhat.com>
2585
2586         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
2587         out from gdbscm_parse_function_args.
2588         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
2589         gdbscm_parse_function_args_1.
2590
2591 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
2592
2593         PR gdb/17816
2594         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
2595         operator.
2596
2597 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
2598
2599         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
2600
2601 2018-08-19  Michael Spang  <spang@google.com>
2602
2603         PR gdb/11786
2604         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
2605         for PT_TLS segments.
2606
2607 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
2608
2609         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
2610         dwarf_variable_value.
2611         * dwarf2-frame.c (class dwarf_expr_executor):
2612         Add override for dwarf_variable_value.
2613         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
2614         (class symbol_needs_eval_context): Likewise.
2615         (indirect_synthetic_pointer): Add forward declaration.
2616         (sect_variable_value): New function.
2617         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
2618         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
2619         for DW_OP_GNU_variable_value.
2620
2621 2018-08-16  Tom Tromey  <tom@tromey.com>
2622
2623         * top.c (read_command_file): Update.
2624         (command_line_input): Remove "repeat" argument.
2625         * ada-lang.c (get_selections): Update.
2626         * linespec.c (decode_line_2): Update.
2627         * defs.h (command_line_input): Remove argument.
2628         * cli/cli-script.c (read_next_line): Update.
2629         * python/py-gdb-readline.c: Update.
2630
2631 2018-08-17  Tom Tromey  <tom@tromey.com>
2632
2633         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
2634         command_line_input.
2635
2636 2018-08-15  Tom Tromey  <tom@tromey.com>
2637
2638         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
2639
2640 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
2641
2642         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
2643         If used, use find_pc_partial_function to find address range
2644         to disassemble.
2645         * mi/mi-main.c (mi_cmd_list_features): Report
2646         "data-disassemble-a-option" feature.
2647         * NEWS: Mention new -data-disassemble option -a.
2648
2649 2018-08-13  Tom Tromey  <tom@tromey.com>
2650
2651         * common/common-defs.h (_FORTIFY_SOURCE): Define.
2652
2653 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2654
2655         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
2656         (aarch64_linux_collect_sve_regset): Likewise.
2657         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
2658         * regcache.h (regcache_map_entry_size): New function.
2659
2660 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2661
2662         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
2663         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
2664         (SVE_HEADER_VL_LENGTH): Likewise.
2665         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
2666         (SVE_HEADER_FLAGS_LENGTH): Likewise.
2667         (SVE_HEADER_RESERVED_LENGTH): Likewise.
2668         (SVE_HEADER_SIZE_OFFSET): Likewise.
2669         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
2670         (SVE_HEADER_VL_OFFSET): Likewise.
2671         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
2672         (SVE_HEADER_FLAGS_OFFSET): Likewise.
2673         (SVE_HEADER_RESERVED_OFFSET): Likewise.
2674         (SVE_HEADER_SIZE): Likewise.
2675         (aarch64_linux_core_read_vq): Add function.
2676         (aarch64_linux_core_read_description): Check for SVE section.
2677
2678 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
2679
2680         * aarch64-fbsd-tdep.c
2681         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
2682         collect_size.
2683         * aarch64-linux-tdep.c
2684         (aarch64_linux_iterate_over_regset_sections): Likewise.
2685         * alpha-linux-tdep.c
2686         (alpha_linux_iterate_over_regset_sections):
2687         * alpha-nbsd-tdep.c
2688         (alphanbsd_iterate_over_regset_sections): Likewise.
2689         * amd64-fbsd-tdep.c
2690         (amd64fbsd_iterate_over_regset_sections): Likewise.
2691         * amd64-linux-tdep.c
2692         (amd64_linux_iterate_over_regset_sections): Likewise.
2693         * arm-bsd-tdep.c
2694         (armbsd_iterate_over_regset_sections): Likewise.
2695         * arm-fbsd-tdep.c
2696         (arm_fbsd_iterate_over_regset_sections): Likewise.
2697         * arm-linux-tdep.c
2698         (arm_linux_iterate_over_regset_sections): Likewise.
2699         * corelow.c (get_core_registers_cb): Likewise.
2700         (core_target::fetch_registers): Likewise.
2701         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
2702         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
2703         * gdbarch.h (void): Regenerate.
2704         * gdbarch.sh: Add supply_size and collect_size.
2705         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
2706         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
2707         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
2708         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
2709         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
2710         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
2711         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
2712         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
2713         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
2714         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
2715         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
2716         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
2717         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
2718         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
2719         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
2720         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
2721         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
2722         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
2723         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
2724         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
2725         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
2726         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
2727         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
2728         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
2729         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
2730         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
2731         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
2732         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
2733         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
2734         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
2735
2736 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
2737
2738         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
2739         with string_printf.
2740
2741 2018-08-10  Keith Seitz  <keiths@redhat.com>
2742
2743         * compile/compile-c-support.c (add_code_header, add_code_footer):
2744         Move into policy class.
2745         (c_push_user_expression, pop_user_expression_nop)
2746         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
2747         (compile_program): New host class.
2748         (c_compile_program): New typedef.
2749         (c_compute_porgram): Use c_compile_program.
2750
2751 2018-08-10  Keith Seitz  <keiths@redhat.com>
2752
2753         * compile/compile-internal.h (compile_instance::~compile_instance):
2754         Remove calls to htab_delete.
2755         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
2756         * compile.c (compile_instance::compile_instance): Initialize
2757         htab unique pointers.
2758         (compile_instance::get_cached_type, compile_instance::insert_type)
2759         (compile_instance::error_symbol_once): Update for unique_ptr.
2760
2761 2018-08-10  Keith Seitz  <keiths@redhat.com>
2762
2763         * compile/compile-c-symbols.c (struct symbol_error)
2764         (hash_symbol_error, eq_symbol_error, del_symbol_error)
2765         (compile_instance::insert_symbol_error)
2766         (compile_instance::error_symbol_once): Move to ...
2767         * compile/compile.c: ... here.
2768
2769 2018-08-10  Keith Seitz  <keiths@redhat.com>
2770
2771         * compile/compile-c-support.c (c_get_compile_context): Use `new'
2772         instead of `new_compile_instance'.
2773         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
2774         Update description.
2775         If the symbol error map is not initialized, create it.
2776         (generate_c_for_for_one_symbol): Do not check/initialize
2777         the symbol error map.
2778         * compile/compile-c-types.c (compile_c_instance): Make a class.
2779         Update all callers.
2780         (compile_instance::compile_instance): Initialize the type cache.
2781         (get_cached_type): New function.
2782         (insert_type): Update description.
2783         (compile_c_instance::m_default_cflags): Define.
2784         (convert_type): Update description.  Use get_cached_type.
2785         (delete_instance): Moved to destructor.
2786         (new_compile_instance): Moved to constructor.
2787         * compile/compile-c.h (compile_c_instance): Make class inheriting
2788         from compile_instance.
2789         <base>: Remove field.
2790         <type_map, symbol_err_map>: Move to base class.
2791         <c_plugin>: Rename to `m_plugin' and remove pointer type.
2792         * compile/compile-internal.h (compile_instance): Make class.
2793         <type_map_t, symbol_err_map_t>: Define.
2794         <fe>: Rename to `m_gcc_fe'.
2795         <scope, block, gcc_target_options>: Add `m_' prefix.
2796         <m_type_map, m_symbol_err_map>: New fields, moved from
2797         compile_c_instance.
2798         <destroy>: Remove.
2799         (convert_type, new_compile_instance): Remove.
2800         * compile/compile.c (cleanup_compile_instance): Remove.
2801         (compile_to_object): Use unique_ptr to eliminate cleanups.
2802         (compile_instance::set_print_callback, compile_instance::version)
2803         (compile_instance::set_verbose)
2804         (compile_instance::set_driver_filename)
2805         (compile_instance::set_triplet_regexp)
2806         (compile_instance::set_arguments)
2807         (compile_instance::set_source_file)
2808         (compile_instance::compile): Define.
2809
2810 2018-08-10  Keith Seitz  <keiths@redhat.com>
2811
2812         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
2813         * compile/compile-c-types.c: Define GCC_METHODN macros and include
2814         gcc-c-fe.def to define C plugin.
2815         (delete_instance): Delete `c_plugin'.
2816         (new_compile_instance): Initialize `c_plugin'.
2817         * compile/compile-c.h: Include gcc_c_plugin.h.
2818         (struct compile_c_instance) <c_plugin>: New member.
2819         * gcc-c-plugin.h: New file.
2820         Update all callers with API change.
2821
2822 2018-08-10  Keith Seitz  <keiths@redhat.com>
2823
2824         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
2825         (HFILES_NO_SRCDIR): ... to here.
2826         Add compile-internal.h and compile-c.h.
2827         * compile/compile-c-support.c: Include compile-c.h.
2828         * compile/compile-c-symbols.c: Include compile-c.h.
2829         (generate_c_for_variable_locations): Update comment.
2830         * compile/compile-c-types.c: Include compile-c.h.
2831         * compile/compile-c.h: New file -- moved C language declarations
2832         from other files here.
2833         * compile/compile-internal.h: Do not include hashtab.h or
2834         common/enum-flags.h.
2835         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
2836         (gcc_convert_symbol, gcc_symbol_address)
2837         (generate_c_for_variable_locations, c_get_mode_for_size)
2838         (c_get_range_decl_name): Definitions moved to compile-c.h.
2839         * compile/compile-loc2c.c: Include compile-c.h.
2840
2841 2018-08-10  Keith Seitz  <keiths@redhat.com>
2842
2843         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
2844         (c_symbol_substitution_name): ... this.
2845         Update all callers.
2846
2847 2018-08-10  Keith Seitz  <keiths@redhat.com>
2848
2849         * compile/compile-c-support.c (c_compute_program): Use
2850         unique_xmalloc_ptr to eliminate cleanup.
2851         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
2852         Return a unique_xmalloc_ptr and eliminate cleanup.
2853         * compile/compile-internal.h (generate_c_for_variable_locations):
2854         Return unique_xmalloc_ptr and update description.
2855
2856 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
2857
2858         * corelow.c (core_target::get_core_register_section): Rename
2859         min_size to section_min_size.
2860
2861 2018-08-09  Jim Wilson  <jimw@sifive.com>
2862
2863         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
2864         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
2865         * NEWS: Mention new GNU/Linux RISC-V target.
2866         * configure.host: Add riscv*-*-linux*.
2867         * configure.nat: Add riscv*.
2868         * configure.tgt: Add riscv*-*-linux*.
2869         * riscv-linux-nat.c: New file.
2870         * riscv-linux-tdep.c: New file.
2871
2872 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2873
2874         * infrun.c (resume): Make static, add forward declaration.
2875         (proceed): Update header comment.
2876         * infrun.h (resume): Delete declaration.
2877
2878 2018-08-09  Tom Tromey  <tom@tromey.com>
2879
2880         * riscv-tdep.h: Minor formatting fixes.
2881
2882 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
2883
2884         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
2885         * dwarf-index-cache.c (create_dir_and_check): Likewise.
2886         (test_mkdir_recursive): Likewise.
2887         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
2888
2889 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
2890
2891         * valarith.c (value_subscripted_rvalue): If an array is not in
2892         memory, and we don't know the upper bound, then we can't know that
2893         the requested element exists or not.
2894
2895 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
2896
2897         * target.c (str_comma_list_concat_elem): Fix typo in comment.
2898         (target_options_to_string): Add comment.
2899
2900 2018-08-08  Tom Tromey  <tom@tromey.com>
2901
2902         * unittests/scoped_mmap-selftests.c: Check result of "write".
2903
2904 2018-08-08  Jim Wilson  <jimw@sifive.com>
2905
2906         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
2907         (decode_register_index_short): New.
2908         (decode_j_type_insn, decode_cj_type_insn): New.
2909         (decode_b_type_insn, decode_cb_type_insn): New.
2910         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
2911         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
2912         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
2913         is_c_sw_insn instead of is_sw_insn.
2914         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
2915         (riscv_software_single_step): New.
2916         * riscv-tdep.h (riscv_software_single_step): Declare.
2917
2918         * riscv-tdep.c (riscv_isa_xlen): Drop static.
2919         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
2920
2921 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
2922
2923         PR gdb/18050:
2924         * target.c (dispose_inferior): Don't dispose of inferiors that are
2925         already killed.
2926
2927 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
2928
2929         * remote.c (remote_target::download_tracepoint): Change char* to
2930         const char*.
2931
2932 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
2933
2934         * target.h (target_options_to_string): Return an std::string.
2935         * target.c (str_comma_list_concat_elem): Return void, use
2936         std::string.
2937         (do_option): Likewise.
2938         (target_options_to_string): Return an std::string.
2939         * linux-nat.c (linux_nat_target::wait): Adjust.
2940         * target-debug.h (target_debug_print_options): Adjust.
2941
2942 2018-08-07  Tom Tromey  <tom@tromey.com>
2943
2944         * Makefile.in (CPPFLAGS): New variable.
2945         (INTERNAL_CPPFLAGS): Use it.
2946
2947 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2948
2949         * NEWS: Mention the index cache.
2950
2951 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2952
2953         * common/pathstuff.h (get_standard_cache_dir): New.
2954         * common/pathstuff.c (get_standard_cache_dir): New.
2955         * build-id.h (build_id_to_string): New.
2956         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
2957         DEBUG_STR_SUFFIX): Move to here.
2958         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
2959         DEBUG_STR_SUFFIX): Move from there.
2960         (write_psymtabs_to_index): Make non-static, add basename
2961         parameter.  Write to temporary files, rename when done.
2962         (save_gdb_index_command): Adjust call to
2963         write_psymtabs_to_index.
2964         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
2965         field.
2966         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
2967         (get_gdb_index_contents_from_cache): New.
2968         (get_gdb_index_contents_from_cache_dwz): New.
2969         (dwarf2_initialize_objfile): Read index from cache.
2970         (dwarf2_build_psymtabs): Save to index.
2971         * dwarf-index-cache.h: New file.
2972         * dwarf-index-cache.c: New file.
2973         * dwarf-index-write.h: New file.
2974
2975 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2976
2977         * gnulib/aclocal.m4: Re-generate.
2978         * gnulib/config.in: Re-generate.
2979         * gnulib/configure: Re-generate.
2980         * gnulib/import/Makefile.am: Re-generate.
2981         * gnulib/import/Makefile.in: Re-generate.
2982         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
2983         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
2984         * gnulib/import/m4/mkdir.m4: New file.
2985         * gnulib/import/mkdir.c: New file.
2986         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
2987         module.
2988
2989 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
2990
2991         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
2992         * common/scoped_mmap.c: New file.
2993         * common/scoped_mmap.h (destroy): New method.
2994         (~scoped_mmap, reset): Use destroy.
2995         (scoped_mmap): New move constructor.
2996         (mmap_file): New declaration.
2997         * unittests/scoped_mmap-selftests.c (test_normal,
2998         test_invalid_filename, run_tests): New functions.
2999         (_initialize_scoped_mmap_selftests): Register selftest.
3000
3001 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3002
3003         * dwarf2read.c (read_gdb_index_from_section): Rename to...
3004         (read_gdb_index_from_buffer): ... this.  Remove section
3005         parameter, add buffer parameter.
3006         (get_gdb_index_contents_ftype,
3007         get_gdb_index_contents_dwz_ftype): New typedefs.
3008         (dwarf2_read_gdb_index): Add callback parameters to get the
3009         index contents.
3010         (get_gdb_index_contents_from_section): New.
3011         (dwarf2_initialize_objfile): Update call to
3012         dwarf2_read_gdb_index.
3013
3014 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3015
3016         * common/filestuff.h (gdb_fopen_cloexec): New overload.
3017         (gdb_open_cloexec): Likewise.
3018         * nat/linux-osdata.c (command_from_pid): Use string_printf.
3019         (commandline_from_pid): Likewise.
3020         (linux_xfer_osdata_threads): Likewise.
3021         (linux_xfer_osdata_fds): Likewise.
3022         * ada-lang.c (is_package_name): Likewise.
3023         * auxv.c (procfs_xfer_auxv): Likewise.
3024         * breakpoint.c (print_one_breakpoint_location): Use
3025         uiout::field_fmt.
3026         (print_one_catch_solib): Use string_printf.
3027         * coff-pe-read.c (add_pe_exported_sym): Likewise.
3028         (add_pe_forwarded_sym): Likewise.
3029         * dwarf2read.c (create_type_unit_group): Likewise.
3030         (build_error_marker_type): Likewise.
3031         * infcall.c (get_function_name): Likewise.
3032         * valprint.c (print_converted_chars_to_obstack): Likewise.
3033         * xtensa-tdep.c (xtensa_register_type): Likewise.
3034
3035 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
3036
3037         * remote.c (remote_target::download_tracepoint): Fix format
3038         string errors.
3039
3040 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3041
3042         * tracefile.c: Include common/byte-vector.h.
3043         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
3044         with trace_regblock_size if needed.  Update uses of buf.
3045
3046 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3047
3048         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
3049         std::vector<unsigned char>.
3050         * tracepoint.c (collection_list::collection_list): Remove
3051         m_regs_mask initializer from initializer list.  Resize
3052         m_regs_mask using the largest remote register number.
3053         (collection_list::add_remote_register): Remove size check on
3054         m_regs_mask.  Use at to access element.
3055         (collection_list::stringify): Change type of temp_buf to
3056         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
3057         stringify the register mask.  Use pack_hex_byte for the register
3058         mask.
3059
3060 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3061
3062         * tracepoint.h (class collection_list) <add_register>: Remove.
3063         <add_remote_register, add_ax_registers, add_local_register>:
3064         Declare.
3065         <add_memrange>: Add scope parameter.
3066         * tracepoint.c (encode_actions_1): Likewise.
3067         (collection_list::add_register): Rename to ...
3068         (collection_list::add_remote_register): ... this.  Update
3069         comment.
3070         (collection_list::add_ax_registers, add_local_register): New
3071         methods.
3072         (collection_list::add_memrange): Add scope parameter.  Call
3073         add_local_register instead of add_register.
3074         (finalize_tracepoint_aexpr): New function.
3075         (collection_list::collect_symbol): Update calls to add_memrange.
3076         Call add_local_register instead of add_register.  Call
3077         add_ax_registers.  Call finalize_tracepoint_aexpr.
3078         (encode_actions_1): Get remote regnos for $reg action.  Call
3079         add_remote_register, add_ax_registers, and add_local_register.
3080         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
3081         (validate_actionline): Call finalize_tracepoint_aexpr.
3082
3083 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3084
3085         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
3086         Replace array buf with gdb::char_vector buf, of size
3087         get_remote_packet_size ().  Replace references to buf and
3088         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
3089         and xsnprintf with snprintf.  Raise errors if the buffer is too
3090         small.
3091
3092 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3093
3094         * remote.c (remote_target::download_tracepoint): Fix the has_more
3095         predicate in the QTDP action list iteration.
3096
3097 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3098
3099         * remote.c (remote_target::download_tracepoint): Fix indentation
3100         in for block.
3101
3102 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3103
3104         * proc-api.c (_initialize_proc_api): Remove c, unused.
3105         * procfs.c (procfs_init_inferior): Remove signals, unused.
3106         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
3107         unused.
3108
3109 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
3110             Andrew Burgess  <andrew.burgess@embecosm.com>
3111
3112         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
3113         'W_STOPCODE (0)' as this could be ambiguous.
3114
3115 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
3116
3117         * ser-tcp.c (net_open): Fix thinko when deciding whether to
3118         disable TCP's Nagle algorithm (use "ai_protocol" instead of
3119         "ai_socktype").
3120
3121 2018-08-02  Tom Tromey  <tom@tromey.com>
3122
3123         PR symtab/16842.
3124         * dwarf2read.c (read_func_scope): Set symtab on template parameter
3125         symbols.
3126         (process_structure_scope): Likewise.
3127
3128 2018-08-02  Xavier Roirand  <roirand@adacore.com>
3129
3130         PR gdb/22629:
3131         * darwin-nat.c (darwin_kill_inferior): Fix handling of
3132         kill inferior.
3133
3134 2018-08-02  Tom Tromey  <tom@tromey.com>
3135
3136         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
3137         (darwin_suspend_inferior, darwin_resume_inferior)
3138         (darwin_decode_notify_message, darwin_resume_inferior_threads)
3139         (darwin_check_new_threads): Check result of get_darwin_inferior.
3140
3141 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
3142
3143         GDB 8.1.1 released.
3144
3145 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
3146
3147         * varobj.c (varobj_get_path_expr_parent): Report an error if
3148         parent is a dynamic varobj.
3149
3150 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3151
3152         * gnulib/aclocal.m4: Re-generate.
3153         * gnulib/config.in: Re-generate.
3154         * gnulib/configure: Re-generate.
3155         * gnulib/import/Makefile.in: Re-generate.
3156         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3157         * gnulib/import/m4/onceonly.m4: Re-generate.
3158
3159 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
3160
3161         * target-descriptions.c (struct xml_test_tdesc): New.
3162         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
3163         (record_xml_tdesc): Update.
3164         (maintenance_check_xml_descriptions): Update.
3165         * target-descriptions.h (record_xml_tdesc): Update comment.
3166
3167 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
3168
3169         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
3170         checking array bounds are defined.
3171
3172 2018-07-30  Tom Tromey  <tom@tromey.com>
3173
3174         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
3175         irreflexivity violation.
3176
3177 2018-07-30  Tom Tromey  <tom@tromey.com>
3178
3179         * cli/cli-decode.c (lookup_cmd): Remove lint code.
3180         * value.c (unpack_long): Remove lint code.
3181         * valops.c (value_ind): Remove lint code.
3182         * valarith.c (value_x_binop, value_x_unop, value_equal)
3183         (value_pos): Remove lint code.
3184
3185 2018-07-28  Tom de Vries  <tdevries@suse.de>
3186
3187         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
3188         with undefined upper bound as <optimized out>.
3189
3190 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
3191
3192         * gcore.in: Rename variable "name" to "prefix".  Expand
3193         "usage" text.
3194
3195 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
3196
3197         * windows-nat.c (windows_nat_target::create_inferior): Update to
3198         call close() in global namespace.
3199
3200 2018-07-26  Tom Tromey  <tom@tromey.com>
3201
3202         * dwarf-index-write.c (add_address_entry): Don't add objfile
3203         offsets.
3204         * dbxread.c (find_stab_function): Rename from
3205         find_stab_function_addr.  Return a bound_minimal_symbol.
3206         (read_dbx_symtab): Use raw_text_low, raw_text_high.
3207         Don't add objfile offsets.
3208         (end_psymtab): Use raw_text_low, raw_text_high,
3209         MSYMBOL_VALUE_RAW_ADDRESS.
3210         (read_ofile_symtab): Update.
3211         (process_one_symbol): Update.
3212         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
3213         offsets.
3214         (dw2_relocate): Remove.
3215         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
3216         searching addrmap.
3217         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
3218         Update.
3219         (process_psymtab_comp_unit_reader, add_partial_symbol)
3220         (add_partial_subprogram, dwarf2_ranges_read): Update.
3221         (load_partial_dies): Update.
3222         (add_address_entry): Don't add objfile offsets.
3223         (dwarf2_build_include_psymtabs): Update.
3224         (create_addrmap_from_aranges): Don't add objfile offsets.
3225         (dw2_find_pc_sect_compunit_symtab): Update.
3226         * mdebugread.c (parse_symbol): Don't add objfile offsets.
3227         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
3228         Update.
3229         (parse_partial_symbols): Don't add objfile offsets.  Use
3230         raw_text_low, raw_text_high.  Update.
3231         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
3232         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
3233         or call 'relocate' quick function.  Clear psymbol_map.
3234         * psympriv.h (struct partial_symbol) <address>: Add section
3235         offset.
3236         <set_unrelocated_address>: Rename from set_address.
3237         <raw_text_low, raw_text_high>: New methods.
3238         <text_low, text_high>: Add objfile parameter.
3239         (add_psymbol_to_bcache): Add 'section' parameter.  Call
3240         set_unrelocated_address.
3241         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3242         (find_pc_psymbol): Update.
3243         (fixup_psymbol_section, relocate_psymtabs): Remove.
3244         (dump_psymtab, psym_functions): Update.
3245         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
3246         parameter.
3247         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
3248         (start_psymtab_common): Update.
3249         * symfile-debug.c (debug_qf_relocate): Remove.
3250         (debug_sym_quick_functions): Update.
3251         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
3252         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
3253         Update.
3254
3255 2018-07-26  Tom Tromey  <tromey@redhat.com>
3256
3257         * dbxread.c (end_psymtab): Use text_high_valid and
3258         text_low_valid.
3259         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
3260         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
3261         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3262         Update comment.
3263         <text_low_valid, text_high_valid>: New fields.
3264         <set_text_low, set_text_high>: Update.
3265         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
3266
3267 2018-07-26  Tom Tromey  <tom@tromey.com>
3268
3269         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
3270         Update.
3271         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
3272         textlow and texthigh fields.
3273         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
3274         Update.
3275         * mdebugread.c (parse_lines, parse_partial_symbols)
3276         (psymtab_to_symtab_1): Update.
3277         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
3278         Rename fields.  Update comment.  Now private.
3279         <text_low, text_high, set_text_low, set_text_high>: New methods.
3280         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3281         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
3282         (start_psymtab_common, maintenance_info_psymtabs)
3283         (maintenance_check_psymtabs): Update.
3284         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
3285         texthigh fields.
3286         (scan_xcoff_symtab): Update.
3287
3288 2018-07-26  Tom Tromey  <tromey@redhat.com>
3289
3290         * psympriv.h (struct partial_symbol) <unrelocated_address,
3291         address, set_address>: New methods.
3292         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
3293         (fixup_psymbol_section, relocate_psymtabs): Update.
3294         (print_partial_symbols): Add 'objfile' parameter.  Update.
3295         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
3296         Update.
3297
3298 2018-07-26  Tom Tromey  <tom@tromey.com>
3299
3300         * dwarf-index-write.c (write_psymbols, debug_names::insert)
3301         (debug_names::write_psymbols): Update.
3302         * psympriv.h (struct partial_symbol): Derive from
3303         general_symbol_info.
3304         <obj_section>: New method.
3305         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
3306         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
3307         (find_pc_sect_psymbol, fixup_psymbol_section)
3308         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
3309         (print_partial_symbols, recursively_search_psymtabs)
3310         (compare_psymbols, psymbol_hash, psymbol_compare)
3311         (add_psymbol_to_bcache, maintenance_check_psymtabs)
3312         (psymbol_name_matches, psym_fill_psymbol_map): Update.
3313
3314 2018-07-26  Tom Tromey  <tromey@redhat.com>
3315
3316         * dbxread.c (end_psymtab): Remove dead code.
3317
3318 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
3319
3320         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
3321         DWARF unwinders are disabled.
3322         * dwarf2-frame.c: Add dwarf2read.h include.
3323         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
3324         disabled.
3325         (dwarf2_frame_unwinders_enabled_p): Define.
3326         (show_dwarf_unwinders_enabled_p): New function.
3327         (_initialize_dwarf2_frame): Register switch to control DWARF
3328         unwinder use.
3329         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
3330         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
3331         (show_dwarf_cmdlist): Remove static keyword.
3332         * dwarf2read.h (set_dwarf_cmdlist): Declare.
3333         (show_dwarf_cmdlist): Declare.
3334         * NEWS: Document new feature.
3335
3336 2018-07-26  Tom de Vries  <tdevries@suse.de>
3337
3338         PR breakpoints/23366
3339         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
3340
3341 2018-07-26  Tom de Vries  <tdevries@suse.de>
3342
3343         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
3344         DW_AT_count can't be translated to a dynamic prop.
3345
3346 2018-07-25  Tom de Vries  <tdevries@suse.de>
3347
3348         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
3349         try/catch.
3350
3351 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
3352
3353         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
3354
3355 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
3356
3357         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
3358
3359 2018-07-24  Keith Seitz  <keiths@redhat.comt
3360
3361         PR symtab/23010
3362         * dwarf2read.c (dw2_add_symbol_to_list): New function.
3363         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
3364         instead of add_symbol_to_list.
3365         (read_file_scope): Call prepare_one_comp_unit before reading
3366         any other DIEs.
3367
3368 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
3369
3370         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
3371
3372 2018-07-24  Tom Tromey  <tom@tromey.com>
3373
3374         * utils.c (malloc, realloc, free): Don't declare.
3375         * configure, config.in: Rebuild.
3376         * configure.ac: Don't check for declarations of free, malloc, or
3377         realloc.
3378
3379 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3380
3381         * aarch64-linux-nat.c
3382         (aarch64_linux_nat_target::stopped_data_address): Remove unused
3383         variable.
3384         * arm-linux-nat.c (fetch_regs): Likewise.
3385         (store_regs): Likewise.
3386         (fetch_vfp_regs): Likewise.
3387         (store_vfp_regs): Likewise.
3388         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
3389         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
3390         (arm_linux_nat_target::insert_watchpoint): Likewise.
3391         (arm_linux_nat_target::remove_watchpoint): Likewise.
3392         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
3393         Likewise.
3394         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
3395         Likewise.
3396         * ppc-linux-nat.c (fetch_register): Likewise.
3397         (fetch_all_gp_regs): Likewise.
3398         (fetch_ppc_registers): Likewise.
3399         (store_all_gp_regs): Likewise.
3400         (store_ppc_registers): Likewise.
3401         (hwdebug_insert_point): Likewise.
3402         (can_use_watchpoint_cond_accel): Likewise.
3403         * remote-sim.c (gdb_os_write_stdout): Likewise.
3404
3405 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
3406             Tom Tromey  <tom@tromey.com>
3407
3408         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
3409         test for it.
3410         * configure: Rebuild.
3411
3412 2018-07-22  Tom Tromey  <tom@tromey.com>
3413
3414         * regformats/regdat.sh: Define xmltarget_${name} inside
3415         #ifndef IN_PROCESS_AGENT.
3416
3417 2018-07-22  Tom Tromey  <tom@tromey.com>
3418
3419         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
3420
3421 2018-07-22  Tom Tromey  <tom@tromey.com>
3422
3423         * symfile.c (reread_symbols): Notify iter, not objfile.
3424
3425 2018-07-22  Tom Tromey  <tom@tromey.com>
3426
3427         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
3428         Use arch_ops.
3429         (ravenscar_thread_target::prepare_to_store): Likewise.
3430
3431 2018-07-22  Tom Tromey  <tom@tromey.com>
3432
3433         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
3434         unused variable.  Call value_fetch_lazy when needed.
3435         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
3436         Remove unused variable.  Call value_fetch_lazy when needed.
3437
3438 2018-07-22  Tom Tromey  <tom@tromey.com>
3439
3440         * m32c-tdep.c (mark_dma): Return void.
3441         (make_regs): Remove unused declarations.
3442
3443 2018-07-22  Tom Tromey  <tom@tromey.com>
3444
3445         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
3446         cmdscm_get_valid_command_smob_arg_unsafe for effect.
3447         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
3448         bkscm_get_valid_block_smob_arg_unsafe for effect.
3449
3450 2018-07-22  Tom Tromey  <tom@tromey.com>
3451
3452         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
3453         value_type.
3454
3455 2018-07-22  Tom Tromey  <tom@tromey.com>
3456
3457         * windows-nat.c (saved_context): Conditionally define.
3458         * remote.c (remote_target::remote_btrace_maybe_reopen):
3459         Conditionally declare "warned".
3460         * inflow.c (sigquit_ours): Conditionally define.
3461         (new_tty): Move "tty" declaration inside #if.
3462         * guile/guile.c (guile_datadir): Conditionally define.
3463         * charset.c (set_be_le_names): Move some declarations inside #if.
3464         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
3465         #if.
3466         (parse_xml_btrace_conf): Likewise.
3467
3468 2018-07-22  Tom Tromey  <tom@tromey.com>
3469
3470         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
3471
3472 2018-07-22  Tom Tromey  <tom@tromey.com>
3473
3474         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
3475         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
3476         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
3477         * buildsym-legacy.c (get_macro_table): Remove unused variable.
3478         * stack.c (frame_apply_level_command): Remove unused variable.
3479         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
3480         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
3481         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
3482         unused variable.
3483         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
3484         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
3485         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
3486         variable.
3487         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
3488         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
3489         variable.
3490         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
3491         Remove unused variable.
3492         * cli/cli-script.c (recurse_read_control_structure): Remove unused
3493         variable.
3494         * common/tdesc.c (print_xml_feature::visit): Remove unused
3495         variable.
3496         * compile/compile-object-load.c (store_regs): Remove unused
3497         variables.
3498         * complaints.c (clear_complaints): Remove unused variable.
3499         * corelow.c (core_target_open): Remove unused variable.
3500         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
3501         variable.
3502         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
3503         variable.
3504         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
3505         variable.
3506         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
3507         variable.
3508         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
3509         variable.
3510         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
3511         variable.
3512         * ia64-tdep.c (examine_prologue): Remove unused variable.
3513         * infcall.c (run_inferior_call): Remove unused variable.
3514         * inferior.c (exit_inferior): Remove unused variable.
3515         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
3516         * linespec.c (decode_line_2): Remove unused variable.
3517         * linux-nat.c (super_close): Remove.
3518         * linux-tdep.c (linux_info_proc): Remove unused variable.
3519         * mi/mi-main.c (mi_execute_command): Remove unused variable.
3520         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
3521         Remove unused variable.
3522         * parse.c (find_minsym_type_and_address): Remove unused variable.
3523         * printcmd.c (info_symbol_command, printf_floating): Remove unused
3524         variable.
3525         * python/py-breakpoint.c (bppy_set_commands): Remove unused
3526         variable.
3527         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
3528         variables.
3529         * record-btrace.c (record_btrace_target::store_registers): Remove
3530         unused variable.
3531         (cmd_show_record_btrace_cpu): Remove unused variable.
3532         * riscv-tdep.c (riscv_register_reggroup_p)
3533         (riscv_push_dummy_call, riscv_return_value): Remove unused
3534         variable.
3535         * rust-exp.y (literal): Remove unused variable.
3536         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
3537         unused variable.
3538         <STRUCTOP_ANONYMOUS>: Likewise.
3539         * s390-linux-tdep.c (s390_linux_init_abi_31)
3540         (s390_linux_init_abi_64): Remove unused variable.
3541         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
3542         (file_select_thread, net_windows_open, _initialize_ser_windows):
3543         Remove unused variables.
3544         * symtab.c (find_pc_sect_line): Remove unused variable.
3545         * target-memory.c (compute_garbled_blocks): Remove unused
3546         variable.
3547         (target_write_memory_blocks): Remove unused variable.
3548         * target.c (target_stack::unpush): Remove unused variables.
3549         * tracepoint.c (start_tracing, all_tracepoint_actions)
3550         (merge_uploaded_trace_state_variables)
3551         (print_one_static_tracepoint_marker): Remove unused variable.
3552         * unittests/basic_string_view/element_access/char/1.cc (test01):
3553         Remove unused variable.
3554         * windows-nat.c (windows_continue, windows_add_all_dlls)
3555         (do_initial_windows_stuff, windows_nat_target::create_inferior):
3556         Remove unused variables.
3557
3558 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
3559
3560         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
3561         attr_profile in HAVE_ELF.
3562         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
3563         HAVE_ELF.
3564
3565 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
3566
3567         * frame.c (frame_register_unwind): Change parameter name.
3568         (frame_unwind_register): Likewise.
3569         (frame_unwind_register_value): Likewise.
3570         (frame_unwind_register_signed): Likewise.
3571         (frame_unwind_register_unsigned): Likewise.
3572         * frame.h (frame_register_unwind): Likewise.
3573         (frame_unwind_register): Likewise.
3574         (frame_unwind_register_value): Likewise.
3575         (frame_unwind_register_signed): Likewise.
3576         (frame_unwind_register_unsigned): Likewise.
3577         (frame_unwind_arch): Likewise.
3578
3579 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3580
3581         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
3582         ISA maintenance.
3583
3584 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
3585
3586         * mips-linux-nat.c (mips_linux_nat_target::read_description):
3587         Call `get_ptrace_pid' rather than extracting the ptrace PID by
3588         hand.
3589
3590 2018-07-20  Keith Seitz  <keiths@redhat.com>
3591
3592         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
3593         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
3594         m_compunit_symtab, m_language>: Add "m_" prefix.
3595         Update all uses.
3596         * buildsym.c: Update all uses.
3597
3598 2018-07-20  Tom Tromey  <tom@tromey.com>
3599
3600         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
3601         * buildsym.h (record_line_ftype): Remove typedef.
3602
3603 2018-07-20  Tom Tromey  <tom@tromey.com>
3604
3605         * buildsym-legacy.h (augment_type_symtab): Don't declare.
3606         (end_expandable_symtab): Likewise.
3607         (end_symtab_get_static_block): Likewise.
3608         (end_symtab_from_static_block): Likewise.
3609         * buildsym-legacy.c (augment_type_symtab): Remove.
3610         (end_expandable_symtab): Remove.
3611         (end_symtab_get_static_block): Remove.
3612         (end_symtab_from_static_block): Remove.
3613
3614 2018-07-20  Tom Tromey  <tom@tromey.com>
3615
3616         * dwarf2read.c: Include buildsym.h.
3617         (struct dwarf2_cu) <builder>: New method.
3618         (fixup_go_packaging): Update.
3619         (process_full_comp_unit, process_full_type_unit): Update.  Don't
3620         use scoped_free_pendings.
3621         (using_directives): Add "cu" parameter, remove "language".
3622         (read_import_statement, setup_type_unit_groups, )
3623         (read_func_scope, read_lexical_block_scope)
3624         (dwarf2_record_block_ranges, read_namespace): Update.
3625         (lnp_state_machine::lnp_state_machine): Add cu parameter.
3626         (lnp_state_machine::handle_end_sequence): Update.
3627         (class lnp_state_machine) <m_cu>: New member.
3628         <m_record_line_callback>: Remove.
3629         <m_currently_recording_lines>: New member.
3630         (lnp_state_machine::handle_set_file): Update.
3631         (noop_record_line): Remove.
3632         (dwarf_record_line_p): Add cu parameter.
3633         (dwarf_record_line_1, dwarf_finish_line): Likewise.
3634         (lnp_state_machine::record_line)
3635         (lnp_state_machine::lnp_state_machine)
3636         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
3637         (dwarf_decode_lines): Update.
3638         (dwarf2_start_subfile): Add cu parameter.
3639         (dwarf2_start_symtab, new_symbol): Update.
3640         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
3641         Remove dwarf2_per_objfile parameter.
3642         (dwarf_decode_macros): Update.
3643
3644 2018-07-20  Tom Tromey  <tom@tromey.com>
3645
3646         * stabsread.c (define_symbol): Update.
3647         * buildsym-legacy.h (get_buildsym_compunit): Declare.
3648         * dwarf2read.c (new_symbol): Update.
3649         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
3650         * cp-namespace.c: Include buildsym.h.
3651         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
3652         * buildsym-legacy.c (get_buildsym_compunit): New function.
3653
3654 2018-07-20  Tom Tromey  <tom@tromey.com>
3655
3656         * xcoffread.c: Include buildsym-legacy.h.
3657         * windows-nat.c: Include buildsym-legacy.h.
3658         * stabsread.c: Include buildsym-legacy.h.
3659         * mdebugread.c: Include buildsym-legacy.h.
3660         * buildsym-legacy.h: New file.
3661         * buildsym-legacy.c: New file, from buildsym.c.
3662         * go32-nat.c: Include buildsym-legacy.h.
3663         * dwarf2read.c: Include buildsym-legacy.h.
3664         * dbxread.c: Include buildsym-legacy.h.
3665         * cp-namespace.c: Include buildsym-legacy.h.
3666         * coffread.c: Include buildsym-legacy.h.
3667         * buildsym.h: Move some contents to buildsym-legacy.h.
3668         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
3669         buildsym-legacy.c.
3670         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
3671
3672 2018-07-20  Tom Tromey  <tom@tromey.com>
3673
3674         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
3675         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
3676         (buildsym_compunit::buildsym_compunit)
3677         (buildsym_compunit::~buildsym_compunit)
3678         (buildsym_compunit::get_macro_table): Define.
3679
3680 2018-07-20  Tom Tromey  <tom@tromey.com>
3681
3682         * buildsym.c (reset_symtab_globals): Remove.
3683         (buildsym_compunit::end_symtab_from_static_block): Update.
3684         (buildsym_compunit::augment_type_symtab): Update.
3685         (end_symtab_from_static_block): Call free_buildsym_compunit.
3686         (augment_type_symtab, end_symtab, end_expandable_symtab):
3687         Likewise.
3688
3689 2018-07-20  Tom Tromey  <tom@tromey.com>
3690
3691         * arch-utils.c: Do not include buildsym.h.
3692         * mipsread.c: Do not include buildsym.h.
3693         * machoread.c: Do not include buildsym.h.
3694         * elfread.c: Do not include buildsym.h.
3695
3696 2018-07-20  Tom Tromey  <tom@tromey.com>
3697
3698         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
3699         initialization.
3700         (buildsym_compunit): Add new constructor.
3701         (struct buildsym_compunit) <get_last_source_file, finish_block,
3702         record_block_range, start_subfile, patch_subfile_names,
3703         push_subfile, pop_subfile, record_line, get_compunit_symtab,
3704         set_last_source_start_addr, get_last_source_start_addr,
3705         get_local_using_directives, set_local_using_directives,
3706         get_global_using_directives, outermost_context_p,
3707         get_current_context_stack, get_context_stack_depth,
3708         get_current_subfile, get_local_symbols, get_file_symbols,
3709         get_global_symbols, record_debugformat, record_producer,
3710         push_context, pop_context, end_symtab_get_static_block,
3711         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
3712         New public methods.
3713         <record_pending_block, finish_block_internal, make_blockvector,
3714         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
3715         private methods.
3716         Update all users.
3717
3718 2018-05-22  Tom Tromey  <tom@tromey.com>
3719
3720         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3721         parameter.
3722         (finish_block_internal): Update.
3723
3724 2018-07-20  Tom Tromey  <tom@tromey.com>
3725
3726         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
3727         parameter.
3728         (finish_block_internal): Update.
3729
3730 2018-07-20  Tom Tromey  <tom@tromey.com>
3731
3732         * buildsym.h (EXTERN): Don't define or undef.
3733         * buildsym.c (EXTERN): Don't define.
3734
3735 2018-07-20  Tom Tromey  <tom@tromey.com>
3736
3737         * buildsym.c: Remove TODO comment.
3738
3739 2018-07-20  Tom Tromey  <tom@tromey.com>
3740
3741         * coffread.c (coff_symtab_read): Update.
3742         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
3743         (xcoff_new_init): Update.
3744         * mipsread.c (mipscoff_new_init): Update.
3745         * mdebugread.c (mdebug_build_psymtabs): Update.
3746         * elfread.c (elf_new_init): Update.
3747         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3748         Update.
3749         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
3750         (coffstab_build_psymtabs, elfstab_build_psymtabs)
3751         (stabsect_build_psymtabs): Update.
3752         * buildsym.h (buildsym_init): Don't declare.
3753         * buildsym.c: Update comment.
3754         (prepare_for_building): Remove.
3755         (start_symtab, restart_symtab): Update.
3756         (reset_symtab_globals): Update comment.
3757         (buildsym_init): Remove.
3758
3759 2018-07-20  Tom Tromey  <tom@tromey.com>
3760
3761         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
3762         * stabsread.c (patch_block_stabs, define_symbol, read_type)
3763         (read_enum_type, common_block_start, common_block_end)
3764         (cleanup_undefined_types_1, finish_global_stabs): Update.
3765         * mdebugread.c (psymtab_to_symtab_1): Update.
3766         * dwarf2read.c (fixup_go_packaging, read_func_scope)
3767         (read_lexical_block_scope, new_symbol): Update.
3768         * dbxread.c (process_one_symbol): Update.
3769         * coffread.c (coff_symtab_read, process_coff_symbol)
3770         (coff_read_enum_type): Update.
3771         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
3772         declare.
3773         (get_local_symbols, get_file_symbols, get_global_symbols): New
3774         functions.
3775         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
3776         m_global_symbols.
3777         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
3778         (~scoped_free_pendings): Update.
3779         (finish_block, prepare_for_building, reset_symtab_globals)
3780         (end_symtab_get_static_block, end_symtab_with_blockvector)
3781         (augment_type_symtab, push_context): Update.
3782         (get_local_symbols, get_file_symbols, get_global_symbols): New
3783         functions.
3784         (buildsym_init): Update.
3785
3786 2018-07-20  Tom Tromey  <tom@tromey.com>
3787
3788         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
3789         (process_full_type_unit): Likewise.
3790         (dwarf2_start_symtab): Set list_in_scope.
3791
3792 2018-07-20  Tom Tromey  <tom@tromey.com>
3793
3794         * dwarf2read.c (process_psymtab_comp_unit_reader)
3795         (build_type_psymtabs_reader): Do not set list_in_scope.
3796
3797 2018-07-20  Tom Tromey  <tom@tromey.com>
3798
3799         * buildsym.c (free_pendings): Remove.
3800         (add_symbol_to_list, scoped_free_pendings)
3801         (finish_block_internal, buildsym_init): Update.
3802
3803 2018-07-20  Tom Tromey  <tom@tromey.com>
3804
3805         * xcoffread.c (read_xcoff_symtab): Update.
3806         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
3807         Update.
3808         * dbxread.c (process_one_symbol): Update.
3809         * coffread.c (coff_symtab_read): Update.
3810         * buildsym.h (finish_block): Update.
3811         * buildsym.c (finish_block): Remove "listhead" argument.
3812         (end_symtab_get_static_block): Update.
3813
3814 2018-07-20  Tom Tromey  <tom@tromey.com>
3815
3816         * buildsym.h (class scoped_free_pendings): Remove constructor.
3817         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
3818         method.
3819         <m_pending_block_obstack, m_pending_blocks>: New members.
3820         (pending_block_obstack, pending_blocks): Remove.
3821         (scoped_free_pendings::scoped_free_pendings): Default.
3822         (~scoped_free_pendings): Update.
3823         (free_pending_blocks): Remove.
3824         (finish_block_internal, record_pending_block, make_blockvector)
3825         (end_symtab_get_static_block, augment_type_symtab, push_context)
3826         (buildsym_init): Update.
3827
3828 2018-07-20  Tom Tromey  <tom@tromey.com>
3829
3830         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
3831         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
3832         members.
3833         (pending_addrmap, pending_addrmap_obstack)
3834         (pending_addrmap_interesting): Remove.
3835         (scoped_free_pendings, record_block_range, make_blockvector)
3836         (prepare_for_building, reset_symtab_globals, buildsym_init):
3837         Update.
3838
3839 2018-07-20  Tom Tromey  <tom@tromey.com>
3840
3841         * xcoffread.c (process_linenos): Update.
3842         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
3843         * mdebugread.c (psymtab_to_symtab_1): Update.
3844         * dwarf2read.c (setup_type_unit_groups)
3845         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
3846         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
3847         * dbxread.c (process_one_symbol): Update.
3848         * coffread.c (coff_symtab_read, enter_linenos)
3849         (process_coff_symbol): Update.
3850         * buildsym.h (current_subfile): Don't declare.
3851         (get_current_subfile): Declare.
3852         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
3853         member.
3854         (start_subfile, free_buildsym_compunit, push_subfile)
3855         (prepare_for_building, start_symtab): Update.
3856         (get_current_subfile): New function.
3857
3858 2018-07-20  Tom Tromey  <tom@tromey.com>
3859
3860         * coffread.c (coff_symtab_read): Update.
3861         * xcoffread.c (read_xcoff_symtab): Update.
3862         * dwarf2read.c (new_symbol): Update.
3863         (read_func_scope, read_lexical_block_scope): Update.
3864         * dbxread.c (process_one_symbol): Update.
3865         * buildsym.h (context_stack, context_stack_depth): Don't declare.
3866         (outermost_context_p): Remove macro.
3867         (outermost_context_p, get_current_context_stack)
3868         (get_context_stack_depth): Declare.
3869         (pop_context): Return struct context_stack.
3870         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
3871         member.
3872         (context_stack_size): Remove.
3873         (INITIAL_CONTEXT_STACK_SIZE): Remove.
3874         (prepare_for_building, end_symtab_get_static_block)
3875         (augment_type_symtab, push_context): Update.
3876         (pop_context): Return struct context_stack.
3877         (outermost_context_p, get_current_context_stack)
3878         (get_context_stack_depth): New functions.
3879         (buildsym_init): Update.
3880
3881 2018-07-20  Tom Tromey  <tom@tromey.com>
3882
3883         * rust-exp.y: Now a pure parser.  Update all rules.
3884         (%union): Move earlier.
3885         (current_parser, work_obstack): Remove globals.
3886         (rust_parser, ~rust_parser): Update.
3887         (class rust_parser) <copy_name, concat3, crate_name, super_name,
3888         lex_character, lex_number, lex_string, lex_identifier,
3889         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
3890         convert_name, convert_params_to_expression,
3891         convert_ast_to_expression, ast_basic_type, ast_operation,
3892         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
3893         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
3894         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
3895         ast_array_type, ast_slice_type, ast_reference_type,
3896         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
3897         (rust_parse): Update.
3898         (rustyyerror, rustyylex): Add parser parameter.
3899         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
3900         (rust_lex_stringish_test, rust_lex_test_sequence)
3901         (rust_lex_test_trailing_dot, rust_lex_test_completion)
3902         (rust_lex_test_push_back, rust_lex_tests): Update.
3903
3904 2018-07-19  Pedro Alves  <palves@redhat.com>
3905
3906         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
3907         gdb::unique_xmalloc_ptr.
3908         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
3909         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
3910         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
3911         copy-initialization.
3912         * guile/scm-pretty-print.c (ppscm_print_children): Use
3913         gdb::unique_xmalloc_ptr instead of cleanups.
3914         (gdbscm_apply_val_pretty_printer): Remove cleanups.
3915         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
3916         gdb::unique_xmalloc_ptr.
3917         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3918         Adjust to use gdb::unique_xmalloc_ptr.
3919         * guile/scm-utils.c (extract_arg): Adjust.
3920         * guile/scm-value.c (gdbscm_value_field): Adjust to use
3921         gdb::unique_xmalloc_ptr instead of a cleanup.
3922
3923 2018-07-19  Tom Tromey  <tom@tromey.com>
3924
3925         * utils.c (do_value_free_to_mark)
3926         (make_cleanup_value_free_to_mark): Remove.
3927         * utils.h (make_cleanup_value_free_to_mark): Remove.
3928
3929 2018-07-19  Pedro Alves  <palves@redhat.com>
3930
3931         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
3932         forwarding reference.
3933
3934 2018-07-18  Pedro Alves  <palves@redhat.com>
3935
3936         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
3937         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
3938         cleanup.
3939
3940 2018-07-18  Pedro Alves  <palves@redhat.com>
3941
3942         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
3943         exceptions.
3944         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
3945         (gdbscm_wrap): New.
3946         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
3947         directly instead of a cleanup.
3948         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
3949         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
3950         (vlscm_binop_gdbthrow): New, factored out from ...
3951         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
3952         (vlscm_rich_compare): Use gdbscm_wrap.
3953         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
3954         instead of a cleanup.
3955         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
3956         cleanup.
3957         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
3958         Use xfree directly instead of a cleanup.
3959         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
3960         Adjust to use gdbscm_wrap and scoped_value_mark.
3961         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
3962         (gdbscm_value_address, gdbscm_value_dereference)
3963         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
3964         scoped_value_mark.
3965         (gdbscm_value_dynamic_type): Use scoped_value_mark.
3966         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
3967         scoped_value_mark.
3968         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
3969         gdbscm_wrap and scoped_value_mark.
3970         (gdbscm_value_to_string): Use xfree directly instead of a
3971         cleanup.  Move 'buffer' unique_ptr to TRY scope.
3972         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
3973         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
3974         scoped_value_mark.
3975         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
3976         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
3977         scoped_value_mark.
3978         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
3979         gdbscm_wrap.
3980
3981 2018-07-18  Tom de Vries  <tdevries@suse.de>
3982
3983         * findvar.c (default_read_var_value): Also resolve dynamic type for
3984         LOC_OPTIMIZED_OUT vars.
3985
3986 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
3987
3988         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
3989         decoding.
3990
3991 2018-07-17  Tom Tromey  <tom@tromey.com>
3992
3993         * guile/scm-param.c (pascm_set_func, pascm_show_func)
3994         (compute_enum_list, pascm_set_param_value_x)
3995         (gdbscm_parameter_value): Update.
3996         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
3997         (gdbscm_scm_to_host_string): Update.
3998         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
3999         Update.
4000         * guile/scm-cmd.c (cmdscm_add_completion): Update.
4001         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4002         * guile/scm-string.c (gdbscm_scm_to_string): Return
4003         unique_xmalloc_ptr.
4004         (gdbscm_scm_to_host_string): Likewise.
4005
4006 2018-07-17  Tom Tromey  <tom@tromey.com>
4007
4008         * guile/guile.c (gdbscm_eval_from_control_command): Update.
4009         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4010         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4011         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4012         unique_xmalloc_ptr.
4013
4014 2018-07-17  Tom Tromey  <tom@tromey.com>
4015
4016         * guile/scm-param.c (pascm_signal_setshow_error): Update.
4017         * guile/guile-internal.h (gdbscm_exception_message_to_string):
4018         Update.
4019         * guile/scm-cmd.c (cmdscm_function): Update.
4020         * guile/scm-pretty-print.c
4021         (ppscm_print_exception_unless_memory_error): Update.
4022         * guile/scm-exception.c (gdbscm_exception_message_to_string):
4023         Return unique_xmalloc_ptr.
4024
4025 2018-07-17  Tom Tromey  <tom@tromey.com>
4026
4027         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4028         Use string_printf.
4029
4030 2018-07-17  Jim Wilson  <jimw@sifive.com>
4031
4032         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4033         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
4034         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
4035         unecessary braces after EF_RISCV_RVC test.  Delete call to
4036         set_gdbarch_decr_pc_after_break.
4037
4038         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4039         RISCV_LAST_FP_REGNUM + 1.
4040         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4041
4042 2018-07-17  Tom Tromey  <tom@tromey.com>
4043
4044         * configure.ac: Remove --disable-gdbcli.
4045         * configure: Rebuild.
4046         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
4047         (SUBDIR_CLI_CFLAGS): Remove.
4048         (SFILES): Use SUBDIR_CLI_SRCS.
4049         (COMMON_OBS): Use SUBDIR_CLI_OBS.
4050
4051 2018-07-17  Tom Tromey  <tom@tromey.com>
4052
4053         PR gdb/18624:
4054         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
4055
4056 2018-07-16  Jim Wilson  <jimw@sifive.com>
4057
4058         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
4059
4060 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4061
4062         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
4063         variable.
4064         (libunwind_frame_sniffer): Likewise.
4065         (libunwind_frame_prev_register): Likewise.
4066         (libunwind_sigtramp_frame_sniffer): Likewise.
4067         * ia64-tdep.c (ia64_access_reg): Likewise.
4068         (ia64_access_rse_reg): Likewise.
4069         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
4070         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
4071
4072 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4073
4074         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
4075
4076 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
4077
4078         * remote-sim.c (gdbsim_target::close,
4079         gdbsim_target::mourn_inferior): Remove unused variables.
4080
4081 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
4082
4083         * ia64-tdep.c (ktab_buf): New global.
4084         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
4085         (get_kernel_table): Adjust.
4086
4087 2018-07-16  Tom Tromey  <tom@tromey.com>
4088
4089         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
4090         * dwarf2read.c (using_directives, new_symbol): Use
4091         outermost_context_p.
4092         * dbxread.c (process_one_symbol): Use outermost_context_p.
4093         * coffread.c (coff_symtab_read): Use outermost_context_p.
4094
4095 2018-07-16  Tom Tromey  <tom@tromey.com>
4096
4097         * dwarf2read.c (using_directives, read_func_scope)
4098         (read_lexical_block_scope): Update.
4099         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
4100         * buildsym.h (local_using_directives, global_using_directives):
4101         Don't declare.
4102         (get_local_using_directives, set_local_using_directives)
4103         (get_global_using_directives): Declare.
4104         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
4105         m_global_using_directives>: New members.
4106         (finish_block_internal, prepare_for_building)
4107         (reset_symtab_globals, end_symtab_get_static_block)
4108         (push_context): Update.
4109         (get_local_using_directives, set_local_using_directives)
4110         (get_global_using_directives): New functions.
4111         (buildsym_init): Update.
4112
4113 2018-07-16  Tom Tromey  <tom@tromey.com>
4114
4115         * xcoffread.c (xcoff_initial_scan): Don't call
4116         free_pending_blocks.
4117         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
4118         * buildsym.h (class scoped_free_pendings): Add constructor.
4119         (free_pending_blocks): Don't declare.
4120         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
4121         (free_pending_blocks): Now static.
4122
4123 2018-07-16  Tom Tromey  <tom@tromey.com>
4124
4125         * buildsym.h (push_subfile, pop_subfile): Update declarations.
4126         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
4127         member.
4128         (struct subfile_stack): Remove.
4129         (subfile_stack): Remove.
4130         (push_subfile, pop_subfile, buildsym_init): Update.
4131
4132 2018-07-16  Tom Tromey  <tom@tromey.com>
4133
4134         * buildsym.c (push_subfile): Use gdb_assert.
4135         (pop_subfile): Use gdb_assert.
4136
4137 2018-07-16  Tom Tromey  <tom@tromey.com>
4138
4139         * buildsym.h (merge_symbol_lists): Remove.
4140         * buildsym.c (merge_symbol_lists): Remove.
4141
4142 2018-07-16  Tom Tromey  <tom@tromey.com>
4143
4144         * stabsread.c (scan_file_globals): Update comment.
4145         * stabsread.h (scan_file_globals): Move from buildsym.h.
4146         * buildsym.h (scan_file_globals): Move to stabsread.h.
4147
4148 2018-07-16  Tom Tromey  <tom@tromey.com>
4149
4150         * xcoffread.c (xcoff_new_init): Update.
4151         * mipsread.c (mipscoff_new_init): Update.
4152         * mdebugread.c (mdebug_build_psymtabs): Update.
4153         * elfread.c (elf_new_init): Update.
4154         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
4155         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
4156         * buildsym.h (buildsym_new_init): Don't declare.
4157         * buildsym.c (buildsym_new_init): Remove.
4158
4159 2018-07-16  Tom Tromey  <tom@tromey.com>
4160
4161         * stabsread.h (within_function): Move from buildsym.h.
4162         * stabsread.c (start_stabs): Clear within_function.
4163         * coffread.c (coff_start_symtab): Clear within_function.
4164         * buildsym.h (within_function): Move to stabsread.h.
4165         * buildsym.c (prepare_for_building): Update.
4166
4167 2018-07-16  Tom Tromey  <tom@tromey.com>
4168
4169         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
4170         * dwarf2read.c (dwarf2_start_symtab): Don't set
4171         processing_gcc_compilation.
4172         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
4173
4174 2018-07-16  Tom Tromey  <tom@tromey.com>
4175
4176         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
4177         (next_symbol_text_func): Move from buildsym.h.
4178         * stabsread.c (hashname): Move from buildsym.c.
4179         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
4180         (next_symbol_text_func, hashname): Move to stabsread.h.
4181         * buildsym.c: Don't include bcache.h
4182         (hashname): Move to stasbread.c.
4183
4184 2018-07-16  Tom Tromey  <tom@tromey.com>
4185
4186         * buildsym.h (context_stack_size): Don't declare.
4187         * buildsym.c (context_stack_size): New global.
4188
4189 2018-07-16  Tom Tromey  <tom@tromey.com>
4190
4191         * dbxread.c (processing_acc_compilation): New global.
4192         * buildsym.h (processing_acc_compilation): Don't declare.
4193
4194 2018-07-16  Tom Tromey  <tom@tromey.com>
4195
4196         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
4197         * dbxread.c (read_ofile_symtab): Update.
4198         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
4199         * buildsym.h (last_source_start_addr): Remove.
4200         (set_last_source_start_addr, get_last_source_start_addr):
4201         Declare.
4202         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
4203         parameter.
4204         (struct buildsym_compunit) <m_last_source_start_addr>: New
4205         member.
4206         (prepare_for_building): Remove start_addr parameter.
4207         (start_symtab, restart_symtab, end_symtab_get_static_block)
4208         (end_symtab_with_blockvector): Update.
4209         (set_last_source_start_addr, get_last_source_start_addr): New
4210         functions.
4211
4212 2018-07-16  Tom Tromey  <tom@tromey.com>
4213
4214         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
4215         member.
4216         (have_line_numbers): Remove.
4217         (record_line, prepare_for_building, end_symtab_get_static_block)
4218         (augment_type_symtab): Update.
4219
4220 2018-07-16  Tom Tromey  <tom@tromey.com>
4221
4222         * buildsym.c (~buildsym_compunit): Free the macro table.
4223         (struct buildsym_compunit) <get_macro_table, release_macros>: New
4224         methods.
4225         <m_pending_macros>: New member.
4226         (pending_macros): Remove.
4227         (~scoped_free_pendings, get_macro_table, prepare_for_building)
4228         (reset_symtab_globals, end_symtab_get_static_block)
4229         (end_symtab_with_blockvector, augment_type_symtab)
4230         (buildsym_init): Update.
4231
4232 2018-07-16  Tom Tromey  <tom@tromey.com>
4233
4234         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
4235         parameter.
4236         (buildsym_compunit::set_last_source_file): New method.
4237         <m_last_source_file>: New member.
4238         (prepare_for_building): Remove "name" parameter.
4239         (start_symtab, restart_symtab, reset_symtab_globals): Update.
4240         (last_source_file): Remove.
4241         (set_last_source_file, get_last_source_file): Update.
4242
4243 2018-07-16  Tom Tromey  <tom@tromey.com>
4244
4245         * buildsym.c (prepare_for_building): Add assert.
4246
4247 2018-07-16  Tom Tromey  <tom@tromey.com>
4248
4249         * buildsym.c (~buildsym_compunit): Update.
4250         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
4251         (start_subfile, patch_subfile_names)
4252         (end_symtab_with_blockvector): Update.
4253
4254 2018-07-16  Tom Tromey  <tom@tromey.com>
4255
4256         * buildsym.c (struct buildsym_compunit): Add constructor,
4257         destructor, initializers.
4258         (start_buildsym_compunit): Remove.
4259         (free_buildsym_compunit): Use "delete".
4260         (start_symtab, restart_symtab): Use "new".
4261
4262 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
4263
4264         * symfile.c (set_objfile_default_section_offset): Remove struct
4265         keyword.
4266
4267 2018-07-14  Stafford Horne  <shorne@gmail.com>
4268
4269         * (Responsible Maintainers): Add myself as or1k maintainer.
4270
4271 2018-07-13  Tom Tromey  <tom@tromey.com>
4272
4273         * symfile.c (set_objfile_default_section_offset): Use extra braces
4274         around initializer.
4275
4276 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4277
4278         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
4279         non-branching basr.
4280
4281 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4282
4283         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4284         unittests/cli-utils-selftests.c
4285         * unittests/cli-utils-selftests.c: New file.
4286
4287 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4288
4289         * NEWS: Mention new commands. Mention change to 'thread apply'.
4290
4291 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4292
4293         * thread.c (thr_try_catch_cmd): New function.
4294         (thread_apply_all_command): Handle qcs flags.
4295         (thread_apply_command): Handle qcs flags.
4296         (taas_command): New function.
4297         (tfaas_command): New function.
4298         (_initialize_thread): Update to setup the new commands 'taas
4299         and 'tfaas'. Change doc string for 'thread apply'.
4300
4301 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4302
4303         * stack.c: (trailing_outermost_frame): New function, mostly
4304         extracted from backtrace_command_1.
4305         (leading_innermost_frame): New function.
4306         (backtrace_command_1): Update to call trailing_outermost_frame.
4307         (frame_apply_command_count): New function.
4308         (frame_apply_level_command): New function.
4309         (frame_apply_all_command): New function.
4310         (frame_apply_command): New function.
4311         (faas_command): New function.
4312         (frame_cmd_list): New variable.
4313         (_initialize_stack): Update to setup the new commands 'frame apply'
4314         and 'faas'.
4315
4316 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4317
4318         * cli-utils.c (number_or_range_parser::get_number): Only handle
4319         numbers or convenience var as numbers.
4320         (parse_flags): New function.
4321         (parse_flags_qcs): New function.
4322         (number_or_range_parser::finished): Ensure parsing end is detected
4323         before end of string.
4324         * cli-utils.h (parse_flags): New function.
4325         (parse_flags_qcs): New function.
4326         (number_or_range_parser): Remove m_finished bool.
4327         (number_or_range_parser::skip_range): Set m_in_range to false.
4328
4329 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
4330
4331         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
4332         on Windows.
4333
4334 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4335             Jan Kratochvil  <jan.kratochvil@redhat.com>
4336             Paul Fertser  <fercerpav@gmail.com>
4337             Tsutomu Seki  <sekiriki@gmail.com>
4338             Pedro Alves  <palves@redhat.com>
4339
4340         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4341         'unittests/parse-connection-spec-selftests.c'.
4342         (COMMON_SFILES): Add 'common/netstuff.c'.
4343         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
4344         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
4345         * common/netstuff.c: New file.
4346         * common/netstuff.h: New file.
4347         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
4348         (wait_for_connect): Update comment.  New parameter
4349         'gdb::optional<int> sock' instead of 'struct serial *scb'.
4350         Use 'sock' directly instead of 'scb->fd'.
4351         (try_connect): New function, with code from 'net_open'.
4352         (net_open): Rewrite main loop to deal with multiple
4353         sockets/addresses.  Handle IPv6-style hostnames; implement
4354         support for IPv6 connections.
4355         * unittests/parse-connection-spec-selftests.c: New file.
4356
4357 2018-07-11  Pedro Alves  <palves@redhat.com>
4358
4359         PR gdb/23377
4360         * remote.c (remote_target::remote_detach_pid): Call
4361         set_current_process.
4362
4363 2018-07-11  Pedro Alves  <palves@redhat.com>
4364
4365         * h8300-tdep.c (h8300_gdbarch_init): Remove
4366         set_gdbarch_ecoff_reg_to_regnum calls.
4367
4368 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
4369
4370         PR c++/23373
4371         * c-typeprint.c (c_type_print_base_struct_union): Don't print
4372         offsets/sizes for static members of a class/struct.
4373
4374 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
4375
4376         * target-descriptions.c (tdesc_register_bitsize): Rename.
4377         * target-descriptions.h (tdesc_register_bitsize): Likewise.
4378         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
4379         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
4380
4381 2018-07-10  Tom Tromey  <tom@tromey.com>
4382
4383         * breakpoint.c (moribund_locations): Now static and a
4384         std::vector.
4385         (breakpoint_init_inferior, moribund_breakpoint_here_p)
4386         (build_bpstat_chain, update_global_location_list)
4387         (breakpoint_retire_moribund): Update.
4388         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
4389         VEC.
4390
4391 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4392
4393         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
4394         (riscv_register_reggroup_p): Use new function, remove unneeded
4395         parenthesis.
4396         (riscv_push_dummy_call): Extend assert to compare against xlen or
4397         flen based on register type.
4398
4399 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
4400
4401         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
4402
4403 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4404
4405         * remote.c (show_hardware_watchpoint_limit): New function.
4406         (show_hardware_watchpoint_length_limit): New function.
4407         (show_hardware_breakpoint_limit): New function.
4408         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
4409         where appropriate, update help text.
4410
4411 2018-07-09  Tom Tromey  <tom@tromey.com>
4412
4413         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
4414         (CLIBS): Don't mention NAT_CLIBS.
4415
4416 2018-07-09  Tom Tromey  <tom@tromey.com>
4417
4418         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
4419         (LIBGDB_OBS, clean mostlyclean): Update.
4420         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
4421
4422 2018-07-09  Tom Tromey  <tom@tromey.com>
4423
4424         * Makefile.in (%.c: %.y): Use ECHO_YACC.
4425         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
4426         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
4427
4428 2018-07-09  Tom Tromey  <tom@tromey.com>
4429
4430         * Makefile.in (ALLDEPFILES): Remove exec.c.
4431         (COMMON_OBS): Remove exec.o.
4432         (COMMON_SFILES): Add exec.c.
4433
4434 2018-07-09  Tom Tromey  <tom@tromey.com>
4435
4436         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
4437
4438 2018-07-09  Tom Tromey  <tom@tromey.com>
4439
4440         * Makefile.in (clean mostlyclean): Remove stamp-version.
4441         (version.c): Depend on stamp-version.
4442         (stamp-version): New rule, from version.c rule.
4443
4444 2018-07-09  Tom Tromey  <tom@tromey.com>
4445
4446         * Makefile.in (init.c): Depend on stamp-init.
4447         (stamp-init): New rule, from init.c rule.
4448         (clean mostlyclean): Remove stamp-init.
4449
4450 2018-07-09  Tom Tromey  <tom@tromey.com>
4451
4452         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
4453         SUBDIR_GCC_COMPILE_SRCS.
4454
4455 2018-07-09  Tom Tromey  <tom@tromey.com>
4456
4457         * Makefile.in (init.c): Remove some unused sed rules.
4458
4459 2018-07-09  Tom Tromey  <tom@tromey.com>
4460
4461         * Makefile.in (TSOBS): Remove.
4462         (INIT_FILES): Update.
4463         (LIBGDB_OBS): Update.
4464         (COMMON_SFILES): Add inflow.c.
4465         (SFILES): Remove inflow.c.
4466
4467 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
4468
4469         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
4470
4471 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
4472
4473         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
4474         get_saveloc_name, is_signal_frame_name, step_name,
4475         init_remote_name, create_addr_space_name,
4476         destroy_addr_space_name, search_unwind_table_name,
4477         find_dyn_list_name): Constify.
4478
4479 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
4480
4481         * darwin-nat.c (darwin_pthread_kill): New function.
4482         (darwin_resume_thread): Use darwin_pthread_kill.
4483
4484 2018-07-05  Tom de Vries  <tdevries@suse.de>
4485
4486         * macroexp.c (macro_buffer) <operator=>: New member function.
4487
4488 2018-07-04  Tom Tromey  <tom@tromey.com>
4489
4490         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
4491
4492 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
4493
4494         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
4495         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
4496         * maint.c: Likewise.
4497         * top.c: Likewise.
4498
4499 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4500
4501         * NEWS: Create a new section for the next release branch.
4502         Rename the section of the current branch, now that it has
4503         been cut.
4504
4505 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
4506
4507         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
4508         * version.in: Bump version to 8.2.50.DATE-git.
4509
4510 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
4511             Pedro Alves  <palves@redhat.com>
4512
4513         * linux-nat.c (linux_init_ptrace): Rename to ...
4514         (linux_init_ptrace_procfs): ... this.  Call
4515         linux_proc_init_warnings.
4516         (linux_nat_target::post_attach)
4517         (linux_nat_target::post_startup_inferior): Adjust.
4518         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
4519         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
4520
4521 2018-07-04  Tom de Vries  <tdevries@suse.de>
4522
4523         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
4524         check ...
4525         (read_comp_unit_head): ... here.
4526
4527 2018-07-03  Tom Tromey  <tom@tromey.com>
4528
4529         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
4530         (stop_tracing, tstatus_command)
4531         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
4532         (print_one_static_tracepoint_marker): Update.
4533         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
4534         std::vector.
4535         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
4536         VEC.
4537         (all_tracepoints, static_tracepoints_here): Return std::vector.
4538
4539 2018-07-03  Tom Tromey  <tom@tromey.com>
4540
4541         * common/ptid.c (ptid_equal): Remove.
4542         * common/ptid.h (ptid_equal): Don't declare.
4543         * ada-tasks.c: Update.
4544         * breakpoint.c: Update.
4545         * common/agent.c: Update.
4546         * corelow.c: Update.
4547         * darwin-nat-info.c: Update.
4548         * darwin-nat.c: Update.
4549         * dcache.c: Update.
4550         * dtrace-probe.c: Update.
4551         * dummy-frame.c: Update.
4552         * fbsd-nat.c: Update.
4553         * frame.c: Update.
4554         * gdbthread.h: Update.
4555         * gnu-nat.c: Update.
4556         * go32-nat.c: Update.
4557         * inf-loop.c: Update.
4558         * inf-ptrace.c: Update.
4559         * infcall.c: Update.
4560         * infcmd.c: Update.
4561         * inflow.c: Update.
4562         * infrun.c: Update.
4563         * linux-fork.c: Update.
4564         * linux-nat.c: Update.
4565         * linux-thread-db.c: Update.
4566         * mi/mi-cmd-var.c: Update.
4567         * mi/mi-interp.c: Update.
4568         * mi/mi-main.c: Update.
4569         * nto-procfs.c: Update.
4570         * ppc-linux-tdep.c: Update.
4571         * procfs.c: Update.
4572         * python/py-inferior.c: Update.
4573         * python/py-record-btrace.c: Update.
4574         * python/py-record.c: Update.
4575         * ravenscar-thread.c: Update.
4576         * regcache.c: Update.
4577         * remote-sim.c: Update.
4578         * remote.c: Update.
4579         * sol-thread.c: Update.
4580         * solib.c: Update.
4581         * target.c: Update.
4582         * tui/tui-stack.c: Update.
4583         * varobj.c: Update.
4584         * windows-nat.c: Update.
4585         * windows-tdep.c: Update.
4586
4587 2018-07-03  Tom Tromey  <tom@tromey.com>
4588
4589         * common/ptid.c (ptid_match): Remove.
4590         * common/ptid.h (ptid_match): Don't declare.
4591         * fbsd-nat.c: Update.
4592         * infcmd.c: Update.
4593         * infrun.c: Update.
4594         * linux-nat.c: Update.
4595         * record-btrace.c: Update.
4596         * regcache.c: Update.
4597         * remote.c: Update.
4598
4599 2018-07-03  Tom Tromey  <tom@tromey.com>
4600
4601         * common/ptid.c (ptid_tid_p): Remove.
4602         * common/ptid.h (ptid_tid_p): Don't declare.
4603         * sol-thread.c: Update.
4604
4605 2018-07-03  Tom Tromey  <tom@tromey.com>
4606
4607         * common/ptid.c (ptid_lwp_p): Remove.
4608         * common/ptid.h (ptid_lwp_p): Don't declare.
4609         * fbsd-nat.c: Update.
4610         * linux-nat.c: Update.
4611         * nat/linux-procfs.c: Update.
4612         * nat/x86-linux-dregs.c: Update.
4613         * sol-thread.c: Update.
4614
4615 2018-07-03  Tom Tromey  <tom@tromey.com>
4616
4617         * common/ptid.c (ptid_is_pid): Remove.
4618         * common/ptid.h (ptid_is_pid): Don't declare.
4619         * infrun.c: Update.
4620         * linux-nat.c: Update.
4621         * mi/mi-interp.c: Update.
4622         * remote.c: Update.
4623         * thread.c: Update.
4624
4625 2018-07-03  Tom Tromey  <tom@tromey.com>
4626
4627         * common/ptid.c (ptid_get_tid): Remove.
4628         * common/ptid.h (ptid_get_tid): Don't declare.
4629         * ada-tasks.c: Update.
4630         * aix-thread.c: Update.
4631         * bsd-uthread.c: Update.
4632         * darwin-nat.c: Update.
4633         * fbsd-nat.c: Update.
4634         * i386-darwin-nat.c: Update.
4635         * infrun.c: Update.
4636         * linux-tdep.c: Update.
4637         * nto-procfs.c: Update.
4638         * ppc-ravenscar-thread.c: Update.
4639         * python/py-infthread.c: Update.
4640         * ravenscar-thread.c: Update.
4641         * sol-thread.c: Update.
4642         * sparc-ravenscar-thread.c: Update.
4643         * windows-nat.c: Update.
4644
4645 2018-07-03  Tom Tromey  <tom@tromey.com>
4646
4647         * common/ptid.c (ptid_get_lwp): Remove.
4648         * common/ptid.h (ptid_get_lwp): Don't declare.
4649         * aarch64-linux-nat.c: Update.
4650         * ada-tasks.c: Update.
4651         * aix-thread.c: Update.
4652         * amd64-linux-nat.c: Update.
4653         * arm-linux-nat.c: Update.
4654         * corelow.c: Update.
4655         * fbsd-nat.c: Update.
4656         * fbsd-tdep.c: Update.
4657         * gnu-nat.c: Update.
4658         * i386-cygwin-tdep.c: Update.
4659         * i386-gnu-nat.c: Update.
4660         * i386-linux-nat.c: Update.
4661         * ia64-linux-nat.c: Update.
4662         * inf-ptrace.c: Update.
4663         * infrun.c: Update.
4664         * linux-fork.c: Update.
4665         * linux-nat.c: Update.
4666         * linux-tdep.c: Update.
4667         * linux-thread-db.c: Update.
4668         * mips-linux-nat.c: Update.
4669         * nat/aarch64-linux-hw-point.c: Update.
4670         * nat/aarch64-linux.c: Update.
4671         * nat/linux-btrace.c: Update.
4672         * nat/linux-osdata.c: Update.
4673         * nat/linux-procfs.c: Update.
4674         * nat/x86-linux-dregs.c: Update.
4675         * obsd-nat.c: Update.
4676         * ppc-fbsd-nat.c: Update.
4677         * ppc-linux-nat.c: Update.
4678         * procfs.c: Update.
4679         * python/py-infthread.c: Update.
4680         * ravenscar-thread.c: Update.
4681         * remote.c: Update.
4682         * s390-linux-nat.c: Update.
4683         * sol-thread.c: Update.
4684         * sol2-tdep.c: Update.
4685         * spu-linux-nat.c: Update.
4686         * x86-linux-nat.c: Update.
4687         * xtensa-linux-nat.c: Update.
4688
4689 2018-07-03  Tom Tromey  <tom@tromey.com>
4690
4691         * common/ptid.c (ptid_get_pid): Remove.
4692         * common/ptid.h (ptid_get_pid): Don't declare.
4693         * aarch64-linux-nat.c: Update.
4694         * ada-lang.c: Update.
4695         * aix-thread.c: Update.
4696         * alpha-bsd-nat.c: Update.
4697         * amd64-fbsd-nat.c: Update.
4698         * amd64-linux-nat.c: Update.
4699         * arm-linux-nat.c: Update.
4700         * arm-nbsd-nat.c: Update.
4701         * auxv.c: Update.
4702         * break-catch-syscall.c: Update.
4703         * breakpoint.c: Update.
4704         * bsd-uthread.c: Update.
4705         * corelow.c: Update.
4706         * ctf.c: Update.
4707         * darwin-nat.c: Update.
4708         * fbsd-nat.c: Update.
4709         * fbsd-tdep.c: Update.
4710         * gcore.c: Update.
4711         * gnu-nat.c: Update.
4712         * hppa-nbsd-nat.c: Update.
4713         * hppa-obsd-nat.c: Update.
4714         * i386-fbsd-nat.c: Update.
4715         * ia64-linux-nat.c: Update.
4716         * inf-ptrace.c: Update.
4717         * infcmd.c: Update.
4718         * inferior.c: Update.
4719         * inferior.h: Update.
4720         * inflow.c: Update.
4721         * infrun.c: Update.
4722         * linux-fork.c: Update.
4723         * linux-nat.c: Update.
4724         * linux-tdep.c: Update.
4725         * linux-thread-db.c: Update.
4726         * m68k-bsd-nat.c: Update.
4727         * mi/mi-interp.c: Update.
4728         * mi/mi-main.c: Update.
4729         * mips-linux-nat.c: Update.
4730         * mips-nbsd-nat.c: Update.
4731         * mips64-obsd-nat.c: Update.
4732         * nat/aarch64-linux-hw-point.c: Update.
4733         * nat/aarch64-linux.c: Update.
4734         * nat/linux-btrace.c: Update.
4735         * nat/linux-osdata.c: Update.
4736         * nat/linux-procfs.c: Update.
4737         * nat/x86-linux-dregs.c: Update.
4738         * nto-procfs.c: Update.
4739         * obsd-nat.c: Update.
4740         * ppc-linux-nat.c: Update.
4741         * ppc-nbsd-nat.c: Update.
4742         * ppc-obsd-nat.c: Update.
4743         * proc-service.c: Update.
4744         * procfs.c: Update.
4745         * python/py-inferior.c: Update.
4746         * python/py-infthread.c: Update.
4747         * ravenscar-thread.c: Update.
4748         * record.c: Update.
4749         * remote-sim.c: Update.
4750         * remote.c: Update.
4751         * rs6000-nat.c: Update.
4752         * s390-linux-nat.c: Update.
4753         * sh-nbsd-nat.c: Update.
4754         * sol-thread.c: Update.
4755         * sparc-nat.c: Update.
4756         * sparc64-tdep.c: Update.
4757         * spu-linux-nat.c: Update.
4758         * spu-tdep.c: Update.
4759         * target-debug.h: Update.
4760         * target.c: Update.
4761         * thread.c: Update.
4762         * tid-parse.c: Update.
4763         * tracefile-tfile.c: Update.
4764         * vax-bsd-nat.c: Update.
4765         * windows-nat.c: Update.
4766         * x86-linux-nat.c: Update.
4767         * x86-nat.c: Update.
4768
4769 2018-07-03  Tom Tromey  <tom@tromey.com>
4770
4771         * common/ptid.c (pid_to_ptid): Remove.
4772         * common/ptid.h (pid_to_ptid): Don't declare.
4773         * aix-thread.c: Update.
4774         * arm-linux-nat.c: Update.
4775         * common/ptid.c: Update.
4776         * common/ptid.h: Update.
4777         * corelow.c: Update.
4778         * ctf.c: Update.
4779         * darwin-nat.c: Update.
4780         * fbsd-nat.c: Update.
4781         * fork-child.c: Update.
4782         * gnu-nat.c: Update.
4783         * go32-nat.c: Update.
4784         * inf-ptrace.c: Update.
4785         * infcmd.c: Update.
4786         * inferior.c: Update.
4787         * infrun.c: Update.
4788         * linux-fork.c: Update.
4789         * linux-nat.c: Update.
4790         * nat/aarch64-linux-hw-point.c: Update.
4791         * nat/fork-inferior.c: Update.
4792         * nat/x86-linux-dregs.c: Update.
4793         * nto-procfs.c: Update.
4794         * obsd-nat.c: Update.
4795         * procfs.c: Update.
4796         * progspace.c: Update.
4797         * remote.c: Update.
4798         * rs6000-nat.c: Update.
4799         * s390-linux-nat.c: Update.
4800         * sol-thread.c: Update.
4801         * spu-linux-nat.c: Update.
4802         * target.c: Update.
4803         * top.c: Update.
4804         * tracefile-tfile.c: Update.
4805         * windows-nat.c: Update.
4806
4807 2018-07-03  Tom Tromey  <tom@tromey.com>
4808
4809         * common/ptid.h (ptid_build): Don't declare.
4810         * common/ptid.c (ptid_build): Remove.
4811         * aix-thread.c: Update.
4812         * bsd-kvm.c: Update.
4813         * bsd-uthread.c: Update.
4814         * common/agent.c: Update.
4815         * common/ptid.c: Update.
4816         * common/ptid.h: Update.
4817         * corelow.c: Update.
4818         * darwin-nat.c: Update.
4819         * fbsd-nat.c: Update.
4820         * gnu-nat.c: Update.
4821         * linux-fork.c: Update.
4822         * linux-nat.c: Update.
4823         * linux-thread-db.c: Update.
4824         * nat/linux-osdata.c: Update.
4825         * nat/linux-procfs.c: Update.
4826         * nto-procfs.c: Update.
4827         * obsd-nat.c: Update.
4828         * proc-service.c: Update.
4829         * procfs.c: Update.
4830         * ravenscar-thread.c: Update.
4831         * remote-sim.c: Update.
4832         * remote.c: Update.
4833         * sol-thread.c: Update.
4834         * target.c: Update.
4835         * windows-nat.c: Update.
4836
4837 2018-07-03  Tom Tromey  <tom@tromey.com>
4838
4839         * infrun.c (follow_exec): Use exit_inferior_silent.
4840         * inferior.c (exit_inferior_num_silent): Remove.
4841         * inferior.h (exit_inferior_num_silent): Don't declare.
4842
4843 2018-07-03  Tom Tromey  <tom@tromey.com>
4844
4845         PR cli/23340:
4846         * darwin-nat.c (darwin_attach_pid): Reset inferior and
4847         inferior_ptid on error.
4848
4849 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
4850             Simon Marchi  <simon.marchi@polymtl.ca>
4851
4852         PR tdep/8282
4853         * disasm.h (gdb_disassembler): Add
4854         `m_disassembler_options_holder'. member
4855         * disasm.c (get_all_disassembler_options): New function.
4856         (gdb_disassembler::gdb_disassembler): Use it.
4857         (gdb_buffered_insn_length_init_dis): Likewise.
4858         (gdb_buffered_insn_length): Adjust accordingly.
4859         (set_disassembler_options): Handle options with arguments.
4860         (show_disassembler_options_sfunc): Likewise.  Add a leading new
4861         line if showing options with descriptions.
4862         (disassembler_options_completer): Adapt to using the
4863         `disasm_options_and_args_t' structure.
4864         * mips-tdep.c (mips_disassembler_options): New variable.
4865         (mips_disassembler_options_o32): Likewise.
4866         (mips_disassembler_options_n32): Likewise.
4867         (mips_disassembler_options_n64): Likewise.
4868         (gdb_print_insn_mips): Don't set `disassembler_options'.
4869         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
4870         functions.
4871         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
4872         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
4873         `gdbarch_disassembler_options_implicit' and
4874         `gdbarch_valid_disassembler_options'.
4875         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
4876         `disasm_options_and_args_t' structure.
4877         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
4878         method.
4879         (valid_disassembler_options): Switch from `disasm_options_t' to
4880         the `disasm_options_and_args_t' structure.
4881         * NEWS: Document `set disassembler-options' support for the MIPS
4882         target.
4883         * gdbarch.h: Regenerate.
4884         * gdbarch.c: Regenerate.
4885
4886 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
4887
4888         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
4889
4890 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
4891
4892         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
4893         parameter in call to amd64_target_description.
4894         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
4895         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
4896         (amd64fbsd_init_abi): Likewise.
4897         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
4898         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
4899         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
4900         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
4901
4902 2018-06-29  Pedro Alves  <palves@redhat.com>
4903
4904         * gdb/amd64-tdep.h (amd64_create_target_description): Add
4905         "segments" parameter.
4906         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
4907         (_initialize_amd64_tdep): Update call to
4908         amd64_create_target_description.
4909         (amd64_target_description): Add "segments" parameter.  Adjust
4910         the implementation to use it.
4911         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
4912         call to amd64_create_target_description.
4913         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
4914         * gdb/arch/amd64.h (amd64_create_target_description): Add
4915         "segments" register.
4916         * gdb/arch/amd64.c (amd64_create_target_description): Add
4917         "segments" parameter.  Call create_feature_i386_64bit_segments
4918         only if SEGMENTS is true.
4919         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
4920         call to amd64_create_target_description.
4921
4922 2018-06-29  Pedro Alves  <palves@redhat.com>
4923
4924         * thread.c (thread_target_id_str): New, factored out from ...
4925         (print_thread_info_1): ... here.  Use it to compute the max
4926         "Target Id" column width.
4927
4928 2018-06-29  Pedro Alves  <palves@redhat.com>
4929
4930         * remote.c (remote_target::extra_thread_info): Delete
4931         'display_buf' and 'n' locals.  from the cache, regardless of
4932         packet mechanims is in use.  Use cache for qThreadExtra and qP
4933         methods too.
4934
4935 2018-06-29  Pedro Alves  <palves@redhat.com>
4936
4937         * blockframe.c (find_pc_sect_containing_function): New function.
4938         * breakpoint.c (print_breakpoint_location): Don't call
4939         find_pc_sect_function.
4940         * linespec.c (create_sals_line_offset): Record the location's
4941         symbol in the sal.
4942         * linespec.c (convert_address_location_to_sals): Fill in sal's
4943         symbol with find_pc_sect_containing_function.
4944         * symtab.c (find_function_start_sal): Rename to ...
4945         (find_function_start_sal_1): ... this.
4946         (find_function_start_sal): Reimplement as wrapper around
4947         find_function_start_sal_1, and use
4948         find_pc_sect_containing_function to fill in the sal's symbol.
4949         (find_function_start_sal(symbol*, bool)): Adjust.
4950         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
4951         comments.
4952         (find_pc_sect_containing_function): Declare.
4953
4954 2018-06-29  Pedro Alves  <palves@redhat.com>
4955
4956         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
4957         true if the the location has no symbol.
4958
4959 2018-06-28  Tom Tromey  <tom@tromey.com>
4960
4961         * NEWS: Mention --enable-codesign.
4962         * silent-rules.mk (ECHO_SIGN): New variable.
4963         * configure.ac: Add --enable-codesign.
4964         * configure: Rebuild.
4965         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
4966         (gdb$(EXEEXT)): Optionally invoke codesign.
4967
4968 2018-06-28  Pedro Alves  <palves@redhat.com>
4969
4970         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
4971         comments.
4972         (switch_to_thread_no_regs): Adjust comment.
4973         * infcmd.c (stop_pc): Delete.
4974         (post_create_inferior, info_program_command): Replace references
4975         to stop_pc with references to thread_info->suspend.stop_pc.
4976         * inferior.h (stop_pc): Delete declaration.
4977         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
4978         (handle_inferior_event_1, handle_signal_stop)
4979         (process_event_stop_test, keep_going_stepped_thread)
4980         (handle_step_into_function, handle_step_into_function_backward)
4981         (print_stop_location): Replace references to stop_pc with
4982         references to thread_info->suspend.stop_pc.
4983         (struct infcall_suspend_state) <stop_pc>: Delete field.
4984         (save_infcall_suspend_state, restore_infcall_suspend_state):
4985         Remove references to inf_stat->stop_pc.
4986         * linux-fork.c (fork_load_infrun_state): Likewise.
4987         * record-btrace.c (record_btrace_set_replay): Likewise.
4988         * record-full.c (record_full_goto_entry): Likewise.
4989         * remote.c (print_one_stopped_thread): Likewise.
4990         * target.c (target_resume): Extend comment.
4991         * thread.c (set_executing_thread): New.
4992         (set_executing): Use it.
4993         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
4994         Remove references to stop_pc.
4995
4996 2018-06-28  Pedro Alves  <palves@redhat.com>
4997
4998         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
4999         Moving fetching stop_pc until after ecs->event_thread is refreshed.
5000
5001 2018-06-28  Tom Tromey  <tom@tromey.com>
5002
5003         * coffread.c (coff_symfile_finish): Update.
5004         * xcoffread.c (xcoff_symfile_finish): Update.
5005         * elfread.c (elf_symfile_finish): Update.
5006         * symfile.h (dwarf2_free_objfile): Don't declare.
5007         * dwarf2read.c (_initialize_dwarf2_read): Use
5008         register_objfile_data_with_cleanup.
5009         (dwarf2_free_objfile): Now static.  Change signature.
5010
5011 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5012
5013         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5014         option "-o" to add-symbol-file-load to add an offset to each
5015         section's load address.
5016         * symfile.c (set_objfile_default_section_offset): New function.
5017
5018 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5019
5020         * symfile.c (add_symbol_file_command): Make sure that sections
5021         with the same name are sorted in the same order.
5022
5023 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5024
5025         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5026         require the second argument.  If omitted, load sections at the
5027         addresses specified in the file.
5028
5029 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5030
5031         * symfile.c (symbol_file_command, symbol_file_add_main_1)
5032         (_initialize_symfile): Add option "-o" to symbol-file to add an
5033         offset to each section of the symbol file.
5034
5035 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5036
5037         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5038
5039 2018-06-27  Tom Tromey  <tom@tromey.com>
5040
5041         * stack.c (_initialize_stack): Update "func" help text.
5042
5043 2018-06-27  Tom Tromey  <tom@tromey.com>
5044
5045         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
5046         std::vector.
5047         (unwind_infopy_str, pyuw_create_unwind_info)
5048         (unwind_infopy_add_saved_register, pyuw_sniffer)
5049         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
5050         Update.
5051         (struct saved_reg): Add constructor.
5052         <value>: Now a gdbpy_ref<>.
5053
5054 2018-06-27  Tom Tromey  <tom@tromey.com>
5055
5056         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
5057
5058 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5059
5060         * gdb-gdb.py.in: Format using autopep8.
5061
5062 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5063
5064         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
5065         (type_lookup_function): Recognize CORE_ADDR values.
5066
5067 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5068
5069         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
5070         print tag_name.
5071
5072 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5073
5074         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
5075         <__lt__>: Add.
5076
5077 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5078
5079         * gdb-gdb.py: Move to...
5080         * gdb-gdb.py.in: ... here.
5081         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
5082         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
5083         dependencies.
5084         (distclean): Remove gdb-gdb.py when cleaning.
5085         (gdb-gdb.py, gdb-gdb.gdb): New rules.
5086         * configure: Re-generate.
5087
5088 2018-06-27  Pedro Alves  <palves@redhat.com>
5089
5090         * proc-service.c (get_ps_regcache): New.
5091         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5092         (ps_lsetfpregs): Use it.
5093
5094 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
5095
5096         PR gdb/21695
5097         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
5098         (dwarf_decode_lines_1): Adjust.
5099
5100 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
5101
5102         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
5103         override.
5104         <info_proc>: Likewise.
5105
5106 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
5107
5108         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
5109         to windows_fetch_one_register, and only handle the case of
5110         fetching one register.  Move the code that reloads the context
5111         and iterates over all registers if R is negative to...
5112         (windows_nat_target::fetch_registers): ... here.
5113         (do_windows_store_inferior_registers): Rename to
5114         windows_store_one_register, and only handle the case of storing
5115         one register.  Move the code that handles the case where r is
5116         negative to...
5117         (windows_nat_target::store_registers) ... here.
5118
5119 2018-06-26  Tom Tromey  <tom@tromey.com>
5120
5121         PR rust/22574:
5122         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
5123         * rust-lang.c (rust_print_struct_def): Add podata parameter.
5124         Update.
5125         (rust_internal_print_type): Add podata parameter.
5126         (rust_print_type): Update.
5127
5128 2018-06-26  Tom Tromey  <tom@tromey.com>
5129
5130         * typeprint.h (struct print_offset_data) <update, finish,
5131         maybe_print_hole>: New methods.
5132         <indentation>: New constant.
5133         * typeprint.c (print_offset_data::indentation): Define.
5134         (print_offset_data::maybe_print_hole, print_offset_data::update)
5135         (print_offset_data::finish): Move from c-typeprint.c and rename.
5136         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
5137         (print_spaces_filtered_with_print_options): Update.
5138         (c_print_type_union_field_offset, maybe_print_hole)
5139         (c_print_type_struct_field_offset): Move to typeprint.c and
5140         rename.
5141         (c_type_print_base_struct_union): Update.
5142
5143 2018-06-25  Pedro Alves  <palves@redhat.com>
5144
5145         * gdbthread.h (thread_info_ref, delete_thread)
5146         (delete_thread_silent, first_thread_of_inferior)
5147         (any_thread_of_inferior, switch_to_thread)
5148         (enable_thread_stack_temporaries)
5149         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5150         (get_last_thread_stack_temporary)
5151         (value_in_thread_stack_temporaries, can_access_registers_thread):
5152         Spell out "struct thread_info" instead of just "thread_info".
5153         * inferior.h (notice_new_inferior): Likewise.
5154
5155 2018-06-25  Pedro Alves  <palves@redhat.com>
5156
5157         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5158         pass thread_info pointer to delete_thread.
5159         (windows_nat_target::detach): Pass inferior pointer to
5160         detach_inferior.
5161         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
5162         delete_thread.
5163         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
5164         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
5165         and pass a thread_info pointer to delete_thread.
5166         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
5167         pass thread_info pointer to delete_thread.
5168         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
5169         delete_thread_silent call.
5170         * procfs.c (procfs_target::detach): Pass inferior pointer to
5171         detach_inferior.
5172         (procfs_target::wait): Pass thread_info pointer to delete_thread.
5173         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
5174         delete_thread_silent call.
5175         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
5176         pass thread_info pointer to delete_thread.
5177         (windows_nat_target::detach): Pass inferior pointer to
5178         delete_inferior.
5179
5180 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5181
5182         * regcache.c (readable_regcache::read_part): Fix asserts.
5183         (reg_buffer::raw_collect_part): New function.
5184         (regcache::write_part): Fix asserts.
5185         (reg_buffer::raw_supply_part): New function.
5186         (regcache::transfer_regset_register): New helper function.
5187         (regcache::transfer_regset): Call new functions.
5188         (regcache_supply_regset): Use gdb_byte*.
5189         (regcache::supply_regset): Likewise.
5190         (regcache_collect_regset): Likewise.
5191         (regcache::collect_regset): Likewise.
5192         * regcache.h (reg_buffer::raw_collect_part): New declaration.
5193         (reg_buffer::raw_supply_part): Likewise.
5194         (regcache::transfer_regset_register): Likewise.
5195         (regcache::transfer_regset): Use gdb_byte*.
5196
5197 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
5198
5199         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
5200
5201 2018-06-21  Pedro Alves  <palves@redhat.com>
5202
5203         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
5204         instead of a ptid_t.  All callers adjusted.
5205         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
5206         adjusted.
5207         (print_ada_task_info, display_current_task_id, task_command_1):
5208         Adjust.
5209         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
5210         inferior_thread.
5211         (breakpoint_kind): Adjust.
5212         (remove_breakpoints_pid): Rename to ...
5213         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
5214         pointer.  All callers adjusted.
5215         (bpstat_clear_actions): Use inferior_thread.
5216         (get_bpstat_thread): New.
5217         (bpstat_do_actions): Use it.
5218         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
5219         to take a thread_info pointer.  All callers adjusted.
5220         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
5221         (breakpoint_re_set_thread): Use inferior_thread.
5222         * breakpoint.h (struct inferior): Forward declare.
5223         (bpstat_stop_status): Update.
5224         (remove_breakpoints_pid): Delete.
5225         (remove_breakpoints_inf): New.
5226         * bsd-uthread.c (bsd_uthread_target::wait)
5227         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
5228         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
5229         (maint_btrace_packet_history_cmd)
5230         (maint_btrace_clear_packet_history_cmd): Adjust.
5231         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
5232         inferior_thread.
5233         * cli/cli-interp.c: Include "inferior.h".
5234         * common/refcounted-object.h (struct
5235         refcounted_object_ref_policy): New.
5236         * compile/compile-object-load.c: Include gdbthread.h.
5237         (store_regs): Use inferior_thread.
5238         * corelow.c (core_target::close): Use current_inferior.
5239         (core_target_open): Adjust to use first_thread_of_inferior and use
5240         the current inferior.
5241         * ctf.c (ctf_target::close): Adjust to use current_inferior.
5242         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
5243         <thread>: ... this new field.  All references adjusted.
5244         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
5245         Take a thread_info pointer instead of a ptid_t.
5246         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
5247         (dummy_frame_discard, register_dummy_frame_dtor): Take a
5248         thread_info pointer instead of a ptid_t.
5249         * elfread.c: Include "inferior.h".
5250         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
5251         Use inferior_thread.
5252         * eval.c (evaluate_subexp): Likewise.
5253         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
5254         inferior_thread.
5255         * gdb_proc_service.h (struct thread_info): Forward declare.
5256         (struct ps_prochandle) <ptid>: Delete, replaced by ...
5257         <thread>: ... this new field.  All references adjusted.
5258         * gdbarch.h, gdbarch.c: Regenerate.
5259         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
5260         'thread' parameter.  All implementations and callers adjusted.
5261         * gdbthread.h (thread_info) <set_running>: New method.
5262         (delete_thread, delete_thread_silent): Take a thread_info pointer
5263         instead of a ptid.
5264         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
5265         (first_thread_of_process): Delete, replaced by ...
5266         (first_thread_of_inferior): ... this new function.  All callers
5267         adjusted.
5268         (any_live_thread_of_process): Delete, replaced by ...
5269         (any_live_thread_of_inferior): ... this new function.  All callers
5270         adjusted.
5271         (switch_to_thread, switch_to_no_thread): Declare.
5272         (is_executing): Delete.
5273         (enable_thread_stack_temporaries): Update comment.
5274         <enable_thread_stack_temporaries>: Take a thread_info pointer
5275         instead of a ptid_t.  Incref the thread.
5276         <~enable_thread_stack_temporaries>: Decref the thread.
5277         <m_ptid>: Delete
5278         <m_thr>: New.
5279         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5280         (get_last_thread_stack_temporary)
5281         (value_in_thread_stack_temporaries, can_access_registers_thread):
5282         Take a thread_info pointer instead of a ptid_t.  All callers
5283         adjusted.
5284         * infcall.c (get_call_return_value): Use inferior_thread.
5285         (run_inferior_call): Work with thread pointers instead of ptid_t.
5286         (call_function_by_hand_dummy): Work with thread pointers instead
5287         of ptid_t.  Use thread_info_ref.
5288         * infcmd.c (proceed_thread_callback): Access thread's state
5289         directly.
5290         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
5291         access thread's state directly.
5292         (continue_command): Use inferior_thread.
5293         (info_program_command): Use find_thread_ptid and access thread
5294         state directly.
5295         (proceed_after_attach_callback): Use thread state directly.
5296         (notice_new_inferior): Take a thread_info pointer instead of a
5297         ptid_t.  All callers adjusted.
5298         (exit_inferior): Take an inferior pointer instead of a pid.  All
5299         callers adjusted.
5300         (exit_inferior_silent): New.
5301         (detach_inferior): Delete.
5302         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
5303         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
5304         (detach_inferior_command, kill_inferior_command): Use
5305         find_inferior_id instead of valid_gdb_inferior_id and
5306         gdb_inferior_id_to_pid.
5307         (inferior_command): Use inferior and thread pointers.
5308         * inferior.h (struct thread_info): Forward declare.
5309         (notice_new_inferior): Take a thread_info pointer instead of a
5310         ptid_t.  All callers adjusted.
5311         (detach_inferior): Delete declaration.
5312         (exit_inferior, exit_inferior_silent): Take an inferior pointer
5313         instead of a pid.  All callers adjusted.
5314         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
5315         (valid_gdb_inferior_id): Delete.
5316         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
5317         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
5318         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
5319         ...
5320         <inf>: ... this new field.
5321         <step_ptid>: Delete, replaced by ...
5322         <step_thread>: ... this new field.
5323         (get_displaced_stepping_state): Take an inferior pointer instead
5324         of a pid.  All callers adjusted.
5325         (displaced_step_in_progress_any_inferior): Adjust.
5326         (displaced_step_in_progress_thread): Take a thread pointer instead
5327         of a ptid_t.  All callers adjusted.
5328         (displaced_step_in_progress, add_displaced_stepping_state): Take
5329         an inferior pointer instead of a pid.  All callers adjusted.
5330         (get_displaced_step_closure_by_addr): Adjust.
5331         (remove_displaced_stepping_state): Take an inferior pointer
5332         instead of a pid.  All callers adjusted.
5333         (displaced_step_prepare_throw, displaced_step_prepare)
5334         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
5335         All callers adjusted.
5336         (start_step_over): Adjust.
5337         (infrun_thread_ptid_changed): Remove bit updating ptids in the
5338         displaced step queue.
5339         (do_target_resume): Adjust.
5340         (fetch_inferior_event): Use inferior_thread.
5341         (context_switch, get_inferior_stop_soon): Take an
5342         execution_control_state pointer instead of a ptid_t.  All callers
5343         adjusted.
5344         (switch_to_thread_cleanup): Delete.
5345         (stop_all_threads): Use scoped_restore_current_thread.
5346         * inline-frame.c: Include "gdbthread.h".
5347         (inline_state) <inline_state>: Take a thread pointer instead of a
5348         ptid_t.  All callers adjusted.
5349         <ptid>: Delete, replaced by ...
5350         <thread>: ... this new field.
5351         (find_inline_frame_state): Take a thread pointer instead of a
5352         ptid_t.  All callers adjusted.
5353         (skip_inline_frames, step_into_inline_frame)
5354         (inline_skipped_frames, inline_skipped_symbol): Take a thread
5355         pointer instead of a ptid_t.  All callers adjusted.
5356         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
5357         (inline_skipped_frames, inline_skipped_symbol): Likewise.
5358         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
5359         pointers directly.
5360         * linux-nat.c (get_detach_signal): Likewise.
5361         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
5362         (thread_db_notice_clone): Adjust.
5363         (thread_db_find_new_threads_silently)
5364         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
5365         a thread pointer instead of a ptid_t.  All callers adjusted.
5366         * mi/mi-cmd-var.c: Include "inferior.h".
5367         (mi_cmd_var_update_iter): Update to use thread pointers.
5368         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
5369         inferior directly.
5370         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
5371         out to ...
5372         (mi_output_running): ... this new function.
5373         (mi_on_resume_1): Adjust to use it.
5374         (mi_user_selected_context_changed): Adjust to use inferior_thread.
5375         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
5376         directly.
5377         (interrupt_thread_callback): : Adjust to use thread and inferior
5378         pointers.
5379         * proc-service.c: Include "gdbthread.h".
5380         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
5381         * progspace-and-thread.c: Include "inferior.h".
5382         * progspace.c: Include "inferior.h".
5383         * python/py-exitedevent.c (create_exited_event_object): Adjust to
5384         hold a reference to an inferior_object.
5385         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
5386         inferior_thread.
5387         * python/py-inferior.c (struct inferior_object): Give the type a
5388         tag name instead of a typedef.
5389         (python_on_normal_stop): No need to check if the current thread is
5390         listed.
5391         (inferior_to_inferior_object): Change return type to
5392         inferior_object.  All callers adjusted.
5393         (find_thread_object): Delete, bits factored out to ...
5394         (thread_to_thread_object): ... this new function.
5395         * python/py-infthread.c (create_thread_object): Use
5396         inferior_to_inferior_object.
5397         (thpy_is_stopped): Use thread pointer directly.
5398         (gdbpy_selected_thread): Use inferior_thread.
5399         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
5400         field, replaced with ...
5401         <thread>: ... this new field.  All users adjusted.
5402         (btpy_insn_or_gap_new): Drop const.
5403         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
5404         callers adjusted.
5405         * python/py-record.c: Include "gdbthread.h".
5406         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5407         a ptid_t.  All callers adjusted.
5408         (gdbpy_current_recording): Use inferior_thread.
5409         * python/py-record.h (recpy_record_object) <ptid>: Delete
5410         field, replaced with ...
5411         <thread>: ... this new field.  All users adjusted.
5412         (recpy_element_object) <ptid>: Delete
5413         field, replaced with ...
5414         <thread>: ... this new field.  All users adjusted.
5415         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
5416         a ptid_t.  All callers adjusted.
5417         * python/py-threadevent.c: Include "gdbthread.h".
5418         (get_event_thread): Use thread_to_thread_object.
5419         * python/python-internal.h (struct inferior_object): Forward
5420         declare.
5421         (find_thread_object, find_inferior_object): Delete declarations.
5422         (thread_to_thread_object, inferior_to_inferior_object): New
5423         declarations.
5424         * record-btrace.c: Include "inferior.h".
5425         (require_btrace_thread): Use inferior_thread.
5426         (record_btrace_frame_sniffer)
5427         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
5428         (get_thread_current_frame): Use scoped_restore_current_thread and
5429         switch_to_thread.
5430         (get_thread_current_frame): Use thread pointer directly.
5431         (record_btrace_replay_at_breakpoint): Use thread's inferior
5432         pointer directly.
5433         * record-full.c: Include "inferior.h".
5434         * regcache.c: Include "gdbthread.h".
5435         (get_thread_arch_regcache): Use the inferior's address space
5436         directly.
5437         (get_thread_regcache, registers_changed_thread): New.
5438         * regcache.h (get_thread_regcache(thread_info *thread)): New
5439         overload.
5440         (registers_changed_thread): New.
5441         (remote_target) <remote_detach_1>: Swap order of parameters.
5442         (remote_add_thread): <remote_add_thread>: Return the new thread.
5443         (get_remote_thread_info(ptid_t)): New overload.
5444         (remote_target::remote_notice_new_inferior): Use thread pointers
5445         directly.
5446         (remote_target::process_initial_stop_replies): Use
5447         thread_info::set_running.
5448         (remote_target::remote_detach_1, remote_target::detach)
5449         (extended_remote_target::detach): Adjust.
5450         * stack.c (frame_show_address): Use inferior_thread.
5451         * target-debug.h (target_debug_print_thread_info_pp): New.
5452         * target-delegates.c: Regenerate.
5453         * target.c (default_thread_address_space): Delete.
5454         (memory_xfer_partial_1): Use current_inferior.
5455         (target_detach): Use current_inferior.
5456         (target_thread_address_space): Delete.
5457         (generic_mourn_inferior): Use current_inferior.
5458         * target.h (struct target_ops) <thread_address_space>: Delete.
5459         (target_thread_address_space): Delete.
5460         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
5461         pointers directly.
5462         (delete_thread_1, delete_thread, delete_thread_silent): Take a
5463         thread pointer instead of a ptid_t.  Adjust all callers.
5464         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
5465         (first_thread_of_process): Delete, replaced by ...
5466         (first_thread_of_inferior): ... this new function.  All callers
5467         adjusted.
5468         (any_thread_of_process): Rename to ...
5469         (any_thread_of_inferior): ... this, and take an inferior pointer.
5470         (any_live_thread_of_process): Rename to ...
5471         (any_live_thread_of_inferior): ... this, and take an inferior
5472         pointer.
5473         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
5474         (value_in_thread_stack_temporaries)
5475         (get_last_thread_stack_temporary): Take a thread pointer instead
5476         of a ptid_t.  Adjust all callers.
5477         (thread_info::set_running): New.
5478         (validate_registers_access): Use inferior_thread.
5479         (can_access_registers_ptid): Rename to ...
5480         (can_access_registers_thread): ... this, and take a thread
5481         pointer.
5482         (print_thread_info_1): Adjust to compare thread pointers instead
5483         of ptids.
5484         (switch_to_no_thread, switch_to_thread): Make extern.
5485         (scoped_restore_current_thread::~scoped_restore_current_thread):
5486         Use m_thread pointer directly.
5487         (scoped_restore_current_thread::scoped_restore_current_thread):
5488         Use inferior_thread.
5489         (thread_command): Use thread pointer directly.
5490         (thread_num_make_value_helper): Use inferior_thread.
5491         * top.c (execute_command): Use inferior_thread.
5492         * tui/tui-interp.c: Include "inferior.h".
5493         * varobj.c (varobj_create): Use inferior_thread.
5494         (value_of_root_1): Use find_thread_global_id instead of
5495         global_thread_id_to_ptid.
5496
5497 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
5498
5499         * regcache.c (readable_regcache::read_part): Avoid memcpy when
5500         possible.
5501         (regcache::write_part): Likewise.
5502         (readable_regcache::cooked_read_part): Update comment.
5503         (readable_regcache::cooked_write_part): Likewise.
5504         * regcache.h: (readable_regcache::read_part): Likewise.
5505         (regcache::write_part): Likewise.
5506
5507 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
5508             Dirk Schubert  <dirk.schubert@arm.com>
5509
5510         * aarch64-linux-nat.c (post_attach): New.
5511         (aarch64_linux_nat_target::post_attach): Override post_attach to
5512         record the number of hardware debug registers.
5513
5514 2018-06-20  Tom Tromey  <tom@tromey.com>
5515
5516         * python/py-param.c (add_setshow_generic): Make parameters const.
5517         (parmpy_init): Update.
5518
5519 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5520
5521         * regcache.h (regcache_cooked_read_ftype): Rename to...
5522         (register_read_ftype): ...this, change type to function_view.
5523         (class reg_buffer) <save>: Remove src parameter.
5524         (readonly_detached_regcache) <readonly_detached_regcache>: Make
5525         parameter non-const in first overload.  Remove src parameter in
5526         second overload.
5527         * regcache.c (do_cooked_read): Remove.
5528         (readonly_detached_regcache::readonly_detached_regcache): Make
5529         parameter non-const, adjust call to other constructor.
5530         (reg_buffer::save): Remove src parameter.
5531         * frame.c (do_frame_register_read): Remove.
5532         (frame_save_as_regcache): Use lambda function.
5533         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
5534         parameter to ppu2spu_data *.
5535         (ppu2spu_sniffer): Use lambda function.
5536
5537 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
5538
5539         * record-full.c (record_full_target::insert_breakpoint): Remove
5540         "struct" keyword, add const.
5541
5542 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
5543
5544         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
5545         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
5546         * configure.ac: Remove AC_PREREQ, add missing quoting.
5547         * gnulib/configure.ac: Modernize usage of
5548         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
5549         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
5550         (AUTOMAKE_VERSION): Bump to 1.15.1.
5551         * configure: Re-generate.
5552         * config.in: Re-generate.
5553         * aclocal.m4: Re-generate.
5554         * gnulib/aclocal.m4: Re-generate.
5555         * gnulib/config.in: Re-generate.
5556         * gnulib/configure: Re-generate.
5557         * gnulib/import/Makefile.in: Re-generate.
5558
5559 2018-06-19  Pedro Alves  <palves@redhat.com>
5560
5561         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
5562         (lookup_minimal_symbol_by_pc_section): ... here with
5563         gdb_assert_not_reached added.
5564
5565 2018-06-19  Pedro Alves  <palves@redhat.com>
5566
5567         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
5568         parameter with a block parameter.  Compare location's block symbol
5569         with the frame's block instead of addresses.
5570         (skip_inline_frames): Pass the current block instead of the
5571         frame's address.  Break out as soon as we determine the frame
5572         should not be skipped.
5573
5574 2018-06-18  Tom Tromey  <tom@tromey.com>
5575
5576         * solib-aix.c (solib_aix_get_section_offsets): Return
5577         unique_xmalloc_ptr.
5578         (solib_aix_solib_create_inferior_hook): Update.
5579
5580 2018-06-18  Tom Tromey  <tom@tromey.com>
5581
5582         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
5583
5584 2018-06-18  Tom Tromey  <tom@tromey.com>
5585
5586         * solib-frv.c (frv_relocate_main_executable): Use
5587         unique_xmalloc_ptr.
5588         * solib-dsbt.c (dsbt_relocate_main_executable): Use
5589         unique_xmalloc_ptr.
5590
5591 2018-06-18  Tom Tromey  <tom@tromey.com>
5592
5593         * objfiles.h (inhibit_section_map_updates): Update.
5594         (resume_section_map_updates, resume_section_map_updates_cleanup):
5595         Remove.
5596         * solib-svr4.c (svr4_handle_solib_event): Update.
5597         * objfiles.c (inhibit_section_map_updates): Return
5598         scoped_restore_tmpl<int>.
5599         (resume_section_map_updates, resume_section_map_updates_cleanup):
5600         Remove.
5601
5602 2018-06-18  Tom Tromey  <tom@tromey.com>
5603
5604         * valprint.h (read_string): Update.
5605         * valprint.c (read_string): Change type of "buffer".
5606         (val_print_string): Update.
5607         * python/py-value.c (valpy_string): Update.
5608         * language.h (struct language_defn) <la_get_string>: Change
5609         type of "buffer".
5610         (default_get_string, c_get_string): Update.
5611         * language.c (default_get_string): Change type of "buffer".
5612         * guile/scm-value.c (gdbscm_value_to_string): Update.
5613         * c-lang.c (c_get_string): Change type of "buffer".
5614
5615 2018-06-18  Tom Tromey  <tom@tromey.com>
5616
5617         * ser-mingw.c (struct pipe_state_destroyer): New.
5618         (pipe_state_up): New typedef.
5619         (cleanup_pipe_state): Remove.
5620         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
5621
5622 2018-06-18  Tom Tromey  <tom@tromey.com>
5623
5624         * rust-lang.h (rust_yyerror): Don't declare.
5625         * rust-lang.c (rust_language_defn): Update.
5626         * rust-exp.y (yyerror): Now static.
5627         * parse.c (parse_exp_in_context_1): Update.
5628         * p-lang.h (p_yyerror): Don't declare.
5629         * p-lang.c (p_language_defn): Update.
5630         * p-exp.y (yyerror): Now static.
5631         * opencl-lang.c (opencl_language_defn): Update.
5632         * objc-lang.c (objc_language_defn): Update.
5633         * m2-lang.h (m2_yyerror): Don't declare.
5634         * m2-lang.c (m2_language_defn): Update.
5635         * m2-exp.y (yyerror): Now static.
5636         * language.h (struct language_defn) <la_error>: Remove.
5637         * language.c (unk_lang_error): Remove.
5638         (unknown_language_defn, auto_language_defn): Remove.
5639         * go-lang.h (go_yyerror): Don't declare.
5640         * go-lang.c (go_language_defn): Update.
5641         * go-exp.y (yyerror): Now static.
5642         * f-lang.h (f_yyerror): Don't declare.
5643         * f-lang.c (f_language_defn): Update.
5644         * f-exp.y (yyerror): Now static.
5645         * d-lang.h (d_yyerror): Don't declare.
5646         * d-lang.c (d_language_defn): Update.
5647         * d-exp.y (yyerror): Now static.
5648         * c-lang.h (c_yyerror): Don't declare.
5649         * c-lang.c (c_language_defn, cplus_language_defn)
5650         (asm_language_defn, minimal_language_defn): Update.
5651         * c-exp.y (yyerror): Now static.
5652         * ada-lang.h (ada_yyerror): Don't declare.
5653         * ada-lang.c (ada_language_defn): Update.
5654         * ada-exp.y (yyerror): Now static.
5655
5656 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5657
5658         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
5659         (store_sveregs_to_thread): Likewise.
5660         (aarch64_linux_fetch_inferior_registers): Check for SVE.
5661         (aarch64_linux_store_inferior_registers): Likewise.
5662         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
5663         function.
5664         (aarch64_sve_regs_copy_to_regcache): Likewise.
5665         (aarch64_sve_regs_copy_from_regcache): Likewise.
5666         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
5667         declaration.
5668         (aarch64_sve_regs_copy_to_regcache): Likewise.
5669         (aarch64_sve_regs_copy_from_regcache): Likewise.
5670         (sve_context): Structure from Linux headers.
5671         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
5672         (SVE_SIG_ZREG_SIZE): Likewise.
5673         (SVE_SIG_PREG_SIZE): Likewise.
5674         (SVE_SIG_FFR_SIZE): Likewise.
5675         (SVE_SIG_REGS_OFFSET): Likewise.
5676         (SVE_SIG_ZREGS_OFFSET): Likewise.
5677         (SVE_SIG_ZREG_OFFSET): Likewise.
5678         (SVE_SIG_ZREGS_SIZE): Likewise.
5679         (SVE_SIG_PREGS_OFFSET): Likewise.
5680         (SVE_SIG_PREG_OFFSET): Likewise.
5681         (SVE_SIG_PREGS_SIZE): Likewise.
5682         (SVE_SIG_FFR_OFFSET): Likewise.
5683         (SVE_SIG_REGS_SIZE): Likewise.
5684         (SVE_SIG_CONTEXT_SIZE): Likewise.
5685         (SVE_PT_REGS_MASK): Likewise.
5686         (SVE_PT_REGS_FPSIMD): Likewise.
5687         (SVE_PT_REGS_SVE): Likewise.
5688         (SVE_PT_VL_INHERIT): Likewise.
5689         (SVE_PT_VL_ONEXEC): Likewise.
5690         (SVE_PT_REGS_OFFSET): Likewise.
5691         (SVE_PT_FPSIMD_OFFSET): Likewise.
5692         (SVE_PT_FPSIMD_SIZE): Likewise.
5693         (SVE_PT_SVE_ZREG_SIZE): Likewise.
5694         (SVE_PT_SVE_PREG_SIZE): Likewise.
5695         (SVE_PT_SVE_FFR_SIZE): Likewise.
5696         (SVE_PT_SVE_FPSR_SIZE): Likewise.
5697         (SVE_PT_SVE_FPCR_SIZE): Likewise.
5698         (__SVE_SIG_TO_PT): Likewise.
5699         (SVE_PT_SVE_OFFSET): Likewise.
5700         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
5701         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
5702         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
5703         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
5704         (SVE_PT_SVE_PREG_OFFSET): Likewise.
5705         (SVE_PT_SVE_PREGS_SIZE): Likewise.
5706         (SVE_PT_SVE_FFR_OFFSET): Likewise.
5707         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
5708         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
5709         (SVE_PT_SVE_SIZE): Likewise.
5710         (SVE_PT_SIZE): Likewise.
5711         (HAS_SVE_STATE): New define.
5712
5713 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
5714
5715         * nat/aarch64-sve-linux-sigcontext.h: New file.
5716         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
5717         new files.
5718         (SVE_VQ_MIN): Likewise.
5719         (SVE_VQ_MAX): Likewise.
5720         (SVE_VL_MIN): Likewise.
5721         (SVE_VL_MAX): Likewise.
5722         (SVE_NUM_ZREGS): Likewise.
5723         (SVE_NUM_PREGS): Likewise.
5724         (sve_vl_valid): Likewise.
5725         (struct user_sve_header): Likewise.
5726
5727 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
5728             Richard Bunt <Richard.Bunt@arm.com>
5729
5730         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
5731         was requested by GDB.
5732
5733 2018-06-15  Tom de Vries  <tdevries@suse.de>
5734
5735         * MAINTAINERS (Write After Approval): Add Tom de Vries.
5736
5737 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
5738
5739         * gnulib/update-gnulib.sh: Print expected versions of
5740         autoconf/aclocal.
5741
5742 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
5743
5744         * arch-utils.c (default_type_align): Use type_length_units.
5745         * gdbtypes.c (type_align): Use type_length_units.
5746
5747 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5748
5749         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
5750         of 'define' command.
5751
5752 2018-06-14  Tom de Vries  <tdevries@suse.de>
5753
5754         PR cli/22573
5755         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
5756         get_no_prettyformat_print_options.
5757
5758 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
5759
5760         * sparc-nat.h: Include target.h.
5761         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
5762         <fetch_registers>: Remove this argument in function call.
5763         <store_registers>: Remove this argument in function call, remove
5764         extra semicolon.
5765         <low_forget_process>: Call sparc64_forget_process instead of
5766         sparc_forget_process.
5767
5768 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5769
5770         * procfs.c (_initialize_procfs): Use add_inf_child_target.
5771         (procfs_target::make_corefile_notes): Adjust to new
5772         target_read_alloc return type.
5773
5774 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5775             Stephen Roberts  <stephen.roberts@arm.com>
5776
5777         PR gdb/22882
5778         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
5779         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
5780         Move should_notify_stop local into more inner scope.
5781
5782 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5783             Stephen Roberts  <stephen.roberts@arm.com>
5784
5785         PR gdb/22882
5786         * infrun.c (resume_1): Add call to mark_async_event_handler.
5787
5788 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
5789
5790         * infrun.c (do_target_wait): Change old version of $pc printed.
5791
5792 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
5793
5794         * dwarf2read.c (read_index_from_section): Rename to...
5795         (read_gdb_index_from_section): ... this, update all callers.
5796         (dwarf2_read_index): Rename to...
5797         (dwarf2_read_gdb_index): ... this, update all callers.
5798
5799 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
5800
5801         * gdb/hppa-linux-nat.c
5802         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
5803         hppa_linux_nat_target::fetch_registers.
5804
5805 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5806
5807         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
5808         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
5809         (AARCH64_DWARF_SVE_FFR): Likewise.
5810         (AARCH64_DWARF_SVE_P0): Likewise.
5811         (AARCH64_DWARF_SVE_Z0): Likewise.
5812
5813 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5814
5815         * common/common-regcache.h (raw_compare): New function.
5816         * regcache.c (regcache::raw_compare): Likewise.
5817         * regcache.h (regcache::raw_compare): New declaration.
5818
5819 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
5820
5821         * common/common-regcache.h (reg_buffer_common): New structure.
5822         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
5823         (reg_buffer::raw_supply): Likewise.
5824         (reg_buffer::raw_supply_integer): Likewise.
5825         (reg_buffer::raw_supply_zeroed): Likewise.
5826         (reg_buffer::raw_collect): Likewise.
5827         (reg_buffer::raw_collect_integer): Likewise.
5828         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
5829         (reg_buffer::raw_supply): Likewise.
5830         (reg_buffer::raw_supply_integer): Likewise.
5831         (reg_buffer::raw_supply_zeroed): Likewise.
5832         (reg_buffer::raw_collect): Likewise.
5833         (reg_buffer::raw_collect_integer): Likewise.
5834
5835 2018-06-10  Tom Tromey  <tom@tromey.com>
5836
5837         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
5838         (class remote_state) <stop_reply_queue>: Now std::vector.
5839         (remote_state::~remote_state)
5840         (remote_target::stop_reply_queue_length): Update.
5841         (struct queue_iter_param, remove_child_of_pending_fork)
5842         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
5843         (check_pending_event_prevents_wildcard_vcont_callback)
5844         (remove_stop_reply_for_inferior)
5845         (remove_stop_reply_of_remote_state)
5846         (remote_notif_remove_once_on_match)
5847         (stop_reply_match_ptid_and_ws)
5848         (remote_kill_child_of_pending_fork): Remove.
5849         (remote_target::remove_new_fork_children)
5850         (remote_target::check_pending_events_prevent_wildcard_vcont)
5851         (remote_target::discard_pending_stop_replies)
5852         (remote_target::discard_pending_stop_replies_in_queue)
5853         (remote_target::remote_notif_remove_queued_reply)
5854         (remote_target::queued_stop_reply)
5855         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
5856         (remote_target::wait, remote_target::kill_new_fork_children)
5857         (remote_target::async): Update.
5858
5859 2018-06-10  Tom Tromey  <tom@tromey.com>
5860
5861         * record-full.c (record_full_arch_list_cleanups): Remove.
5862         (record_full_message): Use try/catch.
5863         (record_full_wait_cleanups): Remove.
5864         (record_full_wait_1): Use try/catch.
5865         (record_full_restore): Likewise.
5866
5867 2018-06-10  Tom Tromey  <tom@tromey.com>
5868
5869         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
5870         declare VEC.  Add constructor.
5871         <in_target_beneath>: Now bool.
5872         (record_full_breakpoints): Now a std::vector, static.
5873         (record_full_sync_record_breakpoints)
5874         (record_full_init_record_breakpoints)
5875         (record_full_target::insert_breakpoint)
5876         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
5877
5878 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
5879
5880         * dwarf2read.c (process_cu_includes): Remove struct keyword.
5881         * serial.c (serial_interface_lookup): Remove struct keyword.
5882
5883 2018-06-10  Tom Tromey  <tom@tromey.com>
5884
5885         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
5886         method.
5887         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
5888         a method.
5889         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
5890         method.
5891         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
5892         "beneath" as a method.
5893         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
5894         Use "beneath" as a method.
5895
5896 2018-06-10  Tom Tromey  <tom@tromey.com>
5897
5898         * tracefile.c (struct trace_file_writer_deleter): New.
5899         <operator()>: Rename from trace_file_writer_xfree.
5900         (trace_file_writer_up): New typedef.
5901         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
5902
5903 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5904
5905         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
5906         <m_registers, m_register_status>: Change type to
5907         std::unique_ptr.
5908         * regcache.c (reg_buffer::reg_buffer): Use new instead of
5909         XCNEWVEC.
5910
5911 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
5912
5913         * common/common-regcache.h (enum register_status): Add
5914         underlying type "signed char".
5915         * regcache.h (reg_buffer) <m_register_status>: Change type to
5916         register_status *.
5917         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
5918         register_status instead of signed char.
5919         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
5920         (reg_buffer::get_register_status): Remove cast.
5921         (readable_regcache::raw_read): Remove cast.
5922         (readable_regcache::cooked_read): Remove cast.
5923
5924 2018-06-09  Tom Tromey  <tom@tromey.com>
5925
5926         * source.c (reverse_search_command, forward_search_command): Use
5927         scoped_fd.
5928
5929 2018-06-09  Tom Tromey  <tom@tromey.com>
5930
5931         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
5932         (serial_ops_list): Now static, std::vector.
5933         (serial_interface_lookup, serial_add_interface): Update.
5934
5935 2018-06-09  Tom Tromey  <tom@tromey.com>
5936
5937         * dwarf2read.c (process_cu_includes): Update.
5938         (process_full_comp_unit): Update.
5939         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
5940         std::vector.
5941
5942 2018-06-08  Paul Koning  <paul_koning@dell.com>
5943
5944         PR gdb/23252
5945
5946         * python/python.c (do_start_initialization):
5947         Avoid call to internal Python API.
5948         (init__gdb_module): New function.
5949
5950 2018-06-08  Gary Benson <gbenson@redhat.com>
5951
5952         * linux-thread-db.c (valprint.h): New include.
5953         (struct check_thread_db_info): New structure.
5954         (check_thread_db_on_load, tdb_testinfo): New static globals.
5955         (check_thread_db, check_thread_db_callback): New functions.
5956         (try_thread_db_load_1): Run integrity checks if requested.
5957         (maintenance_check_libthread_db): New function.
5958         (_initialize_thread_db): Register "maint check libthread-db"
5959         and "maint set/show check-libthread-db".
5960         * NEWS: Mention the above new commands.
5961
5962 2018-06-08  Tom Tromey  <tom@tromey.com>
5963
5964         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
5965         now a method.
5966
5967 2018-06-08  Tom Tromey  <tom@tromey.com>
5968
5969         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
5970
5971 2018-06-08  Tom Tromey  <tom@tromey.com>
5972
5973         * common/btrace-common.h (struct btrace_data): Add constructor,
5974         destructor, move assignment operator.
5975         <empty, clear, fini>: New methods.
5976         <format>: Initialize.
5977         (btrace_data_init, btrace_data_fini, btrace_data_clear)
5978         (btrace_data_empty): Don't declare.
5979         * common/btrace-common.c (btrace_data_init): Remove.
5980         (btrace_data::fini): Rename from btrace_data_fini.
5981         (btrace_data::empty): Rename from btrace_data_empty.
5982         (btrace_data::clear): Rename from btrace_data_clear.  Return
5983         bool.
5984         * btrace.h (make_cleanup_btrace_data): Don't declare.
5985         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
5986         (parse_xml_btrace): Update.
5987         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
5988         (maint_btrace_clear_packet_history_cmd): Update.
5989
5990 2018-06-07  Pedro Alves  <palves@redhat.com>
5991
5992         * target.h (target_ops) <beneath>: Now a method.  All references
5993         updated.
5994         (class target_stack): New.
5995         * target.c (g_target_stack): New.
5996         (g_current_top_target): Delete.
5997         (current_top_target): Get the top target out of g_target_stack.
5998         (target_stack::push, target_stack::unpush): New.
5999         (push_target, unpush_target): Reimplement.
6000         (target_is_pushed): Reimplement in terms of g_target_stack.
6001         (target_ops::beneath, target_stack::find_beneath): New.
6002
6003 2018-06-07  Pedro Alves  <palves@redhat.com>
6004
6005         * target.h (find_target_beneath): Delete declaration.
6006         * target.c (find_target_beneath): Delete definition.
6007         * aix-thread.c: All callers of find_target_beneath adjusted to
6008         call target_ops::beneath instead.
6009         * bsd-uthread.c: Likewise.
6010         * linux-thread-db.c: Likewise.
6011         * ravenscar-thread.c: Likewise.
6012         * sol-thread.c: Likewise.
6013         * spu-multiarch.c: Likewise.
6014
6015 2018-06-07  Pedro Alves  <palves@redhat.com>
6016
6017         * target.h (target_ops) <beneath>: Now a method.  All references
6018         updated.
6019         (target_ops) <m_beneath>: New.
6020         * target.c (target_ops::beneath): New.
6021         * corelow.c: Adjust all references to target_ops::beneath.
6022         * linux-thread-db.c: Likewise.
6023         * make-target-delegates: Likewise.
6024         * record-btrace.c: Likewise.
6025         * record-full.c: Likewise.
6026         * remote.c: Likewise.
6027         * target.c: Likewise.
6028         * target-delegates.c: Regenerate.
6029
6030 2018-06-07  Pedro Alves  <palves@redhat.com>
6031
6032         * target.h (target_stack): Delete.
6033         (current_top_target): Declare function.
6034         * target.c (target_stack): Delete.
6035         (g_current_top_target): New.
6036         (current_top_target): New function.
6037         * auxv.c: Use current_top_target instead of target_stack
6038         throughout.
6039         * avr-tdep.c: Likewise.
6040         * breakpoint.c: Likewise.
6041         * corefile.c: Likewise.
6042         * elfread.c: Likewise.
6043         * eval.c: Likewise.
6044         * exceptions.c: Likewise.
6045         * frame.c: Likewise.
6046         * gdbarch-selftests.c: Likewise.
6047         * gnu-v3-abi.c: Likewise.
6048         * ia64-tdep.c: Likewise.
6049         * ia64-vms-tdep.c: Likewise.
6050         * infcall.c: Likewise.
6051         * infcmd.c: Likewise.
6052         * infrun.c: Likewise.
6053         * linespec.c: Likewise.
6054         * linux-tdep.c: Likewise.
6055         * minsyms.c: Likewise.
6056         * ppc-linux-nat.c: Likewise.
6057         * ppc-linux-tdep.c: Likewise.
6058         * procfs.c: Likewise.
6059         * regcache.c: Likewise.
6060         * remote.c: Likewise.
6061         * rs6000-tdep.c: Likewise.
6062         * s390-linux-nat.c: Likewise.
6063         * s390-tdep.c: Likewise.
6064         * solib-aix.c: Likewise.
6065         * solib-darwin.c: Likewise.
6066         * solib-dsbt.c: Likewise.
6067         * solib-spu.c: Likewise.
6068         * solib-svr4.c: Likewise.
6069         * solib-target.c: Likewise.
6070         * sparc-tdep.c: Likewise.
6071         * sparc64-tdep.c: Likewise.
6072         * spu-tdep.c: Likewise.
6073         * symfile.c: Likewise.
6074         * symtab.c: Likewise.
6075         * target-descriptions.c: Likewise.
6076         * target-memory.c: Likewise.
6077         * target.c: Likewise.
6078         * target.h: Likewise.
6079         * tracefile-tfile.c: Likewise.
6080         * tracepoint.c: Likewise.
6081         * valops.c: Likewise.
6082         * valprint.c: Likewise.
6083         * value.c: Likewise.
6084         * windows-tdep.c: Likewise.
6085         * mi/mi-main.c: Likewise.
6086
6087 2018-06-07  Tom Tromey  <tom@tromey.com>
6088
6089         * valprint.h (build_address_symbolic): Declare.
6090         * printcmd.c (print_address_symbolic): Update.
6091         (build_address_symbolic): Change "name" and "filename" to
6092         std::string.
6093         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
6094         Update.
6095         * defs.h (build_address_symbolic): Remove declaration.
6096
6097 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
6098
6099         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
6100         (aarch64_vnv_type): Add function.
6101         (aarch64_pseudo_register_name): Add V regs for SVE.
6102         (aarch64_pseudo_register_type): Likewise.
6103         (aarch64_pseudo_register_reggroup_p): Likewise.
6104         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
6105         (aarch64_pseudo_read_value): Add V regs for SVE.
6106         (aarch64_pseudo_write_2): Use V0 offset for SVE
6107         (aarch64_pseudo_write): Add V regs for SVE.
6108         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
6109
6110 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
6111
6112         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
6113         (sve_vl_from_vq): Likewise.
6114
6115 2018-06-05  Tom Tromey  <tom@tromey.com>
6116
6117         * cli/cli-cmds.c (show_version): Update.
6118         * top.c (print_gdb_version): Add "interactive" parameter.
6119         Update.
6120         * main.c (captured_main_1): Update.
6121         * top.h (print_gdb_version): Add "interactive" parameter and a
6122         comment.
6123
6124 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
6125
6126         * common/enum-flags.h: Add trailing semicolon to example in
6127         comment.
6128
6129 2018-06-05  Tom Tromey  <tom@tromey.com>
6130
6131         PR cli/12326:
6132         * NEWS: Add entry about pager.
6133         * utils.c (pagination_disabled_for_command): New global.
6134         (prompt_for_continue): Allow "c" response to prompt.
6135         (reinitialize_more_filter): Clear
6136         pagination_disabled_for_command.
6137         (fputs_maybe_filtered): Check pagination_disabled_for_command.
6138
6139 2018-06-04  Tom Tromey  <tom@tromey.com>
6140
6141         * ada-lang.h (ada_lookup_symbol_list): Update.
6142         * ada-lang.c (resolve_subexp): Update.
6143         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
6144         parameter.
6145         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
6146         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
6147         results parameter to std::vector.
6148         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
6149         Update.
6150         * ada-exp.y (block_lookup): Update.
6151         (select_possible_type_sym): Change type of syms.  Remove nsyms
6152         parameter.
6153         (write_var_or_type, write_name_assoc): Update.
6154
6155 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
6156
6157         * windows-nat.c (windows_nat_target::xfer_partial): Return
6158         TARGET_XFER_E_IO if we need to delegate to the target beneath
6159         but BENEATH is NULL.
6160
6161 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
6162
6163         * Makefile.in (config.status): Add configure.nat as a
6164         dependency.
6165
6166 2018-06-04  Tom Tromey  <tom@tromey.com>
6167
6168         * cp-name-parser.y (cpname_state): Add method declarations.
6169         (HANDLE_QUAL): Update.
6170         (cpname_state::d_grab, cpname_state::fill_comp)
6171         (cpname_state::make_operator, cpname_state::make_dtor)
6172         (cpname_state::make_builtin_type, cpname_state::make_name)
6173         (cpname_state::d_qualify, cpname_state::d_int_type)
6174         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
6175         (%union): Move earlier.
6176
6177 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6178
6179         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
6180
6181 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6182
6183         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
6184         (aarch64_pseudo_write_1): Likewise.
6185         (aarch64_pseudo_read_value): Use helper.
6186         (aarch64_pseudo_write): Likewise.
6187
6188 2018-06-04  Pedro Alves  <palves@redhat.com>
6189
6190         * darwin-nat.c (darwin_ops): Delete.
6191         (darwin_attach_pid): Use get_native_target.
6192
6193 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6194
6195         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
6196         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
6197
6198 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6199
6200         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
6201         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
6202         (aarch64_gdbarch_init): Check for SVE.
6203         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
6204
6205 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
6206
6207         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
6208         * aarch64-tdep.h (aarch64_read_description): Likewise.
6209         * arch/aarch64.c (aarch64_create_target_description): Likewise.
6210         * arch/aarch64.h (aarch64_create_target_description): Likewise.
6211         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
6212         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
6213         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
6214
6215 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
6216
6217         * value.c (value_fetch_lazy_bitfield): New.
6218         (value_fetch_lazy_memory): New.
6219         (value_fetch_lazy_register): New.
6220         (value_fetch_lazy): Factor out to smaller functions.
6221
6222 2018-06-01  Tom Tromey  <tom@tromey.com>
6223
6224         * cp-name-parser.y (backslashable, represented): Now const.
6225
6226 2018-06-01  Tom Tromey  <tom@tromey.com>
6227
6228         * cp-name-parser.y: Include parser-defs.h.
6229         (parser_fprintf): Remove declaration.
6230
6231 2018-06-01  Tom Tromey  <tom@tromey.com>
6232
6233         * cp-name-parser.y: Use %pure-parser, %lex-param, and
6234         %parse-param.
6235         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
6236         (global_result): Remove globals.
6237         (struct cpname_state): New.
6238         (yyparse): Don't declare.
6239         (yylex, yyerror): Move declarations after %union.
6240         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
6241         (make_name): Add state parameter.
6242         Update all callers.
6243         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
6244         parameter.
6245         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
6246         Update.
6247         (yylex): Add lvalp, state parameters.
6248         (yyerror): Add state parameter.
6249         (cp_demangled_name_to_comp): Update.
6250
6251 2018-06-01  Tom Tromey  <tom@tromey.com>
6252
6253         * cp-name-parser.y (parser_fprintf): Declare.
6254         (GDB_YY_REMAP_PREFIX): Define.
6255         Include yy-remap.h.  Don't redefine yy* identifiers.
6256
6257 2018-06-01  Tom Tromey  <tom@tromey.com>
6258
6259         * python/py-type.c (typy_legacy_template_argument): Update.
6260         * cp-support.h (cp_demangled_name_to_comp): Update.
6261         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
6262         parameter to be a "std::string *".
6263         (main): Update.
6264
6265 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
6266
6267         * ada-lex.l: Include "diagnostics.h" instead of
6268         "common/diagnostics.h".
6269         * unittests/environ-selftests.c: Likewise.
6270         * common/diagnostics.h: Moved to ../include.
6271
6272 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
6273
6274         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
6275         to language_mode_manual while calling breakpoint_re_set_one.
6276
6277 2018-06-01  Tom Tromey  <tom@tromey.com>
6278
6279         * valops.c (value_cast_structs, destructor_name_p): Update.
6280         * symtab.c (gdb_mangle_name): Update.
6281         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
6282         Update.
6283         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
6284         (pascal_object_print_value_fields, pascal_object_print_value):
6285         Update.
6286         * p-typeprint.c (pascal_type_print_derivation_info): Update.
6287         * linespec.c (find_methods): Update.
6288         * gdbtypes.h (type_name_no_tag): Remove.
6289         (type_name_or_error): Rename from type_name_no_tag_or_error.
6290         * gdbtypes.c (type_name_no_tag): Remove.
6291         (type_name_or_error): Rename from type_name_no_tag_or_error.
6292         (lookup_struct_elt_type, check_typedef): Update.
6293         * expprint.c (print_subexp_standard): Update.
6294         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
6295         * d-namespace.c (d_lookup_nested_symbol): Update.
6296         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
6297         (cp_print_class_member): Update.
6298         * cp-namespace.c (cp_lookup_nested_symbol): Update.
6299         * completer.c (add_struct_fields): Update.
6300         * c-typeprint.c (cp_type_print_derivation_info)
6301         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
6302         Update.
6303         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
6304         (ada_prefer_type, ada_is_exception_sym): Update.
6305
6306 2018-06-01  Tom Tromey  <tom@tromey.com>
6307
6308         * valops.c (enum_constant_from_type, value_namespace_elt)
6309         (value_maybe_namespace_elt): Update.
6310         * valarith.c (find_size_for_pointer_math): Update.
6311         * target-descriptions.c (make_gdb_type): Update.
6312         * symmisc.c (print_symbol): Update.
6313         * stabsread.c (define_symbol, read_type)
6314         (complain_about_struct_wipeout, add_undefined_type)
6315         (cleanup_undefined_types_1): Update.
6316         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
6317         (rust_range_type_p, val_print_struct, rust_print_struct_def)
6318         (rust_internal_print_type, rust_composite_type)
6319         (rust_evaluate_funcall, rust_evaluate_subexp)
6320         (rust_inclusive_range_type_p): Update.
6321         * python/py-type.c (typy_get_tag): Update.
6322         * p-typeprint.c (pascal_type_print_base): Update.
6323         * mdebugread.c (parse_symbol, parse_type): Update.
6324         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
6325         Update.
6326         * guile/scm-type.c (gdbscm_type_tag): Update.
6327         * go-lang.c (sixg_string_p): Update.
6328         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
6329         Update.
6330         * gdbtypes.h (struct main_type) <tag_name>: Remove.
6331         (TYPE_TAG_NAME): Remove.
6332         * gdbtypes.c (type_name_no_tag): Simplify.
6333         (check_typedef, check_types_equal, recursive_dump_type)
6334         (copy_type_recursive, arch_composite_type): Update.
6335         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
6336         in summary mode when needed.
6337         * eval.c (evaluate_funcall): Update.
6338         * dwarf2read.c (fixup_go_packaging, read_structure_type)
6339         (process_structure_scope, read_enumeration_type)
6340         (read_namespace_type, read_module_type, determine_prefix): Update.
6341         * cp-support.c (inspect_type): Update.
6342         * coffread.c (process_coff_symbol, decode_base_type): Update.
6343         * c-varobj.c (c_is_path_expr_parent): Update.
6344         * c-typeprint.c (c_type_print_base_struct_union): Update.
6345         (c_type_print_base_1): Update.  Print struct/class/union/enum in
6346         summary when using C language.
6347         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
6348         (gen_maybe_namespace_elt): Update.
6349         * ada-lang.c (ada_type_name): Simplify.
6350         (empty_record, ada_template_to_fixed_record_type_1)
6351         (template_to_static_fixed_type)
6352         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
6353
6354 2018-06-01  Tom Tromey  <tom@tromey.com>
6355
6356         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
6357         c_print_type.
6358         * c-typeprint.c (c_print_type_1): Add "language" parameter.
6359         (c_print_type): Update.
6360         (c_print_type): New overload.
6361         (c_type_print_varspec_prefix, c_type_print_args)
6362         (c_type_print_varspec_suffix, c_print_type_no_offsets)
6363         (c_type_print_base_struct_union, c_type_print_base_1)
6364         (cp_type_print_method_args): Add "language" parameter.
6365         (c_type_print_base): Update.
6366         * c-lang.h (c_print_type): Add new overload.
6367
6368 2018-06-01  Tom Tromey  <tom@tromey.com>
6369
6370         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
6371         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
6372
6373 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
6374
6375         * aarch64-tdep.c (aarch64_sve_register_names): New const
6376         var.
6377         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
6378         (AARCH64_SVE_Z_REGS_NUM): New define.
6379         (AARCH64_SVE_P_REGS_NUM): Likewise.
6380         (AARCH64_SVE_NUM_REGS): Likewise.
6381
6382 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
6383
6384         * nat/linux-ptrace.h [__alpha__]
6385         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
6386         definitions.
6387
6388 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
6389
6390         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
6391         the endianness selected.
6392         * NEWS: Document `set endian auto' mode operation update.
6393
6394 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6395
6396         * Makefile.in: Add new header.
6397         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
6398         (sve_vl_from_vg): Likewise.
6399         (sve_vq_from_vl): Likewise.
6400         (sve_vl_from_vq): Likewise.
6401         (sve_vq_from_vg): Likewise.
6402         (sve_vg_from_vq): Likewise.
6403         * configure.nat: Add new c file.
6404         * nat/aarch64-sve-linux-ptrace.c: New file.
6405         * nat/aarch64-sve-linux-ptrace.h: New file.
6406
6407 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
6408
6409         * aarch64-linux-nat.c (aarch64_linux_read_description):
6410         Add parmeter zero.
6411         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
6412         Likewise.
6413         * aarch64-tdep.c (tdesc_aarch64_list): Add.
6414         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
6415         (aarch64_gdbarch_init): Add parmeter zero.
6416         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
6417         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
6418         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
6419         parmeter.
6420         * doc/gdb.texinfo: Describe SVE feature
6421         * features/aarch64-sve.c: New file.
6422
6423 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
6424
6425         PR gdb/23210
6426         * gdbarch.sh (significant_addr_bit): Default to zero when
6427         not set by target architecture.
6428         * gdbarch.c: Re-generated.
6429         * utils.c (address_significant): Update.
6430
6431 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
6432
6433         * stack.c (func_command): Remove trailing newline in call to error.
6434
6435 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6436
6437         * regcache.h (regcache_raw_collect): Remove, update callers to
6438         use regcache::raw_collect.
6439         * regcache.c (regcache_raw_collect): Remove.
6440
6441 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6442
6443         * regcache.h (regcache_raw_supply): Remove, update callers to
6444         use detached_regcache::raw_supply.
6445         * regcache.c (regcache_raw_supply): Remove.
6446
6447 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6448
6449         * regcache.h (regcache_cooked_write_part): Remove, update
6450         callers to use regcache::cooked_write_part.
6451         * regcache.c (regcache_cooked_write_part): Remove.
6452
6453 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6454
6455         * regcache.h (regcache_cooked_read_part): Remove, update callers
6456         to use readable_regcache::cooked_read_part.
6457         * regcache.c (regcache_cooked_read_part): Remove.
6458
6459 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6460
6461         * regcache.h (regcache_cooked_read_value): Remove, update
6462         callers to use readable_regcache::cooked_read_value.
6463         * regcache.c (regcache_cooked_read_value): Remove.
6464
6465 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6466
6467         * regcache.h (regcache_cooked_write): Remove, update callers to
6468         use regcache::cooked_write.
6469         * regcache.c (regcache_cooked_write): Remove.
6470
6471 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6472
6473         * regcache.h (regcache_invalidate): Remove, update callers to
6474         use detached_regcache::invalidate instead.
6475         * regcache.c (regcache_invalidate): Remove.
6476
6477 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6478
6479         * regcache.h (regcache_raw_write_part): Remove, update callers
6480         to use regcache::raw_write_part instead.
6481         * regcache.c (regcache_raw_write_part): Remove.
6482
6483 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6484
6485         * regcache.h (regcache_raw_read_part): Remove, update callers to
6486         use readable_regcache::raw_read_part instead.
6487         * regcache.c (regcache_raw_read_part): Remove.
6488
6489 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6490
6491         * regcache.h (regcache_cooked_read): Remove, update callers to
6492         use readable_regcache::cooked_read instead.
6493         * regcache.c (regcache_cooked_read): Remove.
6494
6495 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6496
6497         * regcache.h (regcache_raw_write): Remove, update callers to use
6498         regcache::raw_write instead.
6499         * regcache.c (regcache_raw_write): Remove.
6500
6501 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6502
6503         * regcache.h (regcache_raw_read): Remove, update callers to use
6504         readable_regcache::raw_read instead.
6505         * regcache.c (regcache_raw_read): Remove.
6506
6507 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6508
6509         * regcache.h (regcache_raw_update): Remove, update callers to
6510         use readable_regcache::raw_update instead.
6511         * regcache.c (regcache_raw_update): Remove.
6512
6513 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6514
6515         * regcache.h (regcache_register_status): Remove, update callers
6516         to use reg_buffer::get_register_status directly instead.
6517         * regcache.c (regcache_register_status): Remove.
6518
6519 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6520
6521         * regcache.h (regcache_get_ptid): Remove, update all callers to
6522         call regcache::ptid instead.
6523         * regcache.c (regcache_get_ptid): Remove.
6524
6525 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
6526
6527         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
6528
6529 2018-05-30  Pedro Alves  <palves@redhat.com>
6530
6531         * common/common-exceptions.h (exception_rethrow): Use
6532         ATTRIBUTE_NORETURN.
6533
6534 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
6535
6536         * breakpoint.c (print_solib_event, check_status_catch_solib):
6537         Remove struct keyword in range-based for loops.
6538         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
6539         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
6540         Likewise.
6541         * linespec.c (find_superclass_methods, search_minsyms_for_name):
6542         Likewise.
6543         * symfile.c (addr_info_make_relative): Likewise.
6544         * thread.c (value_in_thread_stack_temporaries): Likewise.
6545
6546 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
6547
6548         PR gdb/16841
6549         * valops.c (value_struct_elt_for_reference): Call check_typedef on
6550         aggregate type to get its real type before accessing it.
6551
6552 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
6553
6554         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
6555         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
6556         * coff-pe-read.c (add_pe_forwarded_sym): Replace
6557         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
6558         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
6559         * jit.c (jit_breakpoint_re_set_internal): Likewise.
6560         * printcmd.c (info_address_command): Likewise.
6561
6562 2018-05-29  Tom Tromey  <tom@tromey.com>
6563
6564         * windows-nat.c (handle_exception): Update fall-through comment.
6565
6566 2018-05-29  Tom Tromey  <tom@tromey.com>
6567
6568         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
6569         (struct program_space) <added_solibs>: Now a std::vector.
6570         * breakpoint.c (print_solib_event): Update.
6571         (check_status_catch_solib): Update.
6572         * progspace.c (clear_program_space_solib_cache): Update.
6573         * solib.c (update_solib_list): Update.
6574
6575 2018-05-29  Tom Tromey  <tom@tromey.com>
6576
6577         * python/py-type.c (typy_richcompare): Update.
6578         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
6579         * gdbtypes.h (types_deeply_equal): Return bool.
6580         (types_equal): Likewise.
6581         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
6582         declare VEC.
6583         (check_types_equal): Change worklist to std::vector.  Return
6584         bool.
6585         (struct type_equality_entry): Add constructor.
6586         (compare_maybe_null_strings): Return bool.
6587         (check_types_worklist): Return bool.  Change worklist to
6588         std::vector.
6589         (types_deeply_equal): Use std::vector.
6590         (types_equal): Return bool.
6591         (compare_maybe_null_strings): Simplify.
6592
6593 2018-05-29  Tom Tromey  <tom@tromey.com>
6594
6595         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
6596
6597 2018-05-29  Tom Tromey  <tom@tromey.com>
6598
6599         * objc-lang.h: Don't include cp-support.h.
6600         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
6601         declare VEC.
6602
6603 2018-05-27  Tom Tromey  <tom@tromey.com>
6604
6605         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
6606
6607 2018-05-25  Tom Tromey  <tom@tromey.com>
6608
6609         * value.c (value::location): Initialize.
6610
6611 2018-05-25  Tom Tromey  <tom@tromey.com>
6612
6613         * dbxread.c (init_bincl_list): Remove.
6614         (bincl_list): Now a std::vector.
6615         (bincls_allocated, next_bincl): Remove.
6616         (free_bincl_list, do_free_bincl_list_cleanup)
6617         (make_cleanup_free_bincl_list): Remove.
6618         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
6619         unique_xmalloc_ptr.
6620         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
6621         (struct header_file_location): Add constructor.
6622         (add_bincl_to_list): Remove.
6623
6624 2018-05-25  Tom Tromey  <tom@tromey.com>
6625
6626         * tui/tui.c (tui_enable): Update.
6627         * mi/mi-interp.c (mi_interp::init): Update.
6628         * interps.h (class interp) <name>: New method.
6629         <m_name>: Rename from name.
6630         (~scoped_restore_interp): Update.
6631         * interps.c (interp::interp): Update.
6632         (interp_add, interp_set, interp_lookup_existing)
6633         (current_interp_named_p): Update.
6634
6635 2018-05-25  Tom Tromey  <tom@tromey.com>
6636
6637         * interps.c (interp_name): Remove.
6638         * mi/mi-interp.c (mi_interp::init): Update.
6639         * interps.h (interp_name): Remove.
6640         (~scoped_restore_interp): Update.
6641         * tui/tui.c (tui_enable): Update.
6642
6643 2018-05-25  Tom Tromey  <tom@tromey.com>
6644
6645         * utils.c (fputs_maybe_filtered): Update.
6646         * linespec.c (decode_line_full): Update.
6647         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
6648         (mi_print_breakpoint_for_event, mi_solib_loaded)
6649         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
6650         (mi_user_selected_context_changed): Update.
6651         * mi/mi-main.c (mi_execute_command): Update.
6652         * cli/cli-script.c (execute_control_command): Update.
6653         * python/python.c (execute_gdb_command): Update.
6654         * solib.c (info_sharedlibrary_command): Update.
6655         * interps.c (interp_ui_out): Remove.
6656         * interps.h (interp_ui_out): Remove.
6657
6658 2018-05-25  Tom Tromey  <tom@tromey.com>
6659
6660         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
6661         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
6662         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
6663
6664 2018-05-25  Tom Tromey  <tom@tromey.com>
6665
6666         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
6667         * interps.c (interp_exec): Use scoped_restore.
6668
6669 2018-05-25  Tom Tromey  <tom@tromey.com>
6670
6671         * remote.c (remote_target::remote_file_get): Use
6672         gdb::byte_vector.
6673         (remote_target::remote_file_put): Likewise.
6674
6675 2018-05-25  Tom Tromey  <tom@tromey.com>
6676
6677         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
6678         a std::string.
6679         (get_pe_section_index, add_pe_exported_sym): Update.
6680         (read_pe_exported_syms): Use gdb::def_vector.
6681
6682 2018-05-25  Tom Tromey  <tom@tromey.com>
6683
6684         * frame.c (remove_prev_frame): Remove.
6685         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
6686
6687 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
6688
6689         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
6690         Remove prototypes.
6691         * mips-linux-nat.c (supply_fpregset): Always call
6692         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
6693         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
6694         `mips_fill_fpregset'.
6695         * mips-linux-tdep.c (mips_supply_fpregset)
6696         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
6697         (mips_fill_fpregset_wrapper): Remove functions.
6698         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
6699         (mips_linux_fpregset): Remove variable.
6700         (mips_linux_iterate_over_regset_sections): Use
6701         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
6702         (mips_linux_o32_sigframe_init): Remove comment.
6703
6704 2018-05-25  Pedro Alves  <palves@redhat.com>
6705
6706         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
6707         (struct readahead_cache, struct packet_reg, struct
6708         remote_arch_state, class remote_state): Move higher up in the
6709         file.
6710         (remote_target::m_remote_state): Now an object instead of a pointer.
6711         (remote_target::get_remote_state): Adjust.
6712
6713 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6714
6715         * stack.c (select_and_print_frame): Delete.
6716         (struct function_bounds): Move struct within function.
6717         (func_command): Most content moved into new function
6718         find_frame_for_function, use new function, print result, add
6719         function comment.
6720         (find_frame_for_function): New function, now returns a result.
6721
6722 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6723
6724         * stack.c (iterate_over_block_arg_vars): Fix comment.
6725         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
6726
6727 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
6728
6729         PR gdb/23203
6730         * frame.c
6731         (scoped_restore_selected_frame::scoped_restore_selected_frame):
6732         Define.
6733         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
6734         Define.
6735         * frame.h (class scoped_restore_selected_frame): New class.
6736         * stack.c (print_frame_local_vars): Remove catching and rethrowing
6737         of any exception, use scoped_restore_selected_frame to restore the
6738         frame instead.
6739
6740 2018-05-24  Pedro Alves  <palves@redhat.com>
6741
6742         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
6743         override.
6744
6745 2018-05-23  Tom Tromey  <tom@tromey.com>
6746
6747         * complaints.c (struct complaints): Remove.
6748         (symfile_complaint_book): Remove.
6749         (series): New global.
6750         (complaint_internal): Update.
6751         (clear_complaints): Update.
6752
6753 2018-05-23  Tom Tromey  <tom@tromey.com>
6754
6755         * complaints.c (counters): New global.
6756         (struct complain): Remove.
6757         (struct complaints) <root>: Remove.
6758         (complaint_sentinel): Remove.
6759         (symfile_complaint_book): Update.
6760         (find_complaint) Remove.
6761         (complaint_internal, clear_complaints): Update.
6762
6763 2018-05-23  Tom Tromey  <tom@tromey.com>
6764
6765         * complaints.c (struct complain) <file, line>: Remove.
6766         (find_complaint): Remove file, line parameters.
6767         (complaint_internal): Update.
6768
6769 2018-05-23  Tom Tromey  <tom@tromey.com>
6770
6771         * complaints.c (vcomplaint): Remove.
6772         (complaint_internal) Merge in contents of vcomplaint.
6773
6774 2018-05-23  Tom Tromey  <tom@tromey.com>
6775
6776         * complaints.c (struct complaints) <explanation>: Remove.
6777         (symfile_explanations): Remove.
6778         (symfile_complaint_book): Update.
6779         (vcomplaint): Update.
6780         (struct explanation): Remove.
6781
6782 2018-05-23  Tom Tromey  <tom@tromey.com>
6783
6784         * complaints.c (symfile_complaints): Remove.
6785         (complaint_internal): Remove "complaints" parameter.
6786         (clear_complaints, vcomplaint): Remove "c" parameter.
6787         (get_complaints): Remove.
6788         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
6789         (dwarf2_debug_line_missing_file_complaint)
6790         (dwarf2_debug_line_missing_end_sequence_complaint)
6791         (dwarf2_complex_location_expr_complaint)
6792         (dwarf2_const_value_length_mismatch_complaint)
6793         (dwarf2_section_buffer_overflow_complaint)
6794         (dwarf2_macro_malformed_definition_complaint)
6795         (dwarf2_invalid_attrib_class_complaint)
6796         (create_addrmap_from_index, dw2_symtab_iter_next)
6797         (dw2_expand_marked_cus)
6798         (dw2_debug_names_iterator::find_vec_in_debug_names)
6799         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
6800         (create_debug_type_hash_table, init_cutu_and_read_dies)
6801         (partial_die_parent_scope, add_partial_enumeration)
6802         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
6803         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
6804         (read_import_statement, read_file_scope, create_dwo_cu_reader)
6805         (create_cus_hash_table, create_dwp_hash_table)
6806         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
6807         (dwarf2_rnglists_process, dwarf2_ranges_process)
6808         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
6809         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
6810         (handle_struct_member_die, process_structure_scope)
6811         (read_array_type, read_common_block, read_module_type)
6812         (read_tag_pointer_type, read_typedef, read_base_type)
6813         (read_subrange_type, load_partial_dies, partial_die_info::read)
6814         (partial_die_info::read, partial_die_info::read)
6815         (partial_die_info::read, read_checked_initial_length_and_offset)
6816         (dwarf2_string_attr, read_formatted_entries)
6817         (dwarf_decode_line_header)
6818         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
6819         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
6820         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
6821         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6822         (get_signatured_type, get_DW_AT_signature_type)
6823         (decode_locdesc, file_file_name, consume_improper_spaces)
6824         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
6825         (dwarf_decode_macro_bytes, dwarf_decode_macros)
6826         (dwarf2_symbol_mark_computed, set_die_type)
6827         (read_attribute_value): Update.
6828         * stap-probe.c (handle_stap_probe, get_stap_base_address):
6829         Update.
6830         * dbxread.c (unknown_symtype_complaint)
6831         (lbrac_mismatch_complaint, repeated_header_complaint)
6832         (set_namestring, function_outside_compilation_unit_complaint)
6833         (read_dbx_symtab, process_one_symbol): Update.
6834         * gdbtypes.c (stub_noname_complaint): Update.
6835         * windows-nat.c (handle_unload_dll): Update.
6836         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
6837         (decode_base_type): Update.
6838         * xcoffread.c (bf_notfound_complaint, ef_complaint)
6839         (eb_complaint, record_include_begin, record_include_end)
6840         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
6841         (process_xcoff_symbol, read_symbol)
6842         (function_outside_compilation_unit_complaint)
6843         (scan_xcoff_symtab): Update.
6844         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
6845         * buildsym.c (finish_block_internal, make_blockvector)
6846         (end_symtab_get_static_block, augment_type_symtab): Update.
6847         * dtrace-probe.c (dtrace_process_dof)
6848         (dtrace_static_probe_ops::get_probes): Update.
6849         * complaints.h (struct complaint): Don't declare.
6850         (symfile_complaints): Remove.
6851         (complaint_internal): Remove "complaints" parameter.
6852         (complaint): Likewise.
6853         (clear_complaints): Likewise.
6854         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6855         (reread_symbols): Update.
6856         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
6857         (dwarf2_frame_cache, decode_frame_entry): Update.
6858         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
6859         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6860         (info_selectors_command): Update.
6861         * macrotab.c (macro_include, check_for_redefinition)
6862         (macro_undef): Update.
6863         * objfiles.c (filter_overlapping_sections): Update.
6864         * stabsread.c (invalid_cpp_abbrev_complaint)
6865         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
6866         (define_symbol, error_type, read_type, rs6000_builtin_type)
6867         (stabs_method_name_from_physname, read_member_functions)
6868         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
6869         (attach_fields_to_type, complain_about_struct_wipeout)
6870         (read_range_type, read_args, common_block_start)
6871         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
6872         Update.
6873         * mdebugread.c (index_complaint, unknown_ext_complaint)
6874         (basic_type_complaint, bad_tag_guess_complaint)
6875         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
6876         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
6877         (parse_procedure, parse_lines)
6878         (function_outside_compilation_unit_complaint)
6879         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
6880         (bad_tag_guess_complaint, reg_value_complaint): Update.
6881         * cp-support.c (demangled_name_complaint): Update.
6882         * macroscope.c (sal_macro_scope): Update.
6883         * dwarf-index-write.c (class debug_names): Update.
6884
6885 2018-05-23  Tom Tromey  <tom@tromey.com>
6886
6887         * complaints.c (clear_complaints): Remove "noisy" parameter.
6888         * complaints.h (clear_complaints): Update.
6889         * symfile.c (syms_from_objfile_1, finish_new_objfile)
6890         (reread_symbols): Update.
6891
6892 2018-05-23  Tom Tromey  <tom@tromey.com>
6893
6894         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
6895         SUBSEQUENT_MESSAGE.
6896         (vcomplaint, clear_complaints): Update.
6897         (symfile_explanations): Remove some messages.
6898
6899 2018-05-23  Tom Tromey  <tom@tromey.com>
6900
6901         * complaints.c (internal_complaint): Remove.
6902         * complaints.h (internal_complaint): Remove.
6903
6904 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
6905
6906         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
6907
6908 2018-05-22  Pedro Alves  <palves@redhat.com>
6909
6910         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
6911         (remote_fileio_badfd, remote_fileio_return_errno)
6912         (remote_fileio_return_success, remote_fileio_func_open)
6913         (remote_fileio_func_open, remote_fileio_func_close)
6914         (remote_fileio_func_read, remote_fileio_func_write)
6915         (remote_fileio_func_lseek, remote_fileio_func_rename)
6916         (remote_fileio_func_unlink, remote_fileio_func_stat)
6917         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
6918         (remote_fileio_func_isatty, remote_fileio_func_system): Add
6919         remote_target parameter.
6920         (remote_fio_func_map) <func>: Add remote_target parameter.
6921         (do_remote_fileio_request, remote_fileio_request):
6922         * remote-fileio.h (remote_fileio_request):
6923         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
6924         remote_target parameter.
6925         (remote_notif_process, handle_notification): Adjust to pass down
6926         the remote.
6927         (remote_notif_state_allocate): Add remote_target parameter.  Save
6928         it.
6929         * remote-notif.h (struct remote_target): Forward declare.
6930         (struct notif_client) <parse, ack, can_get_pending_events>: Add
6931         remote_target parameter.
6932         (struct remote_notif_state) <remote>: New field.
6933         (remote_notif_ack, remote_notif_parse): Add remote_target
6934         parameter.
6935         (remote_notif_state_allocate, remote_notif_state_allocate): Add
6936         remote_target parameter.
6937         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
6938         (threads_listing_context, rmt_thread_action, protocol_feature)
6939         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
6940         (packet_result, struct threads_listing_context, remote_state):
6941         Move definitions and declarations higher up.
6942         (remote_target) <~remote_target>: Declare.
6943         (remote_download_command_source, remote_file_put, remote_file_get)
6944         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
6945         (remote_hostio_pread_vFile, remote_hostio_send_command)
6946         (remote_hostio_set_filesystem, remote_hostio_open)
6947         (remote_hostio_close, remote_hostio_unlink, remote_state)
6948         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
6949         (get_memory_write_packet_size, get_memory_read_packet_size)
6950         (append_pending_thread_resumptions, remote_detach_1)
6951         (append_resumption, remote_resume_with_vcont)
6952         (add_current_inferior_and_thread, wait_ns, wait_as)
6953         (process_stop_reply, remote_notice_new_inferior)
6954         (process_initial_stop_replies, remote_add_thread)
6955         (btrace_sync_conf, remote_btrace_maybe_reopen)
6956         (remove_new_fork_children, kill_new_fork_children)
6957         (discard_pending_stop_replies, stop_reply_queue_length)
6958         (check_pending_events_prevent_wildcard_vcont)
6959         (discard_pending_stop_replies_in_queue, stop_reply)
6960         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
6961         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
6962         (remote_interrupt_as, remote_interrupt_ns)
6963         (remote_get_noisy_reply, remote_query_attached)
6964         (remote_add_inferior, remote_current_thread, get_current_thread)
6965         (set_thread, set_general_thread, set_continue_thread)
6966         (set_general_process, write_ptid)
6967         (remote_unpack_thread_info_response, remote_get_threadinfo)
6968         (parse_threadlist_response, remote_get_threadlist)
6969         (remote_threadlist_iterator, remote_get_threads_with_ql)
6970         (remote_get_threads_with_qxfer)
6971         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
6972         (get_offsets, remote_check_symbols, remote_supported_packet)
6973         (remote_query_supported, remote_packet_size)
6974         (remote_serial_quit_handler, remote_detach_pid)
6975         (remote_vcont_probe, remote_resume_with_hc)
6976         (send_interrupt_sequence, interrupt_query)
6977         (remote_notif_get_pending_events, fetch_register_using_p)
6978         (send_g_packet, process_g_packet, fetch_registers_using_g)
6979         (store_register_using_P, store_registers_using_G)
6980         (set_remote_traceframe, check_binary_download)
6981         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
6982         (remote_xfer_live_readonly_partial, remote_read_bytes)
6983         (remote_send_printf, remote_flash_write, readchar)
6984         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
6985         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
6986         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
6987         (extended_remote_disable_randomization, extended_remote_run)
6988         (send_environment_packet, extended_remote_environment_support)
6989         (extended_remote_set_inferior_cwd, remote_write_qxfer)
6990         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
6991         (packet_command): Now methods of ...
6992         (remote_target): ... this class.
6993         (m_remote_state) <remote_target>: New field.
6994         (struct remote_state) <stop_reply_queue,
6995         remote_async_inferior_event_token, wait_forever_enabled_p>: New
6996         fields.
6997         (remote_state::remote_state): Allocate stop_reply_queue.
6998         (remote_state): Delete global.
6999         (get_remote_state_raw): Delete.
7000         (remote_target::get_remote_state): Allocate m_remote_state on
7001         demand.
7002         (get_current_remote_target): New.
7003         (remote_ops, extended_remote_ops): Delete.
7004         (wait_forever_enabled_p, remote_async_inferior_event_token):
7005         Delete, moved to struct remote_state.
7006         (remote_target::close): Delete self.  Destruction bits split to
7007         ...
7008         (remote_target::~remote_target): ... this.
7009         (show_memory_packet_size): Adjust to use
7010         get_current_remote_target.
7011         (struct protocol_feature) <func>: Add remote_target parameter.
7012         All callers adjusted.
7013         (curr_quit_handler_target): New.
7014         (remote_serial_quit_handler): Reimplement.
7015         (remote_target::open_1): Adjust to use get_current_remote_target.
7016         Heap-allocate remote_target/extended_remote_target instances.
7017         (vcont_builder::vcont_builder): Add remote_target parameter, and
7018         save it in m_remote.  All callers adjusted.
7019         (vcont_builder::m_remote): New field.
7020         (vcont_builder::restart, vcont_builder::flush)
7021         (vcont_builder::push_action): Use it.
7022         (remote_target::commit_resume): Use it.
7023         (struct queue_iter_param) <remote>: New field.
7024         (remote_target::remove_new_fork_children): Fill in 'remote' field.
7025         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7026         (check_pending_event_prevents_wildcard_vcont_callback)
7027         (remote_target::check_pending_events_prevent_wildcard_vcont)
7028         (remote_target::discard_pending_stop_replies)
7029         (remote_target::discard_pending_stop_replies_in_queue)
7030         (remote_target::remote_notif_remove_queued_reply): Fill in
7031         'remote' field.
7032         (remote_notif_get_pending_events): New.
7033         (remote_target::readchar, remote_target::remote_serial_write):
7034         Save/restore curr_quit_handler_target.
7035         (putpkt): New.
7036         (kill_new_fork_children): Fill in 'remote' field.
7037         (packet_command): Use get_current_remote_target, defer to
7038         remote_target method of same name.
7039         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7040         parameter, and save it in m_remote.  All callers adjusted.
7041         (scoped_remote_fd::release): Use m_remote.
7042         (scoped_remote_fd::m_remote): New field.
7043         (remote_file_put, remote_file_get, remote_file_delete): Use
7044         get_current_remote_target, defer to remote_target method of same
7045         name.
7046         (remote_btrace_reset): Add remote_state paremeter.  Update all
7047         callers.
7048         (remote_async_inferior_event_handler). Pass down 'data'.
7049         (remote_new_objfile): Use get_current_remote_target.
7050         (remote_target::vcont_r_supported): New.
7051         (set_range_stepping): Use get_current_remote_target and
7052         remote_target::vcont_r_supported.
7053         (_initialize_remote): Don't allocate 'remote_state' and
7054         'stop_reply_queue' globals.
7055         * remote.h (struct remote_target): Forward declare.
7056         (getpkt, putpkt, remote_notif_get_pending_events): Add
7057         'remote_target' parameter.
7058
7059 2018-05-22  Pedro Alves  <palves@redhat.com>
7060
7061         * remote.c (vcont_builder): Now a class.  Make all data members
7062         private.
7063         (vcont_builder) <vcont_builder, restart, flush, push_action>:
7064         Declare methods.
7065         (vcont_builder_restart): Rename to ...
7066         (vcont_builder::restart): ... this.
7067         (vcont_builder_flush): Rename to ...
7068         (vcont_builder::flush): ... this.
7069         (vcont_builder_push_action): Rename to ...
7070         (vcont_builder::push_action): ... this.
7071         (remote_target::commit_resume): Adjust.
7072
7073 2018-05-22  Pedro Alves  <palves@redhat.com>
7074
7075         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
7076         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
7077         (get_fixed_memory_packet_size): New.
7078         (get_memory_packet_size): Use it.
7079         (set_memory_packet_size): Don't override the config size with
7080         DEFAULT_MAX_MEMORY_PACKET_SIZE.
7081         (show_memory_packet_size): Use get_fixed_memory_packet_size.
7082         Don't refer to get_memory_packet_size if not connected to a remote
7083         target.  Show "(default)" if configured size is 0.
7084
7085 2018-05-22  Pedro Alves  <palves@redhat.com>
7086
7087         * remote.c (remote_target::mourn_inferior): Move
7088         discard_pending_stop_replies call here from ...
7089         (_initialize_remote): ... here.
7090
7091 2018-05-22  Pedro Alves  <palves@redhat.com>
7092
7093         * remote.c (compare_section_command): Remove set_general_process
7094         call.
7095
7096 2018-05-22  Pedro Alves  <palves@redhat.com>
7097
7098         * remote.c (struct packet_reg, struct remote_arch_state):
7099         Move higher up in the file.
7100         (remote_state) <m_arch_states>: Store remote_arch_state values
7101         instead of remote_arch_state pointers.
7102         (remote_state::get_remote_arch_state): Adjust.
7103
7104 2018-05-22  Pedro Alves  <palves@redhat.com>
7105
7106         * remote.c: Include <unordered_map>.
7107         (remote_state): Now a class.
7108         (remote_state) <get_remote_arch_state>: Declare method.
7109         <get_remote_arch_state>: New field.
7110         (remote_arch_state) <remote_arch_state>: Declare ctor.
7111         <regs>: Now a unique_ptr.
7112         (remote_gdbarch_data_handle): Delete.
7113         (get_remote_arch_state): Delete.
7114         (remote_state::get_remote_arch_state): New.
7115         (get_remote_state): Adjust to call remote_state's
7116         get_remote_arch_state method.
7117         (init_remote_state): Delete, bits factored out to ...
7118         (remote_arch_state::remote_arch_state): ... this new method.
7119         (get_remote_packet_size, get_memory_packet_size)
7120         (process_g_packet, remote_target::fetch_registers)
7121         (remote_target::prepare_to_store, store_registers_using_G)
7122         (remote_target::store_registers, remote_target::get_trace_status):
7123         Adjust to call remote_state's method.
7124         (_initialize_remote): Remove reference to
7125         remote_gdbarch_data_handle.
7126
7127 2018-05-22  Pedro Alves  <palves@redhat.com>
7128
7129         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
7130         pread>: New method declarations.
7131         (remote_target::open_1): Adjust.
7132         (readahead_cache_invalidate): Rename to ...
7133         (readahead_cache::invalidate): ... this, and adjust to be a class
7134         method.
7135         (readahead_cache_invalidate_fd): Rename to ...
7136         (readahead_cache::invalidate_fd): ... this, and adjust to be a
7137         class method.
7138         (remote_hostio_pwrite): Adjust.
7139         (remote_hostio_pread_from_cache): Rename to ...
7140         (readahead_cache::pread): ... this, and adjust to be a class
7141         method.
7142         (remote_hostio_close): Adjust.
7143
7144 2018-05-22  Pedro Alves  <palves@redhat.com>
7145
7146         * remote.c (remote_hostio_close_cleanup): Delete.
7147         (class scoped_remote_fd): New.
7148         (remote_file_put, remote_file_get): Use it.
7149
7150 2018-05-22  Pedro Alves  <palves@redhat.com>
7151
7152         (struct vCont_action_support): Use bool and initialize all fields.
7153         (struct readahead_cache): Initialize all fields.
7154         (remote_state): Use bool and initialize all fields.
7155         (remote_state::remote_state, remote_state::~remote_state): New.
7156         (new_remote_state): Delete.
7157         (_initialize_remote): Use new to allocate remote_state.
7158
7159 2018-05-22  Pedro Alves  <palves@redhat.com>
7160             張俊芝  <zjz@zjz.name>
7161
7162         PR gdb/22973
7163         * c-exp.y: Include "c-support.h".
7164         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
7165         of tolower.  Use c_ident_is_alpha to scan names.
7166         * c-lang.c: Include "c-support.h".
7167         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
7168         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
7169         * c-support.h: New file, with bits factored out from ...
7170         * cp-name-parser.y: ... this file.
7171         Include "c-support.h".
7172         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
7173         c-support.h and renamed.
7174         (symbol_end, yylex): Adjust.
7175
7176 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7177
7178         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
7179         parameter type to CORE_ADDR.
7180         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
7181         parameter type in declaration to CORE_ADDR.
7182         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
7183         target_auxv_search to get AT_HWCAP and use the result to get the
7184         target description.
7185         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
7186         to CORE_ADDR. Remove the cast of the return value to unsigned
7187         long. Fix error predicate of target_auxv_search.
7188         (ppc_linux_nat_target::read_description): Change the type of the
7189         hwcap variable to CORE_ADDR.
7190
7191 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7192
7193         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
7194         if the size of fpscr is larger than 32 bits.
7195
7196 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7197
7198         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
7199         (ppc32_linux_vsxregmap): New global.
7200         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
7201         regcache_supply_regset, and regcache_collect_regset.
7202         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
7203         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
7204         (fetch_vsx_register, store_vsx_register): Remove.
7205         (fetch_vsx_registers): Add regno parameter. Get regset using
7206         ppc_linux_vsxregset. Use regset to supply registers.
7207         (store_vsx_registers): Add regno parameter. Get regset using
7208         ppc_linux_vsxregset. Use regset to collect registers.
7209         (fetch_register): Call fetch_vsx_registers instead of
7210         fetch_vsx_register.
7211         (store_register): Call store_vsx_registers instead of
7212         store_vsx_register.
7213         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
7214         new regno parameter.
7215         (store_ppc_registers): Call store_vsx_registers with -1 for the
7216         new regno parameter.
7217         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
7218         (ppc_collect_vsxregset): Remove.
7219
7220 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7221
7222         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
7223         offset fields.
7224         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
7225         for vector register offset fields.
7226         (ppc64_fbsd_reg_offsets): Likewise.
7227         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7228         to vector register offset fields.
7229         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
7230         to vector register offset fields.
7231         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
7232         vector register offset fields.
7233         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
7234         initializers for vector register offset fields.
7235         (rs6000_aix64_reg_offsets): Likewise.
7236         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
7237         (ppc_supply_vrregset): Remove.
7238         (ppc_collect_vrregset): Remove.
7239         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
7240         (ppc_linux_vrregset) : New function.
7241         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
7242         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
7243         (ppc32_linux_vrregset): Remove.
7244         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
7245         and use result instead of ppc32_linux_vrregset.
7246         (ppc32_linux_reg_offsets): Remove initializers for vector register
7247         offset fields.
7248         (ppc64_linux_reg_offsets): Likewise.
7249         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
7250         * ppc-linux-nat.c: Include regset.h.
7251         (gdb_vrregset_t): Adjust comment to account for little-endian
7252         mode.
7253         (supply_vrregset, fill_vrregset): Remove.
7254         (fetch_altivec_register, store_altivec_register): Remove.
7255         (fetch_altivec_registers): Add regno parameter. Get regset using
7256         ppc_linux_vrregset. Use regset to supply registers.
7257         (store_altivec_registers): Add regno parameter. Get regset using
7258         ppc_linux_vrregset. Use regset to collect registers.
7259         (fetch_register): Call fetch_altivec_registers instead of
7260         fetch_altivec_register.
7261         (store_register): Call store_altivec_registers instead of
7262         store_altivec_register.
7263         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
7264         the new regno parameter.
7265         (store_ppc_registers): Call store_altivec_registers with -1 for
7266         the new regno parameter.
7267
7268 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7269
7270         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
7271         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
7272         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
7273         (gdb_vrregset_t): Change array type size to
7274         PPC_LINUX_SIZEOF_VRREGSET.
7275         (gdb_vsxregset_t): Change array type size to
7276         PPC_LINUX_SIZEOF_VSXREGSET.
7277         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
7278         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
7279         PPC_LINUX_SIZEOF_VSXREGSET.
7280
7281 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7282
7283         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
7284         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
7285         nat/ppc-linux.c.
7286         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
7287         ppc_linux_target_wordsize with tid.
7288         (ppc_linux_nat_target::read_description): Call ppc_linux_target
7289         wordsize with tid.
7290         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
7291         (ppc64_64bit_inferior_p): Add static and inline specifiers.
7292         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
7293         tid parameter. Remove static specifier.
7294         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
7295         (ppc_linux_target_wordsize): New declaration.
7296
7297 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
7298
7299         * arch/ppc-linux-common.c: New file.
7300         * arch/ppc-linux-common.h: New file.
7301         * arch/ppc-linux-tdesc.h: New file.
7302         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
7303         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
7304         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
7305         arch/ppc-linux-tdesc.h.
7306         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
7307         arch/ppc-linux-tdesc.h.
7308         (ppc_linux_nat_target::read_description): Remove target
7309         description matching code. Fill a ppc_linux_features struct and
7310         call ppc_linux_match_description with it. Move comment about ISA
7311         2.05 to ppc-linux-common.c.
7312         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
7313         arch/ppc-linux-tdesc.h.
7314         (ppc_linux_core_read_description): Remove target description
7315         matching code. Fill a ppc_linux_features struct and call
7316         ppc_linux_match_description with it.
7317         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
7318         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
7319         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
7320         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
7321         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
7322         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
7323         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
7324         (tdesc_powerpc_e500l): Remove.
7325
7326 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
7327
7328         * ada-lang.c (catch_assert_command): Pass empty string instead
7329         of NULL for excep_string argument.
7330
7331 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7332
7333         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
7334         the width of the requested register exceeds the width of the
7335         `ptrace' data type.
7336
7337 2018-05-21  Tom Tromey  <tom@tromey.com>
7338
7339         * printcmd.c (output_command): Remove.
7340         (output_command_const): Rename to output_command.
7341         * valprint.h (output_command): Rename from output_command_const.
7342         * tracepoint.c (trace_dump_actions): Call output_command.
7343
7344 2018-05-21  Tom Tromey  <tom@tromey.com>
7345
7346         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7347         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
7348         * ada-lang.h (create_ada_exception_catchpoint): Update.
7349         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
7350         std::string.
7351         (create_excep_cond_exprs, ~ada_catchpoint)
7352         (should_stop_exception, print_one_exception)
7353         (print_mention_exception, print_recreate_exception): Update.
7354         (ada_get_next_arg): Remove.
7355         (catch_ada_exception_command_split): Use std::string.  Change type
7356         of "excep_string", "cond_string".
7357         (catch_ada_exception_command): Update.
7358         (create_ada_exception_catchpoint): Change type of excep_string.
7359         (ada_exception_sal): Remove excep_string parameter.
7360         (~ada_catchpoint): Remove.
7361
7362 2018-05-21  Tom Tromey  <tom@tromey.com>
7363
7364         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
7365         cleanup.
7366
7367 2018-05-21  Tom Tromey  <tom@tromey.com>
7368
7369         * ada-lang.c (ada_exception_message_1, ada_exception_message):
7370         Return unique_xmalloc_ptr.
7371         (print_it_exception): Update.
7372
7373 2018-05-21  Tom Tromey  <tom@tromey.com>
7374
7375         * tracepoint.c (trace_dump_actions): Use std::string.
7376
7377 2018-05-21  Tom Tromey  <tom@tromey.com>
7378
7379         * symfile.c (reread_symbols): Use std::string for original_name.
7380
7381 2018-05-21  Tom Tromey  <tom@tromey.com>
7382
7383         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
7384         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
7385         constructor.
7386
7387 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
7388
7389         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
7390         instance to...
7391         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
7392         * objfiles.c (get_objfile_bfd_data): Allocate
7393         objfile_per_bfd_storage with obstack_new when allocating on
7394         obstack.
7395
7396 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7397
7398         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
7399         OBSTACK_ZALLOC.
7400         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
7401         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
7402         * mdebugread.c (mdebug_build_psymtabs): Likewise.
7403         (add_pending): Likewise.
7404         (parse_symbol): Likewise.
7405         (parse_partial_symbols): Likewise.
7406         (psymtab_to_symtab_1): Likewise.
7407         (new_psymtab): Likewise.
7408         (elfmdebug_build_psymtabs): Likewise.
7409         * minsyms.c (terminate_minimal_symbol_table): Likewise.
7410         * objfiles.c (get_objfile_bfd_data): Likewise.
7411         (objfile_register_static_link): Likewise.
7412         * psymtab.c (allocate_psymtab): Likewise.
7413         * stabsread.c (read_member_functions): Likewise.
7414         * xcoffread.c (xcoff_end_psymtab): Likewise.
7415
7416 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
7417
7418         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
7419         compiler supports std::is_trivially_constructible.
7420         * common/poison.h: Include obstack.h.
7421         (IsMallocable): Define to is_trivially_constructible if the
7422         compiler supports it, define to true_type otherwise.
7423         (xobnew): New.
7424         (XOBNEW): Redefine.
7425         (xobnewvec): New.
7426         (XOBNEWVEC): Redefine.
7427         * gdb_obstack.h (obstack_zalloc): New.
7428         (OBSTACK_ZALLOC): Redefine.
7429         (obstack_calloc): New.
7430         (OBSTACK_CALLOC): Redefine.
7431         (obstack_new): New.
7432         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
7433         (gdbarch_obstack): New declaration in gdbarch.h, definition in
7434         gdbarch.c.
7435         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
7436         obstack_calloc/obstack_zalloc.
7437         (gdbarch_obstack_zalloc): Remove.
7438         * target-descriptions.c (tdesc_data_init): Use obstack_new.
7439
7440 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7441
7442         * stack.c (backtrace_command_1): Remove useless variable int i.
7443
7444 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7445
7446         * stack.c (print_frame_info): Fix comment.
7447
7448 2018-05-18  Tom Tromey  <tom@tromey.com>
7449
7450         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
7451         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
7452         (~dwarf2_per_objfile): Update
7453         (dwarf2_get_dwz_file): Use new.
7454         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
7455         unique_ptr.
7456
7457 2018-05-18  Tom Tromey  <tom@tromey.com>
7458
7459         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
7460         unique_ptr.
7461         * dwarf2read.c (struct dwp_file): Add constructor and
7462         initializers.
7463         (open_and_init_dwp_file): Return a unique_ptr.
7464         (dwarf2_per_objfile, create_dwp_hash_table)
7465         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
7466         (lookup_dwo_unit_in_dwp): Update.
7467         (open_and_init_dwp_file, get_dwp_file): Update.
7468
7469 2018-05-18  Tom Tromey  <tom@tromey.com>
7470
7471         * dwarf2read.c (dwarf2_per_objfile): Update.
7472         (struct mapped_index): Add initializers.
7473         (dwarf2_read_index): Use new.
7474         (dw2_symtab_iter_init): Update.
7475         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
7476         unique_ptr.
7477
7478 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7479
7480         * dwarf2read.c (mapped_index) <total_size>: Remove.
7481
7482 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
7483
7484         * unittests/format_pieces-selftests.c (test_format_specifier):
7485         Add ARI comments.
7486
7487 2018-05-18  Tom Tromey  <tom@tromey.com>
7488
7489         * c-typeprint.c (maybe_print_hole): New function.
7490         (c_print_type_struct_field_offset): Update.
7491         (c_type_print_base_struct_union): Call maybe_print_hole.
7492
7493 2018-05-17  Keith Seitz  <keiths@redhat.com>
7494
7495         * breakpoint.c (build_bpstat_chain): New function, moved from
7496         bpstat_stop_status.
7497         (bpstat_stop_status): Add optional parameter, `stop_chain'.
7498         If no stop chain is passed, call build_bpstat_chain to build it.
7499         * breakpoint.h (build_bpstat_chain): Declare.
7500         (bpstat_stop_status): Move documentation here from breakpoint.c.
7501         * infrun.c (handle_signal_stop): Before eliding inlined frames,
7502         build the stop chain and pass it to skip_inline_frames.
7503         Pass this stop chain to bpstat_stop_status.
7504         * inline-frame.c: Include breakpoint.h.
7505         (stopped_by_user_bp_inline_frame): New function.
7506         (skip_inline_frames): Add parameter `stop_chain'.
7507         Move documention to inline-frame.h.
7508         If non-NULL, use stopped_by_user_bp_inline_frame to determine
7509         whether the frame should be elided.
7510         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
7511         Add moved documentation and update for new parameter.
7512
7513 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7514
7515         PR cli/14975
7516         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7517         unittests/format_pieces-selftests.c.
7518         * common/format.h (format_piece) <operator==>: New.
7519         (format_pieces) <operator[]>: Remove.
7520         * common/format.c (format_pieces::format_pieces): Handle \e.
7521         * unittests/format_pieces-selftests.c: New.
7522
7523 2018-05-17  Tom Tromey  <tom@tromey.com>
7524
7525         PR symtab/23010:
7526         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
7527         (dw2_instantiate_symtab): Add skip_partial parameter.
7528         (dw2_find_last_source_symtab, dw2_map_expand_apply)
7529         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
7530         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
7531         (dw2_expand_symtabs_matching_one)
7532         (dw2_find_pc_sect_compunit_symtab)
7533         (dw2_debug_names_lookup_symbol)
7534         (dw2_debug_names_expand_symtabs_for_function): Update.
7535         (init_cutu_and_read_dies): Add skip_partial parameter.
7536         (process_psymtab_comp_unit, build_type_psymtabs_1)
7537         (process_skeletonless_type_unit, load_partial_comp_unit)
7538         (psymtab_to_symtab_1): Update.
7539         (load_full_comp_unit): Add skip_partial parameter.
7540         (process_imported_unit_die, dwarf2_read_addr_index)
7541         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
7542         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
7543         (read_signatured_type): Update.
7544
7545 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
7546
7547         * value.c (release_value): Remove unused variable.
7548         (record_latest_value): Likewise.
7549         (access_value_history): Likewise.
7550         (preserve_values): Likewise.
7551
7552 2018-05-17  Tom Tromey  <tom@tromey.com>
7553
7554         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
7555         Initialize.
7556
7557 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
7558
7559         PR gdb/22286
7560         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
7561         Also handle registers whose width is not a multiple of
7562         PTRACE_TYPE_RET.
7563         (linux_nat_trad_target::store_register): Likewise.
7564
7565 2018-05-16  Tom Tromey  <tom@tromey.com>
7566
7567         * gdbcore.h (core_bfd): Redefine.
7568         * corelow.c (core_target::close): Update.
7569         (core_target_open): Update.
7570         * progspace.h (struct program_space) <cbfd>: Now a
7571         gdb_bfd_ref_ptr.
7572
7573 2018-05-16  Tom Tromey  <tom@tromey.com>
7574
7575         PR cli/19551:
7576         * symfile-add-flags.h (enum symfile_add_flags)
7577         <SYMFILE_NOT_FILENAME>: New constant.
7578         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
7579         objfile name from BFD.
7580         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
7581         * minidebug.c (find_separate_debug_file_in_section): Put
7582         ".gnu_debugdata" into BFD's file name.
7583
7584 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
7585
7586         * regcache.c (regcache_read_ftype, regcache_write_ftype):
7587         Remove.
7588
7589 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
7590
7591         PR binutils/21446
7592         * aarch64-tdep.c (aarch64_analyze_prologue,
7593         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
7594         Indicate not interested in errors.
7595
7596 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7597
7598         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
7599         Supply the MIPS_ZERO_REGNUM register.
7600
7601 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
7602
7603         * mips-tdep.c (mask_address_var): Make variable static.
7604
7605 2018-05-14  Tom Tromey  <tom@tromey.com>
7606
7607         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
7608
7609 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
7610
7611         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
7612         FXSAVE_ADDR for the mxcsr register.
7613
7614 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
7615
7616         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
7617
7618 2018-05-11  Pedro Alves  <palves@redhat.com>
7619
7620         * corelow.c (core_target) <core_target>: No longer inline.
7621         Initialize m_core_gdbarch, m_core_vec and build the section table
7622         here.
7623         <~core_target>: New.
7624         <core_gdbarch, get_core_register_section>: New methods.
7625         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
7626         factored out from ...
7627         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
7628         (core_ops): Delete.
7629         (sniff_core_bfd): Add gdbarch parameter.
7630         (core_close): Delete, merged into ...
7631         (core_target::close): ... here.  Delete self.
7632         (core_close_cleanup): Delete.
7633         (core_target_open): Allocate a core_target on the heap.  Use a
7634         unique_ptr instead of a cleanup.  Bits moved into the core_target
7635         ctor.  Adjust to use core_target methods instead of globals.
7636         (get_core_register_section): Rename to ...
7637         (core_target::get_core_register_section): ... this and adjust.
7638         (struct get_core_registers_cb_data): New.
7639         (get_core_registers_cb): Use it.  Use bool.
7640         (core_target::fetch_registers, core_target::files_info)
7641         (core_target::xfer_partial, core_target::read_description)
7642         (core_target::pid_to, core_target::thread_name): Adjust to
7643         reference class fields instead of globals.
7644         * target.h (struct target_ops_deleter, target_ops_up): New.
7645
7646 2018-05-11  Pedro Alves  <palves@redhat.com>
7647
7648         * corefile.c (core_file_command): Move to corelow.c.
7649         * corelow.c (the_core_target): Delete.
7650         (core_file_command): Moved from corefile.c.  Check exec_bfd
7651         instead of the_core_target.  Use target_detach instead of calling
7652         into the_core_target directly.
7653         (maybe_say_no_core_file_now): New.
7654         (core_target::detach): Use it.
7655         (_initialize_corelow): Remove references to the_core_target.
7656         * gdbcore.h (the_core_target): Delete.
7657
7658 2018-05-11  Tom Tromey  <tromey@redhat.com>
7659             Pedro Alves  <palves@redhat.com>
7660
7661         * corefile.c (core_bfd): Remove.
7662         * gdbcore.h (core_bfd): Now a macro.
7663         * progspace.h (struct program_space) <cbfd>: New field.
7664
7665 2018-05-11  Tom Tromey  <tom@tromey.com>
7666
7667         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
7668         gdb::def_vector.
7669
7670 2018-05-10  Tom Tromey  <tom@tromey.com>
7671
7672         * configure: Rebuild.
7673         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
7674
7675 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
7676
7677         PR server/23158:
7678         * regformats/regdat.sh: Adjust script, following the addition
7679         of the new expedite_regs parameter to init_target_desc.
7680
7681 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
7682     
7683         PR gdb/23127
7684         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
7685         set_gdbarch_significant_addr_bit.
7686         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
7687         set_gdbarch_significant_addr_bit.
7688         * utils.c (address_significant): Update to sign extend addr.
7689
7690 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
7691
7692         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
7693         (xtensa_linux_init_abi): Limit tdep->num_regs by
7694         tdep->num_nopriv_regs.
7695         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
7696         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
7697         not initialized.
7698
7699 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
7700
7701         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
7702
7703 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
7704
7705         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
7706         (I387_MXCSR_INIT_VAL): New constant.
7707         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
7708         buffer if it was supplied by the inferior.
7709         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
7710         (i387_xsave_get_clear_bv): New function.
7711         (i387_supply_xsave): Only read x87 control registers from the
7712         xsave buffer if the feature is enabled, and the state will have
7713         been written, otherwise, provide a suitable default.
7714         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
7715         including x87 control registers.  Update control registers if they
7716         have changed from the default value, and mark features as enabled
7717         as required.
7718         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
7719
7720 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
7721
7722         * spu-tdep.c (info_spu_event_command): Fix output formatting.
7723
7724 2018-05-07  Tom Tromey  <tom@tromey.com>
7725
7726         * configure: Rebuild.
7727         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
7728
7729 2018-05-07  Tom Tromey  <tom@tromey.com>
7730
7731         PR tdep/20362:
7732         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
7733         bit.  Use correct value for VDIV.
7734
7735 2018-05-04  Tom Tromey  <tom@tromey.com>
7736
7737         * configure: Rebuild.
7738         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
7739
7740 2018-05-04  Tom Tromey  <tom@tromey.com>
7741
7742         * linux-record.c (record_linux_system_call) <case
7743         RECORD_SYS_RECVFROM>: Add "break".
7744
7745 2018-05-04  Tom Tromey  <tom@tromey.com>
7746
7747         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
7748         Add missing "break".
7749         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
7750         Add missing "break".
7751
7752 2018-05-04  Tom Tromey  <tom@tromey.com>
7753
7754         * rs6000-tdep.c (ppc_process_record_op4)
7755         (ppc_process_record_op63): Add fall-through comment.
7756
7757 2018-05-04  Tom Tromey  <tom@tromey.com>
7758
7759         * i386-tdep.c (i386_process_record): Add fall-through comment.
7760
7761 2018-05-04  Tom Tromey  <tom@tromey.com>
7762
7763         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
7764         comment.
7765
7766 2018-05-04  Tom Tromey  <tom@tromey.com>
7767
7768         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
7769         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
7770         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
7771         comment.
7772         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
7773         comment.
7774         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
7775         comment.
7776
7777 2018-05-04  Tom Tromey  <tom@tromey.com>
7778
7779         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
7780
7781 2018-05-04  Tom Tromey  <tom@tromey.com>
7782
7783         * s390-tdep.c (s390_process_record): Fix fall-through comments.
7784         * xcoffread.c (scan_xcoff_symtab): Move comment later.
7785         * symfile.c (section_is_mapped): Fix fall-through comment.
7786         * stabsread.c (define_symbol, read_member_functions): Fix
7787         fall-through comment.
7788         * s390-linux-tdep.c (s390_process_record): Fix fall-through
7789         comment.
7790         * remote.c (remote_wait_as): Fix fall-through comment.
7791         * p-exp.y (yylex): Fix fall-through comment.
7792         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
7793         comment.
7794         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
7795         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
7796         * jv-exp.y (yylex): Fix fall-through comment.
7797         * go-exp.y (lex_one_token): Fix fall-through comment.
7798         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
7799         fall-through comment.
7800         * f-exp.y (yylex): Fix fall-through comment.
7801         * dwarf2read.c (process_die): Fix fall-through comments.
7802         * dbxread.c (process_one_symbol): Fix fall-through comment.
7803         * d-exp.y (lex_one_token): Fix fall-through comment.
7804         * cp-name-parser.y (yylex): Fix fall-through comment.
7805         * coffread.c (coff_symtab_read): Fix fall-through comment.
7806         * c-exp.y (lex_one_token): Fix fall-through comment.
7807         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
7808         comment.
7809         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
7810         comment.
7811
7812 2018-05-04  Tom Tromey  <tom@tromey.com>
7813
7814         PR python/22730:
7815         * NEWS: Mention gdb.execute change.
7816         * gdbcmd.h (execute_control_command): Don't declare.
7817         * python/python.c (execute_gdb_command): Use read_command_lines_1,
7818         execute_control_commands, execute_control_commands_to_string.
7819         * cli/cli-script.h (execute_control_commands)
7820         (execute_control_commands_to_string): Declare.
7821         (execute_control_command): Add from_tty parameter.
7822         * cli/cli-script.c (execute_control_commands)
7823         (execute_control_commands_to_string): New functions.
7824         (execute_user_command): Use execute_control_commands.
7825         (execute_control_command_1): Add "from_tty" parameter.  Update.
7826         (execute_control_command): Likewise.
7827
7828 2018-05-04  Tom Tromey  <tom@tromey.com>
7829
7830         PR python/22731:
7831         * NEWS: Mention that breakpoint commands are writable.
7832         * python/py-breakpoint.c (bppy_set_commands): New function.
7833         (breakpoint_object_getset) <"commands">: Use it.
7834
7835 2018-05-04  Tom Tromey  <tom@tromey.com>
7836
7837         * tracepoint.c (actions_command): Update.
7838         * mi/mi-cmd-break.c (mi_command_line_array)
7839         (mi_command_line_array_cnt, mi_command_line_array_ptr)
7840         (mi_read_next_line): Remove.
7841         (mi_cmd_break_commands): Update.
7842         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
7843         function_view.
7844         * cli/cli-script.c (get_command_line): Update.
7845         (process_next_line): Use function_view.  Constify.
7846         (recurse_read_control_structure, read_command_lines)
7847         (read_command_lines_1): Change argument types to function_view.
7848         (do_define_command, document_command): Update.
7849         * breakpoint.h (check_tracepoint_command): Don't declare.
7850         * breakpoint.c (check_tracepoint_command): Remove.
7851         (commands_command_1, create_tracepoint_from_upload): Update.
7852
7853 2018-05-04  Tom Tromey  <tom@tromey.com>
7854
7855         PR gdb/11750:
7856         * cli/cli-script.h (enum command_control_type) <define_control>:
7857         New constant.
7858         * cli/cli-script.c (multi_line_command_p): Handle define_control.
7859         (build_command_line, execute_control_command_1)
7860         (process_next_line): Likewise.
7861         (do_define_command): New function, extracted from define_command.
7862         (define_command): Use it.
7863
7864 2018-05-04  Tom Tromey  <tom@tromey.com>
7865
7866         * tracepoint.c (actions_command): Update.
7867         * cli/cli-script.h (read_command_lines): Update.
7868         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
7869         (MAX_TMPBUF): Remove define.
7870         (define_command): Use string_printf.
7871         (document_command): Likewise.
7872         * breakpoint.c (commands_command_1): Update.
7873
7874 2018-05-04  Tom Tromey  <tom@tromey.com>
7875
7876         * top.c (execute_command): Update.
7877         * cli/cli-script.h (print_command_lines): Now varargs.
7878         * cli/cli-script.c (print_command_lines): Now varargs.
7879         (execute_control_command_1) <case while_control, case if_control>:
7880         Update.
7881
7882 2018-05-04  Tom Tromey  <tom@tromey.com>
7883
7884         * tracepoint.c (all_tracepoint_actions): Rename from
7885         all_tracepoint_actions_and_cleanup.  Change return type.
7886         (actions_command, encode_actions_1, encode_actions)
7887         (trace_dump_actions, tdump_command): Update.
7888         * remote.c (remote_download_command_source): Update.
7889         * python/python.c (gdbpy_eval_from_control_command)
7890         (python_command, python_interactive_command): Update.
7891         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
7892         * guile/guile.c (guile_command)
7893         (gdbscm_eval_from_control_command, guile_command): Update.
7894         * compile/compile.c (compile_code_command)
7895         (compile_print_command, compile_to_object): Update.
7896         * cli/cli-script.h (struct command_lines_deleter): New.
7897         (counted_command_line): New typedef.
7898         (struct command_line): Add constructor, destructor.
7899         <body_list>: Remove.
7900         <body_list_0, body_list_1>: New members.
7901         (command_line_up): Remove typedef.
7902         (read_command_lines, read_command_lines_1, get_command_line):
7903         Update.
7904         (copy_command_lines): Don't declare.
7905         * cli/cli-script.c (build_command_line): Use "new".
7906         (get_command_line): Return counted_command_line.
7907         (print_command_lines, execute_user_command)
7908         (execute_control_command_1, while_command, if_command): Update.
7909         (realloc_body_list): Remove.
7910         (process_next_line, recurse_read_control_structure): Update.
7911         (read_command_lines, read_command_lines_1): Return counted_command_line.
7912         (free_command_lines): Use "delete".
7913         (copy_command_lines): Remove.
7914         (define_command, document_command, show_user_1): Update.
7915         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
7916         a counted_command_line.
7917         * breakpoint.h (counted_command_line): Remove typedef.
7918         (breakpoint_set_commands): Update.
7919         * breakpoint.c (check_no_tracepoint_commands)
7920         (validate_commands_for_breakpoint): Update.
7921         (breakpoint_set_commands): Change commands to be a
7922         counted_command_line.
7923         (commands_command_1, update_dprintf_command_list)
7924         (create_tracepoint_from_upload): Update.
7925
7926 2018-05-04  Tom Tromey  <tom@tromey.com>
7927
7928         * cli/cli-decode.h (cmd_list_element): New constructor.
7929         (~cmd_list_element): New destructor.
7930         (struct cmd_list_element): Add initializers.
7931         * cli/cli-decode.c (do_add_cmd): Use "new".
7932         (delete_cmd): Use "delete".
7933
7934 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
7935             Pedro Alves <palves@redhat.com>
7936
7937         PR breakpoints/19806 and support for PR external/20207.
7938         * NEWS: Mention Aarch64 watchpoint improvements.
7939         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
7940         watchpoints and PR external/20207 watchpoints.
7941         * nat/aarch64-linux-hw-point.c
7942         (kernel_supports_any_contiguous_range): New.
7943         (aarch64_watchpoint_offset): New.
7944         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
7945         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
7946         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
7947         (aarch64_align_watchpoint): New parameters aligned_offset_p and
7948         next_addr_orig_p.  Support PR external/20207 watchpoints.
7949         (aarch64_downgrade_regs): New.
7950         (aarch64_dr_state_insert_one_point): New parameters offset and
7951         addr_orig.
7952         (aarch64_dr_state_remove_one_point): Likewise.
7953         (aarch64_handle_breakpoint): Update caller.
7954         (aarch64_handle_aligned_watchpoint): Likewise.
7955         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
7956         aligned_offset.
7957         (aarch64_linux_set_debug_regs): Remove const from state.  Call
7958         aarch64_downgrade_regs.
7959         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
7960         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
7961         (DR_CONTROL_MASK): ... this.
7962         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
7963         (unsigned int aarch64_watchpoint_offset): New prototype.
7964         (aarch64_linux_set_debug_regs): Remove const from state.
7965         * utils.c (align_up, align_down): Move to ...
7966         * common/common-utils.c (align_up, align_down): ... here.
7967         * utils.h (align_up, align_down): Move to ...
7968         * common/common-utils.h (align_up, align_down): ... here.
7969
7970 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
7971
7972         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
7973         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
7974         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
7975         Re-implement to match the ABI as summarized in GCC's
7976         gcc/config/sparc/sparc.c.  All callers updated.
7977         (sparc32_store_arguments): Remove assertion.
7978
7979 2018-05-04  Tom Tromey  <tom@tromey.com>
7980
7981         * printcmd.c: Don't include tui.h.
7982         (decode_format): Use skip_spaces.
7983
7984 2018-05-04  Tom Tromey  <tom@tromey.com>
7985
7986         PR gdb/22619:
7987         * printcmd.c (last_count): New global.
7988         (x_command): Use saved count when repeating.
7989
7990 2018-05-04  Tom Tromey  <tom@tromey.com>
7991
7992         * nto-procfs.c (do_closedir_cleanup): Remove.
7993         (procfs_pidlist): Use gdb_dir_up.
7994         * procfs.c (do_closedir_cleanup): Remove.
7995         (proc_update_threads): Use gdb_dir_up.
7996         * common/filestuff.h (struct gdb_dir_deleter): New.
7997         (gdb_dir_up): New typedef.
7998
7999 2018-05-04  Tom Tromey  <tom@tromey.com>
8000
8001         * ada-lang.c (print_mention_exception): Use std::string.
8002
8003 2018-05-04  Tom Tromey  <tom@tromey.com>
8004
8005         * ada-lang.c (create_excep_cond_exprs): Update.
8006         (ada_exception_catchpoint_cond_string): Use std::string.
8007
8008 2018-05-04  Tom Tromey  <tom@tromey.com>
8009
8010         * ada-lang.c (xget_renaming_scope): Return std::string.
8011         (old_renaming_is_invisible): Update.
8012
8013 2018-05-04  Tom Tromey  <tom@tromey.com>
8014
8015         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8016         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8017
8018 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
8019
8020         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8021
8022 2018-05-04  Tom Tromey  <tom@tromey.com>
8023
8024         * remote.c (remote_query_supported_append): Change type.
8025         (remote_check_symbols): Update.
8026
8027 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
8028
8029         PR gdb/11420
8030         * configure.ac: Prepend libpython.
8031         * python/python-config.py: Likewise.
8032         * configure: Regenerate.
8033
8034 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8035
8036         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8037
8038 2018-05-03  Pedro Alves  <palves@redhat.com>
8039
8040         * s390-linux-nat.c
8041         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8042         override.  Write 'true' instead of '1'.
8043         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8044         declaration.
8045
8046 2018-05-02  Pedro Alves  <palves@redhat.com>
8047
8048         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
8049         add_inf_child_target.
8050         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
8051         add_inf_child_target.
8052         * aix-thread.c (aix_thread_target_info): New.
8053         (aix_thread_target) <shortname, longname, doc>: Delete.
8054         <info>: New.
8055         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
8056         add_inf_child_target.
8057         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
8058         add_inf_child_target.
8059         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
8060         add_inf_child_target.
8061         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
8062         add_inf_child_target.
8063         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
8064         add_inf_child_target.
8065         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
8066         add_inf_child_target.
8067         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
8068         add_inf_child_target.
8069         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
8070         add_inf_child_target.
8071         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
8072         add_inf_child_target.
8073         * bfd-target.c (target_bfd_target_info): New.
8074         (target_bfd) <shortname, longname, doc>: Delete.
8075         <info>: New.
8076         * bsd-kvm.c (bsd_kvm_target_info): New.
8077         (bsd_kvm_target) <shortname, longname, doc>: Delete.
8078         <info>: New.
8079         (bsd_kvm_target::open): Rename to ...
8080         (bsd_kvm_target_open): ... this.  Adjust.
8081         * bsd-uthread.c (bsd_uthread_target_info): New.
8082         (bsd_uthread_target) <shortname, longname, doc>: Delete.
8083         <info>: New.
8084         * corefile.c (core_file_command): Adjust.
8085         * corelow.c (core_target_info): New.
8086         (core_target) <shortname, longname, doc>: Delete.
8087         <info>: New.
8088         (core_target::open): Rename to ...
8089         (core_target_open): ... this.  Adjust.
8090         * ctf.c (ctf_target_info): New.
8091         (ctf_target) <shortname, longname, doc>: Delete.
8092         <info>: New.
8093         (ctf_target::open): Rename to ...
8094         (ctf_target_open): ... this.
8095         (_initialize_ctf): Adjust.
8096         * exec.c (exec_target_info): New.
8097         (exec_target) <shortname, longname, doc>: Delete.
8098         <info>: New.
8099         (exec_target::open): Rename to ...
8100         (exec_target_open): ... this.
8101         * gdbcore.h (core_target_open): Declare.
8102         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
8103         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
8104         add_inf_child_target.
8105         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
8106         add_inf_child_target.
8107         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
8108         add_inf_child_target.
8109         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
8110         add_inf_child_target.
8111         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
8112         add_inf_child_target.
8113         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
8114         add_inf_child_target.
8115         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
8116         add_inf_child_target.
8117         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
8118         add_inf_child_target.
8119         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
8120         add_inf_child_target.
8121         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
8122         add_inf_child_target.
8123         * inf-child.c (inf_child_target_info): New.
8124         (inf_child_target::info): New.
8125         (inf_child_open_target): Remove 'target' parameter.  Use
8126         get_native_target instead.
8127         (inf_child_target::open): Delete.
8128         (add_inf_child_target): New.
8129         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
8130         Delete.
8131         <info>: New.
8132         (add_inf_child_target): Declare.
8133         (inf_child_open_target): Declare.
8134         * linux-thread-db.c (thread_db_target_info): New.
8135         (thread_db_target) <shortname, longname, doc>: Delete.
8136         <info>: New.
8137         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
8138         add_inf_child_target.
8139         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
8140         add_inf_child_target.
8141         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
8142         add_inf_child_target.
8143         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
8144         add_inf_child_target.
8145         * make-target-delegates (print_class): Adjust.
8146         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
8147         add_inf_child_target.
8148         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
8149         add_inf_child_target.
8150         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
8151         add_inf_child_target.
8152         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
8153         add_inf_child_target.
8154         * nto-procfs.c (nto_native_target_info): New.
8155         (nto_procfs_target_native) <shortname, longname, doc>:
8156         Delete.
8157         <info>: New.
8158         (nto_procfs_target_info): New.
8159         (nto_procfs_target_procfs) <shortname, longname, doc>:
8160         Delete.
8161         <info>: New.
8162         (init_procfs_targets): Adjust.
8163         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
8164         add_inf_child_target.
8165         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
8166         add_inf_child_target.
8167         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
8168         add_inf_child_target.
8169         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
8170         add_inf_child_target.
8171         * ravenscar-thread.c (ravenscar_target_info): New.
8172         (ravenscar_thread_target) <shortname, longname, doc>:
8173         Delete.
8174         <info>: New.
8175         * record-btrace.c (record_btrace_target_info):
8176         (record_btrace_target) <shortname, longname, doc>: Delete.
8177         <info>: New.
8178         (record_btrace_target::open): Rename to ...
8179         (record_btrace_target_open): ... this.  Adjust.
8180         * record-full.c (record_longname, record_doc): New.
8181         (record_full_base_target) <shortname, longname, doc>: Delete.
8182         <info>: New.
8183         (record_full_target_info): New.
8184         (record_full_target): <shortname>: Delete.
8185         <info>: New.
8186         (record_full_core_open_1, record_full_open_1): Update comments.
8187         (record_full_base_target::open): Rename to ...
8188         (record_full_open): ... this.
8189         (cmd_record_full_restore): Update.
8190         (_initialize_record_full): Update.
8191         * remote-sim.c (remote_sim_target_info): New.
8192         (gdbsim_target) <shortname, longname, doc>: Delete.
8193         <info>: New.
8194         (gdbsim_target::open): Rename to ...
8195         (gdbsim_target_open): ... this.
8196         (_initialize_remote_sim): Adjust.
8197         * remote.c (remote_doc): New.
8198         (remote_target_info): New.
8199         (remote_target) <shortname, longname, doc>: Delete.
8200         <info>: New.
8201         (extended_remote_target_info): New.
8202         (extended_remote_target) <shortname, longname, doc>: Delete.
8203         <info>: New.
8204         (remote_target::open_1): Make static.  Adjust.
8205         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
8206         * s390-linux-nat.c (_initialize_s390_nat): Use
8207         add_inf_child_target.
8208         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
8209         add_inf_child_target.
8210         * sol-thread.c (thread_db_target_info): New.
8211         (sol_thread_target) <shortname, longname, doc>: Delete.
8212         <info>: New.
8213         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
8214         add_inf_child_target.
8215         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
8216         add_inf_child_target.
8217         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
8218         add_inf_child_target.
8219         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
8220         add_inf_child_target.
8221         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
8222         add_inf_child_target.
8223         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
8224         add_inf_child_target.
8225         * spu-linux-nat.c (_initialize_spu_nat): Use
8226         add_inf_child_target.
8227         * spu-multiarch.c (spu_multiarch_target_info): New.
8228         (spu_multiarch_target) <shortname, longname, doc>: Delete.
8229         <info>: New.
8230         * target-delegates.c: Regenerate.
8231         * target.c: Include <unordered_map>.
8232         (target_ops_p): Delete.
8233         (DEF_VEC_P(target_ops_p)): Delete.
8234         (target_factories): New.
8235         (test_target_info): New.
8236         (test_target_ops::info): New.
8237         (open_target): Adjust to use target_factories.
8238         (add_target_with_completer): Rename to ...
8239         (add_target): ... this.  Change prototype.  Register target_info
8240         and open callback in target_factories.  Register target_info in
8241         command context instead of target_ops.
8242         (add_target): Delete old implementation.
8243         (add_deprecated_target_alias): Change prototype.  Adjust.
8244         (the_native_target): New.
8245         (set_native_target, get_native_target): New.
8246         (find_default_run_target): Use the_native_target.
8247         (find_attach_target, find_run_target): Simplify.
8248         (target_ops::open): Delete.
8249         (dummy_target_info): New.
8250         (dummy_target::shortname, dummy_target::longname)
8251         (dummy_target::doc): Delete.
8252         (dummy_target::info): New.
8253         (debug_target::shortname, debug_target::longname)
8254         (debug_target::doc): Delete.
8255         (debug_target::info): New.
8256         * target.h (struct target_info): New.
8257         (target_ops::~target_ops): Add comment.
8258         (target_ops::info): New.
8259         (target_ops::shortname, target_ops::longname, target_ops::doc): No
8260         longer virtual.  Implement in terms of target_info.
8261         (set_native_target, get_native_target): Declare.
8262         (target_open_ftype): New.
8263         (add_target, add_target_with_completer)
8264         (add_deprecated_target_alias): Change prototype.
8265         (test_target) <shortname, longname, doc>: Delete.
8266         <info>: New.
8267         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
8268         add_inf_child_target.
8269         * tracefile-tfile.c (tfile_target_info): New.
8270         (tfile_target) <shortname, longname, doc>: Delete.
8271         <info>: New.
8272         (tfile_target::open): Rename to ...
8273         (tfile_target_open): ... this.
8274         (_initialize_tracefile_tfile): Adjust.
8275         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
8276         add_inf_child_target.
8277         * windows-nat.c (_initialize_windows_nat): Use
8278         add_inf_child_target.
8279         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
8280         add_inf_child_target.
8281
8282 2018-05-02  Pedro Alves  <palves@redhat.com>
8283
8284         * linux-nat.h (linux_nat_target) <low_new_thread,
8285         low_delete_thread, low_new_fork, low_forget_process,
8286         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
8287         New virtual methods.
8288         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8289         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
8290         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
8291         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8292         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
8293         Delete.
8294         * linux-fork.c (delete_fork): Adjust to call low method.
8295         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
8296         (linux_nat_new_fork, linux_nat_forget_process_hook)
8297         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
8298         (linux_nat_status_is_event):
8299         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
8300         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
8301         to call low method.
8302         (sigtrap_is_event): Rename to ...
8303         (linux_nat_target::low_status_is_event): ... this.
8304         (linux_nat_set_status_is_event): Delete.
8305         (save_stop_reason, linux_nat_wait_1)
8306         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
8307         low methods.
8308         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
8309         (linux_nat_set_new_fork, linux_nat_set_forget_process)
8310         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
8311         (linux_nat_set_prepare_to_resume): Delete.
8312         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
8313         low virtual methods.
8314         * amd64-linux-nat.c: Likewise.
8315         * arm-linux-nat.c: Likewise.
8316         * i386-linux-nat.c: Likewise.
8317         * ia64-linux-nat.c: Likewise.
8318         * mips-linux-nat.c: Likewise.
8319         * ppc-linux-nat.c: Likewise.
8320         * s390-linux-nat.c: Likewise.
8321         * sparc64-linux-nat.c: Likewise.
8322         * x86-linux-nat.c: Likewise.
8323         * x86-linux-nat.h: Include "nat/x86-linux.h".
8324         (x86_linux_nat_target) <low_new_fork, low_forget_process,
8325         low_prepare_to_resume, low_new_thread, low_delete_thread>:
8326         Override methods.
8327
8328 2018-05-02  Pedro Alves  <palves@redhat.com>
8329
8330         * target.h (target_ops)
8331         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
8332         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
8333         stopped_by_watchpoint, have_continuable_watchpoint,
8334         stopped_data_address, watchpoint_addr_within_range,
8335         can_accel_watchpoint_condition, can_run, thread_alive,
8336         has_all_memory, has_memory, has_stack, has_registers,
8337         has_execution, can_async_p, is_async_p, supports_non_stop,
8338         always_non_stop_p, can_execute_reverse, supports_multi_process,
8339         supports_enable_disable_tracepoint,
8340         supports_disable_randomization, supports_string_tracing,
8341         supports_evaluation_of_breakpoint_conditions,
8342         can_run_breakpoint_commands, filesystem_is_local,
8343         can_download_tracepoint, get_trace_state_variable_value,
8344         set_trace_notes, get_tib_address, use_agent, can_use_agent,
8345         record_is_replaying, record_will_replay,
8346         augmented_libraries_svr4_read>: Adjust to return bool.
8347         * aarch64-linux-nat.c: All implementations adjusted.
8348         * aix-thread.c: All implementations adjusted.
8349         * arm-linux-nat.c: All implementations adjusted.
8350         * breakpoint.c: All implementations adjusted.
8351         * bsd-kvm.c: All implementations adjusted.
8352         * bsd-uthread.c: All implementations adjusted.
8353         * corelow.c: All implementations adjusted.
8354         * ctf.c: All implementations adjusted.
8355         * darwin-nat.c: All implementations adjusted.
8356         * darwin-nat.h: All implementations adjusted.
8357         * exec.c: All implementations adjusted.
8358         * fbsd-nat.c: All implementations adjusted.
8359         * fbsd-nat.h: All implementations adjusted.
8360         * gnu-nat.c: All implementations adjusted.
8361         * gnu-nat.h: All implementations adjusted.
8362         * go32-nat.c: All implementations adjusted.
8363         * ia64-linux-nat.c: All implementations adjusted.
8364         * inf-child.c: All implementations adjusted.
8365         * inf-child.h: All implementations adjusted.
8366         * inf-ptrace.c: All implementations adjusted.
8367         * inf-ptrace.h: All implementations adjusted.
8368         * linux-nat.c: All implementations adjusted.
8369         * linux-nat.h: All implementations adjusted.
8370         * mips-linux-nat.c: All implementations adjusted.
8371         * nto-procfs.c: All implementations adjusted.
8372         * ppc-linux-nat.c: All implementations adjusted.
8373         * procfs.c: All implementations adjusted.
8374         * ravenscar-thread.c: All implementations adjusted.
8375         * record-btrace.c: All implementations adjusted.
8376         * record-full.c: All implementations adjusted.
8377         * remote-sim.c: All implementations adjusted.
8378         * remote.c: All implementations adjusted.
8379         * s390-linux-nat.c: All implementations adjusted.
8380         * sol-thread.c: All implementations adjusted.
8381         * spu-multiarch.c: All implementations adjusted.
8382         * target-delegates.c: All implementations adjusted.
8383         * target.c: All implementations adjusted.
8384         * target.h: All implementations adjusted.
8385         * tracefile-tfile.c: All implementations adjusted.
8386         * tracefile.c: All implementations adjusted.
8387         * tracefile.h: All implementations adjusted.
8388         * windows-nat.c: All implementations adjusted.
8389         * x86-linux-nat.h: All implementations adjusted.
8390         * x86-nat.h: All implementations adjusted.
8391
8392 2018-05-02  Pedro Alves  <palves@redhat.com>
8393
8394         * make-target-delegates (scan_target_h): Don't trim lines here.
8395         Replace sequences of tabs and/or whitespace with a single
8396         whitespace.
8397         (top level, parsing methods): Trim each line before processing it
8398         here.
8399
8400 2018-05-02  Pedro Alves  <palves@redhat.com>
8401             John Baldwin  <jhb@freebsd.org>
8402
8403         * target.h (enum strata) <debug_stratum>: New.
8404         (struct target_ops) <all delegation methods>: Replace by C++
8405         virtual methods, and drop "to_" prefix.  All references updated
8406         throughout.
8407         <to_shortname, to_longname, to_doc, to_data,
8408         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
8409         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
8410         virtual methods.  All references updated throughout.
8411         <can_attach, supports_terminal_ours, can_create_inferior,
8412         get_thread_control_capabilities, attach_no_wait>: New
8413         virtual methods.
8414         <insert_breakpoint, remove_breakpoint>: Now
8415         TARGET_DEFAULT_NORETURN methods.
8416         <info_proc>: Now returns bool.
8417         <to_magic>: Delete.
8418         (OPS_MAGIC): Delete.
8419         (current_target): Delete.  All references replaced by references
8420         to ...
8421         (target_stack): ... this.  New.
8422         (target_shortname, target_longname): Adjust.
8423         (target_can_run): Now a function declaration.
8424         (default_child_has_all_memory, default_child_has_memory)
8425         (default_child_has_stack, default_child_has_registers)
8426         (default_child_has_execution): Remove target_ops parameter.
8427         (complete_target_initialization): Delete.
8428         (memory_breakpoint_target): New template class.
8429         (test_target_ops): Refactor as a C++ class with virtual methods.
8430         * make-target-delegates (NAME_PART): Tighten.
8431         (POINTER_PART, CP_SYMBOL): New.
8432         (SIMPLE_RETURN_PART): Reimplement.
8433         (VEC_RETURN_PART): Expect less.
8434         (RETURN_PART, VIRTUAL_PART): New.
8435         (METHOD): Adjust to C++ virtual methods.
8436         (scan_target_h): Remove reference to C99.
8437         (dname): Output "target_ops::" prefix.
8438         (write_function_header): Adjust to output a C++ class method.
8439         (write_declaration): New.
8440         (write_delegator): Adjust to output a C++ class method.
8441         (tdname): Output "dummy_target::" prefix.
8442         (write_tdefault, write_debugmethod): Adjust to output a C++ class
8443         method.
8444         (tdefault_names, debug_names): Delete.
8445         (return_types, tdefaults, styles, argtypes_array): New.
8446         (top level): All methods are delegators.
8447         (print_class): New.
8448         (top level): Print dummy_target and debug_target classes.
8449         * target-delegates.c: Regenerate.
8450         * target-debug.h (target_debug_print_enum_info_proc_what)
8451         (target_debug_print_thread_control_capabilities)
8452         (target_debug_print_thread_info_p): New.
8453         * target.c (dummy_target): Delete.
8454         (the_dummy_target, the_debug_target): New.
8455         (target_stack): Now extern.
8456         (set_targetdebug): Push/unpush debug target.
8457         (default_child_has_all_memory, default_child_has_memory)
8458         (default_child_has_stack, default_child_has_registers)
8459         (default_child_has_execution): Remove target_ops parameter.
8460         (complete_target_initialization): Delete.
8461         (add_target_with_completer): No longer call
8462         complete_target_initialization.
8463         (target_supports_terminal_ours): Use regular delegation.
8464         (update_current_target): Delete.
8465         (push_target): No longer check magic number.  Don't call
8466         update_current_target.
8467         (unpush_target): Don't call update_current_target.
8468         (target_is_pushed): No longer check magic number.
8469         (target_require_runnable): Skip for all stratums over
8470         process_stratum.
8471         (target_ops::info_proc): New.
8472         (target_info_proc): Use find_target_at and
8473         find_default_run_target.
8474         (target_supports_disable_randomization): Use regular delegation.
8475         (target_get_osdata): Use find_target_at.
8476         (target_ops::open, target_ops::close, target_ops::can_attach)
8477         (target_ops::attach, target_ops::can_create_inferior)
8478         (target_ops::create_inferior, target_ops::can_run)
8479         (target_can_run): New.
8480         (default_fileio_target): Use regular delegation.
8481         (target_ops::fileio_open, target_ops::fileio_pwrite)
8482         (target_ops::fileio_pread, target_ops::fileio_fstat)
8483         (target_ops::fileio_close, target_ops::fileio_unlink)
8484         (target_ops::fileio_readlink): New.
8485         (target_fileio_open_1, target_fileio_unlink)
8486         (target_fileio_readlink): Always call the target method.  Handle
8487         FILEIO_ENOSYS.
8488         (return_zero, return_zero_has_execution): Delete.
8489         (init_dummy_target): Delete.
8490         (dummy_target::dummy_target, dummy_target::shortname)
8491         (dummy_target::longname, dummy_target::doc)
8492         (debug_target::debug_target, debug_target::shortname)
8493         (debug_target::longname, debug_target::doc): New.
8494         (target_supports_delete_record): Use regular delegation.
8495         (setup_target_debug): Delete.
8496         (maintenance_print_target_stack): Skip debug_stratum.
8497         (initialize_targets): Instantiate the_dummy_target and
8498         the_debug_target.
8499         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
8500         use target_stack.
8501         (target_auxv_search, fprint_target_auxv): Adjust.
8502         (info_auxv_command): Adjust to use target_stack.
8503         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
8504         * exceptions.c (print_flush): Handle a NULL target_stack.
8505         * regcache.c (target_ops_no_register): Refactor as class with
8506         virtual methods.
8507
8508         * exec.c (exec_target): New class.
8509         (exec_ops): Now an exec_target.
8510         (exec_open, exec_close_1, exec_get_section_table)
8511         (exec_xfer_partial, exec_files_info, exec_has_memory)
8512         (exec_make_note_section): Refactor as exec_target methods.
8513         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
8514         Delete.
8515         (exec_target::find_memory_regions): New.
8516         (_initialize_exec): Don't call init_exec_ops.
8517         * gdbcore.h (exec_file_clear): Delete.
8518
8519         * corefile.c (core_target): Delete.
8520         (core_file_command): Adjust.
8521         * corelow.c (core_target): New class.
8522         (the_core_target): New.
8523         (core_close): Remove target_ops parameter.
8524         (core_close_cleanup): Adjust.
8525         (core_target::close): New.
8526         (core_open, core_detach, get_core_registers, core_files_info)
8527         (core_xfer_partial, core_thread_alive, core_read_description)
8528         (core_pid_to_str, core_thread_name, core_has_memory)
8529         (core_has_stack, core_has_registers, core_info_proc): Rework as
8530         core_target methods.
8531         (ignore, core_remove_breakpoint, init_core_ops): Delete.
8532         (_initialize_corelow): Initialize the_core_target.
8533         * gdbcore.h (core_target): Delete.
8534         (the_core_target): New.
8535
8536         * ctf.c: (ctf_target): New class.
8537         (ctf_ops): Now a ctf_target.
8538         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
8539         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
8540         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
8541         methods.
8542         (init_ctf_ops): Delete.
8543         (_initialize_ctf): Don't call it.
8544         * tracefile-tfile.c (tfile_target): New class.
8545         (tfile_ops): Now a tfile_target.
8546         (tfile_open, tfile_close, tfile_files_info)
8547         (tfile_get_tracepoint_status, tfile_trace_find)
8548         (tfile_fetch_registers, tfile_xfer_partial)
8549         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
8550         Refactor as tfile_target methods.
8551         (tfile_xfer_partial_features): Remove target_ops parameter.
8552         (init_tfile_ops): Delete.
8553         (_initialize_tracefile_tfile): Don't call it.
8554         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
8555         (tracefile_has_stack, tracefile_has_registers)
8556         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
8557         tracefile_target methods.
8558         (init_tracefile_ops): Delete.
8559         (tracefile_target::tracefile_target): New.
8560         * tracefile.h: Include "target.h".
8561         (tracefile_target): New class.
8562         (init_tracefile_ops): Delete.
8563
8564         * spu-multiarch.c (spu_multiarch_target): New class.
8565         (spu_ops): Now a spu_multiarch_target.
8566         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
8567         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
8568         (spu_search_memory, spu_mourn_inferior): Refactor as
8569         spu_multiarch_target methods.
8570         (init_spu_ops): Delete.
8571         (_initialize_spu_multiarch): Remove references to init_spu_ops,
8572         complete_target_initialization.
8573
8574         * ravenscar-thread.c (ravenscar_thread_target): New class.
8575         (ravenscar_ops): Now a ravenscar_thread_target.
8576         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
8577         (ravenscar_thread_alive, ravenscar_pid_to_str)
8578         (ravenscar_fetch_registers, ravenscar_store_registers)
8579         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
8580         (ravenscar_stopped_by_hw_breakpoint)
8581         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
8582         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
8583         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
8584         methods.
8585         (init_ravenscar_thread_ops): Delete.
8586         (_initialize_ravenscar): Remove references to
8587         init_ravenscar_thread_ops and complete_target_initialization.
8588
8589         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
8590         (bsd_uthread_target): New class.
8591         (bsd_uthread_ops): Now a bsd_uthread_target.
8592         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
8593         (bsd_uthread_close, bsd_uthread_mourn_inferior)
8594         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
8595         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
8596         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
8597         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
8598         (bsd_uthread_target): Delete function.
8599         (_initialize_bsd_uthread): Remove reference to
8600         complete_target_initialization.
8601
8602         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
8603         (target_bfd): ... this new class.
8604         (target_bfd_xfer_partial, target_bfd_get_section_table)
8605         (target_bfd_close): Refactor as target_bfd methods.
8606         (target_bfd::~target_bfd): New.
8607         (target_bfd_reopen): Adjust.
8608         (target_bfd::close): New.
8609
8610         * record-btrace.c (record_btrace_target): New class.
8611         (record_btrace_ops): Now a record_btrace_target.
8612         (record_btrace_open, record_btrace_stop_recording)
8613         (record_btrace_disconnect, record_btrace_close)
8614         (record_btrace_async, record_btrace_info)
8615         (record_btrace_insn_history, record_btrace_insn_history_range)
8616         (record_btrace_insn_history_from, record_btrace_call_history)
8617         (record_btrace_call_history_range)
8618         (record_btrace_call_history_from, record_btrace_record_method)
8619         (record_btrace_is_replaying, record_btrace_will_replay)
8620         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
8621         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
8622         (record_btrace_store_registers, record_btrace_prepare_to_store)
8623         (record_btrace_to_get_unwinder)
8624         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
8625         (record_btrace_commit_resume, record_btrace_wait)
8626         (record_btrace_stop, record_btrace_can_execute_reverse)
8627         (record_btrace_stopped_by_sw_breakpoint)
8628         (record_btrace_supports_stopped_by_sw_breakpoint)
8629         (record_btrace_stopped_by_hw_breakpoint)
8630         (record_btrace_supports_stopped_by_hw_breakpoint)
8631         (record_btrace_update_thread_list, record_btrace_thread_alive)
8632         (record_btrace_goto_begin, record_btrace_goto_end)
8633         (record_btrace_goto, record_btrace_stop_replaying_all)
8634         (record_btrace_execution_direction)
8635         (record_btrace_prepare_to_generate_core)
8636         (record_btrace_done_generating_core): Refactor as
8637         record_btrace_target methods.
8638         (init_record_btrace_ops): Delete.
8639         (_initialize_record_btrace): Remove reference to
8640         init_record_btrace_ops.
8641         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
8642         the execution_direction global.
8643         (record_full_base_target, record_full_target)
8644         (record_full_core_target): New classes.
8645         (record_full_ops): Now a record_full_target.
8646         (record_full_core_ops): Now a record_full_core_target.
8647         (record_full_target::detach, record_full_target::disconnect)
8648         (record_full_core_target::disconnect)
8649         (record_full_target::mourn_inferior, record_full_target::kill):
8650         New.
8651         (record_full_open, record_full_close, record_full_async): Refactor
8652         as methods of the record_full_base_target class.
8653         (record_full_resume, record_full_commit_resume): Refactor
8654         as methods of the record_full_target class.
8655         (record_full_wait, record_full_stopped_by_watchpoint)
8656         (record_full_stopped_data_address)
8657         (record_full_stopped_by_sw_breakpoint)
8658         (record_full_supports_stopped_by_sw_breakpoint)
8659         (record_full_stopped_by_hw_breakpoint)
8660         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
8661         methods of the record_full_base_target class.
8662         (record_full_store_registers, record_full_xfer_partial)
8663         (record_full_insert_breakpoint, record_full_remove_breakpoint):
8664         Refactor as methods of the record_full_target class.
8665         (record_full_can_execute_reverse, record_full_get_bookmark)
8666         (record_full_goto_bookmark, record_full_execution_direction)
8667         (record_full_record_method, record_full_info, record_full_delete)
8668         (record_full_is_replaying, record_full_will_replay)
8669         (record_full_goto_begin, record_full_goto_end, record_full_goto)
8670         (record_full_stop_replaying): Refactor as methods of the
8671         record_full_base_target class.
8672         (record_full_core_resume, record_full_core_kill)
8673         (record_full_core_fetch_registers)
8674         (record_full_core_prepare_to_store)
8675         (record_full_core_store_registers, record_full_core_xfer_partial)
8676         (record_full_core_insert_breakpoint)
8677         (record_full_core_remove_breakpoint)
8678         (record_full_core_has_execution): Refactor
8679         as methods of the record_full_core_target class.
8680         (record_full_base_target::supports_delete_record): New.
8681         (init_record_full_ops): Delete.
8682         (init_record_full_core_ops): Delete.
8683         (record_full_save): Refactor as method of the
8684         record_full_base_target class.
8685         (_initialize_record_full): Remove references to
8686         init_record_full_ops and init_record_full_core_ops.
8687
8688         * remote.c (remote_target, extended_remote_target): New classes.
8689         (remote_ops): Now a remote_target.
8690         (extended_remote_ops): Now an extended_remote_target.
8691         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
8692         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
8693         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
8694         (remote_pass_signals, remote_set_syscall_catchpoint)
8695         (remote_program_signals, )
8696         (remote_thread_always_alive): Remove target_ops parameter.
8697         (remote_thread_alive, remote_thread_name)
8698         (remote_update_thread_list, remote_threads_extra_info)
8699         (remote_static_tracepoint_marker_at)
8700         (remote_static_tracepoint_markers_by_strid)
8701         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
8702         (remote_open): Refactor as methods of remote_target.
8703         (extended_remote_open, extended_remote_detach)
8704         (extended_remote_attach, extended_remote_post_attach):
8705         (extended_remote_supports_disable_randomization)
8706         (extended_remote_create_inferior): : Refactor as method of
8707         extended_remote_target.
8708         (remote_set_permissions, remote_open_1, remote_detach)
8709         (remote_follow_fork, remote_follow_exec, remote_disconnect)
8710         (remote_resume, remote_commit_resume, remote_stop)
8711         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
8712         (remote_terminal_ours, remote_wait, remote_fetch_registers)
8713         (remote_prepare_to_store, remote_store_registers)
8714         (remote_flash_erase, remote_flash_done, remote_files_info)
8715         (remote_kill, remote_mourn, remote_insert_breakpoint)
8716         (remote_remove_breakpoint, remote_insert_watchpoint)
8717         (remote_watchpoint_addr_within_range)
8718         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
8719         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
8720         (remote_supports_stopped_by_sw_breakpoint)
8721         (remote_stopped_by_hw_breakpoint)
8722         (remote_supports_stopped_by_hw_breakpoint)
8723         (remote_stopped_by_watchpoint, remote_stopped_data_address)
8724         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
8725         (remote_verify_memory): Refactor as methods of remote_target.
8726         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
8727         parameter.
8728         (remote_xfer_partial, remote_get_memory_xfer_limit)
8729         (remote_search_memory, remote_rcmd, remote_memory_map)
8730         (remote_pid_to_str, remote_get_thread_local_address)
8731         (remote_get_tib_address, remote_read_description): Refactor as
8732         methods of remote_target.
8733         (remote_target::fileio_open, remote_target::fileio_pwrite)
8734         (remote_target::fileio_pread, remote_target::fileio_close): New.
8735         (remote_hostio_readlink, remote_hostio_fstat)
8736         (remote_filesystem_is_local, remote_can_execute_reverse)
8737         (remote_supports_non_stop, remote_supports_disable_randomization)
8738         (remote_supports_multi_process, remote_supports_cond_breakpoints)
8739         (remote_supports_enable_disable_tracepoint)
8740         (remote_supports_string_tracing)
8741         (remote_can_run_breakpoint_commands, remote_trace_init)
8742         (remote_download_tracepoint, remote_can_download_tracepoint)
8743         (remote_download_trace_state_variable, remote_enable_tracepoint)
8744         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
8745         (remote_trace_start, remote_get_trace_status)
8746         (remote_get_tracepoint_status, remote_trace_stop)
8747         (remote_trace_find, remote_get_trace_state_variable_value)
8748         (remote_save_trace_data, remote_get_raw_trace_data)
8749         (remote_set_disconnected_tracing, remote_core_of_thread)
8750         (remote_set_circular_trace_buffer, remote_traceframe_info)
8751         (remote_get_min_fast_tracepoint_insn_len)
8752         (remote_set_trace_buffer_size, remote_set_trace_notes)
8753         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
8754         (remote_disable_btrace, remote_teardown_btrace)
8755         (remote_read_btrace, remote_btrace_conf)
8756         (remote_augmented_libraries_svr4_read, remote_load)
8757         (remote_pid_to_exec_file, remote_can_do_single_step)
8758         (remote_execution_direction, remote_thread_handle_to_thread_info):
8759         Refactor as methods of remote_target.
8760         (init_remote_ops, init_extended_remote_ops): Delete.
8761         (remote_can_async_p, remote_is_async_p, remote_async)
8762         (remote_thread_events, remote_upload_tracepoints)
8763         (remote_upload_trace_state_variables): Refactor as methods of
8764         remote_target.
8765         (_initialize_remote): Remove references to init_remote_ops and
8766         init_extended_remote_ops.
8767
8768         * remote-sim.c (gdbsim_target): New class.
8769         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
8770         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
8771         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
8772         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
8773         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
8774         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
8775         Refactor as methods of gdbsim_target.
8776         (gdbsim_ops): Now a gdbsim_target.
8777         (init_gdbsim_ops): Delete.
8778         (gdbsim_cntrl_c): Adjust.
8779         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
8780
8781         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
8782         (the_amd64_linux_nat_target): New.
8783         (amd64_linux_fetch_inferior_registers)
8784         (amd64_linux_store_inferior_registers): Refactor as methods of
8785         amd64_linux_nat_target.
8786         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
8787         * i386-linux-nat.c: Don't include "linux-nat.h".
8788         (i386_linux_nat_target): New class.
8789         (the_i386_linux_nat_target): New.
8790         (i386_linux_fetch_inferior_registers)
8791         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
8792         as methods of i386_linux_nat_target.
8793         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
8794         * inf-child.c (inf_child_ops): Delete.
8795         (inf_child_fetch_inferior_registers)
8796         (inf_child_store_inferior_registers): Delete.
8797         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
8798         methods of inf_child_target.
8799         (inf_child_target::supports_terminal_ours)
8800         (inf_child_target::terminal_init)
8801         (inf_child_target::terminal_inferior)
8802         (inf_child_target::terminal_ours_for_output)
8803         (inf_child_target::terminal_ours, inf_child_target::interrupt)
8804         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
8805         New.
8806         (inf_child_open, inf_child_disconnect, inf_child_close)
8807         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
8808         (inf_child_post_startup_inferior, inf_child_can_run)
8809         (inf_child_pid_to_exec_file): Refactor as methods of
8810         inf_child_target.
8811         (inf_child_follow_fork): Delete.
8812         (inf_child_target::can_create_inferior)
8813         (inf_child_target::can_attach): New.
8814         (inf_child_target::has_all_memory, inf_child_target::has_memory)
8815         (inf_child_target::has_stack, inf_child_target::has_registers)
8816         (inf_child_target::has_execution): New.
8817         (inf_child_fileio_open, inf_child_fileio_pwrite)
8818         (inf_child_fileio_pread, inf_child_fileio_fstat)
8819         (inf_child_fileio_close, inf_child_fileio_unlink)
8820         (inf_child_fileio_readlink, inf_child_use_agent)
8821         (inf_child_can_use_agent): Refactor as methods of
8822         inf_child_target.
8823         (return_zero, inf_child_target): Delete.
8824         (inf_child_target::inf_child_target): New.
8825         * inf-child.h: Include "target.h".
8826         (inf_child_target): Delete function prototype.
8827         (inf_child_target): New class.
8828         (inf_child_open_target, inf_child_mourn_inferior)
8829         (inf_child_maybe_unpush_target): Delete.
8830         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
8831         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
8832         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
8833         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
8834         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
8835         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
8836         (inf_ptrace_wait, inf_ptrace_xfer_partial)
8837         (inf_ptrace_thread_alive, inf_ptrace_files_info)
8838         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
8839         methods of inf_ptrace_target.
8840         (inf_ptrace_target): Delete function.
8841         * inf-ptrace.h: Include "inf-child.h".
8842         (inf_ptrace_target): Delete function declaration.
8843         (inf_ptrace_target): New class.
8844         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
8845         * linux-nat.c (linux_target): New.
8846         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
8847         (linux_nat_target::~linux_nat_target): New.
8848         (linux_child_post_attach, linux_child_post_startup_inferior)
8849         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
8850         (linux_child_remove_fork_catchpoint)
8851         (linux_child_insert_vfork_catchpoint)
8852         (linux_child_remove_vfork_catchpoint)
8853         (linux_child_insert_exec_catchpoint)
8854         (linux_child_remove_exec_catchpoint)
8855         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
8856         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
8857         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
8858         (linux_nat_stopped_data_address)
8859         (linux_nat_stopped_by_sw_breakpoint)
8860         (linux_nat_supports_stopped_by_sw_breakpoint)
8861         (linux_nat_stopped_by_hw_breakpoint)
8862         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
8863         (linux_nat_kill, linux_nat_mourn_inferior)
8864         (linux_nat_xfer_partial, linux_nat_thread_alive)
8865         (linux_nat_update_thread_list, linux_nat_pid_to_str)
8866         (linux_nat_thread_name, linux_child_pid_to_exec_file)
8867         (linux_child_static_tracepoint_markers_by_strid)
8868         (linux_nat_is_async_p, linux_nat_can_async_p)
8869         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
8870         (linux_nat_supports_multi_process)
8871         (linux_nat_supports_disable_randomization, linux_nat_async)
8872         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
8873         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
8874         (linux_nat_fileio_open, linux_nat_fileio_readlink)
8875         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
8876         methods of linux_nat_target.
8877         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
8878         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
8879         parameter.
8880         (check_stopped_by_watchpoint): Adjust.
8881         (linux_xfer_partial): Delete.
8882         (linux_target_install_ops, linux_target, linux_nat_add_target):
8883         Delete.
8884         (linux_nat_target::linux_nat_target): New.
8885         * linux-nat.h: Include "inf-ptrace.h".
8886         (linux_nat_target): New.
8887         (linux_target, linux_target_install_ops, linux_nat_add_target):
8888         Delete function declarations.
8889         (linux_target): Declare global.
8890         * linux-thread-db.c (thread_db_target): New.
8891         (thread_db_target::thread_db_target): New.
8892         (thread_db_ops): Delete.
8893         (the_thread_db_target): New.
8894         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
8895         (thread_db_update_thread_list, thread_db_pid_to_str)
8896         (thread_db_extra_thread_info)
8897         (thread_db_thread_handle_to_thread_info)
8898         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
8899         (thread_db_resume): Refactor as methods of thread_db_target.
8900         (init_thread_db_ops): Delete.
8901         (_initialize_thread_db): Remove reference to init_thread_db_ops.
8902         * x86-linux-nat.c: Don't include "linux-nat.h".
8903         (super_post_startup_inferior): Delete.
8904         (x86_linux_nat_target::~x86_linux_nat_target): New.
8905         (x86_linux_child_post_startup_inferior)
8906         (x86_linux_read_description, x86_linux_enable_btrace)
8907         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
8908         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
8909         methods of x86_linux_nat_target.
8910         (x86_linux_create_target): Delete.  Bits folded ...
8911         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
8912         pointer.
8913         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
8914         (x86_linux_nat_target): New class.
8915         (x86_linux_create_target): Delete.
8916         (x86_linux_add_target): Now takes a linux_nat_target pointer.
8917         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
8918         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
8919         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
8920         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
8921         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
8922         make extern.
8923         (x86_use_watchpoints): Delete.
8924         * x86-nat.h: Include "breakpoint.h" and "target.h".
8925         (x86_use_watchpoints): Delete.
8926         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
8927         (x86_stopped_by_watchpoint, x86_stopped_data_address)
8928         (x86_insert_watchpoint, x86_remove_watchpoint)
8929         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
8930         (x86_stopped_by_hw_breakpoint): New declarations.
8931         (x86_nat_target): New template class.
8932
8933         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
8934         (the_ppc_linux_nat_target): New.
8935         (ppc_linux_fetch_inferior_registers)
8936         (ppc_linux_can_use_hw_breakpoint)
8937         (ppc_linux_region_ok_for_hw_watchpoint)
8938         (ppc_linux_ranged_break_num_registers)
8939         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
8940         (ppc_linux_insert_mask_watchpoint)
8941         (ppc_linux_remove_mask_watchpoint)
8942         (ppc_linux_can_accel_watchpoint_condition)
8943         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
8944         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
8945         (ppc_linux_watchpoint_addr_within_range)
8946         (ppc_linux_masked_watch_num_registers)
8947         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
8948         (ppc_linux_read_description): Refactor as methods of
8949         ppc_linux_nat_target.
8950         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
8951
8952         * procfs.c (procfs_xfer_partial): Delete forward declaration.
8953         (procfs_target): New class.
8954         (the_procfs_target): New.
8955         (procfs_target): Delete function.
8956         (procfs_auxv_parse, procfs_attach, procfs_detach)
8957         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
8958         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
8959         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
8960         (procfs_create_inferior, procfs_update_thread_list)
8961         (procfs_thread_alive, procfs_pid_to_str)
8962         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
8963         (procfs_stopped_data_address, procfs_insert_watchpoint)
8964         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
8965         (proc_find_memory_regions, procfs_info_proc)
8966         (procfs_make_note_section): Refactor as methods of procfs_target.
8967         (_initialize_procfs): Adjust.
8968         * sol-thread.c (sol_thread_target): New class.
8969         (sol_thread_ops): Now a sol_thread_target.
8970         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
8971         (sol_thread_fetch_registers, sol_thread_store_registers)
8972         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
8973         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
8974         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
8975         (init_sol_thread_ops): Delete.
8976         (_initialize_sol_thread): Adjust.  Remove references to
8977         init_sol_thread_ops and complete_target_initialization.
8978
8979         * windows-nat.c (windows_nat_target): New class.
8980         (windows_fetch_inferior_registers)
8981         (windows_store_inferior_registers, windows_resume, windows_wait)
8982         (windows_attach, windows_detach, windows_pid_to_exec_file)
8983         (windows_files_info, windows_create_inferior)
8984         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
8985         (windows_close, windows_pid_to_str, windows_xfer_partial)
8986         (windows_get_tib_address, windows_get_ada_task_ptid)
8987         (windows_thread_name, windows_thread_alive): Refactor as
8988         windows_nat_target methods.
8989         (do_initial_windows_stuff): Adjust.
8990         (windows_target): Delete function.
8991         (_initialize_windows_nat): Adjust.
8992
8993         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
8994         (darwin_mourn_inferior, darwin_kill_inferior)
8995         (darwin_create_inferior, darwin_attach, darwin_detach)
8996         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
8997         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
8998         (darwin_supports_multi_process): Refactor as darwin_nat_target
8999         methods.
9000         (darwin_resume_to, darwin_files_info): Delete.
9001         (_initialize_darwin_inferior): Rename to ...
9002         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
9003         * darwin-nat.h: Include "inf-child.h".
9004         (darwin_nat_target): New class.
9005         (darwin_complete_target): Delete.
9006         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9007         (darwin_target): New.
9008         (i386_darwin_fetch_inferior_registers)
9009         (i386_darwin_store_inferior_registers): Refactor as methods of
9010         darwin_nat_target.
9011         (darwin_complete_target): Delete, with ...
9012         (_initialize_i386_darwin_nat): ... bits factored out here.
9013
9014         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9015         (the_alpha_linux_nat_target): New.
9016         (alpha_linux_register_u_offset): Refactor as
9017         alpha_linux_nat_target method.
9018         (_initialize_alpha_linux_nat): Adjust.
9019         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9020         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9021         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9022         methods of linux_nat_trad_target.
9023         (linux_trad_target): Delete.
9024         * linux-nat-trad.h (linux_trad_target): Delete function.
9025         (linux_nat_trad_target): New class.
9026         * mips-linux-nat.c (mips_linux_nat_target): New class.
9027         (super_fetch_registers, super_store_registers, super_close):
9028         Delete.
9029         (the_mips_linux_nat_target): New.
9030         (mips64_linux_regsets_fetch_registers)
9031         (mips64_linux_regsets_store_registers)
9032         (mips64_linux_fetch_registers, mips64_linux_store_registers)
9033         (mips_linux_register_u_offset, mips_linux_read_description)
9034         (mips_linux_can_use_hw_breakpoint)
9035         (mips_linux_stopped_by_watchpoint)
9036         (mips_linux_stopped_data_address)
9037         (mips_linux_region_ok_for_hw_watchpoint)
9038         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9039         (mips_linux_close): Refactor as methods of mips_linux_nat.
9040         (_initialize_mips_linux_nat): Adjust to C++ification.
9041
9042         * aix-thread.c (aix_thread_target): New class.
9043         (aix_thread_ops): Now an aix_thread_target.
9044         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
9045         (aix_thread_fetch_registers, aix_thread_store_registers)
9046         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
9047         (aix_thread_thread_alive, aix_thread_pid_to_str)
9048         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
9049         Refactor as methods of aix_thread_target.
9050         (init_aix_thread_ops): Delete.
9051         (_initialize_aix_thread): Remove references to init_aix_thread_ops
9052         and complete_target_initialization.
9053         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
9054         (rs6000_nat_target): New class.
9055         (the_rs6000_nat_target): New.
9056         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
9057         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
9058         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
9059         (super_create_inferior): Delete.
9060         (_initialize_rs6000_nat): Adjust to C++ification.
9061
9062         * arm-linux-nat.c (arm_linux_nat_target): New class.
9063         (the_arm_linux_nat_target): New.
9064         (arm_linux_fetch_inferior_registers)
9065         (arm_linux_store_inferior_registers, arm_linux_read_description)
9066         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
9067         (arm_linux_remove_hw_breakpoint)
9068         (arm_linux_region_ok_for_hw_watchpoint)
9069         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
9070         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
9071         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
9072         arm_linux_nat_target.
9073         (_initialize_arm_linux_nat): Adjust to C++ification.
9074
9075         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
9076         (the_aarch64_linux_nat_target): New.
9077         (aarch64_linux_fetch_inferior_registers)
9078         (aarch64_linux_store_inferior_registers)
9079         (aarch64_linux_child_post_startup_inferior)
9080         (aarch64_linux_read_description)
9081         (aarch64_linux_can_use_hw_breakpoint)
9082         (aarch64_linux_insert_hw_breakpoint)
9083         (aarch64_linux_remove_hw_breakpoint)
9084         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
9085         (aarch64_linux_region_ok_for_hw_watchpoint)
9086         (aarch64_linux_stopped_data_address)
9087         (aarch64_linux_stopped_by_watchpoint)
9088         (aarch64_linux_watchpoint_addr_within_range)
9089         (aarch64_linux_can_do_single_step): Refactor as methods of
9090         aarch64_linux_nat_target.
9091         (super_post_startup_inferior): Delete.
9092         (_initialize_aarch64_linux_nat): Adjust to C++ification.
9093
9094         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
9095         (the_hppa_linux_nat_target): New.
9096         (hppa_linux_fetch_inferior_registers)
9097         (hppa_linux_store_inferior_registers): Refactor as methods of
9098         hppa_linux_nat_target.
9099         (_initialize_hppa_linux_nat): Adjust to C++ification.
9100
9101         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
9102         (the_ia64_linux_nat_target): New.
9103         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
9104         (ia64_linux_stopped_data_address)
9105         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
9106         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
9107         ia64_linux_nat_target methods.
9108         (super_xfer_partial): Delete.
9109         (_initialize_ia64_linux_nat): Adjust to C++ification.
9110
9111         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
9112         (the_m32r_linux_nat_target): New.
9113         (m32r_linux_fetch_inferior_registers)
9114         (m32r_linux_store_inferior_registers): Refactor as
9115         m32r_linux_nat_target methods.
9116         (_initialize_m32r_linux_nat): Adjust to C++ification.
9117
9118         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
9119         (the_m68k_linux_nat_target): New.
9120         (m68k_linux_fetch_inferior_registers)
9121         (m68k_linux_store_inferior_registers): Refactor as
9122         m68k_linux_nat_target methods.
9123         (_initialize_m68k_linux_nat): Adjust to C++ification.
9124
9125         * s390-linux-nat.c (s390_linux_nat_target): New class.
9126         (the_s390_linux_nat_target): New.
9127         (s390_linux_fetch_inferior_registers)
9128         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
9129         (s390_insert_watchpoint, s390_remove_watchpoint)
9130         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
9131         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
9132         (s390_auxv_parse, s390_read_description): Refactor as methods of
9133         s390_linux_nat_target.
9134         (_initialize_s390_nat): Adjust to C++ification.
9135
9136         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
9137         (the_sparc_linux_nat_target): New.
9138         (_initialize_sparc_linux_nat): Adjust to C++ification.
9139         * sparc-nat.c (sparc_fetch_inferior_registers)
9140         (sparc_store_inferior_registers): Remove target_ops parameter.
9141         * sparc-nat.h (sparc_fetch_inferior_registers)
9142         (sparc_store_inferior_registers): Remove target_ops parameter.
9143         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
9144         (the_sparc64_linux_nat_target): New.
9145         (_initialize_sparc64_linux_nat): Adjust to C++ification.
9146
9147         * spu-linux-nat.c (spu_linux_nat_target): New class.
9148         (the_spu_linux_nat_target): New.
9149         (spu_child_post_startup_inferior, spu_child_post_attach)
9150         (spu_child_wait, spu_fetch_inferior_registers)
9151         (spu_store_inferior_registers, spu_xfer_partial)
9152         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
9153         methods.
9154         (_initialize_spu_nat): Adjust to C++ification.
9155
9156         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
9157         (the_tilegx_linux_nat_target): New.
9158         (fetch_inferior_registers, store_inferior_registers):
9159         Refactor as methods.
9160         (_initialize_tile_linux_nat): Adjust to C++ification.
9161
9162         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
9163         (the_xtensa_linux_nat_target): New.
9164         (xtensa_linux_fetch_inferior_registers)
9165         (xtensa_linux_store_inferior_registers): Refactor as
9166         xtensa_linux_nat_target methods.
9167         (_initialize_xtensa_linux_nat): Adjust to C++ification.
9168
9169         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
9170         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
9171         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
9172         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
9173         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
9174         (fbsd_stopped_by_sw_breakpoint)
9175         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
9176         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
9177         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
9178         (fbsd_post_startup_inferior, fbsd_post_attach)
9179         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
9180         (fbsd_set_syscall_catchpoint)
9181         (super_xfer_partial, super_resume, super_wait)
9182         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
9183         (fbsd_handle_debug_trap): Remove target_ops parameter.
9184         (fbsd_nat_add_target): Delete.
9185         * fbsd-nat.h: Include "inf-ptrace.h".
9186         (fbsd_nat_add_target): Delete.
9187         (USE_SIGTRAP_SIGINFO): Define.
9188         (fbsd_nat_target): New class.
9189
9190         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
9191         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
9192         (amd64bsd_target): Delete.
9193         * amd64-bsd-nat.h: New file.
9194         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
9195         "x86-bsd-nat.h".
9196         (amd64_fbsd_nat_target): New class.
9197         (the_amd64_fbsd_nat_target): New.
9198         (amd64fbsd_read_description): Refactor as method of
9199         amd64_fbsd_nat_target.
9200         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9201         (_initialize_amd64fbsd_nat): Adjust to C++ification.
9202         * amd64-nat.h (amd64bsd_target): Delete function declaration.
9203         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
9204         (i386bsd_store_inferior_registers): Remove target_ops parameter.
9205         (i386bsd_target): Delete.
9206         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
9207         (i386bsd_fetch_inferior_registers)
9208         (i386bsd_store_inferior_registers): Declare.
9209         (i386_bsd_nat_target): New class.
9210         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
9211         (the_i386_fbsd_nat_target): New.
9212         (i386fbsd_resume, i386fbsd_read_description): Refactor as
9213         i386_fbsd_nat_target methods.
9214         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
9215         (_initialize_i386fbsd_nat): Adjust to C++ification.
9216         * x86-bsd-nat.c (super_mourn_inferior): Delete.
9217         (x86bsd_mourn_inferior, x86bsd_target): Delete.
9218         (_initialize_x86_bsd_nat): Adjust to C++ification.
9219         * x86-bsd-nat.h: Include "x86-nat.h".
9220         (x86bsd_target): Delete declaration.
9221         (x86bsd_nat_target): New class.
9222
9223         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
9224         (the_aarch64_fbsd_nat_target): New.
9225         (aarch64_fbsd_fetch_inferior_registers)
9226         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
9227         aarch64_fbsd_nat_target.
9228         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
9229         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
9230         (the_alpha_bsd_nat_target): New.
9231         (alphabsd_fetch_inferior_registers)
9232         (alphabsd_store_inferior_registers): Refactor as
9233         alpha_bsd_nat_target methods.
9234         (_initialize_alphabsd_nat): Refactor as methods of
9235         alpha_bsd_nat_target.
9236         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
9237         (the_amd64_nbsd_nat_target): New.
9238         (_initialize_amd64nbsd_nat): Adjust to C++ification.
9239         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
9240         (the_amd64_obsd_nat_target): New.
9241         (_initialize_amd64obsd_nat): Adjust to C++ification.
9242         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
9243         (the_arm_fbsd_nat_target): New.
9244         (arm_fbsd_fetch_inferior_registers)
9245         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
9246         (_initialize_arm_fbsd_nat): Refactor as methods of
9247         arm_fbsd_nat_target.
9248         (_initialize_arm_fbsd_nat): Adjust to C++ification.
9249         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
9250         (the_arm_netbsd_nat_target): New.
9251         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
9252         arm_netbsd_nat_target.
9253         (_initialize_arm_netbsd_nat): Adjust to C++ification.
9254         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
9255         (the_hppa_nbsd_nat_target): New.
9256         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
9257         hppa_nbsd_nat_target methods.
9258         (_initialize_hppanbsd_nat): Adjust to C++ification.
9259         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
9260         (the_hppa_obsd_nat_target): New.
9261         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
9262         methods of hppa_obsd_nat_target.
9263         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
9264         add_target.
9265         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
9266         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
9267         add_target.
9268         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
9269         (_initialize_i386obsd_nat): Use add_target.
9270         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
9271         (the_m68k_bsd_nat_target): New.
9272         (m68kbsd_fetch_inferior_registers)
9273         (m68kbsd_store_inferior_registers): Refactor as methods of
9274         m68k_bsd_nat_target.
9275         (_initialize_m68kbsd_nat): Adjust to C++ification.
9276         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
9277         (the_mips_fbsd_nat_target): New.
9278         (mips_fbsd_fetch_inferior_registers)
9279         (mips_fbsd_store_inferior_registers): Refactor as methods of
9280         mips_fbsd_nat_target.
9281         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
9282         add_target.
9283         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
9284         (the_mips_nbsd_nat_target): New.
9285         (mipsnbsd_fetch_inferior_registers)
9286         (mipsnbsd_store_inferior_registers): Refactor as methods of
9287         mips_nbsd_nat_target.
9288         (_initialize_mipsnbsd_nat): Adjust to C++ification.
9289         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
9290         (the_mips64_obsd_nat_target): New.
9291         (mips64obsd_fetch_inferior_registers)
9292         (mips64obsd_store_inferior_registers): Refactor as methods of
9293         mips64_obsd_nat_target.
9294         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
9295         add_target.
9296         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
9297         nbsd_nat_target.
9298         * nbsd-nat.h: Include "inf-ptrace.h".
9299         (nbsd_nat_target): New class.
9300         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
9301         (obsd_wait): Refactor as methods of obsd_nat_target.
9302         (obsd_add_target): Delete.
9303         * obsd-nat.h: Include "inf-ptrace.h".
9304         (obsd_nat_target): New class.
9305         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
9306         (the_ppc_fbsd_nat_target): New.
9307         (ppcfbsd_fetch_inferior_registers)
9308         (ppcfbsd_store_inferior_registers): Refactor as methods of
9309         ppc_fbsd_nat_target.
9310         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
9311         add_target.
9312         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
9313         (the_ppc_nbsd_nat_target): New.
9314         (ppcnbsd_fetch_inferior_registers)
9315         (ppcnbsd_store_inferior_registers): Refactor as methods of
9316         ppc_nbsd_nat_target.
9317         (_initialize_ppcnbsd_nat): Adjust to C++ification.
9318         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
9319         (the_ppc_obsd_nat_target): New.
9320         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
9321         methods of ppc_obsd_nat_target.
9322         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
9323         add_target.
9324         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
9325         (the_sh_nbsd_nat_target): New.
9326         (shnbsd_fetch_inferior_registers)
9327         (shnbsd_store_inferior_registers): Refactor as methods of
9328         sh_nbsd_nat_target.
9329         (_initialize_shnbsd_nat): Adjust to C++ification.
9330         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
9331         (inf_ptrace_xfer_partial): Delete.
9332         (sparc_xfer_partial, sparc_target): Delete.
9333         * sparc-nat.h (sparc_fetch_inferior_registers)
9334         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
9335         (sparc_target): Delete function declaration.
9336         (sparc_target): New template class.
9337         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
9338         (_initialize_sparcnbsd_nat): Adjust to C++ification.
9339         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
9340         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
9341         add_target.
9342         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
9343         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
9344         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
9345         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
9346         add_target.
9347         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
9348         (the_vax_bsd_nat_target): New.
9349         (vaxbsd_fetch_inferior_registers)
9350         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
9351         methods.
9352         (_initialize_vaxbsd_nat): Adjust to C++ification.
9353
9354         * bsd-kvm.c (bsd_kvm_target): New class.
9355         (bsd_kvm_ops): Now a bsd_kvm_target.
9356         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
9357         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
9358         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
9359         bsd_kvm_target.
9360         (bsd_kvm_return_one): Delete.
9361         (bsd_kvm_add_target): Adjust to C++ification.
9362
9363         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
9364         (nto_procfs_target_procfs): New classes.
9365         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
9366         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
9367         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
9368         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
9369         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
9370         (procfs_remove_hw_breakpoint, procfs_resume)
9371         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
9372         (procfs_kill_inferior, procfs_store_registers)
9373         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
9374         as methods of nto_procfs_target.
9375         (nto_procfs_ops): Now an nto_procfs_target_procfs.
9376         (nto_native_ops): Delete.
9377         (procfs_open, procfs_native_open): Delete.
9378         (nto_native_ops): Now an nto_procfs_target_native.
9379         (init_procfs_targets): Adjust to C++ification.
9380         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
9381         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
9382         Refactor as methods of nto_procfs_target.
9383
9384         * go32-nat.c (go32_nat_target): New class.
9385         (the_go32_nat_target): New.
9386         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
9387         (go32_store_registers, go32_xfer_partial, go32_files_info)
9388         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
9389         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
9390         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
9391         (go32_pid_to_str): Refactor as methods of go32_nat_target.
9392         (go32_target): Delete.
9393         (_initialize_go32_nat): Adjust to C++ification.
9394
9395         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
9396         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
9397         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
9398         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
9399         gnu_nat_target.
9400         (gnu_target): Delete.
9401         * gnu-nat.h (gnu_target): Delete.
9402         (gnu_nat_target): New class.
9403         * i386-gnu-nat.c (gnu_base_target): New.
9404         (i386_gnu_nat_target): New class.
9405         (the_i386_gnu_nat_target): New.
9406         (_initialize_i386gnu_nat): Adjust to C++ification.
9407
9408 2018-05-02  Pedro Alves  <palves@redhat.com>
9409
9410         * bfd-target.c (target_bfd_xclose): Rename to ...
9411         (target_bfd_close): ... this.
9412         (target_bfd_reopen): Adjust.
9413         * target.c (target_close): Remove references to to_xclose.
9414         * target.h (target_ops::to_xclose): Delete.
9415         (target_ops::to_close): Update comments.
9416
9417 2018-05-02  Pedro Alves  <palves@redhat.com>
9418
9419         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
9420         "linux-nat.h".
9421         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
9422         * inf-ptrace.c (inf_ptrace_register_u_offset)
9423         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9424         (inf_ptrace_store_register, inf_ptrace_store_registers)
9425         (inf_ptrace_trad_target): Move to ...
9426         * linux-nat-trad.c: ... this new file.
9427         * linux-nat-trad.h: New file.
9428         * linux-nat.c (linux_target_install_ops): Make extern.
9429         (linux_trad_target): Delete.
9430         * linux-nat.h (linux_trad_target): Delete declaration.
9431         (linux_target_install_ops): Declare.
9432         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
9433         "linux-nat.h".
9434
9435 2018-05-02  Pedro Alves  <palves@redhat.com>
9436
9437         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9438         procfs_target/add_target here.
9439         * procfs.c (procfs_target): Make static.
9440         (_initialize_procfs): Call add_target here.
9441         * procfs.h (struct target_ops): Remove forward declaration.
9442         (procfs_target): Remove declaration.
9443         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
9444
9445 2018-05-02  Pedro Alves  <palves@redhat.com>
9446
9447         * procfs.c (procfs_stopped_by_watchpoint)
9448         (procfs_insert_watchpoint, procfs_remove_watchpoint)
9449         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
9450         Forward declare.
9451         (procfs_use_watchpoints): Delete, move contents...
9452         (procfs_target): ... here.
9453         * procfs.h (procfs_use_watchpoints): Delete declaration.
9454         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
9455         procfs_use_watchpoints.
9456         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
9457         procfs_use_watchpoints.
9458
9459 2018-05-02  Tom Tromey  <tom@tromey.com>
9460
9461         PR python/20084:
9462         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
9463         and var_zuinteger_unlimited.
9464         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
9465         and PARAM_ZUINTEGER_UNLIMITED.
9466         (set_parameter_value): Handle var_zuinteger and
9467         var_zuinteger_unlimited.
9468         (add_setshow_generic): Likewise.
9469         (parmpy_init): Likewise.
9470
9471 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
9472
9473         PR rust/23124
9474         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
9475         pointer is not null before dereferencing it.
9476
9477 2018-04-30  Tom Tromey  <tom@tromey.com>
9478
9479         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
9480         is_mi_like_p.
9481
9482 2018-04-30  Tom Tromey  <tom@tromey.com>
9483
9484         * breakpoint.c (mention): Remove use of is_mi_like_p.
9485         (print_mention_ranged_breakpoint): Likewise.
9486         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
9487         of is_mi_like_p.
9488
9489 2018-04-30  Tom Tromey  <tom@tromey.com>
9490
9491         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
9492
9493 2018-04-30  Tom Tromey  <tom@tromey.com>
9494
9495         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
9496         (info_spu_event_command): Remove some uses of is_mi_like_p.
9497
9498 2018-04-30  Tom Tromey  <tom@tromey.com>
9499
9500         * python/py-framefilter.c (py_print_single_arg)
9501         (enumerate_locals, py_print_args, py_print_frame): Remove some
9502         uses of is_mi_like_p.
9503
9504 2018-04-30  Tom Tromey  <tom@tromey.com>
9505
9506         * ui-out.c: Update.
9507         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
9508         * ui-out.h (ui_out::is_mi_like_p): Now const.
9509         (ui_out::do_is_mi_like_p): Now const.
9510         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
9511
9512 2018-04-30  Tom Tromey  <tom@tromey.com>
9513
9514         * varobj.c (varobj_set_visualizer): Use new_reference.
9515         * python/python.c (gdbpy_decode_line): Use new_reference.
9516         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
9517         new_reference.
9518
9519 2018-04-30  Tom Tromey  <tom@tromey.com>
9520
9521         * varobj.c (install_new_value): Use new_reference.
9522         * value.h (value_incref): Return void.  Swap intro comment with
9523         value_decref.
9524         * value.c (set_value_parent): Use new_reference.
9525         (value_incref): Return void.  Update intro comment.
9526         (release_value): Use new_reference.
9527         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
9528
9529 2018-04-30  Tom Tromey  <tom@tromey.com>
9530
9531         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
9532         * gdb_bfd.h (new_bfd_ref): Remove.
9533         (gdb_bfd_open): Update comment.
9534         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
9535         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
9536         (gdb_bfd_fdopenr): Use new_reference.
9537         * exec.c (exec_file_attach): Use new_reference.
9538
9539 2018-04-30  Tom Tromey  <tom@tromey.com>
9540
9541         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
9542         method.
9543
9544 2018-04-30  Tom Tromey  <tom@tromey.com>
9545
9546         * jit.c (jit_read_code_entry): Use type_align.
9547         * i386-tdep.c (i386_gdbarch_init): Don't call
9548         set_gdbarch_long_long_align_bit.
9549         * gdbarch.sh: Remove long_long_align_bit.
9550         * gdbarch.c, gdbarch.h: Rebuild.
9551         * arc-tdep.c (arc_type_align): New function.
9552         (arc_gdbarch_init): Use arc_type_align.  Don't call
9553         set_gdbarch_long_long_align_bit.
9554
9555 2018-04-30  Tom Tromey  <tom@tromey.com>
9556
9557         * rust-lang.c (rust_type_alignment): Remove.
9558         (rust_composite_type): Use type_align.
9559
9560 2018-04-30  Tom Tromey  <tom@tromey.com>
9561
9562         * NEWS: Mention Type.align.
9563         * python/py-type.c (typy_get_alignof): New function.
9564         (type_object_getset): Add "alignof".
9565
9566 2018-04-30  Tom Tromey  <tom@tromey.com>
9567
9568         PR exp/17095:
9569         * NEWS: Update.
9570         * std-operator.def (UNOP_ALIGNOF): New operator.
9571         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
9572         New.
9573         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
9574         * c-lang.c (c_op_print_tab): Add alignof.
9575         * c-exp.y (ALIGNOF): New token.
9576         (exp): Add "ALIGNOF" production.
9577         (ident_tokens): Add _Alignof and alignof.
9578
9579 2018-04-30  Tom Tromey  <tom@tromey.com>
9580
9581         * i386-tdep.c (i386_type_align): New function.
9582         (i386_gdbarch_init): Update.
9583         * gdbarch.sh (type_align): New method.
9584         * gdbarch.c, gdbarch.h: Rebuild.
9585         * arch-utils.h (default_type_align): Declare.
9586         * arch-utils.c (default_type_align): New function.
9587         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
9588         (struct type) <align_log2>: New field.
9589         <instance_flags>: Now a bitfield.
9590         (TYPE_RAW_ALIGN): New macro.
9591         (type_align, type_raw_align, set_type_align): Declare.
9592         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
9593         functions.
9594         * dwarf2read.c (quirk_rust_enum): Set type alignment.
9595         (get_alignment, maybe_set_alignment): New functions.
9596         (read_structure_type, read_enumeration_type, read_array_type)
9597         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
9598         (read_subrange_type, read_base_type): Set type alignment.
9599
9600 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
9601
9602         * dwarf2read.c (read_index_from_section): Use bool.
9603
9604 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
9605
9606         PR gdb/22950
9607         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
9608         with #ifdef.
9609
9610 2018-04-29  John Reiser  <jreiser@BitWagon.com>
9611
9612         PR build/22873
9613         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
9614         last step, and do it atomically.
9615
9616 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
9617
9618         * compile/compile-c-types.c (convert_int, convert_float):
9619         Update for C FE v1.
9620
9621 2018-04-27  Tom Tromey  <tom@tromey.com>
9622
9623         PR rust/22545:
9624         * rust-lang.c (rust_inclusive_range_type_p): New function.
9625         (rust_range): Handle inclusive ranges.
9626         (rust_compute_range): Likewise.
9627         * rust-exp.y (struct rust_op) <inclusive>: New field.
9628         (DOTDOTEQ): New constant.
9629         (range_expr): Add "..=" productions.
9630         (operator_tokens): Add "..=" token.
9631         (ast_range): Add "inclusive" parameter.
9632         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
9633         ranges.
9634         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
9635         bounds values.
9636         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
9637         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
9638         Update comments.
9639         * expprint.c (print_subexp_standard): Handle new bounds values.
9640         (dump_subexp_body_standard): Likewise.
9641
9642 2018-04-27  Tom Tromey  <tom@tromey.com>
9643
9644         * configure: Rebuild.
9645         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
9646         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
9647         "OVERRIDE".
9648         (class symbol_needs_eval_context): Likewise.
9649         * dwarf2read.c (mock_mapped_index::symbol_name_count)
9650         (mock_mapped_index::symbol_name_at): Use "override".  Remove
9651         "virtual".
9652         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
9653         "override".
9654         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
9655         * aarch64-tdep.c (instruction_reader::read): Use "override".
9656         (instruction_reader_test::read): Likewise.
9657         * arm-tdep.c (instruction_reader::read): Use "override".
9658         (instruction_reader_thumb::read): Likewise.
9659
9660 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
9661
9662         PR remote/9665
9663         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
9664         instead of remote_send.
9665         (remote_send): Remove.
9666
9667 2018-04-26  Pedro Alves  <palves@redhat.com>
9668
9669         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
9670         find_function_start_sal instead of find_pc_line.
9671
9672 2018-04-26  Pedro Alves  <palves@redhat.com>
9673
9674         * breakpoint.c (set_breakpoint_location_function): Handle
9675         mst_data_gnu_ifunc.
9676         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
9677         * elfread.c (elf_symtab_read): Give data symbols with
9678         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
9679         (elf_rel_plt_read): Update comment.
9680         * linespec.c (convert_linespec_to_sals): Handle
9681         mst_data_gnu_ifunc.
9682         (minsym_found): Handle mst_data_gnu_ifunc.
9683         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
9684         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
9685         * parse.c (find_minsym_type_and_address): Handle
9686         mst_data_gnu_ifunc.
9687         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
9688         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
9689         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
9690         comment.
9691         <mst_data_gnu_ifunc>: New enumerator.
9692
9693 2018-04-26  Pedro Alves  <palves@redhat.com>
9694
9695         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
9696         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
9697         'want_trampoline' parameter by a lookup_msym_prefer parameter.
9698         Handle it.
9699         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
9700         (lookup_minimal_symbol_by_pc): Adjust.
9701         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
9702         (lookup_solib_trampoline_symbol_by_pc): Adjust.
9703         * minsyms.h (lookup_msym_prefer): New enum.
9704         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9705         parameter by a lookup_msym_prefer parameter.
9706
9707 2018-04-26  Pedro Alves  <palves@redhat.com>
9708
9709         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
9710         ends in "@plt" instead of looking at the symbol's section.
9711
9712 2018-04-26  Pedro Alves  <palves@redhat.com>
9713
9714         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
9715         all references.
9716         (find_pc_partial_function_gnu_ifunc): Rename to ...
9717         (find_pc_partial_function): ... this, and remove references to
9718         'is_gnu_ifunc_p'.
9719         (find_pc_partial_function): Delete old implementation.
9720         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
9721
9722 2018-04-26  Pedro Alves  <palves@redhat.com>
9723
9724         * linespec.c (struct bound_minimal_symbol_search_key): New.
9725         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
9726         skip first line if we found a GNU ifunc minimal symbol by name.
9727         (compare_msymbols): Change parameters to work with a destructured
9728         lhs minsym.
9729         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
9730         functions.
9731
9732 2018-04-26  Pedro Alves  <palves@redhat.com>
9733
9734         * breakpoint.c (set_breakpoint_location_function): Don't resolve
9735         ifunc targets here.  Instead, if we have an ifunc minsym, use its
9736         address/name.
9737         (add_location_to_breakpoint): Store the minsym and the objfile in
9738         the breakpoint location.
9739         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
9740         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
9741         Record the minsym in the sal.
9742         * symtab.h (symtab_and_line) <msymbol>: New field.
9743
9744 2018-04-26  Pedro Alves  <palves@redhat.com>
9745
9746         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
9747         unless we actually resolved the ifunc.
9748
9749 2018-04-26  Pedro Alves  <palves@redhat.com>
9750
9751         * c-exp.y (variable production): Prefer ifunc minsyms over
9752         regular function symbols.
9753         * symtab.c (find_gnu_ifunc): New function.
9754         * minsyms.h (lookup_msym_prefer): New enum.
9755         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
9756         parameter by a lookup_msym_prefer parameter.
9757         * symtab.h (find_gnu_ifunc): New declaration.
9758
9759 2018-04-26  Pedro Alves  <palves@redhat.com>
9760
9761         * blockframe.c (find_gnu_ifunc_target_type): New function.
9762         (find_function_type): New.
9763         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
9764         return a value with a memory address.
9765         (eval_call): For calls to GNU ifunc functions, try to find the
9766         type of the target function from the type that the resolver
9767         returns.
9768         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
9769         symbols.
9770         * infcall.c (find_function_return_type): Delete.
9771         (find_function_addr): Add 'function_type' parameter.  For calls to
9772         GNU ifunc functions, try to find the type of the target function
9773         from the type that the resolver returns, and return it via
9774         FUNCTION_TYPE.
9775         (call_function_by_hand_dummy): Adjust to use the function type
9776         returned by find_function_addr.
9777         (find_function_addr): Add 'function_type' parameter and move
9778         description here.
9779         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
9780         declarations.
9781
9782 2018-04-26  Pedro Alves  <palves@redhat.com>
9783
9784         * c-exp.y (variable production): Skip finding an alias for ifunc
9785         symbols.
9786
9787 2018-04-26  Pedro Alves  <palves@redhat.com>
9788
9789         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
9790
9791 2018-04-25  Pedro Alves  <palves@redhat.com>
9792
9793         * infcmd.c (kill_command): Print the pid as string, not the whole
9794         thread's ptid.  Add comment.  s/has been killed/killed/ in output
9795         message.
9796         * remote.c (remote_detach_1): Print the pid as string, not the
9797         whole thread's ptid.
9798
9799 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9800             Sergio Durigan Junior  <sergiodj@redhat.com>
9801             Pedro Alves  <palves@redhat.com>
9802
9803         * infcmd.c (kill_command): Print message when inferior has
9804         been killed.
9805         * inferior.c (print_inferior_events): Remove 'static'.  Set as
9806         '1'.
9807         (add_inferior): Improve message printed when
9808         'print_inferior_events' is on.
9809         (exit_inferior): Remove message printed when
9810         'print_inferior_events' is on.
9811         (detach_inferior): Improve message printed when
9812         'print_inferior_events' is on.
9813         (initialize_inferiors): Use 'add_inferior_silent' to set
9814         'current_inferior_'.
9815         * inferior.h (print_inferior_events): Declare here as
9816         'extern'.
9817         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
9818         '[Detaching...]' messages when 'print_inferior_events' is on.
9819         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
9820         as prefix/suffix for messages.  Remove periods.  Fix erroneous
9821         'Detaching after fork from child...', replace it by '... from
9822         parent...'.
9823         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
9824         prefix/suffix when printing 'Detaching...' messages.  Print
9825         them when 'print_inferior_events' is on.
9826         * remote.c (remote_detach_1): Print message when detaching
9827         from inferior and '!is_fork_parent'.
9828
9829 2018-04-24  Tom Tromey  <tom@tromey.com>
9830
9831         * cli-out.h: Reindent.
9832
9833 2018-04-24  Tom Tromey  <tom@tromey.com>
9834
9835         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
9836         (cli_ui_out::do_field_string): Use fputs_filtered.
9837         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
9838
9839 2018-04-23  Tom Tromey  <tom@tromey.com>
9840
9841         * guile/scm-frame.c (gdbscm_frame_read_var): Use
9842         gdb::unique_xmalloc_ptr.
9843
9844 2018-04-23  Tom Tromey  <tom@tromey.com>
9845
9846         * configure: Rebuild.
9847
9848 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
9849
9850         PR gdb/23095
9851         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
9852         prepare_for_testing.  Set normal_bp to r_debug_state if target
9853         is bsd.
9854
9855 2018-04-21  Pedro Alves  <palves@redhat.com>
9856             Rajendra SY  <rajendra.sy@gmail.com>
9857
9858         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
9859         * remote.c (extended_remote_attach): In all-stop mode, mark the
9860         thread as executing.
9861
9862 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
9863
9864         * thread.c (thread_apply_all_command): Fix comment.
9865         (thread_command): Fix comment.
9866
9867 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
9868
9869         * common/tdesc.h (tdesc_create_feature): Remove xml filename
9870         parameter.
9871         * features/aarch64-core.c (create_feature_aarch64_core):
9872         Regenerate.
9873         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
9874         Likewise.
9875         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
9876         Likewise.
9877         * features/i386/32bit-avx512.c
9878         (create_feature_i386_32bit_avx512): Likewise.
9879         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
9880         Likewise.
9881         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
9882         Likewise.
9883         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
9884         Likewise.
9885         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
9886         Likewise.
9887         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
9888         Likewise.
9889         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
9890         Likewise.
9891         * features/i386/64bit-avx512.c
9892         (create_feature_i386_64bit_avx512): Likewise.
9893         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
9894         Likewise.
9895         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
9896         Likewise.
9897         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
9898         Likewise.
9899         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
9900         Likewise.
9901         * features/i386/64bit-segments.c
9902         (create_feature_i386_64bit_segments): Likewise.
9903         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
9904         Likewise.
9905         * features/i386/x32-core.c
9906         (create_feature_i386_x32_core): Likewise.
9907         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
9908         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
9909         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
9910         * target-descriptions.c: In generated code, don't pass xml
9911         filename.
9912
9913 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9914
9915         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
9916         (print_xml_feature::visit_post): Likewise.
9917         (print_xml_feature::visit): Likewise.
9918         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
9919         (print_xml_feature): Add new class.
9920         * regformats/regdat.sh: Null xmltarget on feature targets.
9921         * target-descriptions.c (struct target_desc): Add xmltarget.
9922         (maintenance_check_tdesc_xml_convert): Add unittest function.
9923         (tdesc_get_features_xml): Add function to get xml.
9924         (maintenance_check_xml_descriptions): Test xml generation.
9925         * xml-tdesc.c (string_read_description_xml): Add function.
9926         * xml-tdesc.h (string_read_description_xml): Add declaration.
9927
9928 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9929
9930         * features/Makefile: Add feature marker to targets with new style
9931         target descriptions.
9932         * regformats/aarch64.dat: Regenerate.
9933         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
9934         * regformats/i386/amd64-avx-linux.dat: Likewise.
9935         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
9936         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
9937         * regformats/i386/amd64-linux.dat: Likewise.
9938         * regformats/i386/amd64-mpx-linux.dat: Likewise.
9939         * regformats/i386/amd64.dat: Likewise.
9940         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
9941         * regformats/i386/i386-avx-linux.dat: Likewise.
9942         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
9943         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
9944         * regformats/i386/i386-linux.dat: Likewise.
9945         * regformats/i386/i386-mmx-linux.dat: Likewise.
9946         * regformats/i386/i386-mpx-linux.dat: Likewise.
9947         * regformats/i386/i386.dat: Likewise.
9948         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
9949         * regformats/i386/x32-avx-linux.dat: Likewise.
9950         * regformats/i386/x32-linux.dat: Likewise.
9951         * regformats/tic6x-c62x-linux.dat: Likewise.
9952         * regformats/tic6x-c64x-linux.dat: Likewise.
9953         * regformats/tic6x-c64xp-linux.dat: Likewise.
9954         * regformats/regdat.sh: Parse feature marker.
9955
9956 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9957
9958         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
9959         (tdesc_osabi_name): Likewise.
9960         * target-descriptions.c (tdesc_architecture_name): Add new
9961         function.
9962         (tdesc_osabi_name): Likewise.
9963
9964 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
9965
9966         * common/tdesc.c (tdesc_predefined_type): Move to here.
9967         (tdesc_named_type): Likewise.
9968         (tdesc_create_vector): Likewise.
9969         (tdesc_create_struct): Likewise.
9970         (tdesc_set_struct_size): Likewise.
9971         (tdesc_create_union): Likewise.
9972         (tdesc_create_flags): Likewise.
9973         (tdesc_create_enum): Likewise.
9974         (tdesc_add_field): Likewise.
9975         (tdesc_add_typed_bitfield): Likewise.
9976         (tdesc_add_bitfield): Likewise.
9977         (tdesc_add_flag): Likewise.
9978         (tdesc_add_enum_value): Likewise.
9979         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
9980         (struct tdesc_type_vector): Likewise.
9981         (struct tdesc_type_field): Likewise.
9982         (struct tdesc_type_with_fields): Likewise.
9983         (tdesc_create_enum): Add declaration.
9984         (tdesc_add_typed_bitfield): Likewise.
9985         (tdesc_add_enum_value): Likewise.
9986         * target-descriptions.c (tdesc_type_field): Move from here.
9987         (tdesc_type_builtin): Likewise.
9988         (tdesc_type_vector): Likewise.
9989         (tdesc_type_with_fields): Likewise.
9990         (tdesc_predefined_types): Likewise.
9991         (tdesc_named_type): Likewise.
9992         (tdesc_create_vector): Likewise.
9993         (tdesc_create_struct): Likewise.
9994         (tdesc_set_struct_size): Likewise.
9995         (tdesc_create_union): Likewise.
9996         (tdesc_create_flags): Likewise.
9997         (tdesc_create_enum): Likewise.
9998         (tdesc_add_field): Likewise.
9999         (tdesc_add_typed_bitfield): Likewise.
10000         (tdesc_add_bitfield): Likewise.
10001         (tdesc_add_flag): Likewise.
10002         (tdesc_add_enum_value): Likewise.
10003         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10004         (tdesc_add_typed_bitfield): Likewise.
10005         (tdesc_add_enum_value): Likewise.
10006
10007 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10008
10009         * common/tdesc.c (tdesc_feature::accept): Move to here.
10010         (tdesc_feature::operator==): Likewise.
10011         (tdesc_create_reg): Likewise.
10012         * common/tdesc.h (tdesc_type_kind): Likewise.
10013         (struct tdesc_type): Likewise.
10014         (struct tdesc_feature): Likewise.
10015         * regformats/regdat.sh: Create a feature.
10016         * target-descriptions.c (tdesc_type_kind): Move from here.
10017         (tdesc_type): Likewise.
10018         (tdesc_type_up): Likewise.
10019         (tdesc_feature): Likewise.
10020         (tdesc_create_reg): Likewise.
10021
10022 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10023
10024         * Makefile.in: Add arch/tdesc.c
10025         * common/tdesc.c: New file.
10026         * common/tdesc.h (tdesc_element_visitor): Move to here.
10027         (tdesc_element): Likewise.
10028         (tdesc_reg): Likewise.
10029         (tdesc_reg_up): Likewise.
10030         * regformats/regdef.h (reg): Add offset to constructors.
10031         * target-descriptions.c (tdesc_element_visitor): Move from here.
10032         (tdesc_element): Likewise.
10033         (tdesc_reg): Likewise.
10034         (tdesc_reg_up): Likewise.
10035
10036 2018-04-17  Tom Tromey  <tom@tromey.com>
10037
10038         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10039         discriminant field.
10040
10041 2018-04-17  Tom Tromey  <tom@tromey.com>
10042
10043         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10044
10045 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10046
10047         * symtab.c (print_symbol_info): Skip printing filename and line
10048         number when `last' is NULL.
10049         (symtab_symbol_info): Use empty string instead of NULL for first
10050         invocation of print_symbol_info.
10051         (rbreak_command): Pass NULL to `last' parameter of
10052         print_symbol_info.
10053
10054 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
10055
10056         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
10057         instead of nullptr.
10058
10059 2018-04-16  Pedro Alves  <palves@redhat.com>
10060
10061         * MAINTAINERS (sh): Remove.
10062         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
10063         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
10064         (ALLDEPFILES): Remove sh64-tdep.c.
10065         * NEWS: Mentions that support for SH-5/SH64 is removed.
10066         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
10067         (sh*-*-openbsd*): Ditto.
10068         (sh64-*-elf*): Remove.
10069         (sh*): Remove.
10070         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
10071         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
10072         * sh-tdep.c: No longer include "sh64-tdep.h".
10073         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
10074         * sh64-tdep.c, sh64-tdep.h: Remove files.
10075
10076 2018-04-16  Pedro Alves  <palves@redhat.com>
10077
10078         * MAINTAINERS: Remove m88k.
10079         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
10080         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
10081         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
10082         * NEWS: Mention that support for m88k was removed.
10083         * configure.host (m88*-*-*): Remove support.
10084         * configure.nat (m88k-*-*): Remove support.
10085         * configure.tgt (m88*-*-openbsd*): Remove.
10086         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
10087
10088 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
10089
10090         * configure.tgt (x86_tobjs): New variable.
10091         (amd64_tobjs, i386_tobjs): Use it.
10092
10093 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10094
10095         * symtab.c (print_symbol_info): Precede the symbol definition by
10096         the line number when available.
10097         * NEWS: Advertise this enhancement.
10098
10099 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10100
10101         * NEWS (New options): announce set/show record btrace cpu.
10102         * btrace.c: Include record-btrace.h.
10103         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
10104         the vendor is unknown.
10105         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
10106         Maybe overwrite the btrace configuration's cpu.
10107         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
10108         (btrace_fetch): Add cpu parameter.  Update callers.
10109         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
10110         Maybe overwrite the btrace configuration's cpu.  Skip enabling
10111         errata workarounds if the vendor is unknown.
10112         * python/py-record-btrace.c: Include record-btrace.h.
10113         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
10114         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
10115         * record-btrace.c (record_btrace_cpu_state_kind): New.
10116         (record_btrace_cpu): New.
10117         (set_record_btrace_cpu_cmdlist): New.
10118         (record_btrace_get_cpu): New.
10119         (require_btrace_thread, record_btrace_info)
10120         (record_btrace_resume_thread): Call record_btrace_get_cpu.
10121         (cmd_set_record_btrace_cpu_none): New.
10122         (cmd_set_record_btrace_cpu_auto): New.
10123         (cmd_set_record_btrace_cpu): New.
10124         (cmd_show_record_btrace_cpu): New.
10125         (_initialize_record_btrace): Initialize set/show record btrace cpu
10126         commands.
10127         * record-btrace.h (record_btrace_get_cpu): New.
10128
10129 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10130
10131         * record.c (set_record_command): Fix typo in message.
10132
10133 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10134
10135         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
10136
10137 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
10138
10139         * infrun.c (process_event_stop_test): Call
10140         gdbarch_in_indirect_branch_thunk.
10141         * gdbarch.sh (in_indirect_branch_thunk): New.
10142         * gdbarch.c: Regenerated.
10143         * gdbarch.h: Regenerated.
10144         * x86-tdep.h: New.
10145         * x86-tdep.c: New.
10146         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
10147         (HFILES_NO_SRCDIR): Add x86-tdep.h.
10148         (ALLDEPFILES): Add x86-tdep.c.
10149         * arch-utils.h (default_in_indirect_branch_thunk): New.
10150         * arch-utils.c (default_in_indirect_branch_thunk): New.
10151         * i386-tdep: Include x86-tdep.h.
10152         (i386_in_indirect_branch_thunk): New.
10153         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
10154         function.
10155         * amd64-tdep: Include x86-tdep.h.
10156         (amd64_in_indirect_branch_thunk): New.
10157         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
10158
10159 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
10160
10161         PR gdb/23053
10162         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
10163         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
10164         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
10165         regression.
10166
10167 2018-04-12  Tom Tromey  <tom@tromey.com>
10168
10169         * rust-lang.c (rust_print_struct_def): Remove univariant code.
10170         (rust_evaluate_subexp): Likewise.
10171
10172 2018-04-12  Pedro Alves  <palves@redhat.com>
10173
10174         * procfs.c (procfs_detach): Make forward declaration's prototype
10175         match definition's protototype.
10176         (proc_get_LDT_entry): Remove stale do_cleanups call.
10177
10178 2018-04-12  Pedro Alves  <palves@redhat.com>
10179
10180         * target.h (target_ops::to_has_exited): Delete.
10181         (target_has_exited): Delete.
10182         * target-delegates.c: Regenerate.
10183
10184 2018-04-11  Pedro Alves  <palves@redhat.com>
10185
10186         * target.c (fileio_fh_t::t): Add comment.
10187         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10188         (target_fileio_close): Handle a NULL target.
10189         (invalidate_fileio_fh): New.
10190         (target_close): Call it.
10191         * remote.c (remote_hostio_send_command): No longer check whether
10192         remote_desc is open.
10193
10194 2018-04-11  Pedro Alves  <palves@redhat.com>
10195
10196         * target.c (fileio_fh_t): Make it a named struct instead of a
10197         typedef.
10198         (fileio_fh_t::is_closed): New method.
10199         (DEF_VEC_O (fileio_fh_t)): Remove.
10200         (fileio_fhandles): Now a std::vector.
10201         (is_closed_fileio_fh): Delete.
10202         (acquire_fileio_fd): Adjust.  Rename parameters.
10203         (release_fileio_fd): Adjust.
10204         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
10205         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
10206         (target_fileio_close): Adjust.
10207
10208 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
10209
10210         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
10211         index.
10212
10213 2018-04-10  Pedro Alves  <palves@redhat.com>
10214
10215         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
10216         (scoped_finish_thread_state): New class.
10217         * infcmd.c (run_command_1): Use it instead of finish_thread_state
10218         cleanup.
10219         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
10220         (fetch_inferior_event, normal_stop): Likewise.
10221         * thread.c (finish_thread_state_cleanup): Delete.
10222
10223 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10224             Pedro Alves  <palves@redhat.com>
10225
10226         * value.c: Include "selftest.h" and "common/array-view.h".
10227         (struct range) <operator ==>: New.
10228         (test_ranges_contain): New.
10229         (check_ranges_vector): New.
10230         (test_insert_into_bit_range_vector): New.
10231         (_initialize_values): Register selftests.
10232         * common/array-view.h (operator==, operator!=): New.
10233
10234 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10235
10236         * common/gdb_vecs.h (unordered_remove): Add overload that takes
10237         an iterator.
10238         * inline-frame.c: Include <algorithm>.
10239         (struct inline_state): Add constructor.
10240         (inline_state_s): Remove.
10241         (DEF_VEC_O(inline_state_s)): Remove.
10242         (inline_states): Change type to std::vector.
10243         (find_inline_frame_state): Adjust to std::vector.
10244         (allocate_inline_frame_state): Remove.
10245         (clear_inline_frame_state): Adjust to std::vector.
10246         (skip_inline_frames): Adjust to std::vector.
10247
10248 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10249
10250         * tracepoint.h (struct trace_state_variable): Add constructor.
10251         <name>: Change type to std::string.
10252         * tracepoint.c (tsv_s): Remove.
10253         (DEF_VEC_O(tsv_s)): Remove.
10254         (tvariables): Change to std::vector.
10255         (create_trace_state_variable): Adjust to std::vector.
10256         (find_trace_state_variable): Likewise.
10257         (find_trace_state_variable_by_number): Likewise.
10258         (delete_trace_state_variable): Likewise.
10259         (trace_variable_command): Adjust to std::string.
10260         (delete_trace_variable_command): Likewise.
10261         (tvariables_info_1): Adjust to std::vector.
10262         (save_trace_state_variables): Likewise.
10263         (start_tracing): Likewise.
10264         (merge_uploaded_trace_state_variables): Adjust to std::vector
10265         and std::string.
10266         * target.h (struct target_ops)
10267         <to_download_trace_state_variable>: Pass reference to
10268         trace_state_variable.
10269         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
10270         * target-delegates.c: Re-generate.
10271         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
10272         (mi_tsv_deleted): Likewise.
10273         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
10274         * remote.c (remote_download_trace_state_variable): Change
10275         pointer to reference and adjust.
10276         * make-target-delegates (parse_argtypes): Handle references.
10277         (write_function_header): Likewise.
10278         (munge_type): Likewise.
10279
10280 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10281
10282         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10283         string_view-selftests.c.
10284         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
10285         testsuite.
10286         * unittests/basic_string_view/cons/char/1.cc: Likewise.
10287         * unittests/basic_string_view/cons/char/2.cc: Likewise.
10288         * unittests/basic_string_view/cons/char/3.cc: Likewise.
10289         * unittests/basic_string_view/element_access/char/1.cc:
10290         Likewise.
10291         * unittests/basic_string_view/element_access/char/empty.cc:
10292         Likewise.
10293         * unittests/basic_string_view/element_access/char/front_back.cc:
10294         Likewise.
10295         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
10296         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
10297         Likewise.
10298         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
10299         Likewise.
10300         * unittests/basic_string_view/modifiers/swap/char/1.cc:
10301         Likewise.
10302         * unittests/basic_string_view/operations/compare/char/1.cc:
10303         Likewise.
10304         * unittests/basic_string_view/operations/compare/char/13650.cc:
10305         Likewise.
10306         * unittests/basic_string_view/operations/copy/char/1.cc:
10307         Likewise.
10308         * unittests/basic_string_view/operations/data/char/1.cc:
10309         Likewise.
10310         * unittests/basic_string_view/operations/find/char/1.cc:
10311         Likewise.
10312         * unittests/basic_string_view/operations/find/char/2.cc:
10313         Likewise.
10314         * unittests/basic_string_view/operations/find/char/3.cc:
10315         Likewise.
10316         * unittests/basic_string_view/operations/find/char/4.cc:
10317         Likewise.
10318         * unittests/basic_string_view/operations/rfind/char/1.cc:
10319         Likewise.
10320         * unittests/basic_string_view/operations/rfind/char/2.cc:
10321         Likewise.
10322         * unittests/basic_string_view/operations/rfind/char/3.cc:
10323         Likewise.
10324         * unittests/basic_string_view/operations/substr/char/1.cc:
10325         Likewise.
10326         * unittests/basic_string_view/operators/char/2.cc: Likewise.
10327         * unittests/string_view-selftests.c: New file.
10328
10329 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10330
10331         * unittests/basic_string_view/capacity/1.cc: New file.
10332         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
10333         * unittests/basic_string_view/cons/char/1.cc: New file.
10334         * unittests/basic_string_view/cons/char/2.cc: New file.
10335         * unittests/basic_string_view/cons/char/3.cc: New file.
10336         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
10337         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
10338         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
10339         * unittests/basic_string_view/element_access/char/1.cc: New file.
10340         * unittests/basic_string_view/element_access/char/2.cc: New file.
10341         * unittests/basic_string_view/element_access/char/empty.cc: New file.
10342         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
10343         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
10344         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
10345         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
10346         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
10347         * unittests/basic_string_view/include.cc: New file.
10348         * unittests/basic_string_view/inserters/char/1.cc: New file.
10349         * unittests/basic_string_view/inserters/char/2.cc: New file.
10350         * unittests/basic_string_view/inserters/char/3.cc: New file.
10351         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
10352         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
10353         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
10354         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
10355         * unittests/basic_string_view/literals/types.cc: New file.
10356         * unittests/basic_string_view/literals/values.cc: New file.
10357         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
10358         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
10359         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
10360         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
10361         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
10362         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
10363         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
10364         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
10365         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
10366         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
10367         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
10368         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
10369         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
10370         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
10371         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
10372         * unittests/basic_string_view/operations/data/char/1.cc: New file.
10373         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
10374         * unittests/basic_string_view/operations/find/char/1.cc: New file.
10375         * unittests/basic_string_view/operations/find/char/2.cc: New file.
10376         * unittests/basic_string_view/operations/find/char/3.cc: New file.
10377         * unittests/basic_string_view/operations/find/char/4.cc: New file.
10378         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
10379         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
10380         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
10381         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
10382         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
10383         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
10384         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
10385         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
10386         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
10387         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
10388         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
10389         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
10390         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
10391         * unittests/basic_string_view/operators/char/2.cc: New file.
10392         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
10393         * unittests/basic_string_view/range_access/char/1.cc: New file.
10394         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
10395         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
10396         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
10397         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
10398         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
10399         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
10400         * unittests/basic_string_view/requirements/typedefs.cc: New file.
10401         * unittests/basic_string_view/typedefs.cc: New file.
10402         * unittests/basic_string_view/types/1.cc: New file.
10403
10404 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10405
10406         * common/gdb_string_view.h: Remove libstdc++ implementation
10407         details, adjust to gdb reality.
10408         * common/gdb_string_view.tcc: Likewise.
10409         * cli/cli-script.c (struct string_view): Remove.
10410         (user_args) <m_args>: Change element type to gdb::string_view.
10411         (user_args::insert_args): Adjust.
10412
10413 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10414
10415         * common/gdb_string_view.h: New file.
10416         * common/gdb_string_view.tcc: New file.
10417
10418 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
10419
10420         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
10421         * configure: Re-generate.
10422
10423 2018-04-09  Pedro Alves  <palves@redhat.com>
10424
10425         * gdbarch.sh: Include "observable.h" instead of "observer.h".
10426         (set_target_gdbarch): Call
10427         gdb::observers::architecture_changed.notify instead of
10428         observer_notify_architecture_changed.
10429
10430 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10431
10432         * tracepoint.c (struct current_traceframe_cleanup): Remove.
10433         (do_restore_current_traceframe_cleanup): Remove.
10434         (restore_current_traceframe_cleanup_dtor): Remove.
10435         (make_cleanup_restore_current_traceframe): Remove.
10436         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
10437         New.
10438         * tracepoint.h (struct scoped_restore_current_traceframe): New.
10439         * infrun.c (fetch_inferior_event): Use
10440         scoped_restore_current_traceframe.
10441
10442 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10443
10444         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
10445         Remove.
10446         <n_allocated_type_units>: Remove.
10447         <all_type_units>: Change to std::vector.
10448         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10449         to std::vector change.
10450         (dwarf2_per_objfile::get_cutu): Likewise.
10451         (dwarf2_per_objfile::get_tu): Likewise.
10452         (create_signatured_type_table_from_index): Likewise.
10453         (create_signatured_type_table_from_debug_names): Likewise.
10454         (dw2_symtab_iter_next): Likewise.
10455         (dw2_print_stats): Likewise.
10456         (dw2_expand_all_symtabs): Likewise.
10457         (dw2_expand_marked_cus): Likewise.
10458         (dw2_debug_names_iterator::next): Likewise.
10459         (dwarf2_initialize_objfile): Likewise.
10460         (add_signatured_type_cu_to_table): Likewise.
10461         (create_all_type_units): Likewise.
10462         (add_type_unit): Likewise.
10463         (struct tu_abbrev_offset): Add constructor.
10464         (build_type_psymtabs_1): Adjust to std::vector change.
10465         (print_tu_stats): Likewise.
10466         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10467         (write_debug_names): Likewise.
10468
10469 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10470
10471         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
10472         Make an std::vector.
10473         <n_comp_units>: Remove.
10474         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
10475         to std::vector change.
10476         (dwarf2_per_objfile::get_cutu): Likewise.
10477         (dwarf2_per_objfile::get_cu): Likewise.
10478         (create_cus_from_index): Likewise.
10479         (create_addrmap_from_index): Likewise.
10480         (create_addrmap_from_aranges): Likewise.
10481         (dwarf2_read_index): Likewise.
10482         (dw2_find_last_source_symtab): Likewise.
10483         (dw2_map_symtabs_matching_filename): Likewise.
10484         (dw2_symtab_iter_next): Likewise.
10485         (dw2_print_stats): Likewise.
10486         (dw2_expand_all_symtabs): Likewise.
10487         (dw2_expand_symtabs_with_fullname): Likewise.
10488         (dw2_expand_marked_cus): Likewise.
10489         (dw2_map_symbol_filenames): Likewise.
10490         (create_cus_from_debug_names): Likewise.
10491         (dwarf2_read_debug_names): Likewise.
10492         (dw2_debug_names_iterator::next): Likewise.
10493         (dwarf2_initialize_objfile): Likewise.
10494         (set_partial_user): Likewise.
10495         (dwarf2_build_psymtabs_hard): Likewise.
10496         (read_comp_units_from_section): Remove arguments, adjust to
10497         std::vector change.
10498         (create_all_comp_units): Adjust to std::vector and
10499         read_comp_units_from_section changes.
10500         (dwarf2_find_containing_comp_unit): Adjust to std::vector
10501         change.
10502         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
10503         (psyms_seen_size): Likewise.
10504         (write_gdbindex): Likewise.
10505         (write_debug_names): Likewise.
10506
10507 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10508
10509         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
10510         with dwarf2_per_objfile.
10511         (create_cus_from_index): Likewise.
10512         (create_signatured_type_table_from_index): Likewise.
10513         (dwarf2_read_index): Likewise.
10514         (dwarf2_initialize_objfile): Likewise.
10515         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
10516         per_cu rather than get_dwarf2_per_objfile.
10517
10518 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10519
10520         * dwarf2read.h (struct signatured_type): Forward declare.
10521         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
10522         New methods.
10523         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
10524         (dw2_get_cutu): ...this.
10525         (dwarf2_per_objfile::get_cu): Rename from...
10526         (dw2_get_cu): ...this.
10527         (dwarf2_per_objfile::get_tu): New.
10528         (create_addrmap_from_index): Adjust.
10529         (create_addrmap_from_aranges): Adjust.
10530         (dw2_find_last_source_symtab): Adjust.
10531         (dw2_map_symtabs_matching_filename): Adjust.
10532         (dw2_symtab_iter_next): Adjust.
10533         (dw2_print_stats): Adjust.
10534         (dw2_expand_all_symtabs): Adjust.
10535         (dw2_expand_symtabs_with_fullname): Adjust.
10536         (dw2_expand_marked_cus): Adjust.
10537         (dw_expand_symtabs_matching_file_matcher): Adjust.
10538         (dw2_map_symbol_filenames): Adjust.
10539         (dw2_debug_names_iterator::next): Adjust.
10540         (dwarf2_initialize_objfile): Adjust.
10541         (set_partial_user): Adjust.
10542         (dwarf2_build_psymtabs_hard): Adjust.
10543
10544 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10545
10546         * dwarf2read.c (create_signatured_type_table_from_debug_names):
10547         Remove unused variables.
10548         (dw2_map_symtabs_matching_filename): Likewise.
10549         (dwarf2_record_block_ranges): Likewise.
10550         (dwarf2_read_addr_index): Likewise.
10551         (follow_die_offset): Likewise.
10552
10553 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10554
10555         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
10556         to symbol_file_add_main.
10557
10558 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10559
10560         PR mi/22299
10561         * mi/mi-console.c (do_fputc_async_safe): New.
10562         (mi_console_file::write_async_safe): New.
10563         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
10564         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
10565         New.
10566         * ui-file.c (ui_file::putstrn): Adjust call to
10567         fputstrn_unfiltered.
10568         * utils.c (printchar): Replace do_fputs and do_fprintf
10569         parameters by do_fputc.
10570         (fputstr_filtered): Adjust call to printchar.
10571         (fputstr_unfiltered): Likewise.
10572         (fputstrn_filtered): Likewise.
10573         (fputstrn_unfiltered): Add do_fputc parameter, pass to
10574         printchar.
10575         * utils.h (do_fputc_ftype): New typedef.
10576         (fputstrn_unfiltered): Add do_fputc parameter.
10577
10578 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
10579
10580         * regformats/i386/i386-avx.dat: Remove.
10581
10582 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10583
10584         PR gdb/22979
10585         * amd64-tdep.c (amd64_none_init_abi): New function.
10586         (amd64_x32_none_init_abi): New function.
10587         (_initialize_amd64_tdep): Register handlers for x86-64 and
10588         x64_32 with GDB_OSABI_NONE.
10589         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
10590         GDB_OSABI_NONE osabi.
10591
10592 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10593
10594         PR gdb/22980
10595         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
10596         GDB_OSABI_NONE.
10597         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
10598         * osabi.c (gdb_osabi_names): Add "unknown" entry.
10599
10600 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
10601
10602         * common/byte-vector.h (char_vector): New type.
10603         * target.h (target_read_alloc): Return
10604         gdb::optional<byte_vector>.
10605         (target_read_stralloc): Return gdb::optional<char_vector>.
10606         (target_get_osdata): Return gdb::optional<char_vector>.
10607         * target.c (target_read_alloc_1): Templatize.  Replacement
10608         manual memory management with vector.
10609         (target_read_alloc): Change return type, adjust.
10610         (target_read_stralloc): Change return type, adjust.
10611         (target_get_osdata): Change return type, adjust.
10612         * auxv.c (struct auxv_info) <length>: Remove.
10613         <data>: Change type to gdb::optional<byte_vector>.
10614         (auxv_inferior_data_cleanup): Free auxv_info with delete.
10615         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
10616         (target_auxv_search): Adjust.
10617         (fprint_target_auxv): Adjust.
10618         * avr-tdep.c (avr_io_reg_read_command): Adjust.
10619         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
10620         (linux_make_corefile_notes): Adjust.
10621         * osdata.c (get_osdata): Adjust.
10622         * remote.c (remote_get_threads_with_qxfer): Adjust.
10623         (remote_memory_map): Adjust.
10624         (remote_traceframe_info): Adjust.
10625         (btrace_read_config): Adjust.
10626         (remote_read_btrace): Adjust.
10627         (remote_pid_to_exec_file): Adjust.
10628         * solib-aix.c (solib_aix_get_library_list): Adjust.
10629         * solib-dsbt.c (decode_loadmap): Don't free buf.
10630         (dsbt_get_initial_loadmaps): Adjust.
10631         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
10632         * solib-target.c (solib_target_current_sos): Adjust.
10633         * tracepoint.c (sdata_make_value): Adjust.
10634         * xml-support.c (xinclude_start_include): Adjust.
10635         (xml_fetch_content_from_file): Adjust.
10636         * xml-support.h (xml_fetch_another): Change return type.
10637         (xml_fetch_content_from_file): Change return type.
10638         * xml-syscall.c (xml_init_syscalls_info): Adjust.
10639         * xml-tdesc.c (file_read_description_xml): Adjust.
10640         (fetch_available_features_from_target): Change return type.
10641         (target_fetch_description_xml): Adjust.
10642         (target_read_description_xml): Adjust.
10643
10644 2018-04-06  Tom Tromey  <tom@tromey.com>
10645
10646         * value.c (~value): Update.
10647         (struct value) <contents>: Now unique_xmalloc_ptr.
10648         (value_contents_bits_eq, allocate_value_contents)
10649         (value_contents_raw, value_contents_all_raw)
10650         (value_contents_for_printing, value_contents_for_printing_const)
10651         (set_value_enclosing_type): Update.
10652
10653 2018-04-06  Tom Tromey  <tom@tromey.com>
10654
10655         * value.c (range_s): Remove typedef, VEC.
10656         (struct range): Add operator<.
10657         (range_lessthan): Remove.
10658         (ranges_contain): Change type.
10659         (~value): Update.
10660         (struct value) <unavailable, optimized_out>: Now std::vector.
10661         (value_entirely_available)
10662         (value_entirely_covered_by_range_vector)
10663         (value_entirely_unavailable, value_entirely_optimized_out):
10664         Update.
10665         (insert_into_bit_range_vector): Change argument type.
10666         (find_first_range_overlap): Likewise.
10667         (struct ranges_and_idx, value_contents_bits_eq)
10668         (require_not_optimized_out, require_available): Update.
10669         (ranges_copy_adjusted): Change argument types.
10670         (value_optimized_out, value_copy, value_fetch_lazy): Update.
10671
10672 2018-04-06  Tom Tromey  <tom@tromey.com>
10673
10674         * value.c (~value): Update.
10675         (struct value) <parent>: Now a value_ref_ptr.
10676         (value_parent, set_value_parent, value_address, value_copy):
10677         Update.
10678
10679 2018-04-06  Tom Tromey  <tom@tromey.com>
10680
10681         * value.c (struct value): Add constructor, destructor, and member
10682         initializers.
10683         (allocate_value_lazy, value_decref): Update.
10684
10685 2018-04-06  Tom Tromey  <tom@tromey.com>
10686
10687         * value.c (struct value) <released, next>: Remove.
10688         (all_values): Now a std::vector.
10689         (allocate_value_lazy): Update.
10690         (value_next): Remove.
10691         (value_mark, value_free_to_mark, release_value)
10692         (value_release_to_mark): Update.
10693
10694 2018-04-06  Tom Tromey  <tom@tromey.com>
10695
10696         * value.h (fetch_subexp_value, value_release_to_mark): Update.
10697         (free_value_chain): Remove.
10698         * value.c (free_value_chain): Remove.
10699         (value_release_to_mark): Return a std::vector.
10700         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
10701         std::vector.
10702         (check_condition): Update.
10703         * eval.c (fetch_subexp_value): Change "val_chain" to a
10704         std::vector.
10705         * breakpoint.c (update_watchpoint): Update.
10706         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
10707
10708 2018-04-06  Tom Tromey  <tom@tromey.com>
10709
10710         * value.h (free_all_values): Remove.
10711         * value.c (free_all_values): Remove.
10712
10713 2018-04-06  Tom Tromey  <tom@tromey.com>
10714
10715         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
10716         (value_history_chain, value_history_count): Remove.
10717         (value_history): New global.
10718         (record_latest_value, access_value_history, show_values)
10719         (preserve_values): Update.
10720
10721 2018-04-06  Tom Tromey  <tom@tromey.com>
10722
10723         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
10724         * varobj.c (varobj_set_display_format, varobj_set_value)
10725         (install_default_visualizer, construct_visualizer)
10726         (install_new_value, ~varobj, varobj_get_value_type)
10727         (my_value_of_variable, varobj_editable_p): Update.
10728         * c-varobj.c (c_describe_child, c_value_of_variable)
10729         (cplus_number_of_children, cplus_describe_child): Update.
10730         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
10731         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
10732         (ada_value_of_variable, ada_value_is_changeable_p): Update.
10733
10734 2018-04-06  Tom Tromey  <tom@tromey.com>
10735
10736         * printcmd.c (last_examine_address): Change type to
10737         value_ref_ptr.
10738         (do_examine, x_command): Update.
10739
10740 2018-04-06  Tom Tromey  <tom@tromey.com>
10741
10742         * value.c (release_value): Update.
10743         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
10744         (struct bpstats) <val>: Now a value_ref_ptr.
10745         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10746         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10747         (~watchpoint, print_it_watchpoint, watch_command_1)
10748         (invalidate_bp_value_on_memory_change): Update.
10749
10750 2018-04-06  Tom Tromey  <tom@tromey.com>
10751
10752         * varobj.c (varobj_clear_saved_item)
10753         (update_dynamic_varobj_children, install_new_value, ~varobj):
10754         Update.
10755         * value.h (value_incref): Move declaration earlier.
10756         (value_decref): Rename from value_free.
10757         (struct value_ref_policy): New.
10758         (value_ref_ptr): New typedef.
10759         (struct value_deleter): Remove.
10760         (gdb_value_up): Remove typedef.
10761         (release_value): Change return type.
10762         (release_value_or_incref): Remove.
10763         * value.c (set_value_parent): Update.
10764         (value_incref): Change return type.
10765         (value_decref): Rename from value_free.
10766         (value_free_to_mark, free_all_values, free_value_chain): Update.
10767         (release_value): Return value_ref_ptr.
10768         (release_value_or_incref): Remove.
10769         (record_latest_value, set_internalvar, clear_internalvar):
10770         Update.
10771         * stack.c (info_frame_command): Don't call value_free.
10772         * python/py-value.c (valpy_dealloc, valpy_new)
10773         (value_to_value_object): Update.
10774         * printcmd.c (do_examine): Update.
10775         * opencl-lang.c (lval_func_free_closure): Update.
10776         * mi/mi-main.c (register_changed_p): Don't call value_free.
10777         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
10778         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
10779         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
10780         value_free.
10781         * guile/scm-value.c (vlscm_free_value_smob)
10782         (vlscm_scm_from_value): Update.
10783         * frame.c (frame_register_unwind, frame_unwind_register_signed)
10784         (frame_unwind_register_unsigned, get_frame_register_bytes)
10785         (put_frame_register_bytes): Don't call value_free.
10786         * findvar.c (address_from_register): Don't call value_free.
10787         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
10788         * dwarf2loc.c (entry_data_value_free_closure)
10789         (value_of_dwarf_reg_entry, free_pieced_value_closure)
10790         (dwarf2_evaluate_loc_desc_full): Update.
10791         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
10792         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
10793         (~watchpoint, watch_command_1)
10794         (invalidate_bp_value_on_memory_change): Update.
10795         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
10796
10797 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
10798
10799         PR gdb/23022
10800         * warning.m4: Add -Wno-error=deprecated-register.
10801         * configure: Re-generate.
10802
10803 2018-04-05  Tom Tromey  <tom@tromey.com>
10804
10805         * linespec.h: Remove include of "vec.h".
10806
10807 2018-04-05  Tom Tromey  <tom@tromey.com>
10808
10809         * linespec.c (typep): Remove typedef.
10810         (find_methods, find_superclass_methods): Take a std::vector.
10811         (find_method): Use std::vector.
10812
10813 2018-04-05  Tom Tromey  <tom@tromey.com>
10814
10815         * utils.c (compare_strings): Remove.
10816         * utils.h (compare_strings): Remove.
10817         * objc-lang.h (find_imps): Update.
10818         * objc-lang.c (find_methods): Take a std::vector.
10819         (uniquify_strings, find_imps): Likewise.
10820         * linespec.c (find_methods): Take a std::vector.
10821         (decode_objc): Use std::vector.
10822         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
10823         a std::vector.
10824         (find_method, find_function_symbols): Use std::vector.
10825
10826 2018-04-05  Tom Tromey  <tom@tromey.com>
10827
10828         * completer.c (completion_tracker::completion_tracker): Remove
10829         cast.
10830         (completion_tracker::discard_completions): Likewise.
10831         * breakpoint.c (ambiguous_names_p): Remove cast.
10832         * ada-lang.c (_initialize_ada_language): Remove cast.
10833         * utils.h (streq): Update.
10834         (streq_hash): Add new declaration.
10835         * utils.c (streq): Return bool.
10836         (streq_hash): New function.
10837
10838 2018-04-05  Tom Tromey  <tom@tromey.com>
10839
10840         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
10841         Remove a string copy.
10842
10843 2018-04-05  Tom Tromey  <tom@tromey.com>
10844
10845         * linespec.c (filter_results): Use std::vector.
10846         (decode_line_2, decode_line_full): Update.
10847
10848 2018-04-05  Tom Tromey  <tom@tromey.com>
10849
10850         * linespec.c (canonical_to_fullform): Return std::string.
10851         (filter_results): Update.
10852         (struct decode_line_2_item): Add constructor.
10853         <fullform, displayform>: Now std::string.
10854         (decode_line_2_compare_items): Now a std::sort comparator.
10855         (decode_line_2): Update.
10856
10857 2018-04-05  Tom Tromey  <tom@tromey.com>
10858
10859         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
10860         (unexpected_linespec_error): Update.
10861         (linespec_parse_basic, parse_linespec): Update.
10862
10863 2018-04-05  Tom Tromey  <tom@tromey.com>
10864
10865         * linespec.c (linespec_parse_basic): Reindent.
10866
10867 2018-04-05  Tom Tromey  <tom@tromey.com>
10868
10869         * minsyms.h (iterate_over_minimal_symbols): Update.
10870         * minsyms.c (iterate_over_minimal_symbols): Take a
10871         gdb::function_view.
10872         * linespec.c (struct collect_minsyms): Remove.
10873         (compare_msyms): Now a std::sort comparator.
10874         (add_minsym): Add parameters.
10875         (search_minsyms_for_name): Update.  Use std::vector.
10876
10877 2018-04-03  Tom Tromey  <tom@tromey.com>
10878
10879         * mipsread.c (read_alphacoff_dynamic_symtab): Use
10880         gdb::byte_vector.
10881
10882 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10883
10884         * MAINTAINERS (Write After Approval): Add Weimin Pan.
10885
10886 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
10887
10888         PR gdb/16959
10889         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
10890         printing static type.
10891
10892 2018-04-01  Tom Tromey  <tom@tromey.com>
10893
10894         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
10895         (rs6000_xfer_shared_libraries): Update.
10896
10897 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
10898
10899         * common/gdb_vecs.h (char_ptr): Remove.
10900         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
10901
10902 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10903
10904         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
10905         with std::vector.
10906         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
10907
10908 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
10909
10910         * tracepoint.h (struct uploaded_tp): Initialize fields.
10911         <actions, step_actions, cmd_strings>: Change type to
10912         std::vector<char *>.
10913         * tracepoint.c (get_uploaded_tp): Allocate with new.
10914         (free_uploaded_tps): Free with delete.
10915         (parse_tracepoint_definition): Adjust to std::vector change.
10916         * breakpoint.c (read_uploaded_action): Likewise.
10917         (create_tracepoint_from_upload): Likewise.
10918         * ctf.c (ctf_write_uploaded_tp): Likewise.
10919         (SET_ARRAY_FIELD): Likewise.
10920         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
10921
10922 2018-03-30  Tom Tromey  <tom@tromey.com>
10923
10924         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
10925         std::unique_ptr.
10926         (svr4_keep_data_in_core): Update.
10927         (svr4_read_so_list): Update.
10928
10929 2018-03-30  Tom Tromey  <tom@tromey.com>
10930
10931         * windows-nat.c (handle_output_debug_string, handle_exception):
10932         Update.
10933         * target.h (target_read_string): Update.
10934         * target.c (target_read_string): Change "string" to
10935         unique_xmalloc_ptr.
10936         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
10937         Update.
10938         * solib-frv.c (frv_current_sos): Update.
10939         * solib-dsbt.c (dsbt_current_sos): Update.
10940         * solib-darwin.c (darwin_current_sos): Update.
10941         * linux-thread-db.c (inferior_has_bug): Update.
10942         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
10943         Update.  Remove alloca.
10944         * ada-lang.c (ada_main_name): Update.
10945
10946 2018-03-30  Tom Tromey  <tom@tromey.com>
10947
10948         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
10949         (struct dwo_file_deleter): New.
10950         (dwo_file_up): New typedef.
10951         (open_and_init_dwo_file): Use dwo_file_up.
10952         (free_dwo_file_cleanup): Remove.
10953
10954 2018-03-30  Tom Tromey  <tom@tromey.com>
10955
10956         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
10957         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
10958
10959 2018-03-30  Tom Tromey  <tom@tromey.com>
10960
10961         * dwarf2read.c (class free_cached_comp_units): New class.
10962         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
10963         (free_cached_comp_units): Remove function.
10964
10965 2018-03-30  Tom Tromey  <tom@tromey.com>
10966
10967         * utils.h (make_cleanup_unpush_target): Remove.
10968         * inf-ptrace.c (struct target_unpusher): New.
10969         (target_unpush_up) New typedef.
10970         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
10971         target_unpush_up.
10972         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
10973
10974 2018-03-27  Tom Tromey  <tom@tromey.com>
10975
10976         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
10977
10978 2018-03-27  Pedro Alves  <palves@redhat.com>
10979             Tom Tromey  <tom@tromey.com>
10980
10981         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
10982         destructor.  Now a class.
10983         (gdb_readline_wrapper_cleanup): Remove function.
10984         (gdb_readline_wrapper): Remove cleanups.
10985
10986 2018-03-27  Tom Tromey  <tom@tromey.com>
10987
10988         * typeprint.h (struct type_print_options) <local_typedefs,
10989         global_typedefs>: Remove "struct" keyword.
10990         (class typedef_hash_table): New class.
10991         (recursively_update_typedef_hash, add_template_parameters)
10992         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
10993         (find_typedef_in_hash): Don't declare.
10994         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
10995         (typedef_hash_table::recursively_update): Rename from
10996         recursively_update_typedef_hash.  Now a member.
10997         (typedef_hash_table::add_template_parameters): Rename from
10998         add_template_parameters.  Now a member.
10999         (typedef_hash_table::typedef_hash_table): Now a constructor;
11000         rename from create_typedef_hash.
11001         (typedef_hash_table::~typedef_hash_table): Now a destructor;
11002         rename from free_typedef_hash.
11003         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11004         (do_free_global_table): Remove.
11005         (typedef_hash_table::typedef_hash_table): New constructor; renamed
11006         from copy_type_recursive.
11007         (create_global_typedef_table): Remove.
11008         (typedef_hash_table::find_global_typedef): Now a member of
11009         typedef_hash_table.
11010         (typedef_hash_table::find_typedef): Rename from
11011         find_typedef_in_hash; now a member.
11012         (whatis_exp): Update.
11013         * extension.h (struct ext_lang_type_printers): Add constructor and
11014         destructor.
11015         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11016         declare.
11017         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11018         Now a constructor; rename from start_ext_lang_type_printers.
11019         (ext_lang_type_printers): Now a destructor; rename from
11020         free_ext_lang_type_printers.
11021         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11022         Update.
11023         (c_type_print_base_struct_union): Update.  Remove cleanups.
11024
11025 2018-03-27  Tom Tromey  <tom@tromey.com>
11026
11027         * dwarf-index-write.c: Include <cmath>.
11028
11029 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11030
11031         * NEWS: Add entry describing new "set|show varsize-limit" command.
11032         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11033         command.
11034         * printcmd.c (_initialize_printcmd): Add "set var" alias of
11035         "set variable".
11036
11037 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
11038
11039         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11040         dwarf-index-write.c
11041         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11042         * dwarf-index-common.c: New file.
11043         * dwarf-index-common.h: New file.
11044         * dwarf-index-write.c: New file.
11045         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
11046         (struct dwarf2_section_info): Move from here.
11047         (dwarf2_section_info_def): Likewise.
11048         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
11049         (offset_type): Likewise.
11050         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
11051         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
11052         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
11053         (byte_swap): Likewise.
11054         (MAYBE_SWAP): Likewise.
11055         (dwarf2_per_cu_ptr): Likewise.
11056         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
11057         (struct tu_stats): Likewise.
11058         (struct dwarf2_per_objfile): Likewise.
11059         (struct dwarf2_per_cu_data): Likewise.
11060         (struct signatured_type): Likewise.
11061         (sig_type_ptr): Likewise.
11062         (DEF_VEC_P (sig_type_ptr)): Likewise.
11063         (INDEX4_SUFFIX): Likewise.
11064         (INDEX5_SUFFIX): Likewise.
11065         (DEBUG_STR_SUFFIX): Likewise.
11066         (dwarf2_read_section): Make non-static.
11067         (mapped_index_string_hash): Move from here.
11068         (dwarf5_djb_hash): Likewise.
11069         (file_write): Likewise.
11070         (class data_buf): Likewise.
11071         (struct symtab_index_entry): Likewise.
11072         (struct mapped_symtab): Likewise.
11073         (find_slot): Likewise.
11074         (hash_expand): Likewise.
11075         (add_index_entry): Likewise.
11076         (uniquify_cu_indices): Likewise.
11077         (class c_str_view): Likewise.
11078         (class c_str_view_hasher): Likewise.
11079         (class vector_hasher): Likewise.
11080         (write_hash_table): Likewise.
11081         (psym_index_map): Likewise.
11082         (struct addrmap_index_data): Likewise.
11083         (add_address_entry): Likewise.
11084         (add_address_entry_worker): Likewise.
11085         (write_address_map): Likewise.
11086         (symbol_kind): Likewise.
11087         (write_psymbols): Likewise.
11088         (struct signatured_type_index_data): Likewise.
11089         (write_one_signatured_type): Likewise.
11090         (recursively_count_psymbols): Likewise.
11091         (recursively_write_psymbols): Likewise.
11092         (class debug_names): Likewise.
11093         (check_dwarf64_offsets): Likewise.
11094         (psyms_seen_size): Likewise.
11095         (write_gdbindex): Likewise.
11096         (write_debug_names): Likewise.
11097         (assert_file_size): Likewise.
11098         (write_psymtabs_to_index): Likewise.
11099         (save_gdb_index_command): Likewise.
11100         (_initialize_dwarf2_read): Don't register the "save gdb-index"
11101         command.
11102         * dwarf2read.h: New file.
11103
11104 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11105
11106         PR gdb/22670
11107         * dwarf2read.c (dwarf2_physname): Do not return the demangled
11108         symbol name if the CU's language stores symbol names in linkage
11109         format.
11110         * language.h (struct language_defn)
11111         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
11112         all instances of this struct.
11113
11114 2018-03-26  Tom Tromey  <tom@tromey.com>
11115
11116         * stack.c (backtrace_command_1): Remove verbose code.
11117
11118 2018-03-26  Tom Tromey  <tom@tromey.com>
11119
11120         * python/py-framefilter.c (py_print_type): Don't catch
11121         exceptions.  Return void.
11122         (py_print_value): Likewise.
11123         (py_print_single_arg): Likewise.
11124         (enumerate_args): Don't catch exceptions.
11125         (py_print_args): Likewise.
11126         (py_print_frame): Likewise.
11127         (gdbpy_apply_frame_filter): Catch exceptions here.
11128
11129 2018-03-26  Tom Tromey  <tom@tromey.com>
11130
11131         * stack.c (_initialize_stack): Remove trailing newlines from help
11132         text.  Add "Usage" line to "backtrace" help.
11133
11134 2018-03-26  Tom Tromey  <tom@tromey.com>
11135
11136         PR python/16486:
11137         * python/py-framefilter.c (py_print_args): Call wrap_hint.
11138
11139 2018-03-26  Tom Tromey  <tom@tromey.com>
11140
11141         * python/py-framefilter.c (py_print_single_arg): Return
11142         EXT_LANG_BT_ERROR from catch.
11143
11144 2018-03-26  Tom Tromey  <tom@tromey.com>
11145
11146         PR backtrace/15584:
11147         * stack.c (backtrace_command_1): Move some code into no-filters
11148         "if".
11149
11150 2018-03-26  Tom Tromey  <tom@tromey.com>
11151
11152         * python/py-framefilter.c (throw_quit_or_print_exception): New
11153         function.
11154         (gdbpy_apply_frame_filter): Use it.
11155
11156 2018-03-26  Tom Tromey  <tom@tromey.com>
11157
11158         PR cli/17716:
11159         * python/py-framefilter.c (py_print_type, py_print_value)
11160         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
11161         RETURN_MASK_ERROR.
11162
11163 2018-03-26  Tom Tromey  <tom@tromey.com>
11164
11165         * python/py-framefilter.c (enumerate_args): Use
11166         gdb::unique_xmalloc_ptr.
11167
11168 2018-03-26  Tom Tromey  <tom@tromey.com>
11169
11170         * python/py-framefilter.c (py_print_frame): Return
11171         EXT_LANG_BT_OK.
11172         (gdbpy_apply_frame_filter): Update comment.
11173         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
11174         Remove.
11175         <EXT_LANG_BT_NO_FILTERS>: Change value.
11176
11177 2018-03-26  Tom Tromey  <tom@tromey.com>
11178
11179         PR backtrace/15582:
11180         * stack.c (backtrace_command): Parse "hide" argument.
11181         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
11182         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
11183         constant.
11184
11185 2018-03-26  Tom Tromey  <tom@tromey.com>
11186
11187         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
11188         add "flags".
11189         (backtrace_command): Remove "fulltrace", add "flags".
11190
11191 2018-03-26  Tom Tromey  <tom@tromey.com>
11192
11193         * stack.c (backtrace_command): Rewrite command line parsing.
11194
11195 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11196
11197         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
11198
11199 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
11200
11201         * filename-seen-cache.h: Add include guard.
11202
11203 2018-03-26  Keith Seitz  <keiths@redhat.com>
11204
11205         * symfile.c (place_section): Remove "struct" from section_addr_info
11206         in comment.
11207         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
11208         "struct" keyword from section_addr_info.
11209
11210 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
11211
11212         * regformats/regdef.h (reg): Add constructors.
11213
11214 2018-03-25  Pedro Alves  <palves@redhat.com>
11215
11216         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
11217         if then/else bodies in var_func_name extraction.
11218
11219 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
11220
11221         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
11222         lookup_minimal_symbol() to find symbol entry.
11223         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
11224
11225 2018-03-23  Keith Seitz  <keiths@redhat.com>
11226
11227         PR c++/22968
11228         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
11229         nested type definitions for C++, too.
11230
11231 2018-03-23  Tom Tromey  <tom@tromey.com>
11232
11233         * machoread.c (struct oso_el): Add a constructor.  Don't define as
11234         a typedef.
11235         (macho_register_oso): Remove.
11236         (macho_symtab_read): Take a std::vector.
11237         (oso_el_compare_name): Now a std::sort comparator.
11238         (macho_symfile_read_all_oso): Take a std::vector.
11239         (macho_symfile_read): Use std::vector.  Remove cleanups.
11240
11241 2018-03-22  Tom Tromey  <tom@tromey.com>
11242
11243         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
11244         (record_full_goto_bookmark): Use std::string.
11245
11246 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11247
11248         PR tdep/18295
11249         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
11250         a single mask.
11251
11252 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11253
11254         * rs6000-tdep.c (store_insn_p): New function.
11255         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
11256         and cr_reg to their unshifted values. Use store_insn_p to
11257         match LR saves using either R1 or fdata->alloca_reg. Use
11258         store_insn_p to match CR saves. Set alloca_reg_offset
11259         when alloca_reg and framep are set. Remove lr_reg shift
11260         when assigning to fdata->lr_register.
11261
11262 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11263
11264         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
11265         command line args instead of emitting a warning.
11266
11267 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11268
11269         * tracepoint.h (struct static_tracepoint_marker): Initialize
11270         fields, define default constructor, move constructor and move
11271         assignment, disable the rest.
11272         <str_id, extra>: Make std::string.
11273         (release_static_tracepoint_marker): Remove.
11274         (free_current_marker): Remove.
11275         * tracepoint.c (free_current_marker): Remove.
11276         (parse_static_tracepoint_marker_definition): Adjust to
11277         std::string, use new hex2str overload.
11278         (release_static_tracepoint_marker): Remove.
11279         (print_one_static_tracepoint_marker): Get marker by reference
11280         and adjust to std::string.
11281         (info_static_tracepoint_markers_command): Adjust to std::vector
11282         changes
11283         * target.h (static_tracepoint_marker_p): Remove typedef.
11284         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
11285         (struct target_ops) <to_static_tracepoint_marker_at>: Return
11286         bool.
11287         <to_static_tracepoint_markers_by_strid>: Return std::vector.
11288         * target-debug.h
11289         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
11290         (target_debug_print_std_vector_static_tracepoint_marker): New.
11291         (target_debug_print_struct_static_tracepoint_marker_p): Rename
11292         to...
11293         (target_debug_print_static_tracepoint_marker_p): ... this.
11294         * target-delegates.c: Re-generate.
11295         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
11296         Make std::string.
11297         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
11298         (decode_static_tracepoint_spec): Adjust to std::vector.
11299         (tracepoint_print_one_detail): Adjust to std::string.
11300         (strace_marker_decode_location): Adjust to std::string.
11301         (update_static_tracepoint): Adjust to std::string, remove call
11302         to release_static_tracepoint_marker.
11303         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
11304         Adjust to std::vector.
11305         * remote.c (remote_static_tracepoint_marker_at): Return bool.
11306         (remote_static_tracepoint_markers_by_strid): Adjust to
11307         std::vector.
11308         * common/rsp-low.h (hex2str): New overload with explicit count
11309         of bytes.
11310         * common/rsp-low.c (hex2str): New overload with explicit count
11311         of bytes.
11312         * unittests/rsp-low-selftests.c (test_hex2str): New function.
11313         (_initialize_rsp_low_selftests): Add test_hex2str test.
11314         * unittests/tracepoint-selftests.c
11315         (test_parse_static_tracepoint_marker_definition): Adjust to
11316         std::string.
11317
11318 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
11319
11320         * tracepoint.c (parse_static_tracepoint_marker_definition):
11321         Consider case where the definition is followed by more
11322         definitions.
11323         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11324         tracepoint-selftests.c.
11325         * unittests/tracepoint-selftests.c: New.
11326
11327 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
11328
11329         * MAINTAINERS (Write After Approval): Add Pedro Franco de
11330         Carvalho.
11331
11332 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11333
11334         * symtab.c (find_pc_sect_line): fixed indentation.
11335
11336 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
11337
11338         * symtab.c (find_pc_sect_line): now uses binary search.
11339
11340 2018-03-19  Tom Tromey  <tom@tromey.com>
11341
11342         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
11343         "IDENT" production.
11344
11345 2018-03-19  Pedro Alves  <palves@redhat.com>
11346             Tom Tromey  <tom@tromey.com>
11347
11348         * unittests/observable-selftests.c: New file.
11349         * common/observable.h: New file.
11350         * observable.h: New file.
11351         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
11352         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
11353         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
11354         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
11355         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
11356         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
11357         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
11358         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
11359         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
11360         python/py-breakpoint.c, python/py-finishbreakpoint.c,
11361         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
11362         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
11363         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
11364         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
11365         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
11366         tui/tui-interp.c, valops.c: Update all users.
11367         * tui/tui-hooks.c (tui_bp_created_observer)
11368         (tui_bp_deleted_observer, tui_bp_modified_observer)
11369         (tui_inferior_exit_observer, tui_before_prompt_observer)
11370         (tui_normal_stop_observer, tui_register_changed_observer):
11371         Remove.
11372         (tui_observers_token): New global.
11373         (attach_or_detach, tui_attach_detach_observers): New functions.
11374         (tui_install_hooks, tui_remove_hooks): Use
11375         tui_attach_detach_observers.
11376         * record-btrace.c (record_btrace_thread_observer): Remove.
11377         (record_btrace_thread_observer_token): New global.
11378         * observer.sh: Remove.
11379         * observer.c: Rename to observable.c.
11380         * observable.c (namespace gdb_observers): Define new objects.
11381         (observer_debug): Move into gdb_observers namespace.
11382         (struct observer, struct observer_list, xalloc_observer_list_node)
11383         (xfree_observer_list_node, generic_observer_attach)
11384         (generic_observer_detach, generic_observer_notify): Remove.
11385         (_initialize_observer): Update.
11386         Don't include observer.inc.
11387         * Makefile.in (generated_files): Remove observer.h, observer.inc.
11388         (clean mostlyclean): Likewise.
11389         (observer.h, observer.inc): Remove targets.
11390         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
11391         (COMMON_SFILES): Use observable.c, not observer.c.
11392         * .gitignore: Remove observer.h.
11393
11394 2018-03-18  Tom Tromey  <tom@tromey.com>
11395
11396         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
11397         gdb::def_vector.
11398         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
11399
11400 2018-03-17  Tom Tromey  <tom@tromey.com>
11401
11402         * auto-load.c (auto_load_objfile_script_1): Use std::string.
11403
11404 2018-03-17  Tom Tromey  <tom@tromey.com>
11405
11406         * target.c (class scoped_target_fd): New.
11407         (target_fileio_close_cleanup): Remove.
11408         (target_fileio_read_alloc_1): Use scoped_target_fd.
11409
11410 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
11411
11412         * silent-rules.mk: New.
11413         * Makefile.in: Include silent-rules.mk
11414         (srcdir, VPATH, top_srcdir): Move up.
11415         (COMPILE): Add ECHO_CXX.
11416         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
11417         (init.c): Add ECHO_INIT_C.
11418         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
11419         (version.c): Add ECHO_GEN.
11420         (printcmd.o): Add ECHO_CXX.
11421         (target-float.o): Add ECHO_CXX.
11422         (ada-exp.o): Add ECHO_CXX.
11423         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
11424         (insight$(EXEEXT)): Add ECHO_CXXLD.
11425         * gnulib/configure.ac: Add AM_SILENT_RULES.
11426         * gnulib/aclocal.m4: Re-generate.
11427         * gnulib/configure: Re-generate.
11428         * gnulib/import/Makefile.in: Re-generate.
11429
11430 2018-03-16  Tom Tromey  <tom@tromey.com>
11431
11432         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
11433         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
11434         * utils.c (do_free_section_addr_info)
11435         (make_cleanup_free_section_addr_info): Remove.
11436         * symfile.h (struct other_sections): Add constructor.
11437         (struct section_addr_info): Remove.
11438         (section_addr_info): New typedef.
11439         (struct sym_fns) <sym_offsets>: Change type of parameter.
11440         (build_section_addr_info_from_objfile)
11441         (relative_addr_info_to_section_offsets, addr_info_make_relative)
11442         (default_symfile_offsets, symbol_file_add)
11443         (symbol_file_add_from_bfd)
11444         (build_section_addr_info_from_section_table): Update.
11445         (alloc_section_addr_info, free_section_addr_info): Don't declare.
11446         * symfile.c (alloc_section_addr_info): Remove.
11447         (build_section_addr_info_from_section_table): Change return type.
11448         Update.
11449         (build_section_addr_info_from_bfd)
11450         (build_section_addr_info_from_objfile): Likewise.
11451         (free_section_addr_info): Remove.
11452         (relative_addr_info_to_section_offsets): Change type of "addrs".
11453         (addrs_section_compar): Now a std::sort comparator.
11454         (addrs_section_sort): Change return type.
11455         (addr_info_make_relative): Change type of "addrs".  Update.
11456         (default_symfile_offsets, syms_from_objfile_1)
11457         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
11458         (symbol_file_add_separate): Update.
11459         (symbol_file_add): Change type of "addrs".  Update.
11460         (add_symbol_file_command): Update.  Remove cleanups.
11461         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
11462         cleanups.
11463         * symfile-debug.c (debug_sym_offsets): Change type of "info".
11464         * solib.c (solib_read_symbols): Update.
11465         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
11466         * machoread.c (macho_symfile_offsets): Update.
11467         * jit.c (jit_bfd_try_read_symtab): Update.
11468
11469 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
11470
11471         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11472         unittests/utils-selftests.c.
11473         * unittests/utils-selftests.c: New file.
11474
11475 2018-03-14  Tom Tromey  <tom@tromey.com>
11476
11477         PR cli/14977:
11478         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
11479         for NULL.
11480
11481 2018-03-14  Tom Tromey  <tom@tromey.com>
11482
11483         PR cli/19918:
11484         * printcmd.c (printf_pointer): Allow "-" in format.
11485
11486 2018-03-14  Tom Tromey  <tom@tromey.com>
11487
11488         * printcmd.c (_initialize_printcmd): Add usage to printf.
11489
11490 2018-03-14  Yao Qi  <qiyao@sourceware.org>
11491
11492         * MAINTAINERS: Update my email address.
11493
11494 2018-03-13  Tom Tromey  <tom@tromey.com>
11495
11496         * machoread.c (macho_check_dsym): Change filenamep to a
11497         std::string*.
11498         (macho_symfile_read): Update.
11499         * symfile.c (load_command): Use std::string.
11500
11501 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
11502
11503         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
11504         to error message string.
11505         (riscv_register_name): Use xsnprintf instead of sprintf.
11506         (riscv_insn::fetch_instruction): Use gdb_assert instead of
11507         internal_error.
11508         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
11509         error.
11510         (riscv_push_dummy_call): Likewise.
11511
11512 2018-03-12  Tom Tromey  <tom@tromey.com>
11513
11514         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
11515         Use gdb::byte_vector.
11516         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
11517
11518 2018-03-12  Yao Qi  <yao.qi@linaro.org>
11519
11520         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
11521         parameter type to readable_regcache.
11522         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
11523         the declaration.
11524
11525 2018-03-11  Tom Tromey  <tom@tromey.com>
11526
11527         * dwarf2read.c (struct nextfield): Add initializers.
11528         (struct nextfnfield): Remove.
11529         (struct fnfieldlist): Add initializers.  Remove "length" and
11530         "head", use std::vector.
11531         (struct decl_field_list): Remove.
11532         (struct field_info): Add initializers.
11533         <fields, baseclasses>: Now std::vector.
11534         <nbaseclasses, nfnfields, typedef_field_list_count,
11535         nested_types_list_count>: Remove.
11536         (dwarf2_add_field, dwarf2_add_type_defn)
11537         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
11538         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
11539         (process_structure_scope): Update.
11540
11541 2018-03-11  Tom Tromey  <tom@tromey.com>
11542
11543         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
11544         for use by std::sort.
11545         (build_type_psymtabs_1): Use std::vector.
11546
11547 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
11548
11549         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
11550         and LIBMPFR in the printed configuration.
11551
11552 2018-03-08  Tom Tromey  <tom@tromey.com>
11553
11554         * source.c (get_filename_and_charpos): Use scoped_fd.
11555         * nto-procfs.c (procfs_open_1): Use scoped_fd.
11556         (procfs_pidlist): Likewise.
11557         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
11558         (iterate_over_mappings): Likewise.
11559
11560 2018-03-08  Tom Tromey  <tom@tromey.com>
11561
11562         * infcall.c (struct call_return_meta_info)
11563         <stack_temporaries_enabled>: Remove.
11564         (get_call_return_value, call_function_by_hand_dummy): Update.
11565         * thread.c (disable_thread_stack_temporaries): Remove.
11566         (enable_thread_stack_temporaries): Remove.
11567         (thread_stack_temporaries_enabled_p): Return bool.
11568         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
11569         (get_last_thread_stack_temporary): Update.
11570         * eval.c (evaluate_subexp): Update.
11571         * gdbthread.h (class enable_thread_stack_temporaries): Now a
11572         class, not a function.
11573         (value_ptr, value_vec): Remove typedefs.
11574         (class thread_info) <stack_temporaries_enabled>: Now bool.
11575         <stack_temporaries>: Now a std::vector.
11576         (thread_stack_temporaries_enabled_p)
11577         (value_in_thread_stack_temporaries): Return bool.
11578
11579 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
11580
11581         * remote.c (putpkt_binary): Fix omitted bytes reporting.
11582         (getpkt_or_notif_sane_1): Likewise.
11583
11584 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11585
11586         * build-id.c (build_id_to_debug_bfd): Use std::string.
11587
11588 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11589
11590         * build-id.c (find_separate_debug_file_by_buildid): Return
11591         std::string.
11592         * build-id.h (find_separate_debug_file_by_buildid): Return
11593         std::string.
11594         * coffread.c (coff_symfile_read): Adjust to std::string.
11595         * elfread.c (elf_symfile_read): Adjust to std::string.
11596         * symfile.c (separate_debug_file_exists): Change parameter to
11597         std::string.
11598         (find_separate_debug_file): Return std::string.
11599         (find_separate_debug_file_by_debuglink): Return std::string.
11600         * symfile.h (find_separate_debug_file_by_debuglink): Return
11601         std::string.
11602
11603 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
11604
11605         * common/xml-utils.c (xml_escape_text): Move code to...
11606         (xml_escape_text_append): ... this new function.
11607         * common/xml-utils.h (xml_escape_text_append): New declaration.
11608         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
11609         New function.
11610         (_initialize_xml_utils): register test_xml_escape_text_append as
11611         a selftest.
11612
11613 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
11614
11615         * defs.h: Remove MAX_REGISTER_SIZE.
11616         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
11617         asserts.
11618         * python/py-unwind.c (pyuw_sniffer): Likewise.
11619
11620 2018-03-07  Tom Tromey  <tom@tromey.com>
11621
11622         * linux-tdep.c (linux_info_proc): Update.
11623         * target.h (struct target_ops) <to_fileio_readlink>: Return
11624         optional<string>.
11625         (target_fileio_readlink): Return optional<string>.
11626         * remote.c (remote_hostio_readlink): Return optional<string>.
11627         * inf-child.c (inf_child_fileio_readlink): Return
11628         optional<string>.
11629         * target.c (target_fileio_readlink): Return optional<string>.
11630
11631 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
11632
11633         * regcache.c (cooked_read_test): Add riscv to the list of
11634         architectures that have a save_reggroup.
11635
11636 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11637
11638         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
11639         value is not a dynamic class object.
11640
11641 2018-03-06  Tom Tromey  <tom@tromey.com>
11642
11643         * rust-exp.y: Formatting fixes.
11644
11645 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11646
11647         * riscv-tdep.c (riscv_register_name): Remove target description
11648         support.
11649         (riscv_gdbarch_init): Remove target description check.
11650
11651 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11652
11653         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
11654         comment.
11655         * riscv-tdep.h: Likewise.
11656
11657 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11658
11659         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
11660         (riscv_pseudo_register_write): Delete.
11661         (riscv_gdbarch_init): Remove all use of pseudo registers.
11662
11663 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11664
11665         * record-btrace.c (btrace_print_lines): Replace cleanup
11666         parameter with RAII equivalents.
11667         (btrace_insn_history): Replace cleanup with RAII equivalents.
11668         * ui-out.h (make_cleanup_ui_out_list_begin_end,
11669         make_cleanup_ui_out_tuple_begin_end): Remove.
11670         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
11671         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
11672         make_cleanup_ui_out_list_begin_end): Remove.
11673
11674 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11675
11676         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
11677         parameter types to std::vector.  Use bool.
11678         (record_btrace_wait): Replace VEC(tp_t) with
11679         std::vector<thread_info *>.
11680         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
11681
11682 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
11683
11684         * record-btrace.c (record_btrace_disable_callback): Remove.
11685         (struct scoped_btrace_disable): New.
11686         (record_btrace_open): Use scoped_btrace_disable.
11687
11688 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11689
11690         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
11691         reading values from registers.
11692
11693 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11694
11695         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
11696         where appropriate.
11697
11698 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11699
11700         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
11701         change parameter type.  Use GDB's print functions, and use
11702         core_addr_to_string where appropriate.
11703         (riscv_push_dummy_call): Use core_addr_to_string where
11704         appropriate, update call to riscv_print_arg_location, and reindent
11705         a few lines.
11706         (riscv_return_value): Update call to riscv_print_arg_location.
11707
11708 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11709             Tim Newsome <tim@sifive.com>
11710             Albert Ou <a0u@eecs.berkeley.edu>
11711             Darius Rad <darius@bluespec.com>
11712
11713         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
11714         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
11715         (ALLDEPFILES): Add riscv-tdep.c
11716         * configure.tgt: Add riscv support.
11717         * riscv-tdep.c: New file.
11718         * riscv-tdep.h: New file.
11719         * NEWS: Mention new target.
11720         * MAINTAINERS: Add entry for riscv.
11721
11722 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
11723
11724         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
11725         fields within aggregates.
11726
11727 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
11728
11729         * record-btrace.c (btrace_print_lines): Change type of flags to
11730         gdb_disassembly_flags.
11731
11732 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11733
11734         * fbsd-nat.c: Include "inf-ptrace.h".
11735         (USE_SIGTRAP_SIGINFO): Conditionally define.
11736         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
11737         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
11738         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
11739         function.
11740         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
11741         Likewise.
11742         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
11743         Likewise.
11744         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
11745         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
11746         "supports_stopped_by_hw_breakpoint" target methods.
11747
11748 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11749
11750         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
11751         * fbsd-nat.c (debug_fbsd_nat): New variable.
11752         (show_fbsd_nat_debug): New function.
11753         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
11754         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
11755
11756 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
11757
11758         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
11759         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
11760         prototype.
11761         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
11762         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
11763         method.
11764
11765 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11766
11767         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
11768         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
11769
11770 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11771
11772         * charset.c (struct charset_vector): New.
11773         (charsets): Change type to charset_vector.
11774         (find_charset_names): Adjust.
11775         (add_one): Adjust.
11776         (_initialize_charset): Adjust.
11777
11778 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11779
11780         * progspace.h (struct program_space) <deleted_solibs>: Change
11781         type to std::vector<std::string>.
11782         * progspace.c (clear_program_space_solib_cache): Adjust.
11783         * breakpoint.c (print_solib_event): Adjust.
11784         (check_status_catch_solib): Adjust.
11785         * solib.c (update_solib_list): Adjust.
11786         * ui-out.h (class ui_out) <field_string>: New overload.
11787         * ui-out.c (ui_out::field_string): New overload.
11788
11789 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11790
11791         * progspace.h (struct program_space): Add constructor and
11792         destructor, initialize fields.
11793         (add_program_space): Remove.
11794         * progspace.c (add_program_space): Rename to...
11795         (program_space::program_space): ... this.
11796         (release_program_space): Rename to...
11797         (program_space::~program_space): ... this.
11798         (delete_program_space): Use delete to delete program_space.
11799         (initialize_progspace): Use new to allocate program_space.
11800         * inferior.c (add_inferior_with_spaces): Likewise.
11801         (clone_inferior_command): Likewise.
11802         * infrun.c (follow_fork_inferior): Likewise.
11803         (handle_vfork_child_exec_or_exit): Likewise.
11804
11805 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
11806
11807         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
11808         (delim_string_to_char_ptr_vec): Return std::vector of
11809         gdb::unique_xmalloc_ptr.
11810         (dirnames_to_char_ptr_vec_append): Take std::vector of
11811         gdb::unique_xmalloc_ptr.
11812         (dirnames_to_char_ptr_vec): Return std::vector of
11813         gdb::unique_xmalloc_ptr.
11814         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
11815         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
11816         (delim_string_to_char_ptr_vec): Return an std::vector of
11817         gdb::unique_xmalloc_ptr, adjust the code.
11818         (dirnames_to_char_ptr_vec_append): Take an std::vector of
11819         gdb::unique_xmalloc_ptr, adjust the code.
11820         (dirnames_to_char_ptr_vec): Return an std::vector of
11821         gdb::unique_xmalloc_ptr, adjust the code.
11822         * auto-load.c (auto_load_safe_path_vec): Change type to
11823         std::vector of gdb::unique_xmalloc_ptr.
11824         (auto_load_expand_dir_vars): Return an std::vector of
11825         gdb::unique_xmalloc_ptr, adjust the code.
11826         (auto_load_safe_path_vec_update): Adjust.
11827         (filename_is_in_auto_load_safe_path_vec): Adjust.
11828         (auto_load_objfile_script_1): Adjust.
11829         * build-id.c (build_id_to_debug_bfd): Adjust.
11830         * linux-thread-db.c (thread_db_load_search): Adjust.
11831         * source.c (add_path): Adjust.
11832         (openp): Adjust.
11833         * symfile.c (find_separate_debug_file): Adjust.
11834         * utils.c (do_free_char_ptr_vec): Remove.
11835         (make_cleanup_free_char_ptr_vec): Remove.
11836
11837 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
11838
11839         PR gdb/22907
11840         * common/pathstuff.c: Conditionally include "<windows.h>".
11841
11842 2018-03-01  Georg Sauthoff  <mail@georg.so>
11843
11844         PR gdb/22888
11845         * gcore.in: Quote variables and switch interpreter to bash.
11846
11847 2018-03-01  Tom Tromey  <tom@tromey.com>
11848
11849         * dwarf2read.c (alloc_discriminant_info): Fix default_index
11850         assertion.  Add assertion for discriminant_index.
11851         (quirk_rust_enum): Use correct base type name in univariant case.
11852
11853 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
11854
11855         * record.c (get_call_history_modifiers): Return a
11856         record_print_flags.
11857         (cmd_record_call_history): Adjust.
11858         * record-btrace.c (record_btrace_call_history): Adjust.
11859         (record_btrace_call_history_range): Adjust.
11860         (record_btrace_call_history_from): Adjust.
11861         * target-debug.h (target_debug_print_record_print_flags): New.
11862         * target-delegates.c: Re-generate.
11863         * target.c (target_call_history): Change flags type.
11864         (target_call_history_from): Likewise.
11865         (target_call_history_range): Likewise.
11866         * target.h (struct target_ops) <target_call_history>: Likewise.
11867         (target_call_history_from): Likewise.
11868         (target_call_history_range): Likewise.
11869
11870 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11871             Simon Marchi  <simon.marchi@polymtl.ca>
11872
11873         * common/common-utils.c: Include "sys/stat.h".
11874         (is_regular_file): Move here from "source.c"; change return
11875         type to "bool".
11876         * common/common-utils.h (is_regular_file): New prototype.
11877         * common/pathstuff.c (contains_dir_separator): New function.
11878         * common/pathstuff.h (contains_dir_separator): New prototype.
11879         * source.c: Don't include "sys/stat.h".
11880         (is_regular_file): Move to "common/common-utils.c".
11881
11882 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
11883
11884         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
11885         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
11886         * auto-load.c: Include "common/pathstuff.h".
11887         * common/common-def.h (current_directory): Move here.
11888         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
11889         function.
11890         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
11891         prototype.
11892         * common/pathstuff.c: New file.
11893         * common/pathstuff.h: New file.
11894         * compile/compile.c: Include "common/pathstuff.h".
11895         * defs.h (current_directory): Move to "common/common-defs.h".
11896         * dwarf2read.c: Include "common/pathstuff.h".
11897         * exec.c: Likewise.
11898         * guile/scm-safe-call.c: Likewise.
11899         * linux-thread-db.c: Likewise.
11900         * main.c: Likewise.
11901         * nto-tdep.c: Likewise.
11902         * objfiles.c: Likewise.
11903         * source.c: Likewise.
11904         * symtab.c: Likewise.
11905         * utils.c: Include "common/pathstuff.h".
11906         (gdb_realpath): Move to "common/pathstuff.c".
11907         (gdb_realpath_keepfile): Likewise.
11908         (gdb_abspath): Likewise.
11909         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
11910         (gdb_realpath_keepfile): Likewise.
11911         (gdb_abspath): Likewise.
11912
11913 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
11914
11915         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
11916         wildcard process pid for super_resume for kernels with a
11917         specific bug.
11918
11919 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
11920
11921         * compile/compile.c (get_args): Add additional comments
11922         explaining function.
11923
11924 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
11925             Tom Tromey  <tom@tromey.com>
11926
11927         * target.h (memory_write_request_s): Remove typedef.  Don't define
11928         VEC.
11929         (target_write_memory_blocks): Change argument to std::vector.
11930         (struct memory_write_request): Add constructor.
11931         * target-memory.c (compare_block_starting_address): Return bool.
11932         Change argument types.
11933         (claim_memory): Change arguments to use std::vector.
11934         (split_regular_and_flash_blocks, blocks_to_erase)
11935         (compute_garbled_blocks): Likewise.
11936         (cleanup_request_data, cleanup_write_requests_vector): Remove.
11937         (target_write_memory_blocks): Change argument to std::vector.
11938         * symfile.c (struct load_section_data): Add constructor and
11939         destructor.  Use std::vector for "requests".
11940         (struct load_progress_data): Add initializers.
11941         (load_section_callback): Update.  Use "new".
11942         (clear_memory_write_data): Remove.
11943         (generic_load): Update.
11944
11945 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
11946
11947         * arch/aarch64.h: Use common/tdesc.h.
11948
11949 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11950
11951         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
11952         architecture with a 64-bit ABI.
11953
11954 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
11955
11956         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
11957         ahead of target description loading.
11958
11959 2018-02-26  Tom Tromey  <tom@tromey.com>
11960
11961         * stack.c (backtrace_command_1): Update.
11962         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
11963         of "flags".
11964         * python/py-framefilter.c (py_print_frame)
11965         (gdbpy_apply_frame_filter): Change type of "flags".
11966         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
11967         of "flags".
11968         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
11969         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
11970         * extension.h (enum frame_filter_flag): Rename from
11971         frame_filter_flags.
11972         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
11973         (apply_ext_lang_frame_filter): Change type of "flags".
11974         * extension.c (apply_ext_lang_frame_filter): Change type of
11975         "flags".
11976         * extension-priv.h (struct extension_language_ops)
11977         <apply_frame_filter>: Change type of "flags".
11978
11979 2018-02-26  Tom Tromey  <tom@tromey.com>
11980
11981         PR python/16497:
11982         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
11983         off-by-one in py_end computation.
11984         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
11985         PRINT_MORE_FRAMES.
11986         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
11987         constant.
11988
11989 2018-02-26  Tom Tromey  <tom@tromey.com>
11990
11991         * dwarf2read.c (struct variant_field): New.
11992         (struct nextfield) <variant>: New field.
11993         (dwarf2_add_field): Handle DW_TAG_variant_part.
11994         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
11995         discriminated union.
11996         (read_structure_type): Handle DW_TAG_variant_part.
11997         (handle_struct_member_die): New function, extracted from
11998         process_structure_scope.  Handle DW_TAG_variant.
11999         (process_structure_scope): Handle discriminated unions.  Call
12000         handle_struct_member_die.
12001
12002 2018-02-26  Tom Tromey  <tom@tromey.com>
12003
12004         * rust-lang.h (rust_last_path_segment): Declare.
12005         * rust-lang.c (rust_last_path_segment): Now public.  Change
12006         contract.
12007         (struct disr_info): Remove.
12008         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12009         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12010         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12011         (rust_enum_p, rust_enum_variant): New function.
12012         (rust_underscore_fields): Remove "offset" parameter.
12013         (rust_print_enum): New function.
12014         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12015         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12016         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
12017         enums.
12018         (rust_internal_print_type): New function, from rust_print_type.
12019         Remove enum code.
12020         (rust_print_type): Call rust_internal_print_type.
12021         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12022         Update enum handling.
12023         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12024         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12025         (rust_union_quirks): New functions.
12026         (process_full_comp_unit, process_full_type_unit): Call
12027         rust_union_quirks.
12028         (process_structure_scope): Update rust_unions if necessary.
12029
12030 2018-02-26  Tom Tromey  <tom@tromey.com>
12031
12032         * value.h (value_union_variant): Declare.
12033         * valops.c (value_union_variant): New function.
12034         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12035         (struct discriminant_info): New.
12036         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12037         enumerator.
12038         (struct main_type) <flag_discriminated_union>: New field.
12039
12040 2018-02-26  Tom Tromey  <tom@tromey.com>
12041
12042         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12043         unittests/unpack-selftests.c.
12044         * unittests/unpack-selftests.c: New file.
12045         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
12046
12047 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12048
12049         * dwarf2read.c (struct partial_die_info) <read>: New method.
12050         (read_partial_die): Remove the declaration.
12051         (load_partial_dies): Update.
12052         (partial_die_info::partial_die_info):
12053         (read_partial_die): Change it to partial_die_info::read.
12054
12055 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12056
12057         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
12058         (fixup_partial_die): Remove declaration.
12059         (scan_partial_symbols): Update.
12060         (partial_die_parent_scope): Likewise.
12061         (partial_die_full_name): Likewise.
12062         (fixup_partial_die): Change it to partial_die_info::fixup.
12063
12064 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12065
12066         * dwarf2read.c (read_partial_die): Update the declaration.
12067         (load_partial_dies): Caller update.
12068         (read_partial_die): Remove one argument abbrev_len.
12069
12070 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12071
12072         * dwarf2read.c (struct partial_die_info): Add ctor, delete
12073         assignment operator.
12074         (load_partial_dies): Use ctor and copy ctor.
12075         (read_partial_die): Update.
12076         (dwarf2_cu::find_partial_die): Use ctor.
12077
12078 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12079
12080         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
12081         (find_partial_die_in_comp_unit): Change it to
12082         dwarf2_cu::find_partial_die.
12083         (find_partial_die): Update.
12084
12085 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12086
12087         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
12088         is NULL.
12089
12090 2018-02-26  Yao Qi  <yao.qi@linaro.org>
12091
12092         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
12093
12094 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
12095
12096         * arch/amd64.h: Use common/tdesc.h.
12097         * arch/i386.c: Likewise.
12098         * arch/i386.h: Likewise.
12099         * arch/tic6x.c: Likewise.
12100         * arch/tdesc.h: Move file from here...
12101         * common/tdesc.h: ...to here.
12102         * features/aarch64-core.c: Regenerate.
12103         * features/aarch64-fpu.c: Regenerate.
12104         * features/i386/32bit-avx.c: Regenerate.
12105         * features/i386/32bit-avx512.c: Regenerate.
12106         * features/i386/32bit-core.c: Regenerate.
12107         * features/i386/32bit-linux.c: Regenerate.
12108         * features/i386/32bit-mpx.c: Regenerate.
12109         * features/i386/32bit-pkeys.c: Regenerate.
12110         * features/i386/32bit-sse.c: Regenerate.
12111         * features/i386/64bit-avx.c: Regenerate.
12112         * features/i386/64bit-avx512.c: Regenerate.
12113         * features/i386/64bit-core.c: Regenerate.
12114         * features/i386/64bit-linux.c: Regenerate.
12115         * features/i386/64bit-mpx.c: Regenerate.
12116         * features/i386/64bit-pkeys.c: Regenerate.
12117         * features/i386/64bit-segments.c: Regenerate.
12118         * features/i386/64bit-sse.c: Regenerate.
12119         * features/i386/x32-core.c: Regenerate.
12120         * features/tic6x-c6xp.c: Regenerate.
12121         * features/tic6x-core.c: Regenerate.
12122         * features/tic6x-gp.c: Regenerate.
12123         * target-descriptions.c: Use common/tdesc.h.
12124         * target-descriptions.h: Likewise.
12125
12126 2018-02-24  Tom Tromey  <tom@tromey.com>
12127
12128         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
12129         (try_thread_db_load_from_dir, thread_db_load_search): Use
12130         std::string.
12131         (info_auto_load_libthread_db_compare): Return bool.  Change
12132         argument types.
12133         (info_auto_load_libthread_db): Use std::vector, std::string.
12134         Remove cleanups.
12135
12136 2018-02-24  Tom Tromey  <tom@tromey.com>
12137
12138         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
12139         std::string.
12140         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
12141         std::string*.
12142         * gdbarch.c: Rebuild.
12143         * gdbarch.h: Rebuild.
12144         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
12145         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
12146         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
12147         std::string*.
12148
12149 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
12150
12151         * gdbtypes.h (sect_offset): Change type to uint64_t.
12152         (sect_offset_str): New function.
12153         * dwarf2read.c (create_addrmap_from_aranges): Use
12154         sect_offset_str.
12155         (error_check_comp_unit_head): Likewise.
12156         (create_debug_type_hash_table): Likewise.
12157         (read_cutu_die_from_dwo): Likewise.
12158         (init_cutu_and_read_dies): Likewise.
12159         (init_cutu_and_read_dies_no_follow): Likewise.
12160         (process_psymtab_comp_unit_reader): Likewise.
12161         (partial_die_parent_scope): Likewise.
12162         (peek_die_abbrev): Likewise.
12163         (process_queue): Likewise.
12164         (dwarf2_physname): Likewise.
12165         (read_namespace_alias): Likewise.
12166         (read_import_statement): Likewise.
12167         (create_dwo_cu_reader): Likewise.
12168         (create_cus_hash_table): Likewise.
12169         (lookup_dwo_cutu): Likewise.
12170         (inherit_abstract_dies): Likewise.
12171         (read_func_scope): Likewise.
12172         (read_call_site_scope): Likewise.
12173         (dwarf2_add_member_fn): Likewise.
12174         (read_common_block): Likewise.
12175         (read_module_type): Likewise.
12176         (read_typedef): Likewise.
12177         (read_subrange_type): Likewise.
12178         (load_partial_dies): Likewise.
12179         (read_partial_die): Likewise.
12180         (find_partial_die): Likewise.
12181         (read_str_index): Likewise.
12182         (dwarf2_string_attr): Likewise.
12183         (build_error_marker_type): Likewise.
12184         (lookup_die_type): Likewise.
12185         (dump_die_shallow): Likewise.
12186         (follow_die_ref): Likewise.
12187         (dwarf2_fetch_die_loc_sect_off): Likewise.
12188         (dwarf2_fetch_constant_bytes): Likewise.
12189         (follow_die_sig): Likewise.
12190         (get_signatured_type): Likewise.
12191         (get_DW_AT_signature_type): Likewise.
12192         (dwarf2_find_containing_comp_unit): Likewise.
12193         (set_die_type): Likewise.
12194
12195 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
12196
12197         * arch/aarch64.c: Include "common-defs.h".
12198         * arch/amd64.c: Likewise.
12199         * arch/i386.c: Likewise.
12200
12201 2018-02-21  Tom Tromey  <tom@tromey.com>
12202
12203         * value.h: (extract_field_op): Update.
12204         * eval.c (extract_field_op): Return a const char *.
12205         * expression.h (parse_expression_for_completion): Update.
12206         * completer.c (complete_expression): Update.
12207         (add_struct_fields): Make fieldname const.
12208         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
12209         (mark_completion_tag, parse_exp_in_context_1): Update.
12210         (parse_expression_for_completion): Change "name" to
12211         unique_xmalloc_ptr*.
12212
12213 2018-02-21  Tom Tromey  <tom@tromey.com>
12214
12215         * infcall.c (call_function_by_hand_dummy): Use std::vector.
12216
12217 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12218
12219         * avr-tdep.c (avr_read_pc): Change parameter type to
12220         readable_regcache.
12221         * gdbarch.sh (read_pc): Likewise.
12222         * gdbarch.c: Re-generated.
12223         * gdbarch.h: Re-generated.
12224         * hppa-tdep.c (hppa_read_pc): Change parameter type to
12225         readable_regcache.
12226         * ia64-tdep.c (ia64_read_pc): Likewise.
12227         * mips-tdep.c (mips_read_pc): Likewise.
12228         * spu-tdep.c (spu_read_pc): Likewise.
12229
12230 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12231
12232         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
12233         * regcache-dump.c: New file.
12234         * regcache.c: Move register_dump to regcache-dump.c.
12235         (maintenance_print_registers): Likewise.
12236         (maintenance_print_raw_registers): Likewise.
12237         (maintenance_print_cooked_registers): Likewise.
12238         (maintenance_print_register_groups): Likewise.
12239         (maintenance_print_remote_registers): Likewise.
12240         (_initialize_regcache): Likewise.
12241         * regcache.h (register_dump): Moved from regcache.c.
12242
12243 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12244
12245         * regcache.c (regcache::regcache): Update.
12246         (regcache::invalidate): Move it to detached_regcache::invalidate.
12247         (get_thread_arch_aspace_regcache): Update.
12248         (regcache::raw_update): Update.
12249         (regcache::cooked_read): Remove some code.
12250         (regcache::cooked_read_value): Likewise.
12251         (regcache::raw_write): Remove assert on m_readonly_p.
12252         (regcache::raw_supply_integer): Move it to
12253         detached_regcache::raw_supply_integer.
12254         (regcache::raw_supply_zeroed): Likewise.
12255         * regcache.h (detached_regcache) <raw_supply_integer>: New
12256         declaration.
12257         <raw_supply_zeroed, invalidate>: Likewise.
12258         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
12259         <invalidate>: Likewise.
12260         <m_readonly_p>: Removed.
12261
12262 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12263
12264         * infcmd.c (get_return_value): Let stop_regs point to
12265         get_current_regcache.
12266         * regcache.c (regcache::regcache): Remove.
12267         (register_dump_reg_buffer): New class.
12268         (regcache_print): Adjust.
12269         * regcache.h (regcache): Remove constructors.
12270
12271 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12272
12273         * regcache.c (class register_dump): New class.
12274         (register_dump_regcache, register_dump_none): New class.
12275         (register_dump_remote, register_dump_groups): New class.
12276         (regcache_print): Update.
12277         * regcache.h (regcache_dump_what): Move it to regcache.c.
12278         (regcache) <dump>: Remove.
12279
12280 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12281
12282         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
12283          reg_buffer_rw *.
12284         (jit_unwind_reg_set_impl): Call raw_supply.
12285         (jit_frame_sniffer): Use reg_buffer_rw.
12286         * record-full.c (record_full_core_regbuf): Change its type.
12287         (record_full_core_open_1): Use reg_buffer_rw.
12288         (record_full_close): Likewise.
12289         (record_full_core_fetch_registers): Use regcache->raw_supply.
12290         (record_full_core_store_registers): Likewise.
12291         * regcache.c (regcache::get_register_status): Move it to
12292         reg_buffer.
12293         (regcache_raw_set_cached_value): Remove.
12294         (regcache::raw_set_cached_value): Remove.
12295         (regcache::raw_write): Call raw_supply.
12296         (regcache::raw_supply): Move it to reg_buffer_rw.
12297         * regcache.h (regcache_raw_set_cached_value): Remove.
12298         (reg_buffer_rw): New class.
12299
12300 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12301
12302         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
12303         readonly_detached_regcache.
12304         (dummy_frame_prev_register): Use regcache->cooked_read.
12305         * frame.c (frame_save_as_regcache): Change return type.
12306         (frame_pop): Update.
12307         * frame.h (frame_save_as_regcache): Update declaration.
12308         * inferior.h (get_infcall_suspend_state_regcache): Update
12309         declaration.
12310         * infrun.c (infcall_suspend_state) <registers>: use
12311         readonly_detached_regcache.
12312         (save_infcall_suspend_state): Don't use regcache_dup.
12313         (get_infcall_suspend_state_regcache): Change return type.
12314         * linux-fork.c (struct fork_info) <savedregs>: Change to
12315         readonly_detached_regcache.
12316         <pc>: New field.
12317         (fork_save_infrun_state): Don't use regcache_dup.
12318         (info_checkpoints_command): Adjust.
12319         * mi/mi-main.c (register_changed_p): Update declaration.
12320         (mi_cmd_data_list_changed_registers): Use
12321         readonly_detached_regcache.
12322         (register_changed_p): Change parameter type to
12323         readonly_detached_regcache.
12324         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
12325         readonly_detached_regcache.
12326         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
12327         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
12328         New.
12329         (regcache::save): Move it to reg_buffer.
12330         (regcache::restore): Change parameter type.
12331         (regcache_dup): Remove.
12332         * regcache.h (reg_buffer) <save>: New method.
12333         (readonly_detached_regcache): New class.
12334         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
12335         readonly_detached_regcache.
12336         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
12337
12338 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12339
12340         * frame.c (frame_save_as_regcache): Use regcache method save.
12341         (frame_pop): Use regcache method restore.
12342         * infrun.c (restore_infcall_suspend_state): Likewise.
12343         * linux-fork.c (fork_load_infrun_state): Likewise.
12344         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
12345         save.
12346         * regcache.c (regcache_save): Remove.
12347         (regcache::restore): More asserts.
12348         (regcache_cpy): Remove.
12349         * regcache.h (regcache_save): Remove the declaration.
12350         (regcache::restore): Move from private to public.
12351         Remove the friend declaration of regcache_cpy.
12352         (regcache_cpy): Remove declaration.
12353
12354 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12355
12356         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
12357         parameter type to 'readable_regcache *'.
12358         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
12359         * arm-tdep.c (arm_neon_quad_read): Likewise.
12360         (arm_pseudo_read): Likewise.
12361         * avr-tdep.c (avr_pseudo_register_read): Likewise.
12362         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
12363         * frv-tdep.c (frv_pseudo_register_read): Likewise.
12364         * gdbarch.c: Re-generated.
12365         * gdbarch.h: Re-generated.
12366         * gdbarch.sh (pseudo_register_read): Change parameter type to
12367         'readable_regcache *'.
12368         (pseudo_register_read_value): Likewise.
12369         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
12370         (h8300_pseudo_register_read): Likewise.
12371         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
12372         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
12373         (i386_pseudo_register_read_into_value): Likewise.
12374         (i386_pseudo_register_read_value): Likewise.
12375         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
12376         declaration.
12377         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
12378         * m32c-tdep.c (m32c_raw_read): Likewise.
12379         (m32c_read_flg): Likewise.
12380         (m32c_banked_register): Likewise.
12381         (m32c_banked_read): Likewise.
12382         (m32c_sb_read): Likewise.
12383         (m32c_part_read): Likewise.
12384         (m32c_cat_read): Likewise.
12385         (m32c_r3r2r1r0_read): Likewise.
12386         (m32c_pseudo_register_read): Likewise.
12387         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
12388         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
12389         (mep_pseudo_cr64_read): Likewise.
12390         (mep_pseudo_register_read): Likewise.
12391         * mips-tdep.c (mips_pseudo_register_read): Likewise.
12392         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
12393         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
12394         * regcache.c (regcache::raw_read): Move it to readable_regcache.
12395         (regcache::cooked_read): Likewise.
12396         (regcache::cooked_read_value): Likewise.
12397         (regcache_cooked_read_signed):
12398         (regcache::cooked_read): Likewise.
12399         * regcache.h (readable_regcache): New class.
12400         (regcache): Inherit readable_regcache.  Move some methods to
12401         readable_regcache.
12402         * rl78-tdep.c (rl78_pseudo_register_read): Change
12403         parameter type to 'readable_regcache *'.
12404         * rs6000-tdep.c (do_regcache_raw_read): Remove.
12405         (e500_pseudo_register_read): Change parameter type to
12406         'readable_regcache *'.
12407         (dfp_pseudo_register_read): Likewise.
12408         (vsx_pseudo_register_read): Likewise.
12409         (efpr_pseudo_register_read): Likewise.
12410         * s390-tdep.c (s390_pseudo_register_read): Likewise.
12411         * sh-tdep.c (sh_pseudo_register_read): Likewise.
12412         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
12413         (sh64_pseudo_register_read): Likewise.
12414         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
12415         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
12416         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
12417         (spu_pseudo_register_read): Likewise.
12418         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
12419         (xtensa_pseudo_register_read): Likewise.
12420
12421 2018-02-21  Yao Qi  <yao.qi@linaro.org>
12422
12423         * regcache.c (regcache::regcache): Call reg_buffer ctor.
12424         (regcache::arch): Move it to reg_buffer::arch.
12425         (regcache::register_buffer): Likewise.
12426         (regcache::assert_regnum): Likewise.
12427         (regcache::num_raw_registers): Likewise.
12428         * regcache.h (reg_buffer): New class.
12429         (regcache): Inherit reg_buffer.
12430
12431 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
12432
12433         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
12434         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
12435
12436 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
12437
12438         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
12439
12440 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
12441
12442         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
12443         (SFILES): Remove common/*.c files.
12444         (COMMON_OBS): Remove some *.o files built from common/*.c files.
12445         * common/common.host: Add common reference.
12446         * configure.ac: Likewise.
12447         * configure: Regenerate.
12448
12449 2018-02-16  Yao Qi  <yao.qi@linaro.org>
12450
12451         * block.c (block_namespace_info): Inherit allocate_on_obstack.
12452         (block_initialize_namespace): Use new.
12453         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
12454         (dwarf2_free_objfile): Use delete.
12455         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
12456         (copy_type_recursive): Use new.
12457         * gdb_obstack.h (allocate_on_obstack): New.
12458
12459 2018-02-15  Yao Qi  <yao.qi@linaro.org>
12460
12461         PR gdb/22849
12462         * inferior.c (exit_inferior_1): Reset inf->control.
12463
12464 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
12465
12466         * ada-lang.c (ada_to_fixed_value_create): Delete advance
12467         declaration.
12468
12469 2018-02-14  Pedro Alves  <palves@redhat.com>
12470
12471         * frame-unwind.c (frame_unwind_try_unwinder): Always call
12472         frame_cleanup_after_sniffer on exception.
12473
12474 2018-02-14  Tom Tromey  <tom@tromey.com>
12475
12476         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
12477         const.
12478         (solib_bfd_open): Make pathname const.
12479         * solib.c (solib_bfd_open): Make pathname const.
12480         * solib-spu.c (spu_bfd_fopen): Make name const.
12481         (spu_bfd_open): Make pathname const.
12482         * solib-darwin.c (darwin_bfd_open): Make pathname const.
12483         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
12484
12485 2018-02-14  Tom Tromey  <tom@tromey.com>
12486
12487         * symfile.c (symfile_bfd_open): Update.
12488         * source.h (openp, source_full_path_of, find_and_open_source):
12489         Change argument type to unique_xmalloc_ptr.
12490         * source.c (openp): Take a unique_xmalloc_ptr.
12491         (source_full_path_of, find_and_open_source): Likewise.
12492         (open_source_file, symtab_to_fullname): Update.
12493         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
12494         unique_xmalloc_ptr.
12495         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
12496         (exec_file_find): Update.
12497         * psymtab.c (psymtab_to_fullname): Update.
12498         * nto-tdep.h (nto_find_and_open_solib): Update.
12499         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
12500         unique_xmalloc_ptr.
12501         * exec.c (exec_file_attach): Update.
12502         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
12503         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
12504
12505 2018-02-14  Tom Tromey  <tom@tromey.com>
12506
12507         * solib.c: Include source.h.
12508         * nto-tdep.c: Include source.h.
12509         * mi/mi-cmd-env.c: Include source.h.
12510         * infcmd.c: Include source.h.
12511         * exec.c: Include source.h.
12512         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
12513         (add_path, directory_switch, source_path, init_source_path): Move
12514         declarations...
12515         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
12516         (add_path, directory_switch, source_path, init_source_path):
12517         ...here.
12518
12519 2018-02-14  Tom Tromey  <tom@tromey.com>
12520
12521         * solist.h (exec_file_find, solib_find): Return
12522         unique_xmalloc_ptr.
12523         (solib_bfd_fopen): Take a const char *.
12524         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
12525         (exec_file_find, solib_find): Likewise.
12526         (solib_bfd_fopen): Do not take ownership of "pathname".
12527         (solib_bfd_open): Use unique_xmalloc_ptr.
12528         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
12529         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
12530         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
12531         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
12532
12533 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
12534
12535         * ada-lang.c (name_match_type_from_name): Remove reference to
12536         ada_name_for_lookup in function's documentation.
12537         * ada-lang.h (ada_name_for_lookup): Delete declaration.
12538
12539 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12540
12541         * defs.h (enum openp_flags): New enum.
12542         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
12543         Move to enum openp_flags.
12544         (openp_flags): New enum flags.
12545         (openp): Change parameter type to openp_flags.
12546         * source.c (openp): Change parameter type to openp_flags.
12547         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
12548         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
12549
12550 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
12551
12552         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
12553         per-command.
12554
12555 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12556
12557         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
12558         into...
12559         (class dwarf2_queue_guard): ...the destructor of this new class.
12560         (dw2_do_instantiate_symtab): Create instance of the new class
12561         dwarf2_queue_guard, remove cleanup.
12562
12563 2018-02-09  Tom Tromey  <tom@tromey.com>
12564
12565         * source.c (find_source_lines): Don't reference past the end of
12566         the vector.
12567
12568 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12569
12570         * remote.c (remote_btrace_maybe_reopen): Change error message.
12571         * btrace.c (btrace_enable): Likewise.
12572         (parse_xml_btrace): Likewise.
12573         (parse_xml_btrace_conf): Likewise.
12574
12575 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12576
12577         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
12578         (linux_enable_pt, linux_enable_bts): Call
12579         diagnose_perf_event_open_fail.
12580
12581 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12582
12583         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
12584         Remove parameter and change return type.  Update callers.  Move it.
12585         (linux_enable_bts, linux_enable_pt): Improve error message.
12586         (linux_enable_pt): Remove zero buffer size check.
12587         (linux_enable_btrace): Improve error messages.  Remove NULL return
12588         check.
12589
12590 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12591
12592         * btrace.c (btrace_enable): Remove target_supports_btrace call.
12593         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
12594         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
12595         (linux_supports_pt, linux_supports_btrace): Remove.
12596         (linux_enable_bts): Call cpu_supports_bts.
12597         * nat/linux-btrace.h (linux_supports_btrace): Remove.
12598         * remote.c (remote_supports_btrace): Remove.
12599         (init_remote_ops): Remove remote_supports_btrace.
12600         * target-delegates.c: Regenerated.
12601         * target.c (target_supports_btrace): Remove.
12602         * target.h (target_ops) <to_supports_btrace>: Remove
12603         (target_supports_btrace): Remove.
12604         * x86-linux-nat.c (x86_linux_create_target): Remove
12605         linux_supports_btrace.
12606
12607 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12608
12609         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
12610         btrace failed.
12611         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
12612         exception and use message in own exception.
12613
12614 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12615
12616         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
12617         (perf_event_pt_event_type): Use gdb_file_up.
12618         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
12619         scoped_fd, and scoped_mmap.
12620
12621 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12622
12623         * common/scoped_mmap.h: New.
12624         * unittests/scoped_mmap-selftest.c: New.
12625         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12626         unittests/scoped_mmap-selftest.c.
12627
12628 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
12629
12630         * common/scoped_fd.h: New.
12631         * unittests/scoped_fd-selftest.c: New.
12632         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12633         unittests/scoped_fd-selftest.c.
12634
12635 2018-02-09  Tom Tromey  <tom@tromey.com>
12636
12637         * auto-load.c (auto_load_section_scripts): Use
12638         gdb::unique_xmalloc_ptr.
12639
12640 2018-02-09  Tom Tromey  <tom@tromey.com>
12641
12642         * auto-load.c (execute_script_contents): Use std::string.
12643
12644 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
12645
12646         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
12647         Python function, rather than a new command.
12648
12649 2018-02-08  Tom Tromey  <tom@tromey.com>
12650
12651         * solib.c (solib_find_1): Use std::string.
12652         (solib_bfd_fopen): Use unique_xmalloc_ptr.
12653
12654 2018-02-08  Tom Tromey  <tom@tromey.com>
12655
12656         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
12657
12658 2018-02-08  Tom Tromey  <tom@tromey.com>
12659
12660         * source.c (find_source_lines): Use gdb::def_vector.
12661
12662 2018-02-08  Tom Tromey  <tom@tromey.com>
12663
12664         * macrocmd.c (struct temporary_macro_definition): New.
12665         (macro_define_command): Use temporary_macro_definition.  Remove
12666         cleanups.
12667         (free_macro_definition_ptr): Remove.
12668
12669 2018-02-08  Tom Tromey  <tom@tromey.com>
12670
12671         * macroexp.c (maybe_expand): Use std::string.
12672
12673 2018-02-08  Tom Tromey  <tom@tromey.com>
12674
12675         * macroexp.c (struct macro_buffer): Add initializers for some
12676         members.
12677         (init_buffer, init_shared_buffer, free_buffer)
12678         (free_buffer_return_text): Remove.
12679         (macro_buffer): New constructors.
12680         (~macro_buffer): New destructor.
12681         (macro_buffer::set_shared): New method.
12682         (macro_buffer::resize_buffer, macro_buffer::appendc)
12683         (macro_buffer::appendmem): Now methods, not free functions.
12684         (set_token, append_tokens_without_splicing, stringify)
12685         (macro_stringify): Update.
12686         (gather_arguments): Change return type.  Remove argc_p argument,
12687         add args_ptr argument.  Use std::vector.
12688         (substitute_args): Remove argc argument.  Accept std::vector.
12689         (expand): Update.  Use std::vector.
12690         (scan, macro_expand, macro_expand_next): Update.
12691
12692 2018-02-08  Tom Tromey  <tom@tromey.com>
12693
12694         * symtab.c (default_collect_symbol_completion_matches_break_on):
12695         Use unique_xmalloc_ptr.
12696         * macroscope.h: (sal_macro_scope, user_macro_scope)
12697         (default_macro_scope): Return unique_xmalloc_ptr.
12698         * macroscope.c (sal_macro_scope, user_macro_scope)
12699         (default_macro_scope): Return unique_xmalloc_ptr.
12700         * macroexp.h (macro_expand, macro_expand_once): Return
12701         unique_xmalloc_ptr.
12702         * macroexp.c (macro_expand, macro_expand_once): Return
12703         unique_xmalloc_ptr.
12704         * macrocmd.c (macro_expand_command, macro_expand_once_command)
12705         (info_macro_command, info_macros_command): Use
12706         unique_xmalloc_ptr.
12707         * compile/compile-c-support.c (write_macro_definitions): Use
12708         unique_xmalloc_ptr.
12709         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
12710
12711 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
12712
12713         * value.c (value_static_field): Assign field type instead of
12714         containing type when returning an optimized out value.
12715
12716 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12717
12718         * ft32-tdep.c (ft32_read_pc): Remove.
12719         (ft32_write_pc): Remove.
12720         (ft32_gdbarch_init): Update.
12721         * m32r-tdep.c (m32r_read_pc): Remove.
12722         (m32r_gdbarch_init): Update.
12723         * mep-tdep.c (mep_read_pc): Remove.
12724         (mep_gdbarch_init): Update.
12725         * microblaze-tdep.c (microblaze_write_pc): Remove.
12726         (microblaze_gdbarch_init): Update.
12727         * mn10300-tdep.c (mn10300_read_pc): Remove.
12728         (mn10300_write_pc): Remove.
12729         (mn10300_gdbarch_init): Update.
12730         * moxie-tdep.c (moxie_read_pc): Remove.
12731         (moxie_write_pc): Remove.
12732         (moxie_gdbarch_init): Update.
12733
12734 2018-02-06  Yao Qi  <yao.qi@linaro.org>
12735
12736         * expprint.c (print_subexp_standard): Handle
12737         OP_F77_UNDETERMINED_ARGLIST.
12738         (dump_subexp_body_standard): Likewise.
12739
12740 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
12741
12742         * target-descriptions.c (tdesc_element_visitor) Add empty
12743         implementations.
12744         (tdesc_type): Move make_gdb_type from here.
12745         (tdesc_type_builtin): Likewise.
12746         (tdesc_type_vector): Likewise.
12747         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
12748         (make_gdb_type_struct): Move from tdesc_type_with_fields.
12749         (make_gdb_type_union): Likewise.
12750         (make_gdb_type_flags): Likewise.
12751         (make_gdb_type_enum): Likewise.
12752         (make_gdb_type): New function.
12753         (tdesc_register_type): Use static make_gdb_type.
12754
12755 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
12756
12757         * infcmd.c (default_print_one_register_info): Align natural-format
12758         column values consistently one under another.
12759         (pad_to_column): New function.
12760
12761 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
12762
12763         * dwarf2read.c (dwarf2_physname): Move commment.
12764
12765 2018-02-01  Leszek Swirski  <leszeks@google.com>
12766
12767         * varobj.c (varobj_formatted_print_options): Allow recursive
12768         pretty printing if pretty printing is enabled.
12769
12770 2018-02-01  Leszek Swirski  <leszeks@google.com>
12771
12772         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
12773         names after a structop as a filename.
12774
12775 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12776
12777         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
12778         (arm_record_coproc_data_proc): Likewise.
12779
12780 2018-02-01  Yao Qi  <yao.qi@linaro.org>
12781
12782         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
12783
12784 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
12785
12786         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
12787         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
12788
12789 2018-01-31  Pedro Alves  <palves@redhat.com>
12790
12791         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
12792         * inflow.c (child_terminal_save_inferior): Wrap reference to
12793         tcgetpgrp in HAVE_TERMIOS_H.
12794         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
12795         _WIN32.
12796         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
12797         always iterate over all inferiors.
12798         (gdbsim_cntrl_c): Adjust.
12799         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
12800
12801 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12802
12803         * gdbtypes.c (lookup_array_range_type): Make sure the array's
12804         index type is objfile-owned if the element type is as well.
12805
12806 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
12807
12808         GDB 8.1 released.
12809
12810 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12811
12812         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
12813         "features/s390x-linux64.c".
12814         (_initialize_s390_linux_tdep): Remove initialization of tdescs
12815         s390_linux32 and s390x_linux64.
12816         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
12817         default tdesc.
12818         * s390-tdep.c: Include "features/s390-linux32.c" and
12819         "features/s390x-linux64.c".
12820         (s390_tdesc_valid): Add check for tdesc_has_registers.
12821         (s390_gdbarch_init): Make sure there is always a valid tdesc.
12822         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
12823         tdesc_s390x_linux64.
12824         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
12825         tdesc_s390x_linux64 to...
12826         * s390-tdep.h: ...here.
12827
12828 2018-01-30  Pedro Alves  <palves@redhat.com>
12829
12830         PR gdb/13211
12831         * config.in, configure: Regenerate.
12832         * configure.ac: Check for getpgid.
12833         * go32-nat.c (go32_pass_ctrlc): New.
12834         (go32_target): Install it.
12835         * inf-child.c (inf_child_target): Install
12836         child_terminal_save_inferior, child_pass_ctrlc and
12837         child_interrupt.
12838         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
12839         (inf_ptrace_target): No longer install it.
12840         * infcmd.c (interrupt_target_1): Adjust.
12841         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
12842         (child_interrupt): Declare.
12843         (inferior::terminal_state): New.
12844         * inflow.c (struct terminal_info): Update comments.
12845         (inferior_process_group): Delete.
12846         (terminal_is_ours): Delete.
12847         (gdb_tty_state): New.
12848         (child_terminal_init): Adjust.
12849         (is_gdb_terminal, sharing_input_terminal_1)
12850         (sharing_input_terminal): New functions.
12851         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
12852         Set the process's actual process group in the foreground if
12853         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
12854         mark terminal as the inferior's if not sharing GDB's terminal.
12855         Don't check attach_flag.
12856         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
12857         pass down a target_terminal_state.
12858         (child_terminal_save_inferior): New, factored out from ...
12859         (child_terminal_ours_1): ... this.  Handle
12860         target_terminal_state::is_ours_for_output.
12861         (child_interrupt, child_pass_ctrlc): New.
12862         (inflow_inferior_exit): Clear the inferior's terminal_state.
12863         (copy_terminal_info): Copy the inferior's terminal state.
12864         (_initialize_inflow): Remove reference to terminal_is_ours.
12865         * inflow.h (inferior_process_group): Delete.
12866         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
12867         * procfs.c (procfs_target): Don't install procfs_interrupt.
12868         (procfs_interrupt): Delete.
12869         * remote.c (remote_serial_quit_handler): Adjust.
12870         (remote_interrupt): Remove ptid parameter.  Adjust.
12871         * target-delegates.c: Regenerate.
12872         * target.c: Include "terminal.h".
12873         (target_terminal::terminal_state): Rename to ...
12874         (target_terminal::m_terminal_state): ... this.
12875         (target_terminal::init): Adjust.
12876         (target_terminal::inferior): Adjust to per-inferior
12877         terminal_state.
12878         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
12879         (target_terminal::ours, target_terminal::ours_for_output): Use
12880         target_terminal_is_ours_kind.
12881         (target_interrupt): Remove ptid parameter.  Adjust.
12882         (default_target_pass_ctrlc): Adjust.
12883         * target.h (target_ops::to_terminal_save_inferior): New field.
12884         (target_ops::to_interrupt): Remove ptid_t parameter.
12885         (target_interrupt): Remove ptid_t parameter.  Update comment.
12886         (target_pass_ctrlc): Update comment.
12887         * target/target.h (target_terminal_state): New scoped enum,
12888         factored out of ...
12889         (target_terminal::terminal_state): ... here.
12890         (target_terminal::inferior): Update comments.
12891         (target_terminal::restore_inferior): New.
12892         (target_terminal::is_inferior, target_terminal::is_ours)
12893         (target_terminal::is_ours_for_output): Adjust.
12894         (target_terminal::scoped_restore_terminal_state): Adjust to
12895         rename, and call restore_inferior() instead of inferior().
12896         (target_terminal::scoped_restore_terminal_state::m_state): Change
12897         type.
12898         (target_terminal::terminal_state): Rename to ...
12899         (target_terminal::m_terminal_state): ... this and change type.
12900
12901 2018-01-30  Pedro Alves  <palves@redhat.com>
12902
12903         * linux-nat.c (wait_for_signal): New function.
12904         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
12905         directly.
12906         (async_terminal_is_ours)
12907         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
12908         (linux_nat_add_target): Don't override
12909         to_terminal_inferior/to_terminal_ours.
12910
12911 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
12912
12913         * remote.c (remote_follow_fork): Don't call "detach_inferior".
12914
12915 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
12916
12917         * dwarf2read.c (free_dwo_files): Add forward-declaration.
12918         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
12919         dwarf2_per_objfile_free here.
12920         (dwarf2_per_objfile_free): Remove.
12921         (_initialize_dwarf2_read): Don't register
12922         dwarf2_per_objfile_free as a registry cleanup.
12923
12924 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
12925
12926         Avoid compilation errors in MinGW native builds
12927
12928         The error is triggered by including python-internal.h, and the
12929         error message is:
12930
12931              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
12932                       from build-gnulib/import/math.h:27,
12933                       from d:/usr/Python26/include/pyport.h:235,
12934                       from d:/usr/Python26/include/Python.h:58,
12935                       from python/python-internal.h:94,
12936                       from python/py-arch.c:24:
12937              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
12938         using ::hypot;
12939                 ^~~~~
12940
12941         This happens because Python headers define 'hypot' to expand t
12942         '_hypot' in the Windows builds.
12943         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
12944         'hypoth'.  This avoids a compilation error.
12945
12946 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12947
12948         * MAINTAINERS (Write After Approval): Fix ordering.
12949
12950 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
12951
12952         * MAINTAINERS (Write After Approval): Add Alan Hayward.
12953
12954 2018-01-26  Alan Modra  <amodra@gmail.com>
12955
12956         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
12957         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
12958         Remove nop.  Make const.  Comment.
12959         (powerpc32_plt_stub_so_2): New.
12960         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
12961         Correct count.  Update uses.
12962         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
12963         Move common code reading PLT entry word.  Correct
12964         powerpc32_plt_stub PLT address calculation.
12965         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
12966         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
12967         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
12968         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
12969         (ppc64_standard_linkage8): Likewise.
12970         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
12971         Correct insns description.
12972         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
12973
12974 2018-01-24  Pedro Alves  <palves@redhat.com>
12975
12976         GCC PR libstdc++/83906
12977         * gdbtypes.c (operator==(const dynamic_prop &,
12978         const dynamic_prop &)): New.
12979         (operator==(const range_bounds &, const range_bounds &)): New.
12980         (check_types_equal): Use them instead of memcmp.
12981         * gdbtypes.h (operator==(const dynamic_prop &,
12982         const dynamic_prop &)): Declare.
12983         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
12984         (operator==(const range_bounds &, const range_bounds &)): Declare.
12985         (operator!=(const range_bounds &, const range_bounds &)): Declare.
12986
12987 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12988
12989         * s390-linux-tdep.c (s390_record_address_mask)
12990         (s390_record_calc_disp_common, s390_record_calc_disp)
12991         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12992         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12993         (s390_process_record): Move to s390-tdep.c.
12994         (s390_linux_init_abi_any): Adjust.
12995         * s390-tdep.c (s390_record_address_mask)
12996         (s390_record_calc_disp_common, s390_record_calc_disp)
12997         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
12998         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
12999         (s390_process_record): Moved from s390-linux-tdep.c
13000         (s390_gdbarch_init): Adjust.
13001
13002 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13003
13004         * s390-linux-nat.c (s390-tdep.h): New include.
13005         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13006         (HFILES_NO_SRCDIR): Add s390-tdep.h.
13007         (ALLDEPFILES): Add s390-tdep.c.
13008         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13009         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13010         * s390-tdep.h: ...this.  New file.
13011         * s390-linux-tdep.c (s390-tdep.h): New include.
13012         (_initialize_s390_tdep): Rename to...
13013         (_initialize_s390_linux_tdep): ...this and adjust.
13014         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13015         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13016         s390-tdep.h.
13017         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13018         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13019         (s390_is_partial_instruction, s390_software_single_step)
13020         (is_non_branch_ril, s390_displaced_step_copy_insn)
13021         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13022         (s390_prologue_data, s390_addr, s390_store, s390_load)
13023         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13024         (s390_register_call_saved, s390_guess_tracepoint_registers)
13025         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13026         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13027         (s390_pseudo_register_name, s390_pseudo_register_type)
13028         (s390_pseudo_register_read, s390_pseudo_register_write)
13029         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13030         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13031         (s390_addr_bits_remove, s390_address_class_type_flags)
13032         (s390_address_class_type_flags_to_name)
13033         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13034         (s390_function_arg_float, s390_function_arg_vector)
13035         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13036         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13037         (s390_frame_align, s390_register_return_value, s390_return_value)
13038         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13039         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13040         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13041         (s390_trad_frame_prev_register, s390_unwind_cache)
13042         (s390_prologue_frame_unwind_cache)
13043         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13044         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
13045         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
13046         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
13047         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
13048         (s390_frame_base_address, s390_local_base_address)
13049         (s390_frame_base, s390_gcc_target_options)
13050         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
13051         (s390_validate_reg_range, s390_tdesc_valid)
13052         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
13053         * s390-tdep.c: ...this.  New file.
13054
13055 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13056
13057         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
13058         (s390_process_record, s390_gdbarch_tdep_alloc)
13059         (s390_linux_init_abi_any): Use/set new hook.
13060
13061 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13062
13063         * s390-linux-tdep.c (osabi.h): New include.
13064         (s390_linux_init_abi_31, s390_linux_init_abi_64)
13065         (s390_linux_init_abi_any): New functions.
13066         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
13067
13068 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13069
13070         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
13071         tdesc_has_registers check
13072
13073 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13074
13075         * s390-linux-tdep.c (s390_tdesc_valid): New function.
13076         (s390_validate_reg_range): New macro.
13077         (s390_gdbarch_init): Adjust.
13078
13079 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13080
13081         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
13082         (s390_gdbarch_tdep_alloc): Adjust.
13083         (s390_gdbarch_init): Adjust.
13084
13085 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13086
13087         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
13088         <have_tdb>: Change type to bool.
13089         (s390_gdbarch_tdep_alloc): Adjust.
13090         (s390_gdbarch_init): Adjust.
13091
13092 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13093
13094         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
13095         (gdbarch_tdep) <have_upper, have_vx>: New fields.
13096         (s390_gdbarch_tdep_alloc): New function.
13097         (s390_gdbarch_init): Allocate tdep at start and use its fields
13098         instead of separate variables.
13099
13100 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13101
13102         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
13103         when looking for cached gdbarch and add comment for remaining.
13104
13105 2018-01-22  Pedro Alves  <palves@redhat.com>
13106             Sergio Durigan Junior  <sergiodj@redhat.com>
13107
13108         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
13109         case.
13110
13111 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
13112
13113         * MAINTAINERS: Update my company e-mail address.
13114
13115 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13116
13117         * regcache.c (cooked_write_test): New function.
13118         (_initialize_regcache): Register the test.
13119
13120 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13121
13122         * ia64-tdep.c (ia64_pseudo_register_read): Call
13123         regcache->cooked_read instead of regcache_cooked_read_unsigned.
13124         * m32c-tdep.c (m32c_cat_read): Likewise.
13125         (m32c_r3r2r1r0_read): Likewise.
13126         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13127         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13128
13129 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13130
13131         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
13132         method raw_read instead of regcache_raw_read.
13133         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13134         * arm-tdep.c (arm_neon_quad_read): Likewise.
13135         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13136         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13137         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13138         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
13139         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13140         (i386_pseudo_register_read_into_value): Likewise.
13141         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13142         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13143         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13144         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
13145         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
13146         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
13147         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13148         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
13149         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
13150
13151 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13152
13153         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
13154         * configure.tgt: Remove target mt.
13155         * mt-tdep.c: Remove.
13156         * regcache.c (cooked_read_test): Remove the check for mt.
13157
13158 2018-01-22  Yao Qi  <yao.qi@linaro.org>
13159
13160         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
13161         instead of gdbarch_pseudo_register_read_value.
13162
13163 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13164
13165         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
13166         language is Ada.
13167
13168 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
13169
13170         * linespec.c (create_sals_line_offset): Remove code that preserved
13171         the symtab_and_line's line number.
13172
13173 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13174
13175         * varobj.c (varobj_create): Don't set valid_block when creating a
13176         floating varobj.
13177
13178 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13179
13180         * varobj.c (varobj_create): Remove out of date comment.
13181
13182 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13183
13184         PR mi/20395
13185         * ada-exp.y (write_var_from_sym): Pass extra parameter when
13186         updating innermost block.
13187         * parse.c (innermost_block_tracker::update): Take extra type
13188         parameter, and check types match before updating innermost block.
13189         (write_dollar_variable): Update innermost block for registers.
13190         * parser-defs.h (enum innermost_block_tracker_type): New enum.
13191         (innermost_block_tracker::innermost_block_tracker): Initialise
13192         m_types member.
13193         (innermost_block_tracker::reset): Take type parameter.
13194         (innermost_block_tracker::update): Take type parameter, and pass
13195         type through as needed.
13196         (innermost_block_tracker::m_types): New member.
13197         * varobj.c (varobj_create): Pass type when reseting innermost
13198         block.
13199
13200 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13201
13202         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
13203         * ada-lang.c (resolve_subexp): Likewise.
13204         * breakpoint.c (set_breakpoint_condition) Likewise.
13205         (watch_command_1) Likewise.
13206         * c-exp.y (variable): Likewise.
13207         * d-exp.y (PrimaryExpression): Likewise.
13208         * f-exp.y (variable): Likewise.
13209         * go-exp.y (variable): Likewise.
13210         * m2-exp.y (variable): Likewise.
13211         * objfiles.c (objfile::~objfile): Likewise.
13212         * p-exp.y (variable): Likewise.
13213         * parse.c (innermost_block): Change type.
13214         * parser-defs.h (class innermost_block_tracker): New.
13215         (innermost_block): Change to innermost_block_tracker.
13216         * printcmd.c (display_command): Switch to innermost_block API.
13217         (do_one_display): Likewise.
13218         * rust-exp.y (do_one_display): Likewise.
13219         * symfile.c (clear_symtab_users): Likewise.
13220         * varobj.c (varobj_create): Switch to innermost_block API, replace
13221         use of innermost_block with block stored on varobj object.
13222
13223 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
13224
13225         * expression.h (innermost_block): Remove declaration.
13226         * varobj.c: Add 'parser-defs.h' include.
13227
13228 2018-01-19  Tom Tromey  <tom@tromey.com>
13229
13230         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
13231         symbols in the static and global blocks.
13232
13233 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
13234
13235         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
13236         gdb_ptrace.h, and move including gdb_wait.h ...
13237         * nat/linux-ptrace.h: ... to here.
13238
13239 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13240
13241         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
13242         inf_ptrace_detach_success.
13243         (inf_ptrace_detach_success): Add inferior parameter, use it
13244         instead of inferior_ptid, pass it to detach_inferior.
13245         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
13246         parameter.
13247         * inferior.c (detach_inferior): Add overload that takes an
13248         inferior object.
13249         * inferior.h (detach_inferior): Likewise.
13250         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
13251         use inferior_ptid, adjust call to inf_ptrace_detach_success.
13252         * linux-thread-db.c (thread_db_detach): Use inf parameter.
13253
13254 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13255
13256         * target.h (struct target_ops) <to_detach>: Add inferior
13257         parameter.
13258         (target_detach): Likewise.
13259         * target.c (dispose_inferior): Pass inferior down.
13260         (target_detach): Pass inferior down.  Assert that it is equal to
13261         the current inferior.
13262         * aix-thread.c (aix_thread_detach): Pass inferior down.
13263         * corefile.c (core_file_command): Pass current_inferior() down.
13264         * corelow.c (core_detach): Add inferior parameter.
13265         * darwin-nat.c (darwin_detach): Likewise.
13266         * gnu-nat.c (gnu_detach): Likewise.
13267         * inf-ptrace.c (inf_ptrace_detach): Likewise.
13268         * infcmd.c (detach_command): Pass current_inferior() down to
13269         target_detach.
13270         * infrun.c (follow_fork_inferior): Pass parent_inf to
13271         target_detach.
13272         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
13273         target_detach.
13274         * linux-nat.c (linux_nat_detach): Add inferior parameter.
13275         * linux-thread-db.c (thread_db_detach): Likewise.
13276         * nto-procfs.c (procfs_detach): Likewise.
13277         * procfs.c (procfs_detach): Likewise.
13278         * record.c (record_detach): Likewise.
13279         * record.h (struct inferior): Forward-declare.
13280         (record_detach): Add inferior parameter.
13281         * remote-sim.c (gdbsim_detach): Likewise.
13282         * remote.c (remote_detach_1): Likewise.
13283         (remote_detach): Likewise.
13284         (extended_remote_detach): Likewise.
13285         * sol-thread.c (sol_thread_detach): Likewise.
13286         * target-debug.h (target_debug_print_inferior_p): New macro.
13287         * target-delegates.c: Re-generate.
13288         * top.c (kill_or_detach): Pass inferior down to target_detach.
13289         * windows-nat.c (windows_detach): Add inferior parameter.
13290
13291 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
13292
13293         * target.h (struct target_ops) <to_detach>: Remove args
13294         parameter.
13295         (target_detach): Likewise.
13296         * target.c (dispose_inferior): Adjust.
13297         (target_detach): Remove args parameter, adjust.
13298         * aix-thread.c (aix_thread_detach): Adjust.
13299         * corefile.c (core_file_command): Adjust.
13300         * corelow.c (core_detach): Adjust.
13301         * darwin-nat.c (darwin_detach): Adjust.
13302         * gnu-nat.c (gnu_detach): Adjust.
13303         * inf-ptrace.c (inf_ptrace_detach): Adjust.
13304         * infcmd.c (detach_command): Adjust
13305         * infrun.c (follow_fork_inferior): Adjust.
13306         (handle_vfork_child_exec_or_exit): Adjust.
13307         * linux-fork.c (linux_fork_detach): Remove args parameter.
13308         * linux-fork.h (linux_fork_detach): Likewise.
13309         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
13310         * linux-thread-db.c (thread_db_detach): Likewise.
13311         * nto-procfs.c (procfs_detach): Likewise.
13312         * procfs.c (procfs_detach): Likewise.
13313         (do_detach): Remove signo parameter.
13314         * record.c (record_detach): Remove args parameter.
13315         * record.h (record_detach): Likewise.
13316         * remote-sim.c (gdbsim_detach): Likewise.
13317         * remote.c (remote_detach_1): Likewise.
13318         (remote_detach): Likewise.
13319         (extended_remote_detach): Likewise.
13320         * sol-thread.c (sol_thread_detach): Likewise.
13321         * target-delegates.c: Re-generate.
13322         * top.c (struct qt_args) <args>: Remove field.
13323         (kill_or_detach): Don't pass args.
13324         (quit_force): Don't set args.
13325         * windows-nat.c (windows_detach): Remove args parameter.
13326
13327 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13328
13329         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
13330         (arm_linux_init_abi): Install it.
13331
13332 2018-01-19  Yao Qi  <yao.qi@linaro.org>
13333
13334         * osabi.c (gdb_osabi_names): Extend the regexp for
13335         arm-linux-gnueabihf.
13336
13337 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13338
13339         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
13340         m_abbrevs.
13341         (abbrev_table::add_abbrev): Update.
13342         (abbrev_table::lookup_abbrev): Update.
13343
13344 2018-01-18  Yao Qi  <yao.qi@linaro.org>
13345
13346         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
13347
13348 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
13349
13350         * compile/compile.c (compile_to_object): Convert "triplet_rx"
13351         to "std::string".
13352
13353 2018-01-17  Tom Tromey  <tom@tromey.com>
13354
13355         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
13356
13357 2018-01-17  Tom Tromey  <tom@tromey.com>
13358
13359         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
13360         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
13361         (create_array_type_with_stride): Update.
13362         * dwarf2read.c (set_die_type): Update.
13363
13364 2018-01-17  Tom Tromey  <tom@tromey.com>
13365
13366         * dwarf2read.c (delayed_method_info): Remove typedef.
13367         (dwarf2_cu::method_info): Now a std::vector.
13368         (add_to_method_list): Update.
13369         (free_delayed_list): Remove.
13370         (compute_delayed_physnames): Update.
13371         (process_full_comp_unit, process_full_type_unit): Clear the method
13372         list.  Remove cleanups.
13373         (psymtab_include_file_name): Add name_holder parameter.  Use
13374         unique_xmalloc_ptr.
13375         (dwarf_decode_lines): Update.
13376
13377 2018-01-17  Tom Tromey  <tom@tromey.com>
13378             Simon Marchi  <simon.marchi@ericsson.com>
13379
13380         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
13381         (dwarf2_per_objfile::free_cached_comp_units)
13382         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13383         (init_cutu_and_read_dies_no_follow): Update.
13384         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
13385         (dwarf2_cu::~dwarf2_cu): New.
13386         (free_heap_comp_unit, free_stack_comp_unit): Remove.
13387         (age_cached_comp_units, free_one_cached_comp_unit): Update.
13388
13389 2018-01-17  Tom Tromey  <tom@tromey.com>
13390             Simon Marchi  <simon.marchi@ericsson.com>
13391
13392         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
13393         (struct die_reader_specs) <abbrev_table>: New member.
13394         (struct abbrev_table): Add constructor.
13395         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
13396         <abbrev_obstack>: Now an auto_obstack.
13397         (abbrev_table_up): New typedef.
13398         (init_cu_die_reader): Add abbrev_table parameter.
13399         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
13400         Add result_dwo_abbrev_table.
13401         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
13402         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
13403         Update.
13404         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
13405         parameter.
13406         (skip_children): Update.
13407         (abbrev_table::alloc_abbrev): Rename from
13408         abbrev_table_alloc_abbrev.
13409         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
13410         (abbrev_table::lookup_abbrev): Rename from
13411         abbrev_table_lookup_abbrev.
13412         (abbrev_table_read_table): Return abbrev_table_up.
13413         (abbrev_table_free, abbrev_table_free_cleanup)
13414         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
13415         (load_partial_dies): Update.
13416
13417 2018-01-17  Tom Tromey  <tom@tromey.com>
13418
13419         * dwarf2read.c (dwarf2_compute_name): Update comment.
13420         (read_func_scope, read_variable): Update.
13421         (new_symbol): Remove.
13422         (new_symbol_full): Rename to new_symbol.
13423
13424 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
13425
13426         PR gdb/16577
13427         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
13428         a warning instead of throwing an error, set section size to 0 and return
13429         NULL.
13430         * gdb_bfd.h (gdb_bfd_map_section): Update description.
13431
13432 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13433
13434         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
13435         std::string.
13436         (linux_ptrace_attach_fail_reason_string): Likewise.
13437         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
13438         Likewise.
13439         (linux_ptrace_attach_fail_reason_string): Likewise.
13440         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
13441
13442 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
13443
13444         * linux-nat.c (linux_nat_attach): Remove xstrdup.
13445
13446 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
13447
13448         PR gdb/21559
13449         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
13450         checking for fs_base/gs_base fields in struct user_regs_struct.
13451         * configure: Regenerate.
13452
13453 2018-01-17  Yao Qi  <yao.qi@linaro.org>
13454
13455         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
13456         function.
13457         (aarch64_linux_init_abi): Install it to gdbarch hook
13458         gcc_target_options.
13459
13460 2018-01-15  Pedro Alves  <palves@redhat.com>
13461
13462         * common/signals-state-save-restore.c
13463         (save_original_signals_state): Fix typos.
13464
13465 2017-01-12  Tom Tromey  <tom@tromey.com>
13466             Sergio Durigan Junior  <sergiodj@redhat.com>
13467
13468         * Makefile.in (install-only): Install gdb-add-index.
13469
13470 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
13471
13472         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
13473
13474 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13475
13476         * infrun.c (keep_going_pass_signal): Clear step-over info when
13477         insert_breakpoints fails.
13478
13479 2018-01-11  Pedro Alves  <palves@redhat.com>
13480
13481         PR gdb/22583
13482         * infrun.c (resume): Rename to ...
13483         (resume_1): ... this.
13484         (resume): Reimplement as wrapper around resume_1.
13485
13486 2018-01-11  Pedro Alves  <palves@redhat.com>
13487
13488         PR remote/22597
13489         * remote.c (remote_parse_stop_reply): Default to the last-set
13490         general thread instead of to 'magic_null_ptid'.
13491
13492 2018-01-10  Pedro Alves  <palves@redhat.com>
13493
13494         * language.h (language_get_symbol_name_matcher): Rename ...
13495         (get_symbol_name_matcher): ... this.
13496         * language.c (language_get_symbol_name_matcher): Ditto.
13497         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
13498         callers adjusted.
13499
13500 2018-01-10  Pedro Alves  <palves@redhat.com>
13501
13502         PR gdb/22670
13503         * dwarf2read.c
13504         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
13505         Adjust to use language_get_symbol_name_matcher instead of
13506         language_defn::la_get_symbol_name_matcher.
13507         * language.c (language_get_symbol_name_matcher): If in Ada mode
13508         and the lookup name is a verbatim match, return Ada's matcher.
13509         * language.h (language_get_symbol_name_matcher): Adjust comment.
13510         (ada_lookup_name_info::verbatim_p):: New method.
13511
13512 2018-01-10  Pedro Alves  <palves@redhat.com>
13513
13514         PR gdb/22670
13515         * ada-lang.c (ada_collect_symbol_completion_matches): If the
13516         minsym's language is language_auto or language_cplus, pass down
13517         language_ada instead.
13518         * symtab.c (compare_symbol_name): Don't frob symbol language here.
13519
13520 2018-01-10  Pedro Alves  <palves@redhat.com>
13521
13522         PR gdb/22670
13523         * minsyms.c (linkage_name_str): New function.
13524         (iterate_over_minimal_symbols): Use it.
13525
13526 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13527
13528         * NEWS: Document that 'info proc' now works on FreeBSD.
13529
13530 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13531
13532         * configure.ac: Check for kinfo_getfile in libutil.
13533         * configure: Regenerate.
13534         * config.in: Regenerate.
13535         * fbsd-nat.c: Include "fbsd-tdep.h".
13536         (fbsd_fetch_cmdline): New.
13537         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
13538         rather than calling error.
13539         (fbsd_info_proc): New.
13540         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
13541         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
13542         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
13543
13544 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13545
13546         * fbsd-nat.c (struct free_deleter): Remove.
13547         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
13548
13549 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13550
13551         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
13552         NULL for an empty pathname.
13553
13554 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
13555
13556         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
13557         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
13558         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
13559         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
13560         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
13561         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
13562         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
13563         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
13564         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
13565         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
13566         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
13567         (fbsd_core_fetch_timeval, fbsd_print_sigset)
13568         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
13569         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
13570         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
13571
13572 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
13573
13574         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
13575         (gnu_xfer_auxv): New function.
13576         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
13577         TARGET_OBJECT_AUXV.
13578
13579 2018-01-08  Yao Qi  <yao.qi@linaro.org>
13580             Simon Marchi  <simon.marchi@ericsson.com>
13581
13582         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
13583         common/selftest.c.
13584         (COMMON_OBS): Remove selftest.o.
13585         * configure.ac: Append selftest-arch.c and common/selftest.c to
13586         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
13587         * configure: Re-generated.
13588         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
13589         GDB_SELF_TEST.
13590         (maintenance_info_selftests): Likewise.
13591
13592 2018-01-08  Xavier Roirand  <roirand@adacore.com>
13593
13594         * ada-valprint.c (val_print_packed_array_elements): Use
13595         proper number of elements when printing an array indexed
13596         by an enumeration type.
13597
13598 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
13599
13600         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
13601         (dw2_get_file_names_reader): Adjust.
13602         (lookup_dwo_signatured_type): Adjust.
13603         (lookup_dwp_signatured_type): Adjust.
13604         (lookup_signatured_type): Adjust.
13605         (create_type_unit_group): Adjust.
13606         (get_type_unit_group): Adjust.
13607         (process_psymtab_comp_unit_reader): Adjust.
13608         (build_type_psymtabs_reader): Adjust.
13609         (scan_partial_symbols): Adjust.
13610         (add_partial_symbol): Adjust.
13611         (add_partial_subprogram): Adjust.
13612         (peek_die_abbrev): Adjust.
13613         (fixup_go_packaging): Adjust.
13614         (process_imported_unit_die): Adjust.
13615         (dwarf2_compute_name): Adjust.
13616         (dwarf2_physname): Adjust.
13617         (read_import_statement): Adjust.
13618         (handle_DW_AT_stmt_list): Adjust.
13619         (read_file_scope): Adjust.
13620         (read_func_scope): Adjust.
13621         (read_lexical_block_scope): Adjust.
13622         (read_call_site_scope): Adjust.
13623         (read_variable): Adjust.
13624         (dwarf2_rnglists_process): Adjust.
13625         (dwarf2_ranges_process): Adjust.
13626         (dwarf2_ranges_read): Adjust.
13627         (dwarf2_get_pc_bounds): Adjust.
13628         (dwarf2_record_block_ranges): Adjust.
13629         (dwarf2_add_field): Adjust.
13630         (dwarf2_add_member_fn): Adjust.
13631         (read_structure_type): Adjust.
13632         (process_structure_scope): Adjust.
13633         (read_enumeration_type): Adjust.
13634         (read_array_type): Adjust.
13635         (mark_common_block_symbol_computed): Adjust.
13636         (read_common_block): Adjust.
13637         (read_namespace_type): Adjust.
13638         (read_namespace): Adjust.
13639         (read_module_type): Adjust.
13640         (read_tag_pointer_type): Adjust.
13641         (read_tag_ptr_to_member_type): Adjust.
13642         (read_tag_string_type): Adjust.
13643         (read_subroutine_type): Adjust.
13644         (read_typedef): Adjust.
13645         (read_base_type): Adjust.
13646         (attr_to_dynamic_prop): Adjust.
13647         (read_subrange_type): Adjust.
13648         (read_unspecified_type): Adjust.
13649         (dwarf2_read_abbrevs): Adjust.
13650         (load_partial_dies): Adjust.
13651         (read_partial_die): Adjust.
13652         (find_partial_die): Adjust.
13653         (guess_partial_die_structure_name): Adjust.
13654         (fixup_partial_die): Adjust.
13655         (read_attribute_value): Adjust.
13656         (read_addr_index): Adjust.
13657         (read_addr_index_from_leb128): Adjust.
13658         (read_str_index): Adjust.
13659         (dwarf2_string_attr): Adjust.
13660         (get_debug_line_section): Adjust.
13661         (dwarf_decode_line_header): Adjust.
13662         (lnp_state_machine::check_line_address): Adjust.
13663         (dwarf_decode_lines_1): Adjust.
13664         (dwarf_decode_lines): Adjust.
13665         (dwarf2_start_symtab): Adjust.
13666         (var_decode_location): Adjust.
13667         (new_symbol_full): Adjust.
13668         (dwarf2_const_value_data): Adjust.
13669         (dwarf2_const_value_attr): Adjust.
13670         (dwarf2_const_value): Adjust.
13671         (die_type): Adjust.
13672         (die_containing_type): Adjust.
13673         (build_error_marker_type): Adjust.
13674         (lookup_die_type): Adjust.
13675         (guess_full_die_structure_name): Adjust.
13676         (anonymous_struct_prefix): Adjust.
13677         (determine_prefix): Adjust.
13678         (dwarf2_name): Adjust.
13679         (follow_die_ref_or_sig): Adjust.
13680         (follow_die_offset): Adjust.
13681         (follow_die_ref): Adjust.
13682         (follow_die_sig_1): Adjust.
13683         (follow_die_sig): Adjust.
13684         (get_signatured_type): Adjust.
13685         (get_DW_AT_signature_type): Adjust.
13686         (decode_locdesc): Adjust.
13687         (dwarf_decode_macros): Adjust.
13688         (cu_debug_loc_section): Adjust.
13689         (fill_in_loclist_baton): Adjust.
13690         (dwarf2_symbol_mark_computed): Adjust.
13691         (init_one_comp_unit): Don't assign
13692         dwarf2_cu::dwarf2_per_objfile.
13693         (set_die_type): Adjust.
13694
13695 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13696
13697         * dwarf2read.c (struct mapped_debug_names): Add constructor.
13698         <dwarf2_per_objfile>: New field.
13699         (dwarf2_per_objfile): Remove global.
13700         (get_dwarf2_per_objfile): New function.
13701         (set_dwarf2_per_objfile): New function.
13702         (dwarf2_build_psymtabs_hard): Change objfile parameter to
13703         dwarf2_per_objfile.
13704         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13705         (read_abbrev_offset): Likewise.
13706         (read_indirect_string): Likewise.
13707         (read_indirect_line_string): Likewise.
13708         (read_indirect_string_at_offset): Likewise.
13709         (read_indirect_string_from_dwz): Likewise.
13710         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13711         dwarf2_per_objfile.
13712         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13713         (create_all_comp_units): Change objfile parameter to
13714         dwarf2_per_objfile.
13715         (create_all_type_units): Likewise.
13716         (process_queue): Add dwarf2_per_objfile parameter.
13717         (read_and_check_comp_unit_head): Likewise.
13718         (lookup_dwo_unit_in_dwp): Likewise.
13719         (get_dwp_file): Likewise.
13720         (process_cu_includes): Likewise.
13721         (struct free_dwo_file_cleanup_data): New struct.
13722         (dwarf2_has_info): Use get_dwarf2_per_objfile and
13723         set_dwarf2_per_objfile.
13724         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
13725         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
13726         context, adjust calls.
13727         (dw2_instantiate_symtab): Likewise.
13728         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
13729         (dw2_get_cu): Likewise.
13730         (create_cu_from_index_list): Change objfile parameter to
13731         dwarf2_per_objfile.
13732         (create_cus_from_index_list): Get dwarf2_per_objfile from
13733         context, adjust calls.
13734         (create_cus_from_index): Likewise.
13735         (create_signatured_type_table_from_index): Change objfile
13736         parameter to dwarf2_per_objfile.
13737         (create_signatured_type_table_from_debug_names): Change objfile
13738         parameter to dwarf2_per_objfile.
13739         (create_addrmap_from_index): Likewise.
13740         (create_addrmap_from_aranges): Likewise.
13741         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
13742         (dw2_setup): Remove.
13743         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
13744         context.
13745         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
13746         get_dwarf2_per_objfile.
13747         (dw2_forget_cached_source_info): Likewise.
13748         (dw2_map_symtabs_matching_filename): Likewise.
13749         (struct dw2_symtab_iterator) <index>: Remove.
13750         <dwarf2_per_objfile>: New field.
13751         (dw2_symtab_iter_init): Replace index parameter with
13752         dwarf2_per_objfile.
13753         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
13754         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
13755         (dw2_print_stats): Likewise.
13756         (dw2_dump): Likewise.
13757         (dw2_expand_symtabs_for_function): Likewise.
13758         (dw2_expand_all_symtabs): Likewise.
13759         (dw2_expand_symtabs_with_fullname): Likewise.
13760         (dw2_expand_marked_cus): Replace index and objfile parameters
13761         with dwarf2_per_objfile.
13762         (dw_expand_symtabs_matching_file_matcher): Add
13763         dwarf2_per_objfile parameter and adjust calls.
13764         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
13765         adjust calls.
13766         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
13767         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
13768         adjust calls.
13769         (create_cus_from_debug_names_list): Replace objfile parameter
13770         with dwarf2_per_objfile and adjust calls.
13771         (create_cus_from_debug_names): Likewise.
13772         (dwarf2_read_debug_names): Likewise.
13773         (mapped_debug_names::namei_to_name): Adjust call.
13774         (dw2_debug_names_iterator::next): Likewise.
13775         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
13776         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
13777         (dw2_debug_names_dump): Likewise.
13778         (dw2_debug_names_expand_symtabs_for_function): Likewise.
13779         (dw2_debug_names_expand_symtabs_matching): Likewise.
13780         (dwarf2_initialize_objfile): Likewise.
13781         (dwarf2_build_psymtabs): Likewise.
13782         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
13783         this_cu.
13784         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
13785         (read_and_check_comp_unit_head): Likewise.
13786         (read_abbrev_offset): Likewise.
13787         (create_debug_type_hash_table): Likewise.
13788         (create_debug_types_hash_table): Likewise.
13789         (create_all_type_units): Replace objfile parameter with
13790         dwarf2_per_objfile.
13791         (add_type_unit): Add dwarf2_per_objfile parameter.
13792         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
13793         with dwarf2_per_objfile.
13794         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
13795         (lookup_dwp_signatured_type): Likewise.
13796         (lookup_signatured_type): Likewise.
13797         (read_cutu_die_from_dwo): Likewise.
13798         (init_tu_and_read_dwo_dies): Likewise.
13799         (init_cutu_and_read_dies): Likewise.
13800         (init_cutu_and_read_dies_no_follow): Likewise.
13801         (allocate_type_unit_groups_table): Add objfile parameter.
13802         (create_type_unit_group): Use dwarf2_per_objfile from cu.
13803         (get_type_unit_group): Likewise.
13804         (process_psymtab_comp_unit): Update call.
13805         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
13806         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
13807         (print_tu_stats): Likewise.
13808         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
13809         in void* parameter.
13810         (build_type_psymtabs): Change objfile parameter to
13811         dwarf2_per_objfile.
13812         (process_skeletonless_type_unit): Use dwarf2_per_objfile
13813         passed in void* parameter.
13814         (process_skeletonless_type_units): Change objfile parameter to
13815         dwarf2_per_objfile.
13816         (set_partial_user): Likewise.
13817         (dwarf2_build_psymtabs_hard): Likewise.
13818         (read_comp_units_from_section): Likewise.
13819         (create_all_comp_units): Likewise.
13820         (scan_partial_symbols): Update calls.
13821         (add_partial_symbol): Likewise.
13822         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
13823         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
13824         (process_queue): Add dwarf2_per_objfile parameter.
13825         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
13826         (compute_compunit_symtab_includes): Likewise.
13827         (process_cu_includes): Add dwarf2_per_objfile parameter.
13828         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
13829         (process_full_type_unit): Likewise.
13830         (process_imported_unit_die): Update call.
13831         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
13832         (read_file_scope): Likewise.
13833         (allocate_dwo_file_hash_table): Add objfile parameter.
13834         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
13835         (create_cus_hash_table): Likewise.
13836         (create_dwp_hash_table): Likewise.
13837         (create_dwo_unit_in_dwp_v1): Likewise.
13838         (create_dwp_v2_section): Likewise.
13839         (create_dwo_unit_in_dwp_v2): Likewise.
13840         (lookup_dwo_unit_in_dwp): Likewise.
13841         (try_open_dwop_file): Likewise.
13842         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
13843         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
13844         cleanup to include a reference to dwarf2_per_objfile.
13845         (open_dwp_file): Add dwarf2_per_objfile parameter.
13846         (open_and_init_dwp_file): Likewise.
13847         (get_dwp_file): Likewise.
13848         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
13849         (queue_and_load_all_dwo_tus): Update call.
13850         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
13851         data.
13852         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
13853         (dwarf2_ranges_process): Likewise.
13854         (dwarf2_get_pc_bounds): Likewise.
13855         (mark_common_block_symbol_computed): Likewise.
13856         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
13857         (dwarf2_read_abbrevs): Update call.
13858         (read_partial_die): Use dwarf2_per_objfile from cu.
13859         (find_partial_die): Likewise.
13860         (fixup_partial_die): Likewise.
13861         (read_attribute_value): Likewise.
13862         (read_indirect_string_at_offset_from): Add objfile parameter.
13863         (read_indirect_string_at_offset): Add dwarf2_per_objfile
13864         parameter.
13865         (read_indirect_string_from_dwz): Add objfile parameter.
13866         (read_indirect_string): Add objfile parameter.
13867         (read_addr_index_1): Add dwarf2_per_objfile parameter.
13868         (read_addr_index): Use dwarf2_per_objfile from cu.
13869         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
13870         call dw2_setup.
13871         (read_str_index): Use dwarf2_per_objfile from cu.
13872         (get_debug_line_section): Likewise.
13873         (read_formatted_entries): Add dwarf2_per_objfile parameter.
13874         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
13875         (new_symbol_full): Use dwarf2_per_objfile from cu.
13876         (build_error_marker_type): Likewise.
13877         (lookup_die_type): Likewise.
13878         (determine_prefix): Likewise.
13879         (follow_die_offset): Likewise.
13880         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
13881         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
13882         (dwarf2_fetch_die_type_sect_off): Likewise.
13883         (dwarf2_get_die_type): Likewise.
13884         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
13885         (get_signatured_type): Likewise.
13886         (get_DW_AT_signature_type): Likewise.
13887         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
13888         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
13889         (cu_debug_loc_section): Likewise.
13890         (fill_in_loclist_baton): Likewise.
13891         (dwarf2_symbol_mark_computed): Likewise.
13892         (dwarf2_find_containing_comp_unit): Change objfile parameter to
13893         dwarf2_per_objfile.
13894         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
13895         parameter.
13896         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
13897         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
13898         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
13899         (set_die_type): Use dwarf2_free_objfile from cu.
13900         (get_die_type_at_offset): Likewise.
13901         (dwarf2_per_objfile_free): Don't assign global variable.
13902         (debug_names) <constructor>: Add dwarf2_per_objfile
13903         parameter, update m_debugstrlookup construction.
13904         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
13905         parameter.
13906         <m_dwarf2_per_objfile>: New field.
13907         <lookup>: Use m_dwarf2_per_objfile.
13908         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
13909         (psyms_seen_size): Likewise.
13910         (write_gdbindex): Replace objfile parameter with
13911         dwarf2_per_objfile.
13912         (write_debug_names): Likewise.
13913         (write_psymtabs_to_index): Likewise.
13914         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
13915         calls.
13916
13917 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
13918
13919         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
13920         <dwarf2_per_objfile>: New field.
13921         (struct dwarf2_per_cu_data) <objfile>: Remove.
13922         <dwarf2_per_objfile>: New field.
13923         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
13924         of objfile.
13925         (create_signatured_type_table_from_index): Likewise.
13926         (create_debug_type_hash_table): Likewise.
13927         (fill_in_sig_entry_from_dwo_entry): Likewise.
13928         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
13929         (create_type_unit_group): Assign dwarf2_per_objfile instead of
13930         objfile.
13931         (create_partial_symtab): Access objfile through
13932         dwarf2_per_objfile.
13933         (process_psymtab_comp_unit_reader): Likewise.
13934         (read_comp_units_from_section): Likewise.
13935         (scan_partial_symbols): Likewise.
13936         (add_partial_symbol): Likewise.
13937         (add_partial_subprogram): Likewise.
13938         (peek_die_abbrev): Likewise.
13939         (fixup_go_packaging): Likewise.
13940         (process_full_comp_unit): Likewise.
13941         (process_full_type_unit): Likewise.
13942         (process_imported_unit_die): Likewise.
13943         (dwarf2_compute_name): Likewise.
13944         (dwarf2_physname): Likewise.
13945         (read_import_statement): Likewise.
13946         (create_cus_hash_table): Assign dwarf2_physname instead of
13947         objfile.
13948         (read_func_scope): Access objfile through dwarf2_per_objfile.
13949         (read_lexical_block_scope): Likewise.
13950         (read_call_site_scope): Likewise.
13951         (read_variable): Likewise.
13952         (dwarf2_rnglists_process): Likewise.
13953         (dwarf2_ranges_process): Likewise.
13954         (dwarf2_ranges_read): Likewise.
13955         (dwarf2_record_block_ranges): Likewise.
13956         (dwarf2_add_field): Likewise.
13957         (dwarf2_add_member_fn): Likewise.
13958         (read_structure_type): Likewise.
13959         (process_structure_scope): Likewise.
13960         (read_enumeration_type): Likewise.
13961         (read_array_type): Likewise.
13962         (read_common_block): Likewise.
13963         (read_namespace_type): Likewise.
13964         (read_namespace): Likewise.
13965         (read_module_type): Likewise.
13966         (read_tag_pointer_type): Likewise.
13967         (read_tag_ptr_to_member_type): Likewise.
13968         (read_tag_string_type): Likewise.
13969         (read_subroutine_type): Likewise.
13970         (read_typedef): Likewise.
13971         (read_base_type): Likewise.
13972         (attr_to_dynamic_prop): Likewise.
13973         (read_subrange_type): Likewise.
13974         (read_unspecified_type): Likewise.
13975         (load_partial_dies): Likewise.
13976         (read_partial_die): Likewise.
13977         (find_partial_die): Likewise.
13978         (guess_partial_die_structure_name): Likewise.
13979         (fixup_partial_die): Likewise.
13980         (read_attribute_value): Likewise.
13981         (read_addr_index_from_leb128): Likewise.
13982         (dwarf2_read_addr_index): Likewise.
13983         (dwarf2_string_attr): Likewise.
13984         (lnp_state_machine::check_line_address): Likewise.
13985         (dwarf_decode_lines_1): Likewise.
13986         (dwarf_decode_lines): Likewise.
13987         (dwarf2_start_symtab): Likewise.
13988         (var_decode_location): Likewise.
13989         (new_symbol_full): Likewise.
13990         (dwarf2_const_value_data): Likewise.
13991         (dwarf2_const_value_attr): Likewise.
13992         (dwarf2_const_value): Likewise.
13993         (die_type): Likewise.
13994         (die_containing_type): Likewise.
13995         (lookup_die_type): Likewise.
13996         (guess_full_die_structure_name): Likewise.
13997         (anonymous_struct_prefix): Likewise.
13998         (dwarf2_name): Likewise.
13999         (follow_die_ref_or_sig): Likewise.
14000         (follow_die_offset): Likewise.
14001         (follow_die_ref): Likewise.
14002         (dwarf2_fetch_die_loc_sect_off): Likewise.
14003         (dwarf2_fetch_constant_bytes): Likewise.
14004         (dwarf2_fetch_die_type_sect_off): Likewise.
14005         (dwarf2_get_die_type): Likewise.
14006         (follow_die_sig): Likewise.
14007         (decode_locdesc): Likewise.
14008         (dwarf2_per_cu_objfile): Likewise.
14009         (dwarf2_per_cu_text_offset): Likewise.
14010         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14011         objfile.
14012         (set_die_type): Access objfile through
14013         dwarf2_per_objfile.
14014
14015 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14016
14017         * valprint.c (converted_character_d): Remove typedef.
14018         (DEF_VEC_O (converted_character_d)): Remove.
14019         (count_next_character): Use std::vector.
14020         (print_converted_chars_to_obstack): Likewise.
14021         (generic_printstr): Likewise.
14022
14023 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14024
14025         * xml-support.h (struct gdb_xml_value): Add constructor.
14026         <value>: Change type to unique_xmalloc_ptr.
14027         (gdb_xml_value_s): Remove typedef.
14028         (DEF_VEC_O (gdb_xml_value_s)): Remove.
14029         (gdb_xml_element_start_handler): Change parameter type to
14030         std::vector.
14031         (xml_find_attribute): Likewise.
14032         * xml-support.c (xml_find_attribute): Change parameter type to
14033         std::vector and adjust.
14034         (gdb_xml_values_cleanup): Remove.
14035         (gdb_xml_parser::start_element): Adjust to std::vector.
14036         (xinclude_start_include): Change paraeter type to std::vector
14037         and adjust.
14038         * btrace.c (check_xml_btrace_version): Likewise.
14039         (parse_xml_btrace_block): Likewise.
14040         (parse_xml_btrace_pt_config_cpu): Likewise.
14041         (parse_xml_btrace_pt): Likewise.
14042         (parse_xml_btrace_conf_bts): Likewise.
14043         (parse_xml_btrace_conf_pt): Likewise.
14044         * memory-map.c (memory_map_start_memory): Likewise.
14045         (memory_map_start_property): Likewise.
14046         * osdata.c (osdata_start_osdata): Likewise.
14047         (osdata_start_item): Likewise.
14048         (osdata_start_column): Likewise.
14049         * remote.c (start_thread): Likewise.
14050         * solib-aix.c (library_list_start_library): Likewise.
14051         (library_list_start_list): Likewise.
14052         * solib-svr4.c (library_list_start_library): Likewise.
14053         (svr4_library_list_start_list): Likewise.
14054         * solib-target.c (library_list_start_segment): Likewise.
14055         (library_list_start_section): Likewise.
14056         (library_list_start_library): Likewise.
14057         (library_list_start_list): Likewise.
14058         * tracepoint.c (traceframe_info_start_memory): Likewise.
14059         (traceframe_info_start_tvar): Likewise.
14060         * xml-syscall.c (syscall_start_syscall): Likewise.
14061         * xml-tdesc.c (tdesc_start_target): Likewise.
14062         (tdesc_start_feature): Likewise.
14063         (tdesc_start_reg): Likewise.
14064         (tdesc_start_union): Likewise.
14065         (tdesc_start_struct): Likewise.
14066         (tdesc_start_flags): Likewise.
14067         (tdesc_start_enum): Likewise.
14068         (tdesc_start_field): Likewise.
14069         (tdesc_start_enum_value): Likewise.
14070         (tdesc_start_vector): Likewise.
14071
14072 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14073
14074         * extension.h (struct xmethod_worker) <clone>: Remove.
14075         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
14076         Remove.
14077         (python_xmethod_worker::clone): Remove.
14078         * valops.c (find_overload_match): Use std::move instead of
14079         clone.
14080
14081 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14082
14083         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
14084         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
14085         <free_xmethod_worker_data>: Remove.
14086         <get_matching_xmethod_workers>: Chance VEC to std::vector.
14087         <get_xmethod_arg_types>: Remove.
14088         <get_xmethod_result_type>: Remove.
14089         <invoke_xmethod>: Remove.
14090         * extension.c (new_xmethod_worker): Remove.
14091         (clone_xmethod_worker): Remove.
14092         (get_matching_xmethod_workers): Return void, pass std::vector by
14093         pointer.
14094         (get_xmethod_arg_types): Rename to...
14095         (xmethod_worker::get_arg_types): ... this, and adjust.
14096         (get_xmethod_result_type): Rename to...
14097         (xmethod_worker::get_result_type): ... this, and adjust.
14098         (invoke_xmethod): Remove.
14099         (free_xmethod_worker): Remove.
14100         (free_xmethod_worker_vec): Remove.
14101         * extension.h (enum ext_lang_rc): Move here from
14102         extension-priv.h.
14103         (struct xmethod_worker): Add constructor and destructor.
14104         <data>: Remove.
14105         <value>: Remove.
14106         <invoke, clone, do_get_result_type, do_get_arg_types>: New
14107         virtual pure methods.
14108         <get_arg_types, get_result_type>: New methods.
14109         (xmethod_worker_ptr): Remove typedef.
14110         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
14111         (xmethod_worker_vec): Remove typedef.
14112         (xmethod_worker_up): New typedef.
14113         (invoke_xmethod): Remove.
14114         (clone_xmethod_worker): Remove.
14115         (free_xmethod_worker): Remove.
14116         (free_xmethod_worker_vec): Remove.
14117         (get_xmethod_arg_types): Remove.
14118         (get_xmethod_result_type): Remove.
14119         * valops.c (find_method_list): Use std::vector, don't use
14120         intermediate vector.
14121         (value_find_oload_method_list): Use std::vector.
14122         (find_overload_match): Use std::vector.
14123         (find_oload_champ): Use std::vector.
14124         * value.c (value_free): Use operator delete.
14125         (value_of_xmethod): Rename to...
14126         (value_from_xmethod): ... this.  Don't assign
14127         xmethod_worker::value, take rvalue-reference.
14128         (result_type_of_xmethod): Adjust.
14129         (call_xmethod): Adjust.
14130         * value.h: Include extension.h.
14131         (struct xmethod_worker): Don't forward-declare.
14132         (value_of_xmethod): Rename to...
14133         (value_from_xmethod): ... this, take rvalue-reference.
14134         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
14135         (struct python_xmethod_worker): ... this, add constructor and
14136         destructor.
14137         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
14138         (gdbpy_free_xmethod_worker_data): Rename to...
14139         (python_xmethod_worker::~python_xmethod_worker): ... this and
14140         adjust.
14141         (gdbpy_clone_xmethod_worker_data): Rename to...
14142         (python_xmethod_worker::clone): ... this and adjust.
14143         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
14144         temporary vector.
14145         (gdbpy_get_xmethod_arg_types): Rename to...
14146         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
14147         (gdbpy_get_xmethod_result_type): Rename to...
14148         (python_xmethod_worker::do_get_result_type): ... this and
14149         adjust.
14150         (gdbpy_invoke_xmethod): Rename to...
14151         (python_xmethod_worker::invoke): ... this and adjust.
14152         (new_python_xmethod_worker): Rename to...
14153         (python_xmethod_worker::python_xmethod_worker): ... this and
14154         adjust.
14155         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
14156         Remove.
14157         (gdbpy_free_xmethod_worker_data): Remove.
14158         (gdbpy_get_matching_xmethod_workers): Use std::vector.
14159         (gdbpy_get_xmethod_arg_types): Remove.
14160         (gdbpy_get_xmethod_result_type): Remove.
14161         (gdbpy_invoke_xmethod): Remove.
14162         * python/python.c (python_extension_ops): Remove obsolete
14163         callbacks.
14164
14165 2018-01-05  Pedro Alves  <palves@redhat.com>
14166
14167         PR gdb/18653
14168         * common/signals-state-save-restore.c
14169         (save_original_signals_state): New parameter 'quiet'.  Warn if we
14170         find a custom handler preinstalled, instead of internal erroring.
14171         But only warn if !quiet.
14172         * common/signals-state-save-restore.h
14173         (save_original_signals_state): New parameter 'quiet'.
14174         * main.c (captured_main_1): Move save_original_signals_state call
14175         after option handling, and pass QUIET.
14176
14177 2018-01-05  Pedro Alves  <palves@redhat.com>
14178
14179         * spu-tdep.c (spu_catch_start): Pass
14180         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
14181
14182 2018-01-05  Pedro Alves  <palves@redhat.com>
14183
14184         PR gdb/22670
14185         * ada-lang.c (literal_symbol_name_matcher): New function.
14186         (ada_get_symbol_name_matcher): Use it for
14187         symbol_name_match_type::SEARCH_NAME.
14188         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
14189         it down instead of assuming symbol_name_match_type::FULL.
14190         * block.h (block_lookup_symbol): New parameter 'match_type'.
14191         * c-valprint.c (print_unpacked_pointer): Use
14192         lookup_symbol_search_name instead of lookup_symbol.
14193         * compile/compile-object-load.c (get_out_value_type): Pass down
14194         symbol_name_match_type::SEARCH_NAME.
14195         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
14196         symbol_name_match_type::FULL.
14197         * cp-support.c (cp_get_symbol_name_matcher): Handle
14198         symbol_name_match_type::SEARCH_NAME.
14199         * infrun.c (insert_exception_resume_breakpoint): Use
14200         lookup_symbol_search_name.
14201         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
14202         * psymtab.c (maintenance_check_psymtabs): Use
14203         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
14204         * stack.c (print_frame_args): Use lookup_symbol_search_name and
14205         SYMBOL_SEARCH_NAME.
14206         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
14207         if symbol_name_match_type::SEARCH_NAME.
14208         (lookup_symbol_in_language): Pass down
14209         symbol_name_match_type::FULL.
14210         (lookup_symbol_search_name): New.
14211         (lookup_language_this): Pass down
14212         symbol_name_match_type::SEARCH_NAME.
14213         (lookup_symbol_aux, lookup_local_symbol): New parameter
14214         'match_type'.  Pass it down.
14215         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
14216         (lookup_symbol_search_name): New declaration.
14217         (lookup_symbol_in_block): New 'match_type' parameter.
14218
14219 2018-01-05  Pedro Alves  <palves@redhat.com>
14220
14221         PR gdb/22670
14222         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
14223         ada_lookup_symbol.
14224         (ada_lookup_symbol): Reimplement in terms of
14225         ada_lookup_symbol_list, bits factored out from
14226         ada_lookup_encoded_symbol.
14227
14228 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14229
14230         * ada-exp.y (write_object_renaming): When subscripting an array
14231         using a symbol as the index, pass the block in call to
14232         ada_lookup_encoded_symbol when looking that symbol up.
14233
14234 2018-01-05  Jerome Guitton  <guitton@adacore.com>
14235
14236         * ada-lang.c (ada_array_length): Use ada_index_type instead of
14237         TYPE_INDEX_TYPE.
14238
14239 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14240
14241         * ada-lang.c (ada_to_fixed_value_create): Add handling of
14242         the case where VALUE_LVAL (val0) is not lval_memory.
14243
14244 2018-01-05  Xavier Roirand  <roirand@adacore.com>
14245
14246         * ada-valprint.c (print_optional_low_bound): Handle
14247         character-indexed array printing like boolean-indexed array
14248         printing.
14249
14250 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14251
14252         * NEWS: Create a new section for the next release branch.
14253         Rename the section of the current branch, now that it has
14254         been cut.
14255
14256 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
14257
14258         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
14259         * version.in: Bump version to 8.1.50.DATE-git.
14260
14261 2018-01-03  Xavier Roirand  <roirand@adacore.com>
14262
14263         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
14264         Add field.
14265         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
14266         Add field.
14267         (default_exception_support_info) <catch_handlers_sym>: Add field.
14268         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
14269         (ada_exception_name_addr_1): Add "catch handlers" handling.
14270         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
14271         Update all callers.
14272         (create_excep_cond_exprs) <ex>: Add parameter.
14273         (re_set_exception): Update create_excep_cond_exprs call.
14274         (print_it_exception, print_one_exception, print_mention_exception)
14275         (print_recreate_exception): Add "catch handler" handling.
14276         (allocate_location_catch_handlers, re_set_catch_handlers)
14277         (check_status_catch_handlers, print_it_catch_handlers)
14278         (print_one_catch_handlers, print_mention_catch_handlers)
14279         (print_recreate_catch_handlers): New function.
14280         (catch_handlers_breakpoint_ops): New variable.
14281         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
14282         Add parameter.  Add "catch handler" handling.
14283         (ada_exception_sym_name, ada_exception_breakpoint_ops):
14284         Add "catch handler" handling.
14285         (ada_exception_catchpoint_cond_string): Add "catch handler"
14286         handling.
14287         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
14288         call.
14289         (catch_ada_handlers_command): New function.
14290         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
14291         operations structure.
14292         (_initialize_ada_language): Add "catch handlers" command entry.
14293         * NEWS: Document "catch handlers" feature.
14294
14295 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14296
14297         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
14298         account when creating the array type of the slice.
14299         (ada_value_slice): Likewise.
14300
14301 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14302
14303         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
14304         New enum value.
14305         (create_array_type_with_stride): Add byte_stride_prop parameter.
14306         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
14307         New parameter.  Update all callers in this file.
14308         (array_type_has_dynamic_stride): New function.
14309         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
14310         of arrays with dynamic byte strides.
14311         * dwarf2read.c (read_array_type): Add support for dynamic
14312         DW_AT_byte_stride attributes.
14313
14314 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
14315
14316         * dwarf2read.c (read_unspecified_type): Treat
14317         DW_TAG_enumeration_type DIEs from Ada units as stubs.
14318
14319 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14320
14321         Update copyright year range in all GDB files.
14322
14323 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
14324
14325         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
14326         and gdb/testsuite/gdb.base/step-line.c.
14327
14328 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14329
14330         * copyright.py (main): Dump the contents of
14331         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
14332         even if BY_HAND is empty.
14333
14334 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14335
14336         * top.c (print_gdb_version): Update Copyright year in version
14337         message.
14338
14339 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
14340
14341         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
14342
14343 For older changes see ChangeLog-2017.
14344 \f
14345 Local Variables:
14346 mode: change-log
14347 left-margin: 8
14348 fill-column: 74
14349 version-control: never
14350 coding: utf-8
14351 End: