[gdb] Fix gdb crash when reading core file
[external/binutils.git] / gdb / ChangeLog
1 2018-11-06  Tom de Vries  <tdevries@suse.de>
2
3         * linux-tdep.c (linux_vsyscall_range_raw): Use xmalloc to allocate
4         program headers.
5
6 2018-11-06  Max Filippov  <jcmvbkbc@gmail.com>
7
8         * configure.tgt (xtensa*-*-linux*): Change to xtensa*-*-*linux*
9         so that it applies to uclinux as well.
10
11 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
12
13         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
14         when on AAPCS.
15
16 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
17
18         * riscv-fbsd-nat.c (getregs_supplies): Return true for
19         RISCV_CSR_SSTATUS_REGNUM.
20
21 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
22
23         * source.c (open_source_file): Fix leak by transferring the
24         current s->fullname to the unique_xmalloc_ptr fullname given
25         to find_and_open_source.
26
27 2018-11-04  Tom Tromey  <tom@tromey.com>
28
29         * varobj.c (install_default_visualizer): Update.
30         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
31         Return gdbpy_ref.
32         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
33         (find_pretty_printer_from_progspace)
34         (find_pretty_printer_from_gdb, find_pretty_printer)
35         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
36         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
37         Update.
38
39 2018-11-04  Tom Tromey  <tom@tromey.com>
40
41         * python/python.c (gdbpy_parameter_value): Update.
42         * python/python-internal.h (python_string_to_unicode)
43         (python_string_to_target_python_string)
44         (host_string_to_python_string): Return gdbpy_ref.
45         * python/py-utils.c (python_string_to_unicode)
46         (unicode_to_encoded_python_string)
47         (unicode_to_target_python_string)
48         (python_string_to_target_string)
49         (python_string_to_target_python_string): Return gdbpy_ref.
50         (python_string_to_host_string): Update.
51         (host_string_to_python_string): Return gdbpy_ref.
52         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
53         (stpy_fullname): Update.
54         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
55         Update.
56         * python/py-prettyprint.c (print_string_repr): Update.
57         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
58         (objfpy_get_build_id): Update.
59         * python/py-breakpoint.c (bppy_get_location)
60         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
61         Update.
62
63 2018-11-04  Tom Tromey  <tom@tromey.com>
64
65         * python/python-internal.h (gdb_py_object_from_longest)
66         (gdb_py_object_from_ulongest): Return gdbpy_ref.
67         * python/py-value.c (valpy_int): Update.
68         * python/py-utils.c (gdb_py_object_from_longest): Return
69         gdbpy_ref.
70         (gdb_py_object_from_ulongest): Likewise.
71         * python/py-type.c (typy_get_alignof): Update.
72         * python/py-linetable.c (ltpy_get_all_source_lines)
73         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
74         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
75
76 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
77
78         * ada-lang.c (_initialize_ada_language): Fix typo.
79
80 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
81
82         * language.c (type): Remove.
83         (_initialize_language): Remove assignment to type.
84
85 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
86
87         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
88         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
89         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
90         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
91         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
92         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
93         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
94         and aarch64-ravenscar-thread.o.
95         * NEWS: Add entry documenting Ravenscar tasking support
96         on AArch64 ELF.
97
98 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
99
100         * symtab.c (info_functions_command): Initialize quiet flag.
101         * stack.c (info_args_command): Likewise.
102
103 2018-11-01  Jim Wilson  <jimw@sifive.com>
104
105         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
106         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
107         debugging messages.
108
109 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
110
111         * ada-lang.c (ada_watch_location_expression): New function.
112         (ada_language_defn): Set la_watch_location_expression to
113         ada_watch_location_expression.
114
115 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
116
117         * print-utils.c (int_string): Remove unnecessary trailing spaces.
118
119 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
120
121         * rs6000-tdep.c (skip_prologue): Fix potential negative left
122         shifting.
123
124 2018-11-01  Jerome Guitton  <guitton@adacore.com>
125             Joel Brobecker  <brobecker@adacore.com>
126
127         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
128         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
129         * arm-pikeos-tdep.c: New file.
130         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
131         embedded system.
132         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
133
134 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
135
136         * common/pathstuff.c (get_standard_temp_dir): New.
137         * common/pathstuff.h (get_standard_temp_dir): New.
138         * config.in: Re-generate.
139         * configure: Re-generate.
140         * configure.ac: Don't check for mkdtemp.
141         * gnulib/aclocal-m4-deps.mk: Re-generate.
142         * gnulib/aclocal.m4: Re-generate.
143         * gnulib/config.in: Re-generate.
144         * gnulib/configure: Re-generate.
145         * gnulib/import/Makefile.am: Re-generate.
146         * gnulib/import/Makefile.in: Re-generate.
147         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
148         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
149         * gnulib/import/m4/mkdtemp.m4: New file.
150         * gnulib/import/mkdtemp.c: New file.
151         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
152         Add mkdtemp module.
153         * unittests/mkdir-recursive-selftests.c (test): Use
154         get_standard_temp_dir.
155         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
156         ifdef.
157         * compile/compile.c (get_compile_file_tempdir): Likewise.
158
159 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
160
161         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
162         (SIG_FRAME_LR_OFFSET64): New define.
163         (SIG_FRAME_FP_OFFSET64): New define.
164         (aix_sighandle_frame_cache): New Function.
165         (aix_sighandle_frame_this_id): New Function.
166         (aix_sighandle_frame_prev_register): New Function.
167         (aix_sighandle_frame_sniffer): New Function.
168         (aix_sighandle_frame_unwind): New global variable.
169         (rs6000_aix_init_osabi): Install new frame unwinder.
170
171 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
172
173         PR gdb/23835
174         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
175         already defined.
176
177 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
178
179         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
180
181 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
182
183         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
184         (producer_is_icc): New function.
185         (check_producer): Set producer_is_icc field on dwarf2_cu.
186         (dwarf2_init_integer_type): New function.
187         (read_base_type): Call dwarf2_init_integer_type instead of
188         init_integer_type in all cases.
189         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
190         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
191         LEN is greater than 0.
192
193 2018-10-30  Tom Tromey  <tom@tromey.com>
194
195         * main.c (captured_main_1): Check return value of bfd_init.
196
197 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
198
199         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
200         Adjust comments.
201
202 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
203
204         * procfs.c: Include common/pathstuff.h.
205
206 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
207
208         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
209         Add missing braces.  No functional change.
210
211 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
212
213         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
214         to report a bad option and fix indentation.
215         * demangle.c (demangle_command): Use report_unrecognized_option_error
216         to report a bad option and correctly report the bad option.
217
218 2018-10-27  Tom Tromey  <tom@tromey.com>
219
220         PR cli/23364:
221         * darwin-nat.c (copied_shell): New global.
222         (may_have_sip): Rename from should_disable_startup_with_shell.
223         (copy_shell_to_cache, maybe_cache_shell): New functions.
224         (darwin_nat_target::create_inferior): Update.  Use
225         copied_shell.
226
227 2018-10-27  Tom Tromey  <tom@tromey.com>
228
229         * unittests/scoped_fd-selftests.c (test_to_file): New function.
230         (run_tests): Call test_to_file.
231         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
232         temporary files.
233         * common/scoped_fd.h (scoped_fd::to_file): New method.
234
235 2018-10-27  Tom Tromey  <tom@tromey.com>
236
237         * unittests/scoped_mmap-selftests.c (test_normal): Use
238         gdb_mkostemp_cloexec.
239         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
240         Use gdb_mkostemp_cloexec.
241         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
242         gnulib/config.in, gnulib/configure,
243         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
244         gnulib/import/m4/gnulib-cache.m4,
245         gnulib/import/m4/gnulib-comp.m4: Update.
246         * gnulib/import/m4/mkostemp.m4: New file.
247         * gnulib/import/m4/mkstemp.m4: Remove.
248         * gnulib/import/mkostemp.c: New file.
249         * gnulib/import/mkstemp.m4: Remove.
250         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
251         mkstemp, add mkostemp.  Apply new patch.
252         * gnulib/import/stdlib.in.h: Apply patch.
253         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
254         New file.
255         * dwarf-index-write.c (write_psymtabs_to_index): Use
256         gdb_mkostemp_cloexec.
257         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
258
259 2018-10-27  Tom Tromey  <tom@tromey.com>
260
261         * unittests/mkdir-recursive-selftests.c: New file.
262         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
263         unittests/mkdir-recursive-selftests.c.
264         * dwarf-index-cache.c (mkdir_recursive): Move to
265         common/filestuff.c.
266         (index_cache::store): Check return value of mkdir_recursive.
267         (create_dir_and_check, test_mkdir_recursive): Move to new file.
268         (_initialize_index_cache): Don't register test.
269         * common/filestuff.h (mkdir_recursive): Declare.
270         * common/filestuff.c (mkdir_recursive): Move from
271         dwarf-index-cache.c.  Return bool.
272
273 2018-10-27  Tom Tromey  <tom@tromey.com>
274
275         * dwarf-index-write.c (write_psymtabs_to_index): Move
276         make_temp_filename to common/pathstuff.c.
277         * common/pathstuff.h (make_temp_filename): Declare.
278         * common/pathstuff.c (make_temp_filename): New function, moved
279         from dwarf-index-write.c.
280
281 2018-10-27  Tom Tromey  <tom@tromey.com>
282
283         * procfs.c (procfs_target::create_inferior): Use get_shell.
284         * cli/cli-cmds.c (shell_escape): Use get_shell.
285         * windows-nat.c (windows_nat_target::create_inferior): Use
286         get_shell.
287         * common/pathstuff.c (get_shell): New function.
288         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
289         (fork_inferior): Use get_shell.
290         * common/pathstuff.h (get_shell): Declare.
291
292 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
293
294         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
295
296 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
297
298         * stack.c (print_variable_and_value_data): Add preg and treg.
299         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
300         and update callers.
301         (print_frame_arg_vars): Likewise.
302         (prepare_reg): New function.
303         (info_locals_command): Extract info print args and use them.
304         (info_args_command): Likewise.
305         (_initialize_stack): Modify on-line help.
306         * symtab.c (treg_matches_sym_type_name): New function.
307         (search_symbols): New arg t_regexp.
308         (symtab_symbol_info): New args quiet, regexp, t_regexp.
309         (info_variables_command): Extract info print args and use them.
310         (info_functions_command): Likewise.
311         (info_types_command): Update call to symtab_symbol_info.
312         (_initialize_symtab): Modify on-line help.
313         * symtab.h (treg_matches_sym_type_name): New function.
314         (search_symbols): New t_regexp arg.
315
316 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
317
318         * cli-utils.c (extract_arg_maybe_quoted): New function.
319         (extract_info_print_args): New function.
320         (info_print_args_help): New function.
321         (report_unrecognized_option_error): New function.
322         * cli-utils.h (extract_arg_maybe_quoted): New function.
323         (extract_info_print_args): New function.
324         (info_print_args_help): New function.
325         (report_unrecognized_option_error): New function.
326
327 2018-10-26  Tom Tromey  <tom@tromey.com>
328
329         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
330         (compute_compunit_symtab_includes): Update.
331         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
332         (compunit_symtab_ptr): Likewise.
333
334 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
335
336         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
337         default_print_auxv_entry for specific tag values.
338
339 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
340
341         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
342
343 2018-10-26  Jim Wilson  <jimw@sifive.com>
344
345         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
346         (riscv_linux_sigframe_init): Declare.
347         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
348         (riscv_linux_sigframe): New.
349         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
350         (riscv_linux_sigframe_init): Define.
351         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
352
353         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
354         (riscv_isa_flen): Likewise.  Drop static.
355         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
356         (riscv_isa_flen): Likewise.  Declare.
357
358 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
359             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
360
361         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
362         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
363         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
364         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
365         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
366         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
367         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
368         Define.
369         (struct ppc_linux_features) <htm>: New field.
370         (ppc_linux_no_features): Add initializer for htm field.
371         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
372         new tdescs.
373         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
374         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
375         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
376         Define if not already defined.
377         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
378         and rs6000/powerpc-isa207-htm-vsx64l.
379         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
380         rs6000/powerpc-isa207-htm-vsx64l.xml.
381         * features/rs6000/power-htm-spr.xml: New file.
382         * features/rs6000/power-htm-core.xml: New file.
383         * features/rs6000/power64-htm-core.xml: New file.
384         * features/rs6000/power-htm-fpu.xml: New file.
385         * features/rs6000/power-htm-altivec.xml: New file.
386         * features/rs6000/power-htm-vsx.xml: New file.
387         * features/rs6000/power-htm-ppr.xml: New file.
388         * features/rs6000/power-htm-dscr.xml: New file.
389         * features/rs6000/power-htm-tar.xml: New file.
390         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
391         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
392         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
393         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
394         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
395         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
396         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
397         fetch_regset with HTM regsets.
398         (store_register, store_ppc_registers): Call store_regset with HTM
399         regsets.
400         (ppc_linux_nat_target::read_description): Set htm field in the
401         features struct if needed.
402         * ppc-linux-tdep.c: Include
403         features/rs6000/powerpc-isa207-htm-vsx32l.c and
404         features/rs6000/powerpc-isa207-htm-vsx64l.c.
405         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
406         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
407         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
408         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
409         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
410         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
411         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
412         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
413         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
414         (ppc32_linux_ctarregset): New globals.
415         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
416         (ppc_linux_collect_core_cpgrregset): New function.
417         (ppc_linux_iterate_over_regset_sections): Call back with the htm
418         regsets.
419         (ppc_linux_core_read_description): Check if the tm spr section is
420         present and set htm in the features struct.
421         (_initialize_ppc_linux_tdep): Call
422         initialize_tdesc_powerpc_isa207_htm_vsx32l and
423         initialize_tdesc_powerpc_isa207_htm_vsx64l.
424         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
425         Declare.
426         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
427         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
428         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
429         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
430         New fields.
431         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
432         Likewise.
433         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
434         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
435         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
436         New enum fields.
437         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
438         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
439         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
440         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
441         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
442         <PPC_CTAR_REGNUM>: Likewise.
443         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
444         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
445         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
446         (IS_CEFP_PSEUDOREG): Define.
447         (rs6000_register_name): Hide the upper halves of checkpointed VSX
448         registers.  Return names for the checkpointed DFP, VSX, and EFP
449         pseudo registers.
450         (rs6000_pseudo_register_type): Remove initial assert and raise an
451         internal error in the else clause instead.  Return types for the
452         checkpointed DFP, VSX, and EFP pseudo registers.
453         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
454         checkpointed DFP pseudo registers.
455         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
456         checkpointed VSX pseudo registers.
457         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
458         from efpr_pseudo_register_read and
459         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
460         registers.
461         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
462         Handle checkpointed DFP, VSX, and EFP registers.
463         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
464         (efp_ax_pseudo_register_collect): New functions.
465         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
466         register logic to new functions.  Handle checkpointed DFP, VSX,
467         and EFP pseudo registers.
468         (rs6000_gdbarch_init): Look for and validate the htm features.
469         Include checkpointed DFP, VSX and EFP pseudo-registers.
470         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
471         HTM registers.
472
473 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
474
475         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
476         without altivec or fpu.
477
478 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
479             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
480
481         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
482         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
483         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
484         Define if not already defined.
485         * features/rs6000/power-ebb.xml: New file.
486         * features/rs6000/power-linux-pmu.xml: New file.
487         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
488         features.
489         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
490         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
491         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
492         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
493         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
494         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
495         fetch_regset with ebb and pmu regsets.
496         (store_register, store_ppc_registers): Call store_regset with ebb
497         and pmu regsets.
498         (ppc_linux_nat_target::read_description): Set isa207 field in the
499         features struct if ebb and pmu are avaiable.
500         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
501         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
502         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
503         and pmu regsets.
504         (ppc_linux_core_read_description): Check if the pmu section is
505         present and set isa207 in the features struct.
506         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
507         (ppc32_linux_pmuregset): Declare.
508         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
509         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
510         <ppc_sier_regnum>: New field.
511         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
512         New enum values.
513         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
514         values.
515         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
516         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
517         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
518         ebb and pmu features.
519
520 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
521             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
522
523         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
524         (tdesc_powerpc_isa207_vsx64l): Declare.
525         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
526         (struct ppc_linux_features) <isa207>: New field.
527         (ppc_linux_no_features): Add initializer for isa207 field.
528         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
529         new tdescs.
530         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
531         (NT_PPC_TAR): Define if not already defined.
532         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
533         rs6000/powerpc-isa207-vsx64l.
534         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
535         rs6000/powerpc-isa207-vsx64l.xml.
536         * features/rs6000/power-tar.xml: New file.
537         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
538         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
539         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
540         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
541         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
542         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
543         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
544         fetch_regset with the TAR regset.
545         (store_register, store_ppc_registers): Call store_regset with the
546         TAR regset.
547         (ppc_linux_nat_target::read_description): Set isa207 field in the
548         features struct if needed.
549         * ppc-linux-tdep.c: Include
550         features/rs6000/powerpc-isa207-vsx32l.c and
551         features/rs6000/powerpc-isa207-vsx64l.c.
552         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
553         (ppc_linux_iterate_over_regset_sections): Call back with the tar
554         regset.
555         (ppc_linux_core_read_description): Check if the tar section is
556         present and set isa207 in the features struct.
557         (_initialize_ppc_linux_tdep): Call
558         initialize_tdesc_powerpc_isa207_vsx32l and
559         initialize_tdesc_powerpc_isa207_vsx64l.
560         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
561         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
562         (enum) <PPC_TAR_REGNUM>: New enum value.
563         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
564         feature.
565         (ppc_process_record_op31): Record changes to TAR.
566
567 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
568             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
569
570         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
571         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
572         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
573         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
574         (struct ppc_linux_features) <ppr_dscr>: New field.
575         (ppc_linux_no_features): Add initializer for ppr_dscr field.
576         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
577         new tdescs.
578         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
579         Define if not already defined.
580         * features/Makefile (WHICH): Add
581         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
582         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
583         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
584         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
585         * features/rs6000/power-dscr.xml: New file.
586         * features/rs6000/power-ppr.xml: New file.
587         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
588         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
589         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
590         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
591         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
592         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
593         * ppc-linux-nat.c: Include <sys/uio.h>.
594         (fetch_regset, store_regset, check_regset): New functions.
595         (fetch_register, fetch_ppc_registers): Call fetch_regset with
596         DSCR and PPR regsets.
597         (store_register, store_ppc_registers): Call store_regset with
598         DSCR and PPR regsets.
599         (ppc_linux_get_hwcap2): New function.
600         (ppc_linux_nat_target::read_description): Call
601         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
602         features struct if needed.
603         * ppc-linux-tdep.c: Include
604         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
605         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
606         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
607         (ppc32_linux_dscrregset): New globals.
608         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
609         and dscr regsets.
610         (ppc_linux_core_read_description): Check if the ppr and dscr
611         sections are present and set ppr_dscr in the features struct.
612         (_initialize_ppc_linux_tdep): Call
613         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
614         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
615         * ppc-linux-tdep.h (ppc32_linux_pprregset)
616         (ppc32_linux_dscrregset): Declare.
617         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
618         <ppc_dscr_regnum>: New field.
619         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
620         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
621         and dscr features.
622         (ppc_process_record_op31): Record changes to PPR and DSCR.
623
624 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
625
626         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
627         second initializer line for the have_* variables.  Initialize
628         have_fpu to 0 instead of 1.
629
630 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
631
632         * arch/ppc-linux-common.c (ppc_linux_match_description):
633         Parenthesize tdesc assignements and indent them properly.
634
635 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
636
637         * ppc-linux-nat.c (fetch_register): Change if statement to else
638         if.
639         (store_register): Likewise.
640
641 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
642
643         * rs6000-tdep.c: Remove reggroups.h include.
644         (rs6000_pseudo_register_reggroup_p): Remove.
645         (rs6000_gdbarch_init): Remove call to
646         set_tdesc_pseudo_register_reggroup_p.
647
648 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
649
650         * reggroups.c (default_register_reggroup_p): Return true for
651         decfloat registers and float_reggroup.
652
653 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
654
655         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
656         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
657         ppc_linux_collect_vrregset by regcache_collect_regset.
658
659 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
660
661         * linux-tdep.c (linux_collect_regset_section_cb): Use
662         std::vector<gdb_byte> instead of char * and malloc for buf.
663         Remove xfree.
664
665 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
666
667         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
668         symtab_start instead of always using language_unknown.
669
670 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
671
672         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
673         READ_P parameter, catch and ignore register access errors from
674         either the old or new MISA location.
675         (riscv_has_feature): Update call to riscv_read_misa_reg.
676
677 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
678
679         * python/py-function.c (convert_values_to_python): Return
680         gdbpy_ref<>.  Add header comment.
681         (fnpy_call): Adjust.
682
683 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
684
685         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
686         (cmdpy_completer_handle_brkchars): Adjust.
687         (cmdpy_completer): Adjust.
688
689 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
690
691         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
692         Pass correct regnum to raw_supply_zeroed.
693
694 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
695
696         * regcache.c (cooked_read_test): Add CSKY to the list of
697         architectures with a save_reggroup
698
699 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
700
701         PR gdb/23368
702         * infrun.c (follow_exec): In the follow_exec_mode_new case,
703         transfer terminal state from old new new inferior.
704         * terminal.h (swap_terminal_info): New function.
705         * inflow.c (swap_terminal_info): New function.
706
707 2018-10-23  Tom Tromey  <tom@tromey.com>
708
709         * record-btrace.c (get_thread_current_frame_id): Rename from
710         get_thread_current_frame.  Return a frame_id.
711         (record_btrace_start_replaying): Update.
712
713 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
714
715         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
716         for CSRs.
717
718 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
719
720         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
721         have_nonsteppable_watchpoint attribute to 1.
722
723 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
724
725         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
726         register names.
727         (struct register_alias): Rename to...
728         (struct riscv_register_alias): ...this, and update comment.
729         (riscv_register_aliases): Update type, and alias names.  Remove
730         CSR names from this list.
731         (riscv_register_name): Use riscv_gdb_reg_names for int and float
732         register names.  Add an extra assertion.
733         (riscv_is_regnum_a_named_csr): New function.
734         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
735
736 2018-10-22  Jim Wilson  <jimw@sifive.com>
737
738         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
739         FP reg smaller than FP reg size, and fill with -1 instead of 0.
740
741         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
742         (riscv_register_type): Use them.
743         (riscv_print_one_register_info): Handle union of floats same as float.
744         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
745         riscv_fpreg_q_type fields.
746
747 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
748
749         * gdbarch.sh (gdbarch_num_cooked_regs): New.
750         * gdbarch.h: Re-generate.
751         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
752         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
753         * eval.c (evaluate_subexp_standard): Likewise.
754         * findvar.c (value_of_register): Likewise.
755         (value_of_register_lazy): Likewise.
756         (address_from_register): Likewise.
757         * frame.c (get_frame_register_bytes): Likewise.
758         * gdbarch-selftests.c (register_to_value_test): Likewise.
759         * h8300-tdep.c (h8300_register_type): Likewise.
760         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
761         (i386_svr4_reg_to_regnum): Likewise.
762         * infcmd.c (default_print_registers_info): Likewise.
763         (registers_info): Likewise.
764         (print_vector_info): Likewise.
765         (default_print_float_info): Likewise.
766         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
767         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
768         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
769         (mi_cmd_data_list_changed_registers): Likewise.
770         (mi_cmd_data_list_register_values): Likewise.
771         (mi_cmd_data_write_register_values): Likewise.
772         (mi_cmd_trace_frame_collected): Likewise.
773         * mips-tdep.c (print_gp_register_row): Likewise.
774         (mips_print_registers_info): Likewise.
775         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
776         * regcache.c (init_regcache_descr): Likewise.
777         (register_size): Likewise.
778         (register_dump::dump): Likewise.
779         (cooked_read_test): Likewise.
780         (cooked_write_test): Likewise.
781         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
782         (rs6000_gdbarch_init): Likewise.
783         * stabsread.c (stab_reg_to_regnum): Likewise.
784         * stack.c (info_frame_command): Likewise.
785         * target-descriptions.c (tdesc_register_name): Likewise.
786         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
787         * tui/tui-regs.c (tui_show_register_group): Likewise.
788         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
789         (user_reg_map_regnum_to_name): Likewise.
790         (value_of_user_reg): Likewise.
791         (maintenance_print_user_registers): Likewise.
792         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
793         (xtensa_register_name): Likewise.
794         (xtensa_register_type): Likewise.
795         (xtensa_reg_to_regnum): Likewise.
796         (xtensa_pseudo_register_read): Likewise.
797         (xtensa_pseudo_register_write): Likewise.
798
799 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
800
801         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
802         correctly-sized buffer with raw_read.
803         (amd64_pseudo_register_write): Use correctly-sized buffer for
804         raw_read/raw_write.
805
806 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
807
808         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
809         in add_prefix_cmd of set print type.
810
811 2018-10-19  Tom Tromey  <tom@tromey.com>
812
813         PR tui/18388:
814         * NEWS: Mention tabset deprecation.
815         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
816         (update_tab_width): New function.
817         (tui_set_tab_width, tui_show_tab_width): New functions.
818         (tui_set_tab_width_command): Use update_tab_width.
819         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
820         Add new "set tui tab-width" command.
821         * tui/tui-source.c (tui_set_source_content): Update.
822         * tui/tui-disasm.c (tui_set_disassem_content): Update.
823         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
824         Don't declare.
825         (tui_tab_width): Declare.
826         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
827         (tui_set_default_tab_len): Remove.
828
829 2018-10-19  Tom Tromey  <tom@tromey.com>
830
831         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
832         (key_is_backspace, tui_getc): Don't declare.
833         * tui/tui-io.c (key_is_start_sequence): Now static.
834         (key_is_end_sequence, key_is_backspace): Remove.
835         (tui_getc): Now static.
836
837 2018-10-19  Tom Tromey  <tom@tromey.com>
838
839         * symfile.c (reread_symbols): Clear "static_links".
840
841 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
842
843         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
844         define.
845         (aarch64_linux_sigframe_init): Extra boundary checks.
846
847 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
848
849         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
850         the possibly non-existent tdesc type 'vec128', but the type of raw
851         register v16 instead.
852
853 2018-10-19  Gary Benson <gbenson@redhat.com>
854
855         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
856
857 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
858
859         PR cli/23785
860         * cli/cli-dump.c (restore_binary_file): Check if "file" is
861         NULL.
862
863 2018-10-17  Paul Koning  <paul_koning@dell.com>
864
865         * charset.c (convert_between_encodings): Fix unsigned overflow.
866
867 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
868
869         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
870         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
871         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
872         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
873         New functions.
874         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
875         and fbsd_info_proc_mappings_header.
876         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
877         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
878         New.
879
880 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
881
882         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
883         Solaris Maintainer.
884
885 2018-10-15  Tom Tromey  <tom@tromey.com>
886
887         * tui/tui.c (strcat_to_buf): Remove casts.
888         * tui/tui-winsource.c (tui_show_source_line)
889         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
890         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
891         * tui/tui-windata.c (tui_first_data_item_displayed)
892         (tui_delete_data_content_windows, tui_erase_data_content)
893         (tui_display_all_data, tui_display_data_from)
894         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
895         * tui/tui-win.c (tui_set_win_height)
896         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
897         casts.
898         * tui/tui-win.c (tui_resize_all): Remove casts.
899         (tui_scroll_backward_command, tui_set_focus)
900         (tui_set_tab_width_command): Likewise.
901         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
902         * tui/tui-regs.c (tui_show_register_group): Remove cast.
903         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
904         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
905         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
906         Remove casts.
907
908 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
909
910         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
911         AArch64/ARM maintainer.
912
913 2018-10-11  Gary Benson <gbenson@redhat.com>
914
915         * interps.h (interp::m_name): Make private and mutable.
916         * interps.c (interp::~interp): Free m_name.
917
918 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
919             Simon Marchi <simark@simark.ca>
920
921         * README (`configure' options): Add documentation for new
922         "--enable-unit-tests" option.
923         * acinclude.m4: Include "selftest.m4".
924         * configure: Regenerate.
925         * configure.ac: Use "GDB_AC_SELFTEST".
926         * maint.c (maintenance_selftest): Update message informing
927         that selftests have been disabled.
928         (maintenance_info_selftests): Likewise.
929         * selftest.m4: New file.
930
931 2018-10-10  Gary Benson <gbenson@redhat.com>
932
933         * remote.c (remote_target::remote_send_printf): Add
934         missing va_end found by Coverity.
935
936 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
937
938         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
939
940 2018-10-09  Tom Tromey  <tom@tromey.com>
941
942         * configure: Rebuild.
943         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
944         * NEWS: Update --enable-ubsan documentation.
945
946 2018-10-09  Gary Benson <gbenson@redhat.com>
947
948         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
949         found by Coverity.
950
951 2018-10-08  Tom Tromey  <tom@tromey.com>
952
953         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
954         variable.
955         (riscv_fbsd_init_abi): Likewise.
956
957 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
958         * valops.c (value_struct_elt_for_reference): Rename local variable
959         to work around the shadowing a previous local warning.
960
961 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
962
963         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
964         * NEWS: Mention new FreeBSD/riscv native configuration.
965         * configure.host: Add riscv*-*-freebsd*.
966         * configure.nat: Likewise.
967         * riscv-fbsd-nat.c: New file.
968
969 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
970
971         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
972         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
973         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
974         * NEWS: Mention new FreeBSD/riscv target.
975         * configure.tgt: Add riscv*-*-freebsd*.
976         * riscv-fbsd-tdep.c: New file.
977         * riscv-fbsd-tdep.h: New file.
978
979 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
980
981         * regcache.h (struct regcache_map_entry): Note that this type can
982         be used with traditional frame caches.
983         * trad-frame.c (trad_frame_set_reg_regmap): New.
984         * trad-frame.h (trad_frame_set_reg_regmap): New.
985
986 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
987
988         PR c++/16841
989         * valops.c (get_virtual_base_offset): New function.
990         (value_struct_elt_for_reference): Use it to get virtual base offset
991         and add it in calculating class member address.
992
993 2018-10-08   John Darrington <john@darrington.wattle.id.au>
994
995     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
996       (check_producer): Check if the producer is codewarrior.
997       (producer_is_codewarrior): New function.
998       (lnp_state_machine::record_line): Ignore is_stmt flag for records
999        produced by codewarrior.
1000       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
1001
1002 2018-10-06  Tom Tromey  <tom@tromey.com>
1003
1004         PR python/19399:
1005         * python/py-inferior.c: Add "architecture" entry.
1006         (infpy_architecture): New function.
1007
1008 2018-10-06  Tom Tromey  <tom@tromey.com>
1009
1010         PR python/21765:
1011         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1012         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1013         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
1014         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1015
1016 2018-10-06  Tom Tromey  <tom@tromey.com>
1017
1018         PR build/17077:
1019         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1020         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1021         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1022         #include.
1023
1024 2018-10-06  Tom Tromey  <tom@tromey.com>
1025
1026         * python/py-breakpoint.c (bppy_get_location): Handle a
1027         bp_breakpoint without a location.
1028
1029 2018-10-06  Tom Tromey  <tom@tromey.com>
1030
1031         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1032         (_RegEx): Reformat help text.
1033         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1034         (AnyCallerIs, AnyCallerMatches): Reformat help text.
1035         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1036         text.
1037         * python/lib/gdb/command/xmethods.py (InfoXMethod)
1038         (EnableXMethod, DisableXMethod): Remove help indentation.
1039         Capitalize meta-syntactic variables.
1040         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1041         (EnableUnwinder, DisableUnwinder): Remove help indentation.
1042         Capitalize meta-syntactic variables.
1043         * python/lib/gdb/command/explore.py (ExploreCommand)
1044         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1045         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1046         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1047         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1048         Remove help indentation.
1049         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1050         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1051         (DisableFrameFilter, SetFrameFilterPriority)
1052         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1053
1054 2018-10-06  Tom Tromey  <tom@tromey.com>
1055
1056         PR tui/28819:
1057         * tui/tui-io.c (gdb_wgetch): New function.
1058         (tui_mld_getc, tui_getc): Use it.
1059
1060 2018-10-05  Tom Tromey  <tom@tromey.com>
1061
1062         * sol-thread.c (sol_thread_target::wait): Rename inner
1063         "save_ptid".
1064
1065 2018-10-04  Tom Tromey  <tom@tromey.com>
1066
1067         * configure: Rebuild.
1068         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1069
1070 2018-10-04  Tom Tromey  <tom@tromey.com>
1071
1072         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1073         declaration of "block".
1074
1075 2018-10-04  Tom Tromey  <tom@tromey.com>
1076
1077         * common/filestuff.c (fdwalk): Remove inner declaration of
1078         "result".
1079
1080 2018-10-04  Tom Tromey  <tom@tromey.com>
1081
1082         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1083         "structs_addr" and hoist declaration.
1084
1085 2018-10-04  Tom Tromey  <tom@tromey.com>
1086
1087         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1088         variable "size".
1089
1090 2018-10-04  Tom Tromey  <tom@tromey.com>
1091
1092         * mdebugread.c (parse_partial_symbols): Use std::string.
1093
1094 2018-10-04  Tom Tromey  <tom@tromey.com>
1095
1096         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1097         * p-valprint.c (pascal_val_print): Split inner "i" variable.
1098         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1099         header.
1100         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1101         more inner scope.
1102         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1103         * varobj.c (varobj_update): Rename inner "newobj",
1104         "type_changed".
1105         * valprint.c (generic_emit_char): Rename inner "buf".
1106         * valops.c (find_overload_match): Rename inner "temp".
1107         (value_struct_elt_for_reference): Declare "v" in more inner
1108         scope.
1109         * v850-tdep.c (v850_push_dummy_call): Rename "len".
1110         * unittests/array-view-selftests.c (run_tests): Rename inner
1111         "vec".
1112         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1113         header.
1114         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1115         "tsv" in more inner scope.
1116         (print_one_static_tracepoint_marker): Rename inner
1117         "tuple_emitter".
1118         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1119         (tic6x_push_dummy_call): Don't redeclare "addr".
1120         * target-float.c: Declare "dto" lower.
1121         * symtab.c (lookup_local_symbol): Rename inner "sym".
1122         (find_pc_sect_line): Rename inner "pc".
1123         * stack.c (print_frame): Don't redeclare "gdbarch".
1124         (return_command): Rename inner "gdbarch".
1125         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1126         "sp".
1127         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1128         header.
1129         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1130         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1131         scope.
1132         * remote.c (remote_target::update_thread_list): Don't redeclare
1133         "tp".
1134         (remote_target::process_initial_stop_replies): Rename inner
1135         "thread".
1136         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1137         (remote_target::wait_as): Don't redeclare "stop_reply".
1138         (remote_target::get_thread_local_address): Rename inner
1139         "result".
1140         (remote_target::get_tib_address): Likewise.
1141
1142         * regcache.c (cooked_read_test): Rename "regnum".
1143         * record-btrace.c (cmd_record_btrace_start): Rename inner
1144         "exception".
1145         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1146         loop header.
1147         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1148         header.
1149         (ppu2spu_sniffer): Rename inner "buf".
1150         * parse.c (operator_check_standard): Rename inner "type",
1151         "objfile".
1152         * p-valprint.c (pascal_val_print): Introduce new scope for
1153         "low_bound", "high_bound".
1154         * p-exp.y (yylex): Declare "i" in loop header.
1155         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1156         Lower declaration of "s".
1157         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1158         header.
1159         (nios2_push_dummy_call): Rename "len".
1160         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1161         "buf".
1162         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1163         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1164         (linux_xfer_osdata_modules): Likewise.
1165         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1166         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1167         (mips_o64_push_dummy_call): Likewise.
1168         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1169         "op".
1170         * mi/mi-main.c (list_available_thread_groups): Rename inner
1171         "tuple_emitter".
1172         (mi_cmd_data_read_memory): Rename inner "opts".
1173         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1174         "tuple_emitter".
1175         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1176         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1177         more inner scope.
1178         (parse_partial_symbols): Rename inner "pst", "p", "name"
1179         * main.c (captured_main_1): Rename inner "i"s.
1180         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1181         "oso2".
1182         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1183         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1184         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1185         (handle_signal_stop): Rename inner "gdbarch".
1186         (handle_command): Declare "signum" in loop header.
1187         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1188         "status".
1189         (examine_prologue): Rename inner "sol" and "sof".
1190         (ia64_extract_return_value): Rename inner "val".  Declare another
1191         "val" in a more inner scope.
1192         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1193         inner scope.
1194         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1195         "except".
1196         * findvar.c (default_read_var_value): Don't redeclare "addr".
1197         * f-exp.y (yylex): Declare "i" in loop header.
1198         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1199         Rename inner "type", "expect_type".
1200         (evaluate_subexp_for_sizeof): Rename inner "pc".
1201         * elfread.c (elf_symfile_read): Rename inner "abfd".
1202         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1203         "bytes_read".
1204         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1205         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1206         (dwarf_decode_line_header): Rename inner "lh".
1207         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1208         "offset".  Declare "i" in loop header.
1209         (disassemble_dwarf_expression): Rename inner "addr_size".
1210         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1211         inner "result".
1212         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1213         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1214         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1215         "inner_list_emitter".
1216         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1217         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1218         declaration in a block.
1219         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1220         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1221         "obstack_final_size".
1222         * cp-support.c (inspect_type): Declare "i" in loop header.
1223         * compile/compile.c (compile_instance::insert_symbol_error):
1224         Rename inner "e".
1225         * common/agent.c (agent_run_command): Remove inner "ret"
1226         declaration.
1227         * coffread.c (coff_symfile_read): Rename inner "name".
1228         (coff_symfile_read): Rename inner "abfd".
1229         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1230         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1231         "high".
1232         * c-exp.y (lex_one_token): Move "len" declaration lower.
1233         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1234         "gdbarch".
1235         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1236         "b".
1237         (watch_command_1): Declare "mark" later.
1238         (clear_command): Don't shadow "a" or "b".
1239         (delete_command): Rename inner "b".
1240         (delete_trace_command): Likewise.
1241         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1242         "op".
1243         (arm_gdbarch_init): Remove inner "e_flags".
1244         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1245         "offset" in inner blocks.
1246
1247 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1248
1249         * dwarf-index-write.c (file_write): Don't write if the vector is
1250         empty.
1251
1252 2018-10-05  Tom de Vries  <tdevries@suse.de>
1253
1254         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1255         PyArg_ParseTuple call.
1256
1257 2018-10-05  Tom de Vries  <tdevries@suse.de>
1258
1259         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1260         PyArg_ParseTuple call.
1261
1262 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1263
1264         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1265         to avoid exceeding 80 characters per line limit.
1266
1267 2018-10-04  Tom Tromey  <tom@tromey.com>
1268
1269         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1270         (reread_symbols): Update.
1271         * complaints.h (clear_complaints): Remove argument.
1272         * complaints.c (enum complaint_series): Remove.
1273         (series): Remove global.
1274         (complaint_internal): Update.
1275         (clear_complaints): Remove argument.
1276
1277 2018-10-04  Tom Tromey  <tom@tromey.com>
1278
1279         * symfile.c (symbol_file_add_with_addrs): Do not print "no
1280         debugging symbols" message if there is a separate debug objfile.
1281
1282 2018-10-04  Tom Tromey  <tom@tromey.com>
1283
1284         PR cli/19551:
1285         * symfile.c (symbol_file_add_with_addrs): Update output.
1286         * psymtab.c (require_partial_symbols): Update output.
1287
1288 2018-10-04  Tom Tromey  <tom@tromey.com>
1289
1290         PR cli/22234:
1291         * complaints.c: Emit \n.
1292
1293 2018-10-04  Tom Tromey  <tom@tromey.com>
1294
1295         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1296         (separate_debug_file_exists, find_separate_debug_file)
1297         (add_symbol_file_command, reread_symbols, allocate_symtab)
1298         (allocate_compunit_symtab): Use filtered printing, not
1299         unfiltered.
1300         * psymtab.c (require_partial_symbols, dump_psymtab)
1301         (allocate_psymtab): Use filtered printing, not unfiltered.
1302
1303 2018-10-04  Tom Tromey  <tom@tromey.com>
1304
1305         * complaints.c (complaint_internal): Correctly check complaint
1306         count.
1307
1308 2018-10-04  Tom Tromey  <tom@tromey.com>
1309
1310         * complaints.h (struct complaints): Remove declaration.
1311         * complaints.c (clear_complaints): Remove an unused variable.
1312
1313 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1314
1315         * MAINTAINERS (Write After Approval): Add self.
1316
1317 2018-10-03  Tom Tromey  <tom@tromey.com>
1318
1319         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1320         "buffer_contents".
1321         * coffread.c (coff_symtab_read): Initialize "newobj".
1322
1323 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1324
1325         * dwarf2read.c (read_func_scope): Remove struct keyword in
1326         range-based for.
1327
1328 2018-10-03  Tom Tromey  <tom@tromey.com>
1329
1330         * README: Mention --enable-ubsan.
1331         * NEWS: Mention --enable-ubsan.
1332         * acinclude.m4: Include sanitize.m4.
1333         * configure: Rebuild.
1334         * configure.ac: Call AM_GDB_UBSAN.
1335         * sanitize.m4: New file.
1336
1337 2018-10-03  Tom Tromey  <tom@tromey.com>
1338
1339         * expression.h (enum exp_opcode): Use uint8_t as base type.
1340         * expprint.c (op_name): Handle invalid opcodes.
1341
1342 2018-10-03  Tom Tromey  <tom@tromey.com>
1343
1344         * parse.c (prefixify_expression): Add assert.
1345         (parse_exp_in_context_1): Throw exception if the expression is
1346         empty.
1347
1348 2018-10-03  Tom Tromey  <tom@tromey.com>
1349
1350         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1351
1352 2018-10-03  Tom Tromey  <tom@tromey.com>
1353
1354         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1355
1356 2018-10-03  Tom Tromey  <tom@tromey.com>
1357
1358         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1359         unsigned.
1360
1361 2018-10-03  Tom Tromey  <tom@tromey.com>
1362
1363         * findvar.c (extract_integer): Do work in an unsigned type.
1364
1365 2018-10-03  Tom Tromey  <tom@tromey.com>
1366
1367         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1368         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1369         base type.
1370         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1371         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1372         type.
1373         * c-lang.h (enum c_string_type_values): Use unsigned as base
1374         type.
1375         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1376
1377 2018-10-03  Tom Tromey  <tom@tromey.com>
1378
1379         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1380         <~dwarf2_frame_state_reg_info>: Update.
1381         <dwarf2_frame_state_reg_info>: Update.
1382         <alloc_regs>: Add assertion.  Update.
1383         <reg>: Now a std::vector.
1384         <num_regs>: Remove.
1385         <swap>: Update.
1386         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1387         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1388
1389 2018-10-03  Tom Tromey  <tom@tromey.com>
1390
1391         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1392
1393 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1394
1395         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1396
1397 2018-10-02  Tom Tromey  <tom@tromey.com>
1398
1399         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1400
1401 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1402
1403         * NEWS: Mention changed commands.
1404         * ser-uds.c: New file.
1405         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1406         * configure: Regenerate.
1407         * Makefile.in: Add new file.
1408         * serial.c (serial_open): Check if filename is a socket
1409           and lookup the appropriate interface accordingly.
1410
1411 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1412
1413         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1414         define.
1415         (AARCH64_EXTRA_MAGIC): Likewise.
1416         (AARCH64_FPSIMD_MAGIC): Likewise.
1417         (AARCH64_SVE_MAGIC): Likewise.
1418         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1419         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1420         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1421         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1422         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1423         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1424         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1425         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1426         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1427         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1428         (read_aarch64_ctx): Add function.
1429         (aarch64_linux_sigframe_init): Detect FP registers.
1430
1431 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1432
1433         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1434         (AARCH64_D0_REGNUM): Likewise.
1435         (AARCH64_S0_REGNUM): Likewise.
1436         (AARCH64_H0_REGNUM): Likewise.
1437         (AARCH64_B0_REGNUM): Likewise.
1438         (AARCH64_SVE_V0_REGNUM): Likewise.
1439         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1440         (AARCH64_D0_REGNUM): Likewise.
1441         (AARCH64_S0_REGNUM): Likewise.
1442         (AARCH64_H0_REGNUM): Likewise.
1443         (AARCH64_B0_REGNUM): Likewise.
1444         (AARCH64_SVE_V0_REGNUM): Likewise.
1445
1446 2018-10-01  Gary Benson <gbenson@redhat.com>
1447
1448         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1449         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1450         prfpregset_t instead of gdb_prfpregset_t.
1451         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1452         * configure, config.in: Rebuild.
1453
1454 2018-10-01  Gary Benson <gbenson@redhat.com>
1455
1456         * common/gdb_proc_service.h: New file, factored out from...
1457         * gdb_proc_service.h: Moved common code to the above file.
1458         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1459
1460 2018-10-01  Gary Benson <gbenson@redhat.com>
1461
1462         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1463         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1464
1465 2018-10-01  Gary Benson <gbenson@redhat.com>
1466
1467         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1468         (AC_CHECK_HEADERS): Check for linux/elf.h.
1469         * configure, config.in: Rebuild.
1470         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1471         doesn't define elf_fpregset_t.
1472
1473 2018-10-01  Gary Benson <gbenson@redhat.com>
1474
1475         * gdb_proc_service.h: Whitespace change.
1476
1477 2018-10-01  Tom Tromey  <tom@tromey.com>
1478
1479         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1480         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1481         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1482
1483 2018-10-01  Tom Tromey  <tom@tromey.com>
1484
1485         * README: Minor change.
1486
1487 2018-09-30  Pedro Alves  <palves@redhat.com>
1488
1489         * darwin-nat-info.c (darwin_debug_regions_recurse)
1490         (info_mach_exceptions_command): Remove unused local variables.
1491         * darwin-nat.c (darwin_decode_notify_message)
1492         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1493         (darwin_stop_inferior, darwin_setup_exceptions)
1494         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1495         (darwin_nat_target::attach, darwin_nat_target::detach)
1496         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1497         local variables.
1498         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1499         variables.
1500
1501 2018-09-29  Tom Tromey  <tom@tromey.com>
1502
1503         * README: Remove some leftover text.
1504
1505 2018-09-29  Tom Tromey  <tom@tromey.com>
1506
1507         * PROBLEMS: Rewrite.
1508         * README: Update.
1509
1510 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1511
1512         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1513         case with explicit breakpoint kind.
1514         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1515         'additional_info' and related logic.
1516         (riscv_debug_breakpoints): New variable.
1517         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1518         instruction to determine the breakpoint kind.
1519         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1520         flag.  Update description of 'set/show riscv
1521         use-compressed-breakpoints' flag.
1522
1523 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1524
1525         (NEWS): Mention changes to frame related commands.
1526         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1527         (add_prefix_cmd_suppress_notification): New function.
1528         (add_com_suppress_notification): Call
1529         add_cmd_suppress_notification.
1530         * command.h (add_cmd_suppress_notification): Declare.
1531         (add_prefix_cmd_suppress_notification): Declare.
1532         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1533         (parse_frame_specification): Moved from stack.c, with
1534         simplification to handle a single argument.
1535         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1536         switch to the selected frame.  Add a header comment.
1537         * stack.c: Remove 'safe-ctype.h' include.
1538         (find_frame_for_function): Add declaration.
1539         (find_frame_for_address): New function.
1540         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1541         (frame_selection_by_function_completer): New function.
1542         (info_frame_command): Rename to...
1543         (info_frame_command_core): ...this, and update parameter types.
1544         (select_frame_command): Rename to...
1545         (select_frame_command_core): ...this, and update parameter types.
1546         (frame_command): Rename to...
1547         (frame_command_core): ...this, and update parameter types.
1548         (class frame_command_helper): New class to wrap implementations of
1549         frame related sub-commands.
1550         (frame_apply_cmd_list): New static global.
1551         (frame_cmd_list): Make static.
1552         (select_frame_cmd_list): New global for sub-commands.
1553         (info_frame_cmd_list): New global for sub-commands.
1554         (_initialize_stack): Register sub-commands for 'frame',
1555         'select-frame', and 'info frame'.  Update 'frame apply' commands
1556         to use frame_apply_cmd_list.  Move function local static
1557         frame_apply_list to file static frame_apply_cmd_list for
1558         consistency.
1559         * stack.h (select_frame_command): Delete declarationn.
1560         (select_frame_for_mi): Declare new function.
1561
1562 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1563
1564         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1565         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1566         and NOP.
1567
1568 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1569
1570         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1571
1572 2018-09-26  Tom Tromey  <tom@tromey.com>
1573
1574         * valops.c (auto_abandon): Remove dead code.
1575
1576 2018-09-26  Tom Tromey  <tom@tromey.com>
1577
1578         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1579
1580 2018-09-24  Tom Tromey  <tom@tromey.com>
1581
1582         * common/pathstuff.c (get_standard_cache_dir): Make
1583         "xdg_cache_home" and "home" const.
1584         * top.c (init_history): Make "tmpenv" const.
1585         * main.c (get_init_files): Make "homedir" const.
1586
1587 2018-09-23  Tom Tromey  <tom@tromey.com>
1588
1589         PR python/18852:
1590         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1591
1592 2018-09-23  Tom Tromey  <tom@tromey.com>
1593
1594         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1595         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1596         * python/python-internal.h (gdbpy_handle_exception): Declare.
1597         * python/py-utils.c (gdbpy_handle_exception): New function.
1598
1599 2018-09-23  Tom Tromey  <tom@tromey.com>
1600
1601         PR python/17284:
1602         * python/py-type.c (typy_template_argument): Check for negative
1603         argument number.
1604
1605 2018-09-23  Tom Tromey  <tom@tromey.com>
1606
1607         PR python/14062:
1608         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1609
1610 2018-09-23  Tom Tromey  <tom@tromey.com>
1611
1612         PR python/18170:
1613         * python/py-value.c (valpy_int): Allow conversion from pointer
1614         type.
1615
1616 2018-09-23  Tom Tromey  <tom@tromey.com>
1617
1618         PR python/20126:
1619         * python/py-value.c (valpy_int): Respect type sign.
1620
1621 2018-09-23  Tom Tromey  <tom@tromey.com>
1622
1623         PR python/18352;
1624         * python/py-value.c (valpy_float): Allow conversions from int or
1625         char.
1626         (valpy_int, valpy_long): Allow conversions from float.
1627
1628 2018-09-23  Tom Tromey  <tom@tromey.com>
1629
1630         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1631         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1632
1633 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1634
1635         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1636         __sighndlr.
1637         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1638
1639 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1640
1641         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1642         target_terminal::ours().
1643
1644 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1645
1646         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1647         of vl to ULONGEST.
1648
1649 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1650
1651         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1652         redundant condition.
1653
1654 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1655
1656         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1657
1658         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1659         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1660         * sol-thread.c (ps_pdmodel): Don't guard definition.
1661
1662         * procfs.c: Fix formatting.
1663
1664         * procfs.c (sysset_t_alloc): Remove.
1665         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1666         (procfs_debug_inferior): Likewise.
1667         (procfs_set_exec_trap): Likewise.
1668         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1669         (proc_set_traced_sysexit): Likewise.
1670
1671         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1672         (dead_procinfo): Likewise.
1673         (proc_warn): Likewise.
1674         (proc_error): Likewise.
1675         (proc_get_LDT_entry): Likewise.
1676         (do_attach): Likewise.
1677         (procfs_target::pid_to_str): Likewise.
1678         (iterate_over_mappings): Likewise.
1679
1680         * procfs.c (create_procinfo): Fix ARI warning.
1681         (proc_get_status): Likewise.
1682         (proc_stop_process): Likewise.
1683         (proc_run_process): Likewise.
1684         (proc_kill): Likewise.
1685         (proc_get_LDT_entry): Likewise.
1686         (procfs_find_LDT_entry): Likewise.
1687         (proc_update_threads): Likewise.
1688         (proc_iterate_over_threads): Likewise.
1689         (do_attach): Likewise.
1690         (procfs_xfer_memory): Likewise.
1691         (invalidate_cache): Likewise.
1692         (procfs_target::resume): Likewise.
1693         (procfs_init_inferior): Likewise.
1694         (procfs_set_exec_trap): Likewise.
1695         (procfs_target::thread_alive): Likewise.
1696         (procfs_target::pid_to_exec_file): Likewise.
1697         (iterate_over_mappings): Likewise.
1698         (procfs_target::make_corefile_notes): Likewise.
1699         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1700
1701         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1702         (procfs_find_LDT_entry): Likewise.
1703         * sol-thread.c (ps_lgetLDT): Likewise.
1704
1705 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1706
1707         PR tdep/17903
1708         * procfs.c (procfs_target): Declare pid_to_exec_file.
1709         (procfs_target::pid_to_exec_file): New.
1710
1711 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1712
1713         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1714         renaming.
1715         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1716         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1717
1718 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1719
1720         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1721         (supply_fpregset, fill_fpregset): Move ...
1722         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1723         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1724         Remove references to ioctl-based procfs.
1725         Include <sys/reg.h>.
1726         Remove PR_MODEL_NATIVE guards.
1727         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1728         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1729
1730 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1731
1732         PR gdb/20981:
1733         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1734         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1735         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1736
1737 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1738
1739         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1740         (fbsd_print_sockaddr_in6): Likewise.
1741
1742 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1743             Chris January  <chris.january@arm.com>
1744
1745         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1746         (evaluate_subexp_standard): Return a dummy type when
1747         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1748         OP_F77_UNDETERMINED_ARGLIST case.
1749         * expression.h (enum noside): Update comment.
1750
1751 2018-09-19  George Vasick <george.vasick@oracle.com>
1752
1753         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1754
1755 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1756             April Chin <april.chin@oracle.com>
1757             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1758
1759         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1760         uint_t lwpid_t.
1761         (create_procinfo): Print pids in /proc without leading zeros.
1762
1763 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1764
1765         * nios2-tdep.c (nios2_gcc_target_options): New.
1766         (nios2_gdb_arch_init): Install new hook.
1767
1768 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1769
1770         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1771         New file.
1772         * update-gnulib.sh: Apply patch.
1773         * configure: Re-generate.
1774
1775 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1776
1777         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1778         description.  Make "info proc" command descriptions more
1779         consistent.
1780
1781 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1782
1783         * NEWS: Mention 'info proc files' command.
1784
1785 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1786
1787         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1788         descriptors for IP_FILES and IP_ALL.
1789
1790 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1791
1792         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1793         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1794         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1795         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1796         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1797         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1798         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1799         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1800         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1801         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1802         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1803         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1804         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1805         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1806         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1807         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1808         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1809         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1810         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1811         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1812         (struct fbsd_sockaddr_un): New types.
1813         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1814         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1815         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1816         (fbsd_core_info_proc_files): New functions.
1817         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1818         IP_ALL.
1819         * fbsd-tdep.h (fbsd_info_proc_files_header)
1820         (fbsd_info_proc_files_entry): New.
1821
1822 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1823
1824         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1825         * infcmd.c (info_proc_cmd_files): New function.
1826         (_initialize_infcmd): Register 'info proc files' command.
1827
1828 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1829
1830         * gnulib/aclocal-m4-deps.mk: Re-generate.
1831         * gnulib/aclocal.m4: Re-generate.
1832         * gnulib/config.in: Re-generate.
1833         * gnulib/configure: Re-generate.
1834         * gnulib/import/Makefile.am: Re-generate.
1835         * gnulib/import/Makefile.in: Re-generate.
1836         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1837         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1838         * gnulib/import/arpa_inet.in.h: New file.
1839         * gnulib/import/inet_ntop.c: New file.
1840         * gnulib/import/m4/arpa_inet_h.m4: New file.
1841         * gnulib/import/m4/inet_ntop.m4: New file.
1842         * gnulib/import/m4/netinet_in_h.m4: New file.
1843         * gnulib/import/m4/socklen.m4: New file.
1844         * gnulib/import/m4/sockpfaf.m4: New file.
1845         * gnulib/import/m4/stdalign.m4: New file.
1846         * gnulib/import/m4/sys_uio_h.m4: New file.
1847         * gnulib/import/netinet_in.in.h: New file.
1848         * gnulib/import/stdalign.in.h: New file.
1849         * gnulib/import/sys_socket.c: New file.
1850         * gnulib/import/sys_socket.in.h: New file.
1851         * gnulib/import/sys_uio.in.h: New file.
1852         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1853         module.
1854
1855 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1856
1857         * gnulib/aclocal-m4-deps.mk: New file.
1858         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1859         deterministically.
1860
1861 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1862
1863         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1864         KVE_PATH.
1865
1866 2018-09-18  Tom Tromey  <tom@tromey.com>
1867
1868         * compile/compile-object-load.c (struct
1869         link_hash_table_cleanup_data): Add constructor and destructor.
1870         Use DISABLE_COPY_AND_ASSIGN.
1871         (~link_hash_table_cleanup_data): Rename from
1872         link_hash_table_free.  Now a destructor.
1873         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1874
1875 2018-09-18  Tom Tromey  <tom@tromey.com>
1876
1877         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1878         * compile/compile-object-load.c (struct munmap_list): Move to
1879         header file.
1880         (munmap_list::add): Rename from munmap_list_add; rewrite.
1881         (munmap_list::~munmap_list): Rename from munmap_list_free.
1882         (munmap_listp_free_cleanup): Remove.
1883         (compile_object_load): Update.
1884         * compile/compile-object-load.h (struct munmap_list): Move from
1885         compile-object-load.c.  Rewrite.
1886
1887 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1888
1889         * aarch64-tdep.c (pass_in_v): Use register size.
1890         (aarch64_extract_return_value): Likewise.
1891         (aarch64_store_return_value): Likewise.
1892
1893 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1894
1895         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1896         rlim_t.
1897
1898 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1899
1900         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1901         Fix short help line.
1902
1903 2018-09-17  Tom Tromey  <tom@tromey.com>
1904
1905         PR python/20445:
1906         * configure: Rebuild.
1907         * configure.ac: Conditionally use -DNDEBUG for Python.
1908
1909 2018-09-17  Tom Tromey  <tom@tromey.com>
1910
1911         * configure: Rebuild.
1912         * configure.ac: Use gmp as a library dependency when checking for
1913         mpfr.
1914
1915 2018-09-17  Pedro Alves  <palves@redhat.com>
1916
1917         * python/py-inferior.c (find_inferior_object): Delete.
1918
1919 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1920
1921         * compile/compile-cplus-types.c
1922         (compile_cplus_instance::enter_scope): Don't use new_scope after
1923         std::move.
1924
1925 2018-09-17  Tom Tromey  <tom@tromey.com>
1926
1927         * common/pathstuff.c (get_standard_cache_dir): Use
1928         ~/Library/Caches on macOS.
1929         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1930
1931 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1932
1933         PR python/23669
1934         * breakpoint.c (commands_cmd_element): New.
1935         (_initialize_breakpoint): Assign commands_cmd_element.
1936         * breakpoint.h (commands_cmd_element): New.
1937         * cli/cli-script.c (while_cmd_element, if_command,
1938         define_cmd_element): New.
1939         (command_name_equals): Remove.
1940         (process_next_line): Compare commands by pointer, not by name.
1941         (_initialize_cli_script): Assign the various cmd_list_element
1942         variables.
1943         * compile/compile.c (compile_cmd_element): New.
1944         (_initialize_compile): Assign compile_cmd_element.
1945         * compile/compile.h (compile_cmd_element): New.
1946         * guile/guile.c (guile_cmd_element): New.
1947         (install_gdb_commands): Assign guile_cmd_element.
1948         * guile/guile.h (guile_cmd_element): New.
1949         * python/python.c (python_cmd_element): New.
1950         (_initialize_python): Assign python_cmd_element.
1951         * python/python.h (python_cmd_element): New.
1952         * tracepoint.c (while_stepping_cmd_element): New.
1953         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1954         * tracepoint.h (while_stepping_cmd_element): New.
1955
1956 2018-09-17  Tom Tromey  <tom@tromey.com>
1957
1958         * infrun.c (save_infcall_suspend_state): Return
1959         infcall_suspend_state_up.
1960         (save_infcall_control_state): Return infcall_control_state_up.
1961         * inferior.h (save_infcall_suspend_state)
1962         (save_infcall_control_state): Declare later.  Return unique
1963         pointers.
1964
1965 2018-09-17  Tom Tromey  <tom@tromey.com>
1966
1967         * infrun.c (struct stop_context): Declare constructor,
1968         destructor, "changed" method.
1969         (stop_context::stop_context): Rename from save_stop_context.
1970         (stop_context::~stop_context): Rename from
1971         release_stop_context_cleanup.
1972         (normal_stop): Update.
1973         (stop_context::changed): Rename from stop_context_changed.  Return
1974         bool.
1975
1976 2018-09-17  Tom Tromey  <tom@tromey.com>
1977
1978         * inferior.h (struct infcall_suspend_state_deleter): New.
1979         (infcall_suspend_state_up): New typedef.
1980         (struct infcall_control_state_deleter): New.
1981         (infcall_control_state_up): New typedef.
1982         (make_cleanup_restore_infcall_suspend_state)
1983         (make_cleanup_restore_infcall_control_state): Don't declare.
1984         * infcall.c (call_function_by_hand_dummy): Update.
1985         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1986         (make_cleanup_restore_infcall_suspend_state): Remove.
1987         (do_restore_infcall_control_state_cleanup)
1988         (make_cleanup_restore_infcall_control_state): Remove.
1989
1990 2018-09-17  Tom Tromey  <tom@tromey.com>
1991
1992         * gdbthread.h (struct thread_control_state): Add initializer.
1993         (class thread_info) <control>: Remove initializer.
1994         * inferior.h (struct inferior_control_state): Add initializer.
1995         (class inferior) <control>: Remove initializer.
1996         (exit_inferior_1): Update.
1997         * infrun.c (struct infcall_control_state): Add constructors.
1998         (save_infcall_control_state): Use new.
1999         (restore_infcall_control_state, discard_infcall_control_state):
2000         Use delete.
2001
2002 2018-09-17  Tom Tromey  <tom@tromey.com>
2003
2004         * infrun.c (struct infcall_suspend_state) <registers>: Now a
2005         unique_ptr.
2006         <siginfo_data>: Now a unique_xmalloc_ptr.
2007         (save_infcall_suspend_state, restore_infcall_suspend_state)
2008         (discard_infcall_suspend_state)
2009         (get_infcall_suspend_state_regcache): Update.
2010
2011 2018-09-17  Tom Tromey  <tom@tromey.com>
2012
2013         * gdbthread.h (struct thread_suspend_state): Add initializers.
2014         (class thread_info) <suspend>: Remove initializer.
2015         * infrun.c (struct infcall_suspend_state): Add initializers.
2016         (save_infcall_suspend_state): Use new.
2017         (discard_infcall_suspend_state): Use delete.
2018
2019 2018-09-16  Tom Tromey  <tom@tromey.com>
2020
2021         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2022         Remove.
2023         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2024         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2025         (py_varobj_iter_new): Likewise.
2026         (py_varobj_get_iterator): Use gdbpy_ref.
2027
2028 2018-09-16  Tom Tromey  <tom@tromey.com>
2029
2030         * python/py-threadevent.c (py_get_event_thread): Simplify.
2031         * python/py-inferior.c (infpy_thread_from_thread_handle):
2032         Return immediately after calling thread_to_thread_object.  Use
2033         Py_RETURN_NONE.
2034         (thread_to_thread_object): Set the exception on a NULL return.
2035
2036 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
2037
2038         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2039
2040 2018-09-16  Tom Tromey  <tom@tromey.com>
2041
2042         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2043         Remove.
2044
2045 2018-09-16  Tom Tromey  <tom@tromey.com>
2046
2047         * python/python-internal.h (thread_to_thread_object): Change
2048         return type.
2049         * python/py-inferior.c (thread_to_thread_object): Return a new
2050         reference.
2051         (infpy_thread_from_thread_handle): Update.
2052         * python/py-infthread.c (gdbpy_selected_thread): Update.
2053         * python/py-stopevent.c (create_stop_event_object): Update.
2054         * python/py-threadevent.c (py_get_event_thread): Return a new
2055         reference.
2056         (py_get_event_thread): Update.
2057         * python/py-event.h (py_get_event_thread): Change return type.
2058         * python/py-continueevent.c (create_continue_event_object):
2059         Update.
2060
2061 2018-09-16  Tom Tromey  <tom@tromey.com>
2062
2063         * python/py-progspace.c (pspy_get_objfiles): Update.
2064         * python/python-internal.h (objfile_to_objfile_object): Change
2065         return type.
2066         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2067         Update.
2068         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2069         Update.
2070         * python/python.c (gdbpy_get_current_objfile): Update.
2071         (gdbpy_objfiles): Update.
2072         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2073         Update.
2074         (objfile_to_objfile_object): Return a new reference.
2075         * python/py-symtab.c (stpy_get_objfile): Update.
2076         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2077         Update.
2078
2079 2018-09-16  Tom Tromey  <tom@tromey.com>
2080
2081         * python/py-inferior.c (infpy_get_progspace): Update.
2082         * python/python-internal.h (pspace_to_pspace_object): Change
2083         return type.
2084         * python/py-newobjfileevent.c
2085         (create_clear_objfiles_event_object): Update.
2086         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2087         Update.
2088         * python/python.c (gdbpy_get_current_progspace): Update.
2089         (gdbpy_progspaces): Update.
2090         * python/py-progspace.c (pspace_to_pspace_object): Return a new
2091         reference.
2092         * python/py-objfile.c (objfpy_get_progspace): Update.
2093         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2094         Update.
2095
2096 2018-09-16  Tom Tromey  <tom@tromey.com>
2097
2098         * python/lib/gdb/__init__.py (current_progspace, objfiles)
2099         (solib_name, block_for_pc, find_pc_line): New functions.
2100         (execute_unwinders): Update.
2101         * python/py-block.c (gdbpy_block_for_pc): Remove.
2102         * python/py-inferior.c (infpy_get_progspace): New function.
2103         (inferior_object_getset) <progspace>: Add.
2104         * python/py-progspace.c (pspy_objfiles): Rewrite.
2105         (pspy_solib_name, pspy_block_for_pc)
2106         (pspy_find_pc_line, pspy_is_valid): New functions.
2107         (progspace_object_methods): Add entries for solib_name,
2108         block_for_pc, find_pc_line, is_valid.
2109         * python/python-internal.h (gdbpy_block_for_pc)
2110         (build_objfiles_list): Don't declare.
2111         * python/python.c: Don't include solib.h.
2112         (gdbpy_solib_name, gdbpy_find_pc_line)
2113         (gdbpy_get_current_progspace, build_objfiles_list)
2114         (gdbpy_objfiles): Remove.
2115         (GdbMethods) <current_progspace, objfiles, block_for_pc,
2116         solib_name, find_pc_line>: Remove entries.
2117
2118 2018-09-16  Tom Tromey  <tom@tromey.com>
2119
2120         * top.c (new_ui_command): Use GNU style for metasyntactic
2121         variables.
2122         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2123         variables.
2124         * maint.c (maintenance_translate_address): Remove "<>" around
2125         text.
2126         * interps.c (interpreter_exec_cmd): Use GNU style for
2127         metasyntactic variables.
2128         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2129         metasyntactic variables.
2130         * tracepoint.c (tfind_range_command): Use GNU style for
2131         metasyntactic variables.
2132         (tfind_outside_command): Likewise.
2133         (_initialize_tracepoint): Likewise.
2134         * remote.c (extended_remote_target::create_inferior): Use GNU
2135         style for metasyntactic variables.
2136         * sparc64-tdep.c (adi_examine_command): Use GNU style for
2137         metasyntactic variables.
2138         (adi_assign_command): Likewise.
2139
2140 2018-09-16  Tom Tromey  <tom@tromey.com>
2141
2142         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2143         metasyntactic variables.  Print message if no disassembler options
2144         are available.
2145
2146 2018-09-15  Tom Tromey  <tom@tromey.com>
2147
2148         * infcmd.c (get_inferior_args): Return const char *.
2149         * inferior.h (get_inferior_args): Return type now const.
2150         * linux-tdep.c (linux_fill_prpsinfo): Update.
2151         * procfs.c (procfs_target::make_corefile_notes): Update.
2152
2153 2018-09-07  Tom Tromey  <tom@tromey.com>
2154
2155         * python/python.c (execute_gdb_command): Call bpstat_do_actions
2156         inside the TRY.
2157
2158 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2159
2160         * nios2-tdep.c (nios2_type_align): New.
2161         (nios2_gdb_arch_init): Install type_align hook.
2162
2163 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2164
2165         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2166         type that is neither object file owned, nor gdbarch owned.
2167         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2168         gdbarch is non-NULL.
2169         (alloc_type_instance): Allocate non-objfile owned types on the
2170         gdbarch obstack.
2171         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2172         using TYPE_ALLOC to ensure memory is allocated on the correct
2173         obstack.
2174         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2175         obstack, or the gdbarch obstack.
2176         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2177
2178 2018-09-14  Tom Tromey  <tom@tromey.com>
2179
2180         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2181         block.
2182
2183 2018-09-14  Tom Tromey  <tom@tromey.com>
2184
2185         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2186
2187 2018-09-13  Tom Tromey  <tom@tromey.com>
2188
2189         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2190         static.
2191
2192 2018-09-13  Tom Tromey  <tom@tromey.com>
2193
2194         * exec.c (try_open_exec_file): Use std::string.
2195
2196 2018-09-13  Tom Tromey  <tom@tromey.com>
2197
2198         * utils.h (gdb_bfd_errmsg): Return std::string.
2199         * exec.c (exec_file_attach): Update.
2200         * compile/compile-object-load.c (compile_object_load): Update.
2201         * utils.c (gdb_bfd_errmsg): Return std::string.
2202
2203 2018-09-13  Tom Tromey  <tom@tromey.com>
2204
2205         * procfs.c (struct procinfo_deleter): New.
2206         (procinfo_up): New typedef.
2207         (do_destroy_procinfo_cleanup): Remove.
2208         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2209
2210 2018-09-13  Tom Tromey  <tom@tromey.com>
2211
2212         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2213
2214 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2215 2018-09-13  Tom Tromey  <tom@tromey.com>
2216
2217         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2218         (pspy_get_objfiles): New function.
2219         (progspace_object_methods): New.
2220         (pspace_object_type): Add tp_methods callback.
2221         * python/python-internal.h (build_objfiles_list): New
2222         declaration.
2223         * python/python.c (build_objfiles_list): New function.
2224         (gdbpy_objfiles): Implement using build_objfiles_list.
2225         * NEWS: Mention the Progspace.objfiles method.
2226
2227 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2228
2229         * python/py-inferior.c (infpy_get_progspace): New function.
2230         (inferior_object_getset): Add progspace property.
2231         * NEWS: Mention the new property.
2232
2233 2018-09-13  Tom Tromey  <tom@tromey.com>
2234
2235         PR rust/23650:
2236         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2237
2238 2018-09-13  Tom Tromey  <tom@tromey.com>
2239
2240         PR rust/23626:
2241         * rust-lang.c (rust_enum_variant): Now static.
2242         (rust_empty_enum_p): New function.
2243         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2244         Handle empty enum.
2245
2246 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2247
2248         * python/py-inferior.c (infpy_repr): New.
2249         (inferior_object_type): Register infpy_repr.
2250         * python/py-objfile.c (objfpy_repr): New.
2251         (objfile_object_type): Register objfpy_repr.
2252
2253 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2254
2255         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2256
2257 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2258
2259         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2260         typo.
2261
2262 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2263
2264         * common/common-utils.c: Don't include '<sys/stat.h>'.
2265         (is_regular_file): Move to...
2266         * common/filestuff.c (is_regular_file): ... here.
2267         * common/common-utils.h (is_regular_file): Move to...
2268         * common/filestuff.h (is_regular_file): ... here.
2269
2270 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2271
2272         * skip.c (debug_skip): New variable.
2273         (skiplist_entry::do_skip_file_p): Add debug output.
2274         (skiplist_entry::do_skip_gfile_p): Likewise.
2275         (skiplist_entry::skip_function_p): Likewise.
2276         (_initialize_step_skip): Create debug command.
2277         * NEWS: Mention set/show debug skip.
2278
2279 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2280
2281         * darwin-nat.c (should_disable_startup_with_shell):
2282         New function.
2283         (darwin_nat_target::create_inferior): Add call.
2284
2285 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2286
2287         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2288         inf_port, msg_state>: Initialize.
2289         (struct darwin_thread_info) <signaled, single_step>: Change
2290         type and initialize.
2291         (struct darwin_thread_info) <event>: Initialize.
2292
2293 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2294
2295         PR gdb/23555
2296         PR gdb/23558
2297         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2298         guesses.
2299
2300 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2301
2302         Revert:
2303         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2304
2305         PR gdb/23555
2306         PR gdb/23558
2307         * gnulib/aclocal.m4: Regenerate.
2308         * gnulib/config.in: Regenerate.
2309         * gnulib/configure: Regenerate.
2310         * gnulib/import/Makefile.am: Update.
2311         * gnulib/import/Makefile.in: Update.
2312         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2313         * gnulib/import/_Noreturn.h: ... this.
2314         * gnulib/import/alloca.in.h: Update.
2315         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2316         * gnulib/import/arg-nonnull.h: ... this.
2317         * gnulib/import/assure.h: Update.
2318         * gnulib/import/at-func.c: Update.
2319         * gnulib/import/basename-lgpl.c: Update.
2320         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2321         * gnulib/import/c++defs.h: ... this.
2322         * gnulib/import/canonicalize-lgpl.c: Update.
2323         * gnulib/import/cdefs.h: Update.
2324         * gnulib/import/chdir-long.c: Update.
2325         * gnulib/import/chdir-long.h: Update.
2326         * gnulib/import/cloexec.c: Update.
2327         * gnulib/import/cloexec.h: Update.
2328         * gnulib/import/close.c: Update.
2329         * gnulib/import/closedir.c: Update.
2330         * gnulib/import/config.charset: Update.
2331         * gnulib/import/dirent-private.h: Update.
2332         * gnulib/import/dirent.in.h: Update.
2333         * gnulib/import/dirfd.c: Update.
2334         * gnulib/import/dirname-lgpl.c: Update.
2335         * gnulib/import/dirname.h: Update.
2336         * gnulib/import/dosname.h: Update.
2337         * gnulib/import/dup-safer-flag.c: Update.
2338         * gnulib/import/dup-safer.c: Update.
2339         * gnulib/import/dup.c: Update.
2340         * gnulib/import/dup2.c: Update.
2341         * gnulib/import/errno.in.h: Update.
2342         * gnulib/import/error.c: Update.
2343         * gnulib/import/error.h: Update.
2344         * gnulib/import/exitfail.c: Update.
2345         * gnulib/import/exitfail.h: Update.
2346         * gnulib/import/extra/update-copyright: Update.
2347         * gnulib/import/fchdir.c: Update.
2348         * gnulib/import/fcntl.c: Update.
2349         * gnulib/import/fcntl.in.h: Update.
2350         * gnulib/import/fd-hook.c: Update.
2351         * gnulib/import/fd-hook.h: Update.
2352         * gnulib/import/fd-safer-flag.c: Update.
2353         * gnulib/import/fd-safer.c: Update.
2354         * gnulib/import/fdopendir.c: Update.
2355         * gnulib/import/filename.h: Update.
2356         * gnulib/import/filenamecat-lgpl.c: Update.
2357         * gnulib/import/filenamecat.h: Update.
2358         * gnulib/import/flexmember.h: Update.
2359         * gnulib/import/float+.h: Update.
2360         * gnulib/import/float.c: Update.
2361         * gnulib/import/float.in.h: Update.
2362         * gnulib/import/fnmatch.c: Update.
2363         * gnulib/import/fnmatch.in.h: Update.
2364         * gnulib/import/fnmatch_loop.c: Update.
2365         * gnulib/import/fpucw.h: Update.
2366         * gnulib/import/frexp.c: Update.
2367         * gnulib/import/frexpl.c: Update.
2368         * gnulib/import/fstat.c: Update.
2369         * gnulib/import/fstatat.c: Update.
2370         * gnulib/import/getcwd-lgpl.c: Update.
2371         * gnulib/import/getcwd.c: Update.
2372         * gnulib/import/getdtablesize.c: Update.
2373         * gnulib/import/getlogin_r.c: Update.
2374         * gnulib/import/getprogname.c: Update.
2375         * gnulib/import/getprogname.h: Update.
2376         * gnulib/import/gettext.h: Update.
2377         * gnulib/import/gettimeofday.c: Update.
2378         * gnulib/import/glob-libc.h: Update.
2379         * gnulib/import/glob.c: Update.
2380         * gnulib/import/glob.in.h: Update.
2381         * gnulib/import/glob_internal.h: Update.
2382         * gnulib/import/glob_pattern_p.c: Update.
2383         * gnulib/import/globfree.c: Update.
2384         * gnulib/import/hard-locale.c: Update.
2385         * gnulib/import/hard-locale.h: Update.
2386         * gnulib/import/intprops.h: Update.
2387         * gnulib/import/inttypes.in.h: Update.
2388         * gnulib/import/isnan.c: Update.
2389         * gnulib/import/isnand-nolibm.h: Update.
2390         * gnulib/import/isnand.c: Update.
2391         * gnulib/import/isnanl-nolibm.h: Update.
2392         * gnulib/import/isnanl.c: Update.
2393         * gnulib/import/itold.c: Update.
2394         * gnulib/import/libc-config.h: Update.
2395         * gnulib/import/limits.in.h: Update.
2396         * gnulib/import/localcharset.c: Update.
2397         * gnulib/import/localcharset.h: Update.
2398         * gnulib/import/localtime-buffer.c: Update.
2399         * gnulib/import/localtime-buffer.h: Update.
2400         * gnulib/import/lstat.c: Update.
2401         * gnulib/import/m4/00gnulib.m4: Update.
2402         * gnulib/import/m4/__inline.m4: Update.
2403         * gnulib/import/m4/absolute-header.m4: Update.
2404         * gnulib/import/m4/alloca.m4: Update.
2405         * gnulib/import/m4/builtin-expect.m4: Update.
2406         * gnulib/import/m4/canonicalize.m4: Update.
2407         * gnulib/import/m4/chdir-long.m4: Update.
2408         * gnulib/import/m4/close.m4: Update.
2409         * gnulib/import/m4/closedir.m4: Update.
2410         * gnulib/import/m4/configmake.m4: Update.
2411         * gnulib/import/m4/d-ino.m4: Update.
2412         * gnulib/import/m4/d-type.m4: Update.
2413         * gnulib/import/m4/dirent_h.m4: Update.
2414         * gnulib/import/m4/dirfd.m4: Update.
2415         * gnulib/import/m4/dirname.m4: Update.
2416         * gnulib/import/m4/double-slash-root.m4: Update.
2417         * gnulib/import/m4/dup.m4: Update.
2418         * gnulib/import/m4/dup2.m4: Update.
2419         * gnulib/import/m4/eealloc.m4: Update.
2420         * gnulib/import/m4/environ.m4: Update.
2421         * gnulib/import/m4/errno_h.m4: Update.
2422         * gnulib/import/m4/error.m4: Update.
2423         * gnulib/import/m4/exponentd.m4: Update.
2424         * gnulib/import/m4/exponentl.m4: Update.
2425         * gnulib/import/m4/extensions.m4: Update.
2426         * gnulib/import/m4/extern-inline.m4: Update.
2427         * gnulib/import/m4/fchdir.m4: Update.
2428         * gnulib/import/m4/fcntl-o.m4: Update.
2429         * gnulib/import/m4/fcntl.m4: Update.
2430         * gnulib/import/m4/fcntl_h.m4: Update.
2431         * gnulib/import/m4/fdopendir.m4: Update.
2432         * gnulib/import/m4/filenamecat.m4: Update.
2433         * gnulib/import/m4/flexmember.m4: Update.
2434         * gnulib/import/m4/float_h.m4: Update.
2435         * gnulib/import/m4/fnmatch.m4: Update.
2436         * gnulib/import/m4/fnmatch_h.m4: Update.
2437         * gnulib/import/m4/fpieee.m4: Update.
2438         * gnulib/import/m4/frexp.m4: Update.
2439         * gnulib/import/m4/frexpl.m4: Update.
2440         * gnulib/import/m4/fstat.m4: Update.
2441         * gnulib/import/m4/fstatat.m4: Update.
2442         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2443         * gnulib/import/m4/getcwd-path-max.m4: Update.
2444         * gnulib/import/m4/getcwd.m4: Update.
2445         * gnulib/import/m4/getdtablesize.m4: Update.
2446         * gnulib/import/m4/getlogin.m4: Update.
2447         * gnulib/import/m4/getlogin_r.m4: Update.
2448         * gnulib/import/m4/getpagesize.m4: Update.
2449         * gnulib/import/m4/getprogname.m4: Update.
2450         * gnulib/import/m4/gettimeofday.m4: Update.
2451         * gnulib/import/m4/glibc21.m4: Update.
2452         * gnulib/import/m4/glob.m4: Update.
2453         * gnulib/import/m4/glob_h.m4: Update.
2454         * gnulib/import/m4/gnulib-cache.m4: Update.
2455         * gnulib/import/m4/gnulib-common.m4: Update.
2456         * gnulib/import/m4/gnulib-comp.m4: Update.
2457         * gnulib/import/m4/gnulib-tool.m4: Update.
2458         * gnulib/import/m4/hard-locale.m4: Update.
2459         * gnulib/import/m4/include_next.m4: Update.
2460         * gnulib/import/m4/inttypes-pri.m4: Update.
2461         * gnulib/import/m4/inttypes.m4: Update.
2462         * gnulib/import/m4/isnand.m4: Update.
2463         * gnulib/import/m4/isnanl.m4: Update.
2464         * gnulib/import/m4/largefile.m4: Update.
2465         * gnulib/import/m4/limits-h.m4: Update.
2466         * gnulib/import/m4/localcharset.m4: Update.
2467         * gnulib/import/m4/locale-fr.m4: Update.
2468         * gnulib/import/m4/locale-ja.m4: Update.
2469         * gnulib/import/m4/locale-zh.m4: Update.
2470         * gnulib/import/m4/localtime-buffer.m4: Update.
2471         * gnulib/import/m4/longlong.m4: Update.
2472         * gnulib/import/m4/lstat.m4: Update.
2473         * gnulib/import/m4/malloc.m4: Update.
2474         * gnulib/import/m4/malloca.m4: Update.
2475         * gnulib/import/m4/math_h.m4: Update.
2476         * gnulib/import/m4/mbrtowc.m4: Update.
2477         * gnulib/import/m4/mbsinit.m4: Update.
2478         * gnulib/import/m4/mbsrtowcs.m4: Update.
2479         * gnulib/import/m4/mbstate_t.m4: Update.
2480         * gnulib/import/m4/memchr.m4: Update.
2481         * gnulib/import/m4/memmem.m4: Update.
2482         * gnulib/import/m4/mempcpy.m4: Update.
2483         * gnulib/import/m4/memrchr.m4: Update.
2484         * gnulib/import/m4/mkdir.m4: Update.
2485         * gnulib/import/m4/mkstemp.m4: Update.
2486         * gnulib/import/m4/mmap-anon.m4: Update.
2487         * gnulib/import/m4/mode_t.m4: Update.
2488         * gnulib/import/m4/msvc-inval.m4: Update.
2489         * gnulib/import/m4/msvc-nothrow.m4: Update.
2490         * gnulib/import/m4/multiarch.m4: Update.
2491         * gnulib/import/m4/nocrash.m4: Update.
2492         * gnulib/import/m4/off_t.m4: Update.
2493         * gnulib/import/m4/onceonly.m4: Update.
2494         * gnulib/import/m4/open-cloexec.m4: Update.
2495         * gnulib/import/m4/open.m4: Update.
2496         * gnulib/import/m4/openat.m4: Update.
2497         * gnulib/import/m4/opendir.m4: Update.
2498         * gnulib/import/m4/pathmax.m4: Update.
2499         * gnulib/import/m4/rawmemchr.m4: Update.
2500         * gnulib/import/m4/readdir.m4: Update.
2501         * gnulib/import/m4/readlink.m4: Update.
2502         * gnulib/import/m4/realloc.m4: Update.
2503         * gnulib/import/m4/rename.m4: Update.
2504         * gnulib/import/m4/rewinddir.m4: Update.
2505         * gnulib/import/m4/rmdir.m4: Update.
2506         * gnulib/import/m4/save-cwd.m4: Update.
2507         * gnulib/import/m4/secure_getenv.m4: Update.
2508         * gnulib/import/m4/setenv.m4: Update.
2509         * gnulib/import/m4/signal_h.m4: Update.
2510         * gnulib/import/m4/ssize_t.m4: Update.
2511         * gnulib/import/m4/stat-time.m4: Update.
2512         * gnulib/import/m4/stat.m4: Update.
2513         * gnulib/import/m4/std-gnu11.m4: Update.
2514         * gnulib/import/m4/stdbool.m4: Update.
2515         * gnulib/import/m4/stddef_h.m4: Update.
2516         * gnulib/import/m4/stdint.m4: Update.
2517         * gnulib/import/m4/stdio_h.m4: Update.
2518         * gnulib/import/m4/stdlib_h.m4: Update.
2519         * gnulib/import/m4/strchrnul.m4: Update.
2520         * gnulib/import/m4/strdup.m4: Update.
2521         * gnulib/import/m4/strerror.m4: Update.
2522         * gnulib/import/m4/string_h.m4: Update.
2523         * gnulib/import/m4/strstr.m4: Update.
2524         * gnulib/import/m4/strtok_r.m4: Update.
2525         * gnulib/import/m4/sys_socket_h.m4: Update.
2526         * gnulib/import/m4/sys_stat_h.m4: Update.
2527         * gnulib/import/m4/sys_time_h.m4: Update.
2528         * gnulib/import/m4/sys_types_h.m4: Update.
2529         * gnulib/import/m4/tempname.m4: Update.
2530         * gnulib/import/m4/time_h.m4: Update.
2531         * gnulib/import/m4/unistd-safer.m4: Update.
2532         * gnulib/import/m4/unistd_h.m4: Update.
2533         * gnulib/import/m4/warn-on-use.m4: Update.
2534         * gnulib/import/m4/wchar_h.m4: Update.
2535         * gnulib/import/m4/wchar_t.m4: Update.
2536         * gnulib/import/m4/wctype_h.m4: Update.
2537         * gnulib/import/m4/wint_t.m4: Update.
2538         * gnulib/import/malloc.c: Update.
2539         * gnulib/import/malloc/scratch_buffer.h: Update.
2540         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2541         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2542         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2543         * gnulib/import/malloca.c: Update.
2544         * gnulib/import/malloca.h: Update.
2545         * gnulib/import/malloca.valgrind: Update.
2546         * gnulib/import/math.in.h: Update.
2547         * gnulib/import/mbrtowc.c: Update.
2548         * gnulib/import/mbsinit.c: Update.
2549         * gnulib/import/mbsrtowcs-impl.h: Update.
2550         * gnulib/import/mbsrtowcs-state.c: Update.
2551         * gnulib/import/mbsrtowcs.c: Update.
2552         * gnulib/import/memchr.c: Update.
2553         * gnulib/import/memmem.c: Update.
2554         * gnulib/import/mempcpy.c: Update.
2555         * gnulib/import/memrchr.c: Update.
2556         * gnulib/import/mkdir.c: Update.
2557         * gnulib/import/mkstemp.c: Update.
2558         * gnulib/import/msvc-inval.c: Update.
2559         * gnulib/import/msvc-inval.h: Update.
2560         * gnulib/import/msvc-nothrow.c: Update.
2561         * gnulib/import/msvc-nothrow.h: Update.
2562         * gnulib/import/open.c: Update.
2563         * gnulib/import/openat-die.c: Update.
2564         * gnulib/import/openat-priv.h: Update.
2565         * gnulib/import/openat-proc.c: Update.
2566         * gnulib/import/openat.c: Update.
2567         * gnulib/import/openat.h: Update.
2568         * gnulib/import/opendir.c: Update.
2569         * gnulib/import/pathmax.h: Update.
2570         * gnulib/import/pipe-safer.c: Update.
2571         * gnulib/import/rawmemchr.c: Update.
2572         * gnulib/import/readdir.c: Update.
2573         * gnulib/import/readlink.c: Update.
2574         * gnulib/import/realloc.c: Update.
2575         * gnulib/import/ref-add.sin: Update.
2576         * gnulib/import/ref-del.sin: Update.
2577         * gnulib/import/rename.c: Update.
2578         * gnulib/import/rewinddir.c: Update.
2579         * gnulib/import/rmdir.c: Update.
2580         * gnulib/import/same-inode.h: Update.
2581         * gnulib/import/save-cwd.c: Update.
2582         * gnulib/import/save-cwd.h: Update.
2583         * gnulib/import/scratch_buffer.h: Update.
2584         * gnulib/import/secure_getenv.c: Update.
2585         * gnulib/import/setenv.c: Update.
2586         * gnulib/import/signal.in.h: Update.
2587         * gnulib/import/stat-time.c: Update.
2588         * gnulib/import/stat-time.h: Update.
2589         * gnulib/import/stat-w32.c: Update.
2590         * gnulib/import/stat-w32.h: Update.
2591         * gnulib/import/stat.c: Update.
2592         * gnulib/import/stdbool.in.h: Update.
2593         * gnulib/import/stddef.in.h: Update.
2594         * gnulib/import/stdint.in.h: Update.
2595         * gnulib/import/stdio.in.h: Update.
2596         * gnulib/import/stdlib.in.h: Update.
2597         * gnulib/import/str-two-way.h: Update.
2598         * gnulib/import/strchrnul.c: Update.
2599         * gnulib/import/strdup.c: Update.
2600         * gnulib/import/streq.h: Update.
2601         * gnulib/import/strerror-override.c: Update.
2602         * gnulib/import/strerror-override.h: Update.
2603         * gnulib/import/strerror.c: Update.
2604         * gnulib/import/string.in.h: Update.
2605         * gnulib/import/stripslash.c: Update.
2606         * gnulib/import/strnlen1.c: Update.
2607         * gnulib/import/strnlen1.h: Update.
2608         * gnulib/import/strstr.c: Update.
2609         * gnulib/import/strtok_r.c: Update.
2610         * gnulib/import/sys_stat.in.h: Update.
2611         * gnulib/import/sys_time.in.h: Update.
2612         * gnulib/import/sys_types.in.h: Update.
2613         * gnulib/import/tempname.c: Update.
2614         * gnulib/import/tempname.h: Update.
2615         * gnulib/import/time.in.h: Update.
2616         * gnulib/import/unistd--.h: Update.
2617         * gnulib/import/unistd-safer.h: Update.
2618         * gnulib/import/unistd.in.h: Update.
2619         * gnulib/import/unsetenv.c: Update.
2620         * gnulib/import/verify.h: Update.
2621         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2622         * gnulib/import/wchar.in.h: Update.
2623         * gnulib/import/wctype.in.h: Update.
2624         * gnulib/import/xalloc-oversized.h: Update.
2625         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2626         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2627
2628 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2629
2630         * record-btrace.c (get_thread_current_frame): Remove
2631         old_inferior_ptid.
2632
2633 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2634
2635         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2636         with check_tag to 1 if and only if the type is tagged and the
2637         component being searched cannot been found in the current
2638         view. Otherwise, always call ada_to_fixed_type with
2639         check_tag to 0.
2640
2641 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2642
2643         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2644         declaration.
2645         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2646         * ada-varobj.c (ada_varobj_get_number_of_children,
2647         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2648
2649 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2650
2651         * ada-valprint.c (ada_value_print): Use type instead of
2652         enclosing type.
2653
2654 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2655
2656         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2657         an array of access to unconstrained array.
2658
2659 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2660
2661         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2662         (ada_check_typedef): Use it.
2663
2664 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2665
2666         * ada-varobj.c (ada_varobj_describe_struct_child)
2667         (ada_varobj_describe_child): Handle union case like struct one.
2668
2669 2018-09-10  Tom Tromey  <tom@tromey.com>
2670
2671         PR python/18380:
2672         * python/python.c (_initialize_python): Make example in "python"
2673         help work in Python 3.
2674
2675 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2676
2677         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2678         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2679         $(EXEEXT) to the script, as it is not a program.
2680
2681 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2682
2683         * python/py-prettyprint.c (pretty_print_one_value): Return
2684         gdbpy_ref<>.
2685         (print_string_repr): Adjust.
2686         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2687         * python/python-internal.h (apply_varobj_pretty_printer): Return
2688         gdbpy_ref<>.
2689         * varobj.c (varobj_value_get_print_value): Adjust.
2690
2691 2018-09-08  Tom Tromey  <tom@tromey.com>
2692
2693         PR python/16047:
2694         * python/py-prettyprint.c (pretty_print_one_value): Check for
2695         to_string method.
2696
2697 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2698
2699         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2700         replace_operator_with_call.
2701
2702 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2703
2704         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2705
2706 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2707
2708         * ada-typeprint.c (print_range): Print the bounds using TYPE
2709         rather than its TYPE_TARGET_TYPE.
2710
2711 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2712
2713         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2714         call to ada_to_fixed_value_create.
2715
2716 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2717
2718         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2719
2720 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2721
2722         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2723         by calls to error.
2724
2725 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2726
2727         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2728         Move update of loop variable "fi".
2729
2730 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2731
2732         * ada-lang.c (value_assign_to_component): In the case of
2733         big-endian targets, extract the bits of the given VAL
2734         using an src_offset of zero if container is not a scalar.
2735
2736 2018-09-06  Simon Ser  <contact@emersion.fr>
2737
2738         PR gdb/23105
2739         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2740         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2741         * fbsd-tdep.c (fbsd_make_note_desc): New.
2742         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2743         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2744         * target.h (enum target_object) Add FreeBSD-specific
2745         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2746
2747 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2748
2749         * compile/compile-c.h (generate_c_for_variable_locations):
2750         Change reference to pointer.
2751         * compile/compile-c-support.c (compile_program) <compute>:
2752         Likewise.
2753         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2754         (generate_c_for_for_one_variable): Likewise
2755         (generate_c_for_variable_locations): Likewise
2756         * compile/compile-c-types.c (compile_c_instance::convert_type):
2757         Likewise
2758         * compile/compile-cplus-symbols.c (convert_one_symbol):
2759         std::move the scope passed to enter_scope.
2760         * compile/compile-cplus-types.c
2761         (compile_cplus_instance::enter_scope): Make parameter
2762         rvalue-reference.
2763         (compile_cplus_instance::new_scope): Change reference to
2764         pointer.
2765         (compile_cplus_instance::convert_type): Likewise
2766         (compile_cplus_convert_typedef): std::move the scope passed to
2767         enter_scope.
2768         (compile_cplus_convert_struct_or_union): Likewise.
2769         (compile_cplus_convert_enum): Likewise.
2770         (compile_cplus_convert_namespace): Likewise.
2771         * compile/compile-cplus.h (compile_cplus_instance)
2772         <enter_scope>: Make parameter rvalue-reference.
2773         * compile/compile-internal.h (compile_instance)
2774         <get_cached_type>: Likewise
2775         * compile/compile-loc2c.c (push): Likewise
2776         (pushf): Likewise
2777         (unary): Likewise
2778         (binary): Likewise
2779         (print_label): Likewise
2780         (pushf_register_address): Likewise
2781         (pushf_register): Likewise
2782         (do_compile_dwarf_expr_to_c): Likewise
2783         (compile_dwarf_expr_to_c): Likewise
2784         (compile_dwarf_bounds_to_c): Likewise
2785         * compile/compile.c (compile_instance::get_cached_type):
2786         Likewise
2787         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2788         (compile_dwarf_bounds_to_c): Likewise
2789         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2790         (dwarf2_compile_property_to_c): Likewise
2791         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2792         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2793         Likewise
2794
2795 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2796
2797         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2798         * tui/tui-data.c (init_content_element): Don't initialize it.
2799
2800 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2801
2802         * tui/tui-data.h (struct tui_win_info)
2803         <detail::opaque>: Remove.
2804         * tui/tui-data.c (init_win_info): Remove assignment.
2805
2806 2018-09-05  Tom Tromey  <tom@tromey.com>
2807
2808         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2809         -Wformat-nonliteral.
2810         * target-float.c (host_float_ops<T>::to_string)
2811         (host_float_ops<T>::from_string): Use
2812         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2813         * configure: Rebuild.
2814
2815 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2816
2817         * printcmd.c (printf_c_string): Use
2818         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2819         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2820
2821 2018-09-05  Tom Tromey  <tom@tromey.com>
2822
2823         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2824
2825 2018-09-05  Tom de Vries  <tdevries@suse.de>
2826
2827         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2828         with resolve_abstract_p == true.
2829         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2830         defaulting to false. Propagate resolve_abstract_p to
2831         dwarf2_fetch_die_loc_sect_off.
2832         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2833         parameter, defaulting to false.
2834         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2835         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2836         parameter.
2837         * dwarf2read.h (struct die_info): Forward-declare.
2838         (die_info_ptr): New typedef.
2839         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2840
2841 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2842
2843         GDB 8.2 released.
2844
2845 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2846             Pedro Alves  <palves@redhat.com>
2847
2848         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2849         "aclocal-m4-deps.mk".  Include file here.
2850         $(srcdir)/aclocal.m4: Add "configure.ac".
2851         * gnulib/aclocal-m4-deps.mk: New file.
2852         * gnulib/update-gnulib.sh: Automatically update
2853         "aclocal-m4-deps.mk".
2854
2855 2018-09-04  Tom Tromey  <tom@tromey.com>
2856
2857         * configure: Rebuild.
2858         * configure.ac: Remove multi-ice code.
2859
2860 2018-09-04  Tom Tromey  <tom@tromey.com>
2861
2862         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2863         (ada-exp.o): Update.
2864
2865 2018-09-04  Tom Tromey  <tom@tromey.com>
2866
2867         * Makefile.in (printcmd.o, target-float.o): Remove.
2868         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2869
2870 2018-09-04  Tom Tromey  <tom@tromey.com>
2871
2872         * gnulib/Makefile.in: Remove obsolete comment.
2873         * Makefile.in: Remove obsolete comment.
2874
2875 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2876
2877         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2878         line with '+'.
2879
2880 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2881
2882         * riscv-tdep.c: Add 'prologue-value.h' include.
2883         (struct riscv_unwind_cache): New struct.
2884         (riscv_debug_unwinder): New global.
2885         (riscv_scan_prologue): Update arguments, capture register details
2886         from prologue scan.
2887         (riscv_skip_prologue): Reformat arguments line, move end of
2888         prologue calculation into riscv_scan_prologue.
2889         (riscv_frame_cache): Update return type, create
2890         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2891         details.
2892         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2893         (riscv_frame_prev_register): Use the trad_frame within the
2894         riscv_unwind_cache.
2895         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2896         flag.
2897
2898 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2899
2900         * trad-frame.h (trad_frame_set_realreg): Declare.
2901         (trad_frame_set_addr): Declare.
2902         * trad-frame.c (trad_frame_set_realreg): Define new function.
2903         (trad_frame_set_addr): Define new function.
2904         (trad_frame_set_reg_realreg): Use new function.
2905         (trad_frame_set_reg_addr): Use new function.
2906
2907 2018-09-01  Keith Seitz  <keiths@redhat.com>
2908
2909         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2910         pulongest instead of "%lld".
2911         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2912         ATTRIBUTE_UNUSED.
2913
2914 2018-08-31  Tom Tromey  <tom@tromey.com>
2915
2916         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2917         variant part type.
2918
2919 2018-08-31  Pedro Alves  <palves@redhat.com>
2920
2921         * gdbarch.h: Regenerate.
2922
2923 2018-08-31  Pedro Alves  <palves@redhat.com>
2924
2925         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2926         * target.h (Hardware watchpoint interfaces): Describe
2927         continuable/steppable/non-steppable watchpoints.
2928         * gdbarch.h, gdbarch.c: Regenerate.
2929
2930 2018-08-31  Pedro Alves  <palves@redhat.com>
2931
2932         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2933         Delete.
2934         * s390-linux-nat.c
2935         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2936         * target.h (target_ops::have_continuable_watchpoint): Delete.
2937         (target_have_continuable_watchpoint): Delete.
2938         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2939         * target-delegates.c: Regenerate.
2940
2941 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2942
2943         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2944         the files present in "gnulib/import/m4/".
2945
2946 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2947
2948         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2949         c.sw, c.swsp, and c.sdsp.
2950
2951 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2952
2953         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2954         (riscv_read_misa_reg): Don't cache value read into inferior data.
2955         (riscv_new_inferior_data): Delete.
2956         (riscv_inferior_data_cleanup): Delete.
2957         (riscv_inferior_data): Delete.
2958         (riscv_invalidate_inferior_data): Delete.
2959         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2960
2961 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2962
2963         * compile/compile-cplus-types.c
2964         (compile_cplus_instance::leave_scope): Take the address of scope
2965         object.
2966         (compile_cplus_instance::convert_qualified_base): Compare quals
2967         to 0.
2968
2969 2018-08-30  Keith Seitz  <keiths@redhat.com>
2970
2971         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2972         Use "%s" and host_address_to_string instead of "%p" in printf.
2973
2974 2018-08-29  Keith Seitz  <keiths@redhat.com>
2975
2976         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2977         and compile-cplus-types.c.
2978         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2979         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2980         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2981         Declare.
2982         * compile/compile-c-support.c: Include compile-cplus.h.
2983         (load_libcompile): Templatize.
2984         (get_compile_context): "New" function.
2985         (c_get_compile_context): Use get_compile_context.
2986         (cplus_get_compile_context): New function.
2987         (cplus_push_user_expression, cplus_pop_user_expression)
2988         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2989         (cplus_compute_program): Define new structs/functions.
2990         * compile/compile-cplus-symmbols.c: New file.
2991         * compile/compile-cplus-types.c: New file.
2992         * compile/compile-cplus.h: New file.
2993         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2994         Declare.
2995         * compile/compile-object-load.c (get_out_value_type): Use
2996         strncmp_iw when comparing symbol names.
2997         (compile_object_load): Add mst_bss and mst_data.
2998         * compile/compile.c (_initialize_compile): Remove
2999         -Wno-implicit-function-declaration from `compile_args'.
3000         * compile/gcc-cp-plugin.h: New file.
3001         * NEWS: Mention C++ compile support and new debug options.
3002
3003 2018-08-29  Keith Seitz  <keiths@redhat.com>
3004
3005         * linespec.c (collect_info::add_symbol): Make virtual.
3006         (struct symbol_searcher_collect_info): New struct.
3007         (symbol_searcher::find_all_symbols): New method.
3008         * symtab.h (class symbol_searcher): New class.
3009
3010 2018-08-29  Keith Seitz  <keiths@redhat.com>
3011
3012         * linespec.c (struct linespec) <function_symbols, label_symbols>:
3013         Change to vector of block_symbol.  Update all users.
3014         (struct collect_info) <symbols>: Likewise.
3015         (collect_info::add_symbol): Take block_symbol as argument.
3016         Update all callers.
3017         (decode_compound_collector) <m_symbols>: Change type to vector
3018         of block_symbol.  Update all users.
3019         (decode_compound_collector::operator ()): Change parameter type
3020         to block_symbol.
3021         (find_method, find_function_symbols, find_linespec_symbols)
3022         (find_label_symbols_in_block, find_label_symbols): Change symbol
3023         vectors to block_symbol vectors.
3024         * symtab.h (symbol_found_callback_ftype): Change parameter type to
3025         block_symbol.
3026
3027 2018-08-29  Keith Seitz  <keiths@redhat.com>
3028
3029         * linespec.c (symbolp): Remove typedef and VEC definitions.
3030         (bound_minimal_symbol_d): Likewise.
3031
3032 2018-08-29  Keith Seitz  <keiths@redhat.com>
3033
3034         * linespec.c (decode_compound_collector::decode_compound_collector):
3035         Remove initialization for `m_symtabs'.
3036         (decode_compound_collector::release_symbols): Change return type
3037         to std::vector.  Update all callers.
3038         (class decode_compound_collector) <m_symbols>: Change type to
3039         std::vector.
3040         (lookup_prefix_sym): Change return type to std::vector.  Update all
3041         callers.
3042         (compare_symbols): Remove.
3043         (std_compare_symbols): Rename to `compare_symbols'.
3044         (find_method): Change `sym_classes' parameter to std::vector.
3045         Update all callers.  Use std::sort to sort sym_classes.
3046         (find_linespec_symbols): Remove cleanup.
3047
3048 2018-08-29  Keith Seitz  <keiths@redhat.com>
3049
3050         * linespec.c (struct linespec) <minimal_symbols>: Change type to
3051         std::vector.  Update all users.
3052         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3053         (struct collect_info) <minimal_symbols>: Likewise.
3054         (compare_msymbols): Return bool.  Change parameters to const
3055         bound_minimal_symbol references.
3056         (find_method, find_function_symbols, find_linespec_symbols): Change
3057         `minsyms' parameter to std::vector.  Update all callers.
3058
3059 2018-08-29  Keith Seitz  <keiths@redhat.com>
3060
3061         * linespec.c (struct linespec) <label_symbols>: Change type to
3062         std::vector.  Update all users.
3063         (find_label_symbols_in_block): Change `result' parameter to
3064         std::vector.  Update all callers.
3065         (find_label_symbols): Return std::vector.  Update all callers.
3066
3067 2018-08-29  Keith Seitz  <keiths@redhat.com>
3068
3069         * linespec.c (struct linespec) <function_symbols>: Change type to
3070         std::vector.  Update all users.
3071         (struct collect_info) <function_symbols>: Likewise.
3072         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3073         (std_compare_symbols): New function.
3074         (find_method, find_function_symbols, find_linespec_symbols)
3075         (find_label_symbols_in_block): Change `symbols' parameter to
3076         std::vector.  Update all callers.
3077         (find_label_symbols): Likewise for `function_symbols' and
3078         `label_funcs_ret'.
3079
3080 2018-08-29  Keith Seitz  <keiths@redhat.com>
3081
3082         * linespec.c (symtab_vector_up): Define.
3083         (struct linespec) <file_symtabs>: Change type to std::vector *.
3084         Update all uses.
3085         (struct collect_info) <file_symtabs>: Likewise.
3086         (collect_symtabs_from_filename): Return symtab_vector_up.
3087         Update all callers.
3088         (decode_objc): Remove cleanup.
3089         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3090         (symtab_collector::release_symtabs): Return symtab_vector_up.
3091         Update all callers.
3092         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3093         Update all users.
3094         (collect_symtabs_from_filename, symtabs_from_filename): Return
3095         symtab_vector_up.  Update all callers.
3096
3097 2018-08-29  Tom Tromey  <tom@tromey.com>
3098
3099         * csky-tdep.c (csky_analyze_prologue): Use
3100         core_addr_to_string_nz.
3101
3102 2018-08-29  Tom Tromey  <tom@tromey.com>
3103
3104         * windows-nat.c (struct xlate_exception) <them>: Change type to
3105         DWORD.
3106         (xlate): Fix formatting.  Remove last entry.
3107         (struct xlate_exception, xlate): Comment out.
3108         (windows_nat_target::resume): Use ranged for.
3109
3110 2018-08-29  Jim Wilson  <jimw@sifive.com>
3111
3112         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3113         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3114         of NT_PRFPREG.
3115         (riscv_linux_nat_target::store_registers): Likewise.
3116
3117 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3118
3119         PR gdb/23555
3120         PR gdb/23558
3121         * gnulib/aclocal.m4: Regenerate.
3122         * gnulib/config.in: Regenerate.
3123         * gnulib/configure: Regenerate.
3124         * gnulib/import/Makefile.am: Update.
3125         * gnulib/import/Makefile.in: Update.
3126         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3127         * gnulib/import/_Noreturn.h: ... this.
3128         * gnulib/import/alloca.in.h: Update.
3129         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3130         * gnulib/import/arg-nonnull.h: ... this.
3131         * gnulib/import/assure.h: Update.
3132         * gnulib/import/at-func.c: Update.
3133         * gnulib/import/basename-lgpl.c: Update.
3134         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3135         * gnulib/import/c++defs.h: ... this.
3136         * gnulib/import/canonicalize-lgpl.c: Update.
3137         * gnulib/import/cdefs.h: Update.
3138         * gnulib/import/chdir-long.c: Update.
3139         * gnulib/import/chdir-long.h: Update.
3140         * gnulib/import/cloexec.c: Update.
3141         * gnulib/import/cloexec.h: Update.
3142         * gnulib/import/close.c: Update.
3143         * gnulib/import/closedir.c: Update.
3144         * gnulib/import/config.charset: Update.
3145         * gnulib/import/dirent-private.h: Update.
3146         * gnulib/import/dirent.in.h: Update.
3147         * gnulib/import/dirfd.c: Update.
3148         * gnulib/import/dirname-lgpl.c: Update.
3149         * gnulib/import/dirname.h: Update.
3150         * gnulib/import/dosname.h: Update.
3151         * gnulib/import/dup-safer-flag.c: Update.
3152         * gnulib/import/dup-safer.c: Update.
3153         * gnulib/import/dup.c: Update.
3154         * gnulib/import/dup2.c: Update.
3155         * gnulib/import/errno.in.h: Update.
3156         * gnulib/import/error.c: Update.
3157         * gnulib/import/error.h: Update.
3158         * gnulib/import/exitfail.c: Update.
3159         * gnulib/import/exitfail.h: Update.
3160         * gnulib/import/extra/update-copyright: Update.
3161         * gnulib/import/fchdir.c: Update.
3162         * gnulib/import/fcntl.c: Update.
3163         * gnulib/import/fcntl.in.h: Update.
3164         * gnulib/import/fd-hook.c: Update.
3165         * gnulib/import/fd-hook.h: Update.
3166         * gnulib/import/fd-safer-flag.c: Update.
3167         * gnulib/import/fd-safer.c: Update.
3168         * gnulib/import/fdopendir.c: Update.
3169         * gnulib/import/filename.h: Update.
3170         * gnulib/import/filenamecat-lgpl.c: Update.
3171         * gnulib/import/filenamecat.h: Update.
3172         * gnulib/import/flexmember.h: Update.
3173         * gnulib/import/float+.h: Update.
3174         * gnulib/import/float.c: Update.
3175         * gnulib/import/float.in.h: Update.
3176         * gnulib/import/fnmatch.c: Update.
3177         * gnulib/import/fnmatch.in.h: Update.
3178         * gnulib/import/fnmatch_loop.c: Update.
3179         * gnulib/import/fpucw.h: Update.
3180         * gnulib/import/frexp.c: Update.
3181         * gnulib/import/frexpl.c: Update.
3182         * gnulib/import/fstat.c: Update.
3183         * gnulib/import/fstatat.c: Update.
3184         * gnulib/import/getcwd-lgpl.c: Update.
3185         * gnulib/import/getcwd.c: Update.
3186         * gnulib/import/getdtablesize.c: Update.
3187         * gnulib/import/getlogin_r.c: Update.
3188         * gnulib/import/getprogname.c: Update.
3189         * gnulib/import/getprogname.h: Update.
3190         * gnulib/import/gettext.h: Update.
3191         * gnulib/import/gettimeofday.c: Update.
3192         * gnulib/import/glob-libc.h: Update.
3193         * gnulib/import/glob.c: Update.
3194         * gnulib/import/glob.in.h: Update.
3195         * gnulib/import/glob_internal.h: Update.
3196         * gnulib/import/glob_pattern_p.c: Update.
3197         * gnulib/import/globfree.c: Update.
3198         * gnulib/import/hard-locale.c: Update.
3199         * gnulib/import/hard-locale.h: Update.
3200         * gnulib/import/intprops.h: Update.
3201         * gnulib/import/inttypes.in.h: Update.
3202         * gnulib/import/isnan.c: Update.
3203         * gnulib/import/isnand-nolibm.h: Update.
3204         * gnulib/import/isnand.c: Update.
3205         * gnulib/import/isnanl-nolibm.h: Update.
3206         * gnulib/import/isnanl.c: Update.
3207         * gnulib/import/itold.c: Update.
3208         * gnulib/import/libc-config.h: Update.
3209         * gnulib/import/limits.in.h: Update.
3210         * gnulib/import/localcharset.c: Update.
3211         * gnulib/import/localcharset.h: Update.
3212         * gnulib/import/localtime-buffer.c: Update.
3213         * gnulib/import/localtime-buffer.h: Update.
3214         * gnulib/import/lstat.c: Update.
3215         * gnulib/import/m4/00gnulib.m4: Update.
3216         * gnulib/import/m4/__inline.m4: Update.
3217         * gnulib/import/m4/absolute-header.m4: Update.
3218         * gnulib/import/m4/alloca.m4: Update.
3219         * gnulib/import/m4/builtin-expect.m4: Update.
3220         * gnulib/import/m4/canonicalize.m4: Update.
3221         * gnulib/import/m4/chdir-long.m4: Update.
3222         * gnulib/import/m4/close.m4: Update.
3223         * gnulib/import/m4/closedir.m4: Update.
3224         * gnulib/import/m4/configmake.m4: Update.
3225         * gnulib/import/m4/d-ino.m4: Update.
3226         * gnulib/import/m4/d-type.m4: Update.
3227         * gnulib/import/m4/dirent_h.m4: Update.
3228         * gnulib/import/m4/dirfd.m4: Update.
3229         * gnulib/import/m4/dirname.m4: Update.
3230         * gnulib/import/m4/double-slash-root.m4: Update.
3231         * gnulib/import/m4/dup.m4: Update.
3232         * gnulib/import/m4/dup2.m4: Update.
3233         * gnulib/import/m4/eealloc.m4: Update.
3234         * gnulib/import/m4/environ.m4: Update.
3235         * gnulib/import/m4/errno_h.m4: Update.
3236         * gnulib/import/m4/error.m4: Update.
3237         * gnulib/import/m4/exponentd.m4: Update.
3238         * gnulib/import/m4/exponentl.m4: Update.
3239         * gnulib/import/m4/extensions.m4: Update.
3240         * gnulib/import/m4/extern-inline.m4: Update.
3241         * gnulib/import/m4/fchdir.m4: Update.
3242         * gnulib/import/m4/fcntl-o.m4: Update.
3243         * gnulib/import/m4/fcntl.m4: Update.
3244         * gnulib/import/m4/fcntl_h.m4: Update.
3245         * gnulib/import/m4/fdopendir.m4: Update.
3246         * gnulib/import/m4/filenamecat.m4: Update.
3247         * gnulib/import/m4/flexmember.m4: Update.
3248         * gnulib/import/m4/float_h.m4: Update.
3249         * gnulib/import/m4/fnmatch.m4: Update.
3250         * gnulib/import/m4/fnmatch_h.m4: Update.
3251         * gnulib/import/m4/fpieee.m4: Update.
3252         * gnulib/import/m4/frexp.m4: Update.
3253         * gnulib/import/m4/frexpl.m4: Update.
3254         * gnulib/import/m4/fstat.m4: Update.
3255         * gnulib/import/m4/fstatat.m4: Update.
3256         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3257         * gnulib/import/m4/getcwd-path-max.m4: Update.
3258         * gnulib/import/m4/getcwd.m4: Update.
3259         * gnulib/import/m4/getdtablesize.m4: Update.
3260         * gnulib/import/m4/getlogin.m4: Update.
3261         * gnulib/import/m4/getlogin_r.m4: Update.
3262         * gnulib/import/m4/getpagesize.m4: Update.
3263         * gnulib/import/m4/getprogname.m4: Update.
3264         * gnulib/import/m4/gettimeofday.m4: Update.
3265         * gnulib/import/m4/glibc21.m4: Update.
3266         * gnulib/import/m4/glob.m4: Update.
3267         * gnulib/import/m4/glob_h.m4: Update.
3268         * gnulib/import/m4/gnulib-cache.m4: Update.
3269         * gnulib/import/m4/gnulib-common.m4: Update.
3270         * gnulib/import/m4/gnulib-comp.m4: Update.
3271         * gnulib/import/m4/gnulib-tool.m4: Update.
3272         * gnulib/import/m4/hard-locale.m4: Update.
3273         * gnulib/import/m4/include_next.m4: Update.
3274         * gnulib/import/m4/inttypes-pri.m4: Update.
3275         * gnulib/import/m4/inttypes.m4: Update.
3276         * gnulib/import/m4/isnand.m4: Update.
3277         * gnulib/import/m4/isnanl.m4: Update.
3278         * gnulib/import/m4/largefile.m4: Update.
3279         * gnulib/import/m4/limits-h.m4: Update.
3280         * gnulib/import/m4/localcharset.m4: Update.
3281         * gnulib/import/m4/locale-fr.m4: Update.
3282         * gnulib/import/m4/locale-ja.m4: Update.
3283         * gnulib/import/m4/locale-zh.m4: Update.
3284         * gnulib/import/m4/localtime-buffer.m4: Update.
3285         * gnulib/import/m4/longlong.m4: Update.
3286         * gnulib/import/m4/lstat.m4: Update.
3287         * gnulib/import/m4/malloc.m4: Update.
3288         * gnulib/import/m4/malloca.m4: Update.
3289         * gnulib/import/m4/math_h.m4: Update.
3290         * gnulib/import/m4/mbrtowc.m4: Update.
3291         * gnulib/import/m4/mbsinit.m4: Update.
3292         * gnulib/import/m4/mbsrtowcs.m4: Update.
3293         * gnulib/import/m4/mbstate_t.m4: Update.
3294         * gnulib/import/m4/memchr.m4: Update.
3295         * gnulib/import/m4/memmem.m4: Update.
3296         * gnulib/import/m4/mempcpy.m4: Update.
3297         * gnulib/import/m4/memrchr.m4: Update.
3298         * gnulib/import/m4/mkdir.m4: Update.
3299         * gnulib/import/m4/mkstemp.m4: Update.
3300         * gnulib/import/m4/mmap-anon.m4: Update.
3301         * gnulib/import/m4/mode_t.m4: Update.
3302         * gnulib/import/m4/msvc-inval.m4: Update.
3303         * gnulib/import/m4/msvc-nothrow.m4: Update.
3304         * gnulib/import/m4/multiarch.m4: Update.
3305         * gnulib/import/m4/nocrash.m4: Update.
3306         * gnulib/import/m4/off_t.m4: Update.
3307         * gnulib/import/m4/onceonly.m4: Update.
3308         * gnulib/import/m4/open-cloexec.m4: Update.
3309         * gnulib/import/m4/open.m4: Update.
3310         * gnulib/import/m4/openat.m4: Update.
3311         * gnulib/import/m4/opendir.m4: Update.
3312         * gnulib/import/m4/pathmax.m4: Update.
3313         * gnulib/import/m4/rawmemchr.m4: Update.
3314         * gnulib/import/m4/readdir.m4: Update.
3315         * gnulib/import/m4/readlink.m4: Update.
3316         * gnulib/import/m4/realloc.m4: Update.
3317         * gnulib/import/m4/rename.m4: Update.
3318         * gnulib/import/m4/rewinddir.m4: Update.
3319         * gnulib/import/m4/rmdir.m4: Update.
3320         * gnulib/import/m4/save-cwd.m4: Update.
3321         * gnulib/import/m4/secure_getenv.m4: Update.
3322         * gnulib/import/m4/setenv.m4: Update.
3323         * gnulib/import/m4/signal_h.m4: Update.
3324         * gnulib/import/m4/ssize_t.m4: Update.
3325         * gnulib/import/m4/stat-time.m4: Update.
3326         * gnulib/import/m4/stat.m4: Update.
3327         * gnulib/import/m4/std-gnu11.m4: Update.
3328         * gnulib/import/m4/stdbool.m4: Update.
3329         * gnulib/import/m4/stddef_h.m4: Update.
3330         * gnulib/import/m4/stdint.m4: Update.
3331         * gnulib/import/m4/stdio_h.m4: Update.
3332         * gnulib/import/m4/stdlib_h.m4: Update.
3333         * gnulib/import/m4/strchrnul.m4: Update.
3334         * gnulib/import/m4/strdup.m4: Update.
3335         * gnulib/import/m4/strerror.m4: Update.
3336         * gnulib/import/m4/string_h.m4: Update.
3337         * gnulib/import/m4/strstr.m4: Update.
3338         * gnulib/import/m4/strtok_r.m4: Update.
3339         * gnulib/import/m4/sys_socket_h.m4: Update.
3340         * gnulib/import/m4/sys_stat_h.m4: Update.
3341         * gnulib/import/m4/sys_time_h.m4: Update.
3342         * gnulib/import/m4/sys_types_h.m4: Update.
3343         * gnulib/import/m4/tempname.m4: Update.
3344         * gnulib/import/m4/time_h.m4: Update.
3345         * gnulib/import/m4/unistd-safer.m4: Update.
3346         * gnulib/import/m4/unistd_h.m4: Update.
3347         * gnulib/import/m4/warn-on-use.m4: Update.
3348         * gnulib/import/m4/wchar_h.m4: Update.
3349         * gnulib/import/m4/wchar_t.m4: Update.
3350         * gnulib/import/m4/wctype_h.m4: Update.
3351         * gnulib/import/m4/wint_t.m4: Update.
3352         * gnulib/import/malloc.c: Update.
3353         * gnulib/import/malloc/scratch_buffer.h: Update.
3354         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3355         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3356         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3357         * gnulib/import/malloca.c: Update.
3358         * gnulib/import/malloca.h: Update.
3359         * gnulib/import/malloca.valgrind: Update.
3360         * gnulib/import/math.in.h: Update.
3361         * gnulib/import/mbrtowc.c: Update.
3362         * gnulib/import/mbsinit.c: Update.
3363         * gnulib/import/mbsrtowcs-impl.h: Update.
3364         * gnulib/import/mbsrtowcs-state.c: Update.
3365         * gnulib/import/mbsrtowcs.c: Update.
3366         * gnulib/import/memchr.c: Update.
3367         * gnulib/import/memmem.c: Update.
3368         * gnulib/import/mempcpy.c: Update.
3369         * gnulib/import/memrchr.c: Update.
3370         * gnulib/import/mkdir.c: Update.
3371         * gnulib/import/mkstemp.c: Update.
3372         * gnulib/import/msvc-inval.c: Update.
3373         * gnulib/import/msvc-inval.h: Update.
3374         * gnulib/import/msvc-nothrow.c: Update.
3375         * gnulib/import/msvc-nothrow.h: Update.
3376         * gnulib/import/open.c: Update.
3377         * gnulib/import/openat-die.c: Update.
3378         * gnulib/import/openat-priv.h: Update.
3379         * gnulib/import/openat-proc.c: Update.
3380         * gnulib/import/openat.c: Update.
3381         * gnulib/import/openat.h: Update.
3382         * gnulib/import/opendir.c: Update.
3383         * gnulib/import/pathmax.h: Update.
3384         * gnulib/import/pipe-safer.c: Update.
3385         * gnulib/import/rawmemchr.c: Update.
3386         * gnulib/import/readdir.c: Update.
3387         * gnulib/import/readlink.c: Update.
3388         * gnulib/import/realloc.c: Update.
3389         * gnulib/import/ref-add.sin: Update.
3390         * gnulib/import/ref-del.sin: Update.
3391         * gnulib/import/rename.c: Update.
3392         * gnulib/import/rewinddir.c: Update.
3393         * gnulib/import/rmdir.c: Update.
3394         * gnulib/import/same-inode.h: Update.
3395         * gnulib/import/save-cwd.c: Update.
3396         * gnulib/import/save-cwd.h: Update.
3397         * gnulib/import/scratch_buffer.h: Update.
3398         * gnulib/import/secure_getenv.c: Update.
3399         * gnulib/import/setenv.c: Update.
3400         * gnulib/import/signal.in.h: Update.
3401         * gnulib/import/stat-time.c: Update.
3402         * gnulib/import/stat-time.h: Update.
3403         * gnulib/import/stat-w32.c: Update.
3404         * gnulib/import/stat-w32.h: Update.
3405         * gnulib/import/stat.c: Update.
3406         * gnulib/import/stdbool.in.h: Update.
3407         * gnulib/import/stddef.in.h: Update.
3408         * gnulib/import/stdint.in.h: Update.
3409         * gnulib/import/stdio.in.h: Update.
3410         * gnulib/import/stdlib.in.h: Update.
3411         * gnulib/import/str-two-way.h: Update.
3412         * gnulib/import/strchrnul.c: Update.
3413         * gnulib/import/strdup.c: Update.
3414         * gnulib/import/streq.h: Update.
3415         * gnulib/import/strerror-override.c: Update.
3416         * gnulib/import/strerror-override.h: Update.
3417         * gnulib/import/strerror.c: Update.
3418         * gnulib/import/string.in.h: Update.
3419         * gnulib/import/stripslash.c: Update.
3420         * gnulib/import/strnlen1.c: Update.
3421         * gnulib/import/strnlen1.h: Update.
3422         * gnulib/import/strstr.c: Update.
3423         * gnulib/import/strtok_r.c: Update.
3424         * gnulib/import/sys_stat.in.h: Update.
3425         * gnulib/import/sys_time.in.h: Update.
3426         * gnulib/import/sys_types.in.h: Update.
3427         * gnulib/import/tempname.c: Update.
3428         * gnulib/import/tempname.h: Update.
3429         * gnulib/import/time.in.h: Update.
3430         * gnulib/import/unistd--.h: Update.
3431         * gnulib/import/unistd-safer.h: Update.
3432         * gnulib/import/unistd.in.h: Update.
3433         * gnulib/import/unsetenv.c: Update.
3434         * gnulib/import/verify.h: Update.
3435         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3436         * gnulib/import/wchar.in.h: Update.
3437         * gnulib/import/wctype.in.h: Update.
3438         * gnulib/import/xalloc-oversized.h: Update.
3439         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3440         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3441
3442 2018-08-16  Gary Benson <gbenson@redhat.com>
3443
3444         PR gdb/13000:
3445         * gdb/main.c (captured_main_1): Exit with nonzero status
3446         in batch mode if the last command to be executed failed.
3447         * NEWS: Mention the above.
3448
3449 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3450
3451         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3452         end of warning message.
3453
3454 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3455
3456         PR gdb/22943:
3457         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3458         (aarch64_extract_return_value): Use
3459         aapcs_is_vfp_call_or_return_candidate.
3460         (aarch64_return_in_memory): Likewise.
3461         (aarch64_store_return_value): Likewise.
3462
3463 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3464
3465         * aarch64-tdep.c
3466         (aapcs_is_vfp_call_or_return_candidate): Make static
3467         (pass_in_v_or_stack): Remove function.
3468         (pass_in_v_vfp_candidate): New function.
3469         (aarch64_push_dummy_call): Check for float register candidates.
3470
3471 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3472
3473         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3474         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3475         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3476
3477 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3478
3479         PR build/23399
3480         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3481         (struct ipa_sym_addresses): Rename to...
3482         (struct ipa_sym_addresses_common): ... this.
3483         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3484
3485 2018-08-28  Tom Tromey  <tom@tromey.com>
3486
3487         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3488         (token_fifo): Now a std::vector.
3489         (yylex, c_parse): Update.
3490         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3491         (token_fifo): Now a std::vector.
3492         (yylex, d_parse): Update.
3493         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3494         (token_fifo): Now a std::vector.
3495         (yylex, go_parse): Update.
3496
3497 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3498
3499         * parser-defs.h (struct type_stack) <elements>: Change type to
3500         std::vector<union type_stack_elt>.
3501         <depth, size>: Remove.
3502         * parse.c (parse_exp_in_context_1): Adjust.
3503         (type_stack_reserve): Remove.
3504         (check_type_stack_depth): Remove.
3505         (insert_into_type_stack): Adjust to std::vector.
3506         (insert_type): Likewise.
3507         (push_type): Likewise.
3508         (push_type_int): Likewise.
3509         (insert_type_address_space): Likewise.
3510         (pop_type): Likewise.
3511         (pop_type_int): Likewise.
3512         (pop_typelist): Likewise.
3513         (pop_type_stack): Likewise.
3514         (append_type_stack): Likewise.
3515         (push_type_stack): Likewise.
3516         (get_type_stack): Likewise.
3517         (type_stack_cleanup): Likewise.
3518         (push_typelist): Likewise.
3519         (follow_types): Likewise.
3520         (_initialize_parse): Likewise.
3521
3522 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3523
3524         * NEWS: Mention csky target.
3525
3526 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3527             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3528             Don Breazeal  <donb@codesourcery.com>
3529
3530         * csky-linux-tdep.c: New file.
3531         * csky-tdep.c: Likewise.
3532         * csky-tdep.h: Likewise.
3533         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3534         csky-tdep.o.
3535         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3536         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3537         * configure.tgt: Add csky support.
3538
3539 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3540
3541         * python/py-framefilter.c (py_print_frame): Print frame architecture
3542         when printing on an MI output.
3543
3544 2018-08-27  Tom Tromey  <tom@tromey.com>
3545
3546         PR build/23087:
3547         * configure: Rebuild.
3548         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3549
3550 2018-08-27  Tom Tromey  <tom@tromey.com>
3551
3552         * aarch64-linux-tdep.c
3553         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3554         casts to int.
3555
3556 2018-08-27  Tom Tromey  <tom@tromey.com>
3557
3558         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3559         unsigned.
3560         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3561         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3562         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3563         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3564         unsigned.
3565
3566 2018-08-27  Tom Tromey  <tom@tromey.com>
3567
3568         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3569         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3570
3571 2018-08-27  Tom Tromey  <tom@tromey.com>
3572
3573         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3574         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3575         ULONGEST_MAX.
3576         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3577         ULONGEST_MAX.
3578         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3579         ULONGEST_MAX.
3580         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3581         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3582         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3583         ULONGEST_MAX.
3584         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3585         (ppc64_linux_sigaction_tramp_frame)
3586         (ppc32_linux_sighandler_tramp_frame)
3587         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3588         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3589         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3590         * mn10300-linux-tdep.c (am33_linux_sigframe)
3591         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3592         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3593         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3594         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3595         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3596         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3597         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3598         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3599         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3600         * microblaze-linux-tdep.c
3601         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3602         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3603         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3604         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3605         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3606         * common/common-types.h (ULONGEST_MAX): New define.
3607         (CORE_ADDR_MAX): Fix formatting.
3608         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3609         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3610         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3611         (arm_linux_rt_sigreturn_tramp_frame)
3612         (arm_eabi_linux_sigreturn_tramp_frame)
3613         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3614         (thumb2_eabi_linux_sigreturn_tramp_frame)
3615         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3616         (arm_linux_restart_syscall_tramp_frame)
3617         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3618         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3619         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3620         ULONGEST_MAX.
3621         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3622
3623 2018-08-27  Tom Tromey  <tom@tromey.com>
3624
3625         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3626         CORE_ADDR_MAX.
3627         * mips-tdep.c (mips_deal_with_atomic_sequence)
3628         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3629         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3630         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3631         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3632         CORE_ADDR_MAX.
3633         * aarch64-tdep.c (aarch64_software_single_step): Use
3634         CORE_ADDR_MAX.
3635
3636 2018-08-27  Tom Tromey  <tom@tromey.com>
3637
3638         * linespec.c (complete_linespec_component): Add cast to "char".
3639         * completer.c (completion_tracker::build_completion_result): Add
3640         cast to "char".
3641
3642 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3643
3644         * solist.h (struct solist, struct target_so_ops): Fix
3645         indentation.
3646
3647 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3648
3649         * ada-tasks.c (ada_task_info_s): Remove typedef.
3650         (DEF_VEC_O(ada_task_info_s)): Remove.
3651         (struct ada_tasks_inferior_data): Initialize fields.
3652         <task_list>: Make an std::vector.
3653         (get_ada_tasks_inferior_data): Allocate with new.
3654         (ada_get_task_number): Adjust.
3655         (get_task_number_from_id): Likewise.
3656         (valid_task_id): Likewise.
3657         (ada_get_task_info_from_ptid): Likewise.
3658         (iterate_over_live_ada_tasks): Likewise.
3659         (add_ada_task): Likewise.
3660         (read_known_tasks): Likewise.
3661         (ada_build_task_list): Likewise.
3662         (print_ada_task_info): Likewise.
3663         (info_task): Likewise.
3664         (task_command_1): Likewise.
3665
3666 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3667
3668         * ada-lang.c (add_angle_brackets): Return std::string.
3669
3670 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3671
3672         * python/py-threadevent.c (py_get_event_thread): Initialize
3673         pythread.
3674
3675 2018-08-24  Pedro Alves  <palves@redhat.com>
3676
3677         * python/py-bpevent.c (create_breakpoint_event_object): Use
3678         copy-initialization.
3679         * python/py-continueevent.c (emit_continue_event): Use
3680         copy-initialization.
3681         * python/py-exitedevent.c (create_exited_event_object): Return a
3682         gdbpy_ref<>.
3683         (emit_exited_event): Use copy-initialization.
3684         * python/py-inferior.c (python_new_inferior)
3685         (python_inferior_deleted, add_thread_object): Use
3686         copy-initialization.
3687         * python/py-infevents.c (create_inferior_call_event_object)
3688         (create_register_changed_event_object)
3689         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3690         (emit_inferior_call_event, emit_memory_changed_event)
3691         (emit_register_changed_event): Use copy-initialization.
3692         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3693         Return a gdbpy_ref<>.
3694         (emit_new_objfile_event): Use copy-initialization.
3695         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3696         (emit_clear_objfiles_event): Use copy-initialization.
3697         * python/py-signalevent.c (create_signal_event_object): Use
3698         copy-initialization.
3699         * python/py-threadevent.c (create_thread_event_object): Use
3700         copy-initialization.
3701
3702 2018-08-24  Pedro Alves  <palves@redhat.com>
3703             Simon Marchi  <simon.marchi@ericsson.com>
3704
3705         PR gdb/23379
3706         * python/py-continueevent.c: Include "gdbthread.h".
3707         (create_continue_event_object): Add intro comment.  Add 'ptid'
3708         parameter.  Use it to find thread to pass to
3709         create_thread_event_object.
3710         (emit_continue_event): Pass PTID down to
3711         create_continue_event_object.
3712         * python/py-event.h (py_get_event_thread): Declare.
3713         (create_thread_event_object): Remove default from 'thread'
3714         parameter.
3715         * python/py-stopevent.c (create_stop_event_object): Use
3716         py_get_event_thread.
3717         * python/py-threadevent.c (get_event_thread): Rename to ...
3718         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3719         and use it to find the thread.
3720         (create_thread_event_object): Assert that THREAD isn't null.
3721         Don't find the event thread here.
3722
3723 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3724
3725         * block.h (blockrange, blockranges): New struct declarations.
3726         (struct block): Add new field named `ranges'.
3727         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3728         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3729         macros for accessing ranges in struct block.
3730         (make_blockranges): New declaration.
3731         block.c (make_blockranges): New function.
3732         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3733         for block.
3734         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3735         * blockframe.c (cache_pc_function_block): New static global.
3736         (clear_pc_function_cache): Clear cache_pc_function_block.
3737         (find_pc_partial_function): Move comment to symtab.h.  Add
3738         support for non-contiguous blocks.
3739         * cli/cli-cmds.c (block.h): Include.
3740         (print_disassembly): Handle printing of non-contiguous blocks.
3741         (disassemble_current_function): Likewise.
3742         (disassemble_command): Likewise.
3743
3744         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3745         BLOCK_START.
3746         * blockframe.c (get_pc_function_start): Likewise.
3747         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3748         (gcc_symbol_address): Likewise.
3749         * compile/compile-object-run.c (compile_object_run): Likewise.
3750         * compile/compile.c (get_expr_block_and_pc): Likewise.
3751         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3752         (func_addr_to_tail_call_list): Likewise.
3753         * findvar.c (default_read_var_value): Likewise.
3754         * inline-frame.c (inline_frame_this_id): Likewise.
3755         (skip-inline_frames): Likewise.
3756         * infcmd.c (until_next_command): Likewise.
3757         * linespec.c (convert_linespec_to_sals): Likewise.
3758         * parse.c (parse_exp_in_context_1): Likewise.
3759         * printcmd.c (build_address_symbolic): likewise.
3760         (info_address_command): Likewise.
3761         symtab.c (find_function_start_sal): Likewise.
3762         (skip_prologue_sal): Likewise.
3763         (find_function_alias_target): Likewise.
3764         (find_gnu_ifunc): Likewise.
3765         * stack.c (find_frame_funname): Likewise.
3766         * symtab.c (fixup_symbol_section): Likewise.
3767         (find_function_start_sal): Likewise.
3768         (skip_prologue_sal): Likewsie.
3769         (find_function_alias_target): Likewise.
3770         (find_gnu_ifunc): Likewise.
3771         * tracepoint.c (info_scope_command): Likewise.
3772         * value.c (value_fn_field): Likewise.
3773
3774         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3775         in place of find_pc_partial_function.
3776         * blockframe.c (find_function_entry_range_from_pc): New function.
3777         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3778         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3779         for each range in a block.
3780
3781
3782 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3783
3784         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3785         incrementation.
3786
3787 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3788
3789         * solib-svr4.c (read_program_headers_from_bfd): Return
3790         gdb::optional<gdb::byte_vector>.
3791         (svr4_exec_displacement): Adjust.
3792
3793 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3794
3795         * solib-svr4.c (read_program_header): Return
3796         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3797         (find_program_interpreter): Return
3798         gdb::optional<gdb::byte_vector>.
3799         (scan_dyntag_auxv): Adjust.
3800         (enable_break): Adjust.
3801         (svr4_exec_displacement): Adjust.
3802
3803 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3804
3805         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3806         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3807
3808 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3809
3810         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3811         string_vprintf.
3812         * guile/scm-utils.c (gdbscm_printf): Likewise.
3813         * serial.c (serial_printf): Likewise.
3814         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3815
3816 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3817
3818         * stack.c (print_frame): Print frame architecture when printing on
3819         an MI output.
3820         * NEWS: Mention new "arch" attribute in frame output.
3821
3822 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3823
3824         * arch/aarch64.h (aarch64_regnum): Update comment.
3825
3826 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3827
3828         * NEWS: Add SVE to 8.2 section.
3829
3830 2018-08-21  Pedro Alves  <palves@redhat.com>
3831
3832         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3833         out from gdbscm_parse_function_args.
3834         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3835         gdbscm_parse_function_args_1.
3836
3837 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3838
3839         PR gdb/17816
3840         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3841         operator.
3842
3843 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3844
3845         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3846
3847 2018-08-19  Michael Spang  <spang@google.com>
3848
3849         PR gdb/11786
3850         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3851         for PT_TLS segments.
3852
3853 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3854
3855         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3856         dwarf_variable_value.
3857         * dwarf2-frame.c (class dwarf_expr_executor):
3858         Add override for dwarf_variable_value.
3859         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3860         (class symbol_needs_eval_context): Likewise.
3861         (indirect_synthetic_pointer): Add forward declaration.
3862         (sect_variable_value): New function.
3863         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3864         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3865         for DW_OP_GNU_variable_value.
3866
3867 2018-08-16  Tom Tromey  <tom@tromey.com>
3868
3869         * top.c (read_command_file): Update.
3870         (command_line_input): Remove "repeat" argument.
3871         * ada-lang.c (get_selections): Update.
3872         * linespec.c (decode_line_2): Update.
3873         * defs.h (command_line_input): Remove argument.
3874         * cli/cli-script.c (read_next_line): Update.
3875         * python/py-gdb-readline.c: Update.
3876
3877 2018-08-17  Tom Tromey  <tom@tromey.com>
3878
3879         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3880         command_line_input.
3881
3882 2018-08-15  Tom Tromey  <tom@tromey.com>
3883
3884         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3885
3886 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3887
3888         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3889         If used, use find_pc_partial_function to find address range
3890         to disassemble.
3891         * mi/mi-main.c (mi_cmd_list_features): Report
3892         "data-disassemble-a-option" feature.
3893         * NEWS: Mention new -data-disassemble option -a.
3894
3895 2018-08-13  Tom Tromey  <tom@tromey.com>
3896
3897         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3898
3899 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3900
3901         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3902         (aarch64_linux_collect_sve_regset): Likewise.
3903         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3904         * regcache.h (regcache_map_entry_size): New function.
3905
3906 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3907
3908         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3909         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3910         (SVE_HEADER_VL_LENGTH): Likewise.
3911         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3912         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3913         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3914         (SVE_HEADER_SIZE_OFFSET): Likewise.
3915         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3916         (SVE_HEADER_VL_OFFSET): Likewise.
3917         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3918         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3919         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3920         (SVE_HEADER_SIZE): Likewise.
3921         (aarch64_linux_core_read_vq): Add function.
3922         (aarch64_linux_core_read_description): Check for SVE section.
3923
3924 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3925
3926         * aarch64-fbsd-tdep.c
3927         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3928         collect_size.
3929         * aarch64-linux-tdep.c
3930         (aarch64_linux_iterate_over_regset_sections): Likewise.
3931         * alpha-linux-tdep.c
3932         (alpha_linux_iterate_over_regset_sections):
3933         * alpha-nbsd-tdep.c
3934         (alphanbsd_iterate_over_regset_sections): Likewise.
3935         * amd64-fbsd-tdep.c
3936         (amd64fbsd_iterate_over_regset_sections): Likewise.
3937         * amd64-linux-tdep.c
3938         (amd64_linux_iterate_over_regset_sections): Likewise.
3939         * arm-bsd-tdep.c
3940         (armbsd_iterate_over_regset_sections): Likewise.
3941         * arm-fbsd-tdep.c
3942         (arm_fbsd_iterate_over_regset_sections): Likewise.
3943         * arm-linux-tdep.c
3944         (arm_linux_iterate_over_regset_sections): Likewise.
3945         * corelow.c (get_core_registers_cb): Likewise.
3946         (core_target::fetch_registers): Likewise.
3947         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3948         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3949         * gdbarch.h (void): Regenerate.
3950         * gdbarch.sh: Add supply_size and collect_size.
3951         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3952         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3953         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3954         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3955         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3956         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3957         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3958         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3959         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3960         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3961         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3962         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3963         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3964         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3965         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3966         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3967         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3968         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3969         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3970         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3971         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3972         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3973         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3974         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3975         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3976         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3977         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3978         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3979         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3980         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3981
3982 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3983
3984         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3985         with string_printf.
3986
3987 2018-08-10  Keith Seitz  <keiths@redhat.com>
3988
3989         * compile/compile-c-support.c (add_code_header, add_code_footer):
3990         Move into policy class.
3991         (c_push_user_expression, pop_user_expression_nop)
3992         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3993         (compile_program): New host class.
3994         (c_compile_program): New typedef.
3995         (c_compute_porgram): Use c_compile_program.
3996
3997 2018-08-10  Keith Seitz  <keiths@redhat.com>
3998
3999         * compile/compile-internal.h (compile_instance::~compile_instance):
4000         Remove calls to htab_delete.
4001         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
4002         * compile.c (compile_instance::compile_instance): Initialize
4003         htab unique pointers.
4004         (compile_instance::get_cached_type, compile_instance::insert_type)
4005         (compile_instance::error_symbol_once): Update for unique_ptr.
4006
4007 2018-08-10  Keith Seitz  <keiths@redhat.com>
4008
4009         * compile/compile-c-symbols.c (struct symbol_error)
4010         (hash_symbol_error, eq_symbol_error, del_symbol_error)
4011         (compile_instance::insert_symbol_error)
4012         (compile_instance::error_symbol_once): Move to ...
4013         * compile/compile.c: ... here.
4014
4015 2018-08-10  Keith Seitz  <keiths@redhat.com>
4016
4017         * compile/compile-c-support.c (c_get_compile_context): Use `new'
4018         instead of `new_compile_instance'.
4019         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4020         Update description.
4021         If the symbol error map is not initialized, create it.
4022         (generate_c_for_for_one_symbol): Do not check/initialize
4023         the symbol error map.
4024         * compile/compile-c-types.c (compile_c_instance): Make a class.
4025         Update all callers.
4026         (compile_instance::compile_instance): Initialize the type cache.
4027         (get_cached_type): New function.
4028         (insert_type): Update description.
4029         (compile_c_instance::m_default_cflags): Define.
4030         (convert_type): Update description.  Use get_cached_type.
4031         (delete_instance): Moved to destructor.
4032         (new_compile_instance): Moved to constructor.
4033         * compile/compile-c.h (compile_c_instance): Make class inheriting
4034         from compile_instance.
4035         <base>: Remove field.
4036         <type_map, symbol_err_map>: Move to base class.
4037         <c_plugin>: Rename to `m_plugin' and remove pointer type.
4038         * compile/compile-internal.h (compile_instance): Make class.
4039         <type_map_t, symbol_err_map_t>: Define.
4040         <fe>: Rename to `m_gcc_fe'.
4041         <scope, block, gcc_target_options>: Add `m_' prefix.
4042         <m_type_map, m_symbol_err_map>: New fields, moved from
4043         compile_c_instance.
4044         <destroy>: Remove.
4045         (convert_type, new_compile_instance): Remove.
4046         * compile/compile.c (cleanup_compile_instance): Remove.
4047         (compile_to_object): Use unique_ptr to eliminate cleanups.
4048         (compile_instance::set_print_callback, compile_instance::version)
4049         (compile_instance::set_verbose)
4050         (compile_instance::set_driver_filename)
4051         (compile_instance::set_triplet_regexp)
4052         (compile_instance::set_arguments)
4053         (compile_instance::set_source_file)
4054         (compile_instance::compile): Define.
4055
4056 2018-08-10  Keith Seitz  <keiths@redhat.com>
4057
4058         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4059         * compile/compile-c-types.c: Define GCC_METHODN macros and include
4060         gcc-c-fe.def to define C plugin.
4061         (delete_instance): Delete `c_plugin'.
4062         (new_compile_instance): Initialize `c_plugin'.
4063         * compile/compile-c.h: Include gcc_c_plugin.h.
4064         (struct compile_c_instance) <c_plugin>: New member.
4065         * gcc-c-plugin.h: New file.
4066         Update all callers with API change.
4067
4068 2018-08-10  Keith Seitz  <keiths@redhat.com>
4069
4070         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4071         (HFILES_NO_SRCDIR): ... to here.
4072         Add compile-internal.h and compile-c.h.
4073         * compile/compile-c-support.c: Include compile-c.h.
4074         * compile/compile-c-symbols.c: Include compile-c.h.
4075         (generate_c_for_variable_locations): Update comment.
4076         * compile/compile-c-types.c: Include compile-c.h.
4077         * compile/compile-c.h: New file -- moved C language declarations
4078         from other files here.
4079         * compile/compile-internal.h: Do not include hashtab.h or
4080         common/enum-flags.h.
4081         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4082         (gcc_convert_symbol, gcc_symbol_address)
4083         (generate_c_for_variable_locations, c_get_mode_for_size)
4084         (c_get_range_decl_name): Definitions moved to compile-c.h.
4085         * compile/compile-loc2c.c: Include compile-c.h.
4086
4087 2018-08-10  Keith Seitz  <keiths@redhat.com>
4088
4089         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4090         (c_symbol_substitution_name): ... this.
4091         Update all callers.
4092
4093 2018-08-10  Keith Seitz  <keiths@redhat.com>
4094
4095         * compile/compile-c-support.c (c_compute_program): Use
4096         unique_xmalloc_ptr to eliminate cleanup.
4097         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4098         Return a unique_xmalloc_ptr and eliminate cleanup.
4099         * compile/compile-internal.h (generate_c_for_variable_locations):
4100         Return unique_xmalloc_ptr and update description.
4101
4102 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
4103
4104         * corelow.c (core_target::get_core_register_section): Rename
4105         min_size to section_min_size.
4106
4107 2018-08-09  Jim Wilson  <jimw@sifive.com>
4108
4109         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4110         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4111         * NEWS: Mention new GNU/Linux RISC-V target.
4112         * configure.host: Add riscv*-*-linux*.
4113         * configure.nat: Add riscv*.
4114         * configure.tgt: Add riscv*-*-linux*.
4115         * riscv-linux-nat.c: New file.
4116         * riscv-linux-tdep.c: New file.
4117
4118 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4119
4120         * infrun.c (resume): Make static, add forward declaration.
4121         (proceed): Update header comment.
4122         * infrun.h (resume): Delete declaration.
4123
4124 2018-08-09  Tom Tromey  <tom@tromey.com>
4125
4126         * riscv-tdep.h: Minor formatting fixes.
4127
4128 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
4129
4130         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4131         * dwarf-index-cache.c (create_dir_and_check): Likewise.
4132         (test_mkdir_recursive): Likewise.
4133         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4134
4135 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4136
4137         * valarith.c (value_subscripted_rvalue): If an array is not in
4138         memory, and we don't know the upper bound, then we can't know that
4139         the requested element exists or not.
4140
4141 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
4142
4143         * target.c (str_comma_list_concat_elem): Fix typo in comment.
4144         (target_options_to_string): Add comment.
4145
4146 2018-08-08  Tom Tromey  <tom@tromey.com>
4147
4148         * unittests/scoped_mmap-selftests.c: Check result of "write".
4149
4150 2018-08-08  Jim Wilson  <jimw@sifive.com>
4151
4152         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4153         (decode_register_index_short): New.
4154         (decode_j_type_insn, decode_cj_type_insn): New.
4155         (decode_b_type_insn, decode_cb_type_insn): New.
4156         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
4157         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4158         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4159         is_c_sw_insn instead of is_sw_insn.
4160         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4161         (riscv_software_single_step): New.
4162         * riscv-tdep.h (riscv_software_single_step): Declare.
4163
4164         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4165         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4166
4167 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4168
4169         PR gdb/18050:
4170         * target.c (dispose_inferior): Don't dispose of inferiors that are
4171         already killed.
4172
4173 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4174
4175         * remote.c (remote_target::download_tracepoint): Change char* to
4176         const char*.
4177
4178 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4179
4180         * target.h (target_options_to_string): Return an std::string.
4181         * target.c (str_comma_list_concat_elem): Return void, use
4182         std::string.
4183         (do_option): Likewise.
4184         (target_options_to_string): Return an std::string.
4185         * linux-nat.c (linux_nat_target::wait): Adjust.
4186         * target-debug.h (target_debug_print_options): Adjust.
4187
4188 2018-08-07  Tom Tromey  <tom@tromey.com>
4189
4190         * Makefile.in (CPPFLAGS): New variable.
4191         (INTERNAL_CPPFLAGS): Use it.
4192
4193 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4194
4195         * NEWS: Mention the index cache.
4196
4197 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4198
4199         * common/pathstuff.h (get_standard_cache_dir): New.
4200         * common/pathstuff.c (get_standard_cache_dir): New.
4201         * build-id.h (build_id_to_string): New.
4202         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4203         DEBUG_STR_SUFFIX): Move to here.
4204         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4205         DEBUG_STR_SUFFIX): Move from there.
4206         (write_psymtabs_to_index): Make non-static, add basename
4207         parameter.  Write to temporary files, rename when done.
4208         (save_gdb_index_command): Adjust call to
4209         write_psymtabs_to_index.
4210         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4211         field.
4212         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4213         (get_gdb_index_contents_from_cache): New.
4214         (get_gdb_index_contents_from_cache_dwz): New.
4215         (dwarf2_initialize_objfile): Read index from cache.
4216         (dwarf2_build_psymtabs): Save to index.
4217         * dwarf-index-cache.h: New file.
4218         * dwarf-index-cache.c: New file.
4219         * dwarf-index-write.h: New file.
4220
4221 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4222
4223         * gnulib/aclocal.m4: Re-generate.
4224         * gnulib/config.in: Re-generate.
4225         * gnulib/configure: Re-generate.
4226         * gnulib/import/Makefile.am: Re-generate.
4227         * gnulib/import/Makefile.in: Re-generate.
4228         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4229         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4230         * gnulib/import/m4/mkdir.m4: New file.
4231         * gnulib/import/mkdir.c: New file.
4232         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4233         module.
4234
4235 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4236
4237         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4238         * common/scoped_mmap.c: New file.
4239         * common/scoped_mmap.h (destroy): New method.
4240         (~scoped_mmap, reset): Use destroy.
4241         (scoped_mmap): New move constructor.
4242         (mmap_file): New declaration.
4243         * unittests/scoped_mmap-selftests.c (test_normal,
4244         test_invalid_filename, run_tests): New functions.
4245         (_initialize_scoped_mmap_selftests): Register selftest.
4246
4247 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4248
4249         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4250         (read_gdb_index_from_buffer): ... this.  Remove section
4251         parameter, add buffer parameter.
4252         (get_gdb_index_contents_ftype,
4253         get_gdb_index_contents_dwz_ftype): New typedefs.
4254         (dwarf2_read_gdb_index): Add callback parameters to get the
4255         index contents.
4256         (get_gdb_index_contents_from_section): New.
4257         (dwarf2_initialize_objfile): Update call to
4258         dwarf2_read_gdb_index.
4259
4260 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4261
4262         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4263         (gdb_open_cloexec): Likewise.
4264         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4265         (commandline_from_pid): Likewise.
4266         (linux_xfer_osdata_threads): Likewise.
4267         (linux_xfer_osdata_fds): Likewise.
4268         * ada-lang.c (is_package_name): Likewise.
4269         * auxv.c (procfs_xfer_auxv): Likewise.
4270         * breakpoint.c (print_one_breakpoint_location): Use
4271         uiout::field_fmt.
4272         (print_one_catch_solib): Use string_printf.
4273         * coff-pe-read.c (add_pe_exported_sym): Likewise.
4274         (add_pe_forwarded_sym): Likewise.
4275         * dwarf2read.c (create_type_unit_group): Likewise.
4276         (build_error_marker_type): Likewise.
4277         * infcall.c (get_function_name): Likewise.
4278         * valprint.c (print_converted_chars_to_obstack): Likewise.
4279         * xtensa-tdep.c (xtensa_register_type): Likewise.
4280
4281 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
4282
4283         * remote.c (remote_target::download_tracepoint): Fix format
4284         string errors.
4285
4286 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4287
4288         * tracefile.c: Include common/byte-vector.h.
4289         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
4290         with trace_regblock_size if needed.  Update uses of buf.
4291
4292 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4293
4294         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4295         std::vector<unsigned char>.
4296         * tracepoint.c (collection_list::collection_list): Remove
4297         m_regs_mask initializer from initializer list.  Resize
4298         m_regs_mask using the largest remote register number.
4299         (collection_list::add_remote_register): Remove size check on
4300         m_regs_mask.  Use at to access element.
4301         (collection_list::stringify): Change type of temp_buf to
4302         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4303         stringify the register mask.  Use pack_hex_byte for the register
4304         mask.
4305
4306 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4307
4308         * tracepoint.h (class collection_list) <add_register>: Remove.
4309         <add_remote_register, add_ax_registers, add_local_register>:
4310         Declare.
4311         <add_memrange>: Add scope parameter.
4312         * tracepoint.c (encode_actions_1): Likewise.
4313         (collection_list::add_register): Rename to ...
4314         (collection_list::add_remote_register): ... this.  Update
4315         comment.
4316         (collection_list::add_ax_registers, add_local_register): New
4317         methods.
4318         (collection_list::add_memrange): Add scope parameter.  Call
4319         add_local_register instead of add_register.
4320         (finalize_tracepoint_aexpr): New function.
4321         (collection_list::collect_symbol): Update calls to add_memrange.
4322         Call add_local_register instead of add_register.  Call
4323         add_ax_registers.  Call finalize_tracepoint_aexpr.
4324         (encode_actions_1): Get remote regnos for $reg action.  Call
4325         add_remote_register, add_ax_registers, and add_local_register.
4326         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4327         (validate_actionline): Call finalize_tracepoint_aexpr.
4328
4329 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4330
4331         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4332         Replace array buf with gdb::char_vector buf, of size
4333         get_remote_packet_size ().  Replace references to buf and
4334         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4335         and xsnprintf with snprintf.  Raise errors if the buffer is too
4336         small.
4337
4338 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4339
4340         * remote.c (remote_target::download_tracepoint): Fix the has_more
4341         predicate in the QTDP action list iteration.
4342
4343 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4344
4345         * remote.c (remote_target::download_tracepoint): Fix indentation
4346         in for block.
4347
4348 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4349
4350         * proc-api.c (_initialize_proc_api): Remove c, unused.
4351         * procfs.c (procfs_init_inferior): Remove signals, unused.
4352         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4353         unused.
4354
4355 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4356             Andrew Burgess  <andrew.burgess@embecosm.com>
4357
4358         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4359         'W_STOPCODE (0)' as this could be ambiguous.
4360
4361 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4362
4363         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4364         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4365         "ai_socktype").
4366
4367 2018-08-02  Tom Tromey  <tom@tromey.com>
4368
4369         PR symtab/16842.
4370         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4371         symbols.
4372         (process_structure_scope): Likewise.
4373
4374 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4375
4376         PR gdb/22629:
4377         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4378         kill inferior.
4379
4380 2018-08-02  Tom Tromey  <tom@tromey.com>
4381
4382         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4383         (darwin_suspend_inferior, darwin_resume_inferior)
4384         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4385         (darwin_check_new_threads): Check result of get_darwin_inferior.
4386
4387 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4388
4389         GDB 8.1.1 released.
4390
4391 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4392
4393         * varobj.c (varobj_get_path_expr_parent): Report an error if
4394         parent is a dynamic varobj.
4395
4396 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4397
4398         * gnulib/aclocal.m4: Re-generate.
4399         * gnulib/config.in: Re-generate.
4400         * gnulib/configure: Re-generate.
4401         * gnulib/import/Makefile.in: Re-generate.
4402         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4403         * gnulib/import/m4/onceonly.m4: Re-generate.
4404
4405 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4406
4407         * target-descriptions.c (struct xml_test_tdesc): New.
4408         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4409         (record_xml_tdesc): Update.
4410         (maintenance_check_xml_descriptions): Update.
4411         * target-descriptions.h (record_xml_tdesc): Update comment.
4412
4413 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4414
4415         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4416         checking array bounds are defined.
4417
4418 2018-07-30  Tom Tromey  <tom@tromey.com>
4419
4420         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4421         irreflexivity violation.
4422
4423 2018-07-30  Tom Tromey  <tom@tromey.com>
4424
4425         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4426         * value.c (unpack_long): Remove lint code.
4427         * valops.c (value_ind): Remove lint code.
4428         * valarith.c (value_x_binop, value_x_unop, value_equal)
4429         (value_pos): Remove lint code.
4430
4431 2018-07-28  Tom de Vries  <tdevries@suse.de>
4432
4433         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4434         with undefined upper bound as <optimized out>.
4435
4436 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4437
4438         * gcore.in: Rename variable "name" to "prefix".  Expand
4439         "usage" text.
4440
4441 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4442
4443         * windows-nat.c (windows_nat_target::create_inferior): Update to
4444         call close() in global namespace.
4445
4446 2018-07-26  Tom Tromey  <tom@tromey.com>
4447
4448         * dwarf-index-write.c (add_address_entry): Don't add objfile
4449         offsets.
4450         * dbxread.c (find_stab_function): Rename from
4451         find_stab_function_addr.  Return a bound_minimal_symbol.
4452         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4453         Don't add objfile offsets.
4454         (end_psymtab): Use raw_text_low, raw_text_high,
4455         MSYMBOL_VALUE_RAW_ADDRESS.
4456         (read_ofile_symtab): Update.
4457         (process_one_symbol): Update.
4458         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4459         offsets.
4460         (dw2_relocate): Remove.
4461         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4462         searching addrmap.
4463         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4464         Update.
4465         (process_psymtab_comp_unit_reader, add_partial_symbol)
4466         (add_partial_subprogram, dwarf2_ranges_read): Update.
4467         (load_partial_dies): Update.
4468         (add_address_entry): Don't add objfile offsets.
4469         (dwarf2_build_include_psymtabs): Update.
4470         (create_addrmap_from_aranges): Don't add objfile offsets.
4471         (dw2_find_pc_sect_compunit_symtab): Update.
4472         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4473         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4474         Update.
4475         (parse_partial_symbols): Don't add objfile offsets.  Use
4476         raw_text_low, raw_text_high.  Update.
4477         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4478         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4479         or call 'relocate' quick function.  Clear psymbol_map.
4480         * psympriv.h (struct partial_symbol) <address>: Add section
4481         offset.
4482         <set_unrelocated_address>: Rename from set_address.
4483         <raw_text_low, raw_text_high>: New methods.
4484         <text_low, text_high>: Add objfile parameter.
4485         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4486         set_unrelocated_address.
4487         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4488         (find_pc_psymbol): Update.
4489         (fixup_psymbol_section, relocate_psymtabs): Remove.
4490         (dump_psymtab, psym_functions): Update.
4491         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4492         parameter.
4493         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4494         (start_psymtab_common): Update.
4495         * symfile-debug.c (debug_qf_relocate): Remove.
4496         (debug_sym_quick_functions): Update.
4497         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4498         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4499         Update.
4500
4501 2018-07-26  Tom Tromey  <tromey@redhat.com>
4502
4503         * dbxread.c (end_psymtab): Use text_high_valid and
4504         text_low_valid.
4505         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4506         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4507         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4508         Update comment.
4509         <text_low_valid, text_high_valid>: New fields.
4510         <set_text_low, set_text_high>: Update.
4511         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4512
4513 2018-07-26  Tom Tromey  <tom@tromey.com>
4514
4515         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4516         Update.
4517         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4518         textlow and texthigh fields.
4519         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4520         Update.
4521         * mdebugread.c (parse_lines, parse_partial_symbols)
4522         (psymtab_to_symtab_1): Update.
4523         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4524         Rename fields.  Update comment.  Now private.
4525         <text_low, text_high, set_text_low, set_text_high>: New methods.
4526         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4527         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4528         (start_psymtab_common, maintenance_info_psymtabs)
4529         (maintenance_check_psymtabs): Update.
4530         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4531         texthigh fields.
4532         (scan_xcoff_symtab): Update.
4533
4534 2018-07-26  Tom Tromey  <tromey@redhat.com>
4535
4536         * psympriv.h (struct partial_symbol) <unrelocated_address,
4537         address, set_address>: New methods.
4538         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4539         (fixup_psymbol_section, relocate_psymtabs): Update.
4540         (print_partial_symbols): Add 'objfile' parameter.  Update.
4541         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4542         Update.
4543
4544 2018-07-26  Tom Tromey  <tom@tromey.com>
4545
4546         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4547         (debug_names::write_psymbols): Update.
4548         * psympriv.h (struct partial_symbol): Derive from
4549         general_symbol_info.
4550         <obj_section>: New method.
4551         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4552         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4553         (find_pc_sect_psymbol, fixup_psymbol_section)
4554         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4555         (print_partial_symbols, recursively_search_psymtabs)
4556         (compare_psymbols, psymbol_hash, psymbol_compare)
4557         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4558         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4559
4560 2018-07-26  Tom Tromey  <tromey@redhat.com>
4561
4562         * dbxread.c (end_psymtab): Remove dead code.
4563
4564 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4565
4566         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4567         DWARF unwinders are disabled.
4568         * dwarf2-frame.c: Add dwarf2read.h include.
4569         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4570         disabled.
4571         (dwarf2_frame_unwinders_enabled_p): Define.
4572         (show_dwarf_unwinders_enabled_p): New function.
4573         (_initialize_dwarf2_frame): Register switch to control DWARF
4574         unwinder use.
4575         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4576         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4577         (show_dwarf_cmdlist): Remove static keyword.
4578         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4579         (show_dwarf_cmdlist): Declare.
4580         * NEWS: Document new feature.
4581
4582 2018-07-26  Tom de Vries  <tdevries@suse.de>
4583
4584         PR breakpoints/23366
4585         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4586
4587 2018-07-26  Tom de Vries  <tdevries@suse.de>
4588
4589         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4590         DW_AT_count can't be translated to a dynamic prop.
4591
4592 2018-07-25  Tom de Vries  <tdevries@suse.de>
4593
4594         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4595         try/catch.
4596
4597 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4598
4599         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4600
4601 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4602
4603         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4604
4605 2018-07-24  Keith Seitz  <keiths@redhat.comt
4606
4607         PR symtab/23010
4608         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4609         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4610         instead of add_symbol_to_list.
4611         (read_file_scope): Call prepare_one_comp_unit before reading
4612         any other DIEs.
4613
4614 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4615
4616         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4617
4618 2018-07-24  Tom Tromey  <tom@tromey.com>
4619
4620         * utils.c (malloc, realloc, free): Don't declare.
4621         * configure, config.in: Rebuild.
4622         * configure.ac: Don't check for declarations of free, malloc, or
4623         realloc.
4624
4625 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4626
4627         * aarch64-linux-nat.c
4628         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4629         variable.
4630         * arm-linux-nat.c (fetch_regs): Likewise.
4631         (store_regs): Likewise.
4632         (fetch_vfp_regs): Likewise.
4633         (store_vfp_regs): Likewise.
4634         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4635         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4636         (arm_linux_nat_target::insert_watchpoint): Likewise.
4637         (arm_linux_nat_target::remove_watchpoint): Likewise.
4638         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4639         Likewise.
4640         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4641         Likewise.
4642         * ppc-linux-nat.c (fetch_register): Likewise.
4643         (fetch_all_gp_regs): Likewise.
4644         (fetch_ppc_registers): Likewise.
4645         (store_all_gp_regs): Likewise.
4646         (store_ppc_registers): Likewise.
4647         (hwdebug_insert_point): Likewise.
4648         (can_use_watchpoint_cond_accel): Likewise.
4649         * remote-sim.c (gdb_os_write_stdout): Likewise.
4650
4651 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4652             Tom Tromey  <tom@tromey.com>
4653
4654         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4655         test for it.
4656         * configure: Rebuild.
4657
4658 2018-07-22  Tom Tromey  <tom@tromey.com>
4659
4660         * regformats/regdat.sh: Define xmltarget_${name} inside
4661         #ifndef IN_PROCESS_AGENT.
4662
4663 2018-07-22  Tom Tromey  <tom@tromey.com>
4664
4665         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4666
4667 2018-07-22  Tom Tromey  <tom@tromey.com>
4668
4669         * symfile.c (reread_symbols): Notify iter, not objfile.
4670
4671 2018-07-22  Tom Tromey  <tom@tromey.com>
4672
4673         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4674         Use arch_ops.
4675         (ravenscar_thread_target::prepare_to_store): Likewise.
4676
4677 2018-07-22  Tom Tromey  <tom@tromey.com>
4678
4679         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4680         unused variable.  Call value_fetch_lazy when needed.
4681         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4682         Remove unused variable.  Call value_fetch_lazy when needed.
4683
4684 2018-07-22  Tom Tromey  <tom@tromey.com>
4685
4686         * m32c-tdep.c (mark_dma): Return void.
4687         (make_regs): Remove unused declarations.
4688
4689 2018-07-22  Tom Tromey  <tom@tromey.com>
4690
4691         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4692         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4693         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4694         bkscm_get_valid_block_smob_arg_unsafe for effect.
4695
4696 2018-07-22  Tom Tromey  <tom@tromey.com>
4697
4698         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4699         value_type.
4700
4701 2018-07-22  Tom Tromey  <tom@tromey.com>
4702
4703         * windows-nat.c (saved_context): Conditionally define.
4704         * remote.c (remote_target::remote_btrace_maybe_reopen):
4705         Conditionally declare "warned".
4706         * inflow.c (sigquit_ours): Conditionally define.
4707         (new_tty): Move "tty" declaration inside #if.
4708         * guile/guile.c (guile_datadir): Conditionally define.
4709         * charset.c (set_be_le_names): Move some declarations inside #if.
4710         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4711         #if.
4712         (parse_xml_btrace_conf): Likewise.
4713
4714 2018-07-22  Tom Tromey  <tom@tromey.com>
4715
4716         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4717
4718 2018-07-22  Tom Tromey  <tom@tromey.com>
4719
4720         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4721         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4722         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4723         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4724         * stack.c (frame_apply_level_command): Remove unused variable.
4725         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4726         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4727         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4728         unused variable.
4729         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4730         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4731         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4732         variable.
4733         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4734         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4735         variable.
4736         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4737         Remove unused variable.
4738         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4739         variable.
4740         * common/tdesc.c (print_xml_feature::visit): Remove unused
4741         variable.
4742         * compile/compile-object-load.c (store_regs): Remove unused
4743         variables.
4744         * complaints.c (clear_complaints): Remove unused variable.
4745         * corelow.c (core_target_open): Remove unused variable.
4746         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4747         variable.
4748         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4749         variable.
4750         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4751         variable.
4752         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4753         variable.
4754         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4755         variable.
4756         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4757         variable.
4758         * ia64-tdep.c (examine_prologue): Remove unused variable.
4759         * infcall.c (run_inferior_call): Remove unused variable.
4760         * inferior.c (exit_inferior): Remove unused variable.
4761         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4762         * linespec.c (decode_line_2): Remove unused variable.
4763         * linux-nat.c (super_close): Remove.
4764         * linux-tdep.c (linux_info_proc): Remove unused variable.
4765         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4766         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4767         Remove unused variable.
4768         * parse.c (find_minsym_type_and_address): Remove unused variable.
4769         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4770         variable.
4771         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4772         variable.
4773         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4774         variables.
4775         * record-btrace.c (record_btrace_target::store_registers): Remove
4776         unused variable.
4777         (cmd_show_record_btrace_cpu): Remove unused variable.
4778         * riscv-tdep.c (riscv_register_reggroup_p)
4779         (riscv_push_dummy_call, riscv_return_value): Remove unused
4780         variable.
4781         * rust-exp.y (literal): Remove unused variable.
4782         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4783         unused variable.
4784         <STRUCTOP_ANONYMOUS>: Likewise.
4785         * s390-linux-tdep.c (s390_linux_init_abi_31)
4786         (s390_linux_init_abi_64): Remove unused variable.
4787         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4788         (file_select_thread, net_windows_open, _initialize_ser_windows):
4789         Remove unused variables.
4790         * symtab.c (find_pc_sect_line): Remove unused variable.
4791         * target-memory.c (compute_garbled_blocks): Remove unused
4792         variable.
4793         (target_write_memory_blocks): Remove unused variable.
4794         * target.c (target_stack::unpush): Remove unused variables.
4795         * tracepoint.c (start_tracing, all_tracepoint_actions)
4796         (merge_uploaded_trace_state_variables)
4797         (print_one_static_tracepoint_marker): Remove unused variable.
4798         * unittests/basic_string_view/element_access/char/1.cc (test01):
4799         Remove unused variable.
4800         * windows-nat.c (windows_continue, windows_add_all_dlls)
4801         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4802         Remove unused variables.
4803
4804 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4805
4806         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4807         attr_profile in HAVE_ELF.
4808         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4809         HAVE_ELF.
4810
4811 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4812
4813         * frame.c (frame_register_unwind): Change parameter name.
4814         (frame_unwind_register): Likewise.
4815         (frame_unwind_register_value): Likewise.
4816         (frame_unwind_register_signed): Likewise.
4817         (frame_unwind_register_unsigned): Likewise.
4818         * frame.h (frame_register_unwind): Likewise.
4819         (frame_unwind_register): Likewise.
4820         (frame_unwind_register_value): Likewise.
4821         (frame_unwind_register_signed): Likewise.
4822         (frame_unwind_register_unsigned): Likewise.
4823         (frame_unwind_arch): Likewise.
4824
4825 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4826
4827         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4828         ISA maintenance.
4829
4830 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4831
4832         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4833         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4834         hand.
4835
4836 2018-07-20  Keith Seitz  <keiths@redhat.com>
4837
4838         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4839         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4840         m_compunit_symtab, m_language>: Add "m_" prefix.
4841         Update all uses.
4842         * buildsym.c: Update all uses.
4843
4844 2018-07-20  Tom Tromey  <tom@tromey.com>
4845
4846         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4847         * buildsym.h (record_line_ftype): Remove typedef.
4848
4849 2018-07-20  Tom Tromey  <tom@tromey.com>
4850
4851         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4852         (end_expandable_symtab): Likewise.
4853         (end_symtab_get_static_block): Likewise.
4854         (end_symtab_from_static_block): Likewise.
4855         * buildsym-legacy.c (augment_type_symtab): Remove.
4856         (end_expandable_symtab): Remove.
4857         (end_symtab_get_static_block): Remove.
4858         (end_symtab_from_static_block): Remove.
4859
4860 2018-07-20  Tom Tromey  <tom@tromey.com>
4861
4862         * dwarf2read.c: Include buildsym.h.
4863         (struct dwarf2_cu) <builder>: New method.
4864         (fixup_go_packaging): Update.
4865         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4866         use scoped_free_pendings.
4867         (using_directives): Add "cu" parameter, remove "language".
4868         (read_import_statement, setup_type_unit_groups, )
4869         (read_func_scope, read_lexical_block_scope)
4870         (dwarf2_record_block_ranges, read_namespace): Update.
4871         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4872         (lnp_state_machine::handle_end_sequence): Update.
4873         (class lnp_state_machine) <m_cu>: New member.
4874         <m_record_line_callback>: Remove.
4875         <m_currently_recording_lines>: New member.
4876         (lnp_state_machine::handle_set_file): Update.
4877         (noop_record_line): Remove.
4878         (dwarf_record_line_p): Add cu parameter.
4879         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4880         (lnp_state_machine::record_line)
4881         (lnp_state_machine::lnp_state_machine)
4882         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4883         (dwarf_decode_lines): Update.
4884         (dwarf2_start_subfile): Add cu parameter.
4885         (dwarf2_start_symtab, new_symbol): Update.
4886         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4887         Remove dwarf2_per_objfile parameter.
4888         (dwarf_decode_macros): Update.
4889
4890 2018-07-20  Tom Tromey  <tom@tromey.com>
4891
4892         * stabsread.c (define_symbol): Update.
4893         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4894         * dwarf2read.c (new_symbol): Update.
4895         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4896         * cp-namespace.c: Include buildsym.h.
4897         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4898         * buildsym-legacy.c (get_buildsym_compunit): New function.
4899
4900 2018-07-20  Tom Tromey  <tom@tromey.com>
4901
4902         * xcoffread.c: Include buildsym-legacy.h.
4903         * windows-nat.c: Include buildsym-legacy.h.
4904         * stabsread.c: Include buildsym-legacy.h.
4905         * mdebugread.c: Include buildsym-legacy.h.
4906         * buildsym-legacy.h: New file.
4907         * buildsym-legacy.c: New file, from buildsym.c.
4908         * go32-nat.c: Include buildsym-legacy.h.
4909         * dwarf2read.c: Include buildsym-legacy.h.
4910         * dbxread.c: Include buildsym-legacy.h.
4911         * cp-namespace.c: Include buildsym-legacy.h.
4912         * coffread.c: Include buildsym-legacy.h.
4913         * buildsym.h: Move some contents to buildsym-legacy.h.
4914         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4915         buildsym-legacy.c.
4916         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4917
4918 2018-07-20  Tom Tromey  <tom@tromey.com>
4919
4920         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4921         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4922         (buildsym_compunit::buildsym_compunit)
4923         (buildsym_compunit::~buildsym_compunit)
4924         (buildsym_compunit::get_macro_table): Define.
4925
4926 2018-07-20  Tom Tromey  <tom@tromey.com>
4927
4928         * buildsym.c (reset_symtab_globals): Remove.
4929         (buildsym_compunit::end_symtab_from_static_block): Update.
4930         (buildsym_compunit::augment_type_symtab): Update.
4931         (end_symtab_from_static_block): Call free_buildsym_compunit.
4932         (augment_type_symtab, end_symtab, end_expandable_symtab):
4933         Likewise.
4934
4935 2018-07-20  Tom Tromey  <tom@tromey.com>
4936
4937         * arch-utils.c: Do not include buildsym.h.
4938         * mipsread.c: Do not include buildsym.h.
4939         * machoread.c: Do not include buildsym.h.
4940         * elfread.c: Do not include buildsym.h.
4941
4942 2018-07-20  Tom Tromey  <tom@tromey.com>
4943
4944         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4945         initialization.
4946         (buildsym_compunit): Add new constructor.
4947         (struct buildsym_compunit) <get_last_source_file, finish_block,
4948         record_block_range, start_subfile, patch_subfile_names,
4949         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4950         set_last_source_start_addr, get_last_source_start_addr,
4951         get_local_using_directives, set_local_using_directives,
4952         get_global_using_directives, outermost_context_p,
4953         get_current_context_stack, get_context_stack_depth,
4954         get_current_subfile, get_local_symbols, get_file_symbols,
4955         get_global_symbols, record_debugformat, record_producer,
4956         push_context, pop_context, end_symtab_get_static_block,
4957         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4958         New public methods.
4959         <record_pending_block, finish_block_internal, make_blockvector,
4960         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4961         private methods.
4962         Update all users.
4963
4964 2018-05-22  Tom Tromey  <tom@tromey.com>
4965
4966         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4967         parameter.
4968         (finish_block_internal): Update.
4969
4970 2018-07-20  Tom Tromey  <tom@tromey.com>
4971
4972         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4973         parameter.
4974         (finish_block_internal): Update.
4975
4976 2018-07-20  Tom Tromey  <tom@tromey.com>
4977
4978         * buildsym.h (EXTERN): Don't define or undef.
4979         * buildsym.c (EXTERN): Don't define.
4980
4981 2018-07-20  Tom Tromey  <tom@tromey.com>
4982
4983         * buildsym.c: Remove TODO comment.
4984
4985 2018-07-20  Tom Tromey  <tom@tromey.com>
4986
4987         * coffread.c (coff_symtab_read): Update.
4988         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4989         (xcoff_new_init): Update.
4990         * mipsread.c (mipscoff_new_init): Update.
4991         * mdebugread.c (mdebug_build_psymtabs): Update.
4992         * elfread.c (elf_new_init): Update.
4993         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4994         Update.
4995         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4996         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4997         (stabsect_build_psymtabs): Update.
4998         * buildsym.h (buildsym_init): Don't declare.
4999         * buildsym.c: Update comment.
5000         (prepare_for_building): Remove.
5001         (start_symtab, restart_symtab): Update.
5002         (reset_symtab_globals): Update comment.
5003         (buildsym_init): Remove.
5004
5005 2018-07-20  Tom Tromey  <tom@tromey.com>
5006
5007         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
5008         * stabsread.c (patch_block_stabs, define_symbol, read_type)
5009         (read_enum_type, common_block_start, common_block_end)
5010         (cleanup_undefined_types_1, finish_global_stabs): Update.
5011         * mdebugread.c (psymtab_to_symtab_1): Update.
5012         * dwarf2read.c (fixup_go_packaging, read_func_scope)
5013         (read_lexical_block_scope, new_symbol): Update.
5014         * dbxread.c (process_one_symbol): Update.
5015         * coffread.c (coff_symtab_read, process_coff_symbol)
5016         (coff_read_enum_type): Update.
5017         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5018         declare.
5019         (get_local_symbols, get_file_symbols, get_global_symbols): New
5020         functions.
5021         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5022         m_global_symbols.
5023         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5024         (~scoped_free_pendings): Update.
5025         (finish_block, prepare_for_building, reset_symtab_globals)
5026         (end_symtab_get_static_block, end_symtab_with_blockvector)
5027         (augment_type_symtab, push_context): Update.
5028         (get_local_symbols, get_file_symbols, get_global_symbols): New
5029         functions.
5030         (buildsym_init): Update.
5031
5032 2018-07-20  Tom Tromey  <tom@tromey.com>
5033
5034         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5035         (process_full_type_unit): Likewise.
5036         (dwarf2_start_symtab): Set list_in_scope.
5037
5038 2018-07-20  Tom Tromey  <tom@tromey.com>
5039
5040         * dwarf2read.c (process_psymtab_comp_unit_reader)
5041         (build_type_psymtabs_reader): Do not set list_in_scope.
5042
5043 2018-07-20  Tom Tromey  <tom@tromey.com>
5044
5045         * buildsym.c (free_pendings): Remove.
5046         (add_symbol_to_list, scoped_free_pendings)
5047         (finish_block_internal, buildsym_init): Update.
5048
5049 2018-07-20  Tom Tromey  <tom@tromey.com>
5050
5051         * xcoffread.c (read_xcoff_symtab): Update.
5052         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5053         Update.
5054         * dbxread.c (process_one_symbol): Update.
5055         * coffread.c (coff_symtab_read): Update.
5056         * buildsym.h (finish_block): Update.
5057         * buildsym.c (finish_block): Remove "listhead" argument.
5058         (end_symtab_get_static_block): Update.
5059
5060 2018-07-20  Tom Tromey  <tom@tromey.com>
5061
5062         * buildsym.h (class scoped_free_pendings): Remove constructor.
5063         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5064         method.
5065         <m_pending_block_obstack, m_pending_blocks>: New members.
5066         (pending_block_obstack, pending_blocks): Remove.
5067         (scoped_free_pendings::scoped_free_pendings): Default.
5068         (~scoped_free_pendings): Update.
5069         (free_pending_blocks): Remove.
5070         (finish_block_internal, record_pending_block, make_blockvector)
5071         (end_symtab_get_static_block, augment_type_symtab, push_context)
5072         (buildsym_init): Update.
5073
5074 2018-07-20  Tom Tromey  <tom@tromey.com>
5075
5076         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5077         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5078         members.
5079         (pending_addrmap, pending_addrmap_obstack)
5080         (pending_addrmap_interesting): Remove.
5081         (scoped_free_pendings, record_block_range, make_blockvector)
5082         (prepare_for_building, reset_symtab_globals, buildsym_init):
5083         Update.
5084
5085 2018-07-20  Tom Tromey  <tom@tromey.com>
5086
5087         * xcoffread.c (process_linenos): Update.
5088         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5089         * mdebugread.c (psymtab_to_symtab_1): Update.
5090         * dwarf2read.c (setup_type_unit_groups)
5091         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5092         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5093         * dbxread.c (process_one_symbol): Update.
5094         * coffread.c (coff_symtab_read, enter_linenos)
5095         (process_coff_symbol): Update.
5096         * buildsym.h (current_subfile): Don't declare.
5097         (get_current_subfile): Declare.
5098         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5099         member.
5100         (start_subfile, free_buildsym_compunit, push_subfile)
5101         (prepare_for_building, start_symtab): Update.
5102         (get_current_subfile): New function.
5103
5104 2018-07-20  Tom Tromey  <tom@tromey.com>
5105
5106         * coffread.c (coff_symtab_read): Update.
5107         * xcoffread.c (read_xcoff_symtab): Update.
5108         * dwarf2read.c (new_symbol): Update.
5109         (read_func_scope, read_lexical_block_scope): Update.
5110         * dbxread.c (process_one_symbol): Update.
5111         * buildsym.h (context_stack, context_stack_depth): Don't declare.
5112         (outermost_context_p): Remove macro.
5113         (outermost_context_p, get_current_context_stack)
5114         (get_context_stack_depth): Declare.
5115         (pop_context): Return struct context_stack.
5116         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5117         member.
5118         (context_stack_size): Remove.
5119         (INITIAL_CONTEXT_STACK_SIZE): Remove.
5120         (prepare_for_building, end_symtab_get_static_block)
5121         (augment_type_symtab, push_context): Update.
5122         (pop_context): Return struct context_stack.
5123         (outermost_context_p, get_current_context_stack)
5124         (get_context_stack_depth): New functions.
5125         (buildsym_init): Update.
5126
5127 2018-07-20  Tom Tromey  <tom@tromey.com>
5128
5129         * rust-exp.y: Now a pure parser.  Update all rules.
5130         (%union): Move earlier.
5131         (current_parser, work_obstack): Remove globals.
5132         (rust_parser, ~rust_parser): Update.
5133         (class rust_parser) <copy_name, concat3, crate_name, super_name,
5134         lex_character, lex_number, lex_string, lex_identifier,
5135         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5136         convert_name, convert_params_to_expression,
5137         convert_ast_to_expression, ast_basic_type, ast_operation,
5138         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5139         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5140         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5141         ast_array_type, ast_slice_type, ast_reference_type,
5142         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5143         (rust_parse): Update.
5144         (rustyyerror, rustyylex): Add parser parameter.
5145         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5146         (rust_lex_stringish_test, rust_lex_test_sequence)
5147         (rust_lex_test_trailing_dot, rust_lex_test_completion)
5148         (rust_lex_test_push_back, rust_lex_tests): Update.
5149
5150 2018-07-19  Pedro Alves  <palves@redhat.com>
5151
5152         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5153         gdb::unique_xmalloc_ptr.
5154         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5155         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5156         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5157         copy-initialization.
5158         * guile/scm-pretty-print.c (ppscm_print_children): Use
5159         gdb::unique_xmalloc_ptr instead of cleanups.
5160         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5161         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5162         gdb::unique_xmalloc_ptr.
5163         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5164         Adjust to use gdb::unique_xmalloc_ptr.
5165         * guile/scm-utils.c (extract_arg): Adjust.
5166         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5167         gdb::unique_xmalloc_ptr instead of a cleanup.
5168
5169 2018-07-19  Tom Tromey  <tom@tromey.com>
5170
5171         * utils.c (do_value_free_to_mark)
5172         (make_cleanup_value_free_to_mark): Remove.
5173         * utils.h (make_cleanup_value_free_to_mark): Remove.
5174
5175 2018-07-19  Pedro Alves  <palves@redhat.com>
5176
5177         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5178         forwarding reference.
5179
5180 2018-07-18  Pedro Alves  <palves@redhat.com>
5181
5182         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5183         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5184         cleanup.
5185
5186 2018-07-18  Pedro Alves  <palves@redhat.com>
5187
5188         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5189         exceptions.
5190         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5191         (gdbscm_wrap): New.
5192         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5193         directly instead of a cleanup.
5194         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5195         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5196         (vlscm_binop_gdbthrow): New, factored out from ...
5197         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5198         (vlscm_rich_compare): Use gdbscm_wrap.
5199         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5200         instead of a cleanup.
5201         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5202         cleanup.
5203         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5204         Use xfree directly instead of a cleanup.
5205         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5206         Adjust to use gdbscm_wrap and scoped_value_mark.
5207         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5208         (gdbscm_value_address, gdbscm_value_dereference)
5209         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5210         scoped_value_mark.
5211         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5212         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5213         scoped_value_mark.
5214         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5215         gdbscm_wrap and scoped_value_mark.
5216         (gdbscm_value_to_string): Use xfree directly instead of a
5217         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5218         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5219         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5220         scoped_value_mark.
5221         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5222         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5223         scoped_value_mark.
5224         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5225         gdbscm_wrap.
5226
5227 2018-07-18  Tom de Vries  <tdevries@suse.de>
5228
5229         * findvar.c (default_read_var_value): Also resolve dynamic type for
5230         LOC_OPTIMIZED_OUT vars.
5231
5232 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5233
5234         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5235         decoding.
5236
5237 2018-07-17  Tom Tromey  <tom@tromey.com>
5238
5239         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5240         (compute_enum_list, pascm_set_param_value_x)
5241         (gdbscm_parameter_value): Update.
5242         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5243         (gdbscm_scm_to_host_string): Update.
5244         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5245         Update.
5246         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5247         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5248         * guile/scm-string.c (gdbscm_scm_to_string): Return
5249         unique_xmalloc_ptr.
5250         (gdbscm_scm_to_host_string): Likewise.
5251
5252 2018-07-17  Tom Tromey  <tom@tromey.com>
5253
5254         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5255         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5256         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5257         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5258         unique_xmalloc_ptr.
5259
5260 2018-07-17  Tom Tromey  <tom@tromey.com>
5261
5262         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5263         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5264         Update.
5265         * guile/scm-cmd.c (cmdscm_function): Update.
5266         * guile/scm-pretty-print.c
5267         (ppscm_print_exception_unless_memory_error): Update.
5268         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5269         Return unique_xmalloc_ptr.
5270
5271 2018-07-17  Tom Tromey  <tom@tromey.com>
5272
5273         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5274         Use string_printf.
5275
5276 2018-07-17  Jim Wilson  <jimw@sifive.com>
5277
5278         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5279         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
5280         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
5281         unecessary braces after EF_RISCV_RVC test.  Delete call to
5282         set_gdbarch_decr_pc_after_break.
5283
5284         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5285         RISCV_LAST_FP_REGNUM + 1.
5286         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5287
5288 2018-07-17  Tom Tromey  <tom@tromey.com>
5289
5290         * configure.ac: Remove --disable-gdbcli.
5291         * configure: Rebuild.
5292         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5293         (SUBDIR_CLI_CFLAGS): Remove.
5294         (SFILES): Use SUBDIR_CLI_SRCS.
5295         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5296
5297 2018-07-17  Tom Tromey  <tom@tromey.com>
5298
5299         PR gdb/18624:
5300         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5301
5302 2018-07-16  Jim Wilson  <jimw@sifive.com>
5303
5304         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5305
5306 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5307
5308         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5309         variable.
5310         (libunwind_frame_sniffer): Likewise.
5311         (libunwind_frame_prev_register): Likewise.
5312         (libunwind_sigtramp_frame_sniffer): Likewise.
5313         * ia64-tdep.c (ia64_access_reg): Likewise.
5314         (ia64_access_rse_reg): Likewise.
5315         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5316         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5317
5318 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5319
5320         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5321
5322 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5323
5324         * remote-sim.c (gdbsim_target::close,
5325         gdbsim_target::mourn_inferior): Remove unused variables.
5326
5327 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5328
5329         * ia64-tdep.c (ktab_buf): New global.
5330         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5331         (get_kernel_table): Adjust.
5332
5333 2018-07-16  Tom Tromey  <tom@tromey.com>
5334
5335         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5336         * dwarf2read.c (using_directives, new_symbol): Use
5337         outermost_context_p.
5338         * dbxread.c (process_one_symbol): Use outermost_context_p.
5339         * coffread.c (coff_symtab_read): Use outermost_context_p.
5340
5341 2018-07-16  Tom Tromey  <tom@tromey.com>
5342
5343         * dwarf2read.c (using_directives, read_func_scope)
5344         (read_lexical_block_scope): Update.
5345         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5346         * buildsym.h (local_using_directives, global_using_directives):
5347         Don't declare.
5348         (get_local_using_directives, set_local_using_directives)
5349         (get_global_using_directives): Declare.
5350         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5351         m_global_using_directives>: New members.
5352         (finish_block_internal, prepare_for_building)
5353         (reset_symtab_globals, end_symtab_get_static_block)
5354         (push_context): Update.
5355         (get_local_using_directives, set_local_using_directives)
5356         (get_global_using_directives): New functions.
5357         (buildsym_init): Update.
5358
5359 2018-07-16  Tom Tromey  <tom@tromey.com>
5360
5361         * xcoffread.c (xcoff_initial_scan): Don't call
5362         free_pending_blocks.
5363         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5364         * buildsym.h (class scoped_free_pendings): Add constructor.
5365         (free_pending_blocks): Don't declare.
5366         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5367         (free_pending_blocks): Now static.
5368
5369 2018-07-16  Tom Tromey  <tom@tromey.com>
5370
5371         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5372         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5373         member.
5374         (struct subfile_stack): Remove.
5375         (subfile_stack): Remove.
5376         (push_subfile, pop_subfile, buildsym_init): Update.
5377
5378 2018-07-16  Tom Tromey  <tom@tromey.com>
5379
5380         * buildsym.c (push_subfile): Use gdb_assert.
5381         (pop_subfile): Use gdb_assert.
5382
5383 2018-07-16  Tom Tromey  <tom@tromey.com>
5384
5385         * buildsym.h (merge_symbol_lists): Remove.
5386         * buildsym.c (merge_symbol_lists): Remove.
5387
5388 2018-07-16  Tom Tromey  <tom@tromey.com>
5389
5390         * stabsread.c (scan_file_globals): Update comment.
5391         * stabsread.h (scan_file_globals): Move from buildsym.h.
5392         * buildsym.h (scan_file_globals): Move to stabsread.h.
5393
5394 2018-07-16  Tom Tromey  <tom@tromey.com>
5395
5396         * xcoffread.c (xcoff_new_init): Update.
5397         * mipsread.c (mipscoff_new_init): Update.
5398         * mdebugread.c (mdebug_build_psymtabs): Update.
5399         * elfread.c (elf_new_init): Update.
5400         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5401         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5402         * buildsym.h (buildsym_new_init): Don't declare.
5403         * buildsym.c (buildsym_new_init): Remove.
5404
5405 2018-07-16  Tom Tromey  <tom@tromey.com>
5406
5407         * stabsread.h (within_function): Move from buildsym.h.
5408         * stabsread.c (start_stabs): Clear within_function.
5409         * coffread.c (coff_start_symtab): Clear within_function.
5410         * buildsym.h (within_function): Move to stabsread.h.
5411         * buildsym.c (prepare_for_building): Update.
5412
5413 2018-07-16  Tom Tromey  <tom@tromey.com>
5414
5415         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5416         * dwarf2read.c (dwarf2_start_symtab): Don't set
5417         processing_gcc_compilation.
5418         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5419
5420 2018-07-16  Tom Tromey  <tom@tromey.com>
5421
5422         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5423         (next_symbol_text_func): Move from buildsym.h.
5424         * stabsread.c (hashname): Move from buildsym.c.
5425         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5426         (next_symbol_text_func, hashname): Move to stabsread.h.
5427         * buildsym.c: Don't include bcache.h
5428         (hashname): Move to stasbread.c.
5429
5430 2018-07-16  Tom Tromey  <tom@tromey.com>
5431
5432         * buildsym.h (context_stack_size): Don't declare.
5433         * buildsym.c (context_stack_size): New global.
5434
5435 2018-07-16  Tom Tromey  <tom@tromey.com>
5436
5437         * dbxread.c (processing_acc_compilation): New global.
5438         * buildsym.h (processing_acc_compilation): Don't declare.
5439
5440 2018-07-16  Tom Tromey  <tom@tromey.com>
5441
5442         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5443         * dbxread.c (read_ofile_symtab): Update.
5444         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5445         * buildsym.h (last_source_start_addr): Remove.
5446         (set_last_source_start_addr, get_last_source_start_addr):
5447         Declare.
5448         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5449         parameter.
5450         (struct buildsym_compunit) <m_last_source_start_addr>: New
5451         member.
5452         (prepare_for_building): Remove start_addr parameter.
5453         (start_symtab, restart_symtab, end_symtab_get_static_block)
5454         (end_symtab_with_blockvector): Update.
5455         (set_last_source_start_addr, get_last_source_start_addr): New
5456         functions.
5457
5458 2018-07-16  Tom Tromey  <tom@tromey.com>
5459
5460         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5461         member.
5462         (have_line_numbers): Remove.
5463         (record_line, prepare_for_building, end_symtab_get_static_block)
5464         (augment_type_symtab): Update.
5465
5466 2018-07-16  Tom Tromey  <tom@tromey.com>
5467
5468         * buildsym.c (~buildsym_compunit): Free the macro table.
5469         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5470         methods.
5471         <m_pending_macros>: New member.
5472         (pending_macros): Remove.
5473         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5474         (reset_symtab_globals, end_symtab_get_static_block)
5475         (end_symtab_with_blockvector, augment_type_symtab)
5476         (buildsym_init): Update.
5477
5478 2018-07-16  Tom Tromey  <tom@tromey.com>
5479
5480         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5481         parameter.
5482         (buildsym_compunit::set_last_source_file): New method.
5483         <m_last_source_file>: New member.
5484         (prepare_for_building): Remove "name" parameter.
5485         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5486         (last_source_file): Remove.
5487         (set_last_source_file, get_last_source_file): Update.
5488
5489 2018-07-16  Tom Tromey  <tom@tromey.com>
5490
5491         * buildsym.c (prepare_for_building): Add assert.
5492
5493 2018-07-16  Tom Tromey  <tom@tromey.com>
5494
5495         * buildsym.c (~buildsym_compunit): Update.
5496         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5497         (start_subfile, patch_subfile_names)
5498         (end_symtab_with_blockvector): Update.
5499
5500 2018-07-16  Tom Tromey  <tom@tromey.com>
5501
5502         * buildsym.c (struct buildsym_compunit): Add constructor,
5503         destructor, initializers.
5504         (start_buildsym_compunit): Remove.
5505         (free_buildsym_compunit): Use "delete".
5506         (start_symtab, restart_symtab): Use "new".
5507
5508 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5509
5510         * symfile.c (set_objfile_default_section_offset): Remove struct
5511         keyword.
5512
5513 2018-07-14  Stafford Horne  <shorne@gmail.com>
5514
5515         * (Responsible Maintainers): Add myself as or1k maintainer.
5516
5517 2018-07-13  Tom Tromey  <tom@tromey.com>
5518
5519         * symfile.c (set_objfile_default_section_offset): Use extra braces
5520         around initializer.
5521
5522 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5523
5524         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5525         non-branching basr.
5526
5527 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5528
5529         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5530         unittests/cli-utils-selftests.c
5531         * unittests/cli-utils-selftests.c: New file.
5532
5533 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5534
5535         * NEWS: Mention new commands. Mention change to 'thread apply'.
5536
5537 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5538
5539         * thread.c (thr_try_catch_cmd): New function.
5540         (thread_apply_all_command): Handle qcs flags.
5541         (thread_apply_command): Handle qcs flags.
5542         (taas_command): New function.
5543         (tfaas_command): New function.
5544         (_initialize_thread): Update to setup the new commands 'taas
5545         and 'tfaas'. Change doc string for 'thread apply'.
5546
5547 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5548
5549         * stack.c: (trailing_outermost_frame): New function, mostly
5550         extracted from backtrace_command_1.
5551         (leading_innermost_frame): New function.
5552         (backtrace_command_1): Update to call trailing_outermost_frame.
5553         (frame_apply_command_count): New function.
5554         (frame_apply_level_command): New function.
5555         (frame_apply_all_command): New function.
5556         (frame_apply_command): New function.
5557         (faas_command): New function.
5558         (frame_cmd_list): New variable.
5559         (_initialize_stack): Update to setup the new commands 'frame apply'
5560         and 'faas'.
5561
5562 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5563
5564         * cli-utils.c (number_or_range_parser::get_number): Only handle
5565         numbers or convenience var as numbers.
5566         (parse_flags): New function.
5567         (parse_flags_qcs): New function.
5568         (number_or_range_parser::finished): Ensure parsing end is detected
5569         before end of string.
5570         * cli-utils.h (parse_flags): New function.
5571         (parse_flags_qcs): New function.
5572         (number_or_range_parser): Remove m_finished bool.
5573         (number_or_range_parser::skip_range): Set m_in_range to false.
5574
5575 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5576
5577         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5578         on Windows.
5579
5580 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5581             Jan Kratochvil  <jan.kratochvil@redhat.com>
5582             Paul Fertser  <fercerpav@gmail.com>
5583             Tsutomu Seki  <sekiriki@gmail.com>
5584             Pedro Alves  <palves@redhat.com>
5585
5586         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5587         'unittests/parse-connection-spec-selftests.c'.
5588         (COMMON_SFILES): Add 'common/netstuff.c'.
5589         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5590         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5591         * common/netstuff.c: New file.
5592         * common/netstuff.h: New file.
5593         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5594         (wait_for_connect): Update comment.  New parameter
5595         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5596         Use 'sock' directly instead of 'scb->fd'.
5597         (try_connect): New function, with code from 'net_open'.
5598         (net_open): Rewrite main loop to deal with multiple
5599         sockets/addresses.  Handle IPv6-style hostnames; implement
5600         support for IPv6 connections.
5601         * unittests/parse-connection-spec-selftests.c: New file.
5602
5603 2018-07-11  Pedro Alves  <palves@redhat.com>
5604
5605         PR gdb/23377
5606         * remote.c (remote_target::remote_detach_pid): Call
5607         set_current_process.
5608
5609 2018-07-11  Pedro Alves  <palves@redhat.com>
5610
5611         * h8300-tdep.c (h8300_gdbarch_init): Remove
5612         set_gdbarch_ecoff_reg_to_regnum calls.
5613
5614 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5615
5616         PR c++/23373
5617         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5618         offsets/sizes for static members of a class/struct.
5619
5620 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5621
5622         * target-descriptions.c (tdesc_register_bitsize): Rename.
5623         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5624         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5625         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5626
5627 2018-07-10  Tom Tromey  <tom@tromey.com>
5628
5629         * breakpoint.c (moribund_locations): Now static and a
5630         std::vector.
5631         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5632         (build_bpstat_chain, update_global_location_list)
5633         (breakpoint_retire_moribund): Update.
5634         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5635         VEC.
5636
5637 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5638
5639         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5640         (riscv_register_reggroup_p): Use new function, remove unneeded
5641         parenthesis.
5642         (riscv_push_dummy_call): Extend assert to compare against xlen or
5643         flen based on register type.
5644
5645 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5646
5647         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5648
5649 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5650
5651         * remote.c (show_hardware_watchpoint_limit): New function.
5652         (show_hardware_watchpoint_length_limit): New function.
5653         (show_hardware_breakpoint_limit): New function.
5654         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5655         where appropriate, update help text.
5656
5657 2018-07-09  Tom Tromey  <tom@tromey.com>
5658
5659         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5660         (CLIBS): Don't mention NAT_CLIBS.
5661
5662 2018-07-09  Tom Tromey  <tom@tromey.com>
5663
5664         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5665         (LIBGDB_OBS, clean mostlyclean): Update.
5666         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5667
5668 2018-07-09  Tom Tromey  <tom@tromey.com>
5669
5670         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5671         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5672         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5673
5674 2018-07-09  Tom Tromey  <tom@tromey.com>
5675
5676         * Makefile.in (ALLDEPFILES): Remove exec.c.
5677         (COMMON_OBS): Remove exec.o.
5678         (COMMON_SFILES): Add exec.c.
5679
5680 2018-07-09  Tom Tromey  <tom@tromey.com>
5681
5682         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5683
5684 2018-07-09  Tom Tromey  <tom@tromey.com>
5685
5686         * Makefile.in (clean mostlyclean): Remove stamp-version.
5687         (version.c): Depend on stamp-version.
5688         (stamp-version): New rule, from version.c rule.
5689
5690 2018-07-09  Tom Tromey  <tom@tromey.com>
5691
5692         * Makefile.in (init.c): Depend on stamp-init.
5693         (stamp-init): New rule, from init.c rule.
5694         (clean mostlyclean): Remove stamp-init.
5695
5696 2018-07-09  Tom Tromey  <tom@tromey.com>
5697
5698         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5699         SUBDIR_GCC_COMPILE_SRCS.
5700
5701 2018-07-09  Tom Tromey  <tom@tromey.com>
5702
5703         * Makefile.in (init.c): Remove some unused sed rules.
5704
5705 2018-07-09  Tom Tromey  <tom@tromey.com>
5706
5707         * Makefile.in (TSOBS): Remove.
5708         (INIT_FILES): Update.
5709         (LIBGDB_OBS): Update.
5710         (COMMON_SFILES): Add inflow.c.
5711         (SFILES): Remove inflow.c.
5712
5713 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5714
5715         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5716
5717 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5718
5719         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5720         get_saveloc_name, is_signal_frame_name, step_name,
5721         init_remote_name, create_addr_space_name,
5722         destroy_addr_space_name, search_unwind_table_name,
5723         find_dyn_list_name): Constify.
5724
5725 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5726
5727         * darwin-nat.c (darwin_pthread_kill): New function.
5728         (darwin_resume_thread): Use darwin_pthread_kill.
5729
5730 2018-07-05  Tom de Vries  <tdevries@suse.de>
5731
5732         * macroexp.c (macro_buffer) <operator=>: New member function.
5733
5734 2018-07-04  Tom Tromey  <tom@tromey.com>
5735
5736         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5737
5738 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5739
5740         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5741         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5742         * maint.c: Likewise.
5743         * top.c: Likewise.
5744
5745 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5746
5747         * NEWS: Create a new section for the next release branch.
5748         Rename the section of the current branch, now that it has
5749         been cut.
5750
5751 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5752
5753         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5754         * version.in: Bump version to 8.2.50.DATE-git.
5755
5756 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5757             Pedro Alves  <palves@redhat.com>
5758
5759         * linux-nat.c (linux_init_ptrace): Rename to ...
5760         (linux_init_ptrace_procfs): ... this.  Call
5761         linux_proc_init_warnings.
5762         (linux_nat_target::post_attach)
5763         (linux_nat_target::post_startup_inferior): Adjust.
5764         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5765         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5766
5767 2018-07-04  Tom de Vries  <tdevries@suse.de>
5768
5769         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5770         check ...
5771         (read_comp_unit_head): ... here.
5772
5773 2018-07-03  Tom Tromey  <tom@tromey.com>
5774
5775         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5776         (stop_tracing, tstatus_command)
5777         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5778         (print_one_static_tracepoint_marker): Update.
5779         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5780         std::vector.
5781         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5782         VEC.
5783         (all_tracepoints, static_tracepoints_here): Return std::vector.
5784
5785 2018-07-03  Tom Tromey  <tom@tromey.com>
5786
5787         * common/ptid.c (ptid_equal): Remove.
5788         * common/ptid.h (ptid_equal): Don't declare.
5789         * ada-tasks.c: Update.
5790         * breakpoint.c: Update.
5791         * common/agent.c: Update.
5792         * corelow.c: Update.
5793         * darwin-nat-info.c: Update.
5794         * darwin-nat.c: Update.
5795         * dcache.c: Update.
5796         * dtrace-probe.c: Update.
5797         * dummy-frame.c: Update.
5798         * fbsd-nat.c: Update.
5799         * frame.c: Update.
5800         * gdbthread.h: Update.
5801         * gnu-nat.c: Update.
5802         * go32-nat.c: Update.
5803         * inf-loop.c: Update.
5804         * inf-ptrace.c: Update.
5805         * infcall.c: Update.
5806         * infcmd.c: Update.
5807         * inflow.c: Update.
5808         * infrun.c: Update.
5809         * linux-fork.c: Update.
5810         * linux-nat.c: Update.
5811         * linux-thread-db.c: Update.
5812         * mi/mi-cmd-var.c: Update.
5813         * mi/mi-interp.c: Update.
5814         * mi/mi-main.c: Update.
5815         * nto-procfs.c: Update.
5816         * ppc-linux-tdep.c: Update.
5817         * procfs.c: Update.
5818         * python/py-inferior.c: Update.
5819         * python/py-record-btrace.c: Update.
5820         * python/py-record.c: Update.
5821         * ravenscar-thread.c: Update.
5822         * regcache.c: Update.
5823         * remote-sim.c: Update.
5824         * remote.c: Update.
5825         * sol-thread.c: Update.
5826         * solib.c: Update.
5827         * target.c: Update.
5828         * tui/tui-stack.c: Update.
5829         * varobj.c: Update.
5830         * windows-nat.c: Update.
5831         * windows-tdep.c: Update.
5832
5833 2018-07-03  Tom Tromey  <tom@tromey.com>
5834
5835         * common/ptid.c (ptid_match): Remove.
5836         * common/ptid.h (ptid_match): Don't declare.
5837         * fbsd-nat.c: Update.
5838         * infcmd.c: Update.
5839         * infrun.c: Update.
5840         * linux-nat.c: Update.
5841         * record-btrace.c: Update.
5842         * regcache.c: Update.
5843         * remote.c: Update.
5844
5845 2018-07-03  Tom Tromey  <tom@tromey.com>
5846
5847         * common/ptid.c (ptid_tid_p): Remove.
5848         * common/ptid.h (ptid_tid_p): Don't declare.
5849         * sol-thread.c: Update.
5850
5851 2018-07-03  Tom Tromey  <tom@tromey.com>
5852
5853         * common/ptid.c (ptid_lwp_p): Remove.
5854         * common/ptid.h (ptid_lwp_p): Don't declare.
5855         * fbsd-nat.c: Update.
5856         * linux-nat.c: Update.
5857         * nat/linux-procfs.c: Update.
5858         * nat/x86-linux-dregs.c: Update.
5859         * sol-thread.c: Update.
5860
5861 2018-07-03  Tom Tromey  <tom@tromey.com>
5862
5863         * common/ptid.c (ptid_is_pid): Remove.
5864         * common/ptid.h (ptid_is_pid): Don't declare.
5865         * infrun.c: Update.
5866         * linux-nat.c: Update.
5867         * mi/mi-interp.c: Update.
5868         * remote.c: Update.
5869         * thread.c: Update.
5870
5871 2018-07-03  Tom Tromey  <tom@tromey.com>
5872
5873         * common/ptid.c (ptid_get_tid): Remove.
5874         * common/ptid.h (ptid_get_tid): Don't declare.
5875         * ada-tasks.c: Update.
5876         * aix-thread.c: Update.
5877         * bsd-uthread.c: Update.
5878         * darwin-nat.c: Update.
5879         * fbsd-nat.c: Update.
5880         * i386-darwin-nat.c: Update.
5881         * infrun.c: Update.
5882         * linux-tdep.c: Update.
5883         * nto-procfs.c: Update.
5884         * ppc-ravenscar-thread.c: Update.
5885         * python/py-infthread.c: Update.
5886         * ravenscar-thread.c: Update.
5887         * sol-thread.c: Update.
5888         * sparc-ravenscar-thread.c: Update.
5889         * windows-nat.c: Update.
5890
5891 2018-07-03  Tom Tromey  <tom@tromey.com>
5892
5893         * common/ptid.c (ptid_get_lwp): Remove.
5894         * common/ptid.h (ptid_get_lwp): Don't declare.
5895         * aarch64-linux-nat.c: Update.
5896         * ada-tasks.c: Update.
5897         * aix-thread.c: Update.
5898         * amd64-linux-nat.c: Update.
5899         * arm-linux-nat.c: Update.
5900         * corelow.c: Update.
5901         * fbsd-nat.c: Update.
5902         * fbsd-tdep.c: Update.
5903         * gnu-nat.c: Update.
5904         * i386-cygwin-tdep.c: Update.
5905         * i386-gnu-nat.c: Update.
5906         * i386-linux-nat.c: Update.
5907         * ia64-linux-nat.c: Update.
5908         * inf-ptrace.c: Update.
5909         * infrun.c: Update.
5910         * linux-fork.c: Update.
5911         * linux-nat.c: Update.
5912         * linux-tdep.c: Update.
5913         * linux-thread-db.c: Update.
5914         * mips-linux-nat.c: Update.
5915         * nat/aarch64-linux-hw-point.c: Update.
5916         * nat/aarch64-linux.c: Update.
5917         * nat/linux-btrace.c: Update.
5918         * nat/linux-osdata.c: Update.
5919         * nat/linux-procfs.c: Update.
5920         * nat/x86-linux-dregs.c: Update.
5921         * obsd-nat.c: Update.
5922         * ppc-fbsd-nat.c: Update.
5923         * ppc-linux-nat.c: Update.
5924         * procfs.c: Update.
5925         * python/py-infthread.c: Update.
5926         * ravenscar-thread.c: Update.
5927         * remote.c: Update.
5928         * s390-linux-nat.c: Update.
5929         * sol-thread.c: Update.
5930         * sol2-tdep.c: Update.
5931         * spu-linux-nat.c: Update.
5932         * x86-linux-nat.c: Update.
5933         * xtensa-linux-nat.c: Update.
5934
5935 2018-07-03  Tom Tromey  <tom@tromey.com>
5936
5937         * common/ptid.c (ptid_get_pid): Remove.
5938         * common/ptid.h (ptid_get_pid): Don't declare.
5939         * aarch64-linux-nat.c: Update.
5940         * ada-lang.c: Update.
5941         * aix-thread.c: Update.
5942         * alpha-bsd-nat.c: Update.
5943         * amd64-fbsd-nat.c: Update.
5944         * amd64-linux-nat.c: Update.
5945         * arm-linux-nat.c: Update.
5946         * arm-nbsd-nat.c: Update.
5947         * auxv.c: Update.
5948         * break-catch-syscall.c: Update.
5949         * breakpoint.c: Update.
5950         * bsd-uthread.c: Update.
5951         * corelow.c: Update.
5952         * ctf.c: Update.
5953         * darwin-nat.c: Update.
5954         * fbsd-nat.c: Update.
5955         * fbsd-tdep.c: Update.
5956         * gcore.c: Update.
5957         * gnu-nat.c: Update.
5958         * hppa-nbsd-nat.c: Update.
5959         * hppa-obsd-nat.c: Update.
5960         * i386-fbsd-nat.c: Update.
5961         * ia64-linux-nat.c: Update.
5962         * inf-ptrace.c: Update.
5963         * infcmd.c: Update.
5964         * inferior.c: Update.
5965         * inferior.h: Update.
5966         * inflow.c: Update.
5967         * infrun.c: Update.
5968         * linux-fork.c: Update.
5969         * linux-nat.c: Update.
5970         * linux-tdep.c: Update.
5971         * linux-thread-db.c: Update.
5972         * m68k-bsd-nat.c: Update.
5973         * mi/mi-interp.c: Update.
5974         * mi/mi-main.c: Update.
5975         * mips-linux-nat.c: Update.
5976         * mips-nbsd-nat.c: Update.
5977         * mips64-obsd-nat.c: Update.
5978         * nat/aarch64-linux-hw-point.c: Update.
5979         * nat/aarch64-linux.c: Update.
5980         * nat/linux-btrace.c: Update.
5981         * nat/linux-osdata.c: Update.
5982         * nat/linux-procfs.c: Update.
5983         * nat/x86-linux-dregs.c: Update.
5984         * nto-procfs.c: Update.
5985         * obsd-nat.c: Update.
5986         * ppc-linux-nat.c: Update.
5987         * ppc-nbsd-nat.c: Update.
5988         * ppc-obsd-nat.c: Update.
5989         * proc-service.c: Update.
5990         * procfs.c: Update.
5991         * python/py-inferior.c: Update.
5992         * python/py-infthread.c: Update.
5993         * ravenscar-thread.c: Update.
5994         * record.c: Update.
5995         * remote-sim.c: Update.
5996         * remote.c: Update.
5997         * rs6000-nat.c: Update.
5998         * s390-linux-nat.c: Update.
5999         * sh-nbsd-nat.c: Update.
6000         * sol-thread.c: Update.
6001         * sparc-nat.c: Update.
6002         * sparc64-tdep.c: Update.
6003         * spu-linux-nat.c: Update.
6004         * spu-tdep.c: Update.
6005         * target-debug.h: Update.
6006         * target.c: Update.
6007         * thread.c: Update.
6008         * tid-parse.c: Update.
6009         * tracefile-tfile.c: Update.
6010         * vax-bsd-nat.c: Update.
6011         * windows-nat.c: Update.
6012         * x86-linux-nat.c: Update.
6013         * x86-nat.c: Update.
6014
6015 2018-07-03  Tom Tromey  <tom@tromey.com>
6016
6017         * common/ptid.c (pid_to_ptid): Remove.
6018         * common/ptid.h (pid_to_ptid): Don't declare.
6019         * aix-thread.c: Update.
6020         * arm-linux-nat.c: Update.
6021         * common/ptid.c: Update.
6022         * common/ptid.h: Update.
6023         * corelow.c: Update.
6024         * ctf.c: Update.
6025         * darwin-nat.c: Update.
6026         * fbsd-nat.c: Update.
6027         * fork-child.c: Update.
6028         * gnu-nat.c: Update.
6029         * go32-nat.c: Update.
6030         * inf-ptrace.c: Update.
6031         * infcmd.c: Update.
6032         * inferior.c: Update.
6033         * infrun.c: Update.
6034         * linux-fork.c: Update.
6035         * linux-nat.c: Update.
6036         * nat/aarch64-linux-hw-point.c: Update.
6037         * nat/fork-inferior.c: Update.
6038         * nat/x86-linux-dregs.c: Update.
6039         * nto-procfs.c: Update.
6040         * obsd-nat.c: Update.
6041         * procfs.c: Update.
6042         * progspace.c: Update.
6043         * remote.c: Update.
6044         * rs6000-nat.c: Update.
6045         * s390-linux-nat.c: Update.
6046         * sol-thread.c: Update.
6047         * spu-linux-nat.c: Update.
6048         * target.c: Update.
6049         * top.c: Update.
6050         * tracefile-tfile.c: Update.
6051         * windows-nat.c: Update.
6052
6053 2018-07-03  Tom Tromey  <tom@tromey.com>
6054
6055         * common/ptid.h (ptid_build): Don't declare.
6056         * common/ptid.c (ptid_build): Remove.
6057         * aix-thread.c: Update.
6058         * bsd-kvm.c: Update.
6059         * bsd-uthread.c: Update.
6060         * common/agent.c: Update.
6061         * common/ptid.c: Update.
6062         * common/ptid.h: Update.
6063         * corelow.c: Update.
6064         * darwin-nat.c: Update.
6065         * fbsd-nat.c: Update.
6066         * gnu-nat.c: Update.
6067         * linux-fork.c: Update.
6068         * linux-nat.c: Update.
6069         * linux-thread-db.c: Update.
6070         * nat/linux-osdata.c: Update.
6071         * nat/linux-procfs.c: Update.
6072         * nto-procfs.c: Update.
6073         * obsd-nat.c: Update.
6074         * proc-service.c: Update.
6075         * procfs.c: Update.
6076         * ravenscar-thread.c: Update.
6077         * remote-sim.c: Update.
6078         * remote.c: Update.
6079         * sol-thread.c: Update.
6080         * target.c: Update.
6081         * windows-nat.c: Update.
6082
6083 2018-07-03  Tom Tromey  <tom@tromey.com>
6084
6085         * infrun.c (follow_exec): Use exit_inferior_silent.
6086         * inferior.c (exit_inferior_num_silent): Remove.
6087         * inferior.h (exit_inferior_num_silent): Don't declare.
6088
6089 2018-07-03  Tom Tromey  <tom@tromey.com>
6090
6091         PR cli/23340:
6092         * darwin-nat.c (darwin_attach_pid): Reset inferior and
6093         inferior_ptid on error.
6094
6095 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
6096             Simon Marchi  <simon.marchi@polymtl.ca>
6097
6098         PR tdep/8282
6099         * disasm.h (gdb_disassembler): Add
6100         `m_disassembler_options_holder'. member
6101         * disasm.c (get_all_disassembler_options): New function.
6102         (gdb_disassembler::gdb_disassembler): Use it.
6103         (gdb_buffered_insn_length_init_dis): Likewise.
6104         (gdb_buffered_insn_length): Adjust accordingly.
6105         (set_disassembler_options): Handle options with arguments.
6106         (show_disassembler_options_sfunc): Likewise.  Add a leading new
6107         line if showing options with descriptions.
6108         (disassembler_options_completer): Adapt to using the
6109         `disasm_options_and_args_t' structure.
6110         * mips-tdep.c (mips_disassembler_options): New variable.
6111         (mips_disassembler_options_o32): Likewise.
6112         (mips_disassembler_options_n32): Likewise.
6113         (mips_disassembler_options_n64): Likewise.
6114         (gdb_print_insn_mips): Don't set `disassembler_options'.
6115         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6116         functions.
6117         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6118         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
6119         `gdbarch_disassembler_options_implicit' and
6120         `gdbarch_valid_disassembler_options'.
6121         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6122         `disasm_options_and_args_t' structure.
6123         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6124         method.
6125         (valid_disassembler_options): Switch from `disasm_options_t' to
6126         the `disasm_options_and_args_t' structure.
6127         * NEWS: Document `set disassembler-options' support for the MIPS
6128         target.
6129         * gdbarch.h: Regenerate.
6130         * gdbarch.c: Regenerate.
6131
6132 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6133
6134         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6135
6136 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
6137
6138         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6139         parameter in call to amd64_target_description.
6140         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6141         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6142         (amd64fbsd_init_abi): Likewise.
6143         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6144         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6145         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6146         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6147
6148 2018-06-29  Pedro Alves  <palves@redhat.com>
6149
6150         * gdb/amd64-tdep.h (amd64_create_target_description): Add
6151         "segments" parameter.
6152         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6153         (_initialize_amd64_tdep): Update call to
6154         amd64_create_target_description.
6155         (amd64_target_description): Add "segments" parameter.  Adjust
6156         the implementation to use it.
6157         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6158         call to amd64_create_target_description.
6159         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6160         * gdb/arch/amd64.h (amd64_create_target_description): Add
6161         "segments" register.
6162         * gdb/arch/amd64.c (amd64_create_target_description): Add
6163         "segments" parameter.  Call create_feature_i386_64bit_segments
6164         only if SEGMENTS is true.
6165         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6166         call to amd64_create_target_description.
6167
6168 2018-06-29  Pedro Alves  <palves@redhat.com>
6169
6170         * thread.c (thread_target_id_str): New, factored out from ...
6171         (print_thread_info_1): ... here.  Use it to compute the max
6172         "Target Id" column width.
6173
6174 2018-06-29  Pedro Alves  <palves@redhat.com>
6175
6176         * remote.c (remote_target::extra_thread_info): Delete
6177         'display_buf' and 'n' locals.  from the cache, regardless of
6178         packet mechanims is in use.  Use cache for qThreadExtra and qP
6179         methods too.
6180
6181 2018-06-29  Pedro Alves  <palves@redhat.com>
6182
6183         * blockframe.c (find_pc_sect_containing_function): New function.
6184         * breakpoint.c (print_breakpoint_location): Don't call
6185         find_pc_sect_function.
6186         * linespec.c (create_sals_line_offset): Record the location's
6187         symbol in the sal.
6188         * linespec.c (convert_address_location_to_sals): Fill in sal's
6189         symbol with find_pc_sect_containing_function.
6190         * symtab.c (find_function_start_sal): Rename to ...
6191         (find_function_start_sal_1): ... this.
6192         (find_function_start_sal): Reimplement as wrapper around
6193         find_function_start_sal_1, and use
6194         find_pc_sect_containing_function to fill in the sal's symbol.
6195         (find_function_start_sal(symbol*, bool)): Adjust.
6196         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6197         comments.
6198         (find_pc_sect_containing_function): Declare.
6199
6200 2018-06-29  Pedro Alves  <palves@redhat.com>
6201
6202         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6203         true if the the location has no symbol.
6204
6205 2018-06-28  Tom Tromey  <tom@tromey.com>
6206
6207         * NEWS: Mention --enable-codesign.
6208         * silent-rules.mk (ECHO_SIGN): New variable.
6209         * configure.ac: Add --enable-codesign.
6210         * configure: Rebuild.
6211         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6212         (gdb$(EXEEXT)): Optionally invoke codesign.
6213
6214 2018-06-28  Pedro Alves  <palves@redhat.com>
6215
6216         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6217         comments.
6218         (switch_to_thread_no_regs): Adjust comment.
6219         * infcmd.c (stop_pc): Delete.
6220         (post_create_inferior, info_program_command): Replace references
6221         to stop_pc with references to thread_info->suspend.stop_pc.
6222         * inferior.h (stop_pc): Delete declaration.
6223         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6224         (handle_inferior_event_1, handle_signal_stop)
6225         (process_event_stop_test, keep_going_stepped_thread)
6226         (handle_step_into_function, handle_step_into_function_backward)
6227         (print_stop_location): Replace references to stop_pc with
6228         references to thread_info->suspend.stop_pc.
6229         (struct infcall_suspend_state) <stop_pc>: Delete field.
6230         (save_infcall_suspend_state, restore_infcall_suspend_state):
6231         Remove references to inf_stat->stop_pc.
6232         * linux-fork.c (fork_load_infrun_state): Likewise.
6233         * record-btrace.c (record_btrace_set_replay): Likewise.
6234         * record-full.c (record_full_goto_entry): Likewise.
6235         * remote.c (print_one_stopped_thread): Likewise.
6236         * target.c (target_resume): Extend comment.
6237         * thread.c (set_executing_thread): New.
6238         (set_executing): Use it.
6239         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6240         Remove references to stop_pc.
6241
6242 2018-06-28  Pedro Alves  <palves@redhat.com>
6243
6244         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6245         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6246
6247 2018-06-28  Tom Tromey  <tom@tromey.com>
6248
6249         * coffread.c (coff_symfile_finish): Update.
6250         * xcoffread.c (xcoff_symfile_finish): Update.
6251         * elfread.c (elf_symfile_finish): Update.
6252         * symfile.h (dwarf2_free_objfile): Don't declare.
6253         * dwarf2read.c (_initialize_dwarf2_read): Use
6254         register_objfile_data_with_cleanup.
6255         (dwarf2_free_objfile): Now static.  Change signature.
6256
6257 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6258
6259         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6260         option "-o" to add-symbol-file-load to add an offset to each
6261         section's load address.
6262         * symfile.c (set_objfile_default_section_offset): New function.
6263
6264 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6265
6266         * symfile.c (add_symbol_file_command): Make sure that sections
6267         with the same name are sorted in the same order.
6268
6269 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6270
6271         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6272         require the second argument.  If omitted, load sections at the
6273         addresses specified in the file.
6274
6275 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6276
6277         * symfile.c (symbol_file_command, symbol_file_add_main_1)
6278         (_initialize_symfile): Add option "-o" to symbol-file to add an
6279         offset to each section of the symbol file.
6280
6281 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6282
6283         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6284
6285 2018-06-27  Tom Tromey  <tom@tromey.com>
6286
6287         * stack.c (_initialize_stack): Update "func" help text.
6288
6289 2018-06-27  Tom Tromey  <tom@tromey.com>
6290
6291         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6292         std::vector.
6293         (unwind_infopy_str, pyuw_create_unwind_info)
6294         (unwind_infopy_add_saved_register, pyuw_sniffer)
6295         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6296         Update.
6297         (struct saved_reg): Add constructor.
6298         <value>: Now a gdbpy_ref<>.
6299
6300 2018-06-27  Tom Tromey  <tom@tromey.com>
6301
6302         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6303
6304 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6305
6306         * gdb-gdb.py.in: Format using autopep8.
6307
6308 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6309
6310         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6311         (type_lookup_function): Recognize CORE_ADDR values.
6312
6313 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6314
6315         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6316         print tag_name.
6317
6318 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6319
6320         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6321         <__lt__>: Add.
6322
6323 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6324
6325         * gdb-gdb.py: Move to...
6326         * gdb-gdb.py.in: ... here.
6327         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6328         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6329         dependencies.
6330         (distclean): Remove gdb-gdb.py when cleaning.
6331         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6332         * configure: Re-generate.
6333
6334 2018-06-27  Pedro Alves  <palves@redhat.com>
6335
6336         * proc-service.c (get_ps_regcache): New.
6337         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6338         (ps_lsetfpregs): Use it.
6339
6340 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6341
6342         PR gdb/21695
6343         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6344         (dwarf_decode_lines_1): Adjust.
6345
6346 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6347
6348         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6349         override.
6350         <info_proc>: Likewise.
6351
6352 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6353
6354         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6355         to windows_fetch_one_register, and only handle the case of
6356         fetching one register.  Move the code that reloads the context
6357         and iterates over all registers if R is negative to...
6358         (windows_nat_target::fetch_registers): ... here.
6359         (do_windows_store_inferior_registers): Rename to
6360         windows_store_one_register, and only handle the case of storing
6361         one register.  Move the code that handles the case where r is
6362         negative to...
6363         (windows_nat_target::store_registers) ... here.
6364
6365 2018-06-26  Tom Tromey  <tom@tromey.com>
6366
6367         PR rust/22574:
6368         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6369         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6370         Update.
6371         (rust_internal_print_type): Add podata parameter.
6372         (rust_print_type): Update.
6373
6374 2018-06-26  Tom Tromey  <tom@tromey.com>
6375
6376         * typeprint.h (struct print_offset_data) <update, finish,
6377         maybe_print_hole>: New methods.
6378         <indentation>: New constant.
6379         * typeprint.c (print_offset_data::indentation): Define.
6380         (print_offset_data::maybe_print_hole, print_offset_data::update)
6381         (print_offset_data::finish): Move from c-typeprint.c and rename.
6382         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6383         (print_spaces_filtered_with_print_options): Update.
6384         (c_print_type_union_field_offset, maybe_print_hole)
6385         (c_print_type_struct_field_offset): Move to typeprint.c and
6386         rename.
6387         (c_type_print_base_struct_union): Update.
6388
6389 2018-06-25  Pedro Alves  <palves@redhat.com>
6390
6391         * gdbthread.h (thread_info_ref, delete_thread)
6392         (delete_thread_silent, first_thread_of_inferior)
6393         (any_thread_of_inferior, switch_to_thread)
6394         (enable_thread_stack_temporaries)
6395         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6396         (get_last_thread_stack_temporary)
6397         (value_in_thread_stack_temporaries, can_access_registers_thread):
6398         Spell out "struct thread_info" instead of just "thread_info".
6399         * inferior.h (notice_new_inferior): Likewise.
6400
6401 2018-06-25  Pedro Alves  <palves@redhat.com>
6402
6403         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6404         pass thread_info pointer to delete_thread.
6405         (windows_nat_target::detach): Pass inferior pointer to
6406         detach_inferior.
6407         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6408         delete_thread.
6409         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6410         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6411         and pass a thread_info pointer to delete_thread.
6412         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6413         pass thread_info pointer to delete_thread.
6414         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6415         delete_thread_silent call.
6416         * procfs.c (procfs_target::detach): Pass inferior pointer to
6417         detach_inferior.
6418         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6419         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6420         delete_thread_silent call.
6421         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6422         pass thread_info pointer to delete_thread.
6423         (windows_nat_target::detach): Pass inferior pointer to
6424         delete_inferior.
6425
6426 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6427
6428         * regcache.c (readable_regcache::read_part): Fix asserts.
6429         (reg_buffer::raw_collect_part): New function.
6430         (regcache::write_part): Fix asserts.
6431         (reg_buffer::raw_supply_part): New function.
6432         (regcache::transfer_regset_register): New helper function.
6433         (regcache::transfer_regset): Call new functions.
6434         (regcache_supply_regset): Use gdb_byte*.
6435         (regcache::supply_regset): Likewise.
6436         (regcache_collect_regset): Likewise.
6437         (regcache::collect_regset): Likewise.
6438         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6439         (reg_buffer::raw_supply_part): Likewise.
6440         (regcache::transfer_regset_register): Likewise.
6441         (regcache::transfer_regset): Use gdb_byte*.
6442
6443 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6444
6445         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6446
6447 2018-06-21  Pedro Alves  <palves@redhat.com>
6448
6449         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6450         instead of a ptid_t.  All callers adjusted.
6451         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6452         adjusted.
6453         (print_ada_task_info, display_current_task_id, task_command_1):
6454         Adjust.
6455         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6456         inferior_thread.
6457         (breakpoint_kind): Adjust.
6458         (remove_breakpoints_pid): Rename to ...
6459         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6460         pointer.  All callers adjusted.
6461         (bpstat_clear_actions): Use inferior_thread.
6462         (get_bpstat_thread): New.
6463         (bpstat_do_actions): Use it.
6464         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6465         to take a thread_info pointer.  All callers adjusted.
6466         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6467         (breakpoint_re_set_thread): Use inferior_thread.
6468         * breakpoint.h (struct inferior): Forward declare.
6469         (bpstat_stop_status): Update.
6470         (remove_breakpoints_pid): Delete.
6471         (remove_breakpoints_inf): New.
6472         * bsd-uthread.c (bsd_uthread_target::wait)
6473         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6474         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6475         (maint_btrace_packet_history_cmd)
6476         (maint_btrace_clear_packet_history_cmd): Adjust.
6477         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6478         inferior_thread.
6479         * cli/cli-interp.c: Include "inferior.h".
6480         * common/refcounted-object.h (struct
6481         refcounted_object_ref_policy): New.
6482         * compile/compile-object-load.c: Include gdbthread.h.
6483         (store_regs): Use inferior_thread.
6484         * corelow.c (core_target::close): Use current_inferior.
6485         (core_target_open): Adjust to use first_thread_of_inferior and use
6486         the current inferior.
6487         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6488         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6489         <thread>: ... this new field.  All references adjusted.
6490         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6491         Take a thread_info pointer instead of a ptid_t.
6492         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6493         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6494         thread_info pointer instead of a ptid_t.
6495         * elfread.c: Include "inferior.h".
6496         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6497         Use inferior_thread.
6498         * eval.c (evaluate_subexp): Likewise.
6499         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6500         inferior_thread.
6501         * gdb_proc_service.h (struct thread_info): Forward declare.
6502         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6503         <thread>: ... this new field.  All references adjusted.
6504         * gdbarch.h, gdbarch.c: Regenerate.
6505         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6506         'thread' parameter.  All implementations and callers adjusted.
6507         * gdbthread.h (thread_info) <set_running>: New method.
6508         (delete_thread, delete_thread_silent): Take a thread_info pointer
6509         instead of a ptid.
6510         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6511         (first_thread_of_process): Delete, replaced by ...
6512         (first_thread_of_inferior): ... this new function.  All callers
6513         adjusted.
6514         (any_live_thread_of_process): Delete, replaced by ...
6515         (any_live_thread_of_inferior): ... this new function.  All callers
6516         adjusted.
6517         (switch_to_thread, switch_to_no_thread): Declare.
6518         (is_executing): Delete.
6519         (enable_thread_stack_temporaries): Update comment.
6520         <enable_thread_stack_temporaries>: Take a thread_info pointer
6521         instead of a ptid_t.  Incref the thread.
6522         <~enable_thread_stack_temporaries>: Decref the thread.
6523         <m_ptid>: Delete
6524         <m_thr>: New.
6525         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6526         (get_last_thread_stack_temporary)
6527         (value_in_thread_stack_temporaries, can_access_registers_thread):
6528         Take a thread_info pointer instead of a ptid_t.  All callers
6529         adjusted.
6530         * infcall.c (get_call_return_value): Use inferior_thread.
6531         (run_inferior_call): Work with thread pointers instead of ptid_t.
6532         (call_function_by_hand_dummy): Work with thread pointers instead
6533         of ptid_t.  Use thread_info_ref.
6534         * infcmd.c (proceed_thread_callback): Access thread's state
6535         directly.
6536         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6537         access thread's state directly.
6538         (continue_command): Use inferior_thread.
6539         (info_program_command): Use find_thread_ptid and access thread
6540         state directly.
6541         (proceed_after_attach_callback): Use thread state directly.
6542         (notice_new_inferior): Take a thread_info pointer instead of a
6543         ptid_t.  All callers adjusted.
6544         (exit_inferior): Take an inferior pointer instead of a pid.  All
6545         callers adjusted.
6546         (exit_inferior_silent): New.
6547         (detach_inferior): Delete.
6548         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6549         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6550         (detach_inferior_command, kill_inferior_command): Use
6551         find_inferior_id instead of valid_gdb_inferior_id and
6552         gdb_inferior_id_to_pid.
6553         (inferior_command): Use inferior and thread pointers.
6554         * inferior.h (struct thread_info): Forward declare.
6555         (notice_new_inferior): Take a thread_info pointer instead of a
6556         ptid_t.  All callers adjusted.
6557         (detach_inferior): Delete declaration.
6558         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6559         instead of a pid.  All callers adjusted.
6560         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6561         (valid_gdb_inferior_id): Delete.
6562         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6563         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6564         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6565         ...
6566         <inf>: ... this new field.
6567         <step_ptid>: Delete, replaced by ...
6568         <step_thread>: ... this new field.
6569         (get_displaced_stepping_state): Take an inferior pointer instead
6570         of a pid.  All callers adjusted.
6571         (displaced_step_in_progress_any_inferior): Adjust.
6572         (displaced_step_in_progress_thread): Take a thread pointer instead
6573         of a ptid_t.  All callers adjusted.
6574         (displaced_step_in_progress, add_displaced_stepping_state): Take
6575         an inferior pointer instead of a pid.  All callers adjusted.
6576         (get_displaced_step_closure_by_addr): Adjust.
6577         (remove_displaced_stepping_state): Take an inferior pointer
6578         instead of a pid.  All callers adjusted.
6579         (displaced_step_prepare_throw, displaced_step_prepare)
6580         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6581         All callers adjusted.
6582         (start_step_over): Adjust.
6583         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6584         displaced step queue.
6585         (do_target_resume): Adjust.
6586         (fetch_inferior_event): Use inferior_thread.
6587         (context_switch, get_inferior_stop_soon): Take an
6588         execution_control_state pointer instead of a ptid_t.  All callers
6589         adjusted.
6590         (switch_to_thread_cleanup): Delete.
6591         (stop_all_threads): Use scoped_restore_current_thread.
6592         * inline-frame.c: Include "gdbthread.h".
6593         (inline_state) <inline_state>: Take a thread pointer instead of a
6594         ptid_t.  All callers adjusted.
6595         <ptid>: Delete, replaced by ...
6596         <thread>: ... this new field.
6597         (find_inline_frame_state): Take a thread pointer instead of a
6598         ptid_t.  All callers adjusted.
6599         (skip_inline_frames, step_into_inline_frame)
6600         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6601         pointer instead of a ptid_t.  All callers adjusted.
6602         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6603         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6604         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6605         pointers directly.
6606         * linux-nat.c (get_detach_signal): Likewise.
6607         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6608         (thread_db_notice_clone): Adjust.
6609         (thread_db_find_new_threads_silently)
6610         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6611         a thread pointer instead of a ptid_t.  All callers adjusted.
6612         * mi/mi-cmd-var.c: Include "inferior.h".
6613         (mi_cmd_var_update_iter): Update to use thread pointers.
6614         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6615         inferior directly.
6616         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6617         out to ...
6618         (mi_output_running): ... this new function.
6619         (mi_on_resume_1): Adjust to use it.
6620         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6621         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6622         directly.
6623         (interrupt_thread_callback): : Adjust to use thread and inferior
6624         pointers.
6625         * proc-service.c: Include "gdbthread.h".
6626         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6627         * progspace-and-thread.c: Include "inferior.h".
6628         * progspace.c: Include "inferior.h".
6629         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6630         hold a reference to an inferior_object.
6631         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6632         inferior_thread.
6633         * python/py-inferior.c (struct inferior_object): Give the type a
6634         tag name instead of a typedef.
6635         (python_on_normal_stop): No need to check if the current thread is
6636         listed.
6637         (inferior_to_inferior_object): Change return type to
6638         inferior_object.  All callers adjusted.
6639         (find_thread_object): Delete, bits factored out to ...
6640         (thread_to_thread_object): ... this new function.
6641         * python/py-infthread.c (create_thread_object): Use
6642         inferior_to_inferior_object.
6643         (thpy_is_stopped): Use thread pointer directly.
6644         (gdbpy_selected_thread): Use inferior_thread.
6645         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6646         field, replaced with ...
6647         <thread>: ... this new field.  All users adjusted.
6648         (btpy_insn_or_gap_new): Drop const.
6649         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6650         callers adjusted.
6651         * python/py-record.c: Include "gdbthread.h".
6652         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6653         a ptid_t.  All callers adjusted.
6654         (gdbpy_current_recording): Use inferior_thread.
6655         * python/py-record.h (recpy_record_object) <ptid>: Delete
6656         field, replaced with ...
6657         <thread>: ... this new field.  All users adjusted.
6658         (recpy_element_object) <ptid>: Delete
6659         field, replaced with ...
6660         <thread>: ... this new field.  All users adjusted.
6661         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6662         a ptid_t.  All callers adjusted.
6663         * python/py-threadevent.c: Include "gdbthread.h".
6664         (get_event_thread): Use thread_to_thread_object.
6665         * python/python-internal.h (struct inferior_object): Forward
6666         declare.
6667         (find_thread_object, find_inferior_object): Delete declarations.
6668         (thread_to_thread_object, inferior_to_inferior_object): New
6669         declarations.
6670         * record-btrace.c: Include "inferior.h".
6671         (require_btrace_thread): Use inferior_thread.
6672         (record_btrace_frame_sniffer)
6673         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6674         (get_thread_current_frame): Use scoped_restore_current_thread and
6675         switch_to_thread.
6676         (get_thread_current_frame): Use thread pointer directly.
6677         (record_btrace_replay_at_breakpoint): Use thread's inferior
6678         pointer directly.
6679         * record-full.c: Include "inferior.h".
6680         * regcache.c: Include "gdbthread.h".
6681         (get_thread_arch_regcache): Use the inferior's address space
6682         directly.
6683         (get_thread_regcache, registers_changed_thread): New.
6684         * regcache.h (get_thread_regcache(thread_info *thread)): New
6685         overload.
6686         (registers_changed_thread): New.
6687         (remote_target) <remote_detach_1>: Swap order of parameters.
6688         (remote_add_thread): <remote_add_thread>: Return the new thread.
6689         (get_remote_thread_info(ptid_t)): New overload.
6690         (remote_target::remote_notice_new_inferior): Use thread pointers
6691         directly.
6692         (remote_target::process_initial_stop_replies): Use
6693         thread_info::set_running.
6694         (remote_target::remote_detach_1, remote_target::detach)
6695         (extended_remote_target::detach): Adjust.
6696         * stack.c (frame_show_address): Use inferior_thread.
6697         * target-debug.h (target_debug_print_thread_info_pp): New.
6698         * target-delegates.c: Regenerate.
6699         * target.c (default_thread_address_space): Delete.
6700         (memory_xfer_partial_1): Use current_inferior.
6701         (target_detach): Use current_inferior.
6702         (target_thread_address_space): Delete.
6703         (generic_mourn_inferior): Use current_inferior.
6704         * target.h (struct target_ops) <thread_address_space>: Delete.
6705         (target_thread_address_space): Delete.
6706         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6707         pointers directly.
6708         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6709         thread pointer instead of a ptid_t.  Adjust all callers.
6710         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6711         (first_thread_of_process): Delete, replaced by ...
6712         (first_thread_of_inferior): ... this new function.  All callers
6713         adjusted.
6714         (any_thread_of_process): Rename to ...
6715         (any_thread_of_inferior): ... this, and take an inferior pointer.
6716         (any_live_thread_of_process): Rename to ...
6717         (any_live_thread_of_inferior): ... this, and take an inferior
6718         pointer.
6719         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6720         (value_in_thread_stack_temporaries)
6721         (get_last_thread_stack_temporary): Take a thread pointer instead
6722         of a ptid_t.  Adjust all callers.
6723         (thread_info::set_running): New.
6724         (validate_registers_access): Use inferior_thread.
6725         (can_access_registers_ptid): Rename to ...
6726         (can_access_registers_thread): ... this, and take a thread
6727         pointer.
6728         (print_thread_info_1): Adjust to compare thread pointers instead
6729         of ptids.
6730         (switch_to_no_thread, switch_to_thread): Make extern.
6731         (scoped_restore_current_thread::~scoped_restore_current_thread):
6732         Use m_thread pointer directly.
6733         (scoped_restore_current_thread::scoped_restore_current_thread):
6734         Use inferior_thread.
6735         (thread_command): Use thread pointer directly.
6736         (thread_num_make_value_helper): Use inferior_thread.
6737         * top.c (execute_command): Use inferior_thread.
6738         * tui/tui-interp.c: Include "inferior.h".
6739         * varobj.c (varobj_create): Use inferior_thread.
6740         (value_of_root_1): Use find_thread_global_id instead of
6741         global_thread_id_to_ptid.
6742
6743 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6744
6745         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6746         possible.
6747         (regcache::write_part): Likewise.
6748         (readable_regcache::cooked_read_part): Update comment.
6749         (readable_regcache::cooked_write_part): Likewise.
6750         * regcache.h: (readable_regcache::read_part): Likewise.
6751         (regcache::write_part): Likewise.
6752
6753 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6754             Dirk Schubert  <dirk.schubert@arm.com>
6755
6756         * aarch64-linux-nat.c (post_attach): New.
6757         (aarch64_linux_nat_target::post_attach): Override post_attach to
6758         record the number of hardware debug registers.
6759
6760 2018-06-20  Tom Tromey  <tom@tromey.com>
6761
6762         * python/py-param.c (add_setshow_generic): Make parameters const.
6763         (parmpy_init): Update.
6764
6765 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6766
6767         * regcache.h (regcache_cooked_read_ftype): Rename to...
6768         (register_read_ftype): ...this, change type to function_view.
6769         (class reg_buffer) <save>: Remove src parameter.
6770         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6771         parameter non-const in first overload.  Remove src parameter in
6772         second overload.
6773         * regcache.c (do_cooked_read): Remove.
6774         (readonly_detached_regcache::readonly_detached_regcache): Make
6775         parameter non-const, adjust call to other constructor.
6776         (reg_buffer::save): Remove src parameter.
6777         * frame.c (do_frame_register_read): Remove.
6778         (frame_save_as_regcache): Use lambda function.
6779         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6780         parameter to ppu2spu_data *.
6781         (ppu2spu_sniffer): Use lambda function.
6782
6783 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6784
6785         * record-full.c (record_full_target::insert_breakpoint): Remove
6786         "struct" keyword, add const.
6787
6788 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6789
6790         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6791         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6792         * configure.ac: Remove AC_PREREQ, add missing quoting.
6793         * gnulib/configure.ac: Modernize usage of
6794         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6795         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6796         (AUTOMAKE_VERSION): Bump to 1.15.1.
6797         * configure: Re-generate.
6798         * config.in: Re-generate.
6799         * aclocal.m4: Re-generate.
6800         * gnulib/aclocal.m4: Re-generate.
6801         * gnulib/config.in: Re-generate.
6802         * gnulib/configure: Re-generate.
6803         * gnulib/import/Makefile.in: Re-generate.
6804
6805 2018-06-19  Pedro Alves  <palves@redhat.com>
6806
6807         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6808         (lookup_minimal_symbol_by_pc_section): ... here with
6809         gdb_assert_not_reached added.
6810
6811 2018-06-19  Pedro Alves  <palves@redhat.com>
6812
6813         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6814         parameter with a block parameter.  Compare location's block symbol
6815         with the frame's block instead of addresses.
6816         (skip_inline_frames): Pass the current block instead of the
6817         frame's address.  Break out as soon as we determine the frame
6818         should not be skipped.
6819
6820 2018-06-18  Tom Tromey  <tom@tromey.com>
6821
6822         * solib-aix.c (solib_aix_get_section_offsets): Return
6823         unique_xmalloc_ptr.
6824         (solib_aix_solib_create_inferior_hook): Update.
6825
6826 2018-06-18  Tom Tromey  <tom@tromey.com>
6827
6828         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6829
6830 2018-06-18  Tom Tromey  <tom@tromey.com>
6831
6832         * solib-frv.c (frv_relocate_main_executable): Use
6833         unique_xmalloc_ptr.
6834         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6835         unique_xmalloc_ptr.
6836
6837 2018-06-18  Tom Tromey  <tom@tromey.com>
6838
6839         * objfiles.h (inhibit_section_map_updates): Update.
6840         (resume_section_map_updates, resume_section_map_updates_cleanup):
6841         Remove.
6842         * solib-svr4.c (svr4_handle_solib_event): Update.
6843         * objfiles.c (inhibit_section_map_updates): Return
6844         scoped_restore_tmpl<int>.
6845         (resume_section_map_updates, resume_section_map_updates_cleanup):
6846         Remove.
6847
6848 2018-06-18  Tom Tromey  <tom@tromey.com>
6849
6850         * valprint.h (read_string): Update.
6851         * valprint.c (read_string): Change type of "buffer".
6852         (val_print_string): Update.
6853         * python/py-value.c (valpy_string): Update.
6854         * language.h (struct language_defn) <la_get_string>: Change
6855         type of "buffer".
6856         (default_get_string, c_get_string): Update.
6857         * language.c (default_get_string): Change type of "buffer".
6858         * guile/scm-value.c (gdbscm_value_to_string): Update.
6859         * c-lang.c (c_get_string): Change type of "buffer".
6860
6861 2018-06-18  Tom Tromey  <tom@tromey.com>
6862
6863         * ser-mingw.c (struct pipe_state_destroyer): New.
6864         (pipe_state_up): New typedef.
6865         (cleanup_pipe_state): Remove.
6866         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6867
6868 2018-06-18  Tom Tromey  <tom@tromey.com>
6869
6870         * rust-lang.h (rust_yyerror): Don't declare.
6871         * rust-lang.c (rust_language_defn): Update.
6872         * rust-exp.y (yyerror): Now static.
6873         * parse.c (parse_exp_in_context_1): Update.
6874         * p-lang.h (p_yyerror): Don't declare.
6875         * p-lang.c (p_language_defn): Update.
6876         * p-exp.y (yyerror): Now static.
6877         * opencl-lang.c (opencl_language_defn): Update.
6878         * objc-lang.c (objc_language_defn): Update.
6879         * m2-lang.h (m2_yyerror): Don't declare.
6880         * m2-lang.c (m2_language_defn): Update.
6881         * m2-exp.y (yyerror): Now static.
6882         * language.h (struct language_defn) <la_error>: Remove.
6883         * language.c (unk_lang_error): Remove.
6884         (unknown_language_defn, auto_language_defn): Remove.
6885         * go-lang.h (go_yyerror): Don't declare.
6886         * go-lang.c (go_language_defn): Update.
6887         * go-exp.y (yyerror): Now static.
6888         * f-lang.h (f_yyerror): Don't declare.
6889         * f-lang.c (f_language_defn): Update.
6890         * f-exp.y (yyerror): Now static.
6891         * d-lang.h (d_yyerror): Don't declare.
6892         * d-lang.c (d_language_defn): Update.
6893         * d-exp.y (yyerror): Now static.
6894         * c-lang.h (c_yyerror): Don't declare.
6895         * c-lang.c (c_language_defn, cplus_language_defn)
6896         (asm_language_defn, minimal_language_defn): Update.
6897         * c-exp.y (yyerror): Now static.
6898         * ada-lang.h (ada_yyerror): Don't declare.
6899         * ada-lang.c (ada_language_defn): Update.
6900         * ada-exp.y (yyerror): Now static.
6901
6902 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6903
6904         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6905         (store_sveregs_to_thread): Likewise.
6906         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6907         (aarch64_linux_store_inferior_registers): Likewise.
6908         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6909         function.
6910         (aarch64_sve_regs_copy_to_regcache): Likewise.
6911         (aarch64_sve_regs_copy_from_regcache): Likewise.
6912         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6913         declaration.
6914         (aarch64_sve_regs_copy_to_regcache): Likewise.
6915         (aarch64_sve_regs_copy_from_regcache): Likewise.
6916         (sve_context): Structure from Linux headers.
6917         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6918         (SVE_SIG_ZREG_SIZE): Likewise.
6919         (SVE_SIG_PREG_SIZE): Likewise.
6920         (SVE_SIG_FFR_SIZE): Likewise.
6921         (SVE_SIG_REGS_OFFSET): Likewise.
6922         (SVE_SIG_ZREGS_OFFSET): Likewise.
6923         (SVE_SIG_ZREG_OFFSET): Likewise.
6924         (SVE_SIG_ZREGS_SIZE): Likewise.
6925         (SVE_SIG_PREGS_OFFSET): Likewise.
6926         (SVE_SIG_PREG_OFFSET): Likewise.
6927         (SVE_SIG_PREGS_SIZE): Likewise.
6928         (SVE_SIG_FFR_OFFSET): Likewise.
6929         (SVE_SIG_REGS_SIZE): Likewise.
6930         (SVE_SIG_CONTEXT_SIZE): Likewise.
6931         (SVE_PT_REGS_MASK): Likewise.
6932         (SVE_PT_REGS_FPSIMD): Likewise.
6933         (SVE_PT_REGS_SVE): Likewise.
6934         (SVE_PT_VL_INHERIT): Likewise.
6935         (SVE_PT_VL_ONEXEC): Likewise.
6936         (SVE_PT_REGS_OFFSET): Likewise.
6937         (SVE_PT_FPSIMD_OFFSET): Likewise.
6938         (SVE_PT_FPSIMD_SIZE): Likewise.
6939         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6940         (SVE_PT_SVE_PREG_SIZE): Likewise.
6941         (SVE_PT_SVE_FFR_SIZE): Likewise.
6942         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6943         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6944         (__SVE_SIG_TO_PT): Likewise.
6945         (SVE_PT_SVE_OFFSET): Likewise.
6946         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6947         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6948         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6949         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6950         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6951         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6952         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6953         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6954         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6955         (SVE_PT_SVE_SIZE): Likewise.
6956         (SVE_PT_SIZE): Likewise.
6957         (HAS_SVE_STATE): New define.
6958
6959 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6960
6961         * nat/aarch64-sve-linux-sigcontext.h: New file.
6962         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6963         new files.
6964         (SVE_VQ_MIN): Likewise.
6965         (SVE_VQ_MAX): Likewise.
6966         (SVE_VL_MIN): Likewise.
6967         (SVE_VL_MAX): Likewise.
6968         (SVE_NUM_ZREGS): Likewise.
6969         (SVE_NUM_PREGS): Likewise.
6970         (sve_vl_valid): Likewise.
6971         (struct user_sve_header): Likewise.
6972
6973 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6974             Richard Bunt <Richard.Bunt@arm.com>
6975
6976         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6977         was requested by GDB.
6978
6979 2018-06-15  Tom de Vries  <tdevries@suse.de>
6980
6981         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6982
6983 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6984
6985         * gnulib/update-gnulib.sh: Print expected versions of
6986         autoconf/aclocal.
6987
6988 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6989
6990         * arch-utils.c (default_type_align): Use type_length_units.
6991         * gdbtypes.c (type_align): Use type_length_units.
6992
6993 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6994
6995         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6996         of 'define' command.
6997
6998 2018-06-14  Tom de Vries  <tdevries@suse.de>
6999
7000         PR cli/22573
7001         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
7002         get_no_prettyformat_print_options.
7003
7004 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
7005
7006         * sparc-nat.h: Include target.h.
7007         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
7008         <fetch_registers>: Remove this argument in function call.
7009         <store_registers>: Remove this argument in function call, remove
7010         extra semicolon.
7011         <low_forget_process>: Call sparc64_forget_process instead of
7012         sparc_forget_process.
7013
7014 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7015
7016         * procfs.c (_initialize_procfs): Use add_inf_child_target.
7017         (procfs_target::make_corefile_notes): Adjust to new
7018         target_read_alloc return type.
7019
7020 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7021             Stephen Roberts  <stephen.roberts@arm.com>
7022
7023         PR gdb/22882
7024         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7025         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7026         Move should_notify_stop local into more inner scope.
7027
7028 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7029             Stephen Roberts  <stephen.roberts@arm.com>
7030
7031         PR gdb/22882
7032         * infrun.c (resume_1): Add call to mark_async_event_handler.
7033
7034 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7035
7036         * infrun.c (do_target_wait): Change old version of $pc printed.
7037
7038 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7039
7040         * dwarf2read.c (read_index_from_section): Rename to...
7041         (read_gdb_index_from_section): ... this, update all callers.
7042         (dwarf2_read_index): Rename to...
7043         (dwarf2_read_gdb_index): ... this, update all callers.
7044
7045 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
7046
7047         * gdb/hppa-linux-nat.c
7048         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7049         hppa_linux_nat_target::fetch_registers.
7050
7051 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7052
7053         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7054         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7055         (AARCH64_DWARF_SVE_FFR): Likewise.
7056         (AARCH64_DWARF_SVE_P0): Likewise.
7057         (AARCH64_DWARF_SVE_Z0): Likewise.
7058
7059 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7060
7061         * common/common-regcache.h (raw_compare): New function.
7062         * regcache.c (regcache::raw_compare): Likewise.
7063         * regcache.h (regcache::raw_compare): New declaration.
7064
7065 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7066
7067         * common/common-regcache.h (reg_buffer_common): New structure.
7068         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7069         (reg_buffer::raw_supply): Likewise.
7070         (reg_buffer::raw_supply_integer): Likewise.
7071         (reg_buffer::raw_supply_zeroed): Likewise.
7072         (reg_buffer::raw_collect): Likewise.
7073         (reg_buffer::raw_collect_integer): Likewise.
7074         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7075         (reg_buffer::raw_supply): Likewise.
7076         (reg_buffer::raw_supply_integer): Likewise.
7077         (reg_buffer::raw_supply_zeroed): Likewise.
7078         (reg_buffer::raw_collect): Likewise.
7079         (reg_buffer::raw_collect_integer): Likewise.
7080
7081 2018-06-10  Tom Tromey  <tom@tromey.com>
7082
7083         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
7084         (class remote_state) <stop_reply_queue>: Now std::vector.
7085         (remote_state::~remote_state)
7086         (remote_target::stop_reply_queue_length): Update.
7087         (struct queue_iter_param, remove_child_of_pending_fork)
7088         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7089         (check_pending_event_prevents_wildcard_vcont_callback)
7090         (remove_stop_reply_for_inferior)
7091         (remove_stop_reply_of_remote_state)
7092         (remote_notif_remove_once_on_match)
7093         (stop_reply_match_ptid_and_ws)
7094         (remote_kill_child_of_pending_fork): Remove.
7095         (remote_target::remove_new_fork_children)
7096         (remote_target::check_pending_events_prevent_wildcard_vcont)
7097         (remote_target::discard_pending_stop_replies)
7098         (remote_target::discard_pending_stop_replies_in_queue)
7099         (remote_target::remote_notif_remove_queued_reply)
7100         (remote_target::queued_stop_reply)
7101         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7102         (remote_target::wait, remote_target::kill_new_fork_children)
7103         (remote_target::async): Update.
7104
7105 2018-06-10  Tom Tromey  <tom@tromey.com>
7106
7107         * record-full.c (record_full_arch_list_cleanups): Remove.
7108         (record_full_message): Use try/catch.
7109         (record_full_wait_cleanups): Remove.
7110         (record_full_wait_1): Use try/catch.
7111         (record_full_restore): Likewise.
7112
7113 2018-06-10  Tom Tromey  <tom@tromey.com>
7114
7115         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
7116         declare VEC.  Add constructor.
7117         <in_target_beneath>: Now bool.
7118         (record_full_breakpoints): Now a std::vector, static.
7119         (record_full_sync_record_breakpoints)
7120         (record_full_init_record_breakpoints)
7121         (record_full_target::insert_breakpoint)
7122         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
7123
7124 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7125
7126         * dwarf2read.c (process_cu_includes): Remove struct keyword.
7127         * serial.c (serial_interface_lookup): Remove struct keyword.
7128
7129 2018-06-10  Tom Tromey  <tom@tromey.com>
7130
7131         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7132         method.
7133         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7134         a method.
7135         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7136         method.
7137         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7138         "beneath" as a method.
7139         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7140         Use "beneath" as a method.
7141
7142 2018-06-10  Tom Tromey  <tom@tromey.com>
7143
7144         * tracefile.c (struct trace_file_writer_deleter): New.
7145         <operator()>: Rename from trace_file_writer_xfree.
7146         (trace_file_writer_up): New typedef.
7147         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7148
7149 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7150
7151         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7152         <m_registers, m_register_status>: Change type to
7153         std::unique_ptr.
7154         * regcache.c (reg_buffer::reg_buffer): Use new instead of
7155         XCNEWVEC.
7156
7157 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7158
7159         * common/common-regcache.h (enum register_status): Add
7160         underlying type "signed char".
7161         * regcache.h (reg_buffer) <m_register_status>: Change type to
7162         register_status *.
7163         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7164         register_status instead of signed char.
7165         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7166         (reg_buffer::get_register_status): Remove cast.
7167         (readable_regcache::raw_read): Remove cast.
7168         (readable_regcache::cooked_read): Remove cast.
7169
7170 2018-06-09  Tom Tromey  <tom@tromey.com>
7171
7172         * source.c (reverse_search_command, forward_search_command): Use
7173         scoped_fd.
7174
7175 2018-06-09  Tom Tromey  <tom@tromey.com>
7176
7177         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7178         (serial_ops_list): Now static, std::vector.
7179         (serial_interface_lookup, serial_add_interface): Update.
7180
7181 2018-06-09  Tom Tromey  <tom@tromey.com>
7182
7183         * dwarf2read.c (process_cu_includes): Update.
7184         (process_full_comp_unit): Update.
7185         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7186         std::vector.
7187
7188 2018-06-08  Paul Koning  <paul_koning@dell.com>
7189
7190         PR gdb/23252
7191
7192         * python/python.c (do_start_initialization):
7193         Avoid call to internal Python API.
7194         (init__gdb_module): New function.
7195
7196 2018-06-08  Gary Benson <gbenson@redhat.com>
7197
7198         * linux-thread-db.c (valprint.h): New include.
7199         (struct check_thread_db_info): New structure.
7200         (check_thread_db_on_load, tdb_testinfo): New static globals.
7201         (check_thread_db, check_thread_db_callback): New functions.
7202         (try_thread_db_load_1): Run integrity checks if requested.
7203         (maintenance_check_libthread_db): New function.
7204         (_initialize_thread_db): Register "maint check libthread-db"
7205         and "maint set/show check-libthread-db".
7206         * NEWS: Mention the above new commands.
7207
7208 2018-06-08  Tom Tromey  <tom@tromey.com>
7209
7210         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7211         now a method.
7212
7213 2018-06-08  Tom Tromey  <tom@tromey.com>
7214
7215         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7216
7217 2018-06-08  Tom Tromey  <tom@tromey.com>
7218
7219         * common/btrace-common.h (struct btrace_data): Add constructor,
7220         destructor, move assignment operator.
7221         <empty, clear, fini>: New methods.
7222         <format>: Initialize.
7223         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7224         (btrace_data_empty): Don't declare.
7225         * common/btrace-common.c (btrace_data_init): Remove.
7226         (btrace_data::fini): Rename from btrace_data_fini.
7227         (btrace_data::empty): Rename from btrace_data_empty.
7228         (btrace_data::clear): Rename from btrace_data_clear.  Return
7229         bool.
7230         * btrace.h (make_cleanup_btrace_data): Don't declare.
7231         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7232         (parse_xml_btrace): Update.
7233         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7234         (maint_btrace_clear_packet_history_cmd): Update.
7235
7236 2018-06-07  Pedro Alves  <palves@redhat.com>
7237
7238         * target.h (target_ops) <beneath>: Now a method.  All references
7239         updated.
7240         (class target_stack): New.
7241         * target.c (g_target_stack): New.
7242         (g_current_top_target): Delete.
7243         (current_top_target): Get the top target out of g_target_stack.
7244         (target_stack::push, target_stack::unpush): New.
7245         (push_target, unpush_target): Reimplement.
7246         (target_is_pushed): Reimplement in terms of g_target_stack.
7247         (target_ops::beneath, target_stack::find_beneath): New.
7248
7249 2018-06-07  Pedro Alves  <palves@redhat.com>
7250
7251         * target.h (find_target_beneath): Delete declaration.
7252         * target.c (find_target_beneath): Delete definition.
7253         * aix-thread.c: All callers of find_target_beneath adjusted to
7254         call target_ops::beneath instead.
7255         * bsd-uthread.c: Likewise.
7256         * linux-thread-db.c: Likewise.
7257         * ravenscar-thread.c: Likewise.
7258         * sol-thread.c: Likewise.
7259         * spu-multiarch.c: Likewise.
7260
7261 2018-06-07  Pedro Alves  <palves@redhat.com>
7262
7263         * target.h (target_ops) <beneath>: Now a method.  All references
7264         updated.
7265         (target_ops) <m_beneath>: New.
7266         * target.c (target_ops::beneath): New.
7267         * corelow.c: Adjust all references to target_ops::beneath.
7268         * linux-thread-db.c: Likewise.
7269         * make-target-delegates: Likewise.
7270         * record-btrace.c: Likewise.
7271         * record-full.c: Likewise.
7272         * remote.c: Likewise.
7273         * target.c: Likewise.
7274         * target-delegates.c: Regenerate.
7275
7276 2018-06-07  Pedro Alves  <palves@redhat.com>
7277
7278         * target.h (target_stack): Delete.
7279         (current_top_target): Declare function.
7280         * target.c (target_stack): Delete.
7281         (g_current_top_target): New.
7282         (current_top_target): New function.
7283         * auxv.c: Use current_top_target instead of target_stack
7284         throughout.
7285         * avr-tdep.c: Likewise.
7286         * breakpoint.c: Likewise.
7287         * corefile.c: Likewise.
7288         * elfread.c: Likewise.
7289         * eval.c: Likewise.
7290         * exceptions.c: Likewise.
7291         * frame.c: Likewise.
7292         * gdbarch-selftests.c: Likewise.
7293         * gnu-v3-abi.c: Likewise.
7294         * ia64-tdep.c: Likewise.
7295         * ia64-vms-tdep.c: Likewise.
7296         * infcall.c: Likewise.
7297         * infcmd.c: Likewise.
7298         * infrun.c: Likewise.
7299         * linespec.c: Likewise.
7300         * linux-tdep.c: Likewise.
7301         * minsyms.c: Likewise.
7302         * ppc-linux-nat.c: Likewise.
7303         * ppc-linux-tdep.c: Likewise.
7304         * procfs.c: Likewise.
7305         * regcache.c: Likewise.
7306         * remote.c: Likewise.
7307         * rs6000-tdep.c: Likewise.
7308         * s390-linux-nat.c: Likewise.
7309         * s390-tdep.c: Likewise.
7310         * solib-aix.c: Likewise.
7311         * solib-darwin.c: Likewise.
7312         * solib-dsbt.c: Likewise.
7313         * solib-spu.c: Likewise.
7314         * solib-svr4.c: Likewise.
7315         * solib-target.c: Likewise.
7316         * sparc-tdep.c: Likewise.
7317         * sparc64-tdep.c: Likewise.
7318         * spu-tdep.c: Likewise.
7319         * symfile.c: Likewise.
7320         * symtab.c: Likewise.
7321         * target-descriptions.c: Likewise.
7322         * target-memory.c: Likewise.
7323         * target.c: Likewise.
7324         * target.h: Likewise.
7325         * tracefile-tfile.c: Likewise.
7326         * tracepoint.c: Likewise.
7327         * valops.c: Likewise.
7328         * valprint.c: Likewise.
7329         * value.c: Likewise.
7330         * windows-tdep.c: Likewise.
7331         * mi/mi-main.c: Likewise.
7332
7333 2018-06-07  Tom Tromey  <tom@tromey.com>
7334
7335         * valprint.h (build_address_symbolic): Declare.
7336         * printcmd.c (print_address_symbolic): Update.
7337         (build_address_symbolic): Change "name" and "filename" to
7338         std::string.
7339         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7340         Update.
7341         * defs.h (build_address_symbolic): Remove declaration.
7342
7343 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7344
7345         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7346         (aarch64_vnv_type): Add function.
7347         (aarch64_pseudo_register_name): Add V regs for SVE.
7348         (aarch64_pseudo_register_type): Likewise.
7349         (aarch64_pseudo_register_reggroup_p): Likewise.
7350         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7351         (aarch64_pseudo_read_value): Add V regs for SVE.
7352         (aarch64_pseudo_write_2): Use V0 offset for SVE
7353         (aarch64_pseudo_write): Add V regs for SVE.
7354         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7355
7356 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7357
7358         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7359         (sve_vl_from_vq): Likewise.
7360
7361 2018-06-05  Tom Tromey  <tom@tromey.com>
7362
7363         * cli/cli-cmds.c (show_version): Update.
7364         * top.c (print_gdb_version): Add "interactive" parameter.
7365         Update.
7366         * main.c (captured_main_1): Update.
7367         * top.h (print_gdb_version): Add "interactive" parameter and a
7368         comment.
7369
7370 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7371
7372         * common/enum-flags.h: Add trailing semicolon to example in
7373         comment.
7374
7375 2018-06-05  Tom Tromey  <tom@tromey.com>
7376
7377         PR cli/12326:
7378         * NEWS: Add entry about pager.
7379         * utils.c (pagination_disabled_for_command): New global.
7380         (prompt_for_continue): Allow "c" response to prompt.
7381         (reinitialize_more_filter): Clear
7382         pagination_disabled_for_command.
7383         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7384
7385 2018-06-04  Tom Tromey  <tom@tromey.com>
7386
7387         * ada-lang.h (ada_lookup_symbol_list): Update.
7388         * ada-lang.c (resolve_subexp): Update.
7389         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7390         parameter.
7391         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7392         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7393         results parameter to std::vector.
7394         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7395         Update.
7396         * ada-exp.y (block_lookup): Update.
7397         (select_possible_type_sym): Change type of syms.  Remove nsyms
7398         parameter.
7399         (write_var_or_type, write_name_assoc): Update.
7400
7401 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7402
7403         * windows-nat.c (windows_nat_target::xfer_partial): Return
7404         TARGET_XFER_E_IO if we need to delegate to the target beneath
7405         but BENEATH is NULL.
7406
7407 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7408
7409         * Makefile.in (config.status): Add configure.nat as a
7410         dependency.
7411
7412 2018-06-04  Tom Tromey  <tom@tromey.com>
7413
7414         * cp-name-parser.y (cpname_state): Add method declarations.
7415         (HANDLE_QUAL): Update.
7416         (cpname_state::d_grab, cpname_state::fill_comp)
7417         (cpname_state::make_operator, cpname_state::make_dtor)
7418         (cpname_state::make_builtin_type, cpname_state::make_name)
7419         (cpname_state::d_qualify, cpname_state::d_int_type)
7420         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7421         (%union): Move earlier.
7422
7423 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7424
7425         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7426
7427 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7428
7429         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7430         (aarch64_pseudo_write_1): Likewise.
7431         (aarch64_pseudo_read_value): Use helper.
7432         (aarch64_pseudo_write): Likewise.
7433
7434 2018-06-04  Pedro Alves  <palves@redhat.com>
7435
7436         * darwin-nat.c (darwin_ops): Delete.
7437         (darwin_attach_pid): Use get_native_target.
7438
7439 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7440
7441         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7442         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7443
7444 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7445
7446         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7447         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7448         (aarch64_gdbarch_init): Check for SVE.
7449         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7450
7451 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7452
7453         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7454         * aarch64-tdep.h (aarch64_read_description): Likewise.
7455         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7456         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7457         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7458         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7459         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7460
7461 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7462
7463         * value.c (value_fetch_lazy_bitfield): New.
7464         (value_fetch_lazy_memory): New.
7465         (value_fetch_lazy_register): New.
7466         (value_fetch_lazy): Factor out to smaller functions.
7467
7468 2018-06-01  Tom Tromey  <tom@tromey.com>
7469
7470         * cp-name-parser.y (backslashable, represented): Now const.
7471
7472 2018-06-01  Tom Tromey  <tom@tromey.com>
7473
7474         * cp-name-parser.y: Include parser-defs.h.
7475         (parser_fprintf): Remove declaration.
7476
7477 2018-06-01  Tom Tromey  <tom@tromey.com>
7478
7479         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7480         %parse-param.
7481         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7482         (global_result): Remove globals.
7483         (struct cpname_state): New.
7484         (yyparse): Don't declare.
7485         (yylex, yyerror): Move declarations after %union.
7486         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7487         (make_name): Add state parameter.
7488         Update all callers.
7489         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7490         parameter.
7491         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7492         Update.
7493         (yylex): Add lvalp, state parameters.
7494         (yyerror): Add state parameter.
7495         (cp_demangled_name_to_comp): Update.
7496
7497 2018-06-01  Tom Tromey  <tom@tromey.com>
7498
7499         * cp-name-parser.y (parser_fprintf): Declare.
7500         (GDB_YY_REMAP_PREFIX): Define.
7501         Include yy-remap.h.  Don't redefine yy* identifiers.
7502
7503 2018-06-01  Tom Tromey  <tom@tromey.com>
7504
7505         * python/py-type.c (typy_legacy_template_argument): Update.
7506         * cp-support.h (cp_demangled_name_to_comp): Update.
7507         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7508         parameter to be a "std::string *".
7509         (main): Update.
7510
7511 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7512
7513         * ada-lex.l: Include "diagnostics.h" instead of
7514         "common/diagnostics.h".
7515         * unittests/environ-selftests.c: Likewise.
7516         * common/diagnostics.h: Moved to ../include.
7517
7518 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7519
7520         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7521         to language_mode_manual while calling breakpoint_re_set_one.
7522
7523 2018-06-01  Tom Tromey  <tom@tromey.com>
7524
7525         * valops.c (value_cast_structs, destructor_name_p): Update.
7526         * symtab.c (gdb_mangle_name): Update.
7527         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7528         Update.
7529         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7530         (pascal_object_print_value_fields, pascal_object_print_value):
7531         Update.
7532         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7533         * linespec.c (find_methods): Update.
7534         * gdbtypes.h (type_name_no_tag): Remove.
7535         (type_name_or_error): Rename from type_name_no_tag_or_error.
7536         * gdbtypes.c (type_name_no_tag): Remove.
7537         (type_name_or_error): Rename from type_name_no_tag_or_error.
7538         (lookup_struct_elt_type, check_typedef): Update.
7539         * expprint.c (print_subexp_standard): Update.
7540         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7541         * d-namespace.c (d_lookup_nested_symbol): Update.
7542         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7543         (cp_print_class_member): Update.
7544         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7545         * completer.c (add_struct_fields): Update.
7546         * c-typeprint.c (cp_type_print_derivation_info)
7547         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7548         Update.
7549         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7550         (ada_prefer_type, ada_is_exception_sym): Update.
7551
7552 2018-06-01  Tom Tromey  <tom@tromey.com>
7553
7554         * valops.c (enum_constant_from_type, value_namespace_elt)
7555         (value_maybe_namespace_elt): Update.
7556         * valarith.c (find_size_for_pointer_math): Update.
7557         * target-descriptions.c (make_gdb_type): Update.
7558         * symmisc.c (print_symbol): Update.
7559         * stabsread.c (define_symbol, read_type)
7560         (complain_about_struct_wipeout, add_undefined_type)
7561         (cleanup_undefined_types_1): Update.
7562         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7563         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7564         (rust_internal_print_type, rust_composite_type)
7565         (rust_evaluate_funcall, rust_evaluate_subexp)
7566         (rust_inclusive_range_type_p): Update.
7567         * python/py-type.c (typy_get_tag): Update.
7568         * p-typeprint.c (pascal_type_print_base): Update.
7569         * mdebugread.c (parse_symbol, parse_type): Update.
7570         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7571         Update.
7572         * guile/scm-type.c (gdbscm_type_tag): Update.
7573         * go-lang.c (sixg_string_p): Update.
7574         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7575         Update.
7576         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7577         (TYPE_TAG_NAME): Remove.
7578         * gdbtypes.c (type_name_no_tag): Simplify.
7579         (check_typedef, check_types_equal, recursive_dump_type)
7580         (copy_type_recursive, arch_composite_type): Update.
7581         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7582         in summary mode when needed.
7583         * eval.c (evaluate_funcall): Update.
7584         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7585         (process_structure_scope, read_enumeration_type)
7586         (read_namespace_type, read_module_type, determine_prefix): Update.
7587         * cp-support.c (inspect_type): Update.
7588         * coffread.c (process_coff_symbol, decode_base_type): Update.
7589         * c-varobj.c (c_is_path_expr_parent): Update.
7590         * c-typeprint.c (c_type_print_base_struct_union): Update.
7591         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7592         summary when using C language.
7593         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7594         (gen_maybe_namespace_elt): Update.
7595         * ada-lang.c (ada_type_name): Simplify.
7596         (empty_record, ada_template_to_fixed_record_type_1)
7597         (template_to_static_fixed_type)
7598         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7599
7600 2018-06-01  Tom Tromey  <tom@tromey.com>
7601
7602         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7603         c_print_type.
7604         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7605         (c_print_type): Update.
7606         (c_print_type): New overload.
7607         (c_type_print_varspec_prefix, c_type_print_args)
7608         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7609         (c_type_print_base_struct_union, c_type_print_base_1)
7610         (cp_type_print_method_args): Add "language" parameter.
7611         (c_type_print_base): Update.
7612         * c-lang.h (c_print_type): Add new overload.
7613
7614 2018-06-01  Tom Tromey  <tom@tromey.com>
7615
7616         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7617         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7618
7619 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7620
7621         * aarch64-tdep.c (aarch64_sve_register_names): New const
7622         var.
7623         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7624         (AARCH64_SVE_Z_REGS_NUM): New define.
7625         (AARCH64_SVE_P_REGS_NUM): Likewise.
7626         (AARCH64_SVE_NUM_REGS): Likewise.
7627
7628 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7629
7630         * nat/linux-ptrace.h [__alpha__]
7631         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7632         definitions.
7633
7634 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7635
7636         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7637         the endianness selected.
7638         * NEWS: Document `set endian auto' mode operation update.
7639
7640 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7641
7642         * Makefile.in: Add new header.
7643         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7644         (sve_vl_from_vg): Likewise.
7645         (sve_vq_from_vl): Likewise.
7646         (sve_vl_from_vq): Likewise.
7647         (sve_vq_from_vg): Likewise.
7648         (sve_vg_from_vq): Likewise.
7649         * configure.nat: Add new c file.
7650         * nat/aarch64-sve-linux-ptrace.c: New file.
7651         * nat/aarch64-sve-linux-ptrace.h: New file.
7652
7653 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7654
7655         * aarch64-linux-nat.c (aarch64_linux_read_description):
7656         Add parmeter zero.
7657         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7658         Likewise.
7659         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7660         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7661         (aarch64_gdbarch_init): Add parmeter zero.
7662         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7663         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7664         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7665         parmeter.
7666         * doc/gdb.texinfo: Describe SVE feature
7667         * features/aarch64-sve.c: New file.
7668
7669 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7670
7671         PR gdb/23210
7672         * gdbarch.sh (significant_addr_bit): Default to zero when
7673         not set by target architecture.
7674         * gdbarch.c: Re-generated.
7675         * utils.c (address_significant): Update.
7676
7677 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7678
7679         * stack.c (func_command): Remove trailing newline in call to error.
7680
7681 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7682
7683         * regcache.h (regcache_raw_collect): Remove, update callers to
7684         use regcache::raw_collect.
7685         * regcache.c (regcache_raw_collect): Remove.
7686
7687 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7688
7689         * regcache.h (regcache_raw_supply): Remove, update callers to
7690         use detached_regcache::raw_supply.
7691         * regcache.c (regcache_raw_supply): Remove.
7692
7693 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7694
7695         * regcache.h (regcache_cooked_write_part): Remove, update
7696         callers to use regcache::cooked_write_part.
7697         * regcache.c (regcache_cooked_write_part): Remove.
7698
7699 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7700
7701         * regcache.h (regcache_cooked_read_part): Remove, update callers
7702         to use readable_regcache::cooked_read_part.
7703         * regcache.c (regcache_cooked_read_part): Remove.
7704
7705 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7706
7707         * regcache.h (regcache_cooked_read_value): Remove, update
7708         callers to use readable_regcache::cooked_read_value.
7709         * regcache.c (regcache_cooked_read_value): Remove.
7710
7711 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7712
7713         * regcache.h (regcache_cooked_write): Remove, update callers to
7714         use regcache::cooked_write.
7715         * regcache.c (regcache_cooked_write): Remove.
7716
7717 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7718
7719         * regcache.h (regcache_invalidate): Remove, update callers to
7720         use detached_regcache::invalidate instead.
7721         * regcache.c (regcache_invalidate): Remove.
7722
7723 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7724
7725         * regcache.h (regcache_raw_write_part): Remove, update callers
7726         to use regcache::raw_write_part instead.
7727         * regcache.c (regcache_raw_write_part): Remove.
7728
7729 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7730
7731         * regcache.h (regcache_raw_read_part): Remove, update callers to
7732         use readable_regcache::raw_read_part instead.
7733         * regcache.c (regcache_raw_read_part): Remove.
7734
7735 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7736
7737         * regcache.h (regcache_cooked_read): Remove, update callers to
7738         use readable_regcache::cooked_read instead.
7739         * regcache.c (regcache_cooked_read): Remove.
7740
7741 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7742
7743         * regcache.h (regcache_raw_write): Remove, update callers to use
7744         regcache::raw_write instead.
7745         * regcache.c (regcache_raw_write): Remove.
7746
7747 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7748
7749         * regcache.h (regcache_raw_read): Remove, update callers to use
7750         readable_regcache::raw_read instead.
7751         * regcache.c (regcache_raw_read): Remove.
7752
7753 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7754
7755         * regcache.h (regcache_raw_update): Remove, update callers to
7756         use readable_regcache::raw_update instead.
7757         * regcache.c (regcache_raw_update): Remove.
7758
7759 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7760
7761         * regcache.h (regcache_register_status): Remove, update callers
7762         to use reg_buffer::get_register_status directly instead.
7763         * regcache.c (regcache_register_status): Remove.
7764
7765 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7766
7767         * regcache.h (regcache_get_ptid): Remove, update all callers to
7768         call regcache::ptid instead.
7769         * regcache.c (regcache_get_ptid): Remove.
7770
7771 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7772
7773         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7774
7775 2018-05-30  Pedro Alves  <palves@redhat.com>
7776
7777         * common/common-exceptions.h (exception_rethrow): Use
7778         ATTRIBUTE_NORETURN.
7779
7780 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7781
7782         * breakpoint.c (print_solib_event, check_status_catch_solib):
7783         Remove struct keyword in range-based for loops.
7784         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7785         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7786         Likewise.
7787         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7788         Likewise.
7789         * symfile.c (addr_info_make_relative): Likewise.
7790         * thread.c (value_in_thread_stack_temporaries): Likewise.
7791
7792 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7793
7794         PR gdb/16841
7795         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7796         aggregate type to get its real type before accessing it.
7797
7798 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7799
7800         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7801         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7802         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7803         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7804         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7805         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7806         * printcmd.c (info_address_command): Likewise.
7807
7808 2018-05-29  Tom Tromey  <tom@tromey.com>
7809
7810         * windows-nat.c (handle_exception): Update fall-through comment.
7811
7812 2018-05-29  Tom Tromey  <tom@tromey.com>
7813
7814         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7815         (struct program_space) <added_solibs>: Now a std::vector.
7816         * breakpoint.c (print_solib_event): Update.
7817         (check_status_catch_solib): Update.
7818         * progspace.c (clear_program_space_solib_cache): Update.
7819         * solib.c (update_solib_list): Update.
7820
7821 2018-05-29  Tom Tromey  <tom@tromey.com>
7822
7823         * python/py-type.c (typy_richcompare): Update.
7824         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7825         * gdbtypes.h (types_deeply_equal): Return bool.
7826         (types_equal): Likewise.
7827         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7828         declare VEC.
7829         (check_types_equal): Change worklist to std::vector.  Return
7830         bool.
7831         (struct type_equality_entry): Add constructor.
7832         (compare_maybe_null_strings): Return bool.
7833         (check_types_worklist): Return bool.  Change worklist to
7834         std::vector.
7835         (types_deeply_equal): Use std::vector.
7836         (types_equal): Return bool.
7837         (compare_maybe_null_strings): Simplify.
7838
7839 2018-05-29  Tom Tromey  <tom@tromey.com>
7840
7841         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7842
7843 2018-05-29  Tom Tromey  <tom@tromey.com>
7844
7845         * objc-lang.h: Don't include cp-support.h.
7846         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7847         declare VEC.
7848
7849 2018-05-27  Tom Tromey  <tom@tromey.com>
7850
7851         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7852
7853 2018-05-25  Tom Tromey  <tom@tromey.com>
7854
7855         * value.c (value::location): Initialize.
7856
7857 2018-05-25  Tom Tromey  <tom@tromey.com>
7858
7859         * dbxread.c (init_bincl_list): Remove.
7860         (bincl_list): Now a std::vector.
7861         (bincls_allocated, next_bincl): Remove.
7862         (free_bincl_list, do_free_bincl_list_cleanup)
7863         (make_cleanup_free_bincl_list): Remove.
7864         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7865         unique_xmalloc_ptr.
7866         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7867         (struct header_file_location): Add constructor.
7868         (add_bincl_to_list): Remove.
7869
7870 2018-05-25  Tom Tromey  <tom@tromey.com>
7871
7872         * tui/tui.c (tui_enable): Update.
7873         * mi/mi-interp.c (mi_interp::init): Update.
7874         * interps.h (class interp) <name>: New method.
7875         <m_name>: Rename from name.
7876         (~scoped_restore_interp): Update.
7877         * interps.c (interp::interp): Update.
7878         (interp_add, interp_set, interp_lookup_existing)
7879         (current_interp_named_p): Update.
7880
7881 2018-05-25  Tom Tromey  <tom@tromey.com>
7882
7883         * interps.c (interp_name): Remove.
7884         * mi/mi-interp.c (mi_interp::init): Update.
7885         * interps.h (interp_name): Remove.
7886         (~scoped_restore_interp): Update.
7887         * tui/tui.c (tui_enable): Update.
7888
7889 2018-05-25  Tom Tromey  <tom@tromey.com>
7890
7891         * utils.c (fputs_maybe_filtered): Update.
7892         * linespec.c (decode_line_full): Update.
7893         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7894         (mi_print_breakpoint_for_event, mi_solib_loaded)
7895         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7896         (mi_user_selected_context_changed): Update.
7897         * mi/mi-main.c (mi_execute_command): Update.
7898         * cli/cli-script.c (execute_control_command): Update.
7899         * python/python.c (execute_gdb_command): Update.
7900         * solib.c (info_sharedlibrary_command): Update.
7901         * interps.c (interp_ui_out): Remove.
7902         * interps.h (interp_ui_out): Remove.
7903
7904 2018-05-25  Tom Tromey  <tom@tromey.com>
7905
7906         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7907         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7908         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7909
7910 2018-05-25  Tom Tromey  <tom@tromey.com>
7911
7912         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7913         * interps.c (interp_exec): Use scoped_restore.
7914
7915 2018-05-25  Tom Tromey  <tom@tromey.com>
7916
7917         * remote.c (remote_target::remote_file_get): Use
7918         gdb::byte_vector.
7919         (remote_target::remote_file_put): Likewise.
7920
7921 2018-05-25  Tom Tromey  <tom@tromey.com>
7922
7923         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7924         a std::string.
7925         (get_pe_section_index, add_pe_exported_sym): Update.
7926         (read_pe_exported_syms): Use gdb::def_vector.
7927
7928 2018-05-25  Tom Tromey  <tom@tromey.com>
7929
7930         * frame.c (remove_prev_frame): Remove.
7931         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7932
7933 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7934
7935         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7936         Remove prototypes.
7937         * mips-linux-nat.c (supply_fpregset): Always call
7938         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7939         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7940         `mips_fill_fpregset'.
7941         * mips-linux-tdep.c (mips_supply_fpregset)
7942         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7943         (mips_fill_fpregset_wrapper): Remove functions.
7944         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7945         (mips_linux_fpregset): Remove variable.
7946         (mips_linux_iterate_over_regset_sections): Use
7947         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7948         (mips_linux_o32_sigframe_init): Remove comment.
7949
7950 2018-05-25  Pedro Alves  <palves@redhat.com>
7951
7952         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7953         (struct readahead_cache, struct packet_reg, struct
7954         remote_arch_state, class remote_state): Move higher up in the
7955         file.
7956         (remote_target::m_remote_state): Now an object instead of a pointer.
7957         (remote_target::get_remote_state): Adjust.
7958
7959 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7960
7961         * stack.c (select_and_print_frame): Delete.
7962         (struct function_bounds): Move struct within function.
7963         (func_command): Most content moved into new function
7964         find_frame_for_function, use new function, print result, add
7965         function comment.
7966         (find_frame_for_function): New function, now returns a result.
7967
7968 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7969
7970         * stack.c (iterate_over_block_arg_vars): Fix comment.
7971         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7972
7973 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7974
7975         PR gdb/23203
7976         * frame.c
7977         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7978         Define.
7979         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7980         Define.
7981         * frame.h (class scoped_restore_selected_frame): New class.
7982         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7983         of any exception, use scoped_restore_selected_frame to restore the
7984         frame instead.
7985
7986 2018-05-24  Pedro Alves  <palves@redhat.com>
7987
7988         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7989         override.
7990
7991 2018-05-23  Tom Tromey  <tom@tromey.com>
7992
7993         * complaints.c (struct complaints): Remove.
7994         (symfile_complaint_book): Remove.
7995         (series): New global.
7996         (complaint_internal): Update.
7997         (clear_complaints): Update.
7998
7999 2018-05-23  Tom Tromey  <tom@tromey.com>
8000
8001         * complaints.c (counters): New global.
8002         (struct complain): Remove.
8003         (struct complaints) <root>: Remove.
8004         (complaint_sentinel): Remove.
8005         (symfile_complaint_book): Update.
8006         (find_complaint) Remove.
8007         (complaint_internal, clear_complaints): Update.
8008
8009 2018-05-23  Tom Tromey  <tom@tromey.com>
8010
8011         * complaints.c (struct complain) <file, line>: Remove.
8012         (find_complaint): Remove file, line parameters.
8013         (complaint_internal): Update.
8014
8015 2018-05-23  Tom Tromey  <tom@tromey.com>
8016
8017         * complaints.c (vcomplaint): Remove.
8018         (complaint_internal) Merge in contents of vcomplaint.
8019
8020 2018-05-23  Tom Tromey  <tom@tromey.com>
8021
8022         * complaints.c (struct complaints) <explanation>: Remove.
8023         (symfile_explanations): Remove.
8024         (symfile_complaint_book): Update.
8025         (vcomplaint): Update.
8026         (struct explanation): Remove.
8027
8028 2018-05-23  Tom Tromey  <tom@tromey.com>
8029
8030         * complaints.c (symfile_complaints): Remove.
8031         (complaint_internal): Remove "complaints" parameter.
8032         (clear_complaints, vcomplaint): Remove "c" parameter.
8033         (get_complaints): Remove.
8034         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8035         (dwarf2_debug_line_missing_file_complaint)
8036         (dwarf2_debug_line_missing_end_sequence_complaint)
8037         (dwarf2_complex_location_expr_complaint)
8038         (dwarf2_const_value_length_mismatch_complaint)
8039         (dwarf2_section_buffer_overflow_complaint)
8040         (dwarf2_macro_malformed_definition_complaint)
8041         (dwarf2_invalid_attrib_class_complaint)
8042         (create_addrmap_from_index, dw2_symtab_iter_next)
8043         (dw2_expand_marked_cus)
8044         (dw2_debug_names_iterator::find_vec_in_debug_names)
8045         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8046         (create_debug_type_hash_table, init_cutu_and_read_dies)
8047         (partial_die_parent_scope, add_partial_enumeration)
8048         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8049         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8050         (read_import_statement, read_file_scope, create_dwo_cu_reader)
8051         (create_cus_hash_table, create_dwp_hash_table)
8052         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8053         (dwarf2_rnglists_process, dwarf2_ranges_process)
8054         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8055         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8056         (handle_struct_member_die, process_structure_scope)
8057         (read_array_type, read_common_block, read_module_type)
8058         (read_tag_pointer_type, read_typedef, read_base_type)
8059         (read_subrange_type, load_partial_dies, partial_die_info::read)
8060         (partial_die_info::read, partial_die_info::read)
8061         (partial_die_info::read, read_checked_initial_length_and_offset)
8062         (dwarf2_string_attr, read_formatted_entries)
8063         (dwarf_decode_line_header)
8064         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8065         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8066         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8067         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8068         (get_signatured_type, get_DW_AT_signature_type)
8069         (decode_locdesc, file_file_name, consume_improper_spaces)
8070         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8071         (dwarf_decode_macro_bytes, dwarf_decode_macros)
8072         (dwarf2_symbol_mark_computed, set_die_type)
8073         (read_attribute_value): Update.
8074         * stap-probe.c (handle_stap_probe, get_stap_base_address):
8075         Update.
8076         * dbxread.c (unknown_symtype_complaint)
8077         (lbrac_mismatch_complaint, repeated_header_complaint)
8078         (set_namestring, function_outside_compilation_unit_complaint)
8079         (read_dbx_symtab, process_one_symbol): Update.
8080         * gdbtypes.c (stub_noname_complaint): Update.
8081         * windows-nat.c (handle_unload_dll): Update.
8082         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8083         (decode_base_type): Update.
8084         * xcoffread.c (bf_notfound_complaint, ef_complaint)
8085         (eb_complaint, record_include_begin, record_include_end)
8086         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8087         (process_xcoff_symbol, read_symbol)
8088         (function_outside_compilation_unit_complaint)
8089         (scan_xcoff_symtab): Update.
8090         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8091         * buildsym.c (finish_block_internal, make_blockvector)
8092         (end_symtab_get_static_block, augment_type_symtab): Update.
8093         * dtrace-probe.c (dtrace_process_dof)
8094         (dtrace_static_probe_ops::get_probes): Update.
8095         * complaints.h (struct complaint): Don't declare.
8096         (symfile_complaints): Remove.
8097         (complaint_internal): Remove "complaints" parameter.
8098         (complaint): Likewise.
8099         (clear_complaints): Likewise.
8100         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8101         (reread_symbols): Update.
8102         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8103         (dwarf2_frame_cache, decode_frame_entry): Update.
8104         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8105         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8106         (info_selectors_command): Update.
8107         * macrotab.c (macro_include, check_for_redefinition)
8108         (macro_undef): Update.
8109         * objfiles.c (filter_overlapping_sections): Update.
8110         * stabsread.c (invalid_cpp_abbrev_complaint)
8111         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8112         (define_symbol, error_type, read_type, rs6000_builtin_type)
8113         (stabs_method_name_from_physname, read_member_functions)
8114         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8115         (attach_fields_to_type, complain_about_struct_wipeout)
8116         (read_range_type, read_args, common_block_start)
8117         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8118         Update.
8119         * mdebugread.c (index_complaint, unknown_ext_complaint)
8120         (basic_type_complaint, bad_tag_guess_complaint)
8121         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8122         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8123         (parse_procedure, parse_lines)
8124         (function_outside_compilation_unit_complaint)
8125         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8126         (bad_tag_guess_complaint, reg_value_complaint): Update.
8127         * cp-support.c (demangled_name_complaint): Update.
8128         * macroscope.c (sal_macro_scope): Update.
8129         * dwarf-index-write.c (class debug_names): Update.
8130
8131 2018-05-23  Tom Tromey  <tom@tromey.com>
8132
8133         * complaints.c (clear_complaints): Remove "noisy" parameter.
8134         * complaints.h (clear_complaints): Update.
8135         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8136         (reread_symbols): Update.
8137
8138 2018-05-23  Tom Tromey  <tom@tromey.com>
8139
8140         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8141         SUBSEQUENT_MESSAGE.
8142         (vcomplaint, clear_complaints): Update.
8143         (symfile_explanations): Remove some messages.
8144
8145 2018-05-23  Tom Tromey  <tom@tromey.com>
8146
8147         * complaints.c (internal_complaint): Remove.
8148         * complaints.h (internal_complaint): Remove.
8149
8150 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8151
8152         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8153
8154 2018-05-22  Pedro Alves  <palves@redhat.com>
8155
8156         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8157         (remote_fileio_badfd, remote_fileio_return_errno)
8158         (remote_fileio_return_success, remote_fileio_func_open)
8159         (remote_fileio_func_open, remote_fileio_func_close)
8160         (remote_fileio_func_read, remote_fileio_func_write)
8161         (remote_fileio_func_lseek, remote_fileio_func_rename)
8162         (remote_fileio_func_unlink, remote_fileio_func_stat)
8163         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8164         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8165         remote_target parameter.
8166         (remote_fio_func_map) <func>: Add remote_target parameter.
8167         (do_remote_fileio_request, remote_fileio_request):
8168         * remote-fileio.h (remote_fileio_request):
8169         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8170         remote_target parameter.
8171         (remote_notif_process, handle_notification): Adjust to pass down
8172         the remote.
8173         (remote_notif_state_allocate): Add remote_target parameter.  Save
8174         it.
8175         * remote-notif.h (struct remote_target): Forward declare.
8176         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8177         remote_target parameter.
8178         (struct remote_notif_state) <remote>: New field.
8179         (remote_notif_ack, remote_notif_parse): Add remote_target
8180         parameter.
8181         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8182         remote_target parameter.
8183         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8184         (threads_listing_context, rmt_thread_action, protocol_feature)
8185         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8186         (packet_result, struct threads_listing_context, remote_state):
8187         Move definitions and declarations higher up.
8188         (remote_target) <~remote_target>: Declare.
8189         (remote_download_command_source, remote_file_put, remote_file_get)
8190         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8191         (remote_hostio_pread_vFile, remote_hostio_send_command)
8192         (remote_hostio_set_filesystem, remote_hostio_open)
8193         (remote_hostio_close, remote_hostio_unlink, remote_state)
8194         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8195         (get_memory_write_packet_size, get_memory_read_packet_size)
8196         (append_pending_thread_resumptions, remote_detach_1)
8197         (append_resumption, remote_resume_with_vcont)
8198         (add_current_inferior_and_thread, wait_ns, wait_as)
8199         (process_stop_reply, remote_notice_new_inferior)
8200         (process_initial_stop_replies, remote_add_thread)
8201         (btrace_sync_conf, remote_btrace_maybe_reopen)
8202         (remove_new_fork_children, kill_new_fork_children)
8203         (discard_pending_stop_replies, stop_reply_queue_length)
8204         (check_pending_events_prevent_wildcard_vcont)
8205         (discard_pending_stop_replies_in_queue, stop_reply)
8206         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8207         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8208         (remote_interrupt_as, remote_interrupt_ns)
8209         (remote_get_noisy_reply, remote_query_attached)
8210         (remote_add_inferior, remote_current_thread, get_current_thread)
8211         (set_thread, set_general_thread, set_continue_thread)
8212         (set_general_process, write_ptid)
8213         (remote_unpack_thread_info_response, remote_get_threadinfo)
8214         (parse_threadlist_response, remote_get_threadlist)
8215         (remote_threadlist_iterator, remote_get_threads_with_ql)
8216         (remote_get_threads_with_qxfer)
8217         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8218         (get_offsets, remote_check_symbols, remote_supported_packet)
8219         (remote_query_supported, remote_packet_size)
8220         (remote_serial_quit_handler, remote_detach_pid)
8221         (remote_vcont_probe, remote_resume_with_hc)
8222         (send_interrupt_sequence, interrupt_query)
8223         (remote_notif_get_pending_events, fetch_register_using_p)
8224         (send_g_packet, process_g_packet, fetch_registers_using_g)
8225         (store_register_using_P, store_registers_using_G)
8226         (set_remote_traceframe, check_binary_download)
8227         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8228         (remote_xfer_live_readonly_partial, remote_read_bytes)
8229         (remote_send_printf, remote_flash_write, readchar)
8230         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8231         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8232         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8233         (extended_remote_disable_randomization, extended_remote_run)
8234         (send_environment_packet, extended_remote_environment_support)
8235         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8236         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8237         (packet_command): Now methods of ...
8238         (remote_target): ... this class.
8239         (m_remote_state) <remote_target>: New field.
8240         (struct remote_state) <stop_reply_queue,
8241         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8242         fields.
8243         (remote_state::remote_state): Allocate stop_reply_queue.
8244         (remote_state): Delete global.
8245         (get_remote_state_raw): Delete.
8246         (remote_target::get_remote_state): Allocate m_remote_state on
8247         demand.
8248         (get_current_remote_target): New.
8249         (remote_ops, extended_remote_ops): Delete.
8250         (wait_forever_enabled_p, remote_async_inferior_event_token):
8251         Delete, moved to struct remote_state.
8252         (remote_target::close): Delete self.  Destruction bits split to
8253         ...
8254         (remote_target::~remote_target): ... this.
8255         (show_memory_packet_size): Adjust to use
8256         get_current_remote_target.
8257         (struct protocol_feature) <func>: Add remote_target parameter.
8258         All callers adjusted.
8259         (curr_quit_handler_target): New.
8260         (remote_serial_quit_handler): Reimplement.
8261         (remote_target::open_1): Adjust to use get_current_remote_target.
8262         Heap-allocate remote_target/extended_remote_target instances.
8263         (vcont_builder::vcont_builder): Add remote_target parameter, and
8264         save it in m_remote.  All callers adjusted.
8265         (vcont_builder::m_remote): New field.
8266         (vcont_builder::restart, vcont_builder::flush)
8267         (vcont_builder::push_action): Use it.
8268         (remote_target::commit_resume): Use it.
8269         (struct queue_iter_param) <remote>: New field.
8270         (remote_target::remove_new_fork_children): Fill in 'remote' field.
8271         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8272         (check_pending_event_prevents_wildcard_vcont_callback)
8273         (remote_target::check_pending_events_prevent_wildcard_vcont)
8274         (remote_target::discard_pending_stop_replies)
8275         (remote_target::discard_pending_stop_replies_in_queue)
8276         (remote_target::remote_notif_remove_queued_reply): Fill in
8277         'remote' field.
8278         (remote_notif_get_pending_events): New.
8279         (remote_target::readchar, remote_target::remote_serial_write):
8280         Save/restore curr_quit_handler_target.
8281         (putpkt): New.
8282         (kill_new_fork_children): Fill in 'remote' field.
8283         (packet_command): Use get_current_remote_target, defer to
8284         remote_target method of same name.
8285         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8286         parameter, and save it in m_remote.  All callers adjusted.
8287         (scoped_remote_fd::release): Use m_remote.
8288         (scoped_remote_fd::m_remote): New field.
8289         (remote_file_put, remote_file_get, remote_file_delete): Use
8290         get_current_remote_target, defer to remote_target method of same
8291         name.
8292         (remote_btrace_reset): Add remote_state paremeter.  Update all
8293         callers.
8294         (remote_async_inferior_event_handler). Pass down 'data'.
8295         (remote_new_objfile): Use get_current_remote_target.
8296         (remote_target::vcont_r_supported): New.
8297         (set_range_stepping): Use get_current_remote_target and
8298         remote_target::vcont_r_supported.
8299         (_initialize_remote): Don't allocate 'remote_state' and
8300         'stop_reply_queue' globals.
8301         * remote.h (struct remote_target): Forward declare.
8302         (getpkt, putpkt, remote_notif_get_pending_events): Add
8303         'remote_target' parameter.
8304
8305 2018-05-22  Pedro Alves  <palves@redhat.com>
8306
8307         * remote.c (vcont_builder): Now a class.  Make all data members
8308         private.
8309         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8310         Declare methods.
8311         (vcont_builder_restart): Rename to ...
8312         (vcont_builder::restart): ... this.
8313         (vcont_builder_flush): Rename to ...
8314         (vcont_builder::flush): ... this.
8315         (vcont_builder_push_action): Rename to ...
8316         (vcont_builder::push_action): ... this.
8317         (remote_target::commit_resume): Adjust.
8318
8319 2018-05-22  Pedro Alves  <palves@redhat.com>
8320
8321         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8322         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8323         (get_fixed_memory_packet_size): New.
8324         (get_memory_packet_size): Use it.
8325         (set_memory_packet_size): Don't override the config size with
8326         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8327         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8328         Don't refer to get_memory_packet_size if not connected to a remote
8329         target.  Show "(default)" if configured size is 0.
8330
8331 2018-05-22  Pedro Alves  <palves@redhat.com>
8332
8333         * remote.c (remote_target::mourn_inferior): Move
8334         discard_pending_stop_replies call here from ...
8335         (_initialize_remote): ... here.
8336
8337 2018-05-22  Pedro Alves  <palves@redhat.com>
8338
8339         * remote.c (compare_section_command): Remove set_general_process
8340         call.
8341
8342 2018-05-22  Pedro Alves  <palves@redhat.com>
8343
8344         * remote.c (struct packet_reg, struct remote_arch_state):
8345         Move higher up in the file.
8346         (remote_state) <m_arch_states>: Store remote_arch_state values
8347         instead of remote_arch_state pointers.
8348         (remote_state::get_remote_arch_state): Adjust.
8349
8350 2018-05-22  Pedro Alves  <palves@redhat.com>
8351
8352         * remote.c: Include <unordered_map>.
8353         (remote_state): Now a class.
8354         (remote_state) <get_remote_arch_state>: Declare method.
8355         <get_remote_arch_state>: New field.
8356         (remote_arch_state) <remote_arch_state>: Declare ctor.
8357         <regs>: Now a unique_ptr.
8358         (remote_gdbarch_data_handle): Delete.
8359         (get_remote_arch_state): Delete.
8360         (remote_state::get_remote_arch_state): New.
8361         (get_remote_state): Adjust to call remote_state's
8362         get_remote_arch_state method.
8363         (init_remote_state): Delete, bits factored out to ...
8364         (remote_arch_state::remote_arch_state): ... this new method.
8365         (get_remote_packet_size, get_memory_packet_size)
8366         (process_g_packet, remote_target::fetch_registers)
8367         (remote_target::prepare_to_store, store_registers_using_G)
8368         (remote_target::store_registers, remote_target::get_trace_status):
8369         Adjust to call remote_state's method.
8370         (_initialize_remote): Remove reference to
8371         remote_gdbarch_data_handle.
8372
8373 2018-05-22  Pedro Alves  <palves@redhat.com>
8374
8375         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8376         pread>: New method declarations.
8377         (remote_target::open_1): Adjust.
8378         (readahead_cache_invalidate): Rename to ...
8379         (readahead_cache::invalidate): ... this, and adjust to be a class
8380         method.
8381         (readahead_cache_invalidate_fd): Rename to ...
8382         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8383         class method.
8384         (remote_hostio_pwrite): Adjust.
8385         (remote_hostio_pread_from_cache): Rename to ...
8386         (readahead_cache::pread): ... this, and adjust to be a class
8387         method.
8388         (remote_hostio_close): Adjust.
8389
8390 2018-05-22  Pedro Alves  <palves@redhat.com>
8391
8392         * remote.c (remote_hostio_close_cleanup): Delete.
8393         (class scoped_remote_fd): New.
8394         (remote_file_put, remote_file_get): Use it.
8395
8396 2018-05-22  Pedro Alves  <palves@redhat.com>
8397
8398         (struct vCont_action_support): Use bool and initialize all fields.
8399         (struct readahead_cache): Initialize all fields.
8400         (remote_state): Use bool and initialize all fields.
8401         (remote_state::remote_state, remote_state::~remote_state): New.
8402         (new_remote_state): Delete.
8403         (_initialize_remote): Use new to allocate remote_state.
8404
8405 2018-05-22  Pedro Alves  <palves@redhat.com>
8406             張俊芝  <zjz@zjz.name>
8407
8408         PR gdb/22973
8409         * c-exp.y: Include "c-support.h".
8410         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8411         of tolower.  Use c_ident_is_alpha to scan names.
8412         * c-lang.c: Include "c-support.h".
8413         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8414         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8415         * c-support.h: New file, with bits factored out from ...
8416         * cp-name-parser.y: ... this file.
8417         Include "c-support.h".
8418         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8419         c-support.h and renamed.
8420         (symbol_end, yylex): Adjust.
8421
8422 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8423
8424         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8425         parameter type to CORE_ADDR.
8426         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8427         parameter type in declaration to CORE_ADDR.
8428         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8429         target_auxv_search to get AT_HWCAP and use the result to get the
8430         target description.
8431         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8432         to CORE_ADDR. Remove the cast of the return value to unsigned
8433         long. Fix error predicate of target_auxv_search.
8434         (ppc_linux_nat_target::read_description): Change the type of the
8435         hwcap variable to CORE_ADDR.
8436
8437 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8438
8439         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8440         if the size of fpscr is larger than 32 bits.
8441
8442 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8443
8444         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8445         (ppc32_linux_vsxregmap): New global.
8446         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8447         regcache_supply_regset, and regcache_collect_regset.
8448         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8449         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8450         (fetch_vsx_register, store_vsx_register): Remove.
8451         (fetch_vsx_registers): Add regno parameter. Get regset using
8452         ppc_linux_vsxregset. Use regset to supply registers.
8453         (store_vsx_registers): Add regno parameter. Get regset using
8454         ppc_linux_vsxregset. Use regset to collect registers.
8455         (fetch_register): Call fetch_vsx_registers instead of
8456         fetch_vsx_register.
8457         (store_register): Call store_vsx_registers instead of
8458         store_vsx_register.
8459         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8460         new regno parameter.
8461         (store_ppc_registers): Call store_vsx_registers with -1 for the
8462         new regno parameter.
8463         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8464         (ppc_collect_vsxregset): Remove.
8465
8466 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8467
8468         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8469         offset fields.
8470         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8471         for vector register offset fields.
8472         (ppc64_fbsd_reg_offsets): Likewise.
8473         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8474         to vector register offset fields.
8475         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8476         to vector register offset fields.
8477         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8478         vector register offset fields.
8479         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8480         initializers for vector register offset fields.
8481         (rs6000_aix64_reg_offsets): Likewise.
8482         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8483         (ppc_supply_vrregset): Remove.
8484         (ppc_collect_vrregset): Remove.
8485         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8486         (ppc_linux_vrregset) : New function.
8487         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8488         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8489         (ppc32_linux_vrregset): Remove.
8490         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8491         and use result instead of ppc32_linux_vrregset.
8492         (ppc32_linux_reg_offsets): Remove initializers for vector register
8493         offset fields.
8494         (ppc64_linux_reg_offsets): Likewise.
8495         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8496         * ppc-linux-nat.c: Include regset.h.
8497         (gdb_vrregset_t): Adjust comment to account for little-endian
8498         mode.
8499         (supply_vrregset, fill_vrregset): Remove.
8500         (fetch_altivec_register, store_altivec_register): Remove.
8501         (fetch_altivec_registers): Add regno parameter. Get regset using
8502         ppc_linux_vrregset. Use regset to supply registers.
8503         (store_altivec_registers): Add regno parameter. Get regset using
8504         ppc_linux_vrregset. Use regset to collect registers.
8505         (fetch_register): Call fetch_altivec_registers instead of
8506         fetch_altivec_register.
8507         (store_register): Call store_altivec_registers instead of
8508         store_altivec_register.
8509         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8510         the new regno parameter.
8511         (store_ppc_registers): Call store_altivec_registers with -1 for
8512         the new regno parameter.
8513
8514 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8515
8516         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8517         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8518         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8519         (gdb_vrregset_t): Change array type size to
8520         PPC_LINUX_SIZEOF_VRREGSET.
8521         (gdb_vsxregset_t): Change array type size to
8522         PPC_LINUX_SIZEOF_VSXREGSET.
8523         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8524         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8525         PPC_LINUX_SIZEOF_VSXREGSET.
8526
8527 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8528
8529         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8530         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8531         nat/ppc-linux.c.
8532         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8533         ppc_linux_target_wordsize with tid.
8534         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8535         wordsize with tid.
8536         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8537         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8538         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8539         tid parameter. Remove static specifier.
8540         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8541         (ppc_linux_target_wordsize): New declaration.
8542
8543 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8544
8545         * arch/ppc-linux-common.c: New file.
8546         * arch/ppc-linux-common.h: New file.
8547         * arch/ppc-linux-tdesc.h: New file.
8548         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8549         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8550         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8551         arch/ppc-linux-tdesc.h.
8552         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8553         arch/ppc-linux-tdesc.h.
8554         (ppc_linux_nat_target::read_description): Remove target
8555         description matching code. Fill a ppc_linux_features struct and
8556         call ppc_linux_match_description with it. Move comment about ISA
8557         2.05 to ppc-linux-common.c.
8558         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8559         arch/ppc-linux-tdesc.h.
8560         (ppc_linux_core_read_description): Remove target description
8561         matching code. Fill a ppc_linux_features struct and call
8562         ppc_linux_match_description with it.
8563         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8564         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8565         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8566         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8567         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8568         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8569         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8570         (tdesc_powerpc_e500l): Remove.
8571
8572 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8573
8574         * ada-lang.c (catch_assert_command): Pass empty string instead
8575         of NULL for excep_string argument.
8576
8577 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8578
8579         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8580         the width of the requested register exceeds the width of the
8581         `ptrace' data type.
8582
8583 2018-05-21  Tom Tromey  <tom@tromey.com>
8584
8585         * printcmd.c (output_command): Remove.
8586         (output_command_const): Rename to output_command.
8587         * valprint.h (output_command): Rename from output_command_const.
8588         * tracepoint.c (trace_dump_actions): Call output_command.
8589
8590 2018-05-21  Tom Tromey  <tom@tromey.com>
8591
8592         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8593         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8594         * ada-lang.h (create_ada_exception_catchpoint): Update.
8595         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8596         std::string.
8597         (create_excep_cond_exprs, ~ada_catchpoint)
8598         (should_stop_exception, print_one_exception)
8599         (print_mention_exception, print_recreate_exception): Update.
8600         (ada_get_next_arg): Remove.
8601         (catch_ada_exception_command_split): Use std::string.  Change type
8602         of "excep_string", "cond_string".
8603         (catch_ada_exception_command): Update.
8604         (create_ada_exception_catchpoint): Change type of excep_string.
8605         (ada_exception_sal): Remove excep_string parameter.
8606         (~ada_catchpoint): Remove.
8607
8608 2018-05-21  Tom Tromey  <tom@tromey.com>
8609
8610         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8611         cleanup.
8612
8613 2018-05-21  Tom Tromey  <tom@tromey.com>
8614
8615         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8616         Return unique_xmalloc_ptr.
8617         (print_it_exception): Update.
8618
8619 2018-05-21  Tom Tromey  <tom@tromey.com>
8620
8621         * tracepoint.c (trace_dump_actions): Use std::string.
8622
8623 2018-05-21  Tom Tromey  <tom@tromey.com>
8624
8625         * symfile.c (reread_symbols): Use std::string for original_name.
8626
8627 2018-05-21  Tom Tromey  <tom@tromey.com>
8628
8629         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8630         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8631         constructor.
8632
8633 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8634
8635         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8636         instance to...
8637         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8638         * objfiles.c (get_objfile_bfd_data): Allocate
8639         objfile_per_bfd_storage with obstack_new when allocating on
8640         obstack.
8641
8642 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8643
8644         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8645         OBSTACK_ZALLOC.
8646         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8647         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8648         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8649         (add_pending): Likewise.
8650         (parse_symbol): Likewise.
8651         (parse_partial_symbols): Likewise.
8652         (psymtab_to_symtab_1): Likewise.
8653         (new_psymtab): Likewise.
8654         (elfmdebug_build_psymtabs): Likewise.
8655         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8656         * objfiles.c (get_objfile_bfd_data): Likewise.
8657         (objfile_register_static_link): Likewise.
8658         * psymtab.c (allocate_psymtab): Likewise.
8659         * stabsread.c (read_member_functions): Likewise.
8660         * xcoffread.c (xcoff_end_psymtab): Likewise.
8661
8662 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8663
8664         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8665         compiler supports std::is_trivially_constructible.
8666         * common/poison.h: Include obstack.h.
8667         (IsMallocable): Define to is_trivially_constructible if the
8668         compiler supports it, define to true_type otherwise.
8669         (xobnew): New.
8670         (XOBNEW): Redefine.
8671         (xobnewvec): New.
8672         (XOBNEWVEC): Redefine.
8673         * gdb_obstack.h (obstack_zalloc): New.
8674         (OBSTACK_ZALLOC): Redefine.
8675         (obstack_calloc): New.
8676         (OBSTACK_CALLOC): Redefine.
8677         (obstack_new): New.
8678         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8679         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8680         gdbarch.c.
8681         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8682         obstack_calloc/obstack_zalloc.
8683         (gdbarch_obstack_zalloc): Remove.
8684         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8685
8686 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8687
8688         * stack.c (backtrace_command_1): Remove useless variable int i.
8689
8690 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8691
8692         * stack.c (print_frame_info): Fix comment.
8693
8694 2018-05-18  Tom Tromey  <tom@tromey.com>
8695
8696         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8697         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8698         (~dwarf2_per_objfile): Update
8699         (dwarf2_get_dwz_file): Use new.
8700         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8701         unique_ptr.
8702
8703 2018-05-18  Tom Tromey  <tom@tromey.com>
8704
8705         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8706         unique_ptr.
8707         * dwarf2read.c (struct dwp_file): Add constructor and
8708         initializers.
8709         (open_and_init_dwp_file): Return a unique_ptr.
8710         (dwarf2_per_objfile, create_dwp_hash_table)
8711         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8712         (lookup_dwo_unit_in_dwp): Update.
8713         (open_and_init_dwp_file, get_dwp_file): Update.
8714
8715 2018-05-18  Tom Tromey  <tom@tromey.com>
8716
8717         * dwarf2read.c (dwarf2_per_objfile): Update.
8718         (struct mapped_index): Add initializers.
8719         (dwarf2_read_index): Use new.
8720         (dw2_symtab_iter_init): Update.
8721         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8722         unique_ptr.
8723
8724 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8725
8726         * dwarf2read.c (mapped_index) <total_size>: Remove.
8727
8728 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8729
8730         * unittests/format_pieces-selftests.c (test_format_specifier):
8731         Add ARI comments.
8732
8733 2018-05-18  Tom Tromey  <tom@tromey.com>
8734
8735         * c-typeprint.c (maybe_print_hole): New function.
8736         (c_print_type_struct_field_offset): Update.
8737         (c_type_print_base_struct_union): Call maybe_print_hole.
8738
8739 2018-05-17  Keith Seitz  <keiths@redhat.com>
8740
8741         * breakpoint.c (build_bpstat_chain): New function, moved from
8742         bpstat_stop_status.
8743         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8744         If no stop chain is passed, call build_bpstat_chain to build it.
8745         * breakpoint.h (build_bpstat_chain): Declare.
8746         (bpstat_stop_status): Move documentation here from breakpoint.c.
8747         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8748         build the stop chain and pass it to skip_inline_frames.
8749         Pass this stop chain to bpstat_stop_status.
8750         * inline-frame.c: Include breakpoint.h.
8751         (stopped_by_user_bp_inline_frame): New function.
8752         (skip_inline_frames): Add parameter `stop_chain'.
8753         Move documention to inline-frame.h.
8754         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8755         whether the frame should be elided.
8756         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8757         Add moved documentation and update for new parameter.
8758
8759 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8760
8761         PR cli/14975
8762         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8763         unittests/format_pieces-selftests.c.
8764         * common/format.h (format_piece) <operator==>: New.
8765         (format_pieces) <operator[]>: Remove.
8766         * common/format.c (format_pieces::format_pieces): Handle \e.
8767         * unittests/format_pieces-selftests.c: New.
8768
8769 2018-05-17  Tom Tromey  <tom@tromey.com>
8770
8771         PR symtab/23010:
8772         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8773         (dw2_instantiate_symtab): Add skip_partial parameter.
8774         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8775         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8776         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8777         (dw2_expand_symtabs_matching_one)
8778         (dw2_find_pc_sect_compunit_symtab)
8779         (dw2_debug_names_lookup_symbol)
8780         (dw2_debug_names_expand_symtabs_for_function): Update.
8781         (init_cutu_and_read_dies): Add skip_partial parameter.
8782         (process_psymtab_comp_unit, build_type_psymtabs_1)
8783         (process_skeletonless_type_unit, load_partial_comp_unit)
8784         (psymtab_to_symtab_1): Update.
8785         (load_full_comp_unit): Add skip_partial parameter.
8786         (process_imported_unit_die, dwarf2_read_addr_index)
8787         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8788         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8789         (read_signatured_type): Update.
8790
8791 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8792
8793         * value.c (release_value): Remove unused variable.
8794         (record_latest_value): Likewise.
8795         (access_value_history): Likewise.
8796         (preserve_values): Likewise.
8797
8798 2018-05-17  Tom Tromey  <tom@tromey.com>
8799
8800         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8801         Initialize.
8802
8803 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8804
8805         PR gdb/22286
8806         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8807         Also handle registers whose width is not a multiple of
8808         PTRACE_TYPE_RET.
8809         (linux_nat_trad_target::store_register): Likewise.
8810
8811 2018-05-16  Tom Tromey  <tom@tromey.com>
8812
8813         * gdbcore.h (core_bfd): Redefine.
8814         * corelow.c (core_target::close): Update.
8815         (core_target_open): Update.
8816         * progspace.h (struct program_space) <cbfd>: Now a
8817         gdb_bfd_ref_ptr.
8818
8819 2018-05-16  Tom Tromey  <tom@tromey.com>
8820
8821         PR cli/19551:
8822         * symfile-add-flags.h (enum symfile_add_flags)
8823         <SYMFILE_NOT_FILENAME>: New constant.
8824         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8825         objfile name from BFD.
8826         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8827         * minidebug.c (find_separate_debug_file_in_section): Put
8828         ".gnu_debugdata" into BFD's file name.
8829
8830 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8831
8832         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8833         Remove.
8834
8835 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8836
8837         PR binutils/21446
8838         * aarch64-tdep.c (aarch64_analyze_prologue,
8839         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8840         Indicate not interested in errors.
8841
8842 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8843
8844         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8845         Supply the MIPS_ZERO_REGNUM register.
8846
8847 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8848
8849         * mips-tdep.c (mask_address_var): Make variable static.
8850
8851 2018-05-14  Tom Tromey  <tom@tromey.com>
8852
8853         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8854
8855 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8856
8857         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8858         FXSAVE_ADDR for the mxcsr register.
8859
8860 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8861
8862         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8863
8864 2018-05-11  Pedro Alves  <palves@redhat.com>
8865
8866         * corelow.c (core_target) <core_target>: No longer inline.
8867         Initialize m_core_gdbarch, m_core_vec and build the section table
8868         here.
8869         <~core_target>: New.
8870         <core_gdbarch, get_core_register_section>: New methods.
8871         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8872         factored out from ...
8873         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8874         (core_ops): Delete.
8875         (sniff_core_bfd): Add gdbarch parameter.
8876         (core_close): Delete, merged into ...
8877         (core_target::close): ... here.  Delete self.
8878         (core_close_cleanup): Delete.
8879         (core_target_open): Allocate a core_target on the heap.  Use a
8880         unique_ptr instead of a cleanup.  Bits moved into the core_target
8881         ctor.  Adjust to use core_target methods instead of globals.
8882         (get_core_register_section): Rename to ...
8883         (core_target::get_core_register_section): ... this and adjust.
8884         (struct get_core_registers_cb_data): New.
8885         (get_core_registers_cb): Use it.  Use bool.
8886         (core_target::fetch_registers, core_target::files_info)
8887         (core_target::xfer_partial, core_target::read_description)
8888         (core_target::pid_to, core_target::thread_name): Adjust to
8889         reference class fields instead of globals.
8890         * target.h (struct target_ops_deleter, target_ops_up): New.
8891
8892 2018-05-11  Pedro Alves  <palves@redhat.com>
8893
8894         * corefile.c (core_file_command): Move to corelow.c.
8895         * corelow.c (the_core_target): Delete.
8896         (core_file_command): Moved from corefile.c.  Check exec_bfd
8897         instead of the_core_target.  Use target_detach instead of calling
8898         into the_core_target directly.
8899         (maybe_say_no_core_file_now): New.
8900         (core_target::detach): Use it.
8901         (_initialize_corelow): Remove references to the_core_target.
8902         * gdbcore.h (the_core_target): Delete.
8903
8904 2018-05-11  Tom Tromey  <tromey@redhat.com>
8905             Pedro Alves  <palves@redhat.com>
8906
8907         * corefile.c (core_bfd): Remove.
8908         * gdbcore.h (core_bfd): Now a macro.
8909         * progspace.h (struct program_space) <cbfd>: New field.
8910
8911 2018-05-11  Tom Tromey  <tom@tromey.com>
8912
8913         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8914         gdb::def_vector.
8915
8916 2018-05-10  Tom Tromey  <tom@tromey.com>
8917
8918         * configure: Rebuild.
8919         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8920
8921 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8922
8923         PR server/23158:
8924         * regformats/regdat.sh: Adjust script, following the addition
8925         of the new expedite_regs parameter to init_target_desc.
8926
8927 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8928     
8929         PR gdb/23127
8930         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8931         set_gdbarch_significant_addr_bit.
8932         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8933         set_gdbarch_significant_addr_bit.
8934         * utils.c (address_significant): Update to sign extend addr.
8935
8936 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8937
8938         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8939         (xtensa_linux_init_abi): Limit tdep->num_regs by
8940         tdep->num_nopriv_regs.
8941         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8942         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8943         not initialized.
8944
8945 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8946
8947         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8948
8949 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8950
8951         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8952         (I387_MXCSR_INIT_VAL): New constant.
8953         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8954         buffer if it was supplied by the inferior.
8955         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8956         (i387_xsave_get_clear_bv): New function.
8957         (i387_supply_xsave): Only read x87 control registers from the
8958         xsave buffer if the feature is enabled, and the state will have
8959         been written, otherwise, provide a suitable default.
8960         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8961         including x87 control registers.  Update control registers if they
8962         have changed from the default value, and mark features as enabled
8963         as required.
8964         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8965
8966 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8967
8968         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8969
8970 2018-05-07  Tom Tromey  <tom@tromey.com>
8971
8972         * configure: Rebuild.
8973         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8974
8975 2018-05-07  Tom Tromey  <tom@tromey.com>
8976
8977         PR tdep/20362:
8978         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8979         bit.  Use correct value for VDIV.
8980
8981 2018-05-04  Tom Tromey  <tom@tromey.com>
8982
8983         * configure: Rebuild.
8984         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8985
8986 2018-05-04  Tom Tromey  <tom@tromey.com>
8987
8988         * linux-record.c (record_linux_system_call) <case
8989         RECORD_SYS_RECVFROM>: Add "break".
8990
8991 2018-05-04  Tom Tromey  <tom@tromey.com>
8992
8993         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8994         Add missing "break".
8995         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8996         Add missing "break".
8997
8998 2018-05-04  Tom Tromey  <tom@tromey.com>
8999
9000         * rs6000-tdep.c (ppc_process_record_op4)
9001         (ppc_process_record_op63): Add fall-through comment.
9002
9003 2018-05-04  Tom Tromey  <tom@tromey.com>
9004
9005         * i386-tdep.c (i386_process_record): Add fall-through comment.
9006
9007 2018-05-04  Tom Tromey  <tom@tromey.com>
9008
9009         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9010         comment.
9011
9012 2018-05-04  Tom Tromey  <tom@tromey.com>
9013
9014         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9015         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9016         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9017         comment.
9018         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9019         comment.
9020         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9021         comment.
9022
9023 2018-05-04  Tom Tromey  <tom@tromey.com>
9024
9025         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9026
9027 2018-05-04  Tom Tromey  <tom@tromey.com>
9028
9029         * s390-tdep.c (s390_process_record): Fix fall-through comments.
9030         * xcoffread.c (scan_xcoff_symtab): Move comment later.
9031         * symfile.c (section_is_mapped): Fix fall-through comment.
9032         * stabsread.c (define_symbol, read_member_functions): Fix
9033         fall-through comment.
9034         * s390-linux-tdep.c (s390_process_record): Fix fall-through
9035         comment.
9036         * remote.c (remote_wait_as): Fix fall-through comment.
9037         * p-exp.y (yylex): Fix fall-through comment.
9038         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9039         comment.
9040         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9041         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9042         * jv-exp.y (yylex): Fix fall-through comment.
9043         * go-exp.y (lex_one_token): Fix fall-through comment.
9044         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9045         fall-through comment.
9046         * f-exp.y (yylex): Fix fall-through comment.
9047         * dwarf2read.c (process_die): Fix fall-through comments.
9048         * dbxread.c (process_one_symbol): Fix fall-through comment.
9049         * d-exp.y (lex_one_token): Fix fall-through comment.
9050         * cp-name-parser.y (yylex): Fix fall-through comment.
9051         * coffread.c (coff_symtab_read): Fix fall-through comment.
9052         * c-exp.y (lex_one_token): Fix fall-through comment.
9053         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9054         comment.
9055         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9056         comment.
9057
9058 2018-05-04  Tom Tromey  <tom@tromey.com>
9059
9060         PR python/22730:
9061         * NEWS: Mention gdb.execute change.
9062         * gdbcmd.h (execute_control_command): Don't declare.
9063         * python/python.c (execute_gdb_command): Use read_command_lines_1,
9064         execute_control_commands, execute_control_commands_to_string.
9065         * cli/cli-script.h (execute_control_commands)
9066         (execute_control_commands_to_string): Declare.
9067         (execute_control_command): Add from_tty parameter.
9068         * cli/cli-script.c (execute_control_commands)
9069         (execute_control_commands_to_string): New functions.
9070         (execute_user_command): Use execute_control_commands.
9071         (execute_control_command_1): Add "from_tty" parameter.  Update.
9072         (execute_control_command): Likewise.
9073
9074 2018-05-04  Tom Tromey  <tom@tromey.com>
9075
9076         PR python/22731:
9077         * NEWS: Mention that breakpoint commands are writable.
9078         * python/py-breakpoint.c (bppy_set_commands): New function.
9079         (breakpoint_object_getset) <"commands">: Use it.
9080
9081 2018-05-04  Tom Tromey  <tom@tromey.com>
9082
9083         * tracepoint.c (actions_command): Update.
9084         * mi/mi-cmd-break.c (mi_command_line_array)
9085         (mi_command_line_array_cnt, mi_command_line_array_ptr)
9086         (mi_read_next_line): Remove.
9087         (mi_cmd_break_commands): Update.
9088         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9089         function_view.
9090         * cli/cli-script.c (get_command_line): Update.
9091         (process_next_line): Use function_view.  Constify.
9092         (recurse_read_control_structure, read_command_lines)
9093         (read_command_lines_1): Change argument types to function_view.
9094         (do_define_command, document_command): Update.
9095         * breakpoint.h (check_tracepoint_command): Don't declare.
9096         * breakpoint.c (check_tracepoint_command): Remove.
9097         (commands_command_1, create_tracepoint_from_upload): Update.
9098
9099 2018-05-04  Tom Tromey  <tom@tromey.com>
9100
9101         PR gdb/11750:
9102         * cli/cli-script.h (enum command_control_type) <define_control>:
9103         New constant.
9104         * cli/cli-script.c (multi_line_command_p): Handle define_control.
9105         (build_command_line, execute_control_command_1)
9106         (process_next_line): Likewise.
9107         (do_define_command): New function, extracted from define_command.
9108         (define_command): Use it.
9109
9110 2018-05-04  Tom Tromey  <tom@tromey.com>
9111
9112         * tracepoint.c (actions_command): Update.
9113         * cli/cli-script.h (read_command_lines): Update.
9114         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9115         (MAX_TMPBUF): Remove define.
9116         (define_command): Use string_printf.
9117         (document_command): Likewise.
9118         * breakpoint.c (commands_command_1): Update.
9119
9120 2018-05-04  Tom Tromey  <tom@tromey.com>
9121
9122         * top.c (execute_command): Update.
9123         * cli/cli-script.h (print_command_lines): Now varargs.
9124         * cli/cli-script.c (print_command_lines): Now varargs.
9125         (execute_control_command_1) <case while_control, case if_control>:
9126         Update.
9127
9128 2018-05-04  Tom Tromey  <tom@tromey.com>
9129
9130         * tracepoint.c (all_tracepoint_actions): Rename from
9131         all_tracepoint_actions_and_cleanup.  Change return type.
9132         (actions_command, encode_actions_1, encode_actions)
9133         (trace_dump_actions, tdump_command): Update.
9134         * remote.c (remote_download_command_source): Update.
9135         * python/python.c (gdbpy_eval_from_control_command)
9136         (python_command, python_interactive_command): Update.
9137         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9138         * guile/guile.c (guile_command)
9139         (gdbscm_eval_from_control_command, guile_command): Update.
9140         * compile/compile.c (compile_code_command)
9141         (compile_print_command, compile_to_object): Update.
9142         * cli/cli-script.h (struct command_lines_deleter): New.
9143         (counted_command_line): New typedef.
9144         (struct command_line): Add constructor, destructor.
9145         <body_list>: Remove.
9146         <body_list_0, body_list_1>: New members.
9147         (command_line_up): Remove typedef.
9148         (read_command_lines, read_command_lines_1, get_command_line):
9149         Update.
9150         (copy_command_lines): Don't declare.
9151         * cli/cli-script.c (build_command_line): Use "new".
9152         (get_command_line): Return counted_command_line.
9153         (print_command_lines, execute_user_command)
9154         (execute_control_command_1, while_command, if_command): Update.
9155         (realloc_body_list): Remove.
9156         (process_next_line, recurse_read_control_structure): Update.
9157         (read_command_lines, read_command_lines_1): Return counted_command_line.
9158         (free_command_lines): Use "delete".
9159         (copy_command_lines): Remove.
9160         (define_command, document_command, show_user_1): Update.
9161         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9162         a counted_command_line.
9163         * breakpoint.h (counted_command_line): Remove typedef.
9164         (breakpoint_set_commands): Update.
9165         * breakpoint.c (check_no_tracepoint_commands)
9166         (validate_commands_for_breakpoint): Update.
9167         (breakpoint_set_commands): Change commands to be a
9168         counted_command_line.
9169         (commands_command_1, update_dprintf_command_list)
9170         (create_tracepoint_from_upload): Update.
9171
9172 2018-05-04  Tom Tromey  <tom@tromey.com>
9173
9174         * cli/cli-decode.h (cmd_list_element): New constructor.
9175         (~cmd_list_element): New destructor.
9176         (struct cmd_list_element): Add initializers.
9177         * cli/cli-decode.c (do_add_cmd): Use "new".
9178         (delete_cmd): Use "delete".
9179
9180 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9181             Pedro Alves <palves@redhat.com>
9182
9183         PR breakpoints/19806 and support for PR external/20207.
9184         * NEWS: Mention Aarch64 watchpoint improvements.
9185         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9186         watchpoints and PR external/20207 watchpoints.
9187         * nat/aarch64-linux-hw-point.c
9188         (kernel_supports_any_contiguous_range): New.
9189         (aarch64_watchpoint_offset): New.
9190         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9191         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9192         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9193         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9194         next_addr_orig_p.  Support PR external/20207 watchpoints.
9195         (aarch64_downgrade_regs): New.
9196         (aarch64_dr_state_insert_one_point): New parameters offset and
9197         addr_orig.
9198         (aarch64_dr_state_remove_one_point): Likewise.
9199         (aarch64_handle_breakpoint): Update caller.
9200         (aarch64_handle_aligned_watchpoint): Likewise.
9201         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9202         aligned_offset.
9203         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9204         aarch64_downgrade_regs.
9205         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9206         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9207         (DR_CONTROL_MASK): ... this.
9208         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9209         (unsigned int aarch64_watchpoint_offset): New prototype.
9210         (aarch64_linux_set_debug_regs): Remove const from state.
9211         * utils.c (align_up, align_down): Move to ...
9212         * common/common-utils.c (align_up, align_down): ... here.
9213         * utils.h (align_up, align_down): Move to ...
9214         * common/common-utils.h (align_up, align_down): ... here.
9215
9216 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9217
9218         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9219         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9220         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9221         Re-implement to match the ABI as summarized in GCC's
9222         gcc/config/sparc/sparc.c.  All callers updated.
9223         (sparc32_store_arguments): Remove assertion.
9224
9225 2018-05-04  Tom Tromey  <tom@tromey.com>
9226
9227         * printcmd.c: Don't include tui.h.
9228         (decode_format): Use skip_spaces.
9229
9230 2018-05-04  Tom Tromey  <tom@tromey.com>
9231
9232         PR gdb/22619:
9233         * printcmd.c (last_count): New global.
9234         (x_command): Use saved count when repeating.
9235
9236 2018-05-04  Tom Tromey  <tom@tromey.com>
9237
9238         * nto-procfs.c (do_closedir_cleanup): Remove.
9239         (procfs_pidlist): Use gdb_dir_up.
9240         * procfs.c (do_closedir_cleanup): Remove.
9241         (proc_update_threads): Use gdb_dir_up.
9242         * common/filestuff.h (struct gdb_dir_deleter): New.
9243         (gdb_dir_up): New typedef.
9244
9245 2018-05-04  Tom Tromey  <tom@tromey.com>
9246
9247         * ada-lang.c (print_mention_exception): Use std::string.
9248
9249 2018-05-04  Tom Tromey  <tom@tromey.com>
9250
9251         * ada-lang.c (create_excep_cond_exprs): Update.
9252         (ada_exception_catchpoint_cond_string): Use std::string.
9253
9254 2018-05-04  Tom Tromey  <tom@tromey.com>
9255
9256         * ada-lang.c (xget_renaming_scope): Return std::string.
9257         (old_renaming_is_invisible): Update.
9258
9259 2018-05-04  Tom Tromey  <tom@tromey.com>
9260
9261         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9262         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9263
9264 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9265
9266         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9267
9268 2018-05-04  Tom Tromey  <tom@tromey.com>
9269
9270         * remote.c (remote_query_supported_append): Change type.
9271         (remote_check_symbols): Update.
9272
9273 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
9274
9275         PR gdb/11420
9276         * configure.ac: Prepend libpython.
9277         * python/python-config.py: Likewise.
9278         * configure: Regenerate.
9279
9280 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9281
9282         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9283
9284 2018-05-03  Pedro Alves  <palves@redhat.com>
9285
9286         * s390-linux-nat.c
9287         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9288         override.  Write 'true' instead of '1'.
9289         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9290         declaration.
9291
9292 2018-05-02  Pedro Alves  <palves@redhat.com>
9293
9294         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9295         add_inf_child_target.
9296         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9297         add_inf_child_target.
9298         * aix-thread.c (aix_thread_target_info): New.
9299         (aix_thread_target) <shortname, longname, doc>: Delete.
9300         <info>: New.
9301         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9302         add_inf_child_target.
9303         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9304         add_inf_child_target.
9305         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9306         add_inf_child_target.
9307         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9308         add_inf_child_target.
9309         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9310         add_inf_child_target.
9311         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9312         add_inf_child_target.
9313         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9314         add_inf_child_target.
9315         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9316         add_inf_child_target.
9317         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9318         add_inf_child_target.
9319         * bfd-target.c (target_bfd_target_info): New.
9320         (target_bfd) <shortname, longname, doc>: Delete.
9321         <info>: New.
9322         * bsd-kvm.c (bsd_kvm_target_info): New.
9323         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9324         <info>: New.
9325         (bsd_kvm_target::open): Rename to ...
9326         (bsd_kvm_target_open): ... this.  Adjust.
9327         * bsd-uthread.c (bsd_uthread_target_info): New.
9328         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9329         <info>: New.
9330         * corefile.c (core_file_command): Adjust.
9331         * corelow.c (core_target_info): New.
9332         (core_target) <shortname, longname, doc>: Delete.
9333         <info>: New.
9334         (core_target::open): Rename to ...
9335         (core_target_open): ... this.  Adjust.
9336         * ctf.c (ctf_target_info): New.
9337         (ctf_target) <shortname, longname, doc>: Delete.
9338         <info>: New.
9339         (ctf_target::open): Rename to ...
9340         (ctf_target_open): ... this.
9341         (_initialize_ctf): Adjust.
9342         * exec.c (exec_target_info): New.
9343         (exec_target) <shortname, longname, doc>: Delete.
9344         <info>: New.
9345         (exec_target::open): Rename to ...
9346         (exec_target_open): ... this.
9347         * gdbcore.h (core_target_open): Declare.
9348         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9349         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9350         add_inf_child_target.
9351         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9352         add_inf_child_target.
9353         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9354         add_inf_child_target.
9355         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9356         add_inf_child_target.
9357         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9358         add_inf_child_target.
9359         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9360         add_inf_child_target.
9361         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9362         add_inf_child_target.
9363         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9364         add_inf_child_target.
9365         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9366         add_inf_child_target.
9367         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9368         add_inf_child_target.
9369         * inf-child.c (inf_child_target_info): New.
9370         (inf_child_target::info): New.
9371         (inf_child_open_target): Remove 'target' parameter.  Use
9372         get_native_target instead.
9373         (inf_child_target::open): Delete.
9374         (add_inf_child_target): New.
9375         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9376         Delete.
9377         <info>: New.
9378         (add_inf_child_target): Declare.
9379         (inf_child_open_target): Declare.
9380         * linux-thread-db.c (thread_db_target_info): New.
9381         (thread_db_target) <shortname, longname, doc>: Delete.
9382         <info>: New.
9383         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9384         add_inf_child_target.
9385         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9386         add_inf_child_target.
9387         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9388         add_inf_child_target.
9389         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9390         add_inf_child_target.
9391         * make-target-delegates (print_class): Adjust.
9392         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9393         add_inf_child_target.
9394         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9395         add_inf_child_target.
9396         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9397         add_inf_child_target.
9398         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9399         add_inf_child_target.
9400         * nto-procfs.c (nto_native_target_info): New.
9401         (nto_procfs_target_native) <shortname, longname, doc>:
9402         Delete.
9403         <info>: New.
9404         (nto_procfs_target_info): New.
9405         (nto_procfs_target_procfs) <shortname, longname, doc>:
9406         Delete.
9407         <info>: New.
9408         (init_procfs_targets): Adjust.
9409         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9410         add_inf_child_target.
9411         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9412         add_inf_child_target.
9413         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9414         add_inf_child_target.
9415         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9416         add_inf_child_target.
9417         * ravenscar-thread.c (ravenscar_target_info): New.
9418         (ravenscar_thread_target) <shortname, longname, doc>:
9419         Delete.
9420         <info>: New.
9421         * record-btrace.c (record_btrace_target_info):
9422         (record_btrace_target) <shortname, longname, doc>: Delete.
9423         <info>: New.
9424         (record_btrace_target::open): Rename to ...
9425         (record_btrace_target_open): ... this.  Adjust.
9426         * record-full.c (record_longname, record_doc): New.
9427         (record_full_base_target) <shortname, longname, doc>: Delete.
9428         <info>: New.
9429         (record_full_target_info): New.
9430         (record_full_target): <shortname>: Delete.
9431         <info>: New.
9432         (record_full_core_open_1, record_full_open_1): Update comments.
9433         (record_full_base_target::open): Rename to ...
9434         (record_full_open): ... this.
9435         (cmd_record_full_restore): Update.
9436         (_initialize_record_full): Update.
9437         * remote-sim.c (remote_sim_target_info): New.
9438         (gdbsim_target) <shortname, longname, doc>: Delete.
9439         <info>: New.
9440         (gdbsim_target::open): Rename to ...
9441         (gdbsim_target_open): ... this.
9442         (_initialize_remote_sim): Adjust.
9443         * remote.c (remote_doc): New.
9444         (remote_target_info): New.
9445         (remote_target) <shortname, longname, doc>: Delete.
9446         <info>: New.
9447         (extended_remote_target_info): New.
9448         (extended_remote_target) <shortname, longname, doc>: Delete.
9449         <info>: New.
9450         (remote_target::open_1): Make static.  Adjust.
9451         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9452         * s390-linux-nat.c (_initialize_s390_nat): Use
9453         add_inf_child_target.
9454         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9455         add_inf_child_target.
9456         * sol-thread.c (thread_db_target_info): New.
9457         (sol_thread_target) <shortname, longname, doc>: Delete.
9458         <info>: New.
9459         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9460         add_inf_child_target.
9461         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9462         add_inf_child_target.
9463         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9464         add_inf_child_target.
9465         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9466         add_inf_child_target.
9467         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9468         add_inf_child_target.
9469         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9470         add_inf_child_target.
9471         * spu-linux-nat.c (_initialize_spu_nat): Use
9472         add_inf_child_target.
9473         * spu-multiarch.c (spu_multiarch_target_info): New.
9474         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9475         <info>: New.
9476         * target-delegates.c: Regenerate.
9477         * target.c: Include <unordered_map>.
9478         (target_ops_p): Delete.
9479         (DEF_VEC_P(target_ops_p)): Delete.
9480         (target_factories): New.
9481         (test_target_info): New.
9482         (test_target_ops::info): New.
9483         (open_target): Adjust to use target_factories.
9484         (add_target_with_completer): Rename to ...
9485         (add_target): ... this.  Change prototype.  Register target_info
9486         and open callback in target_factories.  Register target_info in
9487         command context instead of target_ops.
9488         (add_target): Delete old implementation.
9489         (add_deprecated_target_alias): Change prototype.  Adjust.
9490         (the_native_target): New.
9491         (set_native_target, get_native_target): New.
9492         (find_default_run_target): Use the_native_target.
9493         (find_attach_target, find_run_target): Simplify.
9494         (target_ops::open): Delete.
9495         (dummy_target_info): New.
9496         (dummy_target::shortname, dummy_target::longname)
9497         (dummy_target::doc): Delete.
9498         (dummy_target::info): New.
9499         (debug_target::shortname, debug_target::longname)
9500         (debug_target::doc): Delete.
9501         (debug_target::info): New.
9502         * target.h (struct target_info): New.
9503         (target_ops::~target_ops): Add comment.
9504         (target_ops::info): New.
9505         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9506         longer virtual.  Implement in terms of target_info.
9507         (set_native_target, get_native_target): Declare.
9508         (target_open_ftype): New.
9509         (add_target, add_target_with_completer)
9510         (add_deprecated_target_alias): Change prototype.
9511         (test_target) <shortname, longname, doc>: Delete.
9512         <info>: New.
9513         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9514         add_inf_child_target.
9515         * tracefile-tfile.c (tfile_target_info): New.
9516         (tfile_target) <shortname, longname, doc>: Delete.
9517         <info>: New.
9518         (tfile_target::open): Rename to ...
9519         (tfile_target_open): ... this.
9520         (_initialize_tracefile_tfile): Adjust.
9521         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9522         add_inf_child_target.
9523         * windows-nat.c (_initialize_windows_nat): Use
9524         add_inf_child_target.
9525         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9526         add_inf_child_target.
9527
9528 2018-05-02  Pedro Alves  <palves@redhat.com>
9529
9530         * linux-nat.h (linux_nat_target) <low_new_thread,
9531         low_delete_thread, low_new_fork, low_forget_process,
9532         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9533         New virtual methods.
9534         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9535         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9536         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9537         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9538         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9539         Delete.
9540         * linux-fork.c (delete_fork): Adjust to call low method.
9541         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9542         (linux_nat_new_fork, linux_nat_forget_process_hook)
9543         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9544         (linux_nat_status_is_event):
9545         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9546         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9547         to call low method.
9548         (sigtrap_is_event): Rename to ...
9549         (linux_nat_target::low_status_is_event): ... this.
9550         (linux_nat_set_status_is_event): Delete.
9551         (save_stop_reason, linux_nat_wait_1)
9552         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9553         low methods.
9554         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9555         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9556         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9557         (linux_nat_set_prepare_to_resume): Delete.
9558         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9559         low virtual methods.
9560         * amd64-linux-nat.c: Likewise.
9561         * arm-linux-nat.c: Likewise.
9562         * i386-linux-nat.c: Likewise.
9563         * ia64-linux-nat.c: Likewise.
9564         * mips-linux-nat.c: Likewise.
9565         * ppc-linux-nat.c: Likewise.
9566         * s390-linux-nat.c: Likewise.
9567         * sparc64-linux-nat.c: Likewise.
9568         * x86-linux-nat.c: Likewise.
9569         * x86-linux-nat.h: Include "nat/x86-linux.h".
9570         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9571         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9572         Override methods.
9573
9574 2018-05-02  Pedro Alves  <palves@redhat.com>
9575
9576         * target.h (target_ops)
9577         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9578         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9579         stopped_by_watchpoint, have_continuable_watchpoint,
9580         stopped_data_address, watchpoint_addr_within_range,
9581         can_accel_watchpoint_condition, can_run, thread_alive,
9582         has_all_memory, has_memory, has_stack, has_registers,
9583         has_execution, can_async_p, is_async_p, supports_non_stop,
9584         always_non_stop_p, can_execute_reverse, supports_multi_process,
9585         supports_enable_disable_tracepoint,
9586         supports_disable_randomization, supports_string_tracing,
9587         supports_evaluation_of_breakpoint_conditions,
9588         can_run_breakpoint_commands, filesystem_is_local,
9589         can_download_tracepoint, get_trace_state_variable_value,
9590         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9591         record_is_replaying, record_will_replay,
9592         augmented_libraries_svr4_read>: Adjust to return bool.
9593         * aarch64-linux-nat.c: All implementations adjusted.
9594         * aix-thread.c: All implementations adjusted.
9595         * arm-linux-nat.c: All implementations adjusted.
9596         * breakpoint.c: All implementations adjusted.
9597         * bsd-kvm.c: All implementations adjusted.
9598         * bsd-uthread.c: All implementations adjusted.
9599         * corelow.c: All implementations adjusted.
9600         * ctf.c: All implementations adjusted.
9601         * darwin-nat.c: All implementations adjusted.
9602         * darwin-nat.h: All implementations adjusted.
9603         * exec.c: All implementations adjusted.
9604         * fbsd-nat.c: All implementations adjusted.
9605         * fbsd-nat.h: All implementations adjusted.
9606         * gnu-nat.c: All implementations adjusted.
9607         * gnu-nat.h: All implementations adjusted.
9608         * go32-nat.c: All implementations adjusted.
9609         * ia64-linux-nat.c: All implementations adjusted.
9610         * inf-child.c: All implementations adjusted.
9611         * inf-child.h: All implementations adjusted.
9612         * inf-ptrace.c: All implementations adjusted.
9613         * inf-ptrace.h: All implementations adjusted.
9614         * linux-nat.c: All implementations adjusted.
9615         * linux-nat.h: All implementations adjusted.
9616         * mips-linux-nat.c: All implementations adjusted.
9617         * nto-procfs.c: All implementations adjusted.
9618         * ppc-linux-nat.c: All implementations adjusted.
9619         * procfs.c: All implementations adjusted.
9620         * ravenscar-thread.c: All implementations adjusted.
9621         * record-btrace.c: All implementations adjusted.
9622         * record-full.c: All implementations adjusted.
9623         * remote-sim.c: All implementations adjusted.
9624         * remote.c: All implementations adjusted.
9625         * s390-linux-nat.c: All implementations adjusted.
9626         * sol-thread.c: All implementations adjusted.
9627         * spu-multiarch.c: All implementations adjusted.
9628         * target-delegates.c: All implementations adjusted.
9629         * target.c: All implementations adjusted.
9630         * target.h: All implementations adjusted.
9631         * tracefile-tfile.c: All implementations adjusted.
9632         * tracefile.c: All implementations adjusted.
9633         * tracefile.h: All implementations adjusted.
9634         * windows-nat.c: All implementations adjusted.
9635         * x86-linux-nat.h: All implementations adjusted.
9636         * x86-nat.h: All implementations adjusted.
9637
9638 2018-05-02  Pedro Alves  <palves@redhat.com>
9639
9640         * make-target-delegates (scan_target_h): Don't trim lines here.
9641         Replace sequences of tabs and/or whitespace with a single
9642         whitespace.
9643         (top level, parsing methods): Trim each line before processing it
9644         here.
9645
9646 2018-05-02  Pedro Alves  <palves@redhat.com>
9647             John Baldwin  <jhb@freebsd.org>
9648
9649         * target.h (enum strata) <debug_stratum>: New.
9650         (struct target_ops) <all delegation methods>: Replace by C++
9651         virtual methods, and drop "to_" prefix.  All references updated
9652         throughout.
9653         <to_shortname, to_longname, to_doc, to_data,
9654         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9655         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9656         virtual methods.  All references updated throughout.
9657         <can_attach, supports_terminal_ours, can_create_inferior,
9658         get_thread_control_capabilities, attach_no_wait>: New
9659         virtual methods.
9660         <insert_breakpoint, remove_breakpoint>: Now
9661         TARGET_DEFAULT_NORETURN methods.
9662         <info_proc>: Now returns bool.
9663         <to_magic>: Delete.
9664         (OPS_MAGIC): Delete.
9665         (current_target): Delete.  All references replaced by references
9666         to ...
9667         (target_stack): ... this.  New.
9668         (target_shortname, target_longname): Adjust.
9669         (target_can_run): Now a function declaration.
9670         (default_child_has_all_memory, default_child_has_memory)
9671         (default_child_has_stack, default_child_has_registers)
9672         (default_child_has_execution): Remove target_ops parameter.
9673         (complete_target_initialization): Delete.
9674         (memory_breakpoint_target): New template class.
9675         (test_target_ops): Refactor as a C++ class with virtual methods.
9676         * make-target-delegates (NAME_PART): Tighten.
9677         (POINTER_PART, CP_SYMBOL): New.
9678         (SIMPLE_RETURN_PART): Reimplement.
9679         (VEC_RETURN_PART): Expect less.
9680         (RETURN_PART, VIRTUAL_PART): New.
9681         (METHOD): Adjust to C++ virtual methods.
9682         (scan_target_h): Remove reference to C99.
9683         (dname): Output "target_ops::" prefix.
9684         (write_function_header): Adjust to output a C++ class method.
9685         (write_declaration): New.
9686         (write_delegator): Adjust to output a C++ class method.
9687         (tdname): Output "dummy_target::" prefix.
9688         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9689         method.
9690         (tdefault_names, debug_names): Delete.
9691         (return_types, tdefaults, styles, argtypes_array): New.
9692         (top level): All methods are delegators.
9693         (print_class): New.
9694         (top level): Print dummy_target and debug_target classes.
9695         * target-delegates.c: Regenerate.
9696         * target-debug.h (target_debug_print_enum_info_proc_what)
9697         (target_debug_print_thread_control_capabilities)
9698         (target_debug_print_thread_info_p): New.
9699         * target.c (dummy_target): Delete.
9700         (the_dummy_target, the_debug_target): New.
9701         (target_stack): Now extern.
9702         (set_targetdebug): Push/unpush debug target.
9703         (default_child_has_all_memory, default_child_has_memory)
9704         (default_child_has_stack, default_child_has_registers)
9705         (default_child_has_execution): Remove target_ops parameter.
9706         (complete_target_initialization): Delete.
9707         (add_target_with_completer): No longer call
9708         complete_target_initialization.
9709         (target_supports_terminal_ours): Use regular delegation.
9710         (update_current_target): Delete.
9711         (push_target): No longer check magic number.  Don't call
9712         update_current_target.
9713         (unpush_target): Don't call update_current_target.
9714         (target_is_pushed): No longer check magic number.
9715         (target_require_runnable): Skip for all stratums over
9716         process_stratum.
9717         (target_ops::info_proc): New.
9718         (target_info_proc): Use find_target_at and
9719         find_default_run_target.
9720         (target_supports_disable_randomization): Use regular delegation.
9721         (target_get_osdata): Use find_target_at.
9722         (target_ops::open, target_ops::close, target_ops::can_attach)
9723         (target_ops::attach, target_ops::can_create_inferior)
9724         (target_ops::create_inferior, target_ops::can_run)
9725         (target_can_run): New.
9726         (default_fileio_target): Use regular delegation.
9727         (target_ops::fileio_open, target_ops::fileio_pwrite)
9728         (target_ops::fileio_pread, target_ops::fileio_fstat)
9729         (target_ops::fileio_close, target_ops::fileio_unlink)
9730         (target_ops::fileio_readlink): New.
9731         (target_fileio_open_1, target_fileio_unlink)
9732         (target_fileio_readlink): Always call the target method.  Handle
9733         FILEIO_ENOSYS.
9734         (return_zero, return_zero_has_execution): Delete.
9735         (init_dummy_target): Delete.
9736         (dummy_target::dummy_target, dummy_target::shortname)
9737         (dummy_target::longname, dummy_target::doc)
9738         (debug_target::debug_target, debug_target::shortname)
9739         (debug_target::longname, debug_target::doc): New.
9740         (target_supports_delete_record): Use regular delegation.
9741         (setup_target_debug): Delete.
9742         (maintenance_print_target_stack): Skip debug_stratum.
9743         (initialize_targets): Instantiate the_dummy_target and
9744         the_debug_target.
9745         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9746         use target_stack.
9747         (target_auxv_search, fprint_target_auxv): Adjust.
9748         (info_auxv_command): Adjust to use target_stack.
9749         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9750         * exceptions.c (print_flush): Handle a NULL target_stack.
9751         * regcache.c (target_ops_no_register): Refactor as class with
9752         virtual methods.
9753
9754         * exec.c (exec_target): New class.
9755         (exec_ops): Now an exec_target.
9756         (exec_open, exec_close_1, exec_get_section_table)
9757         (exec_xfer_partial, exec_files_info, exec_has_memory)
9758         (exec_make_note_section): Refactor as exec_target methods.
9759         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9760         Delete.
9761         (exec_target::find_memory_regions): New.
9762         (_initialize_exec): Don't call init_exec_ops.
9763         * gdbcore.h (exec_file_clear): Delete.
9764
9765         * corefile.c (core_target): Delete.
9766         (core_file_command): Adjust.
9767         * corelow.c (core_target): New class.
9768         (the_core_target): New.
9769         (core_close): Remove target_ops parameter.
9770         (core_close_cleanup): Adjust.
9771         (core_target::close): New.
9772         (core_open, core_detach, get_core_registers, core_files_info)
9773         (core_xfer_partial, core_thread_alive, core_read_description)
9774         (core_pid_to_str, core_thread_name, core_has_memory)
9775         (core_has_stack, core_has_registers, core_info_proc): Rework as
9776         core_target methods.
9777         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9778         (_initialize_corelow): Initialize the_core_target.
9779         * gdbcore.h (core_target): Delete.
9780         (the_core_target): New.
9781
9782         * ctf.c: (ctf_target): New class.
9783         (ctf_ops): Now a ctf_target.
9784         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9785         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9786         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9787         methods.
9788         (init_ctf_ops): Delete.
9789         (_initialize_ctf): Don't call it.
9790         * tracefile-tfile.c (tfile_target): New class.
9791         (tfile_ops): Now a tfile_target.
9792         (tfile_open, tfile_close, tfile_files_info)
9793         (tfile_get_tracepoint_status, tfile_trace_find)
9794         (tfile_fetch_registers, tfile_xfer_partial)
9795         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9796         Refactor as tfile_target methods.
9797         (tfile_xfer_partial_features): Remove target_ops parameter.
9798         (init_tfile_ops): Delete.
9799         (_initialize_tracefile_tfile): Don't call it.
9800         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9801         (tracefile_has_stack, tracefile_has_registers)
9802         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9803         tracefile_target methods.
9804         (init_tracefile_ops): Delete.
9805         (tracefile_target::tracefile_target): New.
9806         * tracefile.h: Include "target.h".
9807         (tracefile_target): New class.
9808         (init_tracefile_ops): Delete.
9809
9810         * spu-multiarch.c (spu_multiarch_target): New class.
9811         (spu_ops): Now a spu_multiarch_target.
9812         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9813         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9814         (spu_search_memory, spu_mourn_inferior): Refactor as
9815         spu_multiarch_target methods.
9816         (init_spu_ops): Delete.
9817         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9818         complete_target_initialization.
9819
9820         * ravenscar-thread.c (ravenscar_thread_target): New class.
9821         (ravenscar_ops): Now a ravenscar_thread_target.
9822         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9823         (ravenscar_thread_alive, ravenscar_pid_to_str)
9824         (ravenscar_fetch_registers, ravenscar_store_registers)
9825         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9826         (ravenscar_stopped_by_hw_breakpoint)
9827         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9828         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9829         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9830         methods.
9831         (init_ravenscar_thread_ops): Delete.
9832         (_initialize_ravenscar): Remove references to
9833         init_ravenscar_thread_ops and complete_target_initialization.
9834
9835         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9836         (bsd_uthread_target): New class.
9837         (bsd_uthread_ops): Now a bsd_uthread_target.
9838         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9839         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9840         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9841         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9842         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9843         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9844         (bsd_uthread_target): Delete function.
9845         (_initialize_bsd_uthread): Remove reference to
9846         complete_target_initialization.
9847
9848         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9849         (target_bfd): ... this new class.
9850         (target_bfd_xfer_partial, target_bfd_get_section_table)
9851         (target_bfd_close): Refactor as target_bfd methods.
9852         (target_bfd::~target_bfd): New.
9853         (target_bfd_reopen): Adjust.
9854         (target_bfd::close): New.
9855
9856         * record-btrace.c (record_btrace_target): New class.
9857         (record_btrace_ops): Now a record_btrace_target.
9858         (record_btrace_open, record_btrace_stop_recording)
9859         (record_btrace_disconnect, record_btrace_close)
9860         (record_btrace_async, record_btrace_info)
9861         (record_btrace_insn_history, record_btrace_insn_history_range)
9862         (record_btrace_insn_history_from, record_btrace_call_history)
9863         (record_btrace_call_history_range)
9864         (record_btrace_call_history_from, record_btrace_record_method)
9865         (record_btrace_is_replaying, record_btrace_will_replay)
9866         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9867         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9868         (record_btrace_store_registers, record_btrace_prepare_to_store)
9869         (record_btrace_to_get_unwinder)
9870         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9871         (record_btrace_commit_resume, record_btrace_wait)
9872         (record_btrace_stop, record_btrace_can_execute_reverse)
9873         (record_btrace_stopped_by_sw_breakpoint)
9874         (record_btrace_supports_stopped_by_sw_breakpoint)
9875         (record_btrace_stopped_by_hw_breakpoint)
9876         (record_btrace_supports_stopped_by_hw_breakpoint)
9877         (record_btrace_update_thread_list, record_btrace_thread_alive)
9878         (record_btrace_goto_begin, record_btrace_goto_end)
9879         (record_btrace_goto, record_btrace_stop_replaying_all)
9880         (record_btrace_execution_direction)
9881         (record_btrace_prepare_to_generate_core)
9882         (record_btrace_done_generating_core): Refactor as
9883         record_btrace_target methods.
9884         (init_record_btrace_ops): Delete.
9885         (_initialize_record_btrace): Remove reference to
9886         init_record_btrace_ops.
9887         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9888         the execution_direction global.
9889         (record_full_base_target, record_full_target)
9890         (record_full_core_target): New classes.
9891         (record_full_ops): Now a record_full_target.
9892         (record_full_core_ops): Now a record_full_core_target.
9893         (record_full_target::detach, record_full_target::disconnect)
9894         (record_full_core_target::disconnect)
9895         (record_full_target::mourn_inferior, record_full_target::kill):
9896         New.
9897         (record_full_open, record_full_close, record_full_async): Refactor
9898         as methods of the record_full_base_target class.
9899         (record_full_resume, record_full_commit_resume): Refactor
9900         as methods of the record_full_target class.
9901         (record_full_wait, record_full_stopped_by_watchpoint)
9902         (record_full_stopped_data_address)
9903         (record_full_stopped_by_sw_breakpoint)
9904         (record_full_supports_stopped_by_sw_breakpoint)
9905         (record_full_stopped_by_hw_breakpoint)
9906         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9907         methods of the record_full_base_target class.
9908         (record_full_store_registers, record_full_xfer_partial)
9909         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9910         Refactor as methods of the record_full_target class.
9911         (record_full_can_execute_reverse, record_full_get_bookmark)
9912         (record_full_goto_bookmark, record_full_execution_direction)
9913         (record_full_record_method, record_full_info, record_full_delete)
9914         (record_full_is_replaying, record_full_will_replay)
9915         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9916         (record_full_stop_replaying): Refactor as methods of the
9917         record_full_base_target class.
9918         (record_full_core_resume, record_full_core_kill)
9919         (record_full_core_fetch_registers)
9920         (record_full_core_prepare_to_store)
9921         (record_full_core_store_registers, record_full_core_xfer_partial)
9922         (record_full_core_insert_breakpoint)
9923         (record_full_core_remove_breakpoint)
9924         (record_full_core_has_execution): Refactor
9925         as methods of the record_full_core_target class.
9926         (record_full_base_target::supports_delete_record): New.
9927         (init_record_full_ops): Delete.
9928         (init_record_full_core_ops): Delete.
9929         (record_full_save): Refactor as method of the
9930         record_full_base_target class.
9931         (_initialize_record_full): Remove references to
9932         init_record_full_ops and init_record_full_core_ops.
9933
9934         * remote.c (remote_target, extended_remote_target): New classes.
9935         (remote_ops): Now a remote_target.
9936         (extended_remote_ops): Now an extended_remote_target.
9937         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9938         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9939         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9940         (remote_pass_signals, remote_set_syscall_catchpoint)
9941         (remote_program_signals, )
9942         (remote_thread_always_alive): Remove target_ops parameter.
9943         (remote_thread_alive, remote_thread_name)
9944         (remote_update_thread_list, remote_threads_extra_info)
9945         (remote_static_tracepoint_marker_at)
9946         (remote_static_tracepoint_markers_by_strid)
9947         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9948         (remote_open): Refactor as methods of remote_target.
9949         (extended_remote_open, extended_remote_detach)
9950         (extended_remote_attach, extended_remote_post_attach):
9951         (extended_remote_supports_disable_randomization)
9952         (extended_remote_create_inferior): : Refactor as method of
9953         extended_remote_target.
9954         (remote_set_permissions, remote_open_1, remote_detach)
9955         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9956         (remote_resume, remote_commit_resume, remote_stop)
9957         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9958         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9959         (remote_prepare_to_store, remote_store_registers)
9960         (remote_flash_erase, remote_flash_done, remote_files_info)
9961         (remote_kill, remote_mourn, remote_insert_breakpoint)
9962         (remote_remove_breakpoint, remote_insert_watchpoint)
9963         (remote_watchpoint_addr_within_range)
9964         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9965         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9966         (remote_supports_stopped_by_sw_breakpoint)
9967         (remote_stopped_by_hw_breakpoint)
9968         (remote_supports_stopped_by_hw_breakpoint)
9969         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9970         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9971         (remote_verify_memory): Refactor as methods of remote_target.
9972         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9973         parameter.
9974         (remote_xfer_partial, remote_get_memory_xfer_limit)
9975         (remote_search_memory, remote_rcmd, remote_memory_map)
9976         (remote_pid_to_str, remote_get_thread_local_address)
9977         (remote_get_tib_address, remote_read_description): Refactor as
9978         methods of remote_target.
9979         (remote_target::fileio_open, remote_target::fileio_pwrite)
9980         (remote_target::fileio_pread, remote_target::fileio_close): New.
9981         (remote_hostio_readlink, remote_hostio_fstat)
9982         (remote_filesystem_is_local, remote_can_execute_reverse)
9983         (remote_supports_non_stop, remote_supports_disable_randomization)
9984         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9985         (remote_supports_enable_disable_tracepoint)
9986         (remote_supports_string_tracing)
9987         (remote_can_run_breakpoint_commands, remote_trace_init)
9988         (remote_download_tracepoint, remote_can_download_tracepoint)
9989         (remote_download_trace_state_variable, remote_enable_tracepoint)
9990         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9991         (remote_trace_start, remote_get_trace_status)
9992         (remote_get_tracepoint_status, remote_trace_stop)
9993         (remote_trace_find, remote_get_trace_state_variable_value)
9994         (remote_save_trace_data, remote_get_raw_trace_data)
9995         (remote_set_disconnected_tracing, remote_core_of_thread)
9996         (remote_set_circular_trace_buffer, remote_traceframe_info)
9997         (remote_get_min_fast_tracepoint_insn_len)
9998         (remote_set_trace_buffer_size, remote_set_trace_notes)
9999         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
10000         (remote_disable_btrace, remote_teardown_btrace)
10001         (remote_read_btrace, remote_btrace_conf)
10002         (remote_augmented_libraries_svr4_read, remote_load)
10003         (remote_pid_to_exec_file, remote_can_do_single_step)
10004         (remote_execution_direction, remote_thread_handle_to_thread_info):
10005         Refactor as methods of remote_target.
10006         (init_remote_ops, init_extended_remote_ops): Delete.
10007         (remote_can_async_p, remote_is_async_p, remote_async)
10008         (remote_thread_events, remote_upload_tracepoints)
10009         (remote_upload_trace_state_variables): Refactor as methods of
10010         remote_target.
10011         (_initialize_remote): Remove references to init_remote_ops and
10012         init_extended_remote_ops.
10013
10014         * remote-sim.c (gdbsim_target): New class.
10015         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10016         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10017         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10018         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10019         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10020         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10021         Refactor as methods of gdbsim_target.
10022         (gdbsim_ops): Now a gdbsim_target.
10023         (init_gdbsim_ops): Delete.
10024         (gdbsim_cntrl_c): Adjust.
10025         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10026
10027         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10028         (the_amd64_linux_nat_target): New.
10029         (amd64_linux_fetch_inferior_registers)
10030         (amd64_linux_store_inferior_registers): Refactor as methods of
10031         amd64_linux_nat_target.
10032         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
10033         * i386-linux-nat.c: Don't include "linux-nat.h".
10034         (i386_linux_nat_target): New class.
10035         (the_i386_linux_nat_target): New.
10036         (i386_linux_fetch_inferior_registers)
10037         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10038         as methods of i386_linux_nat_target.
10039         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
10040         * inf-child.c (inf_child_ops): Delete.
10041         (inf_child_fetch_inferior_registers)
10042         (inf_child_store_inferior_registers): Delete.
10043         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10044         methods of inf_child_target.
10045         (inf_child_target::supports_terminal_ours)
10046         (inf_child_target::terminal_init)
10047         (inf_child_target::terminal_inferior)
10048         (inf_child_target::terminal_ours_for_output)
10049         (inf_child_target::terminal_ours, inf_child_target::interrupt)
10050         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10051         New.
10052         (inf_child_open, inf_child_disconnect, inf_child_close)
10053         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10054         (inf_child_post_startup_inferior, inf_child_can_run)
10055         (inf_child_pid_to_exec_file): Refactor as methods of
10056         inf_child_target.
10057         (inf_child_follow_fork): Delete.
10058         (inf_child_target::can_create_inferior)
10059         (inf_child_target::can_attach): New.
10060         (inf_child_target::has_all_memory, inf_child_target::has_memory)
10061         (inf_child_target::has_stack, inf_child_target::has_registers)
10062         (inf_child_target::has_execution): New.
10063         (inf_child_fileio_open, inf_child_fileio_pwrite)
10064         (inf_child_fileio_pread, inf_child_fileio_fstat)
10065         (inf_child_fileio_close, inf_child_fileio_unlink)
10066         (inf_child_fileio_readlink, inf_child_use_agent)
10067         (inf_child_can_use_agent): Refactor as methods of
10068         inf_child_target.
10069         (return_zero, inf_child_target): Delete.
10070         (inf_child_target::inf_child_target): New.
10071         * inf-child.h: Include "target.h".
10072         (inf_child_target): Delete function prototype.
10073         (inf_child_target): New class.
10074         (inf_child_open_target, inf_child_mourn_inferior)
10075         (inf_child_maybe_unpush_target): Delete.
10076         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10077         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10078         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10079         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10080         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10081         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10082         (inf_ptrace_wait, inf_ptrace_xfer_partial)
10083         (inf_ptrace_thread_alive, inf_ptrace_files_info)
10084         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10085         methods of inf_ptrace_target.
10086         (inf_ptrace_target): Delete function.
10087         * inf-ptrace.h: Include "inf-child.h".
10088         (inf_ptrace_target): Delete function declaration.
10089         (inf_ptrace_target): New class.
10090         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10091         * linux-nat.c (linux_target): New.
10092         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10093         (linux_nat_target::~linux_nat_target): New.
10094         (linux_child_post_attach, linux_child_post_startup_inferior)
10095         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10096         (linux_child_remove_fork_catchpoint)
10097         (linux_child_insert_vfork_catchpoint)
10098         (linux_child_remove_vfork_catchpoint)
10099         (linux_child_insert_exec_catchpoint)
10100         (linux_child_remove_exec_catchpoint)
10101         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10102         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10103         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10104         (linux_nat_stopped_data_address)
10105         (linux_nat_stopped_by_sw_breakpoint)
10106         (linux_nat_supports_stopped_by_sw_breakpoint)
10107         (linux_nat_stopped_by_hw_breakpoint)
10108         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10109         (linux_nat_kill, linux_nat_mourn_inferior)
10110         (linux_nat_xfer_partial, linux_nat_thread_alive)
10111         (linux_nat_update_thread_list, linux_nat_pid_to_str)
10112         (linux_nat_thread_name, linux_child_pid_to_exec_file)
10113         (linux_child_static_tracepoint_markers_by_strid)
10114         (linux_nat_is_async_p, linux_nat_can_async_p)
10115         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10116         (linux_nat_supports_multi_process)
10117         (linux_nat_supports_disable_randomization, linux_nat_async)
10118         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10119         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10120         (linux_nat_fileio_open, linux_nat_fileio_readlink)
10121         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10122         methods of linux_nat_target.
10123         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10124         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10125         parameter.
10126         (check_stopped_by_watchpoint): Adjust.
10127         (linux_xfer_partial): Delete.
10128         (linux_target_install_ops, linux_target, linux_nat_add_target):
10129         Delete.
10130         (linux_nat_target::linux_nat_target): New.
10131         * linux-nat.h: Include "inf-ptrace.h".
10132         (linux_nat_target): New.
10133         (linux_target, linux_target_install_ops, linux_nat_add_target):
10134         Delete function declarations.
10135         (linux_target): Declare global.
10136         * linux-thread-db.c (thread_db_target): New.
10137         (thread_db_target::thread_db_target): New.
10138         (thread_db_ops): Delete.
10139         (the_thread_db_target): New.
10140         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10141         (thread_db_update_thread_list, thread_db_pid_to_str)
10142         (thread_db_extra_thread_info)
10143         (thread_db_thread_handle_to_thread_info)
10144         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10145         (thread_db_resume): Refactor as methods of thread_db_target.
10146         (init_thread_db_ops): Delete.
10147         (_initialize_thread_db): Remove reference to init_thread_db_ops.
10148         * x86-linux-nat.c: Don't include "linux-nat.h".
10149         (super_post_startup_inferior): Delete.
10150         (x86_linux_nat_target::~x86_linux_nat_target): New.
10151         (x86_linux_child_post_startup_inferior)
10152         (x86_linux_read_description, x86_linux_enable_btrace)
10153         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10154         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10155         methods of x86_linux_nat_target.
10156         (x86_linux_create_target): Delete.  Bits folded ...
10157         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10158         pointer.
10159         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10160         (x86_linux_nat_target): New class.
10161         (x86_linux_create_target): Delete.
10162         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10163         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10164         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10165         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10166         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10167         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10168         make extern.
10169         (x86_use_watchpoints): Delete.
10170         * x86-nat.h: Include "breakpoint.h" and "target.h".
10171         (x86_use_watchpoints): Delete.
10172         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10173         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10174         (x86_insert_watchpoint, x86_remove_watchpoint)
10175         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10176         (x86_stopped_by_hw_breakpoint): New declarations.
10177         (x86_nat_target): New template class.
10178
10179         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10180         (the_ppc_linux_nat_target): New.
10181         (ppc_linux_fetch_inferior_registers)
10182         (ppc_linux_can_use_hw_breakpoint)
10183         (ppc_linux_region_ok_for_hw_watchpoint)
10184         (ppc_linux_ranged_break_num_registers)
10185         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10186         (ppc_linux_insert_mask_watchpoint)
10187         (ppc_linux_remove_mask_watchpoint)
10188         (ppc_linux_can_accel_watchpoint_condition)
10189         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10190         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10191         (ppc_linux_watchpoint_addr_within_range)
10192         (ppc_linux_masked_watch_num_registers)
10193         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10194         (ppc_linux_read_description): Refactor as methods of
10195         ppc_linux_nat_target.
10196         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10197
10198         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10199         (procfs_target): New class.
10200         (the_procfs_target): New.
10201         (procfs_target): Delete function.
10202         (procfs_auxv_parse, procfs_attach, procfs_detach)
10203         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10204         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10205         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10206         (procfs_create_inferior, procfs_update_thread_list)
10207         (procfs_thread_alive, procfs_pid_to_str)
10208         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10209         (procfs_stopped_data_address, procfs_insert_watchpoint)
10210         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10211         (proc_find_memory_regions, procfs_info_proc)
10212         (procfs_make_note_section): Refactor as methods of procfs_target.
10213         (_initialize_procfs): Adjust.
10214         * sol-thread.c (sol_thread_target): New class.
10215         (sol_thread_ops): Now a sol_thread_target.
10216         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10217         (sol_thread_fetch_registers, sol_thread_store_registers)
10218         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10219         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10220         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10221         (init_sol_thread_ops): Delete.
10222         (_initialize_sol_thread): Adjust.  Remove references to
10223         init_sol_thread_ops and complete_target_initialization.
10224
10225         * windows-nat.c (windows_nat_target): New class.
10226         (windows_fetch_inferior_registers)
10227         (windows_store_inferior_registers, windows_resume, windows_wait)
10228         (windows_attach, windows_detach, windows_pid_to_exec_file)
10229         (windows_files_info, windows_create_inferior)
10230         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10231         (windows_close, windows_pid_to_str, windows_xfer_partial)
10232         (windows_get_tib_address, windows_get_ada_task_ptid)
10233         (windows_thread_name, windows_thread_alive): Refactor as
10234         windows_nat_target methods.
10235         (do_initial_windows_stuff): Adjust.
10236         (windows_target): Delete function.
10237         (_initialize_windows_nat): Adjust.
10238
10239         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10240         (darwin_mourn_inferior, darwin_kill_inferior)
10241         (darwin_create_inferior, darwin_attach, darwin_detach)
10242         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10243         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10244         (darwin_supports_multi_process): Refactor as darwin_nat_target
10245         methods.
10246         (darwin_resume_to, darwin_files_info): Delete.
10247         (_initialize_darwin_inferior): Rename to ...
10248         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10249         * darwin-nat.h: Include "inf-child.h".
10250         (darwin_nat_target): New class.
10251         (darwin_complete_target): Delete.
10252         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10253         (darwin_target): New.
10254         (i386_darwin_fetch_inferior_registers)
10255         (i386_darwin_store_inferior_registers): Refactor as methods of
10256         darwin_nat_target.
10257         (darwin_complete_target): Delete, with ...
10258         (_initialize_i386_darwin_nat): ... bits factored out here.
10259
10260         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10261         (the_alpha_linux_nat_target): New.
10262         (alpha_linux_register_u_offset): Refactor as
10263         alpha_linux_nat_target method.
10264         (_initialize_alpha_linux_nat): Adjust.
10265         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10266         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10267         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10268         methods of linux_nat_trad_target.
10269         (linux_trad_target): Delete.
10270         * linux-nat-trad.h (linux_trad_target): Delete function.
10271         (linux_nat_trad_target): New class.
10272         * mips-linux-nat.c (mips_linux_nat_target): New class.
10273         (super_fetch_registers, super_store_registers, super_close):
10274         Delete.
10275         (the_mips_linux_nat_target): New.
10276         (mips64_linux_regsets_fetch_registers)
10277         (mips64_linux_regsets_store_registers)
10278         (mips64_linux_fetch_registers, mips64_linux_store_registers)
10279         (mips_linux_register_u_offset, mips_linux_read_description)
10280         (mips_linux_can_use_hw_breakpoint)
10281         (mips_linux_stopped_by_watchpoint)
10282         (mips_linux_stopped_data_address)
10283         (mips_linux_region_ok_for_hw_watchpoint)
10284         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10285         (mips_linux_close): Refactor as methods of mips_linux_nat.
10286         (_initialize_mips_linux_nat): Adjust to C++ification.
10287
10288         * aix-thread.c (aix_thread_target): New class.
10289         (aix_thread_ops): Now an aix_thread_target.
10290         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10291         (aix_thread_fetch_registers, aix_thread_store_registers)
10292         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10293         (aix_thread_thread_alive, aix_thread_pid_to_str)
10294         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10295         Refactor as methods of aix_thread_target.
10296         (init_aix_thread_ops): Delete.
10297         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10298         and complete_target_initialization.
10299         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10300         (rs6000_nat_target): New class.
10301         (the_rs6000_nat_target): New.
10302         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10303         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10304         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10305         (super_create_inferior): Delete.
10306         (_initialize_rs6000_nat): Adjust to C++ification.
10307
10308         * arm-linux-nat.c (arm_linux_nat_target): New class.
10309         (the_arm_linux_nat_target): New.
10310         (arm_linux_fetch_inferior_registers)
10311         (arm_linux_store_inferior_registers, arm_linux_read_description)
10312         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10313         (arm_linux_remove_hw_breakpoint)
10314         (arm_linux_region_ok_for_hw_watchpoint)
10315         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10316         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10317         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10318         arm_linux_nat_target.
10319         (_initialize_arm_linux_nat): Adjust to C++ification.
10320
10321         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10322         (the_aarch64_linux_nat_target): New.
10323         (aarch64_linux_fetch_inferior_registers)
10324         (aarch64_linux_store_inferior_registers)
10325         (aarch64_linux_child_post_startup_inferior)
10326         (aarch64_linux_read_description)
10327         (aarch64_linux_can_use_hw_breakpoint)
10328         (aarch64_linux_insert_hw_breakpoint)
10329         (aarch64_linux_remove_hw_breakpoint)
10330         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10331         (aarch64_linux_region_ok_for_hw_watchpoint)
10332         (aarch64_linux_stopped_data_address)
10333         (aarch64_linux_stopped_by_watchpoint)
10334         (aarch64_linux_watchpoint_addr_within_range)
10335         (aarch64_linux_can_do_single_step): Refactor as methods of
10336         aarch64_linux_nat_target.
10337         (super_post_startup_inferior): Delete.
10338         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10339
10340         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10341         (the_hppa_linux_nat_target): New.
10342         (hppa_linux_fetch_inferior_registers)
10343         (hppa_linux_store_inferior_registers): Refactor as methods of
10344         hppa_linux_nat_target.
10345         (_initialize_hppa_linux_nat): Adjust to C++ification.
10346
10347         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10348         (the_ia64_linux_nat_target): New.
10349         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10350         (ia64_linux_stopped_data_address)
10351         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10352         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10353         ia64_linux_nat_target methods.
10354         (super_xfer_partial): Delete.
10355         (_initialize_ia64_linux_nat): Adjust to C++ification.
10356
10357         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10358         (the_m32r_linux_nat_target): New.
10359         (m32r_linux_fetch_inferior_registers)
10360         (m32r_linux_store_inferior_registers): Refactor as
10361         m32r_linux_nat_target methods.
10362         (_initialize_m32r_linux_nat): Adjust to C++ification.
10363
10364         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10365         (the_m68k_linux_nat_target): New.
10366         (m68k_linux_fetch_inferior_registers)
10367         (m68k_linux_store_inferior_registers): Refactor as
10368         m68k_linux_nat_target methods.
10369         (_initialize_m68k_linux_nat): Adjust to C++ification.
10370
10371         * s390-linux-nat.c (s390_linux_nat_target): New class.
10372         (the_s390_linux_nat_target): New.
10373         (s390_linux_fetch_inferior_registers)
10374         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10375         (s390_insert_watchpoint, s390_remove_watchpoint)
10376         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10377         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10378         (s390_auxv_parse, s390_read_description): Refactor as methods of
10379         s390_linux_nat_target.
10380         (_initialize_s390_nat): Adjust to C++ification.
10381
10382         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10383         (the_sparc_linux_nat_target): New.
10384         (_initialize_sparc_linux_nat): Adjust to C++ification.
10385         * sparc-nat.c (sparc_fetch_inferior_registers)
10386         (sparc_store_inferior_registers): Remove target_ops parameter.
10387         * sparc-nat.h (sparc_fetch_inferior_registers)
10388         (sparc_store_inferior_registers): Remove target_ops parameter.
10389         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10390         (the_sparc64_linux_nat_target): New.
10391         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10392
10393         * spu-linux-nat.c (spu_linux_nat_target): New class.
10394         (the_spu_linux_nat_target): New.
10395         (spu_child_post_startup_inferior, spu_child_post_attach)
10396         (spu_child_wait, spu_fetch_inferior_registers)
10397         (spu_store_inferior_registers, spu_xfer_partial)
10398         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10399         methods.
10400         (_initialize_spu_nat): Adjust to C++ification.
10401
10402         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10403         (the_tilegx_linux_nat_target): New.
10404         (fetch_inferior_registers, store_inferior_registers):
10405         Refactor as methods.
10406         (_initialize_tile_linux_nat): Adjust to C++ification.
10407
10408         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10409         (the_xtensa_linux_nat_target): New.
10410         (xtensa_linux_fetch_inferior_registers)
10411         (xtensa_linux_store_inferior_registers): Refactor as
10412         xtensa_linux_nat_target methods.
10413         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10414
10415         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10416         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10417         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10418         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10419         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10420         (fbsd_stopped_by_sw_breakpoint)
10421         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10422         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10423         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10424         (fbsd_post_startup_inferior, fbsd_post_attach)
10425         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10426         (fbsd_set_syscall_catchpoint)
10427         (super_xfer_partial, super_resume, super_wait)
10428         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10429         (fbsd_handle_debug_trap): Remove target_ops parameter.
10430         (fbsd_nat_add_target): Delete.
10431         * fbsd-nat.h: Include "inf-ptrace.h".
10432         (fbsd_nat_add_target): Delete.
10433         (USE_SIGTRAP_SIGINFO): Define.
10434         (fbsd_nat_target): New class.
10435
10436         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10437         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10438         (amd64bsd_target): Delete.
10439         * amd64-bsd-nat.h: New file.
10440         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10441         "x86-bsd-nat.h".
10442         (amd64_fbsd_nat_target): New class.
10443         (the_amd64_fbsd_nat_target): New.
10444         (amd64fbsd_read_description): Refactor as method of
10445         amd64_fbsd_nat_target.
10446         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10447         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10448         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10449         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10450         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10451         (i386bsd_target): Delete.
10452         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10453         (i386bsd_fetch_inferior_registers)
10454         (i386bsd_store_inferior_registers): Declare.
10455         (i386_bsd_nat_target): New class.
10456         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10457         (the_i386_fbsd_nat_target): New.
10458         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10459         i386_fbsd_nat_target methods.
10460         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10461         (_initialize_i386fbsd_nat): Adjust to C++ification.
10462         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10463         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10464         (_initialize_x86_bsd_nat): Adjust to C++ification.
10465         * x86-bsd-nat.h: Include "x86-nat.h".
10466         (x86bsd_target): Delete declaration.
10467         (x86bsd_nat_target): New class.
10468
10469         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10470         (the_aarch64_fbsd_nat_target): New.
10471         (aarch64_fbsd_fetch_inferior_registers)
10472         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10473         aarch64_fbsd_nat_target.
10474         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10475         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10476         (the_alpha_bsd_nat_target): New.
10477         (alphabsd_fetch_inferior_registers)
10478         (alphabsd_store_inferior_registers): Refactor as
10479         alpha_bsd_nat_target methods.
10480         (_initialize_alphabsd_nat): Refactor as methods of
10481         alpha_bsd_nat_target.
10482         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10483         (the_amd64_nbsd_nat_target): New.
10484         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10485         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10486         (the_amd64_obsd_nat_target): New.
10487         (_initialize_amd64obsd_nat): Adjust to C++ification.
10488         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10489         (the_arm_fbsd_nat_target): New.
10490         (arm_fbsd_fetch_inferior_registers)
10491         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10492         (_initialize_arm_fbsd_nat): Refactor as methods of
10493         arm_fbsd_nat_target.
10494         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10495         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10496         (the_arm_netbsd_nat_target): New.
10497         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10498         arm_netbsd_nat_target.
10499         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10500         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10501         (the_hppa_nbsd_nat_target): New.
10502         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10503         hppa_nbsd_nat_target methods.
10504         (_initialize_hppanbsd_nat): Adjust to C++ification.
10505         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10506         (the_hppa_obsd_nat_target): New.
10507         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10508         methods of hppa_obsd_nat_target.
10509         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10510         add_target.
10511         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10512         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10513         add_target.
10514         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10515         (_initialize_i386obsd_nat): Use add_target.
10516         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10517         (the_m68k_bsd_nat_target): New.
10518         (m68kbsd_fetch_inferior_registers)
10519         (m68kbsd_store_inferior_registers): Refactor as methods of
10520         m68k_bsd_nat_target.
10521         (_initialize_m68kbsd_nat): Adjust to C++ification.
10522         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10523         (the_mips_fbsd_nat_target): New.
10524         (mips_fbsd_fetch_inferior_registers)
10525         (mips_fbsd_store_inferior_registers): Refactor as methods of
10526         mips_fbsd_nat_target.
10527         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10528         add_target.
10529         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10530         (the_mips_nbsd_nat_target): New.
10531         (mipsnbsd_fetch_inferior_registers)
10532         (mipsnbsd_store_inferior_registers): Refactor as methods of
10533         mips_nbsd_nat_target.
10534         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10535         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10536         (the_mips64_obsd_nat_target): New.
10537         (mips64obsd_fetch_inferior_registers)
10538         (mips64obsd_store_inferior_registers): Refactor as methods of
10539         mips64_obsd_nat_target.
10540         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10541         add_target.
10542         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10543         nbsd_nat_target.
10544         * nbsd-nat.h: Include "inf-ptrace.h".
10545         (nbsd_nat_target): New class.
10546         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10547         (obsd_wait): Refactor as methods of obsd_nat_target.
10548         (obsd_add_target): Delete.
10549         * obsd-nat.h: Include "inf-ptrace.h".
10550         (obsd_nat_target): New class.
10551         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10552         (the_ppc_fbsd_nat_target): New.
10553         (ppcfbsd_fetch_inferior_registers)
10554         (ppcfbsd_store_inferior_registers): Refactor as methods of
10555         ppc_fbsd_nat_target.
10556         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10557         add_target.
10558         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10559         (the_ppc_nbsd_nat_target): New.
10560         (ppcnbsd_fetch_inferior_registers)
10561         (ppcnbsd_store_inferior_registers): Refactor as methods of
10562         ppc_nbsd_nat_target.
10563         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10564         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10565         (the_ppc_obsd_nat_target): New.
10566         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10567         methods of ppc_obsd_nat_target.
10568         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10569         add_target.
10570         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10571         (the_sh_nbsd_nat_target): New.
10572         (shnbsd_fetch_inferior_registers)
10573         (shnbsd_store_inferior_registers): Refactor as methods of
10574         sh_nbsd_nat_target.
10575         (_initialize_shnbsd_nat): Adjust to C++ification.
10576         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10577         (inf_ptrace_xfer_partial): Delete.
10578         (sparc_xfer_partial, sparc_target): Delete.
10579         * sparc-nat.h (sparc_fetch_inferior_registers)
10580         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10581         (sparc_target): Delete function declaration.
10582         (sparc_target): New template class.
10583         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10584         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10585         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10586         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10587         add_target.
10588         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10589         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10590         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10591         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10592         add_target.
10593         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10594         (the_vax_bsd_nat_target): New.
10595         (vaxbsd_fetch_inferior_registers)
10596         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10597         methods.
10598         (_initialize_vaxbsd_nat): Adjust to C++ification.
10599
10600         * bsd-kvm.c (bsd_kvm_target): New class.
10601         (bsd_kvm_ops): Now a bsd_kvm_target.
10602         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10603         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10604         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10605         bsd_kvm_target.
10606         (bsd_kvm_return_one): Delete.
10607         (bsd_kvm_add_target): Adjust to C++ification.
10608
10609         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10610         (nto_procfs_target_procfs): New classes.
10611         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10612         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10613         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10614         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10615         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10616         (procfs_remove_hw_breakpoint, procfs_resume)
10617         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10618         (procfs_kill_inferior, procfs_store_registers)
10619         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10620         as methods of nto_procfs_target.
10621         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10622         (nto_native_ops): Delete.
10623         (procfs_open, procfs_native_open): Delete.
10624         (nto_native_ops): Now an nto_procfs_target_native.
10625         (init_procfs_targets): Adjust to C++ification.
10626         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10627         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10628         Refactor as methods of nto_procfs_target.
10629
10630         * go32-nat.c (go32_nat_target): New class.
10631         (the_go32_nat_target): New.
10632         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10633         (go32_store_registers, go32_xfer_partial, go32_files_info)
10634         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10635         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10636         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10637         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10638         (go32_target): Delete.
10639         (_initialize_go32_nat): Adjust to C++ification.
10640
10641         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10642         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10643         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10644         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10645         gnu_nat_target.
10646         (gnu_target): Delete.
10647         * gnu-nat.h (gnu_target): Delete.
10648         (gnu_nat_target): New class.
10649         * i386-gnu-nat.c (gnu_base_target): New.
10650         (i386_gnu_nat_target): New class.
10651         (the_i386_gnu_nat_target): New.
10652         (_initialize_i386gnu_nat): Adjust to C++ification.
10653
10654 2018-05-02  Pedro Alves  <palves@redhat.com>
10655
10656         * bfd-target.c (target_bfd_xclose): Rename to ...
10657         (target_bfd_close): ... this.
10658         (target_bfd_reopen): Adjust.
10659         * target.c (target_close): Remove references to to_xclose.
10660         * target.h (target_ops::to_xclose): Delete.
10661         (target_ops::to_close): Update comments.
10662
10663 2018-05-02  Pedro Alves  <palves@redhat.com>
10664
10665         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10666         "linux-nat.h".
10667         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10668         * inf-ptrace.c (inf_ptrace_register_u_offset)
10669         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10670         (inf_ptrace_store_register, inf_ptrace_store_registers)
10671         (inf_ptrace_trad_target): Move to ...
10672         * linux-nat-trad.c: ... this new file.
10673         * linux-nat-trad.h: New file.
10674         * linux-nat.c (linux_target_install_ops): Make extern.
10675         (linux_trad_target): Delete.
10676         * linux-nat.h (linux_trad_target): Delete declaration.
10677         (linux_target_install_ops): Declare.
10678         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10679         "linux-nat.h".
10680
10681 2018-05-02  Pedro Alves  <palves@redhat.com>
10682
10683         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10684         procfs_target/add_target here.
10685         * procfs.c (procfs_target): Make static.
10686         (_initialize_procfs): Call add_target here.
10687         * procfs.h (struct target_ops): Remove forward declaration.
10688         (procfs_target): Remove declaration.
10689         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10690
10691 2018-05-02  Pedro Alves  <palves@redhat.com>
10692
10693         * procfs.c (procfs_stopped_by_watchpoint)
10694         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10695         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10696         Forward declare.
10697         (procfs_use_watchpoints): Delete, move contents...
10698         (procfs_target): ... here.
10699         * procfs.h (procfs_use_watchpoints): Delete declaration.
10700         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10701         procfs_use_watchpoints.
10702         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10703         procfs_use_watchpoints.
10704
10705 2018-05-02  Tom Tromey  <tom@tromey.com>
10706
10707         PR python/20084:
10708         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10709         and var_zuinteger_unlimited.
10710         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10711         and PARAM_ZUINTEGER_UNLIMITED.
10712         (set_parameter_value): Handle var_zuinteger and
10713         var_zuinteger_unlimited.
10714         (add_setshow_generic): Likewise.
10715         (parmpy_init): Likewise.
10716
10717 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10718
10719         PR rust/23124
10720         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10721         pointer is not null before dereferencing it.
10722
10723 2018-04-30  Tom Tromey  <tom@tromey.com>
10724
10725         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10726         is_mi_like_p.
10727
10728 2018-04-30  Tom Tromey  <tom@tromey.com>
10729
10730         * breakpoint.c (mention): Remove use of is_mi_like_p.
10731         (print_mention_ranged_breakpoint): Likewise.
10732         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10733         of is_mi_like_p.
10734
10735 2018-04-30  Tom Tromey  <tom@tromey.com>
10736
10737         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10738
10739 2018-04-30  Tom Tromey  <tom@tromey.com>
10740
10741         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10742         (info_spu_event_command): Remove some uses of is_mi_like_p.
10743
10744 2018-04-30  Tom Tromey  <tom@tromey.com>
10745
10746         * python/py-framefilter.c (py_print_single_arg)
10747         (enumerate_locals, py_print_args, py_print_frame): Remove some
10748         uses of is_mi_like_p.
10749
10750 2018-04-30  Tom Tromey  <tom@tromey.com>
10751
10752         * ui-out.c: Update.
10753         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10754         * ui-out.h (ui_out::is_mi_like_p): Now const.
10755         (ui_out::do_is_mi_like_p): Now const.
10756         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10757
10758 2018-04-30  Tom Tromey  <tom@tromey.com>
10759
10760         * varobj.c (varobj_set_visualizer): Use new_reference.
10761         * python/python.c (gdbpy_decode_line): Use new_reference.
10762         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10763         new_reference.
10764
10765 2018-04-30  Tom Tromey  <tom@tromey.com>
10766
10767         * varobj.c (install_new_value): Use new_reference.
10768         * value.h (value_incref): Return void.  Swap intro comment with
10769         value_decref.
10770         * value.c (set_value_parent): Use new_reference.
10771         (value_incref): Return void.  Update intro comment.
10772         (release_value): Use new_reference.
10773         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10774
10775 2018-04-30  Tom Tromey  <tom@tromey.com>
10776
10777         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10778         * gdb_bfd.h (new_bfd_ref): Remove.
10779         (gdb_bfd_open): Update comment.
10780         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10781         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10782         (gdb_bfd_fdopenr): Use new_reference.
10783         * exec.c (exec_file_attach): Use new_reference.
10784
10785 2018-04-30  Tom Tromey  <tom@tromey.com>
10786
10787         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10788         method.
10789
10790 2018-04-30  Tom Tromey  <tom@tromey.com>
10791
10792         * jit.c (jit_read_code_entry): Use type_align.
10793         * i386-tdep.c (i386_gdbarch_init): Don't call
10794         set_gdbarch_long_long_align_bit.
10795         * gdbarch.sh: Remove long_long_align_bit.
10796         * gdbarch.c, gdbarch.h: Rebuild.
10797         * arc-tdep.c (arc_type_align): New function.
10798         (arc_gdbarch_init): Use arc_type_align.  Don't call
10799         set_gdbarch_long_long_align_bit.
10800
10801 2018-04-30  Tom Tromey  <tom@tromey.com>
10802
10803         * rust-lang.c (rust_type_alignment): Remove.
10804         (rust_composite_type): Use type_align.
10805
10806 2018-04-30  Tom Tromey  <tom@tromey.com>
10807
10808         * NEWS: Mention Type.align.
10809         * python/py-type.c (typy_get_alignof): New function.
10810         (type_object_getset): Add "alignof".
10811
10812 2018-04-30  Tom Tromey  <tom@tromey.com>
10813
10814         PR exp/17095:
10815         * NEWS: Update.
10816         * std-operator.def (UNOP_ALIGNOF): New operator.
10817         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10818         New.
10819         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10820         * c-lang.c (c_op_print_tab): Add alignof.
10821         * c-exp.y (ALIGNOF): New token.
10822         (exp): Add "ALIGNOF" production.
10823         (ident_tokens): Add _Alignof and alignof.
10824
10825 2018-04-30  Tom Tromey  <tom@tromey.com>
10826
10827         * i386-tdep.c (i386_type_align): New function.
10828         (i386_gdbarch_init): Update.
10829         * gdbarch.sh (type_align): New method.
10830         * gdbarch.c, gdbarch.h: Rebuild.
10831         * arch-utils.h (default_type_align): Declare.
10832         * arch-utils.c (default_type_align): New function.
10833         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10834         (struct type) <align_log2>: New field.
10835         <instance_flags>: Now a bitfield.
10836         (TYPE_RAW_ALIGN): New macro.
10837         (type_align, type_raw_align, set_type_align): Declare.
10838         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10839         functions.
10840         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10841         (get_alignment, maybe_set_alignment): New functions.
10842         (read_structure_type, read_enumeration_type, read_array_type)
10843         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10844         (read_subrange_type, read_base_type): Set type alignment.
10845
10846 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10847
10848         * dwarf2read.c (read_index_from_section): Use bool.
10849
10850 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10851
10852         PR gdb/22950
10853         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10854         with #ifdef.
10855
10856 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10857
10858         PR build/22873
10859         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10860         last step, and do it atomically.
10861
10862 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10863
10864         * compile/compile-c-types.c (convert_int, convert_float):
10865         Update for C FE v1.
10866
10867 2018-04-27  Tom Tromey  <tom@tromey.com>
10868
10869         PR rust/22545:
10870         * rust-lang.c (rust_inclusive_range_type_p): New function.
10871         (rust_range): Handle inclusive ranges.
10872         (rust_compute_range): Likewise.
10873         * rust-exp.y (struct rust_op) <inclusive>: New field.
10874         (DOTDOTEQ): New constant.
10875         (range_expr): Add "..=" productions.
10876         (operator_tokens): Add "..=" token.
10877         (ast_range): Add "inclusive" parameter.
10878         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10879         ranges.
10880         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10881         bounds values.
10882         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10883         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10884         Update comments.
10885         * expprint.c (print_subexp_standard): Handle new bounds values.
10886         (dump_subexp_body_standard): Likewise.
10887
10888 2018-04-27  Tom Tromey  <tom@tromey.com>
10889
10890         * configure: Rebuild.
10891         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10892         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10893         "OVERRIDE".
10894         (class symbol_needs_eval_context): Likewise.
10895         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10896         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10897         "virtual".
10898         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10899         "override".
10900         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10901         * aarch64-tdep.c (instruction_reader::read): Use "override".
10902         (instruction_reader_test::read): Likewise.
10903         * arm-tdep.c (instruction_reader::read): Use "override".
10904         (instruction_reader_thumb::read): Likewise.
10905
10906 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10907
10908         PR remote/9665
10909         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10910         instead of remote_send.
10911         (remote_send): Remove.
10912
10913 2018-04-26  Pedro Alves  <palves@redhat.com>
10914
10915         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10916         find_function_start_sal instead of find_pc_line.
10917
10918 2018-04-26  Pedro Alves  <palves@redhat.com>
10919
10920         * breakpoint.c (set_breakpoint_location_function): Handle
10921         mst_data_gnu_ifunc.
10922         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10923         * elfread.c (elf_symtab_read): Give data symbols with
10924         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10925         (elf_rel_plt_read): Update comment.
10926         * linespec.c (convert_linespec_to_sals): Handle
10927         mst_data_gnu_ifunc.
10928         (minsym_found): Handle mst_data_gnu_ifunc.
10929         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10930         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10931         * parse.c (find_minsym_type_and_address): Handle
10932         mst_data_gnu_ifunc.
10933         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10934         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10935         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10936         comment.
10937         <mst_data_gnu_ifunc>: New enumerator.
10938
10939 2018-04-26  Pedro Alves  <palves@redhat.com>
10940
10941         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10942         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10943         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10944         Handle it.
10945         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10946         (lookup_minimal_symbol_by_pc): Adjust.
10947         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10948         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10949         * minsyms.h (lookup_msym_prefer): New enum.
10950         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10951         parameter by a lookup_msym_prefer parameter.
10952
10953 2018-04-26  Pedro Alves  <palves@redhat.com>
10954
10955         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10956         ends in "@plt" instead of looking at the symbol's section.
10957
10958 2018-04-26  Pedro Alves  <palves@redhat.com>
10959
10960         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10961         all references.
10962         (find_pc_partial_function_gnu_ifunc): Rename to ...
10963         (find_pc_partial_function): ... this, and remove references to
10964         'is_gnu_ifunc_p'.
10965         (find_pc_partial_function): Delete old implementation.
10966         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10967
10968 2018-04-26  Pedro Alves  <palves@redhat.com>
10969
10970         * linespec.c (struct bound_minimal_symbol_search_key): New.
10971         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10972         skip first line if we found a GNU ifunc minimal symbol by name.
10973         (compare_msymbols): Change parameters to work with a destructured
10974         lhs minsym.
10975         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10976         functions.
10977
10978 2018-04-26  Pedro Alves  <palves@redhat.com>
10979
10980         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10981         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10982         address/name.
10983         (add_location_to_breakpoint): Store the minsym and the objfile in
10984         the breakpoint location.
10985         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10986         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10987         Record the minsym in the sal.
10988         * symtab.h (symtab_and_line) <msymbol>: New field.
10989
10990 2018-04-26  Pedro Alves  <palves@redhat.com>
10991
10992         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10993         unless we actually resolved the ifunc.
10994
10995 2018-04-26  Pedro Alves  <palves@redhat.com>
10996
10997         * c-exp.y (variable production): Prefer ifunc minsyms over
10998         regular function symbols.
10999         * symtab.c (find_gnu_ifunc): New function.
11000         * minsyms.h (lookup_msym_prefer): New enum.
11001         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
11002         parameter by a lookup_msym_prefer parameter.
11003         * symtab.h (find_gnu_ifunc): New declaration.
11004
11005 2018-04-26  Pedro Alves  <palves@redhat.com>
11006
11007         * blockframe.c (find_gnu_ifunc_target_type): New function.
11008         (find_function_type): New.
11009         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11010         return a value with a memory address.
11011         (eval_call): For calls to GNU ifunc functions, try to find the
11012         type of the target function from the type that the resolver
11013         returns.
11014         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11015         symbols.
11016         * infcall.c (find_function_return_type): Delete.
11017         (find_function_addr): Add 'function_type' parameter.  For calls to
11018         GNU ifunc functions, try to find the type of the target function
11019         from the type that the resolver returns, and return it via
11020         FUNCTION_TYPE.
11021         (call_function_by_hand_dummy): Adjust to use the function type
11022         returned by find_function_addr.
11023         (find_function_addr): Add 'function_type' parameter and move
11024         description here.
11025         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11026         declarations.
11027
11028 2018-04-26  Pedro Alves  <palves@redhat.com>
11029
11030         * c-exp.y (variable production): Skip finding an alias for ifunc
11031         symbols.
11032
11033 2018-04-26  Pedro Alves  <palves@redhat.com>
11034
11035         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11036
11037 2018-04-25  Pedro Alves  <palves@redhat.com>
11038
11039         * infcmd.c (kill_command): Print the pid as string, not the whole
11040         thread's ptid.  Add comment.  s/has been killed/killed/ in output
11041         message.
11042         * remote.c (remote_detach_1): Print the pid as string, not the
11043         whole thread's ptid.
11044
11045 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11046             Sergio Durigan Junior  <sergiodj@redhat.com>
11047             Pedro Alves  <palves@redhat.com>
11048
11049         * infcmd.c (kill_command): Print message when inferior has
11050         been killed.
11051         * inferior.c (print_inferior_events): Remove 'static'.  Set as
11052         '1'.
11053         (add_inferior): Improve message printed when
11054         'print_inferior_events' is on.
11055         (exit_inferior): Remove message printed when
11056         'print_inferior_events' is on.
11057         (detach_inferior): Improve message printed when
11058         'print_inferior_events' is on.
11059         (initialize_inferiors): Use 'add_inferior_silent' to set
11060         'current_inferior_'.
11061         * inferior.h (print_inferior_events): Declare here as
11062         'extern'.
11063         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11064         '[Detaching...]' messages when 'print_inferior_events' is on.
11065         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
11066         as prefix/suffix for messages.  Remove periods.  Fix erroneous
11067         'Detaching after fork from child...', replace it by '... from
11068         parent...'.
11069         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11070         prefix/suffix when printing 'Detaching...' messages.  Print
11071         them when 'print_inferior_events' is on.
11072         * remote.c (remote_detach_1): Print message when detaching
11073         from inferior and '!is_fork_parent'.
11074
11075 2018-04-24  Tom Tromey  <tom@tromey.com>
11076
11077         * cli-out.h: Reindent.
11078
11079 2018-04-24  Tom Tromey  <tom@tromey.com>
11080
11081         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11082         (cli_ui_out::do_field_string): Use fputs_filtered.
11083         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11084
11085 2018-04-23  Tom Tromey  <tom@tromey.com>
11086
11087         * guile/scm-frame.c (gdbscm_frame_read_var): Use
11088         gdb::unique_xmalloc_ptr.
11089
11090 2018-04-23  Tom Tromey  <tom@tromey.com>
11091
11092         * configure: Rebuild.
11093
11094 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
11095
11096         PR gdb/23095
11097         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11098         prepare_for_testing.  Set normal_bp to r_debug_state if target
11099         is bsd.
11100
11101 2018-04-21  Pedro Alves  <palves@redhat.com>
11102             Rajendra SY  <rajendra.sy@gmail.com>
11103
11104         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11105         * remote.c (extended_remote_attach): In all-stop mode, mark the
11106         thread as executing.
11107
11108 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
11109
11110         * thread.c (thread_apply_all_command): Fix comment.
11111         (thread_command): Fix comment.
11112
11113 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
11114
11115         * common/tdesc.h (tdesc_create_feature): Remove xml filename
11116         parameter.
11117         * features/aarch64-core.c (create_feature_aarch64_core):
11118         Regenerate.
11119         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11120         Likewise.
11121         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11122         Likewise.
11123         * features/i386/32bit-avx512.c
11124         (create_feature_i386_32bit_avx512): Likewise.
11125         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11126         Likewise.
11127         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11128         Likewise.
11129         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11130         Likewise.
11131         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11132         Likewise.
11133         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11134         Likewise.
11135         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11136         Likewise.
11137         * features/i386/64bit-avx512.c
11138         (create_feature_i386_64bit_avx512): Likewise.
11139         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11140         Likewise.
11141         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11142         Likewise.
11143         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11144         Likewise.
11145         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11146         Likewise.
11147         * features/i386/64bit-segments.c
11148         (create_feature_i386_64bit_segments): Likewise.
11149         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11150         Likewise.
11151         * features/i386/x32-core.c
11152         (create_feature_i386_x32_core): Likewise.
11153         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11154         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11155         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11156         * target-descriptions.c: In generated code, don't pass xml
11157         filename.
11158
11159 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11160
11161         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11162         (print_xml_feature::visit_post): Likewise.
11163         (print_xml_feature::visit): Likewise.
11164         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11165         (print_xml_feature): Add new class.
11166         * regformats/regdat.sh: Null xmltarget on feature targets.
11167         * target-descriptions.c (struct target_desc): Add xmltarget.
11168         (maintenance_check_tdesc_xml_convert): Add unittest function.
11169         (tdesc_get_features_xml): Add function to get xml.
11170         (maintenance_check_xml_descriptions): Test xml generation.
11171         * xml-tdesc.c (string_read_description_xml): Add function.
11172         * xml-tdesc.h (string_read_description_xml): Add declaration.
11173
11174 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11175
11176         * features/Makefile: Add feature marker to targets with new style
11177         target descriptions.
11178         * regformats/aarch64.dat: Regenerate.
11179         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11180         * regformats/i386/amd64-avx-linux.dat: Likewise.
11181         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11182         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11183         * regformats/i386/amd64-linux.dat: Likewise.
11184         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11185         * regformats/i386/amd64.dat: Likewise.
11186         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11187         * regformats/i386/i386-avx-linux.dat: Likewise.
11188         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11189         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11190         * regformats/i386/i386-linux.dat: Likewise.
11191         * regformats/i386/i386-mmx-linux.dat: Likewise.
11192         * regformats/i386/i386-mpx-linux.dat: Likewise.
11193         * regformats/i386/i386.dat: Likewise.
11194         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11195         * regformats/i386/x32-avx-linux.dat: Likewise.
11196         * regformats/i386/x32-linux.dat: Likewise.
11197         * regformats/tic6x-c62x-linux.dat: Likewise.
11198         * regformats/tic6x-c64x-linux.dat: Likewise.
11199         * regformats/tic6x-c64xp-linux.dat: Likewise.
11200         * regformats/regdat.sh: Parse feature marker.
11201
11202 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11203
11204         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11205         (tdesc_osabi_name): Likewise.
11206         * target-descriptions.c (tdesc_architecture_name): Add new
11207         function.
11208         (tdesc_osabi_name): Likewise.
11209
11210 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11211
11212         * common/tdesc.c (tdesc_predefined_type): Move to here.
11213         (tdesc_named_type): Likewise.
11214         (tdesc_create_vector): Likewise.
11215         (tdesc_create_struct): Likewise.
11216         (tdesc_set_struct_size): Likewise.
11217         (tdesc_create_union): Likewise.
11218         (tdesc_create_flags): Likewise.
11219         (tdesc_create_enum): Likewise.
11220         (tdesc_add_field): Likewise.
11221         (tdesc_add_typed_bitfield): Likewise.
11222         (tdesc_add_bitfield): Likewise.
11223         (tdesc_add_flag): Likewise.
11224         (tdesc_add_enum_value): Likewise.
11225         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11226         (struct tdesc_type_vector): Likewise.
11227         (struct tdesc_type_field): Likewise.
11228         (struct tdesc_type_with_fields): Likewise.
11229         (tdesc_create_enum): Add declaration.
11230         (tdesc_add_typed_bitfield): Likewise.
11231         (tdesc_add_enum_value): Likewise.
11232         * target-descriptions.c (tdesc_type_field): Move from here.
11233         (tdesc_type_builtin): Likewise.
11234         (tdesc_type_vector): Likewise.
11235         (tdesc_type_with_fields): Likewise.
11236         (tdesc_predefined_types): Likewise.
11237         (tdesc_named_type): Likewise.
11238         (tdesc_create_vector): Likewise.
11239         (tdesc_create_struct): Likewise.
11240         (tdesc_set_struct_size): Likewise.
11241         (tdesc_create_union): Likewise.
11242         (tdesc_create_flags): Likewise.
11243         (tdesc_create_enum): Likewise.
11244         (tdesc_add_field): Likewise.
11245         (tdesc_add_typed_bitfield): Likewise.
11246         (tdesc_add_bitfield): Likewise.
11247         (tdesc_add_flag): Likewise.
11248         (tdesc_add_enum_value): Likewise.
11249         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11250         (tdesc_add_typed_bitfield): Likewise.
11251         (tdesc_add_enum_value): Likewise.
11252
11253 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11254
11255         * common/tdesc.c (tdesc_feature::accept): Move to here.
11256         (tdesc_feature::operator==): Likewise.
11257         (tdesc_create_reg): Likewise.
11258         * common/tdesc.h (tdesc_type_kind): Likewise.
11259         (struct tdesc_type): Likewise.
11260         (struct tdesc_feature): Likewise.
11261         * regformats/regdat.sh: Create a feature.
11262         * target-descriptions.c (tdesc_type_kind): Move from here.
11263         (tdesc_type): Likewise.
11264         (tdesc_type_up): Likewise.
11265         (tdesc_feature): Likewise.
11266         (tdesc_create_reg): Likewise.
11267
11268 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11269
11270         * Makefile.in: Add arch/tdesc.c
11271         * common/tdesc.c: New file.
11272         * common/tdesc.h (tdesc_element_visitor): Move to here.
11273         (tdesc_element): Likewise.
11274         (tdesc_reg): Likewise.
11275         (tdesc_reg_up): Likewise.
11276         * regformats/regdef.h (reg): Add offset to constructors.
11277         * target-descriptions.c (tdesc_element_visitor): Move from here.
11278         (tdesc_element): Likewise.
11279         (tdesc_reg): Likewise.
11280         (tdesc_reg_up): Likewise.
11281
11282 2018-04-17  Tom Tromey  <tom@tromey.com>
11283
11284         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11285         discriminant field.
11286
11287 2018-04-17  Tom Tromey  <tom@tromey.com>
11288
11289         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11290
11291 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11292
11293         * symtab.c (print_symbol_info): Skip printing filename and line
11294         number when `last' is NULL.
11295         (symtab_symbol_info): Use empty string instead of NULL for first
11296         invocation of print_symbol_info.
11297         (rbreak_command): Pass NULL to `last' parameter of
11298         print_symbol_info.
11299
11300 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11301
11302         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11303         instead of nullptr.
11304
11305 2018-04-16  Pedro Alves  <palves@redhat.com>
11306
11307         * MAINTAINERS (sh): Remove.
11308         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11309         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11310         (ALLDEPFILES): Remove sh64-tdep.c.
11311         * NEWS: Mentions that support for SH-5/SH64 is removed.
11312         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11313         (sh*-*-openbsd*): Ditto.
11314         (sh64-*-elf*): Remove.
11315         (sh*): Remove.
11316         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11317         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11318         * sh-tdep.c: No longer include "sh64-tdep.h".
11319         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11320         * sh64-tdep.c, sh64-tdep.h: Remove files.
11321
11322 2018-04-16  Pedro Alves  <palves@redhat.com>
11323
11324         * MAINTAINERS: Remove m88k.
11325         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11326         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11327         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11328         * NEWS: Mention that support for m88k was removed.
11329         * configure.host (m88*-*-*): Remove support.
11330         * configure.nat (m88k-*-*): Remove support.
11331         * configure.tgt (m88*-*-openbsd*): Remove.
11332         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11333
11334 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11335
11336         * configure.tgt (x86_tobjs): New variable.
11337         (amd64_tobjs, i386_tobjs): Use it.
11338
11339 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11340
11341         * symtab.c (print_symbol_info): Precede the symbol definition by
11342         the line number when available.
11343         * NEWS: Advertise this enhancement.
11344
11345 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11346
11347         * NEWS (New options): announce set/show record btrace cpu.
11348         * btrace.c: Include record-btrace.h.
11349         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11350         the vendor is unknown.
11351         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11352         Maybe overwrite the btrace configuration's cpu.
11353         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11354         (btrace_fetch): Add cpu parameter.  Update callers.
11355         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11356         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11357         errata workarounds if the vendor is unknown.
11358         * python/py-record-btrace.c: Include record-btrace.h.
11359         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11360         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11361         * record-btrace.c (record_btrace_cpu_state_kind): New.
11362         (record_btrace_cpu): New.
11363         (set_record_btrace_cpu_cmdlist): New.
11364         (record_btrace_get_cpu): New.
11365         (require_btrace_thread, record_btrace_info)
11366         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11367         (cmd_set_record_btrace_cpu_none): New.
11368         (cmd_set_record_btrace_cpu_auto): New.
11369         (cmd_set_record_btrace_cpu): New.
11370         (cmd_show_record_btrace_cpu): New.
11371         (_initialize_record_btrace): Initialize set/show record btrace cpu
11372         commands.
11373         * record-btrace.h (record_btrace_get_cpu): New.
11374
11375 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11376
11377         * record.c (set_record_command): Fix typo in message.
11378
11379 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11380
11381         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11382
11383 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11384
11385         * infrun.c (process_event_stop_test): Call
11386         gdbarch_in_indirect_branch_thunk.
11387         * gdbarch.sh (in_indirect_branch_thunk): New.
11388         * gdbarch.c: Regenerated.
11389         * gdbarch.h: Regenerated.
11390         * x86-tdep.h: New.
11391         * x86-tdep.c: New.
11392         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11393         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11394         (ALLDEPFILES): Add x86-tdep.c.
11395         * arch-utils.h (default_in_indirect_branch_thunk): New.
11396         * arch-utils.c (default_in_indirect_branch_thunk): New.
11397         * i386-tdep: Include x86-tdep.h.
11398         (i386_in_indirect_branch_thunk): New.
11399         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11400         function.
11401         * amd64-tdep: Include x86-tdep.h.
11402         (amd64_in_indirect_branch_thunk): New.
11403         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11404
11405 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11406
11407         PR gdb/23053
11408         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11409         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11410         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11411         regression.
11412
11413 2018-04-12  Tom Tromey  <tom@tromey.com>
11414
11415         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11416         (rust_evaluate_subexp): Likewise.
11417
11418 2018-04-12  Pedro Alves  <palves@redhat.com>
11419
11420         * procfs.c (procfs_detach): Make forward declaration's prototype
11421         match definition's protototype.
11422         (proc_get_LDT_entry): Remove stale do_cleanups call.
11423
11424 2018-04-12  Pedro Alves  <palves@redhat.com>
11425
11426         * target.h (target_ops::to_has_exited): Delete.
11427         (target_has_exited): Delete.
11428         * target-delegates.c: Regenerate.
11429
11430 2018-04-11  Pedro Alves  <palves@redhat.com>
11431
11432         * target.c (fileio_fh_t::t): Add comment.
11433         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11434         (target_fileio_close): Handle a NULL target.
11435         (invalidate_fileio_fh): New.
11436         (target_close): Call it.
11437         * remote.c (remote_hostio_send_command): No longer check whether
11438         remote_desc is open.
11439
11440 2018-04-11  Pedro Alves  <palves@redhat.com>
11441
11442         * target.c (fileio_fh_t): Make it a named struct instead of a
11443         typedef.
11444         (fileio_fh_t::is_closed): New method.
11445         (DEF_VEC_O (fileio_fh_t)): Remove.
11446         (fileio_fhandles): Now a std::vector.
11447         (is_closed_fileio_fh): Delete.
11448         (acquire_fileio_fd): Adjust.  Rename parameters.
11449         (release_fileio_fd): Adjust.
11450         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11451         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11452         (target_fileio_close): Adjust.
11453
11454 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11455
11456         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11457         index.
11458
11459 2018-04-10  Pedro Alves  <palves@redhat.com>
11460
11461         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11462         (scoped_finish_thread_state): New class.
11463         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11464         cleanup.
11465         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11466         (fetch_inferior_event, normal_stop): Likewise.
11467         * thread.c (finish_thread_state_cleanup): Delete.
11468
11469 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11470             Pedro Alves  <palves@redhat.com>
11471
11472         * value.c: Include "selftest.h" and "common/array-view.h".
11473         (struct range) <operator ==>: New.
11474         (test_ranges_contain): New.
11475         (check_ranges_vector): New.
11476         (test_insert_into_bit_range_vector): New.
11477         (_initialize_values): Register selftests.
11478         * common/array-view.h (operator==, operator!=): New.
11479
11480 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11481
11482         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11483         an iterator.
11484         * inline-frame.c: Include <algorithm>.
11485         (struct inline_state): Add constructor.
11486         (inline_state_s): Remove.
11487         (DEF_VEC_O(inline_state_s)): Remove.
11488         (inline_states): Change type to std::vector.
11489         (find_inline_frame_state): Adjust to std::vector.
11490         (allocate_inline_frame_state): Remove.
11491         (clear_inline_frame_state): Adjust to std::vector.
11492         (skip_inline_frames): Adjust to std::vector.
11493
11494 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11495
11496         * tracepoint.h (struct trace_state_variable): Add constructor.
11497         <name>: Change type to std::string.
11498         * tracepoint.c (tsv_s): Remove.
11499         (DEF_VEC_O(tsv_s)): Remove.
11500         (tvariables): Change to std::vector.
11501         (create_trace_state_variable): Adjust to std::vector.
11502         (find_trace_state_variable): Likewise.
11503         (find_trace_state_variable_by_number): Likewise.
11504         (delete_trace_state_variable): Likewise.
11505         (trace_variable_command): Adjust to std::string.
11506         (delete_trace_variable_command): Likewise.
11507         (tvariables_info_1): Adjust to std::vector.
11508         (save_trace_state_variables): Likewise.
11509         (start_tracing): Likewise.
11510         (merge_uploaded_trace_state_variables): Adjust to std::vector
11511         and std::string.
11512         * target.h (struct target_ops)
11513         <to_download_trace_state_variable>: Pass reference to
11514         trace_state_variable.
11515         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11516         * target-delegates.c: Re-generate.
11517         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11518         (mi_tsv_deleted): Likewise.
11519         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11520         * remote.c (remote_download_trace_state_variable): Change
11521         pointer to reference and adjust.
11522         * make-target-delegates (parse_argtypes): Handle references.
11523         (write_function_header): Likewise.
11524         (munge_type): Likewise.
11525
11526 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11527
11528         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11529         string_view-selftests.c.
11530         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11531         testsuite.
11532         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11533         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11534         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11535         * unittests/basic_string_view/element_access/char/1.cc:
11536         Likewise.
11537         * unittests/basic_string_view/element_access/char/empty.cc:
11538         Likewise.
11539         * unittests/basic_string_view/element_access/char/front_back.cc:
11540         Likewise.
11541         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11542         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11543         Likewise.
11544         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11545         Likewise.
11546         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11547         Likewise.
11548         * unittests/basic_string_view/operations/compare/char/1.cc:
11549         Likewise.
11550         * unittests/basic_string_view/operations/compare/char/13650.cc:
11551         Likewise.
11552         * unittests/basic_string_view/operations/copy/char/1.cc:
11553         Likewise.
11554         * unittests/basic_string_view/operations/data/char/1.cc:
11555         Likewise.
11556         * unittests/basic_string_view/operations/find/char/1.cc:
11557         Likewise.
11558         * unittests/basic_string_view/operations/find/char/2.cc:
11559         Likewise.
11560         * unittests/basic_string_view/operations/find/char/3.cc:
11561         Likewise.
11562         * unittests/basic_string_view/operations/find/char/4.cc:
11563         Likewise.
11564         * unittests/basic_string_view/operations/rfind/char/1.cc:
11565         Likewise.
11566         * unittests/basic_string_view/operations/rfind/char/2.cc:
11567         Likewise.
11568         * unittests/basic_string_view/operations/rfind/char/3.cc:
11569         Likewise.
11570         * unittests/basic_string_view/operations/substr/char/1.cc:
11571         Likewise.
11572         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11573         * unittests/string_view-selftests.c: New file.
11574
11575 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11576
11577         * unittests/basic_string_view/capacity/1.cc: New file.
11578         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11579         * unittests/basic_string_view/cons/char/1.cc: New file.
11580         * unittests/basic_string_view/cons/char/2.cc: New file.
11581         * unittests/basic_string_view/cons/char/3.cc: New file.
11582         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11583         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11584         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11585         * unittests/basic_string_view/element_access/char/1.cc: New file.
11586         * unittests/basic_string_view/element_access/char/2.cc: New file.
11587         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11588         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11589         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11590         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11591         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11592         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11593         * unittests/basic_string_view/include.cc: New file.
11594         * unittests/basic_string_view/inserters/char/1.cc: New file.
11595         * unittests/basic_string_view/inserters/char/2.cc: New file.
11596         * unittests/basic_string_view/inserters/char/3.cc: New file.
11597         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11598         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11599         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11600         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11601         * unittests/basic_string_view/literals/types.cc: New file.
11602         * unittests/basic_string_view/literals/values.cc: New file.
11603         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11604         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11605         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11606         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11607         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11608         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11609         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11610         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11611         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11612         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11613         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11614         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11615         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11616         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11617         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11618         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11619         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11620         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11621         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11622         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11623         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11624         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11625         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11626         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11627         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11628         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11629         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11630         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11631         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11632         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11633         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11634         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11635         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11636         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11637         * unittests/basic_string_view/operators/char/2.cc: New file.
11638         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11639         * unittests/basic_string_view/range_access/char/1.cc: New file.
11640         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11641         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11642         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11643         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11644         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11645         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11646         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11647         * unittests/basic_string_view/typedefs.cc: New file.
11648         * unittests/basic_string_view/types/1.cc: New file.
11649
11650 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11651
11652         * common/gdb_string_view.h: Remove libstdc++ implementation
11653         details, adjust to gdb reality.
11654         * common/gdb_string_view.tcc: Likewise.
11655         * cli/cli-script.c (struct string_view): Remove.
11656         (user_args) <m_args>: Change element type to gdb::string_view.
11657         (user_args::insert_args): Adjust.
11658
11659 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11660
11661         * common/gdb_string_view.h: New file.
11662         * common/gdb_string_view.tcc: New file.
11663
11664 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11665
11666         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11667         * configure: Re-generate.
11668
11669 2018-04-09  Pedro Alves  <palves@redhat.com>
11670
11671         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11672         (set_target_gdbarch): Call
11673         gdb::observers::architecture_changed.notify instead of
11674         observer_notify_architecture_changed.
11675
11676 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11677
11678         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11679         (do_restore_current_traceframe_cleanup): Remove.
11680         (restore_current_traceframe_cleanup_dtor): Remove.
11681         (make_cleanup_restore_current_traceframe): Remove.
11682         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11683         New.
11684         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11685         * infrun.c (fetch_inferior_event): Use
11686         scoped_restore_current_traceframe.
11687
11688 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11689
11690         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11691         Remove.
11692         <n_allocated_type_units>: Remove.
11693         <all_type_units>: Change to std::vector.
11694         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11695         to std::vector change.
11696         (dwarf2_per_objfile::get_cutu): Likewise.
11697         (dwarf2_per_objfile::get_tu): Likewise.
11698         (create_signatured_type_table_from_index): Likewise.
11699         (create_signatured_type_table_from_debug_names): Likewise.
11700         (dw2_symtab_iter_next): Likewise.
11701         (dw2_print_stats): Likewise.
11702         (dw2_expand_all_symtabs): Likewise.
11703         (dw2_expand_marked_cus): Likewise.
11704         (dw2_debug_names_iterator::next): Likewise.
11705         (dwarf2_initialize_objfile): Likewise.
11706         (add_signatured_type_cu_to_table): Likewise.
11707         (create_all_type_units): Likewise.
11708         (add_type_unit): Likewise.
11709         (struct tu_abbrev_offset): Add constructor.
11710         (build_type_psymtabs_1): Adjust to std::vector change.
11711         (print_tu_stats): Likewise.
11712         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11713         (write_debug_names): Likewise.
11714
11715 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11716
11717         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11718         Make an std::vector.
11719         <n_comp_units>: Remove.
11720         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11721         to std::vector change.
11722         (dwarf2_per_objfile::get_cutu): Likewise.
11723         (dwarf2_per_objfile::get_cu): Likewise.
11724         (create_cus_from_index): Likewise.
11725         (create_addrmap_from_index): Likewise.
11726         (create_addrmap_from_aranges): Likewise.
11727         (dwarf2_read_index): Likewise.
11728         (dw2_find_last_source_symtab): Likewise.
11729         (dw2_map_symtabs_matching_filename): Likewise.
11730         (dw2_symtab_iter_next): Likewise.
11731         (dw2_print_stats): Likewise.
11732         (dw2_expand_all_symtabs): Likewise.
11733         (dw2_expand_symtabs_with_fullname): Likewise.
11734         (dw2_expand_marked_cus): Likewise.
11735         (dw2_map_symbol_filenames): Likewise.
11736         (create_cus_from_debug_names): Likewise.
11737         (dwarf2_read_debug_names): Likewise.
11738         (dw2_debug_names_iterator::next): Likewise.
11739         (dwarf2_initialize_objfile): Likewise.
11740         (set_partial_user): Likewise.
11741         (dwarf2_build_psymtabs_hard): Likewise.
11742         (read_comp_units_from_section): Remove arguments, adjust to
11743         std::vector change.
11744         (create_all_comp_units): Adjust to std::vector and
11745         read_comp_units_from_section changes.
11746         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11747         change.
11748         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11749         (psyms_seen_size): Likewise.
11750         (write_gdbindex): Likewise.
11751         (write_debug_names): Likewise.
11752
11753 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11754
11755         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11756         with dwarf2_per_objfile.
11757         (create_cus_from_index): Likewise.
11758         (create_signatured_type_table_from_index): Likewise.
11759         (dwarf2_read_index): Likewise.
11760         (dwarf2_initialize_objfile): Likewise.
11761         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11762         per_cu rather than get_dwarf2_per_objfile.
11763
11764 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11765
11766         * dwarf2read.h (struct signatured_type): Forward declare.
11767         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11768         New methods.
11769         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11770         (dw2_get_cutu): ...this.
11771         (dwarf2_per_objfile::get_cu): Rename from...
11772         (dw2_get_cu): ...this.
11773         (dwarf2_per_objfile::get_tu): New.
11774         (create_addrmap_from_index): Adjust.
11775         (create_addrmap_from_aranges): Adjust.
11776         (dw2_find_last_source_symtab): Adjust.
11777         (dw2_map_symtabs_matching_filename): Adjust.
11778         (dw2_symtab_iter_next): Adjust.
11779         (dw2_print_stats): Adjust.
11780         (dw2_expand_all_symtabs): Adjust.
11781         (dw2_expand_symtabs_with_fullname): Adjust.
11782         (dw2_expand_marked_cus): Adjust.
11783         (dw_expand_symtabs_matching_file_matcher): Adjust.
11784         (dw2_map_symbol_filenames): Adjust.
11785         (dw2_debug_names_iterator::next): Adjust.
11786         (dwarf2_initialize_objfile): Adjust.
11787         (set_partial_user): Adjust.
11788         (dwarf2_build_psymtabs_hard): Adjust.
11789
11790 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11791
11792         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11793         Remove unused variables.
11794         (dw2_map_symtabs_matching_filename): Likewise.
11795         (dwarf2_record_block_ranges): Likewise.
11796         (dwarf2_read_addr_index): Likewise.
11797         (follow_die_offset): Likewise.
11798
11799 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11800
11801         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11802         to symbol_file_add_main.
11803
11804 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11805
11806         PR mi/22299
11807         * mi/mi-console.c (do_fputc_async_safe): New.
11808         (mi_console_file::write_async_safe): New.
11809         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11810         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11811         New.
11812         * ui-file.c (ui_file::putstrn): Adjust call to
11813         fputstrn_unfiltered.
11814         * utils.c (printchar): Replace do_fputs and do_fprintf
11815         parameters by do_fputc.
11816         (fputstr_filtered): Adjust call to printchar.
11817         (fputstr_unfiltered): Likewise.
11818         (fputstrn_filtered): Likewise.
11819         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11820         printchar.
11821         * utils.h (do_fputc_ftype): New typedef.
11822         (fputstrn_unfiltered): Add do_fputc parameter.
11823
11824 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11825
11826         * regformats/i386/i386-avx.dat: Remove.
11827
11828 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11829
11830         PR gdb/22979
11831         * amd64-tdep.c (amd64_none_init_abi): New function.
11832         (amd64_x32_none_init_abi): New function.
11833         (_initialize_amd64_tdep): Register handlers for x86-64 and
11834         x64_32 with GDB_OSABI_NONE.
11835         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11836         GDB_OSABI_NONE osabi.
11837
11838 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11839
11840         PR gdb/22980
11841         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11842         GDB_OSABI_NONE.
11843         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11844         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11845
11846 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11847
11848         * common/byte-vector.h (char_vector): New type.
11849         * target.h (target_read_alloc): Return
11850         gdb::optional<byte_vector>.
11851         (target_read_stralloc): Return gdb::optional<char_vector>.
11852         (target_get_osdata): Return gdb::optional<char_vector>.
11853         * target.c (target_read_alloc_1): Templatize.  Replacement
11854         manual memory management with vector.
11855         (target_read_alloc): Change return type, adjust.
11856         (target_read_stralloc): Change return type, adjust.
11857         (target_get_osdata): Change return type, adjust.
11858         * auxv.c (struct auxv_info) <length>: Remove.
11859         <data>: Change type to gdb::optional<byte_vector>.
11860         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11861         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11862         (target_auxv_search): Adjust.
11863         (fprint_target_auxv): Adjust.
11864         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11865         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11866         (linux_make_corefile_notes): Adjust.
11867         * osdata.c (get_osdata): Adjust.
11868         * remote.c (remote_get_threads_with_qxfer): Adjust.
11869         (remote_memory_map): Adjust.
11870         (remote_traceframe_info): Adjust.
11871         (btrace_read_config): Adjust.
11872         (remote_read_btrace): Adjust.
11873         (remote_pid_to_exec_file): Adjust.
11874         * solib-aix.c (solib_aix_get_library_list): Adjust.
11875         * solib-dsbt.c (decode_loadmap): Don't free buf.
11876         (dsbt_get_initial_loadmaps): Adjust.
11877         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11878         * solib-target.c (solib_target_current_sos): Adjust.
11879         * tracepoint.c (sdata_make_value): Adjust.
11880         * xml-support.c (xinclude_start_include): Adjust.
11881         (xml_fetch_content_from_file): Adjust.
11882         * xml-support.h (xml_fetch_another): Change return type.
11883         (xml_fetch_content_from_file): Change return type.
11884         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11885         * xml-tdesc.c (file_read_description_xml): Adjust.
11886         (fetch_available_features_from_target): Change return type.
11887         (target_fetch_description_xml): Adjust.
11888         (target_read_description_xml): Adjust.
11889
11890 2018-04-06  Tom Tromey  <tom@tromey.com>
11891
11892         * value.c (~value): Update.
11893         (struct value) <contents>: Now unique_xmalloc_ptr.
11894         (value_contents_bits_eq, allocate_value_contents)
11895         (value_contents_raw, value_contents_all_raw)
11896         (value_contents_for_printing, value_contents_for_printing_const)
11897         (set_value_enclosing_type): Update.
11898
11899 2018-04-06  Tom Tromey  <tom@tromey.com>
11900
11901         * value.c (range_s): Remove typedef, VEC.
11902         (struct range): Add operator<.
11903         (range_lessthan): Remove.
11904         (ranges_contain): Change type.
11905         (~value): Update.
11906         (struct value) <unavailable, optimized_out>: Now std::vector.
11907         (value_entirely_available)
11908         (value_entirely_covered_by_range_vector)
11909         (value_entirely_unavailable, value_entirely_optimized_out):
11910         Update.
11911         (insert_into_bit_range_vector): Change argument type.
11912         (find_first_range_overlap): Likewise.
11913         (struct ranges_and_idx, value_contents_bits_eq)
11914         (require_not_optimized_out, require_available): Update.
11915         (ranges_copy_adjusted): Change argument types.
11916         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11917
11918 2018-04-06  Tom Tromey  <tom@tromey.com>
11919
11920         * value.c (~value): Update.
11921         (struct value) <parent>: Now a value_ref_ptr.
11922         (value_parent, set_value_parent, value_address, value_copy):
11923         Update.
11924
11925 2018-04-06  Tom Tromey  <tom@tromey.com>
11926
11927         * value.c (struct value): Add constructor, destructor, and member
11928         initializers.
11929         (allocate_value_lazy, value_decref): Update.
11930
11931 2018-04-06  Tom Tromey  <tom@tromey.com>
11932
11933         * value.c (struct value) <released, next>: Remove.
11934         (all_values): Now a std::vector.
11935         (allocate_value_lazy): Update.
11936         (value_next): Remove.
11937         (value_mark, value_free_to_mark, release_value)
11938         (value_release_to_mark): Update.
11939
11940 2018-04-06  Tom Tromey  <tom@tromey.com>
11941
11942         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11943         (free_value_chain): Remove.
11944         * value.c (free_value_chain): Remove.
11945         (value_release_to_mark): Return a std::vector.
11946         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11947         std::vector.
11948         (check_condition): Update.
11949         * eval.c (fetch_subexp_value): Change "val_chain" to a
11950         std::vector.
11951         * breakpoint.c (update_watchpoint): Update.
11952         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11953
11954 2018-04-06  Tom Tromey  <tom@tromey.com>
11955
11956         * value.h (free_all_values): Remove.
11957         * value.c (free_all_values): Remove.
11958
11959 2018-04-06  Tom Tromey  <tom@tromey.com>
11960
11961         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11962         (value_history_chain, value_history_count): Remove.
11963         (value_history): New global.
11964         (record_latest_value, access_value_history, show_values)
11965         (preserve_values): Update.
11966
11967 2018-04-06  Tom Tromey  <tom@tromey.com>
11968
11969         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11970         * varobj.c (varobj_set_display_format, varobj_set_value)
11971         (install_default_visualizer, construct_visualizer)
11972         (install_new_value, ~varobj, varobj_get_value_type)
11973         (my_value_of_variable, varobj_editable_p): Update.
11974         * c-varobj.c (c_describe_child, c_value_of_variable)
11975         (cplus_number_of_children, cplus_describe_child): Update.
11976         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11977         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11978         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11979
11980 2018-04-06  Tom Tromey  <tom@tromey.com>
11981
11982         * printcmd.c (last_examine_address): Change type to
11983         value_ref_ptr.
11984         (do_examine, x_command): Update.
11985
11986 2018-04-06  Tom Tromey  <tom@tromey.com>
11987
11988         * value.c (release_value): Update.
11989         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11990         (struct bpstats) <val>: Now a value_ref_ptr.
11991         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11992         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11993         (~watchpoint, print_it_watchpoint, watch_command_1)
11994         (invalidate_bp_value_on_memory_change): Update.
11995
11996 2018-04-06  Tom Tromey  <tom@tromey.com>
11997
11998         * varobj.c (varobj_clear_saved_item)
11999         (update_dynamic_varobj_children, install_new_value, ~varobj):
12000         Update.
12001         * value.h (value_incref): Move declaration earlier.
12002         (value_decref): Rename from value_free.
12003         (struct value_ref_policy): New.
12004         (value_ref_ptr): New typedef.
12005         (struct value_deleter): Remove.
12006         (gdb_value_up): Remove typedef.
12007         (release_value): Change return type.
12008         (release_value_or_incref): Remove.
12009         * value.c (set_value_parent): Update.
12010         (value_incref): Change return type.
12011         (value_decref): Rename from value_free.
12012         (value_free_to_mark, free_all_values, free_value_chain): Update.
12013         (release_value): Return value_ref_ptr.
12014         (release_value_or_incref): Remove.
12015         (record_latest_value, set_internalvar, clear_internalvar):
12016         Update.
12017         * stack.c (info_frame_command): Don't call value_free.
12018         * python/py-value.c (valpy_dealloc, valpy_new)
12019         (value_to_value_object): Update.
12020         * printcmd.c (do_examine): Update.
12021         * opencl-lang.c (lval_func_free_closure): Update.
12022         * mi/mi-main.c (register_changed_p): Don't call value_free.
12023         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12024         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12025         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12026         value_free.
12027         * guile/scm-value.c (vlscm_free_value_smob)
12028         (vlscm_scm_from_value): Update.
12029         * frame.c (frame_register_unwind, frame_unwind_register_signed)
12030         (frame_unwind_register_unsigned, get_frame_register_bytes)
12031         (put_frame_register_bytes): Don't call value_free.
12032         * findvar.c (address_from_register): Don't call value_free.
12033         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12034         * dwarf2loc.c (entry_data_value_free_closure)
12035         (value_of_dwarf_reg_entry, free_pieced_value_closure)
12036         (dwarf2_evaluate_loc_desc_full): Update.
12037         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12038         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12039         (~watchpoint, watch_command_1)
12040         (invalidate_bp_value_on_memory_change): Update.
12041         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12042
12043 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
12044
12045         PR gdb/23022
12046         * warning.m4: Add -Wno-error=deprecated-register.
12047         * configure: Re-generate.
12048
12049 2018-04-05  Tom Tromey  <tom@tromey.com>
12050
12051         * linespec.h: Remove include of "vec.h".
12052
12053 2018-04-05  Tom Tromey  <tom@tromey.com>
12054
12055         * linespec.c (typep): Remove typedef.
12056         (find_methods, find_superclass_methods): Take a std::vector.
12057         (find_method): Use std::vector.
12058
12059 2018-04-05  Tom Tromey  <tom@tromey.com>
12060
12061         * utils.c (compare_strings): Remove.
12062         * utils.h (compare_strings): Remove.
12063         * objc-lang.h (find_imps): Update.
12064         * objc-lang.c (find_methods): Take a std::vector.
12065         (uniquify_strings, find_imps): Likewise.
12066         * linespec.c (find_methods): Take a std::vector.
12067         (decode_objc): Use std::vector.
12068         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12069         a std::vector.
12070         (find_method, find_function_symbols): Use std::vector.
12071
12072 2018-04-05  Tom Tromey  <tom@tromey.com>
12073
12074         * completer.c (completion_tracker::completion_tracker): Remove
12075         cast.
12076         (completion_tracker::discard_completions): Likewise.
12077         * breakpoint.c (ambiguous_names_p): Remove cast.
12078         * ada-lang.c (_initialize_ada_language): Remove cast.
12079         * utils.h (streq): Update.
12080         (streq_hash): Add new declaration.
12081         * utils.c (streq): Return bool.
12082         (streq_hash): New function.
12083
12084 2018-04-05  Tom Tromey  <tom@tromey.com>
12085
12086         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12087         Remove a string copy.
12088
12089 2018-04-05  Tom Tromey  <tom@tromey.com>
12090
12091         * linespec.c (filter_results): Use std::vector.
12092         (decode_line_2, decode_line_full): Update.
12093
12094 2018-04-05  Tom Tromey  <tom@tromey.com>
12095
12096         * linespec.c (canonical_to_fullform): Return std::string.
12097         (filter_results): Update.
12098         (struct decode_line_2_item): Add constructor.
12099         <fullform, displayform>: Now std::string.
12100         (decode_line_2_compare_items): Now a std::sort comparator.
12101         (decode_line_2): Update.
12102
12103 2018-04-05  Tom Tromey  <tom@tromey.com>
12104
12105         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12106         (unexpected_linespec_error): Update.
12107         (linespec_parse_basic, parse_linespec): Update.
12108
12109 2018-04-05  Tom Tromey  <tom@tromey.com>
12110
12111         * linespec.c (linespec_parse_basic): Reindent.
12112
12113 2018-04-05  Tom Tromey  <tom@tromey.com>
12114
12115         * minsyms.h (iterate_over_minimal_symbols): Update.
12116         * minsyms.c (iterate_over_minimal_symbols): Take a
12117         gdb::function_view.
12118         * linespec.c (struct collect_minsyms): Remove.
12119         (compare_msyms): Now a std::sort comparator.
12120         (add_minsym): Add parameters.
12121         (search_minsyms_for_name): Update.  Use std::vector.
12122
12123 2018-04-03  Tom Tromey  <tom@tromey.com>
12124
12125         * mipsread.c (read_alphacoff_dynamic_symtab): Use
12126         gdb::byte_vector.
12127
12128 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12129
12130         * MAINTAINERS (Write After Approval): Add Weimin Pan.
12131
12132 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12133
12134         PR gdb/16959
12135         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
12136         printing static type.
12137
12138 2018-04-01  Tom Tromey  <tom@tromey.com>
12139
12140         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12141         (rs6000_xfer_shared_libraries): Update.
12142
12143 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
12144
12145         * common/gdb_vecs.h (char_ptr): Remove.
12146         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12147
12148 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12149
12150         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12151         with std::vector.
12152         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12153
12154 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12155
12156         * tracepoint.h (struct uploaded_tp): Initialize fields.
12157         <actions, step_actions, cmd_strings>: Change type to
12158         std::vector<char *>.
12159         * tracepoint.c (get_uploaded_tp): Allocate with new.
12160         (free_uploaded_tps): Free with delete.
12161         (parse_tracepoint_definition): Adjust to std::vector change.
12162         * breakpoint.c (read_uploaded_action): Likewise.
12163         (create_tracepoint_from_upload): Likewise.
12164         * ctf.c (ctf_write_uploaded_tp): Likewise.
12165         (SET_ARRAY_FIELD): Likewise.
12166         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12167
12168 2018-03-30  Tom Tromey  <tom@tromey.com>
12169
12170         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12171         std::unique_ptr.
12172         (svr4_keep_data_in_core): Update.
12173         (svr4_read_so_list): Update.
12174
12175 2018-03-30  Tom Tromey  <tom@tromey.com>
12176
12177         * windows-nat.c (handle_output_debug_string, handle_exception):
12178         Update.
12179         * target.h (target_read_string): Update.
12180         * target.c (target_read_string): Change "string" to
12181         unique_xmalloc_ptr.
12182         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12183         Update.
12184         * solib-frv.c (frv_current_sos): Update.
12185         * solib-dsbt.c (dsbt_current_sos): Update.
12186         * solib-darwin.c (darwin_current_sos): Update.
12187         * linux-thread-db.c (inferior_has_bug): Update.
12188         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12189         Update.  Remove alloca.
12190         * ada-lang.c (ada_main_name): Update.
12191
12192 2018-03-30  Tom Tromey  <tom@tromey.com>
12193
12194         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12195         (struct dwo_file_deleter): New.
12196         (dwo_file_up): New typedef.
12197         (open_and_init_dwo_file): Use dwo_file_up.
12198         (free_dwo_file_cleanup): Remove.
12199
12200 2018-03-30  Tom Tromey  <tom@tromey.com>
12201
12202         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12203         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12204
12205 2018-03-30  Tom Tromey  <tom@tromey.com>
12206
12207         * dwarf2read.c (class free_cached_comp_units): New class.
12208         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12209         (free_cached_comp_units): Remove function.
12210
12211 2018-03-30  Tom Tromey  <tom@tromey.com>
12212
12213         * utils.h (make_cleanup_unpush_target): Remove.
12214         * inf-ptrace.c (struct target_unpusher): New.
12215         (target_unpush_up) New typedef.
12216         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12217         target_unpush_up.
12218         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12219
12220 2018-03-27  Tom Tromey  <tom@tromey.com>
12221
12222         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12223
12224 2018-03-27  Pedro Alves  <palves@redhat.com>
12225             Tom Tromey  <tom@tromey.com>
12226
12227         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12228         destructor.  Now a class.
12229         (gdb_readline_wrapper_cleanup): Remove function.
12230         (gdb_readline_wrapper): Remove cleanups.
12231
12232 2018-03-27  Tom Tromey  <tom@tromey.com>
12233
12234         * typeprint.h (struct type_print_options) <local_typedefs,
12235         global_typedefs>: Remove "struct" keyword.
12236         (class typedef_hash_table): New class.
12237         (recursively_update_typedef_hash, add_template_parameters)
12238         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12239         (find_typedef_in_hash): Don't declare.
12240         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12241         (typedef_hash_table::recursively_update): Rename from
12242         recursively_update_typedef_hash.  Now a member.
12243         (typedef_hash_table::add_template_parameters): Rename from
12244         add_template_parameters.  Now a member.
12245         (typedef_hash_table::typedef_hash_table): Now a constructor;
12246         rename from create_typedef_hash.
12247         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12248         rename from free_typedef_hash.
12249         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12250         (do_free_global_table): Remove.
12251         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12252         from copy_type_recursive.
12253         (create_global_typedef_table): Remove.
12254         (typedef_hash_table::find_global_typedef): Now a member of
12255         typedef_hash_table.
12256         (typedef_hash_table::find_typedef): Rename from
12257         find_typedef_in_hash; now a member.
12258         (whatis_exp): Update.
12259         * extension.h (struct ext_lang_type_printers): Add constructor and
12260         destructor.
12261         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12262         declare.
12263         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12264         Now a constructor; rename from start_ext_lang_type_printers.
12265         (ext_lang_type_printers): Now a destructor; rename from
12266         free_ext_lang_type_printers.
12267         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12268         Update.
12269         (c_type_print_base_struct_union): Update.  Remove cleanups.
12270
12271 2018-03-27  Tom Tromey  <tom@tromey.com>
12272
12273         * dwarf-index-write.c: Include <cmath>.
12274
12275 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12276
12277         * NEWS: Add entry describing new "set|show varsize-limit" command.
12278         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12279         command.
12280         * printcmd.c (_initialize_printcmd): Add "set var" alias of
12281         "set variable".
12282
12283 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
12284
12285         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12286         dwarf-index-write.c
12287         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12288         * dwarf-index-common.c: New file.
12289         * dwarf-index-common.h: New file.
12290         * dwarf-index-write.c: New file.
12291         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12292         (struct dwarf2_section_info): Move from here.
12293         (dwarf2_section_info_def): Likewise.
12294         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12295         (offset_type): Likewise.
12296         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12297         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12298         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12299         (byte_swap): Likewise.
12300         (MAYBE_SWAP): Likewise.
12301         (dwarf2_per_cu_ptr): Likewise.
12302         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12303         (struct tu_stats): Likewise.
12304         (struct dwarf2_per_objfile): Likewise.
12305         (struct dwarf2_per_cu_data): Likewise.
12306         (struct signatured_type): Likewise.
12307         (sig_type_ptr): Likewise.
12308         (DEF_VEC_P (sig_type_ptr)): Likewise.
12309         (INDEX4_SUFFIX): Likewise.
12310         (INDEX5_SUFFIX): Likewise.
12311         (DEBUG_STR_SUFFIX): Likewise.
12312         (dwarf2_read_section): Make non-static.
12313         (mapped_index_string_hash): Move from here.
12314         (dwarf5_djb_hash): Likewise.
12315         (file_write): Likewise.
12316         (class data_buf): Likewise.
12317         (struct symtab_index_entry): Likewise.
12318         (struct mapped_symtab): Likewise.
12319         (find_slot): Likewise.
12320         (hash_expand): Likewise.
12321         (add_index_entry): Likewise.
12322         (uniquify_cu_indices): Likewise.
12323         (class c_str_view): Likewise.
12324         (class c_str_view_hasher): Likewise.
12325         (class vector_hasher): Likewise.
12326         (write_hash_table): Likewise.
12327         (psym_index_map): Likewise.
12328         (struct addrmap_index_data): Likewise.
12329         (add_address_entry): Likewise.
12330         (add_address_entry_worker): Likewise.
12331         (write_address_map): Likewise.
12332         (symbol_kind): Likewise.
12333         (write_psymbols): Likewise.
12334         (struct signatured_type_index_data): Likewise.
12335         (write_one_signatured_type): Likewise.
12336         (recursively_count_psymbols): Likewise.
12337         (recursively_write_psymbols): Likewise.
12338         (class debug_names): Likewise.
12339         (check_dwarf64_offsets): Likewise.
12340         (psyms_seen_size): Likewise.
12341         (write_gdbindex): Likewise.
12342         (write_debug_names): Likewise.
12343         (assert_file_size): Likewise.
12344         (write_psymtabs_to_index): Likewise.
12345         (save_gdb_index_command): Likewise.
12346         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12347         command.
12348         * dwarf2read.h: New file.
12349
12350 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12351
12352         PR gdb/22670
12353         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12354         symbol name if the CU's language stores symbol names in linkage
12355         format.
12356         * language.h (struct language_defn)
12357         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12358         all instances of this struct.
12359
12360 2018-03-26  Tom Tromey  <tom@tromey.com>
12361
12362         * stack.c (backtrace_command_1): Remove verbose code.
12363
12364 2018-03-26  Tom Tromey  <tom@tromey.com>
12365
12366         * python/py-framefilter.c (py_print_type): Don't catch
12367         exceptions.  Return void.
12368         (py_print_value): Likewise.
12369         (py_print_single_arg): Likewise.
12370         (enumerate_args): Don't catch exceptions.
12371         (py_print_args): Likewise.
12372         (py_print_frame): Likewise.
12373         (gdbpy_apply_frame_filter): Catch exceptions here.
12374
12375 2018-03-26  Tom Tromey  <tom@tromey.com>
12376
12377         * stack.c (_initialize_stack): Remove trailing newlines from help
12378         text.  Add "Usage" line to "backtrace" help.
12379
12380 2018-03-26  Tom Tromey  <tom@tromey.com>
12381
12382         PR python/16486:
12383         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12384
12385 2018-03-26  Tom Tromey  <tom@tromey.com>
12386
12387         * python/py-framefilter.c (py_print_single_arg): Return
12388         EXT_LANG_BT_ERROR from catch.
12389
12390 2018-03-26  Tom Tromey  <tom@tromey.com>
12391
12392         PR backtrace/15584:
12393         * stack.c (backtrace_command_1): Move some code into no-filters
12394         "if".
12395
12396 2018-03-26  Tom Tromey  <tom@tromey.com>
12397
12398         * python/py-framefilter.c (throw_quit_or_print_exception): New
12399         function.
12400         (gdbpy_apply_frame_filter): Use it.
12401
12402 2018-03-26  Tom Tromey  <tom@tromey.com>
12403
12404         PR cli/17716:
12405         * python/py-framefilter.c (py_print_type, py_print_value)
12406         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12407         RETURN_MASK_ERROR.
12408
12409 2018-03-26  Tom Tromey  <tom@tromey.com>
12410
12411         * python/py-framefilter.c (enumerate_args): Use
12412         gdb::unique_xmalloc_ptr.
12413
12414 2018-03-26  Tom Tromey  <tom@tromey.com>
12415
12416         * python/py-framefilter.c (py_print_frame): Return
12417         EXT_LANG_BT_OK.
12418         (gdbpy_apply_frame_filter): Update comment.
12419         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12420         Remove.
12421         <EXT_LANG_BT_NO_FILTERS>: Change value.
12422
12423 2018-03-26  Tom Tromey  <tom@tromey.com>
12424
12425         PR backtrace/15582:
12426         * stack.c (backtrace_command): Parse "hide" argument.
12427         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12428         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12429         constant.
12430
12431 2018-03-26  Tom Tromey  <tom@tromey.com>
12432
12433         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12434         add "flags".
12435         (backtrace_command): Remove "fulltrace", add "flags".
12436
12437 2018-03-26  Tom Tromey  <tom@tromey.com>
12438
12439         * stack.c (backtrace_command): Rewrite command line parsing.
12440
12441 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12442
12443         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12444
12445 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12446
12447         * filename-seen-cache.h: Add include guard.
12448
12449 2018-03-26  Keith Seitz  <keiths@redhat.com>
12450
12451         * symfile.c (place_section): Remove "struct" from section_addr_info
12452         in comment.
12453         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12454         "struct" keyword from section_addr_info.
12455
12456 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12457
12458         * regformats/regdef.h (reg): Add constructors.
12459
12460 2018-03-25  Pedro Alves  <palves@redhat.com>
12461
12462         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12463         if then/else bodies in var_func_name extraction.
12464
12465 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12466
12467         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12468         lookup_minimal_symbol() to find symbol entry.
12469         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12470
12471 2018-03-23  Keith Seitz  <keiths@redhat.com>
12472
12473         PR c++/22968
12474         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12475         nested type definitions for C++, too.
12476
12477 2018-03-23  Tom Tromey  <tom@tromey.com>
12478
12479         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12480         a typedef.
12481         (macho_register_oso): Remove.
12482         (macho_symtab_read): Take a std::vector.
12483         (oso_el_compare_name): Now a std::sort comparator.
12484         (macho_symfile_read_all_oso): Take a std::vector.
12485         (macho_symfile_read): Use std::vector.  Remove cleanups.
12486
12487 2018-03-22  Tom Tromey  <tom@tromey.com>
12488
12489         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12490         (record_full_goto_bookmark): Use std::string.
12491
12492 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12493
12494         PR tdep/18295
12495         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12496         a single mask.
12497
12498 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12499
12500         * rs6000-tdep.c (store_insn_p): New function.
12501         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12502         and cr_reg to their unshifted values. Use store_insn_p to
12503         match LR saves using either R1 or fdata->alloca_reg. Use
12504         store_insn_p to match CR saves. Set alloca_reg_offset
12505         when alloca_reg and framep are set. Remove lr_reg shift
12506         when assigning to fdata->lr_register.
12507
12508 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12509
12510         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12511         command line args instead of emitting a warning.
12512
12513 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12514
12515         * tracepoint.h (struct static_tracepoint_marker): Initialize
12516         fields, define default constructor, move constructor and move
12517         assignment, disable the rest.
12518         <str_id, extra>: Make std::string.
12519         (release_static_tracepoint_marker): Remove.
12520         (free_current_marker): Remove.
12521         * tracepoint.c (free_current_marker): Remove.
12522         (parse_static_tracepoint_marker_definition): Adjust to
12523         std::string, use new hex2str overload.
12524         (release_static_tracepoint_marker): Remove.
12525         (print_one_static_tracepoint_marker): Get marker by reference
12526         and adjust to std::string.
12527         (info_static_tracepoint_markers_command): Adjust to std::vector
12528         changes
12529         * target.h (static_tracepoint_marker_p): Remove typedef.
12530         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12531         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12532         bool.
12533         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12534         * target-debug.h
12535         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12536         (target_debug_print_std_vector_static_tracepoint_marker): New.
12537         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12538         to...
12539         (target_debug_print_static_tracepoint_marker_p): ... this.
12540         * target-delegates.c: Re-generate.
12541         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12542         Make std::string.
12543         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12544         (decode_static_tracepoint_spec): Adjust to std::vector.
12545         (tracepoint_print_one_detail): Adjust to std::string.
12546         (strace_marker_decode_location): Adjust to std::string.
12547         (update_static_tracepoint): Adjust to std::string, remove call
12548         to release_static_tracepoint_marker.
12549         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12550         Adjust to std::vector.
12551         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12552         (remote_static_tracepoint_markers_by_strid): Adjust to
12553         std::vector.
12554         * common/rsp-low.h (hex2str): New overload with explicit count
12555         of bytes.
12556         * common/rsp-low.c (hex2str): New overload with explicit count
12557         of bytes.
12558         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12559         (_initialize_rsp_low_selftests): Add test_hex2str test.
12560         * unittests/tracepoint-selftests.c
12561         (test_parse_static_tracepoint_marker_definition): Adjust to
12562         std::string.
12563
12564 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12565
12566         * tracepoint.c (parse_static_tracepoint_marker_definition):
12567         Consider case where the definition is followed by more
12568         definitions.
12569         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12570         tracepoint-selftests.c.
12571         * unittests/tracepoint-selftests.c: New.
12572
12573 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12574
12575         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12576         Carvalho.
12577
12578 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12579
12580         * symtab.c (find_pc_sect_line): fixed indentation.
12581
12582 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12583
12584         * symtab.c (find_pc_sect_line): now uses binary search.
12585
12586 2018-03-19  Tom Tromey  <tom@tromey.com>
12587
12588         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12589         "IDENT" production.
12590
12591 2018-03-19  Pedro Alves  <palves@redhat.com>
12592             Tom Tromey  <tom@tromey.com>
12593
12594         * unittests/observable-selftests.c: New file.
12595         * common/observable.h: New file.
12596         * observable.h: New file.
12597         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12598         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12599         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12600         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12601         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12602         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12603         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12604         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12605         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12606         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12607         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12608         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12609         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12610         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12611         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12612         tui/tui-interp.c, valops.c: Update all users.
12613         * tui/tui-hooks.c (tui_bp_created_observer)
12614         (tui_bp_deleted_observer, tui_bp_modified_observer)
12615         (tui_inferior_exit_observer, tui_before_prompt_observer)
12616         (tui_normal_stop_observer, tui_register_changed_observer):
12617         Remove.
12618         (tui_observers_token): New global.
12619         (attach_or_detach, tui_attach_detach_observers): New functions.
12620         (tui_install_hooks, tui_remove_hooks): Use
12621         tui_attach_detach_observers.
12622         * record-btrace.c (record_btrace_thread_observer): Remove.
12623         (record_btrace_thread_observer_token): New global.
12624         * observer.sh: Remove.
12625         * observer.c: Rename to observable.c.
12626         * observable.c (namespace gdb_observers): Define new objects.
12627         (observer_debug): Move into gdb_observers namespace.
12628         (struct observer, struct observer_list, xalloc_observer_list_node)
12629         (xfree_observer_list_node, generic_observer_attach)
12630         (generic_observer_detach, generic_observer_notify): Remove.
12631         (_initialize_observer): Update.
12632         Don't include observer.inc.
12633         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12634         (clean mostlyclean): Likewise.
12635         (observer.h, observer.inc): Remove targets.
12636         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12637         (COMMON_SFILES): Use observable.c, not observer.c.
12638         * .gitignore: Remove observer.h.
12639
12640 2018-03-18  Tom Tromey  <tom@tromey.com>
12641
12642         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12643         gdb::def_vector.
12644         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12645
12646 2018-03-17  Tom Tromey  <tom@tromey.com>
12647
12648         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12649
12650 2018-03-17  Tom Tromey  <tom@tromey.com>
12651
12652         * target.c (class scoped_target_fd): New.
12653         (target_fileio_close_cleanup): Remove.
12654         (target_fileio_read_alloc_1): Use scoped_target_fd.
12655
12656 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12657
12658         * silent-rules.mk: New.
12659         * Makefile.in: Include silent-rules.mk
12660         (srcdir, VPATH, top_srcdir): Move up.
12661         (COMPILE): Add ECHO_CXX.
12662         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12663         (init.c): Add ECHO_INIT_C.
12664         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12665         (version.c): Add ECHO_GEN.
12666         (printcmd.o): Add ECHO_CXX.
12667         (target-float.o): Add ECHO_CXX.
12668         (ada-exp.o): Add ECHO_CXX.
12669         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12670         (insight$(EXEEXT)): Add ECHO_CXXLD.
12671         * gnulib/configure.ac: Add AM_SILENT_RULES.
12672         * gnulib/aclocal.m4: Re-generate.
12673         * gnulib/configure: Re-generate.
12674         * gnulib/import/Makefile.in: Re-generate.
12675
12676 2018-03-16  Tom Tromey  <tom@tromey.com>
12677
12678         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12679         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12680         * utils.c (do_free_section_addr_info)
12681         (make_cleanup_free_section_addr_info): Remove.
12682         * symfile.h (struct other_sections): Add constructor.
12683         (struct section_addr_info): Remove.
12684         (section_addr_info): New typedef.
12685         (struct sym_fns) <sym_offsets>: Change type of parameter.
12686         (build_section_addr_info_from_objfile)
12687         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12688         (default_symfile_offsets, symbol_file_add)
12689         (symbol_file_add_from_bfd)
12690         (build_section_addr_info_from_section_table): Update.
12691         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12692         * symfile.c (alloc_section_addr_info): Remove.
12693         (build_section_addr_info_from_section_table): Change return type.
12694         Update.
12695         (build_section_addr_info_from_bfd)
12696         (build_section_addr_info_from_objfile): Likewise.
12697         (free_section_addr_info): Remove.
12698         (relative_addr_info_to_section_offsets): Change type of "addrs".
12699         (addrs_section_compar): Now a std::sort comparator.
12700         (addrs_section_sort): Change return type.
12701         (addr_info_make_relative): Change type of "addrs".  Update.
12702         (default_symfile_offsets, syms_from_objfile_1)
12703         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12704         (symbol_file_add_separate): Update.
12705         (symbol_file_add): Change type of "addrs".  Update.
12706         (add_symbol_file_command): Update.  Remove cleanups.
12707         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12708         cleanups.
12709         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12710         * solib.c (solib_read_symbols): Update.
12711         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12712         * machoread.c (macho_symfile_offsets): Update.
12713         * jit.c (jit_bfd_try_read_symtab): Update.
12714
12715 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12716
12717         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12718         unittests/utils-selftests.c.
12719         * unittests/utils-selftests.c: New file.
12720
12721 2018-03-14  Tom Tromey  <tom@tromey.com>
12722
12723         PR cli/14977:
12724         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12725         for NULL.
12726
12727 2018-03-14  Tom Tromey  <tom@tromey.com>
12728
12729         PR cli/19918:
12730         * printcmd.c (printf_pointer): Allow "-" in format.
12731
12732 2018-03-14  Tom Tromey  <tom@tromey.com>
12733
12734         * printcmd.c (_initialize_printcmd): Add usage to printf.
12735
12736 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12737
12738         * MAINTAINERS: Update my email address.
12739
12740 2018-03-13  Tom Tromey  <tom@tromey.com>
12741
12742         * machoread.c (macho_check_dsym): Change filenamep to a
12743         std::string*.
12744         (macho_symfile_read): Update.
12745         * symfile.c (load_command): Use std::string.
12746
12747 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12748
12749         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12750         to error message string.
12751         (riscv_register_name): Use xsnprintf instead of sprintf.
12752         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12753         internal_error.
12754         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12755         error.
12756         (riscv_push_dummy_call): Likewise.
12757
12758 2018-03-12  Tom Tromey  <tom@tromey.com>
12759
12760         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12761         Use gdb::byte_vector.
12762         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12763
12764 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12765
12766         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12767         parameter type to readable_regcache.
12768         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12769         the declaration.
12770
12771 2018-03-11  Tom Tromey  <tom@tromey.com>
12772
12773         * dwarf2read.c (struct nextfield): Add initializers.
12774         (struct nextfnfield): Remove.
12775         (struct fnfieldlist): Add initializers.  Remove "length" and
12776         "head", use std::vector.
12777         (struct decl_field_list): Remove.
12778         (struct field_info): Add initializers.
12779         <fields, baseclasses>: Now std::vector.
12780         <nbaseclasses, nfnfields, typedef_field_list_count,
12781         nested_types_list_count>: Remove.
12782         (dwarf2_add_field, dwarf2_add_type_defn)
12783         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12784         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12785         (process_structure_scope): Update.
12786
12787 2018-03-11  Tom Tromey  <tom@tromey.com>
12788
12789         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12790         for use by std::sort.
12791         (build_type_psymtabs_1): Use std::vector.
12792
12793 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12794
12795         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12796         and LIBMPFR in the printed configuration.
12797
12798 2018-03-08  Tom Tromey  <tom@tromey.com>
12799
12800         * source.c (get_filename_and_charpos): Use scoped_fd.
12801         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12802         (procfs_pidlist): Likewise.
12803         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12804         (iterate_over_mappings): Likewise.
12805
12806 2018-03-08  Tom Tromey  <tom@tromey.com>
12807
12808         * infcall.c (struct call_return_meta_info)
12809         <stack_temporaries_enabled>: Remove.
12810         (get_call_return_value, call_function_by_hand_dummy): Update.
12811         * thread.c (disable_thread_stack_temporaries): Remove.
12812         (enable_thread_stack_temporaries): Remove.
12813         (thread_stack_temporaries_enabled_p): Return bool.
12814         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12815         (get_last_thread_stack_temporary): Update.
12816         * eval.c (evaluate_subexp): Update.
12817         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12818         class, not a function.
12819         (value_ptr, value_vec): Remove typedefs.
12820         (class thread_info) <stack_temporaries_enabled>: Now bool.
12821         <stack_temporaries>: Now a std::vector.
12822         (thread_stack_temporaries_enabled_p)
12823         (value_in_thread_stack_temporaries): Return bool.
12824
12825 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12826
12827         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12828         (getpkt_or_notif_sane_1): Likewise.
12829
12830 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12831
12832         * build-id.c (build_id_to_debug_bfd): Use std::string.
12833
12834 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12835
12836         * build-id.c (find_separate_debug_file_by_buildid): Return
12837         std::string.
12838         * build-id.h (find_separate_debug_file_by_buildid): Return
12839         std::string.
12840         * coffread.c (coff_symfile_read): Adjust to std::string.
12841         * elfread.c (elf_symfile_read): Adjust to std::string.
12842         * symfile.c (separate_debug_file_exists): Change parameter to
12843         std::string.
12844         (find_separate_debug_file): Return std::string.
12845         (find_separate_debug_file_by_debuglink): Return std::string.
12846         * symfile.h (find_separate_debug_file_by_debuglink): Return
12847         std::string.
12848
12849 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12850
12851         * common/xml-utils.c (xml_escape_text): Move code to...
12852         (xml_escape_text_append): ... this new function.
12853         * common/xml-utils.h (xml_escape_text_append): New declaration.
12854         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12855         New function.
12856         (_initialize_xml_utils): register test_xml_escape_text_append as
12857         a selftest.
12858
12859 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12860
12861         * defs.h: Remove MAX_REGISTER_SIZE.
12862         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12863         asserts.
12864         * python/py-unwind.c (pyuw_sniffer): Likewise.
12865
12866 2018-03-07  Tom Tromey  <tom@tromey.com>
12867
12868         * linux-tdep.c (linux_info_proc): Update.
12869         * target.h (struct target_ops) <to_fileio_readlink>: Return
12870         optional<string>.
12871         (target_fileio_readlink): Return optional<string>.
12872         * remote.c (remote_hostio_readlink): Return optional<string>.
12873         * inf-child.c (inf_child_fileio_readlink): Return
12874         optional<string>.
12875         * target.c (target_fileio_readlink): Return optional<string>.
12876
12877 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12878
12879         * regcache.c (cooked_read_test): Add riscv to the list of
12880         architectures that have a save_reggroup.
12881
12882 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12883
12884         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12885         value is not a dynamic class object.
12886
12887 2018-03-06  Tom Tromey  <tom@tromey.com>
12888
12889         * rust-exp.y: Formatting fixes.
12890
12891 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12892
12893         * riscv-tdep.c (riscv_register_name): Remove target description
12894         support.
12895         (riscv_gdbarch_init): Remove target description check.
12896
12897 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12898
12899         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12900         comment.
12901         * riscv-tdep.h: Likewise.
12902
12903 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12904
12905         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12906         (riscv_pseudo_register_write): Delete.
12907         (riscv_gdbarch_init): Remove all use of pseudo registers.
12908
12909 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12910
12911         * record-btrace.c (btrace_print_lines): Replace cleanup
12912         parameter with RAII equivalents.
12913         (btrace_insn_history): Replace cleanup with RAII equivalents.
12914         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12915         make_cleanup_ui_out_tuple_begin_end): Remove.
12916         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12917         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12918         make_cleanup_ui_out_list_begin_end): Remove.
12919
12920 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12921
12922         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12923         parameter types to std::vector.  Use bool.
12924         (record_btrace_wait): Replace VEC(tp_t) with
12925         std::vector<thread_info *>.
12926         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12927
12928 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12929
12930         * record-btrace.c (record_btrace_disable_callback): Remove.
12931         (struct scoped_btrace_disable): New.
12932         (record_btrace_open): Use scoped_btrace_disable.
12933
12934 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12935
12936         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12937         reading values from registers.
12938
12939 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12940
12941         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12942         where appropriate.
12943
12944 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12945
12946         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12947         change parameter type.  Use GDB's print functions, and use
12948         core_addr_to_string where appropriate.
12949         (riscv_push_dummy_call): Use core_addr_to_string where
12950         appropriate, update call to riscv_print_arg_location, and reindent
12951         a few lines.
12952         (riscv_return_value): Update call to riscv_print_arg_location.
12953
12954 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12955             Tim Newsome <tim@sifive.com>
12956             Albert Ou <a0u@eecs.berkeley.edu>
12957             Darius Rad <darius@bluespec.com>
12958
12959         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12960         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12961         (ALLDEPFILES): Add riscv-tdep.c
12962         * configure.tgt: Add riscv support.
12963         * riscv-tdep.c: New file.
12964         * riscv-tdep.h: New file.
12965         * NEWS: Mention new target.
12966         * MAINTAINERS: Add entry for riscv.
12967
12968 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12969
12970         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12971         fields within aggregates.
12972
12973 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12974
12975         * record-btrace.c (btrace_print_lines): Change type of flags to
12976         gdb_disassembly_flags.
12977
12978 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12979
12980         * fbsd-nat.c: Include "inf-ptrace.h".
12981         (USE_SIGTRAP_SIGINFO): Conditionally define.
12982         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12983         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12984         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12985         function.
12986         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12987         Likewise.
12988         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12989         Likewise.
12990         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12991         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12992         "supports_stopped_by_hw_breakpoint" target methods.
12993
12994 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12995
12996         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12997         * fbsd-nat.c (debug_fbsd_nat): New variable.
12998         (show_fbsd_nat_debug): New function.
12999         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
13000         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
13001
13002 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
13003
13004         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
13005         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
13006         prototype.
13007         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
13008         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
13009         method.
13010
13011 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13012
13013         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13014         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13015
13016 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13017
13018         * charset.c (struct charset_vector): New.
13019         (charsets): Change type to charset_vector.
13020         (find_charset_names): Adjust.
13021         (add_one): Adjust.
13022         (_initialize_charset): Adjust.
13023
13024 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13025
13026         * progspace.h (struct program_space) <deleted_solibs>: Change
13027         type to std::vector<std::string>.
13028         * progspace.c (clear_program_space_solib_cache): Adjust.
13029         * breakpoint.c (print_solib_event): Adjust.
13030         (check_status_catch_solib): Adjust.
13031         * solib.c (update_solib_list): Adjust.
13032         * ui-out.h (class ui_out) <field_string>: New overload.
13033         * ui-out.c (ui_out::field_string): New overload.
13034
13035 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13036
13037         * progspace.h (struct program_space): Add constructor and
13038         destructor, initialize fields.
13039         (add_program_space): Remove.
13040         * progspace.c (add_program_space): Rename to...
13041         (program_space::program_space): ... this.
13042         (release_program_space): Rename to...
13043         (program_space::~program_space): ... this.
13044         (delete_program_space): Use delete to delete program_space.
13045         (initialize_progspace): Use new to allocate program_space.
13046         * inferior.c (add_inferior_with_spaces): Likewise.
13047         (clone_inferior_command): Likewise.
13048         * infrun.c (follow_fork_inferior): Likewise.
13049         (handle_vfork_child_exec_or_exit): Likewise.
13050
13051 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13052
13053         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13054         (delim_string_to_char_ptr_vec): Return std::vector of
13055         gdb::unique_xmalloc_ptr.
13056         (dirnames_to_char_ptr_vec_append): Take std::vector of
13057         gdb::unique_xmalloc_ptr.
13058         (dirnames_to_char_ptr_vec): Return std::vector of
13059         gdb::unique_xmalloc_ptr.
13060         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13061         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13062         (delim_string_to_char_ptr_vec): Return an std::vector of
13063         gdb::unique_xmalloc_ptr, adjust the code.
13064         (dirnames_to_char_ptr_vec_append): Take an std::vector of
13065         gdb::unique_xmalloc_ptr, adjust the code.
13066         (dirnames_to_char_ptr_vec): Return an std::vector of
13067         gdb::unique_xmalloc_ptr, adjust the code.
13068         * auto-load.c (auto_load_safe_path_vec): Change type to
13069         std::vector of gdb::unique_xmalloc_ptr.
13070         (auto_load_expand_dir_vars): Return an std::vector of
13071         gdb::unique_xmalloc_ptr, adjust the code.
13072         (auto_load_safe_path_vec_update): Adjust.
13073         (filename_is_in_auto_load_safe_path_vec): Adjust.
13074         (auto_load_objfile_script_1): Adjust.
13075         * build-id.c (build_id_to_debug_bfd): Adjust.
13076         * linux-thread-db.c (thread_db_load_search): Adjust.
13077         * source.c (add_path): Adjust.
13078         (openp): Adjust.
13079         * symfile.c (find_separate_debug_file): Adjust.
13080         * utils.c (do_free_char_ptr_vec): Remove.
13081         (make_cleanup_free_char_ptr_vec): Remove.
13082
13083 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
13084
13085         PR gdb/22907
13086         * common/pathstuff.c: Conditionally include "<windows.h>".
13087
13088 2018-03-01  Georg Sauthoff  <mail@georg.so>
13089
13090         PR gdb/22888
13091         * gcore.in: Quote variables and switch interpreter to bash.
13092
13093 2018-03-01  Tom Tromey  <tom@tromey.com>
13094
13095         * dwarf2read.c (alloc_discriminant_info): Fix default_index
13096         assertion.  Add assertion for discriminant_index.
13097         (quirk_rust_enum): Use correct base type name in univariant case.
13098
13099 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
13100
13101         * record.c (get_call_history_modifiers): Return a
13102         record_print_flags.
13103         (cmd_record_call_history): Adjust.
13104         * record-btrace.c (record_btrace_call_history): Adjust.
13105         (record_btrace_call_history_range): Adjust.
13106         (record_btrace_call_history_from): Adjust.
13107         * target-debug.h (target_debug_print_record_print_flags): New.
13108         * target-delegates.c: Re-generate.
13109         * target.c (target_call_history): Change flags type.
13110         (target_call_history_from): Likewise.
13111         (target_call_history_range): Likewise.
13112         * target.h (struct target_ops) <target_call_history>: Likewise.
13113         (target_call_history_from): Likewise.
13114         (target_call_history_range): Likewise.
13115
13116 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13117             Simon Marchi  <simon.marchi@polymtl.ca>
13118
13119         * common/common-utils.c: Include "sys/stat.h".
13120         (is_regular_file): Move here from "source.c"; change return
13121         type to "bool".
13122         * common/common-utils.h (is_regular_file): New prototype.
13123         * common/pathstuff.c (contains_dir_separator): New function.
13124         * common/pathstuff.h (contains_dir_separator): New prototype.
13125         * source.c: Don't include "sys/stat.h".
13126         (is_regular_file): Move to "common/common-utils.c".
13127
13128 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13129
13130         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13131         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13132         * auto-load.c: Include "common/pathstuff.h".
13133         * common/common-def.h (current_directory): Move here.
13134         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13135         function.
13136         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13137         prototype.
13138         * common/pathstuff.c: New file.
13139         * common/pathstuff.h: New file.
13140         * compile/compile.c: Include "common/pathstuff.h".
13141         * defs.h (current_directory): Move to "common/common-defs.h".
13142         * dwarf2read.c: Include "common/pathstuff.h".
13143         * exec.c: Likewise.
13144         * guile/scm-safe-call.c: Likewise.
13145         * linux-thread-db.c: Likewise.
13146         * main.c: Likewise.
13147         * nto-tdep.c: Likewise.
13148         * objfiles.c: Likewise.
13149         * source.c: Likewise.
13150         * symtab.c: Likewise.
13151         * utils.c: Include "common/pathstuff.h".
13152         (gdb_realpath): Move to "common/pathstuff.c".
13153         (gdb_realpath_keepfile): Likewise.
13154         (gdb_abspath): Likewise.
13155         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13156         (gdb_realpath_keepfile): Likewise.
13157         (gdb_abspath): Likewise.
13158
13159 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13160
13161         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13162         wildcard process pid for super_resume for kernels with a
13163         specific bug.
13164
13165 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13166
13167         * compile/compile.c (get_args): Add additional comments
13168         explaining function.
13169
13170 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13171             Tom Tromey  <tom@tromey.com>
13172
13173         * target.h (memory_write_request_s): Remove typedef.  Don't define
13174         VEC.
13175         (target_write_memory_blocks): Change argument to std::vector.
13176         (struct memory_write_request): Add constructor.
13177         * target-memory.c (compare_block_starting_address): Return bool.
13178         Change argument types.
13179         (claim_memory): Change arguments to use std::vector.
13180         (split_regular_and_flash_blocks, blocks_to_erase)
13181         (compute_garbled_blocks): Likewise.
13182         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13183         (target_write_memory_blocks): Change argument to std::vector.
13184         * symfile.c (struct load_section_data): Add constructor and
13185         destructor.  Use std::vector for "requests".
13186         (struct load_progress_data): Add initializers.
13187         (load_section_callback): Update.  Use "new".
13188         (clear_memory_write_data): Remove.
13189         (generic_load): Update.
13190
13191 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13192
13193         * arch/aarch64.h: Use common/tdesc.h.
13194
13195 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13196
13197         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13198         architecture with a 64-bit ABI.
13199
13200 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13201
13202         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13203         ahead of target description loading.
13204
13205 2018-02-26  Tom Tromey  <tom@tromey.com>
13206
13207         * stack.c (backtrace_command_1): Update.
13208         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13209         of "flags".
13210         * python/py-framefilter.c (py_print_frame)
13211         (gdbpy_apply_frame_filter): Change type of "flags".
13212         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13213         of "flags".
13214         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13215         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13216         * extension.h (enum frame_filter_flag): Rename from
13217         frame_filter_flags.
13218         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13219         (apply_ext_lang_frame_filter): Change type of "flags".
13220         * extension.c (apply_ext_lang_frame_filter): Change type of
13221         "flags".
13222         * extension-priv.h (struct extension_language_ops)
13223         <apply_frame_filter>: Change type of "flags".
13224
13225 2018-02-26  Tom Tromey  <tom@tromey.com>
13226
13227         PR python/16497:
13228         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13229         off-by-one in py_end computation.
13230         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13231         PRINT_MORE_FRAMES.
13232         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13233         constant.
13234
13235 2018-02-26  Tom Tromey  <tom@tromey.com>
13236
13237         * dwarf2read.c (struct variant_field): New.
13238         (struct nextfield) <variant>: New field.
13239         (dwarf2_add_field): Handle DW_TAG_variant_part.
13240         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13241         discriminated union.
13242         (read_structure_type): Handle DW_TAG_variant_part.
13243         (handle_struct_member_die): New function, extracted from
13244         process_structure_scope.  Handle DW_TAG_variant.
13245         (process_structure_scope): Handle discriminated unions.  Call
13246         handle_struct_member_die.
13247
13248 2018-02-26  Tom Tromey  <tom@tromey.com>
13249
13250         * rust-lang.h (rust_last_path_segment): Declare.
13251         * rust-lang.c (rust_last_path_segment): Now public.  Change
13252         contract.
13253         (struct disr_info): Remove.
13254         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13255         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13256         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13257         (rust_enum_p, rust_enum_variant): New function.
13258         (rust_underscore_fields): Remove "offset" parameter.
13259         (rust_print_enum): New function.
13260         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13261         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13262         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13263         enums.
13264         (rust_internal_print_type): New function, from rust_print_type.
13265         Remove enum code.
13266         (rust_print_type): Call rust_internal_print_type.
13267         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13268         Update enum handling.
13269         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13270         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13271         (rust_union_quirks): New functions.
13272         (process_full_comp_unit, process_full_type_unit): Call
13273         rust_union_quirks.
13274         (process_structure_scope): Update rust_unions if necessary.
13275
13276 2018-02-26  Tom Tromey  <tom@tromey.com>
13277
13278         * value.h (value_union_variant): Declare.
13279         * valops.c (value_union_variant): New function.
13280         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13281         (struct discriminant_info): New.
13282         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13283         enumerator.
13284         (struct main_type) <flag_discriminated_union>: New field.
13285
13286 2018-02-26  Tom Tromey  <tom@tromey.com>
13287
13288         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13289         unittests/unpack-selftests.c.
13290         * unittests/unpack-selftests.c: New file.
13291         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13292
13293 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13294
13295         * dwarf2read.c (struct partial_die_info) <read>: New method.
13296         (read_partial_die): Remove the declaration.
13297         (load_partial_dies): Update.
13298         (partial_die_info::partial_die_info):
13299         (read_partial_die): Change it to partial_die_info::read.
13300
13301 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13302
13303         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13304         (fixup_partial_die): Remove declaration.
13305         (scan_partial_symbols): Update.
13306         (partial_die_parent_scope): Likewise.
13307         (partial_die_full_name): Likewise.
13308         (fixup_partial_die): Change it to partial_die_info::fixup.
13309
13310 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13311
13312         * dwarf2read.c (read_partial_die): Update the declaration.
13313         (load_partial_dies): Caller update.
13314         (read_partial_die): Remove one argument abbrev_len.
13315
13316 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13317
13318         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13319         assignment operator.
13320         (load_partial_dies): Use ctor and copy ctor.
13321         (read_partial_die): Update.
13322         (dwarf2_cu::find_partial_die): Use ctor.
13323
13324 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13325
13326         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13327         (find_partial_die_in_comp_unit): Change it to
13328         dwarf2_cu::find_partial_die.
13329         (find_partial_die): Update.
13330
13331 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13332
13333         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13334         is NULL.
13335
13336 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13337
13338         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13339
13340 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13341
13342         * arch/amd64.h: Use common/tdesc.h.
13343         * arch/i386.c: Likewise.
13344         * arch/i386.h: Likewise.
13345         * arch/tic6x.c: Likewise.
13346         * arch/tdesc.h: Move file from here...
13347         * common/tdesc.h: ...to here.
13348         * features/aarch64-core.c: Regenerate.
13349         * features/aarch64-fpu.c: Regenerate.
13350         * features/i386/32bit-avx.c: Regenerate.
13351         * features/i386/32bit-avx512.c: Regenerate.
13352         * features/i386/32bit-core.c: Regenerate.
13353         * features/i386/32bit-linux.c: Regenerate.
13354         * features/i386/32bit-mpx.c: Regenerate.
13355         * features/i386/32bit-pkeys.c: Regenerate.
13356         * features/i386/32bit-sse.c: Regenerate.
13357         * features/i386/64bit-avx.c: Regenerate.
13358         * features/i386/64bit-avx512.c: Regenerate.
13359         * features/i386/64bit-core.c: Regenerate.
13360         * features/i386/64bit-linux.c: Regenerate.
13361         * features/i386/64bit-mpx.c: Regenerate.
13362         * features/i386/64bit-pkeys.c: Regenerate.
13363         * features/i386/64bit-segments.c: Regenerate.
13364         * features/i386/64bit-sse.c: Regenerate.
13365         * features/i386/x32-core.c: Regenerate.
13366         * features/tic6x-c6xp.c: Regenerate.
13367         * features/tic6x-core.c: Regenerate.
13368         * features/tic6x-gp.c: Regenerate.
13369         * target-descriptions.c: Use common/tdesc.h.
13370         * target-descriptions.h: Likewise.
13371
13372 2018-02-24  Tom Tromey  <tom@tromey.com>
13373
13374         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13375         (try_thread_db_load_from_dir, thread_db_load_search): Use
13376         std::string.
13377         (info_auto_load_libthread_db_compare): Return bool.  Change
13378         argument types.
13379         (info_auto_load_libthread_db): Use std::vector, std::string.
13380         Remove cleanups.
13381
13382 2018-02-24  Tom Tromey  <tom@tromey.com>
13383
13384         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13385         std::string.
13386         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13387         std::string*.
13388         * gdbarch.c: Rebuild.
13389         * gdbarch.h: Rebuild.
13390         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13391         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13392         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13393         std::string*.
13394
13395 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13396
13397         * gdbtypes.h (sect_offset): Change type to uint64_t.
13398         (sect_offset_str): New function.
13399         * dwarf2read.c (create_addrmap_from_aranges): Use
13400         sect_offset_str.
13401         (error_check_comp_unit_head): Likewise.
13402         (create_debug_type_hash_table): Likewise.
13403         (read_cutu_die_from_dwo): Likewise.
13404         (init_cutu_and_read_dies): Likewise.
13405         (init_cutu_and_read_dies_no_follow): Likewise.
13406         (process_psymtab_comp_unit_reader): Likewise.
13407         (partial_die_parent_scope): Likewise.
13408         (peek_die_abbrev): Likewise.
13409         (process_queue): Likewise.
13410         (dwarf2_physname): Likewise.
13411         (read_namespace_alias): Likewise.
13412         (read_import_statement): Likewise.
13413         (create_dwo_cu_reader): Likewise.
13414         (create_cus_hash_table): Likewise.
13415         (lookup_dwo_cutu): Likewise.
13416         (inherit_abstract_dies): Likewise.
13417         (read_func_scope): Likewise.
13418         (read_call_site_scope): Likewise.
13419         (dwarf2_add_member_fn): Likewise.
13420         (read_common_block): Likewise.
13421         (read_module_type): Likewise.
13422         (read_typedef): Likewise.
13423         (read_subrange_type): Likewise.
13424         (load_partial_dies): Likewise.
13425         (read_partial_die): Likewise.
13426         (find_partial_die): Likewise.
13427         (read_str_index): Likewise.
13428         (dwarf2_string_attr): Likewise.
13429         (build_error_marker_type): Likewise.
13430         (lookup_die_type): Likewise.
13431         (dump_die_shallow): Likewise.
13432         (follow_die_ref): Likewise.
13433         (dwarf2_fetch_die_loc_sect_off): Likewise.
13434         (dwarf2_fetch_constant_bytes): Likewise.
13435         (follow_die_sig): Likewise.
13436         (get_signatured_type): Likewise.
13437         (get_DW_AT_signature_type): Likewise.
13438         (dwarf2_find_containing_comp_unit): Likewise.
13439         (set_die_type): Likewise.
13440
13441 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13442
13443         * arch/aarch64.c: Include "common-defs.h".
13444         * arch/amd64.c: Likewise.
13445         * arch/i386.c: Likewise.
13446
13447 2018-02-21  Tom Tromey  <tom@tromey.com>
13448
13449         * value.h: (extract_field_op): Update.
13450         * eval.c (extract_field_op): Return a const char *.
13451         * expression.h (parse_expression_for_completion): Update.
13452         * completer.c (complete_expression): Update.
13453         (add_struct_fields): Make fieldname const.
13454         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13455         (mark_completion_tag, parse_exp_in_context_1): Update.
13456         (parse_expression_for_completion): Change "name" to
13457         unique_xmalloc_ptr*.
13458
13459 2018-02-21  Tom Tromey  <tom@tromey.com>
13460
13461         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13462
13463 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13464
13465         * avr-tdep.c (avr_read_pc): Change parameter type to
13466         readable_regcache.
13467         * gdbarch.sh (read_pc): Likewise.
13468         * gdbarch.c: Re-generated.
13469         * gdbarch.h: Re-generated.
13470         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13471         readable_regcache.
13472         * ia64-tdep.c (ia64_read_pc): Likewise.
13473         * mips-tdep.c (mips_read_pc): Likewise.
13474         * spu-tdep.c (spu_read_pc): Likewise.
13475
13476 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13477
13478         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13479         * regcache-dump.c: New file.
13480         * regcache.c: Move register_dump to regcache-dump.c.
13481         (maintenance_print_registers): Likewise.
13482         (maintenance_print_raw_registers): Likewise.
13483         (maintenance_print_cooked_registers): Likewise.
13484         (maintenance_print_register_groups): Likewise.
13485         (maintenance_print_remote_registers): Likewise.
13486         (_initialize_regcache): Likewise.
13487         * regcache.h (register_dump): Moved from regcache.c.
13488
13489 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13490
13491         * regcache.c (regcache::regcache): Update.
13492         (regcache::invalidate): Move it to detached_regcache::invalidate.
13493         (get_thread_arch_aspace_regcache): Update.
13494         (regcache::raw_update): Update.
13495         (regcache::cooked_read): Remove some code.
13496         (regcache::cooked_read_value): Likewise.
13497         (regcache::raw_write): Remove assert on m_readonly_p.
13498         (regcache::raw_supply_integer): Move it to
13499         detached_regcache::raw_supply_integer.
13500         (regcache::raw_supply_zeroed): Likewise.
13501         * regcache.h (detached_regcache) <raw_supply_integer>: New
13502         declaration.
13503         <raw_supply_zeroed, invalidate>: Likewise.
13504         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13505         <invalidate>: Likewise.
13506         <m_readonly_p>: Removed.
13507
13508 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13509
13510         * infcmd.c (get_return_value): Let stop_regs point to
13511         get_current_regcache.
13512         * regcache.c (regcache::regcache): Remove.
13513         (register_dump_reg_buffer): New class.
13514         (regcache_print): Adjust.
13515         * regcache.h (regcache): Remove constructors.
13516
13517 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13518
13519         * regcache.c (class register_dump): New class.
13520         (register_dump_regcache, register_dump_none): New class.
13521         (register_dump_remote, register_dump_groups): New class.
13522         (regcache_print): Update.
13523         * regcache.h (regcache_dump_what): Move it to regcache.c.
13524         (regcache) <dump>: Remove.
13525
13526 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13527
13528         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13529          reg_buffer_rw *.
13530         (jit_unwind_reg_set_impl): Call raw_supply.
13531         (jit_frame_sniffer): Use reg_buffer_rw.
13532         * record-full.c (record_full_core_regbuf): Change its type.
13533         (record_full_core_open_1): Use reg_buffer_rw.
13534         (record_full_close): Likewise.
13535         (record_full_core_fetch_registers): Use regcache->raw_supply.
13536         (record_full_core_store_registers): Likewise.
13537         * regcache.c (regcache::get_register_status): Move it to
13538         reg_buffer.
13539         (regcache_raw_set_cached_value): Remove.
13540         (regcache::raw_set_cached_value): Remove.
13541         (regcache::raw_write): Call raw_supply.
13542         (regcache::raw_supply): Move it to reg_buffer_rw.
13543         * regcache.h (regcache_raw_set_cached_value): Remove.
13544         (reg_buffer_rw): New class.
13545
13546 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13547
13548         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13549         readonly_detached_regcache.
13550         (dummy_frame_prev_register): Use regcache->cooked_read.
13551         * frame.c (frame_save_as_regcache): Change return type.
13552         (frame_pop): Update.
13553         * frame.h (frame_save_as_regcache): Update declaration.
13554         * inferior.h (get_infcall_suspend_state_regcache): Update
13555         declaration.
13556         * infrun.c (infcall_suspend_state) <registers>: use
13557         readonly_detached_regcache.
13558         (save_infcall_suspend_state): Don't use regcache_dup.
13559         (get_infcall_suspend_state_regcache): Change return type.
13560         * linux-fork.c (struct fork_info) <savedregs>: Change to
13561         readonly_detached_regcache.
13562         <pc>: New field.
13563         (fork_save_infrun_state): Don't use regcache_dup.
13564         (info_checkpoints_command): Adjust.
13565         * mi/mi-main.c (register_changed_p): Update declaration.
13566         (mi_cmd_data_list_changed_registers): Use
13567         readonly_detached_regcache.
13568         (register_changed_p): Change parameter type to
13569         readonly_detached_regcache.
13570         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13571         readonly_detached_regcache.
13572         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13573         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13574         New.
13575         (regcache::save): Move it to reg_buffer.
13576         (regcache::restore): Change parameter type.
13577         (regcache_dup): Remove.
13578         * regcache.h (reg_buffer) <save>: New method.
13579         (readonly_detached_regcache): New class.
13580         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13581         readonly_detached_regcache.
13582         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13583
13584 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13585
13586         * frame.c (frame_save_as_regcache): Use regcache method save.
13587         (frame_pop): Use regcache method restore.
13588         * infrun.c (restore_infcall_suspend_state): Likewise.
13589         * linux-fork.c (fork_load_infrun_state): Likewise.
13590         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13591         save.
13592         * regcache.c (regcache_save): Remove.
13593         (regcache::restore): More asserts.
13594         (regcache_cpy): Remove.
13595         * regcache.h (regcache_save): Remove the declaration.
13596         (regcache::restore): Move from private to public.
13597         Remove the friend declaration of regcache_cpy.
13598         (regcache_cpy): Remove declaration.
13599
13600 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13601
13602         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13603         parameter type to 'readable_regcache *'.
13604         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13605         * arm-tdep.c (arm_neon_quad_read): Likewise.
13606         (arm_pseudo_read): Likewise.
13607         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13608         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13609         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13610         * gdbarch.c: Re-generated.
13611         * gdbarch.h: Re-generated.
13612         * gdbarch.sh (pseudo_register_read): Change parameter type to
13613         'readable_regcache *'.
13614         (pseudo_register_read_value): Likewise.
13615         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13616         (h8300_pseudo_register_read): Likewise.
13617         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13618         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13619         (i386_pseudo_register_read_into_value): Likewise.
13620         (i386_pseudo_register_read_value): Likewise.
13621         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13622         declaration.
13623         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13624         * m32c-tdep.c (m32c_raw_read): Likewise.
13625         (m32c_read_flg): Likewise.
13626         (m32c_banked_register): Likewise.
13627         (m32c_banked_read): Likewise.
13628         (m32c_sb_read): Likewise.
13629         (m32c_part_read): Likewise.
13630         (m32c_cat_read): Likewise.
13631         (m32c_r3r2r1r0_read): Likewise.
13632         (m32c_pseudo_register_read): Likewise.
13633         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13634         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13635         (mep_pseudo_cr64_read): Likewise.
13636         (mep_pseudo_register_read): Likewise.
13637         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13638         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13639         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13640         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13641         (regcache::cooked_read): Likewise.
13642         (regcache::cooked_read_value): Likewise.
13643         (regcache_cooked_read_signed):
13644         (regcache::cooked_read): Likewise.
13645         * regcache.h (readable_regcache): New class.
13646         (regcache): Inherit readable_regcache.  Move some methods to
13647         readable_regcache.
13648         * rl78-tdep.c (rl78_pseudo_register_read): Change
13649         parameter type to 'readable_regcache *'.
13650         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13651         (e500_pseudo_register_read): Change parameter type to
13652         'readable_regcache *'.
13653         (dfp_pseudo_register_read): Likewise.
13654         (vsx_pseudo_register_read): Likewise.
13655         (efpr_pseudo_register_read): Likewise.
13656         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13657         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13658         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13659         (sh64_pseudo_register_read): Likewise.
13660         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13661         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13662         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13663         (spu_pseudo_register_read): Likewise.
13664         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13665         (xtensa_pseudo_register_read): Likewise.
13666
13667 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13668
13669         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13670         (regcache::arch): Move it to reg_buffer::arch.
13671         (regcache::register_buffer): Likewise.
13672         (regcache::assert_regnum): Likewise.
13673         (regcache::num_raw_registers): Likewise.
13674         * regcache.h (reg_buffer): New class.
13675         (regcache): Inherit reg_buffer.
13676
13677 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13678
13679         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13680         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13681
13682 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13683
13684         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13685
13686 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13687
13688         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13689         (SFILES): Remove common/*.c files.
13690         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13691         * common/common.host: Add common reference.
13692         * configure.ac: Likewise.
13693         * configure: Regenerate.
13694
13695 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13696
13697         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13698         (block_initialize_namespace): Use new.
13699         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13700         (dwarf2_free_objfile): Use delete.
13701         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13702         (copy_type_recursive): Use new.
13703         * gdb_obstack.h (allocate_on_obstack): New.
13704
13705 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13706
13707         PR gdb/22849
13708         * inferior.c (exit_inferior_1): Reset inf->control.
13709
13710 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13711
13712         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13713         declaration.
13714
13715 2018-02-14  Pedro Alves  <palves@redhat.com>
13716
13717         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13718         frame_cleanup_after_sniffer on exception.
13719
13720 2018-02-14  Tom Tromey  <tom@tromey.com>
13721
13722         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13723         const.
13724         (solib_bfd_open): Make pathname const.
13725         * solib.c (solib_bfd_open): Make pathname const.
13726         * solib-spu.c (spu_bfd_fopen): Make name const.
13727         (spu_bfd_open): Make pathname const.
13728         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13729         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13730
13731 2018-02-14  Tom Tromey  <tom@tromey.com>
13732
13733         * symfile.c (symfile_bfd_open): Update.
13734         * source.h (openp, source_full_path_of, find_and_open_source):
13735         Change argument type to unique_xmalloc_ptr.
13736         * source.c (openp): Take a unique_xmalloc_ptr.
13737         (source_full_path_of, find_and_open_source): Likewise.
13738         (open_source_file, symtab_to_fullname): Update.
13739         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13740         unique_xmalloc_ptr.
13741         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13742         (exec_file_find): Update.
13743         * psymtab.c (psymtab_to_fullname): Update.
13744         * nto-tdep.h (nto_find_and_open_solib): Update.
13745         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13746         unique_xmalloc_ptr.
13747         * exec.c (exec_file_attach): Update.
13748         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13749         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13750
13751 2018-02-14  Tom Tromey  <tom@tromey.com>
13752
13753         * solib.c: Include source.h.
13754         * nto-tdep.c: Include source.h.
13755         * mi/mi-cmd-env.c: Include source.h.
13756         * infcmd.c: Include source.h.
13757         * exec.c: Include source.h.
13758         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13759         (add_path, directory_switch, source_path, init_source_path): Move
13760         declarations...
13761         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13762         (add_path, directory_switch, source_path, init_source_path):
13763         ...here.
13764
13765 2018-02-14  Tom Tromey  <tom@tromey.com>
13766
13767         * solist.h (exec_file_find, solib_find): Return
13768         unique_xmalloc_ptr.
13769         (solib_bfd_fopen): Take a const char *.
13770         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13771         (exec_file_find, solib_find): Likewise.
13772         (solib_bfd_fopen): Do not take ownership of "pathname".
13773         (solib_bfd_open): Use unique_xmalloc_ptr.
13774         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13775         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13776         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13777         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13778
13779 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13780
13781         * ada-lang.c (name_match_type_from_name): Remove reference to
13782         ada_name_for_lookup in function's documentation.
13783         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13784
13785 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13786
13787         * defs.h (enum openp_flags): New enum.
13788         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13789         Move to enum openp_flags.
13790         (openp_flags): New enum flags.
13791         (openp): Change parameter type to openp_flags.
13792         * source.c (openp): Change parameter type to openp_flags.
13793         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13794         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13795
13796 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13797
13798         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13799         per-command.
13800
13801 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13802
13803         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13804         into...
13805         (class dwarf2_queue_guard): ...the destructor of this new class.
13806         (dw2_do_instantiate_symtab): Create instance of the new class
13807         dwarf2_queue_guard, remove cleanup.
13808
13809 2018-02-09  Tom Tromey  <tom@tromey.com>
13810
13811         * source.c (find_source_lines): Don't reference past the end of
13812         the vector.
13813
13814 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13815
13816         * remote.c (remote_btrace_maybe_reopen): Change error message.
13817         * btrace.c (btrace_enable): Likewise.
13818         (parse_xml_btrace): Likewise.
13819         (parse_xml_btrace_conf): Likewise.
13820
13821 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13822
13823         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13824         (linux_enable_pt, linux_enable_bts): Call
13825         diagnose_perf_event_open_fail.
13826
13827 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13828
13829         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13830         Remove parameter and change return type.  Update callers.  Move it.
13831         (linux_enable_bts, linux_enable_pt): Improve error message.
13832         (linux_enable_pt): Remove zero buffer size check.
13833         (linux_enable_btrace): Improve error messages.  Remove NULL return
13834         check.
13835
13836 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13837
13838         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13839         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13840         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13841         (linux_supports_pt, linux_supports_btrace): Remove.
13842         (linux_enable_bts): Call cpu_supports_bts.
13843         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13844         * remote.c (remote_supports_btrace): Remove.
13845         (init_remote_ops): Remove remote_supports_btrace.
13846         * target-delegates.c: Regenerated.
13847         * target.c (target_supports_btrace): Remove.
13848         * target.h (target_ops) <to_supports_btrace>: Remove
13849         (target_supports_btrace): Remove.
13850         * x86-linux-nat.c (x86_linux_create_target): Remove
13851         linux_supports_btrace.
13852
13853 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13854
13855         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13856         btrace failed.
13857         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13858         exception and use message in own exception.
13859
13860 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13861
13862         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13863         (perf_event_pt_event_type): Use gdb_file_up.
13864         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13865         scoped_fd, and scoped_mmap.
13866
13867 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13868
13869         * common/scoped_mmap.h: New.
13870         * unittests/scoped_mmap-selftest.c: New.
13871         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13872         unittests/scoped_mmap-selftest.c.
13873
13874 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13875
13876         * common/scoped_fd.h: New.
13877         * unittests/scoped_fd-selftest.c: New.
13878         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13879         unittests/scoped_fd-selftest.c.
13880
13881 2018-02-09  Tom Tromey  <tom@tromey.com>
13882
13883         * auto-load.c (auto_load_section_scripts): Use
13884         gdb::unique_xmalloc_ptr.
13885
13886 2018-02-09  Tom Tromey  <tom@tromey.com>
13887
13888         * auto-load.c (execute_script_contents): Use std::string.
13889
13890 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13891
13892         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13893         Python function, rather than a new command.
13894
13895 2018-02-08  Tom Tromey  <tom@tromey.com>
13896
13897         * solib.c (solib_find_1): Use std::string.
13898         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13899
13900 2018-02-08  Tom Tromey  <tom@tromey.com>
13901
13902         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13903
13904 2018-02-08  Tom Tromey  <tom@tromey.com>
13905
13906         * source.c (find_source_lines): Use gdb::def_vector.
13907
13908 2018-02-08  Tom Tromey  <tom@tromey.com>
13909
13910         * macrocmd.c (struct temporary_macro_definition): New.
13911         (macro_define_command): Use temporary_macro_definition.  Remove
13912         cleanups.
13913         (free_macro_definition_ptr): Remove.
13914
13915 2018-02-08  Tom Tromey  <tom@tromey.com>
13916
13917         * macroexp.c (maybe_expand): Use std::string.
13918
13919 2018-02-08  Tom Tromey  <tom@tromey.com>
13920
13921         * macroexp.c (struct macro_buffer): Add initializers for some
13922         members.
13923         (init_buffer, init_shared_buffer, free_buffer)
13924         (free_buffer_return_text): Remove.
13925         (macro_buffer): New constructors.
13926         (~macro_buffer): New destructor.
13927         (macro_buffer::set_shared): New method.
13928         (macro_buffer::resize_buffer, macro_buffer::appendc)
13929         (macro_buffer::appendmem): Now methods, not free functions.
13930         (set_token, append_tokens_without_splicing, stringify)
13931         (macro_stringify): Update.
13932         (gather_arguments): Change return type.  Remove argc_p argument,
13933         add args_ptr argument.  Use std::vector.
13934         (substitute_args): Remove argc argument.  Accept std::vector.
13935         (expand): Update.  Use std::vector.
13936         (scan, macro_expand, macro_expand_next): Update.
13937
13938 2018-02-08  Tom Tromey  <tom@tromey.com>
13939
13940         * symtab.c (default_collect_symbol_completion_matches_break_on):
13941         Use unique_xmalloc_ptr.
13942         * macroscope.h: (sal_macro_scope, user_macro_scope)
13943         (default_macro_scope): Return unique_xmalloc_ptr.
13944         * macroscope.c (sal_macro_scope, user_macro_scope)
13945         (default_macro_scope): Return unique_xmalloc_ptr.
13946         * macroexp.h (macro_expand, macro_expand_once): Return
13947         unique_xmalloc_ptr.
13948         * macroexp.c (macro_expand, macro_expand_once): Return
13949         unique_xmalloc_ptr.
13950         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13951         (info_macro_command, info_macros_command): Use
13952         unique_xmalloc_ptr.
13953         * compile/compile-c-support.c (write_macro_definitions): Use
13954         unique_xmalloc_ptr.
13955         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13956
13957 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13958
13959         * value.c (value_static_field): Assign field type instead of
13960         containing type when returning an optimized out value.
13961
13962 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13963
13964         * ft32-tdep.c (ft32_read_pc): Remove.
13965         (ft32_write_pc): Remove.
13966         (ft32_gdbarch_init): Update.
13967         * m32r-tdep.c (m32r_read_pc): Remove.
13968         (m32r_gdbarch_init): Update.
13969         * mep-tdep.c (mep_read_pc): Remove.
13970         (mep_gdbarch_init): Update.
13971         * microblaze-tdep.c (microblaze_write_pc): Remove.
13972         (microblaze_gdbarch_init): Update.
13973         * mn10300-tdep.c (mn10300_read_pc): Remove.
13974         (mn10300_write_pc): Remove.
13975         (mn10300_gdbarch_init): Update.
13976         * moxie-tdep.c (moxie_read_pc): Remove.
13977         (moxie_write_pc): Remove.
13978         (moxie_gdbarch_init): Update.
13979
13980 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13981
13982         * expprint.c (print_subexp_standard): Handle
13983         OP_F77_UNDETERMINED_ARGLIST.
13984         (dump_subexp_body_standard): Likewise.
13985
13986 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13987
13988         * target-descriptions.c (tdesc_element_visitor) Add empty
13989         implementations.
13990         (tdesc_type): Move make_gdb_type from here.
13991         (tdesc_type_builtin): Likewise.
13992         (tdesc_type_vector): Likewise.
13993         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13994         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13995         (make_gdb_type_union): Likewise.
13996         (make_gdb_type_flags): Likewise.
13997         (make_gdb_type_enum): Likewise.
13998         (make_gdb_type): New function.
13999         (tdesc_register_type): Use static make_gdb_type.
14000
14001 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
14002
14003         * infcmd.c (default_print_one_register_info): Align natural-format
14004         column values consistently one under another.
14005         (pad_to_column): New function.
14006
14007 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
14008
14009         * dwarf2read.c (dwarf2_physname): Move commment.
14010
14011 2018-02-01  Leszek Swirski  <leszeks@google.com>
14012
14013         * varobj.c (varobj_formatted_print_options): Allow recursive
14014         pretty printing if pretty printing is enabled.
14015
14016 2018-02-01  Leszek Swirski  <leszeks@google.com>
14017
14018         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14019         names after a structop as a filename.
14020
14021 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14022
14023         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14024         (arm_record_coproc_data_proc): Likewise.
14025
14026 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14027
14028         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14029
14030 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
14031
14032         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14033         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14034
14035 2018-01-31  Pedro Alves  <palves@redhat.com>
14036
14037         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14038         * inflow.c (child_terminal_save_inferior): Wrap reference to
14039         tcgetpgrp in HAVE_TERMIOS_H.
14040         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14041         _WIN32.
14042         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14043         always iterate over all inferiors.
14044         (gdbsim_cntrl_c): Adjust.
14045         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14046
14047 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14048
14049         * gdbtypes.c (lookup_array_range_type): Make sure the array's
14050         index type is objfile-owned if the element type is as well.
14051
14052 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14053
14054         GDB 8.1 released.
14055
14056 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14057
14058         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14059         "features/s390x-linux64.c".
14060         (_initialize_s390_linux_tdep): Remove initialization of tdescs
14061         s390_linux32 and s390x_linux64.
14062         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14063         default tdesc.
14064         * s390-tdep.c: Include "features/s390-linux32.c" and
14065         "features/s390x-linux64.c".
14066         (s390_tdesc_valid): Add check for tdesc_has_registers.
14067         (s390_gdbarch_init): Make sure there is always a valid tdesc.
14068         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14069         tdesc_s390x_linux64.
14070         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14071         tdesc_s390x_linux64 to...
14072         * s390-tdep.h: ...here.
14073
14074 2018-01-30  Pedro Alves  <palves@redhat.com>
14075
14076         PR gdb/13211
14077         * config.in, configure: Regenerate.
14078         * configure.ac: Check for getpgid.
14079         * go32-nat.c (go32_pass_ctrlc): New.
14080         (go32_target): Install it.
14081         * inf-child.c (inf_child_target): Install
14082         child_terminal_save_inferior, child_pass_ctrlc and
14083         child_interrupt.
14084         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14085         (inf_ptrace_target): No longer install it.
14086         * infcmd.c (interrupt_target_1): Adjust.
14087         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14088         (child_interrupt): Declare.
14089         (inferior::terminal_state): New.
14090         * inflow.c (struct terminal_info): Update comments.
14091         (inferior_process_group): Delete.
14092         (terminal_is_ours): Delete.
14093         (gdb_tty_state): New.
14094         (child_terminal_init): Adjust.
14095         (is_gdb_terminal, sharing_input_terminal_1)
14096         (sharing_input_terminal): New functions.
14097         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
14098         Set the process's actual process group in the foreground if
14099         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
14100         mark terminal as the inferior's if not sharing GDB's terminal.
14101         Don't check attach_flag.
14102         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14103         pass down a target_terminal_state.
14104         (child_terminal_save_inferior): New, factored out from ...
14105         (child_terminal_ours_1): ... this.  Handle
14106         target_terminal_state::is_ours_for_output.
14107         (child_interrupt, child_pass_ctrlc): New.
14108         (inflow_inferior_exit): Clear the inferior's terminal_state.
14109         (copy_terminal_info): Copy the inferior's terminal state.
14110         (_initialize_inflow): Remove reference to terminal_is_ours.
14111         * inflow.h (inferior_process_group): Delete.
14112         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14113         * procfs.c (procfs_target): Don't install procfs_interrupt.
14114         (procfs_interrupt): Delete.
14115         * remote.c (remote_serial_quit_handler): Adjust.
14116         (remote_interrupt): Remove ptid parameter.  Adjust.
14117         * target-delegates.c: Regenerate.
14118         * target.c: Include "terminal.h".
14119         (target_terminal::terminal_state): Rename to ...
14120         (target_terminal::m_terminal_state): ... this.
14121         (target_terminal::init): Adjust.
14122         (target_terminal::inferior): Adjust to per-inferior
14123         terminal_state.
14124         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14125         (target_terminal::ours, target_terminal::ours_for_output): Use
14126         target_terminal_is_ours_kind.
14127         (target_interrupt): Remove ptid parameter.  Adjust.
14128         (default_target_pass_ctrlc): Adjust.
14129         * target.h (target_ops::to_terminal_save_inferior): New field.
14130         (target_ops::to_interrupt): Remove ptid_t parameter.
14131         (target_interrupt): Remove ptid_t parameter.  Update comment.
14132         (target_pass_ctrlc): Update comment.
14133         * target/target.h (target_terminal_state): New scoped enum,
14134         factored out of ...
14135         (target_terminal::terminal_state): ... here.
14136         (target_terminal::inferior): Update comments.
14137         (target_terminal::restore_inferior): New.
14138         (target_terminal::is_inferior, target_terminal::is_ours)
14139         (target_terminal::is_ours_for_output): Adjust.
14140         (target_terminal::scoped_restore_terminal_state): Adjust to
14141         rename, and call restore_inferior() instead of inferior().
14142         (target_terminal::scoped_restore_terminal_state::m_state): Change
14143         type.
14144         (target_terminal::terminal_state): Rename to ...
14145         (target_terminal::m_terminal_state): ... this and change type.
14146
14147 2018-01-30  Pedro Alves  <palves@redhat.com>
14148
14149         * linux-nat.c (wait_for_signal): New function.
14150         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14151         directly.
14152         (async_terminal_is_ours)
14153         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14154         (linux_nat_add_target): Don't override
14155         to_terminal_inferior/to_terminal_ours.
14156
14157 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14158
14159         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14160
14161 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14162
14163         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14164         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14165         dwarf2_per_objfile_free here.
14166         (dwarf2_per_objfile_free): Remove.
14167         (_initialize_dwarf2_read): Don't register
14168         dwarf2_per_objfile_free as a registry cleanup.
14169
14170 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14171
14172         Avoid compilation errors in MinGW native builds
14173
14174         The error is triggered by including python-internal.h, and the
14175         error message is:
14176
14177              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14178                       from build-gnulib/import/math.h:27,
14179                       from d:/usr/Python26/include/pyport.h:235,
14180                       from d:/usr/Python26/include/Python.h:58,
14181                       from python/python-internal.h:94,
14182                       from python/py-arch.c:24:
14183              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14184         using ::hypot;
14185                 ^~~~~
14186
14187         This happens because Python headers define 'hypot' to expand t
14188         '_hypot' in the Windows builds.
14189         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14190         'hypoth'.  This avoids a compilation error.
14191
14192 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14193
14194         * MAINTAINERS (Write After Approval): Fix ordering.
14195
14196 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14197
14198         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14199
14200 2018-01-26  Alan Modra  <amodra@gmail.com>
14201
14202         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14203         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14204         Remove nop.  Make const.  Comment.
14205         (powerpc32_plt_stub_so_2): New.
14206         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14207         Correct count.  Update uses.
14208         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14209         Move common code reading PLT entry word.  Correct
14210         powerpc32_plt_stub PLT address calculation.
14211         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14212         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14213         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14214         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14215         (ppc64_standard_linkage8): Likewise.
14216         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14217         Correct insns description.
14218         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14219
14220 2018-01-24  Pedro Alves  <palves@redhat.com>
14221
14222         GCC PR libstdc++/83906
14223         * gdbtypes.c (operator==(const dynamic_prop &,
14224         const dynamic_prop &)): New.
14225         (operator==(const range_bounds &, const range_bounds &)): New.
14226         (check_types_equal): Use them instead of memcmp.
14227         * gdbtypes.h (operator==(const dynamic_prop &,
14228         const dynamic_prop &)): Declare.
14229         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14230         (operator==(const range_bounds &, const range_bounds &)): Declare.
14231         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14232
14233 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14234
14235         * s390-linux-tdep.c (s390_record_address_mask)
14236         (s390_record_calc_disp_common, s390_record_calc_disp)
14237         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14238         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14239         (s390_process_record): Move to s390-tdep.c.
14240         (s390_linux_init_abi_any): Adjust.
14241         * s390-tdep.c (s390_record_address_mask)
14242         (s390_record_calc_disp_common, s390_record_calc_disp)
14243         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14244         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14245         (s390_process_record): Moved from s390-linux-tdep.c
14246         (s390_gdbarch_init): Adjust.
14247
14248 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14249
14250         * s390-linux-nat.c (s390-tdep.h): New include.
14251         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14252         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14253         (ALLDEPFILES): Add s390-tdep.c.
14254         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14255         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14256         * s390-tdep.h: ...this.  New file.
14257         * s390-linux-tdep.c (s390-tdep.h): New include.
14258         (_initialize_s390_tdep): Rename to...
14259         (_initialize_s390_linux_tdep): ...this and adjust.
14260         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14261         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14262         s390-tdep.h.
14263         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14264         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14265         (s390_is_partial_instruction, s390_software_single_step)
14266         (is_non_branch_ril, s390_displaced_step_copy_insn)
14267         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14268         (s390_prologue_data, s390_addr, s390_store, s390_load)
14269         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14270         (s390_register_call_saved, s390_guess_tracepoint_registers)
14271         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14272         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14273         (s390_pseudo_register_name, s390_pseudo_register_type)
14274         (s390_pseudo_register_read, s390_pseudo_register_write)
14275         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14276         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14277         (s390_addr_bits_remove, s390_address_class_type_flags)
14278         (s390_address_class_type_flags_to_name)
14279         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14280         (s390_function_arg_float, s390_function_arg_vector)
14281         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14282         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14283         (s390_frame_align, s390_register_return_value, s390_return_value)
14284         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14285         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14286         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14287         (s390_trad_frame_prev_register, s390_unwind_cache)
14288         (s390_prologue_frame_unwind_cache)
14289         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14290         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14291         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14292         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14293         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14294         (s390_frame_base_address, s390_local_base_address)
14295         (s390_frame_base, s390_gcc_target_options)
14296         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14297         (s390_validate_reg_range, s390_tdesc_valid)
14298         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14299         * s390-tdep.c: ...this.  New file.
14300
14301 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14302
14303         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14304         (s390_process_record, s390_gdbarch_tdep_alloc)
14305         (s390_linux_init_abi_any): Use/set new hook.
14306
14307 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14308
14309         * s390-linux-tdep.c (osabi.h): New include.
14310         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14311         (s390_linux_init_abi_any): New functions.
14312         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14313
14314 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14315
14316         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14317         tdesc_has_registers check
14318
14319 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14320
14321         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14322         (s390_validate_reg_range): New macro.
14323         (s390_gdbarch_init): Adjust.
14324
14325 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14326
14327         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14328         (s390_gdbarch_tdep_alloc): Adjust.
14329         (s390_gdbarch_init): Adjust.
14330
14331 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14332
14333         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14334         <have_tdb>: Change type to bool.
14335         (s390_gdbarch_tdep_alloc): Adjust.
14336         (s390_gdbarch_init): Adjust.
14337
14338 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14339
14340         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14341         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14342         (s390_gdbarch_tdep_alloc): New function.
14343         (s390_gdbarch_init): Allocate tdep at start and use its fields
14344         instead of separate variables.
14345
14346 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14347
14348         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14349         when looking for cached gdbarch and add comment for remaining.
14350
14351 2018-01-22  Pedro Alves  <palves@redhat.com>
14352             Sergio Durigan Junior  <sergiodj@redhat.com>
14353
14354         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14355         case.
14356
14357 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14358
14359         * MAINTAINERS: Update my company e-mail address.
14360
14361 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14362
14363         * regcache.c (cooked_write_test): New function.
14364         (_initialize_regcache): Register the test.
14365
14366 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14367
14368         * ia64-tdep.c (ia64_pseudo_register_read): Call
14369         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14370         * m32c-tdep.c (m32c_cat_read): Likewise.
14371         (m32c_r3r2r1r0_read): Likewise.
14372         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14373         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14374
14375 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14376
14377         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14378         method raw_read instead of regcache_raw_read.
14379         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14380         * arm-tdep.c (arm_neon_quad_read): Likewise.
14381         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14382         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14383         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14384         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14385         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14386         (i386_pseudo_register_read_into_value): Likewise.
14387         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14388         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14389         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14390         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14391         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14392         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14393         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14394         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14395         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14396
14397 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14398
14399         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14400         * configure.tgt: Remove target mt.
14401         * mt-tdep.c: Remove.
14402         * regcache.c (cooked_read_test): Remove the check for mt.
14403
14404 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14405
14406         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14407         instead of gdbarch_pseudo_register_read_value.
14408
14409 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14410
14411         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14412         language is Ada.
14413
14414 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14415
14416         * linespec.c (create_sals_line_offset): Remove code that preserved
14417         the symtab_and_line's line number.
14418
14419 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14420
14421         * varobj.c (varobj_create): Don't set valid_block when creating a
14422         floating varobj.
14423
14424 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14425
14426         * varobj.c (varobj_create): Remove out of date comment.
14427
14428 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14429
14430         PR mi/20395
14431         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14432         updating innermost block.
14433         * parse.c (innermost_block_tracker::update): Take extra type
14434         parameter, and check types match before updating innermost block.
14435         (write_dollar_variable): Update innermost block for registers.
14436         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14437         (innermost_block_tracker::innermost_block_tracker): Initialise
14438         m_types member.
14439         (innermost_block_tracker::reset): Take type parameter.
14440         (innermost_block_tracker::update): Take type parameter, and pass
14441         type through as needed.
14442         (innermost_block_tracker::m_types): New member.
14443         * varobj.c (varobj_create): Pass type when reseting innermost
14444         block.
14445
14446 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14447
14448         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14449         * ada-lang.c (resolve_subexp): Likewise.
14450         * breakpoint.c (set_breakpoint_condition) Likewise.
14451         (watch_command_1) Likewise.
14452         * c-exp.y (variable): Likewise.
14453         * d-exp.y (PrimaryExpression): Likewise.
14454         * f-exp.y (variable): Likewise.
14455         * go-exp.y (variable): Likewise.
14456         * m2-exp.y (variable): Likewise.
14457         * objfiles.c (objfile::~objfile): Likewise.
14458         * p-exp.y (variable): Likewise.
14459         * parse.c (innermost_block): Change type.
14460         * parser-defs.h (class innermost_block_tracker): New.
14461         (innermost_block): Change to innermost_block_tracker.
14462         * printcmd.c (display_command): Switch to innermost_block API.
14463         (do_one_display): Likewise.
14464         * rust-exp.y (do_one_display): Likewise.
14465         * symfile.c (clear_symtab_users): Likewise.
14466         * varobj.c (varobj_create): Switch to innermost_block API, replace
14467         use of innermost_block with block stored on varobj object.
14468
14469 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14470
14471         * expression.h (innermost_block): Remove declaration.
14472         * varobj.c: Add 'parser-defs.h' include.
14473
14474 2018-01-19  Tom Tromey  <tom@tromey.com>
14475
14476         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14477         symbols in the static and global blocks.
14478
14479 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14480
14481         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14482         gdb_ptrace.h, and move including gdb_wait.h ...
14483         * nat/linux-ptrace.h: ... to here.
14484
14485 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14486
14487         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14488         inf_ptrace_detach_success.
14489         (inf_ptrace_detach_success): Add inferior parameter, use it
14490         instead of inferior_ptid, pass it to detach_inferior.
14491         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14492         parameter.
14493         * inferior.c (detach_inferior): Add overload that takes an
14494         inferior object.
14495         * inferior.h (detach_inferior): Likewise.
14496         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14497         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14498         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14499
14500 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14501
14502         * target.h (struct target_ops) <to_detach>: Add inferior
14503         parameter.
14504         (target_detach): Likewise.
14505         * target.c (dispose_inferior): Pass inferior down.
14506         (target_detach): Pass inferior down.  Assert that it is equal to
14507         the current inferior.
14508         * aix-thread.c (aix_thread_detach): Pass inferior down.
14509         * corefile.c (core_file_command): Pass current_inferior() down.
14510         * corelow.c (core_detach): Add inferior parameter.
14511         * darwin-nat.c (darwin_detach): Likewise.
14512         * gnu-nat.c (gnu_detach): Likewise.
14513         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14514         * infcmd.c (detach_command): Pass current_inferior() down to
14515         target_detach.
14516         * infrun.c (follow_fork_inferior): Pass parent_inf to
14517         target_detach.
14518         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14519         target_detach.
14520         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14521         * linux-thread-db.c (thread_db_detach): Likewise.
14522         * nto-procfs.c (procfs_detach): Likewise.
14523         * procfs.c (procfs_detach): Likewise.
14524         * record.c (record_detach): Likewise.
14525         * record.h (struct inferior): Forward-declare.
14526         (record_detach): Add inferior parameter.
14527         * remote-sim.c (gdbsim_detach): Likewise.
14528         * remote.c (remote_detach_1): Likewise.
14529         (remote_detach): Likewise.
14530         (extended_remote_detach): Likewise.
14531         * sol-thread.c (sol_thread_detach): Likewise.
14532         * target-debug.h (target_debug_print_inferior_p): New macro.
14533         * target-delegates.c: Re-generate.
14534         * top.c (kill_or_detach): Pass inferior down to target_detach.
14535         * windows-nat.c (windows_detach): Add inferior parameter.
14536
14537 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14538
14539         * target.h (struct target_ops) <to_detach>: Remove args
14540         parameter.
14541         (target_detach): Likewise.
14542         * target.c (dispose_inferior): Adjust.
14543         (target_detach): Remove args parameter, adjust.
14544         * aix-thread.c (aix_thread_detach): Adjust.
14545         * corefile.c (core_file_command): Adjust.
14546         * corelow.c (core_detach): Adjust.
14547         * darwin-nat.c (darwin_detach): Adjust.
14548         * gnu-nat.c (gnu_detach): Adjust.
14549         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14550         * infcmd.c (detach_command): Adjust
14551         * infrun.c (follow_fork_inferior): Adjust.
14552         (handle_vfork_child_exec_or_exit): Adjust.
14553         * linux-fork.c (linux_fork_detach): Remove args parameter.
14554         * linux-fork.h (linux_fork_detach): Likewise.
14555         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14556         * linux-thread-db.c (thread_db_detach): Likewise.
14557         * nto-procfs.c (procfs_detach): Likewise.
14558         * procfs.c (procfs_detach): Likewise.
14559         (do_detach): Remove signo parameter.
14560         * record.c (record_detach): Remove args parameter.
14561         * record.h (record_detach): Likewise.
14562         * remote-sim.c (gdbsim_detach): Likewise.
14563         * remote.c (remote_detach_1): Likewise.
14564         (remote_detach): Likewise.
14565         (extended_remote_detach): Likewise.
14566         * sol-thread.c (sol_thread_detach): Likewise.
14567         * target-delegates.c: Re-generate.
14568         * top.c (struct qt_args) <args>: Remove field.
14569         (kill_or_detach): Don't pass args.
14570         (quit_force): Don't set args.
14571         * windows-nat.c (windows_detach): Remove args parameter.
14572
14573 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14574
14575         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14576         (arm_linux_init_abi): Install it.
14577
14578 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14579
14580         * osabi.c (gdb_osabi_names): Extend the regexp for
14581         arm-linux-gnueabihf.
14582
14583 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14584
14585         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14586         m_abbrevs.
14587         (abbrev_table::add_abbrev): Update.
14588         (abbrev_table::lookup_abbrev): Update.
14589
14590 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14591
14592         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14593
14594 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14595
14596         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14597         to "std::string".
14598
14599 2018-01-17  Tom Tromey  <tom@tromey.com>
14600
14601         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14602
14603 2018-01-17  Tom Tromey  <tom@tromey.com>
14604
14605         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14606         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14607         (create_array_type_with_stride): Update.
14608         * dwarf2read.c (set_die_type): Update.
14609
14610 2018-01-17  Tom Tromey  <tom@tromey.com>
14611
14612         * dwarf2read.c (delayed_method_info): Remove typedef.
14613         (dwarf2_cu::method_info): Now a std::vector.
14614         (add_to_method_list): Update.
14615         (free_delayed_list): Remove.
14616         (compute_delayed_physnames): Update.
14617         (process_full_comp_unit, process_full_type_unit): Clear the method
14618         list.  Remove cleanups.
14619         (psymtab_include_file_name): Add name_holder parameter.  Use
14620         unique_xmalloc_ptr.
14621         (dwarf_decode_lines): Update.
14622
14623 2018-01-17  Tom Tromey  <tom@tromey.com>
14624             Simon Marchi  <simon.marchi@ericsson.com>
14625
14626         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14627         (dwarf2_per_objfile::free_cached_comp_units)
14628         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14629         (init_cutu_and_read_dies_no_follow): Update.
14630         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14631         (dwarf2_cu::~dwarf2_cu): New.
14632         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14633         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14634
14635 2018-01-17  Tom Tromey  <tom@tromey.com>
14636             Simon Marchi  <simon.marchi@ericsson.com>
14637
14638         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14639         (struct die_reader_specs) <abbrev_table>: New member.
14640         (struct abbrev_table): Add constructor.
14641         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14642         <abbrev_obstack>: Now an auto_obstack.
14643         (abbrev_table_up): New typedef.
14644         (init_cu_die_reader): Add abbrev_table parameter.
14645         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14646         Add result_dwo_abbrev_table.
14647         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14648         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14649         Update.
14650         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14651         parameter.
14652         (skip_children): Update.
14653         (abbrev_table::alloc_abbrev): Rename from
14654         abbrev_table_alloc_abbrev.
14655         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14656         (abbrev_table::lookup_abbrev): Rename from
14657         abbrev_table_lookup_abbrev.
14658         (abbrev_table_read_table): Return abbrev_table_up.
14659         (abbrev_table_free, abbrev_table_free_cleanup)
14660         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14661         (load_partial_dies): Update.
14662
14663 2018-01-17  Tom Tromey  <tom@tromey.com>
14664
14665         * dwarf2read.c (dwarf2_compute_name): Update comment.
14666         (read_func_scope, read_variable): Update.
14667         (new_symbol): Remove.
14668         (new_symbol_full): Rename to new_symbol.
14669
14670 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14671
14672         PR gdb/16577
14673         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14674         a warning instead of throwing an error, set section size to 0 and return
14675         NULL.
14676         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14677
14678 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14679
14680         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14681         std::string.
14682         (linux_ptrace_attach_fail_reason_string): Likewise.
14683         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14684         Likewise.
14685         (linux_ptrace_attach_fail_reason_string): Likewise.
14686         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14687
14688 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14689
14690         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14691
14692 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14693
14694         PR gdb/21559
14695         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14696         checking for fs_base/gs_base fields in struct user_regs_struct.
14697         * configure: Regenerate.
14698
14699 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14700
14701         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14702         function.
14703         (aarch64_linux_init_abi): Install it to gdbarch hook
14704         gcc_target_options.
14705
14706 2018-01-15  Pedro Alves  <palves@redhat.com>
14707
14708         * common/signals-state-save-restore.c
14709         (save_original_signals_state): Fix typos.
14710
14711 2017-01-12  Tom Tromey  <tom@tromey.com>
14712             Sergio Durigan Junior  <sergiodj@redhat.com>
14713
14714         * Makefile.in (install-only): Install gdb-add-index.
14715
14716 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14717
14718         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14719
14720 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14721
14722         * infrun.c (keep_going_pass_signal): Clear step-over info when
14723         insert_breakpoints fails.
14724
14725 2018-01-11  Pedro Alves  <palves@redhat.com>
14726
14727         PR gdb/22583
14728         * infrun.c (resume): Rename to ...
14729         (resume_1): ... this.
14730         (resume): Reimplement as wrapper around resume_1.
14731
14732 2018-01-11  Pedro Alves  <palves@redhat.com>
14733
14734         PR remote/22597
14735         * remote.c (remote_parse_stop_reply): Default to the last-set
14736         general thread instead of to 'magic_null_ptid'.
14737
14738 2018-01-10  Pedro Alves  <palves@redhat.com>
14739
14740         * language.h (language_get_symbol_name_matcher): Rename ...
14741         (get_symbol_name_matcher): ... this.
14742         * language.c (language_get_symbol_name_matcher): Ditto.
14743         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14744         callers adjusted.
14745
14746 2018-01-10  Pedro Alves  <palves@redhat.com>
14747
14748         PR gdb/22670
14749         * dwarf2read.c
14750         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14751         Adjust to use language_get_symbol_name_matcher instead of
14752         language_defn::la_get_symbol_name_matcher.
14753         * language.c (language_get_symbol_name_matcher): If in Ada mode
14754         and the lookup name is a verbatim match, return Ada's matcher.
14755         * language.h (language_get_symbol_name_matcher): Adjust comment.
14756         (ada_lookup_name_info::verbatim_p):: New method.
14757
14758 2018-01-10  Pedro Alves  <palves@redhat.com>
14759
14760         PR gdb/22670
14761         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14762         minsym's language is language_auto or language_cplus, pass down
14763         language_ada instead.
14764         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14765
14766 2018-01-10  Pedro Alves  <palves@redhat.com>
14767
14768         PR gdb/22670
14769         * minsyms.c (linkage_name_str): New function.
14770         (iterate_over_minimal_symbols): Use it.
14771
14772 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14773
14774         * NEWS: Document that 'info proc' now works on FreeBSD.
14775
14776 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14777
14778         * configure.ac: Check for kinfo_getfile in libutil.
14779         * configure: Regenerate.
14780         * config.in: Regenerate.
14781         * fbsd-nat.c: Include "fbsd-tdep.h".
14782         (fbsd_fetch_cmdline): New.
14783         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14784         rather than calling error.
14785         (fbsd_info_proc): New.
14786         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14787         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14788         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14789
14790 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14791
14792         * fbsd-nat.c (struct free_deleter): Remove.
14793         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14794
14795 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14796
14797         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14798         NULL for an empty pathname.
14799
14800 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14801
14802         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14803         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14804         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14805         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14806         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14807         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14808         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14809         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14810         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14811         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14812         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14813         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14814         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14815         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14816         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14817
14818 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14819
14820         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14821         (gnu_xfer_auxv): New function.
14822         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14823         TARGET_OBJECT_AUXV.
14824
14825 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14826             Simon Marchi  <simon.marchi@ericsson.com>
14827
14828         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14829         common/selftest.c.
14830         (COMMON_OBS): Remove selftest.o.
14831         * configure.ac: Append selftest-arch.c and common/selftest.c to
14832         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14833         * configure: Re-generated.
14834         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14835         GDB_SELF_TEST.
14836         (maintenance_info_selftests): Likewise.
14837
14838 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14839
14840         * ada-valprint.c (val_print_packed_array_elements): Use
14841         proper number of elements when printing an array indexed
14842         by an enumeration type.
14843
14844 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14845
14846         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14847         (dw2_get_file_names_reader): Adjust.
14848         (lookup_dwo_signatured_type): Adjust.
14849         (lookup_dwp_signatured_type): Adjust.
14850         (lookup_signatured_type): Adjust.
14851         (create_type_unit_group): Adjust.
14852         (get_type_unit_group): Adjust.
14853         (process_psymtab_comp_unit_reader): Adjust.
14854         (build_type_psymtabs_reader): Adjust.
14855         (scan_partial_symbols): Adjust.
14856         (add_partial_symbol): Adjust.
14857         (add_partial_subprogram): Adjust.
14858         (peek_die_abbrev): Adjust.
14859         (fixup_go_packaging): Adjust.
14860         (process_imported_unit_die): Adjust.
14861         (dwarf2_compute_name): Adjust.
14862         (dwarf2_physname): Adjust.
14863         (read_import_statement): Adjust.
14864         (handle_DW_AT_stmt_list): Adjust.
14865         (read_file_scope): Adjust.
14866         (read_func_scope): Adjust.
14867         (read_lexical_block_scope): Adjust.
14868         (read_call_site_scope): Adjust.
14869         (read_variable): Adjust.
14870         (dwarf2_rnglists_process): Adjust.
14871         (dwarf2_ranges_process): Adjust.
14872         (dwarf2_ranges_read): Adjust.
14873         (dwarf2_get_pc_bounds): Adjust.
14874         (dwarf2_record_block_ranges): Adjust.
14875         (dwarf2_add_field): Adjust.
14876         (dwarf2_add_member_fn): Adjust.
14877         (read_structure_type): Adjust.
14878         (process_structure_scope): Adjust.
14879         (read_enumeration_type): Adjust.
14880         (read_array_type): Adjust.
14881         (mark_common_block_symbol_computed): Adjust.
14882         (read_common_block): Adjust.
14883         (read_namespace_type): Adjust.
14884         (read_namespace): Adjust.
14885         (read_module_type): Adjust.
14886         (read_tag_pointer_type): Adjust.
14887         (read_tag_ptr_to_member_type): Adjust.
14888         (read_tag_string_type): Adjust.
14889         (read_subroutine_type): Adjust.
14890         (read_typedef): Adjust.
14891         (read_base_type): Adjust.
14892         (attr_to_dynamic_prop): Adjust.
14893         (read_subrange_type): Adjust.
14894         (read_unspecified_type): Adjust.
14895         (dwarf2_read_abbrevs): Adjust.
14896         (load_partial_dies): Adjust.
14897         (read_partial_die): Adjust.
14898         (find_partial_die): Adjust.
14899         (guess_partial_die_structure_name): Adjust.
14900         (fixup_partial_die): Adjust.
14901         (read_attribute_value): Adjust.
14902         (read_addr_index): Adjust.
14903         (read_addr_index_from_leb128): Adjust.
14904         (read_str_index): Adjust.
14905         (dwarf2_string_attr): Adjust.
14906         (get_debug_line_section): Adjust.
14907         (dwarf_decode_line_header): Adjust.
14908         (lnp_state_machine::check_line_address): Adjust.
14909         (dwarf_decode_lines_1): Adjust.
14910         (dwarf_decode_lines): Adjust.
14911         (dwarf2_start_symtab): Adjust.
14912         (var_decode_location): Adjust.
14913         (new_symbol_full): Adjust.
14914         (dwarf2_const_value_data): Adjust.
14915         (dwarf2_const_value_attr): Adjust.
14916         (dwarf2_const_value): Adjust.
14917         (die_type): Adjust.
14918         (die_containing_type): Adjust.
14919         (build_error_marker_type): Adjust.
14920         (lookup_die_type): Adjust.
14921         (guess_full_die_structure_name): Adjust.
14922         (anonymous_struct_prefix): Adjust.
14923         (determine_prefix): Adjust.
14924         (dwarf2_name): Adjust.
14925         (follow_die_ref_or_sig): Adjust.
14926         (follow_die_offset): Adjust.
14927         (follow_die_ref): Adjust.
14928         (follow_die_sig_1): Adjust.
14929         (follow_die_sig): Adjust.
14930         (get_signatured_type): Adjust.
14931         (get_DW_AT_signature_type): Adjust.
14932         (decode_locdesc): Adjust.
14933         (dwarf_decode_macros): Adjust.
14934         (cu_debug_loc_section): Adjust.
14935         (fill_in_loclist_baton): Adjust.
14936         (dwarf2_symbol_mark_computed): Adjust.
14937         (init_one_comp_unit): Don't assign
14938         dwarf2_cu::dwarf2_per_objfile.
14939         (set_die_type): Adjust.
14940
14941 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14942
14943         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14944         <dwarf2_per_objfile>: New field.
14945         (dwarf2_per_objfile): Remove global.
14946         (get_dwarf2_per_objfile): New function.
14947         (set_dwarf2_per_objfile): New function.
14948         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14949         dwarf2_per_objfile.
14950         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14951         (read_abbrev_offset): Likewise.
14952         (read_indirect_string): Likewise.
14953         (read_indirect_line_string): Likewise.
14954         (read_indirect_string_at_offset): Likewise.
14955         (read_indirect_string_from_dwz): Likewise.
14956         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14957         dwarf2_per_objfile.
14958         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14959         (create_all_comp_units): Change objfile parameter to
14960         dwarf2_per_objfile.
14961         (create_all_type_units): Likewise.
14962         (process_queue): Add dwarf2_per_objfile parameter.
14963         (read_and_check_comp_unit_head): Likewise.
14964         (lookup_dwo_unit_in_dwp): Likewise.
14965         (get_dwp_file): Likewise.
14966         (process_cu_includes): Likewise.
14967         (struct free_dwo_file_cleanup_data): New struct.
14968         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14969         set_dwarf2_per_objfile.
14970         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14971         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14972         context, adjust calls.
14973         (dw2_instantiate_symtab): Likewise.
14974         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14975         (dw2_get_cu): Likewise.
14976         (create_cu_from_index_list): Change objfile parameter to
14977         dwarf2_per_objfile.
14978         (create_cus_from_index_list): Get dwarf2_per_objfile from
14979         context, adjust calls.
14980         (create_cus_from_index): Likewise.
14981         (create_signatured_type_table_from_index): Change objfile
14982         parameter to dwarf2_per_objfile.
14983         (create_signatured_type_table_from_debug_names): Change objfile
14984         parameter to dwarf2_per_objfile.
14985         (create_addrmap_from_index): Likewise.
14986         (create_addrmap_from_aranges): Likewise.
14987         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14988         (dw2_setup): Remove.
14989         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14990         context.
14991         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14992         get_dwarf2_per_objfile.
14993         (dw2_forget_cached_source_info): Likewise.
14994         (dw2_map_symtabs_matching_filename): Likewise.
14995         (struct dw2_symtab_iterator) <index>: Remove.
14996         <dwarf2_per_objfile>: New field.
14997         (dw2_symtab_iter_init): Replace index parameter with
14998         dwarf2_per_objfile.
14999         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
15000         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
15001         (dw2_print_stats): Likewise.
15002         (dw2_dump): Likewise.
15003         (dw2_expand_symtabs_for_function): Likewise.
15004         (dw2_expand_all_symtabs): Likewise.
15005         (dw2_expand_symtabs_with_fullname): Likewise.
15006         (dw2_expand_marked_cus): Replace index and objfile parameters
15007         with dwarf2_per_objfile.
15008         (dw_expand_symtabs_matching_file_matcher): Add
15009         dwarf2_per_objfile parameter and adjust calls.
15010         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15011         adjust calls.
15012         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15013         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15014         adjust calls.
15015         (create_cus_from_debug_names_list): Replace objfile parameter
15016         with dwarf2_per_objfile and adjust calls.
15017         (create_cus_from_debug_names): Likewise.
15018         (dwarf2_read_debug_names): Likewise.
15019         (mapped_debug_names::namei_to_name): Adjust call.
15020         (dw2_debug_names_iterator::next): Likewise.
15021         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15022         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15023         (dw2_debug_names_dump): Likewise.
15024         (dw2_debug_names_expand_symtabs_for_function): Likewise.
15025         (dw2_debug_names_expand_symtabs_matching): Likewise.
15026         (dwarf2_initialize_objfile): Likewise.
15027         (dwarf2_build_psymtabs): Likewise.
15028         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15029         this_cu.
15030         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15031         (read_and_check_comp_unit_head): Likewise.
15032         (read_abbrev_offset): Likewise.
15033         (create_debug_type_hash_table): Likewise.
15034         (create_debug_types_hash_table): Likewise.
15035         (create_all_type_units): Replace objfile parameter with
15036         dwarf2_per_objfile.
15037         (add_type_unit): Add dwarf2_per_objfile parameter.
15038         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15039         with dwarf2_per_objfile.
15040         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15041         (lookup_dwp_signatured_type): Likewise.
15042         (lookup_signatured_type): Likewise.
15043         (read_cutu_die_from_dwo): Likewise.
15044         (init_tu_and_read_dwo_dies): Likewise.
15045         (init_cutu_and_read_dies): Likewise.
15046         (init_cutu_and_read_dies_no_follow): Likewise.
15047         (allocate_type_unit_groups_table): Add objfile parameter.
15048         (create_type_unit_group): Use dwarf2_per_objfile from cu.
15049         (get_type_unit_group): Likewise.
15050         (process_psymtab_comp_unit): Update call.
15051         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15052         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15053         (print_tu_stats): Likewise.
15054         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15055         in void* parameter.
15056         (build_type_psymtabs): Change objfile parameter to
15057         dwarf2_per_objfile.
15058         (process_skeletonless_type_unit): Use dwarf2_per_objfile
15059         passed in void* parameter.
15060         (process_skeletonless_type_units): Change objfile parameter to
15061         dwarf2_per_objfile.
15062         (set_partial_user): Likewise.
15063         (dwarf2_build_psymtabs_hard): Likewise.
15064         (read_comp_units_from_section): Likewise.
15065         (create_all_comp_units): Likewise.
15066         (scan_partial_symbols): Update calls.
15067         (add_partial_symbol): Likewise.
15068         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15069         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15070         (process_queue): Add dwarf2_per_objfile parameter.
15071         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15072         (compute_compunit_symtab_includes): Likewise.
15073         (process_cu_includes): Add dwarf2_per_objfile parameter.
15074         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15075         (process_full_type_unit): Likewise.
15076         (process_imported_unit_die): Update call.
15077         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15078         (read_file_scope): Likewise.
15079         (allocate_dwo_file_hash_table): Add objfile parameter.
15080         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15081         (create_cus_hash_table): Likewise.
15082         (create_dwp_hash_table): Likewise.
15083         (create_dwo_unit_in_dwp_v1): Likewise.
15084         (create_dwp_v2_section): Likewise.
15085         (create_dwo_unit_in_dwp_v2): Likewise.
15086         (lookup_dwo_unit_in_dwp): Likewise.
15087         (try_open_dwop_file): Likewise.
15088         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15089         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15090         cleanup to include a reference to dwarf2_per_objfile.
15091         (open_dwp_file): Add dwarf2_per_objfile parameter.
15092         (open_and_init_dwp_file): Likewise.
15093         (get_dwp_file): Likewise.
15094         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15095         (queue_and_load_all_dwo_tus): Update call.
15096         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15097         data.
15098         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15099         (dwarf2_ranges_process): Likewise.
15100         (dwarf2_get_pc_bounds): Likewise.
15101         (mark_common_block_symbol_computed): Likewise.
15102         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15103         (dwarf2_read_abbrevs): Update call.
15104         (read_partial_die): Use dwarf2_per_objfile from cu.
15105         (find_partial_die): Likewise.
15106         (fixup_partial_die): Likewise.
15107         (read_attribute_value): Likewise.
15108         (read_indirect_string_at_offset_from): Add objfile parameter.
15109         (read_indirect_string_at_offset): Add dwarf2_per_objfile
15110         parameter.
15111         (read_indirect_string_from_dwz): Add objfile parameter.
15112         (read_indirect_string): Add objfile parameter.
15113         (read_addr_index_1): Add dwarf2_per_objfile parameter.
15114         (read_addr_index): Use dwarf2_per_objfile from cu.
15115         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15116         call dw2_setup.
15117         (read_str_index): Use dwarf2_per_objfile from cu.
15118         (get_debug_line_section): Likewise.
15119         (read_formatted_entries): Add dwarf2_per_objfile parameter.
15120         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15121         (new_symbol_full): Use dwarf2_per_objfile from cu.
15122         (build_error_marker_type): Likewise.
15123         (lookup_die_type): Likewise.
15124         (determine_prefix): Likewise.
15125         (follow_die_offset): Likewise.
15126         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15127         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15128         (dwarf2_fetch_die_type_sect_off): Likewise.
15129         (dwarf2_get_die_type): Likewise.
15130         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15131         (get_signatured_type): Likewise.
15132         (get_DW_AT_signature_type): Likewise.
15133         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15134         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15135         (cu_debug_loc_section): Likewise.
15136         (fill_in_loclist_baton): Likewise.
15137         (dwarf2_symbol_mark_computed): Likewise.
15138         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15139         dwarf2_per_objfile.
15140         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15141         parameter.
15142         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15143         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15144         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15145         (set_die_type): Use dwarf2_free_objfile from cu.
15146         (get_die_type_at_offset): Likewise.
15147         (dwarf2_per_objfile_free): Don't assign global variable.
15148         (debug_names) <constructor>: Add dwarf2_per_objfile
15149         parameter, update m_debugstrlookup construction.
15150         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15151         parameter.
15152         <m_dwarf2_per_objfile>: New field.
15153         <lookup>: Use m_dwarf2_per_objfile.
15154         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15155         (psyms_seen_size): Likewise.
15156         (write_gdbindex): Replace objfile parameter with
15157         dwarf2_per_objfile.
15158         (write_debug_names): Likewise.
15159         (write_psymtabs_to_index): Likewise.
15160         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15161         calls.
15162
15163 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15164
15165         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15166         <dwarf2_per_objfile>: New field.
15167         (struct dwarf2_per_cu_data) <objfile>: Remove.
15168         <dwarf2_per_objfile>: New field.
15169         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15170         of objfile.
15171         (create_signatured_type_table_from_index): Likewise.
15172         (create_debug_type_hash_table): Likewise.
15173         (fill_in_sig_entry_from_dwo_entry): Likewise.
15174         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15175         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15176         objfile.
15177         (create_partial_symtab): Access objfile through
15178         dwarf2_per_objfile.
15179         (process_psymtab_comp_unit_reader): Likewise.
15180         (read_comp_units_from_section): Likewise.
15181         (scan_partial_symbols): Likewise.
15182         (add_partial_symbol): Likewise.
15183         (add_partial_subprogram): Likewise.
15184         (peek_die_abbrev): Likewise.
15185         (fixup_go_packaging): Likewise.
15186         (process_full_comp_unit): Likewise.
15187         (process_full_type_unit): Likewise.
15188         (process_imported_unit_die): Likewise.
15189         (dwarf2_compute_name): Likewise.
15190         (dwarf2_physname): Likewise.
15191         (read_import_statement): Likewise.
15192         (create_cus_hash_table): Assign dwarf2_physname instead of
15193         objfile.
15194         (read_func_scope): Access objfile through dwarf2_per_objfile.
15195         (read_lexical_block_scope): Likewise.
15196         (read_call_site_scope): Likewise.
15197         (read_variable): Likewise.
15198         (dwarf2_rnglists_process): Likewise.
15199         (dwarf2_ranges_process): Likewise.
15200         (dwarf2_ranges_read): Likewise.
15201         (dwarf2_record_block_ranges): Likewise.
15202         (dwarf2_add_field): Likewise.
15203         (dwarf2_add_member_fn): Likewise.
15204         (read_structure_type): Likewise.
15205         (process_structure_scope): Likewise.
15206         (read_enumeration_type): Likewise.
15207         (read_array_type): Likewise.
15208         (read_common_block): Likewise.
15209         (read_namespace_type): Likewise.
15210         (read_namespace): Likewise.
15211         (read_module_type): Likewise.
15212         (read_tag_pointer_type): Likewise.
15213         (read_tag_ptr_to_member_type): Likewise.
15214         (read_tag_string_type): Likewise.
15215         (read_subroutine_type): Likewise.
15216         (read_typedef): Likewise.
15217         (read_base_type): Likewise.
15218         (attr_to_dynamic_prop): Likewise.
15219         (read_subrange_type): Likewise.
15220         (read_unspecified_type): Likewise.
15221         (load_partial_dies): Likewise.
15222         (read_partial_die): Likewise.
15223         (find_partial_die): Likewise.
15224         (guess_partial_die_structure_name): Likewise.
15225         (fixup_partial_die): Likewise.
15226         (read_attribute_value): Likewise.
15227         (read_addr_index_from_leb128): Likewise.
15228         (dwarf2_read_addr_index): Likewise.
15229         (dwarf2_string_attr): Likewise.
15230         (lnp_state_machine::check_line_address): Likewise.
15231         (dwarf_decode_lines_1): Likewise.
15232         (dwarf_decode_lines): Likewise.
15233         (dwarf2_start_symtab): Likewise.
15234         (var_decode_location): Likewise.
15235         (new_symbol_full): Likewise.
15236         (dwarf2_const_value_data): Likewise.
15237         (dwarf2_const_value_attr): Likewise.
15238         (dwarf2_const_value): Likewise.
15239         (die_type): Likewise.
15240         (die_containing_type): Likewise.
15241         (lookup_die_type): Likewise.
15242         (guess_full_die_structure_name): Likewise.
15243         (anonymous_struct_prefix): Likewise.
15244         (dwarf2_name): Likewise.
15245         (follow_die_ref_or_sig): Likewise.
15246         (follow_die_offset): Likewise.
15247         (follow_die_ref): Likewise.
15248         (dwarf2_fetch_die_loc_sect_off): Likewise.
15249         (dwarf2_fetch_constant_bytes): Likewise.
15250         (dwarf2_fetch_die_type_sect_off): Likewise.
15251         (dwarf2_get_die_type): Likewise.
15252         (follow_die_sig): Likewise.
15253         (decode_locdesc): Likewise.
15254         (dwarf2_per_cu_objfile): Likewise.
15255         (dwarf2_per_cu_text_offset): Likewise.
15256         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15257         objfile.
15258         (set_die_type): Access objfile through
15259         dwarf2_per_objfile.
15260
15261 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15262
15263         * valprint.c (converted_character_d): Remove typedef.
15264         (DEF_VEC_O (converted_character_d)): Remove.
15265         (count_next_character): Use std::vector.
15266         (print_converted_chars_to_obstack): Likewise.
15267         (generic_printstr): Likewise.
15268
15269 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15270
15271         * xml-support.h (struct gdb_xml_value): Add constructor.
15272         <value>: Change type to unique_xmalloc_ptr.
15273         (gdb_xml_value_s): Remove typedef.
15274         (DEF_VEC_O (gdb_xml_value_s)): Remove.
15275         (gdb_xml_element_start_handler): Change parameter type to
15276         std::vector.
15277         (xml_find_attribute): Likewise.
15278         * xml-support.c (xml_find_attribute): Change parameter type to
15279         std::vector and adjust.
15280         (gdb_xml_values_cleanup): Remove.
15281         (gdb_xml_parser::start_element): Adjust to std::vector.
15282         (xinclude_start_include): Change paraeter type to std::vector
15283         and adjust.
15284         * btrace.c (check_xml_btrace_version): Likewise.
15285         (parse_xml_btrace_block): Likewise.
15286         (parse_xml_btrace_pt_config_cpu): Likewise.
15287         (parse_xml_btrace_pt): Likewise.
15288         (parse_xml_btrace_conf_bts): Likewise.
15289         (parse_xml_btrace_conf_pt): Likewise.
15290         * memory-map.c (memory_map_start_memory): Likewise.
15291         (memory_map_start_property): Likewise.
15292         * osdata.c (osdata_start_osdata): Likewise.
15293         (osdata_start_item): Likewise.
15294         (osdata_start_column): Likewise.
15295         * remote.c (start_thread): Likewise.
15296         * solib-aix.c (library_list_start_library): Likewise.
15297         (library_list_start_list): Likewise.
15298         * solib-svr4.c (library_list_start_library): Likewise.
15299         (svr4_library_list_start_list): Likewise.
15300         * solib-target.c (library_list_start_segment): Likewise.
15301         (library_list_start_section): Likewise.
15302         (library_list_start_library): Likewise.
15303         (library_list_start_list): Likewise.
15304         * tracepoint.c (traceframe_info_start_memory): Likewise.
15305         (traceframe_info_start_tvar): Likewise.
15306         * xml-syscall.c (syscall_start_syscall): Likewise.
15307         * xml-tdesc.c (tdesc_start_target): Likewise.
15308         (tdesc_start_feature): Likewise.
15309         (tdesc_start_reg): Likewise.
15310         (tdesc_start_union): Likewise.
15311         (tdesc_start_struct): Likewise.
15312         (tdesc_start_flags): Likewise.
15313         (tdesc_start_enum): Likewise.
15314         (tdesc_start_field): Likewise.
15315         (tdesc_start_enum_value): Likewise.
15316         (tdesc_start_vector): Likewise.
15317
15318 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15319
15320         * extension.h (struct xmethod_worker) <clone>: Remove.
15321         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15322         Remove.
15323         (python_xmethod_worker::clone): Remove.
15324         * valops.c (find_overload_match): Use std::move instead of
15325         clone.
15326
15327 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15328
15329         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15330         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15331         <free_xmethod_worker_data>: Remove.
15332         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15333         <get_xmethod_arg_types>: Remove.
15334         <get_xmethod_result_type>: Remove.
15335         <invoke_xmethod>: Remove.
15336         * extension.c (new_xmethod_worker): Remove.
15337         (clone_xmethod_worker): Remove.
15338         (get_matching_xmethod_workers): Return void, pass std::vector by
15339         pointer.
15340         (get_xmethod_arg_types): Rename to...
15341         (xmethod_worker::get_arg_types): ... this, and adjust.
15342         (get_xmethod_result_type): Rename to...
15343         (xmethod_worker::get_result_type): ... this, and adjust.
15344         (invoke_xmethod): Remove.
15345         (free_xmethod_worker): Remove.
15346         (free_xmethod_worker_vec): Remove.
15347         * extension.h (enum ext_lang_rc): Move here from
15348         extension-priv.h.
15349         (struct xmethod_worker): Add constructor and destructor.
15350         <data>: Remove.
15351         <value>: Remove.
15352         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15353         virtual pure methods.
15354         <get_arg_types, get_result_type>: New methods.
15355         (xmethod_worker_ptr): Remove typedef.
15356         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15357         (xmethod_worker_vec): Remove typedef.
15358         (xmethod_worker_up): New typedef.
15359         (invoke_xmethod): Remove.
15360         (clone_xmethod_worker): Remove.
15361         (free_xmethod_worker): Remove.
15362         (free_xmethod_worker_vec): Remove.
15363         (get_xmethod_arg_types): Remove.
15364         (get_xmethod_result_type): Remove.
15365         * valops.c (find_method_list): Use std::vector, don't use
15366         intermediate vector.
15367         (value_find_oload_method_list): Use std::vector.
15368         (find_overload_match): Use std::vector.
15369         (find_oload_champ): Use std::vector.
15370         * value.c (value_free): Use operator delete.
15371         (value_of_xmethod): Rename to...
15372         (value_from_xmethod): ... this.  Don't assign
15373         xmethod_worker::value, take rvalue-reference.
15374         (result_type_of_xmethod): Adjust.
15375         (call_xmethod): Adjust.
15376         * value.h: Include extension.h.
15377         (struct xmethod_worker): Don't forward-declare.
15378         (value_of_xmethod): Rename to...
15379         (value_from_xmethod): ... this, take rvalue-reference.
15380         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15381         (struct python_xmethod_worker): ... this, add constructor and
15382         destructor.
15383         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15384         (gdbpy_free_xmethod_worker_data): Rename to...
15385         (python_xmethod_worker::~python_xmethod_worker): ... this and
15386         adjust.
15387         (gdbpy_clone_xmethod_worker_data): Rename to...
15388         (python_xmethod_worker::clone): ... this and adjust.
15389         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15390         temporary vector.
15391         (gdbpy_get_xmethod_arg_types): Rename to...
15392         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15393         (gdbpy_get_xmethod_result_type): Rename to...
15394         (python_xmethod_worker::do_get_result_type): ... this and
15395         adjust.
15396         (gdbpy_invoke_xmethod): Rename to...
15397         (python_xmethod_worker::invoke): ... this and adjust.
15398         (new_python_xmethod_worker): Rename to...
15399         (python_xmethod_worker::python_xmethod_worker): ... this and
15400         adjust.
15401         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15402         Remove.
15403         (gdbpy_free_xmethod_worker_data): Remove.
15404         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15405         (gdbpy_get_xmethod_arg_types): Remove.
15406         (gdbpy_get_xmethod_result_type): Remove.
15407         (gdbpy_invoke_xmethod): Remove.
15408         * python/python.c (python_extension_ops): Remove obsolete
15409         callbacks.
15410
15411 2018-01-05  Pedro Alves  <palves@redhat.com>
15412
15413         PR gdb/18653
15414         * common/signals-state-save-restore.c
15415         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15416         find a custom handler preinstalled, instead of internal erroring.
15417         But only warn if !quiet.
15418         * common/signals-state-save-restore.h
15419         (save_original_signals_state): New parameter 'quiet'.
15420         * main.c (captured_main_1): Move save_original_signals_state call
15421         after option handling, and pass QUIET.
15422
15423 2018-01-05  Pedro Alves  <palves@redhat.com>
15424
15425         * spu-tdep.c (spu_catch_start): Pass
15426         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15427
15428 2018-01-05  Pedro Alves  <palves@redhat.com>
15429
15430         PR gdb/22670
15431         * ada-lang.c (literal_symbol_name_matcher): New function.
15432         (ada_get_symbol_name_matcher): Use it for
15433         symbol_name_match_type::SEARCH_NAME.
15434         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15435         it down instead of assuming symbol_name_match_type::FULL.
15436         * block.h (block_lookup_symbol): New parameter 'match_type'.
15437         * c-valprint.c (print_unpacked_pointer): Use
15438         lookup_symbol_search_name instead of lookup_symbol.
15439         * compile/compile-object-load.c (get_out_value_type): Pass down
15440         symbol_name_match_type::SEARCH_NAME.
15441         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15442         symbol_name_match_type::FULL.
15443         * cp-support.c (cp_get_symbol_name_matcher): Handle
15444         symbol_name_match_type::SEARCH_NAME.
15445         * infrun.c (insert_exception_resume_breakpoint): Use
15446         lookup_symbol_search_name.
15447         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15448         * psymtab.c (maintenance_check_psymtabs): Use
15449         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15450         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15451         SYMBOL_SEARCH_NAME.
15452         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15453         if symbol_name_match_type::SEARCH_NAME.
15454         (lookup_symbol_in_language): Pass down
15455         symbol_name_match_type::FULL.
15456         (lookup_symbol_search_name): New.
15457         (lookup_language_this): Pass down
15458         symbol_name_match_type::SEARCH_NAME.
15459         (lookup_symbol_aux, lookup_local_symbol): New parameter
15460         'match_type'.  Pass it down.
15461         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15462         (lookup_symbol_search_name): New declaration.
15463         (lookup_symbol_in_block): New 'match_type' parameter.
15464
15465 2018-01-05  Pedro Alves  <palves@redhat.com>
15466
15467         PR gdb/22670
15468         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15469         ada_lookup_symbol.
15470         (ada_lookup_symbol): Reimplement in terms of
15471         ada_lookup_symbol_list, bits factored out from
15472         ada_lookup_encoded_symbol.
15473
15474 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15475
15476         * ada-exp.y (write_object_renaming): When subscripting an array
15477         using a symbol as the index, pass the block in call to
15478         ada_lookup_encoded_symbol when looking that symbol up.
15479
15480 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15481
15482         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15483         TYPE_INDEX_TYPE.
15484
15485 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15486
15487         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15488         the case where VALUE_LVAL (val0) is not lval_memory.
15489
15490 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15491
15492         * ada-valprint.c (print_optional_low_bound): Handle
15493         character-indexed array printing like boolean-indexed array
15494         printing.
15495
15496 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15497
15498         * NEWS: Create a new section for the next release branch.
15499         Rename the section of the current branch, now that it has
15500         been cut.
15501
15502 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15503
15504         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15505         * version.in: Bump version to 8.1.50.DATE-git.
15506
15507 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15508
15509         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15510         Add field.
15511         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15512         Add field.
15513         (default_exception_support_info) <catch_handlers_sym>: Add field.
15514         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15515         (ada_exception_name_addr_1): Add "catch handlers" handling.
15516         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15517         Update all callers.
15518         (create_excep_cond_exprs) <ex>: Add parameter.
15519         (re_set_exception): Update create_excep_cond_exprs call.
15520         (print_it_exception, print_one_exception, print_mention_exception)
15521         (print_recreate_exception): Add "catch handler" handling.
15522         (allocate_location_catch_handlers, re_set_catch_handlers)
15523         (check_status_catch_handlers, print_it_catch_handlers)
15524         (print_one_catch_handlers, print_mention_catch_handlers)
15525         (print_recreate_catch_handlers): New function.
15526         (catch_handlers_breakpoint_ops): New variable.
15527         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15528         Add parameter.  Add "catch handler" handling.
15529         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15530         Add "catch handler" handling.
15531         (ada_exception_catchpoint_cond_string): Add "catch handler"
15532         handling.
15533         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15534         call.
15535         (catch_ada_handlers_command): New function.
15536         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15537         operations structure.
15538         (_initialize_ada_language): Add "catch handlers" command entry.
15539         * NEWS: Document "catch handlers" feature.
15540
15541 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15542
15543         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15544         account when creating the array type of the slice.
15545         (ada_value_slice): Likewise.
15546
15547 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15548
15549         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15550         New enum value.
15551         (create_array_type_with_stride): Add byte_stride_prop parameter.
15552         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15553         New parameter.  Update all callers in this file.
15554         (array_type_has_dynamic_stride): New function.
15555         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15556         of arrays with dynamic byte strides.
15557         * dwarf2read.c (read_array_type): Add support for dynamic
15558         DW_AT_byte_stride attributes.
15559
15560 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15561
15562         * dwarf2read.c (read_unspecified_type): Treat
15563         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15564
15565 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15566
15567         Update copyright year range in all GDB files.
15568
15569 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15570
15571         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15572         and gdb/testsuite/gdb.base/step-line.c.
15573
15574 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15575
15576         * copyright.py (main): Dump the contents of
15577         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15578         even if BY_HAND is empty.
15579
15580 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15581
15582         * top.c (print_gdb_version): Update Copyright year in version
15583         message.
15584
15585 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15586
15587         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15588
15589 For older changes see ChangeLog-2017.
15590 \f
15591 Local Variables:
15592 mode: change-log
15593 left-margin: 8
15594 fill-column: 74
15595 version-control: never
15596 coding: utf-8
15597 End: