ARM: Do not use FP reg when on AAPCS
[external/binutils.git] / gdb / ChangeLog
1 2018-11-06  Marius Muench  <marius.muench@eurecom.fr>
2
3         * arm-tdep.c (arm_scan_prologue): Don't dereference FP reg
4         when on AAPCS.
5
6 2018-11-06  John Baldwin  <jhb@FreeBSD.org>
7
8         * riscv-fbsd-nat.c (getregs_supplies): Return true for
9         RISCV_CSR_SSTATUS_REGNUM.
10
11 2018-11-04  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
12
13         * source.c (open_source_file): Fix leak by transferring the
14         current s->fullname to the unique_xmalloc_ptr fullname given
15         to find_and_open_source.
16
17 2018-11-04  Tom Tromey  <tom@tromey.com>
18
19         * varobj.c (install_default_visualizer): Update.
20         * python/python-internal.h (gdbpy_get_varobj_pretty_printer):
21         Return gdbpy_ref.
22         * python/py-prettyprint.c (search_pp_list): Return gdbpy_ref.
23         (find_pretty_printer_from_progspace)
24         (find_pretty_printer_from_gdb, find_pretty_printer)
25         (gdbpy_get_varobj_pretty_printer): Return gdbpy_ref.
26         (gdbpy_get_varobj_pretty_printer, gdbpy_default_visualizer):
27         Update.
28
29 2018-11-04  Tom Tromey  <tom@tromey.com>
30
31         * python/python.c (gdbpy_parameter_value): Update.
32         * python/python-internal.h (python_string_to_unicode)
33         (python_string_to_target_python_string)
34         (host_string_to_python_string): Return gdbpy_ref.
35         * python/py-utils.c (python_string_to_unicode)
36         (unicode_to_encoded_python_string)
37         (unicode_to_target_python_string)
38         (python_string_to_target_string)
39         (python_string_to_target_python_string): Return gdbpy_ref.
40         (python_string_to_host_string): Update.
41         (host_string_to_python_string): Return gdbpy_ref.
42         * python/py-symtab.c (stpy_get_filename, stpy_get_producer)
43         (stpy_fullname): Update.
44         * python/py-progspace.c (pspy_get_filename, pspy_solib_name):
45         Update.
46         * python/py-prettyprint.c (print_string_repr): Update.
47         * python/py-objfile.c (objfpy_get_filename, objfpy_get_username)
48         (objfpy_get_build_id): Update.
49         * python/py-breakpoint.c (bppy_get_location)
50         (bppy_get_expression, bppy_get_condition, bppy_get_commands):
51         Update.
52
53 2018-11-04  Tom Tromey  <tom@tromey.com>
54
55         * python/python-internal.h (gdb_py_object_from_longest)
56         (gdb_py_object_from_ulongest): Return gdbpy_ref.
57         * python/py-value.c (valpy_int): Update.
58         * python/py-utils.c (gdb_py_object_from_longest): Return
59         gdbpy_ref.
60         (gdb_py_object_from_ulongest): Likewise.
61         * python/py-type.c (typy_get_alignof): Update.
62         * python/py-linetable.c (ltpy_get_all_source_lines)
63         (ltpy_entry_get_line, ltpy_entry_get_pc): Update.
64         * python/py-block.c (blpy_get_start, blpy_get_end): Update.
65
66 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
67
68         * ada-lang.c (_initialize_ada_language): Fix typo.
69
70 2018-11-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
71
72         * language.c (type): Remove.
73         (_initialize_language): Remove assignment to type.
74
75 2018-11-02  Joel Brobecker  <brobecker@adacore.com>
76
77         * aarch64-ravenscar-thread.h, aarch64-ravenscar-thread.c: New files.
78         * aarch64-tdep.c: #include "aarch64-ravenscar-thread.h".
79         (aarch64_gdbarch_init): Add call to register_aarch64_ravenscar_ops.
80         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-ravenscar-thread.o.
81         (HFILES_NO_SRCDIR): Add aarch64-ravenscar-thread.h.
82         (ALLDEPFILES): Add aarch64-ravenscar-thread.c.
83         * configure.tgt (cpu_obs) [aarch64*-*-*]: Add ravenscar-thread.o
84         and aarch64-ravenscar-thread.o.
85         * NEWS: Add entry documenting Ravenscar tasking support
86         on AArch64 ELF.
87
88 2018-11-02  Matthew Malcomson  <matthew.malcomson@arm.com>
89
90         * symtab.c (info_functions_command): Initialize quiet flag.
91         * stack.c (info_args_command): Likewise.
92
93 2018-11-01  Jim Wilson  <jimw@sifive.com>
94
95         * riscv-tdep.c (riscv_breakpoint_kind_from_pc): New local unaligned_p.
96         Set if pcptr if unaligned.  Return 2 if unaligned_p true.  Update
97         debugging messages.
98
99 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
100
101         * ada-lang.c (ada_watch_location_expression): New function.
102         (ada_language_defn): Set la_watch_location_expression to
103         ada_watch_location_expression.
104
105 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
106
107         * print-utils.c (int_string): Remove unnecessary trailing spaces.
108
109 2018-11-01  Joel Brobecker  <brobecker@adacore.com>
110
111         * rs6000-tdep.c (skip_prologue): Fix potential negative left
112         shifting.
113
114 2018-11-01  Jerome Guitton  <guitton@adacore.com>
115             Joel Brobecker  <brobecker@adacore.com>
116
117         * defs.h (enum gdb_osabi): Add GDB_OSABI_PIKEOS.
118         * osabi.c (gdb_osabi_names): Add name for GDB_OSABI_PIKEOS.
119         * arm-pikeos-tdep.c: New file.
120         * configure.tgt: Add arm-pikeos-tdep.o to the case of ARM
121         embedded system.
122         * Makefile.in (ALL_TARGET_OBS): Add arm-pikeos-tdep.o.
123
124 2018-11-01  Simon Marchi  <simon.marchi@ericsson.com>
125
126         * common/pathstuff.c (get_standard_temp_dir): New.
127         * common/pathstuff.h (get_standard_temp_dir): New.
128         * config.in: Re-generate.
129         * configure: Re-generate.
130         * configure.ac: Don't check for mkdtemp.
131         * gnulib/aclocal-m4-deps.mk: Re-generate.
132         * gnulib/aclocal.m4: Re-generate.
133         * gnulib/config.in: Re-generate.
134         * gnulib/configure: Re-generate.
135         * gnulib/import/Makefile.am: Re-generate.
136         * gnulib/import/Makefile.in: Re-generate.
137         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
138         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
139         * gnulib/import/m4/mkdtemp.m4: New file.
140         * gnulib/import/mkdtemp.c: New file.
141         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES):
142         Add mkdtemp module.
143         * unittests/mkdir-recursive-selftests.c (test): Use
144         get_standard_temp_dir.
145         (_initialize_mkdir_recursive_selftests): Remove HAVE_MKDTEMP
146         ifdef.
147         * compile/compile.c (get_compile_file_tempdir): Likewise.
148
149 2018-11-01  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
150
151         * rs6000-aix-tdep.c: Include "trad-frame.h" and "frame-unwind.h".
152         (SIG_FRAME_LR_OFFSET64): New define.
153         (SIG_FRAME_FP_OFFSET64): New define.
154         (aix_sighandle_frame_cache): New Function.
155         (aix_sighandle_frame_this_id): New Function.
156         (aix_sighandle_frame_prev_register): New Function.
157         (aix_sighandle_frame_sniffer): New Function.
158         (aix_sighandle_frame_unwind): New global variable.
159         (rs6000_aix_init_osabi): Install new frame unwinder.
160
161 2018-10-31  Sergio Durigan Junior  <sergiodj@redhat.com>
162
163         PR gdb/23835
164         * common/common-defs.h: Don't redefine _FORTIFY_SOURCE if it's
165         already defined.
166
167 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
168
169         * ppc-linux-nat.c: Include nat/linux-ptrace.h.
170
171 2018-10-31  Andrew Burgess  <andrew.burgess@embecosm.com>
172
173         * dwarf2read.c (struct dwarf2_cu): Add producer_is_icc field.
174         (producer_is_icc): New function.
175         (check_producer): Set producer_is_icc field on dwarf2_cu.
176         (dwarf2_init_integer_type): New function.
177         (read_base_type): Call dwarf2_init_integer_type instead of
178         init_integer_type in all cases.
179         (dwarf2_cu::dwarf2_cu): Initialise producer_is_icc field.
180         * valprint.c (maybe_negate_by_bytes): Add an assertion that the
181         LEN is greater than 0.
182
183 2018-10-30  Tom Tromey  <tom@tromey.com>
184
185         * main.c (captured_main_1): Check return value of bfd_init.
186
187 2018-10-29  Sergio Durigan Junior  <sergiodj@redhat.com>
188
189         * common/offset-type.h (DEFINE_OFFSET_REL_OP): Delete.
190         Adjust comments.
191
192 2018-10-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
193
194         * procfs.c: Include common/pathstuff.h.
195
196 2018-10-28  Andrew Burgess  <andrew.burgess@embecosm.com>
197
198         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
199         Add missing braces.  No functional change.
200
201 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
202
203         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
204         to report a bad option and fix indentation.
205         * demangle.c (demangle_command): Use report_unrecognized_option_error
206         to report a bad option and correctly report the bad option.
207
208 2018-10-27  Tom Tromey  <tom@tromey.com>
209
210         PR cli/23364:
211         * darwin-nat.c (copied_shell): New global.
212         (may_have_sip): Rename from should_disable_startup_with_shell.
213         (copy_shell_to_cache, maybe_cache_shell): New functions.
214         (darwin_nat_target::create_inferior): Update.  Use
215         copied_shell.
216
217 2018-10-27  Tom Tromey  <tom@tromey.com>
218
219         * unittests/scoped_fd-selftests.c (test_to_file): New function.
220         (run_tests): Call test_to_file.
221         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
222         temporary files.
223         * common/scoped_fd.h (scoped_fd::to_file): New method.
224
225 2018-10-27  Tom Tromey  <tom@tromey.com>
226
227         * unittests/scoped_mmap-selftests.c (test_normal): Use
228         gdb_mkostemp_cloexec.
229         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
230         Use gdb_mkostemp_cloexec.
231         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
232         gnulib/config.in, gnulib/configure,
233         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
234         gnulib/import/m4/gnulib-cache.m4,
235         gnulib/import/m4/gnulib-comp.m4: Update.
236         * gnulib/import/m4/mkostemp.m4: New file.
237         * gnulib/import/m4/mkstemp.m4: Remove.
238         * gnulib/import/mkostemp.c: New file.
239         * gnulib/import/mkstemp.m4: Remove.
240         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
241         mkstemp, add mkostemp.  Apply new patch.
242         * gnulib/import/stdlib.in.h: Apply patch.
243         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
244         New file.
245         * dwarf-index-write.c (write_psymtabs_to_index): Use
246         gdb_mkostemp_cloexec.
247         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
248
249 2018-10-27  Tom Tromey  <tom@tromey.com>
250
251         * unittests/mkdir-recursive-selftests.c: New file.
252         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
253         unittests/mkdir-recursive-selftests.c.
254         * dwarf-index-cache.c (mkdir_recursive): Move to
255         common/filestuff.c.
256         (index_cache::store): Check return value of mkdir_recursive.
257         (create_dir_and_check, test_mkdir_recursive): Move to new file.
258         (_initialize_index_cache): Don't register test.
259         * common/filestuff.h (mkdir_recursive): Declare.
260         * common/filestuff.c (mkdir_recursive): Move from
261         dwarf-index-cache.c.  Return bool.
262
263 2018-10-27  Tom Tromey  <tom@tromey.com>
264
265         * dwarf-index-write.c (write_psymtabs_to_index): Move
266         make_temp_filename to common/pathstuff.c.
267         * common/pathstuff.h (make_temp_filename): Declare.
268         * common/pathstuff.c (make_temp_filename): New function, moved
269         from dwarf-index-write.c.
270
271 2018-10-27  Tom Tromey  <tom@tromey.com>
272
273         * procfs.c (procfs_target::create_inferior): Use get_shell.
274         * cli/cli-cmds.c (shell_escape): Use get_shell.
275         * windows-nat.c (windows_nat_target::create_inferior): Use
276         get_shell.
277         * common/pathstuff.c (get_shell): New function.
278         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
279         (fork_inferior): Use get_shell.
280         * common/pathstuff.h (get_shell): Declare.
281
282 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
283
284         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
285
286 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
287
288         * stack.c (print_variable_and_value_data): Add preg and treg.
289         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
290         and update callers.
291         (print_frame_arg_vars): Likewise.
292         (prepare_reg): New function.
293         (info_locals_command): Extract info print args and use them.
294         (info_args_command): Likewise.
295         (_initialize_stack): Modify on-line help.
296         * symtab.c (treg_matches_sym_type_name): New function.
297         (search_symbols): New arg t_regexp.
298         (symtab_symbol_info): New args quiet, regexp, t_regexp.
299         (info_variables_command): Extract info print args and use them.
300         (info_functions_command): Likewise.
301         (info_types_command): Update call to symtab_symbol_info.
302         (_initialize_symtab): Modify on-line help.
303         * symtab.h (treg_matches_sym_type_name): New function.
304         (search_symbols): New t_regexp arg.
305
306 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
307
308         * cli-utils.c (extract_arg_maybe_quoted): New function.
309         (extract_info_print_args): New function.
310         (info_print_args_help): New function.
311         (report_unrecognized_option_error): New function.
312         * cli-utils.h (extract_arg_maybe_quoted): New function.
313         (extract_info_print_args): New function.
314         (info_print_args_help): New function.
315         (report_unrecognized_option_error): New function.
316
317 2018-10-26  Tom Tromey  <tom@tromey.com>
318
319         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
320         (compute_compunit_symtab_includes): Update.
321         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
322         (compunit_symtab_ptr): Likewise.
323
324 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
325
326         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
327         default_print_auxv_entry for specific tag values.
328
329 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
330
331         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
332
333 2018-10-26  Jim Wilson  <jimw@sifive.com>
334
335         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
336         (riscv_linux_sigframe_init): Declare.
337         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
338         (riscv_linux_sigframe): New.
339         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
340         (riscv_linux_sigframe_init): Define.
341         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
342
343         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
344         (riscv_isa_flen): Likewise.  Drop static.
345         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
346         (riscv_isa_flen): Likewise.  Declare.
347
348 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
349             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
350
351         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
352         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
353         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
354         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
355         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
356         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
357         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
358         Define.
359         (struct ppc_linux_features) <htm>: New field.
360         (ppc_linux_no_features): Add initializer for htm field.
361         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
362         new tdescs.
363         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
364         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
365         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
366         Define if not already defined.
367         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
368         and rs6000/powerpc-isa207-htm-vsx64l.
369         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
370         rs6000/powerpc-isa207-htm-vsx64l.xml.
371         * features/rs6000/power-htm-spr.xml: New file.
372         * features/rs6000/power-htm-core.xml: New file.
373         * features/rs6000/power64-htm-core.xml: New file.
374         * features/rs6000/power-htm-fpu.xml: New file.
375         * features/rs6000/power-htm-altivec.xml: New file.
376         * features/rs6000/power-htm-vsx.xml: New file.
377         * features/rs6000/power-htm-ppr.xml: New file.
378         * features/rs6000/power-htm-dscr.xml: New file.
379         * features/rs6000/power-htm-tar.xml: New file.
380         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
381         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
382         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
383         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
384         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
385         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
386         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
387         fetch_regset with HTM regsets.
388         (store_register, store_ppc_registers): Call store_regset with HTM
389         regsets.
390         (ppc_linux_nat_target::read_description): Set htm field in the
391         features struct if needed.
392         * ppc-linux-tdep.c: Include
393         features/rs6000/powerpc-isa207-htm-vsx32l.c and
394         features/rs6000/powerpc-isa207-htm-vsx64l.c.
395         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
396         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
397         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
398         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
399         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
400         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
401         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
402         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
403         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
404         (ppc32_linux_ctarregset): New globals.
405         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
406         (ppc_linux_collect_core_cpgrregset): New function.
407         (ppc_linux_iterate_over_regset_sections): Call back with the htm
408         regsets.
409         (ppc_linux_core_read_description): Check if the tm spr section is
410         present and set htm in the features struct.
411         (_initialize_ppc_linux_tdep): Call
412         initialize_tdesc_powerpc_isa207_htm_vsx32l and
413         initialize_tdesc_powerpc_isa207_htm_vsx64l.
414         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
415         Declare.
416         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
417         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
418         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
419         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
420         New fields.
421         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
422         Likewise.
423         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
424         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
425         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
426         New enum fields.
427         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
428         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
429         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
430         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
431         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
432         <PPC_CTAR_REGNUM>: Likewise.
433         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
434         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
435         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
436         (IS_CEFP_PSEUDOREG): Define.
437         (rs6000_register_name): Hide the upper halves of checkpointed VSX
438         registers.  Return names for the checkpointed DFP, VSX, and EFP
439         pseudo registers.
440         (rs6000_pseudo_register_type): Remove initial assert and raise an
441         internal error in the else clause instead.  Return types for the
442         checkpointed DFP, VSX, and EFP pseudo registers.
443         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
444         checkpointed DFP pseudo registers.
445         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
446         checkpointed VSX pseudo registers.
447         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
448         from efpr_pseudo_register_read and
449         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
450         registers.
451         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
452         Handle checkpointed DFP, VSX, and EFP registers.
453         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
454         (efp_ax_pseudo_register_collect): New functions.
455         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
456         register logic to new functions.  Handle checkpointed DFP, VSX,
457         and EFP pseudo registers.
458         (rs6000_gdbarch_init): Look for and validate the htm features.
459         Include checkpointed DFP, VSX and EFP pseudo-registers.
460         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
461         HTM registers.
462
463 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
464
465         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
466         without altivec or fpu.
467
468 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
469             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
470
471         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
472         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
473         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
474         Define if not already defined.
475         * features/rs6000/power-ebb.xml: New file.
476         * features/rs6000/power-linux-pmu.xml: New file.
477         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
478         features.
479         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
480         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
481         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
482         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
483         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
484         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
485         fetch_regset with ebb and pmu regsets.
486         (store_register, store_ppc_registers): Call store_regset with ebb
487         and pmu regsets.
488         (ppc_linux_nat_target::read_description): Set isa207 field in the
489         features struct if ebb and pmu are avaiable.
490         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
491         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
492         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
493         and pmu regsets.
494         (ppc_linux_core_read_description): Check if the pmu section is
495         present and set isa207 in the features struct.
496         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
497         (ppc32_linux_pmuregset): Declare.
498         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
499         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
500         <ppc_sier_regnum>: New field.
501         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
502         New enum values.
503         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
504         values.
505         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
506         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
507         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
508         ebb and pmu features.
509
510 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
511             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
512
513         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
514         (tdesc_powerpc_isa207_vsx64l): Declare.
515         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
516         (struct ppc_linux_features) <isa207>: New field.
517         (ppc_linux_no_features): Add initializer for isa207 field.
518         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
519         new tdescs.
520         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
521         (NT_PPC_TAR): Define if not already defined.
522         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
523         rs6000/powerpc-isa207-vsx64l.
524         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
525         rs6000/powerpc-isa207-vsx64l.xml.
526         * features/rs6000/power-tar.xml: New file.
527         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
528         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
529         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
530         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
531         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
532         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
533         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
534         fetch_regset with the TAR regset.
535         (store_register, store_ppc_registers): Call store_regset with the
536         TAR regset.
537         (ppc_linux_nat_target::read_description): Set isa207 field in the
538         features struct if needed.
539         * ppc-linux-tdep.c: Include
540         features/rs6000/powerpc-isa207-vsx32l.c and
541         features/rs6000/powerpc-isa207-vsx64l.c.
542         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
543         (ppc_linux_iterate_over_regset_sections): Call back with the tar
544         regset.
545         (ppc_linux_core_read_description): Check if the tar section is
546         present and set isa207 in the features struct.
547         (_initialize_ppc_linux_tdep): Call
548         initialize_tdesc_powerpc_isa207_vsx32l and
549         initialize_tdesc_powerpc_isa207_vsx64l.
550         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
551         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
552         (enum) <PPC_TAR_REGNUM>: New enum value.
553         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
554         feature.
555         (ppc_process_record_op31): Record changes to TAR.
556
557 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
558             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
559
560         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
561         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
562         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
563         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
564         (struct ppc_linux_features) <ppr_dscr>: New field.
565         (ppc_linux_no_features): Add initializer for ppr_dscr field.
566         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
567         new tdescs.
568         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
569         Define if not already defined.
570         * features/Makefile (WHICH): Add
571         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
572         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
573         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
574         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
575         * features/rs6000/power-dscr.xml: New file.
576         * features/rs6000/power-ppr.xml: New file.
577         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
578         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
579         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
580         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
581         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
582         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
583         * ppc-linux-nat.c: Include <sys/uio.h>.
584         (fetch_regset, store_regset, check_regset): New functions.
585         (fetch_register, fetch_ppc_registers): Call fetch_regset with
586         DSCR and PPR regsets.
587         (store_register, store_ppc_registers): Call store_regset with
588         DSCR and PPR regsets.
589         (ppc_linux_get_hwcap2): New function.
590         (ppc_linux_nat_target::read_description): Call
591         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
592         features struct if needed.
593         * ppc-linux-tdep.c: Include
594         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
595         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
596         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
597         (ppc32_linux_dscrregset): New globals.
598         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
599         and dscr regsets.
600         (ppc_linux_core_read_description): Check if the ppr and dscr
601         sections are present and set ppr_dscr in the features struct.
602         (_initialize_ppc_linux_tdep): Call
603         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
604         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
605         * ppc-linux-tdep.h (ppc32_linux_pprregset)
606         (ppc32_linux_dscrregset): Declare.
607         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
608         <ppc_dscr_regnum>: New field.
609         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
610         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
611         and dscr features.
612         (ppc_process_record_op31): Record changes to PPR and DSCR.
613
614 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
615
616         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
617         second initializer line for the have_* variables.  Initialize
618         have_fpu to 0 instead of 1.
619
620 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
621
622         * arch/ppc-linux-common.c (ppc_linux_match_description):
623         Parenthesize tdesc assignements and indent them properly.
624
625 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
626
627         * ppc-linux-nat.c (fetch_register): Change if statement to else
628         if.
629         (store_register): Likewise.
630
631 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
632
633         * rs6000-tdep.c: Remove reggroups.h include.
634         (rs6000_pseudo_register_reggroup_p): Remove.
635         (rs6000_gdbarch_init): Remove call to
636         set_tdesc_pseudo_register_reggroup_p.
637
638 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
639
640         * reggroups.c (default_register_reggroup_p): Return true for
641         decfloat registers and float_reggroup.
642
643 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
644
645         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
646         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
647         ppc_linux_collect_vrregset by regcache_collect_regset.
648
649 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
650
651         * linux-tdep.c (linux_collect_regset_section_cb): Use
652         std::vector<gdb_byte> instead of char * and malloc for buf.
653         Remove xfree.
654
655 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
656
657         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
658         symtab_start instead of always using language_unknown.
659
660 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
661
662         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
663         READ_P parameter, catch and ignore register access errors from
664         either the old or new MISA location.
665         (riscv_has_feature): Update call to riscv_read_misa_reg.
666
667 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
668
669         * python/py-function.c (convert_values_to_python): Return
670         gdbpy_ref<>.  Add header comment.
671         (fnpy_call): Adjust.
672
673 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
674
675         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
676         (cmdpy_completer_handle_brkchars): Adjust.
677         (cmdpy_completer): Adjust.
678
679 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
680
681         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
682         Pass correct regnum to raw_supply_zeroed.
683
684 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
685
686         * regcache.c (cooked_read_test): Add CSKY to the list of
687         architectures with a save_reggroup
688
689 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
690
691         PR gdb/23368
692         * infrun.c (follow_exec): In the follow_exec_mode_new case,
693         transfer terminal state from old new new inferior.
694         * terminal.h (swap_terminal_info): New function.
695         * inflow.c (swap_terminal_info): New function.
696
697 2018-10-23  Tom Tromey  <tom@tromey.com>
698
699         * record-btrace.c (get_thread_current_frame_id): Rename from
700         get_thread_current_frame.  Return a frame_id.
701         (record_btrace_start_replaying): Update.
702
703 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
704
705         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
706         for CSRs.
707
708 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
709
710         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
711         have_nonsteppable_watchpoint attribute to 1.
712
713 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
714
715         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
716         register names.
717         (struct register_alias): Rename to...
718         (struct riscv_register_alias): ...this, and update comment.
719         (riscv_register_aliases): Update type, and alias names.  Remove
720         CSR names from this list.
721         (riscv_register_name): Use riscv_gdb_reg_names for int and float
722         register names.  Add an extra assertion.
723         (riscv_is_regnum_a_named_csr): New function.
724         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
725
726 2018-10-22  Jim Wilson  <jimw@sifive.com>
727
728         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
729         FP reg smaller than FP reg size, and fill with -1 instead of 0.
730
731         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
732         (riscv_register_type): Use them.
733         (riscv_print_one_register_info): Handle union of floats same as float.
734         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
735         riscv_fpreg_q_type fields.
736
737 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
738
739         * gdbarch.sh (gdbarch_num_cooked_regs): New.
740         * gdbarch.h: Re-generate.
741         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
742         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
743         * eval.c (evaluate_subexp_standard): Likewise.
744         * findvar.c (value_of_register): Likewise.
745         (value_of_register_lazy): Likewise.
746         (address_from_register): Likewise.
747         * frame.c (get_frame_register_bytes): Likewise.
748         * gdbarch-selftests.c (register_to_value_test): Likewise.
749         * h8300-tdep.c (h8300_register_type): Likewise.
750         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
751         (i386_svr4_reg_to_regnum): Likewise.
752         * infcmd.c (default_print_registers_info): Likewise.
753         (registers_info): Likewise.
754         (print_vector_info): Likewise.
755         (default_print_float_info): Likewise.
756         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
757         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
758         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
759         (mi_cmd_data_list_changed_registers): Likewise.
760         (mi_cmd_data_list_register_values): Likewise.
761         (mi_cmd_data_write_register_values): Likewise.
762         (mi_cmd_trace_frame_collected): Likewise.
763         * mips-tdep.c (print_gp_register_row): Likewise.
764         (mips_print_registers_info): Likewise.
765         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
766         * regcache.c (init_regcache_descr): Likewise.
767         (register_size): Likewise.
768         (register_dump::dump): Likewise.
769         (cooked_read_test): Likewise.
770         (cooked_write_test): Likewise.
771         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
772         (rs6000_gdbarch_init): Likewise.
773         * stabsread.c (stab_reg_to_regnum): Likewise.
774         * stack.c (info_frame_command): Likewise.
775         * target-descriptions.c (tdesc_register_name): Likewise.
776         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
777         * tui/tui-regs.c (tui_show_register_group): Likewise.
778         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
779         (user_reg_map_regnum_to_name): Likewise.
780         (value_of_user_reg): Likewise.
781         (maintenance_print_user_registers): Likewise.
782         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
783         (xtensa_register_name): Likewise.
784         (xtensa_register_type): Likewise.
785         (xtensa_reg_to_regnum): Likewise.
786         (xtensa_pseudo_register_read): Likewise.
787         (xtensa_pseudo_register_write): Likewise.
788
789 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
790
791         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
792         correctly-sized buffer with raw_read.
793         (amd64_pseudo_register_write): Use correctly-sized buffer for
794         raw_read/raw_write.
795
796 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
797
798         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
799         in add_prefix_cmd of set print type.
800
801 2018-10-19  Tom Tromey  <tom@tromey.com>
802
803         PR tui/18388:
804         * NEWS: Mention tabset deprecation.
805         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
806         (update_tab_width): New function.
807         (tui_set_tab_width, tui_show_tab_width): New functions.
808         (tui_set_tab_width_command): Use update_tab_width.
809         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
810         Add new "set tui tab-width" command.
811         * tui/tui-source.c (tui_set_source_content): Update.
812         * tui/tui-disasm.c (tui_set_disassem_content): Update.
813         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
814         Don't declare.
815         (tui_tab_width): Declare.
816         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
817         (tui_set_default_tab_len): Remove.
818
819 2018-10-19  Tom Tromey  <tom@tromey.com>
820
821         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
822         (key_is_backspace, tui_getc): Don't declare.
823         * tui/tui-io.c (key_is_start_sequence): Now static.
824         (key_is_end_sequence, key_is_backspace): Remove.
825         (tui_getc): Now static.
826
827 2018-10-19  Tom Tromey  <tom@tromey.com>
828
829         * symfile.c (reread_symbols): Clear "static_links".
830
831 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
832
833         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
834         define.
835         (aarch64_linux_sigframe_init): Extra boundary checks.
836
837 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
838
839         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
840         the possibly non-existent tdesc type 'vec128', but the type of raw
841         register v16 instead.
842
843 2018-10-19  Gary Benson <gbenson@redhat.com>
844
845         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
846
847 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
848
849         PR cli/23785
850         * cli/cli-dump.c (restore_binary_file): Check if "file" is
851         NULL.
852
853 2018-10-17  Paul Koning  <paul_koning@dell.com>
854
855         * charset.c (convert_between_encodings): Fix unsigned overflow.
856
857 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
858
859         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
860         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
861         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
862         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
863         New functions.
864         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
865         and fbsd_info_proc_mappings_header.
866         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
867         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
868         New.
869
870 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
871
872         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
873         Solaris Maintainer.
874
875 2018-10-15  Tom Tromey  <tom@tromey.com>
876
877         * tui/tui.c (strcat_to_buf): Remove casts.
878         * tui/tui-winsource.c (tui_show_source_line)
879         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
880         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
881         * tui/tui-windata.c (tui_first_data_item_displayed)
882         (tui_delete_data_content_windows, tui_erase_data_content)
883         (tui_display_all_data, tui_display_data_from)
884         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
885         * tui/tui-win.c (tui_set_win_height)
886         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
887         casts.
888         * tui/tui-win.c (tui_resize_all): Remove casts.
889         (tui_scroll_backward_command, tui_set_focus)
890         (tui_set_tab_width_command): Likewise.
891         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
892         * tui/tui-regs.c (tui_show_register_group): Remove cast.
893         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
894         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
895         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
896         Remove casts.
897
898 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
899
900         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
901         AArch64/ARM maintainer.
902
903 2018-10-11  Gary Benson <gbenson@redhat.com>
904
905         * interps.h (interp::m_name): Make private and mutable.
906         * interps.c (interp::~interp): Free m_name.
907
908 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
909             Simon Marchi <simark@simark.ca>
910
911         * README (`configure' options): Add documentation for new
912         "--enable-unit-tests" option.
913         * acinclude.m4: Include "selftest.m4".
914         * configure: Regenerate.
915         * configure.ac: Use "GDB_AC_SELFTEST".
916         * maint.c (maintenance_selftest): Update message informing
917         that selftests have been disabled.
918         (maintenance_info_selftests): Likewise.
919         * selftest.m4: New file.
920
921 2018-10-10  Gary Benson <gbenson@redhat.com>
922
923         * remote.c (remote_target::remote_send_printf): Add
924         missing va_end found by Coverity.
925
926 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
927
928         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
929
930 2018-10-09  Tom Tromey  <tom@tromey.com>
931
932         * configure: Rebuild.
933         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
934         * NEWS: Update --enable-ubsan documentation.
935
936 2018-10-09  Gary Benson <gbenson@redhat.com>
937
938         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
939         found by Coverity.
940
941 2018-10-08  Tom Tromey  <tom@tromey.com>
942
943         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
944         variable.
945         (riscv_fbsd_init_abi): Likewise.
946
947 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
948         * valops.c (value_struct_elt_for_reference): Rename local variable
949         to work around the shadowing a previous local warning.
950
951 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
952
953         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
954         * NEWS: Mention new FreeBSD/riscv native configuration.
955         * configure.host: Add riscv*-*-freebsd*.
956         * configure.nat: Likewise.
957         * riscv-fbsd-nat.c: New file.
958
959 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
960
961         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
962         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
963         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
964         * NEWS: Mention new FreeBSD/riscv target.
965         * configure.tgt: Add riscv*-*-freebsd*.
966         * riscv-fbsd-tdep.c: New file.
967         * riscv-fbsd-tdep.h: New file.
968
969 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
970
971         * regcache.h (struct regcache_map_entry): Note that this type can
972         be used with traditional frame caches.
973         * trad-frame.c (trad_frame_set_reg_regmap): New.
974         * trad-frame.h (trad_frame_set_reg_regmap): New.
975
976 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
977
978         PR c++/16841
979         * valops.c (get_virtual_base_offset): New function.
980         (value_struct_elt_for_reference): Use it to get virtual base offset
981         and add it in calculating class member address.
982
983 2018-10-08   John Darrington <john@darrington.wattle.id.au>
984
985     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
986       (check_producer): Check if the producer is codewarrior.
987       (producer_is_codewarrior): New function.
988       (lnp_state_machine::record_line): Ignore is_stmt flag for records
989        produced by codewarrior.
990       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
991
992 2018-10-06  Tom Tromey  <tom@tromey.com>
993
994         PR python/19399:
995         * python/py-inferior.c: Add "architecture" entry.
996         (infpy_architecture): New function.
997
998 2018-10-06  Tom Tromey  <tom@tromey.com>
999
1000         PR python/21765:
1001         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
1002         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
1003         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
1004         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
1005
1006 2018-10-06  Tom Tromey  <tom@tromey.com>
1007
1008         PR build/17077:
1009         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
1010         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
1011         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
1012         #include.
1013
1014 2018-10-06  Tom Tromey  <tom@tromey.com>
1015
1016         * python/py-breakpoint.c (bppy_get_location): Handle a
1017         bp_breakpoint without a location.
1018
1019 2018-10-06  Tom Tromey  <tom@tromey.com>
1020
1021         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
1022         (_RegEx): Reformat help text.
1023         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
1024         (AnyCallerIs, AnyCallerMatches): Reformat help text.
1025         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
1026         text.
1027         * python/lib/gdb/command/xmethods.py (InfoXMethod)
1028         (EnableXMethod, DisableXMethod): Remove help indentation.
1029         Capitalize meta-syntactic variables.
1030         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
1031         (EnableUnwinder, DisableUnwinder): Remove help indentation.
1032         Capitalize meta-syntactic variables.
1033         * python/lib/gdb/command/explore.py (ExploreCommand)
1034         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
1035         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
1036         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
1037         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
1038         Remove help indentation.
1039         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
1040         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
1041         (DisableFrameFilter, SetFrameFilterPriority)
1042         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
1043
1044 2018-10-06  Tom Tromey  <tom@tromey.com>
1045
1046         PR tui/28819:
1047         * tui/tui-io.c (gdb_wgetch): New function.
1048         (tui_mld_getc, tui_getc): Use it.
1049
1050 2018-10-05  Tom Tromey  <tom@tromey.com>
1051
1052         * sol-thread.c (sol_thread_target::wait): Rename inner
1053         "save_ptid".
1054
1055 2018-10-04  Tom Tromey  <tom@tromey.com>
1056
1057         * configure: Rebuild.
1058         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
1059
1060 2018-10-04  Tom Tromey  <tom@tromey.com>
1061
1062         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
1063         declaration of "block".
1064
1065 2018-10-04  Tom Tromey  <tom@tromey.com>
1066
1067         * common/filestuff.c (fdwalk): Remove inner declaration of
1068         "result".
1069
1070 2018-10-04  Tom Tromey  <tom@tromey.com>
1071
1072         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
1073         "structs_addr" and hoist declaration.
1074
1075 2018-10-04  Tom Tromey  <tom@tromey.com>
1076
1077         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
1078         variable "size".
1079
1080 2018-10-04  Tom Tromey  <tom@tromey.com>
1081
1082         * mdebugread.c (parse_partial_symbols): Use std::string.
1083
1084 2018-10-04  Tom Tromey  <tom@tromey.com>
1085
1086         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
1087         * p-valprint.c (pascal_val_print): Split inner "i" variable.
1088         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
1089         header.
1090         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
1091         more inner scope.
1092         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
1093         * varobj.c (varobj_update): Rename inner "newobj",
1094         "type_changed".
1095         * valprint.c (generic_emit_char): Rename inner "buf".
1096         * valops.c (find_overload_match): Rename inner "temp".
1097         (value_struct_elt_for_reference): Declare "v" in more inner
1098         scope.
1099         * v850-tdep.c (v850_push_dummy_call): Rename "len".
1100         * unittests/array-view-selftests.c (run_tests): Rename inner
1101         "vec".
1102         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
1103         header.
1104         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
1105         "tsv" in more inner scope.
1106         (print_one_static_tracepoint_marker): Rename inner
1107         "tuple_emitter".
1108         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
1109         (tic6x_push_dummy_call): Don't redeclare "addr".
1110         * target-float.c: Declare "dto" lower.
1111         * symtab.c (lookup_local_symbol): Rename inner "sym".
1112         (find_pc_sect_line): Rename inner "pc".
1113         * stack.c (print_frame): Don't redeclare "gdbarch".
1114         (return_command): Rename inner "gdbarch".
1115         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
1116         "sp".
1117         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
1118         header.
1119         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
1120         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
1121         scope.
1122         * remote.c (remote_target::update_thread_list): Don't redeclare
1123         "tp".
1124         (remote_target::process_initial_stop_replies): Rename inner
1125         "thread".
1126         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
1127         (remote_target::wait_as): Don't redeclare "stop_reply".
1128         (remote_target::get_thread_local_address): Rename inner
1129         "result".
1130         (remote_target::get_tib_address): Likewise.
1131
1132         * regcache.c (cooked_read_test): Rename "regnum".
1133         * record-btrace.c (cmd_record_btrace_start): Rename inner
1134         "exception".
1135         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
1136         loop header.
1137         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
1138         header.
1139         (ppu2spu_sniffer): Rename inner "buf".
1140         * parse.c (operator_check_standard): Rename inner "type",
1141         "objfile".
1142         * p-valprint.c (pascal_val_print): Introduce new scope for
1143         "low_bound", "high_bound".
1144         * p-exp.y (yylex): Declare "i" in loop header.
1145         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
1146         Lower declaration of "s".
1147         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
1148         header.
1149         (nios2_push_dummy_call): Rename "len".
1150         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
1151         "buf".
1152         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
1153         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
1154         (linux_xfer_osdata_modules): Likewise.
1155         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
1156         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
1157         (mips_o64_push_dummy_call): Likewise.
1158         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
1159         "op".
1160         * mi/mi-main.c (list_available_thread_groups): Rename inner
1161         "tuple_emitter".
1162         (mi_cmd_data_read_memory): Rename inner "opts".
1163         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
1164         "tuple_emitter".
1165         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
1166         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
1167         more inner scope.
1168         (parse_partial_symbols): Rename inner "pst", "p", "name"
1169         * main.c (captured_main_1): Rename inner "i"s.
1170         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
1171         "oso2".
1172         * linux-tdep.c (linux_info_proc): Rename inner "filename".
1173         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
1174         * infrun.c (handle_no_resumed): Don't redeclare "thread".
1175         (handle_signal_stop): Rename inner "gdbarch".
1176         (handle_command): Declare "signum" in loop header.
1177         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
1178         "status".
1179         (examine_prologue): Rename inner "sol" and "sof".
1180         (ia64_extract_return_value): Rename inner "val".  Declare another
1181         "val" in a more inner scope.
1182         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
1183         inner scope.
1184         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
1185         "except".
1186         * findvar.c (default_read_var_value): Don't redeclare "addr".
1187         * f-exp.y (yylex): Declare "i" in loop header.
1188         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
1189         Rename inner "type", "expect_type".
1190         (evaluate_subexp_for_sizeof): Rename inner "pc".
1191         * elfread.c (elf_symfile_read): Rename inner "abfd".
1192         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
1193         "bytes_read".
1194         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
1195         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
1196         (dwarf_decode_line_header): Rename inner "lh".
1197         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
1198         "offset".  Declare "i" in loop header.
1199         (disassemble_dwarf_expression): Rename inner "addr_size".
1200         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1201         inner "result".
1202         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1203         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1204         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1205         "inner_list_emitter".
1206         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1207         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1208         declaration in a block.
1209         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1210         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1211         "obstack_final_size".
1212         * cp-support.c (inspect_type): Declare "i" in loop header.
1213         * compile/compile.c (compile_instance::insert_symbol_error):
1214         Rename inner "e".
1215         * common/agent.c (agent_run_command): Remove inner "ret"
1216         declaration.
1217         * coffread.c (coff_symfile_read): Rename inner "name".
1218         (coff_symfile_read): Rename inner "abfd".
1219         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1220         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1221         "high".
1222         * c-exp.y (lex_one_token): Move "len" declaration lower.
1223         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1224         "gdbarch".
1225         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1226         "b".
1227         (watch_command_1): Declare "mark" later.
1228         (clear_command): Don't shadow "a" or "b".
1229         (delete_command): Rename inner "b".
1230         (delete_trace_command): Likewise.
1231         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1232         "op".
1233         (arm_gdbarch_init): Remove inner "e_flags".
1234         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1235         "offset" in inner blocks.
1236
1237 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1238
1239         * dwarf-index-write.c (file_write): Don't write if the vector is
1240         empty.
1241
1242 2018-10-05  Tom de Vries  <tdevries@suse.de>
1243
1244         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1245         PyArg_ParseTuple call.
1246
1247 2018-10-05  Tom de Vries  <tdevries@suse.de>
1248
1249         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1250         PyArg_ParseTuple call.
1251
1252 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1253
1254         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1255         to avoid exceeding 80 characters per line limit.
1256
1257 2018-10-04  Tom Tromey  <tom@tromey.com>
1258
1259         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1260         (reread_symbols): Update.
1261         * complaints.h (clear_complaints): Remove argument.
1262         * complaints.c (enum complaint_series): Remove.
1263         (series): Remove global.
1264         (complaint_internal): Update.
1265         (clear_complaints): Remove argument.
1266
1267 2018-10-04  Tom Tromey  <tom@tromey.com>
1268
1269         * symfile.c (symbol_file_add_with_addrs): Do not print "no
1270         debugging symbols" message if there is a separate debug objfile.
1271
1272 2018-10-04  Tom Tromey  <tom@tromey.com>
1273
1274         PR cli/19551:
1275         * symfile.c (symbol_file_add_with_addrs): Update output.
1276         * psymtab.c (require_partial_symbols): Update output.
1277
1278 2018-10-04  Tom Tromey  <tom@tromey.com>
1279
1280         PR cli/22234:
1281         * complaints.c: Emit \n.
1282
1283 2018-10-04  Tom Tromey  <tom@tromey.com>
1284
1285         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1286         (separate_debug_file_exists, find_separate_debug_file)
1287         (add_symbol_file_command, reread_symbols, allocate_symtab)
1288         (allocate_compunit_symtab): Use filtered printing, not
1289         unfiltered.
1290         * psymtab.c (require_partial_symbols, dump_psymtab)
1291         (allocate_psymtab): Use filtered printing, not unfiltered.
1292
1293 2018-10-04  Tom Tromey  <tom@tromey.com>
1294
1295         * complaints.c (complaint_internal): Correctly check complaint
1296         count.
1297
1298 2018-10-04  Tom Tromey  <tom@tromey.com>
1299
1300         * complaints.h (struct complaints): Remove declaration.
1301         * complaints.c (clear_complaints): Remove an unused variable.
1302
1303 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1304
1305         * MAINTAINERS (Write After Approval): Add self.
1306
1307 2018-10-03  Tom Tromey  <tom@tromey.com>
1308
1309         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1310         "buffer_contents".
1311         * coffread.c (coff_symtab_read): Initialize "newobj".
1312
1313 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1314
1315         * dwarf2read.c (read_func_scope): Remove struct keyword in
1316         range-based for.
1317
1318 2018-10-03  Tom Tromey  <tom@tromey.com>
1319
1320         * README: Mention --enable-ubsan.
1321         * NEWS: Mention --enable-ubsan.
1322         * acinclude.m4: Include sanitize.m4.
1323         * configure: Rebuild.
1324         * configure.ac: Call AM_GDB_UBSAN.
1325         * sanitize.m4: New file.
1326
1327 2018-10-03  Tom Tromey  <tom@tromey.com>
1328
1329         * expression.h (enum exp_opcode): Use uint8_t as base type.
1330         * expprint.c (op_name): Handle invalid opcodes.
1331
1332 2018-10-03  Tom Tromey  <tom@tromey.com>
1333
1334         * parse.c (prefixify_expression): Add assert.
1335         (parse_exp_in_context_1): Throw exception if the expression is
1336         empty.
1337
1338 2018-10-03  Tom Tromey  <tom@tromey.com>
1339
1340         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1341
1342 2018-10-03  Tom Tromey  <tom@tromey.com>
1343
1344         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1345
1346 2018-10-03  Tom Tromey  <tom@tromey.com>
1347
1348         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1349         unsigned.
1350
1351 2018-10-03  Tom Tromey  <tom@tromey.com>
1352
1353         * findvar.c (extract_integer): Do work in an unsigned type.
1354
1355 2018-10-03  Tom Tromey  <tom@tromey.com>
1356
1357         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1358         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1359         base type.
1360         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1361         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1362         type.
1363         * c-lang.h (enum c_string_type_values): Use unsigned as base
1364         type.
1365         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1366
1367 2018-10-03  Tom Tromey  <tom@tromey.com>
1368
1369         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1370         <~dwarf2_frame_state_reg_info>: Update.
1371         <dwarf2_frame_state_reg_info>: Update.
1372         <alloc_regs>: Add assertion.  Update.
1373         <reg>: Now a std::vector.
1374         <num_regs>: Remove.
1375         <swap>: Update.
1376         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1377         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1378
1379 2018-10-03  Tom Tromey  <tom@tromey.com>
1380
1381         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1382
1383 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1384
1385         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1386
1387 2018-10-02  Tom Tromey  <tom@tromey.com>
1388
1389         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1390
1391 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1392
1393         * NEWS: Mention changed commands.
1394         * ser-uds.c: New file.
1395         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1396         * configure: Regenerate.
1397         * Makefile.in: Add new file.
1398         * serial.c (serial_open): Check if filename is a socket
1399           and lookup the appropriate interface accordingly.
1400
1401 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1402
1403         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1404         define.
1405         (AARCH64_EXTRA_MAGIC): Likewise.
1406         (AARCH64_FPSIMD_MAGIC): Likewise.
1407         (AARCH64_SVE_MAGIC): Likewise.
1408         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1409         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1410         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1411         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1412         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1413         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1414         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1415         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1416         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1417         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1418         (read_aarch64_ctx): Add function.
1419         (aarch64_linux_sigframe_init): Detect FP registers.
1420
1421 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1422
1423         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1424         (AARCH64_D0_REGNUM): Likewise.
1425         (AARCH64_S0_REGNUM): Likewise.
1426         (AARCH64_H0_REGNUM): Likewise.
1427         (AARCH64_B0_REGNUM): Likewise.
1428         (AARCH64_SVE_V0_REGNUM): Likewise.
1429         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1430         (AARCH64_D0_REGNUM): Likewise.
1431         (AARCH64_S0_REGNUM): Likewise.
1432         (AARCH64_H0_REGNUM): Likewise.
1433         (AARCH64_B0_REGNUM): Likewise.
1434         (AARCH64_SVE_V0_REGNUM): Likewise.
1435
1436 2018-10-01  Gary Benson <gbenson@redhat.com>
1437
1438         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1439         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1440         prfpregset_t instead of gdb_prfpregset_t.
1441         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1442         * configure, config.in: Rebuild.
1443
1444 2018-10-01  Gary Benson <gbenson@redhat.com>
1445
1446         * common/gdb_proc_service.h: New file, factored out from...
1447         * gdb_proc_service.h: Moved common code to the above file.
1448         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1449
1450 2018-10-01  Gary Benson <gbenson@redhat.com>
1451
1452         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1453         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1454
1455 2018-10-01  Gary Benson <gbenson@redhat.com>
1456
1457         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1458         (AC_CHECK_HEADERS): Check for linux/elf.h.
1459         * configure, config.in: Rebuild.
1460         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1461         doesn't define elf_fpregset_t.
1462
1463 2018-10-01  Gary Benson <gbenson@redhat.com>
1464
1465         * gdb_proc_service.h: Whitespace change.
1466
1467 2018-10-01  Tom Tromey  <tom@tromey.com>
1468
1469         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1470         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1471         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1472
1473 2018-10-01  Tom Tromey  <tom@tromey.com>
1474
1475         * README: Minor change.
1476
1477 2018-09-30  Pedro Alves  <palves@redhat.com>
1478
1479         * darwin-nat-info.c (darwin_debug_regions_recurse)
1480         (info_mach_exceptions_command): Remove unused local variables.
1481         * darwin-nat.c (darwin_decode_notify_message)
1482         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1483         (darwin_stop_inferior, darwin_setup_exceptions)
1484         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1485         (darwin_nat_target::attach, darwin_nat_target::detach)
1486         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1487         local variables.
1488         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1489         variables.
1490
1491 2018-09-29  Tom Tromey  <tom@tromey.com>
1492
1493         * README: Remove some leftover text.
1494
1495 2018-09-29  Tom Tromey  <tom@tromey.com>
1496
1497         * PROBLEMS: Rewrite.
1498         * README: Update.
1499
1500 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1501
1502         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1503         case with explicit breakpoint kind.
1504         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1505         'additional_info' and related logic.
1506         (riscv_debug_breakpoints): New variable.
1507         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1508         instruction to determine the breakpoint kind.
1509         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1510         flag.  Update description of 'set/show riscv
1511         use-compressed-breakpoints' flag.
1512
1513 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1514
1515         (NEWS): Mention changes to frame related commands.
1516         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1517         (add_prefix_cmd_suppress_notification): New function.
1518         (add_com_suppress_notification): Call
1519         add_cmd_suppress_notification.
1520         * command.h (add_cmd_suppress_notification): Declare.
1521         (add_prefix_cmd_suppress_notification): Declare.
1522         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1523         (parse_frame_specification): Moved from stack.c, with
1524         simplification to handle a single argument.
1525         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1526         switch to the selected frame.  Add a header comment.
1527         * stack.c: Remove 'safe-ctype.h' include.
1528         (find_frame_for_function): Add declaration.
1529         (find_frame_for_address): New function.
1530         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1531         (frame_selection_by_function_completer): New function.
1532         (info_frame_command): Rename to...
1533         (info_frame_command_core): ...this, and update parameter types.
1534         (select_frame_command): Rename to...
1535         (select_frame_command_core): ...this, and update parameter types.
1536         (frame_command): Rename to...
1537         (frame_command_core): ...this, and update parameter types.
1538         (class frame_command_helper): New class to wrap implementations of
1539         frame related sub-commands.
1540         (frame_apply_cmd_list): New static global.
1541         (frame_cmd_list): Make static.
1542         (select_frame_cmd_list): New global for sub-commands.
1543         (info_frame_cmd_list): New global for sub-commands.
1544         (_initialize_stack): Register sub-commands for 'frame',
1545         'select-frame', and 'info frame'.  Update 'frame apply' commands
1546         to use frame_apply_cmd_list.  Move function local static
1547         frame_apply_list to file static frame_apply_cmd_list for
1548         consistency.
1549         * stack.h (select_frame_command): Delete declarationn.
1550         (select_frame_for_mi): Declare new function.
1551
1552 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1553
1554         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1555         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1556         and NOP.
1557
1558 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1559
1560         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1561
1562 2018-09-26  Tom Tromey  <tom@tromey.com>
1563
1564         * valops.c (auto_abandon): Remove dead code.
1565
1566 2018-09-26  Tom Tromey  <tom@tromey.com>
1567
1568         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1569
1570 2018-09-24  Tom Tromey  <tom@tromey.com>
1571
1572         * common/pathstuff.c (get_standard_cache_dir): Make
1573         "xdg_cache_home" and "home" const.
1574         * top.c (init_history): Make "tmpenv" const.
1575         * main.c (get_init_files): Make "homedir" const.
1576
1577 2018-09-23  Tom Tromey  <tom@tromey.com>
1578
1579         PR python/18852:
1580         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1581
1582 2018-09-23  Tom Tromey  <tom@tromey.com>
1583
1584         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1585         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1586         * python/python-internal.h (gdbpy_handle_exception): Declare.
1587         * python/py-utils.c (gdbpy_handle_exception): New function.
1588
1589 2018-09-23  Tom Tromey  <tom@tromey.com>
1590
1591         PR python/17284:
1592         * python/py-type.c (typy_template_argument): Check for negative
1593         argument number.
1594
1595 2018-09-23  Tom Tromey  <tom@tromey.com>
1596
1597         PR python/14062:
1598         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1599
1600 2018-09-23  Tom Tromey  <tom@tromey.com>
1601
1602         PR python/18170:
1603         * python/py-value.c (valpy_int): Allow conversion from pointer
1604         type.
1605
1606 2018-09-23  Tom Tromey  <tom@tromey.com>
1607
1608         PR python/20126:
1609         * python/py-value.c (valpy_int): Respect type sign.
1610
1611 2018-09-23  Tom Tromey  <tom@tromey.com>
1612
1613         PR python/18352;
1614         * python/py-value.c (valpy_float): Allow conversions from int or
1615         char.
1616         (valpy_int, valpy_long): Allow conversions from float.
1617
1618 2018-09-23  Tom Tromey  <tom@tromey.com>
1619
1620         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1621         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1622
1623 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1624
1625         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1626         __sighndlr.
1627         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1628
1629 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1630
1631         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1632         target_terminal::ours().
1633
1634 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1635
1636         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1637         of vl to ULONGEST.
1638
1639 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1640
1641         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1642         redundant condition.
1643
1644 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1645
1646         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1647
1648         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1649         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1650         * sol-thread.c (ps_pdmodel): Don't guard definition.
1651
1652         * procfs.c: Fix formatting.
1653
1654         * procfs.c (sysset_t_alloc): Remove.
1655         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1656         (procfs_debug_inferior): Likewise.
1657         (procfs_set_exec_trap): Likewise.
1658         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1659         (proc_set_traced_sysexit): Likewise.
1660
1661         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1662         (dead_procinfo): Likewise.
1663         (proc_warn): Likewise.
1664         (proc_error): Likewise.
1665         (proc_get_LDT_entry): Likewise.
1666         (do_attach): Likewise.
1667         (procfs_target::pid_to_str): Likewise.
1668         (iterate_over_mappings): Likewise.
1669
1670         * procfs.c (create_procinfo): Fix ARI warning.
1671         (proc_get_status): Likewise.
1672         (proc_stop_process): Likewise.
1673         (proc_run_process): Likewise.
1674         (proc_kill): Likewise.
1675         (proc_get_LDT_entry): Likewise.
1676         (procfs_find_LDT_entry): Likewise.
1677         (proc_update_threads): Likewise.
1678         (proc_iterate_over_threads): Likewise.
1679         (do_attach): Likewise.
1680         (procfs_xfer_memory): Likewise.
1681         (invalidate_cache): Likewise.
1682         (procfs_target::resume): Likewise.
1683         (procfs_init_inferior): Likewise.
1684         (procfs_set_exec_trap): Likewise.
1685         (procfs_target::thread_alive): Likewise.
1686         (procfs_target::pid_to_exec_file): Likewise.
1687         (iterate_over_mappings): Likewise.
1688         (procfs_target::make_corefile_notes): Likewise.
1689         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1690
1691         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1692         (procfs_find_LDT_entry): Likewise.
1693         * sol-thread.c (ps_lgetLDT): Likewise.
1694
1695 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1696
1697         PR tdep/17903
1698         * procfs.c (procfs_target): Declare pid_to_exec_file.
1699         (procfs_target::pid_to_exec_file): New.
1700
1701 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1702
1703         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1704         renaming.
1705         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1706         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1707
1708 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1709
1710         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1711         (supply_fpregset, fill_fpregset): Move ...
1712         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1713         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1714         Remove references to ioctl-based procfs.
1715         Include <sys/reg.h>.
1716         Remove PR_MODEL_NATIVE guards.
1717         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1718         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1719
1720 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1721
1722         PR gdb/20981:
1723         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1724         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1725         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1726
1727 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1728
1729         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1730         (fbsd_print_sockaddr_in6): Likewise.
1731
1732 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1733             Chris January  <chris.january@arm.com>
1734
1735         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1736         (evaluate_subexp_standard): Return a dummy type when
1737         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1738         OP_F77_UNDETERMINED_ARGLIST case.
1739         * expression.h (enum noside): Update comment.
1740
1741 2018-09-19  George Vasick <george.vasick@oracle.com>
1742
1743         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1744
1745 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1746             April Chin <april.chin@oracle.com>
1747             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1748
1749         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1750         uint_t lwpid_t.
1751         (create_procinfo): Print pids in /proc without leading zeros.
1752
1753 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1754
1755         * nios2-tdep.c (nios2_gcc_target_options): New.
1756         (nios2_gdb_arch_init): Install new hook.
1757
1758 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1759
1760         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1761         New file.
1762         * update-gnulib.sh: Apply patch.
1763         * configure: Re-generate.
1764
1765 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1766
1767         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1768         description.  Make "info proc" command descriptions more
1769         consistent.
1770
1771 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1772
1773         * NEWS: Mention 'info proc files' command.
1774
1775 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1776
1777         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1778         descriptors for IP_FILES and IP_ALL.
1779
1780 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1781
1782         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1783         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1784         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1785         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1786         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1787         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1788         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1789         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1790         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1791         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1792         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1793         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1794         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1795         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1796         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1797         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1798         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1799         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1800         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1801         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1802         (struct fbsd_sockaddr_un): New types.
1803         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1804         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1805         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1806         (fbsd_core_info_proc_files): New functions.
1807         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1808         IP_ALL.
1809         * fbsd-tdep.h (fbsd_info_proc_files_header)
1810         (fbsd_info_proc_files_entry): New.
1811
1812 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1813
1814         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1815         * infcmd.c (info_proc_cmd_files): New function.
1816         (_initialize_infcmd): Register 'info proc files' command.
1817
1818 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1819
1820         * gnulib/aclocal-m4-deps.mk: Re-generate.
1821         * gnulib/aclocal.m4: Re-generate.
1822         * gnulib/config.in: Re-generate.
1823         * gnulib/configure: Re-generate.
1824         * gnulib/import/Makefile.am: Re-generate.
1825         * gnulib/import/Makefile.in: Re-generate.
1826         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1827         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1828         * gnulib/import/arpa_inet.in.h: New file.
1829         * gnulib/import/inet_ntop.c: New file.
1830         * gnulib/import/m4/arpa_inet_h.m4: New file.
1831         * gnulib/import/m4/inet_ntop.m4: New file.
1832         * gnulib/import/m4/netinet_in_h.m4: New file.
1833         * gnulib/import/m4/socklen.m4: New file.
1834         * gnulib/import/m4/sockpfaf.m4: New file.
1835         * gnulib/import/m4/stdalign.m4: New file.
1836         * gnulib/import/m4/sys_uio_h.m4: New file.
1837         * gnulib/import/netinet_in.in.h: New file.
1838         * gnulib/import/stdalign.in.h: New file.
1839         * gnulib/import/sys_socket.c: New file.
1840         * gnulib/import/sys_socket.in.h: New file.
1841         * gnulib/import/sys_uio.in.h: New file.
1842         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1843         module.
1844
1845 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1846
1847         * gnulib/aclocal-m4-deps.mk: New file.
1848         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1849         deterministically.
1850
1851 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1852
1853         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1854         KVE_PATH.
1855
1856 2018-09-18  Tom Tromey  <tom@tromey.com>
1857
1858         * compile/compile-object-load.c (struct
1859         link_hash_table_cleanup_data): Add constructor and destructor.
1860         Use DISABLE_COPY_AND_ASSIGN.
1861         (~link_hash_table_cleanup_data): Rename from
1862         link_hash_table_free.  Now a destructor.
1863         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1864
1865 2018-09-18  Tom Tromey  <tom@tromey.com>
1866
1867         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1868         * compile/compile-object-load.c (struct munmap_list): Move to
1869         header file.
1870         (munmap_list::add): Rename from munmap_list_add; rewrite.
1871         (munmap_list::~munmap_list): Rename from munmap_list_free.
1872         (munmap_listp_free_cleanup): Remove.
1873         (compile_object_load): Update.
1874         * compile/compile-object-load.h (struct munmap_list): Move from
1875         compile-object-load.c.  Rewrite.
1876
1877 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1878
1879         * aarch64-tdep.c (pass_in_v): Use register size.
1880         (aarch64_extract_return_value): Likewise.
1881         (aarch64_store_return_value): Likewise.
1882
1883 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1884
1885         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1886         rlim_t.
1887
1888 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1889
1890         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1891         Fix short help line.
1892
1893 2018-09-17  Tom Tromey  <tom@tromey.com>
1894
1895         PR python/20445:
1896         * configure: Rebuild.
1897         * configure.ac: Conditionally use -DNDEBUG for Python.
1898
1899 2018-09-17  Tom Tromey  <tom@tromey.com>
1900
1901         * configure: Rebuild.
1902         * configure.ac: Use gmp as a library dependency when checking for
1903         mpfr.
1904
1905 2018-09-17  Pedro Alves  <palves@redhat.com>
1906
1907         * python/py-inferior.c (find_inferior_object): Delete.
1908
1909 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1910
1911         * compile/compile-cplus-types.c
1912         (compile_cplus_instance::enter_scope): Don't use new_scope after
1913         std::move.
1914
1915 2018-09-17  Tom Tromey  <tom@tromey.com>
1916
1917         * common/pathstuff.c (get_standard_cache_dir): Use
1918         ~/Library/Caches on macOS.
1919         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1920
1921 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1922
1923         PR python/23669
1924         * breakpoint.c (commands_cmd_element): New.
1925         (_initialize_breakpoint): Assign commands_cmd_element.
1926         * breakpoint.h (commands_cmd_element): New.
1927         * cli/cli-script.c (while_cmd_element, if_command,
1928         define_cmd_element): New.
1929         (command_name_equals): Remove.
1930         (process_next_line): Compare commands by pointer, not by name.
1931         (_initialize_cli_script): Assign the various cmd_list_element
1932         variables.
1933         * compile/compile.c (compile_cmd_element): New.
1934         (_initialize_compile): Assign compile_cmd_element.
1935         * compile/compile.h (compile_cmd_element): New.
1936         * guile/guile.c (guile_cmd_element): New.
1937         (install_gdb_commands): Assign guile_cmd_element.
1938         * guile/guile.h (guile_cmd_element): New.
1939         * python/python.c (python_cmd_element): New.
1940         (_initialize_python): Assign python_cmd_element.
1941         * python/python.h (python_cmd_element): New.
1942         * tracepoint.c (while_stepping_cmd_element): New.
1943         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1944         * tracepoint.h (while_stepping_cmd_element): New.
1945
1946 2018-09-17  Tom Tromey  <tom@tromey.com>
1947
1948         * infrun.c (save_infcall_suspend_state): Return
1949         infcall_suspend_state_up.
1950         (save_infcall_control_state): Return infcall_control_state_up.
1951         * inferior.h (save_infcall_suspend_state)
1952         (save_infcall_control_state): Declare later.  Return unique
1953         pointers.
1954
1955 2018-09-17  Tom Tromey  <tom@tromey.com>
1956
1957         * infrun.c (struct stop_context): Declare constructor,
1958         destructor, "changed" method.
1959         (stop_context::stop_context): Rename from save_stop_context.
1960         (stop_context::~stop_context): Rename from
1961         release_stop_context_cleanup.
1962         (normal_stop): Update.
1963         (stop_context::changed): Rename from stop_context_changed.  Return
1964         bool.
1965
1966 2018-09-17  Tom Tromey  <tom@tromey.com>
1967
1968         * inferior.h (struct infcall_suspend_state_deleter): New.
1969         (infcall_suspend_state_up): New typedef.
1970         (struct infcall_control_state_deleter): New.
1971         (infcall_control_state_up): New typedef.
1972         (make_cleanup_restore_infcall_suspend_state)
1973         (make_cleanup_restore_infcall_control_state): Don't declare.
1974         * infcall.c (call_function_by_hand_dummy): Update.
1975         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1976         (make_cleanup_restore_infcall_suspend_state): Remove.
1977         (do_restore_infcall_control_state_cleanup)
1978         (make_cleanup_restore_infcall_control_state): Remove.
1979
1980 2018-09-17  Tom Tromey  <tom@tromey.com>
1981
1982         * gdbthread.h (struct thread_control_state): Add initializer.
1983         (class thread_info) <control>: Remove initializer.
1984         * inferior.h (struct inferior_control_state): Add initializer.
1985         (class inferior) <control>: Remove initializer.
1986         (exit_inferior_1): Update.
1987         * infrun.c (struct infcall_control_state): Add constructors.
1988         (save_infcall_control_state): Use new.
1989         (restore_infcall_control_state, discard_infcall_control_state):
1990         Use delete.
1991
1992 2018-09-17  Tom Tromey  <tom@tromey.com>
1993
1994         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1995         unique_ptr.
1996         <siginfo_data>: Now a unique_xmalloc_ptr.
1997         (save_infcall_suspend_state, restore_infcall_suspend_state)
1998         (discard_infcall_suspend_state)
1999         (get_infcall_suspend_state_regcache): Update.
2000
2001 2018-09-17  Tom Tromey  <tom@tromey.com>
2002
2003         * gdbthread.h (struct thread_suspend_state): Add initializers.
2004         (class thread_info) <suspend>: Remove initializer.
2005         * infrun.c (struct infcall_suspend_state): Add initializers.
2006         (save_infcall_suspend_state): Use new.
2007         (discard_infcall_suspend_state): Use delete.
2008
2009 2018-09-16  Tom Tromey  <tom@tromey.com>
2010
2011         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
2012         Remove.
2013         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
2014         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
2015         (py_varobj_iter_new): Likewise.
2016         (py_varobj_get_iterator): Use gdbpy_ref.
2017
2018 2018-09-16  Tom Tromey  <tom@tromey.com>
2019
2020         * python/py-threadevent.c (py_get_event_thread): Simplify.
2021         * python/py-inferior.c (infpy_thread_from_thread_handle):
2022         Return immediately after calling thread_to_thread_object.  Use
2023         Py_RETURN_NONE.
2024         (thread_to_thread_object): Set the exception on a NULL return.
2025
2026 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
2027
2028         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
2029
2030 2018-09-16  Tom Tromey  <tom@tromey.com>
2031
2032         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
2033         Remove.
2034
2035 2018-09-16  Tom Tromey  <tom@tromey.com>
2036
2037         * python/python-internal.h (thread_to_thread_object): Change
2038         return type.
2039         * python/py-inferior.c (thread_to_thread_object): Return a new
2040         reference.
2041         (infpy_thread_from_thread_handle): Update.
2042         * python/py-infthread.c (gdbpy_selected_thread): Update.
2043         * python/py-stopevent.c (create_stop_event_object): Update.
2044         * python/py-threadevent.c (py_get_event_thread): Return a new
2045         reference.
2046         (py_get_event_thread): Update.
2047         * python/py-event.h (py_get_event_thread): Change return type.
2048         * python/py-continueevent.c (create_continue_event_object):
2049         Update.
2050
2051 2018-09-16  Tom Tromey  <tom@tromey.com>
2052
2053         * python/py-progspace.c (pspy_get_objfiles): Update.
2054         * python/python-internal.h (objfile_to_objfile_object): Change
2055         return type.
2056         * python/py-newobjfileevent.c (create_new_objfile_event_object):
2057         Update.
2058         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2059         Update.
2060         * python/python.c (gdbpy_get_current_objfile): Update.
2061         (gdbpy_objfiles): Update.
2062         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
2063         Update.
2064         (objfile_to_objfile_object): Return a new reference.
2065         * python/py-symtab.c (stpy_get_objfile): Update.
2066         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
2067         Update.
2068
2069 2018-09-16  Tom Tromey  <tom@tromey.com>
2070
2071         * python/py-inferior.c (infpy_get_progspace): Update.
2072         * python/python-internal.h (pspace_to_pspace_object): Change
2073         return type.
2074         * python/py-newobjfileevent.c
2075         (create_clear_objfiles_event_object): Update.
2076         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
2077         Update.
2078         * python/python.c (gdbpy_get_current_progspace): Update.
2079         (gdbpy_progspaces): Update.
2080         * python/py-progspace.c (pspace_to_pspace_object): Return a new
2081         reference.
2082         * python/py-objfile.c (objfpy_get_progspace): Update.
2083         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
2084         Update.
2085
2086 2018-09-16  Tom Tromey  <tom@tromey.com>
2087
2088         * python/lib/gdb/__init__.py (current_progspace, objfiles)
2089         (solib_name, block_for_pc, find_pc_line): New functions.
2090         (execute_unwinders): Update.
2091         * python/py-block.c (gdbpy_block_for_pc): Remove.
2092         * python/py-inferior.c (infpy_get_progspace): New function.
2093         (inferior_object_getset) <progspace>: Add.
2094         * python/py-progspace.c (pspy_objfiles): Rewrite.
2095         (pspy_solib_name, pspy_block_for_pc)
2096         (pspy_find_pc_line, pspy_is_valid): New functions.
2097         (progspace_object_methods): Add entries for solib_name,
2098         block_for_pc, find_pc_line, is_valid.
2099         * python/python-internal.h (gdbpy_block_for_pc)
2100         (build_objfiles_list): Don't declare.
2101         * python/python.c: Don't include solib.h.
2102         (gdbpy_solib_name, gdbpy_find_pc_line)
2103         (gdbpy_get_current_progspace, build_objfiles_list)
2104         (gdbpy_objfiles): Remove.
2105         (GdbMethods) <current_progspace, objfiles, block_for_pc,
2106         solib_name, find_pc_line>: Remove entries.
2107
2108 2018-09-16  Tom Tromey  <tom@tromey.com>
2109
2110         * top.c (new_ui_command): Use GNU style for metasyntactic
2111         variables.
2112         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
2113         variables.
2114         * maint.c (maintenance_translate_address): Remove "<>" around
2115         text.
2116         * interps.c (interpreter_exec_cmd): Use GNU style for
2117         metasyntactic variables.
2118         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
2119         metasyntactic variables.
2120         * tracepoint.c (tfind_range_command): Use GNU style for
2121         metasyntactic variables.
2122         (tfind_outside_command): Likewise.
2123         (_initialize_tracepoint): Likewise.
2124         * remote.c (extended_remote_target::create_inferior): Use GNU
2125         style for metasyntactic variables.
2126         * sparc64-tdep.c (adi_examine_command): Use GNU style for
2127         metasyntactic variables.
2128         (adi_assign_command): Likewise.
2129
2130 2018-09-16  Tom Tromey  <tom@tromey.com>
2131
2132         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
2133         metasyntactic variables.  Print message if no disassembler options
2134         are available.
2135
2136 2018-09-15  Tom Tromey  <tom@tromey.com>
2137
2138         * infcmd.c (get_inferior_args): Return const char *.
2139         * inferior.h (get_inferior_args): Return type now const.
2140         * linux-tdep.c (linux_fill_prpsinfo): Update.
2141         * procfs.c (procfs_target::make_corefile_notes): Update.
2142
2143 2018-09-07  Tom Tromey  <tom@tromey.com>
2144
2145         * python/python.c (execute_gdb_command): Call bpstat_do_actions
2146         inside the TRY.
2147
2148 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
2149
2150         * nios2-tdep.c (nios2_type_align): New.
2151         (nios2_gdb_arch_init): Install type_align hook.
2152
2153 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
2154
2155         * eval.c (fake_method::fake_method): Call xzalloc directly for a
2156         type that is neither object file owned, nor gdbarch owned.
2157         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
2158         gdbarch is non-NULL.
2159         (alloc_type_instance): Allocate non-objfile owned types on the
2160         gdbarch obstack.
2161         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
2162         using TYPE_ALLOC to ensure memory is allocated on the correct
2163         obstack.
2164         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
2165         obstack, or the gdbarch obstack.
2166         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
2167
2168 2018-09-14  Tom Tromey  <tom@tromey.com>
2169
2170         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
2171         block.
2172
2173 2018-09-14  Tom Tromey  <tom@tromey.com>
2174
2175         * nat/fork-inferior.c (get_startup_shell): Remove "static".
2176
2177 2018-09-13  Tom Tromey  <tom@tromey.com>
2178
2179         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
2180         static.
2181
2182 2018-09-13  Tom Tromey  <tom@tromey.com>
2183
2184         * exec.c (try_open_exec_file): Use std::string.
2185
2186 2018-09-13  Tom Tromey  <tom@tromey.com>
2187
2188         * utils.h (gdb_bfd_errmsg): Return std::string.
2189         * exec.c (exec_file_attach): Update.
2190         * compile/compile-object-load.c (compile_object_load): Update.
2191         * utils.c (gdb_bfd_errmsg): Return std::string.
2192
2193 2018-09-13  Tom Tromey  <tom@tromey.com>
2194
2195         * procfs.c (struct procinfo_deleter): New.
2196         (procinfo_up): New typedef.
2197         (do_destroy_procinfo_cleanup): Remove.
2198         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
2199
2200 2018-09-13  Tom Tromey  <tom@tromey.com>
2201
2202         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2203
2204 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2205 2018-09-13  Tom Tromey  <tom@tromey.com>
2206
2207         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2208         (pspy_get_objfiles): New function.
2209         (progspace_object_methods): New.
2210         (pspace_object_type): Add tp_methods callback.
2211         * python/python-internal.h (build_objfiles_list): New
2212         declaration.
2213         * python/python.c (build_objfiles_list): New function.
2214         (gdbpy_objfiles): Implement using build_objfiles_list.
2215         * NEWS: Mention the Progspace.objfiles method.
2216
2217 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2218
2219         * python/py-inferior.c (infpy_get_progspace): New function.
2220         (inferior_object_getset): Add progspace property.
2221         * NEWS: Mention the new property.
2222
2223 2018-09-13  Tom Tromey  <tom@tromey.com>
2224
2225         PR rust/23650:
2226         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2227
2228 2018-09-13  Tom Tromey  <tom@tromey.com>
2229
2230         PR rust/23626:
2231         * rust-lang.c (rust_enum_variant): Now static.
2232         (rust_empty_enum_p): New function.
2233         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2234         Handle empty enum.
2235
2236 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2237
2238         * python/py-inferior.c (infpy_repr): New.
2239         (inferior_object_type): Register infpy_repr.
2240         * python/py-objfile.c (objfpy_repr): New.
2241         (objfile_object_type): Register objfpy_repr.
2242
2243 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2244
2245         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2246
2247 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2248
2249         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2250         typo.
2251
2252 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2253
2254         * common/common-utils.c: Don't include '<sys/stat.h>'.
2255         (is_regular_file): Move to...
2256         * common/filestuff.c (is_regular_file): ... here.
2257         * common/common-utils.h (is_regular_file): Move to...
2258         * common/filestuff.h (is_regular_file): ... here.
2259
2260 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2261
2262         * skip.c (debug_skip): New variable.
2263         (skiplist_entry::do_skip_file_p): Add debug output.
2264         (skiplist_entry::do_skip_gfile_p): Likewise.
2265         (skiplist_entry::skip_function_p): Likewise.
2266         (_initialize_step_skip): Create debug command.
2267         * NEWS: Mention set/show debug skip.
2268
2269 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2270
2271         * darwin-nat.c (should_disable_startup_with_shell):
2272         New function.
2273         (darwin_nat_target::create_inferior): Add call.
2274
2275 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2276
2277         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2278         inf_port, msg_state>: Initialize.
2279         (struct darwin_thread_info) <signaled, single_step>: Change
2280         type and initialize.
2281         (struct darwin_thread_info) <event>: Initialize.
2282
2283 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2284
2285         PR gdb/23555
2286         PR gdb/23558
2287         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2288         guesses.
2289
2290 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2291
2292         Revert:
2293         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2294
2295         PR gdb/23555
2296         PR gdb/23558
2297         * gnulib/aclocal.m4: Regenerate.
2298         * gnulib/config.in: Regenerate.
2299         * gnulib/configure: Regenerate.
2300         * gnulib/import/Makefile.am: Update.
2301         * gnulib/import/Makefile.in: Update.
2302         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2303         * gnulib/import/_Noreturn.h: ... this.
2304         * gnulib/import/alloca.in.h: Update.
2305         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2306         * gnulib/import/arg-nonnull.h: ... this.
2307         * gnulib/import/assure.h: Update.
2308         * gnulib/import/at-func.c: Update.
2309         * gnulib/import/basename-lgpl.c: Update.
2310         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2311         * gnulib/import/c++defs.h: ... this.
2312         * gnulib/import/canonicalize-lgpl.c: Update.
2313         * gnulib/import/cdefs.h: Update.
2314         * gnulib/import/chdir-long.c: Update.
2315         * gnulib/import/chdir-long.h: Update.
2316         * gnulib/import/cloexec.c: Update.
2317         * gnulib/import/cloexec.h: Update.
2318         * gnulib/import/close.c: Update.
2319         * gnulib/import/closedir.c: Update.
2320         * gnulib/import/config.charset: Update.
2321         * gnulib/import/dirent-private.h: Update.
2322         * gnulib/import/dirent.in.h: Update.
2323         * gnulib/import/dirfd.c: Update.
2324         * gnulib/import/dirname-lgpl.c: Update.
2325         * gnulib/import/dirname.h: Update.
2326         * gnulib/import/dosname.h: Update.
2327         * gnulib/import/dup-safer-flag.c: Update.
2328         * gnulib/import/dup-safer.c: Update.
2329         * gnulib/import/dup.c: Update.
2330         * gnulib/import/dup2.c: Update.
2331         * gnulib/import/errno.in.h: Update.
2332         * gnulib/import/error.c: Update.
2333         * gnulib/import/error.h: Update.
2334         * gnulib/import/exitfail.c: Update.
2335         * gnulib/import/exitfail.h: Update.
2336         * gnulib/import/extra/update-copyright: Update.
2337         * gnulib/import/fchdir.c: Update.
2338         * gnulib/import/fcntl.c: Update.
2339         * gnulib/import/fcntl.in.h: Update.
2340         * gnulib/import/fd-hook.c: Update.
2341         * gnulib/import/fd-hook.h: Update.
2342         * gnulib/import/fd-safer-flag.c: Update.
2343         * gnulib/import/fd-safer.c: Update.
2344         * gnulib/import/fdopendir.c: Update.
2345         * gnulib/import/filename.h: Update.
2346         * gnulib/import/filenamecat-lgpl.c: Update.
2347         * gnulib/import/filenamecat.h: Update.
2348         * gnulib/import/flexmember.h: Update.
2349         * gnulib/import/float+.h: Update.
2350         * gnulib/import/float.c: Update.
2351         * gnulib/import/float.in.h: Update.
2352         * gnulib/import/fnmatch.c: Update.
2353         * gnulib/import/fnmatch.in.h: Update.
2354         * gnulib/import/fnmatch_loop.c: Update.
2355         * gnulib/import/fpucw.h: Update.
2356         * gnulib/import/frexp.c: Update.
2357         * gnulib/import/frexpl.c: Update.
2358         * gnulib/import/fstat.c: Update.
2359         * gnulib/import/fstatat.c: Update.
2360         * gnulib/import/getcwd-lgpl.c: Update.
2361         * gnulib/import/getcwd.c: Update.
2362         * gnulib/import/getdtablesize.c: Update.
2363         * gnulib/import/getlogin_r.c: Update.
2364         * gnulib/import/getprogname.c: Update.
2365         * gnulib/import/getprogname.h: Update.
2366         * gnulib/import/gettext.h: Update.
2367         * gnulib/import/gettimeofday.c: Update.
2368         * gnulib/import/glob-libc.h: Update.
2369         * gnulib/import/glob.c: Update.
2370         * gnulib/import/glob.in.h: Update.
2371         * gnulib/import/glob_internal.h: Update.
2372         * gnulib/import/glob_pattern_p.c: Update.
2373         * gnulib/import/globfree.c: Update.
2374         * gnulib/import/hard-locale.c: Update.
2375         * gnulib/import/hard-locale.h: Update.
2376         * gnulib/import/intprops.h: Update.
2377         * gnulib/import/inttypes.in.h: Update.
2378         * gnulib/import/isnan.c: Update.
2379         * gnulib/import/isnand-nolibm.h: Update.
2380         * gnulib/import/isnand.c: Update.
2381         * gnulib/import/isnanl-nolibm.h: Update.
2382         * gnulib/import/isnanl.c: Update.
2383         * gnulib/import/itold.c: Update.
2384         * gnulib/import/libc-config.h: Update.
2385         * gnulib/import/limits.in.h: Update.
2386         * gnulib/import/localcharset.c: Update.
2387         * gnulib/import/localcharset.h: Update.
2388         * gnulib/import/localtime-buffer.c: Update.
2389         * gnulib/import/localtime-buffer.h: Update.
2390         * gnulib/import/lstat.c: Update.
2391         * gnulib/import/m4/00gnulib.m4: Update.
2392         * gnulib/import/m4/__inline.m4: Update.
2393         * gnulib/import/m4/absolute-header.m4: Update.
2394         * gnulib/import/m4/alloca.m4: Update.
2395         * gnulib/import/m4/builtin-expect.m4: Update.
2396         * gnulib/import/m4/canonicalize.m4: Update.
2397         * gnulib/import/m4/chdir-long.m4: Update.
2398         * gnulib/import/m4/close.m4: Update.
2399         * gnulib/import/m4/closedir.m4: Update.
2400         * gnulib/import/m4/configmake.m4: Update.
2401         * gnulib/import/m4/d-ino.m4: Update.
2402         * gnulib/import/m4/d-type.m4: Update.
2403         * gnulib/import/m4/dirent_h.m4: Update.
2404         * gnulib/import/m4/dirfd.m4: Update.
2405         * gnulib/import/m4/dirname.m4: Update.
2406         * gnulib/import/m4/double-slash-root.m4: Update.
2407         * gnulib/import/m4/dup.m4: Update.
2408         * gnulib/import/m4/dup2.m4: Update.
2409         * gnulib/import/m4/eealloc.m4: Update.
2410         * gnulib/import/m4/environ.m4: Update.
2411         * gnulib/import/m4/errno_h.m4: Update.
2412         * gnulib/import/m4/error.m4: Update.
2413         * gnulib/import/m4/exponentd.m4: Update.
2414         * gnulib/import/m4/exponentl.m4: Update.
2415         * gnulib/import/m4/extensions.m4: Update.
2416         * gnulib/import/m4/extern-inline.m4: Update.
2417         * gnulib/import/m4/fchdir.m4: Update.
2418         * gnulib/import/m4/fcntl-o.m4: Update.
2419         * gnulib/import/m4/fcntl.m4: Update.
2420         * gnulib/import/m4/fcntl_h.m4: Update.
2421         * gnulib/import/m4/fdopendir.m4: Update.
2422         * gnulib/import/m4/filenamecat.m4: Update.
2423         * gnulib/import/m4/flexmember.m4: Update.
2424         * gnulib/import/m4/float_h.m4: Update.
2425         * gnulib/import/m4/fnmatch.m4: Update.
2426         * gnulib/import/m4/fnmatch_h.m4: Update.
2427         * gnulib/import/m4/fpieee.m4: Update.
2428         * gnulib/import/m4/frexp.m4: Update.
2429         * gnulib/import/m4/frexpl.m4: Update.
2430         * gnulib/import/m4/fstat.m4: Update.
2431         * gnulib/import/m4/fstatat.m4: Update.
2432         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2433         * gnulib/import/m4/getcwd-path-max.m4: Update.
2434         * gnulib/import/m4/getcwd.m4: Update.
2435         * gnulib/import/m4/getdtablesize.m4: Update.
2436         * gnulib/import/m4/getlogin.m4: Update.
2437         * gnulib/import/m4/getlogin_r.m4: Update.
2438         * gnulib/import/m4/getpagesize.m4: Update.
2439         * gnulib/import/m4/getprogname.m4: Update.
2440         * gnulib/import/m4/gettimeofday.m4: Update.
2441         * gnulib/import/m4/glibc21.m4: Update.
2442         * gnulib/import/m4/glob.m4: Update.
2443         * gnulib/import/m4/glob_h.m4: Update.
2444         * gnulib/import/m4/gnulib-cache.m4: Update.
2445         * gnulib/import/m4/gnulib-common.m4: Update.
2446         * gnulib/import/m4/gnulib-comp.m4: Update.
2447         * gnulib/import/m4/gnulib-tool.m4: Update.
2448         * gnulib/import/m4/hard-locale.m4: Update.
2449         * gnulib/import/m4/include_next.m4: Update.
2450         * gnulib/import/m4/inttypes-pri.m4: Update.
2451         * gnulib/import/m4/inttypes.m4: Update.
2452         * gnulib/import/m4/isnand.m4: Update.
2453         * gnulib/import/m4/isnanl.m4: Update.
2454         * gnulib/import/m4/largefile.m4: Update.
2455         * gnulib/import/m4/limits-h.m4: Update.
2456         * gnulib/import/m4/localcharset.m4: Update.
2457         * gnulib/import/m4/locale-fr.m4: Update.
2458         * gnulib/import/m4/locale-ja.m4: Update.
2459         * gnulib/import/m4/locale-zh.m4: Update.
2460         * gnulib/import/m4/localtime-buffer.m4: Update.
2461         * gnulib/import/m4/longlong.m4: Update.
2462         * gnulib/import/m4/lstat.m4: Update.
2463         * gnulib/import/m4/malloc.m4: Update.
2464         * gnulib/import/m4/malloca.m4: Update.
2465         * gnulib/import/m4/math_h.m4: Update.
2466         * gnulib/import/m4/mbrtowc.m4: Update.
2467         * gnulib/import/m4/mbsinit.m4: Update.
2468         * gnulib/import/m4/mbsrtowcs.m4: Update.
2469         * gnulib/import/m4/mbstate_t.m4: Update.
2470         * gnulib/import/m4/memchr.m4: Update.
2471         * gnulib/import/m4/memmem.m4: Update.
2472         * gnulib/import/m4/mempcpy.m4: Update.
2473         * gnulib/import/m4/memrchr.m4: Update.
2474         * gnulib/import/m4/mkdir.m4: Update.
2475         * gnulib/import/m4/mkstemp.m4: Update.
2476         * gnulib/import/m4/mmap-anon.m4: Update.
2477         * gnulib/import/m4/mode_t.m4: Update.
2478         * gnulib/import/m4/msvc-inval.m4: Update.
2479         * gnulib/import/m4/msvc-nothrow.m4: Update.
2480         * gnulib/import/m4/multiarch.m4: Update.
2481         * gnulib/import/m4/nocrash.m4: Update.
2482         * gnulib/import/m4/off_t.m4: Update.
2483         * gnulib/import/m4/onceonly.m4: Update.
2484         * gnulib/import/m4/open-cloexec.m4: Update.
2485         * gnulib/import/m4/open.m4: Update.
2486         * gnulib/import/m4/openat.m4: Update.
2487         * gnulib/import/m4/opendir.m4: Update.
2488         * gnulib/import/m4/pathmax.m4: Update.
2489         * gnulib/import/m4/rawmemchr.m4: Update.
2490         * gnulib/import/m4/readdir.m4: Update.
2491         * gnulib/import/m4/readlink.m4: Update.
2492         * gnulib/import/m4/realloc.m4: Update.
2493         * gnulib/import/m4/rename.m4: Update.
2494         * gnulib/import/m4/rewinddir.m4: Update.
2495         * gnulib/import/m4/rmdir.m4: Update.
2496         * gnulib/import/m4/save-cwd.m4: Update.
2497         * gnulib/import/m4/secure_getenv.m4: Update.
2498         * gnulib/import/m4/setenv.m4: Update.
2499         * gnulib/import/m4/signal_h.m4: Update.
2500         * gnulib/import/m4/ssize_t.m4: Update.
2501         * gnulib/import/m4/stat-time.m4: Update.
2502         * gnulib/import/m4/stat.m4: Update.
2503         * gnulib/import/m4/std-gnu11.m4: Update.
2504         * gnulib/import/m4/stdbool.m4: Update.
2505         * gnulib/import/m4/stddef_h.m4: Update.
2506         * gnulib/import/m4/stdint.m4: Update.
2507         * gnulib/import/m4/stdio_h.m4: Update.
2508         * gnulib/import/m4/stdlib_h.m4: Update.
2509         * gnulib/import/m4/strchrnul.m4: Update.
2510         * gnulib/import/m4/strdup.m4: Update.
2511         * gnulib/import/m4/strerror.m4: Update.
2512         * gnulib/import/m4/string_h.m4: Update.
2513         * gnulib/import/m4/strstr.m4: Update.
2514         * gnulib/import/m4/strtok_r.m4: Update.
2515         * gnulib/import/m4/sys_socket_h.m4: Update.
2516         * gnulib/import/m4/sys_stat_h.m4: Update.
2517         * gnulib/import/m4/sys_time_h.m4: Update.
2518         * gnulib/import/m4/sys_types_h.m4: Update.
2519         * gnulib/import/m4/tempname.m4: Update.
2520         * gnulib/import/m4/time_h.m4: Update.
2521         * gnulib/import/m4/unistd-safer.m4: Update.
2522         * gnulib/import/m4/unistd_h.m4: Update.
2523         * gnulib/import/m4/warn-on-use.m4: Update.
2524         * gnulib/import/m4/wchar_h.m4: Update.
2525         * gnulib/import/m4/wchar_t.m4: Update.
2526         * gnulib/import/m4/wctype_h.m4: Update.
2527         * gnulib/import/m4/wint_t.m4: Update.
2528         * gnulib/import/malloc.c: Update.
2529         * gnulib/import/malloc/scratch_buffer.h: Update.
2530         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2531         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2532         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2533         * gnulib/import/malloca.c: Update.
2534         * gnulib/import/malloca.h: Update.
2535         * gnulib/import/malloca.valgrind: Update.
2536         * gnulib/import/math.in.h: Update.
2537         * gnulib/import/mbrtowc.c: Update.
2538         * gnulib/import/mbsinit.c: Update.
2539         * gnulib/import/mbsrtowcs-impl.h: Update.
2540         * gnulib/import/mbsrtowcs-state.c: Update.
2541         * gnulib/import/mbsrtowcs.c: Update.
2542         * gnulib/import/memchr.c: Update.
2543         * gnulib/import/memmem.c: Update.
2544         * gnulib/import/mempcpy.c: Update.
2545         * gnulib/import/memrchr.c: Update.
2546         * gnulib/import/mkdir.c: Update.
2547         * gnulib/import/mkstemp.c: Update.
2548         * gnulib/import/msvc-inval.c: Update.
2549         * gnulib/import/msvc-inval.h: Update.
2550         * gnulib/import/msvc-nothrow.c: Update.
2551         * gnulib/import/msvc-nothrow.h: Update.
2552         * gnulib/import/open.c: Update.
2553         * gnulib/import/openat-die.c: Update.
2554         * gnulib/import/openat-priv.h: Update.
2555         * gnulib/import/openat-proc.c: Update.
2556         * gnulib/import/openat.c: Update.
2557         * gnulib/import/openat.h: Update.
2558         * gnulib/import/opendir.c: Update.
2559         * gnulib/import/pathmax.h: Update.
2560         * gnulib/import/pipe-safer.c: Update.
2561         * gnulib/import/rawmemchr.c: Update.
2562         * gnulib/import/readdir.c: Update.
2563         * gnulib/import/readlink.c: Update.
2564         * gnulib/import/realloc.c: Update.
2565         * gnulib/import/ref-add.sin: Update.
2566         * gnulib/import/ref-del.sin: Update.
2567         * gnulib/import/rename.c: Update.
2568         * gnulib/import/rewinddir.c: Update.
2569         * gnulib/import/rmdir.c: Update.
2570         * gnulib/import/same-inode.h: Update.
2571         * gnulib/import/save-cwd.c: Update.
2572         * gnulib/import/save-cwd.h: Update.
2573         * gnulib/import/scratch_buffer.h: Update.
2574         * gnulib/import/secure_getenv.c: Update.
2575         * gnulib/import/setenv.c: Update.
2576         * gnulib/import/signal.in.h: Update.
2577         * gnulib/import/stat-time.c: Update.
2578         * gnulib/import/stat-time.h: Update.
2579         * gnulib/import/stat-w32.c: Update.
2580         * gnulib/import/stat-w32.h: Update.
2581         * gnulib/import/stat.c: Update.
2582         * gnulib/import/stdbool.in.h: Update.
2583         * gnulib/import/stddef.in.h: Update.
2584         * gnulib/import/stdint.in.h: Update.
2585         * gnulib/import/stdio.in.h: Update.
2586         * gnulib/import/stdlib.in.h: Update.
2587         * gnulib/import/str-two-way.h: Update.
2588         * gnulib/import/strchrnul.c: Update.
2589         * gnulib/import/strdup.c: Update.
2590         * gnulib/import/streq.h: Update.
2591         * gnulib/import/strerror-override.c: Update.
2592         * gnulib/import/strerror-override.h: Update.
2593         * gnulib/import/strerror.c: Update.
2594         * gnulib/import/string.in.h: Update.
2595         * gnulib/import/stripslash.c: Update.
2596         * gnulib/import/strnlen1.c: Update.
2597         * gnulib/import/strnlen1.h: Update.
2598         * gnulib/import/strstr.c: Update.
2599         * gnulib/import/strtok_r.c: Update.
2600         * gnulib/import/sys_stat.in.h: Update.
2601         * gnulib/import/sys_time.in.h: Update.
2602         * gnulib/import/sys_types.in.h: Update.
2603         * gnulib/import/tempname.c: Update.
2604         * gnulib/import/tempname.h: Update.
2605         * gnulib/import/time.in.h: Update.
2606         * gnulib/import/unistd--.h: Update.
2607         * gnulib/import/unistd-safer.h: Update.
2608         * gnulib/import/unistd.in.h: Update.
2609         * gnulib/import/unsetenv.c: Update.
2610         * gnulib/import/verify.h: Update.
2611         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2612         * gnulib/import/wchar.in.h: Update.
2613         * gnulib/import/wctype.in.h: Update.
2614         * gnulib/import/xalloc-oversized.h: Update.
2615         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2616         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2617
2618 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2619
2620         * record-btrace.c (get_thread_current_frame): Remove
2621         old_inferior_ptid.
2622
2623 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2624
2625         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2626         with check_tag to 1 if and only if the type is tagged and the
2627         component being searched cannot been found in the current
2628         view. Otherwise, always call ada_to_fixed_type with
2629         check_tag to 0.
2630
2631 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2632
2633         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2634         declaration.
2635         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2636         * ada-varobj.c (ada_varobj_get_number_of_children,
2637         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2638
2639 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2640
2641         * ada-valprint.c (ada_value_print): Use type instead of
2642         enclosing type.
2643
2644 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2645
2646         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2647         an array of access to unconstrained array.
2648
2649 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2650
2651         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2652         (ada_check_typedef): Use it.
2653
2654 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2655
2656         * ada-varobj.c (ada_varobj_describe_struct_child)
2657         (ada_varobj_describe_child): Handle union case like struct one.
2658
2659 2018-09-10  Tom Tromey  <tom@tromey.com>
2660
2661         PR python/18380:
2662         * python/python.c (_initialize_python): Make example in "python"
2663         help work in Python 3.
2664
2665 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2666
2667         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2668         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2669         $(EXEEXT) to the script, as it is not a program.
2670
2671 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2672
2673         * python/py-prettyprint.c (pretty_print_one_value): Return
2674         gdbpy_ref<>.
2675         (print_string_repr): Adjust.
2676         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2677         * python/python-internal.h (apply_varobj_pretty_printer): Return
2678         gdbpy_ref<>.
2679         * varobj.c (varobj_value_get_print_value): Adjust.
2680
2681 2018-09-08  Tom Tromey  <tom@tromey.com>
2682
2683         PR python/16047:
2684         * python/py-prettyprint.c (pretty_print_one_value): Check for
2685         to_string method.
2686
2687 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2688
2689         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2690         replace_operator_with_call.
2691
2692 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2693
2694         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2695
2696 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2697
2698         * ada-typeprint.c (print_range): Print the bounds using TYPE
2699         rather than its TYPE_TARGET_TYPE.
2700
2701 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2702
2703         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2704         call to ada_to_fixed_value_create.
2705
2706 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2707
2708         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2709
2710 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2711
2712         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2713         by calls to error.
2714
2715 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2716
2717         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2718         Move update of loop variable "fi".
2719
2720 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2721
2722         * ada-lang.c (value_assign_to_component): In the case of
2723         big-endian targets, extract the bits of the given VAL
2724         using an src_offset of zero if container is not a scalar.
2725
2726 2018-09-06  Simon Ser  <contact@emersion.fr>
2727
2728         PR gdb/23105
2729         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2730         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2731         * fbsd-tdep.c (fbsd_make_note_desc): New.
2732         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2733         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2734         * target.h (enum target_object) Add FreeBSD-specific
2735         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2736
2737 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2738
2739         * compile/compile-c.h (generate_c_for_variable_locations):
2740         Change reference to pointer.
2741         * compile/compile-c-support.c (compile_program) <compute>:
2742         Likewise.
2743         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2744         (generate_c_for_for_one_variable): Likewise
2745         (generate_c_for_variable_locations): Likewise
2746         * compile/compile-c-types.c (compile_c_instance::convert_type):
2747         Likewise
2748         * compile/compile-cplus-symbols.c (convert_one_symbol):
2749         std::move the scope passed to enter_scope.
2750         * compile/compile-cplus-types.c
2751         (compile_cplus_instance::enter_scope): Make parameter
2752         rvalue-reference.
2753         (compile_cplus_instance::new_scope): Change reference to
2754         pointer.
2755         (compile_cplus_instance::convert_type): Likewise
2756         (compile_cplus_convert_typedef): std::move the scope passed to
2757         enter_scope.
2758         (compile_cplus_convert_struct_or_union): Likewise.
2759         (compile_cplus_convert_enum): Likewise.
2760         (compile_cplus_convert_namespace): Likewise.
2761         * compile/compile-cplus.h (compile_cplus_instance)
2762         <enter_scope>: Make parameter rvalue-reference.
2763         * compile/compile-internal.h (compile_instance)
2764         <get_cached_type>: Likewise
2765         * compile/compile-loc2c.c (push): Likewise
2766         (pushf): Likewise
2767         (unary): Likewise
2768         (binary): Likewise
2769         (print_label): Likewise
2770         (pushf_register_address): Likewise
2771         (pushf_register): Likewise
2772         (do_compile_dwarf_expr_to_c): Likewise
2773         (compile_dwarf_expr_to_c): Likewise
2774         (compile_dwarf_bounds_to_c): Likewise
2775         * compile/compile.c (compile_instance::get_cached_type):
2776         Likewise
2777         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2778         (compile_dwarf_bounds_to_c): Likewise
2779         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2780         (dwarf2_compile_property_to_c): Likewise
2781         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2782         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2783         Likewise
2784
2785 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2786
2787         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2788         * tui/tui-data.c (init_content_element): Don't initialize it.
2789
2790 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2791
2792         * tui/tui-data.h (struct tui_win_info)
2793         <detail::opaque>: Remove.
2794         * tui/tui-data.c (init_win_info): Remove assignment.
2795
2796 2018-09-05  Tom Tromey  <tom@tromey.com>
2797
2798         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2799         -Wformat-nonliteral.
2800         * target-float.c (host_float_ops<T>::to_string)
2801         (host_float_ops<T>::from_string): Use
2802         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2803         * configure: Rebuild.
2804
2805 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2806
2807         * printcmd.c (printf_c_string): Use
2808         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2809         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2810
2811 2018-09-05  Tom Tromey  <tom@tromey.com>
2812
2813         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2814
2815 2018-09-05  Tom de Vries  <tdevries@suse.de>
2816
2817         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2818         with resolve_abstract_p == true.
2819         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2820         defaulting to false. Propagate resolve_abstract_p to
2821         dwarf2_fetch_die_loc_sect_off.
2822         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2823         parameter, defaulting to false.
2824         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2825         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2826         parameter.
2827         * dwarf2read.h (struct die_info): Forward-declare.
2828         (die_info_ptr): New typedef.
2829         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2830
2831 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2832
2833         GDB 8.2 released.
2834
2835 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2836             Pedro Alves  <palves@redhat.com>
2837
2838         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2839         "aclocal-m4-deps.mk".  Include file here.
2840         $(srcdir)/aclocal.m4: Add "configure.ac".
2841         * gnulib/aclocal-m4-deps.mk: New file.
2842         * gnulib/update-gnulib.sh: Automatically update
2843         "aclocal-m4-deps.mk".
2844
2845 2018-09-04  Tom Tromey  <tom@tromey.com>
2846
2847         * configure: Rebuild.
2848         * configure.ac: Remove multi-ice code.
2849
2850 2018-09-04  Tom Tromey  <tom@tromey.com>
2851
2852         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2853         (ada-exp.o): Update.
2854
2855 2018-09-04  Tom Tromey  <tom@tromey.com>
2856
2857         * Makefile.in (printcmd.o, target-float.o): Remove.
2858         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2859
2860 2018-09-04  Tom Tromey  <tom@tromey.com>
2861
2862         * gnulib/Makefile.in: Remove obsolete comment.
2863         * Makefile.in: Remove obsolete comment.
2864
2865 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2866
2867         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2868         line with '+'.
2869
2870 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2871
2872         * riscv-tdep.c: Add 'prologue-value.h' include.
2873         (struct riscv_unwind_cache): New struct.
2874         (riscv_debug_unwinder): New global.
2875         (riscv_scan_prologue): Update arguments, capture register details
2876         from prologue scan.
2877         (riscv_skip_prologue): Reformat arguments line, move end of
2878         prologue calculation into riscv_scan_prologue.
2879         (riscv_frame_cache): Update return type, create
2880         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2881         details.
2882         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2883         (riscv_frame_prev_register): Use the trad_frame within the
2884         riscv_unwind_cache.
2885         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2886         flag.
2887
2888 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2889
2890         * trad-frame.h (trad_frame_set_realreg): Declare.
2891         (trad_frame_set_addr): Declare.
2892         * trad-frame.c (trad_frame_set_realreg): Define new function.
2893         (trad_frame_set_addr): Define new function.
2894         (trad_frame_set_reg_realreg): Use new function.
2895         (trad_frame_set_reg_addr): Use new function.
2896
2897 2018-09-01  Keith Seitz  <keiths@redhat.com>
2898
2899         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2900         pulongest instead of "%lld".
2901         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2902         ATTRIBUTE_UNUSED.
2903
2904 2018-08-31  Tom Tromey  <tom@tromey.com>
2905
2906         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2907         variant part type.
2908
2909 2018-08-31  Pedro Alves  <palves@redhat.com>
2910
2911         * gdbarch.h: Regenerate.
2912
2913 2018-08-31  Pedro Alves  <palves@redhat.com>
2914
2915         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2916         * target.h (Hardware watchpoint interfaces): Describe
2917         continuable/steppable/non-steppable watchpoints.
2918         * gdbarch.h, gdbarch.c: Regenerate.
2919
2920 2018-08-31  Pedro Alves  <palves@redhat.com>
2921
2922         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2923         Delete.
2924         * s390-linux-nat.c
2925         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2926         * target.h (target_ops::have_continuable_watchpoint): Delete.
2927         (target_have_continuable_watchpoint): Delete.
2928         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2929         * target-delegates.c: Regenerate.
2930
2931 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2932
2933         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2934         the files present in "gnulib/import/m4/".
2935
2936 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2937
2938         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2939         c.sw, c.swsp, and c.sdsp.
2940
2941 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2942
2943         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2944         (riscv_read_misa_reg): Don't cache value read into inferior data.
2945         (riscv_new_inferior_data): Delete.
2946         (riscv_inferior_data_cleanup): Delete.
2947         (riscv_inferior_data): Delete.
2948         (riscv_invalidate_inferior_data): Delete.
2949         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2950
2951 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2952
2953         * compile/compile-cplus-types.c
2954         (compile_cplus_instance::leave_scope): Take the address of scope
2955         object.
2956         (compile_cplus_instance::convert_qualified_base): Compare quals
2957         to 0.
2958
2959 2018-08-30  Keith Seitz  <keiths@redhat.com>
2960
2961         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2962         Use "%s" and host_address_to_string instead of "%p" in printf.
2963
2964 2018-08-29  Keith Seitz  <keiths@redhat.com>
2965
2966         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2967         and compile-cplus-types.c.
2968         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2969         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2970         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2971         Declare.
2972         * compile/compile-c-support.c: Include compile-cplus.h.
2973         (load_libcompile): Templatize.
2974         (get_compile_context): "New" function.
2975         (c_get_compile_context): Use get_compile_context.
2976         (cplus_get_compile_context): New function.
2977         (cplus_push_user_expression, cplus_pop_user_expression)
2978         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2979         (cplus_compute_program): Define new structs/functions.
2980         * compile/compile-cplus-symmbols.c: New file.
2981         * compile/compile-cplus-types.c: New file.
2982         * compile/compile-cplus.h: New file.
2983         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2984         Declare.
2985         * compile/compile-object-load.c (get_out_value_type): Use
2986         strncmp_iw when comparing symbol names.
2987         (compile_object_load): Add mst_bss and mst_data.
2988         * compile/compile.c (_initialize_compile): Remove
2989         -Wno-implicit-function-declaration from `compile_args'.
2990         * compile/gcc-cp-plugin.h: New file.
2991         * NEWS: Mention C++ compile support and new debug options.
2992
2993 2018-08-29  Keith Seitz  <keiths@redhat.com>
2994
2995         * linespec.c (collect_info::add_symbol): Make virtual.
2996         (struct symbol_searcher_collect_info): New struct.
2997         (symbol_searcher::find_all_symbols): New method.
2998         * symtab.h (class symbol_searcher): New class.
2999
3000 2018-08-29  Keith Seitz  <keiths@redhat.com>
3001
3002         * linespec.c (struct linespec) <function_symbols, label_symbols>:
3003         Change to vector of block_symbol.  Update all users.
3004         (struct collect_info) <symbols>: Likewise.
3005         (collect_info::add_symbol): Take block_symbol as argument.
3006         Update all callers.
3007         (decode_compound_collector) <m_symbols>: Change type to vector
3008         of block_symbol.  Update all users.
3009         (decode_compound_collector::operator ()): Change parameter type
3010         to block_symbol.
3011         (find_method, find_function_symbols, find_linespec_symbols)
3012         (find_label_symbols_in_block, find_label_symbols): Change symbol
3013         vectors to block_symbol vectors.
3014         * symtab.h (symbol_found_callback_ftype): Change parameter type to
3015         block_symbol.
3016
3017 2018-08-29  Keith Seitz  <keiths@redhat.com>
3018
3019         * linespec.c (symbolp): Remove typedef and VEC definitions.
3020         (bound_minimal_symbol_d): Likewise.
3021
3022 2018-08-29  Keith Seitz  <keiths@redhat.com>
3023
3024         * linespec.c (decode_compound_collector::decode_compound_collector):
3025         Remove initialization for `m_symtabs'.
3026         (decode_compound_collector::release_symbols): Change return type
3027         to std::vector.  Update all callers.
3028         (class decode_compound_collector) <m_symbols>: Change type to
3029         std::vector.
3030         (lookup_prefix_sym): Change return type to std::vector.  Update all
3031         callers.
3032         (compare_symbols): Remove.
3033         (std_compare_symbols): Rename to `compare_symbols'.
3034         (find_method): Change `sym_classes' parameter to std::vector.
3035         Update all callers.  Use std::sort to sort sym_classes.
3036         (find_linespec_symbols): Remove cleanup.
3037
3038 2018-08-29  Keith Seitz  <keiths@redhat.com>
3039
3040         * linespec.c (struct linespec) <minimal_symbols>: Change type to
3041         std::vector.  Update all users.
3042         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
3043         (struct collect_info) <minimal_symbols>: Likewise.
3044         (compare_msymbols): Return bool.  Change parameters to const
3045         bound_minimal_symbol references.
3046         (find_method, find_function_symbols, find_linespec_symbols): Change
3047         `minsyms' parameter to std::vector.  Update all callers.
3048
3049 2018-08-29  Keith Seitz  <keiths@redhat.com>
3050
3051         * linespec.c (struct linespec) <label_symbols>: Change type to
3052         std::vector.  Update all users.
3053         (find_label_symbols_in_block): Change `result' parameter to
3054         std::vector.  Update all callers.
3055         (find_label_symbols): Return std::vector.  Update all callers.
3056
3057 2018-08-29  Keith Seitz  <keiths@redhat.com>
3058
3059         * linespec.c (struct linespec) <function_symbols>: Change type to
3060         std::vector.  Update all users.
3061         (struct collect_info) <function_symbols>: Likewise.
3062         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
3063         (std_compare_symbols): New function.
3064         (find_method, find_function_symbols, find_linespec_symbols)
3065         (find_label_symbols_in_block): Change `symbols' parameter to
3066         std::vector.  Update all callers.
3067         (find_label_symbols): Likewise for `function_symbols' and
3068         `label_funcs_ret'.
3069
3070 2018-08-29  Keith Seitz  <keiths@redhat.com>
3071
3072         * linespec.c (symtab_vector_up): Define.
3073         (struct linespec) <file_symtabs>: Change type to std::vector *.
3074         Update all uses.
3075         (struct collect_info) <file_symtabs>: Likewise.
3076         (collect_symtabs_from_filename): Return symtab_vector_up.
3077         Update all callers.
3078         (decode_objc): Remove cleanup.
3079         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
3080         (symtab_collector::release_symtabs): Return symtab_vector_up.
3081         Update all callers.
3082         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
3083         Update all users.
3084         (collect_symtabs_from_filename, symtabs_from_filename): Return
3085         symtab_vector_up.  Update all callers.
3086
3087 2018-08-29  Tom Tromey  <tom@tromey.com>
3088
3089         * csky-tdep.c (csky_analyze_prologue): Use
3090         core_addr_to_string_nz.
3091
3092 2018-08-29  Tom Tromey  <tom@tromey.com>
3093
3094         * windows-nat.c (struct xlate_exception) <them>: Change type to
3095         DWORD.
3096         (xlate): Fix formatting.  Remove last entry.
3097         (struct xlate_exception, xlate): Comment out.
3098         (windows_nat_target::resume): Use ranged for.
3099
3100 2018-08-29  Jim Wilson  <jimw@sifive.com>
3101
3102         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
3103         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
3104         of NT_PRFPREG.
3105         (riscv_linux_nat_target::store_registers): Likewise.
3106
3107 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
3108
3109         PR gdb/23555
3110         PR gdb/23558
3111         * gnulib/aclocal.m4: Regenerate.
3112         * gnulib/config.in: Regenerate.
3113         * gnulib/configure: Regenerate.
3114         * gnulib/import/Makefile.am: Update.
3115         * gnulib/import/Makefile.in: Update.
3116         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
3117         * gnulib/import/_Noreturn.h: ... this.
3118         * gnulib/import/alloca.in.h: Update.
3119         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
3120         * gnulib/import/arg-nonnull.h: ... this.
3121         * gnulib/import/assure.h: Update.
3122         * gnulib/import/at-func.c: Update.
3123         * gnulib/import/basename-lgpl.c: Update.
3124         * gnulib/import/extra/snippet/c++defs.h: Rename to...
3125         * gnulib/import/c++defs.h: ... this.
3126         * gnulib/import/canonicalize-lgpl.c: Update.
3127         * gnulib/import/cdefs.h: Update.
3128         * gnulib/import/chdir-long.c: Update.
3129         * gnulib/import/chdir-long.h: Update.
3130         * gnulib/import/cloexec.c: Update.
3131         * gnulib/import/cloexec.h: Update.
3132         * gnulib/import/close.c: Update.
3133         * gnulib/import/closedir.c: Update.
3134         * gnulib/import/config.charset: Update.
3135         * gnulib/import/dirent-private.h: Update.
3136         * gnulib/import/dirent.in.h: Update.
3137         * gnulib/import/dirfd.c: Update.
3138         * gnulib/import/dirname-lgpl.c: Update.
3139         * gnulib/import/dirname.h: Update.
3140         * gnulib/import/dosname.h: Update.
3141         * gnulib/import/dup-safer-flag.c: Update.
3142         * gnulib/import/dup-safer.c: Update.
3143         * gnulib/import/dup.c: Update.
3144         * gnulib/import/dup2.c: Update.
3145         * gnulib/import/errno.in.h: Update.
3146         * gnulib/import/error.c: Update.
3147         * gnulib/import/error.h: Update.
3148         * gnulib/import/exitfail.c: Update.
3149         * gnulib/import/exitfail.h: Update.
3150         * gnulib/import/extra/update-copyright: Update.
3151         * gnulib/import/fchdir.c: Update.
3152         * gnulib/import/fcntl.c: Update.
3153         * gnulib/import/fcntl.in.h: Update.
3154         * gnulib/import/fd-hook.c: Update.
3155         * gnulib/import/fd-hook.h: Update.
3156         * gnulib/import/fd-safer-flag.c: Update.
3157         * gnulib/import/fd-safer.c: Update.
3158         * gnulib/import/fdopendir.c: Update.
3159         * gnulib/import/filename.h: Update.
3160         * gnulib/import/filenamecat-lgpl.c: Update.
3161         * gnulib/import/filenamecat.h: Update.
3162         * gnulib/import/flexmember.h: Update.
3163         * gnulib/import/float+.h: Update.
3164         * gnulib/import/float.c: Update.
3165         * gnulib/import/float.in.h: Update.
3166         * gnulib/import/fnmatch.c: Update.
3167         * gnulib/import/fnmatch.in.h: Update.
3168         * gnulib/import/fnmatch_loop.c: Update.
3169         * gnulib/import/fpucw.h: Update.
3170         * gnulib/import/frexp.c: Update.
3171         * gnulib/import/frexpl.c: Update.
3172         * gnulib/import/fstat.c: Update.
3173         * gnulib/import/fstatat.c: Update.
3174         * gnulib/import/getcwd-lgpl.c: Update.
3175         * gnulib/import/getcwd.c: Update.
3176         * gnulib/import/getdtablesize.c: Update.
3177         * gnulib/import/getlogin_r.c: Update.
3178         * gnulib/import/getprogname.c: Update.
3179         * gnulib/import/getprogname.h: Update.
3180         * gnulib/import/gettext.h: Update.
3181         * gnulib/import/gettimeofday.c: Update.
3182         * gnulib/import/glob-libc.h: Update.
3183         * gnulib/import/glob.c: Update.
3184         * gnulib/import/glob.in.h: Update.
3185         * gnulib/import/glob_internal.h: Update.
3186         * gnulib/import/glob_pattern_p.c: Update.
3187         * gnulib/import/globfree.c: Update.
3188         * gnulib/import/hard-locale.c: Update.
3189         * gnulib/import/hard-locale.h: Update.
3190         * gnulib/import/intprops.h: Update.
3191         * gnulib/import/inttypes.in.h: Update.
3192         * gnulib/import/isnan.c: Update.
3193         * gnulib/import/isnand-nolibm.h: Update.
3194         * gnulib/import/isnand.c: Update.
3195         * gnulib/import/isnanl-nolibm.h: Update.
3196         * gnulib/import/isnanl.c: Update.
3197         * gnulib/import/itold.c: Update.
3198         * gnulib/import/libc-config.h: Update.
3199         * gnulib/import/limits.in.h: Update.
3200         * gnulib/import/localcharset.c: Update.
3201         * gnulib/import/localcharset.h: Update.
3202         * gnulib/import/localtime-buffer.c: Update.
3203         * gnulib/import/localtime-buffer.h: Update.
3204         * gnulib/import/lstat.c: Update.
3205         * gnulib/import/m4/00gnulib.m4: Update.
3206         * gnulib/import/m4/__inline.m4: Update.
3207         * gnulib/import/m4/absolute-header.m4: Update.
3208         * gnulib/import/m4/alloca.m4: Update.
3209         * gnulib/import/m4/builtin-expect.m4: Update.
3210         * gnulib/import/m4/canonicalize.m4: Update.
3211         * gnulib/import/m4/chdir-long.m4: Update.
3212         * gnulib/import/m4/close.m4: Update.
3213         * gnulib/import/m4/closedir.m4: Update.
3214         * gnulib/import/m4/configmake.m4: Update.
3215         * gnulib/import/m4/d-ino.m4: Update.
3216         * gnulib/import/m4/d-type.m4: Update.
3217         * gnulib/import/m4/dirent_h.m4: Update.
3218         * gnulib/import/m4/dirfd.m4: Update.
3219         * gnulib/import/m4/dirname.m4: Update.
3220         * gnulib/import/m4/double-slash-root.m4: Update.
3221         * gnulib/import/m4/dup.m4: Update.
3222         * gnulib/import/m4/dup2.m4: Update.
3223         * gnulib/import/m4/eealloc.m4: Update.
3224         * gnulib/import/m4/environ.m4: Update.
3225         * gnulib/import/m4/errno_h.m4: Update.
3226         * gnulib/import/m4/error.m4: Update.
3227         * gnulib/import/m4/exponentd.m4: Update.
3228         * gnulib/import/m4/exponentl.m4: Update.
3229         * gnulib/import/m4/extensions.m4: Update.
3230         * gnulib/import/m4/extern-inline.m4: Update.
3231         * gnulib/import/m4/fchdir.m4: Update.
3232         * gnulib/import/m4/fcntl-o.m4: Update.
3233         * gnulib/import/m4/fcntl.m4: Update.
3234         * gnulib/import/m4/fcntl_h.m4: Update.
3235         * gnulib/import/m4/fdopendir.m4: Update.
3236         * gnulib/import/m4/filenamecat.m4: Update.
3237         * gnulib/import/m4/flexmember.m4: Update.
3238         * gnulib/import/m4/float_h.m4: Update.
3239         * gnulib/import/m4/fnmatch.m4: Update.
3240         * gnulib/import/m4/fnmatch_h.m4: Update.
3241         * gnulib/import/m4/fpieee.m4: Update.
3242         * gnulib/import/m4/frexp.m4: Update.
3243         * gnulib/import/m4/frexpl.m4: Update.
3244         * gnulib/import/m4/fstat.m4: Update.
3245         * gnulib/import/m4/fstatat.m4: Update.
3246         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3247         * gnulib/import/m4/getcwd-path-max.m4: Update.
3248         * gnulib/import/m4/getcwd.m4: Update.
3249         * gnulib/import/m4/getdtablesize.m4: Update.
3250         * gnulib/import/m4/getlogin.m4: Update.
3251         * gnulib/import/m4/getlogin_r.m4: Update.
3252         * gnulib/import/m4/getpagesize.m4: Update.
3253         * gnulib/import/m4/getprogname.m4: Update.
3254         * gnulib/import/m4/gettimeofday.m4: Update.
3255         * gnulib/import/m4/glibc21.m4: Update.
3256         * gnulib/import/m4/glob.m4: Update.
3257         * gnulib/import/m4/glob_h.m4: Update.
3258         * gnulib/import/m4/gnulib-cache.m4: Update.
3259         * gnulib/import/m4/gnulib-common.m4: Update.
3260         * gnulib/import/m4/gnulib-comp.m4: Update.
3261         * gnulib/import/m4/gnulib-tool.m4: Update.
3262         * gnulib/import/m4/hard-locale.m4: Update.
3263         * gnulib/import/m4/include_next.m4: Update.
3264         * gnulib/import/m4/inttypes-pri.m4: Update.
3265         * gnulib/import/m4/inttypes.m4: Update.
3266         * gnulib/import/m4/isnand.m4: Update.
3267         * gnulib/import/m4/isnanl.m4: Update.
3268         * gnulib/import/m4/largefile.m4: Update.
3269         * gnulib/import/m4/limits-h.m4: Update.
3270         * gnulib/import/m4/localcharset.m4: Update.
3271         * gnulib/import/m4/locale-fr.m4: Update.
3272         * gnulib/import/m4/locale-ja.m4: Update.
3273         * gnulib/import/m4/locale-zh.m4: Update.
3274         * gnulib/import/m4/localtime-buffer.m4: Update.
3275         * gnulib/import/m4/longlong.m4: Update.
3276         * gnulib/import/m4/lstat.m4: Update.
3277         * gnulib/import/m4/malloc.m4: Update.
3278         * gnulib/import/m4/malloca.m4: Update.
3279         * gnulib/import/m4/math_h.m4: Update.
3280         * gnulib/import/m4/mbrtowc.m4: Update.
3281         * gnulib/import/m4/mbsinit.m4: Update.
3282         * gnulib/import/m4/mbsrtowcs.m4: Update.
3283         * gnulib/import/m4/mbstate_t.m4: Update.
3284         * gnulib/import/m4/memchr.m4: Update.
3285         * gnulib/import/m4/memmem.m4: Update.
3286         * gnulib/import/m4/mempcpy.m4: Update.
3287         * gnulib/import/m4/memrchr.m4: Update.
3288         * gnulib/import/m4/mkdir.m4: Update.
3289         * gnulib/import/m4/mkstemp.m4: Update.
3290         * gnulib/import/m4/mmap-anon.m4: Update.
3291         * gnulib/import/m4/mode_t.m4: Update.
3292         * gnulib/import/m4/msvc-inval.m4: Update.
3293         * gnulib/import/m4/msvc-nothrow.m4: Update.
3294         * gnulib/import/m4/multiarch.m4: Update.
3295         * gnulib/import/m4/nocrash.m4: Update.
3296         * gnulib/import/m4/off_t.m4: Update.
3297         * gnulib/import/m4/onceonly.m4: Update.
3298         * gnulib/import/m4/open-cloexec.m4: Update.
3299         * gnulib/import/m4/open.m4: Update.
3300         * gnulib/import/m4/openat.m4: Update.
3301         * gnulib/import/m4/opendir.m4: Update.
3302         * gnulib/import/m4/pathmax.m4: Update.
3303         * gnulib/import/m4/rawmemchr.m4: Update.
3304         * gnulib/import/m4/readdir.m4: Update.
3305         * gnulib/import/m4/readlink.m4: Update.
3306         * gnulib/import/m4/realloc.m4: Update.
3307         * gnulib/import/m4/rename.m4: Update.
3308         * gnulib/import/m4/rewinddir.m4: Update.
3309         * gnulib/import/m4/rmdir.m4: Update.
3310         * gnulib/import/m4/save-cwd.m4: Update.
3311         * gnulib/import/m4/secure_getenv.m4: Update.
3312         * gnulib/import/m4/setenv.m4: Update.
3313         * gnulib/import/m4/signal_h.m4: Update.
3314         * gnulib/import/m4/ssize_t.m4: Update.
3315         * gnulib/import/m4/stat-time.m4: Update.
3316         * gnulib/import/m4/stat.m4: Update.
3317         * gnulib/import/m4/std-gnu11.m4: Update.
3318         * gnulib/import/m4/stdbool.m4: Update.
3319         * gnulib/import/m4/stddef_h.m4: Update.
3320         * gnulib/import/m4/stdint.m4: Update.
3321         * gnulib/import/m4/stdio_h.m4: Update.
3322         * gnulib/import/m4/stdlib_h.m4: Update.
3323         * gnulib/import/m4/strchrnul.m4: Update.
3324         * gnulib/import/m4/strdup.m4: Update.
3325         * gnulib/import/m4/strerror.m4: Update.
3326         * gnulib/import/m4/string_h.m4: Update.
3327         * gnulib/import/m4/strstr.m4: Update.
3328         * gnulib/import/m4/strtok_r.m4: Update.
3329         * gnulib/import/m4/sys_socket_h.m4: Update.
3330         * gnulib/import/m4/sys_stat_h.m4: Update.
3331         * gnulib/import/m4/sys_time_h.m4: Update.
3332         * gnulib/import/m4/sys_types_h.m4: Update.
3333         * gnulib/import/m4/tempname.m4: Update.
3334         * gnulib/import/m4/time_h.m4: Update.
3335         * gnulib/import/m4/unistd-safer.m4: Update.
3336         * gnulib/import/m4/unistd_h.m4: Update.
3337         * gnulib/import/m4/warn-on-use.m4: Update.
3338         * gnulib/import/m4/wchar_h.m4: Update.
3339         * gnulib/import/m4/wchar_t.m4: Update.
3340         * gnulib/import/m4/wctype_h.m4: Update.
3341         * gnulib/import/m4/wint_t.m4: Update.
3342         * gnulib/import/malloc.c: Update.
3343         * gnulib/import/malloc/scratch_buffer.h: Update.
3344         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3345         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3346         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3347         * gnulib/import/malloca.c: Update.
3348         * gnulib/import/malloca.h: Update.
3349         * gnulib/import/malloca.valgrind: Update.
3350         * gnulib/import/math.in.h: Update.
3351         * gnulib/import/mbrtowc.c: Update.
3352         * gnulib/import/mbsinit.c: Update.
3353         * gnulib/import/mbsrtowcs-impl.h: Update.
3354         * gnulib/import/mbsrtowcs-state.c: Update.
3355         * gnulib/import/mbsrtowcs.c: Update.
3356         * gnulib/import/memchr.c: Update.
3357         * gnulib/import/memmem.c: Update.
3358         * gnulib/import/mempcpy.c: Update.
3359         * gnulib/import/memrchr.c: Update.
3360         * gnulib/import/mkdir.c: Update.
3361         * gnulib/import/mkstemp.c: Update.
3362         * gnulib/import/msvc-inval.c: Update.
3363         * gnulib/import/msvc-inval.h: Update.
3364         * gnulib/import/msvc-nothrow.c: Update.
3365         * gnulib/import/msvc-nothrow.h: Update.
3366         * gnulib/import/open.c: Update.
3367         * gnulib/import/openat-die.c: Update.
3368         * gnulib/import/openat-priv.h: Update.
3369         * gnulib/import/openat-proc.c: Update.
3370         * gnulib/import/openat.c: Update.
3371         * gnulib/import/openat.h: Update.
3372         * gnulib/import/opendir.c: Update.
3373         * gnulib/import/pathmax.h: Update.
3374         * gnulib/import/pipe-safer.c: Update.
3375         * gnulib/import/rawmemchr.c: Update.
3376         * gnulib/import/readdir.c: Update.
3377         * gnulib/import/readlink.c: Update.
3378         * gnulib/import/realloc.c: Update.
3379         * gnulib/import/ref-add.sin: Update.
3380         * gnulib/import/ref-del.sin: Update.
3381         * gnulib/import/rename.c: Update.
3382         * gnulib/import/rewinddir.c: Update.
3383         * gnulib/import/rmdir.c: Update.
3384         * gnulib/import/same-inode.h: Update.
3385         * gnulib/import/save-cwd.c: Update.
3386         * gnulib/import/save-cwd.h: Update.
3387         * gnulib/import/scratch_buffer.h: Update.
3388         * gnulib/import/secure_getenv.c: Update.
3389         * gnulib/import/setenv.c: Update.
3390         * gnulib/import/signal.in.h: Update.
3391         * gnulib/import/stat-time.c: Update.
3392         * gnulib/import/stat-time.h: Update.
3393         * gnulib/import/stat-w32.c: Update.
3394         * gnulib/import/stat-w32.h: Update.
3395         * gnulib/import/stat.c: Update.
3396         * gnulib/import/stdbool.in.h: Update.
3397         * gnulib/import/stddef.in.h: Update.
3398         * gnulib/import/stdint.in.h: Update.
3399         * gnulib/import/stdio.in.h: Update.
3400         * gnulib/import/stdlib.in.h: Update.
3401         * gnulib/import/str-two-way.h: Update.
3402         * gnulib/import/strchrnul.c: Update.
3403         * gnulib/import/strdup.c: Update.
3404         * gnulib/import/streq.h: Update.
3405         * gnulib/import/strerror-override.c: Update.
3406         * gnulib/import/strerror-override.h: Update.
3407         * gnulib/import/strerror.c: Update.
3408         * gnulib/import/string.in.h: Update.
3409         * gnulib/import/stripslash.c: Update.
3410         * gnulib/import/strnlen1.c: Update.
3411         * gnulib/import/strnlen1.h: Update.
3412         * gnulib/import/strstr.c: Update.
3413         * gnulib/import/strtok_r.c: Update.
3414         * gnulib/import/sys_stat.in.h: Update.
3415         * gnulib/import/sys_time.in.h: Update.
3416         * gnulib/import/sys_types.in.h: Update.
3417         * gnulib/import/tempname.c: Update.
3418         * gnulib/import/tempname.h: Update.
3419         * gnulib/import/time.in.h: Update.
3420         * gnulib/import/unistd--.h: Update.
3421         * gnulib/import/unistd-safer.h: Update.
3422         * gnulib/import/unistd.in.h: Update.
3423         * gnulib/import/unsetenv.c: Update.
3424         * gnulib/import/verify.h: Update.
3425         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3426         * gnulib/import/wchar.in.h: Update.
3427         * gnulib/import/wctype.in.h: Update.
3428         * gnulib/import/xalloc-oversized.h: Update.
3429         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3430         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3431
3432 2018-08-16  Gary Benson <gbenson@redhat.com>
3433
3434         PR gdb/13000:
3435         * gdb/main.c (captured_main_1): Exit with nonzero status
3436         in batch mode if the last command to be executed failed.
3437         * NEWS: Mention the above.
3438
3439 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3440
3441         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3442         end of warning message.
3443
3444 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3445
3446         PR gdb/22943:
3447         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3448         (aarch64_extract_return_value): Use
3449         aapcs_is_vfp_call_or_return_candidate.
3450         (aarch64_return_in_memory): Likewise.
3451         (aarch64_store_return_value): Likewise.
3452
3453 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3454
3455         * aarch64-tdep.c
3456         (aapcs_is_vfp_call_or_return_candidate): Make static
3457         (pass_in_v_or_stack): Remove function.
3458         (pass_in_v_vfp_candidate): New function.
3459         (aarch64_push_dummy_call): Check for float register candidates.
3460
3461 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3462
3463         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3464         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3465         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3466
3467 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3468
3469         PR build/23399
3470         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3471         (struct ipa_sym_addresses): Rename to...
3472         (struct ipa_sym_addresses_common): ... this.
3473         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3474
3475 2018-08-28  Tom Tromey  <tom@tromey.com>
3476
3477         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3478         (token_fifo): Now a std::vector.
3479         (yylex, c_parse): Update.
3480         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3481         (token_fifo): Now a std::vector.
3482         (yylex, d_parse): Update.
3483         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3484         (token_fifo): Now a std::vector.
3485         (yylex, go_parse): Update.
3486
3487 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3488
3489         * parser-defs.h (struct type_stack) <elements>: Change type to
3490         std::vector<union type_stack_elt>.
3491         <depth, size>: Remove.
3492         * parse.c (parse_exp_in_context_1): Adjust.
3493         (type_stack_reserve): Remove.
3494         (check_type_stack_depth): Remove.
3495         (insert_into_type_stack): Adjust to std::vector.
3496         (insert_type): Likewise.
3497         (push_type): Likewise.
3498         (push_type_int): Likewise.
3499         (insert_type_address_space): Likewise.
3500         (pop_type): Likewise.
3501         (pop_type_int): Likewise.
3502         (pop_typelist): Likewise.
3503         (pop_type_stack): Likewise.
3504         (append_type_stack): Likewise.
3505         (push_type_stack): Likewise.
3506         (get_type_stack): Likewise.
3507         (type_stack_cleanup): Likewise.
3508         (push_typelist): Likewise.
3509         (follow_types): Likewise.
3510         (_initialize_parse): Likewise.
3511
3512 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3513
3514         * NEWS: Mention csky target.
3515
3516 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3517             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3518             Don Breazeal  <donb@codesourcery.com>
3519
3520         * csky-linux-tdep.c: New file.
3521         * csky-tdep.c: Likewise.
3522         * csky-tdep.h: Likewise.
3523         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3524         csky-tdep.o.
3525         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3526         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3527         * configure.tgt: Add csky support.
3528
3529 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3530
3531         * python/py-framefilter.c (py_print_frame): Print frame architecture
3532         when printing on an MI output.
3533
3534 2018-08-27  Tom Tromey  <tom@tromey.com>
3535
3536         PR build/23087:
3537         * configure: Rebuild.
3538         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3539
3540 2018-08-27  Tom Tromey  <tom@tromey.com>
3541
3542         * aarch64-linux-tdep.c
3543         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3544         casts to int.
3545
3546 2018-08-27  Tom Tromey  <tom@tromey.com>
3547
3548         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3549         unsigned.
3550         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3551         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3552         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3553         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3554         unsigned.
3555
3556 2018-08-27  Tom Tromey  <tom@tromey.com>
3557
3558         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3559         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3560
3561 2018-08-27  Tom Tromey  <tom@tromey.com>
3562
3563         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3564         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3565         ULONGEST_MAX.
3566         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3567         ULONGEST_MAX.
3568         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3569         ULONGEST_MAX.
3570         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3571         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3572         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3573         ULONGEST_MAX.
3574         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3575         (ppc64_linux_sigaction_tramp_frame)
3576         (ppc32_linux_sighandler_tramp_frame)
3577         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3578         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3579         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3580         * mn10300-linux-tdep.c (am33_linux_sigframe)
3581         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3582         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3583         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3584         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3585         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3586         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3587         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3588         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3589         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3590         * microblaze-linux-tdep.c
3591         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3592         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3593         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3594         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3595         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3596         * common/common-types.h (ULONGEST_MAX): New define.
3597         (CORE_ADDR_MAX): Fix formatting.
3598         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3599         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3600         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3601         (arm_linux_rt_sigreturn_tramp_frame)
3602         (arm_eabi_linux_sigreturn_tramp_frame)
3603         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3604         (thumb2_eabi_linux_sigreturn_tramp_frame)
3605         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3606         (arm_linux_restart_syscall_tramp_frame)
3607         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3608         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3609         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3610         ULONGEST_MAX.
3611         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3612
3613 2018-08-27  Tom Tromey  <tom@tromey.com>
3614
3615         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3616         CORE_ADDR_MAX.
3617         * mips-tdep.c (mips_deal_with_atomic_sequence)
3618         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3619         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3620         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3621         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3622         CORE_ADDR_MAX.
3623         * aarch64-tdep.c (aarch64_software_single_step): Use
3624         CORE_ADDR_MAX.
3625
3626 2018-08-27  Tom Tromey  <tom@tromey.com>
3627
3628         * linespec.c (complete_linespec_component): Add cast to "char".
3629         * completer.c (completion_tracker::build_completion_result): Add
3630         cast to "char".
3631
3632 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3633
3634         * solist.h (struct solist, struct target_so_ops): Fix
3635         indentation.
3636
3637 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3638
3639         * ada-tasks.c (ada_task_info_s): Remove typedef.
3640         (DEF_VEC_O(ada_task_info_s)): Remove.
3641         (struct ada_tasks_inferior_data): Initialize fields.
3642         <task_list>: Make an std::vector.
3643         (get_ada_tasks_inferior_data): Allocate with new.
3644         (ada_get_task_number): Adjust.
3645         (get_task_number_from_id): Likewise.
3646         (valid_task_id): Likewise.
3647         (ada_get_task_info_from_ptid): Likewise.
3648         (iterate_over_live_ada_tasks): Likewise.
3649         (add_ada_task): Likewise.
3650         (read_known_tasks): Likewise.
3651         (ada_build_task_list): Likewise.
3652         (print_ada_task_info): Likewise.
3653         (info_task): Likewise.
3654         (task_command_1): Likewise.
3655
3656 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3657
3658         * ada-lang.c (add_angle_brackets): Return std::string.
3659
3660 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3661
3662         * python/py-threadevent.c (py_get_event_thread): Initialize
3663         pythread.
3664
3665 2018-08-24  Pedro Alves  <palves@redhat.com>
3666
3667         * python/py-bpevent.c (create_breakpoint_event_object): Use
3668         copy-initialization.
3669         * python/py-continueevent.c (emit_continue_event): Use
3670         copy-initialization.
3671         * python/py-exitedevent.c (create_exited_event_object): Return a
3672         gdbpy_ref<>.
3673         (emit_exited_event): Use copy-initialization.
3674         * python/py-inferior.c (python_new_inferior)
3675         (python_inferior_deleted, add_thread_object): Use
3676         copy-initialization.
3677         * python/py-infevents.c (create_inferior_call_event_object)
3678         (create_register_changed_event_object)
3679         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3680         (emit_inferior_call_event, emit_memory_changed_event)
3681         (emit_register_changed_event): Use copy-initialization.
3682         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3683         Return a gdbpy_ref<>.
3684         (emit_new_objfile_event): Use copy-initialization.
3685         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3686         (emit_clear_objfiles_event): Use copy-initialization.
3687         * python/py-signalevent.c (create_signal_event_object): Use
3688         copy-initialization.
3689         * python/py-threadevent.c (create_thread_event_object): Use
3690         copy-initialization.
3691
3692 2018-08-24  Pedro Alves  <palves@redhat.com>
3693             Simon Marchi  <simon.marchi@ericsson.com>
3694
3695         PR gdb/23379
3696         * python/py-continueevent.c: Include "gdbthread.h".
3697         (create_continue_event_object): Add intro comment.  Add 'ptid'
3698         parameter.  Use it to find thread to pass to
3699         create_thread_event_object.
3700         (emit_continue_event): Pass PTID down to
3701         create_continue_event_object.
3702         * python/py-event.h (py_get_event_thread): Declare.
3703         (create_thread_event_object): Remove default from 'thread'
3704         parameter.
3705         * python/py-stopevent.c (create_stop_event_object): Use
3706         py_get_event_thread.
3707         * python/py-threadevent.c (get_event_thread): Rename to ...
3708         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3709         and use it to find the thread.
3710         (create_thread_event_object): Assert that THREAD isn't null.
3711         Don't find the event thread here.
3712
3713 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3714
3715         * block.h (blockrange, blockranges): New struct declarations.
3716         (struct block): Add new field named `ranges'.
3717         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3718         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3719         macros for accessing ranges in struct block.
3720         (make_blockranges): New declaration.
3721         block.c (make_blockranges): New function.
3722         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3723         for block.
3724         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3725         * blockframe.c (cache_pc_function_block): New static global.
3726         (clear_pc_function_cache): Clear cache_pc_function_block.
3727         (find_pc_partial_function): Move comment to symtab.h.  Add
3728         support for non-contiguous blocks.
3729         * cli/cli-cmds.c (block.h): Include.
3730         (print_disassembly): Handle printing of non-contiguous blocks.
3731         (disassemble_current_function): Likewise.
3732         (disassemble_command): Likewise.
3733
3734         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3735         BLOCK_START.
3736         * blockframe.c (get_pc_function_start): Likewise.
3737         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3738         (gcc_symbol_address): Likewise.
3739         * compile/compile-object-run.c (compile_object_run): Likewise.
3740         * compile/compile.c (get_expr_block_and_pc): Likewise.
3741         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3742         (func_addr_to_tail_call_list): Likewise.
3743         * findvar.c (default_read_var_value): Likewise.
3744         * inline-frame.c (inline_frame_this_id): Likewise.
3745         (skip-inline_frames): Likewise.
3746         * infcmd.c (until_next_command): Likewise.
3747         * linespec.c (convert_linespec_to_sals): Likewise.
3748         * parse.c (parse_exp_in_context_1): Likewise.
3749         * printcmd.c (build_address_symbolic): likewise.
3750         (info_address_command): Likewise.
3751         symtab.c (find_function_start_sal): Likewise.
3752         (skip_prologue_sal): Likewise.
3753         (find_function_alias_target): Likewise.
3754         (find_gnu_ifunc): Likewise.
3755         * stack.c (find_frame_funname): Likewise.
3756         * symtab.c (fixup_symbol_section): Likewise.
3757         (find_function_start_sal): Likewise.
3758         (skip_prologue_sal): Likewsie.
3759         (find_function_alias_target): Likewise.
3760         (find_gnu_ifunc): Likewise.
3761         * tracepoint.c (info_scope_command): Likewise.
3762         * value.c (value_fn_field): Likewise.
3763
3764         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3765         in place of find_pc_partial_function.
3766         * blockframe.c (find_function_entry_range_from_pc): New function.
3767         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3768         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3769         for each range in a block.
3770
3771
3772 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3773
3774         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3775         incrementation.
3776
3777 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3778
3779         * solib-svr4.c (read_program_headers_from_bfd): Return
3780         gdb::optional<gdb::byte_vector>.
3781         (svr4_exec_displacement): Adjust.
3782
3783 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3784
3785         * solib-svr4.c (read_program_header): Return
3786         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3787         (find_program_interpreter): Return
3788         gdb::optional<gdb::byte_vector>.
3789         (scan_dyntag_auxv): Adjust.
3790         (enable_break): Adjust.
3791         (svr4_exec_displacement): Adjust.
3792
3793 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3794
3795         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3796         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3797
3798 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3799
3800         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3801         string_vprintf.
3802         * guile/scm-utils.c (gdbscm_printf): Likewise.
3803         * serial.c (serial_printf): Likewise.
3804         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3805
3806 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3807
3808         * stack.c (print_frame): Print frame architecture when printing on
3809         an MI output.
3810         * NEWS: Mention new "arch" attribute in frame output.
3811
3812 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3813
3814         * arch/aarch64.h (aarch64_regnum): Update comment.
3815
3816 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3817
3818         * NEWS: Add SVE to 8.2 section.
3819
3820 2018-08-21  Pedro Alves  <palves@redhat.com>
3821
3822         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3823         out from gdbscm_parse_function_args.
3824         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3825         gdbscm_parse_function_args_1.
3826
3827 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3828
3829         PR gdb/17816
3830         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3831         operator.
3832
3833 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3834
3835         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3836
3837 2018-08-19  Michael Spang  <spang@google.com>
3838
3839         PR gdb/11786
3840         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3841         for PT_TLS segments.
3842
3843 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3844
3845         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3846         dwarf_variable_value.
3847         * dwarf2-frame.c (class dwarf_expr_executor):
3848         Add override for dwarf_variable_value.
3849         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3850         (class symbol_needs_eval_context): Likewise.
3851         (indirect_synthetic_pointer): Add forward declaration.
3852         (sect_variable_value): New function.
3853         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3854         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3855         for DW_OP_GNU_variable_value.
3856
3857 2018-08-16  Tom Tromey  <tom@tromey.com>
3858
3859         * top.c (read_command_file): Update.
3860         (command_line_input): Remove "repeat" argument.
3861         * ada-lang.c (get_selections): Update.
3862         * linespec.c (decode_line_2): Update.
3863         * defs.h (command_line_input): Remove argument.
3864         * cli/cli-script.c (read_next_line): Update.
3865         * python/py-gdb-readline.c: Update.
3866
3867 2018-08-17  Tom Tromey  <tom@tromey.com>
3868
3869         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3870         command_line_input.
3871
3872 2018-08-15  Tom Tromey  <tom@tromey.com>
3873
3874         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3875
3876 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3877
3878         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3879         If used, use find_pc_partial_function to find address range
3880         to disassemble.
3881         * mi/mi-main.c (mi_cmd_list_features): Report
3882         "data-disassemble-a-option" feature.
3883         * NEWS: Mention new -data-disassemble option -a.
3884
3885 2018-08-13  Tom Tromey  <tom@tromey.com>
3886
3887         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3888
3889 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3890
3891         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3892         (aarch64_linux_collect_sve_regset): Likewise.
3893         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3894         * regcache.h (regcache_map_entry_size): New function.
3895
3896 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3897
3898         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3899         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3900         (SVE_HEADER_VL_LENGTH): Likewise.
3901         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3902         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3903         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3904         (SVE_HEADER_SIZE_OFFSET): Likewise.
3905         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3906         (SVE_HEADER_VL_OFFSET): Likewise.
3907         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3908         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3909         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3910         (SVE_HEADER_SIZE): Likewise.
3911         (aarch64_linux_core_read_vq): Add function.
3912         (aarch64_linux_core_read_description): Check for SVE section.
3913
3914 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3915
3916         * aarch64-fbsd-tdep.c
3917         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3918         collect_size.
3919         * aarch64-linux-tdep.c
3920         (aarch64_linux_iterate_over_regset_sections): Likewise.
3921         * alpha-linux-tdep.c
3922         (alpha_linux_iterate_over_regset_sections):
3923         * alpha-nbsd-tdep.c
3924         (alphanbsd_iterate_over_regset_sections): Likewise.
3925         * amd64-fbsd-tdep.c
3926         (amd64fbsd_iterate_over_regset_sections): Likewise.
3927         * amd64-linux-tdep.c
3928         (amd64_linux_iterate_over_regset_sections): Likewise.
3929         * arm-bsd-tdep.c
3930         (armbsd_iterate_over_regset_sections): Likewise.
3931         * arm-fbsd-tdep.c
3932         (arm_fbsd_iterate_over_regset_sections): Likewise.
3933         * arm-linux-tdep.c
3934         (arm_linux_iterate_over_regset_sections): Likewise.
3935         * corelow.c (get_core_registers_cb): Likewise.
3936         (core_target::fetch_registers): Likewise.
3937         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3938         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3939         * gdbarch.h (void): Regenerate.
3940         * gdbarch.sh: Add supply_size and collect_size.
3941         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3942         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3943         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3944         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3945         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3946         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3947         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3948         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3949         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3950         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3951         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3952         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3953         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3954         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3955         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3956         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3957         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3958         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3959         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3960         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3961         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3962         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3963         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3964         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3965         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3966         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3967         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3968         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3969         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3970         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3971
3972 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3973
3974         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3975         with string_printf.
3976
3977 2018-08-10  Keith Seitz  <keiths@redhat.com>
3978
3979         * compile/compile-c-support.c (add_code_header, add_code_footer):
3980         Move into policy class.
3981         (c_push_user_expression, pop_user_expression_nop)
3982         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3983         (compile_program): New host class.
3984         (c_compile_program): New typedef.
3985         (c_compute_porgram): Use c_compile_program.
3986
3987 2018-08-10  Keith Seitz  <keiths@redhat.com>
3988
3989         * compile/compile-internal.h (compile_instance::~compile_instance):
3990         Remove calls to htab_delete.
3991         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3992         * compile.c (compile_instance::compile_instance): Initialize
3993         htab unique pointers.
3994         (compile_instance::get_cached_type, compile_instance::insert_type)
3995         (compile_instance::error_symbol_once): Update for unique_ptr.
3996
3997 2018-08-10  Keith Seitz  <keiths@redhat.com>
3998
3999         * compile/compile-c-symbols.c (struct symbol_error)
4000         (hash_symbol_error, eq_symbol_error, del_symbol_error)
4001         (compile_instance::insert_symbol_error)
4002         (compile_instance::error_symbol_once): Move to ...
4003         * compile/compile.c: ... here.
4004
4005 2018-08-10  Keith Seitz  <keiths@redhat.com>
4006
4007         * compile/compile-c-support.c (c_get_compile_context): Use `new'
4008         instead of `new_compile_instance'.
4009         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
4010         Update description.
4011         If the symbol error map is not initialized, create it.
4012         (generate_c_for_for_one_symbol): Do not check/initialize
4013         the symbol error map.
4014         * compile/compile-c-types.c (compile_c_instance): Make a class.
4015         Update all callers.
4016         (compile_instance::compile_instance): Initialize the type cache.
4017         (get_cached_type): New function.
4018         (insert_type): Update description.
4019         (compile_c_instance::m_default_cflags): Define.
4020         (convert_type): Update description.  Use get_cached_type.
4021         (delete_instance): Moved to destructor.
4022         (new_compile_instance): Moved to constructor.
4023         * compile/compile-c.h (compile_c_instance): Make class inheriting
4024         from compile_instance.
4025         <base>: Remove field.
4026         <type_map, symbol_err_map>: Move to base class.
4027         <c_plugin>: Rename to `m_plugin' and remove pointer type.
4028         * compile/compile-internal.h (compile_instance): Make class.
4029         <type_map_t, symbol_err_map_t>: Define.
4030         <fe>: Rename to `m_gcc_fe'.
4031         <scope, block, gcc_target_options>: Add `m_' prefix.
4032         <m_type_map, m_symbol_err_map>: New fields, moved from
4033         compile_c_instance.
4034         <destroy>: Remove.
4035         (convert_type, new_compile_instance): Remove.
4036         * compile/compile.c (cleanup_compile_instance): Remove.
4037         (compile_to_object): Use unique_ptr to eliminate cleanups.
4038         (compile_instance::set_print_callback, compile_instance::version)
4039         (compile_instance::set_verbose)
4040         (compile_instance::set_driver_filename)
4041         (compile_instance::set_triplet_regexp)
4042         (compile_instance::set_arguments)
4043         (compile_instance::set_source_file)
4044         (compile_instance::compile): Define.
4045
4046 2018-08-10  Keith Seitz  <keiths@redhat.com>
4047
4048         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
4049         * compile/compile-c-types.c: Define GCC_METHODN macros and include
4050         gcc-c-fe.def to define C plugin.
4051         (delete_instance): Delete `c_plugin'.
4052         (new_compile_instance): Initialize `c_plugin'.
4053         * compile/compile-c.h: Include gcc_c_plugin.h.
4054         (struct compile_c_instance) <c_plugin>: New member.
4055         * gcc-c-plugin.h: New file.
4056         Update all callers with API change.
4057
4058 2018-08-10  Keith Seitz  <keiths@redhat.com>
4059
4060         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
4061         (HFILES_NO_SRCDIR): ... to here.
4062         Add compile-internal.h and compile-c.h.
4063         * compile/compile-c-support.c: Include compile-c.h.
4064         * compile/compile-c-symbols.c: Include compile-c.h.
4065         (generate_c_for_variable_locations): Update comment.
4066         * compile/compile-c-types.c: Include compile-c.h.
4067         * compile/compile-c.h: New file -- moved C language declarations
4068         from other files here.
4069         * compile/compile-internal.h: Do not include hashtab.h or
4070         common/enum-flags.h.
4071         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
4072         (gcc_convert_symbol, gcc_symbol_address)
4073         (generate_c_for_variable_locations, c_get_mode_for_size)
4074         (c_get_range_decl_name): Definitions moved to compile-c.h.
4075         * compile/compile-loc2c.c: Include compile-c.h.
4076
4077 2018-08-10  Keith Seitz  <keiths@redhat.com>
4078
4079         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
4080         (c_symbol_substitution_name): ... this.
4081         Update all callers.
4082
4083 2018-08-10  Keith Seitz  <keiths@redhat.com>
4084
4085         * compile/compile-c-support.c (c_compute_program): Use
4086         unique_xmalloc_ptr to eliminate cleanup.
4087         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
4088         Return a unique_xmalloc_ptr and eliminate cleanup.
4089         * compile/compile-internal.h (generate_c_for_variable_locations):
4090         Return unique_xmalloc_ptr and update description.
4091
4092 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
4093
4094         * corelow.c (core_target::get_core_register_section): Rename
4095         min_size to section_min_size.
4096
4097 2018-08-09  Jim Wilson  <jimw@sifive.com>
4098
4099         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
4100         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
4101         * NEWS: Mention new GNU/Linux RISC-V target.
4102         * configure.host: Add riscv*-*-linux*.
4103         * configure.nat: Add riscv*.
4104         * configure.tgt: Add riscv*-*-linux*.
4105         * riscv-linux-nat.c: New file.
4106         * riscv-linux-tdep.c: New file.
4107
4108 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4109
4110         * infrun.c (resume): Make static, add forward declaration.
4111         (proceed): Update header comment.
4112         * infrun.h (resume): Delete declaration.
4113
4114 2018-08-09  Tom Tromey  <tom@tromey.com>
4115
4116         * riscv-tdep.h: Minor formatting fixes.
4117
4118 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
4119
4120         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
4121         * dwarf-index-cache.c (create_dir_and_check): Likewise.
4122         (test_mkdir_recursive): Likewise.
4123         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
4124
4125 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
4126
4127         * valarith.c (value_subscripted_rvalue): If an array is not in
4128         memory, and we don't know the upper bound, then we can't know that
4129         the requested element exists or not.
4130
4131 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
4132
4133         * target.c (str_comma_list_concat_elem): Fix typo in comment.
4134         (target_options_to_string): Add comment.
4135
4136 2018-08-08  Tom Tromey  <tom@tromey.com>
4137
4138         * unittests/scoped_mmap-selftests.c: Check result of "write".
4139
4140 2018-08-08  Jim Wilson  <jimw@sifive.com>
4141
4142         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
4143         (decode_register_index_short): New.
4144         (decode_j_type_insn, decode_cj_type_insn): New.
4145         (decode_b_type_insn, decode_cb_type_insn): New.
4146         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
4147         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
4148         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
4149         is_c_sw_insn instead of is_sw_insn.
4150         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
4151         (riscv_software_single_step): New.
4152         * riscv-tdep.h (riscv_software_single_step): Declare.
4153
4154         * riscv-tdep.c (riscv_isa_xlen): Drop static.
4155         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
4156
4157 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
4158
4159         PR gdb/18050:
4160         * target.c (dispose_inferior): Don't dispose of inferiors that are
4161         already killed.
4162
4163 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
4164
4165         * remote.c (remote_target::download_tracepoint): Change char* to
4166         const char*.
4167
4168 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
4169
4170         * target.h (target_options_to_string): Return an std::string.
4171         * target.c (str_comma_list_concat_elem): Return void, use
4172         std::string.
4173         (do_option): Likewise.
4174         (target_options_to_string): Return an std::string.
4175         * linux-nat.c (linux_nat_target::wait): Adjust.
4176         * target-debug.h (target_debug_print_options): Adjust.
4177
4178 2018-08-07  Tom Tromey  <tom@tromey.com>
4179
4180         * Makefile.in (CPPFLAGS): New variable.
4181         (INTERNAL_CPPFLAGS): Use it.
4182
4183 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4184
4185         * NEWS: Mention the index cache.
4186
4187 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4188
4189         * common/pathstuff.h (get_standard_cache_dir): New.
4190         * common/pathstuff.c (get_standard_cache_dir): New.
4191         * build-id.h (build_id_to_string): New.
4192         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
4193         DEBUG_STR_SUFFIX): Move to here.
4194         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
4195         DEBUG_STR_SUFFIX): Move from there.
4196         (write_psymtabs_to_index): Make non-static, add basename
4197         parameter.  Write to temporary files, rename when done.
4198         (save_gdb_index_command): Adjust call to
4199         write_psymtabs_to_index.
4200         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4201         field.
4202         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4203         (get_gdb_index_contents_from_cache): New.
4204         (get_gdb_index_contents_from_cache_dwz): New.
4205         (dwarf2_initialize_objfile): Read index from cache.
4206         (dwarf2_build_psymtabs): Save to index.
4207         * dwarf-index-cache.h: New file.
4208         * dwarf-index-cache.c: New file.
4209         * dwarf-index-write.h: New file.
4210
4211 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4212
4213         * gnulib/aclocal.m4: Re-generate.
4214         * gnulib/config.in: Re-generate.
4215         * gnulib/configure: Re-generate.
4216         * gnulib/import/Makefile.am: Re-generate.
4217         * gnulib/import/Makefile.in: Re-generate.
4218         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4219         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4220         * gnulib/import/m4/mkdir.m4: New file.
4221         * gnulib/import/mkdir.c: New file.
4222         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4223         module.
4224
4225 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4226
4227         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4228         * common/scoped_mmap.c: New file.
4229         * common/scoped_mmap.h (destroy): New method.
4230         (~scoped_mmap, reset): Use destroy.
4231         (scoped_mmap): New move constructor.
4232         (mmap_file): New declaration.
4233         * unittests/scoped_mmap-selftests.c (test_normal,
4234         test_invalid_filename, run_tests): New functions.
4235         (_initialize_scoped_mmap_selftests): Register selftest.
4236
4237 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4238
4239         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4240         (read_gdb_index_from_buffer): ... this.  Remove section
4241         parameter, add buffer parameter.
4242         (get_gdb_index_contents_ftype,
4243         get_gdb_index_contents_dwz_ftype): New typedefs.
4244         (dwarf2_read_gdb_index): Add callback parameters to get the
4245         index contents.
4246         (get_gdb_index_contents_from_section): New.
4247         (dwarf2_initialize_objfile): Update call to
4248         dwarf2_read_gdb_index.
4249
4250 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4251
4252         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4253         (gdb_open_cloexec): Likewise.
4254         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4255         (commandline_from_pid): Likewise.
4256         (linux_xfer_osdata_threads): Likewise.
4257         (linux_xfer_osdata_fds): Likewise.
4258         * ada-lang.c (is_package_name): Likewise.
4259         * auxv.c (procfs_xfer_auxv): Likewise.
4260         * breakpoint.c (print_one_breakpoint_location): Use
4261         uiout::field_fmt.
4262         (print_one_catch_solib): Use string_printf.
4263         * coff-pe-read.c (add_pe_exported_sym): Likewise.
4264         (add_pe_forwarded_sym): Likewise.
4265         * dwarf2read.c (create_type_unit_group): Likewise.
4266         (build_error_marker_type): Likewise.
4267         * infcall.c (get_function_name): Likewise.
4268         * valprint.c (print_converted_chars_to_obstack): Likewise.
4269         * xtensa-tdep.c (xtensa_register_type): Likewise.
4270
4271 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
4272
4273         * remote.c (remote_target::download_tracepoint): Fix format
4274         string errors.
4275
4276 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4277
4278         * tracefile.c: Include common/byte-vector.h.
4279         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
4280         with trace_regblock_size if needed.  Update uses of buf.
4281
4282 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4283
4284         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4285         std::vector<unsigned char>.
4286         * tracepoint.c (collection_list::collection_list): Remove
4287         m_regs_mask initializer from initializer list.  Resize
4288         m_regs_mask using the largest remote register number.
4289         (collection_list::add_remote_register): Remove size check on
4290         m_regs_mask.  Use at to access element.
4291         (collection_list::stringify): Change type of temp_buf to
4292         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4293         stringify the register mask.  Use pack_hex_byte for the register
4294         mask.
4295
4296 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4297
4298         * tracepoint.h (class collection_list) <add_register>: Remove.
4299         <add_remote_register, add_ax_registers, add_local_register>:
4300         Declare.
4301         <add_memrange>: Add scope parameter.
4302         * tracepoint.c (encode_actions_1): Likewise.
4303         (collection_list::add_register): Rename to ...
4304         (collection_list::add_remote_register): ... this.  Update
4305         comment.
4306         (collection_list::add_ax_registers, add_local_register): New
4307         methods.
4308         (collection_list::add_memrange): Add scope parameter.  Call
4309         add_local_register instead of add_register.
4310         (finalize_tracepoint_aexpr): New function.
4311         (collection_list::collect_symbol): Update calls to add_memrange.
4312         Call add_local_register instead of add_register.  Call
4313         add_ax_registers.  Call finalize_tracepoint_aexpr.
4314         (encode_actions_1): Get remote regnos for $reg action.  Call
4315         add_remote_register, add_ax_registers, and add_local_register.
4316         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4317         (validate_actionline): Call finalize_tracepoint_aexpr.
4318
4319 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4320
4321         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4322         Replace array buf with gdb::char_vector buf, of size
4323         get_remote_packet_size ().  Replace references to buf and
4324         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4325         and xsnprintf with snprintf.  Raise errors if the buffer is too
4326         small.
4327
4328 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4329
4330         * remote.c (remote_target::download_tracepoint): Fix the has_more
4331         predicate in the QTDP action list iteration.
4332
4333 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4334
4335         * remote.c (remote_target::download_tracepoint): Fix indentation
4336         in for block.
4337
4338 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4339
4340         * proc-api.c (_initialize_proc_api): Remove c, unused.
4341         * procfs.c (procfs_init_inferior): Remove signals, unused.
4342         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4343         unused.
4344
4345 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4346             Andrew Burgess  <andrew.burgess@embecosm.com>
4347
4348         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4349         'W_STOPCODE (0)' as this could be ambiguous.
4350
4351 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4352
4353         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4354         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4355         "ai_socktype").
4356
4357 2018-08-02  Tom Tromey  <tom@tromey.com>
4358
4359         PR symtab/16842.
4360         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4361         symbols.
4362         (process_structure_scope): Likewise.
4363
4364 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4365
4366         PR gdb/22629:
4367         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4368         kill inferior.
4369
4370 2018-08-02  Tom Tromey  <tom@tromey.com>
4371
4372         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4373         (darwin_suspend_inferior, darwin_resume_inferior)
4374         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4375         (darwin_check_new_threads): Check result of get_darwin_inferior.
4376
4377 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4378
4379         GDB 8.1.1 released.
4380
4381 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4382
4383         * varobj.c (varobj_get_path_expr_parent): Report an error if
4384         parent is a dynamic varobj.
4385
4386 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4387
4388         * gnulib/aclocal.m4: Re-generate.
4389         * gnulib/config.in: Re-generate.
4390         * gnulib/configure: Re-generate.
4391         * gnulib/import/Makefile.in: Re-generate.
4392         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4393         * gnulib/import/m4/onceonly.m4: Re-generate.
4394
4395 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4396
4397         * target-descriptions.c (struct xml_test_tdesc): New.
4398         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4399         (record_xml_tdesc): Update.
4400         (maintenance_check_xml_descriptions): Update.
4401         * target-descriptions.h (record_xml_tdesc): Update comment.
4402
4403 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4404
4405         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4406         checking array bounds are defined.
4407
4408 2018-07-30  Tom Tromey  <tom@tromey.com>
4409
4410         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4411         irreflexivity violation.
4412
4413 2018-07-30  Tom Tromey  <tom@tromey.com>
4414
4415         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4416         * value.c (unpack_long): Remove lint code.
4417         * valops.c (value_ind): Remove lint code.
4418         * valarith.c (value_x_binop, value_x_unop, value_equal)
4419         (value_pos): Remove lint code.
4420
4421 2018-07-28  Tom de Vries  <tdevries@suse.de>
4422
4423         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4424         with undefined upper bound as <optimized out>.
4425
4426 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4427
4428         * gcore.in: Rename variable "name" to "prefix".  Expand
4429         "usage" text.
4430
4431 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4432
4433         * windows-nat.c (windows_nat_target::create_inferior): Update to
4434         call close() in global namespace.
4435
4436 2018-07-26  Tom Tromey  <tom@tromey.com>
4437
4438         * dwarf-index-write.c (add_address_entry): Don't add objfile
4439         offsets.
4440         * dbxread.c (find_stab_function): Rename from
4441         find_stab_function_addr.  Return a bound_minimal_symbol.
4442         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4443         Don't add objfile offsets.
4444         (end_psymtab): Use raw_text_low, raw_text_high,
4445         MSYMBOL_VALUE_RAW_ADDRESS.
4446         (read_ofile_symtab): Update.
4447         (process_one_symbol): Update.
4448         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4449         offsets.
4450         (dw2_relocate): Remove.
4451         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4452         searching addrmap.
4453         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4454         Update.
4455         (process_psymtab_comp_unit_reader, add_partial_symbol)
4456         (add_partial_subprogram, dwarf2_ranges_read): Update.
4457         (load_partial_dies): Update.
4458         (add_address_entry): Don't add objfile offsets.
4459         (dwarf2_build_include_psymtabs): Update.
4460         (create_addrmap_from_aranges): Don't add objfile offsets.
4461         (dw2_find_pc_sect_compunit_symtab): Update.
4462         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4463         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4464         Update.
4465         (parse_partial_symbols): Don't add objfile offsets.  Use
4466         raw_text_low, raw_text_high.  Update.
4467         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4468         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4469         or call 'relocate' quick function.  Clear psymbol_map.
4470         * psympriv.h (struct partial_symbol) <address>: Add section
4471         offset.
4472         <set_unrelocated_address>: Rename from set_address.
4473         <raw_text_low, raw_text_high>: New methods.
4474         <text_low, text_high>: Add objfile parameter.
4475         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4476         set_unrelocated_address.
4477         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4478         (find_pc_psymbol): Update.
4479         (fixup_psymbol_section, relocate_psymtabs): Remove.
4480         (dump_psymtab, psym_functions): Update.
4481         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4482         parameter.
4483         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4484         (start_psymtab_common): Update.
4485         * symfile-debug.c (debug_qf_relocate): Remove.
4486         (debug_sym_quick_functions): Update.
4487         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4488         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4489         Update.
4490
4491 2018-07-26  Tom Tromey  <tromey@redhat.com>
4492
4493         * dbxread.c (end_psymtab): Use text_high_valid and
4494         text_low_valid.
4495         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4496         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4497         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4498         Update comment.
4499         <text_low_valid, text_high_valid>: New fields.
4500         <set_text_low, set_text_high>: Update.
4501         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4502
4503 2018-07-26  Tom Tromey  <tom@tromey.com>
4504
4505         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4506         Update.
4507         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4508         textlow and texthigh fields.
4509         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4510         Update.
4511         * mdebugread.c (parse_lines, parse_partial_symbols)
4512         (psymtab_to_symtab_1): Update.
4513         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4514         Rename fields.  Update comment.  Now private.
4515         <text_low, text_high, set_text_low, set_text_high>: New methods.
4516         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4517         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4518         (start_psymtab_common, maintenance_info_psymtabs)
4519         (maintenance_check_psymtabs): Update.
4520         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4521         texthigh fields.
4522         (scan_xcoff_symtab): Update.
4523
4524 2018-07-26  Tom Tromey  <tromey@redhat.com>
4525
4526         * psympriv.h (struct partial_symbol) <unrelocated_address,
4527         address, set_address>: New methods.
4528         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4529         (fixup_psymbol_section, relocate_psymtabs): Update.
4530         (print_partial_symbols): Add 'objfile' parameter.  Update.
4531         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4532         Update.
4533
4534 2018-07-26  Tom Tromey  <tom@tromey.com>
4535
4536         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4537         (debug_names::write_psymbols): Update.
4538         * psympriv.h (struct partial_symbol): Derive from
4539         general_symbol_info.
4540         <obj_section>: New method.
4541         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4542         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4543         (find_pc_sect_psymbol, fixup_psymbol_section)
4544         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4545         (print_partial_symbols, recursively_search_psymtabs)
4546         (compare_psymbols, psymbol_hash, psymbol_compare)
4547         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4548         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4549
4550 2018-07-26  Tom Tromey  <tromey@redhat.com>
4551
4552         * dbxread.c (end_psymtab): Remove dead code.
4553
4554 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4555
4556         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4557         DWARF unwinders are disabled.
4558         * dwarf2-frame.c: Add dwarf2read.h include.
4559         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4560         disabled.
4561         (dwarf2_frame_unwinders_enabled_p): Define.
4562         (show_dwarf_unwinders_enabled_p): New function.
4563         (_initialize_dwarf2_frame): Register switch to control DWARF
4564         unwinder use.
4565         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4566         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4567         (show_dwarf_cmdlist): Remove static keyword.
4568         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4569         (show_dwarf_cmdlist): Declare.
4570         * NEWS: Document new feature.
4571
4572 2018-07-26  Tom de Vries  <tdevries@suse.de>
4573
4574         PR breakpoints/23366
4575         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4576
4577 2018-07-26  Tom de Vries  <tdevries@suse.de>
4578
4579         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4580         DW_AT_count can't be translated to a dynamic prop.
4581
4582 2018-07-25  Tom de Vries  <tdevries@suse.de>
4583
4584         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4585         try/catch.
4586
4587 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4588
4589         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4590
4591 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4592
4593         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4594
4595 2018-07-24  Keith Seitz  <keiths@redhat.comt
4596
4597         PR symtab/23010
4598         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4599         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4600         instead of add_symbol_to_list.
4601         (read_file_scope): Call prepare_one_comp_unit before reading
4602         any other DIEs.
4603
4604 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4605
4606         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4607
4608 2018-07-24  Tom Tromey  <tom@tromey.com>
4609
4610         * utils.c (malloc, realloc, free): Don't declare.
4611         * configure, config.in: Rebuild.
4612         * configure.ac: Don't check for declarations of free, malloc, or
4613         realloc.
4614
4615 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4616
4617         * aarch64-linux-nat.c
4618         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4619         variable.
4620         * arm-linux-nat.c (fetch_regs): Likewise.
4621         (store_regs): Likewise.
4622         (fetch_vfp_regs): Likewise.
4623         (store_vfp_regs): Likewise.
4624         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4625         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4626         (arm_linux_nat_target::insert_watchpoint): Likewise.
4627         (arm_linux_nat_target::remove_watchpoint): Likewise.
4628         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4629         Likewise.
4630         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4631         Likewise.
4632         * ppc-linux-nat.c (fetch_register): Likewise.
4633         (fetch_all_gp_regs): Likewise.
4634         (fetch_ppc_registers): Likewise.
4635         (store_all_gp_regs): Likewise.
4636         (store_ppc_registers): Likewise.
4637         (hwdebug_insert_point): Likewise.
4638         (can_use_watchpoint_cond_accel): Likewise.
4639         * remote-sim.c (gdb_os_write_stdout): Likewise.
4640
4641 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4642             Tom Tromey  <tom@tromey.com>
4643
4644         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4645         test for it.
4646         * configure: Rebuild.
4647
4648 2018-07-22  Tom Tromey  <tom@tromey.com>
4649
4650         * regformats/regdat.sh: Define xmltarget_${name} inside
4651         #ifndef IN_PROCESS_AGENT.
4652
4653 2018-07-22  Tom Tromey  <tom@tromey.com>
4654
4655         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4656
4657 2018-07-22  Tom Tromey  <tom@tromey.com>
4658
4659         * symfile.c (reread_symbols): Notify iter, not objfile.
4660
4661 2018-07-22  Tom Tromey  <tom@tromey.com>
4662
4663         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4664         Use arch_ops.
4665         (ravenscar_thread_target::prepare_to_store): Likewise.
4666
4667 2018-07-22  Tom Tromey  <tom@tromey.com>
4668
4669         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4670         unused variable.  Call value_fetch_lazy when needed.
4671         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4672         Remove unused variable.  Call value_fetch_lazy when needed.
4673
4674 2018-07-22  Tom Tromey  <tom@tromey.com>
4675
4676         * m32c-tdep.c (mark_dma): Return void.
4677         (make_regs): Remove unused declarations.
4678
4679 2018-07-22  Tom Tromey  <tom@tromey.com>
4680
4681         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4682         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4683         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4684         bkscm_get_valid_block_smob_arg_unsafe for effect.
4685
4686 2018-07-22  Tom Tromey  <tom@tromey.com>
4687
4688         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4689         value_type.
4690
4691 2018-07-22  Tom Tromey  <tom@tromey.com>
4692
4693         * windows-nat.c (saved_context): Conditionally define.
4694         * remote.c (remote_target::remote_btrace_maybe_reopen):
4695         Conditionally declare "warned".
4696         * inflow.c (sigquit_ours): Conditionally define.
4697         (new_tty): Move "tty" declaration inside #if.
4698         * guile/guile.c (guile_datadir): Conditionally define.
4699         * charset.c (set_be_le_names): Move some declarations inside #if.
4700         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4701         #if.
4702         (parse_xml_btrace_conf): Likewise.
4703
4704 2018-07-22  Tom Tromey  <tom@tromey.com>
4705
4706         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4707
4708 2018-07-22  Tom Tromey  <tom@tromey.com>
4709
4710         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4711         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4712         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4713         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4714         * stack.c (frame_apply_level_command): Remove unused variable.
4715         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4716         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4717         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4718         unused variable.
4719         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4720         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4721         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4722         variable.
4723         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4724         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4725         variable.
4726         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4727         Remove unused variable.
4728         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4729         variable.
4730         * common/tdesc.c (print_xml_feature::visit): Remove unused
4731         variable.
4732         * compile/compile-object-load.c (store_regs): Remove unused
4733         variables.
4734         * complaints.c (clear_complaints): Remove unused variable.
4735         * corelow.c (core_target_open): Remove unused variable.
4736         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4737         variable.
4738         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4739         variable.
4740         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4741         variable.
4742         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4743         variable.
4744         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4745         variable.
4746         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4747         variable.
4748         * ia64-tdep.c (examine_prologue): Remove unused variable.
4749         * infcall.c (run_inferior_call): Remove unused variable.
4750         * inferior.c (exit_inferior): Remove unused variable.
4751         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4752         * linespec.c (decode_line_2): Remove unused variable.
4753         * linux-nat.c (super_close): Remove.
4754         * linux-tdep.c (linux_info_proc): Remove unused variable.
4755         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4756         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4757         Remove unused variable.
4758         * parse.c (find_minsym_type_and_address): Remove unused variable.
4759         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4760         variable.
4761         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4762         variable.
4763         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4764         variables.
4765         * record-btrace.c (record_btrace_target::store_registers): Remove
4766         unused variable.
4767         (cmd_show_record_btrace_cpu): Remove unused variable.
4768         * riscv-tdep.c (riscv_register_reggroup_p)
4769         (riscv_push_dummy_call, riscv_return_value): Remove unused
4770         variable.
4771         * rust-exp.y (literal): Remove unused variable.
4772         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4773         unused variable.
4774         <STRUCTOP_ANONYMOUS>: Likewise.
4775         * s390-linux-tdep.c (s390_linux_init_abi_31)
4776         (s390_linux_init_abi_64): Remove unused variable.
4777         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4778         (file_select_thread, net_windows_open, _initialize_ser_windows):
4779         Remove unused variables.
4780         * symtab.c (find_pc_sect_line): Remove unused variable.
4781         * target-memory.c (compute_garbled_blocks): Remove unused
4782         variable.
4783         (target_write_memory_blocks): Remove unused variable.
4784         * target.c (target_stack::unpush): Remove unused variables.
4785         * tracepoint.c (start_tracing, all_tracepoint_actions)
4786         (merge_uploaded_trace_state_variables)
4787         (print_one_static_tracepoint_marker): Remove unused variable.
4788         * unittests/basic_string_view/element_access/char/1.cc (test01):
4789         Remove unused variable.
4790         * windows-nat.c (windows_continue, windows_add_all_dlls)
4791         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4792         Remove unused variables.
4793
4794 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4795
4796         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4797         attr_profile in HAVE_ELF.
4798         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4799         HAVE_ELF.
4800
4801 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4802
4803         * frame.c (frame_register_unwind): Change parameter name.
4804         (frame_unwind_register): Likewise.
4805         (frame_unwind_register_value): Likewise.
4806         (frame_unwind_register_signed): Likewise.
4807         (frame_unwind_register_unsigned): Likewise.
4808         * frame.h (frame_register_unwind): Likewise.
4809         (frame_unwind_register): Likewise.
4810         (frame_unwind_register_value): Likewise.
4811         (frame_unwind_register_signed): Likewise.
4812         (frame_unwind_register_unsigned): Likewise.
4813         (frame_unwind_arch): Likewise.
4814
4815 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4816
4817         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4818         ISA maintenance.
4819
4820 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4821
4822         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4823         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4824         hand.
4825
4826 2018-07-20  Keith Seitz  <keiths@redhat.com>
4827
4828         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4829         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4830         m_compunit_symtab, m_language>: Add "m_" prefix.
4831         Update all uses.
4832         * buildsym.c: Update all uses.
4833
4834 2018-07-20  Tom Tromey  <tom@tromey.com>
4835
4836         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4837         * buildsym.h (record_line_ftype): Remove typedef.
4838
4839 2018-07-20  Tom Tromey  <tom@tromey.com>
4840
4841         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4842         (end_expandable_symtab): Likewise.
4843         (end_symtab_get_static_block): Likewise.
4844         (end_symtab_from_static_block): Likewise.
4845         * buildsym-legacy.c (augment_type_symtab): Remove.
4846         (end_expandable_symtab): Remove.
4847         (end_symtab_get_static_block): Remove.
4848         (end_symtab_from_static_block): Remove.
4849
4850 2018-07-20  Tom Tromey  <tom@tromey.com>
4851
4852         * dwarf2read.c: Include buildsym.h.
4853         (struct dwarf2_cu) <builder>: New method.
4854         (fixup_go_packaging): Update.
4855         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4856         use scoped_free_pendings.
4857         (using_directives): Add "cu" parameter, remove "language".
4858         (read_import_statement, setup_type_unit_groups, )
4859         (read_func_scope, read_lexical_block_scope)
4860         (dwarf2_record_block_ranges, read_namespace): Update.
4861         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4862         (lnp_state_machine::handle_end_sequence): Update.
4863         (class lnp_state_machine) <m_cu>: New member.
4864         <m_record_line_callback>: Remove.
4865         <m_currently_recording_lines>: New member.
4866         (lnp_state_machine::handle_set_file): Update.
4867         (noop_record_line): Remove.
4868         (dwarf_record_line_p): Add cu parameter.
4869         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4870         (lnp_state_machine::record_line)
4871         (lnp_state_machine::lnp_state_machine)
4872         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4873         (dwarf_decode_lines): Update.
4874         (dwarf2_start_subfile): Add cu parameter.
4875         (dwarf2_start_symtab, new_symbol): Update.
4876         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4877         Remove dwarf2_per_objfile parameter.
4878         (dwarf_decode_macros): Update.
4879
4880 2018-07-20  Tom Tromey  <tom@tromey.com>
4881
4882         * stabsread.c (define_symbol): Update.
4883         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4884         * dwarf2read.c (new_symbol): Update.
4885         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4886         * cp-namespace.c: Include buildsym.h.
4887         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4888         * buildsym-legacy.c (get_buildsym_compunit): New function.
4889
4890 2018-07-20  Tom Tromey  <tom@tromey.com>
4891
4892         * xcoffread.c: Include buildsym-legacy.h.
4893         * windows-nat.c: Include buildsym-legacy.h.
4894         * stabsread.c: Include buildsym-legacy.h.
4895         * mdebugread.c: Include buildsym-legacy.h.
4896         * buildsym-legacy.h: New file.
4897         * buildsym-legacy.c: New file, from buildsym.c.
4898         * go32-nat.c: Include buildsym-legacy.h.
4899         * dwarf2read.c: Include buildsym-legacy.h.
4900         * dbxread.c: Include buildsym-legacy.h.
4901         * cp-namespace.c: Include buildsym-legacy.h.
4902         * coffread.c: Include buildsym-legacy.h.
4903         * buildsym.h: Move some contents to buildsym-legacy.h.
4904         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4905         buildsym-legacy.c.
4906         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4907
4908 2018-07-20  Tom Tromey  <tom@tromey.com>
4909
4910         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4911         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4912         (buildsym_compunit::buildsym_compunit)
4913         (buildsym_compunit::~buildsym_compunit)
4914         (buildsym_compunit::get_macro_table): Define.
4915
4916 2018-07-20  Tom Tromey  <tom@tromey.com>
4917
4918         * buildsym.c (reset_symtab_globals): Remove.
4919         (buildsym_compunit::end_symtab_from_static_block): Update.
4920         (buildsym_compunit::augment_type_symtab): Update.
4921         (end_symtab_from_static_block): Call free_buildsym_compunit.
4922         (augment_type_symtab, end_symtab, end_expandable_symtab):
4923         Likewise.
4924
4925 2018-07-20  Tom Tromey  <tom@tromey.com>
4926
4927         * arch-utils.c: Do not include buildsym.h.
4928         * mipsread.c: Do not include buildsym.h.
4929         * machoread.c: Do not include buildsym.h.
4930         * elfread.c: Do not include buildsym.h.
4931
4932 2018-07-20  Tom Tromey  <tom@tromey.com>
4933
4934         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4935         initialization.
4936         (buildsym_compunit): Add new constructor.
4937         (struct buildsym_compunit) <get_last_source_file, finish_block,
4938         record_block_range, start_subfile, patch_subfile_names,
4939         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4940         set_last_source_start_addr, get_last_source_start_addr,
4941         get_local_using_directives, set_local_using_directives,
4942         get_global_using_directives, outermost_context_p,
4943         get_current_context_stack, get_context_stack_depth,
4944         get_current_subfile, get_local_symbols, get_file_symbols,
4945         get_global_symbols, record_debugformat, record_producer,
4946         push_context, pop_context, end_symtab_get_static_block,
4947         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4948         New public methods.
4949         <record_pending_block, finish_block_internal, make_blockvector,
4950         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4951         private methods.
4952         Update all users.
4953
4954 2018-05-22  Tom Tromey  <tom@tromey.com>
4955
4956         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4957         parameter.
4958         (finish_block_internal): Update.
4959
4960 2018-07-20  Tom Tromey  <tom@tromey.com>
4961
4962         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4963         parameter.
4964         (finish_block_internal): Update.
4965
4966 2018-07-20  Tom Tromey  <tom@tromey.com>
4967
4968         * buildsym.h (EXTERN): Don't define or undef.
4969         * buildsym.c (EXTERN): Don't define.
4970
4971 2018-07-20  Tom Tromey  <tom@tromey.com>
4972
4973         * buildsym.c: Remove TODO comment.
4974
4975 2018-07-20  Tom Tromey  <tom@tromey.com>
4976
4977         * coffread.c (coff_symtab_read): Update.
4978         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4979         (xcoff_new_init): Update.
4980         * mipsread.c (mipscoff_new_init): Update.
4981         * mdebugread.c (mdebug_build_psymtabs): Update.
4982         * elfread.c (elf_new_init): Update.
4983         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4984         Update.
4985         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4986         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4987         (stabsect_build_psymtabs): Update.
4988         * buildsym.h (buildsym_init): Don't declare.
4989         * buildsym.c: Update comment.
4990         (prepare_for_building): Remove.
4991         (start_symtab, restart_symtab): Update.
4992         (reset_symtab_globals): Update comment.
4993         (buildsym_init): Remove.
4994
4995 2018-07-20  Tom Tromey  <tom@tromey.com>
4996
4997         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4998         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4999         (read_enum_type, common_block_start, common_block_end)
5000         (cleanup_undefined_types_1, finish_global_stabs): Update.
5001         * mdebugread.c (psymtab_to_symtab_1): Update.
5002         * dwarf2read.c (fixup_go_packaging, read_func_scope)
5003         (read_lexical_block_scope, new_symbol): Update.
5004         * dbxread.c (process_one_symbol): Update.
5005         * coffread.c (coff_symtab_read, process_coff_symbol)
5006         (coff_read_enum_type): Update.
5007         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
5008         declare.
5009         (get_local_symbols, get_file_symbols, get_global_symbols): New
5010         functions.
5011         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
5012         m_global_symbols.
5013         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
5014         (~scoped_free_pendings): Update.
5015         (finish_block, prepare_for_building, reset_symtab_globals)
5016         (end_symtab_get_static_block, end_symtab_with_blockvector)
5017         (augment_type_symtab, push_context): Update.
5018         (get_local_symbols, get_file_symbols, get_global_symbols): New
5019         functions.
5020         (buildsym_init): Update.
5021
5022 2018-07-20  Tom Tromey  <tom@tromey.com>
5023
5024         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
5025         (process_full_type_unit): Likewise.
5026         (dwarf2_start_symtab): Set list_in_scope.
5027
5028 2018-07-20  Tom Tromey  <tom@tromey.com>
5029
5030         * dwarf2read.c (process_psymtab_comp_unit_reader)
5031         (build_type_psymtabs_reader): Do not set list_in_scope.
5032
5033 2018-07-20  Tom Tromey  <tom@tromey.com>
5034
5035         * buildsym.c (free_pendings): Remove.
5036         (add_symbol_to_list, scoped_free_pendings)
5037         (finish_block_internal, buildsym_init): Update.
5038
5039 2018-07-20  Tom Tromey  <tom@tromey.com>
5040
5041         * xcoffread.c (read_xcoff_symtab): Update.
5042         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
5043         Update.
5044         * dbxread.c (process_one_symbol): Update.
5045         * coffread.c (coff_symtab_read): Update.
5046         * buildsym.h (finish_block): Update.
5047         * buildsym.c (finish_block): Remove "listhead" argument.
5048         (end_symtab_get_static_block): Update.
5049
5050 2018-07-20  Tom Tromey  <tom@tromey.com>
5051
5052         * buildsym.h (class scoped_free_pendings): Remove constructor.
5053         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
5054         method.
5055         <m_pending_block_obstack, m_pending_blocks>: New members.
5056         (pending_block_obstack, pending_blocks): Remove.
5057         (scoped_free_pendings::scoped_free_pendings): Default.
5058         (~scoped_free_pendings): Update.
5059         (free_pending_blocks): Remove.
5060         (finish_block_internal, record_pending_block, make_blockvector)
5061         (end_symtab_get_static_block, augment_type_symtab, push_context)
5062         (buildsym_init): Update.
5063
5064 2018-07-20  Tom Tromey  <tom@tromey.com>
5065
5066         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
5067         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
5068         members.
5069         (pending_addrmap, pending_addrmap_obstack)
5070         (pending_addrmap_interesting): Remove.
5071         (scoped_free_pendings, record_block_range, make_blockvector)
5072         (prepare_for_building, reset_symtab_globals, buildsym_init):
5073         Update.
5074
5075 2018-07-20  Tom Tromey  <tom@tromey.com>
5076
5077         * xcoffread.c (process_linenos): Update.
5078         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
5079         * mdebugread.c (psymtab_to_symtab_1): Update.
5080         * dwarf2read.c (setup_type_unit_groups)
5081         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
5082         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
5083         * dbxread.c (process_one_symbol): Update.
5084         * coffread.c (coff_symtab_read, enter_linenos)
5085         (process_coff_symbol): Update.
5086         * buildsym.h (current_subfile): Don't declare.
5087         (get_current_subfile): Declare.
5088         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
5089         member.
5090         (start_subfile, free_buildsym_compunit, push_subfile)
5091         (prepare_for_building, start_symtab): Update.
5092         (get_current_subfile): New function.
5093
5094 2018-07-20  Tom Tromey  <tom@tromey.com>
5095
5096         * coffread.c (coff_symtab_read): Update.
5097         * xcoffread.c (read_xcoff_symtab): Update.
5098         * dwarf2read.c (new_symbol): Update.
5099         (read_func_scope, read_lexical_block_scope): Update.
5100         * dbxread.c (process_one_symbol): Update.
5101         * buildsym.h (context_stack, context_stack_depth): Don't declare.
5102         (outermost_context_p): Remove macro.
5103         (outermost_context_p, get_current_context_stack)
5104         (get_context_stack_depth): Declare.
5105         (pop_context): Return struct context_stack.
5106         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
5107         member.
5108         (context_stack_size): Remove.
5109         (INITIAL_CONTEXT_STACK_SIZE): Remove.
5110         (prepare_for_building, end_symtab_get_static_block)
5111         (augment_type_symtab, push_context): Update.
5112         (pop_context): Return struct context_stack.
5113         (outermost_context_p, get_current_context_stack)
5114         (get_context_stack_depth): New functions.
5115         (buildsym_init): Update.
5116
5117 2018-07-20  Tom Tromey  <tom@tromey.com>
5118
5119         * rust-exp.y: Now a pure parser.  Update all rules.
5120         (%union): Move earlier.
5121         (current_parser, work_obstack): Remove globals.
5122         (rust_parser, ~rust_parser): Update.
5123         (class rust_parser) <copy_name, concat3, crate_name, super_name,
5124         lex_character, lex_number, lex_string, lex_identifier,
5125         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
5126         convert_name, convert_params_to_expression,
5127         convert_ast_to_expression, ast_basic_type, ast_operation,
5128         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
5129         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
5130         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
5131         ast_array_type, ast_slice_type, ast_reference_type,
5132         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
5133         (rust_parse): Update.
5134         (rustyyerror, rustyylex): Add parser parameter.
5135         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
5136         (rust_lex_stringish_test, rust_lex_test_sequence)
5137         (rust_lex_test_trailing_dot, rust_lex_test_completion)
5138         (rust_lex_test_push_back, rust_lex_tests): Update.
5139
5140 2018-07-19  Pedro Alves  <palves@redhat.com>
5141
5142         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
5143         gdb::unique_xmalloc_ptr.
5144         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
5145         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
5146         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
5147         copy-initialization.
5148         * guile/scm-pretty-print.c (ppscm_print_children): Use
5149         gdb::unique_xmalloc_ptr instead of cleanups.
5150         (gdbscm_apply_val_pretty_printer): Remove cleanups.
5151         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
5152         gdb::unique_xmalloc_ptr.
5153         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5154         Adjust to use gdb::unique_xmalloc_ptr.
5155         * guile/scm-utils.c (extract_arg): Adjust.
5156         * guile/scm-value.c (gdbscm_value_field): Adjust to use
5157         gdb::unique_xmalloc_ptr instead of a cleanup.
5158
5159 2018-07-19  Tom Tromey  <tom@tromey.com>
5160
5161         * utils.c (do_value_free_to_mark)
5162         (make_cleanup_value_free_to_mark): Remove.
5163         * utils.h (make_cleanup_value_free_to_mark): Remove.
5164
5165 2018-07-19  Pedro Alves  <palves@redhat.com>
5166
5167         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
5168         forwarding reference.
5169
5170 2018-07-18  Pedro Alves  <palves@redhat.com>
5171
5172         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
5173         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
5174         cleanup.
5175
5176 2018-07-18  Pedro Alves  <palves@redhat.com>
5177
5178         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
5179         exceptions.
5180         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
5181         (gdbscm_wrap): New.
5182         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
5183         directly instead of a cleanup.
5184         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
5185         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
5186         (vlscm_binop_gdbthrow): New, factored out from ...
5187         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
5188         (vlscm_rich_compare): Use gdbscm_wrap.
5189         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
5190         instead of a cleanup.
5191         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
5192         cleanup.
5193         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
5194         Use xfree directly instead of a cleanup.
5195         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
5196         Adjust to use gdbscm_wrap and scoped_value_mark.
5197         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
5198         (gdbscm_value_address, gdbscm_value_dereference)
5199         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5200         scoped_value_mark.
5201         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5202         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5203         scoped_value_mark.
5204         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5205         gdbscm_wrap and scoped_value_mark.
5206         (gdbscm_value_to_string): Use xfree directly instead of a
5207         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5208         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5209         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5210         scoped_value_mark.
5211         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5212         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5213         scoped_value_mark.
5214         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5215         gdbscm_wrap.
5216
5217 2018-07-18  Tom de Vries  <tdevries@suse.de>
5218
5219         * findvar.c (default_read_var_value): Also resolve dynamic type for
5220         LOC_OPTIMIZED_OUT vars.
5221
5222 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5223
5224         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5225         decoding.
5226
5227 2018-07-17  Tom Tromey  <tom@tromey.com>
5228
5229         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5230         (compute_enum_list, pascm_set_param_value_x)
5231         (gdbscm_parameter_value): Update.
5232         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5233         (gdbscm_scm_to_host_string): Update.
5234         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5235         Update.
5236         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5237         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5238         * guile/scm-string.c (gdbscm_scm_to_string): Return
5239         unique_xmalloc_ptr.
5240         (gdbscm_scm_to_host_string): Likewise.
5241
5242 2018-07-17  Tom Tromey  <tom@tromey.com>
5243
5244         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5245         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5246         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5247         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5248         unique_xmalloc_ptr.
5249
5250 2018-07-17  Tom Tromey  <tom@tromey.com>
5251
5252         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5253         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5254         Update.
5255         * guile/scm-cmd.c (cmdscm_function): Update.
5256         * guile/scm-pretty-print.c
5257         (ppscm_print_exception_unless_memory_error): Update.
5258         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5259         Return unique_xmalloc_ptr.
5260
5261 2018-07-17  Tom Tromey  <tom@tromey.com>
5262
5263         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5264         Use string_printf.
5265
5266 2018-07-17  Jim Wilson  <jimw@sifive.com>
5267
5268         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5269         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
5270         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
5271         unecessary braces after EF_RISCV_RVC test.  Delete call to
5272         set_gdbarch_decr_pc_after_break.
5273
5274         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5275         RISCV_LAST_FP_REGNUM + 1.
5276         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5277
5278 2018-07-17  Tom Tromey  <tom@tromey.com>
5279
5280         * configure.ac: Remove --disable-gdbcli.
5281         * configure: Rebuild.
5282         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5283         (SUBDIR_CLI_CFLAGS): Remove.
5284         (SFILES): Use SUBDIR_CLI_SRCS.
5285         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5286
5287 2018-07-17  Tom Tromey  <tom@tromey.com>
5288
5289         PR gdb/18624:
5290         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5291
5292 2018-07-16  Jim Wilson  <jimw@sifive.com>
5293
5294         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5295
5296 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5297
5298         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5299         variable.
5300         (libunwind_frame_sniffer): Likewise.
5301         (libunwind_frame_prev_register): Likewise.
5302         (libunwind_sigtramp_frame_sniffer): Likewise.
5303         * ia64-tdep.c (ia64_access_reg): Likewise.
5304         (ia64_access_rse_reg): Likewise.
5305         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5306         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5307
5308 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5309
5310         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5311
5312 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5313
5314         * remote-sim.c (gdbsim_target::close,
5315         gdbsim_target::mourn_inferior): Remove unused variables.
5316
5317 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5318
5319         * ia64-tdep.c (ktab_buf): New global.
5320         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5321         (get_kernel_table): Adjust.
5322
5323 2018-07-16  Tom Tromey  <tom@tromey.com>
5324
5325         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5326         * dwarf2read.c (using_directives, new_symbol): Use
5327         outermost_context_p.
5328         * dbxread.c (process_one_symbol): Use outermost_context_p.
5329         * coffread.c (coff_symtab_read): Use outermost_context_p.
5330
5331 2018-07-16  Tom Tromey  <tom@tromey.com>
5332
5333         * dwarf2read.c (using_directives, read_func_scope)
5334         (read_lexical_block_scope): Update.
5335         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5336         * buildsym.h (local_using_directives, global_using_directives):
5337         Don't declare.
5338         (get_local_using_directives, set_local_using_directives)
5339         (get_global_using_directives): Declare.
5340         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5341         m_global_using_directives>: New members.
5342         (finish_block_internal, prepare_for_building)
5343         (reset_symtab_globals, end_symtab_get_static_block)
5344         (push_context): Update.
5345         (get_local_using_directives, set_local_using_directives)
5346         (get_global_using_directives): New functions.
5347         (buildsym_init): Update.
5348
5349 2018-07-16  Tom Tromey  <tom@tromey.com>
5350
5351         * xcoffread.c (xcoff_initial_scan): Don't call
5352         free_pending_blocks.
5353         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5354         * buildsym.h (class scoped_free_pendings): Add constructor.
5355         (free_pending_blocks): Don't declare.
5356         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5357         (free_pending_blocks): Now static.
5358
5359 2018-07-16  Tom Tromey  <tom@tromey.com>
5360
5361         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5362         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5363         member.
5364         (struct subfile_stack): Remove.
5365         (subfile_stack): Remove.
5366         (push_subfile, pop_subfile, buildsym_init): Update.
5367
5368 2018-07-16  Tom Tromey  <tom@tromey.com>
5369
5370         * buildsym.c (push_subfile): Use gdb_assert.
5371         (pop_subfile): Use gdb_assert.
5372
5373 2018-07-16  Tom Tromey  <tom@tromey.com>
5374
5375         * buildsym.h (merge_symbol_lists): Remove.
5376         * buildsym.c (merge_symbol_lists): Remove.
5377
5378 2018-07-16  Tom Tromey  <tom@tromey.com>
5379
5380         * stabsread.c (scan_file_globals): Update comment.
5381         * stabsread.h (scan_file_globals): Move from buildsym.h.
5382         * buildsym.h (scan_file_globals): Move to stabsread.h.
5383
5384 2018-07-16  Tom Tromey  <tom@tromey.com>
5385
5386         * xcoffread.c (xcoff_new_init): Update.
5387         * mipsread.c (mipscoff_new_init): Update.
5388         * mdebugread.c (mdebug_build_psymtabs): Update.
5389         * elfread.c (elf_new_init): Update.
5390         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5391         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5392         * buildsym.h (buildsym_new_init): Don't declare.
5393         * buildsym.c (buildsym_new_init): Remove.
5394
5395 2018-07-16  Tom Tromey  <tom@tromey.com>
5396
5397         * stabsread.h (within_function): Move from buildsym.h.
5398         * stabsread.c (start_stabs): Clear within_function.
5399         * coffread.c (coff_start_symtab): Clear within_function.
5400         * buildsym.h (within_function): Move to stabsread.h.
5401         * buildsym.c (prepare_for_building): Update.
5402
5403 2018-07-16  Tom Tromey  <tom@tromey.com>
5404
5405         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5406         * dwarf2read.c (dwarf2_start_symtab): Don't set
5407         processing_gcc_compilation.
5408         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5409
5410 2018-07-16  Tom Tromey  <tom@tromey.com>
5411
5412         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5413         (next_symbol_text_func): Move from buildsym.h.
5414         * stabsread.c (hashname): Move from buildsym.c.
5415         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5416         (next_symbol_text_func, hashname): Move to stabsread.h.
5417         * buildsym.c: Don't include bcache.h
5418         (hashname): Move to stasbread.c.
5419
5420 2018-07-16  Tom Tromey  <tom@tromey.com>
5421
5422         * buildsym.h (context_stack_size): Don't declare.
5423         * buildsym.c (context_stack_size): New global.
5424
5425 2018-07-16  Tom Tromey  <tom@tromey.com>
5426
5427         * dbxread.c (processing_acc_compilation): New global.
5428         * buildsym.h (processing_acc_compilation): Don't declare.
5429
5430 2018-07-16  Tom Tromey  <tom@tromey.com>
5431
5432         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5433         * dbxread.c (read_ofile_symtab): Update.
5434         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5435         * buildsym.h (last_source_start_addr): Remove.
5436         (set_last_source_start_addr, get_last_source_start_addr):
5437         Declare.
5438         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5439         parameter.
5440         (struct buildsym_compunit) <m_last_source_start_addr>: New
5441         member.
5442         (prepare_for_building): Remove start_addr parameter.
5443         (start_symtab, restart_symtab, end_symtab_get_static_block)
5444         (end_symtab_with_blockvector): Update.
5445         (set_last_source_start_addr, get_last_source_start_addr): New
5446         functions.
5447
5448 2018-07-16  Tom Tromey  <tom@tromey.com>
5449
5450         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5451         member.
5452         (have_line_numbers): Remove.
5453         (record_line, prepare_for_building, end_symtab_get_static_block)
5454         (augment_type_symtab): Update.
5455
5456 2018-07-16  Tom Tromey  <tom@tromey.com>
5457
5458         * buildsym.c (~buildsym_compunit): Free the macro table.
5459         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5460         methods.
5461         <m_pending_macros>: New member.
5462         (pending_macros): Remove.
5463         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5464         (reset_symtab_globals, end_symtab_get_static_block)
5465         (end_symtab_with_blockvector, augment_type_symtab)
5466         (buildsym_init): Update.
5467
5468 2018-07-16  Tom Tromey  <tom@tromey.com>
5469
5470         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5471         parameter.
5472         (buildsym_compunit::set_last_source_file): New method.
5473         <m_last_source_file>: New member.
5474         (prepare_for_building): Remove "name" parameter.
5475         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5476         (last_source_file): Remove.
5477         (set_last_source_file, get_last_source_file): Update.
5478
5479 2018-07-16  Tom Tromey  <tom@tromey.com>
5480
5481         * buildsym.c (prepare_for_building): Add assert.
5482
5483 2018-07-16  Tom Tromey  <tom@tromey.com>
5484
5485         * buildsym.c (~buildsym_compunit): Update.
5486         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5487         (start_subfile, patch_subfile_names)
5488         (end_symtab_with_blockvector): Update.
5489
5490 2018-07-16  Tom Tromey  <tom@tromey.com>
5491
5492         * buildsym.c (struct buildsym_compunit): Add constructor,
5493         destructor, initializers.
5494         (start_buildsym_compunit): Remove.
5495         (free_buildsym_compunit): Use "delete".
5496         (start_symtab, restart_symtab): Use "new".
5497
5498 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5499
5500         * symfile.c (set_objfile_default_section_offset): Remove struct
5501         keyword.
5502
5503 2018-07-14  Stafford Horne  <shorne@gmail.com>
5504
5505         * (Responsible Maintainers): Add myself as or1k maintainer.
5506
5507 2018-07-13  Tom Tromey  <tom@tromey.com>
5508
5509         * symfile.c (set_objfile_default_section_offset): Use extra braces
5510         around initializer.
5511
5512 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5513
5514         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5515         non-branching basr.
5516
5517 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5518
5519         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5520         unittests/cli-utils-selftests.c
5521         * unittests/cli-utils-selftests.c: New file.
5522
5523 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5524
5525         * NEWS: Mention new commands. Mention change to 'thread apply'.
5526
5527 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5528
5529         * thread.c (thr_try_catch_cmd): New function.
5530         (thread_apply_all_command): Handle qcs flags.
5531         (thread_apply_command): Handle qcs flags.
5532         (taas_command): New function.
5533         (tfaas_command): New function.
5534         (_initialize_thread): Update to setup the new commands 'taas
5535         and 'tfaas'. Change doc string for 'thread apply'.
5536
5537 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5538
5539         * stack.c: (trailing_outermost_frame): New function, mostly
5540         extracted from backtrace_command_1.
5541         (leading_innermost_frame): New function.
5542         (backtrace_command_1): Update to call trailing_outermost_frame.
5543         (frame_apply_command_count): New function.
5544         (frame_apply_level_command): New function.
5545         (frame_apply_all_command): New function.
5546         (frame_apply_command): New function.
5547         (faas_command): New function.
5548         (frame_cmd_list): New variable.
5549         (_initialize_stack): Update to setup the new commands 'frame apply'
5550         and 'faas'.
5551
5552 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5553
5554         * cli-utils.c (number_or_range_parser::get_number): Only handle
5555         numbers or convenience var as numbers.
5556         (parse_flags): New function.
5557         (parse_flags_qcs): New function.
5558         (number_or_range_parser::finished): Ensure parsing end is detected
5559         before end of string.
5560         * cli-utils.h (parse_flags): New function.
5561         (parse_flags_qcs): New function.
5562         (number_or_range_parser): Remove m_finished bool.
5563         (number_or_range_parser::skip_range): Set m_in_range to false.
5564
5565 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5566
5567         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5568         on Windows.
5569
5570 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5571             Jan Kratochvil  <jan.kratochvil@redhat.com>
5572             Paul Fertser  <fercerpav@gmail.com>
5573             Tsutomu Seki  <sekiriki@gmail.com>
5574             Pedro Alves  <palves@redhat.com>
5575
5576         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5577         'unittests/parse-connection-spec-selftests.c'.
5578         (COMMON_SFILES): Add 'common/netstuff.c'.
5579         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5580         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5581         * common/netstuff.c: New file.
5582         * common/netstuff.h: New file.
5583         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5584         (wait_for_connect): Update comment.  New parameter
5585         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5586         Use 'sock' directly instead of 'scb->fd'.
5587         (try_connect): New function, with code from 'net_open'.
5588         (net_open): Rewrite main loop to deal with multiple
5589         sockets/addresses.  Handle IPv6-style hostnames; implement
5590         support for IPv6 connections.
5591         * unittests/parse-connection-spec-selftests.c: New file.
5592
5593 2018-07-11  Pedro Alves  <palves@redhat.com>
5594
5595         PR gdb/23377
5596         * remote.c (remote_target::remote_detach_pid): Call
5597         set_current_process.
5598
5599 2018-07-11  Pedro Alves  <palves@redhat.com>
5600
5601         * h8300-tdep.c (h8300_gdbarch_init): Remove
5602         set_gdbarch_ecoff_reg_to_regnum calls.
5603
5604 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5605
5606         PR c++/23373
5607         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5608         offsets/sizes for static members of a class/struct.
5609
5610 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5611
5612         * target-descriptions.c (tdesc_register_bitsize): Rename.
5613         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5614         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5615         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5616
5617 2018-07-10  Tom Tromey  <tom@tromey.com>
5618
5619         * breakpoint.c (moribund_locations): Now static and a
5620         std::vector.
5621         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5622         (build_bpstat_chain, update_global_location_list)
5623         (breakpoint_retire_moribund): Update.
5624         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5625         VEC.
5626
5627 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5628
5629         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5630         (riscv_register_reggroup_p): Use new function, remove unneeded
5631         parenthesis.
5632         (riscv_push_dummy_call): Extend assert to compare against xlen or
5633         flen based on register type.
5634
5635 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5636
5637         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5638
5639 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5640
5641         * remote.c (show_hardware_watchpoint_limit): New function.
5642         (show_hardware_watchpoint_length_limit): New function.
5643         (show_hardware_breakpoint_limit): New function.
5644         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5645         where appropriate, update help text.
5646
5647 2018-07-09  Tom Tromey  <tom@tromey.com>
5648
5649         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5650         (CLIBS): Don't mention NAT_CLIBS.
5651
5652 2018-07-09  Tom Tromey  <tom@tromey.com>
5653
5654         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5655         (LIBGDB_OBS, clean mostlyclean): Update.
5656         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5657
5658 2018-07-09  Tom Tromey  <tom@tromey.com>
5659
5660         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5661         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5662         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5663
5664 2018-07-09  Tom Tromey  <tom@tromey.com>
5665
5666         * Makefile.in (ALLDEPFILES): Remove exec.c.
5667         (COMMON_OBS): Remove exec.o.
5668         (COMMON_SFILES): Add exec.c.
5669
5670 2018-07-09  Tom Tromey  <tom@tromey.com>
5671
5672         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5673
5674 2018-07-09  Tom Tromey  <tom@tromey.com>
5675
5676         * Makefile.in (clean mostlyclean): Remove stamp-version.
5677         (version.c): Depend on stamp-version.
5678         (stamp-version): New rule, from version.c rule.
5679
5680 2018-07-09  Tom Tromey  <tom@tromey.com>
5681
5682         * Makefile.in (init.c): Depend on stamp-init.
5683         (stamp-init): New rule, from init.c rule.
5684         (clean mostlyclean): Remove stamp-init.
5685
5686 2018-07-09  Tom Tromey  <tom@tromey.com>
5687
5688         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5689         SUBDIR_GCC_COMPILE_SRCS.
5690
5691 2018-07-09  Tom Tromey  <tom@tromey.com>
5692
5693         * Makefile.in (init.c): Remove some unused sed rules.
5694
5695 2018-07-09  Tom Tromey  <tom@tromey.com>
5696
5697         * Makefile.in (TSOBS): Remove.
5698         (INIT_FILES): Update.
5699         (LIBGDB_OBS): Update.
5700         (COMMON_SFILES): Add inflow.c.
5701         (SFILES): Remove inflow.c.
5702
5703 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5704
5705         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5706
5707 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5708
5709         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5710         get_saveloc_name, is_signal_frame_name, step_name,
5711         init_remote_name, create_addr_space_name,
5712         destroy_addr_space_name, search_unwind_table_name,
5713         find_dyn_list_name): Constify.
5714
5715 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5716
5717         * darwin-nat.c (darwin_pthread_kill): New function.
5718         (darwin_resume_thread): Use darwin_pthread_kill.
5719
5720 2018-07-05  Tom de Vries  <tdevries@suse.de>
5721
5722         * macroexp.c (macro_buffer) <operator=>: New member function.
5723
5724 2018-07-04  Tom Tromey  <tom@tromey.com>
5725
5726         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5727
5728 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5729
5730         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5731         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5732         * maint.c: Likewise.
5733         * top.c: Likewise.
5734
5735 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5736
5737         * NEWS: Create a new section for the next release branch.
5738         Rename the section of the current branch, now that it has
5739         been cut.
5740
5741 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5742
5743         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5744         * version.in: Bump version to 8.2.50.DATE-git.
5745
5746 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5747             Pedro Alves  <palves@redhat.com>
5748
5749         * linux-nat.c (linux_init_ptrace): Rename to ...
5750         (linux_init_ptrace_procfs): ... this.  Call
5751         linux_proc_init_warnings.
5752         (linux_nat_target::post_attach)
5753         (linux_nat_target::post_startup_inferior): Adjust.
5754         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5755         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5756
5757 2018-07-04  Tom de Vries  <tdevries@suse.de>
5758
5759         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5760         check ...
5761         (read_comp_unit_head): ... here.
5762
5763 2018-07-03  Tom Tromey  <tom@tromey.com>
5764
5765         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5766         (stop_tracing, tstatus_command)
5767         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5768         (print_one_static_tracepoint_marker): Update.
5769         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5770         std::vector.
5771         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5772         VEC.
5773         (all_tracepoints, static_tracepoints_here): Return std::vector.
5774
5775 2018-07-03  Tom Tromey  <tom@tromey.com>
5776
5777         * common/ptid.c (ptid_equal): Remove.
5778         * common/ptid.h (ptid_equal): Don't declare.
5779         * ada-tasks.c: Update.
5780         * breakpoint.c: Update.
5781         * common/agent.c: Update.
5782         * corelow.c: Update.
5783         * darwin-nat-info.c: Update.
5784         * darwin-nat.c: Update.
5785         * dcache.c: Update.
5786         * dtrace-probe.c: Update.
5787         * dummy-frame.c: Update.
5788         * fbsd-nat.c: Update.
5789         * frame.c: Update.
5790         * gdbthread.h: Update.
5791         * gnu-nat.c: Update.
5792         * go32-nat.c: Update.
5793         * inf-loop.c: Update.
5794         * inf-ptrace.c: Update.
5795         * infcall.c: Update.
5796         * infcmd.c: Update.
5797         * inflow.c: Update.
5798         * infrun.c: Update.
5799         * linux-fork.c: Update.
5800         * linux-nat.c: Update.
5801         * linux-thread-db.c: Update.
5802         * mi/mi-cmd-var.c: Update.
5803         * mi/mi-interp.c: Update.
5804         * mi/mi-main.c: Update.
5805         * nto-procfs.c: Update.
5806         * ppc-linux-tdep.c: Update.
5807         * procfs.c: Update.
5808         * python/py-inferior.c: Update.
5809         * python/py-record-btrace.c: Update.
5810         * python/py-record.c: Update.
5811         * ravenscar-thread.c: Update.
5812         * regcache.c: Update.
5813         * remote-sim.c: Update.
5814         * remote.c: Update.
5815         * sol-thread.c: Update.
5816         * solib.c: Update.
5817         * target.c: Update.
5818         * tui/tui-stack.c: Update.
5819         * varobj.c: Update.
5820         * windows-nat.c: Update.
5821         * windows-tdep.c: Update.
5822
5823 2018-07-03  Tom Tromey  <tom@tromey.com>
5824
5825         * common/ptid.c (ptid_match): Remove.
5826         * common/ptid.h (ptid_match): Don't declare.
5827         * fbsd-nat.c: Update.
5828         * infcmd.c: Update.
5829         * infrun.c: Update.
5830         * linux-nat.c: Update.
5831         * record-btrace.c: Update.
5832         * regcache.c: Update.
5833         * remote.c: Update.
5834
5835 2018-07-03  Tom Tromey  <tom@tromey.com>
5836
5837         * common/ptid.c (ptid_tid_p): Remove.
5838         * common/ptid.h (ptid_tid_p): Don't declare.
5839         * sol-thread.c: Update.
5840
5841 2018-07-03  Tom Tromey  <tom@tromey.com>
5842
5843         * common/ptid.c (ptid_lwp_p): Remove.
5844         * common/ptid.h (ptid_lwp_p): Don't declare.
5845         * fbsd-nat.c: Update.
5846         * linux-nat.c: Update.
5847         * nat/linux-procfs.c: Update.
5848         * nat/x86-linux-dregs.c: Update.
5849         * sol-thread.c: Update.
5850
5851 2018-07-03  Tom Tromey  <tom@tromey.com>
5852
5853         * common/ptid.c (ptid_is_pid): Remove.
5854         * common/ptid.h (ptid_is_pid): Don't declare.
5855         * infrun.c: Update.
5856         * linux-nat.c: Update.
5857         * mi/mi-interp.c: Update.
5858         * remote.c: Update.
5859         * thread.c: Update.
5860
5861 2018-07-03  Tom Tromey  <tom@tromey.com>
5862
5863         * common/ptid.c (ptid_get_tid): Remove.
5864         * common/ptid.h (ptid_get_tid): Don't declare.
5865         * ada-tasks.c: Update.
5866         * aix-thread.c: Update.
5867         * bsd-uthread.c: Update.
5868         * darwin-nat.c: Update.
5869         * fbsd-nat.c: Update.
5870         * i386-darwin-nat.c: Update.
5871         * infrun.c: Update.
5872         * linux-tdep.c: Update.
5873         * nto-procfs.c: Update.
5874         * ppc-ravenscar-thread.c: Update.
5875         * python/py-infthread.c: Update.
5876         * ravenscar-thread.c: Update.
5877         * sol-thread.c: Update.
5878         * sparc-ravenscar-thread.c: Update.
5879         * windows-nat.c: Update.
5880
5881 2018-07-03  Tom Tromey  <tom@tromey.com>
5882
5883         * common/ptid.c (ptid_get_lwp): Remove.
5884         * common/ptid.h (ptid_get_lwp): Don't declare.
5885         * aarch64-linux-nat.c: Update.
5886         * ada-tasks.c: Update.
5887         * aix-thread.c: Update.
5888         * amd64-linux-nat.c: Update.
5889         * arm-linux-nat.c: Update.
5890         * corelow.c: Update.
5891         * fbsd-nat.c: Update.
5892         * fbsd-tdep.c: Update.
5893         * gnu-nat.c: Update.
5894         * i386-cygwin-tdep.c: Update.
5895         * i386-gnu-nat.c: Update.
5896         * i386-linux-nat.c: Update.
5897         * ia64-linux-nat.c: Update.
5898         * inf-ptrace.c: Update.
5899         * infrun.c: Update.
5900         * linux-fork.c: Update.
5901         * linux-nat.c: Update.
5902         * linux-tdep.c: Update.
5903         * linux-thread-db.c: Update.
5904         * mips-linux-nat.c: Update.
5905         * nat/aarch64-linux-hw-point.c: Update.
5906         * nat/aarch64-linux.c: Update.
5907         * nat/linux-btrace.c: Update.
5908         * nat/linux-osdata.c: Update.
5909         * nat/linux-procfs.c: Update.
5910         * nat/x86-linux-dregs.c: Update.
5911         * obsd-nat.c: Update.
5912         * ppc-fbsd-nat.c: Update.
5913         * ppc-linux-nat.c: Update.
5914         * procfs.c: Update.
5915         * python/py-infthread.c: Update.
5916         * ravenscar-thread.c: Update.
5917         * remote.c: Update.
5918         * s390-linux-nat.c: Update.
5919         * sol-thread.c: Update.
5920         * sol2-tdep.c: Update.
5921         * spu-linux-nat.c: Update.
5922         * x86-linux-nat.c: Update.
5923         * xtensa-linux-nat.c: Update.
5924
5925 2018-07-03  Tom Tromey  <tom@tromey.com>
5926
5927         * common/ptid.c (ptid_get_pid): Remove.
5928         * common/ptid.h (ptid_get_pid): Don't declare.
5929         * aarch64-linux-nat.c: Update.
5930         * ada-lang.c: Update.
5931         * aix-thread.c: Update.
5932         * alpha-bsd-nat.c: Update.
5933         * amd64-fbsd-nat.c: Update.
5934         * amd64-linux-nat.c: Update.
5935         * arm-linux-nat.c: Update.
5936         * arm-nbsd-nat.c: Update.
5937         * auxv.c: Update.
5938         * break-catch-syscall.c: Update.
5939         * breakpoint.c: Update.
5940         * bsd-uthread.c: Update.
5941         * corelow.c: Update.
5942         * ctf.c: Update.
5943         * darwin-nat.c: Update.
5944         * fbsd-nat.c: Update.
5945         * fbsd-tdep.c: Update.
5946         * gcore.c: Update.
5947         * gnu-nat.c: Update.
5948         * hppa-nbsd-nat.c: Update.
5949         * hppa-obsd-nat.c: Update.
5950         * i386-fbsd-nat.c: Update.
5951         * ia64-linux-nat.c: Update.
5952         * inf-ptrace.c: Update.
5953         * infcmd.c: Update.
5954         * inferior.c: Update.
5955         * inferior.h: Update.
5956         * inflow.c: Update.
5957         * infrun.c: Update.
5958         * linux-fork.c: Update.
5959         * linux-nat.c: Update.
5960         * linux-tdep.c: Update.
5961         * linux-thread-db.c: Update.
5962         * m68k-bsd-nat.c: Update.
5963         * mi/mi-interp.c: Update.
5964         * mi/mi-main.c: Update.
5965         * mips-linux-nat.c: Update.
5966         * mips-nbsd-nat.c: Update.
5967         * mips64-obsd-nat.c: Update.
5968         * nat/aarch64-linux-hw-point.c: Update.
5969         * nat/aarch64-linux.c: Update.
5970         * nat/linux-btrace.c: Update.
5971         * nat/linux-osdata.c: Update.
5972         * nat/linux-procfs.c: Update.
5973         * nat/x86-linux-dregs.c: Update.
5974         * nto-procfs.c: Update.
5975         * obsd-nat.c: Update.
5976         * ppc-linux-nat.c: Update.
5977         * ppc-nbsd-nat.c: Update.
5978         * ppc-obsd-nat.c: Update.
5979         * proc-service.c: Update.
5980         * procfs.c: Update.
5981         * python/py-inferior.c: Update.
5982         * python/py-infthread.c: Update.
5983         * ravenscar-thread.c: Update.
5984         * record.c: Update.
5985         * remote-sim.c: Update.
5986         * remote.c: Update.
5987         * rs6000-nat.c: Update.
5988         * s390-linux-nat.c: Update.
5989         * sh-nbsd-nat.c: Update.
5990         * sol-thread.c: Update.
5991         * sparc-nat.c: Update.
5992         * sparc64-tdep.c: Update.
5993         * spu-linux-nat.c: Update.
5994         * spu-tdep.c: Update.
5995         * target-debug.h: Update.
5996         * target.c: Update.
5997         * thread.c: Update.
5998         * tid-parse.c: Update.
5999         * tracefile-tfile.c: Update.
6000         * vax-bsd-nat.c: Update.
6001         * windows-nat.c: Update.
6002         * x86-linux-nat.c: Update.
6003         * x86-nat.c: Update.
6004
6005 2018-07-03  Tom Tromey  <tom@tromey.com>
6006
6007         * common/ptid.c (pid_to_ptid): Remove.
6008         * common/ptid.h (pid_to_ptid): Don't declare.
6009         * aix-thread.c: Update.
6010         * arm-linux-nat.c: Update.
6011         * common/ptid.c: Update.
6012         * common/ptid.h: Update.
6013         * corelow.c: Update.
6014         * ctf.c: Update.
6015         * darwin-nat.c: Update.
6016         * fbsd-nat.c: Update.
6017         * fork-child.c: Update.
6018         * gnu-nat.c: Update.
6019         * go32-nat.c: Update.
6020         * inf-ptrace.c: Update.
6021         * infcmd.c: Update.
6022         * inferior.c: Update.
6023         * infrun.c: Update.
6024         * linux-fork.c: Update.
6025         * linux-nat.c: Update.
6026         * nat/aarch64-linux-hw-point.c: Update.
6027         * nat/fork-inferior.c: Update.
6028         * nat/x86-linux-dregs.c: Update.
6029         * nto-procfs.c: Update.
6030         * obsd-nat.c: Update.
6031         * procfs.c: Update.
6032         * progspace.c: Update.
6033         * remote.c: Update.
6034         * rs6000-nat.c: Update.
6035         * s390-linux-nat.c: Update.
6036         * sol-thread.c: Update.
6037         * spu-linux-nat.c: Update.
6038         * target.c: Update.
6039         * top.c: Update.
6040         * tracefile-tfile.c: Update.
6041         * windows-nat.c: Update.
6042
6043 2018-07-03  Tom Tromey  <tom@tromey.com>
6044
6045         * common/ptid.h (ptid_build): Don't declare.
6046         * common/ptid.c (ptid_build): Remove.
6047         * aix-thread.c: Update.
6048         * bsd-kvm.c: Update.
6049         * bsd-uthread.c: Update.
6050         * common/agent.c: Update.
6051         * common/ptid.c: Update.
6052         * common/ptid.h: Update.
6053         * corelow.c: Update.
6054         * darwin-nat.c: Update.
6055         * fbsd-nat.c: Update.
6056         * gnu-nat.c: Update.
6057         * linux-fork.c: Update.
6058         * linux-nat.c: Update.
6059         * linux-thread-db.c: Update.
6060         * nat/linux-osdata.c: Update.
6061         * nat/linux-procfs.c: Update.
6062         * nto-procfs.c: Update.
6063         * obsd-nat.c: Update.
6064         * proc-service.c: Update.
6065         * procfs.c: Update.
6066         * ravenscar-thread.c: Update.
6067         * remote-sim.c: Update.
6068         * remote.c: Update.
6069         * sol-thread.c: Update.
6070         * target.c: Update.
6071         * windows-nat.c: Update.
6072
6073 2018-07-03  Tom Tromey  <tom@tromey.com>
6074
6075         * infrun.c (follow_exec): Use exit_inferior_silent.
6076         * inferior.c (exit_inferior_num_silent): Remove.
6077         * inferior.h (exit_inferior_num_silent): Don't declare.
6078
6079 2018-07-03  Tom Tromey  <tom@tromey.com>
6080
6081         PR cli/23340:
6082         * darwin-nat.c (darwin_attach_pid): Reset inferior and
6083         inferior_ptid on error.
6084
6085 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
6086             Simon Marchi  <simon.marchi@polymtl.ca>
6087
6088         PR tdep/8282
6089         * disasm.h (gdb_disassembler): Add
6090         `m_disassembler_options_holder'. member
6091         * disasm.c (get_all_disassembler_options): New function.
6092         (gdb_disassembler::gdb_disassembler): Use it.
6093         (gdb_buffered_insn_length_init_dis): Likewise.
6094         (gdb_buffered_insn_length): Adjust accordingly.
6095         (set_disassembler_options): Handle options with arguments.
6096         (show_disassembler_options_sfunc): Likewise.  Add a leading new
6097         line if showing options with descriptions.
6098         (disassembler_options_completer): Adapt to using the
6099         `disasm_options_and_args_t' structure.
6100         * mips-tdep.c (mips_disassembler_options): New variable.
6101         (mips_disassembler_options_o32): Likewise.
6102         (mips_disassembler_options_n32): Likewise.
6103         (mips_disassembler_options_n64): Likewise.
6104         (gdb_print_insn_mips): Don't set `disassembler_options'.
6105         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
6106         functions.
6107         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
6108         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
6109         `gdbarch_disassembler_options_implicit' and
6110         `gdbarch_valid_disassembler_options'.
6111         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
6112         `disasm_options_and_args_t' structure.
6113         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
6114         method.
6115         (valid_disassembler_options): Switch from `disasm_options_t' to
6116         the `disasm_options_and_args_t' structure.
6117         * NEWS: Document `set disassembler-options' support for the MIPS
6118         target.
6119         * gdbarch.h: Regenerate.
6120         * gdbarch.c: Regenerate.
6121
6122 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
6123
6124         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
6125
6126 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
6127
6128         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
6129         parameter in call to amd64_target_description.
6130         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
6131         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
6132         (amd64fbsd_init_abi): Likewise.
6133         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
6134         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
6135         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
6136         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
6137
6138 2018-06-29  Pedro Alves  <palves@redhat.com>
6139
6140         * gdb/amd64-tdep.h (amd64_create_target_description): Add
6141         "segments" parameter.
6142         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
6143         (_initialize_amd64_tdep): Update call to
6144         amd64_create_target_description.
6145         (amd64_target_description): Add "segments" parameter.  Adjust
6146         the implementation to use it.
6147         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
6148         call to amd64_create_target_description.
6149         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
6150         * gdb/arch/amd64.h (amd64_create_target_description): Add
6151         "segments" register.
6152         * gdb/arch/amd64.c (amd64_create_target_description): Add
6153         "segments" parameter.  Call create_feature_i386_64bit_segments
6154         only if SEGMENTS is true.
6155         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
6156         call to amd64_create_target_description.
6157
6158 2018-06-29  Pedro Alves  <palves@redhat.com>
6159
6160         * thread.c (thread_target_id_str): New, factored out from ...
6161         (print_thread_info_1): ... here.  Use it to compute the max
6162         "Target Id" column width.
6163
6164 2018-06-29  Pedro Alves  <palves@redhat.com>
6165
6166         * remote.c (remote_target::extra_thread_info): Delete
6167         'display_buf' and 'n' locals.  from the cache, regardless of
6168         packet mechanims is in use.  Use cache for qThreadExtra and qP
6169         methods too.
6170
6171 2018-06-29  Pedro Alves  <palves@redhat.com>
6172
6173         * blockframe.c (find_pc_sect_containing_function): New function.
6174         * breakpoint.c (print_breakpoint_location): Don't call
6175         find_pc_sect_function.
6176         * linespec.c (create_sals_line_offset): Record the location's
6177         symbol in the sal.
6178         * linespec.c (convert_address_location_to_sals): Fill in sal's
6179         symbol with find_pc_sect_containing_function.
6180         * symtab.c (find_function_start_sal): Rename to ...
6181         (find_function_start_sal_1): ... this.
6182         (find_function_start_sal): Reimplement as wrapper around
6183         find_function_start_sal_1, and use
6184         find_pc_sect_containing_function to fill in the sal's symbol.
6185         (find_function_start_sal(symbol*, bool)): Adjust.
6186         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
6187         comments.
6188         (find_pc_sect_containing_function): Declare.
6189
6190 2018-06-29  Pedro Alves  <palves@redhat.com>
6191
6192         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
6193         true if the the location has no symbol.
6194
6195 2018-06-28  Tom Tromey  <tom@tromey.com>
6196
6197         * NEWS: Mention --enable-codesign.
6198         * silent-rules.mk (ECHO_SIGN): New variable.
6199         * configure.ac: Add --enable-codesign.
6200         * configure: Rebuild.
6201         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6202         (gdb$(EXEEXT)): Optionally invoke codesign.
6203
6204 2018-06-28  Pedro Alves  <palves@redhat.com>
6205
6206         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6207         comments.
6208         (switch_to_thread_no_regs): Adjust comment.
6209         * infcmd.c (stop_pc): Delete.
6210         (post_create_inferior, info_program_command): Replace references
6211         to stop_pc with references to thread_info->suspend.stop_pc.
6212         * inferior.h (stop_pc): Delete declaration.
6213         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6214         (handle_inferior_event_1, handle_signal_stop)
6215         (process_event_stop_test, keep_going_stepped_thread)
6216         (handle_step_into_function, handle_step_into_function_backward)
6217         (print_stop_location): Replace references to stop_pc with
6218         references to thread_info->suspend.stop_pc.
6219         (struct infcall_suspend_state) <stop_pc>: Delete field.
6220         (save_infcall_suspend_state, restore_infcall_suspend_state):
6221         Remove references to inf_stat->stop_pc.
6222         * linux-fork.c (fork_load_infrun_state): Likewise.
6223         * record-btrace.c (record_btrace_set_replay): Likewise.
6224         * record-full.c (record_full_goto_entry): Likewise.
6225         * remote.c (print_one_stopped_thread): Likewise.
6226         * target.c (target_resume): Extend comment.
6227         * thread.c (set_executing_thread): New.
6228         (set_executing): Use it.
6229         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6230         Remove references to stop_pc.
6231
6232 2018-06-28  Pedro Alves  <palves@redhat.com>
6233
6234         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6235         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6236
6237 2018-06-28  Tom Tromey  <tom@tromey.com>
6238
6239         * coffread.c (coff_symfile_finish): Update.
6240         * xcoffread.c (xcoff_symfile_finish): Update.
6241         * elfread.c (elf_symfile_finish): Update.
6242         * symfile.h (dwarf2_free_objfile): Don't declare.
6243         * dwarf2read.c (_initialize_dwarf2_read): Use
6244         register_objfile_data_with_cleanup.
6245         (dwarf2_free_objfile): Now static.  Change signature.
6246
6247 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6248
6249         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6250         option "-o" to add-symbol-file-load to add an offset to each
6251         section's load address.
6252         * symfile.c (set_objfile_default_section_offset): New function.
6253
6254 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6255
6256         * symfile.c (add_symbol_file_command): Make sure that sections
6257         with the same name are sorted in the same order.
6258
6259 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6260
6261         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6262         require the second argument.  If omitted, load sections at the
6263         addresses specified in the file.
6264
6265 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6266
6267         * symfile.c (symbol_file_command, symbol_file_add_main_1)
6268         (_initialize_symfile): Add option "-o" to symbol-file to add an
6269         offset to each section of the symbol file.
6270
6271 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6272
6273         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6274
6275 2018-06-27  Tom Tromey  <tom@tromey.com>
6276
6277         * stack.c (_initialize_stack): Update "func" help text.
6278
6279 2018-06-27  Tom Tromey  <tom@tromey.com>
6280
6281         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6282         std::vector.
6283         (unwind_infopy_str, pyuw_create_unwind_info)
6284         (unwind_infopy_add_saved_register, pyuw_sniffer)
6285         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6286         Update.
6287         (struct saved_reg): Add constructor.
6288         <value>: Now a gdbpy_ref<>.
6289
6290 2018-06-27  Tom Tromey  <tom@tromey.com>
6291
6292         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6293
6294 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6295
6296         * gdb-gdb.py.in: Format using autopep8.
6297
6298 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6299
6300         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6301         (type_lookup_function): Recognize CORE_ADDR values.
6302
6303 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6304
6305         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6306         print tag_name.
6307
6308 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6309
6310         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6311         <__lt__>: Add.
6312
6313 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6314
6315         * gdb-gdb.py: Move to...
6316         * gdb-gdb.py.in: ... here.
6317         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6318         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6319         dependencies.
6320         (distclean): Remove gdb-gdb.py when cleaning.
6321         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6322         * configure: Re-generate.
6323
6324 2018-06-27  Pedro Alves  <palves@redhat.com>
6325
6326         * proc-service.c (get_ps_regcache): New.
6327         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6328         (ps_lsetfpregs): Use it.
6329
6330 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6331
6332         PR gdb/21695
6333         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6334         (dwarf_decode_lines_1): Adjust.
6335
6336 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6337
6338         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6339         override.
6340         <info_proc>: Likewise.
6341
6342 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6343
6344         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6345         to windows_fetch_one_register, and only handle the case of
6346         fetching one register.  Move the code that reloads the context
6347         and iterates over all registers if R is negative to...
6348         (windows_nat_target::fetch_registers): ... here.
6349         (do_windows_store_inferior_registers): Rename to
6350         windows_store_one_register, and only handle the case of storing
6351         one register.  Move the code that handles the case where r is
6352         negative to...
6353         (windows_nat_target::store_registers) ... here.
6354
6355 2018-06-26  Tom Tromey  <tom@tromey.com>
6356
6357         PR rust/22574:
6358         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6359         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6360         Update.
6361         (rust_internal_print_type): Add podata parameter.
6362         (rust_print_type): Update.
6363
6364 2018-06-26  Tom Tromey  <tom@tromey.com>
6365
6366         * typeprint.h (struct print_offset_data) <update, finish,
6367         maybe_print_hole>: New methods.
6368         <indentation>: New constant.
6369         * typeprint.c (print_offset_data::indentation): Define.
6370         (print_offset_data::maybe_print_hole, print_offset_data::update)
6371         (print_offset_data::finish): Move from c-typeprint.c and rename.
6372         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6373         (print_spaces_filtered_with_print_options): Update.
6374         (c_print_type_union_field_offset, maybe_print_hole)
6375         (c_print_type_struct_field_offset): Move to typeprint.c and
6376         rename.
6377         (c_type_print_base_struct_union): Update.
6378
6379 2018-06-25  Pedro Alves  <palves@redhat.com>
6380
6381         * gdbthread.h (thread_info_ref, delete_thread)
6382         (delete_thread_silent, first_thread_of_inferior)
6383         (any_thread_of_inferior, switch_to_thread)
6384         (enable_thread_stack_temporaries)
6385         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6386         (get_last_thread_stack_temporary)
6387         (value_in_thread_stack_temporaries, can_access_registers_thread):
6388         Spell out "struct thread_info" instead of just "thread_info".
6389         * inferior.h (notice_new_inferior): Likewise.
6390
6391 2018-06-25  Pedro Alves  <palves@redhat.com>
6392
6393         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6394         pass thread_info pointer to delete_thread.
6395         (windows_nat_target::detach): Pass inferior pointer to
6396         detach_inferior.
6397         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6398         delete_thread.
6399         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6400         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6401         and pass a thread_info pointer to delete_thread.
6402         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6403         pass thread_info pointer to delete_thread.
6404         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6405         delete_thread_silent call.
6406         * procfs.c (procfs_target::detach): Pass inferior pointer to
6407         detach_inferior.
6408         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6409         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6410         delete_thread_silent call.
6411         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6412         pass thread_info pointer to delete_thread.
6413         (windows_nat_target::detach): Pass inferior pointer to
6414         delete_inferior.
6415
6416 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6417
6418         * regcache.c (readable_regcache::read_part): Fix asserts.
6419         (reg_buffer::raw_collect_part): New function.
6420         (regcache::write_part): Fix asserts.
6421         (reg_buffer::raw_supply_part): New function.
6422         (regcache::transfer_regset_register): New helper function.
6423         (regcache::transfer_regset): Call new functions.
6424         (regcache_supply_regset): Use gdb_byte*.
6425         (regcache::supply_regset): Likewise.
6426         (regcache_collect_regset): Likewise.
6427         (regcache::collect_regset): Likewise.
6428         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6429         (reg_buffer::raw_supply_part): Likewise.
6430         (regcache::transfer_regset_register): Likewise.
6431         (regcache::transfer_regset): Use gdb_byte*.
6432
6433 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6434
6435         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6436
6437 2018-06-21  Pedro Alves  <palves@redhat.com>
6438
6439         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6440         instead of a ptid_t.  All callers adjusted.
6441         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6442         adjusted.
6443         (print_ada_task_info, display_current_task_id, task_command_1):
6444         Adjust.
6445         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6446         inferior_thread.
6447         (breakpoint_kind): Adjust.
6448         (remove_breakpoints_pid): Rename to ...
6449         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6450         pointer.  All callers adjusted.
6451         (bpstat_clear_actions): Use inferior_thread.
6452         (get_bpstat_thread): New.
6453         (bpstat_do_actions): Use it.
6454         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6455         to take a thread_info pointer.  All callers adjusted.
6456         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6457         (breakpoint_re_set_thread): Use inferior_thread.
6458         * breakpoint.h (struct inferior): Forward declare.
6459         (bpstat_stop_status): Update.
6460         (remove_breakpoints_pid): Delete.
6461         (remove_breakpoints_inf): New.
6462         * bsd-uthread.c (bsd_uthread_target::wait)
6463         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6464         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6465         (maint_btrace_packet_history_cmd)
6466         (maint_btrace_clear_packet_history_cmd): Adjust.
6467         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6468         inferior_thread.
6469         * cli/cli-interp.c: Include "inferior.h".
6470         * common/refcounted-object.h (struct
6471         refcounted_object_ref_policy): New.
6472         * compile/compile-object-load.c: Include gdbthread.h.
6473         (store_regs): Use inferior_thread.
6474         * corelow.c (core_target::close): Use current_inferior.
6475         (core_target_open): Adjust to use first_thread_of_inferior and use
6476         the current inferior.
6477         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6478         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6479         <thread>: ... this new field.  All references adjusted.
6480         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6481         Take a thread_info pointer instead of a ptid_t.
6482         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6483         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6484         thread_info pointer instead of a ptid_t.
6485         * elfread.c: Include "inferior.h".
6486         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6487         Use inferior_thread.
6488         * eval.c (evaluate_subexp): Likewise.
6489         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6490         inferior_thread.
6491         * gdb_proc_service.h (struct thread_info): Forward declare.
6492         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6493         <thread>: ... this new field.  All references adjusted.
6494         * gdbarch.h, gdbarch.c: Regenerate.
6495         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6496         'thread' parameter.  All implementations and callers adjusted.
6497         * gdbthread.h (thread_info) <set_running>: New method.
6498         (delete_thread, delete_thread_silent): Take a thread_info pointer
6499         instead of a ptid.
6500         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6501         (first_thread_of_process): Delete, replaced by ...
6502         (first_thread_of_inferior): ... this new function.  All callers
6503         adjusted.
6504         (any_live_thread_of_process): Delete, replaced by ...
6505         (any_live_thread_of_inferior): ... this new function.  All callers
6506         adjusted.
6507         (switch_to_thread, switch_to_no_thread): Declare.
6508         (is_executing): Delete.
6509         (enable_thread_stack_temporaries): Update comment.
6510         <enable_thread_stack_temporaries>: Take a thread_info pointer
6511         instead of a ptid_t.  Incref the thread.
6512         <~enable_thread_stack_temporaries>: Decref the thread.
6513         <m_ptid>: Delete
6514         <m_thr>: New.
6515         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6516         (get_last_thread_stack_temporary)
6517         (value_in_thread_stack_temporaries, can_access_registers_thread):
6518         Take a thread_info pointer instead of a ptid_t.  All callers
6519         adjusted.
6520         * infcall.c (get_call_return_value): Use inferior_thread.
6521         (run_inferior_call): Work with thread pointers instead of ptid_t.
6522         (call_function_by_hand_dummy): Work with thread pointers instead
6523         of ptid_t.  Use thread_info_ref.
6524         * infcmd.c (proceed_thread_callback): Access thread's state
6525         directly.
6526         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6527         access thread's state directly.
6528         (continue_command): Use inferior_thread.
6529         (info_program_command): Use find_thread_ptid and access thread
6530         state directly.
6531         (proceed_after_attach_callback): Use thread state directly.
6532         (notice_new_inferior): Take a thread_info pointer instead of a
6533         ptid_t.  All callers adjusted.
6534         (exit_inferior): Take an inferior pointer instead of a pid.  All
6535         callers adjusted.
6536         (exit_inferior_silent): New.
6537         (detach_inferior): Delete.
6538         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6539         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6540         (detach_inferior_command, kill_inferior_command): Use
6541         find_inferior_id instead of valid_gdb_inferior_id and
6542         gdb_inferior_id_to_pid.
6543         (inferior_command): Use inferior and thread pointers.
6544         * inferior.h (struct thread_info): Forward declare.
6545         (notice_new_inferior): Take a thread_info pointer instead of a
6546         ptid_t.  All callers adjusted.
6547         (detach_inferior): Delete declaration.
6548         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6549         instead of a pid.  All callers adjusted.
6550         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6551         (valid_gdb_inferior_id): Delete.
6552         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6553         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6554         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6555         ...
6556         <inf>: ... this new field.
6557         <step_ptid>: Delete, replaced by ...
6558         <step_thread>: ... this new field.
6559         (get_displaced_stepping_state): Take an inferior pointer instead
6560         of a pid.  All callers adjusted.
6561         (displaced_step_in_progress_any_inferior): Adjust.
6562         (displaced_step_in_progress_thread): Take a thread pointer instead
6563         of a ptid_t.  All callers adjusted.
6564         (displaced_step_in_progress, add_displaced_stepping_state): Take
6565         an inferior pointer instead of a pid.  All callers adjusted.
6566         (get_displaced_step_closure_by_addr): Adjust.
6567         (remove_displaced_stepping_state): Take an inferior pointer
6568         instead of a pid.  All callers adjusted.
6569         (displaced_step_prepare_throw, displaced_step_prepare)
6570         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6571         All callers adjusted.
6572         (start_step_over): Adjust.
6573         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6574         displaced step queue.
6575         (do_target_resume): Adjust.
6576         (fetch_inferior_event): Use inferior_thread.
6577         (context_switch, get_inferior_stop_soon): Take an
6578         execution_control_state pointer instead of a ptid_t.  All callers
6579         adjusted.
6580         (switch_to_thread_cleanup): Delete.
6581         (stop_all_threads): Use scoped_restore_current_thread.
6582         * inline-frame.c: Include "gdbthread.h".
6583         (inline_state) <inline_state>: Take a thread pointer instead of a
6584         ptid_t.  All callers adjusted.
6585         <ptid>: Delete, replaced by ...
6586         <thread>: ... this new field.
6587         (find_inline_frame_state): Take a thread pointer instead of a
6588         ptid_t.  All callers adjusted.
6589         (skip_inline_frames, step_into_inline_frame)
6590         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6591         pointer instead of a ptid_t.  All callers adjusted.
6592         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6593         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6594         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6595         pointers directly.
6596         * linux-nat.c (get_detach_signal): Likewise.
6597         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6598         (thread_db_notice_clone): Adjust.
6599         (thread_db_find_new_threads_silently)
6600         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6601         a thread pointer instead of a ptid_t.  All callers adjusted.
6602         * mi/mi-cmd-var.c: Include "inferior.h".
6603         (mi_cmd_var_update_iter): Update to use thread pointers.
6604         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6605         inferior directly.
6606         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6607         out to ...
6608         (mi_output_running): ... this new function.
6609         (mi_on_resume_1): Adjust to use it.
6610         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6611         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6612         directly.
6613         (interrupt_thread_callback): : Adjust to use thread and inferior
6614         pointers.
6615         * proc-service.c: Include "gdbthread.h".
6616         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6617         * progspace-and-thread.c: Include "inferior.h".
6618         * progspace.c: Include "inferior.h".
6619         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6620         hold a reference to an inferior_object.
6621         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6622         inferior_thread.
6623         * python/py-inferior.c (struct inferior_object): Give the type a
6624         tag name instead of a typedef.
6625         (python_on_normal_stop): No need to check if the current thread is
6626         listed.
6627         (inferior_to_inferior_object): Change return type to
6628         inferior_object.  All callers adjusted.
6629         (find_thread_object): Delete, bits factored out to ...
6630         (thread_to_thread_object): ... this new function.
6631         * python/py-infthread.c (create_thread_object): Use
6632         inferior_to_inferior_object.
6633         (thpy_is_stopped): Use thread pointer directly.
6634         (gdbpy_selected_thread): Use inferior_thread.
6635         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6636         field, replaced with ...
6637         <thread>: ... this new field.  All users adjusted.
6638         (btpy_insn_or_gap_new): Drop const.
6639         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6640         callers adjusted.
6641         * python/py-record.c: Include "gdbthread.h".
6642         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6643         a ptid_t.  All callers adjusted.
6644         (gdbpy_current_recording): Use inferior_thread.
6645         * python/py-record.h (recpy_record_object) <ptid>: Delete
6646         field, replaced with ...
6647         <thread>: ... this new field.  All users adjusted.
6648         (recpy_element_object) <ptid>: Delete
6649         field, replaced with ...
6650         <thread>: ... this new field.  All users adjusted.
6651         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6652         a ptid_t.  All callers adjusted.
6653         * python/py-threadevent.c: Include "gdbthread.h".
6654         (get_event_thread): Use thread_to_thread_object.
6655         * python/python-internal.h (struct inferior_object): Forward
6656         declare.
6657         (find_thread_object, find_inferior_object): Delete declarations.
6658         (thread_to_thread_object, inferior_to_inferior_object): New
6659         declarations.
6660         * record-btrace.c: Include "inferior.h".
6661         (require_btrace_thread): Use inferior_thread.
6662         (record_btrace_frame_sniffer)
6663         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6664         (get_thread_current_frame): Use scoped_restore_current_thread and
6665         switch_to_thread.
6666         (get_thread_current_frame): Use thread pointer directly.
6667         (record_btrace_replay_at_breakpoint): Use thread's inferior
6668         pointer directly.
6669         * record-full.c: Include "inferior.h".
6670         * regcache.c: Include "gdbthread.h".
6671         (get_thread_arch_regcache): Use the inferior's address space
6672         directly.
6673         (get_thread_regcache, registers_changed_thread): New.
6674         * regcache.h (get_thread_regcache(thread_info *thread)): New
6675         overload.
6676         (registers_changed_thread): New.
6677         (remote_target) <remote_detach_1>: Swap order of parameters.
6678         (remote_add_thread): <remote_add_thread>: Return the new thread.
6679         (get_remote_thread_info(ptid_t)): New overload.
6680         (remote_target::remote_notice_new_inferior): Use thread pointers
6681         directly.
6682         (remote_target::process_initial_stop_replies): Use
6683         thread_info::set_running.
6684         (remote_target::remote_detach_1, remote_target::detach)
6685         (extended_remote_target::detach): Adjust.
6686         * stack.c (frame_show_address): Use inferior_thread.
6687         * target-debug.h (target_debug_print_thread_info_pp): New.
6688         * target-delegates.c: Regenerate.
6689         * target.c (default_thread_address_space): Delete.
6690         (memory_xfer_partial_1): Use current_inferior.
6691         (target_detach): Use current_inferior.
6692         (target_thread_address_space): Delete.
6693         (generic_mourn_inferior): Use current_inferior.
6694         * target.h (struct target_ops) <thread_address_space>: Delete.
6695         (target_thread_address_space): Delete.
6696         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6697         pointers directly.
6698         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6699         thread pointer instead of a ptid_t.  Adjust all callers.
6700         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6701         (first_thread_of_process): Delete, replaced by ...
6702         (first_thread_of_inferior): ... this new function.  All callers
6703         adjusted.
6704         (any_thread_of_process): Rename to ...
6705         (any_thread_of_inferior): ... this, and take an inferior pointer.
6706         (any_live_thread_of_process): Rename to ...
6707         (any_live_thread_of_inferior): ... this, and take an inferior
6708         pointer.
6709         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6710         (value_in_thread_stack_temporaries)
6711         (get_last_thread_stack_temporary): Take a thread pointer instead
6712         of a ptid_t.  Adjust all callers.
6713         (thread_info::set_running): New.
6714         (validate_registers_access): Use inferior_thread.
6715         (can_access_registers_ptid): Rename to ...
6716         (can_access_registers_thread): ... this, and take a thread
6717         pointer.
6718         (print_thread_info_1): Adjust to compare thread pointers instead
6719         of ptids.
6720         (switch_to_no_thread, switch_to_thread): Make extern.
6721         (scoped_restore_current_thread::~scoped_restore_current_thread):
6722         Use m_thread pointer directly.
6723         (scoped_restore_current_thread::scoped_restore_current_thread):
6724         Use inferior_thread.
6725         (thread_command): Use thread pointer directly.
6726         (thread_num_make_value_helper): Use inferior_thread.
6727         * top.c (execute_command): Use inferior_thread.
6728         * tui/tui-interp.c: Include "inferior.h".
6729         * varobj.c (varobj_create): Use inferior_thread.
6730         (value_of_root_1): Use find_thread_global_id instead of
6731         global_thread_id_to_ptid.
6732
6733 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6734
6735         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6736         possible.
6737         (regcache::write_part): Likewise.
6738         (readable_regcache::cooked_read_part): Update comment.
6739         (readable_regcache::cooked_write_part): Likewise.
6740         * regcache.h: (readable_regcache::read_part): Likewise.
6741         (regcache::write_part): Likewise.
6742
6743 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6744             Dirk Schubert  <dirk.schubert@arm.com>
6745
6746         * aarch64-linux-nat.c (post_attach): New.
6747         (aarch64_linux_nat_target::post_attach): Override post_attach to
6748         record the number of hardware debug registers.
6749
6750 2018-06-20  Tom Tromey  <tom@tromey.com>
6751
6752         * python/py-param.c (add_setshow_generic): Make parameters const.
6753         (parmpy_init): Update.
6754
6755 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6756
6757         * regcache.h (regcache_cooked_read_ftype): Rename to...
6758         (register_read_ftype): ...this, change type to function_view.
6759         (class reg_buffer) <save>: Remove src parameter.
6760         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6761         parameter non-const in first overload.  Remove src parameter in
6762         second overload.
6763         * regcache.c (do_cooked_read): Remove.
6764         (readonly_detached_regcache::readonly_detached_regcache): Make
6765         parameter non-const, adjust call to other constructor.
6766         (reg_buffer::save): Remove src parameter.
6767         * frame.c (do_frame_register_read): Remove.
6768         (frame_save_as_regcache): Use lambda function.
6769         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6770         parameter to ppu2spu_data *.
6771         (ppu2spu_sniffer): Use lambda function.
6772
6773 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6774
6775         * record-full.c (record_full_target::insert_breakpoint): Remove
6776         "struct" keyword, add const.
6777
6778 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6779
6780         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6781         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6782         * configure.ac: Remove AC_PREREQ, add missing quoting.
6783         * gnulib/configure.ac: Modernize usage of
6784         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6785         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6786         (AUTOMAKE_VERSION): Bump to 1.15.1.
6787         * configure: Re-generate.
6788         * config.in: Re-generate.
6789         * aclocal.m4: Re-generate.
6790         * gnulib/aclocal.m4: Re-generate.
6791         * gnulib/config.in: Re-generate.
6792         * gnulib/configure: Re-generate.
6793         * gnulib/import/Makefile.in: Re-generate.
6794
6795 2018-06-19  Pedro Alves  <palves@redhat.com>
6796
6797         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6798         (lookup_minimal_symbol_by_pc_section): ... here with
6799         gdb_assert_not_reached added.
6800
6801 2018-06-19  Pedro Alves  <palves@redhat.com>
6802
6803         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6804         parameter with a block parameter.  Compare location's block symbol
6805         with the frame's block instead of addresses.
6806         (skip_inline_frames): Pass the current block instead of the
6807         frame's address.  Break out as soon as we determine the frame
6808         should not be skipped.
6809
6810 2018-06-18  Tom Tromey  <tom@tromey.com>
6811
6812         * solib-aix.c (solib_aix_get_section_offsets): Return
6813         unique_xmalloc_ptr.
6814         (solib_aix_solib_create_inferior_hook): Update.
6815
6816 2018-06-18  Tom Tromey  <tom@tromey.com>
6817
6818         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6819
6820 2018-06-18  Tom Tromey  <tom@tromey.com>
6821
6822         * solib-frv.c (frv_relocate_main_executable): Use
6823         unique_xmalloc_ptr.
6824         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6825         unique_xmalloc_ptr.
6826
6827 2018-06-18  Tom Tromey  <tom@tromey.com>
6828
6829         * objfiles.h (inhibit_section_map_updates): Update.
6830         (resume_section_map_updates, resume_section_map_updates_cleanup):
6831         Remove.
6832         * solib-svr4.c (svr4_handle_solib_event): Update.
6833         * objfiles.c (inhibit_section_map_updates): Return
6834         scoped_restore_tmpl<int>.
6835         (resume_section_map_updates, resume_section_map_updates_cleanup):
6836         Remove.
6837
6838 2018-06-18  Tom Tromey  <tom@tromey.com>
6839
6840         * valprint.h (read_string): Update.
6841         * valprint.c (read_string): Change type of "buffer".
6842         (val_print_string): Update.
6843         * python/py-value.c (valpy_string): Update.
6844         * language.h (struct language_defn) <la_get_string>: Change
6845         type of "buffer".
6846         (default_get_string, c_get_string): Update.
6847         * language.c (default_get_string): Change type of "buffer".
6848         * guile/scm-value.c (gdbscm_value_to_string): Update.
6849         * c-lang.c (c_get_string): Change type of "buffer".
6850
6851 2018-06-18  Tom Tromey  <tom@tromey.com>
6852
6853         * ser-mingw.c (struct pipe_state_destroyer): New.
6854         (pipe_state_up): New typedef.
6855         (cleanup_pipe_state): Remove.
6856         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6857
6858 2018-06-18  Tom Tromey  <tom@tromey.com>
6859
6860         * rust-lang.h (rust_yyerror): Don't declare.
6861         * rust-lang.c (rust_language_defn): Update.
6862         * rust-exp.y (yyerror): Now static.
6863         * parse.c (parse_exp_in_context_1): Update.
6864         * p-lang.h (p_yyerror): Don't declare.
6865         * p-lang.c (p_language_defn): Update.
6866         * p-exp.y (yyerror): Now static.
6867         * opencl-lang.c (opencl_language_defn): Update.
6868         * objc-lang.c (objc_language_defn): Update.
6869         * m2-lang.h (m2_yyerror): Don't declare.
6870         * m2-lang.c (m2_language_defn): Update.
6871         * m2-exp.y (yyerror): Now static.
6872         * language.h (struct language_defn) <la_error>: Remove.
6873         * language.c (unk_lang_error): Remove.
6874         (unknown_language_defn, auto_language_defn): Remove.
6875         * go-lang.h (go_yyerror): Don't declare.
6876         * go-lang.c (go_language_defn): Update.
6877         * go-exp.y (yyerror): Now static.
6878         * f-lang.h (f_yyerror): Don't declare.
6879         * f-lang.c (f_language_defn): Update.
6880         * f-exp.y (yyerror): Now static.
6881         * d-lang.h (d_yyerror): Don't declare.
6882         * d-lang.c (d_language_defn): Update.
6883         * d-exp.y (yyerror): Now static.
6884         * c-lang.h (c_yyerror): Don't declare.
6885         * c-lang.c (c_language_defn, cplus_language_defn)
6886         (asm_language_defn, minimal_language_defn): Update.
6887         * c-exp.y (yyerror): Now static.
6888         * ada-lang.h (ada_yyerror): Don't declare.
6889         * ada-lang.c (ada_language_defn): Update.
6890         * ada-exp.y (yyerror): Now static.
6891
6892 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6893
6894         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6895         (store_sveregs_to_thread): Likewise.
6896         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6897         (aarch64_linux_store_inferior_registers): Likewise.
6898         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6899         function.
6900         (aarch64_sve_regs_copy_to_regcache): Likewise.
6901         (aarch64_sve_regs_copy_from_regcache): Likewise.
6902         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6903         declaration.
6904         (aarch64_sve_regs_copy_to_regcache): Likewise.
6905         (aarch64_sve_regs_copy_from_regcache): Likewise.
6906         (sve_context): Structure from Linux headers.
6907         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6908         (SVE_SIG_ZREG_SIZE): Likewise.
6909         (SVE_SIG_PREG_SIZE): Likewise.
6910         (SVE_SIG_FFR_SIZE): Likewise.
6911         (SVE_SIG_REGS_OFFSET): Likewise.
6912         (SVE_SIG_ZREGS_OFFSET): Likewise.
6913         (SVE_SIG_ZREG_OFFSET): Likewise.
6914         (SVE_SIG_ZREGS_SIZE): Likewise.
6915         (SVE_SIG_PREGS_OFFSET): Likewise.
6916         (SVE_SIG_PREG_OFFSET): Likewise.
6917         (SVE_SIG_PREGS_SIZE): Likewise.
6918         (SVE_SIG_FFR_OFFSET): Likewise.
6919         (SVE_SIG_REGS_SIZE): Likewise.
6920         (SVE_SIG_CONTEXT_SIZE): Likewise.
6921         (SVE_PT_REGS_MASK): Likewise.
6922         (SVE_PT_REGS_FPSIMD): Likewise.
6923         (SVE_PT_REGS_SVE): Likewise.
6924         (SVE_PT_VL_INHERIT): Likewise.
6925         (SVE_PT_VL_ONEXEC): Likewise.
6926         (SVE_PT_REGS_OFFSET): Likewise.
6927         (SVE_PT_FPSIMD_OFFSET): Likewise.
6928         (SVE_PT_FPSIMD_SIZE): Likewise.
6929         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6930         (SVE_PT_SVE_PREG_SIZE): Likewise.
6931         (SVE_PT_SVE_FFR_SIZE): Likewise.
6932         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6933         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6934         (__SVE_SIG_TO_PT): Likewise.
6935         (SVE_PT_SVE_OFFSET): Likewise.
6936         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6937         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6938         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6939         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6940         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6941         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6942         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6943         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6944         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6945         (SVE_PT_SVE_SIZE): Likewise.
6946         (SVE_PT_SIZE): Likewise.
6947         (HAS_SVE_STATE): New define.
6948
6949 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6950
6951         * nat/aarch64-sve-linux-sigcontext.h: New file.
6952         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6953         new files.
6954         (SVE_VQ_MIN): Likewise.
6955         (SVE_VQ_MAX): Likewise.
6956         (SVE_VL_MIN): Likewise.
6957         (SVE_VL_MAX): Likewise.
6958         (SVE_NUM_ZREGS): Likewise.
6959         (SVE_NUM_PREGS): Likewise.
6960         (sve_vl_valid): Likewise.
6961         (struct user_sve_header): Likewise.
6962
6963 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6964             Richard Bunt <Richard.Bunt@arm.com>
6965
6966         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6967         was requested by GDB.
6968
6969 2018-06-15  Tom de Vries  <tdevries@suse.de>
6970
6971         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6972
6973 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6974
6975         * gnulib/update-gnulib.sh: Print expected versions of
6976         autoconf/aclocal.
6977
6978 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6979
6980         * arch-utils.c (default_type_align): Use type_length_units.
6981         * gdbtypes.c (type_align): Use type_length_units.
6982
6983 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6984
6985         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6986         of 'define' command.
6987
6988 2018-06-14  Tom de Vries  <tdevries@suse.de>
6989
6990         PR cli/22573
6991         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6992         get_no_prettyformat_print_options.
6993
6994 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6995
6996         * sparc-nat.h: Include target.h.
6997         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6998         <fetch_registers>: Remove this argument in function call.
6999         <store_registers>: Remove this argument in function call, remove
7000         extra semicolon.
7001         <low_forget_process>: Call sparc64_forget_process instead of
7002         sparc_forget_process.
7003
7004 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7005
7006         * procfs.c (_initialize_procfs): Use add_inf_child_target.
7007         (procfs_target::make_corefile_notes): Adjust to new
7008         target_read_alloc return type.
7009
7010 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7011             Stephen Roberts  <stephen.roberts@arm.com>
7012
7013         PR gdb/22882
7014         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
7015         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
7016         Move should_notify_stop local into more inner scope.
7017
7018 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7019             Stephen Roberts  <stephen.roberts@arm.com>
7020
7021         PR gdb/22882
7022         * infrun.c (resume_1): Add call to mark_async_event_handler.
7023
7024 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
7025
7026         * infrun.c (do_target_wait): Change old version of $pc printed.
7027
7028 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
7029
7030         * dwarf2read.c (read_index_from_section): Rename to...
7031         (read_gdb_index_from_section): ... this, update all callers.
7032         (dwarf2_read_index): Rename to...
7033         (dwarf2_read_gdb_index): ... this, update all callers.
7034
7035 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
7036
7037         * gdb/hppa-linux-nat.c
7038         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
7039         hppa_linux_nat_target::fetch_registers.
7040
7041 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7042
7043         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
7044         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
7045         (AARCH64_DWARF_SVE_FFR): Likewise.
7046         (AARCH64_DWARF_SVE_P0): Likewise.
7047         (AARCH64_DWARF_SVE_Z0): Likewise.
7048
7049 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7050
7051         * common/common-regcache.h (raw_compare): New function.
7052         * regcache.c (regcache::raw_compare): Likewise.
7053         * regcache.h (regcache::raw_compare): New declaration.
7054
7055 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
7056
7057         * common/common-regcache.h (reg_buffer_common): New structure.
7058         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
7059         (reg_buffer::raw_supply): Likewise.
7060         (reg_buffer::raw_supply_integer): Likewise.
7061         (reg_buffer::raw_supply_zeroed): Likewise.
7062         (reg_buffer::raw_collect): Likewise.
7063         (reg_buffer::raw_collect_integer): Likewise.
7064         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
7065         (reg_buffer::raw_supply): Likewise.
7066         (reg_buffer::raw_supply_integer): Likewise.
7067         (reg_buffer::raw_supply_zeroed): Likewise.
7068         (reg_buffer::raw_collect): Likewise.
7069         (reg_buffer::raw_collect_integer): Likewise.
7070
7071 2018-06-10  Tom Tromey  <tom@tromey.com>
7072
7073         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
7074         (class remote_state) <stop_reply_queue>: Now std::vector.
7075         (remote_state::~remote_state)
7076         (remote_target::stop_reply_queue_length): Update.
7077         (struct queue_iter_param, remove_child_of_pending_fork)
7078         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
7079         (check_pending_event_prevents_wildcard_vcont_callback)
7080         (remove_stop_reply_for_inferior)
7081         (remove_stop_reply_of_remote_state)
7082         (remote_notif_remove_once_on_match)
7083         (stop_reply_match_ptid_and_ws)
7084         (remote_kill_child_of_pending_fork): Remove.
7085         (remote_target::remove_new_fork_children)
7086         (remote_target::check_pending_events_prevent_wildcard_vcont)
7087         (remote_target::discard_pending_stop_replies)
7088         (remote_target::discard_pending_stop_replies_in_queue)
7089         (remote_target::remote_notif_remove_queued_reply)
7090         (remote_target::queued_stop_reply)
7091         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
7092         (remote_target::wait, remote_target::kill_new_fork_children)
7093         (remote_target::async): Update.
7094
7095 2018-06-10  Tom Tromey  <tom@tromey.com>
7096
7097         * record-full.c (record_full_arch_list_cleanups): Remove.
7098         (record_full_message): Use try/catch.
7099         (record_full_wait_cleanups): Remove.
7100         (record_full_wait_1): Use try/catch.
7101         (record_full_restore): Likewise.
7102
7103 2018-06-10  Tom Tromey  <tom@tromey.com>
7104
7105         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
7106         declare VEC.  Add constructor.
7107         <in_target_beneath>: Now bool.
7108         (record_full_breakpoints): Now a std::vector, static.
7109         (record_full_sync_record_breakpoints)
7110         (record_full_init_record_breakpoints)
7111         (record_full_target::insert_breakpoint)
7112         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
7113
7114 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
7115
7116         * dwarf2read.c (process_cu_includes): Remove struct keyword.
7117         * serial.c (serial_interface_lookup): Remove struct keyword.
7118
7119 2018-06-10  Tom Tromey  <tom@tromey.com>
7120
7121         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
7122         method.
7123         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
7124         a method.
7125         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
7126         method.
7127         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
7128         "beneath" as a method.
7129         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
7130         Use "beneath" as a method.
7131
7132 2018-06-10  Tom Tromey  <tom@tromey.com>
7133
7134         * tracefile.c (struct trace_file_writer_deleter): New.
7135         <operator()>: Rename from trace_file_writer_xfree.
7136         (trace_file_writer_up): New typedef.
7137         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
7138
7139 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7140
7141         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
7142         <m_registers, m_register_status>: Change type to
7143         std::unique_ptr.
7144         * regcache.c (reg_buffer::reg_buffer): Use new instead of
7145         XCNEWVEC.
7146
7147 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
7148
7149         * common/common-regcache.h (enum register_status): Add
7150         underlying type "signed char".
7151         * regcache.h (reg_buffer) <m_register_status>: Change type to
7152         register_status *.
7153         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
7154         register_status instead of signed char.
7155         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
7156         (reg_buffer::get_register_status): Remove cast.
7157         (readable_regcache::raw_read): Remove cast.
7158         (readable_regcache::cooked_read): Remove cast.
7159
7160 2018-06-09  Tom Tromey  <tom@tromey.com>
7161
7162         * source.c (reverse_search_command, forward_search_command): Use
7163         scoped_fd.
7164
7165 2018-06-09  Tom Tromey  <tom@tromey.com>
7166
7167         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
7168         (serial_ops_list): Now static, std::vector.
7169         (serial_interface_lookup, serial_add_interface): Update.
7170
7171 2018-06-09  Tom Tromey  <tom@tromey.com>
7172
7173         * dwarf2read.c (process_cu_includes): Update.
7174         (process_full_comp_unit): Update.
7175         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
7176         std::vector.
7177
7178 2018-06-08  Paul Koning  <paul_koning@dell.com>
7179
7180         PR gdb/23252
7181
7182         * python/python.c (do_start_initialization):
7183         Avoid call to internal Python API.
7184         (init__gdb_module): New function.
7185
7186 2018-06-08  Gary Benson <gbenson@redhat.com>
7187
7188         * linux-thread-db.c (valprint.h): New include.
7189         (struct check_thread_db_info): New structure.
7190         (check_thread_db_on_load, tdb_testinfo): New static globals.
7191         (check_thread_db, check_thread_db_callback): New functions.
7192         (try_thread_db_load_1): Run integrity checks if requested.
7193         (maintenance_check_libthread_db): New function.
7194         (_initialize_thread_db): Register "maint check libthread-db"
7195         and "maint set/show check-libthread-db".
7196         * NEWS: Mention the above new commands.
7197
7198 2018-06-08  Tom Tromey  <tom@tromey.com>
7199
7200         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7201         now a method.
7202
7203 2018-06-08  Tom Tromey  <tom@tromey.com>
7204
7205         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7206
7207 2018-06-08  Tom Tromey  <tom@tromey.com>
7208
7209         * common/btrace-common.h (struct btrace_data): Add constructor,
7210         destructor, move assignment operator.
7211         <empty, clear, fini>: New methods.
7212         <format>: Initialize.
7213         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7214         (btrace_data_empty): Don't declare.
7215         * common/btrace-common.c (btrace_data_init): Remove.
7216         (btrace_data::fini): Rename from btrace_data_fini.
7217         (btrace_data::empty): Rename from btrace_data_empty.
7218         (btrace_data::clear): Rename from btrace_data_clear.  Return
7219         bool.
7220         * btrace.h (make_cleanup_btrace_data): Don't declare.
7221         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7222         (parse_xml_btrace): Update.
7223         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7224         (maint_btrace_clear_packet_history_cmd): Update.
7225
7226 2018-06-07  Pedro Alves  <palves@redhat.com>
7227
7228         * target.h (target_ops) <beneath>: Now a method.  All references
7229         updated.
7230         (class target_stack): New.
7231         * target.c (g_target_stack): New.
7232         (g_current_top_target): Delete.
7233         (current_top_target): Get the top target out of g_target_stack.
7234         (target_stack::push, target_stack::unpush): New.
7235         (push_target, unpush_target): Reimplement.
7236         (target_is_pushed): Reimplement in terms of g_target_stack.
7237         (target_ops::beneath, target_stack::find_beneath): New.
7238
7239 2018-06-07  Pedro Alves  <palves@redhat.com>
7240
7241         * target.h (find_target_beneath): Delete declaration.
7242         * target.c (find_target_beneath): Delete definition.
7243         * aix-thread.c: All callers of find_target_beneath adjusted to
7244         call target_ops::beneath instead.
7245         * bsd-uthread.c: Likewise.
7246         * linux-thread-db.c: Likewise.
7247         * ravenscar-thread.c: Likewise.
7248         * sol-thread.c: Likewise.
7249         * spu-multiarch.c: Likewise.
7250
7251 2018-06-07  Pedro Alves  <palves@redhat.com>
7252
7253         * target.h (target_ops) <beneath>: Now a method.  All references
7254         updated.
7255         (target_ops) <m_beneath>: New.
7256         * target.c (target_ops::beneath): New.
7257         * corelow.c: Adjust all references to target_ops::beneath.
7258         * linux-thread-db.c: Likewise.
7259         * make-target-delegates: Likewise.
7260         * record-btrace.c: Likewise.
7261         * record-full.c: Likewise.
7262         * remote.c: Likewise.
7263         * target.c: Likewise.
7264         * target-delegates.c: Regenerate.
7265
7266 2018-06-07  Pedro Alves  <palves@redhat.com>
7267
7268         * target.h (target_stack): Delete.
7269         (current_top_target): Declare function.
7270         * target.c (target_stack): Delete.
7271         (g_current_top_target): New.
7272         (current_top_target): New function.
7273         * auxv.c: Use current_top_target instead of target_stack
7274         throughout.
7275         * avr-tdep.c: Likewise.
7276         * breakpoint.c: Likewise.
7277         * corefile.c: Likewise.
7278         * elfread.c: Likewise.
7279         * eval.c: Likewise.
7280         * exceptions.c: Likewise.
7281         * frame.c: Likewise.
7282         * gdbarch-selftests.c: Likewise.
7283         * gnu-v3-abi.c: Likewise.
7284         * ia64-tdep.c: Likewise.
7285         * ia64-vms-tdep.c: Likewise.
7286         * infcall.c: Likewise.
7287         * infcmd.c: Likewise.
7288         * infrun.c: Likewise.
7289         * linespec.c: Likewise.
7290         * linux-tdep.c: Likewise.
7291         * minsyms.c: Likewise.
7292         * ppc-linux-nat.c: Likewise.
7293         * ppc-linux-tdep.c: Likewise.
7294         * procfs.c: Likewise.
7295         * regcache.c: Likewise.
7296         * remote.c: Likewise.
7297         * rs6000-tdep.c: Likewise.
7298         * s390-linux-nat.c: Likewise.
7299         * s390-tdep.c: Likewise.
7300         * solib-aix.c: Likewise.
7301         * solib-darwin.c: Likewise.
7302         * solib-dsbt.c: Likewise.
7303         * solib-spu.c: Likewise.
7304         * solib-svr4.c: Likewise.
7305         * solib-target.c: Likewise.
7306         * sparc-tdep.c: Likewise.
7307         * sparc64-tdep.c: Likewise.
7308         * spu-tdep.c: Likewise.
7309         * symfile.c: Likewise.
7310         * symtab.c: Likewise.
7311         * target-descriptions.c: Likewise.
7312         * target-memory.c: Likewise.
7313         * target.c: Likewise.
7314         * target.h: Likewise.
7315         * tracefile-tfile.c: Likewise.
7316         * tracepoint.c: Likewise.
7317         * valops.c: Likewise.
7318         * valprint.c: Likewise.
7319         * value.c: Likewise.
7320         * windows-tdep.c: Likewise.
7321         * mi/mi-main.c: Likewise.
7322
7323 2018-06-07  Tom Tromey  <tom@tromey.com>
7324
7325         * valprint.h (build_address_symbolic): Declare.
7326         * printcmd.c (print_address_symbolic): Update.
7327         (build_address_symbolic): Change "name" and "filename" to
7328         std::string.
7329         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7330         Update.
7331         * defs.h (build_address_symbolic): Remove declaration.
7332
7333 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7334
7335         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7336         (aarch64_vnv_type): Add function.
7337         (aarch64_pseudo_register_name): Add V regs for SVE.
7338         (aarch64_pseudo_register_type): Likewise.
7339         (aarch64_pseudo_register_reggroup_p): Likewise.
7340         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7341         (aarch64_pseudo_read_value): Add V regs for SVE.
7342         (aarch64_pseudo_write_2): Use V0 offset for SVE
7343         (aarch64_pseudo_write): Add V regs for SVE.
7344         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7345
7346 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7347
7348         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7349         (sve_vl_from_vq): Likewise.
7350
7351 2018-06-05  Tom Tromey  <tom@tromey.com>
7352
7353         * cli/cli-cmds.c (show_version): Update.
7354         * top.c (print_gdb_version): Add "interactive" parameter.
7355         Update.
7356         * main.c (captured_main_1): Update.
7357         * top.h (print_gdb_version): Add "interactive" parameter and a
7358         comment.
7359
7360 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7361
7362         * common/enum-flags.h: Add trailing semicolon to example in
7363         comment.
7364
7365 2018-06-05  Tom Tromey  <tom@tromey.com>
7366
7367         PR cli/12326:
7368         * NEWS: Add entry about pager.
7369         * utils.c (pagination_disabled_for_command): New global.
7370         (prompt_for_continue): Allow "c" response to prompt.
7371         (reinitialize_more_filter): Clear
7372         pagination_disabled_for_command.
7373         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7374
7375 2018-06-04  Tom Tromey  <tom@tromey.com>
7376
7377         * ada-lang.h (ada_lookup_symbol_list): Update.
7378         * ada-lang.c (resolve_subexp): Update.
7379         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7380         parameter.
7381         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7382         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7383         results parameter to std::vector.
7384         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7385         Update.
7386         * ada-exp.y (block_lookup): Update.
7387         (select_possible_type_sym): Change type of syms.  Remove nsyms
7388         parameter.
7389         (write_var_or_type, write_name_assoc): Update.
7390
7391 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7392
7393         * windows-nat.c (windows_nat_target::xfer_partial): Return
7394         TARGET_XFER_E_IO if we need to delegate to the target beneath
7395         but BENEATH is NULL.
7396
7397 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7398
7399         * Makefile.in (config.status): Add configure.nat as a
7400         dependency.
7401
7402 2018-06-04  Tom Tromey  <tom@tromey.com>
7403
7404         * cp-name-parser.y (cpname_state): Add method declarations.
7405         (HANDLE_QUAL): Update.
7406         (cpname_state::d_grab, cpname_state::fill_comp)
7407         (cpname_state::make_operator, cpname_state::make_dtor)
7408         (cpname_state::make_builtin_type, cpname_state::make_name)
7409         (cpname_state::d_qualify, cpname_state::d_int_type)
7410         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7411         (%union): Move earlier.
7412
7413 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7414
7415         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7416
7417 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7418
7419         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7420         (aarch64_pseudo_write_1): Likewise.
7421         (aarch64_pseudo_read_value): Use helper.
7422         (aarch64_pseudo_write): Likewise.
7423
7424 2018-06-04  Pedro Alves  <palves@redhat.com>
7425
7426         * darwin-nat.c (darwin_ops): Delete.
7427         (darwin_attach_pid): Use get_native_target.
7428
7429 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7430
7431         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7432         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7433
7434 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7435
7436         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7437         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7438         (aarch64_gdbarch_init): Check for SVE.
7439         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7440
7441 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7442
7443         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7444         * aarch64-tdep.h (aarch64_read_description): Likewise.
7445         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7446         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7447         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7448         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7449         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7450
7451 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7452
7453         * value.c (value_fetch_lazy_bitfield): New.
7454         (value_fetch_lazy_memory): New.
7455         (value_fetch_lazy_register): New.
7456         (value_fetch_lazy): Factor out to smaller functions.
7457
7458 2018-06-01  Tom Tromey  <tom@tromey.com>
7459
7460         * cp-name-parser.y (backslashable, represented): Now const.
7461
7462 2018-06-01  Tom Tromey  <tom@tromey.com>
7463
7464         * cp-name-parser.y: Include parser-defs.h.
7465         (parser_fprintf): Remove declaration.
7466
7467 2018-06-01  Tom Tromey  <tom@tromey.com>
7468
7469         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7470         %parse-param.
7471         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7472         (global_result): Remove globals.
7473         (struct cpname_state): New.
7474         (yyparse): Don't declare.
7475         (yylex, yyerror): Move declarations after %union.
7476         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7477         (make_name): Add state parameter.
7478         Update all callers.
7479         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7480         parameter.
7481         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7482         Update.
7483         (yylex): Add lvalp, state parameters.
7484         (yyerror): Add state parameter.
7485         (cp_demangled_name_to_comp): Update.
7486
7487 2018-06-01  Tom Tromey  <tom@tromey.com>
7488
7489         * cp-name-parser.y (parser_fprintf): Declare.
7490         (GDB_YY_REMAP_PREFIX): Define.
7491         Include yy-remap.h.  Don't redefine yy* identifiers.
7492
7493 2018-06-01  Tom Tromey  <tom@tromey.com>
7494
7495         * python/py-type.c (typy_legacy_template_argument): Update.
7496         * cp-support.h (cp_demangled_name_to_comp): Update.
7497         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7498         parameter to be a "std::string *".
7499         (main): Update.
7500
7501 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7502
7503         * ada-lex.l: Include "diagnostics.h" instead of
7504         "common/diagnostics.h".
7505         * unittests/environ-selftests.c: Likewise.
7506         * common/diagnostics.h: Moved to ../include.
7507
7508 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7509
7510         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7511         to language_mode_manual while calling breakpoint_re_set_one.
7512
7513 2018-06-01  Tom Tromey  <tom@tromey.com>
7514
7515         * valops.c (value_cast_structs, destructor_name_p): Update.
7516         * symtab.c (gdb_mangle_name): Update.
7517         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7518         Update.
7519         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7520         (pascal_object_print_value_fields, pascal_object_print_value):
7521         Update.
7522         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7523         * linespec.c (find_methods): Update.
7524         * gdbtypes.h (type_name_no_tag): Remove.
7525         (type_name_or_error): Rename from type_name_no_tag_or_error.
7526         * gdbtypes.c (type_name_no_tag): Remove.
7527         (type_name_or_error): Rename from type_name_no_tag_or_error.
7528         (lookup_struct_elt_type, check_typedef): Update.
7529         * expprint.c (print_subexp_standard): Update.
7530         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7531         * d-namespace.c (d_lookup_nested_symbol): Update.
7532         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7533         (cp_print_class_member): Update.
7534         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7535         * completer.c (add_struct_fields): Update.
7536         * c-typeprint.c (cp_type_print_derivation_info)
7537         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7538         Update.
7539         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7540         (ada_prefer_type, ada_is_exception_sym): Update.
7541
7542 2018-06-01  Tom Tromey  <tom@tromey.com>
7543
7544         * valops.c (enum_constant_from_type, value_namespace_elt)
7545         (value_maybe_namespace_elt): Update.
7546         * valarith.c (find_size_for_pointer_math): Update.
7547         * target-descriptions.c (make_gdb_type): Update.
7548         * symmisc.c (print_symbol): Update.
7549         * stabsread.c (define_symbol, read_type)
7550         (complain_about_struct_wipeout, add_undefined_type)
7551         (cleanup_undefined_types_1): Update.
7552         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7553         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7554         (rust_internal_print_type, rust_composite_type)
7555         (rust_evaluate_funcall, rust_evaluate_subexp)
7556         (rust_inclusive_range_type_p): Update.
7557         * python/py-type.c (typy_get_tag): Update.
7558         * p-typeprint.c (pascal_type_print_base): Update.
7559         * mdebugread.c (parse_symbol, parse_type): Update.
7560         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7561         Update.
7562         * guile/scm-type.c (gdbscm_type_tag): Update.
7563         * go-lang.c (sixg_string_p): Update.
7564         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7565         Update.
7566         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7567         (TYPE_TAG_NAME): Remove.
7568         * gdbtypes.c (type_name_no_tag): Simplify.
7569         (check_typedef, check_types_equal, recursive_dump_type)
7570         (copy_type_recursive, arch_composite_type): Update.
7571         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7572         in summary mode when needed.
7573         * eval.c (evaluate_funcall): Update.
7574         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7575         (process_structure_scope, read_enumeration_type)
7576         (read_namespace_type, read_module_type, determine_prefix): Update.
7577         * cp-support.c (inspect_type): Update.
7578         * coffread.c (process_coff_symbol, decode_base_type): Update.
7579         * c-varobj.c (c_is_path_expr_parent): Update.
7580         * c-typeprint.c (c_type_print_base_struct_union): Update.
7581         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7582         summary when using C language.
7583         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7584         (gen_maybe_namespace_elt): Update.
7585         * ada-lang.c (ada_type_name): Simplify.
7586         (empty_record, ada_template_to_fixed_record_type_1)
7587         (template_to_static_fixed_type)
7588         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7589
7590 2018-06-01  Tom Tromey  <tom@tromey.com>
7591
7592         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7593         c_print_type.
7594         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7595         (c_print_type): Update.
7596         (c_print_type): New overload.
7597         (c_type_print_varspec_prefix, c_type_print_args)
7598         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7599         (c_type_print_base_struct_union, c_type_print_base_1)
7600         (cp_type_print_method_args): Add "language" parameter.
7601         (c_type_print_base): Update.
7602         * c-lang.h (c_print_type): Add new overload.
7603
7604 2018-06-01  Tom Tromey  <tom@tromey.com>
7605
7606         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7607         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7608
7609 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7610
7611         * aarch64-tdep.c (aarch64_sve_register_names): New const
7612         var.
7613         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7614         (AARCH64_SVE_Z_REGS_NUM): New define.
7615         (AARCH64_SVE_P_REGS_NUM): Likewise.
7616         (AARCH64_SVE_NUM_REGS): Likewise.
7617
7618 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7619
7620         * nat/linux-ptrace.h [__alpha__]
7621         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7622         definitions.
7623
7624 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7625
7626         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7627         the endianness selected.
7628         * NEWS: Document `set endian auto' mode operation update.
7629
7630 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7631
7632         * Makefile.in: Add new header.
7633         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7634         (sve_vl_from_vg): Likewise.
7635         (sve_vq_from_vl): Likewise.
7636         (sve_vl_from_vq): Likewise.
7637         (sve_vq_from_vg): Likewise.
7638         (sve_vg_from_vq): Likewise.
7639         * configure.nat: Add new c file.
7640         * nat/aarch64-sve-linux-ptrace.c: New file.
7641         * nat/aarch64-sve-linux-ptrace.h: New file.
7642
7643 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7644
7645         * aarch64-linux-nat.c (aarch64_linux_read_description):
7646         Add parmeter zero.
7647         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7648         Likewise.
7649         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7650         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7651         (aarch64_gdbarch_init): Add parmeter zero.
7652         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7653         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7654         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7655         parmeter.
7656         * doc/gdb.texinfo: Describe SVE feature
7657         * features/aarch64-sve.c: New file.
7658
7659 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7660
7661         PR gdb/23210
7662         * gdbarch.sh (significant_addr_bit): Default to zero when
7663         not set by target architecture.
7664         * gdbarch.c: Re-generated.
7665         * utils.c (address_significant): Update.
7666
7667 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7668
7669         * stack.c (func_command): Remove trailing newline in call to error.
7670
7671 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7672
7673         * regcache.h (regcache_raw_collect): Remove, update callers to
7674         use regcache::raw_collect.
7675         * regcache.c (regcache_raw_collect): Remove.
7676
7677 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7678
7679         * regcache.h (regcache_raw_supply): Remove, update callers to
7680         use detached_regcache::raw_supply.
7681         * regcache.c (regcache_raw_supply): Remove.
7682
7683 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7684
7685         * regcache.h (regcache_cooked_write_part): Remove, update
7686         callers to use regcache::cooked_write_part.
7687         * regcache.c (regcache_cooked_write_part): Remove.
7688
7689 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7690
7691         * regcache.h (regcache_cooked_read_part): Remove, update callers
7692         to use readable_regcache::cooked_read_part.
7693         * regcache.c (regcache_cooked_read_part): Remove.
7694
7695 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7696
7697         * regcache.h (regcache_cooked_read_value): Remove, update
7698         callers to use readable_regcache::cooked_read_value.
7699         * regcache.c (regcache_cooked_read_value): Remove.
7700
7701 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7702
7703         * regcache.h (regcache_cooked_write): Remove, update callers to
7704         use regcache::cooked_write.
7705         * regcache.c (regcache_cooked_write): Remove.
7706
7707 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7708
7709         * regcache.h (regcache_invalidate): Remove, update callers to
7710         use detached_regcache::invalidate instead.
7711         * regcache.c (regcache_invalidate): Remove.
7712
7713 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7714
7715         * regcache.h (regcache_raw_write_part): Remove, update callers
7716         to use regcache::raw_write_part instead.
7717         * regcache.c (regcache_raw_write_part): Remove.
7718
7719 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7720
7721         * regcache.h (regcache_raw_read_part): Remove, update callers to
7722         use readable_regcache::raw_read_part instead.
7723         * regcache.c (regcache_raw_read_part): Remove.
7724
7725 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7726
7727         * regcache.h (regcache_cooked_read): Remove, update callers to
7728         use readable_regcache::cooked_read instead.
7729         * regcache.c (regcache_cooked_read): Remove.
7730
7731 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7732
7733         * regcache.h (regcache_raw_write): Remove, update callers to use
7734         regcache::raw_write instead.
7735         * regcache.c (regcache_raw_write): Remove.
7736
7737 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7738
7739         * regcache.h (regcache_raw_read): Remove, update callers to use
7740         readable_regcache::raw_read instead.
7741         * regcache.c (regcache_raw_read): Remove.
7742
7743 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7744
7745         * regcache.h (regcache_raw_update): Remove, update callers to
7746         use readable_regcache::raw_update instead.
7747         * regcache.c (regcache_raw_update): Remove.
7748
7749 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7750
7751         * regcache.h (regcache_register_status): Remove, update callers
7752         to use reg_buffer::get_register_status directly instead.
7753         * regcache.c (regcache_register_status): Remove.
7754
7755 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7756
7757         * regcache.h (regcache_get_ptid): Remove, update all callers to
7758         call regcache::ptid instead.
7759         * regcache.c (regcache_get_ptid): Remove.
7760
7761 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7762
7763         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7764
7765 2018-05-30  Pedro Alves  <palves@redhat.com>
7766
7767         * common/common-exceptions.h (exception_rethrow): Use
7768         ATTRIBUTE_NORETURN.
7769
7770 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7771
7772         * breakpoint.c (print_solib_event, check_status_catch_solib):
7773         Remove struct keyword in range-based for loops.
7774         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7775         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7776         Likewise.
7777         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7778         Likewise.
7779         * symfile.c (addr_info_make_relative): Likewise.
7780         * thread.c (value_in_thread_stack_temporaries): Likewise.
7781
7782 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7783
7784         PR gdb/16841
7785         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7786         aggregate type to get its real type before accessing it.
7787
7788 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7789
7790         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7791         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7792         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7793         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7794         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7795         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7796         * printcmd.c (info_address_command): Likewise.
7797
7798 2018-05-29  Tom Tromey  <tom@tromey.com>
7799
7800         * windows-nat.c (handle_exception): Update fall-through comment.
7801
7802 2018-05-29  Tom Tromey  <tom@tromey.com>
7803
7804         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7805         (struct program_space) <added_solibs>: Now a std::vector.
7806         * breakpoint.c (print_solib_event): Update.
7807         (check_status_catch_solib): Update.
7808         * progspace.c (clear_program_space_solib_cache): Update.
7809         * solib.c (update_solib_list): Update.
7810
7811 2018-05-29  Tom Tromey  <tom@tromey.com>
7812
7813         * python/py-type.c (typy_richcompare): Update.
7814         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7815         * gdbtypes.h (types_deeply_equal): Return bool.
7816         (types_equal): Likewise.
7817         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7818         declare VEC.
7819         (check_types_equal): Change worklist to std::vector.  Return
7820         bool.
7821         (struct type_equality_entry): Add constructor.
7822         (compare_maybe_null_strings): Return bool.
7823         (check_types_worklist): Return bool.  Change worklist to
7824         std::vector.
7825         (types_deeply_equal): Use std::vector.
7826         (types_equal): Return bool.
7827         (compare_maybe_null_strings): Simplify.
7828
7829 2018-05-29  Tom Tromey  <tom@tromey.com>
7830
7831         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7832
7833 2018-05-29  Tom Tromey  <tom@tromey.com>
7834
7835         * objc-lang.h: Don't include cp-support.h.
7836         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7837         declare VEC.
7838
7839 2018-05-27  Tom Tromey  <tom@tromey.com>
7840
7841         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7842
7843 2018-05-25  Tom Tromey  <tom@tromey.com>
7844
7845         * value.c (value::location): Initialize.
7846
7847 2018-05-25  Tom Tromey  <tom@tromey.com>
7848
7849         * dbxread.c (init_bincl_list): Remove.
7850         (bincl_list): Now a std::vector.
7851         (bincls_allocated, next_bincl): Remove.
7852         (free_bincl_list, do_free_bincl_list_cleanup)
7853         (make_cleanup_free_bincl_list): Remove.
7854         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7855         unique_xmalloc_ptr.
7856         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7857         (struct header_file_location): Add constructor.
7858         (add_bincl_to_list): Remove.
7859
7860 2018-05-25  Tom Tromey  <tom@tromey.com>
7861
7862         * tui/tui.c (tui_enable): Update.
7863         * mi/mi-interp.c (mi_interp::init): Update.
7864         * interps.h (class interp) <name>: New method.
7865         <m_name>: Rename from name.
7866         (~scoped_restore_interp): Update.
7867         * interps.c (interp::interp): Update.
7868         (interp_add, interp_set, interp_lookup_existing)
7869         (current_interp_named_p): Update.
7870
7871 2018-05-25  Tom Tromey  <tom@tromey.com>
7872
7873         * interps.c (interp_name): Remove.
7874         * mi/mi-interp.c (mi_interp::init): Update.
7875         * interps.h (interp_name): Remove.
7876         (~scoped_restore_interp): Update.
7877         * tui/tui.c (tui_enable): Update.
7878
7879 2018-05-25  Tom Tromey  <tom@tromey.com>
7880
7881         * utils.c (fputs_maybe_filtered): Update.
7882         * linespec.c (decode_line_full): Update.
7883         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7884         (mi_print_breakpoint_for_event, mi_solib_loaded)
7885         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7886         (mi_user_selected_context_changed): Update.
7887         * mi/mi-main.c (mi_execute_command): Update.
7888         * cli/cli-script.c (execute_control_command): Update.
7889         * python/python.c (execute_gdb_command): Update.
7890         * solib.c (info_sharedlibrary_command): Update.
7891         * interps.c (interp_ui_out): Remove.
7892         * interps.h (interp_ui_out): Remove.
7893
7894 2018-05-25  Tom Tromey  <tom@tromey.com>
7895
7896         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7897         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7898         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7899
7900 2018-05-25  Tom Tromey  <tom@tromey.com>
7901
7902         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7903         * interps.c (interp_exec): Use scoped_restore.
7904
7905 2018-05-25  Tom Tromey  <tom@tromey.com>
7906
7907         * remote.c (remote_target::remote_file_get): Use
7908         gdb::byte_vector.
7909         (remote_target::remote_file_put): Likewise.
7910
7911 2018-05-25  Tom Tromey  <tom@tromey.com>
7912
7913         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7914         a std::string.
7915         (get_pe_section_index, add_pe_exported_sym): Update.
7916         (read_pe_exported_syms): Use gdb::def_vector.
7917
7918 2018-05-25  Tom Tromey  <tom@tromey.com>
7919
7920         * frame.c (remove_prev_frame): Remove.
7921         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7922
7923 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7924
7925         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7926         Remove prototypes.
7927         * mips-linux-nat.c (supply_fpregset): Always call
7928         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7929         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7930         `mips_fill_fpregset'.
7931         * mips-linux-tdep.c (mips_supply_fpregset)
7932         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7933         (mips_fill_fpregset_wrapper): Remove functions.
7934         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7935         (mips_linux_fpregset): Remove variable.
7936         (mips_linux_iterate_over_regset_sections): Use
7937         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7938         (mips_linux_o32_sigframe_init): Remove comment.
7939
7940 2018-05-25  Pedro Alves  <palves@redhat.com>
7941
7942         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7943         (struct readahead_cache, struct packet_reg, struct
7944         remote_arch_state, class remote_state): Move higher up in the
7945         file.
7946         (remote_target::m_remote_state): Now an object instead of a pointer.
7947         (remote_target::get_remote_state): Adjust.
7948
7949 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7950
7951         * stack.c (select_and_print_frame): Delete.
7952         (struct function_bounds): Move struct within function.
7953         (func_command): Most content moved into new function
7954         find_frame_for_function, use new function, print result, add
7955         function comment.
7956         (find_frame_for_function): New function, now returns a result.
7957
7958 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7959
7960         * stack.c (iterate_over_block_arg_vars): Fix comment.
7961         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7962
7963 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7964
7965         PR gdb/23203
7966         * frame.c
7967         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7968         Define.
7969         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7970         Define.
7971         * frame.h (class scoped_restore_selected_frame): New class.
7972         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7973         of any exception, use scoped_restore_selected_frame to restore the
7974         frame instead.
7975
7976 2018-05-24  Pedro Alves  <palves@redhat.com>
7977
7978         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7979         override.
7980
7981 2018-05-23  Tom Tromey  <tom@tromey.com>
7982
7983         * complaints.c (struct complaints): Remove.
7984         (symfile_complaint_book): Remove.
7985         (series): New global.
7986         (complaint_internal): Update.
7987         (clear_complaints): Update.
7988
7989 2018-05-23  Tom Tromey  <tom@tromey.com>
7990
7991         * complaints.c (counters): New global.
7992         (struct complain): Remove.
7993         (struct complaints) <root>: Remove.
7994         (complaint_sentinel): Remove.
7995         (symfile_complaint_book): Update.
7996         (find_complaint) Remove.
7997         (complaint_internal, clear_complaints): Update.
7998
7999 2018-05-23  Tom Tromey  <tom@tromey.com>
8000
8001         * complaints.c (struct complain) <file, line>: Remove.
8002         (find_complaint): Remove file, line parameters.
8003         (complaint_internal): Update.
8004
8005 2018-05-23  Tom Tromey  <tom@tromey.com>
8006
8007         * complaints.c (vcomplaint): Remove.
8008         (complaint_internal) Merge in contents of vcomplaint.
8009
8010 2018-05-23  Tom Tromey  <tom@tromey.com>
8011
8012         * complaints.c (struct complaints) <explanation>: Remove.
8013         (symfile_explanations): Remove.
8014         (symfile_complaint_book): Update.
8015         (vcomplaint): Update.
8016         (struct explanation): Remove.
8017
8018 2018-05-23  Tom Tromey  <tom@tromey.com>
8019
8020         * complaints.c (symfile_complaints): Remove.
8021         (complaint_internal): Remove "complaints" parameter.
8022         (clear_complaints, vcomplaint): Remove "c" parameter.
8023         (get_complaints): Remove.
8024         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
8025         (dwarf2_debug_line_missing_file_complaint)
8026         (dwarf2_debug_line_missing_end_sequence_complaint)
8027         (dwarf2_complex_location_expr_complaint)
8028         (dwarf2_const_value_length_mismatch_complaint)
8029         (dwarf2_section_buffer_overflow_complaint)
8030         (dwarf2_macro_malformed_definition_complaint)
8031         (dwarf2_invalid_attrib_class_complaint)
8032         (create_addrmap_from_index, dw2_symtab_iter_next)
8033         (dw2_expand_marked_cus)
8034         (dw2_debug_names_iterator::find_vec_in_debug_names)
8035         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
8036         (create_debug_type_hash_table, init_cutu_and_read_dies)
8037         (partial_die_parent_scope, add_partial_enumeration)
8038         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
8039         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
8040         (read_import_statement, read_file_scope, create_dwo_cu_reader)
8041         (create_cus_hash_table, create_dwp_hash_table)
8042         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
8043         (dwarf2_rnglists_process, dwarf2_ranges_process)
8044         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
8045         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
8046         (handle_struct_member_die, process_structure_scope)
8047         (read_array_type, read_common_block, read_module_type)
8048         (read_tag_pointer_type, read_typedef, read_base_type)
8049         (read_subrange_type, load_partial_dies, partial_die_info::read)
8050         (partial_die_info::read, partial_die_info::read)
8051         (partial_die_info::read, read_checked_initial_length_and_offset)
8052         (dwarf2_string_attr, read_formatted_entries)
8053         (dwarf_decode_line_header)
8054         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
8055         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
8056         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
8057         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
8058         (get_signatured_type, get_DW_AT_signature_type)
8059         (decode_locdesc, file_file_name, consume_improper_spaces)
8060         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
8061         (dwarf_decode_macro_bytes, dwarf_decode_macros)
8062         (dwarf2_symbol_mark_computed, set_die_type)
8063         (read_attribute_value): Update.
8064         * stap-probe.c (handle_stap_probe, get_stap_base_address):
8065         Update.
8066         * dbxread.c (unknown_symtype_complaint)
8067         (lbrac_mismatch_complaint, repeated_header_complaint)
8068         (set_namestring, function_outside_compilation_unit_complaint)
8069         (read_dbx_symtab, process_one_symbol): Update.
8070         * gdbtypes.c (stub_noname_complaint): Update.
8071         * windows-nat.c (handle_unload_dll): Update.
8072         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
8073         (decode_base_type): Update.
8074         * xcoffread.c (bf_notfound_complaint, ef_complaint)
8075         (eb_complaint, record_include_begin, record_include_end)
8076         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
8077         (process_xcoff_symbol, read_symbol)
8078         (function_outside_compilation_unit_complaint)
8079         (scan_xcoff_symtab): Update.
8080         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
8081         * buildsym.c (finish_block_internal, make_blockvector)
8082         (end_symtab_get_static_block, augment_type_symtab): Update.
8083         * dtrace-probe.c (dtrace_process_dof)
8084         (dtrace_static_probe_ops::get_probes): Update.
8085         * complaints.h (struct complaint): Don't declare.
8086         (symfile_complaints): Remove.
8087         (complaint_internal): Remove "complaints" parameter.
8088         (complaint): Likewise.
8089         (clear_complaints): Likewise.
8090         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8091         (reread_symbols): Update.
8092         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
8093         (dwarf2_frame_cache, decode_frame_entry): Update.
8094         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
8095         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8096         (info_selectors_command): Update.
8097         * macrotab.c (macro_include, check_for_redefinition)
8098         (macro_undef): Update.
8099         * objfiles.c (filter_overlapping_sections): Update.
8100         * stabsread.c (invalid_cpp_abbrev_complaint)
8101         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
8102         (define_symbol, error_type, read_type, rs6000_builtin_type)
8103         (stabs_method_name_from_physname, read_member_functions)
8104         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
8105         (attach_fields_to_type, complain_about_struct_wipeout)
8106         (read_range_type, read_args, common_block_start)
8107         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
8108         Update.
8109         * mdebugread.c (index_complaint, unknown_ext_complaint)
8110         (basic_type_complaint, bad_tag_guess_complaint)
8111         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
8112         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
8113         (parse_procedure, parse_lines)
8114         (function_outside_compilation_unit_complaint)
8115         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
8116         (bad_tag_guess_complaint, reg_value_complaint): Update.
8117         * cp-support.c (demangled_name_complaint): Update.
8118         * macroscope.c (sal_macro_scope): Update.
8119         * dwarf-index-write.c (class debug_names): Update.
8120
8121 2018-05-23  Tom Tromey  <tom@tromey.com>
8122
8123         * complaints.c (clear_complaints): Remove "noisy" parameter.
8124         * complaints.h (clear_complaints): Update.
8125         * symfile.c (syms_from_objfile_1, finish_new_objfile)
8126         (reread_symbols): Update.
8127
8128 2018-05-23  Tom Tromey  <tom@tromey.com>
8129
8130         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
8131         SUBSEQUENT_MESSAGE.
8132         (vcomplaint, clear_complaints): Update.
8133         (symfile_explanations): Remove some messages.
8134
8135 2018-05-23  Tom Tromey  <tom@tromey.com>
8136
8137         * complaints.c (internal_complaint): Remove.
8138         * complaints.h (internal_complaint): Remove.
8139
8140 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8141
8142         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
8143
8144 2018-05-22  Pedro Alves  <palves@redhat.com>
8145
8146         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
8147         (remote_fileio_badfd, remote_fileio_return_errno)
8148         (remote_fileio_return_success, remote_fileio_func_open)
8149         (remote_fileio_func_open, remote_fileio_func_close)
8150         (remote_fileio_func_read, remote_fileio_func_write)
8151         (remote_fileio_func_lseek, remote_fileio_func_rename)
8152         (remote_fileio_func_unlink, remote_fileio_func_stat)
8153         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
8154         (remote_fileio_func_isatty, remote_fileio_func_system): Add
8155         remote_target parameter.
8156         (remote_fio_func_map) <func>: Add remote_target parameter.
8157         (do_remote_fileio_request, remote_fileio_request):
8158         * remote-fileio.h (remote_fileio_request):
8159         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
8160         remote_target parameter.
8161         (remote_notif_process, handle_notification): Adjust to pass down
8162         the remote.
8163         (remote_notif_state_allocate): Add remote_target parameter.  Save
8164         it.
8165         * remote-notif.h (struct remote_target): Forward declare.
8166         (struct notif_client) <parse, ack, can_get_pending_events>: Add
8167         remote_target parameter.
8168         (struct remote_notif_state) <remote>: New field.
8169         (remote_notif_ack, remote_notif_parse): Add remote_target
8170         parameter.
8171         (remote_notif_state_allocate, remote_notif_state_allocate): Add
8172         remote_target parameter.
8173         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
8174         (threads_listing_context, rmt_thread_action, protocol_feature)
8175         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
8176         (packet_result, struct threads_listing_context, remote_state):
8177         Move definitions and declarations higher up.
8178         (remote_target) <~remote_target>: Declare.
8179         (remote_download_command_source, remote_file_put, remote_file_get)
8180         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
8181         (remote_hostio_pread_vFile, remote_hostio_send_command)
8182         (remote_hostio_set_filesystem, remote_hostio_open)
8183         (remote_hostio_close, remote_hostio_unlink, remote_state)
8184         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
8185         (get_memory_write_packet_size, get_memory_read_packet_size)
8186         (append_pending_thread_resumptions, remote_detach_1)
8187         (append_resumption, remote_resume_with_vcont)
8188         (add_current_inferior_and_thread, wait_ns, wait_as)
8189         (process_stop_reply, remote_notice_new_inferior)
8190         (process_initial_stop_replies, remote_add_thread)
8191         (btrace_sync_conf, remote_btrace_maybe_reopen)
8192         (remove_new_fork_children, kill_new_fork_children)
8193         (discard_pending_stop_replies, stop_reply_queue_length)
8194         (check_pending_events_prevent_wildcard_vcont)
8195         (discard_pending_stop_replies_in_queue, stop_reply)
8196         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
8197         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
8198         (remote_interrupt_as, remote_interrupt_ns)
8199         (remote_get_noisy_reply, remote_query_attached)
8200         (remote_add_inferior, remote_current_thread, get_current_thread)
8201         (set_thread, set_general_thread, set_continue_thread)
8202         (set_general_process, write_ptid)
8203         (remote_unpack_thread_info_response, remote_get_threadinfo)
8204         (parse_threadlist_response, remote_get_threadlist)
8205         (remote_threadlist_iterator, remote_get_threads_with_ql)
8206         (remote_get_threads_with_qxfer)
8207         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8208         (get_offsets, remote_check_symbols, remote_supported_packet)
8209         (remote_query_supported, remote_packet_size)
8210         (remote_serial_quit_handler, remote_detach_pid)
8211         (remote_vcont_probe, remote_resume_with_hc)
8212         (send_interrupt_sequence, interrupt_query)
8213         (remote_notif_get_pending_events, fetch_register_using_p)
8214         (send_g_packet, process_g_packet, fetch_registers_using_g)
8215         (store_register_using_P, store_registers_using_G)
8216         (set_remote_traceframe, check_binary_download)
8217         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8218         (remote_xfer_live_readonly_partial, remote_read_bytes)
8219         (remote_send_printf, remote_flash_write, readchar)
8220         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8221         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8222         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8223         (extended_remote_disable_randomization, extended_remote_run)
8224         (send_environment_packet, extended_remote_environment_support)
8225         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8226         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8227         (packet_command): Now methods of ...
8228         (remote_target): ... this class.
8229         (m_remote_state) <remote_target>: New field.
8230         (struct remote_state) <stop_reply_queue,
8231         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8232         fields.
8233         (remote_state::remote_state): Allocate stop_reply_queue.
8234         (remote_state): Delete global.
8235         (get_remote_state_raw): Delete.
8236         (remote_target::get_remote_state): Allocate m_remote_state on
8237         demand.
8238         (get_current_remote_target): New.
8239         (remote_ops, extended_remote_ops): Delete.
8240         (wait_forever_enabled_p, remote_async_inferior_event_token):
8241         Delete, moved to struct remote_state.
8242         (remote_target::close): Delete self.  Destruction bits split to
8243         ...
8244         (remote_target::~remote_target): ... this.
8245         (show_memory_packet_size): Adjust to use
8246         get_current_remote_target.
8247         (struct protocol_feature) <func>: Add remote_target parameter.
8248         All callers adjusted.
8249         (curr_quit_handler_target): New.
8250         (remote_serial_quit_handler): Reimplement.
8251         (remote_target::open_1): Adjust to use get_current_remote_target.
8252         Heap-allocate remote_target/extended_remote_target instances.
8253         (vcont_builder::vcont_builder): Add remote_target parameter, and
8254         save it in m_remote.  All callers adjusted.
8255         (vcont_builder::m_remote): New field.
8256         (vcont_builder::restart, vcont_builder::flush)
8257         (vcont_builder::push_action): Use it.
8258         (remote_target::commit_resume): Use it.
8259         (struct queue_iter_param) <remote>: New field.
8260         (remote_target::remove_new_fork_children): Fill in 'remote' field.
8261         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8262         (check_pending_event_prevents_wildcard_vcont_callback)
8263         (remote_target::check_pending_events_prevent_wildcard_vcont)
8264         (remote_target::discard_pending_stop_replies)
8265         (remote_target::discard_pending_stop_replies_in_queue)
8266         (remote_target::remote_notif_remove_queued_reply): Fill in
8267         'remote' field.
8268         (remote_notif_get_pending_events): New.
8269         (remote_target::readchar, remote_target::remote_serial_write):
8270         Save/restore curr_quit_handler_target.
8271         (putpkt): New.
8272         (kill_new_fork_children): Fill in 'remote' field.
8273         (packet_command): Use get_current_remote_target, defer to
8274         remote_target method of same name.
8275         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8276         parameter, and save it in m_remote.  All callers adjusted.
8277         (scoped_remote_fd::release): Use m_remote.
8278         (scoped_remote_fd::m_remote): New field.
8279         (remote_file_put, remote_file_get, remote_file_delete): Use
8280         get_current_remote_target, defer to remote_target method of same
8281         name.
8282         (remote_btrace_reset): Add remote_state paremeter.  Update all
8283         callers.
8284         (remote_async_inferior_event_handler). Pass down 'data'.
8285         (remote_new_objfile): Use get_current_remote_target.
8286         (remote_target::vcont_r_supported): New.
8287         (set_range_stepping): Use get_current_remote_target and
8288         remote_target::vcont_r_supported.
8289         (_initialize_remote): Don't allocate 'remote_state' and
8290         'stop_reply_queue' globals.
8291         * remote.h (struct remote_target): Forward declare.
8292         (getpkt, putpkt, remote_notif_get_pending_events): Add
8293         'remote_target' parameter.
8294
8295 2018-05-22  Pedro Alves  <palves@redhat.com>
8296
8297         * remote.c (vcont_builder): Now a class.  Make all data members
8298         private.
8299         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8300         Declare methods.
8301         (vcont_builder_restart): Rename to ...
8302         (vcont_builder::restart): ... this.
8303         (vcont_builder_flush): Rename to ...
8304         (vcont_builder::flush): ... this.
8305         (vcont_builder_push_action): Rename to ...
8306         (vcont_builder::push_action): ... this.
8307         (remote_target::commit_resume): Adjust.
8308
8309 2018-05-22  Pedro Alves  <palves@redhat.com>
8310
8311         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8312         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8313         (get_fixed_memory_packet_size): New.
8314         (get_memory_packet_size): Use it.
8315         (set_memory_packet_size): Don't override the config size with
8316         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8317         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8318         Don't refer to get_memory_packet_size if not connected to a remote
8319         target.  Show "(default)" if configured size is 0.
8320
8321 2018-05-22  Pedro Alves  <palves@redhat.com>
8322
8323         * remote.c (remote_target::mourn_inferior): Move
8324         discard_pending_stop_replies call here from ...
8325         (_initialize_remote): ... here.
8326
8327 2018-05-22  Pedro Alves  <palves@redhat.com>
8328
8329         * remote.c (compare_section_command): Remove set_general_process
8330         call.
8331
8332 2018-05-22  Pedro Alves  <palves@redhat.com>
8333
8334         * remote.c (struct packet_reg, struct remote_arch_state):
8335         Move higher up in the file.
8336         (remote_state) <m_arch_states>: Store remote_arch_state values
8337         instead of remote_arch_state pointers.
8338         (remote_state::get_remote_arch_state): Adjust.
8339
8340 2018-05-22  Pedro Alves  <palves@redhat.com>
8341
8342         * remote.c: Include <unordered_map>.
8343         (remote_state): Now a class.
8344         (remote_state) <get_remote_arch_state>: Declare method.
8345         <get_remote_arch_state>: New field.
8346         (remote_arch_state) <remote_arch_state>: Declare ctor.
8347         <regs>: Now a unique_ptr.
8348         (remote_gdbarch_data_handle): Delete.
8349         (get_remote_arch_state): Delete.
8350         (remote_state::get_remote_arch_state): New.
8351         (get_remote_state): Adjust to call remote_state's
8352         get_remote_arch_state method.
8353         (init_remote_state): Delete, bits factored out to ...
8354         (remote_arch_state::remote_arch_state): ... this new method.
8355         (get_remote_packet_size, get_memory_packet_size)
8356         (process_g_packet, remote_target::fetch_registers)
8357         (remote_target::prepare_to_store, store_registers_using_G)
8358         (remote_target::store_registers, remote_target::get_trace_status):
8359         Adjust to call remote_state's method.
8360         (_initialize_remote): Remove reference to
8361         remote_gdbarch_data_handle.
8362
8363 2018-05-22  Pedro Alves  <palves@redhat.com>
8364
8365         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8366         pread>: New method declarations.
8367         (remote_target::open_1): Adjust.
8368         (readahead_cache_invalidate): Rename to ...
8369         (readahead_cache::invalidate): ... this, and adjust to be a class
8370         method.
8371         (readahead_cache_invalidate_fd): Rename to ...
8372         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8373         class method.
8374         (remote_hostio_pwrite): Adjust.
8375         (remote_hostio_pread_from_cache): Rename to ...
8376         (readahead_cache::pread): ... this, and adjust to be a class
8377         method.
8378         (remote_hostio_close): Adjust.
8379
8380 2018-05-22  Pedro Alves  <palves@redhat.com>
8381
8382         * remote.c (remote_hostio_close_cleanup): Delete.
8383         (class scoped_remote_fd): New.
8384         (remote_file_put, remote_file_get): Use it.
8385
8386 2018-05-22  Pedro Alves  <palves@redhat.com>
8387
8388         (struct vCont_action_support): Use bool and initialize all fields.
8389         (struct readahead_cache): Initialize all fields.
8390         (remote_state): Use bool and initialize all fields.
8391         (remote_state::remote_state, remote_state::~remote_state): New.
8392         (new_remote_state): Delete.
8393         (_initialize_remote): Use new to allocate remote_state.
8394
8395 2018-05-22  Pedro Alves  <palves@redhat.com>
8396             張俊芝  <zjz@zjz.name>
8397
8398         PR gdb/22973
8399         * c-exp.y: Include "c-support.h".
8400         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8401         of tolower.  Use c_ident_is_alpha to scan names.
8402         * c-lang.c: Include "c-support.h".
8403         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8404         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8405         * c-support.h: New file, with bits factored out from ...
8406         * cp-name-parser.y: ... this file.
8407         Include "c-support.h".
8408         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8409         c-support.h and renamed.
8410         (symbol_end, yylex): Adjust.
8411
8412 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8413
8414         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8415         parameter type to CORE_ADDR.
8416         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8417         parameter type in declaration to CORE_ADDR.
8418         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8419         target_auxv_search to get AT_HWCAP and use the result to get the
8420         target description.
8421         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8422         to CORE_ADDR. Remove the cast of the return value to unsigned
8423         long. Fix error predicate of target_auxv_search.
8424         (ppc_linux_nat_target::read_description): Change the type of the
8425         hwcap variable to CORE_ADDR.
8426
8427 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8428
8429         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8430         if the size of fpscr is larger than 32 bits.
8431
8432 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8433
8434         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8435         (ppc32_linux_vsxregmap): New global.
8436         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8437         regcache_supply_regset, and regcache_collect_regset.
8438         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8439         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8440         (fetch_vsx_register, store_vsx_register): Remove.
8441         (fetch_vsx_registers): Add regno parameter. Get regset using
8442         ppc_linux_vsxregset. Use regset to supply registers.
8443         (store_vsx_registers): Add regno parameter. Get regset using
8444         ppc_linux_vsxregset. Use regset to collect registers.
8445         (fetch_register): Call fetch_vsx_registers instead of
8446         fetch_vsx_register.
8447         (store_register): Call store_vsx_registers instead of
8448         store_vsx_register.
8449         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8450         new regno parameter.
8451         (store_ppc_registers): Call store_vsx_registers with -1 for the
8452         new regno parameter.
8453         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8454         (ppc_collect_vsxregset): Remove.
8455
8456 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8457
8458         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8459         offset fields.
8460         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8461         for vector register offset fields.
8462         (ppc64_fbsd_reg_offsets): Likewise.
8463         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8464         to vector register offset fields.
8465         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8466         to vector register offset fields.
8467         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8468         vector register offset fields.
8469         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8470         initializers for vector register offset fields.
8471         (rs6000_aix64_reg_offsets): Likewise.
8472         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8473         (ppc_supply_vrregset): Remove.
8474         (ppc_collect_vrregset): Remove.
8475         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8476         (ppc_linux_vrregset) : New function.
8477         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8478         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8479         (ppc32_linux_vrregset): Remove.
8480         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8481         and use result instead of ppc32_linux_vrregset.
8482         (ppc32_linux_reg_offsets): Remove initializers for vector register
8483         offset fields.
8484         (ppc64_linux_reg_offsets): Likewise.
8485         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8486         * ppc-linux-nat.c: Include regset.h.
8487         (gdb_vrregset_t): Adjust comment to account for little-endian
8488         mode.
8489         (supply_vrregset, fill_vrregset): Remove.
8490         (fetch_altivec_register, store_altivec_register): Remove.
8491         (fetch_altivec_registers): Add regno parameter. Get regset using
8492         ppc_linux_vrregset. Use regset to supply registers.
8493         (store_altivec_registers): Add regno parameter. Get regset using
8494         ppc_linux_vrregset. Use regset to collect registers.
8495         (fetch_register): Call fetch_altivec_registers instead of
8496         fetch_altivec_register.
8497         (store_register): Call store_altivec_registers instead of
8498         store_altivec_register.
8499         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8500         the new regno parameter.
8501         (store_ppc_registers): Call store_altivec_registers with -1 for
8502         the new regno parameter.
8503
8504 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8505
8506         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8507         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8508         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8509         (gdb_vrregset_t): Change array type size to
8510         PPC_LINUX_SIZEOF_VRREGSET.
8511         (gdb_vsxregset_t): Change array type size to
8512         PPC_LINUX_SIZEOF_VSXREGSET.
8513         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8514         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8515         PPC_LINUX_SIZEOF_VSXREGSET.
8516
8517 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8518
8519         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8520         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8521         nat/ppc-linux.c.
8522         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8523         ppc_linux_target_wordsize with tid.
8524         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8525         wordsize with tid.
8526         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8527         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8528         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8529         tid parameter. Remove static specifier.
8530         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8531         (ppc_linux_target_wordsize): New declaration.
8532
8533 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8534
8535         * arch/ppc-linux-common.c: New file.
8536         * arch/ppc-linux-common.h: New file.
8537         * arch/ppc-linux-tdesc.h: New file.
8538         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8539         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8540         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8541         arch/ppc-linux-tdesc.h.
8542         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8543         arch/ppc-linux-tdesc.h.
8544         (ppc_linux_nat_target::read_description): Remove target
8545         description matching code. Fill a ppc_linux_features struct and
8546         call ppc_linux_match_description with it. Move comment about ISA
8547         2.05 to ppc-linux-common.c.
8548         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8549         arch/ppc-linux-tdesc.h.
8550         (ppc_linux_core_read_description): Remove target description
8551         matching code. Fill a ppc_linux_features struct and call
8552         ppc_linux_match_description with it.
8553         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8554         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8555         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8556         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8557         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8558         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8559         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8560         (tdesc_powerpc_e500l): Remove.
8561
8562 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8563
8564         * ada-lang.c (catch_assert_command): Pass empty string instead
8565         of NULL for excep_string argument.
8566
8567 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8568
8569         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8570         the width of the requested register exceeds the width of the
8571         `ptrace' data type.
8572
8573 2018-05-21  Tom Tromey  <tom@tromey.com>
8574
8575         * printcmd.c (output_command): Remove.
8576         (output_command_const): Rename to output_command.
8577         * valprint.h (output_command): Rename from output_command_const.
8578         * tracepoint.c (trace_dump_actions): Call output_command.
8579
8580 2018-05-21  Tom Tromey  <tom@tromey.com>
8581
8582         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8583         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8584         * ada-lang.h (create_ada_exception_catchpoint): Update.
8585         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8586         std::string.
8587         (create_excep_cond_exprs, ~ada_catchpoint)
8588         (should_stop_exception, print_one_exception)
8589         (print_mention_exception, print_recreate_exception): Update.
8590         (ada_get_next_arg): Remove.
8591         (catch_ada_exception_command_split): Use std::string.  Change type
8592         of "excep_string", "cond_string".
8593         (catch_ada_exception_command): Update.
8594         (create_ada_exception_catchpoint): Change type of excep_string.
8595         (ada_exception_sal): Remove excep_string parameter.
8596         (~ada_catchpoint): Remove.
8597
8598 2018-05-21  Tom Tromey  <tom@tromey.com>
8599
8600         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8601         cleanup.
8602
8603 2018-05-21  Tom Tromey  <tom@tromey.com>
8604
8605         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8606         Return unique_xmalloc_ptr.
8607         (print_it_exception): Update.
8608
8609 2018-05-21  Tom Tromey  <tom@tromey.com>
8610
8611         * tracepoint.c (trace_dump_actions): Use std::string.
8612
8613 2018-05-21  Tom Tromey  <tom@tromey.com>
8614
8615         * symfile.c (reread_symbols): Use std::string for original_name.
8616
8617 2018-05-21  Tom Tromey  <tom@tromey.com>
8618
8619         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8620         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8621         constructor.
8622
8623 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8624
8625         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8626         instance to...
8627         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8628         * objfiles.c (get_objfile_bfd_data): Allocate
8629         objfile_per_bfd_storage with obstack_new when allocating on
8630         obstack.
8631
8632 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8633
8634         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8635         OBSTACK_ZALLOC.
8636         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8637         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8638         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8639         (add_pending): Likewise.
8640         (parse_symbol): Likewise.
8641         (parse_partial_symbols): Likewise.
8642         (psymtab_to_symtab_1): Likewise.
8643         (new_psymtab): Likewise.
8644         (elfmdebug_build_psymtabs): Likewise.
8645         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8646         * objfiles.c (get_objfile_bfd_data): Likewise.
8647         (objfile_register_static_link): Likewise.
8648         * psymtab.c (allocate_psymtab): Likewise.
8649         * stabsread.c (read_member_functions): Likewise.
8650         * xcoffread.c (xcoff_end_psymtab): Likewise.
8651
8652 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8653
8654         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8655         compiler supports std::is_trivially_constructible.
8656         * common/poison.h: Include obstack.h.
8657         (IsMallocable): Define to is_trivially_constructible if the
8658         compiler supports it, define to true_type otherwise.
8659         (xobnew): New.
8660         (XOBNEW): Redefine.
8661         (xobnewvec): New.
8662         (XOBNEWVEC): Redefine.
8663         * gdb_obstack.h (obstack_zalloc): New.
8664         (OBSTACK_ZALLOC): Redefine.
8665         (obstack_calloc): New.
8666         (OBSTACK_CALLOC): Redefine.
8667         (obstack_new): New.
8668         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8669         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8670         gdbarch.c.
8671         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8672         obstack_calloc/obstack_zalloc.
8673         (gdbarch_obstack_zalloc): Remove.
8674         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8675
8676 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8677
8678         * stack.c (backtrace_command_1): Remove useless variable int i.
8679
8680 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8681
8682         * stack.c (print_frame_info): Fix comment.
8683
8684 2018-05-18  Tom Tromey  <tom@tromey.com>
8685
8686         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8687         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8688         (~dwarf2_per_objfile): Update
8689         (dwarf2_get_dwz_file): Use new.
8690         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8691         unique_ptr.
8692
8693 2018-05-18  Tom Tromey  <tom@tromey.com>
8694
8695         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8696         unique_ptr.
8697         * dwarf2read.c (struct dwp_file): Add constructor and
8698         initializers.
8699         (open_and_init_dwp_file): Return a unique_ptr.
8700         (dwarf2_per_objfile, create_dwp_hash_table)
8701         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8702         (lookup_dwo_unit_in_dwp): Update.
8703         (open_and_init_dwp_file, get_dwp_file): Update.
8704
8705 2018-05-18  Tom Tromey  <tom@tromey.com>
8706
8707         * dwarf2read.c (dwarf2_per_objfile): Update.
8708         (struct mapped_index): Add initializers.
8709         (dwarf2_read_index): Use new.
8710         (dw2_symtab_iter_init): Update.
8711         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8712         unique_ptr.
8713
8714 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8715
8716         * dwarf2read.c (mapped_index) <total_size>: Remove.
8717
8718 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8719
8720         * unittests/format_pieces-selftests.c (test_format_specifier):
8721         Add ARI comments.
8722
8723 2018-05-18  Tom Tromey  <tom@tromey.com>
8724
8725         * c-typeprint.c (maybe_print_hole): New function.
8726         (c_print_type_struct_field_offset): Update.
8727         (c_type_print_base_struct_union): Call maybe_print_hole.
8728
8729 2018-05-17  Keith Seitz  <keiths@redhat.com>
8730
8731         * breakpoint.c (build_bpstat_chain): New function, moved from
8732         bpstat_stop_status.
8733         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8734         If no stop chain is passed, call build_bpstat_chain to build it.
8735         * breakpoint.h (build_bpstat_chain): Declare.
8736         (bpstat_stop_status): Move documentation here from breakpoint.c.
8737         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8738         build the stop chain and pass it to skip_inline_frames.
8739         Pass this stop chain to bpstat_stop_status.
8740         * inline-frame.c: Include breakpoint.h.
8741         (stopped_by_user_bp_inline_frame): New function.
8742         (skip_inline_frames): Add parameter `stop_chain'.
8743         Move documention to inline-frame.h.
8744         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8745         whether the frame should be elided.
8746         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8747         Add moved documentation and update for new parameter.
8748
8749 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8750
8751         PR cli/14975
8752         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8753         unittests/format_pieces-selftests.c.
8754         * common/format.h (format_piece) <operator==>: New.
8755         (format_pieces) <operator[]>: Remove.
8756         * common/format.c (format_pieces::format_pieces): Handle \e.
8757         * unittests/format_pieces-selftests.c: New.
8758
8759 2018-05-17  Tom Tromey  <tom@tromey.com>
8760
8761         PR symtab/23010:
8762         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8763         (dw2_instantiate_symtab): Add skip_partial parameter.
8764         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8765         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8766         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8767         (dw2_expand_symtabs_matching_one)
8768         (dw2_find_pc_sect_compunit_symtab)
8769         (dw2_debug_names_lookup_symbol)
8770         (dw2_debug_names_expand_symtabs_for_function): Update.
8771         (init_cutu_and_read_dies): Add skip_partial parameter.
8772         (process_psymtab_comp_unit, build_type_psymtabs_1)
8773         (process_skeletonless_type_unit, load_partial_comp_unit)
8774         (psymtab_to_symtab_1): Update.
8775         (load_full_comp_unit): Add skip_partial parameter.
8776         (process_imported_unit_die, dwarf2_read_addr_index)
8777         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8778         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8779         (read_signatured_type): Update.
8780
8781 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8782
8783         * value.c (release_value): Remove unused variable.
8784         (record_latest_value): Likewise.
8785         (access_value_history): Likewise.
8786         (preserve_values): Likewise.
8787
8788 2018-05-17  Tom Tromey  <tom@tromey.com>
8789
8790         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8791         Initialize.
8792
8793 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8794
8795         PR gdb/22286
8796         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8797         Also handle registers whose width is not a multiple of
8798         PTRACE_TYPE_RET.
8799         (linux_nat_trad_target::store_register): Likewise.
8800
8801 2018-05-16  Tom Tromey  <tom@tromey.com>
8802
8803         * gdbcore.h (core_bfd): Redefine.
8804         * corelow.c (core_target::close): Update.
8805         (core_target_open): Update.
8806         * progspace.h (struct program_space) <cbfd>: Now a
8807         gdb_bfd_ref_ptr.
8808
8809 2018-05-16  Tom Tromey  <tom@tromey.com>
8810
8811         PR cli/19551:
8812         * symfile-add-flags.h (enum symfile_add_flags)
8813         <SYMFILE_NOT_FILENAME>: New constant.
8814         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8815         objfile name from BFD.
8816         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8817         * minidebug.c (find_separate_debug_file_in_section): Put
8818         ".gnu_debugdata" into BFD's file name.
8819
8820 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8821
8822         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8823         Remove.
8824
8825 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8826
8827         PR binutils/21446
8828         * aarch64-tdep.c (aarch64_analyze_prologue,
8829         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8830         Indicate not interested in errors.
8831
8832 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8833
8834         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8835         Supply the MIPS_ZERO_REGNUM register.
8836
8837 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8838
8839         * mips-tdep.c (mask_address_var): Make variable static.
8840
8841 2018-05-14  Tom Tromey  <tom@tromey.com>
8842
8843         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8844
8845 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8846
8847         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8848         FXSAVE_ADDR for the mxcsr register.
8849
8850 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8851
8852         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8853
8854 2018-05-11  Pedro Alves  <palves@redhat.com>
8855
8856         * corelow.c (core_target) <core_target>: No longer inline.
8857         Initialize m_core_gdbarch, m_core_vec and build the section table
8858         here.
8859         <~core_target>: New.
8860         <core_gdbarch, get_core_register_section>: New methods.
8861         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8862         factored out from ...
8863         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8864         (core_ops): Delete.
8865         (sniff_core_bfd): Add gdbarch parameter.
8866         (core_close): Delete, merged into ...
8867         (core_target::close): ... here.  Delete self.
8868         (core_close_cleanup): Delete.
8869         (core_target_open): Allocate a core_target on the heap.  Use a
8870         unique_ptr instead of a cleanup.  Bits moved into the core_target
8871         ctor.  Adjust to use core_target methods instead of globals.
8872         (get_core_register_section): Rename to ...
8873         (core_target::get_core_register_section): ... this and adjust.
8874         (struct get_core_registers_cb_data): New.
8875         (get_core_registers_cb): Use it.  Use bool.
8876         (core_target::fetch_registers, core_target::files_info)
8877         (core_target::xfer_partial, core_target::read_description)
8878         (core_target::pid_to, core_target::thread_name): Adjust to
8879         reference class fields instead of globals.
8880         * target.h (struct target_ops_deleter, target_ops_up): New.
8881
8882 2018-05-11  Pedro Alves  <palves@redhat.com>
8883
8884         * corefile.c (core_file_command): Move to corelow.c.
8885         * corelow.c (the_core_target): Delete.
8886         (core_file_command): Moved from corefile.c.  Check exec_bfd
8887         instead of the_core_target.  Use target_detach instead of calling
8888         into the_core_target directly.
8889         (maybe_say_no_core_file_now): New.
8890         (core_target::detach): Use it.
8891         (_initialize_corelow): Remove references to the_core_target.
8892         * gdbcore.h (the_core_target): Delete.
8893
8894 2018-05-11  Tom Tromey  <tromey@redhat.com>
8895             Pedro Alves  <palves@redhat.com>
8896
8897         * corefile.c (core_bfd): Remove.
8898         * gdbcore.h (core_bfd): Now a macro.
8899         * progspace.h (struct program_space) <cbfd>: New field.
8900
8901 2018-05-11  Tom Tromey  <tom@tromey.com>
8902
8903         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8904         gdb::def_vector.
8905
8906 2018-05-10  Tom Tromey  <tom@tromey.com>
8907
8908         * configure: Rebuild.
8909         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8910
8911 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8912
8913         PR server/23158:
8914         * regformats/regdat.sh: Adjust script, following the addition
8915         of the new expedite_regs parameter to init_target_desc.
8916
8917 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8918     
8919         PR gdb/23127
8920         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8921         set_gdbarch_significant_addr_bit.
8922         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8923         set_gdbarch_significant_addr_bit.
8924         * utils.c (address_significant): Update to sign extend addr.
8925
8926 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8927
8928         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8929         (xtensa_linux_init_abi): Limit tdep->num_regs by
8930         tdep->num_nopriv_regs.
8931         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8932         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8933         not initialized.
8934
8935 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8936
8937         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8938
8939 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8940
8941         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8942         (I387_MXCSR_INIT_VAL): New constant.
8943         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8944         buffer if it was supplied by the inferior.
8945         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8946         (i387_xsave_get_clear_bv): New function.
8947         (i387_supply_xsave): Only read x87 control registers from the
8948         xsave buffer if the feature is enabled, and the state will have
8949         been written, otherwise, provide a suitable default.
8950         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8951         including x87 control registers.  Update control registers if they
8952         have changed from the default value, and mark features as enabled
8953         as required.
8954         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8955
8956 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8957
8958         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8959
8960 2018-05-07  Tom Tromey  <tom@tromey.com>
8961
8962         * configure: Rebuild.
8963         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8964
8965 2018-05-07  Tom Tromey  <tom@tromey.com>
8966
8967         PR tdep/20362:
8968         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8969         bit.  Use correct value for VDIV.
8970
8971 2018-05-04  Tom Tromey  <tom@tromey.com>
8972
8973         * configure: Rebuild.
8974         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8975
8976 2018-05-04  Tom Tromey  <tom@tromey.com>
8977
8978         * linux-record.c (record_linux_system_call) <case
8979         RECORD_SYS_RECVFROM>: Add "break".
8980
8981 2018-05-04  Tom Tromey  <tom@tromey.com>
8982
8983         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8984         Add missing "break".
8985         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8986         Add missing "break".
8987
8988 2018-05-04  Tom Tromey  <tom@tromey.com>
8989
8990         * rs6000-tdep.c (ppc_process_record_op4)
8991         (ppc_process_record_op63): Add fall-through comment.
8992
8993 2018-05-04  Tom Tromey  <tom@tromey.com>
8994
8995         * i386-tdep.c (i386_process_record): Add fall-through comment.
8996
8997 2018-05-04  Tom Tromey  <tom@tromey.com>
8998
8999         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
9000         comment.
9001
9002 2018-05-04  Tom Tromey  <tom@tromey.com>
9003
9004         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
9005         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
9006         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
9007         comment.
9008         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
9009         comment.
9010         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
9011         comment.
9012
9013 2018-05-04  Tom Tromey  <tom@tromey.com>
9014
9015         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
9016
9017 2018-05-04  Tom Tromey  <tom@tromey.com>
9018
9019         * s390-tdep.c (s390_process_record): Fix fall-through comments.
9020         * xcoffread.c (scan_xcoff_symtab): Move comment later.
9021         * symfile.c (section_is_mapped): Fix fall-through comment.
9022         * stabsread.c (define_symbol, read_member_functions): Fix
9023         fall-through comment.
9024         * s390-linux-tdep.c (s390_process_record): Fix fall-through
9025         comment.
9026         * remote.c (remote_wait_as): Fix fall-through comment.
9027         * p-exp.y (yylex): Fix fall-through comment.
9028         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
9029         comment.
9030         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
9031         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
9032         * jv-exp.y (yylex): Fix fall-through comment.
9033         * go-exp.y (lex_one_token): Fix fall-through comment.
9034         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
9035         fall-through comment.
9036         * f-exp.y (yylex): Fix fall-through comment.
9037         * dwarf2read.c (process_die): Fix fall-through comments.
9038         * dbxread.c (process_one_symbol): Fix fall-through comment.
9039         * d-exp.y (lex_one_token): Fix fall-through comment.
9040         * cp-name-parser.y (yylex): Fix fall-through comment.
9041         * coffread.c (coff_symtab_read): Fix fall-through comment.
9042         * c-exp.y (lex_one_token): Fix fall-through comment.
9043         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
9044         comment.
9045         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
9046         comment.
9047
9048 2018-05-04  Tom Tromey  <tom@tromey.com>
9049
9050         PR python/22730:
9051         * NEWS: Mention gdb.execute change.
9052         * gdbcmd.h (execute_control_command): Don't declare.
9053         * python/python.c (execute_gdb_command): Use read_command_lines_1,
9054         execute_control_commands, execute_control_commands_to_string.
9055         * cli/cli-script.h (execute_control_commands)
9056         (execute_control_commands_to_string): Declare.
9057         (execute_control_command): Add from_tty parameter.
9058         * cli/cli-script.c (execute_control_commands)
9059         (execute_control_commands_to_string): New functions.
9060         (execute_user_command): Use execute_control_commands.
9061         (execute_control_command_1): Add "from_tty" parameter.  Update.
9062         (execute_control_command): Likewise.
9063
9064 2018-05-04  Tom Tromey  <tom@tromey.com>
9065
9066         PR python/22731:
9067         * NEWS: Mention that breakpoint commands are writable.
9068         * python/py-breakpoint.c (bppy_set_commands): New function.
9069         (breakpoint_object_getset) <"commands">: Use it.
9070
9071 2018-05-04  Tom Tromey  <tom@tromey.com>
9072
9073         * tracepoint.c (actions_command): Update.
9074         * mi/mi-cmd-break.c (mi_command_line_array)
9075         (mi_command_line_array_cnt, mi_command_line_array_ptr)
9076         (mi_read_next_line): Remove.
9077         (mi_cmd_break_commands): Update.
9078         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
9079         function_view.
9080         * cli/cli-script.c (get_command_line): Update.
9081         (process_next_line): Use function_view.  Constify.
9082         (recurse_read_control_structure, read_command_lines)
9083         (read_command_lines_1): Change argument types to function_view.
9084         (do_define_command, document_command): Update.
9085         * breakpoint.h (check_tracepoint_command): Don't declare.
9086         * breakpoint.c (check_tracepoint_command): Remove.
9087         (commands_command_1, create_tracepoint_from_upload): Update.
9088
9089 2018-05-04  Tom Tromey  <tom@tromey.com>
9090
9091         PR gdb/11750:
9092         * cli/cli-script.h (enum command_control_type) <define_control>:
9093         New constant.
9094         * cli/cli-script.c (multi_line_command_p): Handle define_control.
9095         (build_command_line, execute_control_command_1)
9096         (process_next_line): Likewise.
9097         (do_define_command): New function, extracted from define_command.
9098         (define_command): Use it.
9099
9100 2018-05-04  Tom Tromey  <tom@tromey.com>
9101
9102         * tracepoint.c (actions_command): Update.
9103         * cli/cli-script.h (read_command_lines): Update.
9104         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
9105         (MAX_TMPBUF): Remove define.
9106         (define_command): Use string_printf.
9107         (document_command): Likewise.
9108         * breakpoint.c (commands_command_1): Update.
9109
9110 2018-05-04  Tom Tromey  <tom@tromey.com>
9111
9112         * top.c (execute_command): Update.
9113         * cli/cli-script.h (print_command_lines): Now varargs.
9114         * cli/cli-script.c (print_command_lines): Now varargs.
9115         (execute_control_command_1) <case while_control, case if_control>:
9116         Update.
9117
9118 2018-05-04  Tom Tromey  <tom@tromey.com>
9119
9120         * tracepoint.c (all_tracepoint_actions): Rename from
9121         all_tracepoint_actions_and_cleanup.  Change return type.
9122         (actions_command, encode_actions_1, encode_actions)
9123         (trace_dump_actions, tdump_command): Update.
9124         * remote.c (remote_download_command_source): Update.
9125         * python/python.c (gdbpy_eval_from_control_command)
9126         (python_command, python_interactive_command): Update.
9127         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
9128         * guile/guile.c (guile_command)
9129         (gdbscm_eval_from_control_command, guile_command): Update.
9130         * compile/compile.c (compile_code_command)
9131         (compile_print_command, compile_to_object): Update.
9132         * cli/cli-script.h (struct command_lines_deleter): New.
9133         (counted_command_line): New typedef.
9134         (struct command_line): Add constructor, destructor.
9135         <body_list>: Remove.
9136         <body_list_0, body_list_1>: New members.
9137         (command_line_up): Remove typedef.
9138         (read_command_lines, read_command_lines_1, get_command_line):
9139         Update.
9140         (copy_command_lines): Don't declare.
9141         * cli/cli-script.c (build_command_line): Use "new".
9142         (get_command_line): Return counted_command_line.
9143         (print_command_lines, execute_user_command)
9144         (execute_control_command_1, while_command, if_command): Update.
9145         (realloc_body_list): Remove.
9146         (process_next_line, recurse_read_control_structure): Update.
9147         (read_command_lines, read_command_lines_1): Return counted_command_line.
9148         (free_command_lines): Use "delete".
9149         (copy_command_lines): Remove.
9150         (define_command, document_command, show_user_1): Update.
9151         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
9152         a counted_command_line.
9153         * breakpoint.h (counted_command_line): Remove typedef.
9154         (breakpoint_set_commands): Update.
9155         * breakpoint.c (check_no_tracepoint_commands)
9156         (validate_commands_for_breakpoint): Update.
9157         (breakpoint_set_commands): Change commands to be a
9158         counted_command_line.
9159         (commands_command_1, update_dprintf_command_list)
9160         (create_tracepoint_from_upload): Update.
9161
9162 2018-05-04  Tom Tromey  <tom@tromey.com>
9163
9164         * cli/cli-decode.h (cmd_list_element): New constructor.
9165         (~cmd_list_element): New destructor.
9166         (struct cmd_list_element): Add initializers.
9167         * cli/cli-decode.c (do_add_cmd): Use "new".
9168         (delete_cmd): Use "delete".
9169
9170 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
9171             Pedro Alves <palves@redhat.com>
9172
9173         PR breakpoints/19806 and support for PR external/20207.
9174         * NEWS: Mention Aarch64 watchpoint improvements.
9175         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
9176         watchpoints and PR external/20207 watchpoints.
9177         * nat/aarch64-linux-hw-point.c
9178         (kernel_supports_any_contiguous_range): New.
9179         (aarch64_watchpoint_offset): New.
9180         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
9181         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
9182         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
9183         (aarch64_align_watchpoint): New parameters aligned_offset_p and
9184         next_addr_orig_p.  Support PR external/20207 watchpoints.
9185         (aarch64_downgrade_regs): New.
9186         (aarch64_dr_state_insert_one_point): New parameters offset and
9187         addr_orig.
9188         (aarch64_dr_state_remove_one_point): Likewise.
9189         (aarch64_handle_breakpoint): Update caller.
9190         (aarch64_handle_aligned_watchpoint): Likewise.
9191         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
9192         aligned_offset.
9193         (aarch64_linux_set_debug_regs): Remove const from state.  Call
9194         aarch64_downgrade_regs.
9195         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
9196         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
9197         (DR_CONTROL_MASK): ... this.
9198         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
9199         (unsigned int aarch64_watchpoint_offset): New prototype.
9200         (aarch64_linux_set_debug_regs): Remove const from state.
9201         * utils.c (align_up, align_down): Move to ...
9202         * common/common-utils.c (align_up, align_down): ... here.
9203         * utils.h (align_up, align_down): Move to ...
9204         * common/common-utils.h (align_up, align_down): ... here.
9205
9206 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9207
9208         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9209         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9210         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9211         Re-implement to match the ABI as summarized in GCC's
9212         gcc/config/sparc/sparc.c.  All callers updated.
9213         (sparc32_store_arguments): Remove assertion.
9214
9215 2018-05-04  Tom Tromey  <tom@tromey.com>
9216
9217         * printcmd.c: Don't include tui.h.
9218         (decode_format): Use skip_spaces.
9219
9220 2018-05-04  Tom Tromey  <tom@tromey.com>
9221
9222         PR gdb/22619:
9223         * printcmd.c (last_count): New global.
9224         (x_command): Use saved count when repeating.
9225
9226 2018-05-04  Tom Tromey  <tom@tromey.com>
9227
9228         * nto-procfs.c (do_closedir_cleanup): Remove.
9229         (procfs_pidlist): Use gdb_dir_up.
9230         * procfs.c (do_closedir_cleanup): Remove.
9231         (proc_update_threads): Use gdb_dir_up.
9232         * common/filestuff.h (struct gdb_dir_deleter): New.
9233         (gdb_dir_up): New typedef.
9234
9235 2018-05-04  Tom Tromey  <tom@tromey.com>
9236
9237         * ada-lang.c (print_mention_exception): Use std::string.
9238
9239 2018-05-04  Tom Tromey  <tom@tromey.com>
9240
9241         * ada-lang.c (create_excep_cond_exprs): Update.
9242         (ada_exception_catchpoint_cond_string): Use std::string.
9243
9244 2018-05-04  Tom Tromey  <tom@tromey.com>
9245
9246         * ada-lang.c (xget_renaming_scope): Return std::string.
9247         (old_renaming_is_invisible): Update.
9248
9249 2018-05-04  Tom Tromey  <tom@tromey.com>
9250
9251         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9252         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9253
9254 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9255
9256         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9257
9258 2018-05-04  Tom Tromey  <tom@tromey.com>
9259
9260         * remote.c (remote_query_supported_append): Change type.
9261         (remote_check_symbols): Update.
9262
9263 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
9264
9265         PR gdb/11420
9266         * configure.ac: Prepend libpython.
9267         * python/python-config.py: Likewise.
9268         * configure: Regenerate.
9269
9270 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9271
9272         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9273
9274 2018-05-03  Pedro Alves  <palves@redhat.com>
9275
9276         * s390-linux-nat.c
9277         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9278         override.  Write 'true' instead of '1'.
9279         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9280         declaration.
9281
9282 2018-05-02  Pedro Alves  <palves@redhat.com>
9283
9284         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9285         add_inf_child_target.
9286         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9287         add_inf_child_target.
9288         * aix-thread.c (aix_thread_target_info): New.
9289         (aix_thread_target) <shortname, longname, doc>: Delete.
9290         <info>: New.
9291         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9292         add_inf_child_target.
9293         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9294         add_inf_child_target.
9295         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9296         add_inf_child_target.
9297         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9298         add_inf_child_target.
9299         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9300         add_inf_child_target.
9301         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9302         add_inf_child_target.
9303         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9304         add_inf_child_target.
9305         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9306         add_inf_child_target.
9307         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9308         add_inf_child_target.
9309         * bfd-target.c (target_bfd_target_info): New.
9310         (target_bfd) <shortname, longname, doc>: Delete.
9311         <info>: New.
9312         * bsd-kvm.c (bsd_kvm_target_info): New.
9313         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9314         <info>: New.
9315         (bsd_kvm_target::open): Rename to ...
9316         (bsd_kvm_target_open): ... this.  Adjust.
9317         * bsd-uthread.c (bsd_uthread_target_info): New.
9318         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9319         <info>: New.
9320         * corefile.c (core_file_command): Adjust.
9321         * corelow.c (core_target_info): New.
9322         (core_target) <shortname, longname, doc>: Delete.
9323         <info>: New.
9324         (core_target::open): Rename to ...
9325         (core_target_open): ... this.  Adjust.
9326         * ctf.c (ctf_target_info): New.
9327         (ctf_target) <shortname, longname, doc>: Delete.
9328         <info>: New.
9329         (ctf_target::open): Rename to ...
9330         (ctf_target_open): ... this.
9331         (_initialize_ctf): Adjust.
9332         * exec.c (exec_target_info): New.
9333         (exec_target) <shortname, longname, doc>: Delete.
9334         <info>: New.
9335         (exec_target::open): Rename to ...
9336         (exec_target_open): ... this.
9337         * gdbcore.h (core_target_open): Declare.
9338         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9339         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9340         add_inf_child_target.
9341         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9342         add_inf_child_target.
9343         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9344         add_inf_child_target.
9345         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9346         add_inf_child_target.
9347         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9348         add_inf_child_target.
9349         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9350         add_inf_child_target.
9351         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9352         add_inf_child_target.
9353         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9354         add_inf_child_target.
9355         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9356         add_inf_child_target.
9357         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9358         add_inf_child_target.
9359         * inf-child.c (inf_child_target_info): New.
9360         (inf_child_target::info): New.
9361         (inf_child_open_target): Remove 'target' parameter.  Use
9362         get_native_target instead.
9363         (inf_child_target::open): Delete.
9364         (add_inf_child_target): New.
9365         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9366         Delete.
9367         <info>: New.
9368         (add_inf_child_target): Declare.
9369         (inf_child_open_target): Declare.
9370         * linux-thread-db.c (thread_db_target_info): New.
9371         (thread_db_target) <shortname, longname, doc>: Delete.
9372         <info>: New.
9373         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9374         add_inf_child_target.
9375         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9376         add_inf_child_target.
9377         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9378         add_inf_child_target.
9379         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9380         add_inf_child_target.
9381         * make-target-delegates (print_class): Adjust.
9382         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9383         add_inf_child_target.
9384         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9385         add_inf_child_target.
9386         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9387         add_inf_child_target.
9388         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9389         add_inf_child_target.
9390         * nto-procfs.c (nto_native_target_info): New.
9391         (nto_procfs_target_native) <shortname, longname, doc>:
9392         Delete.
9393         <info>: New.
9394         (nto_procfs_target_info): New.
9395         (nto_procfs_target_procfs) <shortname, longname, doc>:
9396         Delete.
9397         <info>: New.
9398         (init_procfs_targets): Adjust.
9399         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9400         add_inf_child_target.
9401         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9402         add_inf_child_target.
9403         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9404         add_inf_child_target.
9405         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9406         add_inf_child_target.
9407         * ravenscar-thread.c (ravenscar_target_info): New.
9408         (ravenscar_thread_target) <shortname, longname, doc>:
9409         Delete.
9410         <info>: New.
9411         * record-btrace.c (record_btrace_target_info):
9412         (record_btrace_target) <shortname, longname, doc>: Delete.
9413         <info>: New.
9414         (record_btrace_target::open): Rename to ...
9415         (record_btrace_target_open): ... this.  Adjust.
9416         * record-full.c (record_longname, record_doc): New.
9417         (record_full_base_target) <shortname, longname, doc>: Delete.
9418         <info>: New.
9419         (record_full_target_info): New.
9420         (record_full_target): <shortname>: Delete.
9421         <info>: New.
9422         (record_full_core_open_1, record_full_open_1): Update comments.
9423         (record_full_base_target::open): Rename to ...
9424         (record_full_open): ... this.
9425         (cmd_record_full_restore): Update.
9426         (_initialize_record_full): Update.
9427         * remote-sim.c (remote_sim_target_info): New.
9428         (gdbsim_target) <shortname, longname, doc>: Delete.
9429         <info>: New.
9430         (gdbsim_target::open): Rename to ...
9431         (gdbsim_target_open): ... this.
9432         (_initialize_remote_sim): Adjust.
9433         * remote.c (remote_doc): New.
9434         (remote_target_info): New.
9435         (remote_target) <shortname, longname, doc>: Delete.
9436         <info>: New.
9437         (extended_remote_target_info): New.
9438         (extended_remote_target) <shortname, longname, doc>: Delete.
9439         <info>: New.
9440         (remote_target::open_1): Make static.  Adjust.
9441         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9442         * s390-linux-nat.c (_initialize_s390_nat): Use
9443         add_inf_child_target.
9444         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9445         add_inf_child_target.
9446         * sol-thread.c (thread_db_target_info): New.
9447         (sol_thread_target) <shortname, longname, doc>: Delete.
9448         <info>: New.
9449         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9450         add_inf_child_target.
9451         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9452         add_inf_child_target.
9453         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9454         add_inf_child_target.
9455         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9456         add_inf_child_target.
9457         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9458         add_inf_child_target.
9459         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9460         add_inf_child_target.
9461         * spu-linux-nat.c (_initialize_spu_nat): Use
9462         add_inf_child_target.
9463         * spu-multiarch.c (spu_multiarch_target_info): New.
9464         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9465         <info>: New.
9466         * target-delegates.c: Regenerate.
9467         * target.c: Include <unordered_map>.
9468         (target_ops_p): Delete.
9469         (DEF_VEC_P(target_ops_p)): Delete.
9470         (target_factories): New.
9471         (test_target_info): New.
9472         (test_target_ops::info): New.
9473         (open_target): Adjust to use target_factories.
9474         (add_target_with_completer): Rename to ...
9475         (add_target): ... this.  Change prototype.  Register target_info
9476         and open callback in target_factories.  Register target_info in
9477         command context instead of target_ops.
9478         (add_target): Delete old implementation.
9479         (add_deprecated_target_alias): Change prototype.  Adjust.
9480         (the_native_target): New.
9481         (set_native_target, get_native_target): New.
9482         (find_default_run_target): Use the_native_target.
9483         (find_attach_target, find_run_target): Simplify.
9484         (target_ops::open): Delete.
9485         (dummy_target_info): New.
9486         (dummy_target::shortname, dummy_target::longname)
9487         (dummy_target::doc): Delete.
9488         (dummy_target::info): New.
9489         (debug_target::shortname, debug_target::longname)
9490         (debug_target::doc): Delete.
9491         (debug_target::info): New.
9492         * target.h (struct target_info): New.
9493         (target_ops::~target_ops): Add comment.
9494         (target_ops::info): New.
9495         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9496         longer virtual.  Implement in terms of target_info.
9497         (set_native_target, get_native_target): Declare.
9498         (target_open_ftype): New.
9499         (add_target, add_target_with_completer)
9500         (add_deprecated_target_alias): Change prototype.
9501         (test_target) <shortname, longname, doc>: Delete.
9502         <info>: New.
9503         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9504         add_inf_child_target.
9505         * tracefile-tfile.c (tfile_target_info): New.
9506         (tfile_target) <shortname, longname, doc>: Delete.
9507         <info>: New.
9508         (tfile_target::open): Rename to ...
9509         (tfile_target_open): ... this.
9510         (_initialize_tracefile_tfile): Adjust.
9511         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9512         add_inf_child_target.
9513         * windows-nat.c (_initialize_windows_nat): Use
9514         add_inf_child_target.
9515         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9516         add_inf_child_target.
9517
9518 2018-05-02  Pedro Alves  <palves@redhat.com>
9519
9520         * linux-nat.h (linux_nat_target) <low_new_thread,
9521         low_delete_thread, low_new_fork, low_forget_process,
9522         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9523         New virtual methods.
9524         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9525         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9526         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9527         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9528         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9529         Delete.
9530         * linux-fork.c (delete_fork): Adjust to call low method.
9531         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9532         (linux_nat_new_fork, linux_nat_forget_process_hook)
9533         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9534         (linux_nat_status_is_event):
9535         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9536         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9537         to call low method.
9538         (sigtrap_is_event): Rename to ...
9539         (linux_nat_target::low_status_is_event): ... this.
9540         (linux_nat_set_status_is_event): Delete.
9541         (save_stop_reason, linux_nat_wait_1)
9542         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9543         low methods.
9544         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9545         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9546         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9547         (linux_nat_set_prepare_to_resume): Delete.
9548         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9549         low virtual methods.
9550         * amd64-linux-nat.c: Likewise.
9551         * arm-linux-nat.c: Likewise.
9552         * i386-linux-nat.c: Likewise.
9553         * ia64-linux-nat.c: Likewise.
9554         * mips-linux-nat.c: Likewise.
9555         * ppc-linux-nat.c: Likewise.
9556         * s390-linux-nat.c: Likewise.
9557         * sparc64-linux-nat.c: Likewise.
9558         * x86-linux-nat.c: Likewise.
9559         * x86-linux-nat.h: Include "nat/x86-linux.h".
9560         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9561         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9562         Override methods.
9563
9564 2018-05-02  Pedro Alves  <palves@redhat.com>
9565
9566         * target.h (target_ops)
9567         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9568         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9569         stopped_by_watchpoint, have_continuable_watchpoint,
9570         stopped_data_address, watchpoint_addr_within_range,
9571         can_accel_watchpoint_condition, can_run, thread_alive,
9572         has_all_memory, has_memory, has_stack, has_registers,
9573         has_execution, can_async_p, is_async_p, supports_non_stop,
9574         always_non_stop_p, can_execute_reverse, supports_multi_process,
9575         supports_enable_disable_tracepoint,
9576         supports_disable_randomization, supports_string_tracing,
9577         supports_evaluation_of_breakpoint_conditions,
9578         can_run_breakpoint_commands, filesystem_is_local,
9579         can_download_tracepoint, get_trace_state_variable_value,
9580         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9581         record_is_replaying, record_will_replay,
9582         augmented_libraries_svr4_read>: Adjust to return bool.
9583         * aarch64-linux-nat.c: All implementations adjusted.
9584         * aix-thread.c: All implementations adjusted.
9585         * arm-linux-nat.c: All implementations adjusted.
9586         * breakpoint.c: All implementations adjusted.
9587         * bsd-kvm.c: All implementations adjusted.
9588         * bsd-uthread.c: All implementations adjusted.
9589         * corelow.c: All implementations adjusted.
9590         * ctf.c: All implementations adjusted.
9591         * darwin-nat.c: All implementations adjusted.
9592         * darwin-nat.h: All implementations adjusted.
9593         * exec.c: All implementations adjusted.
9594         * fbsd-nat.c: All implementations adjusted.
9595         * fbsd-nat.h: All implementations adjusted.
9596         * gnu-nat.c: All implementations adjusted.
9597         * gnu-nat.h: All implementations adjusted.
9598         * go32-nat.c: All implementations adjusted.
9599         * ia64-linux-nat.c: All implementations adjusted.
9600         * inf-child.c: All implementations adjusted.
9601         * inf-child.h: All implementations adjusted.
9602         * inf-ptrace.c: All implementations adjusted.
9603         * inf-ptrace.h: All implementations adjusted.
9604         * linux-nat.c: All implementations adjusted.
9605         * linux-nat.h: All implementations adjusted.
9606         * mips-linux-nat.c: All implementations adjusted.
9607         * nto-procfs.c: All implementations adjusted.
9608         * ppc-linux-nat.c: All implementations adjusted.
9609         * procfs.c: All implementations adjusted.
9610         * ravenscar-thread.c: All implementations adjusted.
9611         * record-btrace.c: All implementations adjusted.
9612         * record-full.c: All implementations adjusted.
9613         * remote-sim.c: All implementations adjusted.
9614         * remote.c: All implementations adjusted.
9615         * s390-linux-nat.c: All implementations adjusted.
9616         * sol-thread.c: All implementations adjusted.
9617         * spu-multiarch.c: All implementations adjusted.
9618         * target-delegates.c: All implementations adjusted.
9619         * target.c: All implementations adjusted.
9620         * target.h: All implementations adjusted.
9621         * tracefile-tfile.c: All implementations adjusted.
9622         * tracefile.c: All implementations adjusted.
9623         * tracefile.h: All implementations adjusted.
9624         * windows-nat.c: All implementations adjusted.
9625         * x86-linux-nat.h: All implementations adjusted.
9626         * x86-nat.h: All implementations adjusted.
9627
9628 2018-05-02  Pedro Alves  <palves@redhat.com>
9629
9630         * make-target-delegates (scan_target_h): Don't trim lines here.
9631         Replace sequences of tabs and/or whitespace with a single
9632         whitespace.
9633         (top level, parsing methods): Trim each line before processing it
9634         here.
9635
9636 2018-05-02  Pedro Alves  <palves@redhat.com>
9637             John Baldwin  <jhb@freebsd.org>
9638
9639         * target.h (enum strata) <debug_stratum>: New.
9640         (struct target_ops) <all delegation methods>: Replace by C++
9641         virtual methods, and drop "to_" prefix.  All references updated
9642         throughout.
9643         <to_shortname, to_longname, to_doc, to_data,
9644         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9645         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9646         virtual methods.  All references updated throughout.
9647         <can_attach, supports_terminal_ours, can_create_inferior,
9648         get_thread_control_capabilities, attach_no_wait>: New
9649         virtual methods.
9650         <insert_breakpoint, remove_breakpoint>: Now
9651         TARGET_DEFAULT_NORETURN methods.
9652         <info_proc>: Now returns bool.
9653         <to_magic>: Delete.
9654         (OPS_MAGIC): Delete.
9655         (current_target): Delete.  All references replaced by references
9656         to ...
9657         (target_stack): ... this.  New.
9658         (target_shortname, target_longname): Adjust.
9659         (target_can_run): Now a function declaration.
9660         (default_child_has_all_memory, default_child_has_memory)
9661         (default_child_has_stack, default_child_has_registers)
9662         (default_child_has_execution): Remove target_ops parameter.
9663         (complete_target_initialization): Delete.
9664         (memory_breakpoint_target): New template class.
9665         (test_target_ops): Refactor as a C++ class with virtual methods.
9666         * make-target-delegates (NAME_PART): Tighten.
9667         (POINTER_PART, CP_SYMBOL): New.
9668         (SIMPLE_RETURN_PART): Reimplement.
9669         (VEC_RETURN_PART): Expect less.
9670         (RETURN_PART, VIRTUAL_PART): New.
9671         (METHOD): Adjust to C++ virtual methods.
9672         (scan_target_h): Remove reference to C99.
9673         (dname): Output "target_ops::" prefix.
9674         (write_function_header): Adjust to output a C++ class method.
9675         (write_declaration): New.
9676         (write_delegator): Adjust to output a C++ class method.
9677         (tdname): Output "dummy_target::" prefix.
9678         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9679         method.
9680         (tdefault_names, debug_names): Delete.
9681         (return_types, tdefaults, styles, argtypes_array): New.
9682         (top level): All methods are delegators.
9683         (print_class): New.
9684         (top level): Print dummy_target and debug_target classes.
9685         * target-delegates.c: Regenerate.
9686         * target-debug.h (target_debug_print_enum_info_proc_what)
9687         (target_debug_print_thread_control_capabilities)
9688         (target_debug_print_thread_info_p): New.
9689         * target.c (dummy_target): Delete.
9690         (the_dummy_target, the_debug_target): New.
9691         (target_stack): Now extern.
9692         (set_targetdebug): Push/unpush debug target.
9693         (default_child_has_all_memory, default_child_has_memory)
9694         (default_child_has_stack, default_child_has_registers)
9695         (default_child_has_execution): Remove target_ops parameter.
9696         (complete_target_initialization): Delete.
9697         (add_target_with_completer): No longer call
9698         complete_target_initialization.
9699         (target_supports_terminal_ours): Use regular delegation.
9700         (update_current_target): Delete.
9701         (push_target): No longer check magic number.  Don't call
9702         update_current_target.
9703         (unpush_target): Don't call update_current_target.
9704         (target_is_pushed): No longer check magic number.
9705         (target_require_runnable): Skip for all stratums over
9706         process_stratum.
9707         (target_ops::info_proc): New.
9708         (target_info_proc): Use find_target_at and
9709         find_default_run_target.
9710         (target_supports_disable_randomization): Use regular delegation.
9711         (target_get_osdata): Use find_target_at.
9712         (target_ops::open, target_ops::close, target_ops::can_attach)
9713         (target_ops::attach, target_ops::can_create_inferior)
9714         (target_ops::create_inferior, target_ops::can_run)
9715         (target_can_run): New.
9716         (default_fileio_target): Use regular delegation.
9717         (target_ops::fileio_open, target_ops::fileio_pwrite)
9718         (target_ops::fileio_pread, target_ops::fileio_fstat)
9719         (target_ops::fileio_close, target_ops::fileio_unlink)
9720         (target_ops::fileio_readlink): New.
9721         (target_fileio_open_1, target_fileio_unlink)
9722         (target_fileio_readlink): Always call the target method.  Handle
9723         FILEIO_ENOSYS.
9724         (return_zero, return_zero_has_execution): Delete.
9725         (init_dummy_target): Delete.
9726         (dummy_target::dummy_target, dummy_target::shortname)
9727         (dummy_target::longname, dummy_target::doc)
9728         (debug_target::debug_target, debug_target::shortname)
9729         (debug_target::longname, debug_target::doc): New.
9730         (target_supports_delete_record): Use regular delegation.
9731         (setup_target_debug): Delete.
9732         (maintenance_print_target_stack): Skip debug_stratum.
9733         (initialize_targets): Instantiate the_dummy_target and
9734         the_debug_target.
9735         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9736         use target_stack.
9737         (target_auxv_search, fprint_target_auxv): Adjust.
9738         (info_auxv_command): Adjust to use target_stack.
9739         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9740         * exceptions.c (print_flush): Handle a NULL target_stack.
9741         * regcache.c (target_ops_no_register): Refactor as class with
9742         virtual methods.
9743
9744         * exec.c (exec_target): New class.
9745         (exec_ops): Now an exec_target.
9746         (exec_open, exec_close_1, exec_get_section_table)
9747         (exec_xfer_partial, exec_files_info, exec_has_memory)
9748         (exec_make_note_section): Refactor as exec_target methods.
9749         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9750         Delete.
9751         (exec_target::find_memory_regions): New.
9752         (_initialize_exec): Don't call init_exec_ops.
9753         * gdbcore.h (exec_file_clear): Delete.
9754
9755         * corefile.c (core_target): Delete.
9756         (core_file_command): Adjust.
9757         * corelow.c (core_target): New class.
9758         (the_core_target): New.
9759         (core_close): Remove target_ops parameter.
9760         (core_close_cleanup): Adjust.
9761         (core_target::close): New.
9762         (core_open, core_detach, get_core_registers, core_files_info)
9763         (core_xfer_partial, core_thread_alive, core_read_description)
9764         (core_pid_to_str, core_thread_name, core_has_memory)
9765         (core_has_stack, core_has_registers, core_info_proc): Rework as
9766         core_target methods.
9767         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9768         (_initialize_corelow): Initialize the_core_target.
9769         * gdbcore.h (core_target): Delete.
9770         (the_core_target): New.
9771
9772         * ctf.c: (ctf_target): New class.
9773         (ctf_ops): Now a ctf_target.
9774         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9775         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9776         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9777         methods.
9778         (init_ctf_ops): Delete.
9779         (_initialize_ctf): Don't call it.
9780         * tracefile-tfile.c (tfile_target): New class.
9781         (tfile_ops): Now a tfile_target.
9782         (tfile_open, tfile_close, tfile_files_info)
9783         (tfile_get_tracepoint_status, tfile_trace_find)
9784         (tfile_fetch_registers, tfile_xfer_partial)
9785         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9786         Refactor as tfile_target methods.
9787         (tfile_xfer_partial_features): Remove target_ops parameter.
9788         (init_tfile_ops): Delete.
9789         (_initialize_tracefile_tfile): Don't call it.
9790         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9791         (tracefile_has_stack, tracefile_has_registers)
9792         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9793         tracefile_target methods.
9794         (init_tracefile_ops): Delete.
9795         (tracefile_target::tracefile_target): New.
9796         * tracefile.h: Include "target.h".
9797         (tracefile_target): New class.
9798         (init_tracefile_ops): Delete.
9799
9800         * spu-multiarch.c (spu_multiarch_target): New class.
9801         (spu_ops): Now a spu_multiarch_target.
9802         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9803         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9804         (spu_search_memory, spu_mourn_inferior): Refactor as
9805         spu_multiarch_target methods.
9806         (init_spu_ops): Delete.
9807         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9808         complete_target_initialization.
9809
9810         * ravenscar-thread.c (ravenscar_thread_target): New class.
9811         (ravenscar_ops): Now a ravenscar_thread_target.
9812         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9813         (ravenscar_thread_alive, ravenscar_pid_to_str)
9814         (ravenscar_fetch_registers, ravenscar_store_registers)
9815         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9816         (ravenscar_stopped_by_hw_breakpoint)
9817         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9818         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9819         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9820         methods.
9821         (init_ravenscar_thread_ops): Delete.
9822         (_initialize_ravenscar): Remove references to
9823         init_ravenscar_thread_ops and complete_target_initialization.
9824
9825         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9826         (bsd_uthread_target): New class.
9827         (bsd_uthread_ops): Now a bsd_uthread_target.
9828         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9829         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9830         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9831         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9832         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9833         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9834         (bsd_uthread_target): Delete function.
9835         (_initialize_bsd_uthread): Remove reference to
9836         complete_target_initialization.
9837
9838         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9839         (target_bfd): ... this new class.
9840         (target_bfd_xfer_partial, target_bfd_get_section_table)
9841         (target_bfd_close): Refactor as target_bfd methods.
9842         (target_bfd::~target_bfd): New.
9843         (target_bfd_reopen): Adjust.
9844         (target_bfd::close): New.
9845
9846         * record-btrace.c (record_btrace_target): New class.
9847         (record_btrace_ops): Now a record_btrace_target.
9848         (record_btrace_open, record_btrace_stop_recording)
9849         (record_btrace_disconnect, record_btrace_close)
9850         (record_btrace_async, record_btrace_info)
9851         (record_btrace_insn_history, record_btrace_insn_history_range)
9852         (record_btrace_insn_history_from, record_btrace_call_history)
9853         (record_btrace_call_history_range)
9854         (record_btrace_call_history_from, record_btrace_record_method)
9855         (record_btrace_is_replaying, record_btrace_will_replay)
9856         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9857         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9858         (record_btrace_store_registers, record_btrace_prepare_to_store)
9859         (record_btrace_to_get_unwinder)
9860         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9861         (record_btrace_commit_resume, record_btrace_wait)
9862         (record_btrace_stop, record_btrace_can_execute_reverse)
9863         (record_btrace_stopped_by_sw_breakpoint)
9864         (record_btrace_supports_stopped_by_sw_breakpoint)
9865         (record_btrace_stopped_by_hw_breakpoint)
9866         (record_btrace_supports_stopped_by_hw_breakpoint)
9867         (record_btrace_update_thread_list, record_btrace_thread_alive)
9868         (record_btrace_goto_begin, record_btrace_goto_end)
9869         (record_btrace_goto, record_btrace_stop_replaying_all)
9870         (record_btrace_execution_direction)
9871         (record_btrace_prepare_to_generate_core)
9872         (record_btrace_done_generating_core): Refactor as
9873         record_btrace_target methods.
9874         (init_record_btrace_ops): Delete.
9875         (_initialize_record_btrace): Remove reference to
9876         init_record_btrace_ops.
9877         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9878         the execution_direction global.
9879         (record_full_base_target, record_full_target)
9880         (record_full_core_target): New classes.
9881         (record_full_ops): Now a record_full_target.
9882         (record_full_core_ops): Now a record_full_core_target.
9883         (record_full_target::detach, record_full_target::disconnect)
9884         (record_full_core_target::disconnect)
9885         (record_full_target::mourn_inferior, record_full_target::kill):
9886         New.
9887         (record_full_open, record_full_close, record_full_async): Refactor
9888         as methods of the record_full_base_target class.
9889         (record_full_resume, record_full_commit_resume): Refactor
9890         as methods of the record_full_target class.
9891         (record_full_wait, record_full_stopped_by_watchpoint)
9892         (record_full_stopped_data_address)
9893         (record_full_stopped_by_sw_breakpoint)
9894         (record_full_supports_stopped_by_sw_breakpoint)
9895         (record_full_stopped_by_hw_breakpoint)
9896         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9897         methods of the record_full_base_target class.
9898         (record_full_store_registers, record_full_xfer_partial)
9899         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9900         Refactor as methods of the record_full_target class.
9901         (record_full_can_execute_reverse, record_full_get_bookmark)
9902         (record_full_goto_bookmark, record_full_execution_direction)
9903         (record_full_record_method, record_full_info, record_full_delete)
9904         (record_full_is_replaying, record_full_will_replay)
9905         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9906         (record_full_stop_replaying): Refactor as methods of the
9907         record_full_base_target class.
9908         (record_full_core_resume, record_full_core_kill)
9909         (record_full_core_fetch_registers)
9910         (record_full_core_prepare_to_store)
9911         (record_full_core_store_registers, record_full_core_xfer_partial)
9912         (record_full_core_insert_breakpoint)
9913         (record_full_core_remove_breakpoint)
9914         (record_full_core_has_execution): Refactor
9915         as methods of the record_full_core_target class.
9916         (record_full_base_target::supports_delete_record): New.
9917         (init_record_full_ops): Delete.
9918         (init_record_full_core_ops): Delete.
9919         (record_full_save): Refactor as method of the
9920         record_full_base_target class.
9921         (_initialize_record_full): Remove references to
9922         init_record_full_ops and init_record_full_core_ops.
9923
9924         * remote.c (remote_target, extended_remote_target): New classes.
9925         (remote_ops): Now a remote_target.
9926         (extended_remote_ops): Now an extended_remote_target.
9927         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9928         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9929         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9930         (remote_pass_signals, remote_set_syscall_catchpoint)
9931         (remote_program_signals, )
9932         (remote_thread_always_alive): Remove target_ops parameter.
9933         (remote_thread_alive, remote_thread_name)
9934         (remote_update_thread_list, remote_threads_extra_info)
9935         (remote_static_tracepoint_marker_at)
9936         (remote_static_tracepoint_markers_by_strid)
9937         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9938         (remote_open): Refactor as methods of remote_target.
9939         (extended_remote_open, extended_remote_detach)
9940         (extended_remote_attach, extended_remote_post_attach):
9941         (extended_remote_supports_disable_randomization)
9942         (extended_remote_create_inferior): : Refactor as method of
9943         extended_remote_target.
9944         (remote_set_permissions, remote_open_1, remote_detach)
9945         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9946         (remote_resume, remote_commit_resume, remote_stop)
9947         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9948         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9949         (remote_prepare_to_store, remote_store_registers)
9950         (remote_flash_erase, remote_flash_done, remote_files_info)
9951         (remote_kill, remote_mourn, remote_insert_breakpoint)
9952         (remote_remove_breakpoint, remote_insert_watchpoint)
9953         (remote_watchpoint_addr_within_range)
9954         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9955         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9956         (remote_supports_stopped_by_sw_breakpoint)
9957         (remote_stopped_by_hw_breakpoint)
9958         (remote_supports_stopped_by_hw_breakpoint)
9959         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9960         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9961         (remote_verify_memory): Refactor as methods of remote_target.
9962         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9963         parameter.
9964         (remote_xfer_partial, remote_get_memory_xfer_limit)
9965         (remote_search_memory, remote_rcmd, remote_memory_map)
9966         (remote_pid_to_str, remote_get_thread_local_address)
9967         (remote_get_tib_address, remote_read_description): Refactor as
9968         methods of remote_target.
9969         (remote_target::fileio_open, remote_target::fileio_pwrite)
9970         (remote_target::fileio_pread, remote_target::fileio_close): New.
9971         (remote_hostio_readlink, remote_hostio_fstat)
9972         (remote_filesystem_is_local, remote_can_execute_reverse)
9973         (remote_supports_non_stop, remote_supports_disable_randomization)
9974         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9975         (remote_supports_enable_disable_tracepoint)
9976         (remote_supports_string_tracing)
9977         (remote_can_run_breakpoint_commands, remote_trace_init)
9978         (remote_download_tracepoint, remote_can_download_tracepoint)
9979         (remote_download_trace_state_variable, remote_enable_tracepoint)
9980         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9981         (remote_trace_start, remote_get_trace_status)
9982         (remote_get_tracepoint_status, remote_trace_stop)
9983         (remote_trace_find, remote_get_trace_state_variable_value)
9984         (remote_save_trace_data, remote_get_raw_trace_data)
9985         (remote_set_disconnected_tracing, remote_core_of_thread)
9986         (remote_set_circular_trace_buffer, remote_traceframe_info)
9987         (remote_get_min_fast_tracepoint_insn_len)
9988         (remote_set_trace_buffer_size, remote_set_trace_notes)
9989         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9990         (remote_disable_btrace, remote_teardown_btrace)
9991         (remote_read_btrace, remote_btrace_conf)
9992         (remote_augmented_libraries_svr4_read, remote_load)
9993         (remote_pid_to_exec_file, remote_can_do_single_step)
9994         (remote_execution_direction, remote_thread_handle_to_thread_info):
9995         Refactor as methods of remote_target.
9996         (init_remote_ops, init_extended_remote_ops): Delete.
9997         (remote_can_async_p, remote_is_async_p, remote_async)
9998         (remote_thread_events, remote_upload_tracepoints)
9999         (remote_upload_trace_state_variables): Refactor as methods of
10000         remote_target.
10001         (_initialize_remote): Remove references to init_remote_ops and
10002         init_extended_remote_ops.
10003
10004         * remote-sim.c (gdbsim_target): New class.
10005         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
10006         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
10007         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
10008         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
10009         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
10010         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
10011         Refactor as methods of gdbsim_target.
10012         (gdbsim_ops): Now a gdbsim_target.
10013         (init_gdbsim_ops): Delete.
10014         (gdbsim_cntrl_c): Adjust.
10015         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
10016
10017         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
10018         (the_amd64_linux_nat_target): New.
10019         (amd64_linux_fetch_inferior_registers)
10020         (amd64_linux_store_inferior_registers): Refactor as methods of
10021         amd64_linux_nat_target.
10022         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
10023         * i386-linux-nat.c: Don't include "linux-nat.h".
10024         (i386_linux_nat_target): New class.
10025         (the_i386_linux_nat_target): New.
10026         (i386_linux_fetch_inferior_registers)
10027         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
10028         as methods of i386_linux_nat_target.
10029         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
10030         * inf-child.c (inf_child_ops): Delete.
10031         (inf_child_fetch_inferior_registers)
10032         (inf_child_store_inferior_registers): Delete.
10033         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
10034         methods of inf_child_target.
10035         (inf_child_target::supports_terminal_ours)
10036         (inf_child_target::terminal_init)
10037         (inf_child_target::terminal_inferior)
10038         (inf_child_target::terminal_ours_for_output)
10039         (inf_child_target::terminal_ours, inf_child_target::interrupt)
10040         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
10041         New.
10042         (inf_child_open, inf_child_disconnect, inf_child_close)
10043         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
10044         (inf_child_post_startup_inferior, inf_child_can_run)
10045         (inf_child_pid_to_exec_file): Refactor as methods of
10046         inf_child_target.
10047         (inf_child_follow_fork): Delete.
10048         (inf_child_target::can_create_inferior)
10049         (inf_child_target::can_attach): New.
10050         (inf_child_target::has_all_memory, inf_child_target::has_memory)
10051         (inf_child_target::has_stack, inf_child_target::has_registers)
10052         (inf_child_target::has_execution): New.
10053         (inf_child_fileio_open, inf_child_fileio_pwrite)
10054         (inf_child_fileio_pread, inf_child_fileio_fstat)
10055         (inf_child_fileio_close, inf_child_fileio_unlink)
10056         (inf_child_fileio_readlink, inf_child_use_agent)
10057         (inf_child_can_use_agent): Refactor as methods of
10058         inf_child_target.
10059         (return_zero, inf_child_target): Delete.
10060         (inf_child_target::inf_child_target): New.
10061         * inf-child.h: Include "target.h".
10062         (inf_child_target): Delete function prototype.
10063         (inf_child_target): New class.
10064         (inf_child_open_target, inf_child_mourn_inferior)
10065         (inf_child_maybe_unpush_target): Delete.
10066         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
10067         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
10068         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
10069         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
10070         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
10071         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
10072         (inf_ptrace_wait, inf_ptrace_xfer_partial)
10073         (inf_ptrace_thread_alive, inf_ptrace_files_info)
10074         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
10075         methods of inf_ptrace_target.
10076         (inf_ptrace_target): Delete function.
10077         * inf-ptrace.h: Include "inf-child.h".
10078         (inf_ptrace_target): Delete function declaration.
10079         (inf_ptrace_target): New class.
10080         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
10081         * linux-nat.c (linux_target): New.
10082         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
10083         (linux_nat_target::~linux_nat_target): New.
10084         (linux_child_post_attach, linux_child_post_startup_inferior)
10085         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
10086         (linux_child_remove_fork_catchpoint)
10087         (linux_child_insert_vfork_catchpoint)
10088         (linux_child_remove_vfork_catchpoint)
10089         (linux_child_insert_exec_catchpoint)
10090         (linux_child_remove_exec_catchpoint)
10091         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
10092         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
10093         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
10094         (linux_nat_stopped_data_address)
10095         (linux_nat_stopped_by_sw_breakpoint)
10096         (linux_nat_supports_stopped_by_sw_breakpoint)
10097         (linux_nat_stopped_by_hw_breakpoint)
10098         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
10099         (linux_nat_kill, linux_nat_mourn_inferior)
10100         (linux_nat_xfer_partial, linux_nat_thread_alive)
10101         (linux_nat_update_thread_list, linux_nat_pid_to_str)
10102         (linux_nat_thread_name, linux_child_pid_to_exec_file)
10103         (linux_child_static_tracepoint_markers_by_strid)
10104         (linux_nat_is_async_p, linux_nat_can_async_p)
10105         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
10106         (linux_nat_supports_multi_process)
10107         (linux_nat_supports_disable_randomization, linux_nat_async)
10108         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
10109         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
10110         (linux_nat_fileio_open, linux_nat_fileio_readlink)
10111         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
10112         methods of linux_nat_target.
10113         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
10114         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
10115         parameter.
10116         (check_stopped_by_watchpoint): Adjust.
10117         (linux_xfer_partial): Delete.
10118         (linux_target_install_ops, linux_target, linux_nat_add_target):
10119         Delete.
10120         (linux_nat_target::linux_nat_target): New.
10121         * linux-nat.h: Include "inf-ptrace.h".
10122         (linux_nat_target): New.
10123         (linux_target, linux_target_install_ops, linux_nat_add_target):
10124         Delete function declarations.
10125         (linux_target): Declare global.
10126         * linux-thread-db.c (thread_db_target): New.
10127         (thread_db_target::thread_db_target): New.
10128         (thread_db_ops): Delete.
10129         (the_thread_db_target): New.
10130         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
10131         (thread_db_update_thread_list, thread_db_pid_to_str)
10132         (thread_db_extra_thread_info)
10133         (thread_db_thread_handle_to_thread_info)
10134         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
10135         (thread_db_resume): Refactor as methods of thread_db_target.
10136         (init_thread_db_ops): Delete.
10137         (_initialize_thread_db): Remove reference to init_thread_db_ops.
10138         * x86-linux-nat.c: Don't include "linux-nat.h".
10139         (super_post_startup_inferior): Delete.
10140         (x86_linux_nat_target::~x86_linux_nat_target): New.
10141         (x86_linux_child_post_startup_inferior)
10142         (x86_linux_read_description, x86_linux_enable_btrace)
10143         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
10144         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
10145         methods of x86_linux_nat_target.
10146         (x86_linux_create_target): Delete.  Bits folded ...
10147         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
10148         pointer.
10149         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
10150         (x86_linux_nat_target): New class.
10151         (x86_linux_create_target): Delete.
10152         (x86_linux_add_target): Now takes a linux_nat_target pointer.
10153         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
10154         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
10155         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
10156         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
10157         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
10158         make extern.
10159         (x86_use_watchpoints): Delete.
10160         * x86-nat.h: Include "breakpoint.h" and "target.h".
10161         (x86_use_watchpoints): Delete.
10162         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
10163         (x86_stopped_by_watchpoint, x86_stopped_data_address)
10164         (x86_insert_watchpoint, x86_remove_watchpoint)
10165         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
10166         (x86_stopped_by_hw_breakpoint): New declarations.
10167         (x86_nat_target): New template class.
10168
10169         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
10170         (the_ppc_linux_nat_target): New.
10171         (ppc_linux_fetch_inferior_registers)
10172         (ppc_linux_can_use_hw_breakpoint)
10173         (ppc_linux_region_ok_for_hw_watchpoint)
10174         (ppc_linux_ranged_break_num_registers)
10175         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
10176         (ppc_linux_insert_mask_watchpoint)
10177         (ppc_linux_remove_mask_watchpoint)
10178         (ppc_linux_can_accel_watchpoint_condition)
10179         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
10180         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
10181         (ppc_linux_watchpoint_addr_within_range)
10182         (ppc_linux_masked_watch_num_registers)
10183         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
10184         (ppc_linux_read_description): Refactor as methods of
10185         ppc_linux_nat_target.
10186         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
10187
10188         * procfs.c (procfs_xfer_partial): Delete forward declaration.
10189         (procfs_target): New class.
10190         (the_procfs_target): New.
10191         (procfs_target): Delete function.
10192         (procfs_auxv_parse, procfs_attach, procfs_detach)
10193         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
10194         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
10195         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
10196         (procfs_create_inferior, procfs_update_thread_list)
10197         (procfs_thread_alive, procfs_pid_to_str)
10198         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
10199         (procfs_stopped_data_address, procfs_insert_watchpoint)
10200         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10201         (proc_find_memory_regions, procfs_info_proc)
10202         (procfs_make_note_section): Refactor as methods of procfs_target.
10203         (_initialize_procfs): Adjust.
10204         * sol-thread.c (sol_thread_target): New class.
10205         (sol_thread_ops): Now a sol_thread_target.
10206         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10207         (sol_thread_fetch_registers, sol_thread_store_registers)
10208         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10209         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10210         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10211         (init_sol_thread_ops): Delete.
10212         (_initialize_sol_thread): Adjust.  Remove references to
10213         init_sol_thread_ops and complete_target_initialization.
10214
10215         * windows-nat.c (windows_nat_target): New class.
10216         (windows_fetch_inferior_registers)
10217         (windows_store_inferior_registers, windows_resume, windows_wait)
10218         (windows_attach, windows_detach, windows_pid_to_exec_file)
10219         (windows_files_info, windows_create_inferior)
10220         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10221         (windows_close, windows_pid_to_str, windows_xfer_partial)
10222         (windows_get_tib_address, windows_get_ada_task_ptid)
10223         (windows_thread_name, windows_thread_alive): Refactor as
10224         windows_nat_target methods.
10225         (do_initial_windows_stuff): Adjust.
10226         (windows_target): Delete function.
10227         (_initialize_windows_nat): Adjust.
10228
10229         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10230         (darwin_mourn_inferior, darwin_kill_inferior)
10231         (darwin_create_inferior, darwin_attach, darwin_detach)
10232         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10233         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10234         (darwin_supports_multi_process): Refactor as darwin_nat_target
10235         methods.
10236         (darwin_resume_to, darwin_files_info): Delete.
10237         (_initialize_darwin_inferior): Rename to ...
10238         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10239         * darwin-nat.h: Include "inf-child.h".
10240         (darwin_nat_target): New class.
10241         (darwin_complete_target): Delete.
10242         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10243         (darwin_target): New.
10244         (i386_darwin_fetch_inferior_registers)
10245         (i386_darwin_store_inferior_registers): Refactor as methods of
10246         darwin_nat_target.
10247         (darwin_complete_target): Delete, with ...
10248         (_initialize_i386_darwin_nat): ... bits factored out here.
10249
10250         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10251         (the_alpha_linux_nat_target): New.
10252         (alpha_linux_register_u_offset): Refactor as
10253         alpha_linux_nat_target method.
10254         (_initialize_alpha_linux_nat): Adjust.
10255         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10256         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10257         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10258         methods of linux_nat_trad_target.
10259         (linux_trad_target): Delete.
10260         * linux-nat-trad.h (linux_trad_target): Delete function.
10261         (linux_nat_trad_target): New class.
10262         * mips-linux-nat.c (mips_linux_nat_target): New class.
10263         (super_fetch_registers, super_store_registers, super_close):
10264         Delete.
10265         (the_mips_linux_nat_target): New.
10266         (mips64_linux_regsets_fetch_registers)
10267         (mips64_linux_regsets_store_registers)
10268         (mips64_linux_fetch_registers, mips64_linux_store_registers)
10269         (mips_linux_register_u_offset, mips_linux_read_description)
10270         (mips_linux_can_use_hw_breakpoint)
10271         (mips_linux_stopped_by_watchpoint)
10272         (mips_linux_stopped_data_address)
10273         (mips_linux_region_ok_for_hw_watchpoint)
10274         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10275         (mips_linux_close): Refactor as methods of mips_linux_nat.
10276         (_initialize_mips_linux_nat): Adjust to C++ification.
10277
10278         * aix-thread.c (aix_thread_target): New class.
10279         (aix_thread_ops): Now an aix_thread_target.
10280         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10281         (aix_thread_fetch_registers, aix_thread_store_registers)
10282         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10283         (aix_thread_thread_alive, aix_thread_pid_to_str)
10284         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10285         Refactor as methods of aix_thread_target.
10286         (init_aix_thread_ops): Delete.
10287         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10288         and complete_target_initialization.
10289         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10290         (rs6000_nat_target): New class.
10291         (the_rs6000_nat_target): New.
10292         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10293         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10294         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10295         (super_create_inferior): Delete.
10296         (_initialize_rs6000_nat): Adjust to C++ification.
10297
10298         * arm-linux-nat.c (arm_linux_nat_target): New class.
10299         (the_arm_linux_nat_target): New.
10300         (arm_linux_fetch_inferior_registers)
10301         (arm_linux_store_inferior_registers, arm_linux_read_description)
10302         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10303         (arm_linux_remove_hw_breakpoint)
10304         (arm_linux_region_ok_for_hw_watchpoint)
10305         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10306         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10307         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10308         arm_linux_nat_target.
10309         (_initialize_arm_linux_nat): Adjust to C++ification.
10310
10311         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10312         (the_aarch64_linux_nat_target): New.
10313         (aarch64_linux_fetch_inferior_registers)
10314         (aarch64_linux_store_inferior_registers)
10315         (aarch64_linux_child_post_startup_inferior)
10316         (aarch64_linux_read_description)
10317         (aarch64_linux_can_use_hw_breakpoint)
10318         (aarch64_linux_insert_hw_breakpoint)
10319         (aarch64_linux_remove_hw_breakpoint)
10320         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10321         (aarch64_linux_region_ok_for_hw_watchpoint)
10322         (aarch64_linux_stopped_data_address)
10323         (aarch64_linux_stopped_by_watchpoint)
10324         (aarch64_linux_watchpoint_addr_within_range)
10325         (aarch64_linux_can_do_single_step): Refactor as methods of
10326         aarch64_linux_nat_target.
10327         (super_post_startup_inferior): Delete.
10328         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10329
10330         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10331         (the_hppa_linux_nat_target): New.
10332         (hppa_linux_fetch_inferior_registers)
10333         (hppa_linux_store_inferior_registers): Refactor as methods of
10334         hppa_linux_nat_target.
10335         (_initialize_hppa_linux_nat): Adjust to C++ification.
10336
10337         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10338         (the_ia64_linux_nat_target): New.
10339         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10340         (ia64_linux_stopped_data_address)
10341         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10342         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10343         ia64_linux_nat_target methods.
10344         (super_xfer_partial): Delete.
10345         (_initialize_ia64_linux_nat): Adjust to C++ification.
10346
10347         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10348         (the_m32r_linux_nat_target): New.
10349         (m32r_linux_fetch_inferior_registers)
10350         (m32r_linux_store_inferior_registers): Refactor as
10351         m32r_linux_nat_target methods.
10352         (_initialize_m32r_linux_nat): Adjust to C++ification.
10353
10354         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10355         (the_m68k_linux_nat_target): New.
10356         (m68k_linux_fetch_inferior_registers)
10357         (m68k_linux_store_inferior_registers): Refactor as
10358         m68k_linux_nat_target methods.
10359         (_initialize_m68k_linux_nat): Adjust to C++ification.
10360
10361         * s390-linux-nat.c (s390_linux_nat_target): New class.
10362         (the_s390_linux_nat_target): New.
10363         (s390_linux_fetch_inferior_registers)
10364         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10365         (s390_insert_watchpoint, s390_remove_watchpoint)
10366         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10367         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10368         (s390_auxv_parse, s390_read_description): Refactor as methods of
10369         s390_linux_nat_target.
10370         (_initialize_s390_nat): Adjust to C++ification.
10371
10372         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10373         (the_sparc_linux_nat_target): New.
10374         (_initialize_sparc_linux_nat): Adjust to C++ification.
10375         * sparc-nat.c (sparc_fetch_inferior_registers)
10376         (sparc_store_inferior_registers): Remove target_ops parameter.
10377         * sparc-nat.h (sparc_fetch_inferior_registers)
10378         (sparc_store_inferior_registers): Remove target_ops parameter.
10379         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10380         (the_sparc64_linux_nat_target): New.
10381         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10382
10383         * spu-linux-nat.c (spu_linux_nat_target): New class.
10384         (the_spu_linux_nat_target): New.
10385         (spu_child_post_startup_inferior, spu_child_post_attach)
10386         (spu_child_wait, spu_fetch_inferior_registers)
10387         (spu_store_inferior_registers, spu_xfer_partial)
10388         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10389         methods.
10390         (_initialize_spu_nat): Adjust to C++ification.
10391
10392         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10393         (the_tilegx_linux_nat_target): New.
10394         (fetch_inferior_registers, store_inferior_registers):
10395         Refactor as methods.
10396         (_initialize_tile_linux_nat): Adjust to C++ification.
10397
10398         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10399         (the_xtensa_linux_nat_target): New.
10400         (xtensa_linux_fetch_inferior_registers)
10401         (xtensa_linux_store_inferior_registers): Refactor as
10402         xtensa_linux_nat_target methods.
10403         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10404
10405         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10406         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10407         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10408         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10409         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10410         (fbsd_stopped_by_sw_breakpoint)
10411         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10412         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10413         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10414         (fbsd_post_startup_inferior, fbsd_post_attach)
10415         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10416         (fbsd_set_syscall_catchpoint)
10417         (super_xfer_partial, super_resume, super_wait)
10418         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10419         (fbsd_handle_debug_trap): Remove target_ops parameter.
10420         (fbsd_nat_add_target): Delete.
10421         * fbsd-nat.h: Include "inf-ptrace.h".
10422         (fbsd_nat_add_target): Delete.
10423         (USE_SIGTRAP_SIGINFO): Define.
10424         (fbsd_nat_target): New class.
10425
10426         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10427         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10428         (amd64bsd_target): Delete.
10429         * amd64-bsd-nat.h: New file.
10430         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10431         "x86-bsd-nat.h".
10432         (amd64_fbsd_nat_target): New class.
10433         (the_amd64_fbsd_nat_target): New.
10434         (amd64fbsd_read_description): Refactor as method of
10435         amd64_fbsd_nat_target.
10436         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10437         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10438         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10439         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10440         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10441         (i386bsd_target): Delete.
10442         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10443         (i386bsd_fetch_inferior_registers)
10444         (i386bsd_store_inferior_registers): Declare.
10445         (i386_bsd_nat_target): New class.
10446         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10447         (the_i386_fbsd_nat_target): New.
10448         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10449         i386_fbsd_nat_target methods.
10450         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10451         (_initialize_i386fbsd_nat): Adjust to C++ification.
10452         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10453         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10454         (_initialize_x86_bsd_nat): Adjust to C++ification.
10455         * x86-bsd-nat.h: Include "x86-nat.h".
10456         (x86bsd_target): Delete declaration.
10457         (x86bsd_nat_target): New class.
10458
10459         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10460         (the_aarch64_fbsd_nat_target): New.
10461         (aarch64_fbsd_fetch_inferior_registers)
10462         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10463         aarch64_fbsd_nat_target.
10464         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10465         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10466         (the_alpha_bsd_nat_target): New.
10467         (alphabsd_fetch_inferior_registers)
10468         (alphabsd_store_inferior_registers): Refactor as
10469         alpha_bsd_nat_target methods.
10470         (_initialize_alphabsd_nat): Refactor as methods of
10471         alpha_bsd_nat_target.
10472         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10473         (the_amd64_nbsd_nat_target): New.
10474         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10475         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10476         (the_amd64_obsd_nat_target): New.
10477         (_initialize_amd64obsd_nat): Adjust to C++ification.
10478         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10479         (the_arm_fbsd_nat_target): New.
10480         (arm_fbsd_fetch_inferior_registers)
10481         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10482         (_initialize_arm_fbsd_nat): Refactor as methods of
10483         arm_fbsd_nat_target.
10484         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10485         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10486         (the_arm_netbsd_nat_target): New.
10487         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10488         arm_netbsd_nat_target.
10489         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10490         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10491         (the_hppa_nbsd_nat_target): New.
10492         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10493         hppa_nbsd_nat_target methods.
10494         (_initialize_hppanbsd_nat): Adjust to C++ification.
10495         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10496         (the_hppa_obsd_nat_target): New.
10497         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10498         methods of hppa_obsd_nat_target.
10499         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10500         add_target.
10501         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10502         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10503         add_target.
10504         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10505         (_initialize_i386obsd_nat): Use add_target.
10506         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10507         (the_m68k_bsd_nat_target): New.
10508         (m68kbsd_fetch_inferior_registers)
10509         (m68kbsd_store_inferior_registers): Refactor as methods of
10510         m68k_bsd_nat_target.
10511         (_initialize_m68kbsd_nat): Adjust to C++ification.
10512         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10513         (the_mips_fbsd_nat_target): New.
10514         (mips_fbsd_fetch_inferior_registers)
10515         (mips_fbsd_store_inferior_registers): Refactor as methods of
10516         mips_fbsd_nat_target.
10517         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10518         add_target.
10519         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10520         (the_mips_nbsd_nat_target): New.
10521         (mipsnbsd_fetch_inferior_registers)
10522         (mipsnbsd_store_inferior_registers): Refactor as methods of
10523         mips_nbsd_nat_target.
10524         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10525         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10526         (the_mips64_obsd_nat_target): New.
10527         (mips64obsd_fetch_inferior_registers)
10528         (mips64obsd_store_inferior_registers): Refactor as methods of
10529         mips64_obsd_nat_target.
10530         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10531         add_target.
10532         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10533         nbsd_nat_target.
10534         * nbsd-nat.h: Include "inf-ptrace.h".
10535         (nbsd_nat_target): New class.
10536         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10537         (obsd_wait): Refactor as methods of obsd_nat_target.
10538         (obsd_add_target): Delete.
10539         * obsd-nat.h: Include "inf-ptrace.h".
10540         (obsd_nat_target): New class.
10541         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10542         (the_ppc_fbsd_nat_target): New.
10543         (ppcfbsd_fetch_inferior_registers)
10544         (ppcfbsd_store_inferior_registers): Refactor as methods of
10545         ppc_fbsd_nat_target.
10546         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10547         add_target.
10548         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10549         (the_ppc_nbsd_nat_target): New.
10550         (ppcnbsd_fetch_inferior_registers)
10551         (ppcnbsd_store_inferior_registers): Refactor as methods of
10552         ppc_nbsd_nat_target.
10553         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10554         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10555         (the_ppc_obsd_nat_target): New.
10556         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10557         methods of ppc_obsd_nat_target.
10558         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10559         add_target.
10560         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10561         (the_sh_nbsd_nat_target): New.
10562         (shnbsd_fetch_inferior_registers)
10563         (shnbsd_store_inferior_registers): Refactor as methods of
10564         sh_nbsd_nat_target.
10565         (_initialize_shnbsd_nat): Adjust to C++ification.
10566         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10567         (inf_ptrace_xfer_partial): Delete.
10568         (sparc_xfer_partial, sparc_target): Delete.
10569         * sparc-nat.h (sparc_fetch_inferior_registers)
10570         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10571         (sparc_target): Delete function declaration.
10572         (sparc_target): New template class.
10573         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10574         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10575         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10576         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10577         add_target.
10578         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10579         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10580         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10581         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10582         add_target.
10583         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10584         (the_vax_bsd_nat_target): New.
10585         (vaxbsd_fetch_inferior_registers)
10586         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10587         methods.
10588         (_initialize_vaxbsd_nat): Adjust to C++ification.
10589
10590         * bsd-kvm.c (bsd_kvm_target): New class.
10591         (bsd_kvm_ops): Now a bsd_kvm_target.
10592         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10593         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10594         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10595         bsd_kvm_target.
10596         (bsd_kvm_return_one): Delete.
10597         (bsd_kvm_add_target): Adjust to C++ification.
10598
10599         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10600         (nto_procfs_target_procfs): New classes.
10601         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10602         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10603         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10604         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10605         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10606         (procfs_remove_hw_breakpoint, procfs_resume)
10607         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10608         (procfs_kill_inferior, procfs_store_registers)
10609         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10610         as methods of nto_procfs_target.
10611         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10612         (nto_native_ops): Delete.
10613         (procfs_open, procfs_native_open): Delete.
10614         (nto_native_ops): Now an nto_procfs_target_native.
10615         (init_procfs_targets): Adjust to C++ification.
10616         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10617         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10618         Refactor as methods of nto_procfs_target.
10619
10620         * go32-nat.c (go32_nat_target): New class.
10621         (the_go32_nat_target): New.
10622         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10623         (go32_store_registers, go32_xfer_partial, go32_files_info)
10624         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10625         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10626         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10627         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10628         (go32_target): Delete.
10629         (_initialize_go32_nat): Adjust to C++ification.
10630
10631         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10632         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10633         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10634         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10635         gnu_nat_target.
10636         (gnu_target): Delete.
10637         * gnu-nat.h (gnu_target): Delete.
10638         (gnu_nat_target): New class.
10639         * i386-gnu-nat.c (gnu_base_target): New.
10640         (i386_gnu_nat_target): New class.
10641         (the_i386_gnu_nat_target): New.
10642         (_initialize_i386gnu_nat): Adjust to C++ification.
10643
10644 2018-05-02  Pedro Alves  <palves@redhat.com>
10645
10646         * bfd-target.c (target_bfd_xclose): Rename to ...
10647         (target_bfd_close): ... this.
10648         (target_bfd_reopen): Adjust.
10649         * target.c (target_close): Remove references to to_xclose.
10650         * target.h (target_ops::to_xclose): Delete.
10651         (target_ops::to_close): Update comments.
10652
10653 2018-05-02  Pedro Alves  <palves@redhat.com>
10654
10655         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10656         "linux-nat.h".
10657         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10658         * inf-ptrace.c (inf_ptrace_register_u_offset)
10659         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10660         (inf_ptrace_store_register, inf_ptrace_store_registers)
10661         (inf_ptrace_trad_target): Move to ...
10662         * linux-nat-trad.c: ... this new file.
10663         * linux-nat-trad.h: New file.
10664         * linux-nat.c (linux_target_install_ops): Make extern.
10665         (linux_trad_target): Delete.
10666         * linux-nat.h (linux_trad_target): Delete declaration.
10667         (linux_target_install_ops): Declare.
10668         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10669         "linux-nat.h".
10670
10671 2018-05-02  Pedro Alves  <palves@redhat.com>
10672
10673         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10674         procfs_target/add_target here.
10675         * procfs.c (procfs_target): Make static.
10676         (_initialize_procfs): Call add_target here.
10677         * procfs.h (struct target_ops): Remove forward declaration.
10678         (procfs_target): Remove declaration.
10679         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10680
10681 2018-05-02  Pedro Alves  <palves@redhat.com>
10682
10683         * procfs.c (procfs_stopped_by_watchpoint)
10684         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10685         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10686         Forward declare.
10687         (procfs_use_watchpoints): Delete, move contents...
10688         (procfs_target): ... here.
10689         * procfs.h (procfs_use_watchpoints): Delete declaration.
10690         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10691         procfs_use_watchpoints.
10692         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10693         procfs_use_watchpoints.
10694
10695 2018-05-02  Tom Tromey  <tom@tromey.com>
10696
10697         PR python/20084:
10698         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10699         and var_zuinteger_unlimited.
10700         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10701         and PARAM_ZUINTEGER_UNLIMITED.
10702         (set_parameter_value): Handle var_zuinteger and
10703         var_zuinteger_unlimited.
10704         (add_setshow_generic): Likewise.
10705         (parmpy_init): Likewise.
10706
10707 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10708
10709         PR rust/23124
10710         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10711         pointer is not null before dereferencing it.
10712
10713 2018-04-30  Tom Tromey  <tom@tromey.com>
10714
10715         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10716         is_mi_like_p.
10717
10718 2018-04-30  Tom Tromey  <tom@tromey.com>
10719
10720         * breakpoint.c (mention): Remove use of is_mi_like_p.
10721         (print_mention_ranged_breakpoint): Likewise.
10722         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10723         of is_mi_like_p.
10724
10725 2018-04-30  Tom Tromey  <tom@tromey.com>
10726
10727         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10728
10729 2018-04-30  Tom Tromey  <tom@tromey.com>
10730
10731         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10732         (info_spu_event_command): Remove some uses of is_mi_like_p.
10733
10734 2018-04-30  Tom Tromey  <tom@tromey.com>
10735
10736         * python/py-framefilter.c (py_print_single_arg)
10737         (enumerate_locals, py_print_args, py_print_frame): Remove some
10738         uses of is_mi_like_p.
10739
10740 2018-04-30  Tom Tromey  <tom@tromey.com>
10741
10742         * ui-out.c: Update.
10743         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10744         * ui-out.h (ui_out::is_mi_like_p): Now const.
10745         (ui_out::do_is_mi_like_p): Now const.
10746         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10747
10748 2018-04-30  Tom Tromey  <tom@tromey.com>
10749
10750         * varobj.c (varobj_set_visualizer): Use new_reference.
10751         * python/python.c (gdbpy_decode_line): Use new_reference.
10752         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10753         new_reference.
10754
10755 2018-04-30  Tom Tromey  <tom@tromey.com>
10756
10757         * varobj.c (install_new_value): Use new_reference.
10758         * value.h (value_incref): Return void.  Swap intro comment with
10759         value_decref.
10760         * value.c (set_value_parent): Use new_reference.
10761         (value_incref): Return void.  Update intro comment.
10762         (release_value): Use new_reference.
10763         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10764
10765 2018-04-30  Tom Tromey  <tom@tromey.com>
10766
10767         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10768         * gdb_bfd.h (new_bfd_ref): Remove.
10769         (gdb_bfd_open): Update comment.
10770         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10771         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10772         (gdb_bfd_fdopenr): Use new_reference.
10773         * exec.c (exec_file_attach): Use new_reference.
10774
10775 2018-04-30  Tom Tromey  <tom@tromey.com>
10776
10777         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10778         method.
10779
10780 2018-04-30  Tom Tromey  <tom@tromey.com>
10781
10782         * jit.c (jit_read_code_entry): Use type_align.
10783         * i386-tdep.c (i386_gdbarch_init): Don't call
10784         set_gdbarch_long_long_align_bit.
10785         * gdbarch.sh: Remove long_long_align_bit.
10786         * gdbarch.c, gdbarch.h: Rebuild.
10787         * arc-tdep.c (arc_type_align): New function.
10788         (arc_gdbarch_init): Use arc_type_align.  Don't call
10789         set_gdbarch_long_long_align_bit.
10790
10791 2018-04-30  Tom Tromey  <tom@tromey.com>
10792
10793         * rust-lang.c (rust_type_alignment): Remove.
10794         (rust_composite_type): Use type_align.
10795
10796 2018-04-30  Tom Tromey  <tom@tromey.com>
10797
10798         * NEWS: Mention Type.align.
10799         * python/py-type.c (typy_get_alignof): New function.
10800         (type_object_getset): Add "alignof".
10801
10802 2018-04-30  Tom Tromey  <tom@tromey.com>
10803
10804         PR exp/17095:
10805         * NEWS: Update.
10806         * std-operator.def (UNOP_ALIGNOF): New operator.
10807         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10808         New.
10809         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10810         * c-lang.c (c_op_print_tab): Add alignof.
10811         * c-exp.y (ALIGNOF): New token.
10812         (exp): Add "ALIGNOF" production.
10813         (ident_tokens): Add _Alignof and alignof.
10814
10815 2018-04-30  Tom Tromey  <tom@tromey.com>
10816
10817         * i386-tdep.c (i386_type_align): New function.
10818         (i386_gdbarch_init): Update.
10819         * gdbarch.sh (type_align): New method.
10820         * gdbarch.c, gdbarch.h: Rebuild.
10821         * arch-utils.h (default_type_align): Declare.
10822         * arch-utils.c (default_type_align): New function.
10823         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10824         (struct type) <align_log2>: New field.
10825         <instance_flags>: Now a bitfield.
10826         (TYPE_RAW_ALIGN): New macro.
10827         (type_align, type_raw_align, set_type_align): Declare.
10828         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10829         functions.
10830         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10831         (get_alignment, maybe_set_alignment): New functions.
10832         (read_structure_type, read_enumeration_type, read_array_type)
10833         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10834         (read_subrange_type, read_base_type): Set type alignment.
10835
10836 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10837
10838         * dwarf2read.c (read_index_from_section): Use bool.
10839
10840 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10841
10842         PR gdb/22950
10843         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10844         with #ifdef.
10845
10846 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10847
10848         PR build/22873
10849         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10850         last step, and do it atomically.
10851
10852 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10853
10854         * compile/compile-c-types.c (convert_int, convert_float):
10855         Update for C FE v1.
10856
10857 2018-04-27  Tom Tromey  <tom@tromey.com>
10858
10859         PR rust/22545:
10860         * rust-lang.c (rust_inclusive_range_type_p): New function.
10861         (rust_range): Handle inclusive ranges.
10862         (rust_compute_range): Likewise.
10863         * rust-exp.y (struct rust_op) <inclusive>: New field.
10864         (DOTDOTEQ): New constant.
10865         (range_expr): Add "..=" productions.
10866         (operator_tokens): Add "..=" token.
10867         (ast_range): Add "inclusive" parameter.
10868         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10869         ranges.
10870         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10871         bounds values.
10872         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10873         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10874         Update comments.
10875         * expprint.c (print_subexp_standard): Handle new bounds values.
10876         (dump_subexp_body_standard): Likewise.
10877
10878 2018-04-27  Tom Tromey  <tom@tromey.com>
10879
10880         * configure: Rebuild.
10881         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10882         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10883         "OVERRIDE".
10884         (class symbol_needs_eval_context): Likewise.
10885         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10886         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10887         "virtual".
10888         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10889         "override".
10890         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10891         * aarch64-tdep.c (instruction_reader::read): Use "override".
10892         (instruction_reader_test::read): Likewise.
10893         * arm-tdep.c (instruction_reader::read): Use "override".
10894         (instruction_reader_thumb::read): Likewise.
10895
10896 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10897
10898         PR remote/9665
10899         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10900         instead of remote_send.
10901         (remote_send): Remove.
10902
10903 2018-04-26  Pedro Alves  <palves@redhat.com>
10904
10905         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10906         find_function_start_sal instead of find_pc_line.
10907
10908 2018-04-26  Pedro Alves  <palves@redhat.com>
10909
10910         * breakpoint.c (set_breakpoint_location_function): Handle
10911         mst_data_gnu_ifunc.
10912         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10913         * elfread.c (elf_symtab_read): Give data symbols with
10914         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10915         (elf_rel_plt_read): Update comment.
10916         * linespec.c (convert_linespec_to_sals): Handle
10917         mst_data_gnu_ifunc.
10918         (minsym_found): Handle mst_data_gnu_ifunc.
10919         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10920         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10921         * parse.c (find_minsym_type_and_address): Handle
10922         mst_data_gnu_ifunc.
10923         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10924         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10925         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10926         comment.
10927         <mst_data_gnu_ifunc>: New enumerator.
10928
10929 2018-04-26  Pedro Alves  <palves@redhat.com>
10930
10931         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10932         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10933         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10934         Handle it.
10935         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10936         (lookup_minimal_symbol_by_pc): Adjust.
10937         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10938         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10939         * minsyms.h (lookup_msym_prefer): New enum.
10940         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10941         parameter by a lookup_msym_prefer parameter.
10942
10943 2018-04-26  Pedro Alves  <palves@redhat.com>
10944
10945         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10946         ends in "@plt" instead of looking at the symbol's section.
10947
10948 2018-04-26  Pedro Alves  <palves@redhat.com>
10949
10950         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10951         all references.
10952         (find_pc_partial_function_gnu_ifunc): Rename to ...
10953         (find_pc_partial_function): ... this, and remove references to
10954         'is_gnu_ifunc_p'.
10955         (find_pc_partial_function): Delete old implementation.
10956         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10957
10958 2018-04-26  Pedro Alves  <palves@redhat.com>
10959
10960         * linespec.c (struct bound_minimal_symbol_search_key): New.
10961         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10962         skip first line if we found a GNU ifunc minimal symbol by name.
10963         (compare_msymbols): Change parameters to work with a destructured
10964         lhs minsym.
10965         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10966         functions.
10967
10968 2018-04-26  Pedro Alves  <palves@redhat.com>
10969
10970         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10971         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10972         address/name.
10973         (add_location_to_breakpoint): Store the minsym and the objfile in
10974         the breakpoint location.
10975         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10976         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10977         Record the minsym in the sal.
10978         * symtab.h (symtab_and_line) <msymbol>: New field.
10979
10980 2018-04-26  Pedro Alves  <palves@redhat.com>
10981
10982         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10983         unless we actually resolved the ifunc.
10984
10985 2018-04-26  Pedro Alves  <palves@redhat.com>
10986
10987         * c-exp.y (variable production): Prefer ifunc minsyms over
10988         regular function symbols.
10989         * symtab.c (find_gnu_ifunc): New function.
10990         * minsyms.h (lookup_msym_prefer): New enum.
10991         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10992         parameter by a lookup_msym_prefer parameter.
10993         * symtab.h (find_gnu_ifunc): New declaration.
10994
10995 2018-04-26  Pedro Alves  <palves@redhat.com>
10996
10997         * blockframe.c (find_gnu_ifunc_target_type): New function.
10998         (find_function_type): New.
10999         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
11000         return a value with a memory address.
11001         (eval_call): For calls to GNU ifunc functions, try to find the
11002         type of the target function from the type that the resolver
11003         returns.
11004         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
11005         symbols.
11006         * infcall.c (find_function_return_type): Delete.
11007         (find_function_addr): Add 'function_type' parameter.  For calls to
11008         GNU ifunc functions, try to find the type of the target function
11009         from the type that the resolver returns, and return it via
11010         FUNCTION_TYPE.
11011         (call_function_by_hand_dummy): Adjust to use the function type
11012         returned by find_function_addr.
11013         (find_function_addr): Add 'function_type' parameter and move
11014         description here.
11015         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
11016         declarations.
11017
11018 2018-04-26  Pedro Alves  <palves@redhat.com>
11019
11020         * c-exp.y (variable production): Skip finding an alias for ifunc
11021         symbols.
11022
11023 2018-04-26  Pedro Alves  <palves@redhat.com>
11024
11025         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
11026
11027 2018-04-25  Pedro Alves  <palves@redhat.com>
11028
11029         * infcmd.c (kill_command): Print the pid as string, not the whole
11030         thread's ptid.  Add comment.  s/has been killed/killed/ in output
11031         message.
11032         * remote.c (remote_detach_1): Print the pid as string, not the
11033         whole thread's ptid.
11034
11035 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11036             Sergio Durigan Junior  <sergiodj@redhat.com>
11037             Pedro Alves  <palves@redhat.com>
11038
11039         * infcmd.c (kill_command): Print message when inferior has
11040         been killed.
11041         * inferior.c (print_inferior_events): Remove 'static'.  Set as
11042         '1'.
11043         (add_inferior): Improve message printed when
11044         'print_inferior_events' is on.
11045         (exit_inferior): Remove message printed when
11046         'print_inferior_events' is on.
11047         (detach_inferior): Improve message printed when
11048         'print_inferior_events' is on.
11049         (initialize_inferiors): Use 'add_inferior_silent' to set
11050         'current_inferior_'.
11051         * inferior.h (print_inferior_events): Declare here as
11052         'extern'.
11053         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
11054         '[Detaching...]' messages when 'print_inferior_events' is on.
11055         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
11056         as prefix/suffix for messages.  Remove periods.  Fix erroneous
11057         'Detaching after fork from child...', replace it by '... from
11058         parent...'.
11059         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
11060         prefix/suffix when printing 'Detaching...' messages.  Print
11061         them when 'print_inferior_events' is on.
11062         * remote.c (remote_detach_1): Print message when detaching
11063         from inferior and '!is_fork_parent'.
11064
11065 2018-04-24  Tom Tromey  <tom@tromey.com>
11066
11067         * cli-out.h: Reindent.
11068
11069 2018-04-24  Tom Tromey  <tom@tromey.com>
11070
11071         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
11072         (cli_ui_out::do_field_string): Use fputs_filtered.
11073         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
11074
11075 2018-04-23  Tom Tromey  <tom@tromey.com>
11076
11077         * guile/scm-frame.c (gdbscm_frame_read_var): Use
11078         gdb::unique_xmalloc_ptr.
11079
11080 2018-04-23  Tom Tromey  <tom@tromey.com>
11081
11082         * configure: Rebuild.
11083
11084 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
11085
11086         PR gdb/23095
11087         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
11088         prepare_for_testing.  Set normal_bp to r_debug_state if target
11089         is bsd.
11090
11091 2018-04-21  Pedro Alves  <palves@redhat.com>
11092             Rajendra SY  <rajendra.sy@gmail.com>
11093
11094         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
11095         * remote.c (extended_remote_attach): In all-stop mode, mark the
11096         thread as executing.
11097
11098 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
11099
11100         * thread.c (thread_apply_all_command): Fix comment.
11101         (thread_command): Fix comment.
11102
11103 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
11104
11105         * common/tdesc.h (tdesc_create_feature): Remove xml filename
11106         parameter.
11107         * features/aarch64-core.c (create_feature_aarch64_core):
11108         Regenerate.
11109         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
11110         Likewise.
11111         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
11112         Likewise.
11113         * features/i386/32bit-avx512.c
11114         (create_feature_i386_32bit_avx512): Likewise.
11115         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
11116         Likewise.
11117         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
11118         Likewise.
11119         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
11120         Likewise.
11121         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
11122         Likewise.
11123         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
11124         Likewise.
11125         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
11126         Likewise.
11127         * features/i386/64bit-avx512.c
11128         (create_feature_i386_64bit_avx512): Likewise.
11129         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
11130         Likewise.
11131         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
11132         Likewise.
11133         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
11134         Likewise.
11135         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
11136         Likewise.
11137         * features/i386/64bit-segments.c
11138         (create_feature_i386_64bit_segments): Likewise.
11139         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
11140         Likewise.
11141         * features/i386/x32-core.c
11142         (create_feature_i386_x32_core): Likewise.
11143         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
11144         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
11145         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
11146         * target-descriptions.c: In generated code, don't pass xml
11147         filename.
11148
11149 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11150
11151         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
11152         (print_xml_feature::visit_post): Likewise.
11153         (print_xml_feature::visit): Likewise.
11154         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
11155         (print_xml_feature): Add new class.
11156         * regformats/regdat.sh: Null xmltarget on feature targets.
11157         * target-descriptions.c (struct target_desc): Add xmltarget.
11158         (maintenance_check_tdesc_xml_convert): Add unittest function.
11159         (tdesc_get_features_xml): Add function to get xml.
11160         (maintenance_check_xml_descriptions): Test xml generation.
11161         * xml-tdesc.c (string_read_description_xml): Add function.
11162         * xml-tdesc.h (string_read_description_xml): Add declaration.
11163
11164 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11165
11166         * features/Makefile: Add feature marker to targets with new style
11167         target descriptions.
11168         * regformats/aarch64.dat: Regenerate.
11169         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
11170         * regformats/i386/amd64-avx-linux.dat: Likewise.
11171         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
11172         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
11173         * regformats/i386/amd64-linux.dat: Likewise.
11174         * regformats/i386/amd64-mpx-linux.dat: Likewise.
11175         * regformats/i386/amd64.dat: Likewise.
11176         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
11177         * regformats/i386/i386-avx-linux.dat: Likewise.
11178         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
11179         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
11180         * regformats/i386/i386-linux.dat: Likewise.
11181         * regformats/i386/i386-mmx-linux.dat: Likewise.
11182         * regformats/i386/i386-mpx-linux.dat: Likewise.
11183         * regformats/i386/i386.dat: Likewise.
11184         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
11185         * regformats/i386/x32-avx-linux.dat: Likewise.
11186         * regformats/i386/x32-linux.dat: Likewise.
11187         * regformats/tic6x-c62x-linux.dat: Likewise.
11188         * regformats/tic6x-c64x-linux.dat: Likewise.
11189         * regformats/tic6x-c64xp-linux.dat: Likewise.
11190         * regformats/regdat.sh: Parse feature marker.
11191
11192 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11193
11194         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
11195         (tdesc_osabi_name): Likewise.
11196         * target-descriptions.c (tdesc_architecture_name): Add new
11197         function.
11198         (tdesc_osabi_name): Likewise.
11199
11200 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11201
11202         * common/tdesc.c (tdesc_predefined_type): Move to here.
11203         (tdesc_named_type): Likewise.
11204         (tdesc_create_vector): Likewise.
11205         (tdesc_create_struct): Likewise.
11206         (tdesc_set_struct_size): Likewise.
11207         (tdesc_create_union): Likewise.
11208         (tdesc_create_flags): Likewise.
11209         (tdesc_create_enum): Likewise.
11210         (tdesc_add_field): Likewise.
11211         (tdesc_add_typed_bitfield): Likewise.
11212         (tdesc_add_bitfield): Likewise.
11213         (tdesc_add_flag): Likewise.
11214         (tdesc_add_enum_value): Likewise.
11215         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11216         (struct tdesc_type_vector): Likewise.
11217         (struct tdesc_type_field): Likewise.
11218         (struct tdesc_type_with_fields): Likewise.
11219         (tdesc_create_enum): Add declaration.
11220         (tdesc_add_typed_bitfield): Likewise.
11221         (tdesc_add_enum_value): Likewise.
11222         * target-descriptions.c (tdesc_type_field): Move from here.
11223         (tdesc_type_builtin): Likewise.
11224         (tdesc_type_vector): Likewise.
11225         (tdesc_type_with_fields): Likewise.
11226         (tdesc_predefined_types): Likewise.
11227         (tdesc_named_type): Likewise.
11228         (tdesc_create_vector): Likewise.
11229         (tdesc_create_struct): Likewise.
11230         (tdesc_set_struct_size): Likewise.
11231         (tdesc_create_union): Likewise.
11232         (tdesc_create_flags): Likewise.
11233         (tdesc_create_enum): Likewise.
11234         (tdesc_add_field): Likewise.
11235         (tdesc_add_typed_bitfield): Likewise.
11236         (tdesc_add_bitfield): Likewise.
11237         (tdesc_add_flag): Likewise.
11238         (tdesc_add_enum_value): Likewise.
11239         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11240         (tdesc_add_typed_bitfield): Likewise.
11241         (tdesc_add_enum_value): Likewise.
11242
11243 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11244
11245         * common/tdesc.c (tdesc_feature::accept): Move to here.
11246         (tdesc_feature::operator==): Likewise.
11247         (tdesc_create_reg): Likewise.
11248         * common/tdesc.h (tdesc_type_kind): Likewise.
11249         (struct tdesc_type): Likewise.
11250         (struct tdesc_feature): Likewise.
11251         * regformats/regdat.sh: Create a feature.
11252         * target-descriptions.c (tdesc_type_kind): Move from here.
11253         (tdesc_type): Likewise.
11254         (tdesc_type_up): Likewise.
11255         (tdesc_feature): Likewise.
11256         (tdesc_create_reg): Likewise.
11257
11258 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11259
11260         * Makefile.in: Add arch/tdesc.c
11261         * common/tdesc.c: New file.
11262         * common/tdesc.h (tdesc_element_visitor): Move to here.
11263         (tdesc_element): Likewise.
11264         (tdesc_reg): Likewise.
11265         (tdesc_reg_up): Likewise.
11266         * regformats/regdef.h (reg): Add offset to constructors.
11267         * target-descriptions.c (tdesc_element_visitor): Move from here.
11268         (tdesc_element): Likewise.
11269         (tdesc_reg): Likewise.
11270         (tdesc_reg_up): Likewise.
11271
11272 2018-04-17  Tom Tromey  <tom@tromey.com>
11273
11274         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11275         discriminant field.
11276
11277 2018-04-17  Tom Tromey  <tom@tromey.com>
11278
11279         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11280
11281 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11282
11283         * symtab.c (print_symbol_info): Skip printing filename and line
11284         number when `last' is NULL.
11285         (symtab_symbol_info): Use empty string instead of NULL for first
11286         invocation of print_symbol_info.
11287         (rbreak_command): Pass NULL to `last' parameter of
11288         print_symbol_info.
11289
11290 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11291
11292         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11293         instead of nullptr.
11294
11295 2018-04-16  Pedro Alves  <palves@redhat.com>
11296
11297         * MAINTAINERS (sh): Remove.
11298         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11299         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11300         (ALLDEPFILES): Remove sh64-tdep.c.
11301         * NEWS: Mentions that support for SH-5/SH64 is removed.
11302         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11303         (sh*-*-openbsd*): Ditto.
11304         (sh64-*-elf*): Remove.
11305         (sh*): Remove.
11306         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11307         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11308         * sh-tdep.c: No longer include "sh64-tdep.h".
11309         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11310         * sh64-tdep.c, sh64-tdep.h: Remove files.
11311
11312 2018-04-16  Pedro Alves  <palves@redhat.com>
11313
11314         * MAINTAINERS: Remove m88k.
11315         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11316         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11317         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11318         * NEWS: Mention that support for m88k was removed.
11319         * configure.host (m88*-*-*): Remove support.
11320         * configure.nat (m88k-*-*): Remove support.
11321         * configure.tgt (m88*-*-openbsd*): Remove.
11322         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11323
11324 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11325
11326         * configure.tgt (x86_tobjs): New variable.
11327         (amd64_tobjs, i386_tobjs): Use it.
11328
11329 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11330
11331         * symtab.c (print_symbol_info): Precede the symbol definition by
11332         the line number when available.
11333         * NEWS: Advertise this enhancement.
11334
11335 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11336
11337         * NEWS (New options): announce set/show record btrace cpu.
11338         * btrace.c: Include record-btrace.h.
11339         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11340         the vendor is unknown.
11341         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11342         Maybe overwrite the btrace configuration's cpu.
11343         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11344         (btrace_fetch): Add cpu parameter.  Update callers.
11345         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11346         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11347         errata workarounds if the vendor is unknown.
11348         * python/py-record-btrace.c: Include record-btrace.h.
11349         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11350         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11351         * record-btrace.c (record_btrace_cpu_state_kind): New.
11352         (record_btrace_cpu): New.
11353         (set_record_btrace_cpu_cmdlist): New.
11354         (record_btrace_get_cpu): New.
11355         (require_btrace_thread, record_btrace_info)
11356         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11357         (cmd_set_record_btrace_cpu_none): New.
11358         (cmd_set_record_btrace_cpu_auto): New.
11359         (cmd_set_record_btrace_cpu): New.
11360         (cmd_show_record_btrace_cpu): New.
11361         (_initialize_record_btrace): Initialize set/show record btrace cpu
11362         commands.
11363         * record-btrace.h (record_btrace_get_cpu): New.
11364
11365 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11366
11367         * record.c (set_record_command): Fix typo in message.
11368
11369 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11370
11371         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11372
11373 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11374
11375         * infrun.c (process_event_stop_test): Call
11376         gdbarch_in_indirect_branch_thunk.
11377         * gdbarch.sh (in_indirect_branch_thunk): New.
11378         * gdbarch.c: Regenerated.
11379         * gdbarch.h: Regenerated.
11380         * x86-tdep.h: New.
11381         * x86-tdep.c: New.
11382         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11383         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11384         (ALLDEPFILES): Add x86-tdep.c.
11385         * arch-utils.h (default_in_indirect_branch_thunk): New.
11386         * arch-utils.c (default_in_indirect_branch_thunk): New.
11387         * i386-tdep: Include x86-tdep.h.
11388         (i386_in_indirect_branch_thunk): New.
11389         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11390         function.
11391         * amd64-tdep: Include x86-tdep.h.
11392         (amd64_in_indirect_branch_thunk): New.
11393         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11394
11395 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11396
11397         PR gdb/23053
11398         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11399         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11400         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11401         regression.
11402
11403 2018-04-12  Tom Tromey  <tom@tromey.com>
11404
11405         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11406         (rust_evaluate_subexp): Likewise.
11407
11408 2018-04-12  Pedro Alves  <palves@redhat.com>
11409
11410         * procfs.c (procfs_detach): Make forward declaration's prototype
11411         match definition's protototype.
11412         (proc_get_LDT_entry): Remove stale do_cleanups call.
11413
11414 2018-04-12  Pedro Alves  <palves@redhat.com>
11415
11416         * target.h (target_ops::to_has_exited): Delete.
11417         (target_has_exited): Delete.
11418         * target-delegates.c: Regenerate.
11419
11420 2018-04-11  Pedro Alves  <palves@redhat.com>
11421
11422         * target.c (fileio_fh_t::t): Add comment.
11423         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11424         (target_fileio_close): Handle a NULL target.
11425         (invalidate_fileio_fh): New.
11426         (target_close): Call it.
11427         * remote.c (remote_hostio_send_command): No longer check whether
11428         remote_desc is open.
11429
11430 2018-04-11  Pedro Alves  <palves@redhat.com>
11431
11432         * target.c (fileio_fh_t): Make it a named struct instead of a
11433         typedef.
11434         (fileio_fh_t::is_closed): New method.
11435         (DEF_VEC_O (fileio_fh_t)): Remove.
11436         (fileio_fhandles): Now a std::vector.
11437         (is_closed_fileio_fh): Delete.
11438         (acquire_fileio_fd): Adjust.  Rename parameters.
11439         (release_fileio_fd): Adjust.
11440         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11441         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11442         (target_fileio_close): Adjust.
11443
11444 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11445
11446         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11447         index.
11448
11449 2018-04-10  Pedro Alves  <palves@redhat.com>
11450
11451         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11452         (scoped_finish_thread_state): New class.
11453         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11454         cleanup.
11455         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11456         (fetch_inferior_event, normal_stop): Likewise.
11457         * thread.c (finish_thread_state_cleanup): Delete.
11458
11459 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11460             Pedro Alves  <palves@redhat.com>
11461
11462         * value.c: Include "selftest.h" and "common/array-view.h".
11463         (struct range) <operator ==>: New.
11464         (test_ranges_contain): New.
11465         (check_ranges_vector): New.
11466         (test_insert_into_bit_range_vector): New.
11467         (_initialize_values): Register selftests.
11468         * common/array-view.h (operator==, operator!=): New.
11469
11470 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11471
11472         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11473         an iterator.
11474         * inline-frame.c: Include <algorithm>.
11475         (struct inline_state): Add constructor.
11476         (inline_state_s): Remove.
11477         (DEF_VEC_O(inline_state_s)): Remove.
11478         (inline_states): Change type to std::vector.
11479         (find_inline_frame_state): Adjust to std::vector.
11480         (allocate_inline_frame_state): Remove.
11481         (clear_inline_frame_state): Adjust to std::vector.
11482         (skip_inline_frames): Adjust to std::vector.
11483
11484 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11485
11486         * tracepoint.h (struct trace_state_variable): Add constructor.
11487         <name>: Change type to std::string.
11488         * tracepoint.c (tsv_s): Remove.
11489         (DEF_VEC_O(tsv_s)): Remove.
11490         (tvariables): Change to std::vector.
11491         (create_trace_state_variable): Adjust to std::vector.
11492         (find_trace_state_variable): Likewise.
11493         (find_trace_state_variable_by_number): Likewise.
11494         (delete_trace_state_variable): Likewise.
11495         (trace_variable_command): Adjust to std::string.
11496         (delete_trace_variable_command): Likewise.
11497         (tvariables_info_1): Adjust to std::vector.
11498         (save_trace_state_variables): Likewise.
11499         (start_tracing): Likewise.
11500         (merge_uploaded_trace_state_variables): Adjust to std::vector
11501         and std::string.
11502         * target.h (struct target_ops)
11503         <to_download_trace_state_variable>: Pass reference to
11504         trace_state_variable.
11505         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11506         * target-delegates.c: Re-generate.
11507         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11508         (mi_tsv_deleted): Likewise.
11509         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11510         * remote.c (remote_download_trace_state_variable): Change
11511         pointer to reference and adjust.
11512         * make-target-delegates (parse_argtypes): Handle references.
11513         (write_function_header): Likewise.
11514         (munge_type): Likewise.
11515
11516 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11517
11518         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11519         string_view-selftests.c.
11520         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11521         testsuite.
11522         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11523         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11524         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11525         * unittests/basic_string_view/element_access/char/1.cc:
11526         Likewise.
11527         * unittests/basic_string_view/element_access/char/empty.cc:
11528         Likewise.
11529         * unittests/basic_string_view/element_access/char/front_back.cc:
11530         Likewise.
11531         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11532         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11533         Likewise.
11534         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11535         Likewise.
11536         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11537         Likewise.
11538         * unittests/basic_string_view/operations/compare/char/1.cc:
11539         Likewise.
11540         * unittests/basic_string_view/operations/compare/char/13650.cc:
11541         Likewise.
11542         * unittests/basic_string_view/operations/copy/char/1.cc:
11543         Likewise.
11544         * unittests/basic_string_view/operations/data/char/1.cc:
11545         Likewise.
11546         * unittests/basic_string_view/operations/find/char/1.cc:
11547         Likewise.
11548         * unittests/basic_string_view/operations/find/char/2.cc:
11549         Likewise.
11550         * unittests/basic_string_view/operations/find/char/3.cc:
11551         Likewise.
11552         * unittests/basic_string_view/operations/find/char/4.cc:
11553         Likewise.
11554         * unittests/basic_string_view/operations/rfind/char/1.cc:
11555         Likewise.
11556         * unittests/basic_string_view/operations/rfind/char/2.cc:
11557         Likewise.
11558         * unittests/basic_string_view/operations/rfind/char/3.cc:
11559         Likewise.
11560         * unittests/basic_string_view/operations/substr/char/1.cc:
11561         Likewise.
11562         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11563         * unittests/string_view-selftests.c: New file.
11564
11565 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11566
11567         * unittests/basic_string_view/capacity/1.cc: New file.
11568         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11569         * unittests/basic_string_view/cons/char/1.cc: New file.
11570         * unittests/basic_string_view/cons/char/2.cc: New file.
11571         * unittests/basic_string_view/cons/char/3.cc: New file.
11572         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11573         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11574         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11575         * unittests/basic_string_view/element_access/char/1.cc: New file.
11576         * unittests/basic_string_view/element_access/char/2.cc: New file.
11577         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11578         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11579         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11580         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11581         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11582         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11583         * unittests/basic_string_view/include.cc: New file.
11584         * unittests/basic_string_view/inserters/char/1.cc: New file.
11585         * unittests/basic_string_view/inserters/char/2.cc: New file.
11586         * unittests/basic_string_view/inserters/char/3.cc: New file.
11587         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11588         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11589         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11590         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11591         * unittests/basic_string_view/literals/types.cc: New file.
11592         * unittests/basic_string_view/literals/values.cc: New file.
11593         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11594         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11595         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11596         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11597         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11598         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11599         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11600         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11601         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11602         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11603         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11604         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11605         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11606         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11607         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11608         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11609         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11610         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11611         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11612         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11613         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11614         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11615         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11616         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11617         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11618         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11619         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11620         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11621         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11622         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11623         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11624         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11625         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11626         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11627         * unittests/basic_string_view/operators/char/2.cc: New file.
11628         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11629         * unittests/basic_string_view/range_access/char/1.cc: New file.
11630         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11631         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11632         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11633         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11634         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11635         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11636         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11637         * unittests/basic_string_view/typedefs.cc: New file.
11638         * unittests/basic_string_view/types/1.cc: New file.
11639
11640 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11641
11642         * common/gdb_string_view.h: Remove libstdc++ implementation
11643         details, adjust to gdb reality.
11644         * common/gdb_string_view.tcc: Likewise.
11645         * cli/cli-script.c (struct string_view): Remove.
11646         (user_args) <m_args>: Change element type to gdb::string_view.
11647         (user_args::insert_args): Adjust.
11648
11649 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11650
11651         * common/gdb_string_view.h: New file.
11652         * common/gdb_string_view.tcc: New file.
11653
11654 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11655
11656         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11657         * configure: Re-generate.
11658
11659 2018-04-09  Pedro Alves  <palves@redhat.com>
11660
11661         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11662         (set_target_gdbarch): Call
11663         gdb::observers::architecture_changed.notify instead of
11664         observer_notify_architecture_changed.
11665
11666 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11667
11668         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11669         (do_restore_current_traceframe_cleanup): Remove.
11670         (restore_current_traceframe_cleanup_dtor): Remove.
11671         (make_cleanup_restore_current_traceframe): Remove.
11672         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11673         New.
11674         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11675         * infrun.c (fetch_inferior_event): Use
11676         scoped_restore_current_traceframe.
11677
11678 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11679
11680         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11681         Remove.
11682         <n_allocated_type_units>: Remove.
11683         <all_type_units>: Change to std::vector.
11684         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11685         to std::vector change.
11686         (dwarf2_per_objfile::get_cutu): Likewise.
11687         (dwarf2_per_objfile::get_tu): Likewise.
11688         (create_signatured_type_table_from_index): Likewise.
11689         (create_signatured_type_table_from_debug_names): Likewise.
11690         (dw2_symtab_iter_next): Likewise.
11691         (dw2_print_stats): Likewise.
11692         (dw2_expand_all_symtabs): Likewise.
11693         (dw2_expand_marked_cus): Likewise.
11694         (dw2_debug_names_iterator::next): Likewise.
11695         (dwarf2_initialize_objfile): Likewise.
11696         (add_signatured_type_cu_to_table): Likewise.
11697         (create_all_type_units): Likewise.
11698         (add_type_unit): Likewise.
11699         (struct tu_abbrev_offset): Add constructor.
11700         (build_type_psymtabs_1): Adjust to std::vector change.
11701         (print_tu_stats): Likewise.
11702         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11703         (write_debug_names): Likewise.
11704
11705 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11706
11707         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11708         Make an std::vector.
11709         <n_comp_units>: Remove.
11710         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11711         to std::vector change.
11712         (dwarf2_per_objfile::get_cutu): Likewise.
11713         (dwarf2_per_objfile::get_cu): Likewise.
11714         (create_cus_from_index): Likewise.
11715         (create_addrmap_from_index): Likewise.
11716         (create_addrmap_from_aranges): Likewise.
11717         (dwarf2_read_index): Likewise.
11718         (dw2_find_last_source_symtab): Likewise.
11719         (dw2_map_symtabs_matching_filename): Likewise.
11720         (dw2_symtab_iter_next): Likewise.
11721         (dw2_print_stats): Likewise.
11722         (dw2_expand_all_symtabs): Likewise.
11723         (dw2_expand_symtabs_with_fullname): Likewise.
11724         (dw2_expand_marked_cus): Likewise.
11725         (dw2_map_symbol_filenames): Likewise.
11726         (create_cus_from_debug_names): Likewise.
11727         (dwarf2_read_debug_names): Likewise.
11728         (dw2_debug_names_iterator::next): Likewise.
11729         (dwarf2_initialize_objfile): Likewise.
11730         (set_partial_user): Likewise.
11731         (dwarf2_build_psymtabs_hard): Likewise.
11732         (read_comp_units_from_section): Remove arguments, adjust to
11733         std::vector change.
11734         (create_all_comp_units): Adjust to std::vector and
11735         read_comp_units_from_section changes.
11736         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11737         change.
11738         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11739         (psyms_seen_size): Likewise.
11740         (write_gdbindex): Likewise.
11741         (write_debug_names): Likewise.
11742
11743 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11744
11745         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11746         with dwarf2_per_objfile.
11747         (create_cus_from_index): Likewise.
11748         (create_signatured_type_table_from_index): Likewise.
11749         (dwarf2_read_index): Likewise.
11750         (dwarf2_initialize_objfile): Likewise.
11751         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11752         per_cu rather than get_dwarf2_per_objfile.
11753
11754 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11755
11756         * dwarf2read.h (struct signatured_type): Forward declare.
11757         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11758         New methods.
11759         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11760         (dw2_get_cutu): ...this.
11761         (dwarf2_per_objfile::get_cu): Rename from...
11762         (dw2_get_cu): ...this.
11763         (dwarf2_per_objfile::get_tu): New.
11764         (create_addrmap_from_index): Adjust.
11765         (create_addrmap_from_aranges): Adjust.
11766         (dw2_find_last_source_symtab): Adjust.
11767         (dw2_map_symtabs_matching_filename): Adjust.
11768         (dw2_symtab_iter_next): Adjust.
11769         (dw2_print_stats): Adjust.
11770         (dw2_expand_all_symtabs): Adjust.
11771         (dw2_expand_symtabs_with_fullname): Adjust.
11772         (dw2_expand_marked_cus): Adjust.
11773         (dw_expand_symtabs_matching_file_matcher): Adjust.
11774         (dw2_map_symbol_filenames): Adjust.
11775         (dw2_debug_names_iterator::next): Adjust.
11776         (dwarf2_initialize_objfile): Adjust.
11777         (set_partial_user): Adjust.
11778         (dwarf2_build_psymtabs_hard): Adjust.
11779
11780 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11781
11782         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11783         Remove unused variables.
11784         (dw2_map_symtabs_matching_filename): Likewise.
11785         (dwarf2_record_block_ranges): Likewise.
11786         (dwarf2_read_addr_index): Likewise.
11787         (follow_die_offset): Likewise.
11788
11789 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11790
11791         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11792         to symbol_file_add_main.
11793
11794 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11795
11796         PR mi/22299
11797         * mi/mi-console.c (do_fputc_async_safe): New.
11798         (mi_console_file::write_async_safe): New.
11799         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11800         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11801         New.
11802         * ui-file.c (ui_file::putstrn): Adjust call to
11803         fputstrn_unfiltered.
11804         * utils.c (printchar): Replace do_fputs and do_fprintf
11805         parameters by do_fputc.
11806         (fputstr_filtered): Adjust call to printchar.
11807         (fputstr_unfiltered): Likewise.
11808         (fputstrn_filtered): Likewise.
11809         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11810         printchar.
11811         * utils.h (do_fputc_ftype): New typedef.
11812         (fputstrn_unfiltered): Add do_fputc parameter.
11813
11814 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11815
11816         * regformats/i386/i386-avx.dat: Remove.
11817
11818 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11819
11820         PR gdb/22979
11821         * amd64-tdep.c (amd64_none_init_abi): New function.
11822         (amd64_x32_none_init_abi): New function.
11823         (_initialize_amd64_tdep): Register handlers for x86-64 and
11824         x64_32 with GDB_OSABI_NONE.
11825         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11826         GDB_OSABI_NONE osabi.
11827
11828 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11829
11830         PR gdb/22980
11831         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11832         GDB_OSABI_NONE.
11833         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11834         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11835
11836 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11837
11838         * common/byte-vector.h (char_vector): New type.
11839         * target.h (target_read_alloc): Return
11840         gdb::optional<byte_vector>.
11841         (target_read_stralloc): Return gdb::optional<char_vector>.
11842         (target_get_osdata): Return gdb::optional<char_vector>.
11843         * target.c (target_read_alloc_1): Templatize.  Replacement
11844         manual memory management with vector.
11845         (target_read_alloc): Change return type, adjust.
11846         (target_read_stralloc): Change return type, adjust.
11847         (target_get_osdata): Change return type, adjust.
11848         * auxv.c (struct auxv_info) <length>: Remove.
11849         <data>: Change type to gdb::optional<byte_vector>.
11850         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11851         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11852         (target_auxv_search): Adjust.
11853         (fprint_target_auxv): Adjust.
11854         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11855         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11856         (linux_make_corefile_notes): Adjust.
11857         * osdata.c (get_osdata): Adjust.
11858         * remote.c (remote_get_threads_with_qxfer): Adjust.
11859         (remote_memory_map): Adjust.
11860         (remote_traceframe_info): Adjust.
11861         (btrace_read_config): Adjust.
11862         (remote_read_btrace): Adjust.
11863         (remote_pid_to_exec_file): Adjust.
11864         * solib-aix.c (solib_aix_get_library_list): Adjust.
11865         * solib-dsbt.c (decode_loadmap): Don't free buf.
11866         (dsbt_get_initial_loadmaps): Adjust.
11867         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11868         * solib-target.c (solib_target_current_sos): Adjust.
11869         * tracepoint.c (sdata_make_value): Adjust.
11870         * xml-support.c (xinclude_start_include): Adjust.
11871         (xml_fetch_content_from_file): Adjust.
11872         * xml-support.h (xml_fetch_another): Change return type.
11873         (xml_fetch_content_from_file): Change return type.
11874         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11875         * xml-tdesc.c (file_read_description_xml): Adjust.
11876         (fetch_available_features_from_target): Change return type.
11877         (target_fetch_description_xml): Adjust.
11878         (target_read_description_xml): Adjust.
11879
11880 2018-04-06  Tom Tromey  <tom@tromey.com>
11881
11882         * value.c (~value): Update.
11883         (struct value) <contents>: Now unique_xmalloc_ptr.
11884         (value_contents_bits_eq, allocate_value_contents)
11885         (value_contents_raw, value_contents_all_raw)
11886         (value_contents_for_printing, value_contents_for_printing_const)
11887         (set_value_enclosing_type): Update.
11888
11889 2018-04-06  Tom Tromey  <tom@tromey.com>
11890
11891         * value.c (range_s): Remove typedef, VEC.
11892         (struct range): Add operator<.
11893         (range_lessthan): Remove.
11894         (ranges_contain): Change type.
11895         (~value): Update.
11896         (struct value) <unavailable, optimized_out>: Now std::vector.
11897         (value_entirely_available)
11898         (value_entirely_covered_by_range_vector)
11899         (value_entirely_unavailable, value_entirely_optimized_out):
11900         Update.
11901         (insert_into_bit_range_vector): Change argument type.
11902         (find_first_range_overlap): Likewise.
11903         (struct ranges_and_idx, value_contents_bits_eq)
11904         (require_not_optimized_out, require_available): Update.
11905         (ranges_copy_adjusted): Change argument types.
11906         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11907
11908 2018-04-06  Tom Tromey  <tom@tromey.com>
11909
11910         * value.c (~value): Update.
11911         (struct value) <parent>: Now a value_ref_ptr.
11912         (value_parent, set_value_parent, value_address, value_copy):
11913         Update.
11914
11915 2018-04-06  Tom Tromey  <tom@tromey.com>
11916
11917         * value.c (struct value): Add constructor, destructor, and member
11918         initializers.
11919         (allocate_value_lazy, value_decref): Update.
11920
11921 2018-04-06  Tom Tromey  <tom@tromey.com>
11922
11923         * value.c (struct value) <released, next>: Remove.
11924         (all_values): Now a std::vector.
11925         (allocate_value_lazy): Update.
11926         (value_next): Remove.
11927         (value_mark, value_free_to_mark, release_value)
11928         (value_release_to_mark): Update.
11929
11930 2018-04-06  Tom Tromey  <tom@tromey.com>
11931
11932         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11933         (free_value_chain): Remove.
11934         * value.c (free_value_chain): Remove.
11935         (value_release_to_mark): Return a std::vector.
11936         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11937         std::vector.
11938         (check_condition): Update.
11939         * eval.c (fetch_subexp_value): Change "val_chain" to a
11940         std::vector.
11941         * breakpoint.c (update_watchpoint): Update.
11942         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11943
11944 2018-04-06  Tom Tromey  <tom@tromey.com>
11945
11946         * value.h (free_all_values): Remove.
11947         * value.c (free_all_values): Remove.
11948
11949 2018-04-06  Tom Tromey  <tom@tromey.com>
11950
11951         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11952         (value_history_chain, value_history_count): Remove.
11953         (value_history): New global.
11954         (record_latest_value, access_value_history, show_values)
11955         (preserve_values): Update.
11956
11957 2018-04-06  Tom Tromey  <tom@tromey.com>
11958
11959         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11960         * varobj.c (varobj_set_display_format, varobj_set_value)
11961         (install_default_visualizer, construct_visualizer)
11962         (install_new_value, ~varobj, varobj_get_value_type)
11963         (my_value_of_variable, varobj_editable_p): Update.
11964         * c-varobj.c (c_describe_child, c_value_of_variable)
11965         (cplus_number_of_children, cplus_describe_child): Update.
11966         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11967         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11968         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11969
11970 2018-04-06  Tom Tromey  <tom@tromey.com>
11971
11972         * printcmd.c (last_examine_address): Change type to
11973         value_ref_ptr.
11974         (do_examine, x_command): Update.
11975
11976 2018-04-06  Tom Tromey  <tom@tromey.com>
11977
11978         * value.c (release_value): Update.
11979         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11980         (struct bpstats) <val>: Now a value_ref_ptr.
11981         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11982         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11983         (~watchpoint, print_it_watchpoint, watch_command_1)
11984         (invalidate_bp_value_on_memory_change): Update.
11985
11986 2018-04-06  Tom Tromey  <tom@tromey.com>
11987
11988         * varobj.c (varobj_clear_saved_item)
11989         (update_dynamic_varobj_children, install_new_value, ~varobj):
11990         Update.
11991         * value.h (value_incref): Move declaration earlier.
11992         (value_decref): Rename from value_free.
11993         (struct value_ref_policy): New.
11994         (value_ref_ptr): New typedef.
11995         (struct value_deleter): Remove.
11996         (gdb_value_up): Remove typedef.
11997         (release_value): Change return type.
11998         (release_value_or_incref): Remove.
11999         * value.c (set_value_parent): Update.
12000         (value_incref): Change return type.
12001         (value_decref): Rename from value_free.
12002         (value_free_to_mark, free_all_values, free_value_chain): Update.
12003         (release_value): Return value_ref_ptr.
12004         (release_value_or_incref): Remove.
12005         (record_latest_value, set_internalvar, clear_internalvar):
12006         Update.
12007         * stack.c (info_frame_command): Don't call value_free.
12008         * python/py-value.c (valpy_dealloc, valpy_new)
12009         (value_to_value_object): Update.
12010         * printcmd.c (do_examine): Update.
12011         * opencl-lang.c (lval_func_free_closure): Update.
12012         * mi/mi-main.c (register_changed_p): Don't call value_free.
12013         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
12014         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
12015         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
12016         value_free.
12017         * guile/scm-value.c (vlscm_free_value_smob)
12018         (vlscm_scm_from_value): Update.
12019         * frame.c (frame_register_unwind, frame_unwind_register_signed)
12020         (frame_unwind_register_unsigned, get_frame_register_bytes)
12021         (put_frame_register_bytes): Don't call value_free.
12022         * findvar.c (address_from_register): Don't call value_free.
12023         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
12024         * dwarf2loc.c (entry_data_value_free_closure)
12025         (value_of_dwarf_reg_entry, free_pieced_value_closure)
12026         (dwarf2_evaluate_loc_desc_full): Update.
12027         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
12028         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
12029         (~watchpoint, watch_command_1)
12030         (invalidate_bp_value_on_memory_change): Update.
12031         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
12032
12033 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
12034
12035         PR gdb/23022
12036         * warning.m4: Add -Wno-error=deprecated-register.
12037         * configure: Re-generate.
12038
12039 2018-04-05  Tom Tromey  <tom@tromey.com>
12040
12041         * linespec.h: Remove include of "vec.h".
12042
12043 2018-04-05  Tom Tromey  <tom@tromey.com>
12044
12045         * linespec.c (typep): Remove typedef.
12046         (find_methods, find_superclass_methods): Take a std::vector.
12047         (find_method): Use std::vector.
12048
12049 2018-04-05  Tom Tromey  <tom@tromey.com>
12050
12051         * utils.c (compare_strings): Remove.
12052         * utils.h (compare_strings): Remove.
12053         * objc-lang.h (find_imps): Update.
12054         * objc-lang.c (find_methods): Take a std::vector.
12055         (uniquify_strings, find_imps): Likewise.
12056         * linespec.c (find_methods): Take a std::vector.
12057         (decode_objc): Use std::vector.
12058         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
12059         a std::vector.
12060         (find_method, find_function_symbols): Use std::vector.
12061
12062 2018-04-05  Tom Tromey  <tom@tromey.com>
12063
12064         * completer.c (completion_tracker::completion_tracker): Remove
12065         cast.
12066         (completion_tracker::discard_completions): Likewise.
12067         * breakpoint.c (ambiguous_names_p): Remove cast.
12068         * ada-lang.c (_initialize_ada_language): Remove cast.
12069         * utils.h (streq): Update.
12070         (streq_hash): Add new declaration.
12071         * utils.c (streq): Return bool.
12072         (streq_hash): New function.
12073
12074 2018-04-05  Tom Tromey  <tom@tromey.com>
12075
12076         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
12077         Remove a string copy.
12078
12079 2018-04-05  Tom Tromey  <tom@tromey.com>
12080
12081         * linespec.c (filter_results): Use std::vector.
12082         (decode_line_2, decode_line_full): Update.
12083
12084 2018-04-05  Tom Tromey  <tom@tromey.com>
12085
12086         * linespec.c (canonical_to_fullform): Return std::string.
12087         (filter_results): Update.
12088         (struct decode_line_2_item): Add constructor.
12089         <fullform, displayform>: Now std::string.
12090         (decode_line_2_compare_items): Now a std::sort comparator.
12091         (decode_line_2): Update.
12092
12093 2018-04-05  Tom Tromey  <tom@tromey.com>
12094
12095         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
12096         (unexpected_linespec_error): Update.
12097         (linespec_parse_basic, parse_linespec): Update.
12098
12099 2018-04-05  Tom Tromey  <tom@tromey.com>
12100
12101         * linespec.c (linespec_parse_basic): Reindent.
12102
12103 2018-04-05  Tom Tromey  <tom@tromey.com>
12104
12105         * minsyms.h (iterate_over_minimal_symbols): Update.
12106         * minsyms.c (iterate_over_minimal_symbols): Take a
12107         gdb::function_view.
12108         * linespec.c (struct collect_minsyms): Remove.
12109         (compare_msyms): Now a std::sort comparator.
12110         (add_minsym): Add parameters.
12111         (search_minsyms_for_name): Update.  Use std::vector.
12112
12113 2018-04-03  Tom Tromey  <tom@tromey.com>
12114
12115         * mipsread.c (read_alphacoff_dynamic_symtab): Use
12116         gdb::byte_vector.
12117
12118 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12119
12120         * MAINTAINERS (Write After Approval): Add Weimin Pan.
12121
12122 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
12123
12124         PR gdb/16959
12125         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
12126         printing static type.
12127
12128 2018-04-01  Tom Tromey  <tom@tromey.com>
12129
12130         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
12131         (rs6000_xfer_shared_libraries): Update.
12132
12133 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
12134
12135         * common/gdb_vecs.h (char_ptr): Remove.
12136         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
12137
12138 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12139
12140         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
12141         with std::vector.
12142         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
12143
12144 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
12145
12146         * tracepoint.h (struct uploaded_tp): Initialize fields.
12147         <actions, step_actions, cmd_strings>: Change type to
12148         std::vector<char *>.
12149         * tracepoint.c (get_uploaded_tp): Allocate with new.
12150         (free_uploaded_tps): Free with delete.
12151         (parse_tracepoint_definition): Adjust to std::vector change.
12152         * breakpoint.c (read_uploaded_action): Likewise.
12153         (create_tracepoint_from_upload): Likewise.
12154         * ctf.c (ctf_write_uploaded_tp): Likewise.
12155         (SET_ARRAY_FIELD): Likewise.
12156         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
12157
12158 2018-03-30  Tom Tromey  <tom@tromey.com>
12159
12160         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
12161         std::unique_ptr.
12162         (svr4_keep_data_in_core): Update.
12163         (svr4_read_so_list): Update.
12164
12165 2018-03-30  Tom Tromey  <tom@tromey.com>
12166
12167         * windows-nat.c (handle_output_debug_string, handle_exception):
12168         Update.
12169         * target.h (target_read_string): Update.
12170         * target.c (target_read_string): Change "string" to
12171         unique_xmalloc_ptr.
12172         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
12173         Update.
12174         * solib-frv.c (frv_current_sos): Update.
12175         * solib-dsbt.c (dsbt_current_sos): Update.
12176         * solib-darwin.c (darwin_current_sos): Update.
12177         * linux-thread-db.c (inferior_has_bug): Update.
12178         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
12179         Update.  Remove alloca.
12180         * ada-lang.c (ada_main_name): Update.
12181
12182 2018-03-30  Tom Tromey  <tom@tromey.com>
12183
12184         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
12185         (struct dwo_file_deleter): New.
12186         (dwo_file_up): New typedef.
12187         (open_and_init_dwo_file): Use dwo_file_up.
12188         (free_dwo_file_cleanup): Remove.
12189
12190 2018-03-30  Tom Tromey  <tom@tromey.com>
12191
12192         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
12193         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
12194
12195 2018-03-30  Tom Tromey  <tom@tromey.com>
12196
12197         * dwarf2read.c (class free_cached_comp_units): New class.
12198         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
12199         (free_cached_comp_units): Remove function.
12200
12201 2018-03-30  Tom Tromey  <tom@tromey.com>
12202
12203         * utils.h (make_cleanup_unpush_target): Remove.
12204         * inf-ptrace.c (struct target_unpusher): New.
12205         (target_unpush_up) New typedef.
12206         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12207         target_unpush_up.
12208         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12209
12210 2018-03-27  Tom Tromey  <tom@tromey.com>
12211
12212         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12213
12214 2018-03-27  Pedro Alves  <palves@redhat.com>
12215             Tom Tromey  <tom@tromey.com>
12216
12217         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12218         destructor.  Now a class.
12219         (gdb_readline_wrapper_cleanup): Remove function.
12220         (gdb_readline_wrapper): Remove cleanups.
12221
12222 2018-03-27  Tom Tromey  <tom@tromey.com>
12223
12224         * typeprint.h (struct type_print_options) <local_typedefs,
12225         global_typedefs>: Remove "struct" keyword.
12226         (class typedef_hash_table): New class.
12227         (recursively_update_typedef_hash, add_template_parameters)
12228         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12229         (find_typedef_in_hash): Don't declare.
12230         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12231         (typedef_hash_table::recursively_update): Rename from
12232         recursively_update_typedef_hash.  Now a member.
12233         (typedef_hash_table::add_template_parameters): Rename from
12234         add_template_parameters.  Now a member.
12235         (typedef_hash_table::typedef_hash_table): Now a constructor;
12236         rename from create_typedef_hash.
12237         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12238         rename from free_typedef_hash.
12239         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12240         (do_free_global_table): Remove.
12241         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12242         from copy_type_recursive.
12243         (create_global_typedef_table): Remove.
12244         (typedef_hash_table::find_global_typedef): Now a member of
12245         typedef_hash_table.
12246         (typedef_hash_table::find_typedef): Rename from
12247         find_typedef_in_hash; now a member.
12248         (whatis_exp): Update.
12249         * extension.h (struct ext_lang_type_printers): Add constructor and
12250         destructor.
12251         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12252         declare.
12253         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12254         Now a constructor; rename from start_ext_lang_type_printers.
12255         (ext_lang_type_printers): Now a destructor; rename from
12256         free_ext_lang_type_printers.
12257         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12258         Update.
12259         (c_type_print_base_struct_union): Update.  Remove cleanups.
12260
12261 2018-03-27  Tom Tromey  <tom@tromey.com>
12262
12263         * dwarf-index-write.c: Include <cmath>.
12264
12265 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12266
12267         * NEWS: Add entry describing new "set|show varsize-limit" command.
12268         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12269         command.
12270         * printcmd.c (_initialize_printcmd): Add "set var" alias of
12271         "set variable".
12272
12273 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
12274
12275         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12276         dwarf-index-write.c
12277         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12278         * dwarf-index-common.c: New file.
12279         * dwarf-index-common.h: New file.
12280         * dwarf-index-write.c: New file.
12281         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12282         (struct dwarf2_section_info): Move from here.
12283         (dwarf2_section_info_def): Likewise.
12284         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12285         (offset_type): Likewise.
12286         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12287         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12288         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12289         (byte_swap): Likewise.
12290         (MAYBE_SWAP): Likewise.
12291         (dwarf2_per_cu_ptr): Likewise.
12292         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12293         (struct tu_stats): Likewise.
12294         (struct dwarf2_per_objfile): Likewise.
12295         (struct dwarf2_per_cu_data): Likewise.
12296         (struct signatured_type): Likewise.
12297         (sig_type_ptr): Likewise.
12298         (DEF_VEC_P (sig_type_ptr)): Likewise.
12299         (INDEX4_SUFFIX): Likewise.
12300         (INDEX5_SUFFIX): Likewise.
12301         (DEBUG_STR_SUFFIX): Likewise.
12302         (dwarf2_read_section): Make non-static.
12303         (mapped_index_string_hash): Move from here.
12304         (dwarf5_djb_hash): Likewise.
12305         (file_write): Likewise.
12306         (class data_buf): Likewise.
12307         (struct symtab_index_entry): Likewise.
12308         (struct mapped_symtab): Likewise.
12309         (find_slot): Likewise.
12310         (hash_expand): Likewise.
12311         (add_index_entry): Likewise.
12312         (uniquify_cu_indices): Likewise.
12313         (class c_str_view): Likewise.
12314         (class c_str_view_hasher): Likewise.
12315         (class vector_hasher): Likewise.
12316         (write_hash_table): Likewise.
12317         (psym_index_map): Likewise.
12318         (struct addrmap_index_data): Likewise.
12319         (add_address_entry): Likewise.
12320         (add_address_entry_worker): Likewise.
12321         (write_address_map): Likewise.
12322         (symbol_kind): Likewise.
12323         (write_psymbols): Likewise.
12324         (struct signatured_type_index_data): Likewise.
12325         (write_one_signatured_type): Likewise.
12326         (recursively_count_psymbols): Likewise.
12327         (recursively_write_psymbols): Likewise.
12328         (class debug_names): Likewise.
12329         (check_dwarf64_offsets): Likewise.
12330         (psyms_seen_size): Likewise.
12331         (write_gdbindex): Likewise.
12332         (write_debug_names): Likewise.
12333         (assert_file_size): Likewise.
12334         (write_psymtabs_to_index): Likewise.
12335         (save_gdb_index_command): Likewise.
12336         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12337         command.
12338         * dwarf2read.h: New file.
12339
12340 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12341
12342         PR gdb/22670
12343         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12344         symbol name if the CU's language stores symbol names in linkage
12345         format.
12346         * language.h (struct language_defn)
12347         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12348         all instances of this struct.
12349
12350 2018-03-26  Tom Tromey  <tom@tromey.com>
12351
12352         * stack.c (backtrace_command_1): Remove verbose code.
12353
12354 2018-03-26  Tom Tromey  <tom@tromey.com>
12355
12356         * python/py-framefilter.c (py_print_type): Don't catch
12357         exceptions.  Return void.
12358         (py_print_value): Likewise.
12359         (py_print_single_arg): Likewise.
12360         (enumerate_args): Don't catch exceptions.
12361         (py_print_args): Likewise.
12362         (py_print_frame): Likewise.
12363         (gdbpy_apply_frame_filter): Catch exceptions here.
12364
12365 2018-03-26  Tom Tromey  <tom@tromey.com>
12366
12367         * stack.c (_initialize_stack): Remove trailing newlines from help
12368         text.  Add "Usage" line to "backtrace" help.
12369
12370 2018-03-26  Tom Tromey  <tom@tromey.com>
12371
12372         PR python/16486:
12373         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12374
12375 2018-03-26  Tom Tromey  <tom@tromey.com>
12376
12377         * python/py-framefilter.c (py_print_single_arg): Return
12378         EXT_LANG_BT_ERROR from catch.
12379
12380 2018-03-26  Tom Tromey  <tom@tromey.com>
12381
12382         PR backtrace/15584:
12383         * stack.c (backtrace_command_1): Move some code into no-filters
12384         "if".
12385
12386 2018-03-26  Tom Tromey  <tom@tromey.com>
12387
12388         * python/py-framefilter.c (throw_quit_or_print_exception): New
12389         function.
12390         (gdbpy_apply_frame_filter): Use it.
12391
12392 2018-03-26  Tom Tromey  <tom@tromey.com>
12393
12394         PR cli/17716:
12395         * python/py-framefilter.c (py_print_type, py_print_value)
12396         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12397         RETURN_MASK_ERROR.
12398
12399 2018-03-26  Tom Tromey  <tom@tromey.com>
12400
12401         * python/py-framefilter.c (enumerate_args): Use
12402         gdb::unique_xmalloc_ptr.
12403
12404 2018-03-26  Tom Tromey  <tom@tromey.com>
12405
12406         * python/py-framefilter.c (py_print_frame): Return
12407         EXT_LANG_BT_OK.
12408         (gdbpy_apply_frame_filter): Update comment.
12409         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12410         Remove.
12411         <EXT_LANG_BT_NO_FILTERS>: Change value.
12412
12413 2018-03-26  Tom Tromey  <tom@tromey.com>
12414
12415         PR backtrace/15582:
12416         * stack.c (backtrace_command): Parse "hide" argument.
12417         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12418         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12419         constant.
12420
12421 2018-03-26  Tom Tromey  <tom@tromey.com>
12422
12423         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12424         add "flags".
12425         (backtrace_command): Remove "fulltrace", add "flags".
12426
12427 2018-03-26  Tom Tromey  <tom@tromey.com>
12428
12429         * stack.c (backtrace_command): Rewrite command line parsing.
12430
12431 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12432
12433         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12434
12435 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12436
12437         * filename-seen-cache.h: Add include guard.
12438
12439 2018-03-26  Keith Seitz  <keiths@redhat.com>
12440
12441         * symfile.c (place_section): Remove "struct" from section_addr_info
12442         in comment.
12443         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12444         "struct" keyword from section_addr_info.
12445
12446 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12447
12448         * regformats/regdef.h (reg): Add constructors.
12449
12450 2018-03-25  Pedro Alves  <palves@redhat.com>
12451
12452         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12453         if then/else bodies in var_func_name extraction.
12454
12455 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12456
12457         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12458         lookup_minimal_symbol() to find symbol entry.
12459         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12460
12461 2018-03-23  Keith Seitz  <keiths@redhat.com>
12462
12463         PR c++/22968
12464         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12465         nested type definitions for C++, too.
12466
12467 2018-03-23  Tom Tromey  <tom@tromey.com>
12468
12469         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12470         a typedef.
12471         (macho_register_oso): Remove.
12472         (macho_symtab_read): Take a std::vector.
12473         (oso_el_compare_name): Now a std::sort comparator.
12474         (macho_symfile_read_all_oso): Take a std::vector.
12475         (macho_symfile_read): Use std::vector.  Remove cleanups.
12476
12477 2018-03-22  Tom Tromey  <tom@tromey.com>
12478
12479         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12480         (record_full_goto_bookmark): Use std::string.
12481
12482 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12483
12484         PR tdep/18295
12485         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12486         a single mask.
12487
12488 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12489
12490         * rs6000-tdep.c (store_insn_p): New function.
12491         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12492         and cr_reg to their unshifted values. Use store_insn_p to
12493         match LR saves using either R1 or fdata->alloca_reg. Use
12494         store_insn_p to match CR saves. Set alloca_reg_offset
12495         when alloca_reg and framep are set. Remove lr_reg shift
12496         when assigning to fdata->lr_register.
12497
12498 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12499
12500         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12501         command line args instead of emitting a warning.
12502
12503 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12504
12505         * tracepoint.h (struct static_tracepoint_marker): Initialize
12506         fields, define default constructor, move constructor and move
12507         assignment, disable the rest.
12508         <str_id, extra>: Make std::string.
12509         (release_static_tracepoint_marker): Remove.
12510         (free_current_marker): Remove.
12511         * tracepoint.c (free_current_marker): Remove.
12512         (parse_static_tracepoint_marker_definition): Adjust to
12513         std::string, use new hex2str overload.
12514         (release_static_tracepoint_marker): Remove.
12515         (print_one_static_tracepoint_marker): Get marker by reference
12516         and adjust to std::string.
12517         (info_static_tracepoint_markers_command): Adjust to std::vector
12518         changes
12519         * target.h (static_tracepoint_marker_p): Remove typedef.
12520         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12521         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12522         bool.
12523         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12524         * target-debug.h
12525         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12526         (target_debug_print_std_vector_static_tracepoint_marker): New.
12527         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12528         to...
12529         (target_debug_print_static_tracepoint_marker_p): ... this.
12530         * target-delegates.c: Re-generate.
12531         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12532         Make std::string.
12533         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12534         (decode_static_tracepoint_spec): Adjust to std::vector.
12535         (tracepoint_print_one_detail): Adjust to std::string.
12536         (strace_marker_decode_location): Adjust to std::string.
12537         (update_static_tracepoint): Adjust to std::string, remove call
12538         to release_static_tracepoint_marker.
12539         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12540         Adjust to std::vector.
12541         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12542         (remote_static_tracepoint_markers_by_strid): Adjust to
12543         std::vector.
12544         * common/rsp-low.h (hex2str): New overload with explicit count
12545         of bytes.
12546         * common/rsp-low.c (hex2str): New overload with explicit count
12547         of bytes.
12548         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12549         (_initialize_rsp_low_selftests): Add test_hex2str test.
12550         * unittests/tracepoint-selftests.c
12551         (test_parse_static_tracepoint_marker_definition): Adjust to
12552         std::string.
12553
12554 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12555
12556         * tracepoint.c (parse_static_tracepoint_marker_definition):
12557         Consider case where the definition is followed by more
12558         definitions.
12559         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12560         tracepoint-selftests.c.
12561         * unittests/tracepoint-selftests.c: New.
12562
12563 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12564
12565         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12566         Carvalho.
12567
12568 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12569
12570         * symtab.c (find_pc_sect_line): fixed indentation.
12571
12572 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12573
12574         * symtab.c (find_pc_sect_line): now uses binary search.
12575
12576 2018-03-19  Tom Tromey  <tom@tromey.com>
12577
12578         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12579         "IDENT" production.
12580
12581 2018-03-19  Pedro Alves  <palves@redhat.com>
12582             Tom Tromey  <tom@tromey.com>
12583
12584         * unittests/observable-selftests.c: New file.
12585         * common/observable.h: New file.
12586         * observable.h: New file.
12587         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12588         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12589         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12590         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12591         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12592         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12593         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12594         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12595         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12596         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12597         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12598         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12599         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12600         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12601         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12602         tui/tui-interp.c, valops.c: Update all users.
12603         * tui/tui-hooks.c (tui_bp_created_observer)
12604         (tui_bp_deleted_observer, tui_bp_modified_observer)
12605         (tui_inferior_exit_observer, tui_before_prompt_observer)
12606         (tui_normal_stop_observer, tui_register_changed_observer):
12607         Remove.
12608         (tui_observers_token): New global.
12609         (attach_or_detach, tui_attach_detach_observers): New functions.
12610         (tui_install_hooks, tui_remove_hooks): Use
12611         tui_attach_detach_observers.
12612         * record-btrace.c (record_btrace_thread_observer): Remove.
12613         (record_btrace_thread_observer_token): New global.
12614         * observer.sh: Remove.
12615         * observer.c: Rename to observable.c.
12616         * observable.c (namespace gdb_observers): Define new objects.
12617         (observer_debug): Move into gdb_observers namespace.
12618         (struct observer, struct observer_list, xalloc_observer_list_node)
12619         (xfree_observer_list_node, generic_observer_attach)
12620         (generic_observer_detach, generic_observer_notify): Remove.
12621         (_initialize_observer): Update.
12622         Don't include observer.inc.
12623         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12624         (clean mostlyclean): Likewise.
12625         (observer.h, observer.inc): Remove targets.
12626         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12627         (COMMON_SFILES): Use observable.c, not observer.c.
12628         * .gitignore: Remove observer.h.
12629
12630 2018-03-18  Tom Tromey  <tom@tromey.com>
12631
12632         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12633         gdb::def_vector.
12634         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12635
12636 2018-03-17  Tom Tromey  <tom@tromey.com>
12637
12638         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12639
12640 2018-03-17  Tom Tromey  <tom@tromey.com>
12641
12642         * target.c (class scoped_target_fd): New.
12643         (target_fileio_close_cleanup): Remove.
12644         (target_fileio_read_alloc_1): Use scoped_target_fd.
12645
12646 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12647
12648         * silent-rules.mk: New.
12649         * Makefile.in: Include silent-rules.mk
12650         (srcdir, VPATH, top_srcdir): Move up.
12651         (COMPILE): Add ECHO_CXX.
12652         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12653         (init.c): Add ECHO_INIT_C.
12654         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12655         (version.c): Add ECHO_GEN.
12656         (printcmd.o): Add ECHO_CXX.
12657         (target-float.o): Add ECHO_CXX.
12658         (ada-exp.o): Add ECHO_CXX.
12659         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12660         (insight$(EXEEXT)): Add ECHO_CXXLD.
12661         * gnulib/configure.ac: Add AM_SILENT_RULES.
12662         * gnulib/aclocal.m4: Re-generate.
12663         * gnulib/configure: Re-generate.
12664         * gnulib/import/Makefile.in: Re-generate.
12665
12666 2018-03-16  Tom Tromey  <tom@tromey.com>
12667
12668         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12669         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12670         * utils.c (do_free_section_addr_info)
12671         (make_cleanup_free_section_addr_info): Remove.
12672         * symfile.h (struct other_sections): Add constructor.
12673         (struct section_addr_info): Remove.
12674         (section_addr_info): New typedef.
12675         (struct sym_fns) <sym_offsets>: Change type of parameter.
12676         (build_section_addr_info_from_objfile)
12677         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12678         (default_symfile_offsets, symbol_file_add)
12679         (symbol_file_add_from_bfd)
12680         (build_section_addr_info_from_section_table): Update.
12681         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12682         * symfile.c (alloc_section_addr_info): Remove.
12683         (build_section_addr_info_from_section_table): Change return type.
12684         Update.
12685         (build_section_addr_info_from_bfd)
12686         (build_section_addr_info_from_objfile): Likewise.
12687         (free_section_addr_info): Remove.
12688         (relative_addr_info_to_section_offsets): Change type of "addrs".
12689         (addrs_section_compar): Now a std::sort comparator.
12690         (addrs_section_sort): Change return type.
12691         (addr_info_make_relative): Change type of "addrs".  Update.
12692         (default_symfile_offsets, syms_from_objfile_1)
12693         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12694         (symbol_file_add_separate): Update.
12695         (symbol_file_add): Change type of "addrs".  Update.
12696         (add_symbol_file_command): Update.  Remove cleanups.
12697         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12698         cleanups.
12699         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12700         * solib.c (solib_read_symbols): Update.
12701         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12702         * machoread.c (macho_symfile_offsets): Update.
12703         * jit.c (jit_bfd_try_read_symtab): Update.
12704
12705 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12706
12707         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12708         unittests/utils-selftests.c.
12709         * unittests/utils-selftests.c: New file.
12710
12711 2018-03-14  Tom Tromey  <tom@tromey.com>
12712
12713         PR cli/14977:
12714         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12715         for NULL.
12716
12717 2018-03-14  Tom Tromey  <tom@tromey.com>
12718
12719         PR cli/19918:
12720         * printcmd.c (printf_pointer): Allow "-" in format.
12721
12722 2018-03-14  Tom Tromey  <tom@tromey.com>
12723
12724         * printcmd.c (_initialize_printcmd): Add usage to printf.
12725
12726 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12727
12728         * MAINTAINERS: Update my email address.
12729
12730 2018-03-13  Tom Tromey  <tom@tromey.com>
12731
12732         * machoread.c (macho_check_dsym): Change filenamep to a
12733         std::string*.
12734         (macho_symfile_read): Update.
12735         * symfile.c (load_command): Use std::string.
12736
12737 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12738
12739         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12740         to error message string.
12741         (riscv_register_name): Use xsnprintf instead of sprintf.
12742         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12743         internal_error.
12744         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12745         error.
12746         (riscv_push_dummy_call): Likewise.
12747
12748 2018-03-12  Tom Tromey  <tom@tromey.com>
12749
12750         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12751         Use gdb::byte_vector.
12752         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12753
12754 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12755
12756         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12757         parameter type to readable_regcache.
12758         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12759         the declaration.
12760
12761 2018-03-11  Tom Tromey  <tom@tromey.com>
12762
12763         * dwarf2read.c (struct nextfield): Add initializers.
12764         (struct nextfnfield): Remove.
12765         (struct fnfieldlist): Add initializers.  Remove "length" and
12766         "head", use std::vector.
12767         (struct decl_field_list): Remove.
12768         (struct field_info): Add initializers.
12769         <fields, baseclasses>: Now std::vector.
12770         <nbaseclasses, nfnfields, typedef_field_list_count,
12771         nested_types_list_count>: Remove.
12772         (dwarf2_add_field, dwarf2_add_type_defn)
12773         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12774         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12775         (process_structure_scope): Update.
12776
12777 2018-03-11  Tom Tromey  <tom@tromey.com>
12778
12779         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12780         for use by std::sort.
12781         (build_type_psymtabs_1): Use std::vector.
12782
12783 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12784
12785         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12786         and LIBMPFR in the printed configuration.
12787
12788 2018-03-08  Tom Tromey  <tom@tromey.com>
12789
12790         * source.c (get_filename_and_charpos): Use scoped_fd.
12791         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12792         (procfs_pidlist): Likewise.
12793         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12794         (iterate_over_mappings): Likewise.
12795
12796 2018-03-08  Tom Tromey  <tom@tromey.com>
12797
12798         * infcall.c (struct call_return_meta_info)
12799         <stack_temporaries_enabled>: Remove.
12800         (get_call_return_value, call_function_by_hand_dummy): Update.
12801         * thread.c (disable_thread_stack_temporaries): Remove.
12802         (enable_thread_stack_temporaries): Remove.
12803         (thread_stack_temporaries_enabled_p): Return bool.
12804         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12805         (get_last_thread_stack_temporary): Update.
12806         * eval.c (evaluate_subexp): Update.
12807         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12808         class, not a function.
12809         (value_ptr, value_vec): Remove typedefs.
12810         (class thread_info) <stack_temporaries_enabled>: Now bool.
12811         <stack_temporaries>: Now a std::vector.
12812         (thread_stack_temporaries_enabled_p)
12813         (value_in_thread_stack_temporaries): Return bool.
12814
12815 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12816
12817         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12818         (getpkt_or_notif_sane_1): Likewise.
12819
12820 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12821
12822         * build-id.c (build_id_to_debug_bfd): Use std::string.
12823
12824 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12825
12826         * build-id.c (find_separate_debug_file_by_buildid): Return
12827         std::string.
12828         * build-id.h (find_separate_debug_file_by_buildid): Return
12829         std::string.
12830         * coffread.c (coff_symfile_read): Adjust to std::string.
12831         * elfread.c (elf_symfile_read): Adjust to std::string.
12832         * symfile.c (separate_debug_file_exists): Change parameter to
12833         std::string.
12834         (find_separate_debug_file): Return std::string.
12835         (find_separate_debug_file_by_debuglink): Return std::string.
12836         * symfile.h (find_separate_debug_file_by_debuglink): Return
12837         std::string.
12838
12839 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12840
12841         * common/xml-utils.c (xml_escape_text): Move code to...
12842         (xml_escape_text_append): ... this new function.
12843         * common/xml-utils.h (xml_escape_text_append): New declaration.
12844         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12845         New function.
12846         (_initialize_xml_utils): register test_xml_escape_text_append as
12847         a selftest.
12848
12849 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12850
12851         * defs.h: Remove MAX_REGISTER_SIZE.
12852         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12853         asserts.
12854         * python/py-unwind.c (pyuw_sniffer): Likewise.
12855
12856 2018-03-07  Tom Tromey  <tom@tromey.com>
12857
12858         * linux-tdep.c (linux_info_proc): Update.
12859         * target.h (struct target_ops) <to_fileio_readlink>: Return
12860         optional<string>.
12861         (target_fileio_readlink): Return optional<string>.
12862         * remote.c (remote_hostio_readlink): Return optional<string>.
12863         * inf-child.c (inf_child_fileio_readlink): Return
12864         optional<string>.
12865         * target.c (target_fileio_readlink): Return optional<string>.
12866
12867 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12868
12869         * regcache.c (cooked_read_test): Add riscv to the list of
12870         architectures that have a save_reggroup.
12871
12872 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12873
12874         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12875         value is not a dynamic class object.
12876
12877 2018-03-06  Tom Tromey  <tom@tromey.com>
12878
12879         * rust-exp.y: Formatting fixes.
12880
12881 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12882
12883         * riscv-tdep.c (riscv_register_name): Remove target description
12884         support.
12885         (riscv_gdbarch_init): Remove target description check.
12886
12887 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12888
12889         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12890         comment.
12891         * riscv-tdep.h: Likewise.
12892
12893 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12894
12895         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12896         (riscv_pseudo_register_write): Delete.
12897         (riscv_gdbarch_init): Remove all use of pseudo registers.
12898
12899 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12900
12901         * record-btrace.c (btrace_print_lines): Replace cleanup
12902         parameter with RAII equivalents.
12903         (btrace_insn_history): Replace cleanup with RAII equivalents.
12904         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12905         make_cleanup_ui_out_tuple_begin_end): Remove.
12906         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12907         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12908         make_cleanup_ui_out_list_begin_end): Remove.
12909
12910 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12911
12912         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12913         parameter types to std::vector.  Use bool.
12914         (record_btrace_wait): Replace VEC(tp_t) with
12915         std::vector<thread_info *>.
12916         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12917
12918 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12919
12920         * record-btrace.c (record_btrace_disable_callback): Remove.
12921         (struct scoped_btrace_disable): New.
12922         (record_btrace_open): Use scoped_btrace_disable.
12923
12924 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12925
12926         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12927         reading values from registers.
12928
12929 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12930
12931         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12932         where appropriate.
12933
12934 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12935
12936         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12937         change parameter type.  Use GDB's print functions, and use
12938         core_addr_to_string where appropriate.
12939         (riscv_push_dummy_call): Use core_addr_to_string where
12940         appropriate, update call to riscv_print_arg_location, and reindent
12941         a few lines.
12942         (riscv_return_value): Update call to riscv_print_arg_location.
12943
12944 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12945             Tim Newsome <tim@sifive.com>
12946             Albert Ou <a0u@eecs.berkeley.edu>
12947             Darius Rad <darius@bluespec.com>
12948
12949         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12950         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12951         (ALLDEPFILES): Add riscv-tdep.c
12952         * configure.tgt: Add riscv support.
12953         * riscv-tdep.c: New file.
12954         * riscv-tdep.h: New file.
12955         * NEWS: Mention new target.
12956         * MAINTAINERS: Add entry for riscv.
12957
12958 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12959
12960         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12961         fields within aggregates.
12962
12963 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12964
12965         * record-btrace.c (btrace_print_lines): Change type of flags to
12966         gdb_disassembly_flags.
12967
12968 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12969
12970         * fbsd-nat.c: Include "inf-ptrace.h".
12971         (USE_SIGTRAP_SIGINFO): Conditionally define.
12972         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12973         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12974         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12975         function.
12976         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12977         Likewise.
12978         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12979         Likewise.
12980         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12981         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12982         "supports_stopped_by_hw_breakpoint" target methods.
12983
12984 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12985
12986         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12987         * fbsd-nat.c (debug_fbsd_nat): New variable.
12988         (show_fbsd_nat_debug): New function.
12989         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12990         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12991
12992 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12993
12994         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12995         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12996         prototype.
12997         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12998         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12999         method.
13000
13001 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13002
13003         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
13004         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
13005
13006 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13007
13008         * charset.c (struct charset_vector): New.
13009         (charsets): Change type to charset_vector.
13010         (find_charset_names): Adjust.
13011         (add_one): Adjust.
13012         (_initialize_charset): Adjust.
13013
13014 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13015
13016         * progspace.h (struct program_space) <deleted_solibs>: Change
13017         type to std::vector<std::string>.
13018         * progspace.c (clear_program_space_solib_cache): Adjust.
13019         * breakpoint.c (print_solib_event): Adjust.
13020         (check_status_catch_solib): Adjust.
13021         * solib.c (update_solib_list): Adjust.
13022         * ui-out.h (class ui_out) <field_string>: New overload.
13023         * ui-out.c (ui_out::field_string): New overload.
13024
13025 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13026
13027         * progspace.h (struct program_space): Add constructor and
13028         destructor, initialize fields.
13029         (add_program_space): Remove.
13030         * progspace.c (add_program_space): Rename to...
13031         (program_space::program_space): ... this.
13032         (release_program_space): Rename to...
13033         (program_space::~program_space): ... this.
13034         (delete_program_space): Use delete to delete program_space.
13035         (initialize_progspace): Use new to allocate program_space.
13036         * inferior.c (add_inferior_with_spaces): Likewise.
13037         (clone_inferior_command): Likewise.
13038         * infrun.c (follow_fork_inferior): Likewise.
13039         (handle_vfork_child_exec_or_exit): Likewise.
13040
13041 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
13042
13043         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
13044         (delim_string_to_char_ptr_vec): Return std::vector of
13045         gdb::unique_xmalloc_ptr.
13046         (dirnames_to_char_ptr_vec_append): Take std::vector of
13047         gdb::unique_xmalloc_ptr.
13048         (dirnames_to_char_ptr_vec): Return std::vector of
13049         gdb::unique_xmalloc_ptr.
13050         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
13051         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
13052         (delim_string_to_char_ptr_vec): Return an std::vector of
13053         gdb::unique_xmalloc_ptr, adjust the code.
13054         (dirnames_to_char_ptr_vec_append): Take an std::vector of
13055         gdb::unique_xmalloc_ptr, adjust the code.
13056         (dirnames_to_char_ptr_vec): Return an std::vector of
13057         gdb::unique_xmalloc_ptr, adjust the code.
13058         * auto-load.c (auto_load_safe_path_vec): Change type to
13059         std::vector of gdb::unique_xmalloc_ptr.
13060         (auto_load_expand_dir_vars): Return an std::vector of
13061         gdb::unique_xmalloc_ptr, adjust the code.
13062         (auto_load_safe_path_vec_update): Adjust.
13063         (filename_is_in_auto_load_safe_path_vec): Adjust.
13064         (auto_load_objfile_script_1): Adjust.
13065         * build-id.c (build_id_to_debug_bfd): Adjust.
13066         * linux-thread-db.c (thread_db_load_search): Adjust.
13067         * source.c (add_path): Adjust.
13068         (openp): Adjust.
13069         * symfile.c (find_separate_debug_file): Adjust.
13070         * utils.c (do_free_char_ptr_vec): Remove.
13071         (make_cleanup_free_char_ptr_vec): Remove.
13072
13073 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
13074
13075         PR gdb/22907
13076         * common/pathstuff.c: Conditionally include "<windows.h>".
13077
13078 2018-03-01  Georg Sauthoff  <mail@georg.so>
13079
13080         PR gdb/22888
13081         * gcore.in: Quote variables and switch interpreter to bash.
13082
13083 2018-03-01  Tom Tromey  <tom@tromey.com>
13084
13085         * dwarf2read.c (alloc_discriminant_info): Fix default_index
13086         assertion.  Add assertion for discriminant_index.
13087         (quirk_rust_enum): Use correct base type name in univariant case.
13088
13089 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
13090
13091         * record.c (get_call_history_modifiers): Return a
13092         record_print_flags.
13093         (cmd_record_call_history): Adjust.
13094         * record-btrace.c (record_btrace_call_history): Adjust.
13095         (record_btrace_call_history_range): Adjust.
13096         (record_btrace_call_history_from): Adjust.
13097         * target-debug.h (target_debug_print_record_print_flags): New.
13098         * target-delegates.c: Re-generate.
13099         * target.c (target_call_history): Change flags type.
13100         (target_call_history_from): Likewise.
13101         (target_call_history_range): Likewise.
13102         * target.h (struct target_ops) <target_call_history>: Likewise.
13103         (target_call_history_from): Likewise.
13104         (target_call_history_range): Likewise.
13105
13106 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13107             Simon Marchi  <simon.marchi@polymtl.ca>
13108
13109         * common/common-utils.c: Include "sys/stat.h".
13110         (is_regular_file): Move here from "source.c"; change return
13111         type to "bool".
13112         * common/common-utils.h (is_regular_file): New prototype.
13113         * common/pathstuff.c (contains_dir_separator): New function.
13114         * common/pathstuff.h (contains_dir_separator): New prototype.
13115         * source.c: Don't include "sys/stat.h".
13116         (is_regular_file): Move to "common/common-utils.c".
13117
13118 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
13119
13120         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
13121         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
13122         * auto-load.c: Include "common/pathstuff.h".
13123         * common/common-def.h (current_directory): Move here.
13124         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
13125         function.
13126         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
13127         prototype.
13128         * common/pathstuff.c: New file.
13129         * common/pathstuff.h: New file.
13130         * compile/compile.c: Include "common/pathstuff.h".
13131         * defs.h (current_directory): Move to "common/common-defs.h".
13132         * dwarf2read.c: Include "common/pathstuff.h".
13133         * exec.c: Likewise.
13134         * guile/scm-safe-call.c: Likewise.
13135         * linux-thread-db.c: Likewise.
13136         * main.c: Likewise.
13137         * nto-tdep.c: Likewise.
13138         * objfiles.c: Likewise.
13139         * source.c: Likewise.
13140         * symtab.c: Likewise.
13141         * utils.c: Include "common/pathstuff.h".
13142         (gdb_realpath): Move to "common/pathstuff.c".
13143         (gdb_realpath_keepfile): Likewise.
13144         (gdb_abspath): Likewise.
13145         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
13146         (gdb_realpath_keepfile): Likewise.
13147         (gdb_abspath): Likewise.
13148
13149 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
13150
13151         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
13152         wildcard process pid for super_resume for kernels with a
13153         specific bug.
13154
13155 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
13156
13157         * compile/compile.c (get_args): Add additional comments
13158         explaining function.
13159
13160 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
13161             Tom Tromey  <tom@tromey.com>
13162
13163         * target.h (memory_write_request_s): Remove typedef.  Don't define
13164         VEC.
13165         (target_write_memory_blocks): Change argument to std::vector.
13166         (struct memory_write_request): Add constructor.
13167         * target-memory.c (compare_block_starting_address): Return bool.
13168         Change argument types.
13169         (claim_memory): Change arguments to use std::vector.
13170         (split_regular_and_flash_blocks, blocks_to_erase)
13171         (compute_garbled_blocks): Likewise.
13172         (cleanup_request_data, cleanup_write_requests_vector): Remove.
13173         (target_write_memory_blocks): Change argument to std::vector.
13174         * symfile.c (struct load_section_data): Add constructor and
13175         destructor.  Use std::vector for "requests".
13176         (struct load_progress_data): Add initializers.
13177         (load_section_callback): Update.  Use "new".
13178         (clear_memory_write_data): Remove.
13179         (generic_load): Update.
13180
13181 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
13182
13183         * arch/aarch64.h: Use common/tdesc.h.
13184
13185 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13186
13187         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
13188         architecture with a 64-bit ABI.
13189
13190 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
13191
13192         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
13193         ahead of target description loading.
13194
13195 2018-02-26  Tom Tromey  <tom@tromey.com>
13196
13197         * stack.c (backtrace_command_1): Update.
13198         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
13199         of "flags".
13200         * python/py-framefilter.c (py_print_frame)
13201         (gdbpy_apply_frame_filter): Change type of "flags".
13202         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13203         of "flags".
13204         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13205         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13206         * extension.h (enum frame_filter_flag): Rename from
13207         frame_filter_flags.
13208         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13209         (apply_ext_lang_frame_filter): Change type of "flags".
13210         * extension.c (apply_ext_lang_frame_filter): Change type of
13211         "flags".
13212         * extension-priv.h (struct extension_language_ops)
13213         <apply_frame_filter>: Change type of "flags".
13214
13215 2018-02-26  Tom Tromey  <tom@tromey.com>
13216
13217         PR python/16497:
13218         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13219         off-by-one in py_end computation.
13220         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13221         PRINT_MORE_FRAMES.
13222         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13223         constant.
13224
13225 2018-02-26  Tom Tromey  <tom@tromey.com>
13226
13227         * dwarf2read.c (struct variant_field): New.
13228         (struct nextfield) <variant>: New field.
13229         (dwarf2_add_field): Handle DW_TAG_variant_part.
13230         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13231         discriminated union.
13232         (read_structure_type): Handle DW_TAG_variant_part.
13233         (handle_struct_member_die): New function, extracted from
13234         process_structure_scope.  Handle DW_TAG_variant.
13235         (process_structure_scope): Handle discriminated unions.  Call
13236         handle_struct_member_die.
13237
13238 2018-02-26  Tom Tromey  <tom@tromey.com>
13239
13240         * rust-lang.h (rust_last_path_segment): Declare.
13241         * rust-lang.c (rust_last_path_segment): Now public.  Change
13242         contract.
13243         (struct disr_info): Remove.
13244         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13245         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13246         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13247         (rust_enum_p, rust_enum_variant): New function.
13248         (rust_underscore_fields): Remove "offset" parameter.
13249         (rust_print_enum): New function.
13250         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13251         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13252         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13253         enums.
13254         (rust_internal_print_type): New function, from rust_print_type.
13255         Remove enum code.
13256         (rust_print_type): Call rust_internal_print_type.
13257         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13258         Update enum handling.
13259         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13260         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13261         (rust_union_quirks): New functions.
13262         (process_full_comp_unit, process_full_type_unit): Call
13263         rust_union_quirks.
13264         (process_structure_scope): Update rust_unions if necessary.
13265
13266 2018-02-26  Tom Tromey  <tom@tromey.com>
13267
13268         * value.h (value_union_variant): Declare.
13269         * valops.c (value_union_variant): New function.
13270         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13271         (struct discriminant_info): New.
13272         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13273         enumerator.
13274         (struct main_type) <flag_discriminated_union>: New field.
13275
13276 2018-02-26  Tom Tromey  <tom@tromey.com>
13277
13278         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13279         unittests/unpack-selftests.c.
13280         * unittests/unpack-selftests.c: New file.
13281         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13282
13283 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13284
13285         * dwarf2read.c (struct partial_die_info) <read>: New method.
13286         (read_partial_die): Remove the declaration.
13287         (load_partial_dies): Update.
13288         (partial_die_info::partial_die_info):
13289         (read_partial_die): Change it to partial_die_info::read.
13290
13291 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13292
13293         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13294         (fixup_partial_die): Remove declaration.
13295         (scan_partial_symbols): Update.
13296         (partial_die_parent_scope): Likewise.
13297         (partial_die_full_name): Likewise.
13298         (fixup_partial_die): Change it to partial_die_info::fixup.
13299
13300 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13301
13302         * dwarf2read.c (read_partial_die): Update the declaration.
13303         (load_partial_dies): Caller update.
13304         (read_partial_die): Remove one argument abbrev_len.
13305
13306 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13307
13308         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13309         assignment operator.
13310         (load_partial_dies): Use ctor and copy ctor.
13311         (read_partial_die): Update.
13312         (dwarf2_cu::find_partial_die): Use ctor.
13313
13314 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13315
13316         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13317         (find_partial_die_in_comp_unit): Change it to
13318         dwarf2_cu::find_partial_die.
13319         (find_partial_die): Update.
13320
13321 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13322
13323         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13324         is NULL.
13325
13326 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13327
13328         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13329
13330 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13331
13332         * arch/amd64.h: Use common/tdesc.h.
13333         * arch/i386.c: Likewise.
13334         * arch/i386.h: Likewise.
13335         * arch/tic6x.c: Likewise.
13336         * arch/tdesc.h: Move file from here...
13337         * common/tdesc.h: ...to here.
13338         * features/aarch64-core.c: Regenerate.
13339         * features/aarch64-fpu.c: Regenerate.
13340         * features/i386/32bit-avx.c: Regenerate.
13341         * features/i386/32bit-avx512.c: Regenerate.
13342         * features/i386/32bit-core.c: Regenerate.
13343         * features/i386/32bit-linux.c: Regenerate.
13344         * features/i386/32bit-mpx.c: Regenerate.
13345         * features/i386/32bit-pkeys.c: Regenerate.
13346         * features/i386/32bit-sse.c: Regenerate.
13347         * features/i386/64bit-avx.c: Regenerate.
13348         * features/i386/64bit-avx512.c: Regenerate.
13349         * features/i386/64bit-core.c: Regenerate.
13350         * features/i386/64bit-linux.c: Regenerate.
13351         * features/i386/64bit-mpx.c: Regenerate.
13352         * features/i386/64bit-pkeys.c: Regenerate.
13353         * features/i386/64bit-segments.c: Regenerate.
13354         * features/i386/64bit-sse.c: Regenerate.
13355         * features/i386/x32-core.c: Regenerate.
13356         * features/tic6x-c6xp.c: Regenerate.
13357         * features/tic6x-core.c: Regenerate.
13358         * features/tic6x-gp.c: Regenerate.
13359         * target-descriptions.c: Use common/tdesc.h.
13360         * target-descriptions.h: Likewise.
13361
13362 2018-02-24  Tom Tromey  <tom@tromey.com>
13363
13364         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13365         (try_thread_db_load_from_dir, thread_db_load_search): Use
13366         std::string.
13367         (info_auto_load_libthread_db_compare): Return bool.  Change
13368         argument types.
13369         (info_auto_load_libthread_db): Use std::vector, std::string.
13370         Remove cleanups.
13371
13372 2018-02-24  Tom Tromey  <tom@tromey.com>
13373
13374         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13375         std::string.
13376         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13377         std::string*.
13378         * gdbarch.c: Rebuild.
13379         * gdbarch.h: Rebuild.
13380         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13381         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13382         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13383         std::string*.
13384
13385 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13386
13387         * gdbtypes.h (sect_offset): Change type to uint64_t.
13388         (sect_offset_str): New function.
13389         * dwarf2read.c (create_addrmap_from_aranges): Use
13390         sect_offset_str.
13391         (error_check_comp_unit_head): Likewise.
13392         (create_debug_type_hash_table): Likewise.
13393         (read_cutu_die_from_dwo): Likewise.
13394         (init_cutu_and_read_dies): Likewise.
13395         (init_cutu_and_read_dies_no_follow): Likewise.
13396         (process_psymtab_comp_unit_reader): Likewise.
13397         (partial_die_parent_scope): Likewise.
13398         (peek_die_abbrev): Likewise.
13399         (process_queue): Likewise.
13400         (dwarf2_physname): Likewise.
13401         (read_namespace_alias): Likewise.
13402         (read_import_statement): Likewise.
13403         (create_dwo_cu_reader): Likewise.
13404         (create_cus_hash_table): Likewise.
13405         (lookup_dwo_cutu): Likewise.
13406         (inherit_abstract_dies): Likewise.
13407         (read_func_scope): Likewise.
13408         (read_call_site_scope): Likewise.
13409         (dwarf2_add_member_fn): Likewise.
13410         (read_common_block): Likewise.
13411         (read_module_type): Likewise.
13412         (read_typedef): Likewise.
13413         (read_subrange_type): Likewise.
13414         (load_partial_dies): Likewise.
13415         (read_partial_die): Likewise.
13416         (find_partial_die): Likewise.
13417         (read_str_index): Likewise.
13418         (dwarf2_string_attr): Likewise.
13419         (build_error_marker_type): Likewise.
13420         (lookup_die_type): Likewise.
13421         (dump_die_shallow): Likewise.
13422         (follow_die_ref): Likewise.
13423         (dwarf2_fetch_die_loc_sect_off): Likewise.
13424         (dwarf2_fetch_constant_bytes): Likewise.
13425         (follow_die_sig): Likewise.
13426         (get_signatured_type): Likewise.
13427         (get_DW_AT_signature_type): Likewise.
13428         (dwarf2_find_containing_comp_unit): Likewise.
13429         (set_die_type): Likewise.
13430
13431 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13432
13433         * arch/aarch64.c: Include "common-defs.h".
13434         * arch/amd64.c: Likewise.
13435         * arch/i386.c: Likewise.
13436
13437 2018-02-21  Tom Tromey  <tom@tromey.com>
13438
13439         * value.h: (extract_field_op): Update.
13440         * eval.c (extract_field_op): Return a const char *.
13441         * expression.h (parse_expression_for_completion): Update.
13442         * completer.c (complete_expression): Update.
13443         (add_struct_fields): Make fieldname const.
13444         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13445         (mark_completion_tag, parse_exp_in_context_1): Update.
13446         (parse_expression_for_completion): Change "name" to
13447         unique_xmalloc_ptr*.
13448
13449 2018-02-21  Tom Tromey  <tom@tromey.com>
13450
13451         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13452
13453 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13454
13455         * avr-tdep.c (avr_read_pc): Change parameter type to
13456         readable_regcache.
13457         * gdbarch.sh (read_pc): Likewise.
13458         * gdbarch.c: Re-generated.
13459         * gdbarch.h: Re-generated.
13460         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13461         readable_regcache.
13462         * ia64-tdep.c (ia64_read_pc): Likewise.
13463         * mips-tdep.c (mips_read_pc): Likewise.
13464         * spu-tdep.c (spu_read_pc): Likewise.
13465
13466 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13467
13468         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13469         * regcache-dump.c: New file.
13470         * regcache.c: Move register_dump to regcache-dump.c.
13471         (maintenance_print_registers): Likewise.
13472         (maintenance_print_raw_registers): Likewise.
13473         (maintenance_print_cooked_registers): Likewise.
13474         (maintenance_print_register_groups): Likewise.
13475         (maintenance_print_remote_registers): Likewise.
13476         (_initialize_regcache): Likewise.
13477         * regcache.h (register_dump): Moved from regcache.c.
13478
13479 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13480
13481         * regcache.c (regcache::regcache): Update.
13482         (regcache::invalidate): Move it to detached_regcache::invalidate.
13483         (get_thread_arch_aspace_regcache): Update.
13484         (regcache::raw_update): Update.
13485         (regcache::cooked_read): Remove some code.
13486         (regcache::cooked_read_value): Likewise.
13487         (regcache::raw_write): Remove assert on m_readonly_p.
13488         (regcache::raw_supply_integer): Move it to
13489         detached_regcache::raw_supply_integer.
13490         (regcache::raw_supply_zeroed): Likewise.
13491         * regcache.h (detached_regcache) <raw_supply_integer>: New
13492         declaration.
13493         <raw_supply_zeroed, invalidate>: Likewise.
13494         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13495         <invalidate>: Likewise.
13496         <m_readonly_p>: Removed.
13497
13498 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13499
13500         * infcmd.c (get_return_value): Let stop_regs point to
13501         get_current_regcache.
13502         * regcache.c (regcache::regcache): Remove.
13503         (register_dump_reg_buffer): New class.
13504         (regcache_print): Adjust.
13505         * regcache.h (regcache): Remove constructors.
13506
13507 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13508
13509         * regcache.c (class register_dump): New class.
13510         (register_dump_regcache, register_dump_none): New class.
13511         (register_dump_remote, register_dump_groups): New class.
13512         (regcache_print): Update.
13513         * regcache.h (regcache_dump_what): Move it to regcache.c.
13514         (regcache) <dump>: Remove.
13515
13516 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13517
13518         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13519          reg_buffer_rw *.
13520         (jit_unwind_reg_set_impl): Call raw_supply.
13521         (jit_frame_sniffer): Use reg_buffer_rw.
13522         * record-full.c (record_full_core_regbuf): Change its type.
13523         (record_full_core_open_1): Use reg_buffer_rw.
13524         (record_full_close): Likewise.
13525         (record_full_core_fetch_registers): Use regcache->raw_supply.
13526         (record_full_core_store_registers): Likewise.
13527         * regcache.c (regcache::get_register_status): Move it to
13528         reg_buffer.
13529         (regcache_raw_set_cached_value): Remove.
13530         (regcache::raw_set_cached_value): Remove.
13531         (regcache::raw_write): Call raw_supply.
13532         (regcache::raw_supply): Move it to reg_buffer_rw.
13533         * regcache.h (regcache_raw_set_cached_value): Remove.
13534         (reg_buffer_rw): New class.
13535
13536 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13537
13538         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13539         readonly_detached_regcache.
13540         (dummy_frame_prev_register): Use regcache->cooked_read.
13541         * frame.c (frame_save_as_regcache): Change return type.
13542         (frame_pop): Update.
13543         * frame.h (frame_save_as_regcache): Update declaration.
13544         * inferior.h (get_infcall_suspend_state_regcache): Update
13545         declaration.
13546         * infrun.c (infcall_suspend_state) <registers>: use
13547         readonly_detached_regcache.
13548         (save_infcall_suspend_state): Don't use regcache_dup.
13549         (get_infcall_suspend_state_regcache): Change return type.
13550         * linux-fork.c (struct fork_info) <savedregs>: Change to
13551         readonly_detached_regcache.
13552         <pc>: New field.
13553         (fork_save_infrun_state): Don't use regcache_dup.
13554         (info_checkpoints_command): Adjust.
13555         * mi/mi-main.c (register_changed_p): Update declaration.
13556         (mi_cmd_data_list_changed_registers): Use
13557         readonly_detached_regcache.
13558         (register_changed_p): Change parameter type to
13559         readonly_detached_regcache.
13560         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13561         readonly_detached_regcache.
13562         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13563         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13564         New.
13565         (regcache::save): Move it to reg_buffer.
13566         (regcache::restore): Change parameter type.
13567         (regcache_dup): Remove.
13568         * regcache.h (reg_buffer) <save>: New method.
13569         (readonly_detached_regcache): New class.
13570         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13571         readonly_detached_regcache.
13572         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13573
13574 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13575
13576         * frame.c (frame_save_as_regcache): Use regcache method save.
13577         (frame_pop): Use regcache method restore.
13578         * infrun.c (restore_infcall_suspend_state): Likewise.
13579         * linux-fork.c (fork_load_infrun_state): Likewise.
13580         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13581         save.
13582         * regcache.c (regcache_save): Remove.
13583         (regcache::restore): More asserts.
13584         (regcache_cpy): Remove.
13585         * regcache.h (regcache_save): Remove the declaration.
13586         (regcache::restore): Move from private to public.
13587         Remove the friend declaration of regcache_cpy.
13588         (regcache_cpy): Remove declaration.
13589
13590 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13591
13592         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13593         parameter type to 'readable_regcache *'.
13594         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13595         * arm-tdep.c (arm_neon_quad_read): Likewise.
13596         (arm_pseudo_read): Likewise.
13597         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13598         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13599         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13600         * gdbarch.c: Re-generated.
13601         * gdbarch.h: Re-generated.
13602         * gdbarch.sh (pseudo_register_read): Change parameter type to
13603         'readable_regcache *'.
13604         (pseudo_register_read_value): Likewise.
13605         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13606         (h8300_pseudo_register_read): Likewise.
13607         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13608         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13609         (i386_pseudo_register_read_into_value): Likewise.
13610         (i386_pseudo_register_read_value): Likewise.
13611         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13612         declaration.
13613         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13614         * m32c-tdep.c (m32c_raw_read): Likewise.
13615         (m32c_read_flg): Likewise.
13616         (m32c_banked_register): Likewise.
13617         (m32c_banked_read): Likewise.
13618         (m32c_sb_read): Likewise.
13619         (m32c_part_read): Likewise.
13620         (m32c_cat_read): Likewise.
13621         (m32c_r3r2r1r0_read): Likewise.
13622         (m32c_pseudo_register_read): Likewise.
13623         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13624         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13625         (mep_pseudo_cr64_read): Likewise.
13626         (mep_pseudo_register_read): Likewise.
13627         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13628         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13629         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13630         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13631         (regcache::cooked_read): Likewise.
13632         (regcache::cooked_read_value): Likewise.
13633         (regcache_cooked_read_signed):
13634         (regcache::cooked_read): Likewise.
13635         * regcache.h (readable_regcache): New class.
13636         (regcache): Inherit readable_regcache.  Move some methods to
13637         readable_regcache.
13638         * rl78-tdep.c (rl78_pseudo_register_read): Change
13639         parameter type to 'readable_regcache *'.
13640         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13641         (e500_pseudo_register_read): Change parameter type to
13642         'readable_regcache *'.
13643         (dfp_pseudo_register_read): Likewise.
13644         (vsx_pseudo_register_read): Likewise.
13645         (efpr_pseudo_register_read): Likewise.
13646         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13647         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13648         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13649         (sh64_pseudo_register_read): Likewise.
13650         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13651         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13652         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13653         (spu_pseudo_register_read): Likewise.
13654         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13655         (xtensa_pseudo_register_read): Likewise.
13656
13657 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13658
13659         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13660         (regcache::arch): Move it to reg_buffer::arch.
13661         (regcache::register_buffer): Likewise.
13662         (regcache::assert_regnum): Likewise.
13663         (regcache::num_raw_registers): Likewise.
13664         * regcache.h (reg_buffer): New class.
13665         (regcache): Inherit reg_buffer.
13666
13667 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13668
13669         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13670         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13671
13672 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13673
13674         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13675
13676 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13677
13678         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13679         (SFILES): Remove common/*.c files.
13680         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13681         * common/common.host: Add common reference.
13682         * configure.ac: Likewise.
13683         * configure: Regenerate.
13684
13685 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13686
13687         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13688         (block_initialize_namespace): Use new.
13689         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13690         (dwarf2_free_objfile): Use delete.
13691         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13692         (copy_type_recursive): Use new.
13693         * gdb_obstack.h (allocate_on_obstack): New.
13694
13695 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13696
13697         PR gdb/22849
13698         * inferior.c (exit_inferior_1): Reset inf->control.
13699
13700 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13701
13702         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13703         declaration.
13704
13705 2018-02-14  Pedro Alves  <palves@redhat.com>
13706
13707         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13708         frame_cleanup_after_sniffer on exception.
13709
13710 2018-02-14  Tom Tromey  <tom@tromey.com>
13711
13712         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13713         const.
13714         (solib_bfd_open): Make pathname const.
13715         * solib.c (solib_bfd_open): Make pathname const.
13716         * solib-spu.c (spu_bfd_fopen): Make name const.
13717         (spu_bfd_open): Make pathname const.
13718         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13719         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13720
13721 2018-02-14  Tom Tromey  <tom@tromey.com>
13722
13723         * symfile.c (symfile_bfd_open): Update.
13724         * source.h (openp, source_full_path_of, find_and_open_source):
13725         Change argument type to unique_xmalloc_ptr.
13726         * source.c (openp): Take a unique_xmalloc_ptr.
13727         (source_full_path_of, find_and_open_source): Likewise.
13728         (open_source_file, symtab_to_fullname): Update.
13729         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13730         unique_xmalloc_ptr.
13731         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13732         (exec_file_find): Update.
13733         * psymtab.c (psymtab_to_fullname): Update.
13734         * nto-tdep.h (nto_find_and_open_solib): Update.
13735         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13736         unique_xmalloc_ptr.
13737         * exec.c (exec_file_attach): Update.
13738         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13739         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13740
13741 2018-02-14  Tom Tromey  <tom@tromey.com>
13742
13743         * solib.c: Include source.h.
13744         * nto-tdep.c: Include source.h.
13745         * mi/mi-cmd-env.c: Include source.h.
13746         * infcmd.c: Include source.h.
13747         * exec.c: Include source.h.
13748         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13749         (add_path, directory_switch, source_path, init_source_path): Move
13750         declarations...
13751         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13752         (add_path, directory_switch, source_path, init_source_path):
13753         ...here.
13754
13755 2018-02-14  Tom Tromey  <tom@tromey.com>
13756
13757         * solist.h (exec_file_find, solib_find): Return
13758         unique_xmalloc_ptr.
13759         (solib_bfd_fopen): Take a const char *.
13760         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13761         (exec_file_find, solib_find): Likewise.
13762         (solib_bfd_fopen): Do not take ownership of "pathname".
13763         (solib_bfd_open): Use unique_xmalloc_ptr.
13764         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13765         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13766         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13767         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13768
13769 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13770
13771         * ada-lang.c (name_match_type_from_name): Remove reference to
13772         ada_name_for_lookup in function's documentation.
13773         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13774
13775 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13776
13777         * defs.h (enum openp_flags): New enum.
13778         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13779         Move to enum openp_flags.
13780         (openp_flags): New enum flags.
13781         (openp): Change parameter type to openp_flags.
13782         * source.c (openp): Change parameter type to openp_flags.
13783         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13784         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13785
13786 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13787
13788         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13789         per-command.
13790
13791 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13792
13793         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13794         into...
13795         (class dwarf2_queue_guard): ...the destructor of this new class.
13796         (dw2_do_instantiate_symtab): Create instance of the new class
13797         dwarf2_queue_guard, remove cleanup.
13798
13799 2018-02-09  Tom Tromey  <tom@tromey.com>
13800
13801         * source.c (find_source_lines): Don't reference past the end of
13802         the vector.
13803
13804 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13805
13806         * remote.c (remote_btrace_maybe_reopen): Change error message.
13807         * btrace.c (btrace_enable): Likewise.
13808         (parse_xml_btrace): Likewise.
13809         (parse_xml_btrace_conf): Likewise.
13810
13811 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13812
13813         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13814         (linux_enable_pt, linux_enable_bts): Call
13815         diagnose_perf_event_open_fail.
13816
13817 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13818
13819         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13820         Remove parameter and change return type.  Update callers.  Move it.
13821         (linux_enable_bts, linux_enable_pt): Improve error message.
13822         (linux_enable_pt): Remove zero buffer size check.
13823         (linux_enable_btrace): Improve error messages.  Remove NULL return
13824         check.
13825
13826 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13827
13828         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13829         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13830         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13831         (linux_supports_pt, linux_supports_btrace): Remove.
13832         (linux_enable_bts): Call cpu_supports_bts.
13833         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13834         * remote.c (remote_supports_btrace): Remove.
13835         (init_remote_ops): Remove remote_supports_btrace.
13836         * target-delegates.c: Regenerated.
13837         * target.c (target_supports_btrace): Remove.
13838         * target.h (target_ops) <to_supports_btrace>: Remove
13839         (target_supports_btrace): Remove.
13840         * x86-linux-nat.c (x86_linux_create_target): Remove
13841         linux_supports_btrace.
13842
13843 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13844
13845         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13846         btrace failed.
13847         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13848         exception and use message in own exception.
13849
13850 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13851
13852         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13853         (perf_event_pt_event_type): Use gdb_file_up.
13854         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13855         scoped_fd, and scoped_mmap.
13856
13857 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13858
13859         * common/scoped_mmap.h: New.
13860         * unittests/scoped_mmap-selftest.c: New.
13861         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13862         unittests/scoped_mmap-selftest.c.
13863
13864 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13865
13866         * common/scoped_fd.h: New.
13867         * unittests/scoped_fd-selftest.c: New.
13868         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13869         unittests/scoped_fd-selftest.c.
13870
13871 2018-02-09  Tom Tromey  <tom@tromey.com>
13872
13873         * auto-load.c (auto_load_section_scripts): Use
13874         gdb::unique_xmalloc_ptr.
13875
13876 2018-02-09  Tom Tromey  <tom@tromey.com>
13877
13878         * auto-load.c (execute_script_contents): Use std::string.
13879
13880 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13881
13882         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13883         Python function, rather than a new command.
13884
13885 2018-02-08  Tom Tromey  <tom@tromey.com>
13886
13887         * solib.c (solib_find_1): Use std::string.
13888         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13889
13890 2018-02-08  Tom Tromey  <tom@tromey.com>
13891
13892         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13893
13894 2018-02-08  Tom Tromey  <tom@tromey.com>
13895
13896         * source.c (find_source_lines): Use gdb::def_vector.
13897
13898 2018-02-08  Tom Tromey  <tom@tromey.com>
13899
13900         * macrocmd.c (struct temporary_macro_definition): New.
13901         (macro_define_command): Use temporary_macro_definition.  Remove
13902         cleanups.
13903         (free_macro_definition_ptr): Remove.
13904
13905 2018-02-08  Tom Tromey  <tom@tromey.com>
13906
13907         * macroexp.c (maybe_expand): Use std::string.
13908
13909 2018-02-08  Tom Tromey  <tom@tromey.com>
13910
13911         * macroexp.c (struct macro_buffer): Add initializers for some
13912         members.
13913         (init_buffer, init_shared_buffer, free_buffer)
13914         (free_buffer_return_text): Remove.
13915         (macro_buffer): New constructors.
13916         (~macro_buffer): New destructor.
13917         (macro_buffer::set_shared): New method.
13918         (macro_buffer::resize_buffer, macro_buffer::appendc)
13919         (macro_buffer::appendmem): Now methods, not free functions.
13920         (set_token, append_tokens_without_splicing, stringify)
13921         (macro_stringify): Update.
13922         (gather_arguments): Change return type.  Remove argc_p argument,
13923         add args_ptr argument.  Use std::vector.
13924         (substitute_args): Remove argc argument.  Accept std::vector.
13925         (expand): Update.  Use std::vector.
13926         (scan, macro_expand, macro_expand_next): Update.
13927
13928 2018-02-08  Tom Tromey  <tom@tromey.com>
13929
13930         * symtab.c (default_collect_symbol_completion_matches_break_on):
13931         Use unique_xmalloc_ptr.
13932         * macroscope.h: (sal_macro_scope, user_macro_scope)
13933         (default_macro_scope): Return unique_xmalloc_ptr.
13934         * macroscope.c (sal_macro_scope, user_macro_scope)
13935         (default_macro_scope): Return unique_xmalloc_ptr.
13936         * macroexp.h (macro_expand, macro_expand_once): Return
13937         unique_xmalloc_ptr.
13938         * macroexp.c (macro_expand, macro_expand_once): Return
13939         unique_xmalloc_ptr.
13940         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13941         (info_macro_command, info_macros_command): Use
13942         unique_xmalloc_ptr.
13943         * compile/compile-c-support.c (write_macro_definitions): Use
13944         unique_xmalloc_ptr.
13945         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13946
13947 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13948
13949         * value.c (value_static_field): Assign field type instead of
13950         containing type when returning an optimized out value.
13951
13952 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13953
13954         * ft32-tdep.c (ft32_read_pc): Remove.
13955         (ft32_write_pc): Remove.
13956         (ft32_gdbarch_init): Update.
13957         * m32r-tdep.c (m32r_read_pc): Remove.
13958         (m32r_gdbarch_init): Update.
13959         * mep-tdep.c (mep_read_pc): Remove.
13960         (mep_gdbarch_init): Update.
13961         * microblaze-tdep.c (microblaze_write_pc): Remove.
13962         (microblaze_gdbarch_init): Update.
13963         * mn10300-tdep.c (mn10300_read_pc): Remove.
13964         (mn10300_write_pc): Remove.
13965         (mn10300_gdbarch_init): Update.
13966         * moxie-tdep.c (moxie_read_pc): Remove.
13967         (moxie_write_pc): Remove.
13968         (moxie_gdbarch_init): Update.
13969
13970 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13971
13972         * expprint.c (print_subexp_standard): Handle
13973         OP_F77_UNDETERMINED_ARGLIST.
13974         (dump_subexp_body_standard): Likewise.
13975
13976 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13977
13978         * target-descriptions.c (tdesc_element_visitor) Add empty
13979         implementations.
13980         (tdesc_type): Move make_gdb_type from here.
13981         (tdesc_type_builtin): Likewise.
13982         (tdesc_type_vector): Likewise.
13983         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13984         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13985         (make_gdb_type_union): Likewise.
13986         (make_gdb_type_flags): Likewise.
13987         (make_gdb_type_enum): Likewise.
13988         (make_gdb_type): New function.
13989         (tdesc_register_type): Use static make_gdb_type.
13990
13991 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13992
13993         * infcmd.c (default_print_one_register_info): Align natural-format
13994         column values consistently one under another.
13995         (pad_to_column): New function.
13996
13997 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13998
13999         * dwarf2read.c (dwarf2_physname): Move commment.
14000
14001 2018-02-01  Leszek Swirski  <leszeks@google.com>
14002
14003         * varobj.c (varobj_formatted_print_options): Allow recursive
14004         pretty printing if pretty printing is enabled.
14005
14006 2018-02-01  Leszek Swirski  <leszeks@google.com>
14007
14008         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
14009         names after a structop as a filename.
14010
14011 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14012
14013         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
14014         (arm_record_coproc_data_proc): Likewise.
14015
14016 2018-02-01  Yao Qi  <yao.qi@linaro.org>
14017
14018         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
14019
14020 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
14021
14022         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
14023         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
14024
14025 2018-01-31  Pedro Alves  <palves@redhat.com>
14026
14027         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
14028         * inflow.c (child_terminal_save_inferior): Wrap reference to
14029         tcgetpgrp in HAVE_TERMIOS_H.
14030         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
14031         _WIN32.
14032         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
14033         always iterate over all inferiors.
14034         (gdbsim_cntrl_c): Adjust.
14035         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
14036
14037 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14038
14039         * gdbtypes.c (lookup_array_range_type): Make sure the array's
14040         index type is objfile-owned if the element type is as well.
14041
14042 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
14043
14044         GDB 8.1 released.
14045
14046 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14047
14048         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
14049         "features/s390x-linux64.c".
14050         (_initialize_s390_linux_tdep): Remove initialization of tdescs
14051         s390_linux32 and s390x_linux64.
14052         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
14053         default tdesc.
14054         * s390-tdep.c: Include "features/s390-linux32.c" and
14055         "features/s390x-linux64.c".
14056         (s390_tdesc_valid): Add check for tdesc_has_registers.
14057         (s390_gdbarch_init): Make sure there is always a valid tdesc.
14058         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
14059         tdesc_s390x_linux64.
14060         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
14061         tdesc_s390x_linux64 to...
14062         * s390-tdep.h: ...here.
14063
14064 2018-01-30  Pedro Alves  <palves@redhat.com>
14065
14066         PR gdb/13211
14067         * config.in, configure: Regenerate.
14068         * configure.ac: Check for getpgid.
14069         * go32-nat.c (go32_pass_ctrlc): New.
14070         (go32_target): Install it.
14071         * inf-child.c (inf_child_target): Install
14072         child_terminal_save_inferior, child_pass_ctrlc and
14073         child_interrupt.
14074         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
14075         (inf_ptrace_target): No longer install it.
14076         * infcmd.c (interrupt_target_1): Adjust.
14077         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
14078         (child_interrupt): Declare.
14079         (inferior::terminal_state): New.
14080         * inflow.c (struct terminal_info): Update comments.
14081         (inferior_process_group): Delete.
14082         (terminal_is_ours): Delete.
14083         (gdb_tty_state): New.
14084         (child_terminal_init): Adjust.
14085         (is_gdb_terminal, sharing_input_terminal_1)
14086         (sharing_input_terminal): New functions.
14087         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
14088         Set the process's actual process group in the foreground if
14089         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
14090         mark terminal as the inferior's if not sharing GDB's terminal.
14091         Don't check attach_flag.
14092         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
14093         pass down a target_terminal_state.
14094         (child_terminal_save_inferior): New, factored out from ...
14095         (child_terminal_ours_1): ... this.  Handle
14096         target_terminal_state::is_ours_for_output.
14097         (child_interrupt, child_pass_ctrlc): New.
14098         (inflow_inferior_exit): Clear the inferior's terminal_state.
14099         (copy_terminal_info): Copy the inferior's terminal state.
14100         (_initialize_inflow): Remove reference to terminal_is_ours.
14101         * inflow.h (inferior_process_group): Delete.
14102         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
14103         * procfs.c (procfs_target): Don't install procfs_interrupt.
14104         (procfs_interrupt): Delete.
14105         * remote.c (remote_serial_quit_handler): Adjust.
14106         (remote_interrupt): Remove ptid parameter.  Adjust.
14107         * target-delegates.c: Regenerate.
14108         * target.c: Include "terminal.h".
14109         (target_terminal::terminal_state): Rename to ...
14110         (target_terminal::m_terminal_state): ... this.
14111         (target_terminal::init): Adjust.
14112         (target_terminal::inferior): Adjust to per-inferior
14113         terminal_state.
14114         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
14115         (target_terminal::ours, target_terminal::ours_for_output): Use
14116         target_terminal_is_ours_kind.
14117         (target_interrupt): Remove ptid parameter.  Adjust.
14118         (default_target_pass_ctrlc): Adjust.
14119         * target.h (target_ops::to_terminal_save_inferior): New field.
14120         (target_ops::to_interrupt): Remove ptid_t parameter.
14121         (target_interrupt): Remove ptid_t parameter.  Update comment.
14122         (target_pass_ctrlc): Update comment.
14123         * target/target.h (target_terminal_state): New scoped enum,
14124         factored out of ...
14125         (target_terminal::terminal_state): ... here.
14126         (target_terminal::inferior): Update comments.
14127         (target_terminal::restore_inferior): New.
14128         (target_terminal::is_inferior, target_terminal::is_ours)
14129         (target_terminal::is_ours_for_output): Adjust.
14130         (target_terminal::scoped_restore_terminal_state): Adjust to
14131         rename, and call restore_inferior() instead of inferior().
14132         (target_terminal::scoped_restore_terminal_state::m_state): Change
14133         type.
14134         (target_terminal::terminal_state): Rename to ...
14135         (target_terminal::m_terminal_state): ... this and change type.
14136
14137 2018-01-30  Pedro Alves  <palves@redhat.com>
14138
14139         * linux-nat.c (wait_for_signal): New function.
14140         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
14141         directly.
14142         (async_terminal_is_ours)
14143         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
14144         (linux_nat_add_target): Don't override
14145         to_terminal_inferior/to_terminal_ours.
14146
14147 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
14148
14149         * remote.c (remote_follow_fork): Don't call "detach_inferior".
14150
14151 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
14152
14153         * dwarf2read.c (free_dwo_files): Add forward-declaration.
14154         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
14155         dwarf2_per_objfile_free here.
14156         (dwarf2_per_objfile_free): Remove.
14157         (_initialize_dwarf2_read): Don't register
14158         dwarf2_per_objfile_free as a registry cleanup.
14159
14160 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
14161
14162         Avoid compilation errors in MinGW native builds
14163
14164         The error is triggered by including python-internal.h, and the
14165         error message is:
14166
14167              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
14168                       from build-gnulib/import/math.h:27,
14169                       from d:/usr/Python26/include/pyport.h:235,
14170                       from d:/usr/Python26/include/Python.h:58,
14171                       from python/python-internal.h:94,
14172                       from python/py-arch.c:24:
14173              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
14174         using ::hypot;
14175                 ^~~~~
14176
14177         This happens because Python headers define 'hypot' to expand t
14178         '_hypot' in the Windows builds.
14179         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
14180         'hypoth'.  This avoids a compilation error.
14181
14182 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14183
14184         * MAINTAINERS (Write After Approval): Fix ordering.
14185
14186 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
14187
14188         * MAINTAINERS (Write After Approval): Add Alan Hayward.
14189
14190 2018-01-26  Alan Modra  <amodra@gmail.com>
14191
14192         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
14193         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
14194         Remove nop.  Make const.  Comment.
14195         (powerpc32_plt_stub_so_2): New.
14196         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
14197         Correct count.  Update uses.
14198         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
14199         Move common code reading PLT entry word.  Correct
14200         powerpc32_plt_stub PLT address calculation.
14201         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14202         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14203         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14204         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14205         (ppc64_standard_linkage8): Likewise.
14206         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14207         Correct insns description.
14208         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14209
14210 2018-01-24  Pedro Alves  <palves@redhat.com>
14211
14212         GCC PR libstdc++/83906
14213         * gdbtypes.c (operator==(const dynamic_prop &,
14214         const dynamic_prop &)): New.
14215         (operator==(const range_bounds &, const range_bounds &)): New.
14216         (check_types_equal): Use them instead of memcmp.
14217         * gdbtypes.h (operator==(const dynamic_prop &,
14218         const dynamic_prop &)): Declare.
14219         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14220         (operator==(const range_bounds &, const range_bounds &)): Declare.
14221         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14222
14223 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14224
14225         * s390-linux-tdep.c (s390_record_address_mask)
14226         (s390_record_calc_disp_common, s390_record_calc_disp)
14227         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14228         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14229         (s390_process_record): Move to s390-tdep.c.
14230         (s390_linux_init_abi_any): Adjust.
14231         * s390-tdep.c (s390_record_address_mask)
14232         (s390_record_calc_disp_common, s390_record_calc_disp)
14233         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14234         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14235         (s390_process_record): Moved from s390-linux-tdep.c
14236         (s390_gdbarch_init): Adjust.
14237
14238 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14239
14240         * s390-linux-nat.c (s390-tdep.h): New include.
14241         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14242         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14243         (ALLDEPFILES): Add s390-tdep.c.
14244         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14245         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14246         * s390-tdep.h: ...this.  New file.
14247         * s390-linux-tdep.c (s390-tdep.h): New include.
14248         (_initialize_s390_tdep): Rename to...
14249         (_initialize_s390_linux_tdep): ...this and adjust.
14250         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14251         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14252         s390-tdep.h.
14253         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14254         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14255         (s390_is_partial_instruction, s390_software_single_step)
14256         (is_non_branch_ril, s390_displaced_step_copy_insn)
14257         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14258         (s390_prologue_data, s390_addr, s390_store, s390_load)
14259         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14260         (s390_register_call_saved, s390_guess_tracepoint_registers)
14261         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14262         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14263         (s390_pseudo_register_name, s390_pseudo_register_type)
14264         (s390_pseudo_register_read, s390_pseudo_register_write)
14265         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14266         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14267         (s390_addr_bits_remove, s390_address_class_type_flags)
14268         (s390_address_class_type_flags_to_name)
14269         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14270         (s390_function_arg_float, s390_function_arg_vector)
14271         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14272         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14273         (s390_frame_align, s390_register_return_value, s390_return_value)
14274         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14275         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14276         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14277         (s390_trad_frame_prev_register, s390_unwind_cache)
14278         (s390_prologue_frame_unwind_cache)
14279         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14280         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14281         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14282         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14283         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14284         (s390_frame_base_address, s390_local_base_address)
14285         (s390_frame_base, s390_gcc_target_options)
14286         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14287         (s390_validate_reg_range, s390_tdesc_valid)
14288         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14289         * s390-tdep.c: ...this.  New file.
14290
14291 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14292
14293         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14294         (s390_process_record, s390_gdbarch_tdep_alloc)
14295         (s390_linux_init_abi_any): Use/set new hook.
14296
14297 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14298
14299         * s390-linux-tdep.c (osabi.h): New include.
14300         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14301         (s390_linux_init_abi_any): New functions.
14302         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14303
14304 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14305
14306         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14307         tdesc_has_registers check
14308
14309 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14310
14311         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14312         (s390_validate_reg_range): New macro.
14313         (s390_gdbarch_init): Adjust.
14314
14315 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14316
14317         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14318         (s390_gdbarch_tdep_alloc): Adjust.
14319         (s390_gdbarch_init): Adjust.
14320
14321 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14322
14323         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14324         <have_tdb>: Change type to bool.
14325         (s390_gdbarch_tdep_alloc): Adjust.
14326         (s390_gdbarch_init): Adjust.
14327
14328 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14329
14330         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14331         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14332         (s390_gdbarch_tdep_alloc): New function.
14333         (s390_gdbarch_init): Allocate tdep at start and use its fields
14334         instead of separate variables.
14335
14336 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14337
14338         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14339         when looking for cached gdbarch and add comment for remaining.
14340
14341 2018-01-22  Pedro Alves  <palves@redhat.com>
14342             Sergio Durigan Junior  <sergiodj@redhat.com>
14343
14344         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14345         case.
14346
14347 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14348
14349         * MAINTAINERS: Update my company e-mail address.
14350
14351 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14352
14353         * regcache.c (cooked_write_test): New function.
14354         (_initialize_regcache): Register the test.
14355
14356 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14357
14358         * ia64-tdep.c (ia64_pseudo_register_read): Call
14359         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14360         * m32c-tdep.c (m32c_cat_read): Likewise.
14361         (m32c_r3r2r1r0_read): Likewise.
14362         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14363         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14364
14365 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14366
14367         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14368         method raw_read instead of regcache_raw_read.
14369         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14370         * arm-tdep.c (arm_neon_quad_read): Likewise.
14371         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14372         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14373         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14374         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14375         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14376         (i386_pseudo_register_read_into_value): Likewise.
14377         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14378         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14379         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14380         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14381         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14382         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14383         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14384         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14385         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14386
14387 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14388
14389         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14390         * configure.tgt: Remove target mt.
14391         * mt-tdep.c: Remove.
14392         * regcache.c (cooked_read_test): Remove the check for mt.
14393
14394 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14395
14396         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14397         instead of gdbarch_pseudo_register_read_value.
14398
14399 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14400
14401         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14402         language is Ada.
14403
14404 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14405
14406         * linespec.c (create_sals_line_offset): Remove code that preserved
14407         the symtab_and_line's line number.
14408
14409 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14410
14411         * varobj.c (varobj_create): Don't set valid_block when creating a
14412         floating varobj.
14413
14414 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14415
14416         * varobj.c (varobj_create): Remove out of date comment.
14417
14418 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14419
14420         PR mi/20395
14421         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14422         updating innermost block.
14423         * parse.c (innermost_block_tracker::update): Take extra type
14424         parameter, and check types match before updating innermost block.
14425         (write_dollar_variable): Update innermost block for registers.
14426         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14427         (innermost_block_tracker::innermost_block_tracker): Initialise
14428         m_types member.
14429         (innermost_block_tracker::reset): Take type parameter.
14430         (innermost_block_tracker::update): Take type parameter, and pass
14431         type through as needed.
14432         (innermost_block_tracker::m_types): New member.
14433         * varobj.c (varobj_create): Pass type when reseting innermost
14434         block.
14435
14436 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14437
14438         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14439         * ada-lang.c (resolve_subexp): Likewise.
14440         * breakpoint.c (set_breakpoint_condition) Likewise.
14441         (watch_command_1) Likewise.
14442         * c-exp.y (variable): Likewise.
14443         * d-exp.y (PrimaryExpression): Likewise.
14444         * f-exp.y (variable): Likewise.
14445         * go-exp.y (variable): Likewise.
14446         * m2-exp.y (variable): Likewise.
14447         * objfiles.c (objfile::~objfile): Likewise.
14448         * p-exp.y (variable): Likewise.
14449         * parse.c (innermost_block): Change type.
14450         * parser-defs.h (class innermost_block_tracker): New.
14451         (innermost_block): Change to innermost_block_tracker.
14452         * printcmd.c (display_command): Switch to innermost_block API.
14453         (do_one_display): Likewise.
14454         * rust-exp.y (do_one_display): Likewise.
14455         * symfile.c (clear_symtab_users): Likewise.
14456         * varobj.c (varobj_create): Switch to innermost_block API, replace
14457         use of innermost_block with block stored on varobj object.
14458
14459 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14460
14461         * expression.h (innermost_block): Remove declaration.
14462         * varobj.c: Add 'parser-defs.h' include.
14463
14464 2018-01-19  Tom Tromey  <tom@tromey.com>
14465
14466         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14467         symbols in the static and global blocks.
14468
14469 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14470
14471         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14472         gdb_ptrace.h, and move including gdb_wait.h ...
14473         * nat/linux-ptrace.h: ... to here.
14474
14475 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14476
14477         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14478         inf_ptrace_detach_success.
14479         (inf_ptrace_detach_success): Add inferior parameter, use it
14480         instead of inferior_ptid, pass it to detach_inferior.
14481         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14482         parameter.
14483         * inferior.c (detach_inferior): Add overload that takes an
14484         inferior object.
14485         * inferior.h (detach_inferior): Likewise.
14486         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14487         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14488         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14489
14490 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14491
14492         * target.h (struct target_ops) <to_detach>: Add inferior
14493         parameter.
14494         (target_detach): Likewise.
14495         * target.c (dispose_inferior): Pass inferior down.
14496         (target_detach): Pass inferior down.  Assert that it is equal to
14497         the current inferior.
14498         * aix-thread.c (aix_thread_detach): Pass inferior down.
14499         * corefile.c (core_file_command): Pass current_inferior() down.
14500         * corelow.c (core_detach): Add inferior parameter.
14501         * darwin-nat.c (darwin_detach): Likewise.
14502         * gnu-nat.c (gnu_detach): Likewise.
14503         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14504         * infcmd.c (detach_command): Pass current_inferior() down to
14505         target_detach.
14506         * infrun.c (follow_fork_inferior): Pass parent_inf to
14507         target_detach.
14508         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14509         target_detach.
14510         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14511         * linux-thread-db.c (thread_db_detach): Likewise.
14512         * nto-procfs.c (procfs_detach): Likewise.
14513         * procfs.c (procfs_detach): Likewise.
14514         * record.c (record_detach): Likewise.
14515         * record.h (struct inferior): Forward-declare.
14516         (record_detach): Add inferior parameter.
14517         * remote-sim.c (gdbsim_detach): Likewise.
14518         * remote.c (remote_detach_1): Likewise.
14519         (remote_detach): Likewise.
14520         (extended_remote_detach): Likewise.
14521         * sol-thread.c (sol_thread_detach): Likewise.
14522         * target-debug.h (target_debug_print_inferior_p): New macro.
14523         * target-delegates.c: Re-generate.
14524         * top.c (kill_or_detach): Pass inferior down to target_detach.
14525         * windows-nat.c (windows_detach): Add inferior parameter.
14526
14527 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14528
14529         * target.h (struct target_ops) <to_detach>: Remove args
14530         parameter.
14531         (target_detach): Likewise.
14532         * target.c (dispose_inferior): Adjust.
14533         (target_detach): Remove args parameter, adjust.
14534         * aix-thread.c (aix_thread_detach): Adjust.
14535         * corefile.c (core_file_command): Adjust.
14536         * corelow.c (core_detach): Adjust.
14537         * darwin-nat.c (darwin_detach): Adjust.
14538         * gnu-nat.c (gnu_detach): Adjust.
14539         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14540         * infcmd.c (detach_command): Adjust
14541         * infrun.c (follow_fork_inferior): Adjust.
14542         (handle_vfork_child_exec_or_exit): Adjust.
14543         * linux-fork.c (linux_fork_detach): Remove args parameter.
14544         * linux-fork.h (linux_fork_detach): Likewise.
14545         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14546         * linux-thread-db.c (thread_db_detach): Likewise.
14547         * nto-procfs.c (procfs_detach): Likewise.
14548         * procfs.c (procfs_detach): Likewise.
14549         (do_detach): Remove signo parameter.
14550         * record.c (record_detach): Remove args parameter.
14551         * record.h (record_detach): Likewise.
14552         * remote-sim.c (gdbsim_detach): Likewise.
14553         * remote.c (remote_detach_1): Likewise.
14554         (remote_detach): Likewise.
14555         (extended_remote_detach): Likewise.
14556         * sol-thread.c (sol_thread_detach): Likewise.
14557         * target-delegates.c: Re-generate.
14558         * top.c (struct qt_args) <args>: Remove field.
14559         (kill_or_detach): Don't pass args.
14560         (quit_force): Don't set args.
14561         * windows-nat.c (windows_detach): Remove args parameter.
14562
14563 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14564
14565         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14566         (arm_linux_init_abi): Install it.
14567
14568 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14569
14570         * osabi.c (gdb_osabi_names): Extend the regexp for
14571         arm-linux-gnueabihf.
14572
14573 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14574
14575         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14576         m_abbrevs.
14577         (abbrev_table::add_abbrev): Update.
14578         (abbrev_table::lookup_abbrev): Update.
14579
14580 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14581
14582         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14583
14584 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14585
14586         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14587         to "std::string".
14588
14589 2018-01-17  Tom Tromey  <tom@tromey.com>
14590
14591         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14592
14593 2018-01-17  Tom Tromey  <tom@tromey.com>
14594
14595         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14596         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14597         (create_array_type_with_stride): Update.
14598         * dwarf2read.c (set_die_type): Update.
14599
14600 2018-01-17  Tom Tromey  <tom@tromey.com>
14601
14602         * dwarf2read.c (delayed_method_info): Remove typedef.
14603         (dwarf2_cu::method_info): Now a std::vector.
14604         (add_to_method_list): Update.
14605         (free_delayed_list): Remove.
14606         (compute_delayed_physnames): Update.
14607         (process_full_comp_unit, process_full_type_unit): Clear the method
14608         list.  Remove cleanups.
14609         (psymtab_include_file_name): Add name_holder parameter.  Use
14610         unique_xmalloc_ptr.
14611         (dwarf_decode_lines): Update.
14612
14613 2018-01-17  Tom Tromey  <tom@tromey.com>
14614             Simon Marchi  <simon.marchi@ericsson.com>
14615
14616         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14617         (dwarf2_per_objfile::free_cached_comp_units)
14618         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14619         (init_cutu_and_read_dies_no_follow): Update.
14620         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14621         (dwarf2_cu::~dwarf2_cu): New.
14622         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14623         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14624
14625 2018-01-17  Tom Tromey  <tom@tromey.com>
14626             Simon Marchi  <simon.marchi@ericsson.com>
14627
14628         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14629         (struct die_reader_specs) <abbrev_table>: New member.
14630         (struct abbrev_table): Add constructor.
14631         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14632         <abbrev_obstack>: Now an auto_obstack.
14633         (abbrev_table_up): New typedef.
14634         (init_cu_die_reader): Add abbrev_table parameter.
14635         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14636         Add result_dwo_abbrev_table.
14637         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14638         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14639         Update.
14640         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14641         parameter.
14642         (skip_children): Update.
14643         (abbrev_table::alloc_abbrev): Rename from
14644         abbrev_table_alloc_abbrev.
14645         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14646         (abbrev_table::lookup_abbrev): Rename from
14647         abbrev_table_lookup_abbrev.
14648         (abbrev_table_read_table): Return abbrev_table_up.
14649         (abbrev_table_free, abbrev_table_free_cleanup)
14650         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14651         (load_partial_dies): Update.
14652
14653 2018-01-17  Tom Tromey  <tom@tromey.com>
14654
14655         * dwarf2read.c (dwarf2_compute_name): Update comment.
14656         (read_func_scope, read_variable): Update.
14657         (new_symbol): Remove.
14658         (new_symbol_full): Rename to new_symbol.
14659
14660 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14661
14662         PR gdb/16577
14663         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14664         a warning instead of throwing an error, set section size to 0 and return
14665         NULL.
14666         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14667
14668 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14669
14670         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14671         std::string.
14672         (linux_ptrace_attach_fail_reason_string): Likewise.
14673         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14674         Likewise.
14675         (linux_ptrace_attach_fail_reason_string): Likewise.
14676         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14677
14678 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14679
14680         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14681
14682 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14683
14684         PR gdb/21559
14685         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14686         checking for fs_base/gs_base fields in struct user_regs_struct.
14687         * configure: Regenerate.
14688
14689 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14690
14691         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14692         function.
14693         (aarch64_linux_init_abi): Install it to gdbarch hook
14694         gcc_target_options.
14695
14696 2018-01-15  Pedro Alves  <palves@redhat.com>
14697
14698         * common/signals-state-save-restore.c
14699         (save_original_signals_state): Fix typos.
14700
14701 2017-01-12  Tom Tromey  <tom@tromey.com>
14702             Sergio Durigan Junior  <sergiodj@redhat.com>
14703
14704         * Makefile.in (install-only): Install gdb-add-index.
14705
14706 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14707
14708         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14709
14710 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14711
14712         * infrun.c (keep_going_pass_signal): Clear step-over info when
14713         insert_breakpoints fails.
14714
14715 2018-01-11  Pedro Alves  <palves@redhat.com>
14716
14717         PR gdb/22583
14718         * infrun.c (resume): Rename to ...
14719         (resume_1): ... this.
14720         (resume): Reimplement as wrapper around resume_1.
14721
14722 2018-01-11  Pedro Alves  <palves@redhat.com>
14723
14724         PR remote/22597
14725         * remote.c (remote_parse_stop_reply): Default to the last-set
14726         general thread instead of to 'magic_null_ptid'.
14727
14728 2018-01-10  Pedro Alves  <palves@redhat.com>
14729
14730         * language.h (language_get_symbol_name_matcher): Rename ...
14731         (get_symbol_name_matcher): ... this.
14732         * language.c (language_get_symbol_name_matcher): Ditto.
14733         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14734         callers adjusted.
14735
14736 2018-01-10  Pedro Alves  <palves@redhat.com>
14737
14738         PR gdb/22670
14739         * dwarf2read.c
14740         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14741         Adjust to use language_get_symbol_name_matcher instead of
14742         language_defn::la_get_symbol_name_matcher.
14743         * language.c (language_get_symbol_name_matcher): If in Ada mode
14744         and the lookup name is a verbatim match, return Ada's matcher.
14745         * language.h (language_get_symbol_name_matcher): Adjust comment.
14746         (ada_lookup_name_info::verbatim_p):: New method.
14747
14748 2018-01-10  Pedro Alves  <palves@redhat.com>
14749
14750         PR gdb/22670
14751         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14752         minsym's language is language_auto or language_cplus, pass down
14753         language_ada instead.
14754         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14755
14756 2018-01-10  Pedro Alves  <palves@redhat.com>
14757
14758         PR gdb/22670
14759         * minsyms.c (linkage_name_str): New function.
14760         (iterate_over_minimal_symbols): Use it.
14761
14762 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14763
14764         * NEWS: Document that 'info proc' now works on FreeBSD.
14765
14766 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14767
14768         * configure.ac: Check for kinfo_getfile in libutil.
14769         * configure: Regenerate.
14770         * config.in: Regenerate.
14771         * fbsd-nat.c: Include "fbsd-tdep.h".
14772         (fbsd_fetch_cmdline): New.
14773         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14774         rather than calling error.
14775         (fbsd_info_proc): New.
14776         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14777         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14778         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14779
14780 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14781
14782         * fbsd-nat.c (struct free_deleter): Remove.
14783         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14784
14785 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14786
14787         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14788         NULL for an empty pathname.
14789
14790 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14791
14792         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14793         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14794         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14795         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14796         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14797         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14798         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14799         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14800         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14801         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14802         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14803         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14804         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14805         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14806         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14807
14808 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14809
14810         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14811         (gnu_xfer_auxv): New function.
14812         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14813         TARGET_OBJECT_AUXV.
14814
14815 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14816             Simon Marchi  <simon.marchi@ericsson.com>
14817
14818         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14819         common/selftest.c.
14820         (COMMON_OBS): Remove selftest.o.
14821         * configure.ac: Append selftest-arch.c and common/selftest.c to
14822         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14823         * configure: Re-generated.
14824         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14825         GDB_SELF_TEST.
14826         (maintenance_info_selftests): Likewise.
14827
14828 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14829
14830         * ada-valprint.c (val_print_packed_array_elements): Use
14831         proper number of elements when printing an array indexed
14832         by an enumeration type.
14833
14834 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14835
14836         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14837         (dw2_get_file_names_reader): Adjust.
14838         (lookup_dwo_signatured_type): Adjust.
14839         (lookup_dwp_signatured_type): Adjust.
14840         (lookup_signatured_type): Adjust.
14841         (create_type_unit_group): Adjust.
14842         (get_type_unit_group): Adjust.
14843         (process_psymtab_comp_unit_reader): Adjust.
14844         (build_type_psymtabs_reader): Adjust.
14845         (scan_partial_symbols): Adjust.
14846         (add_partial_symbol): Adjust.
14847         (add_partial_subprogram): Adjust.
14848         (peek_die_abbrev): Adjust.
14849         (fixup_go_packaging): Adjust.
14850         (process_imported_unit_die): Adjust.
14851         (dwarf2_compute_name): Adjust.
14852         (dwarf2_physname): Adjust.
14853         (read_import_statement): Adjust.
14854         (handle_DW_AT_stmt_list): Adjust.
14855         (read_file_scope): Adjust.
14856         (read_func_scope): Adjust.
14857         (read_lexical_block_scope): Adjust.
14858         (read_call_site_scope): Adjust.
14859         (read_variable): Adjust.
14860         (dwarf2_rnglists_process): Adjust.
14861         (dwarf2_ranges_process): Adjust.
14862         (dwarf2_ranges_read): Adjust.
14863         (dwarf2_get_pc_bounds): Adjust.
14864         (dwarf2_record_block_ranges): Adjust.
14865         (dwarf2_add_field): Adjust.
14866         (dwarf2_add_member_fn): Adjust.
14867         (read_structure_type): Adjust.
14868         (process_structure_scope): Adjust.
14869         (read_enumeration_type): Adjust.
14870         (read_array_type): Adjust.
14871         (mark_common_block_symbol_computed): Adjust.
14872         (read_common_block): Adjust.
14873         (read_namespace_type): Adjust.
14874         (read_namespace): Adjust.
14875         (read_module_type): Adjust.
14876         (read_tag_pointer_type): Adjust.
14877         (read_tag_ptr_to_member_type): Adjust.
14878         (read_tag_string_type): Adjust.
14879         (read_subroutine_type): Adjust.
14880         (read_typedef): Adjust.
14881         (read_base_type): Adjust.
14882         (attr_to_dynamic_prop): Adjust.
14883         (read_subrange_type): Adjust.
14884         (read_unspecified_type): Adjust.
14885         (dwarf2_read_abbrevs): Adjust.
14886         (load_partial_dies): Adjust.
14887         (read_partial_die): Adjust.
14888         (find_partial_die): Adjust.
14889         (guess_partial_die_structure_name): Adjust.
14890         (fixup_partial_die): Adjust.
14891         (read_attribute_value): Adjust.
14892         (read_addr_index): Adjust.
14893         (read_addr_index_from_leb128): Adjust.
14894         (read_str_index): Adjust.
14895         (dwarf2_string_attr): Adjust.
14896         (get_debug_line_section): Adjust.
14897         (dwarf_decode_line_header): Adjust.
14898         (lnp_state_machine::check_line_address): Adjust.
14899         (dwarf_decode_lines_1): Adjust.
14900         (dwarf_decode_lines): Adjust.
14901         (dwarf2_start_symtab): Adjust.
14902         (var_decode_location): Adjust.
14903         (new_symbol_full): Adjust.
14904         (dwarf2_const_value_data): Adjust.
14905         (dwarf2_const_value_attr): Adjust.
14906         (dwarf2_const_value): Adjust.
14907         (die_type): Adjust.
14908         (die_containing_type): Adjust.
14909         (build_error_marker_type): Adjust.
14910         (lookup_die_type): Adjust.
14911         (guess_full_die_structure_name): Adjust.
14912         (anonymous_struct_prefix): Adjust.
14913         (determine_prefix): Adjust.
14914         (dwarf2_name): Adjust.
14915         (follow_die_ref_or_sig): Adjust.
14916         (follow_die_offset): Adjust.
14917         (follow_die_ref): Adjust.
14918         (follow_die_sig_1): Adjust.
14919         (follow_die_sig): Adjust.
14920         (get_signatured_type): Adjust.
14921         (get_DW_AT_signature_type): Adjust.
14922         (decode_locdesc): Adjust.
14923         (dwarf_decode_macros): Adjust.
14924         (cu_debug_loc_section): Adjust.
14925         (fill_in_loclist_baton): Adjust.
14926         (dwarf2_symbol_mark_computed): Adjust.
14927         (init_one_comp_unit): Don't assign
14928         dwarf2_cu::dwarf2_per_objfile.
14929         (set_die_type): Adjust.
14930
14931 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14932
14933         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14934         <dwarf2_per_objfile>: New field.
14935         (dwarf2_per_objfile): Remove global.
14936         (get_dwarf2_per_objfile): New function.
14937         (set_dwarf2_per_objfile): New function.
14938         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14939         dwarf2_per_objfile.
14940         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14941         (read_abbrev_offset): Likewise.
14942         (read_indirect_string): Likewise.
14943         (read_indirect_line_string): Likewise.
14944         (read_indirect_string_at_offset): Likewise.
14945         (read_indirect_string_from_dwz): Likewise.
14946         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14947         dwarf2_per_objfile.
14948         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14949         (create_all_comp_units): Change objfile parameter to
14950         dwarf2_per_objfile.
14951         (create_all_type_units): Likewise.
14952         (process_queue): Add dwarf2_per_objfile parameter.
14953         (read_and_check_comp_unit_head): Likewise.
14954         (lookup_dwo_unit_in_dwp): Likewise.
14955         (get_dwp_file): Likewise.
14956         (process_cu_includes): Likewise.
14957         (struct free_dwo_file_cleanup_data): New struct.
14958         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14959         set_dwarf2_per_objfile.
14960         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14961         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14962         context, adjust calls.
14963         (dw2_instantiate_symtab): Likewise.
14964         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14965         (dw2_get_cu): Likewise.
14966         (create_cu_from_index_list): Change objfile parameter to
14967         dwarf2_per_objfile.
14968         (create_cus_from_index_list): Get dwarf2_per_objfile from
14969         context, adjust calls.
14970         (create_cus_from_index): Likewise.
14971         (create_signatured_type_table_from_index): Change objfile
14972         parameter to dwarf2_per_objfile.
14973         (create_signatured_type_table_from_debug_names): Change objfile
14974         parameter to dwarf2_per_objfile.
14975         (create_addrmap_from_index): Likewise.
14976         (create_addrmap_from_aranges): Likewise.
14977         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14978         (dw2_setup): Remove.
14979         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14980         context.
14981         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14982         get_dwarf2_per_objfile.
14983         (dw2_forget_cached_source_info): Likewise.
14984         (dw2_map_symtabs_matching_filename): Likewise.
14985         (struct dw2_symtab_iterator) <index>: Remove.
14986         <dwarf2_per_objfile>: New field.
14987         (dw2_symtab_iter_init): Replace index parameter with
14988         dwarf2_per_objfile.
14989         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14990         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14991         (dw2_print_stats): Likewise.
14992         (dw2_dump): Likewise.
14993         (dw2_expand_symtabs_for_function): Likewise.
14994         (dw2_expand_all_symtabs): Likewise.
14995         (dw2_expand_symtabs_with_fullname): Likewise.
14996         (dw2_expand_marked_cus): Replace index and objfile parameters
14997         with dwarf2_per_objfile.
14998         (dw_expand_symtabs_matching_file_matcher): Add
14999         dwarf2_per_objfile parameter and adjust calls.
15000         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
15001         adjust calls.
15002         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
15003         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
15004         adjust calls.
15005         (create_cus_from_debug_names_list): Replace objfile parameter
15006         with dwarf2_per_objfile and adjust calls.
15007         (create_cus_from_debug_names): Likewise.
15008         (dwarf2_read_debug_names): Likewise.
15009         (mapped_debug_names::namei_to_name): Adjust call.
15010         (dw2_debug_names_iterator::next): Likewise.
15011         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
15012         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
15013         (dw2_debug_names_dump): Likewise.
15014         (dw2_debug_names_expand_symtabs_for_function): Likewise.
15015         (dw2_debug_names_expand_symtabs_matching): Likewise.
15016         (dwarf2_initialize_objfile): Likewise.
15017         (dwarf2_build_psymtabs): Likewise.
15018         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
15019         this_cu.
15020         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
15021         (read_and_check_comp_unit_head): Likewise.
15022         (read_abbrev_offset): Likewise.
15023         (create_debug_type_hash_table): Likewise.
15024         (create_debug_types_hash_table): Likewise.
15025         (create_all_type_units): Replace objfile parameter with
15026         dwarf2_per_objfile.
15027         (add_type_unit): Add dwarf2_per_objfile parameter.
15028         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
15029         with dwarf2_per_objfile.
15030         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
15031         (lookup_dwp_signatured_type): Likewise.
15032         (lookup_signatured_type): Likewise.
15033         (read_cutu_die_from_dwo): Likewise.
15034         (init_tu_and_read_dwo_dies): Likewise.
15035         (init_cutu_and_read_dies): Likewise.
15036         (init_cutu_and_read_dies_no_follow): Likewise.
15037         (allocate_type_unit_groups_table): Add objfile parameter.
15038         (create_type_unit_group): Use dwarf2_per_objfile from cu.
15039         (get_type_unit_group): Likewise.
15040         (process_psymtab_comp_unit): Update call.
15041         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
15042         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
15043         (print_tu_stats): Likewise.
15044         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
15045         in void* parameter.
15046         (build_type_psymtabs): Change objfile parameter to
15047         dwarf2_per_objfile.
15048         (process_skeletonless_type_unit): Use dwarf2_per_objfile
15049         passed in void* parameter.
15050         (process_skeletonless_type_units): Change objfile parameter to
15051         dwarf2_per_objfile.
15052         (set_partial_user): Likewise.
15053         (dwarf2_build_psymtabs_hard): Likewise.
15054         (read_comp_units_from_section): Likewise.
15055         (create_all_comp_units): Likewise.
15056         (scan_partial_symbols): Update calls.
15057         (add_partial_symbol): Likewise.
15058         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
15059         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
15060         (process_queue): Add dwarf2_per_objfile parameter.
15061         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
15062         (compute_compunit_symtab_includes): Likewise.
15063         (process_cu_includes): Add dwarf2_per_objfile parameter.
15064         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
15065         (process_full_type_unit): Likewise.
15066         (process_imported_unit_die): Update call.
15067         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
15068         (read_file_scope): Likewise.
15069         (allocate_dwo_file_hash_table): Add objfile parameter.
15070         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
15071         (create_cus_hash_table): Likewise.
15072         (create_dwp_hash_table): Likewise.
15073         (create_dwo_unit_in_dwp_v1): Likewise.
15074         (create_dwp_v2_section): Likewise.
15075         (create_dwo_unit_in_dwp_v2): Likewise.
15076         (lookup_dwo_unit_in_dwp): Likewise.
15077         (try_open_dwop_file): Likewise.
15078         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
15079         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
15080         cleanup to include a reference to dwarf2_per_objfile.
15081         (open_dwp_file): Add dwarf2_per_objfile parameter.
15082         (open_and_init_dwp_file): Likewise.
15083         (get_dwp_file): Likewise.
15084         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
15085         (queue_and_load_all_dwo_tus): Update call.
15086         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
15087         data.
15088         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
15089         (dwarf2_ranges_process): Likewise.
15090         (dwarf2_get_pc_bounds): Likewise.
15091         (mark_common_block_symbol_computed): Likewise.
15092         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
15093         (dwarf2_read_abbrevs): Update call.
15094         (read_partial_die): Use dwarf2_per_objfile from cu.
15095         (find_partial_die): Likewise.
15096         (fixup_partial_die): Likewise.
15097         (read_attribute_value): Likewise.
15098         (read_indirect_string_at_offset_from): Add objfile parameter.
15099         (read_indirect_string_at_offset): Add dwarf2_per_objfile
15100         parameter.
15101         (read_indirect_string_from_dwz): Add objfile parameter.
15102         (read_indirect_string): Add objfile parameter.
15103         (read_addr_index_1): Add dwarf2_per_objfile parameter.
15104         (read_addr_index): Use dwarf2_per_objfile from cu.
15105         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
15106         call dw2_setup.
15107         (read_str_index): Use dwarf2_per_objfile from cu.
15108         (get_debug_line_section): Likewise.
15109         (read_formatted_entries): Add dwarf2_per_objfile parameter.
15110         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
15111         (new_symbol_full): Use dwarf2_per_objfile from cu.
15112         (build_error_marker_type): Likewise.
15113         (lookup_die_type): Likewise.
15114         (determine_prefix): Likewise.
15115         (follow_die_offset): Likewise.
15116         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
15117         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
15118         (dwarf2_fetch_die_type_sect_off): Likewise.
15119         (dwarf2_get_die_type): Likewise.
15120         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
15121         (get_signatured_type): Likewise.
15122         (get_DW_AT_signature_type): Likewise.
15123         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
15124         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
15125         (cu_debug_loc_section): Likewise.
15126         (fill_in_loclist_baton): Likewise.
15127         (dwarf2_symbol_mark_computed): Likewise.
15128         (dwarf2_find_containing_comp_unit): Change objfile parameter to
15129         dwarf2_per_objfile.
15130         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
15131         parameter.
15132         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
15133         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
15134         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
15135         (set_die_type): Use dwarf2_free_objfile from cu.
15136         (get_die_type_at_offset): Likewise.
15137         (dwarf2_per_objfile_free): Don't assign global variable.
15138         (debug_names) <constructor>: Add dwarf2_per_objfile
15139         parameter, update m_debugstrlookup construction.
15140         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
15141         parameter.
15142         <m_dwarf2_per_objfile>: New field.
15143         <lookup>: Use m_dwarf2_per_objfile.
15144         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
15145         (psyms_seen_size): Likewise.
15146         (write_gdbindex): Replace objfile parameter with
15147         dwarf2_per_objfile.
15148         (write_debug_names): Likewise.
15149         (write_psymtabs_to_index): Likewise.
15150         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
15151         calls.
15152
15153 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15154
15155         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
15156         <dwarf2_per_objfile>: New field.
15157         (struct dwarf2_per_cu_data) <objfile>: Remove.
15158         <dwarf2_per_objfile>: New field.
15159         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
15160         of objfile.
15161         (create_signatured_type_table_from_index): Likewise.
15162         (create_debug_type_hash_table): Likewise.
15163         (fill_in_sig_entry_from_dwo_entry): Likewise.
15164         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
15165         (create_type_unit_group): Assign dwarf2_per_objfile instead of
15166         objfile.
15167         (create_partial_symtab): Access objfile through
15168         dwarf2_per_objfile.
15169         (process_psymtab_comp_unit_reader): Likewise.
15170         (read_comp_units_from_section): Likewise.
15171         (scan_partial_symbols): Likewise.
15172         (add_partial_symbol): Likewise.
15173         (add_partial_subprogram): Likewise.
15174         (peek_die_abbrev): Likewise.
15175         (fixup_go_packaging): Likewise.
15176         (process_full_comp_unit): Likewise.
15177         (process_full_type_unit): Likewise.
15178         (process_imported_unit_die): Likewise.
15179         (dwarf2_compute_name): Likewise.
15180         (dwarf2_physname): Likewise.
15181         (read_import_statement): Likewise.
15182         (create_cus_hash_table): Assign dwarf2_physname instead of
15183         objfile.
15184         (read_func_scope): Access objfile through dwarf2_per_objfile.
15185         (read_lexical_block_scope): Likewise.
15186         (read_call_site_scope): Likewise.
15187         (read_variable): Likewise.
15188         (dwarf2_rnglists_process): Likewise.
15189         (dwarf2_ranges_process): Likewise.
15190         (dwarf2_ranges_read): Likewise.
15191         (dwarf2_record_block_ranges): Likewise.
15192         (dwarf2_add_field): Likewise.
15193         (dwarf2_add_member_fn): Likewise.
15194         (read_structure_type): Likewise.
15195         (process_structure_scope): Likewise.
15196         (read_enumeration_type): Likewise.
15197         (read_array_type): Likewise.
15198         (read_common_block): Likewise.
15199         (read_namespace_type): Likewise.
15200         (read_namespace): Likewise.
15201         (read_module_type): Likewise.
15202         (read_tag_pointer_type): Likewise.
15203         (read_tag_ptr_to_member_type): Likewise.
15204         (read_tag_string_type): Likewise.
15205         (read_subroutine_type): Likewise.
15206         (read_typedef): Likewise.
15207         (read_base_type): Likewise.
15208         (attr_to_dynamic_prop): Likewise.
15209         (read_subrange_type): Likewise.
15210         (read_unspecified_type): Likewise.
15211         (load_partial_dies): Likewise.
15212         (read_partial_die): Likewise.
15213         (find_partial_die): Likewise.
15214         (guess_partial_die_structure_name): Likewise.
15215         (fixup_partial_die): Likewise.
15216         (read_attribute_value): Likewise.
15217         (read_addr_index_from_leb128): Likewise.
15218         (dwarf2_read_addr_index): Likewise.
15219         (dwarf2_string_attr): Likewise.
15220         (lnp_state_machine::check_line_address): Likewise.
15221         (dwarf_decode_lines_1): Likewise.
15222         (dwarf_decode_lines): Likewise.
15223         (dwarf2_start_symtab): Likewise.
15224         (var_decode_location): Likewise.
15225         (new_symbol_full): Likewise.
15226         (dwarf2_const_value_data): Likewise.
15227         (dwarf2_const_value_attr): Likewise.
15228         (dwarf2_const_value): Likewise.
15229         (die_type): Likewise.
15230         (die_containing_type): Likewise.
15231         (lookup_die_type): Likewise.
15232         (guess_full_die_structure_name): Likewise.
15233         (anonymous_struct_prefix): Likewise.
15234         (dwarf2_name): Likewise.
15235         (follow_die_ref_or_sig): Likewise.
15236         (follow_die_offset): Likewise.
15237         (follow_die_ref): Likewise.
15238         (dwarf2_fetch_die_loc_sect_off): Likewise.
15239         (dwarf2_fetch_constant_bytes): Likewise.
15240         (dwarf2_fetch_die_type_sect_off): Likewise.
15241         (dwarf2_get_die_type): Likewise.
15242         (follow_die_sig): Likewise.
15243         (decode_locdesc): Likewise.
15244         (dwarf2_per_cu_objfile): Likewise.
15245         (dwarf2_per_cu_text_offset): Likewise.
15246         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15247         objfile.
15248         (set_die_type): Access objfile through
15249         dwarf2_per_objfile.
15250
15251 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15252
15253         * valprint.c (converted_character_d): Remove typedef.
15254         (DEF_VEC_O (converted_character_d)): Remove.
15255         (count_next_character): Use std::vector.
15256         (print_converted_chars_to_obstack): Likewise.
15257         (generic_printstr): Likewise.
15258
15259 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15260
15261         * xml-support.h (struct gdb_xml_value): Add constructor.
15262         <value>: Change type to unique_xmalloc_ptr.
15263         (gdb_xml_value_s): Remove typedef.
15264         (DEF_VEC_O (gdb_xml_value_s)): Remove.
15265         (gdb_xml_element_start_handler): Change parameter type to
15266         std::vector.
15267         (xml_find_attribute): Likewise.
15268         * xml-support.c (xml_find_attribute): Change parameter type to
15269         std::vector and adjust.
15270         (gdb_xml_values_cleanup): Remove.
15271         (gdb_xml_parser::start_element): Adjust to std::vector.
15272         (xinclude_start_include): Change paraeter type to std::vector
15273         and adjust.
15274         * btrace.c (check_xml_btrace_version): Likewise.
15275         (parse_xml_btrace_block): Likewise.
15276         (parse_xml_btrace_pt_config_cpu): Likewise.
15277         (parse_xml_btrace_pt): Likewise.
15278         (parse_xml_btrace_conf_bts): Likewise.
15279         (parse_xml_btrace_conf_pt): Likewise.
15280         * memory-map.c (memory_map_start_memory): Likewise.
15281         (memory_map_start_property): Likewise.
15282         * osdata.c (osdata_start_osdata): Likewise.
15283         (osdata_start_item): Likewise.
15284         (osdata_start_column): Likewise.
15285         * remote.c (start_thread): Likewise.
15286         * solib-aix.c (library_list_start_library): Likewise.
15287         (library_list_start_list): Likewise.
15288         * solib-svr4.c (library_list_start_library): Likewise.
15289         (svr4_library_list_start_list): Likewise.
15290         * solib-target.c (library_list_start_segment): Likewise.
15291         (library_list_start_section): Likewise.
15292         (library_list_start_library): Likewise.
15293         (library_list_start_list): Likewise.
15294         * tracepoint.c (traceframe_info_start_memory): Likewise.
15295         (traceframe_info_start_tvar): Likewise.
15296         * xml-syscall.c (syscall_start_syscall): Likewise.
15297         * xml-tdesc.c (tdesc_start_target): Likewise.
15298         (tdesc_start_feature): Likewise.
15299         (tdesc_start_reg): Likewise.
15300         (tdesc_start_union): Likewise.
15301         (tdesc_start_struct): Likewise.
15302         (tdesc_start_flags): Likewise.
15303         (tdesc_start_enum): Likewise.
15304         (tdesc_start_field): Likewise.
15305         (tdesc_start_enum_value): Likewise.
15306         (tdesc_start_vector): Likewise.
15307
15308 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15309
15310         * extension.h (struct xmethod_worker) <clone>: Remove.
15311         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15312         Remove.
15313         (python_xmethod_worker::clone): Remove.
15314         * valops.c (find_overload_match): Use std::move instead of
15315         clone.
15316
15317 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15318
15319         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15320         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15321         <free_xmethod_worker_data>: Remove.
15322         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15323         <get_xmethod_arg_types>: Remove.
15324         <get_xmethod_result_type>: Remove.
15325         <invoke_xmethod>: Remove.
15326         * extension.c (new_xmethod_worker): Remove.
15327         (clone_xmethod_worker): Remove.
15328         (get_matching_xmethod_workers): Return void, pass std::vector by
15329         pointer.
15330         (get_xmethod_arg_types): Rename to...
15331         (xmethod_worker::get_arg_types): ... this, and adjust.
15332         (get_xmethod_result_type): Rename to...
15333         (xmethod_worker::get_result_type): ... this, and adjust.
15334         (invoke_xmethod): Remove.
15335         (free_xmethod_worker): Remove.
15336         (free_xmethod_worker_vec): Remove.
15337         * extension.h (enum ext_lang_rc): Move here from
15338         extension-priv.h.
15339         (struct xmethod_worker): Add constructor and destructor.
15340         <data>: Remove.
15341         <value>: Remove.
15342         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15343         virtual pure methods.
15344         <get_arg_types, get_result_type>: New methods.
15345         (xmethod_worker_ptr): Remove typedef.
15346         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15347         (xmethod_worker_vec): Remove typedef.
15348         (xmethod_worker_up): New typedef.
15349         (invoke_xmethod): Remove.
15350         (clone_xmethod_worker): Remove.
15351         (free_xmethod_worker): Remove.
15352         (free_xmethod_worker_vec): Remove.
15353         (get_xmethod_arg_types): Remove.
15354         (get_xmethod_result_type): Remove.
15355         * valops.c (find_method_list): Use std::vector, don't use
15356         intermediate vector.
15357         (value_find_oload_method_list): Use std::vector.
15358         (find_overload_match): Use std::vector.
15359         (find_oload_champ): Use std::vector.
15360         * value.c (value_free): Use operator delete.
15361         (value_of_xmethod): Rename to...
15362         (value_from_xmethod): ... this.  Don't assign
15363         xmethod_worker::value, take rvalue-reference.
15364         (result_type_of_xmethod): Adjust.
15365         (call_xmethod): Adjust.
15366         * value.h: Include extension.h.
15367         (struct xmethod_worker): Don't forward-declare.
15368         (value_of_xmethod): Rename to...
15369         (value_from_xmethod): ... this, take rvalue-reference.
15370         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15371         (struct python_xmethod_worker): ... this, add constructor and
15372         destructor.
15373         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15374         (gdbpy_free_xmethod_worker_data): Rename to...
15375         (python_xmethod_worker::~python_xmethod_worker): ... this and
15376         adjust.
15377         (gdbpy_clone_xmethod_worker_data): Rename to...
15378         (python_xmethod_worker::clone): ... this and adjust.
15379         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15380         temporary vector.
15381         (gdbpy_get_xmethod_arg_types): Rename to...
15382         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15383         (gdbpy_get_xmethod_result_type): Rename to...
15384         (python_xmethod_worker::do_get_result_type): ... this and
15385         adjust.
15386         (gdbpy_invoke_xmethod): Rename to...
15387         (python_xmethod_worker::invoke): ... this and adjust.
15388         (new_python_xmethod_worker): Rename to...
15389         (python_xmethod_worker::python_xmethod_worker): ... this and
15390         adjust.
15391         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15392         Remove.
15393         (gdbpy_free_xmethod_worker_data): Remove.
15394         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15395         (gdbpy_get_xmethod_arg_types): Remove.
15396         (gdbpy_get_xmethod_result_type): Remove.
15397         (gdbpy_invoke_xmethod): Remove.
15398         * python/python.c (python_extension_ops): Remove obsolete
15399         callbacks.
15400
15401 2018-01-05  Pedro Alves  <palves@redhat.com>
15402
15403         PR gdb/18653
15404         * common/signals-state-save-restore.c
15405         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15406         find a custom handler preinstalled, instead of internal erroring.
15407         But only warn if !quiet.
15408         * common/signals-state-save-restore.h
15409         (save_original_signals_state): New parameter 'quiet'.
15410         * main.c (captured_main_1): Move save_original_signals_state call
15411         after option handling, and pass QUIET.
15412
15413 2018-01-05  Pedro Alves  <palves@redhat.com>
15414
15415         * spu-tdep.c (spu_catch_start): Pass
15416         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15417
15418 2018-01-05  Pedro Alves  <palves@redhat.com>
15419
15420         PR gdb/22670
15421         * ada-lang.c (literal_symbol_name_matcher): New function.
15422         (ada_get_symbol_name_matcher): Use it for
15423         symbol_name_match_type::SEARCH_NAME.
15424         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15425         it down instead of assuming symbol_name_match_type::FULL.
15426         * block.h (block_lookup_symbol): New parameter 'match_type'.
15427         * c-valprint.c (print_unpacked_pointer): Use
15428         lookup_symbol_search_name instead of lookup_symbol.
15429         * compile/compile-object-load.c (get_out_value_type): Pass down
15430         symbol_name_match_type::SEARCH_NAME.
15431         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15432         symbol_name_match_type::FULL.
15433         * cp-support.c (cp_get_symbol_name_matcher): Handle
15434         symbol_name_match_type::SEARCH_NAME.
15435         * infrun.c (insert_exception_resume_breakpoint): Use
15436         lookup_symbol_search_name.
15437         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15438         * psymtab.c (maintenance_check_psymtabs): Use
15439         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15440         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15441         SYMBOL_SEARCH_NAME.
15442         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15443         if symbol_name_match_type::SEARCH_NAME.
15444         (lookup_symbol_in_language): Pass down
15445         symbol_name_match_type::FULL.
15446         (lookup_symbol_search_name): New.
15447         (lookup_language_this): Pass down
15448         symbol_name_match_type::SEARCH_NAME.
15449         (lookup_symbol_aux, lookup_local_symbol): New parameter
15450         'match_type'.  Pass it down.
15451         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15452         (lookup_symbol_search_name): New declaration.
15453         (lookup_symbol_in_block): New 'match_type' parameter.
15454
15455 2018-01-05  Pedro Alves  <palves@redhat.com>
15456
15457         PR gdb/22670
15458         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15459         ada_lookup_symbol.
15460         (ada_lookup_symbol): Reimplement in terms of
15461         ada_lookup_symbol_list, bits factored out from
15462         ada_lookup_encoded_symbol.
15463
15464 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15465
15466         * ada-exp.y (write_object_renaming): When subscripting an array
15467         using a symbol as the index, pass the block in call to
15468         ada_lookup_encoded_symbol when looking that symbol up.
15469
15470 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15471
15472         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15473         TYPE_INDEX_TYPE.
15474
15475 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15476
15477         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15478         the case where VALUE_LVAL (val0) is not lval_memory.
15479
15480 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15481
15482         * ada-valprint.c (print_optional_low_bound): Handle
15483         character-indexed array printing like boolean-indexed array
15484         printing.
15485
15486 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15487
15488         * NEWS: Create a new section for the next release branch.
15489         Rename the section of the current branch, now that it has
15490         been cut.
15491
15492 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15493
15494         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15495         * version.in: Bump version to 8.1.50.DATE-git.
15496
15497 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15498
15499         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15500         Add field.
15501         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15502         Add field.
15503         (default_exception_support_info) <catch_handlers_sym>: Add field.
15504         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15505         (ada_exception_name_addr_1): Add "catch handlers" handling.
15506         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15507         Update all callers.
15508         (create_excep_cond_exprs) <ex>: Add parameter.
15509         (re_set_exception): Update create_excep_cond_exprs call.
15510         (print_it_exception, print_one_exception, print_mention_exception)
15511         (print_recreate_exception): Add "catch handler" handling.
15512         (allocate_location_catch_handlers, re_set_catch_handlers)
15513         (check_status_catch_handlers, print_it_catch_handlers)
15514         (print_one_catch_handlers, print_mention_catch_handlers)
15515         (print_recreate_catch_handlers): New function.
15516         (catch_handlers_breakpoint_ops): New variable.
15517         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15518         Add parameter.  Add "catch handler" handling.
15519         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15520         Add "catch handler" handling.
15521         (ada_exception_catchpoint_cond_string): Add "catch handler"
15522         handling.
15523         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15524         call.
15525         (catch_ada_handlers_command): New function.
15526         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15527         operations structure.
15528         (_initialize_ada_language): Add "catch handlers" command entry.
15529         * NEWS: Document "catch handlers" feature.
15530
15531 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15532
15533         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15534         account when creating the array type of the slice.
15535         (ada_value_slice): Likewise.
15536
15537 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15538
15539         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15540         New enum value.
15541         (create_array_type_with_stride): Add byte_stride_prop parameter.
15542         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15543         New parameter.  Update all callers in this file.
15544         (array_type_has_dynamic_stride): New function.
15545         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15546         of arrays with dynamic byte strides.
15547         * dwarf2read.c (read_array_type): Add support for dynamic
15548         DW_AT_byte_stride attributes.
15549
15550 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15551
15552         * dwarf2read.c (read_unspecified_type): Treat
15553         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15554
15555 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15556
15557         Update copyright year range in all GDB files.
15558
15559 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15560
15561         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15562         and gdb/testsuite/gdb.base/step-line.c.
15563
15564 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15565
15566         * copyright.py (main): Dump the contents of
15567         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15568         even if BY_HAND is empty.
15569
15570 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15571
15572         * top.c (print_gdb_version): Update Copyright year in version
15573         message.
15574
15575 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15576
15577         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15578
15579 For older changes see ChangeLog-2017.
15580 \f
15581 Local Variables:
15582 mode: change-log
15583 left-margin: 8
15584 fill-column: 74
15585 version-control: never
15586 coding: utf-8
15587 End: