OBVIOUS Use report_unrecognized_option_error in 'demangle' and 'info macro' commands.
[external/binutils.git] / gdb / ChangeLog
1 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2
3         * macrocmd.c (info_macro_command): Use report_unrecognized_option_error
4         to report a bad option and fix indentation.
5         * demangle.c (demangle_command): Use report_unrecognized_option_error
6         to report a bad option and correctly report the bad option.
7
8 2018-10-27  Tom Tromey  <tom@tromey.com>
9
10         PR cli/23364:
11         * darwin-nat.c (copied_shell): New global.
12         (may_have_sip): Rename from should_disable_startup_with_shell.
13         (copy_shell_to_cache, maybe_cache_shell): New functions.
14         (darwin_nat_target::create_inferior): Update.  Use
15         copied_shell.
16
17 2018-10-27  Tom Tromey  <tom@tromey.com>
18
19         * unittests/scoped_fd-selftests.c (test_to_file): New function.
20         (run_tests): Call test_to_file.
21         * dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
22         temporary files.
23         * common/scoped_fd.h (scoped_fd::to_file): New method.
24
25 2018-10-27  Tom Tromey  <tom@tromey.com>
26
27         * unittests/scoped_mmap-selftests.c (test_normal): Use
28         gdb_mkostemp_cloexec.
29         * unittests/scoped_fd-selftests.c (test_destroy, test_release):
30         Use gdb_mkostemp_cloexec.
31         * gnulib/aclocal-m4-deps.mk, gnulib/aclocal.m4,
32         gnulib/config.in, gnulib/configure,
33         gnulib/import/Makefile.am, gnulib/import/Makefile.in,
34         gnulib/import/m4/gnulib-cache.m4,
35         gnulib/import/m4/gnulib-comp.m4: Update.
36         * gnulib/import/m4/mkostemp.m4: New file.
37         * gnulib/import/m4/mkstemp.m4: Remove.
38         * gnulib/import/mkostemp.c: New file.
39         * gnulib/import/mkstemp.m4: Remove.
40         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Remove
41         mkstemp, add mkostemp.  Apply new patch.
42         * gnulib/import/stdlib.in.h: Apply patch.
43         * gnulib/patches/0002-mkostemp-mkostemps-Fix-compilation-error-in-C-mode-o.patch:
44         New file.
45         * dwarf-index-write.c (write_psymtabs_to_index): Use
46         gdb_mkostemp_cloexec.
47         * common/filestuff.h (gdb_mkostemp_cloexec): New function.
48
49 2018-10-27  Tom Tromey  <tom@tromey.com>
50
51         * unittests/mkdir-recursive-selftests.c: New file.
52         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
53         unittests/mkdir-recursive-selftests.c.
54         * dwarf-index-cache.c (mkdir_recursive): Move to
55         common/filestuff.c.
56         (index_cache::store): Check return value of mkdir_recursive.
57         (create_dir_and_check, test_mkdir_recursive): Move to new file.
58         (_initialize_index_cache): Don't register test.
59         * common/filestuff.h (mkdir_recursive): Declare.
60         * common/filestuff.c (mkdir_recursive): Move from
61         dwarf-index-cache.c.  Return bool.
62
63 2018-10-27  Tom Tromey  <tom@tromey.com>
64
65         * dwarf-index-write.c (write_psymtabs_to_index): Move
66         make_temp_filename to common/pathstuff.c.
67         * common/pathstuff.h (make_temp_filename): Declare.
68         * common/pathstuff.c (make_temp_filename): New function, moved
69         from dwarf-index-write.c.
70
71 2018-10-27  Tom Tromey  <tom@tromey.com>
72
73         * procfs.c (procfs_target::create_inferior): Use get_shell.
74         * cli/cli-cmds.c (shell_escape): Use get_shell.
75         * windows-nat.c (windows_nat_target::create_inferior): Use
76         get_shell.
77         * common/pathstuff.c (get_shell): New function.
78         * nat/fork-inferior.c (SHELL_FILE, get_startup_shell): Remove.
79         (fork_inferior): Use get_shell.
80         * common/pathstuff.h (get_shell): Declare.
81
82 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
83
84         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
85
86 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
87
88         * stack.c (print_variable_and_value_data): Add preg and treg.
89         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
90         and update callers.
91         (print_frame_arg_vars): Likewise.
92         (prepare_reg): New function.
93         (info_locals_command): Extract info print args and use them.
94         (info_args_command): Likewise.
95         (_initialize_stack): Modify on-line help.
96         * symtab.c (treg_matches_sym_type_name): New function.
97         (search_symbols): New arg t_regexp.
98         (symtab_symbol_info): New args quiet, regexp, t_regexp.
99         (info_variables_command): Extract info print args and use them.
100         (info_functions_command): Likewise.
101         (info_types_command): Update call to symtab_symbol_info.
102         (_initialize_symtab): Modify on-line help.
103         * symtab.h (treg_matches_sym_type_name): New function.
104         (search_symbols): New t_regexp arg.
105
106 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
107
108         * cli-utils.c (extract_arg_maybe_quoted): New function.
109         (extract_info_print_args): New function.
110         (info_print_args_help): New function.
111         (report_unrecognized_option_error): New function.
112         * cli-utils.h (extract_arg_maybe_quoted): New function.
113         (extract_info_print_args): New function.
114         (info_print_args_help): New function.
115         (report_unrecognized_option_error): New function.
116
117 2018-10-26  Tom Tromey  <tom@tromey.com>
118
119         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
120         (compute_compunit_symtab_includes): Update.
121         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
122         (compunit_symtab_ptr): Likewise.
123
124 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
125
126         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
127         default_print_auxv_entry for specific tag values.
128
129 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
130
131         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
132
133 2018-10-26  Jim Wilson  <jimw@sifive.com>
134
135         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
136         (riscv_linux_sigframe_init): Declare.
137         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
138         (riscv_linux_sigframe): New.
139         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
140         (riscv_linux_sigframe_init): Define.
141         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
142
143         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
144         (riscv_isa_flen): Likewise.  Drop static.
145         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
146         (riscv_isa_flen): Likewise.  Declare.
147
148 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
149             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
150
151         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
152         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
153         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
154         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
155         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
156         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
157         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
158         Define.
159         (struct ppc_linux_features) <htm>: New field.
160         (ppc_linux_no_features): Add initializer for htm field.
161         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
162         new tdescs.
163         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
164         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
165         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
166         Define if not already defined.
167         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
168         and rs6000/powerpc-isa207-htm-vsx64l.
169         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
170         rs6000/powerpc-isa207-htm-vsx64l.xml.
171         * features/rs6000/power-htm-spr.xml: New file.
172         * features/rs6000/power-htm-core.xml: New file.
173         * features/rs6000/power64-htm-core.xml: New file.
174         * features/rs6000/power-htm-fpu.xml: New file.
175         * features/rs6000/power-htm-altivec.xml: New file.
176         * features/rs6000/power-htm-vsx.xml: New file.
177         * features/rs6000/power-htm-ppr.xml: New file.
178         * features/rs6000/power-htm-dscr.xml: New file.
179         * features/rs6000/power-htm-tar.xml: New file.
180         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
181         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
182         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
183         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
184         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
185         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
186         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
187         fetch_regset with HTM regsets.
188         (store_register, store_ppc_registers): Call store_regset with HTM
189         regsets.
190         (ppc_linux_nat_target::read_description): Set htm field in the
191         features struct if needed.
192         * ppc-linux-tdep.c: Include
193         features/rs6000/powerpc-isa207-htm-vsx32l.c and
194         features/rs6000/powerpc-isa207-htm-vsx64l.c.
195         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
196         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
197         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
198         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
199         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
200         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
201         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
202         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
203         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
204         (ppc32_linux_ctarregset): New globals.
205         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
206         (ppc_linux_collect_core_cpgrregset): New function.
207         (ppc_linux_iterate_over_regset_sections): Call back with the htm
208         regsets.
209         (ppc_linux_core_read_description): Check if the tm spr section is
210         present and set htm in the features struct.
211         (_initialize_ppc_linux_tdep): Call
212         initialize_tdesc_powerpc_isa207_htm_vsx32l and
213         initialize_tdesc_powerpc_isa207_htm_vsx64l.
214         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
215         Declare.
216         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
217         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
218         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
219         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
220         New fields.
221         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
222         Likewise.
223         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
224         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
225         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
226         New enum fields.
227         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
228         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
229         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
230         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
231         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
232         <PPC_CTAR_REGNUM>: Likewise.
233         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
234         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
235         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
236         (IS_CEFP_PSEUDOREG): Define.
237         (rs6000_register_name): Hide the upper halves of checkpointed VSX
238         registers.  Return names for the checkpointed DFP, VSX, and EFP
239         pseudo registers.
240         (rs6000_pseudo_register_type): Remove initial assert and raise an
241         internal error in the else clause instead.  Return types for the
242         checkpointed DFP, VSX, and EFP pseudo registers.
243         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
244         checkpointed DFP pseudo registers.
245         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
246         checkpointed VSX pseudo registers.
247         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
248         from efpr_pseudo_register_read and
249         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
250         registers.
251         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
252         Handle checkpointed DFP, VSX, and EFP registers.
253         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
254         (efp_ax_pseudo_register_collect): New functions.
255         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
256         register logic to new functions.  Handle checkpointed DFP, VSX,
257         and EFP pseudo registers.
258         (rs6000_gdbarch_init): Look for and validate the htm features.
259         Include checkpointed DFP, VSX and EFP pseudo-registers.
260         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
261         HTM registers.
262
263 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
264
265         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
266         without altivec or fpu.
267
268 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
269             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
270
271         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
272         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
273         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
274         Define if not already defined.
275         * features/rs6000/power-ebb.xml: New file.
276         * features/rs6000/power-linux-pmu.xml: New file.
277         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
278         features.
279         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
280         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
281         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
282         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
283         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
284         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
285         fetch_regset with ebb and pmu regsets.
286         (store_register, store_ppc_registers): Call store_regset with ebb
287         and pmu regsets.
288         (ppc_linux_nat_target::read_description): Set isa207 field in the
289         features struct if ebb and pmu are avaiable.
290         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
291         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
292         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
293         and pmu regsets.
294         (ppc_linux_core_read_description): Check if the pmu section is
295         present and set isa207 in the features struct.
296         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
297         (ppc32_linux_pmuregset): Declare.
298         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
299         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
300         <ppc_sier_regnum>: New field.
301         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
302         New enum values.
303         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
304         values.
305         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
306         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
307         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
308         ebb and pmu features.
309
310 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
311             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
312
313         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
314         (tdesc_powerpc_isa207_vsx64l): Declare.
315         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
316         (struct ppc_linux_features) <isa207>: New field.
317         (ppc_linux_no_features): Add initializer for isa207 field.
318         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
319         new tdescs.
320         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
321         (NT_PPC_TAR): Define if not already defined.
322         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
323         rs6000/powerpc-isa207-vsx64l.
324         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
325         rs6000/powerpc-isa207-vsx64l.xml.
326         * features/rs6000/power-tar.xml: New file.
327         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
328         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
329         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
330         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
331         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
332         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
333         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
334         fetch_regset with the TAR regset.
335         (store_register, store_ppc_registers): Call store_regset with the
336         TAR regset.
337         (ppc_linux_nat_target::read_description): Set isa207 field in the
338         features struct if needed.
339         * ppc-linux-tdep.c: Include
340         features/rs6000/powerpc-isa207-vsx32l.c and
341         features/rs6000/powerpc-isa207-vsx64l.c.
342         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
343         (ppc_linux_iterate_over_regset_sections): Call back with the tar
344         regset.
345         (ppc_linux_core_read_description): Check if the tar section is
346         present and set isa207 in the features struct.
347         (_initialize_ppc_linux_tdep): Call
348         initialize_tdesc_powerpc_isa207_vsx32l and
349         initialize_tdesc_powerpc_isa207_vsx64l.
350         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
351         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
352         (enum) <PPC_TAR_REGNUM>: New enum value.
353         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
354         feature.
355         (ppc_process_record_op31): Record changes to TAR.
356
357 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
358             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
359
360         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
361         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
362         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
363         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
364         (struct ppc_linux_features) <ppr_dscr>: New field.
365         (ppc_linux_no_features): Add initializer for ppr_dscr field.
366         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
367         new tdescs.
368         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
369         Define if not already defined.
370         * features/Makefile (WHICH): Add
371         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
372         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
373         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
374         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
375         * features/rs6000/power-dscr.xml: New file.
376         * features/rs6000/power-ppr.xml: New file.
377         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
378         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
379         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
380         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
381         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
382         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
383         * ppc-linux-nat.c: Include <sys/uio.h>.
384         (fetch_regset, store_regset, check_regset): New functions.
385         (fetch_register, fetch_ppc_registers): Call fetch_regset with
386         DSCR and PPR regsets.
387         (store_register, store_ppc_registers): Call store_regset with
388         DSCR and PPR regsets.
389         (ppc_linux_get_hwcap2): New function.
390         (ppc_linux_nat_target::read_description): Call
391         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
392         features struct if needed.
393         * ppc-linux-tdep.c: Include
394         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
395         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
396         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
397         (ppc32_linux_dscrregset): New globals.
398         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
399         and dscr regsets.
400         (ppc_linux_core_read_description): Check if the ppr and dscr
401         sections are present and set ppr_dscr in the features struct.
402         (_initialize_ppc_linux_tdep): Call
403         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
404         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
405         * ppc-linux-tdep.h (ppc32_linux_pprregset)
406         (ppc32_linux_dscrregset): Declare.
407         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
408         <ppc_dscr_regnum>: New field.
409         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
410         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
411         and dscr features.
412         (ppc_process_record_op31): Record changes to PPR and DSCR.
413
414 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
415
416         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
417         second initializer line for the have_* variables.  Initialize
418         have_fpu to 0 instead of 1.
419
420 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
421
422         * arch/ppc-linux-common.c (ppc_linux_match_description):
423         Parenthesize tdesc assignements and indent them properly.
424
425 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
426
427         * ppc-linux-nat.c (fetch_register): Change if statement to else
428         if.
429         (store_register): Likewise.
430
431 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
432
433         * rs6000-tdep.c: Remove reggroups.h include.
434         (rs6000_pseudo_register_reggroup_p): Remove.
435         (rs6000_gdbarch_init): Remove call to
436         set_tdesc_pseudo_register_reggroup_p.
437
438 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
439
440         * reggroups.c (default_register_reggroup_p): Return true for
441         decfloat registers and float_reggroup.
442
443 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
444
445         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
446         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
447         ppc_linux_collect_vrregset by regcache_collect_regset.
448
449 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
450
451         * linux-tdep.c (linux_collect_regset_section_cb): Use
452         std::vector<gdb_byte> instead of char * and malloc for buf.
453         Remove xfree.
454
455 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
456
457         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
458         symtab_start instead of always using language_unknown.
459
460 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
461
462         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
463         READ_P parameter, catch and ignore register access errors from
464         either the old or new MISA location.
465         (riscv_has_feature): Update call to riscv_read_misa_reg.
466
467 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
468
469         * python/py-function.c (convert_values_to_python): Return
470         gdbpy_ref<>.  Add header comment.
471         (fnpy_call): Adjust.
472
473 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
474
475         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
476         (cmdpy_completer_handle_brkchars): Adjust.
477         (cmdpy_completer): Adjust.
478
479 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
480
481         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
482         Pass correct regnum to raw_supply_zeroed.
483
484 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
485
486         * regcache.c (cooked_read_test): Add CSKY to the list of
487         architectures with a save_reggroup
488
489 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
490
491         PR gdb/23368
492         * infrun.c (follow_exec): In the follow_exec_mode_new case,
493         transfer terminal state from old new new inferior.
494         * terminal.h (swap_terminal_info): New function.
495         * inflow.c (swap_terminal_info): New function.
496
497 2018-10-23  Tom Tromey  <tom@tromey.com>
498
499         * record-btrace.c (get_thread_current_frame_id): Rename from
500         get_thread_current_frame.  Return a frame_id.
501         (record_btrace_start_replaying): Update.
502
503 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
504
505         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
506         for CSRs.
507
508 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
509
510         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
511         have_nonsteppable_watchpoint attribute to 1.
512
513 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
514
515         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
516         register names.
517         (struct register_alias): Rename to...
518         (struct riscv_register_alias): ...this, and update comment.
519         (riscv_register_aliases): Update type, and alias names.  Remove
520         CSR names from this list.
521         (riscv_register_name): Use riscv_gdb_reg_names for int and float
522         register names.  Add an extra assertion.
523         (riscv_is_regnum_a_named_csr): New function.
524         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
525
526 2018-10-22  Jim Wilson  <jimw@sifive.com>
527
528         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
529         FP reg smaller than FP reg size, and fill with -1 instead of 0.
530
531         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
532         (riscv_register_type): Use them.
533         (riscv_print_one_register_info): Handle union of floats same as float.
534         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
535         riscv_fpreg_q_type fields.
536
537 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
538
539         * gdbarch.sh (gdbarch_num_cooked_regs): New.
540         * gdbarch.h: Re-generate.
541         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
542         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
543         * eval.c (evaluate_subexp_standard): Likewise.
544         * findvar.c (value_of_register): Likewise.
545         (value_of_register_lazy): Likewise.
546         (address_from_register): Likewise.
547         * frame.c (get_frame_register_bytes): Likewise.
548         * gdbarch-selftests.c (register_to_value_test): Likewise.
549         * h8300-tdep.c (h8300_register_type): Likewise.
550         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
551         (i386_svr4_reg_to_regnum): Likewise.
552         * infcmd.c (default_print_registers_info): Likewise.
553         (registers_info): Likewise.
554         (print_vector_info): Likewise.
555         (default_print_float_info): Likewise.
556         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
557         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
558         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
559         (mi_cmd_data_list_changed_registers): Likewise.
560         (mi_cmd_data_list_register_values): Likewise.
561         (mi_cmd_data_write_register_values): Likewise.
562         (mi_cmd_trace_frame_collected): Likewise.
563         * mips-tdep.c (print_gp_register_row): Likewise.
564         (mips_print_registers_info): Likewise.
565         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
566         * regcache.c (init_regcache_descr): Likewise.
567         (register_size): Likewise.
568         (register_dump::dump): Likewise.
569         (cooked_read_test): Likewise.
570         (cooked_write_test): Likewise.
571         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
572         (rs6000_gdbarch_init): Likewise.
573         * stabsread.c (stab_reg_to_regnum): Likewise.
574         * stack.c (info_frame_command): Likewise.
575         * target-descriptions.c (tdesc_register_name): Likewise.
576         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
577         * tui/tui-regs.c (tui_show_register_group): Likewise.
578         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
579         (user_reg_map_regnum_to_name): Likewise.
580         (value_of_user_reg): Likewise.
581         (maintenance_print_user_registers): Likewise.
582         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
583         (xtensa_register_name): Likewise.
584         (xtensa_register_type): Likewise.
585         (xtensa_reg_to_regnum): Likewise.
586         (xtensa_pseudo_register_read): Likewise.
587         (xtensa_pseudo_register_write): Likewise.
588
589 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
590
591         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
592         correctly-sized buffer with raw_read.
593         (amd64_pseudo_register_write): Use correctly-sized buffer for
594         raw_read/raw_write.
595
596 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
597
598         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
599         in add_prefix_cmd of set print type.
600
601 2018-10-19  Tom Tromey  <tom@tromey.com>
602
603         PR tui/18388:
604         * NEWS: Mention tabset deprecation.
605         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
606         (update_tab_width): New function.
607         (tui_set_tab_width, tui_show_tab_width): New functions.
608         (tui_set_tab_width_command): Use update_tab_width.
609         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
610         Add new "set tui tab-width" command.
611         * tui/tui-source.c (tui_set_source_content): Update.
612         * tui/tui-disasm.c (tui_set_disassem_content): Update.
613         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
614         Don't declare.
615         (tui_tab_width): Declare.
616         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
617         (tui_set_default_tab_len): Remove.
618
619 2018-10-19  Tom Tromey  <tom@tromey.com>
620
621         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
622         (key_is_backspace, tui_getc): Don't declare.
623         * tui/tui-io.c (key_is_start_sequence): Now static.
624         (key_is_end_sequence, key_is_backspace): Remove.
625         (tui_getc): Now static.
626
627 2018-10-19  Tom Tromey  <tom@tromey.com>
628
629         * symfile.c (reread_symbols): Clear "static_links".
630
631 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
632
633         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
634         define.
635         (aarch64_linux_sigframe_init): Extra boundary checks.
636
637 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
638
639         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
640         the possibly non-existent tdesc type 'vec128', but the type of raw
641         register v16 instead.
642
643 2018-10-19  Gary Benson <gbenson@redhat.com>
644
645         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
646
647 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
648
649         PR cli/23785
650         * cli/cli-dump.c (restore_binary_file): Check if "file" is
651         NULL.
652
653 2018-10-17  Paul Koning  <paul_koning@dell.com>
654
655         * charset.c (convert_between_encodings): Fix unsigned overflow.
656
657 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
658
659         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
660         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
661         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
662         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
663         New functions.
664         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
665         and fbsd_info_proc_mappings_header.
666         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
667         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
668         New.
669
670 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
671
672         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
673         Solaris Maintainer.
674
675 2018-10-15  Tom Tromey  <tom@tromey.com>
676
677         * tui/tui.c (strcat_to_buf): Remove casts.
678         * tui/tui-winsource.c (tui_show_source_line)
679         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
680         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
681         * tui/tui-windata.c (tui_first_data_item_displayed)
682         (tui_delete_data_content_windows, tui_erase_data_content)
683         (tui_display_all_data, tui_display_data_from)
684         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
685         * tui/tui-win.c (tui_set_win_height)
686         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
687         casts.
688         * tui/tui-win.c (tui_resize_all): Remove casts.
689         (tui_scroll_backward_command, tui_set_focus)
690         (tui_set_tab_width_command): Likewise.
691         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
692         * tui/tui-regs.c (tui_show_register_group): Remove cast.
693         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
694         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
695         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
696         Remove casts.
697
698 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
699
700         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
701         AArch64/ARM maintainer.
702
703 2018-10-11  Gary Benson <gbenson@redhat.com>
704
705         * interps.h (interp::m_name): Make private and mutable.
706         * interps.c (interp::~interp): Free m_name.
707
708 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
709             Simon Marchi <simark@simark.ca>
710
711         * README (`configure' options): Add documentation for new
712         "--enable-unit-tests" option.
713         * acinclude.m4: Include "selftest.m4".
714         * configure: Regenerate.
715         * configure.ac: Use "GDB_AC_SELFTEST".
716         * maint.c (maintenance_selftest): Update message informing
717         that selftests have been disabled.
718         (maintenance_info_selftests): Likewise.
719         * selftest.m4: New file.
720
721 2018-10-10  Gary Benson <gbenson@redhat.com>
722
723         * remote.c (remote_target::remote_send_printf): Add
724         missing va_end found by Coverity.
725
726 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
727
728         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
729
730 2018-10-09  Tom Tromey  <tom@tromey.com>
731
732         * configure: Rebuild.
733         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
734         * NEWS: Update --enable-ubsan documentation.
735
736 2018-10-09  Gary Benson <gbenson@redhat.com>
737
738         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
739         found by Coverity.
740
741 2018-10-08  Tom Tromey  <tom@tromey.com>
742
743         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
744         variable.
745         (riscv_fbsd_init_abi): Likewise.
746
747 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
748         * valops.c (value_struct_elt_for_reference): Rename local variable
749         to work around the shadowing a previous local warning.
750
751 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
752
753         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
754         * NEWS: Mention new FreeBSD/riscv native configuration.
755         * configure.host: Add riscv*-*-freebsd*.
756         * configure.nat: Likewise.
757         * riscv-fbsd-nat.c: New file.
758
759 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
760
761         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
762         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
763         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
764         * NEWS: Mention new FreeBSD/riscv target.
765         * configure.tgt: Add riscv*-*-freebsd*.
766         * riscv-fbsd-tdep.c: New file.
767         * riscv-fbsd-tdep.h: New file.
768
769 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
770
771         * regcache.h (struct regcache_map_entry): Note that this type can
772         be used with traditional frame caches.
773         * trad-frame.c (trad_frame_set_reg_regmap): New.
774         * trad-frame.h (trad_frame_set_reg_regmap): New.
775
776 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
777
778         PR c++/16841
779         * valops.c (get_virtual_base_offset): New function.
780         (value_struct_elt_for_reference): Use it to get virtual base offset
781         and add it in calculating class member address.
782
783 2018-10-08   John Darrington <john@darrington.wattle.id.au>
784
785     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
786       (check_producer): Check if the producer is codewarrior.
787       (producer_is_codewarrior): New function.
788       (lnp_state_machine::record_line): Ignore is_stmt flag for records
789        produced by codewarrior.
790       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
791
792 2018-10-06  Tom Tromey  <tom@tromey.com>
793
794         PR python/19399:
795         * python/py-inferior.c: Add "architecture" entry.
796         (infpy_architecture): New function.
797
798 2018-10-06  Tom Tromey  <tom@tromey.com>
799
800         PR python/21765:
801         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
802         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
803         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
804         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
805
806 2018-10-06  Tom Tromey  <tom@tromey.com>
807
808         PR build/17077:
809         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
810         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
811         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
812         #include.
813
814 2018-10-06  Tom Tromey  <tom@tromey.com>
815
816         * python/py-breakpoint.c (bppy_get_location): Handle a
817         bp_breakpoint without a location.
818
819 2018-10-06  Tom Tromey  <tom@tromey.com>
820
821         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
822         (_RegEx): Reformat help text.
823         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
824         (AnyCallerIs, AnyCallerMatches): Reformat help text.
825         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
826         text.
827         * python/lib/gdb/command/xmethods.py (InfoXMethod)
828         (EnableXMethod, DisableXMethod): Remove help indentation.
829         Capitalize meta-syntactic variables.
830         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
831         (EnableUnwinder, DisableUnwinder): Remove help indentation.
832         Capitalize meta-syntactic variables.
833         * python/lib/gdb/command/explore.py (ExploreCommand)
834         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
835         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
836         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
837         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
838         Remove help indentation.
839         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
840         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
841         (DisableFrameFilter, SetFrameFilterPriority)
842         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
843
844 2018-10-06  Tom Tromey  <tom@tromey.com>
845
846         PR tui/28819:
847         * tui/tui-io.c (gdb_wgetch): New function.
848         (tui_mld_getc, tui_getc): Use it.
849
850 2018-10-05  Tom Tromey  <tom@tromey.com>
851
852         * sol-thread.c (sol_thread_target::wait): Rename inner
853         "save_ptid".
854
855 2018-10-04  Tom Tromey  <tom@tromey.com>
856
857         * configure: Rebuild.
858         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
859
860 2018-10-04  Tom Tromey  <tom@tromey.com>
861
862         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
863         declaration of "block".
864
865 2018-10-04  Tom Tromey  <tom@tromey.com>
866
867         * common/filestuff.c (fdwalk): Remove inner declaration of
868         "result".
869
870 2018-10-04  Tom Tromey  <tom@tromey.com>
871
872         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
873         "structs_addr" and hoist declaration.
874
875 2018-10-04  Tom Tromey  <tom@tromey.com>
876
877         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
878         variable "size".
879
880 2018-10-04  Tom Tromey  <tom@tromey.com>
881
882         * mdebugread.c (parse_partial_symbols): Use std::string.
883
884 2018-10-04  Tom Tromey  <tom@tromey.com>
885
886         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
887         * p-valprint.c (pascal_val_print): Split inner "i" variable.
888         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
889         header.
890         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
891         more inner scope.
892         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
893         * varobj.c (varobj_update): Rename inner "newobj",
894         "type_changed".
895         * valprint.c (generic_emit_char): Rename inner "buf".
896         * valops.c (find_overload_match): Rename inner "temp".
897         (value_struct_elt_for_reference): Declare "v" in more inner
898         scope.
899         * v850-tdep.c (v850_push_dummy_call): Rename "len".
900         * unittests/array-view-selftests.c (run_tests): Rename inner
901         "vec".
902         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
903         header.
904         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
905         "tsv" in more inner scope.
906         (print_one_static_tracepoint_marker): Rename inner
907         "tuple_emitter".
908         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
909         (tic6x_push_dummy_call): Don't redeclare "addr".
910         * target-float.c: Declare "dto" lower.
911         * symtab.c (lookup_local_symbol): Rename inner "sym".
912         (find_pc_sect_line): Rename inner "pc".
913         * stack.c (print_frame): Don't redeclare "gdbarch".
914         (return_command): Rename inner "gdbarch".
915         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
916         "sp".
917         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
918         header.
919         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
920         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
921         scope.
922         * remote.c (remote_target::update_thread_list): Don't redeclare
923         "tp".
924         (remote_target::process_initial_stop_replies): Rename inner
925         "thread".
926         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
927         (remote_target::wait_as): Don't redeclare "stop_reply".
928         (remote_target::get_thread_local_address): Rename inner
929         "result".
930         (remote_target::get_tib_address): Likewise.
931
932         * regcache.c (cooked_read_test): Rename "regnum".
933         * record-btrace.c (cmd_record_btrace_start): Rename inner
934         "exception".
935         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
936         loop header.
937         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
938         header.
939         (ppu2spu_sniffer): Rename inner "buf".
940         * parse.c (operator_check_standard): Rename inner "type",
941         "objfile".
942         * p-valprint.c (pascal_val_print): Introduce new scope for
943         "low_bound", "high_bound".
944         * p-exp.y (yylex): Declare "i" in loop header.
945         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
946         Lower declaration of "s".
947         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
948         header.
949         (nios2_push_dummy_call): Rename "len".
950         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
951         "buf".
952         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
953         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
954         (linux_xfer_osdata_modules): Likewise.
955         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
956         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
957         (mips_o64_push_dummy_call): Likewise.
958         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
959         "op".
960         * mi/mi-main.c (list_available_thread_groups): Rename inner
961         "tuple_emitter".
962         (mi_cmd_data_read_memory): Rename inner "opts".
963         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
964         "tuple_emitter".
965         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
966         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
967         more inner scope.
968         (parse_partial_symbols): Rename inner "pst", "p", "name"
969         * main.c (captured_main_1): Rename inner "i"s.
970         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
971         "oso2".
972         * linux-tdep.c (linux_info_proc): Rename inner "filename".
973         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
974         * infrun.c (handle_no_resumed): Don't redeclare "thread".
975         (handle_signal_stop): Rename inner "gdbarch".
976         (handle_command): Declare "signum" in loop header.
977         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
978         "status".
979         (examine_prologue): Rename inner "sol" and "sof".
980         (ia64_extract_return_value): Rename inner "val".  Declare another
981         "val" in a more inner scope.
982         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
983         inner scope.
984         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
985         "except".
986         * findvar.c (default_read_var_value): Don't redeclare "addr".
987         * f-exp.y (yylex): Declare "i" in loop header.
988         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
989         Rename inner "type", "expect_type".
990         (evaluate_subexp_for_sizeof): Rename inner "pc".
991         * elfread.c (elf_symfile_read): Rename inner "abfd".
992         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
993         "bytes_read".
994         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
995         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
996         (dwarf_decode_line_header): Rename inner "lh".
997         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
998         "offset".  Declare "i" in loop header.
999         (disassemble_dwarf_expression): Rename inner "addr_size".
1000         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
1001         inner "result".
1002         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
1003         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
1004         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
1005         "inner_list_emitter".
1006         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
1007         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
1008         declaration in a block.
1009         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
1010         * cp-valprint.c (cp_print_value_fields): Don't redeclare
1011         "obstack_final_size".
1012         * cp-support.c (inspect_type): Declare "i" in loop header.
1013         * compile/compile.c (compile_instance::insert_symbol_error):
1014         Rename inner "e".
1015         * common/agent.c (agent_run_command): Remove inner "ret"
1016         declaration.
1017         * coffread.c (coff_symfile_read): Rename inner "name".
1018         (coff_symfile_read): Rename inner "abfd".
1019         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
1020         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
1021         "high".
1022         * c-exp.y (lex_one_token): Move "len" declaration lower.
1023         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
1024         "gdbarch".
1025         (create_exception_master_breakpoint): Likewise.  Don't redeclare
1026         "b".
1027         (watch_command_1): Declare "mark" later.
1028         (clear_command): Don't shadow "a" or "b".
1029         (delete_command): Rename inner "b".
1030         (delete_trace_command): Likewise.
1031         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
1032         "op".
1033         (arm_gdbarch_init): Remove inner "e_flags".
1034         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
1035         "offset" in inner blocks.
1036
1037 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
1038
1039         * dwarf-index-write.c (file_write): Don't write if the vector is
1040         empty.
1041
1042 2018-10-05  Tom de Vries  <tdevries@suse.de>
1043
1044         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
1045         PyArg_ParseTuple call.
1046
1047 2018-10-05  Tom de Vries  <tdevries@suse.de>
1048
1049         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
1050         PyArg_ParseTuple call.
1051
1052 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
1053
1054         * psymtab.c (recursively_search_psymtabs): Reformat parameters
1055         to avoid exceeding 80 characters per line limit.
1056
1057 2018-10-04  Tom Tromey  <tom@tromey.com>
1058
1059         * symfile.c (syms_from_objfile_1, finish_new_objfile)
1060         (reread_symbols): Update.
1061         * complaints.h (clear_complaints): Remove argument.
1062         * complaints.c (enum complaint_series): Remove.
1063         (series): Remove global.
1064         (complaint_internal): Update.
1065         (clear_complaints): Remove argument.
1066
1067 2018-10-04  Tom Tromey  <tom@tromey.com>
1068
1069         * symfile.c (symbol_file_add_with_addrs): Do not print "no
1070         debugging symbols" message if there is a separate debug objfile.
1071
1072 2018-10-04  Tom Tromey  <tom@tromey.com>
1073
1074         PR cli/19551:
1075         * symfile.c (symbol_file_add_with_addrs): Update output.
1076         * psymtab.c (require_partial_symbols): Update output.
1077
1078 2018-10-04  Tom Tromey  <tom@tromey.com>
1079
1080         PR cli/22234:
1081         * complaints.c: Emit \n.
1082
1083 2018-10-04  Tom Tromey  <tom@tromey.com>
1084
1085         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1086         (separate_debug_file_exists, find_separate_debug_file)
1087         (add_symbol_file_command, reread_symbols, allocate_symtab)
1088         (allocate_compunit_symtab): Use filtered printing, not
1089         unfiltered.
1090         * psymtab.c (require_partial_symbols, dump_psymtab)
1091         (allocate_psymtab): Use filtered printing, not unfiltered.
1092
1093 2018-10-04  Tom Tromey  <tom@tromey.com>
1094
1095         * complaints.c (complaint_internal): Correctly check complaint
1096         count.
1097
1098 2018-10-04  Tom Tromey  <tom@tromey.com>
1099
1100         * complaints.h (struct complaints): Remove declaration.
1101         * complaints.c (clear_complaints): Remove an unused variable.
1102
1103 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1104
1105         * MAINTAINERS (Write After Approval): Add self.
1106
1107 2018-10-03  Tom Tromey  <tom@tromey.com>
1108
1109         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1110         "buffer_contents".
1111         * coffread.c (coff_symtab_read): Initialize "newobj".
1112
1113 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1114
1115         * dwarf2read.c (read_func_scope): Remove struct keyword in
1116         range-based for.
1117
1118 2018-10-03  Tom Tromey  <tom@tromey.com>
1119
1120         * README: Mention --enable-ubsan.
1121         * NEWS: Mention --enable-ubsan.
1122         * acinclude.m4: Include sanitize.m4.
1123         * configure: Rebuild.
1124         * configure.ac: Call AM_GDB_UBSAN.
1125         * sanitize.m4: New file.
1126
1127 2018-10-03  Tom Tromey  <tom@tromey.com>
1128
1129         * expression.h (enum exp_opcode): Use uint8_t as base type.
1130         * expprint.c (op_name): Handle invalid opcodes.
1131
1132 2018-10-03  Tom Tromey  <tom@tromey.com>
1133
1134         * parse.c (prefixify_expression): Add assert.
1135         (parse_exp_in_context_1): Throw exception if the expression is
1136         empty.
1137
1138 2018-10-03  Tom Tromey  <tom@tromey.com>
1139
1140         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1141
1142 2018-10-03  Tom Tromey  <tom@tromey.com>
1143
1144         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1145
1146 2018-10-03  Tom Tromey  <tom@tromey.com>
1147
1148         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1149         unsigned.
1150
1151 2018-10-03  Tom Tromey  <tom@tromey.com>
1152
1153         * findvar.c (extract_integer): Do work in an unsigned type.
1154
1155 2018-10-03  Tom Tromey  <tom@tromey.com>
1156
1157         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1158         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1159         base type.
1160         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1161         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1162         type.
1163         * c-lang.h (enum c_string_type_values): Use unsigned as base
1164         type.
1165         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1166
1167 2018-10-03  Tom Tromey  <tom@tromey.com>
1168
1169         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1170         <~dwarf2_frame_state_reg_info>: Update.
1171         <dwarf2_frame_state_reg_info>: Update.
1172         <alloc_regs>: Add assertion.  Update.
1173         <reg>: Now a std::vector.
1174         <num_regs>: Remove.
1175         <swap>: Update.
1176         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1177         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1178
1179 2018-10-03  Tom Tromey  <tom@tromey.com>
1180
1181         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1182
1183 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1184
1185         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1186
1187 2018-10-02  Tom Tromey  <tom@tromey.com>
1188
1189         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1190
1191 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1192
1193         * NEWS: Mention changed commands.
1194         * ser-uds.c: New file.
1195         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1196         * configure: Regenerate.
1197         * Makefile.in: Add new file.
1198         * serial.c (serial_open): Check if filename is a socket
1199           and lookup the appropriate interface accordingly.
1200
1201 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1202
1203         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1204         define.
1205         (AARCH64_EXTRA_MAGIC): Likewise.
1206         (AARCH64_FPSIMD_MAGIC): Likewise.
1207         (AARCH64_SVE_MAGIC): Likewise.
1208         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1209         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1210         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1211         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1212         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1213         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1214         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1215         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1216         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1217         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1218         (read_aarch64_ctx): Add function.
1219         (aarch64_linux_sigframe_init): Detect FP registers.
1220
1221 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1222
1223         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1224         (AARCH64_D0_REGNUM): Likewise.
1225         (AARCH64_S0_REGNUM): Likewise.
1226         (AARCH64_H0_REGNUM): Likewise.
1227         (AARCH64_B0_REGNUM): Likewise.
1228         (AARCH64_SVE_V0_REGNUM): Likewise.
1229         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1230         (AARCH64_D0_REGNUM): Likewise.
1231         (AARCH64_S0_REGNUM): Likewise.
1232         (AARCH64_H0_REGNUM): Likewise.
1233         (AARCH64_B0_REGNUM): Likewise.
1234         (AARCH64_SVE_V0_REGNUM): Likewise.
1235
1236 2018-10-01  Gary Benson <gbenson@redhat.com>
1237
1238         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1239         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1240         prfpregset_t instead of gdb_prfpregset_t.
1241         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1242         * configure, config.in: Rebuild.
1243
1244 2018-10-01  Gary Benson <gbenson@redhat.com>
1245
1246         * common/gdb_proc_service.h: New file, factored out from...
1247         * gdb_proc_service.h: Moved common code to the above file.
1248         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1249
1250 2018-10-01  Gary Benson <gbenson@redhat.com>
1251
1252         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1253         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1254
1255 2018-10-01  Gary Benson <gbenson@redhat.com>
1256
1257         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1258         (AC_CHECK_HEADERS): Check for linux/elf.h.
1259         * configure, config.in: Rebuild.
1260         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1261         doesn't define elf_fpregset_t.
1262
1263 2018-10-01  Gary Benson <gbenson@redhat.com>
1264
1265         * gdb_proc_service.h: Whitespace change.
1266
1267 2018-10-01  Tom Tromey  <tom@tromey.com>
1268
1269         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1270         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1271         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1272
1273 2018-10-01  Tom Tromey  <tom@tromey.com>
1274
1275         * README: Minor change.
1276
1277 2018-09-30  Pedro Alves  <palves@redhat.com>
1278
1279         * darwin-nat-info.c (darwin_debug_regions_recurse)
1280         (info_mach_exceptions_command): Remove unused local variables.
1281         * darwin-nat.c (darwin_decode_notify_message)
1282         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1283         (darwin_stop_inferior, darwin_setup_exceptions)
1284         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1285         (darwin_nat_target::attach, darwin_nat_target::detach)
1286         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1287         local variables.
1288         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1289         variables.
1290
1291 2018-09-29  Tom Tromey  <tom@tromey.com>
1292
1293         * README: Remove some leftover text.
1294
1295 2018-09-29  Tom Tromey  <tom@tromey.com>
1296
1297         * PROBLEMS: Rewrite.
1298         * README: Update.
1299
1300 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1301
1302         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1303         case with explicit breakpoint kind.
1304         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1305         'additional_info' and related logic.
1306         (riscv_debug_breakpoints): New variable.
1307         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1308         instruction to determine the breakpoint kind.
1309         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1310         flag.  Update description of 'set/show riscv
1311         use-compressed-breakpoints' flag.
1312
1313 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1314
1315         (NEWS): Mention changes to frame related commands.
1316         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1317         (add_prefix_cmd_suppress_notification): New function.
1318         (add_com_suppress_notification): Call
1319         add_cmd_suppress_notification.
1320         * command.h (add_cmd_suppress_notification): Declare.
1321         (add_prefix_cmd_suppress_notification): Declare.
1322         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1323         (parse_frame_specification): Moved from stack.c, with
1324         simplification to handle a single argument.
1325         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1326         switch to the selected frame.  Add a header comment.
1327         * stack.c: Remove 'safe-ctype.h' include.
1328         (find_frame_for_function): Add declaration.
1329         (find_frame_for_address): New function.
1330         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1331         (frame_selection_by_function_completer): New function.
1332         (info_frame_command): Rename to...
1333         (info_frame_command_core): ...this, and update parameter types.
1334         (select_frame_command): Rename to...
1335         (select_frame_command_core): ...this, and update parameter types.
1336         (frame_command): Rename to...
1337         (frame_command_core): ...this, and update parameter types.
1338         (class frame_command_helper): New class to wrap implementations of
1339         frame related sub-commands.
1340         (frame_apply_cmd_list): New static global.
1341         (frame_cmd_list): Make static.
1342         (select_frame_cmd_list): New global for sub-commands.
1343         (info_frame_cmd_list): New global for sub-commands.
1344         (_initialize_stack): Register sub-commands for 'frame',
1345         'select-frame', and 'info frame'.  Update 'frame apply' commands
1346         to use frame_apply_cmd_list.  Move function local static
1347         frame_apply_list to file static frame_apply_cmd_list for
1348         consistency.
1349         * stack.h (select_frame_command): Delete declarationn.
1350         (select_frame_for_mi): Declare new function.
1351
1352 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1353
1354         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1355         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1356         and NOP.
1357
1358 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1359
1360         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1361
1362 2018-09-26  Tom Tromey  <tom@tromey.com>
1363
1364         * valops.c (auto_abandon): Remove dead code.
1365
1366 2018-09-26  Tom Tromey  <tom@tromey.com>
1367
1368         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1369
1370 2018-09-24  Tom Tromey  <tom@tromey.com>
1371
1372         * common/pathstuff.c (get_standard_cache_dir): Make
1373         "xdg_cache_home" and "home" const.
1374         * top.c (init_history): Make "tmpenv" const.
1375         * main.c (get_init_files): Make "homedir" const.
1376
1377 2018-09-23  Tom Tromey  <tom@tromey.com>
1378
1379         PR python/18852:
1380         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1381
1382 2018-09-23  Tom Tromey  <tom@tromey.com>
1383
1384         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1385         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1386         * python/python-internal.h (gdbpy_handle_exception): Declare.
1387         * python/py-utils.c (gdbpy_handle_exception): New function.
1388
1389 2018-09-23  Tom Tromey  <tom@tromey.com>
1390
1391         PR python/17284:
1392         * python/py-type.c (typy_template_argument): Check for negative
1393         argument number.
1394
1395 2018-09-23  Tom Tromey  <tom@tromey.com>
1396
1397         PR python/14062:
1398         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1399
1400 2018-09-23  Tom Tromey  <tom@tromey.com>
1401
1402         PR python/18170:
1403         * python/py-value.c (valpy_int): Allow conversion from pointer
1404         type.
1405
1406 2018-09-23  Tom Tromey  <tom@tromey.com>
1407
1408         PR python/20126:
1409         * python/py-value.c (valpy_int): Respect type sign.
1410
1411 2018-09-23  Tom Tromey  <tom@tromey.com>
1412
1413         PR python/18352;
1414         * python/py-value.c (valpy_float): Allow conversions from int or
1415         char.
1416         (valpy_int, valpy_long): Allow conversions from float.
1417
1418 2018-09-23  Tom Tromey  <tom@tromey.com>
1419
1420         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1421         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1422
1423 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1424
1425         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1426         __sighndlr.
1427         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1428
1429 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1430
1431         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1432         target_terminal::ours().
1433
1434 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1435
1436         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1437         of vl to ULONGEST.
1438
1439 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1440
1441         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1442         redundant condition.
1443
1444 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1445
1446         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1447
1448         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1449         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1450         * sol-thread.c (ps_pdmodel): Don't guard definition.
1451
1452         * procfs.c: Fix formatting.
1453
1454         * procfs.c (sysset_t_alloc): Remove.
1455         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1456         (procfs_debug_inferior): Likewise.
1457         (procfs_set_exec_trap): Likewise.
1458         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1459         (proc_set_traced_sysexit): Likewise.
1460
1461         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1462         (dead_procinfo): Likewise.
1463         (proc_warn): Likewise.
1464         (proc_error): Likewise.
1465         (proc_get_LDT_entry): Likewise.
1466         (do_attach): Likewise.
1467         (procfs_target::pid_to_str): Likewise.
1468         (iterate_over_mappings): Likewise.
1469
1470         * procfs.c (create_procinfo): Fix ARI warning.
1471         (proc_get_status): Likewise.
1472         (proc_stop_process): Likewise.
1473         (proc_run_process): Likewise.
1474         (proc_kill): Likewise.
1475         (proc_get_LDT_entry): Likewise.
1476         (procfs_find_LDT_entry): Likewise.
1477         (proc_update_threads): Likewise.
1478         (proc_iterate_over_threads): Likewise.
1479         (do_attach): Likewise.
1480         (procfs_xfer_memory): Likewise.
1481         (invalidate_cache): Likewise.
1482         (procfs_target::resume): Likewise.
1483         (procfs_init_inferior): Likewise.
1484         (procfs_set_exec_trap): Likewise.
1485         (procfs_target::thread_alive): Likewise.
1486         (procfs_target::pid_to_exec_file): Likewise.
1487         (iterate_over_mappings): Likewise.
1488         (procfs_target::make_corefile_notes): Likewise.
1489         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1490
1491         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1492         (procfs_find_LDT_entry): Likewise.
1493         * sol-thread.c (ps_lgetLDT): Likewise.
1494
1495 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1496
1497         PR tdep/17903
1498         * procfs.c (procfs_target): Declare pid_to_exec_file.
1499         (procfs_target::pid_to_exec_file): New.
1500
1501 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1502
1503         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1504         renaming.
1505         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1506         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1507
1508 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1509
1510         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1511         (supply_fpregset, fill_fpregset): Move ...
1512         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1513         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1514         Remove references to ioctl-based procfs.
1515         Include <sys/reg.h>.
1516         Remove PR_MODEL_NATIVE guards.
1517         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1518         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1519
1520 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1521
1522         PR gdb/20981:
1523         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1524         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1525         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1526
1527 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1528
1529         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1530         (fbsd_print_sockaddr_in6): Likewise.
1531
1532 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1533             Chris January  <chris.january@arm.com>
1534
1535         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1536         (evaluate_subexp_standard): Return a dummy type when
1537         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1538         OP_F77_UNDETERMINED_ARGLIST case.
1539         * expression.h (enum noside): Update comment.
1540
1541 2018-09-19  George Vasick <george.vasick@oracle.com>
1542
1543         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1544
1545 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1546             April Chin <april.chin@oracle.com>
1547             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1548
1549         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1550         uint_t lwpid_t.
1551         (create_procinfo): Print pids in /proc without leading zeros.
1552
1553 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1554
1555         * nios2-tdep.c (nios2_gcc_target_options): New.
1556         (nios2_gdb_arch_init): Install new hook.
1557
1558 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1559
1560         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1561         New file.
1562         * update-gnulib.sh: Apply patch.
1563         * configure: Re-generate.
1564
1565 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1566
1567         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1568         description.  Make "info proc" command descriptions more
1569         consistent.
1570
1571 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1572
1573         * NEWS: Mention 'info proc files' command.
1574
1575 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1576
1577         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1578         descriptors for IP_FILES and IP_ALL.
1579
1580 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1581
1582         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1583         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1584         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1585         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1586         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1587         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1588         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1589         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1590         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1591         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1592         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1593         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1594         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1595         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1596         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1597         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1598         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1599         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1600         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1601         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1602         (struct fbsd_sockaddr_un): New types.
1603         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1604         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1605         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1606         (fbsd_core_info_proc_files): New functions.
1607         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1608         IP_ALL.
1609         * fbsd-tdep.h (fbsd_info_proc_files_header)
1610         (fbsd_info_proc_files_entry): New.
1611
1612 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1613
1614         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1615         * infcmd.c (info_proc_cmd_files): New function.
1616         (_initialize_infcmd): Register 'info proc files' command.
1617
1618 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1619
1620         * gnulib/aclocal-m4-deps.mk: Re-generate.
1621         * gnulib/aclocal.m4: Re-generate.
1622         * gnulib/config.in: Re-generate.
1623         * gnulib/configure: Re-generate.
1624         * gnulib/import/Makefile.am: Re-generate.
1625         * gnulib/import/Makefile.in: Re-generate.
1626         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1627         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1628         * gnulib/import/arpa_inet.in.h: New file.
1629         * gnulib/import/inet_ntop.c: New file.
1630         * gnulib/import/m4/arpa_inet_h.m4: New file.
1631         * gnulib/import/m4/inet_ntop.m4: New file.
1632         * gnulib/import/m4/netinet_in_h.m4: New file.
1633         * gnulib/import/m4/socklen.m4: New file.
1634         * gnulib/import/m4/sockpfaf.m4: New file.
1635         * gnulib/import/m4/stdalign.m4: New file.
1636         * gnulib/import/m4/sys_uio_h.m4: New file.
1637         * gnulib/import/netinet_in.in.h: New file.
1638         * gnulib/import/stdalign.in.h: New file.
1639         * gnulib/import/sys_socket.c: New file.
1640         * gnulib/import/sys_socket.in.h: New file.
1641         * gnulib/import/sys_uio.in.h: New file.
1642         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1643         module.
1644
1645 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1646
1647         * gnulib/aclocal-m4-deps.mk: New file.
1648         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1649         deterministically.
1650
1651 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1652
1653         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1654         KVE_PATH.
1655
1656 2018-09-18  Tom Tromey  <tom@tromey.com>
1657
1658         * compile/compile-object-load.c (struct
1659         link_hash_table_cleanup_data): Add constructor and destructor.
1660         Use DISABLE_COPY_AND_ASSIGN.
1661         (~link_hash_table_cleanup_data): Rename from
1662         link_hash_table_free.  Now a destructor.
1663         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1664
1665 2018-09-18  Tom Tromey  <tom@tromey.com>
1666
1667         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1668         * compile/compile-object-load.c (struct munmap_list): Move to
1669         header file.
1670         (munmap_list::add): Rename from munmap_list_add; rewrite.
1671         (munmap_list::~munmap_list): Rename from munmap_list_free.
1672         (munmap_listp_free_cleanup): Remove.
1673         (compile_object_load): Update.
1674         * compile/compile-object-load.h (struct munmap_list): Move from
1675         compile-object-load.c.  Rewrite.
1676
1677 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1678
1679         * aarch64-tdep.c (pass_in_v): Use register size.
1680         (aarch64_extract_return_value): Likewise.
1681         (aarch64_store_return_value): Likewise.
1682
1683 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1684
1685         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1686         rlim_t.
1687
1688 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1689
1690         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1691         Fix short help line.
1692
1693 2018-09-17  Tom Tromey  <tom@tromey.com>
1694
1695         PR python/20445:
1696         * configure: Rebuild.
1697         * configure.ac: Conditionally use -DNDEBUG for Python.
1698
1699 2018-09-17  Tom Tromey  <tom@tromey.com>
1700
1701         * configure: Rebuild.
1702         * configure.ac: Use gmp as a library dependency when checking for
1703         mpfr.
1704
1705 2018-09-17  Pedro Alves  <palves@redhat.com>
1706
1707         * python/py-inferior.c (find_inferior_object): Delete.
1708
1709 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1710
1711         * compile/compile-cplus-types.c
1712         (compile_cplus_instance::enter_scope): Don't use new_scope after
1713         std::move.
1714
1715 2018-09-17  Tom Tromey  <tom@tromey.com>
1716
1717         * common/pathstuff.c (get_standard_cache_dir): Use
1718         ~/Library/Caches on macOS.
1719         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1720
1721 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1722
1723         PR python/23669
1724         * breakpoint.c (commands_cmd_element): New.
1725         (_initialize_breakpoint): Assign commands_cmd_element.
1726         * breakpoint.h (commands_cmd_element): New.
1727         * cli/cli-script.c (while_cmd_element, if_command,
1728         define_cmd_element): New.
1729         (command_name_equals): Remove.
1730         (process_next_line): Compare commands by pointer, not by name.
1731         (_initialize_cli_script): Assign the various cmd_list_element
1732         variables.
1733         * compile/compile.c (compile_cmd_element): New.
1734         (_initialize_compile): Assign compile_cmd_element.
1735         * compile/compile.h (compile_cmd_element): New.
1736         * guile/guile.c (guile_cmd_element): New.
1737         (install_gdb_commands): Assign guile_cmd_element.
1738         * guile/guile.h (guile_cmd_element): New.
1739         * python/python.c (python_cmd_element): New.
1740         (_initialize_python): Assign python_cmd_element.
1741         * python/python.h (python_cmd_element): New.
1742         * tracepoint.c (while_stepping_cmd_element): New.
1743         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1744         * tracepoint.h (while_stepping_cmd_element): New.
1745
1746 2018-09-17  Tom Tromey  <tom@tromey.com>
1747
1748         * infrun.c (save_infcall_suspend_state): Return
1749         infcall_suspend_state_up.
1750         (save_infcall_control_state): Return infcall_control_state_up.
1751         * inferior.h (save_infcall_suspend_state)
1752         (save_infcall_control_state): Declare later.  Return unique
1753         pointers.
1754
1755 2018-09-17  Tom Tromey  <tom@tromey.com>
1756
1757         * infrun.c (struct stop_context): Declare constructor,
1758         destructor, "changed" method.
1759         (stop_context::stop_context): Rename from save_stop_context.
1760         (stop_context::~stop_context): Rename from
1761         release_stop_context_cleanup.
1762         (normal_stop): Update.
1763         (stop_context::changed): Rename from stop_context_changed.  Return
1764         bool.
1765
1766 2018-09-17  Tom Tromey  <tom@tromey.com>
1767
1768         * inferior.h (struct infcall_suspend_state_deleter): New.
1769         (infcall_suspend_state_up): New typedef.
1770         (struct infcall_control_state_deleter): New.
1771         (infcall_control_state_up): New typedef.
1772         (make_cleanup_restore_infcall_suspend_state)
1773         (make_cleanup_restore_infcall_control_state): Don't declare.
1774         * infcall.c (call_function_by_hand_dummy): Update.
1775         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1776         (make_cleanup_restore_infcall_suspend_state): Remove.
1777         (do_restore_infcall_control_state_cleanup)
1778         (make_cleanup_restore_infcall_control_state): Remove.
1779
1780 2018-09-17  Tom Tromey  <tom@tromey.com>
1781
1782         * gdbthread.h (struct thread_control_state): Add initializer.
1783         (class thread_info) <control>: Remove initializer.
1784         * inferior.h (struct inferior_control_state): Add initializer.
1785         (class inferior) <control>: Remove initializer.
1786         (exit_inferior_1): Update.
1787         * infrun.c (struct infcall_control_state): Add constructors.
1788         (save_infcall_control_state): Use new.
1789         (restore_infcall_control_state, discard_infcall_control_state):
1790         Use delete.
1791
1792 2018-09-17  Tom Tromey  <tom@tromey.com>
1793
1794         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1795         unique_ptr.
1796         <siginfo_data>: Now a unique_xmalloc_ptr.
1797         (save_infcall_suspend_state, restore_infcall_suspend_state)
1798         (discard_infcall_suspend_state)
1799         (get_infcall_suspend_state_regcache): Update.
1800
1801 2018-09-17  Tom Tromey  <tom@tromey.com>
1802
1803         * gdbthread.h (struct thread_suspend_state): Add initializers.
1804         (class thread_info) <suspend>: Remove initializer.
1805         * infrun.c (struct infcall_suspend_state): Add initializers.
1806         (save_infcall_suspend_state): Use new.
1807         (discard_infcall_suspend_state): Use delete.
1808
1809 2018-09-16  Tom Tromey  <tom@tromey.com>
1810
1811         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1812         Remove.
1813         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1814         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1815         (py_varobj_iter_new): Likewise.
1816         (py_varobj_get_iterator): Use gdbpy_ref.
1817
1818 2018-09-16  Tom Tromey  <tom@tromey.com>
1819
1820         * python/py-threadevent.c (py_get_event_thread): Simplify.
1821         * python/py-inferior.c (infpy_thread_from_thread_handle):
1822         Return immediately after calling thread_to_thread_object.  Use
1823         Py_RETURN_NONE.
1824         (thread_to_thread_object): Set the exception on a NULL return.
1825
1826 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1827
1828         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1829
1830 2018-09-16  Tom Tromey  <tom@tromey.com>
1831
1832         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1833         Remove.
1834
1835 2018-09-16  Tom Tromey  <tom@tromey.com>
1836
1837         * python/python-internal.h (thread_to_thread_object): Change
1838         return type.
1839         * python/py-inferior.c (thread_to_thread_object): Return a new
1840         reference.
1841         (infpy_thread_from_thread_handle): Update.
1842         * python/py-infthread.c (gdbpy_selected_thread): Update.
1843         * python/py-stopevent.c (create_stop_event_object): Update.
1844         * python/py-threadevent.c (py_get_event_thread): Return a new
1845         reference.
1846         (py_get_event_thread): Update.
1847         * python/py-event.h (py_get_event_thread): Change return type.
1848         * python/py-continueevent.c (create_continue_event_object):
1849         Update.
1850
1851 2018-09-16  Tom Tromey  <tom@tromey.com>
1852
1853         * python/py-progspace.c (pspy_get_objfiles): Update.
1854         * python/python-internal.h (objfile_to_objfile_object): Change
1855         return type.
1856         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1857         Update.
1858         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1859         Update.
1860         * python/python.c (gdbpy_get_current_objfile): Update.
1861         (gdbpy_objfiles): Update.
1862         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1863         Update.
1864         (objfile_to_objfile_object): Return a new reference.
1865         * python/py-symtab.c (stpy_get_objfile): Update.
1866         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1867         Update.
1868
1869 2018-09-16  Tom Tromey  <tom@tromey.com>
1870
1871         * python/py-inferior.c (infpy_get_progspace): Update.
1872         * python/python-internal.h (pspace_to_pspace_object): Change
1873         return type.
1874         * python/py-newobjfileevent.c
1875         (create_clear_objfiles_event_object): Update.
1876         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1877         Update.
1878         * python/python.c (gdbpy_get_current_progspace): Update.
1879         (gdbpy_progspaces): Update.
1880         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1881         reference.
1882         * python/py-objfile.c (objfpy_get_progspace): Update.
1883         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1884         Update.
1885
1886 2018-09-16  Tom Tromey  <tom@tromey.com>
1887
1888         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1889         (solib_name, block_for_pc, find_pc_line): New functions.
1890         (execute_unwinders): Update.
1891         * python/py-block.c (gdbpy_block_for_pc): Remove.
1892         * python/py-inferior.c (infpy_get_progspace): New function.
1893         (inferior_object_getset) <progspace>: Add.
1894         * python/py-progspace.c (pspy_objfiles): Rewrite.
1895         (pspy_solib_name, pspy_block_for_pc)
1896         (pspy_find_pc_line, pspy_is_valid): New functions.
1897         (progspace_object_methods): Add entries for solib_name,
1898         block_for_pc, find_pc_line, is_valid.
1899         * python/python-internal.h (gdbpy_block_for_pc)
1900         (build_objfiles_list): Don't declare.
1901         * python/python.c: Don't include solib.h.
1902         (gdbpy_solib_name, gdbpy_find_pc_line)
1903         (gdbpy_get_current_progspace, build_objfiles_list)
1904         (gdbpy_objfiles): Remove.
1905         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1906         solib_name, find_pc_line>: Remove entries.
1907
1908 2018-09-16  Tom Tromey  <tom@tromey.com>
1909
1910         * top.c (new_ui_command): Use GNU style for metasyntactic
1911         variables.
1912         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1913         variables.
1914         * maint.c (maintenance_translate_address): Remove "<>" around
1915         text.
1916         * interps.c (interpreter_exec_cmd): Use GNU style for
1917         metasyntactic variables.
1918         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1919         metasyntactic variables.
1920         * tracepoint.c (tfind_range_command): Use GNU style for
1921         metasyntactic variables.
1922         (tfind_outside_command): Likewise.
1923         (_initialize_tracepoint): Likewise.
1924         * remote.c (extended_remote_target::create_inferior): Use GNU
1925         style for metasyntactic variables.
1926         * sparc64-tdep.c (adi_examine_command): Use GNU style for
1927         metasyntactic variables.
1928         (adi_assign_command): Likewise.
1929
1930 2018-09-16  Tom Tromey  <tom@tromey.com>
1931
1932         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1933         metasyntactic variables.  Print message if no disassembler options
1934         are available.
1935
1936 2018-09-15  Tom Tromey  <tom@tromey.com>
1937
1938         * infcmd.c (get_inferior_args): Return const char *.
1939         * inferior.h (get_inferior_args): Return type now const.
1940         * linux-tdep.c (linux_fill_prpsinfo): Update.
1941         * procfs.c (procfs_target::make_corefile_notes): Update.
1942
1943 2018-09-07  Tom Tromey  <tom@tromey.com>
1944
1945         * python/python.c (execute_gdb_command): Call bpstat_do_actions
1946         inside the TRY.
1947
1948 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
1949
1950         * nios2-tdep.c (nios2_type_align): New.
1951         (nios2_gdb_arch_init): Install type_align hook.
1952
1953 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1954
1955         * eval.c (fake_method::fake_method): Call xzalloc directly for a
1956         type that is neither object file owned, nor gdbarch owned.
1957         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1958         gdbarch is non-NULL.
1959         (alloc_type_instance): Allocate non-objfile owned types on the
1960         gdbarch obstack.
1961         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1962         using TYPE_ALLOC to ensure memory is allocated on the correct
1963         obstack.
1964         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1965         obstack, or the gdbarch obstack.
1966         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1967
1968 2018-09-14  Tom Tromey  <tom@tromey.com>
1969
1970         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1971         block.
1972
1973 2018-09-14  Tom Tromey  <tom@tromey.com>
1974
1975         * nat/fork-inferior.c (get_startup_shell): Remove "static".
1976
1977 2018-09-13  Tom Tromey  <tom@tromey.com>
1978
1979         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1980         static.
1981
1982 2018-09-13  Tom Tromey  <tom@tromey.com>
1983
1984         * exec.c (try_open_exec_file): Use std::string.
1985
1986 2018-09-13  Tom Tromey  <tom@tromey.com>
1987
1988         * utils.h (gdb_bfd_errmsg): Return std::string.
1989         * exec.c (exec_file_attach): Update.
1990         * compile/compile-object-load.c (compile_object_load): Update.
1991         * utils.c (gdb_bfd_errmsg): Return std::string.
1992
1993 2018-09-13  Tom Tromey  <tom@tromey.com>
1994
1995         * procfs.c (struct procinfo_deleter): New.
1996         (procinfo_up): New typedef.
1997         (do_destroy_procinfo_cleanup): Remove.
1998         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
1999
2000 2018-09-13  Tom Tromey  <tom@tromey.com>
2001
2002         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
2003
2004 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2005 2018-09-13  Tom Tromey  <tom@tromey.com>
2006
2007         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
2008         (pspy_get_objfiles): New function.
2009         (progspace_object_methods): New.
2010         (pspace_object_type): Add tp_methods callback.
2011         * python/python-internal.h (build_objfiles_list): New
2012         declaration.
2013         * python/python.c (build_objfiles_list): New function.
2014         (gdbpy_objfiles): Implement using build_objfiles_list.
2015         * NEWS: Mention the Progspace.objfiles method.
2016
2017 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2018
2019         * python/py-inferior.c (infpy_get_progspace): New function.
2020         (inferior_object_getset): Add progspace property.
2021         * NEWS: Mention the new property.
2022
2023 2018-09-13  Tom Tromey  <tom@tromey.com>
2024
2025         PR rust/23650:
2026         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
2027
2028 2018-09-13  Tom Tromey  <tom@tromey.com>
2029
2030         PR rust/23626:
2031         * rust-lang.c (rust_enum_variant): Now static.
2032         (rust_empty_enum_p): New function.
2033         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
2034         Handle empty enum.
2035
2036 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
2037
2038         * python/py-inferior.c (infpy_repr): New.
2039         (inferior_object_type): Register infpy_repr.
2040         * python/py-objfile.c (objfpy_repr): New.
2041         (objfile_object_type): Register objfpy_repr.
2042
2043 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2044
2045         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
2046
2047 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
2048
2049         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
2050         typo.
2051
2052 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2053
2054         * common/common-utils.c: Don't include '<sys/stat.h>'.
2055         (is_regular_file): Move to...
2056         * common/filestuff.c (is_regular_file): ... here.
2057         * common/common-utils.h (is_regular_file): Move to...
2058         * common/filestuff.h (is_regular_file): ... here.
2059
2060 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
2061
2062         * skip.c (debug_skip): New variable.
2063         (skiplist_entry::do_skip_file_p): Add debug output.
2064         (skiplist_entry::do_skip_gfile_p): Likewise.
2065         (skiplist_entry::skip_function_p): Likewise.
2066         (_initialize_step_skip): Create debug command.
2067         * NEWS: Mention set/show debug skip.
2068
2069 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2070
2071         * darwin-nat.c (should_disable_startup_with_shell):
2072         New function.
2073         (darwin_nat_target::create_inferior): Add call.
2074
2075 2018-09-11  Xavier Roirand  <roirand@adacore.com>
2076
2077         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
2078         inf_port, msg_state>: Initialize.
2079         (struct darwin_thread_info) <signaled, single_step>: Change
2080         type and initialize.
2081         (struct darwin_thread_info) <event>: Initialize.
2082
2083 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2084
2085         PR gdb/23555
2086         PR gdb/23558
2087         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2088         guesses.
2089
2090 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2091
2092         Revert:
2093         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2094
2095         PR gdb/23555
2096         PR gdb/23558
2097         * gnulib/aclocal.m4: Regenerate.
2098         * gnulib/config.in: Regenerate.
2099         * gnulib/configure: Regenerate.
2100         * gnulib/import/Makefile.am: Update.
2101         * gnulib/import/Makefile.in: Update.
2102         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2103         * gnulib/import/_Noreturn.h: ... this.
2104         * gnulib/import/alloca.in.h: Update.
2105         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2106         * gnulib/import/arg-nonnull.h: ... this.
2107         * gnulib/import/assure.h: Update.
2108         * gnulib/import/at-func.c: Update.
2109         * gnulib/import/basename-lgpl.c: Update.
2110         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2111         * gnulib/import/c++defs.h: ... this.
2112         * gnulib/import/canonicalize-lgpl.c: Update.
2113         * gnulib/import/cdefs.h: Update.
2114         * gnulib/import/chdir-long.c: Update.
2115         * gnulib/import/chdir-long.h: Update.
2116         * gnulib/import/cloexec.c: Update.
2117         * gnulib/import/cloexec.h: Update.
2118         * gnulib/import/close.c: Update.
2119         * gnulib/import/closedir.c: Update.
2120         * gnulib/import/config.charset: Update.
2121         * gnulib/import/dirent-private.h: Update.
2122         * gnulib/import/dirent.in.h: Update.
2123         * gnulib/import/dirfd.c: Update.
2124         * gnulib/import/dirname-lgpl.c: Update.
2125         * gnulib/import/dirname.h: Update.
2126         * gnulib/import/dosname.h: Update.
2127         * gnulib/import/dup-safer-flag.c: Update.
2128         * gnulib/import/dup-safer.c: Update.
2129         * gnulib/import/dup.c: Update.
2130         * gnulib/import/dup2.c: Update.
2131         * gnulib/import/errno.in.h: Update.
2132         * gnulib/import/error.c: Update.
2133         * gnulib/import/error.h: Update.
2134         * gnulib/import/exitfail.c: Update.
2135         * gnulib/import/exitfail.h: Update.
2136         * gnulib/import/extra/update-copyright: Update.
2137         * gnulib/import/fchdir.c: Update.
2138         * gnulib/import/fcntl.c: Update.
2139         * gnulib/import/fcntl.in.h: Update.
2140         * gnulib/import/fd-hook.c: Update.
2141         * gnulib/import/fd-hook.h: Update.
2142         * gnulib/import/fd-safer-flag.c: Update.
2143         * gnulib/import/fd-safer.c: Update.
2144         * gnulib/import/fdopendir.c: Update.
2145         * gnulib/import/filename.h: Update.
2146         * gnulib/import/filenamecat-lgpl.c: Update.
2147         * gnulib/import/filenamecat.h: Update.
2148         * gnulib/import/flexmember.h: Update.
2149         * gnulib/import/float+.h: Update.
2150         * gnulib/import/float.c: Update.
2151         * gnulib/import/float.in.h: Update.
2152         * gnulib/import/fnmatch.c: Update.
2153         * gnulib/import/fnmatch.in.h: Update.
2154         * gnulib/import/fnmatch_loop.c: Update.
2155         * gnulib/import/fpucw.h: Update.
2156         * gnulib/import/frexp.c: Update.
2157         * gnulib/import/frexpl.c: Update.
2158         * gnulib/import/fstat.c: Update.
2159         * gnulib/import/fstatat.c: Update.
2160         * gnulib/import/getcwd-lgpl.c: Update.
2161         * gnulib/import/getcwd.c: Update.
2162         * gnulib/import/getdtablesize.c: Update.
2163         * gnulib/import/getlogin_r.c: Update.
2164         * gnulib/import/getprogname.c: Update.
2165         * gnulib/import/getprogname.h: Update.
2166         * gnulib/import/gettext.h: Update.
2167         * gnulib/import/gettimeofday.c: Update.
2168         * gnulib/import/glob-libc.h: Update.
2169         * gnulib/import/glob.c: Update.
2170         * gnulib/import/glob.in.h: Update.
2171         * gnulib/import/glob_internal.h: Update.
2172         * gnulib/import/glob_pattern_p.c: Update.
2173         * gnulib/import/globfree.c: Update.
2174         * gnulib/import/hard-locale.c: Update.
2175         * gnulib/import/hard-locale.h: Update.
2176         * gnulib/import/intprops.h: Update.
2177         * gnulib/import/inttypes.in.h: Update.
2178         * gnulib/import/isnan.c: Update.
2179         * gnulib/import/isnand-nolibm.h: Update.
2180         * gnulib/import/isnand.c: Update.
2181         * gnulib/import/isnanl-nolibm.h: Update.
2182         * gnulib/import/isnanl.c: Update.
2183         * gnulib/import/itold.c: Update.
2184         * gnulib/import/libc-config.h: Update.
2185         * gnulib/import/limits.in.h: Update.
2186         * gnulib/import/localcharset.c: Update.
2187         * gnulib/import/localcharset.h: Update.
2188         * gnulib/import/localtime-buffer.c: Update.
2189         * gnulib/import/localtime-buffer.h: Update.
2190         * gnulib/import/lstat.c: Update.
2191         * gnulib/import/m4/00gnulib.m4: Update.
2192         * gnulib/import/m4/__inline.m4: Update.
2193         * gnulib/import/m4/absolute-header.m4: Update.
2194         * gnulib/import/m4/alloca.m4: Update.
2195         * gnulib/import/m4/builtin-expect.m4: Update.
2196         * gnulib/import/m4/canonicalize.m4: Update.
2197         * gnulib/import/m4/chdir-long.m4: Update.
2198         * gnulib/import/m4/close.m4: Update.
2199         * gnulib/import/m4/closedir.m4: Update.
2200         * gnulib/import/m4/configmake.m4: Update.
2201         * gnulib/import/m4/d-ino.m4: Update.
2202         * gnulib/import/m4/d-type.m4: Update.
2203         * gnulib/import/m4/dirent_h.m4: Update.
2204         * gnulib/import/m4/dirfd.m4: Update.
2205         * gnulib/import/m4/dirname.m4: Update.
2206         * gnulib/import/m4/double-slash-root.m4: Update.
2207         * gnulib/import/m4/dup.m4: Update.
2208         * gnulib/import/m4/dup2.m4: Update.
2209         * gnulib/import/m4/eealloc.m4: Update.
2210         * gnulib/import/m4/environ.m4: Update.
2211         * gnulib/import/m4/errno_h.m4: Update.
2212         * gnulib/import/m4/error.m4: Update.
2213         * gnulib/import/m4/exponentd.m4: Update.
2214         * gnulib/import/m4/exponentl.m4: Update.
2215         * gnulib/import/m4/extensions.m4: Update.
2216         * gnulib/import/m4/extern-inline.m4: Update.
2217         * gnulib/import/m4/fchdir.m4: Update.
2218         * gnulib/import/m4/fcntl-o.m4: Update.
2219         * gnulib/import/m4/fcntl.m4: Update.
2220         * gnulib/import/m4/fcntl_h.m4: Update.
2221         * gnulib/import/m4/fdopendir.m4: Update.
2222         * gnulib/import/m4/filenamecat.m4: Update.
2223         * gnulib/import/m4/flexmember.m4: Update.
2224         * gnulib/import/m4/float_h.m4: Update.
2225         * gnulib/import/m4/fnmatch.m4: Update.
2226         * gnulib/import/m4/fnmatch_h.m4: Update.
2227         * gnulib/import/m4/fpieee.m4: Update.
2228         * gnulib/import/m4/frexp.m4: Update.
2229         * gnulib/import/m4/frexpl.m4: Update.
2230         * gnulib/import/m4/fstat.m4: Update.
2231         * gnulib/import/m4/fstatat.m4: Update.
2232         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2233         * gnulib/import/m4/getcwd-path-max.m4: Update.
2234         * gnulib/import/m4/getcwd.m4: Update.
2235         * gnulib/import/m4/getdtablesize.m4: Update.
2236         * gnulib/import/m4/getlogin.m4: Update.
2237         * gnulib/import/m4/getlogin_r.m4: Update.
2238         * gnulib/import/m4/getpagesize.m4: Update.
2239         * gnulib/import/m4/getprogname.m4: Update.
2240         * gnulib/import/m4/gettimeofday.m4: Update.
2241         * gnulib/import/m4/glibc21.m4: Update.
2242         * gnulib/import/m4/glob.m4: Update.
2243         * gnulib/import/m4/glob_h.m4: Update.
2244         * gnulib/import/m4/gnulib-cache.m4: Update.
2245         * gnulib/import/m4/gnulib-common.m4: Update.
2246         * gnulib/import/m4/gnulib-comp.m4: Update.
2247         * gnulib/import/m4/gnulib-tool.m4: Update.
2248         * gnulib/import/m4/hard-locale.m4: Update.
2249         * gnulib/import/m4/include_next.m4: Update.
2250         * gnulib/import/m4/inttypes-pri.m4: Update.
2251         * gnulib/import/m4/inttypes.m4: Update.
2252         * gnulib/import/m4/isnand.m4: Update.
2253         * gnulib/import/m4/isnanl.m4: Update.
2254         * gnulib/import/m4/largefile.m4: Update.
2255         * gnulib/import/m4/limits-h.m4: Update.
2256         * gnulib/import/m4/localcharset.m4: Update.
2257         * gnulib/import/m4/locale-fr.m4: Update.
2258         * gnulib/import/m4/locale-ja.m4: Update.
2259         * gnulib/import/m4/locale-zh.m4: Update.
2260         * gnulib/import/m4/localtime-buffer.m4: Update.
2261         * gnulib/import/m4/longlong.m4: Update.
2262         * gnulib/import/m4/lstat.m4: Update.
2263         * gnulib/import/m4/malloc.m4: Update.
2264         * gnulib/import/m4/malloca.m4: Update.
2265         * gnulib/import/m4/math_h.m4: Update.
2266         * gnulib/import/m4/mbrtowc.m4: Update.
2267         * gnulib/import/m4/mbsinit.m4: Update.
2268         * gnulib/import/m4/mbsrtowcs.m4: Update.
2269         * gnulib/import/m4/mbstate_t.m4: Update.
2270         * gnulib/import/m4/memchr.m4: Update.
2271         * gnulib/import/m4/memmem.m4: Update.
2272         * gnulib/import/m4/mempcpy.m4: Update.
2273         * gnulib/import/m4/memrchr.m4: Update.
2274         * gnulib/import/m4/mkdir.m4: Update.
2275         * gnulib/import/m4/mkstemp.m4: Update.
2276         * gnulib/import/m4/mmap-anon.m4: Update.
2277         * gnulib/import/m4/mode_t.m4: Update.
2278         * gnulib/import/m4/msvc-inval.m4: Update.
2279         * gnulib/import/m4/msvc-nothrow.m4: Update.
2280         * gnulib/import/m4/multiarch.m4: Update.
2281         * gnulib/import/m4/nocrash.m4: Update.
2282         * gnulib/import/m4/off_t.m4: Update.
2283         * gnulib/import/m4/onceonly.m4: Update.
2284         * gnulib/import/m4/open-cloexec.m4: Update.
2285         * gnulib/import/m4/open.m4: Update.
2286         * gnulib/import/m4/openat.m4: Update.
2287         * gnulib/import/m4/opendir.m4: Update.
2288         * gnulib/import/m4/pathmax.m4: Update.
2289         * gnulib/import/m4/rawmemchr.m4: Update.
2290         * gnulib/import/m4/readdir.m4: Update.
2291         * gnulib/import/m4/readlink.m4: Update.
2292         * gnulib/import/m4/realloc.m4: Update.
2293         * gnulib/import/m4/rename.m4: Update.
2294         * gnulib/import/m4/rewinddir.m4: Update.
2295         * gnulib/import/m4/rmdir.m4: Update.
2296         * gnulib/import/m4/save-cwd.m4: Update.
2297         * gnulib/import/m4/secure_getenv.m4: Update.
2298         * gnulib/import/m4/setenv.m4: Update.
2299         * gnulib/import/m4/signal_h.m4: Update.
2300         * gnulib/import/m4/ssize_t.m4: Update.
2301         * gnulib/import/m4/stat-time.m4: Update.
2302         * gnulib/import/m4/stat.m4: Update.
2303         * gnulib/import/m4/std-gnu11.m4: Update.
2304         * gnulib/import/m4/stdbool.m4: Update.
2305         * gnulib/import/m4/stddef_h.m4: Update.
2306         * gnulib/import/m4/stdint.m4: Update.
2307         * gnulib/import/m4/stdio_h.m4: Update.
2308         * gnulib/import/m4/stdlib_h.m4: Update.
2309         * gnulib/import/m4/strchrnul.m4: Update.
2310         * gnulib/import/m4/strdup.m4: Update.
2311         * gnulib/import/m4/strerror.m4: Update.
2312         * gnulib/import/m4/string_h.m4: Update.
2313         * gnulib/import/m4/strstr.m4: Update.
2314         * gnulib/import/m4/strtok_r.m4: Update.
2315         * gnulib/import/m4/sys_socket_h.m4: Update.
2316         * gnulib/import/m4/sys_stat_h.m4: Update.
2317         * gnulib/import/m4/sys_time_h.m4: Update.
2318         * gnulib/import/m4/sys_types_h.m4: Update.
2319         * gnulib/import/m4/tempname.m4: Update.
2320         * gnulib/import/m4/time_h.m4: Update.
2321         * gnulib/import/m4/unistd-safer.m4: Update.
2322         * gnulib/import/m4/unistd_h.m4: Update.
2323         * gnulib/import/m4/warn-on-use.m4: Update.
2324         * gnulib/import/m4/wchar_h.m4: Update.
2325         * gnulib/import/m4/wchar_t.m4: Update.
2326         * gnulib/import/m4/wctype_h.m4: Update.
2327         * gnulib/import/m4/wint_t.m4: Update.
2328         * gnulib/import/malloc.c: Update.
2329         * gnulib/import/malloc/scratch_buffer.h: Update.
2330         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2331         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2332         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2333         * gnulib/import/malloca.c: Update.
2334         * gnulib/import/malloca.h: Update.
2335         * gnulib/import/malloca.valgrind: Update.
2336         * gnulib/import/math.in.h: Update.
2337         * gnulib/import/mbrtowc.c: Update.
2338         * gnulib/import/mbsinit.c: Update.
2339         * gnulib/import/mbsrtowcs-impl.h: Update.
2340         * gnulib/import/mbsrtowcs-state.c: Update.
2341         * gnulib/import/mbsrtowcs.c: Update.
2342         * gnulib/import/memchr.c: Update.
2343         * gnulib/import/memmem.c: Update.
2344         * gnulib/import/mempcpy.c: Update.
2345         * gnulib/import/memrchr.c: Update.
2346         * gnulib/import/mkdir.c: Update.
2347         * gnulib/import/mkstemp.c: Update.
2348         * gnulib/import/msvc-inval.c: Update.
2349         * gnulib/import/msvc-inval.h: Update.
2350         * gnulib/import/msvc-nothrow.c: Update.
2351         * gnulib/import/msvc-nothrow.h: Update.
2352         * gnulib/import/open.c: Update.
2353         * gnulib/import/openat-die.c: Update.
2354         * gnulib/import/openat-priv.h: Update.
2355         * gnulib/import/openat-proc.c: Update.
2356         * gnulib/import/openat.c: Update.
2357         * gnulib/import/openat.h: Update.
2358         * gnulib/import/opendir.c: Update.
2359         * gnulib/import/pathmax.h: Update.
2360         * gnulib/import/pipe-safer.c: Update.
2361         * gnulib/import/rawmemchr.c: Update.
2362         * gnulib/import/readdir.c: Update.
2363         * gnulib/import/readlink.c: Update.
2364         * gnulib/import/realloc.c: Update.
2365         * gnulib/import/ref-add.sin: Update.
2366         * gnulib/import/ref-del.sin: Update.
2367         * gnulib/import/rename.c: Update.
2368         * gnulib/import/rewinddir.c: Update.
2369         * gnulib/import/rmdir.c: Update.
2370         * gnulib/import/same-inode.h: Update.
2371         * gnulib/import/save-cwd.c: Update.
2372         * gnulib/import/save-cwd.h: Update.
2373         * gnulib/import/scratch_buffer.h: Update.
2374         * gnulib/import/secure_getenv.c: Update.
2375         * gnulib/import/setenv.c: Update.
2376         * gnulib/import/signal.in.h: Update.
2377         * gnulib/import/stat-time.c: Update.
2378         * gnulib/import/stat-time.h: Update.
2379         * gnulib/import/stat-w32.c: Update.
2380         * gnulib/import/stat-w32.h: Update.
2381         * gnulib/import/stat.c: Update.
2382         * gnulib/import/stdbool.in.h: Update.
2383         * gnulib/import/stddef.in.h: Update.
2384         * gnulib/import/stdint.in.h: Update.
2385         * gnulib/import/stdio.in.h: Update.
2386         * gnulib/import/stdlib.in.h: Update.
2387         * gnulib/import/str-two-way.h: Update.
2388         * gnulib/import/strchrnul.c: Update.
2389         * gnulib/import/strdup.c: Update.
2390         * gnulib/import/streq.h: Update.
2391         * gnulib/import/strerror-override.c: Update.
2392         * gnulib/import/strerror-override.h: Update.
2393         * gnulib/import/strerror.c: Update.
2394         * gnulib/import/string.in.h: Update.
2395         * gnulib/import/stripslash.c: Update.
2396         * gnulib/import/strnlen1.c: Update.
2397         * gnulib/import/strnlen1.h: Update.
2398         * gnulib/import/strstr.c: Update.
2399         * gnulib/import/strtok_r.c: Update.
2400         * gnulib/import/sys_stat.in.h: Update.
2401         * gnulib/import/sys_time.in.h: Update.
2402         * gnulib/import/sys_types.in.h: Update.
2403         * gnulib/import/tempname.c: Update.
2404         * gnulib/import/tempname.h: Update.
2405         * gnulib/import/time.in.h: Update.
2406         * gnulib/import/unistd--.h: Update.
2407         * gnulib/import/unistd-safer.h: Update.
2408         * gnulib/import/unistd.in.h: Update.
2409         * gnulib/import/unsetenv.c: Update.
2410         * gnulib/import/verify.h: Update.
2411         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2412         * gnulib/import/wchar.in.h: Update.
2413         * gnulib/import/wctype.in.h: Update.
2414         * gnulib/import/xalloc-oversized.h: Update.
2415         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2416         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2417
2418 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2419
2420         * record-btrace.c (get_thread_current_frame): Remove
2421         old_inferior_ptid.
2422
2423 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2424
2425         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2426         with check_tag to 1 if and only if the type is tagged and the
2427         component being searched cannot been found in the current
2428         view. Otherwise, always call ada_to_fixed_type with
2429         check_tag to 0.
2430
2431 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2432
2433         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2434         declaration.
2435         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2436         * ada-varobj.c (ada_varobj_get_number_of_children,
2437         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2438
2439 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2440
2441         * ada-valprint.c (ada_value_print): Use type instead of
2442         enclosing type.
2443
2444 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2445
2446         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2447         an array of access to unconstrained array.
2448
2449 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2450
2451         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2452         (ada_check_typedef): Use it.
2453
2454 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2455
2456         * ada-varobj.c (ada_varobj_describe_struct_child)
2457         (ada_varobj_describe_child): Handle union case like struct one.
2458
2459 2018-09-10  Tom Tromey  <tom@tromey.com>
2460
2461         PR python/18380:
2462         * python/python.c (_initialize_python): Make example in "python"
2463         help work in Python 3.
2464
2465 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2466
2467         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2468         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2469         $(EXEEXT) to the script, as it is not a program.
2470
2471 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2472
2473         * python/py-prettyprint.c (pretty_print_one_value): Return
2474         gdbpy_ref<>.
2475         (print_string_repr): Adjust.
2476         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2477         * python/python-internal.h (apply_varobj_pretty_printer): Return
2478         gdbpy_ref<>.
2479         * varobj.c (varobj_value_get_print_value): Adjust.
2480
2481 2018-09-08  Tom Tromey  <tom@tromey.com>
2482
2483         PR python/16047:
2484         * python/py-prettyprint.c (pretty_print_one_value): Check for
2485         to_string method.
2486
2487 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2488
2489         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2490         replace_operator_with_call.
2491
2492 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2493
2494         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2495
2496 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2497
2498         * ada-typeprint.c (print_range): Print the bounds using TYPE
2499         rather than its TYPE_TARGET_TYPE.
2500
2501 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2502
2503         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2504         call to ada_to_fixed_value_create.
2505
2506 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2507
2508         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2509
2510 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2511
2512         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2513         by calls to error.
2514
2515 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2516
2517         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2518         Move update of loop variable "fi".
2519
2520 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2521
2522         * ada-lang.c (value_assign_to_component): In the case of
2523         big-endian targets, extract the bits of the given VAL
2524         using an src_offset of zero if container is not a scalar.
2525
2526 2018-09-06  Simon Ser  <contact@emersion.fr>
2527
2528         PR gdb/23105
2529         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2530         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2531         * fbsd-tdep.c (fbsd_make_note_desc): New.
2532         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2533         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2534         * target.h (enum target_object) Add FreeBSD-specific
2535         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2536
2537 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2538
2539         * compile/compile-c.h (generate_c_for_variable_locations):
2540         Change reference to pointer.
2541         * compile/compile-c-support.c (compile_program) <compute>:
2542         Likewise.
2543         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2544         (generate_c_for_for_one_variable): Likewise
2545         (generate_c_for_variable_locations): Likewise
2546         * compile/compile-c-types.c (compile_c_instance::convert_type):
2547         Likewise
2548         * compile/compile-cplus-symbols.c (convert_one_symbol):
2549         std::move the scope passed to enter_scope.
2550         * compile/compile-cplus-types.c
2551         (compile_cplus_instance::enter_scope): Make parameter
2552         rvalue-reference.
2553         (compile_cplus_instance::new_scope): Change reference to
2554         pointer.
2555         (compile_cplus_instance::convert_type): Likewise
2556         (compile_cplus_convert_typedef): std::move the scope passed to
2557         enter_scope.
2558         (compile_cplus_convert_struct_or_union): Likewise.
2559         (compile_cplus_convert_enum): Likewise.
2560         (compile_cplus_convert_namespace): Likewise.
2561         * compile/compile-cplus.h (compile_cplus_instance)
2562         <enter_scope>: Make parameter rvalue-reference.
2563         * compile/compile-internal.h (compile_instance)
2564         <get_cached_type>: Likewise
2565         * compile/compile-loc2c.c (push): Likewise
2566         (pushf): Likewise
2567         (unary): Likewise
2568         (binary): Likewise
2569         (print_label): Likewise
2570         (pushf_register_address): Likewise
2571         (pushf_register): Likewise
2572         (do_compile_dwarf_expr_to_c): Likewise
2573         (compile_dwarf_expr_to_c): Likewise
2574         (compile_dwarf_bounds_to_c): Likewise
2575         * compile/compile.c (compile_instance::get_cached_type):
2576         Likewise
2577         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2578         (compile_dwarf_bounds_to_c): Likewise
2579         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2580         (dwarf2_compile_property_to_c): Likewise
2581         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2582         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2583         Likewise
2584
2585 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2586
2587         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2588         * tui/tui-data.c (init_content_element): Don't initialize it.
2589
2590 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2591
2592         * tui/tui-data.h (struct tui_win_info)
2593         <detail::opaque>: Remove.
2594         * tui/tui-data.c (init_win_info): Remove assignment.
2595
2596 2018-09-05  Tom Tromey  <tom@tromey.com>
2597
2598         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2599         -Wformat-nonliteral.
2600         * target-float.c (host_float_ops<T>::to_string)
2601         (host_float_ops<T>::from_string): Use
2602         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2603         * configure: Rebuild.
2604
2605 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2606
2607         * printcmd.c (printf_c_string): Use
2608         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2609         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2610
2611 2018-09-05  Tom Tromey  <tom@tromey.com>
2612
2613         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2614
2615 2018-09-05  Tom de Vries  <tdevries@suse.de>
2616
2617         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2618         with resolve_abstract_p == true.
2619         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2620         defaulting to false. Propagate resolve_abstract_p to
2621         dwarf2_fetch_die_loc_sect_off.
2622         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2623         parameter, defaulting to false.
2624         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2625         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2626         parameter.
2627         * dwarf2read.h (struct die_info): Forward-declare.
2628         (die_info_ptr): New typedef.
2629         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2630
2631 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2632
2633         GDB 8.2 released.
2634
2635 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2636             Pedro Alves  <palves@redhat.com>
2637
2638         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2639         "aclocal-m4-deps.mk".  Include file here.
2640         $(srcdir)/aclocal.m4: Add "configure.ac".
2641         * gnulib/aclocal-m4-deps.mk: New file.
2642         * gnulib/update-gnulib.sh: Automatically update
2643         "aclocal-m4-deps.mk".
2644
2645 2018-09-04  Tom Tromey  <tom@tromey.com>
2646
2647         * configure: Rebuild.
2648         * configure.ac: Remove multi-ice code.
2649
2650 2018-09-04  Tom Tromey  <tom@tromey.com>
2651
2652         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2653         (ada-exp.o): Update.
2654
2655 2018-09-04  Tom Tromey  <tom@tromey.com>
2656
2657         * Makefile.in (printcmd.o, target-float.o): Remove.
2658         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2659
2660 2018-09-04  Tom Tromey  <tom@tromey.com>
2661
2662         * gnulib/Makefile.in: Remove obsolete comment.
2663         * Makefile.in: Remove obsolete comment.
2664
2665 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2666
2667         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2668         line with '+'.
2669
2670 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2671
2672         * riscv-tdep.c: Add 'prologue-value.h' include.
2673         (struct riscv_unwind_cache): New struct.
2674         (riscv_debug_unwinder): New global.
2675         (riscv_scan_prologue): Update arguments, capture register details
2676         from prologue scan.
2677         (riscv_skip_prologue): Reformat arguments line, move end of
2678         prologue calculation into riscv_scan_prologue.
2679         (riscv_frame_cache): Update return type, create
2680         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2681         details.
2682         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2683         (riscv_frame_prev_register): Use the trad_frame within the
2684         riscv_unwind_cache.
2685         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2686         flag.
2687
2688 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2689
2690         * trad-frame.h (trad_frame_set_realreg): Declare.
2691         (trad_frame_set_addr): Declare.
2692         * trad-frame.c (trad_frame_set_realreg): Define new function.
2693         (trad_frame_set_addr): Define new function.
2694         (trad_frame_set_reg_realreg): Use new function.
2695         (trad_frame_set_reg_addr): Use new function.
2696
2697 2018-09-01  Keith Seitz  <keiths@redhat.com>
2698
2699         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2700         pulongest instead of "%lld".
2701         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2702         ATTRIBUTE_UNUSED.
2703
2704 2018-08-31  Tom Tromey  <tom@tromey.com>
2705
2706         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2707         variant part type.
2708
2709 2018-08-31  Pedro Alves  <palves@redhat.com>
2710
2711         * gdbarch.h: Regenerate.
2712
2713 2018-08-31  Pedro Alves  <palves@redhat.com>
2714
2715         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2716         * target.h (Hardware watchpoint interfaces): Describe
2717         continuable/steppable/non-steppable watchpoints.
2718         * gdbarch.h, gdbarch.c: Regenerate.
2719
2720 2018-08-31  Pedro Alves  <palves@redhat.com>
2721
2722         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2723         Delete.
2724         * s390-linux-nat.c
2725         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2726         * target.h (target_ops::have_continuable_watchpoint): Delete.
2727         (target_have_continuable_watchpoint): Delete.
2728         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2729         * target-delegates.c: Regenerate.
2730
2731 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2732
2733         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2734         the files present in "gnulib/import/m4/".
2735
2736 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2737
2738         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2739         c.sw, c.swsp, and c.sdsp.
2740
2741 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2742
2743         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2744         (riscv_read_misa_reg): Don't cache value read into inferior data.
2745         (riscv_new_inferior_data): Delete.
2746         (riscv_inferior_data_cleanup): Delete.
2747         (riscv_inferior_data): Delete.
2748         (riscv_invalidate_inferior_data): Delete.
2749         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2750
2751 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2752
2753         * compile/compile-cplus-types.c
2754         (compile_cplus_instance::leave_scope): Take the address of scope
2755         object.
2756         (compile_cplus_instance::convert_qualified_base): Compare quals
2757         to 0.
2758
2759 2018-08-30  Keith Seitz  <keiths@redhat.com>
2760
2761         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2762         Use "%s" and host_address_to_string instead of "%p" in printf.
2763
2764 2018-08-29  Keith Seitz  <keiths@redhat.com>
2765
2766         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2767         and compile-cplus-types.c.
2768         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2769         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2770         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2771         Declare.
2772         * compile/compile-c-support.c: Include compile-cplus.h.
2773         (load_libcompile): Templatize.
2774         (get_compile_context): "New" function.
2775         (c_get_compile_context): Use get_compile_context.
2776         (cplus_get_compile_context): New function.
2777         (cplus_push_user_expression, cplus_pop_user_expression)
2778         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2779         (cplus_compute_program): Define new structs/functions.
2780         * compile/compile-cplus-symmbols.c: New file.
2781         * compile/compile-cplus-types.c: New file.
2782         * compile/compile-cplus.h: New file.
2783         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2784         Declare.
2785         * compile/compile-object-load.c (get_out_value_type): Use
2786         strncmp_iw when comparing symbol names.
2787         (compile_object_load): Add mst_bss and mst_data.
2788         * compile/compile.c (_initialize_compile): Remove
2789         -Wno-implicit-function-declaration from `compile_args'.
2790         * compile/gcc-cp-plugin.h: New file.
2791         * NEWS: Mention C++ compile support and new debug options.
2792
2793 2018-08-29  Keith Seitz  <keiths@redhat.com>
2794
2795         * linespec.c (collect_info::add_symbol): Make virtual.
2796         (struct symbol_searcher_collect_info): New struct.
2797         (symbol_searcher::find_all_symbols): New method.
2798         * symtab.h (class symbol_searcher): New class.
2799
2800 2018-08-29  Keith Seitz  <keiths@redhat.com>
2801
2802         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2803         Change to vector of block_symbol.  Update all users.
2804         (struct collect_info) <symbols>: Likewise.
2805         (collect_info::add_symbol): Take block_symbol as argument.
2806         Update all callers.
2807         (decode_compound_collector) <m_symbols>: Change type to vector
2808         of block_symbol.  Update all users.
2809         (decode_compound_collector::operator ()): Change parameter type
2810         to block_symbol.
2811         (find_method, find_function_symbols, find_linespec_symbols)
2812         (find_label_symbols_in_block, find_label_symbols): Change symbol
2813         vectors to block_symbol vectors.
2814         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2815         block_symbol.
2816
2817 2018-08-29  Keith Seitz  <keiths@redhat.com>
2818
2819         * linespec.c (symbolp): Remove typedef and VEC definitions.
2820         (bound_minimal_symbol_d): Likewise.
2821
2822 2018-08-29  Keith Seitz  <keiths@redhat.com>
2823
2824         * linespec.c (decode_compound_collector::decode_compound_collector):
2825         Remove initialization for `m_symtabs'.
2826         (decode_compound_collector::release_symbols): Change return type
2827         to std::vector.  Update all callers.
2828         (class decode_compound_collector) <m_symbols>: Change type to
2829         std::vector.
2830         (lookup_prefix_sym): Change return type to std::vector.  Update all
2831         callers.
2832         (compare_symbols): Remove.
2833         (std_compare_symbols): Rename to `compare_symbols'.
2834         (find_method): Change `sym_classes' parameter to std::vector.
2835         Update all callers.  Use std::sort to sort sym_classes.
2836         (find_linespec_symbols): Remove cleanup.
2837
2838 2018-08-29  Keith Seitz  <keiths@redhat.com>
2839
2840         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2841         std::vector.  Update all users.
2842         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2843         (struct collect_info) <minimal_symbols>: Likewise.
2844         (compare_msymbols): Return bool.  Change parameters to const
2845         bound_minimal_symbol references.
2846         (find_method, find_function_symbols, find_linespec_symbols): Change
2847         `minsyms' parameter to std::vector.  Update all callers.
2848
2849 2018-08-29  Keith Seitz  <keiths@redhat.com>
2850
2851         * linespec.c (struct linespec) <label_symbols>: Change type to
2852         std::vector.  Update all users.
2853         (find_label_symbols_in_block): Change `result' parameter to
2854         std::vector.  Update all callers.
2855         (find_label_symbols): Return std::vector.  Update all callers.
2856
2857 2018-08-29  Keith Seitz  <keiths@redhat.com>
2858
2859         * linespec.c (struct linespec) <function_symbols>: Change type to
2860         std::vector.  Update all users.
2861         (struct collect_info) <function_symbols>: Likewise.
2862         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2863         (std_compare_symbols): New function.
2864         (find_method, find_function_symbols, find_linespec_symbols)
2865         (find_label_symbols_in_block): Change `symbols' parameter to
2866         std::vector.  Update all callers.
2867         (find_label_symbols): Likewise for `function_symbols' and
2868         `label_funcs_ret'.
2869
2870 2018-08-29  Keith Seitz  <keiths@redhat.com>
2871
2872         * linespec.c (symtab_vector_up): Define.
2873         (struct linespec) <file_symtabs>: Change type to std::vector *.
2874         Update all uses.
2875         (struct collect_info) <file_symtabs>: Likewise.
2876         (collect_symtabs_from_filename): Return symtab_vector_up.
2877         Update all callers.
2878         (decode_objc): Remove cleanup.
2879         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2880         (symtab_collector::release_symtabs): Return symtab_vector_up.
2881         Update all callers.
2882         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2883         Update all users.
2884         (collect_symtabs_from_filename, symtabs_from_filename): Return
2885         symtab_vector_up.  Update all callers.
2886
2887 2018-08-29  Tom Tromey  <tom@tromey.com>
2888
2889         * csky-tdep.c (csky_analyze_prologue): Use
2890         core_addr_to_string_nz.
2891
2892 2018-08-29  Tom Tromey  <tom@tromey.com>
2893
2894         * windows-nat.c (struct xlate_exception) <them>: Change type to
2895         DWORD.
2896         (xlate): Fix formatting.  Remove last entry.
2897         (struct xlate_exception, xlate): Comment out.
2898         (windows_nat_target::resume): Use ranged for.
2899
2900 2018-08-29  Jim Wilson  <jimw@sifive.com>
2901
2902         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2903         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2904         of NT_PRFPREG.
2905         (riscv_linux_nat_target::store_registers): Likewise.
2906
2907 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2908
2909         PR gdb/23555
2910         PR gdb/23558
2911         * gnulib/aclocal.m4: Regenerate.
2912         * gnulib/config.in: Regenerate.
2913         * gnulib/configure: Regenerate.
2914         * gnulib/import/Makefile.am: Update.
2915         * gnulib/import/Makefile.in: Update.
2916         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2917         * gnulib/import/_Noreturn.h: ... this.
2918         * gnulib/import/alloca.in.h: Update.
2919         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2920         * gnulib/import/arg-nonnull.h: ... this.
2921         * gnulib/import/assure.h: Update.
2922         * gnulib/import/at-func.c: Update.
2923         * gnulib/import/basename-lgpl.c: Update.
2924         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2925         * gnulib/import/c++defs.h: ... this.
2926         * gnulib/import/canonicalize-lgpl.c: Update.
2927         * gnulib/import/cdefs.h: Update.
2928         * gnulib/import/chdir-long.c: Update.
2929         * gnulib/import/chdir-long.h: Update.
2930         * gnulib/import/cloexec.c: Update.
2931         * gnulib/import/cloexec.h: Update.
2932         * gnulib/import/close.c: Update.
2933         * gnulib/import/closedir.c: Update.
2934         * gnulib/import/config.charset: Update.
2935         * gnulib/import/dirent-private.h: Update.
2936         * gnulib/import/dirent.in.h: Update.
2937         * gnulib/import/dirfd.c: Update.
2938         * gnulib/import/dirname-lgpl.c: Update.
2939         * gnulib/import/dirname.h: Update.
2940         * gnulib/import/dosname.h: Update.
2941         * gnulib/import/dup-safer-flag.c: Update.
2942         * gnulib/import/dup-safer.c: Update.
2943         * gnulib/import/dup.c: Update.
2944         * gnulib/import/dup2.c: Update.
2945         * gnulib/import/errno.in.h: Update.
2946         * gnulib/import/error.c: Update.
2947         * gnulib/import/error.h: Update.
2948         * gnulib/import/exitfail.c: Update.
2949         * gnulib/import/exitfail.h: Update.
2950         * gnulib/import/extra/update-copyright: Update.
2951         * gnulib/import/fchdir.c: Update.
2952         * gnulib/import/fcntl.c: Update.
2953         * gnulib/import/fcntl.in.h: Update.
2954         * gnulib/import/fd-hook.c: Update.
2955         * gnulib/import/fd-hook.h: Update.
2956         * gnulib/import/fd-safer-flag.c: Update.
2957         * gnulib/import/fd-safer.c: Update.
2958         * gnulib/import/fdopendir.c: Update.
2959         * gnulib/import/filename.h: Update.
2960         * gnulib/import/filenamecat-lgpl.c: Update.
2961         * gnulib/import/filenamecat.h: Update.
2962         * gnulib/import/flexmember.h: Update.
2963         * gnulib/import/float+.h: Update.
2964         * gnulib/import/float.c: Update.
2965         * gnulib/import/float.in.h: Update.
2966         * gnulib/import/fnmatch.c: Update.
2967         * gnulib/import/fnmatch.in.h: Update.
2968         * gnulib/import/fnmatch_loop.c: Update.
2969         * gnulib/import/fpucw.h: Update.
2970         * gnulib/import/frexp.c: Update.
2971         * gnulib/import/frexpl.c: Update.
2972         * gnulib/import/fstat.c: Update.
2973         * gnulib/import/fstatat.c: Update.
2974         * gnulib/import/getcwd-lgpl.c: Update.
2975         * gnulib/import/getcwd.c: Update.
2976         * gnulib/import/getdtablesize.c: Update.
2977         * gnulib/import/getlogin_r.c: Update.
2978         * gnulib/import/getprogname.c: Update.
2979         * gnulib/import/getprogname.h: Update.
2980         * gnulib/import/gettext.h: Update.
2981         * gnulib/import/gettimeofday.c: Update.
2982         * gnulib/import/glob-libc.h: Update.
2983         * gnulib/import/glob.c: Update.
2984         * gnulib/import/glob.in.h: Update.
2985         * gnulib/import/glob_internal.h: Update.
2986         * gnulib/import/glob_pattern_p.c: Update.
2987         * gnulib/import/globfree.c: Update.
2988         * gnulib/import/hard-locale.c: Update.
2989         * gnulib/import/hard-locale.h: Update.
2990         * gnulib/import/intprops.h: Update.
2991         * gnulib/import/inttypes.in.h: Update.
2992         * gnulib/import/isnan.c: Update.
2993         * gnulib/import/isnand-nolibm.h: Update.
2994         * gnulib/import/isnand.c: Update.
2995         * gnulib/import/isnanl-nolibm.h: Update.
2996         * gnulib/import/isnanl.c: Update.
2997         * gnulib/import/itold.c: Update.
2998         * gnulib/import/libc-config.h: Update.
2999         * gnulib/import/limits.in.h: Update.
3000         * gnulib/import/localcharset.c: Update.
3001         * gnulib/import/localcharset.h: Update.
3002         * gnulib/import/localtime-buffer.c: Update.
3003         * gnulib/import/localtime-buffer.h: Update.
3004         * gnulib/import/lstat.c: Update.
3005         * gnulib/import/m4/00gnulib.m4: Update.
3006         * gnulib/import/m4/__inline.m4: Update.
3007         * gnulib/import/m4/absolute-header.m4: Update.
3008         * gnulib/import/m4/alloca.m4: Update.
3009         * gnulib/import/m4/builtin-expect.m4: Update.
3010         * gnulib/import/m4/canonicalize.m4: Update.
3011         * gnulib/import/m4/chdir-long.m4: Update.
3012         * gnulib/import/m4/close.m4: Update.
3013         * gnulib/import/m4/closedir.m4: Update.
3014         * gnulib/import/m4/configmake.m4: Update.
3015         * gnulib/import/m4/d-ino.m4: Update.
3016         * gnulib/import/m4/d-type.m4: Update.
3017         * gnulib/import/m4/dirent_h.m4: Update.
3018         * gnulib/import/m4/dirfd.m4: Update.
3019         * gnulib/import/m4/dirname.m4: Update.
3020         * gnulib/import/m4/double-slash-root.m4: Update.
3021         * gnulib/import/m4/dup.m4: Update.
3022         * gnulib/import/m4/dup2.m4: Update.
3023         * gnulib/import/m4/eealloc.m4: Update.
3024         * gnulib/import/m4/environ.m4: Update.
3025         * gnulib/import/m4/errno_h.m4: Update.
3026         * gnulib/import/m4/error.m4: Update.
3027         * gnulib/import/m4/exponentd.m4: Update.
3028         * gnulib/import/m4/exponentl.m4: Update.
3029         * gnulib/import/m4/extensions.m4: Update.
3030         * gnulib/import/m4/extern-inline.m4: Update.
3031         * gnulib/import/m4/fchdir.m4: Update.
3032         * gnulib/import/m4/fcntl-o.m4: Update.
3033         * gnulib/import/m4/fcntl.m4: Update.
3034         * gnulib/import/m4/fcntl_h.m4: Update.
3035         * gnulib/import/m4/fdopendir.m4: Update.
3036         * gnulib/import/m4/filenamecat.m4: Update.
3037         * gnulib/import/m4/flexmember.m4: Update.
3038         * gnulib/import/m4/float_h.m4: Update.
3039         * gnulib/import/m4/fnmatch.m4: Update.
3040         * gnulib/import/m4/fnmatch_h.m4: Update.
3041         * gnulib/import/m4/fpieee.m4: Update.
3042         * gnulib/import/m4/frexp.m4: Update.
3043         * gnulib/import/m4/frexpl.m4: Update.
3044         * gnulib/import/m4/fstat.m4: Update.
3045         * gnulib/import/m4/fstatat.m4: Update.
3046         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
3047         * gnulib/import/m4/getcwd-path-max.m4: Update.
3048         * gnulib/import/m4/getcwd.m4: Update.
3049         * gnulib/import/m4/getdtablesize.m4: Update.
3050         * gnulib/import/m4/getlogin.m4: Update.
3051         * gnulib/import/m4/getlogin_r.m4: Update.
3052         * gnulib/import/m4/getpagesize.m4: Update.
3053         * gnulib/import/m4/getprogname.m4: Update.
3054         * gnulib/import/m4/gettimeofday.m4: Update.
3055         * gnulib/import/m4/glibc21.m4: Update.
3056         * gnulib/import/m4/glob.m4: Update.
3057         * gnulib/import/m4/glob_h.m4: Update.
3058         * gnulib/import/m4/gnulib-cache.m4: Update.
3059         * gnulib/import/m4/gnulib-common.m4: Update.
3060         * gnulib/import/m4/gnulib-comp.m4: Update.
3061         * gnulib/import/m4/gnulib-tool.m4: Update.
3062         * gnulib/import/m4/hard-locale.m4: Update.
3063         * gnulib/import/m4/include_next.m4: Update.
3064         * gnulib/import/m4/inttypes-pri.m4: Update.
3065         * gnulib/import/m4/inttypes.m4: Update.
3066         * gnulib/import/m4/isnand.m4: Update.
3067         * gnulib/import/m4/isnanl.m4: Update.
3068         * gnulib/import/m4/largefile.m4: Update.
3069         * gnulib/import/m4/limits-h.m4: Update.
3070         * gnulib/import/m4/localcharset.m4: Update.
3071         * gnulib/import/m4/locale-fr.m4: Update.
3072         * gnulib/import/m4/locale-ja.m4: Update.
3073         * gnulib/import/m4/locale-zh.m4: Update.
3074         * gnulib/import/m4/localtime-buffer.m4: Update.
3075         * gnulib/import/m4/longlong.m4: Update.
3076         * gnulib/import/m4/lstat.m4: Update.
3077         * gnulib/import/m4/malloc.m4: Update.
3078         * gnulib/import/m4/malloca.m4: Update.
3079         * gnulib/import/m4/math_h.m4: Update.
3080         * gnulib/import/m4/mbrtowc.m4: Update.
3081         * gnulib/import/m4/mbsinit.m4: Update.
3082         * gnulib/import/m4/mbsrtowcs.m4: Update.
3083         * gnulib/import/m4/mbstate_t.m4: Update.
3084         * gnulib/import/m4/memchr.m4: Update.
3085         * gnulib/import/m4/memmem.m4: Update.
3086         * gnulib/import/m4/mempcpy.m4: Update.
3087         * gnulib/import/m4/memrchr.m4: Update.
3088         * gnulib/import/m4/mkdir.m4: Update.
3089         * gnulib/import/m4/mkstemp.m4: Update.
3090         * gnulib/import/m4/mmap-anon.m4: Update.
3091         * gnulib/import/m4/mode_t.m4: Update.
3092         * gnulib/import/m4/msvc-inval.m4: Update.
3093         * gnulib/import/m4/msvc-nothrow.m4: Update.
3094         * gnulib/import/m4/multiarch.m4: Update.
3095         * gnulib/import/m4/nocrash.m4: Update.
3096         * gnulib/import/m4/off_t.m4: Update.
3097         * gnulib/import/m4/onceonly.m4: Update.
3098         * gnulib/import/m4/open-cloexec.m4: Update.
3099         * gnulib/import/m4/open.m4: Update.
3100         * gnulib/import/m4/openat.m4: Update.
3101         * gnulib/import/m4/opendir.m4: Update.
3102         * gnulib/import/m4/pathmax.m4: Update.
3103         * gnulib/import/m4/rawmemchr.m4: Update.
3104         * gnulib/import/m4/readdir.m4: Update.
3105         * gnulib/import/m4/readlink.m4: Update.
3106         * gnulib/import/m4/realloc.m4: Update.
3107         * gnulib/import/m4/rename.m4: Update.
3108         * gnulib/import/m4/rewinddir.m4: Update.
3109         * gnulib/import/m4/rmdir.m4: Update.
3110         * gnulib/import/m4/save-cwd.m4: Update.
3111         * gnulib/import/m4/secure_getenv.m4: Update.
3112         * gnulib/import/m4/setenv.m4: Update.
3113         * gnulib/import/m4/signal_h.m4: Update.
3114         * gnulib/import/m4/ssize_t.m4: Update.
3115         * gnulib/import/m4/stat-time.m4: Update.
3116         * gnulib/import/m4/stat.m4: Update.
3117         * gnulib/import/m4/std-gnu11.m4: Update.
3118         * gnulib/import/m4/stdbool.m4: Update.
3119         * gnulib/import/m4/stddef_h.m4: Update.
3120         * gnulib/import/m4/stdint.m4: Update.
3121         * gnulib/import/m4/stdio_h.m4: Update.
3122         * gnulib/import/m4/stdlib_h.m4: Update.
3123         * gnulib/import/m4/strchrnul.m4: Update.
3124         * gnulib/import/m4/strdup.m4: Update.
3125         * gnulib/import/m4/strerror.m4: Update.
3126         * gnulib/import/m4/string_h.m4: Update.
3127         * gnulib/import/m4/strstr.m4: Update.
3128         * gnulib/import/m4/strtok_r.m4: Update.
3129         * gnulib/import/m4/sys_socket_h.m4: Update.
3130         * gnulib/import/m4/sys_stat_h.m4: Update.
3131         * gnulib/import/m4/sys_time_h.m4: Update.
3132         * gnulib/import/m4/sys_types_h.m4: Update.
3133         * gnulib/import/m4/tempname.m4: Update.
3134         * gnulib/import/m4/time_h.m4: Update.
3135         * gnulib/import/m4/unistd-safer.m4: Update.
3136         * gnulib/import/m4/unistd_h.m4: Update.
3137         * gnulib/import/m4/warn-on-use.m4: Update.
3138         * gnulib/import/m4/wchar_h.m4: Update.
3139         * gnulib/import/m4/wchar_t.m4: Update.
3140         * gnulib/import/m4/wctype_h.m4: Update.
3141         * gnulib/import/m4/wint_t.m4: Update.
3142         * gnulib/import/malloc.c: Update.
3143         * gnulib/import/malloc/scratch_buffer.h: Update.
3144         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3145         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3146         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3147         * gnulib/import/malloca.c: Update.
3148         * gnulib/import/malloca.h: Update.
3149         * gnulib/import/malloca.valgrind: Update.
3150         * gnulib/import/math.in.h: Update.
3151         * gnulib/import/mbrtowc.c: Update.
3152         * gnulib/import/mbsinit.c: Update.
3153         * gnulib/import/mbsrtowcs-impl.h: Update.
3154         * gnulib/import/mbsrtowcs-state.c: Update.
3155         * gnulib/import/mbsrtowcs.c: Update.
3156         * gnulib/import/memchr.c: Update.
3157         * gnulib/import/memmem.c: Update.
3158         * gnulib/import/mempcpy.c: Update.
3159         * gnulib/import/memrchr.c: Update.
3160         * gnulib/import/mkdir.c: Update.
3161         * gnulib/import/mkstemp.c: Update.
3162         * gnulib/import/msvc-inval.c: Update.
3163         * gnulib/import/msvc-inval.h: Update.
3164         * gnulib/import/msvc-nothrow.c: Update.
3165         * gnulib/import/msvc-nothrow.h: Update.
3166         * gnulib/import/open.c: Update.
3167         * gnulib/import/openat-die.c: Update.
3168         * gnulib/import/openat-priv.h: Update.
3169         * gnulib/import/openat-proc.c: Update.
3170         * gnulib/import/openat.c: Update.
3171         * gnulib/import/openat.h: Update.
3172         * gnulib/import/opendir.c: Update.
3173         * gnulib/import/pathmax.h: Update.
3174         * gnulib/import/pipe-safer.c: Update.
3175         * gnulib/import/rawmemchr.c: Update.
3176         * gnulib/import/readdir.c: Update.
3177         * gnulib/import/readlink.c: Update.
3178         * gnulib/import/realloc.c: Update.
3179         * gnulib/import/ref-add.sin: Update.
3180         * gnulib/import/ref-del.sin: Update.
3181         * gnulib/import/rename.c: Update.
3182         * gnulib/import/rewinddir.c: Update.
3183         * gnulib/import/rmdir.c: Update.
3184         * gnulib/import/same-inode.h: Update.
3185         * gnulib/import/save-cwd.c: Update.
3186         * gnulib/import/save-cwd.h: Update.
3187         * gnulib/import/scratch_buffer.h: Update.
3188         * gnulib/import/secure_getenv.c: Update.
3189         * gnulib/import/setenv.c: Update.
3190         * gnulib/import/signal.in.h: Update.
3191         * gnulib/import/stat-time.c: Update.
3192         * gnulib/import/stat-time.h: Update.
3193         * gnulib/import/stat-w32.c: Update.
3194         * gnulib/import/stat-w32.h: Update.
3195         * gnulib/import/stat.c: Update.
3196         * gnulib/import/stdbool.in.h: Update.
3197         * gnulib/import/stddef.in.h: Update.
3198         * gnulib/import/stdint.in.h: Update.
3199         * gnulib/import/stdio.in.h: Update.
3200         * gnulib/import/stdlib.in.h: Update.
3201         * gnulib/import/str-two-way.h: Update.
3202         * gnulib/import/strchrnul.c: Update.
3203         * gnulib/import/strdup.c: Update.
3204         * gnulib/import/streq.h: Update.
3205         * gnulib/import/strerror-override.c: Update.
3206         * gnulib/import/strerror-override.h: Update.
3207         * gnulib/import/strerror.c: Update.
3208         * gnulib/import/string.in.h: Update.
3209         * gnulib/import/stripslash.c: Update.
3210         * gnulib/import/strnlen1.c: Update.
3211         * gnulib/import/strnlen1.h: Update.
3212         * gnulib/import/strstr.c: Update.
3213         * gnulib/import/strtok_r.c: Update.
3214         * gnulib/import/sys_stat.in.h: Update.
3215         * gnulib/import/sys_time.in.h: Update.
3216         * gnulib/import/sys_types.in.h: Update.
3217         * gnulib/import/tempname.c: Update.
3218         * gnulib/import/tempname.h: Update.
3219         * gnulib/import/time.in.h: Update.
3220         * gnulib/import/unistd--.h: Update.
3221         * gnulib/import/unistd-safer.h: Update.
3222         * gnulib/import/unistd.in.h: Update.
3223         * gnulib/import/unsetenv.c: Update.
3224         * gnulib/import/verify.h: Update.
3225         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3226         * gnulib/import/wchar.in.h: Update.
3227         * gnulib/import/wctype.in.h: Update.
3228         * gnulib/import/xalloc-oversized.h: Update.
3229         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3230         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3231
3232 2018-08-16  Gary Benson <gbenson@redhat.com>
3233
3234         PR gdb/13000:
3235         * gdb/main.c (captured_main_1): Exit with nonzero status
3236         in batch mode if the last command to be executed failed.
3237         * NEWS: Mention the above.
3238
3239 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3240
3241         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3242         end of warning message.
3243
3244 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3245
3246         PR gdb/22943:
3247         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3248         (aarch64_extract_return_value): Use
3249         aapcs_is_vfp_call_or_return_candidate.
3250         (aarch64_return_in_memory): Likewise.
3251         (aarch64_store_return_value): Likewise.
3252
3253 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3254
3255         * aarch64-tdep.c
3256         (aapcs_is_vfp_call_or_return_candidate): Make static
3257         (pass_in_v_or_stack): Remove function.
3258         (pass_in_v_vfp_candidate): New function.
3259         (aarch64_push_dummy_call): Check for float register candidates.
3260
3261 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3262
3263         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3264         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3265         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3266
3267 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3268
3269         PR build/23399
3270         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3271         (struct ipa_sym_addresses): Rename to...
3272         (struct ipa_sym_addresses_common): ... this.
3273         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3274
3275 2018-08-28  Tom Tromey  <tom@tromey.com>
3276
3277         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3278         (token_fifo): Now a std::vector.
3279         (yylex, c_parse): Update.
3280         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3281         (token_fifo): Now a std::vector.
3282         (yylex, d_parse): Update.
3283         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3284         (token_fifo): Now a std::vector.
3285         (yylex, go_parse): Update.
3286
3287 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3288
3289         * parser-defs.h (struct type_stack) <elements>: Change type to
3290         std::vector<union type_stack_elt>.
3291         <depth, size>: Remove.
3292         * parse.c (parse_exp_in_context_1): Adjust.
3293         (type_stack_reserve): Remove.
3294         (check_type_stack_depth): Remove.
3295         (insert_into_type_stack): Adjust to std::vector.
3296         (insert_type): Likewise.
3297         (push_type): Likewise.
3298         (push_type_int): Likewise.
3299         (insert_type_address_space): Likewise.
3300         (pop_type): Likewise.
3301         (pop_type_int): Likewise.
3302         (pop_typelist): Likewise.
3303         (pop_type_stack): Likewise.
3304         (append_type_stack): Likewise.
3305         (push_type_stack): Likewise.
3306         (get_type_stack): Likewise.
3307         (type_stack_cleanup): Likewise.
3308         (push_typelist): Likewise.
3309         (follow_types): Likewise.
3310         (_initialize_parse): Likewise.
3311
3312 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3313
3314         * NEWS: Mention csky target.
3315
3316 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3317             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3318             Don Breazeal  <donb@codesourcery.com>
3319
3320         * csky-linux-tdep.c: New file.
3321         * csky-tdep.c: Likewise.
3322         * csky-tdep.h: Likewise.
3323         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3324         csky-tdep.o.
3325         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3326         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3327         * configure.tgt: Add csky support.
3328
3329 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3330
3331         * python/py-framefilter.c (py_print_frame): Print frame architecture
3332         when printing on an MI output.
3333
3334 2018-08-27  Tom Tromey  <tom@tromey.com>
3335
3336         PR build/23087:
3337         * configure: Rebuild.
3338         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3339
3340 2018-08-27  Tom Tromey  <tom@tromey.com>
3341
3342         * aarch64-linux-tdep.c
3343         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3344         casts to int.
3345
3346 2018-08-27  Tom Tromey  <tom@tromey.com>
3347
3348         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3349         unsigned.
3350         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3351         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3352         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3353         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3354         unsigned.
3355
3356 2018-08-27  Tom Tromey  <tom@tromey.com>
3357
3358         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3359         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3360
3361 2018-08-27  Tom Tromey  <tom@tromey.com>
3362
3363         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3364         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3365         ULONGEST_MAX.
3366         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3367         ULONGEST_MAX.
3368         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3369         ULONGEST_MAX.
3370         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3371         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3372         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3373         ULONGEST_MAX.
3374         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3375         (ppc64_linux_sigaction_tramp_frame)
3376         (ppc32_linux_sighandler_tramp_frame)
3377         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3378         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3379         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3380         * mn10300-linux-tdep.c (am33_linux_sigframe)
3381         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3382         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3383         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3384         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3385         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3386         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3387         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3388         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3389         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3390         * microblaze-linux-tdep.c
3391         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3392         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3393         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3394         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3395         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3396         * common/common-types.h (ULONGEST_MAX): New define.
3397         (CORE_ADDR_MAX): Fix formatting.
3398         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3399         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3400         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3401         (arm_linux_rt_sigreturn_tramp_frame)
3402         (arm_eabi_linux_sigreturn_tramp_frame)
3403         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3404         (thumb2_eabi_linux_sigreturn_tramp_frame)
3405         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3406         (arm_linux_restart_syscall_tramp_frame)
3407         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3408         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3409         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3410         ULONGEST_MAX.
3411         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3412
3413 2018-08-27  Tom Tromey  <tom@tromey.com>
3414
3415         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3416         CORE_ADDR_MAX.
3417         * mips-tdep.c (mips_deal_with_atomic_sequence)
3418         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3419         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3420         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3421         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3422         CORE_ADDR_MAX.
3423         * aarch64-tdep.c (aarch64_software_single_step): Use
3424         CORE_ADDR_MAX.
3425
3426 2018-08-27  Tom Tromey  <tom@tromey.com>
3427
3428         * linespec.c (complete_linespec_component): Add cast to "char".
3429         * completer.c (completion_tracker::build_completion_result): Add
3430         cast to "char".
3431
3432 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3433
3434         * solist.h (struct solist, struct target_so_ops): Fix
3435         indentation.
3436
3437 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3438
3439         * ada-tasks.c (ada_task_info_s): Remove typedef.
3440         (DEF_VEC_O(ada_task_info_s)): Remove.
3441         (struct ada_tasks_inferior_data): Initialize fields.
3442         <task_list>: Make an std::vector.
3443         (get_ada_tasks_inferior_data): Allocate with new.
3444         (ada_get_task_number): Adjust.
3445         (get_task_number_from_id): Likewise.
3446         (valid_task_id): Likewise.
3447         (ada_get_task_info_from_ptid): Likewise.
3448         (iterate_over_live_ada_tasks): Likewise.
3449         (add_ada_task): Likewise.
3450         (read_known_tasks): Likewise.
3451         (ada_build_task_list): Likewise.
3452         (print_ada_task_info): Likewise.
3453         (info_task): Likewise.
3454         (task_command_1): Likewise.
3455
3456 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3457
3458         * ada-lang.c (add_angle_brackets): Return std::string.
3459
3460 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3461
3462         * python/py-threadevent.c (py_get_event_thread): Initialize
3463         pythread.
3464
3465 2018-08-24  Pedro Alves  <palves@redhat.com>
3466
3467         * python/py-bpevent.c (create_breakpoint_event_object): Use
3468         copy-initialization.
3469         * python/py-continueevent.c (emit_continue_event): Use
3470         copy-initialization.
3471         * python/py-exitedevent.c (create_exited_event_object): Return a
3472         gdbpy_ref<>.
3473         (emit_exited_event): Use copy-initialization.
3474         * python/py-inferior.c (python_new_inferior)
3475         (python_inferior_deleted, add_thread_object): Use
3476         copy-initialization.
3477         * python/py-infevents.c (create_inferior_call_event_object)
3478         (create_register_changed_event_object)
3479         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3480         (emit_inferior_call_event, emit_memory_changed_event)
3481         (emit_register_changed_event): Use copy-initialization.
3482         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3483         Return a gdbpy_ref<>.
3484         (emit_new_objfile_event): Use copy-initialization.
3485         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3486         (emit_clear_objfiles_event): Use copy-initialization.
3487         * python/py-signalevent.c (create_signal_event_object): Use
3488         copy-initialization.
3489         * python/py-threadevent.c (create_thread_event_object): Use
3490         copy-initialization.
3491
3492 2018-08-24  Pedro Alves  <palves@redhat.com>
3493             Simon Marchi  <simon.marchi@ericsson.com>
3494
3495         PR gdb/23379
3496         * python/py-continueevent.c: Include "gdbthread.h".
3497         (create_continue_event_object): Add intro comment.  Add 'ptid'
3498         parameter.  Use it to find thread to pass to
3499         create_thread_event_object.
3500         (emit_continue_event): Pass PTID down to
3501         create_continue_event_object.
3502         * python/py-event.h (py_get_event_thread): Declare.
3503         (create_thread_event_object): Remove default from 'thread'
3504         parameter.
3505         * python/py-stopevent.c (create_stop_event_object): Use
3506         py_get_event_thread.
3507         * python/py-threadevent.c (get_event_thread): Rename to ...
3508         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3509         and use it to find the thread.
3510         (create_thread_event_object): Assert that THREAD isn't null.
3511         Don't find the event thread here.
3512
3513 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3514
3515         * block.h (blockrange, blockranges): New struct declarations.
3516         (struct block): Add new field named `ranges'.
3517         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3518         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3519         macros for accessing ranges in struct block.
3520         (make_blockranges): New declaration.
3521         block.c (make_blockranges): New function.
3522         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3523         for block.
3524         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3525         * blockframe.c (cache_pc_function_block): New static global.
3526         (clear_pc_function_cache): Clear cache_pc_function_block.
3527         (find_pc_partial_function): Move comment to symtab.h.  Add
3528         support for non-contiguous blocks.
3529         * cli/cli-cmds.c (block.h): Include.
3530         (print_disassembly): Handle printing of non-contiguous blocks.
3531         (disassemble_current_function): Likewise.
3532         (disassemble_command): Likewise.
3533
3534         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3535         BLOCK_START.
3536         * blockframe.c (get_pc_function_start): Likewise.
3537         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3538         (gcc_symbol_address): Likewise.
3539         * compile/compile-object-run.c (compile_object_run): Likewise.
3540         * compile/compile.c (get_expr_block_and_pc): Likewise.
3541         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3542         (func_addr_to_tail_call_list): Likewise.
3543         * findvar.c (default_read_var_value): Likewise.
3544         * inline-frame.c (inline_frame_this_id): Likewise.
3545         (skip-inline_frames): Likewise.
3546         * infcmd.c (until_next_command): Likewise.
3547         * linespec.c (convert_linespec_to_sals): Likewise.
3548         * parse.c (parse_exp_in_context_1): Likewise.
3549         * printcmd.c (build_address_symbolic): likewise.
3550         (info_address_command): Likewise.
3551         symtab.c (find_function_start_sal): Likewise.
3552         (skip_prologue_sal): Likewise.
3553         (find_function_alias_target): Likewise.
3554         (find_gnu_ifunc): Likewise.
3555         * stack.c (find_frame_funname): Likewise.
3556         * symtab.c (fixup_symbol_section): Likewise.
3557         (find_function_start_sal): Likewise.
3558         (skip_prologue_sal): Likewsie.
3559         (find_function_alias_target): Likewise.
3560         (find_gnu_ifunc): Likewise.
3561         * tracepoint.c (info_scope_command): Likewise.
3562         * value.c (value_fn_field): Likewise.
3563
3564         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3565         in place of find_pc_partial_function.
3566         * blockframe.c (find_function_entry_range_from_pc): New function.
3567         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3568         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3569         for each range in a block.
3570
3571
3572 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3573
3574         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3575         incrementation.
3576
3577 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3578
3579         * solib-svr4.c (read_program_headers_from_bfd): Return
3580         gdb::optional<gdb::byte_vector>.
3581         (svr4_exec_displacement): Adjust.
3582
3583 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3584
3585         * solib-svr4.c (read_program_header): Return
3586         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3587         (find_program_interpreter): Return
3588         gdb::optional<gdb::byte_vector>.
3589         (scan_dyntag_auxv): Adjust.
3590         (enable_break): Adjust.
3591         (svr4_exec_displacement): Adjust.
3592
3593 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3594
3595         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3596         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3597
3598 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3599
3600         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3601         string_vprintf.
3602         * guile/scm-utils.c (gdbscm_printf): Likewise.
3603         * serial.c (serial_printf): Likewise.
3604         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3605
3606 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3607
3608         * stack.c (print_frame): Print frame architecture when printing on
3609         an MI output.
3610         * NEWS: Mention new "arch" attribute in frame output.
3611
3612 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3613
3614         * arch/aarch64.h (aarch64_regnum): Update comment.
3615
3616 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3617
3618         * NEWS: Add SVE to 8.2 section.
3619
3620 2018-08-21  Pedro Alves  <palves@redhat.com>
3621
3622         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3623         out from gdbscm_parse_function_args.
3624         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3625         gdbscm_parse_function_args_1.
3626
3627 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3628
3629         PR gdb/17816
3630         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3631         operator.
3632
3633 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3634
3635         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3636
3637 2018-08-19  Michael Spang  <spang@google.com>
3638
3639         PR gdb/11786
3640         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3641         for PT_TLS segments.
3642
3643 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3644
3645         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3646         dwarf_variable_value.
3647         * dwarf2-frame.c (class dwarf_expr_executor):
3648         Add override for dwarf_variable_value.
3649         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3650         (class symbol_needs_eval_context): Likewise.
3651         (indirect_synthetic_pointer): Add forward declaration.
3652         (sect_variable_value): New function.
3653         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3654         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3655         for DW_OP_GNU_variable_value.
3656
3657 2018-08-16  Tom Tromey  <tom@tromey.com>
3658
3659         * top.c (read_command_file): Update.
3660         (command_line_input): Remove "repeat" argument.
3661         * ada-lang.c (get_selections): Update.
3662         * linespec.c (decode_line_2): Update.
3663         * defs.h (command_line_input): Remove argument.
3664         * cli/cli-script.c (read_next_line): Update.
3665         * python/py-gdb-readline.c: Update.
3666
3667 2018-08-17  Tom Tromey  <tom@tromey.com>
3668
3669         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3670         command_line_input.
3671
3672 2018-08-15  Tom Tromey  <tom@tromey.com>
3673
3674         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3675
3676 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3677
3678         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3679         If used, use find_pc_partial_function to find address range
3680         to disassemble.
3681         * mi/mi-main.c (mi_cmd_list_features): Report
3682         "data-disassemble-a-option" feature.
3683         * NEWS: Mention new -data-disassemble option -a.
3684
3685 2018-08-13  Tom Tromey  <tom@tromey.com>
3686
3687         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3688
3689 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3690
3691         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3692         (aarch64_linux_collect_sve_regset): Likewise.
3693         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3694         * regcache.h (regcache_map_entry_size): New function.
3695
3696 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3697
3698         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3699         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3700         (SVE_HEADER_VL_LENGTH): Likewise.
3701         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3702         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3703         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3704         (SVE_HEADER_SIZE_OFFSET): Likewise.
3705         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3706         (SVE_HEADER_VL_OFFSET): Likewise.
3707         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3708         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3709         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3710         (SVE_HEADER_SIZE): Likewise.
3711         (aarch64_linux_core_read_vq): Add function.
3712         (aarch64_linux_core_read_description): Check for SVE section.
3713
3714 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3715
3716         * aarch64-fbsd-tdep.c
3717         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3718         collect_size.
3719         * aarch64-linux-tdep.c
3720         (aarch64_linux_iterate_over_regset_sections): Likewise.
3721         * alpha-linux-tdep.c
3722         (alpha_linux_iterate_over_regset_sections):
3723         * alpha-nbsd-tdep.c
3724         (alphanbsd_iterate_over_regset_sections): Likewise.
3725         * amd64-fbsd-tdep.c
3726         (amd64fbsd_iterate_over_regset_sections): Likewise.
3727         * amd64-linux-tdep.c
3728         (amd64_linux_iterate_over_regset_sections): Likewise.
3729         * arm-bsd-tdep.c
3730         (armbsd_iterate_over_regset_sections): Likewise.
3731         * arm-fbsd-tdep.c
3732         (arm_fbsd_iterate_over_regset_sections): Likewise.
3733         * arm-linux-tdep.c
3734         (arm_linux_iterate_over_regset_sections): Likewise.
3735         * corelow.c (get_core_registers_cb): Likewise.
3736         (core_target::fetch_registers): Likewise.
3737         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3738         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3739         * gdbarch.h (void): Regenerate.
3740         * gdbarch.sh: Add supply_size and collect_size.
3741         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3742         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3743         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3744         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3745         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3746         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3747         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3748         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3749         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3750         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3751         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3752         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3753         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3754         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3755         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3756         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3757         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3758         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3759         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3760         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3761         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3762         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3763         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3764         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3765         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3766         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3767         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3768         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3769         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3770         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3771
3772 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3773
3774         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3775         with string_printf.
3776
3777 2018-08-10  Keith Seitz  <keiths@redhat.com>
3778
3779         * compile/compile-c-support.c (add_code_header, add_code_footer):
3780         Move into policy class.
3781         (c_push_user_expression, pop_user_expression_nop)
3782         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3783         (compile_program): New host class.
3784         (c_compile_program): New typedef.
3785         (c_compute_porgram): Use c_compile_program.
3786
3787 2018-08-10  Keith Seitz  <keiths@redhat.com>
3788
3789         * compile/compile-internal.h (compile_instance::~compile_instance):
3790         Remove calls to htab_delete.
3791         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3792         * compile.c (compile_instance::compile_instance): Initialize
3793         htab unique pointers.
3794         (compile_instance::get_cached_type, compile_instance::insert_type)
3795         (compile_instance::error_symbol_once): Update for unique_ptr.
3796
3797 2018-08-10  Keith Seitz  <keiths@redhat.com>
3798
3799         * compile/compile-c-symbols.c (struct symbol_error)
3800         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3801         (compile_instance::insert_symbol_error)
3802         (compile_instance::error_symbol_once): Move to ...
3803         * compile/compile.c: ... here.
3804
3805 2018-08-10  Keith Seitz  <keiths@redhat.com>
3806
3807         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3808         instead of `new_compile_instance'.
3809         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3810         Update description.
3811         If the symbol error map is not initialized, create it.
3812         (generate_c_for_for_one_symbol): Do not check/initialize
3813         the symbol error map.
3814         * compile/compile-c-types.c (compile_c_instance): Make a class.
3815         Update all callers.
3816         (compile_instance::compile_instance): Initialize the type cache.
3817         (get_cached_type): New function.
3818         (insert_type): Update description.
3819         (compile_c_instance::m_default_cflags): Define.
3820         (convert_type): Update description.  Use get_cached_type.
3821         (delete_instance): Moved to destructor.
3822         (new_compile_instance): Moved to constructor.
3823         * compile/compile-c.h (compile_c_instance): Make class inheriting
3824         from compile_instance.
3825         <base>: Remove field.
3826         <type_map, symbol_err_map>: Move to base class.
3827         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3828         * compile/compile-internal.h (compile_instance): Make class.
3829         <type_map_t, symbol_err_map_t>: Define.
3830         <fe>: Rename to `m_gcc_fe'.
3831         <scope, block, gcc_target_options>: Add `m_' prefix.
3832         <m_type_map, m_symbol_err_map>: New fields, moved from
3833         compile_c_instance.
3834         <destroy>: Remove.
3835         (convert_type, new_compile_instance): Remove.
3836         * compile/compile.c (cleanup_compile_instance): Remove.
3837         (compile_to_object): Use unique_ptr to eliminate cleanups.
3838         (compile_instance::set_print_callback, compile_instance::version)
3839         (compile_instance::set_verbose)
3840         (compile_instance::set_driver_filename)
3841         (compile_instance::set_triplet_regexp)
3842         (compile_instance::set_arguments)
3843         (compile_instance::set_source_file)
3844         (compile_instance::compile): Define.
3845
3846 2018-08-10  Keith Seitz  <keiths@redhat.com>
3847
3848         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3849         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3850         gcc-c-fe.def to define C plugin.
3851         (delete_instance): Delete `c_plugin'.
3852         (new_compile_instance): Initialize `c_plugin'.
3853         * compile/compile-c.h: Include gcc_c_plugin.h.
3854         (struct compile_c_instance) <c_plugin>: New member.
3855         * gcc-c-plugin.h: New file.
3856         Update all callers with API change.
3857
3858 2018-08-10  Keith Seitz  <keiths@redhat.com>
3859
3860         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3861         (HFILES_NO_SRCDIR): ... to here.
3862         Add compile-internal.h and compile-c.h.
3863         * compile/compile-c-support.c: Include compile-c.h.
3864         * compile/compile-c-symbols.c: Include compile-c.h.
3865         (generate_c_for_variable_locations): Update comment.
3866         * compile/compile-c-types.c: Include compile-c.h.
3867         * compile/compile-c.h: New file -- moved C language declarations
3868         from other files here.
3869         * compile/compile-internal.h: Do not include hashtab.h or
3870         common/enum-flags.h.
3871         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3872         (gcc_convert_symbol, gcc_symbol_address)
3873         (generate_c_for_variable_locations, c_get_mode_for_size)
3874         (c_get_range_decl_name): Definitions moved to compile-c.h.
3875         * compile/compile-loc2c.c: Include compile-c.h.
3876
3877 2018-08-10  Keith Seitz  <keiths@redhat.com>
3878
3879         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3880         (c_symbol_substitution_name): ... this.
3881         Update all callers.
3882
3883 2018-08-10  Keith Seitz  <keiths@redhat.com>
3884
3885         * compile/compile-c-support.c (c_compute_program): Use
3886         unique_xmalloc_ptr to eliminate cleanup.
3887         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3888         Return a unique_xmalloc_ptr and eliminate cleanup.
3889         * compile/compile-internal.h (generate_c_for_variable_locations):
3890         Return unique_xmalloc_ptr and update description.
3891
3892 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3893
3894         * corelow.c (core_target::get_core_register_section): Rename
3895         min_size to section_min_size.
3896
3897 2018-08-09  Jim Wilson  <jimw@sifive.com>
3898
3899         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3900         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3901         * NEWS: Mention new GNU/Linux RISC-V target.
3902         * configure.host: Add riscv*-*-linux*.
3903         * configure.nat: Add riscv*.
3904         * configure.tgt: Add riscv*-*-linux*.
3905         * riscv-linux-nat.c: New file.
3906         * riscv-linux-tdep.c: New file.
3907
3908 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3909
3910         * infrun.c (resume): Make static, add forward declaration.
3911         (proceed): Update header comment.
3912         * infrun.h (resume): Delete declaration.
3913
3914 2018-08-09  Tom Tromey  <tom@tromey.com>
3915
3916         * riscv-tdep.h: Minor formatting fixes.
3917
3918 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
3919
3920         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3921         * dwarf-index-cache.c (create_dir_and_check): Likewise.
3922         (test_mkdir_recursive): Likewise.
3923         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3924
3925 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3926
3927         * valarith.c (value_subscripted_rvalue): If an array is not in
3928         memory, and we don't know the upper bound, then we can't know that
3929         the requested element exists or not.
3930
3931 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
3932
3933         * target.c (str_comma_list_concat_elem): Fix typo in comment.
3934         (target_options_to_string): Add comment.
3935
3936 2018-08-08  Tom Tromey  <tom@tromey.com>
3937
3938         * unittests/scoped_mmap-selftests.c: Check result of "write".
3939
3940 2018-08-08  Jim Wilson  <jimw@sifive.com>
3941
3942         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3943         (decode_register_index_short): New.
3944         (decode_j_type_insn, decode_cj_type_insn): New.
3945         (decode_b_type_insn, decode_cb_type_insn): New.
3946         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
3947         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
3948         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3949         is_c_sw_insn instead of is_sw_insn.
3950         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3951         (riscv_software_single_step): New.
3952         * riscv-tdep.h (riscv_software_single_step): Declare.
3953
3954         * riscv-tdep.c (riscv_isa_xlen): Drop static.
3955         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3956
3957 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
3958
3959         PR gdb/18050:
3960         * target.c (dispose_inferior): Don't dispose of inferiors that are
3961         already killed.
3962
3963 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3964
3965         * remote.c (remote_target::download_tracepoint): Change char* to
3966         const char*.
3967
3968 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
3969
3970         * target.h (target_options_to_string): Return an std::string.
3971         * target.c (str_comma_list_concat_elem): Return void, use
3972         std::string.
3973         (do_option): Likewise.
3974         (target_options_to_string): Return an std::string.
3975         * linux-nat.c (linux_nat_target::wait): Adjust.
3976         * target-debug.h (target_debug_print_options): Adjust.
3977
3978 2018-08-07  Tom Tromey  <tom@tromey.com>
3979
3980         * Makefile.in (CPPFLAGS): New variable.
3981         (INTERNAL_CPPFLAGS): Use it.
3982
3983 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3984
3985         * NEWS: Mention the index cache.
3986
3987 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3988
3989         * common/pathstuff.h (get_standard_cache_dir): New.
3990         * common/pathstuff.c (get_standard_cache_dir): New.
3991         * build-id.h (build_id_to_string): New.
3992         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3993         DEBUG_STR_SUFFIX): Move to here.
3994         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3995         DEBUG_STR_SUFFIX): Move from there.
3996         (write_psymtabs_to_index): Make non-static, add basename
3997         parameter.  Write to temporary files, rename when done.
3998         (save_gdb_index_command): Adjust call to
3999         write_psymtabs_to_index.
4000         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
4001         field.
4002         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
4003         (get_gdb_index_contents_from_cache): New.
4004         (get_gdb_index_contents_from_cache_dwz): New.
4005         (dwarf2_initialize_objfile): Read index from cache.
4006         (dwarf2_build_psymtabs): Save to index.
4007         * dwarf-index-cache.h: New file.
4008         * dwarf-index-cache.c: New file.
4009         * dwarf-index-write.h: New file.
4010
4011 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4012
4013         * gnulib/aclocal.m4: Re-generate.
4014         * gnulib/config.in: Re-generate.
4015         * gnulib/configure: Re-generate.
4016         * gnulib/import/Makefile.am: Re-generate.
4017         * gnulib/import/Makefile.in: Re-generate.
4018         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
4019         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4020         * gnulib/import/m4/mkdir.m4: New file.
4021         * gnulib/import/mkdir.c: New file.
4022         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
4023         module.
4024
4025 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4026
4027         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
4028         * common/scoped_mmap.c: New file.
4029         * common/scoped_mmap.h (destroy): New method.
4030         (~scoped_mmap, reset): Use destroy.
4031         (scoped_mmap): New move constructor.
4032         (mmap_file): New declaration.
4033         * unittests/scoped_mmap-selftests.c (test_normal,
4034         test_invalid_filename, run_tests): New functions.
4035         (_initialize_scoped_mmap_selftests): Register selftest.
4036
4037 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4038
4039         * dwarf2read.c (read_gdb_index_from_section): Rename to...
4040         (read_gdb_index_from_buffer): ... this.  Remove section
4041         parameter, add buffer parameter.
4042         (get_gdb_index_contents_ftype,
4043         get_gdb_index_contents_dwz_ftype): New typedefs.
4044         (dwarf2_read_gdb_index): Add callback parameters to get the
4045         index contents.
4046         (get_gdb_index_contents_from_section): New.
4047         (dwarf2_initialize_objfile): Update call to
4048         dwarf2_read_gdb_index.
4049
4050 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
4051
4052         * common/filestuff.h (gdb_fopen_cloexec): New overload.
4053         (gdb_open_cloexec): Likewise.
4054         * nat/linux-osdata.c (command_from_pid): Use string_printf.
4055         (commandline_from_pid): Likewise.
4056         (linux_xfer_osdata_threads): Likewise.
4057         (linux_xfer_osdata_fds): Likewise.
4058         * ada-lang.c (is_package_name): Likewise.
4059         * auxv.c (procfs_xfer_auxv): Likewise.
4060         * breakpoint.c (print_one_breakpoint_location): Use
4061         uiout::field_fmt.
4062         (print_one_catch_solib): Use string_printf.
4063         * coff-pe-read.c (add_pe_exported_sym): Likewise.
4064         (add_pe_forwarded_sym): Likewise.
4065         * dwarf2read.c (create_type_unit_group): Likewise.
4066         (build_error_marker_type): Likewise.
4067         * infcall.c (get_function_name): Likewise.
4068         * valprint.c (print_converted_chars_to_obstack): Likewise.
4069         * xtensa-tdep.c (xtensa_register_type): Likewise.
4070
4071 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
4072
4073         * remote.c (remote_target::download_tracepoint): Fix format
4074         string errors.
4075
4076 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4077
4078         * tracefile.c: Include common/byte-vector.h.
4079         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
4080         with trace_regblock_size if needed.  Update uses of buf.
4081
4082 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4083
4084         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4085         std::vector<unsigned char>.
4086         * tracepoint.c (collection_list::collection_list): Remove
4087         m_regs_mask initializer from initializer list.  Resize
4088         m_regs_mask using the largest remote register number.
4089         (collection_list::add_remote_register): Remove size check on
4090         m_regs_mask.  Use at to access element.
4091         (collection_list::stringify): Change type of temp_buf to
4092         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4093         stringify the register mask.  Use pack_hex_byte for the register
4094         mask.
4095
4096 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4097
4098         * tracepoint.h (class collection_list) <add_register>: Remove.
4099         <add_remote_register, add_ax_registers, add_local_register>:
4100         Declare.
4101         <add_memrange>: Add scope parameter.
4102         * tracepoint.c (encode_actions_1): Likewise.
4103         (collection_list::add_register): Rename to ...
4104         (collection_list::add_remote_register): ... this.  Update
4105         comment.
4106         (collection_list::add_ax_registers, add_local_register): New
4107         methods.
4108         (collection_list::add_memrange): Add scope parameter.  Call
4109         add_local_register instead of add_register.
4110         (finalize_tracepoint_aexpr): New function.
4111         (collection_list::collect_symbol): Update calls to add_memrange.
4112         Call add_local_register instead of add_register.  Call
4113         add_ax_registers.  Call finalize_tracepoint_aexpr.
4114         (encode_actions_1): Get remote regnos for $reg action.  Call
4115         add_remote_register, add_ax_registers, and add_local_register.
4116         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4117         (validate_actionline): Call finalize_tracepoint_aexpr.
4118
4119 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4120
4121         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4122         Replace array buf with gdb::char_vector buf, of size
4123         get_remote_packet_size ().  Replace references to buf and
4124         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4125         and xsnprintf with snprintf.  Raise errors if the buffer is too
4126         small.
4127
4128 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4129
4130         * remote.c (remote_target::download_tracepoint): Fix the has_more
4131         predicate in the QTDP action list iteration.
4132
4133 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4134
4135         * remote.c (remote_target::download_tracepoint): Fix indentation
4136         in for block.
4137
4138 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4139
4140         * proc-api.c (_initialize_proc_api): Remove c, unused.
4141         * procfs.c (procfs_init_inferior): Remove signals, unused.
4142         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4143         unused.
4144
4145 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4146             Andrew Burgess  <andrew.burgess@embecosm.com>
4147
4148         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4149         'W_STOPCODE (0)' as this could be ambiguous.
4150
4151 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4152
4153         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4154         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4155         "ai_socktype").
4156
4157 2018-08-02  Tom Tromey  <tom@tromey.com>
4158
4159         PR symtab/16842.
4160         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4161         symbols.
4162         (process_structure_scope): Likewise.
4163
4164 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4165
4166         PR gdb/22629:
4167         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4168         kill inferior.
4169
4170 2018-08-02  Tom Tromey  <tom@tromey.com>
4171
4172         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4173         (darwin_suspend_inferior, darwin_resume_inferior)
4174         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4175         (darwin_check_new_threads): Check result of get_darwin_inferior.
4176
4177 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4178
4179         GDB 8.1.1 released.
4180
4181 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4182
4183         * varobj.c (varobj_get_path_expr_parent): Report an error if
4184         parent is a dynamic varobj.
4185
4186 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4187
4188         * gnulib/aclocal.m4: Re-generate.
4189         * gnulib/config.in: Re-generate.
4190         * gnulib/configure: Re-generate.
4191         * gnulib/import/Makefile.in: Re-generate.
4192         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4193         * gnulib/import/m4/onceonly.m4: Re-generate.
4194
4195 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4196
4197         * target-descriptions.c (struct xml_test_tdesc): New.
4198         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4199         (record_xml_tdesc): Update.
4200         (maintenance_check_xml_descriptions): Update.
4201         * target-descriptions.h (record_xml_tdesc): Update comment.
4202
4203 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4204
4205         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4206         checking array bounds are defined.
4207
4208 2018-07-30  Tom Tromey  <tom@tromey.com>
4209
4210         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4211         irreflexivity violation.
4212
4213 2018-07-30  Tom Tromey  <tom@tromey.com>
4214
4215         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4216         * value.c (unpack_long): Remove lint code.
4217         * valops.c (value_ind): Remove lint code.
4218         * valarith.c (value_x_binop, value_x_unop, value_equal)
4219         (value_pos): Remove lint code.
4220
4221 2018-07-28  Tom de Vries  <tdevries@suse.de>
4222
4223         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4224         with undefined upper bound as <optimized out>.
4225
4226 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4227
4228         * gcore.in: Rename variable "name" to "prefix".  Expand
4229         "usage" text.
4230
4231 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4232
4233         * windows-nat.c (windows_nat_target::create_inferior): Update to
4234         call close() in global namespace.
4235
4236 2018-07-26  Tom Tromey  <tom@tromey.com>
4237
4238         * dwarf-index-write.c (add_address_entry): Don't add objfile
4239         offsets.
4240         * dbxread.c (find_stab_function): Rename from
4241         find_stab_function_addr.  Return a bound_minimal_symbol.
4242         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4243         Don't add objfile offsets.
4244         (end_psymtab): Use raw_text_low, raw_text_high,
4245         MSYMBOL_VALUE_RAW_ADDRESS.
4246         (read_ofile_symtab): Update.
4247         (process_one_symbol): Update.
4248         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4249         offsets.
4250         (dw2_relocate): Remove.
4251         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4252         searching addrmap.
4253         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4254         Update.
4255         (process_psymtab_comp_unit_reader, add_partial_symbol)
4256         (add_partial_subprogram, dwarf2_ranges_read): Update.
4257         (load_partial_dies): Update.
4258         (add_address_entry): Don't add objfile offsets.
4259         (dwarf2_build_include_psymtabs): Update.
4260         (create_addrmap_from_aranges): Don't add objfile offsets.
4261         (dw2_find_pc_sect_compunit_symtab): Update.
4262         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4263         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4264         Update.
4265         (parse_partial_symbols): Don't add objfile offsets.  Use
4266         raw_text_low, raw_text_high.  Update.
4267         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4268         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4269         or call 'relocate' quick function.  Clear psymbol_map.
4270         * psympriv.h (struct partial_symbol) <address>: Add section
4271         offset.
4272         <set_unrelocated_address>: Rename from set_address.
4273         <raw_text_low, raw_text_high>: New methods.
4274         <text_low, text_high>: Add objfile parameter.
4275         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4276         set_unrelocated_address.
4277         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4278         (find_pc_psymbol): Update.
4279         (fixup_psymbol_section, relocate_psymtabs): Remove.
4280         (dump_psymtab, psym_functions): Update.
4281         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4282         parameter.
4283         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4284         (start_psymtab_common): Update.
4285         * symfile-debug.c (debug_qf_relocate): Remove.
4286         (debug_sym_quick_functions): Update.
4287         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4288         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4289         Update.
4290
4291 2018-07-26  Tom Tromey  <tromey@redhat.com>
4292
4293         * dbxread.c (end_psymtab): Use text_high_valid and
4294         text_low_valid.
4295         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4296         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4297         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4298         Update comment.
4299         <text_low_valid, text_high_valid>: New fields.
4300         <set_text_low, set_text_high>: Update.
4301         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4302
4303 2018-07-26  Tom Tromey  <tom@tromey.com>
4304
4305         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4306         Update.
4307         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4308         textlow and texthigh fields.
4309         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4310         Update.
4311         * mdebugread.c (parse_lines, parse_partial_symbols)
4312         (psymtab_to_symtab_1): Update.
4313         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4314         Rename fields.  Update comment.  Now private.
4315         <text_low, text_high, set_text_low, set_text_high>: New methods.
4316         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4317         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4318         (start_psymtab_common, maintenance_info_psymtabs)
4319         (maintenance_check_psymtabs): Update.
4320         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4321         texthigh fields.
4322         (scan_xcoff_symtab): Update.
4323
4324 2018-07-26  Tom Tromey  <tromey@redhat.com>
4325
4326         * psympriv.h (struct partial_symbol) <unrelocated_address,
4327         address, set_address>: New methods.
4328         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4329         (fixup_psymbol_section, relocate_psymtabs): Update.
4330         (print_partial_symbols): Add 'objfile' parameter.  Update.
4331         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4332         Update.
4333
4334 2018-07-26  Tom Tromey  <tom@tromey.com>
4335
4336         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4337         (debug_names::write_psymbols): Update.
4338         * psympriv.h (struct partial_symbol): Derive from
4339         general_symbol_info.
4340         <obj_section>: New method.
4341         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4342         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4343         (find_pc_sect_psymbol, fixup_psymbol_section)
4344         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4345         (print_partial_symbols, recursively_search_psymtabs)
4346         (compare_psymbols, psymbol_hash, psymbol_compare)
4347         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4348         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4349
4350 2018-07-26  Tom Tromey  <tromey@redhat.com>
4351
4352         * dbxread.c (end_psymtab): Remove dead code.
4353
4354 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4355
4356         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4357         DWARF unwinders are disabled.
4358         * dwarf2-frame.c: Add dwarf2read.h include.
4359         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4360         disabled.
4361         (dwarf2_frame_unwinders_enabled_p): Define.
4362         (show_dwarf_unwinders_enabled_p): New function.
4363         (_initialize_dwarf2_frame): Register switch to control DWARF
4364         unwinder use.
4365         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4366         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4367         (show_dwarf_cmdlist): Remove static keyword.
4368         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4369         (show_dwarf_cmdlist): Declare.
4370         * NEWS: Document new feature.
4371
4372 2018-07-26  Tom de Vries  <tdevries@suse.de>
4373
4374         PR breakpoints/23366
4375         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4376
4377 2018-07-26  Tom de Vries  <tdevries@suse.de>
4378
4379         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4380         DW_AT_count can't be translated to a dynamic prop.
4381
4382 2018-07-25  Tom de Vries  <tdevries@suse.de>
4383
4384         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4385         try/catch.
4386
4387 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4388
4389         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4390
4391 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4392
4393         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4394
4395 2018-07-24  Keith Seitz  <keiths@redhat.comt
4396
4397         PR symtab/23010
4398         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4399         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4400         instead of add_symbol_to_list.
4401         (read_file_scope): Call prepare_one_comp_unit before reading
4402         any other DIEs.
4403
4404 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4405
4406         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4407
4408 2018-07-24  Tom Tromey  <tom@tromey.com>
4409
4410         * utils.c (malloc, realloc, free): Don't declare.
4411         * configure, config.in: Rebuild.
4412         * configure.ac: Don't check for declarations of free, malloc, or
4413         realloc.
4414
4415 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4416
4417         * aarch64-linux-nat.c
4418         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4419         variable.
4420         * arm-linux-nat.c (fetch_regs): Likewise.
4421         (store_regs): Likewise.
4422         (fetch_vfp_regs): Likewise.
4423         (store_vfp_regs): Likewise.
4424         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4425         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4426         (arm_linux_nat_target::insert_watchpoint): Likewise.
4427         (arm_linux_nat_target::remove_watchpoint): Likewise.
4428         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4429         Likewise.
4430         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4431         Likewise.
4432         * ppc-linux-nat.c (fetch_register): Likewise.
4433         (fetch_all_gp_regs): Likewise.
4434         (fetch_ppc_registers): Likewise.
4435         (store_all_gp_regs): Likewise.
4436         (store_ppc_registers): Likewise.
4437         (hwdebug_insert_point): Likewise.
4438         (can_use_watchpoint_cond_accel): Likewise.
4439         * remote-sim.c (gdb_os_write_stdout): Likewise.
4440
4441 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4442             Tom Tromey  <tom@tromey.com>
4443
4444         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4445         test for it.
4446         * configure: Rebuild.
4447
4448 2018-07-22  Tom Tromey  <tom@tromey.com>
4449
4450         * regformats/regdat.sh: Define xmltarget_${name} inside
4451         #ifndef IN_PROCESS_AGENT.
4452
4453 2018-07-22  Tom Tromey  <tom@tromey.com>
4454
4455         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4456
4457 2018-07-22  Tom Tromey  <tom@tromey.com>
4458
4459         * symfile.c (reread_symbols): Notify iter, not objfile.
4460
4461 2018-07-22  Tom Tromey  <tom@tromey.com>
4462
4463         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4464         Use arch_ops.
4465         (ravenscar_thread_target::prepare_to_store): Likewise.
4466
4467 2018-07-22  Tom Tromey  <tom@tromey.com>
4468
4469         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4470         unused variable.  Call value_fetch_lazy when needed.
4471         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4472         Remove unused variable.  Call value_fetch_lazy when needed.
4473
4474 2018-07-22  Tom Tromey  <tom@tromey.com>
4475
4476         * m32c-tdep.c (mark_dma): Return void.
4477         (make_regs): Remove unused declarations.
4478
4479 2018-07-22  Tom Tromey  <tom@tromey.com>
4480
4481         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4482         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4483         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4484         bkscm_get_valid_block_smob_arg_unsafe for effect.
4485
4486 2018-07-22  Tom Tromey  <tom@tromey.com>
4487
4488         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4489         value_type.
4490
4491 2018-07-22  Tom Tromey  <tom@tromey.com>
4492
4493         * windows-nat.c (saved_context): Conditionally define.
4494         * remote.c (remote_target::remote_btrace_maybe_reopen):
4495         Conditionally declare "warned".
4496         * inflow.c (sigquit_ours): Conditionally define.
4497         (new_tty): Move "tty" declaration inside #if.
4498         * guile/guile.c (guile_datadir): Conditionally define.
4499         * charset.c (set_be_le_names): Move some declarations inside #if.
4500         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4501         #if.
4502         (parse_xml_btrace_conf): Likewise.
4503
4504 2018-07-22  Tom Tromey  <tom@tromey.com>
4505
4506         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4507
4508 2018-07-22  Tom Tromey  <tom@tromey.com>
4509
4510         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4511         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4512         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4513         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4514         * stack.c (frame_apply_level_command): Remove unused variable.
4515         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4516         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4517         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4518         unused variable.
4519         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4520         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4521         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4522         variable.
4523         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4524         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4525         variable.
4526         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4527         Remove unused variable.
4528         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4529         variable.
4530         * common/tdesc.c (print_xml_feature::visit): Remove unused
4531         variable.
4532         * compile/compile-object-load.c (store_regs): Remove unused
4533         variables.
4534         * complaints.c (clear_complaints): Remove unused variable.
4535         * corelow.c (core_target_open): Remove unused variable.
4536         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4537         variable.
4538         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4539         variable.
4540         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4541         variable.
4542         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4543         variable.
4544         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4545         variable.
4546         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4547         variable.
4548         * ia64-tdep.c (examine_prologue): Remove unused variable.
4549         * infcall.c (run_inferior_call): Remove unused variable.
4550         * inferior.c (exit_inferior): Remove unused variable.
4551         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4552         * linespec.c (decode_line_2): Remove unused variable.
4553         * linux-nat.c (super_close): Remove.
4554         * linux-tdep.c (linux_info_proc): Remove unused variable.
4555         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4556         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4557         Remove unused variable.
4558         * parse.c (find_minsym_type_and_address): Remove unused variable.
4559         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4560         variable.
4561         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4562         variable.
4563         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4564         variables.
4565         * record-btrace.c (record_btrace_target::store_registers): Remove
4566         unused variable.
4567         (cmd_show_record_btrace_cpu): Remove unused variable.
4568         * riscv-tdep.c (riscv_register_reggroup_p)
4569         (riscv_push_dummy_call, riscv_return_value): Remove unused
4570         variable.
4571         * rust-exp.y (literal): Remove unused variable.
4572         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4573         unused variable.
4574         <STRUCTOP_ANONYMOUS>: Likewise.
4575         * s390-linux-tdep.c (s390_linux_init_abi_31)
4576         (s390_linux_init_abi_64): Remove unused variable.
4577         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4578         (file_select_thread, net_windows_open, _initialize_ser_windows):
4579         Remove unused variables.
4580         * symtab.c (find_pc_sect_line): Remove unused variable.
4581         * target-memory.c (compute_garbled_blocks): Remove unused
4582         variable.
4583         (target_write_memory_blocks): Remove unused variable.
4584         * target.c (target_stack::unpush): Remove unused variables.
4585         * tracepoint.c (start_tracing, all_tracepoint_actions)
4586         (merge_uploaded_trace_state_variables)
4587         (print_one_static_tracepoint_marker): Remove unused variable.
4588         * unittests/basic_string_view/element_access/char/1.cc (test01):
4589         Remove unused variable.
4590         * windows-nat.c (windows_continue, windows_add_all_dlls)
4591         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4592         Remove unused variables.
4593
4594 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4595
4596         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4597         attr_profile in HAVE_ELF.
4598         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4599         HAVE_ELF.
4600
4601 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4602
4603         * frame.c (frame_register_unwind): Change parameter name.
4604         (frame_unwind_register): Likewise.
4605         (frame_unwind_register_value): Likewise.
4606         (frame_unwind_register_signed): Likewise.
4607         (frame_unwind_register_unsigned): Likewise.
4608         * frame.h (frame_register_unwind): Likewise.
4609         (frame_unwind_register): Likewise.
4610         (frame_unwind_register_value): Likewise.
4611         (frame_unwind_register_signed): Likewise.
4612         (frame_unwind_register_unsigned): Likewise.
4613         (frame_unwind_arch): Likewise.
4614
4615 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4616
4617         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4618         ISA maintenance.
4619
4620 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4621
4622         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4623         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4624         hand.
4625
4626 2018-07-20  Keith Seitz  <keiths@redhat.com>
4627
4628         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4629         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4630         m_compunit_symtab, m_language>: Add "m_" prefix.
4631         Update all uses.
4632         * buildsym.c: Update all uses.
4633
4634 2018-07-20  Tom Tromey  <tom@tromey.com>
4635
4636         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4637         * buildsym.h (record_line_ftype): Remove typedef.
4638
4639 2018-07-20  Tom Tromey  <tom@tromey.com>
4640
4641         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4642         (end_expandable_symtab): Likewise.
4643         (end_symtab_get_static_block): Likewise.
4644         (end_symtab_from_static_block): Likewise.
4645         * buildsym-legacy.c (augment_type_symtab): Remove.
4646         (end_expandable_symtab): Remove.
4647         (end_symtab_get_static_block): Remove.
4648         (end_symtab_from_static_block): Remove.
4649
4650 2018-07-20  Tom Tromey  <tom@tromey.com>
4651
4652         * dwarf2read.c: Include buildsym.h.
4653         (struct dwarf2_cu) <builder>: New method.
4654         (fixup_go_packaging): Update.
4655         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4656         use scoped_free_pendings.
4657         (using_directives): Add "cu" parameter, remove "language".
4658         (read_import_statement, setup_type_unit_groups, )
4659         (read_func_scope, read_lexical_block_scope)
4660         (dwarf2_record_block_ranges, read_namespace): Update.
4661         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4662         (lnp_state_machine::handle_end_sequence): Update.
4663         (class lnp_state_machine) <m_cu>: New member.
4664         <m_record_line_callback>: Remove.
4665         <m_currently_recording_lines>: New member.
4666         (lnp_state_machine::handle_set_file): Update.
4667         (noop_record_line): Remove.
4668         (dwarf_record_line_p): Add cu parameter.
4669         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4670         (lnp_state_machine::record_line)
4671         (lnp_state_machine::lnp_state_machine)
4672         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4673         (dwarf_decode_lines): Update.
4674         (dwarf2_start_subfile): Add cu parameter.
4675         (dwarf2_start_symtab, new_symbol): Update.
4676         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4677         Remove dwarf2_per_objfile parameter.
4678         (dwarf_decode_macros): Update.
4679
4680 2018-07-20  Tom Tromey  <tom@tromey.com>
4681
4682         * stabsread.c (define_symbol): Update.
4683         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4684         * dwarf2read.c (new_symbol): Update.
4685         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4686         * cp-namespace.c: Include buildsym.h.
4687         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4688         * buildsym-legacy.c (get_buildsym_compunit): New function.
4689
4690 2018-07-20  Tom Tromey  <tom@tromey.com>
4691
4692         * xcoffread.c: Include buildsym-legacy.h.
4693         * windows-nat.c: Include buildsym-legacy.h.
4694         * stabsread.c: Include buildsym-legacy.h.
4695         * mdebugread.c: Include buildsym-legacy.h.
4696         * buildsym-legacy.h: New file.
4697         * buildsym-legacy.c: New file, from buildsym.c.
4698         * go32-nat.c: Include buildsym-legacy.h.
4699         * dwarf2read.c: Include buildsym-legacy.h.
4700         * dbxread.c: Include buildsym-legacy.h.
4701         * cp-namespace.c: Include buildsym-legacy.h.
4702         * coffread.c: Include buildsym-legacy.h.
4703         * buildsym.h: Move some contents to buildsym-legacy.h.
4704         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4705         buildsym-legacy.c.
4706         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4707
4708 2018-07-20  Tom Tromey  <tom@tromey.com>
4709
4710         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4711         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4712         (buildsym_compunit::buildsym_compunit)
4713         (buildsym_compunit::~buildsym_compunit)
4714         (buildsym_compunit::get_macro_table): Define.
4715
4716 2018-07-20  Tom Tromey  <tom@tromey.com>
4717
4718         * buildsym.c (reset_symtab_globals): Remove.
4719         (buildsym_compunit::end_symtab_from_static_block): Update.
4720         (buildsym_compunit::augment_type_symtab): Update.
4721         (end_symtab_from_static_block): Call free_buildsym_compunit.
4722         (augment_type_symtab, end_symtab, end_expandable_symtab):
4723         Likewise.
4724
4725 2018-07-20  Tom Tromey  <tom@tromey.com>
4726
4727         * arch-utils.c: Do not include buildsym.h.
4728         * mipsread.c: Do not include buildsym.h.
4729         * machoread.c: Do not include buildsym.h.
4730         * elfread.c: Do not include buildsym.h.
4731
4732 2018-07-20  Tom Tromey  <tom@tromey.com>
4733
4734         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4735         initialization.
4736         (buildsym_compunit): Add new constructor.
4737         (struct buildsym_compunit) <get_last_source_file, finish_block,
4738         record_block_range, start_subfile, patch_subfile_names,
4739         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4740         set_last_source_start_addr, get_last_source_start_addr,
4741         get_local_using_directives, set_local_using_directives,
4742         get_global_using_directives, outermost_context_p,
4743         get_current_context_stack, get_context_stack_depth,
4744         get_current_subfile, get_local_symbols, get_file_symbols,
4745         get_global_symbols, record_debugformat, record_producer,
4746         push_context, pop_context, end_symtab_get_static_block,
4747         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4748         New public methods.
4749         <record_pending_block, finish_block_internal, make_blockvector,
4750         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4751         private methods.
4752         Update all users.
4753
4754 2018-05-22  Tom Tromey  <tom@tromey.com>
4755
4756         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4757         parameter.
4758         (finish_block_internal): Update.
4759
4760 2018-07-20  Tom Tromey  <tom@tromey.com>
4761
4762         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4763         parameter.
4764         (finish_block_internal): Update.
4765
4766 2018-07-20  Tom Tromey  <tom@tromey.com>
4767
4768         * buildsym.h (EXTERN): Don't define or undef.
4769         * buildsym.c (EXTERN): Don't define.
4770
4771 2018-07-20  Tom Tromey  <tom@tromey.com>
4772
4773         * buildsym.c: Remove TODO comment.
4774
4775 2018-07-20  Tom Tromey  <tom@tromey.com>
4776
4777         * coffread.c (coff_symtab_read): Update.
4778         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4779         (xcoff_new_init): Update.
4780         * mipsread.c (mipscoff_new_init): Update.
4781         * mdebugread.c (mdebug_build_psymtabs): Update.
4782         * elfread.c (elf_new_init): Update.
4783         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4784         Update.
4785         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4786         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4787         (stabsect_build_psymtabs): Update.
4788         * buildsym.h (buildsym_init): Don't declare.
4789         * buildsym.c: Update comment.
4790         (prepare_for_building): Remove.
4791         (start_symtab, restart_symtab): Update.
4792         (reset_symtab_globals): Update comment.
4793         (buildsym_init): Remove.
4794
4795 2018-07-20  Tom Tromey  <tom@tromey.com>
4796
4797         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4798         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4799         (read_enum_type, common_block_start, common_block_end)
4800         (cleanup_undefined_types_1, finish_global_stabs): Update.
4801         * mdebugread.c (psymtab_to_symtab_1): Update.
4802         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4803         (read_lexical_block_scope, new_symbol): Update.
4804         * dbxread.c (process_one_symbol): Update.
4805         * coffread.c (coff_symtab_read, process_coff_symbol)
4806         (coff_read_enum_type): Update.
4807         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4808         declare.
4809         (get_local_symbols, get_file_symbols, get_global_symbols): New
4810         functions.
4811         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4812         m_global_symbols.
4813         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4814         (~scoped_free_pendings): Update.
4815         (finish_block, prepare_for_building, reset_symtab_globals)
4816         (end_symtab_get_static_block, end_symtab_with_blockvector)
4817         (augment_type_symtab, push_context): Update.
4818         (get_local_symbols, get_file_symbols, get_global_symbols): New
4819         functions.
4820         (buildsym_init): Update.
4821
4822 2018-07-20  Tom Tromey  <tom@tromey.com>
4823
4824         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4825         (process_full_type_unit): Likewise.
4826         (dwarf2_start_symtab): Set list_in_scope.
4827
4828 2018-07-20  Tom Tromey  <tom@tromey.com>
4829
4830         * dwarf2read.c (process_psymtab_comp_unit_reader)
4831         (build_type_psymtabs_reader): Do not set list_in_scope.
4832
4833 2018-07-20  Tom Tromey  <tom@tromey.com>
4834
4835         * buildsym.c (free_pendings): Remove.
4836         (add_symbol_to_list, scoped_free_pendings)
4837         (finish_block_internal, buildsym_init): Update.
4838
4839 2018-07-20  Tom Tromey  <tom@tromey.com>
4840
4841         * xcoffread.c (read_xcoff_symtab): Update.
4842         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4843         Update.
4844         * dbxread.c (process_one_symbol): Update.
4845         * coffread.c (coff_symtab_read): Update.
4846         * buildsym.h (finish_block): Update.
4847         * buildsym.c (finish_block): Remove "listhead" argument.
4848         (end_symtab_get_static_block): Update.
4849
4850 2018-07-20  Tom Tromey  <tom@tromey.com>
4851
4852         * buildsym.h (class scoped_free_pendings): Remove constructor.
4853         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4854         method.
4855         <m_pending_block_obstack, m_pending_blocks>: New members.
4856         (pending_block_obstack, pending_blocks): Remove.
4857         (scoped_free_pendings::scoped_free_pendings): Default.
4858         (~scoped_free_pendings): Update.
4859         (free_pending_blocks): Remove.
4860         (finish_block_internal, record_pending_block, make_blockvector)
4861         (end_symtab_get_static_block, augment_type_symtab, push_context)
4862         (buildsym_init): Update.
4863
4864 2018-07-20  Tom Tromey  <tom@tromey.com>
4865
4866         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4867         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4868         members.
4869         (pending_addrmap, pending_addrmap_obstack)
4870         (pending_addrmap_interesting): Remove.
4871         (scoped_free_pendings, record_block_range, make_blockvector)
4872         (prepare_for_building, reset_symtab_globals, buildsym_init):
4873         Update.
4874
4875 2018-07-20  Tom Tromey  <tom@tromey.com>
4876
4877         * xcoffread.c (process_linenos): Update.
4878         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4879         * mdebugread.c (psymtab_to_symtab_1): Update.
4880         * dwarf2read.c (setup_type_unit_groups)
4881         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4882         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4883         * dbxread.c (process_one_symbol): Update.
4884         * coffread.c (coff_symtab_read, enter_linenos)
4885         (process_coff_symbol): Update.
4886         * buildsym.h (current_subfile): Don't declare.
4887         (get_current_subfile): Declare.
4888         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4889         member.
4890         (start_subfile, free_buildsym_compunit, push_subfile)
4891         (prepare_for_building, start_symtab): Update.
4892         (get_current_subfile): New function.
4893
4894 2018-07-20  Tom Tromey  <tom@tromey.com>
4895
4896         * coffread.c (coff_symtab_read): Update.
4897         * xcoffread.c (read_xcoff_symtab): Update.
4898         * dwarf2read.c (new_symbol): Update.
4899         (read_func_scope, read_lexical_block_scope): Update.
4900         * dbxread.c (process_one_symbol): Update.
4901         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4902         (outermost_context_p): Remove macro.
4903         (outermost_context_p, get_current_context_stack)
4904         (get_context_stack_depth): Declare.
4905         (pop_context): Return struct context_stack.
4906         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4907         member.
4908         (context_stack_size): Remove.
4909         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4910         (prepare_for_building, end_symtab_get_static_block)
4911         (augment_type_symtab, push_context): Update.
4912         (pop_context): Return struct context_stack.
4913         (outermost_context_p, get_current_context_stack)
4914         (get_context_stack_depth): New functions.
4915         (buildsym_init): Update.
4916
4917 2018-07-20  Tom Tromey  <tom@tromey.com>
4918
4919         * rust-exp.y: Now a pure parser.  Update all rules.
4920         (%union): Move earlier.
4921         (current_parser, work_obstack): Remove globals.
4922         (rust_parser, ~rust_parser): Update.
4923         (class rust_parser) <copy_name, concat3, crate_name, super_name,
4924         lex_character, lex_number, lex_string, lex_identifier,
4925         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4926         convert_name, convert_params_to_expression,
4927         convert_ast_to_expression, ast_basic_type, ast_operation,
4928         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4929         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4930         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4931         ast_array_type, ast_slice_type, ast_reference_type,
4932         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4933         (rust_parse): Update.
4934         (rustyyerror, rustyylex): Add parser parameter.
4935         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4936         (rust_lex_stringish_test, rust_lex_test_sequence)
4937         (rust_lex_test_trailing_dot, rust_lex_test_completion)
4938         (rust_lex_test_push_back, rust_lex_tests): Update.
4939
4940 2018-07-19  Pedro Alves  <palves@redhat.com>
4941
4942         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4943         gdb::unique_xmalloc_ptr.
4944         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4945         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4946         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4947         copy-initialization.
4948         * guile/scm-pretty-print.c (ppscm_print_children): Use
4949         gdb::unique_xmalloc_ptr instead of cleanups.
4950         (gdbscm_apply_val_pretty_printer): Remove cleanups.
4951         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4952         gdb::unique_xmalloc_ptr.
4953         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4954         Adjust to use gdb::unique_xmalloc_ptr.
4955         * guile/scm-utils.c (extract_arg): Adjust.
4956         * guile/scm-value.c (gdbscm_value_field): Adjust to use
4957         gdb::unique_xmalloc_ptr instead of a cleanup.
4958
4959 2018-07-19  Tom Tromey  <tom@tromey.com>
4960
4961         * utils.c (do_value_free_to_mark)
4962         (make_cleanup_value_free_to_mark): Remove.
4963         * utils.h (make_cleanup_value_free_to_mark): Remove.
4964
4965 2018-07-19  Pedro Alves  <palves@redhat.com>
4966
4967         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4968         forwarding reference.
4969
4970 2018-07-18  Pedro Alves  <palves@redhat.com>
4971
4972         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4973         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
4974         cleanup.
4975
4976 2018-07-18  Pedro Alves  <palves@redhat.com>
4977
4978         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4979         exceptions.
4980         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4981         (gdbscm_wrap): New.
4982         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4983         directly instead of a cleanup.
4984         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4985         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
4986         (vlscm_binop_gdbthrow): New, factored out from ...
4987         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
4988         (vlscm_rich_compare): Use gdbscm_wrap.
4989         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4990         instead of a cleanup.
4991         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4992         cleanup.
4993         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4994         Use xfree directly instead of a cleanup.
4995         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4996         Adjust to use gdbscm_wrap and scoped_value_mark.
4997         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4998         (gdbscm_value_address, gdbscm_value_dereference)
4999         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
5000         scoped_value_mark.
5001         (gdbscm_value_dynamic_type): Use scoped_value_mark.
5002         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
5003         scoped_value_mark.
5004         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
5005         gdbscm_wrap and scoped_value_mark.
5006         (gdbscm_value_to_string): Use xfree directly instead of a
5007         cleanup.  Move 'buffer' unique_ptr to TRY scope.
5008         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
5009         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
5010         scoped_value_mark.
5011         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
5012         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
5013         scoped_value_mark.
5014         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
5015         gdbscm_wrap.
5016
5017 2018-07-18  Tom de Vries  <tdevries@suse.de>
5018
5019         * findvar.c (default_read_var_value): Also resolve dynamic type for
5020         LOC_OPTIMIZED_OUT vars.
5021
5022 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
5023
5024         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
5025         decoding.
5026
5027 2018-07-17  Tom Tromey  <tom@tromey.com>
5028
5029         * guile/scm-param.c (pascm_set_func, pascm_show_func)
5030         (compute_enum_list, pascm_set_param_value_x)
5031         (gdbscm_parameter_value): Update.
5032         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
5033         (gdbscm_scm_to_host_string): Update.
5034         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
5035         Update.
5036         * guile/scm-cmd.c (cmdscm_add_completion): Update.
5037         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
5038         * guile/scm-string.c (gdbscm_scm_to_string): Return
5039         unique_xmalloc_ptr.
5040         (gdbscm_scm_to_host_string): Likewise.
5041
5042 2018-07-17  Tom Tromey  <tom@tromey.com>
5043
5044         * guile/guile.c (gdbscm_eval_from_control_command): Update.
5045         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
5046         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
5047         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
5048         unique_xmalloc_ptr.
5049
5050 2018-07-17  Tom Tromey  <tom@tromey.com>
5051
5052         * guile/scm-param.c (pascm_signal_setshow_error): Update.
5053         * guile/guile-internal.h (gdbscm_exception_message_to_string):
5054         Update.
5055         * guile/scm-cmd.c (cmdscm_function): Update.
5056         * guile/scm-pretty-print.c
5057         (ppscm_print_exception_unless_memory_error): Update.
5058         * guile/scm-exception.c (gdbscm_exception_message_to_string):
5059         Return unique_xmalloc_ptr.
5060
5061 2018-07-17  Tom Tromey  <tom@tromey.com>
5062
5063         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
5064         Use string_printf.
5065
5066 2018-07-17  Jim Wilson  <jimw@sifive.com>
5067
5068         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
5069         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
5070         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
5071         unecessary braces after EF_RISCV_RVC test.  Delete call to
5072         set_gdbarch_decr_pc_after_break.
5073
5074         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
5075         RISCV_LAST_FP_REGNUM + 1.
5076         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
5077
5078 2018-07-17  Tom Tromey  <tom@tromey.com>
5079
5080         * configure.ac: Remove --disable-gdbcli.
5081         * configure: Rebuild.
5082         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5083         (SUBDIR_CLI_CFLAGS): Remove.
5084         (SFILES): Use SUBDIR_CLI_SRCS.
5085         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5086
5087 2018-07-17  Tom Tromey  <tom@tromey.com>
5088
5089         PR gdb/18624:
5090         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5091
5092 2018-07-16  Jim Wilson  <jimw@sifive.com>
5093
5094         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5095
5096 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5097
5098         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5099         variable.
5100         (libunwind_frame_sniffer): Likewise.
5101         (libunwind_frame_prev_register): Likewise.
5102         (libunwind_sigtramp_frame_sniffer): Likewise.
5103         * ia64-tdep.c (ia64_access_reg): Likewise.
5104         (ia64_access_rse_reg): Likewise.
5105         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5106         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5107
5108 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5109
5110         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5111
5112 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5113
5114         * remote-sim.c (gdbsim_target::close,
5115         gdbsim_target::mourn_inferior): Remove unused variables.
5116
5117 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5118
5119         * ia64-tdep.c (ktab_buf): New global.
5120         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5121         (get_kernel_table): Adjust.
5122
5123 2018-07-16  Tom Tromey  <tom@tromey.com>
5124
5125         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5126         * dwarf2read.c (using_directives, new_symbol): Use
5127         outermost_context_p.
5128         * dbxread.c (process_one_symbol): Use outermost_context_p.
5129         * coffread.c (coff_symtab_read): Use outermost_context_p.
5130
5131 2018-07-16  Tom Tromey  <tom@tromey.com>
5132
5133         * dwarf2read.c (using_directives, read_func_scope)
5134         (read_lexical_block_scope): Update.
5135         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5136         * buildsym.h (local_using_directives, global_using_directives):
5137         Don't declare.
5138         (get_local_using_directives, set_local_using_directives)
5139         (get_global_using_directives): Declare.
5140         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5141         m_global_using_directives>: New members.
5142         (finish_block_internal, prepare_for_building)
5143         (reset_symtab_globals, end_symtab_get_static_block)
5144         (push_context): Update.
5145         (get_local_using_directives, set_local_using_directives)
5146         (get_global_using_directives): New functions.
5147         (buildsym_init): Update.
5148
5149 2018-07-16  Tom Tromey  <tom@tromey.com>
5150
5151         * xcoffread.c (xcoff_initial_scan): Don't call
5152         free_pending_blocks.
5153         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5154         * buildsym.h (class scoped_free_pendings): Add constructor.
5155         (free_pending_blocks): Don't declare.
5156         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5157         (free_pending_blocks): Now static.
5158
5159 2018-07-16  Tom Tromey  <tom@tromey.com>
5160
5161         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5162         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5163         member.
5164         (struct subfile_stack): Remove.
5165         (subfile_stack): Remove.
5166         (push_subfile, pop_subfile, buildsym_init): Update.
5167
5168 2018-07-16  Tom Tromey  <tom@tromey.com>
5169
5170         * buildsym.c (push_subfile): Use gdb_assert.
5171         (pop_subfile): Use gdb_assert.
5172
5173 2018-07-16  Tom Tromey  <tom@tromey.com>
5174
5175         * buildsym.h (merge_symbol_lists): Remove.
5176         * buildsym.c (merge_symbol_lists): Remove.
5177
5178 2018-07-16  Tom Tromey  <tom@tromey.com>
5179
5180         * stabsread.c (scan_file_globals): Update comment.
5181         * stabsread.h (scan_file_globals): Move from buildsym.h.
5182         * buildsym.h (scan_file_globals): Move to stabsread.h.
5183
5184 2018-07-16  Tom Tromey  <tom@tromey.com>
5185
5186         * xcoffread.c (xcoff_new_init): Update.
5187         * mipsread.c (mipscoff_new_init): Update.
5188         * mdebugread.c (mdebug_build_psymtabs): Update.
5189         * elfread.c (elf_new_init): Update.
5190         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5191         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5192         * buildsym.h (buildsym_new_init): Don't declare.
5193         * buildsym.c (buildsym_new_init): Remove.
5194
5195 2018-07-16  Tom Tromey  <tom@tromey.com>
5196
5197         * stabsread.h (within_function): Move from buildsym.h.
5198         * stabsread.c (start_stabs): Clear within_function.
5199         * coffread.c (coff_start_symtab): Clear within_function.
5200         * buildsym.h (within_function): Move to stabsread.h.
5201         * buildsym.c (prepare_for_building): Update.
5202
5203 2018-07-16  Tom Tromey  <tom@tromey.com>
5204
5205         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5206         * dwarf2read.c (dwarf2_start_symtab): Don't set
5207         processing_gcc_compilation.
5208         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5209
5210 2018-07-16  Tom Tromey  <tom@tromey.com>
5211
5212         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5213         (next_symbol_text_func): Move from buildsym.h.
5214         * stabsread.c (hashname): Move from buildsym.c.
5215         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5216         (next_symbol_text_func, hashname): Move to stabsread.h.
5217         * buildsym.c: Don't include bcache.h
5218         (hashname): Move to stasbread.c.
5219
5220 2018-07-16  Tom Tromey  <tom@tromey.com>
5221
5222         * buildsym.h (context_stack_size): Don't declare.
5223         * buildsym.c (context_stack_size): New global.
5224
5225 2018-07-16  Tom Tromey  <tom@tromey.com>
5226
5227         * dbxread.c (processing_acc_compilation): New global.
5228         * buildsym.h (processing_acc_compilation): Don't declare.
5229
5230 2018-07-16  Tom Tromey  <tom@tromey.com>
5231
5232         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5233         * dbxread.c (read_ofile_symtab): Update.
5234         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5235         * buildsym.h (last_source_start_addr): Remove.
5236         (set_last_source_start_addr, get_last_source_start_addr):
5237         Declare.
5238         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5239         parameter.
5240         (struct buildsym_compunit) <m_last_source_start_addr>: New
5241         member.
5242         (prepare_for_building): Remove start_addr parameter.
5243         (start_symtab, restart_symtab, end_symtab_get_static_block)
5244         (end_symtab_with_blockvector): Update.
5245         (set_last_source_start_addr, get_last_source_start_addr): New
5246         functions.
5247
5248 2018-07-16  Tom Tromey  <tom@tromey.com>
5249
5250         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5251         member.
5252         (have_line_numbers): Remove.
5253         (record_line, prepare_for_building, end_symtab_get_static_block)
5254         (augment_type_symtab): Update.
5255
5256 2018-07-16  Tom Tromey  <tom@tromey.com>
5257
5258         * buildsym.c (~buildsym_compunit): Free the macro table.
5259         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5260         methods.
5261         <m_pending_macros>: New member.
5262         (pending_macros): Remove.
5263         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5264         (reset_symtab_globals, end_symtab_get_static_block)
5265         (end_symtab_with_blockvector, augment_type_symtab)
5266         (buildsym_init): Update.
5267
5268 2018-07-16  Tom Tromey  <tom@tromey.com>
5269
5270         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5271         parameter.
5272         (buildsym_compunit::set_last_source_file): New method.
5273         <m_last_source_file>: New member.
5274         (prepare_for_building): Remove "name" parameter.
5275         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5276         (last_source_file): Remove.
5277         (set_last_source_file, get_last_source_file): Update.
5278
5279 2018-07-16  Tom Tromey  <tom@tromey.com>
5280
5281         * buildsym.c (prepare_for_building): Add assert.
5282
5283 2018-07-16  Tom Tromey  <tom@tromey.com>
5284
5285         * buildsym.c (~buildsym_compunit): Update.
5286         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5287         (start_subfile, patch_subfile_names)
5288         (end_symtab_with_blockvector): Update.
5289
5290 2018-07-16  Tom Tromey  <tom@tromey.com>
5291
5292         * buildsym.c (struct buildsym_compunit): Add constructor,
5293         destructor, initializers.
5294         (start_buildsym_compunit): Remove.
5295         (free_buildsym_compunit): Use "delete".
5296         (start_symtab, restart_symtab): Use "new".
5297
5298 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5299
5300         * symfile.c (set_objfile_default_section_offset): Remove struct
5301         keyword.
5302
5303 2018-07-14  Stafford Horne  <shorne@gmail.com>
5304
5305         * (Responsible Maintainers): Add myself as or1k maintainer.
5306
5307 2018-07-13  Tom Tromey  <tom@tromey.com>
5308
5309         * symfile.c (set_objfile_default_section_offset): Use extra braces
5310         around initializer.
5311
5312 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5313
5314         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5315         non-branching basr.
5316
5317 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5318
5319         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5320         unittests/cli-utils-selftests.c
5321         * unittests/cli-utils-selftests.c: New file.
5322
5323 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5324
5325         * NEWS: Mention new commands. Mention change to 'thread apply'.
5326
5327 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5328
5329         * thread.c (thr_try_catch_cmd): New function.
5330         (thread_apply_all_command): Handle qcs flags.
5331         (thread_apply_command): Handle qcs flags.
5332         (taas_command): New function.
5333         (tfaas_command): New function.
5334         (_initialize_thread): Update to setup the new commands 'taas
5335         and 'tfaas'. Change doc string for 'thread apply'.
5336
5337 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5338
5339         * stack.c: (trailing_outermost_frame): New function, mostly
5340         extracted from backtrace_command_1.
5341         (leading_innermost_frame): New function.
5342         (backtrace_command_1): Update to call trailing_outermost_frame.
5343         (frame_apply_command_count): New function.
5344         (frame_apply_level_command): New function.
5345         (frame_apply_all_command): New function.
5346         (frame_apply_command): New function.
5347         (faas_command): New function.
5348         (frame_cmd_list): New variable.
5349         (_initialize_stack): Update to setup the new commands 'frame apply'
5350         and 'faas'.
5351
5352 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5353
5354         * cli-utils.c (number_or_range_parser::get_number): Only handle
5355         numbers or convenience var as numbers.
5356         (parse_flags): New function.
5357         (parse_flags_qcs): New function.
5358         (number_or_range_parser::finished): Ensure parsing end is detected
5359         before end of string.
5360         * cli-utils.h (parse_flags): New function.
5361         (parse_flags_qcs): New function.
5362         (number_or_range_parser): Remove m_finished bool.
5363         (number_or_range_parser::skip_range): Set m_in_range to false.
5364
5365 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5366
5367         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5368         on Windows.
5369
5370 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5371             Jan Kratochvil  <jan.kratochvil@redhat.com>
5372             Paul Fertser  <fercerpav@gmail.com>
5373             Tsutomu Seki  <sekiriki@gmail.com>
5374             Pedro Alves  <palves@redhat.com>
5375
5376         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5377         'unittests/parse-connection-spec-selftests.c'.
5378         (COMMON_SFILES): Add 'common/netstuff.c'.
5379         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5380         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5381         * common/netstuff.c: New file.
5382         * common/netstuff.h: New file.
5383         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5384         (wait_for_connect): Update comment.  New parameter
5385         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5386         Use 'sock' directly instead of 'scb->fd'.
5387         (try_connect): New function, with code from 'net_open'.
5388         (net_open): Rewrite main loop to deal with multiple
5389         sockets/addresses.  Handle IPv6-style hostnames; implement
5390         support for IPv6 connections.
5391         * unittests/parse-connection-spec-selftests.c: New file.
5392
5393 2018-07-11  Pedro Alves  <palves@redhat.com>
5394
5395         PR gdb/23377
5396         * remote.c (remote_target::remote_detach_pid): Call
5397         set_current_process.
5398
5399 2018-07-11  Pedro Alves  <palves@redhat.com>
5400
5401         * h8300-tdep.c (h8300_gdbarch_init): Remove
5402         set_gdbarch_ecoff_reg_to_regnum calls.
5403
5404 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5405
5406         PR c++/23373
5407         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5408         offsets/sizes for static members of a class/struct.
5409
5410 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5411
5412         * target-descriptions.c (tdesc_register_bitsize): Rename.
5413         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5414         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5415         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5416
5417 2018-07-10  Tom Tromey  <tom@tromey.com>
5418
5419         * breakpoint.c (moribund_locations): Now static and a
5420         std::vector.
5421         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5422         (build_bpstat_chain, update_global_location_list)
5423         (breakpoint_retire_moribund): Update.
5424         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5425         VEC.
5426
5427 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5428
5429         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5430         (riscv_register_reggroup_p): Use new function, remove unneeded
5431         parenthesis.
5432         (riscv_push_dummy_call): Extend assert to compare against xlen or
5433         flen based on register type.
5434
5435 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5436
5437         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5438
5439 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5440
5441         * remote.c (show_hardware_watchpoint_limit): New function.
5442         (show_hardware_watchpoint_length_limit): New function.
5443         (show_hardware_breakpoint_limit): New function.
5444         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5445         where appropriate, update help text.
5446
5447 2018-07-09  Tom Tromey  <tom@tromey.com>
5448
5449         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5450         (CLIBS): Don't mention NAT_CLIBS.
5451
5452 2018-07-09  Tom Tromey  <tom@tromey.com>
5453
5454         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5455         (LIBGDB_OBS, clean mostlyclean): Update.
5456         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5457
5458 2018-07-09  Tom Tromey  <tom@tromey.com>
5459
5460         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5461         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5462         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5463
5464 2018-07-09  Tom Tromey  <tom@tromey.com>
5465
5466         * Makefile.in (ALLDEPFILES): Remove exec.c.
5467         (COMMON_OBS): Remove exec.o.
5468         (COMMON_SFILES): Add exec.c.
5469
5470 2018-07-09  Tom Tromey  <tom@tromey.com>
5471
5472         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5473
5474 2018-07-09  Tom Tromey  <tom@tromey.com>
5475
5476         * Makefile.in (clean mostlyclean): Remove stamp-version.
5477         (version.c): Depend on stamp-version.
5478         (stamp-version): New rule, from version.c rule.
5479
5480 2018-07-09  Tom Tromey  <tom@tromey.com>
5481
5482         * Makefile.in (init.c): Depend on stamp-init.
5483         (stamp-init): New rule, from init.c rule.
5484         (clean mostlyclean): Remove stamp-init.
5485
5486 2018-07-09  Tom Tromey  <tom@tromey.com>
5487
5488         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5489         SUBDIR_GCC_COMPILE_SRCS.
5490
5491 2018-07-09  Tom Tromey  <tom@tromey.com>
5492
5493         * Makefile.in (init.c): Remove some unused sed rules.
5494
5495 2018-07-09  Tom Tromey  <tom@tromey.com>
5496
5497         * Makefile.in (TSOBS): Remove.
5498         (INIT_FILES): Update.
5499         (LIBGDB_OBS): Update.
5500         (COMMON_SFILES): Add inflow.c.
5501         (SFILES): Remove inflow.c.
5502
5503 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5504
5505         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5506
5507 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5508
5509         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5510         get_saveloc_name, is_signal_frame_name, step_name,
5511         init_remote_name, create_addr_space_name,
5512         destroy_addr_space_name, search_unwind_table_name,
5513         find_dyn_list_name): Constify.
5514
5515 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5516
5517         * darwin-nat.c (darwin_pthread_kill): New function.
5518         (darwin_resume_thread): Use darwin_pthread_kill.
5519
5520 2018-07-05  Tom de Vries  <tdevries@suse.de>
5521
5522         * macroexp.c (macro_buffer) <operator=>: New member function.
5523
5524 2018-07-04  Tom Tromey  <tom@tromey.com>
5525
5526         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5527
5528 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5529
5530         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5531         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5532         * maint.c: Likewise.
5533         * top.c: Likewise.
5534
5535 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5536
5537         * NEWS: Create a new section for the next release branch.
5538         Rename the section of the current branch, now that it has
5539         been cut.
5540
5541 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5542
5543         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5544         * version.in: Bump version to 8.2.50.DATE-git.
5545
5546 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5547             Pedro Alves  <palves@redhat.com>
5548
5549         * linux-nat.c (linux_init_ptrace): Rename to ...
5550         (linux_init_ptrace_procfs): ... this.  Call
5551         linux_proc_init_warnings.
5552         (linux_nat_target::post_attach)
5553         (linux_nat_target::post_startup_inferior): Adjust.
5554         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5555         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5556
5557 2018-07-04  Tom de Vries  <tdevries@suse.de>
5558
5559         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5560         check ...
5561         (read_comp_unit_head): ... here.
5562
5563 2018-07-03  Tom Tromey  <tom@tromey.com>
5564
5565         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5566         (stop_tracing, tstatus_command)
5567         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5568         (print_one_static_tracepoint_marker): Update.
5569         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5570         std::vector.
5571         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5572         VEC.
5573         (all_tracepoints, static_tracepoints_here): Return std::vector.
5574
5575 2018-07-03  Tom Tromey  <tom@tromey.com>
5576
5577         * common/ptid.c (ptid_equal): Remove.
5578         * common/ptid.h (ptid_equal): Don't declare.
5579         * ada-tasks.c: Update.
5580         * breakpoint.c: Update.
5581         * common/agent.c: Update.
5582         * corelow.c: Update.
5583         * darwin-nat-info.c: Update.
5584         * darwin-nat.c: Update.
5585         * dcache.c: Update.
5586         * dtrace-probe.c: Update.
5587         * dummy-frame.c: Update.
5588         * fbsd-nat.c: Update.
5589         * frame.c: Update.
5590         * gdbthread.h: Update.
5591         * gnu-nat.c: Update.
5592         * go32-nat.c: Update.
5593         * inf-loop.c: Update.
5594         * inf-ptrace.c: Update.
5595         * infcall.c: Update.
5596         * infcmd.c: Update.
5597         * inflow.c: Update.
5598         * infrun.c: Update.
5599         * linux-fork.c: Update.
5600         * linux-nat.c: Update.
5601         * linux-thread-db.c: Update.
5602         * mi/mi-cmd-var.c: Update.
5603         * mi/mi-interp.c: Update.
5604         * mi/mi-main.c: Update.
5605         * nto-procfs.c: Update.
5606         * ppc-linux-tdep.c: Update.
5607         * procfs.c: Update.
5608         * python/py-inferior.c: Update.
5609         * python/py-record-btrace.c: Update.
5610         * python/py-record.c: Update.
5611         * ravenscar-thread.c: Update.
5612         * regcache.c: Update.
5613         * remote-sim.c: Update.
5614         * remote.c: Update.
5615         * sol-thread.c: Update.
5616         * solib.c: Update.
5617         * target.c: Update.
5618         * tui/tui-stack.c: Update.
5619         * varobj.c: Update.
5620         * windows-nat.c: Update.
5621         * windows-tdep.c: Update.
5622
5623 2018-07-03  Tom Tromey  <tom@tromey.com>
5624
5625         * common/ptid.c (ptid_match): Remove.
5626         * common/ptid.h (ptid_match): Don't declare.
5627         * fbsd-nat.c: Update.
5628         * infcmd.c: Update.
5629         * infrun.c: Update.
5630         * linux-nat.c: Update.
5631         * record-btrace.c: Update.
5632         * regcache.c: Update.
5633         * remote.c: Update.
5634
5635 2018-07-03  Tom Tromey  <tom@tromey.com>
5636
5637         * common/ptid.c (ptid_tid_p): Remove.
5638         * common/ptid.h (ptid_tid_p): Don't declare.
5639         * sol-thread.c: Update.
5640
5641 2018-07-03  Tom Tromey  <tom@tromey.com>
5642
5643         * common/ptid.c (ptid_lwp_p): Remove.
5644         * common/ptid.h (ptid_lwp_p): Don't declare.
5645         * fbsd-nat.c: Update.
5646         * linux-nat.c: Update.
5647         * nat/linux-procfs.c: Update.
5648         * nat/x86-linux-dregs.c: Update.
5649         * sol-thread.c: Update.
5650
5651 2018-07-03  Tom Tromey  <tom@tromey.com>
5652
5653         * common/ptid.c (ptid_is_pid): Remove.
5654         * common/ptid.h (ptid_is_pid): Don't declare.
5655         * infrun.c: Update.
5656         * linux-nat.c: Update.
5657         * mi/mi-interp.c: Update.
5658         * remote.c: Update.
5659         * thread.c: Update.
5660
5661 2018-07-03  Tom Tromey  <tom@tromey.com>
5662
5663         * common/ptid.c (ptid_get_tid): Remove.
5664         * common/ptid.h (ptid_get_tid): Don't declare.
5665         * ada-tasks.c: Update.
5666         * aix-thread.c: Update.
5667         * bsd-uthread.c: Update.
5668         * darwin-nat.c: Update.
5669         * fbsd-nat.c: Update.
5670         * i386-darwin-nat.c: Update.
5671         * infrun.c: Update.
5672         * linux-tdep.c: Update.
5673         * nto-procfs.c: Update.
5674         * ppc-ravenscar-thread.c: Update.
5675         * python/py-infthread.c: Update.
5676         * ravenscar-thread.c: Update.
5677         * sol-thread.c: Update.
5678         * sparc-ravenscar-thread.c: Update.
5679         * windows-nat.c: Update.
5680
5681 2018-07-03  Tom Tromey  <tom@tromey.com>
5682
5683         * common/ptid.c (ptid_get_lwp): Remove.
5684         * common/ptid.h (ptid_get_lwp): Don't declare.
5685         * aarch64-linux-nat.c: Update.
5686         * ada-tasks.c: Update.
5687         * aix-thread.c: Update.
5688         * amd64-linux-nat.c: Update.
5689         * arm-linux-nat.c: Update.
5690         * corelow.c: Update.
5691         * fbsd-nat.c: Update.
5692         * fbsd-tdep.c: Update.
5693         * gnu-nat.c: Update.
5694         * i386-cygwin-tdep.c: Update.
5695         * i386-gnu-nat.c: Update.
5696         * i386-linux-nat.c: Update.
5697         * ia64-linux-nat.c: Update.
5698         * inf-ptrace.c: Update.
5699         * infrun.c: Update.
5700         * linux-fork.c: Update.
5701         * linux-nat.c: Update.
5702         * linux-tdep.c: Update.
5703         * linux-thread-db.c: Update.
5704         * mips-linux-nat.c: Update.
5705         * nat/aarch64-linux-hw-point.c: Update.
5706         * nat/aarch64-linux.c: Update.
5707         * nat/linux-btrace.c: Update.
5708         * nat/linux-osdata.c: Update.
5709         * nat/linux-procfs.c: Update.
5710         * nat/x86-linux-dregs.c: Update.
5711         * obsd-nat.c: Update.
5712         * ppc-fbsd-nat.c: Update.
5713         * ppc-linux-nat.c: Update.
5714         * procfs.c: Update.
5715         * python/py-infthread.c: Update.
5716         * ravenscar-thread.c: Update.
5717         * remote.c: Update.
5718         * s390-linux-nat.c: Update.
5719         * sol-thread.c: Update.
5720         * sol2-tdep.c: Update.
5721         * spu-linux-nat.c: Update.
5722         * x86-linux-nat.c: Update.
5723         * xtensa-linux-nat.c: Update.
5724
5725 2018-07-03  Tom Tromey  <tom@tromey.com>
5726
5727         * common/ptid.c (ptid_get_pid): Remove.
5728         * common/ptid.h (ptid_get_pid): Don't declare.
5729         * aarch64-linux-nat.c: Update.
5730         * ada-lang.c: Update.
5731         * aix-thread.c: Update.
5732         * alpha-bsd-nat.c: Update.
5733         * amd64-fbsd-nat.c: Update.
5734         * amd64-linux-nat.c: Update.
5735         * arm-linux-nat.c: Update.
5736         * arm-nbsd-nat.c: Update.
5737         * auxv.c: Update.
5738         * break-catch-syscall.c: Update.
5739         * breakpoint.c: Update.
5740         * bsd-uthread.c: Update.
5741         * corelow.c: Update.
5742         * ctf.c: Update.
5743         * darwin-nat.c: Update.
5744         * fbsd-nat.c: Update.
5745         * fbsd-tdep.c: Update.
5746         * gcore.c: Update.
5747         * gnu-nat.c: Update.
5748         * hppa-nbsd-nat.c: Update.
5749         * hppa-obsd-nat.c: Update.
5750         * i386-fbsd-nat.c: Update.
5751         * ia64-linux-nat.c: Update.
5752         * inf-ptrace.c: Update.
5753         * infcmd.c: Update.
5754         * inferior.c: Update.
5755         * inferior.h: Update.
5756         * inflow.c: Update.
5757         * infrun.c: Update.
5758         * linux-fork.c: Update.
5759         * linux-nat.c: Update.
5760         * linux-tdep.c: Update.
5761         * linux-thread-db.c: Update.
5762         * m68k-bsd-nat.c: Update.
5763         * mi/mi-interp.c: Update.
5764         * mi/mi-main.c: Update.
5765         * mips-linux-nat.c: Update.
5766         * mips-nbsd-nat.c: Update.
5767         * mips64-obsd-nat.c: Update.
5768         * nat/aarch64-linux-hw-point.c: Update.
5769         * nat/aarch64-linux.c: Update.
5770         * nat/linux-btrace.c: Update.
5771         * nat/linux-osdata.c: Update.
5772         * nat/linux-procfs.c: Update.
5773         * nat/x86-linux-dregs.c: Update.
5774         * nto-procfs.c: Update.
5775         * obsd-nat.c: Update.
5776         * ppc-linux-nat.c: Update.
5777         * ppc-nbsd-nat.c: Update.
5778         * ppc-obsd-nat.c: Update.
5779         * proc-service.c: Update.
5780         * procfs.c: Update.
5781         * python/py-inferior.c: Update.
5782         * python/py-infthread.c: Update.
5783         * ravenscar-thread.c: Update.
5784         * record.c: Update.
5785         * remote-sim.c: Update.
5786         * remote.c: Update.
5787         * rs6000-nat.c: Update.
5788         * s390-linux-nat.c: Update.
5789         * sh-nbsd-nat.c: Update.
5790         * sol-thread.c: Update.
5791         * sparc-nat.c: Update.
5792         * sparc64-tdep.c: Update.
5793         * spu-linux-nat.c: Update.
5794         * spu-tdep.c: Update.
5795         * target-debug.h: Update.
5796         * target.c: Update.
5797         * thread.c: Update.
5798         * tid-parse.c: Update.
5799         * tracefile-tfile.c: Update.
5800         * vax-bsd-nat.c: Update.
5801         * windows-nat.c: Update.
5802         * x86-linux-nat.c: Update.
5803         * x86-nat.c: Update.
5804
5805 2018-07-03  Tom Tromey  <tom@tromey.com>
5806
5807         * common/ptid.c (pid_to_ptid): Remove.
5808         * common/ptid.h (pid_to_ptid): Don't declare.
5809         * aix-thread.c: Update.
5810         * arm-linux-nat.c: Update.
5811         * common/ptid.c: Update.
5812         * common/ptid.h: Update.
5813         * corelow.c: Update.
5814         * ctf.c: Update.
5815         * darwin-nat.c: Update.
5816         * fbsd-nat.c: Update.
5817         * fork-child.c: Update.
5818         * gnu-nat.c: Update.
5819         * go32-nat.c: Update.
5820         * inf-ptrace.c: Update.
5821         * infcmd.c: Update.
5822         * inferior.c: Update.
5823         * infrun.c: Update.
5824         * linux-fork.c: Update.
5825         * linux-nat.c: Update.
5826         * nat/aarch64-linux-hw-point.c: Update.
5827         * nat/fork-inferior.c: Update.
5828         * nat/x86-linux-dregs.c: Update.
5829         * nto-procfs.c: Update.
5830         * obsd-nat.c: Update.
5831         * procfs.c: Update.
5832         * progspace.c: Update.
5833         * remote.c: Update.
5834         * rs6000-nat.c: Update.
5835         * s390-linux-nat.c: Update.
5836         * sol-thread.c: Update.
5837         * spu-linux-nat.c: Update.
5838         * target.c: Update.
5839         * top.c: Update.
5840         * tracefile-tfile.c: Update.
5841         * windows-nat.c: Update.
5842
5843 2018-07-03  Tom Tromey  <tom@tromey.com>
5844
5845         * common/ptid.h (ptid_build): Don't declare.
5846         * common/ptid.c (ptid_build): Remove.
5847         * aix-thread.c: Update.
5848         * bsd-kvm.c: Update.
5849         * bsd-uthread.c: Update.
5850         * common/agent.c: Update.
5851         * common/ptid.c: Update.
5852         * common/ptid.h: Update.
5853         * corelow.c: Update.
5854         * darwin-nat.c: Update.
5855         * fbsd-nat.c: Update.
5856         * gnu-nat.c: Update.
5857         * linux-fork.c: Update.
5858         * linux-nat.c: Update.
5859         * linux-thread-db.c: Update.
5860         * nat/linux-osdata.c: Update.
5861         * nat/linux-procfs.c: Update.
5862         * nto-procfs.c: Update.
5863         * obsd-nat.c: Update.
5864         * proc-service.c: Update.
5865         * procfs.c: Update.
5866         * ravenscar-thread.c: Update.
5867         * remote-sim.c: Update.
5868         * remote.c: Update.
5869         * sol-thread.c: Update.
5870         * target.c: Update.
5871         * windows-nat.c: Update.
5872
5873 2018-07-03  Tom Tromey  <tom@tromey.com>
5874
5875         * infrun.c (follow_exec): Use exit_inferior_silent.
5876         * inferior.c (exit_inferior_num_silent): Remove.
5877         * inferior.h (exit_inferior_num_silent): Don't declare.
5878
5879 2018-07-03  Tom Tromey  <tom@tromey.com>
5880
5881         PR cli/23340:
5882         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5883         inferior_ptid on error.
5884
5885 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5886             Simon Marchi  <simon.marchi@polymtl.ca>
5887
5888         PR tdep/8282
5889         * disasm.h (gdb_disassembler): Add
5890         `m_disassembler_options_holder'. member
5891         * disasm.c (get_all_disassembler_options): New function.
5892         (gdb_disassembler::gdb_disassembler): Use it.
5893         (gdb_buffered_insn_length_init_dis): Likewise.
5894         (gdb_buffered_insn_length): Adjust accordingly.
5895         (set_disassembler_options): Handle options with arguments.
5896         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5897         line if showing options with descriptions.
5898         (disassembler_options_completer): Adapt to using the
5899         `disasm_options_and_args_t' structure.
5900         * mips-tdep.c (mips_disassembler_options): New variable.
5901         (mips_disassembler_options_o32): Likewise.
5902         (mips_disassembler_options_n32): Likewise.
5903         (mips_disassembler_options_n64): Likewise.
5904         (gdb_print_insn_mips): Don't set `disassembler_options'.
5905         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5906         functions.
5907         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5908         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5909         `gdbarch_disassembler_options_implicit' and
5910         `gdbarch_valid_disassembler_options'.
5911         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5912         `disasm_options_and_args_t' structure.
5913         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5914         method.
5915         (valid_disassembler_options): Switch from `disasm_options_t' to
5916         the `disasm_options_and_args_t' structure.
5917         * NEWS: Document `set disassembler-options' support for the MIPS
5918         target.
5919         * gdbarch.h: Regenerate.
5920         * gdbarch.c: Regenerate.
5921
5922 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5923
5924         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5925
5926 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
5927
5928         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5929         parameter in call to amd64_target_description.
5930         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5931         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5932         (amd64fbsd_init_abi): Likewise.
5933         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5934         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5935         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5936         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5937
5938 2018-06-29  Pedro Alves  <palves@redhat.com>
5939
5940         * gdb/amd64-tdep.h (amd64_create_target_description): Add
5941         "segments" parameter.
5942         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5943         (_initialize_amd64_tdep): Update call to
5944         amd64_create_target_description.
5945         (amd64_target_description): Add "segments" parameter.  Adjust
5946         the implementation to use it.
5947         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5948         call to amd64_create_target_description.
5949         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5950         * gdb/arch/amd64.h (amd64_create_target_description): Add
5951         "segments" register.
5952         * gdb/arch/amd64.c (amd64_create_target_description): Add
5953         "segments" parameter.  Call create_feature_i386_64bit_segments
5954         only if SEGMENTS is true.
5955         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5956         call to amd64_create_target_description.
5957
5958 2018-06-29  Pedro Alves  <palves@redhat.com>
5959
5960         * thread.c (thread_target_id_str): New, factored out from ...
5961         (print_thread_info_1): ... here.  Use it to compute the max
5962         "Target Id" column width.
5963
5964 2018-06-29  Pedro Alves  <palves@redhat.com>
5965
5966         * remote.c (remote_target::extra_thread_info): Delete
5967         'display_buf' and 'n' locals.  from the cache, regardless of
5968         packet mechanims is in use.  Use cache for qThreadExtra and qP
5969         methods too.
5970
5971 2018-06-29  Pedro Alves  <palves@redhat.com>
5972
5973         * blockframe.c (find_pc_sect_containing_function): New function.
5974         * breakpoint.c (print_breakpoint_location): Don't call
5975         find_pc_sect_function.
5976         * linespec.c (create_sals_line_offset): Record the location's
5977         symbol in the sal.
5978         * linespec.c (convert_address_location_to_sals): Fill in sal's
5979         symbol with find_pc_sect_containing_function.
5980         * symtab.c (find_function_start_sal): Rename to ...
5981         (find_function_start_sal_1): ... this.
5982         (find_function_start_sal): Reimplement as wrapper around
5983         find_function_start_sal_1, and use
5984         find_pc_sect_containing_function to fill in the sal's symbol.
5985         (find_function_start_sal(symbol*, bool)): Adjust.
5986         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5987         comments.
5988         (find_pc_sect_containing_function): Declare.
5989
5990 2018-06-29  Pedro Alves  <palves@redhat.com>
5991
5992         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5993         true if the the location has no symbol.
5994
5995 2018-06-28  Tom Tromey  <tom@tromey.com>
5996
5997         * NEWS: Mention --enable-codesign.
5998         * silent-rules.mk (ECHO_SIGN): New variable.
5999         * configure.ac: Add --enable-codesign.
6000         * configure: Rebuild.
6001         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
6002         (gdb$(EXEEXT)): Optionally invoke codesign.
6003
6004 2018-06-28  Pedro Alves  <palves@redhat.com>
6005
6006         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
6007         comments.
6008         (switch_to_thread_no_regs): Adjust comment.
6009         * infcmd.c (stop_pc): Delete.
6010         (post_create_inferior, info_program_command): Replace references
6011         to stop_pc with references to thread_info->suspend.stop_pc.
6012         * inferior.h (stop_pc): Delete declaration.
6013         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
6014         (handle_inferior_event_1, handle_signal_stop)
6015         (process_event_stop_test, keep_going_stepped_thread)
6016         (handle_step_into_function, handle_step_into_function_backward)
6017         (print_stop_location): Replace references to stop_pc with
6018         references to thread_info->suspend.stop_pc.
6019         (struct infcall_suspend_state) <stop_pc>: Delete field.
6020         (save_infcall_suspend_state, restore_infcall_suspend_state):
6021         Remove references to inf_stat->stop_pc.
6022         * linux-fork.c (fork_load_infrun_state): Likewise.
6023         * record-btrace.c (record_btrace_set_replay): Likewise.
6024         * record-full.c (record_full_goto_entry): Likewise.
6025         * remote.c (print_one_stopped_thread): Likewise.
6026         * target.c (target_resume): Extend comment.
6027         * thread.c (set_executing_thread): New.
6028         (set_executing): Use it.
6029         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
6030         Remove references to stop_pc.
6031
6032 2018-06-28  Pedro Alves  <palves@redhat.com>
6033
6034         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
6035         Moving fetching stop_pc until after ecs->event_thread is refreshed.
6036
6037 2018-06-28  Tom Tromey  <tom@tromey.com>
6038
6039         * coffread.c (coff_symfile_finish): Update.
6040         * xcoffread.c (xcoff_symfile_finish): Update.
6041         * elfread.c (elf_symfile_finish): Update.
6042         * symfile.h (dwarf2_free_objfile): Don't declare.
6043         * dwarf2read.c (_initialize_dwarf2_read): Use
6044         register_objfile_data_with_cleanup.
6045         (dwarf2_free_objfile): Now static.  Change signature.
6046
6047 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6048
6049         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
6050         option "-o" to add-symbol-file-load to add an offset to each
6051         section's load address.
6052         * symfile.c (set_objfile_default_section_offset): New function.
6053
6054 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6055
6056         * symfile.c (add_symbol_file_command): Make sure that sections
6057         with the same name are sorted in the same order.
6058
6059 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6060
6061         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
6062         require the second argument.  If omitted, load sections at the
6063         addresses specified in the file.
6064
6065 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6066
6067         * symfile.c (symbol_file_command, symbol_file_add_main_1)
6068         (_initialize_symfile): Add option "-o" to symbol-file to add an
6069         offset to each section of the symbol file.
6070
6071 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
6072
6073         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
6074
6075 2018-06-27  Tom Tromey  <tom@tromey.com>
6076
6077         * stack.c (_initialize_stack): Update "func" help text.
6078
6079 2018-06-27  Tom Tromey  <tom@tromey.com>
6080
6081         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6082         std::vector.
6083         (unwind_infopy_str, pyuw_create_unwind_info)
6084         (unwind_infopy_add_saved_register, pyuw_sniffer)
6085         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6086         Update.
6087         (struct saved_reg): Add constructor.
6088         <value>: Now a gdbpy_ref<>.
6089
6090 2018-06-27  Tom Tromey  <tom@tromey.com>
6091
6092         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6093
6094 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6095
6096         * gdb-gdb.py.in: Format using autopep8.
6097
6098 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6099
6100         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6101         (type_lookup_function): Recognize CORE_ADDR values.
6102
6103 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6104
6105         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6106         print tag_name.
6107
6108 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6109
6110         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6111         <__lt__>: Add.
6112
6113 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6114
6115         * gdb-gdb.py: Move to...
6116         * gdb-gdb.py.in: ... here.
6117         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6118         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6119         dependencies.
6120         (distclean): Remove gdb-gdb.py when cleaning.
6121         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6122         * configure: Re-generate.
6123
6124 2018-06-27  Pedro Alves  <palves@redhat.com>
6125
6126         * proc-service.c (get_ps_regcache): New.
6127         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6128         (ps_lsetfpregs): Use it.
6129
6130 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6131
6132         PR gdb/21695
6133         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6134         (dwarf_decode_lines_1): Adjust.
6135
6136 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6137
6138         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6139         override.
6140         <info_proc>: Likewise.
6141
6142 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6143
6144         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6145         to windows_fetch_one_register, and only handle the case of
6146         fetching one register.  Move the code that reloads the context
6147         and iterates over all registers if R is negative to...
6148         (windows_nat_target::fetch_registers): ... here.
6149         (do_windows_store_inferior_registers): Rename to
6150         windows_store_one_register, and only handle the case of storing
6151         one register.  Move the code that handles the case where r is
6152         negative to...
6153         (windows_nat_target::store_registers) ... here.
6154
6155 2018-06-26  Tom Tromey  <tom@tromey.com>
6156
6157         PR rust/22574:
6158         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6159         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6160         Update.
6161         (rust_internal_print_type): Add podata parameter.
6162         (rust_print_type): Update.
6163
6164 2018-06-26  Tom Tromey  <tom@tromey.com>
6165
6166         * typeprint.h (struct print_offset_data) <update, finish,
6167         maybe_print_hole>: New methods.
6168         <indentation>: New constant.
6169         * typeprint.c (print_offset_data::indentation): Define.
6170         (print_offset_data::maybe_print_hole, print_offset_data::update)
6171         (print_offset_data::finish): Move from c-typeprint.c and rename.
6172         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6173         (print_spaces_filtered_with_print_options): Update.
6174         (c_print_type_union_field_offset, maybe_print_hole)
6175         (c_print_type_struct_field_offset): Move to typeprint.c and
6176         rename.
6177         (c_type_print_base_struct_union): Update.
6178
6179 2018-06-25  Pedro Alves  <palves@redhat.com>
6180
6181         * gdbthread.h (thread_info_ref, delete_thread)
6182         (delete_thread_silent, first_thread_of_inferior)
6183         (any_thread_of_inferior, switch_to_thread)
6184         (enable_thread_stack_temporaries)
6185         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6186         (get_last_thread_stack_temporary)
6187         (value_in_thread_stack_temporaries, can_access_registers_thread):
6188         Spell out "struct thread_info" instead of just "thread_info".
6189         * inferior.h (notice_new_inferior): Likewise.
6190
6191 2018-06-25  Pedro Alves  <palves@redhat.com>
6192
6193         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6194         pass thread_info pointer to delete_thread.
6195         (windows_nat_target::detach): Pass inferior pointer to
6196         detach_inferior.
6197         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6198         delete_thread.
6199         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6200         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6201         and pass a thread_info pointer to delete_thread.
6202         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6203         pass thread_info pointer to delete_thread.
6204         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6205         delete_thread_silent call.
6206         * procfs.c (procfs_target::detach): Pass inferior pointer to
6207         detach_inferior.
6208         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6209         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6210         delete_thread_silent call.
6211         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6212         pass thread_info pointer to delete_thread.
6213         (windows_nat_target::detach): Pass inferior pointer to
6214         delete_inferior.
6215
6216 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6217
6218         * regcache.c (readable_regcache::read_part): Fix asserts.
6219         (reg_buffer::raw_collect_part): New function.
6220         (regcache::write_part): Fix asserts.
6221         (reg_buffer::raw_supply_part): New function.
6222         (regcache::transfer_regset_register): New helper function.
6223         (regcache::transfer_regset): Call new functions.
6224         (regcache_supply_regset): Use gdb_byte*.
6225         (regcache::supply_regset): Likewise.
6226         (regcache_collect_regset): Likewise.
6227         (regcache::collect_regset): Likewise.
6228         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6229         (reg_buffer::raw_supply_part): Likewise.
6230         (regcache::transfer_regset_register): Likewise.
6231         (regcache::transfer_regset): Use gdb_byte*.
6232
6233 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6234
6235         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6236
6237 2018-06-21  Pedro Alves  <palves@redhat.com>
6238
6239         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6240         instead of a ptid_t.  All callers adjusted.
6241         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6242         adjusted.
6243         (print_ada_task_info, display_current_task_id, task_command_1):
6244         Adjust.
6245         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6246         inferior_thread.
6247         (breakpoint_kind): Adjust.
6248         (remove_breakpoints_pid): Rename to ...
6249         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6250         pointer.  All callers adjusted.
6251         (bpstat_clear_actions): Use inferior_thread.
6252         (get_bpstat_thread): New.
6253         (bpstat_do_actions): Use it.
6254         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6255         to take a thread_info pointer.  All callers adjusted.
6256         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6257         (breakpoint_re_set_thread): Use inferior_thread.
6258         * breakpoint.h (struct inferior): Forward declare.
6259         (bpstat_stop_status): Update.
6260         (remove_breakpoints_pid): Delete.
6261         (remove_breakpoints_inf): New.
6262         * bsd-uthread.c (bsd_uthread_target::wait)
6263         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6264         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6265         (maint_btrace_packet_history_cmd)
6266         (maint_btrace_clear_packet_history_cmd): Adjust.
6267         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6268         inferior_thread.
6269         * cli/cli-interp.c: Include "inferior.h".
6270         * common/refcounted-object.h (struct
6271         refcounted_object_ref_policy): New.
6272         * compile/compile-object-load.c: Include gdbthread.h.
6273         (store_regs): Use inferior_thread.
6274         * corelow.c (core_target::close): Use current_inferior.
6275         (core_target_open): Adjust to use first_thread_of_inferior and use
6276         the current inferior.
6277         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6278         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6279         <thread>: ... this new field.  All references adjusted.
6280         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6281         Take a thread_info pointer instead of a ptid_t.
6282         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6283         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6284         thread_info pointer instead of a ptid_t.
6285         * elfread.c: Include "inferior.h".
6286         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6287         Use inferior_thread.
6288         * eval.c (evaluate_subexp): Likewise.
6289         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6290         inferior_thread.
6291         * gdb_proc_service.h (struct thread_info): Forward declare.
6292         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6293         <thread>: ... this new field.  All references adjusted.
6294         * gdbarch.h, gdbarch.c: Regenerate.
6295         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6296         'thread' parameter.  All implementations and callers adjusted.
6297         * gdbthread.h (thread_info) <set_running>: New method.
6298         (delete_thread, delete_thread_silent): Take a thread_info pointer
6299         instead of a ptid.
6300         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6301         (first_thread_of_process): Delete, replaced by ...
6302         (first_thread_of_inferior): ... this new function.  All callers
6303         adjusted.
6304         (any_live_thread_of_process): Delete, replaced by ...
6305         (any_live_thread_of_inferior): ... this new function.  All callers
6306         adjusted.
6307         (switch_to_thread, switch_to_no_thread): Declare.
6308         (is_executing): Delete.
6309         (enable_thread_stack_temporaries): Update comment.
6310         <enable_thread_stack_temporaries>: Take a thread_info pointer
6311         instead of a ptid_t.  Incref the thread.
6312         <~enable_thread_stack_temporaries>: Decref the thread.
6313         <m_ptid>: Delete
6314         <m_thr>: New.
6315         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6316         (get_last_thread_stack_temporary)
6317         (value_in_thread_stack_temporaries, can_access_registers_thread):
6318         Take a thread_info pointer instead of a ptid_t.  All callers
6319         adjusted.
6320         * infcall.c (get_call_return_value): Use inferior_thread.
6321         (run_inferior_call): Work with thread pointers instead of ptid_t.
6322         (call_function_by_hand_dummy): Work with thread pointers instead
6323         of ptid_t.  Use thread_info_ref.
6324         * infcmd.c (proceed_thread_callback): Access thread's state
6325         directly.
6326         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6327         access thread's state directly.
6328         (continue_command): Use inferior_thread.
6329         (info_program_command): Use find_thread_ptid and access thread
6330         state directly.
6331         (proceed_after_attach_callback): Use thread state directly.
6332         (notice_new_inferior): Take a thread_info pointer instead of a
6333         ptid_t.  All callers adjusted.
6334         (exit_inferior): Take an inferior pointer instead of a pid.  All
6335         callers adjusted.
6336         (exit_inferior_silent): New.
6337         (detach_inferior): Delete.
6338         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6339         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6340         (detach_inferior_command, kill_inferior_command): Use
6341         find_inferior_id instead of valid_gdb_inferior_id and
6342         gdb_inferior_id_to_pid.
6343         (inferior_command): Use inferior and thread pointers.
6344         * inferior.h (struct thread_info): Forward declare.
6345         (notice_new_inferior): Take a thread_info pointer instead of a
6346         ptid_t.  All callers adjusted.
6347         (detach_inferior): Delete declaration.
6348         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6349         instead of a pid.  All callers adjusted.
6350         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6351         (valid_gdb_inferior_id): Delete.
6352         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6353         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6354         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6355         ...
6356         <inf>: ... this new field.
6357         <step_ptid>: Delete, replaced by ...
6358         <step_thread>: ... this new field.
6359         (get_displaced_stepping_state): Take an inferior pointer instead
6360         of a pid.  All callers adjusted.
6361         (displaced_step_in_progress_any_inferior): Adjust.
6362         (displaced_step_in_progress_thread): Take a thread pointer instead
6363         of a ptid_t.  All callers adjusted.
6364         (displaced_step_in_progress, add_displaced_stepping_state): Take
6365         an inferior pointer instead of a pid.  All callers adjusted.
6366         (get_displaced_step_closure_by_addr): Adjust.
6367         (remove_displaced_stepping_state): Take an inferior pointer
6368         instead of a pid.  All callers adjusted.
6369         (displaced_step_prepare_throw, displaced_step_prepare)
6370         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6371         All callers adjusted.
6372         (start_step_over): Adjust.
6373         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6374         displaced step queue.
6375         (do_target_resume): Adjust.
6376         (fetch_inferior_event): Use inferior_thread.
6377         (context_switch, get_inferior_stop_soon): Take an
6378         execution_control_state pointer instead of a ptid_t.  All callers
6379         adjusted.
6380         (switch_to_thread_cleanup): Delete.
6381         (stop_all_threads): Use scoped_restore_current_thread.
6382         * inline-frame.c: Include "gdbthread.h".
6383         (inline_state) <inline_state>: Take a thread pointer instead of a
6384         ptid_t.  All callers adjusted.
6385         <ptid>: Delete, replaced by ...
6386         <thread>: ... this new field.
6387         (find_inline_frame_state): Take a thread pointer instead of a
6388         ptid_t.  All callers adjusted.
6389         (skip_inline_frames, step_into_inline_frame)
6390         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6391         pointer instead of a ptid_t.  All callers adjusted.
6392         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6393         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6394         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6395         pointers directly.
6396         * linux-nat.c (get_detach_signal): Likewise.
6397         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6398         (thread_db_notice_clone): Adjust.
6399         (thread_db_find_new_threads_silently)
6400         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6401         a thread pointer instead of a ptid_t.  All callers adjusted.
6402         * mi/mi-cmd-var.c: Include "inferior.h".
6403         (mi_cmd_var_update_iter): Update to use thread pointers.
6404         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6405         inferior directly.
6406         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6407         out to ...
6408         (mi_output_running): ... this new function.
6409         (mi_on_resume_1): Adjust to use it.
6410         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6411         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6412         directly.
6413         (interrupt_thread_callback): : Adjust to use thread and inferior
6414         pointers.
6415         * proc-service.c: Include "gdbthread.h".
6416         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6417         * progspace-and-thread.c: Include "inferior.h".
6418         * progspace.c: Include "inferior.h".
6419         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6420         hold a reference to an inferior_object.
6421         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6422         inferior_thread.
6423         * python/py-inferior.c (struct inferior_object): Give the type a
6424         tag name instead of a typedef.
6425         (python_on_normal_stop): No need to check if the current thread is
6426         listed.
6427         (inferior_to_inferior_object): Change return type to
6428         inferior_object.  All callers adjusted.
6429         (find_thread_object): Delete, bits factored out to ...
6430         (thread_to_thread_object): ... this new function.
6431         * python/py-infthread.c (create_thread_object): Use
6432         inferior_to_inferior_object.
6433         (thpy_is_stopped): Use thread pointer directly.
6434         (gdbpy_selected_thread): Use inferior_thread.
6435         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6436         field, replaced with ...
6437         <thread>: ... this new field.  All users adjusted.
6438         (btpy_insn_or_gap_new): Drop const.
6439         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6440         callers adjusted.
6441         * python/py-record.c: Include "gdbthread.h".
6442         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6443         a ptid_t.  All callers adjusted.
6444         (gdbpy_current_recording): Use inferior_thread.
6445         * python/py-record.h (recpy_record_object) <ptid>: Delete
6446         field, replaced with ...
6447         <thread>: ... this new field.  All users adjusted.
6448         (recpy_element_object) <ptid>: Delete
6449         field, replaced with ...
6450         <thread>: ... this new field.  All users adjusted.
6451         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6452         a ptid_t.  All callers adjusted.
6453         * python/py-threadevent.c: Include "gdbthread.h".
6454         (get_event_thread): Use thread_to_thread_object.
6455         * python/python-internal.h (struct inferior_object): Forward
6456         declare.
6457         (find_thread_object, find_inferior_object): Delete declarations.
6458         (thread_to_thread_object, inferior_to_inferior_object): New
6459         declarations.
6460         * record-btrace.c: Include "inferior.h".
6461         (require_btrace_thread): Use inferior_thread.
6462         (record_btrace_frame_sniffer)
6463         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6464         (get_thread_current_frame): Use scoped_restore_current_thread and
6465         switch_to_thread.
6466         (get_thread_current_frame): Use thread pointer directly.
6467         (record_btrace_replay_at_breakpoint): Use thread's inferior
6468         pointer directly.
6469         * record-full.c: Include "inferior.h".
6470         * regcache.c: Include "gdbthread.h".
6471         (get_thread_arch_regcache): Use the inferior's address space
6472         directly.
6473         (get_thread_regcache, registers_changed_thread): New.
6474         * regcache.h (get_thread_regcache(thread_info *thread)): New
6475         overload.
6476         (registers_changed_thread): New.
6477         (remote_target) <remote_detach_1>: Swap order of parameters.
6478         (remote_add_thread): <remote_add_thread>: Return the new thread.
6479         (get_remote_thread_info(ptid_t)): New overload.
6480         (remote_target::remote_notice_new_inferior): Use thread pointers
6481         directly.
6482         (remote_target::process_initial_stop_replies): Use
6483         thread_info::set_running.
6484         (remote_target::remote_detach_1, remote_target::detach)
6485         (extended_remote_target::detach): Adjust.
6486         * stack.c (frame_show_address): Use inferior_thread.
6487         * target-debug.h (target_debug_print_thread_info_pp): New.
6488         * target-delegates.c: Regenerate.
6489         * target.c (default_thread_address_space): Delete.
6490         (memory_xfer_partial_1): Use current_inferior.
6491         (target_detach): Use current_inferior.
6492         (target_thread_address_space): Delete.
6493         (generic_mourn_inferior): Use current_inferior.
6494         * target.h (struct target_ops) <thread_address_space>: Delete.
6495         (target_thread_address_space): Delete.
6496         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6497         pointers directly.
6498         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6499         thread pointer instead of a ptid_t.  Adjust all callers.
6500         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6501         (first_thread_of_process): Delete, replaced by ...
6502         (first_thread_of_inferior): ... this new function.  All callers
6503         adjusted.
6504         (any_thread_of_process): Rename to ...
6505         (any_thread_of_inferior): ... this, and take an inferior pointer.
6506         (any_live_thread_of_process): Rename to ...
6507         (any_live_thread_of_inferior): ... this, and take an inferior
6508         pointer.
6509         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6510         (value_in_thread_stack_temporaries)
6511         (get_last_thread_stack_temporary): Take a thread pointer instead
6512         of a ptid_t.  Adjust all callers.
6513         (thread_info::set_running): New.
6514         (validate_registers_access): Use inferior_thread.
6515         (can_access_registers_ptid): Rename to ...
6516         (can_access_registers_thread): ... this, and take a thread
6517         pointer.
6518         (print_thread_info_1): Adjust to compare thread pointers instead
6519         of ptids.
6520         (switch_to_no_thread, switch_to_thread): Make extern.
6521         (scoped_restore_current_thread::~scoped_restore_current_thread):
6522         Use m_thread pointer directly.
6523         (scoped_restore_current_thread::scoped_restore_current_thread):
6524         Use inferior_thread.
6525         (thread_command): Use thread pointer directly.
6526         (thread_num_make_value_helper): Use inferior_thread.
6527         * top.c (execute_command): Use inferior_thread.
6528         * tui/tui-interp.c: Include "inferior.h".
6529         * varobj.c (varobj_create): Use inferior_thread.
6530         (value_of_root_1): Use find_thread_global_id instead of
6531         global_thread_id_to_ptid.
6532
6533 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6534
6535         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6536         possible.
6537         (regcache::write_part): Likewise.
6538         (readable_regcache::cooked_read_part): Update comment.
6539         (readable_regcache::cooked_write_part): Likewise.
6540         * regcache.h: (readable_regcache::read_part): Likewise.
6541         (regcache::write_part): Likewise.
6542
6543 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6544             Dirk Schubert  <dirk.schubert@arm.com>
6545
6546         * aarch64-linux-nat.c (post_attach): New.
6547         (aarch64_linux_nat_target::post_attach): Override post_attach to
6548         record the number of hardware debug registers.
6549
6550 2018-06-20  Tom Tromey  <tom@tromey.com>
6551
6552         * python/py-param.c (add_setshow_generic): Make parameters const.
6553         (parmpy_init): Update.
6554
6555 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6556
6557         * regcache.h (regcache_cooked_read_ftype): Rename to...
6558         (register_read_ftype): ...this, change type to function_view.
6559         (class reg_buffer) <save>: Remove src parameter.
6560         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6561         parameter non-const in first overload.  Remove src parameter in
6562         second overload.
6563         * regcache.c (do_cooked_read): Remove.
6564         (readonly_detached_regcache::readonly_detached_regcache): Make
6565         parameter non-const, adjust call to other constructor.
6566         (reg_buffer::save): Remove src parameter.
6567         * frame.c (do_frame_register_read): Remove.
6568         (frame_save_as_regcache): Use lambda function.
6569         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6570         parameter to ppu2spu_data *.
6571         (ppu2spu_sniffer): Use lambda function.
6572
6573 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6574
6575         * record-full.c (record_full_target::insert_breakpoint): Remove
6576         "struct" keyword, add const.
6577
6578 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6579
6580         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6581         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6582         * configure.ac: Remove AC_PREREQ, add missing quoting.
6583         * gnulib/configure.ac: Modernize usage of
6584         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6585         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6586         (AUTOMAKE_VERSION): Bump to 1.15.1.
6587         * configure: Re-generate.
6588         * config.in: Re-generate.
6589         * aclocal.m4: Re-generate.
6590         * gnulib/aclocal.m4: Re-generate.
6591         * gnulib/config.in: Re-generate.
6592         * gnulib/configure: Re-generate.
6593         * gnulib/import/Makefile.in: Re-generate.
6594
6595 2018-06-19  Pedro Alves  <palves@redhat.com>
6596
6597         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6598         (lookup_minimal_symbol_by_pc_section): ... here with
6599         gdb_assert_not_reached added.
6600
6601 2018-06-19  Pedro Alves  <palves@redhat.com>
6602
6603         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6604         parameter with a block parameter.  Compare location's block symbol
6605         with the frame's block instead of addresses.
6606         (skip_inline_frames): Pass the current block instead of the
6607         frame's address.  Break out as soon as we determine the frame
6608         should not be skipped.
6609
6610 2018-06-18  Tom Tromey  <tom@tromey.com>
6611
6612         * solib-aix.c (solib_aix_get_section_offsets): Return
6613         unique_xmalloc_ptr.
6614         (solib_aix_solib_create_inferior_hook): Update.
6615
6616 2018-06-18  Tom Tromey  <tom@tromey.com>
6617
6618         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6619
6620 2018-06-18  Tom Tromey  <tom@tromey.com>
6621
6622         * solib-frv.c (frv_relocate_main_executable): Use
6623         unique_xmalloc_ptr.
6624         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6625         unique_xmalloc_ptr.
6626
6627 2018-06-18  Tom Tromey  <tom@tromey.com>
6628
6629         * objfiles.h (inhibit_section_map_updates): Update.
6630         (resume_section_map_updates, resume_section_map_updates_cleanup):
6631         Remove.
6632         * solib-svr4.c (svr4_handle_solib_event): Update.
6633         * objfiles.c (inhibit_section_map_updates): Return
6634         scoped_restore_tmpl<int>.
6635         (resume_section_map_updates, resume_section_map_updates_cleanup):
6636         Remove.
6637
6638 2018-06-18  Tom Tromey  <tom@tromey.com>
6639
6640         * valprint.h (read_string): Update.
6641         * valprint.c (read_string): Change type of "buffer".
6642         (val_print_string): Update.
6643         * python/py-value.c (valpy_string): Update.
6644         * language.h (struct language_defn) <la_get_string>: Change
6645         type of "buffer".
6646         (default_get_string, c_get_string): Update.
6647         * language.c (default_get_string): Change type of "buffer".
6648         * guile/scm-value.c (gdbscm_value_to_string): Update.
6649         * c-lang.c (c_get_string): Change type of "buffer".
6650
6651 2018-06-18  Tom Tromey  <tom@tromey.com>
6652
6653         * ser-mingw.c (struct pipe_state_destroyer): New.
6654         (pipe_state_up): New typedef.
6655         (cleanup_pipe_state): Remove.
6656         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6657
6658 2018-06-18  Tom Tromey  <tom@tromey.com>
6659
6660         * rust-lang.h (rust_yyerror): Don't declare.
6661         * rust-lang.c (rust_language_defn): Update.
6662         * rust-exp.y (yyerror): Now static.
6663         * parse.c (parse_exp_in_context_1): Update.
6664         * p-lang.h (p_yyerror): Don't declare.
6665         * p-lang.c (p_language_defn): Update.
6666         * p-exp.y (yyerror): Now static.
6667         * opencl-lang.c (opencl_language_defn): Update.
6668         * objc-lang.c (objc_language_defn): Update.
6669         * m2-lang.h (m2_yyerror): Don't declare.
6670         * m2-lang.c (m2_language_defn): Update.
6671         * m2-exp.y (yyerror): Now static.
6672         * language.h (struct language_defn) <la_error>: Remove.
6673         * language.c (unk_lang_error): Remove.
6674         (unknown_language_defn, auto_language_defn): Remove.
6675         * go-lang.h (go_yyerror): Don't declare.
6676         * go-lang.c (go_language_defn): Update.
6677         * go-exp.y (yyerror): Now static.
6678         * f-lang.h (f_yyerror): Don't declare.
6679         * f-lang.c (f_language_defn): Update.
6680         * f-exp.y (yyerror): Now static.
6681         * d-lang.h (d_yyerror): Don't declare.
6682         * d-lang.c (d_language_defn): Update.
6683         * d-exp.y (yyerror): Now static.
6684         * c-lang.h (c_yyerror): Don't declare.
6685         * c-lang.c (c_language_defn, cplus_language_defn)
6686         (asm_language_defn, minimal_language_defn): Update.
6687         * c-exp.y (yyerror): Now static.
6688         * ada-lang.h (ada_yyerror): Don't declare.
6689         * ada-lang.c (ada_language_defn): Update.
6690         * ada-exp.y (yyerror): Now static.
6691
6692 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6693
6694         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6695         (store_sveregs_to_thread): Likewise.
6696         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6697         (aarch64_linux_store_inferior_registers): Likewise.
6698         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6699         function.
6700         (aarch64_sve_regs_copy_to_regcache): Likewise.
6701         (aarch64_sve_regs_copy_from_regcache): Likewise.
6702         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6703         declaration.
6704         (aarch64_sve_regs_copy_to_regcache): Likewise.
6705         (aarch64_sve_regs_copy_from_regcache): Likewise.
6706         (sve_context): Structure from Linux headers.
6707         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6708         (SVE_SIG_ZREG_SIZE): Likewise.
6709         (SVE_SIG_PREG_SIZE): Likewise.
6710         (SVE_SIG_FFR_SIZE): Likewise.
6711         (SVE_SIG_REGS_OFFSET): Likewise.
6712         (SVE_SIG_ZREGS_OFFSET): Likewise.
6713         (SVE_SIG_ZREG_OFFSET): Likewise.
6714         (SVE_SIG_ZREGS_SIZE): Likewise.
6715         (SVE_SIG_PREGS_OFFSET): Likewise.
6716         (SVE_SIG_PREG_OFFSET): Likewise.
6717         (SVE_SIG_PREGS_SIZE): Likewise.
6718         (SVE_SIG_FFR_OFFSET): Likewise.
6719         (SVE_SIG_REGS_SIZE): Likewise.
6720         (SVE_SIG_CONTEXT_SIZE): Likewise.
6721         (SVE_PT_REGS_MASK): Likewise.
6722         (SVE_PT_REGS_FPSIMD): Likewise.
6723         (SVE_PT_REGS_SVE): Likewise.
6724         (SVE_PT_VL_INHERIT): Likewise.
6725         (SVE_PT_VL_ONEXEC): Likewise.
6726         (SVE_PT_REGS_OFFSET): Likewise.
6727         (SVE_PT_FPSIMD_OFFSET): Likewise.
6728         (SVE_PT_FPSIMD_SIZE): Likewise.
6729         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6730         (SVE_PT_SVE_PREG_SIZE): Likewise.
6731         (SVE_PT_SVE_FFR_SIZE): Likewise.
6732         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6733         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6734         (__SVE_SIG_TO_PT): Likewise.
6735         (SVE_PT_SVE_OFFSET): Likewise.
6736         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6737         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6738         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6739         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6740         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6741         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6742         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6743         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6744         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6745         (SVE_PT_SVE_SIZE): Likewise.
6746         (SVE_PT_SIZE): Likewise.
6747         (HAS_SVE_STATE): New define.
6748
6749 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6750
6751         * nat/aarch64-sve-linux-sigcontext.h: New file.
6752         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6753         new files.
6754         (SVE_VQ_MIN): Likewise.
6755         (SVE_VQ_MAX): Likewise.
6756         (SVE_VL_MIN): Likewise.
6757         (SVE_VL_MAX): Likewise.
6758         (SVE_NUM_ZREGS): Likewise.
6759         (SVE_NUM_PREGS): Likewise.
6760         (sve_vl_valid): Likewise.
6761         (struct user_sve_header): Likewise.
6762
6763 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6764             Richard Bunt <Richard.Bunt@arm.com>
6765
6766         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6767         was requested by GDB.
6768
6769 2018-06-15  Tom de Vries  <tdevries@suse.de>
6770
6771         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6772
6773 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6774
6775         * gnulib/update-gnulib.sh: Print expected versions of
6776         autoconf/aclocal.
6777
6778 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6779
6780         * arch-utils.c (default_type_align): Use type_length_units.
6781         * gdbtypes.c (type_align): Use type_length_units.
6782
6783 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6784
6785         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6786         of 'define' command.
6787
6788 2018-06-14  Tom de Vries  <tdevries@suse.de>
6789
6790         PR cli/22573
6791         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6792         get_no_prettyformat_print_options.
6793
6794 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6795
6796         * sparc-nat.h: Include target.h.
6797         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6798         <fetch_registers>: Remove this argument in function call.
6799         <store_registers>: Remove this argument in function call, remove
6800         extra semicolon.
6801         <low_forget_process>: Call sparc64_forget_process instead of
6802         sparc_forget_process.
6803
6804 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6805
6806         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6807         (procfs_target::make_corefile_notes): Adjust to new
6808         target_read_alloc return type.
6809
6810 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6811             Stephen Roberts  <stephen.roberts@arm.com>
6812
6813         PR gdb/22882
6814         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6815         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6816         Move should_notify_stop local into more inner scope.
6817
6818 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6819             Stephen Roberts  <stephen.roberts@arm.com>
6820
6821         PR gdb/22882
6822         * infrun.c (resume_1): Add call to mark_async_event_handler.
6823
6824 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6825
6826         * infrun.c (do_target_wait): Change old version of $pc printed.
6827
6828 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6829
6830         * dwarf2read.c (read_index_from_section): Rename to...
6831         (read_gdb_index_from_section): ... this, update all callers.
6832         (dwarf2_read_index): Rename to...
6833         (dwarf2_read_gdb_index): ... this, update all callers.
6834
6835 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6836
6837         * gdb/hppa-linux-nat.c
6838         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6839         hppa_linux_nat_target::fetch_registers.
6840
6841 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6842
6843         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6844         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6845         (AARCH64_DWARF_SVE_FFR): Likewise.
6846         (AARCH64_DWARF_SVE_P0): Likewise.
6847         (AARCH64_DWARF_SVE_Z0): Likewise.
6848
6849 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6850
6851         * common/common-regcache.h (raw_compare): New function.
6852         * regcache.c (regcache::raw_compare): Likewise.
6853         * regcache.h (regcache::raw_compare): New declaration.
6854
6855 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6856
6857         * common/common-regcache.h (reg_buffer_common): New structure.
6858         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6859         (reg_buffer::raw_supply): Likewise.
6860         (reg_buffer::raw_supply_integer): Likewise.
6861         (reg_buffer::raw_supply_zeroed): Likewise.
6862         (reg_buffer::raw_collect): Likewise.
6863         (reg_buffer::raw_collect_integer): Likewise.
6864         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6865         (reg_buffer::raw_supply): Likewise.
6866         (reg_buffer::raw_supply_integer): Likewise.
6867         (reg_buffer::raw_supply_zeroed): Likewise.
6868         (reg_buffer::raw_collect): Likewise.
6869         (reg_buffer::raw_collect_integer): Likewise.
6870
6871 2018-06-10  Tom Tromey  <tom@tromey.com>
6872
6873         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6874         (class remote_state) <stop_reply_queue>: Now std::vector.
6875         (remote_state::~remote_state)
6876         (remote_target::stop_reply_queue_length): Update.
6877         (struct queue_iter_param, remove_child_of_pending_fork)
6878         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6879         (check_pending_event_prevents_wildcard_vcont_callback)
6880         (remove_stop_reply_for_inferior)
6881         (remove_stop_reply_of_remote_state)
6882         (remote_notif_remove_once_on_match)
6883         (stop_reply_match_ptid_and_ws)
6884         (remote_kill_child_of_pending_fork): Remove.
6885         (remote_target::remove_new_fork_children)
6886         (remote_target::check_pending_events_prevent_wildcard_vcont)
6887         (remote_target::discard_pending_stop_replies)
6888         (remote_target::discard_pending_stop_replies_in_queue)
6889         (remote_target::remote_notif_remove_queued_reply)
6890         (remote_target::queued_stop_reply)
6891         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6892         (remote_target::wait, remote_target::kill_new_fork_children)
6893         (remote_target::async): Update.
6894
6895 2018-06-10  Tom Tromey  <tom@tromey.com>
6896
6897         * record-full.c (record_full_arch_list_cleanups): Remove.
6898         (record_full_message): Use try/catch.
6899         (record_full_wait_cleanups): Remove.
6900         (record_full_wait_1): Use try/catch.
6901         (record_full_restore): Likewise.
6902
6903 2018-06-10  Tom Tromey  <tom@tromey.com>
6904
6905         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6906         declare VEC.  Add constructor.
6907         <in_target_beneath>: Now bool.
6908         (record_full_breakpoints): Now a std::vector, static.
6909         (record_full_sync_record_breakpoints)
6910         (record_full_init_record_breakpoints)
6911         (record_full_target::insert_breakpoint)
6912         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
6913
6914 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6915
6916         * dwarf2read.c (process_cu_includes): Remove struct keyword.
6917         * serial.c (serial_interface_lookup): Remove struct keyword.
6918
6919 2018-06-10  Tom Tromey  <tom@tromey.com>
6920
6921         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6922         method.
6923         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6924         a method.
6925         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6926         method.
6927         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6928         "beneath" as a method.
6929         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6930         Use "beneath" as a method.
6931
6932 2018-06-10  Tom Tromey  <tom@tromey.com>
6933
6934         * tracefile.c (struct trace_file_writer_deleter): New.
6935         <operator()>: Rename from trace_file_writer_xfree.
6936         (trace_file_writer_up): New typedef.
6937         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6938
6939 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6940
6941         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6942         <m_registers, m_register_status>: Change type to
6943         std::unique_ptr.
6944         * regcache.c (reg_buffer::reg_buffer): Use new instead of
6945         XCNEWVEC.
6946
6947 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6948
6949         * common/common-regcache.h (enum register_status): Add
6950         underlying type "signed char".
6951         * regcache.h (reg_buffer) <m_register_status>: Change type to
6952         register_status *.
6953         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6954         register_status instead of signed char.
6955         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6956         (reg_buffer::get_register_status): Remove cast.
6957         (readable_regcache::raw_read): Remove cast.
6958         (readable_regcache::cooked_read): Remove cast.
6959
6960 2018-06-09  Tom Tromey  <tom@tromey.com>
6961
6962         * source.c (reverse_search_command, forward_search_command): Use
6963         scoped_fd.
6964
6965 2018-06-09  Tom Tromey  <tom@tromey.com>
6966
6967         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
6968         (serial_ops_list): Now static, std::vector.
6969         (serial_interface_lookup, serial_add_interface): Update.
6970
6971 2018-06-09  Tom Tromey  <tom@tromey.com>
6972
6973         * dwarf2read.c (process_cu_includes): Update.
6974         (process_full_comp_unit): Update.
6975         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6976         std::vector.
6977
6978 2018-06-08  Paul Koning  <paul_koning@dell.com>
6979
6980         PR gdb/23252
6981
6982         * python/python.c (do_start_initialization):
6983         Avoid call to internal Python API.
6984         (init__gdb_module): New function.
6985
6986 2018-06-08  Gary Benson <gbenson@redhat.com>
6987
6988         * linux-thread-db.c (valprint.h): New include.
6989         (struct check_thread_db_info): New structure.
6990         (check_thread_db_on_load, tdb_testinfo): New static globals.
6991         (check_thread_db, check_thread_db_callback): New functions.
6992         (try_thread_db_load_1): Run integrity checks if requested.
6993         (maintenance_check_libthread_db): New function.
6994         (_initialize_thread_db): Register "maint check libthread-db"
6995         and "maint set/show check-libthread-db".
6996         * NEWS: Mention the above new commands.
6997
6998 2018-06-08  Tom Tromey  <tom@tromey.com>
6999
7000         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
7001         now a method.
7002
7003 2018-06-08  Tom Tromey  <tom@tromey.com>
7004
7005         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
7006
7007 2018-06-08  Tom Tromey  <tom@tromey.com>
7008
7009         * common/btrace-common.h (struct btrace_data): Add constructor,
7010         destructor, move assignment operator.
7011         <empty, clear, fini>: New methods.
7012         <format>: Initialize.
7013         (btrace_data_init, btrace_data_fini, btrace_data_clear)
7014         (btrace_data_empty): Don't declare.
7015         * common/btrace-common.c (btrace_data_init): Remove.
7016         (btrace_data::fini): Rename from btrace_data_fini.
7017         (btrace_data::empty): Rename from btrace_data_empty.
7018         (btrace_data::clear): Rename from btrace_data_clear.  Return
7019         bool.
7020         * btrace.h (make_cleanup_btrace_data): Don't declare.
7021         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
7022         (parse_xml_btrace): Update.
7023         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
7024         (maint_btrace_clear_packet_history_cmd): Update.
7025
7026 2018-06-07  Pedro Alves  <palves@redhat.com>
7027
7028         * target.h (target_ops) <beneath>: Now a method.  All references
7029         updated.
7030         (class target_stack): New.
7031         * target.c (g_target_stack): New.
7032         (g_current_top_target): Delete.
7033         (current_top_target): Get the top target out of g_target_stack.
7034         (target_stack::push, target_stack::unpush): New.
7035         (push_target, unpush_target): Reimplement.
7036         (target_is_pushed): Reimplement in terms of g_target_stack.
7037         (target_ops::beneath, target_stack::find_beneath): New.
7038
7039 2018-06-07  Pedro Alves  <palves@redhat.com>
7040
7041         * target.h (find_target_beneath): Delete declaration.
7042         * target.c (find_target_beneath): Delete definition.
7043         * aix-thread.c: All callers of find_target_beneath adjusted to
7044         call target_ops::beneath instead.
7045         * bsd-uthread.c: Likewise.
7046         * linux-thread-db.c: Likewise.
7047         * ravenscar-thread.c: Likewise.
7048         * sol-thread.c: Likewise.
7049         * spu-multiarch.c: Likewise.
7050
7051 2018-06-07  Pedro Alves  <palves@redhat.com>
7052
7053         * target.h (target_ops) <beneath>: Now a method.  All references
7054         updated.
7055         (target_ops) <m_beneath>: New.
7056         * target.c (target_ops::beneath): New.
7057         * corelow.c: Adjust all references to target_ops::beneath.
7058         * linux-thread-db.c: Likewise.
7059         * make-target-delegates: Likewise.
7060         * record-btrace.c: Likewise.
7061         * record-full.c: Likewise.
7062         * remote.c: Likewise.
7063         * target.c: Likewise.
7064         * target-delegates.c: Regenerate.
7065
7066 2018-06-07  Pedro Alves  <palves@redhat.com>
7067
7068         * target.h (target_stack): Delete.
7069         (current_top_target): Declare function.
7070         * target.c (target_stack): Delete.
7071         (g_current_top_target): New.
7072         (current_top_target): New function.
7073         * auxv.c: Use current_top_target instead of target_stack
7074         throughout.
7075         * avr-tdep.c: Likewise.
7076         * breakpoint.c: Likewise.
7077         * corefile.c: Likewise.
7078         * elfread.c: Likewise.
7079         * eval.c: Likewise.
7080         * exceptions.c: Likewise.
7081         * frame.c: Likewise.
7082         * gdbarch-selftests.c: Likewise.
7083         * gnu-v3-abi.c: Likewise.
7084         * ia64-tdep.c: Likewise.
7085         * ia64-vms-tdep.c: Likewise.
7086         * infcall.c: Likewise.
7087         * infcmd.c: Likewise.
7088         * infrun.c: Likewise.
7089         * linespec.c: Likewise.
7090         * linux-tdep.c: Likewise.
7091         * minsyms.c: Likewise.
7092         * ppc-linux-nat.c: Likewise.
7093         * ppc-linux-tdep.c: Likewise.
7094         * procfs.c: Likewise.
7095         * regcache.c: Likewise.
7096         * remote.c: Likewise.
7097         * rs6000-tdep.c: Likewise.
7098         * s390-linux-nat.c: Likewise.
7099         * s390-tdep.c: Likewise.
7100         * solib-aix.c: Likewise.
7101         * solib-darwin.c: Likewise.
7102         * solib-dsbt.c: Likewise.
7103         * solib-spu.c: Likewise.
7104         * solib-svr4.c: Likewise.
7105         * solib-target.c: Likewise.
7106         * sparc-tdep.c: Likewise.
7107         * sparc64-tdep.c: Likewise.
7108         * spu-tdep.c: Likewise.
7109         * symfile.c: Likewise.
7110         * symtab.c: Likewise.
7111         * target-descriptions.c: Likewise.
7112         * target-memory.c: Likewise.
7113         * target.c: Likewise.
7114         * target.h: Likewise.
7115         * tracefile-tfile.c: Likewise.
7116         * tracepoint.c: Likewise.
7117         * valops.c: Likewise.
7118         * valprint.c: Likewise.
7119         * value.c: Likewise.
7120         * windows-tdep.c: Likewise.
7121         * mi/mi-main.c: Likewise.
7122
7123 2018-06-07  Tom Tromey  <tom@tromey.com>
7124
7125         * valprint.h (build_address_symbolic): Declare.
7126         * printcmd.c (print_address_symbolic): Update.
7127         (build_address_symbolic): Change "name" and "filename" to
7128         std::string.
7129         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7130         Update.
7131         * defs.h (build_address_symbolic): Remove declaration.
7132
7133 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7134
7135         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7136         (aarch64_vnv_type): Add function.
7137         (aarch64_pseudo_register_name): Add V regs for SVE.
7138         (aarch64_pseudo_register_type): Likewise.
7139         (aarch64_pseudo_register_reggroup_p): Likewise.
7140         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7141         (aarch64_pseudo_read_value): Add V regs for SVE.
7142         (aarch64_pseudo_write_2): Use V0 offset for SVE
7143         (aarch64_pseudo_write): Add V regs for SVE.
7144         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7145
7146 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7147
7148         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7149         (sve_vl_from_vq): Likewise.
7150
7151 2018-06-05  Tom Tromey  <tom@tromey.com>
7152
7153         * cli/cli-cmds.c (show_version): Update.
7154         * top.c (print_gdb_version): Add "interactive" parameter.
7155         Update.
7156         * main.c (captured_main_1): Update.
7157         * top.h (print_gdb_version): Add "interactive" parameter and a
7158         comment.
7159
7160 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7161
7162         * common/enum-flags.h: Add trailing semicolon to example in
7163         comment.
7164
7165 2018-06-05  Tom Tromey  <tom@tromey.com>
7166
7167         PR cli/12326:
7168         * NEWS: Add entry about pager.
7169         * utils.c (pagination_disabled_for_command): New global.
7170         (prompt_for_continue): Allow "c" response to prompt.
7171         (reinitialize_more_filter): Clear
7172         pagination_disabled_for_command.
7173         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7174
7175 2018-06-04  Tom Tromey  <tom@tromey.com>
7176
7177         * ada-lang.h (ada_lookup_symbol_list): Update.
7178         * ada-lang.c (resolve_subexp): Update.
7179         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7180         parameter.
7181         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7182         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7183         results parameter to std::vector.
7184         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7185         Update.
7186         * ada-exp.y (block_lookup): Update.
7187         (select_possible_type_sym): Change type of syms.  Remove nsyms
7188         parameter.
7189         (write_var_or_type, write_name_assoc): Update.
7190
7191 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7192
7193         * windows-nat.c (windows_nat_target::xfer_partial): Return
7194         TARGET_XFER_E_IO if we need to delegate to the target beneath
7195         but BENEATH is NULL.
7196
7197 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7198
7199         * Makefile.in (config.status): Add configure.nat as a
7200         dependency.
7201
7202 2018-06-04  Tom Tromey  <tom@tromey.com>
7203
7204         * cp-name-parser.y (cpname_state): Add method declarations.
7205         (HANDLE_QUAL): Update.
7206         (cpname_state::d_grab, cpname_state::fill_comp)
7207         (cpname_state::make_operator, cpname_state::make_dtor)
7208         (cpname_state::make_builtin_type, cpname_state::make_name)
7209         (cpname_state::d_qualify, cpname_state::d_int_type)
7210         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7211         (%union): Move earlier.
7212
7213 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7214
7215         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7216
7217 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7218
7219         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7220         (aarch64_pseudo_write_1): Likewise.
7221         (aarch64_pseudo_read_value): Use helper.
7222         (aarch64_pseudo_write): Likewise.
7223
7224 2018-06-04  Pedro Alves  <palves@redhat.com>
7225
7226         * darwin-nat.c (darwin_ops): Delete.
7227         (darwin_attach_pid): Use get_native_target.
7228
7229 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7230
7231         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7232         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7233
7234 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7235
7236         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7237         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7238         (aarch64_gdbarch_init): Check for SVE.
7239         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7240
7241 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7242
7243         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7244         * aarch64-tdep.h (aarch64_read_description): Likewise.
7245         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7246         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7247         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7248         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7249         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7250
7251 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7252
7253         * value.c (value_fetch_lazy_bitfield): New.
7254         (value_fetch_lazy_memory): New.
7255         (value_fetch_lazy_register): New.
7256         (value_fetch_lazy): Factor out to smaller functions.
7257
7258 2018-06-01  Tom Tromey  <tom@tromey.com>
7259
7260         * cp-name-parser.y (backslashable, represented): Now const.
7261
7262 2018-06-01  Tom Tromey  <tom@tromey.com>
7263
7264         * cp-name-parser.y: Include parser-defs.h.
7265         (parser_fprintf): Remove declaration.
7266
7267 2018-06-01  Tom Tromey  <tom@tromey.com>
7268
7269         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7270         %parse-param.
7271         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7272         (global_result): Remove globals.
7273         (struct cpname_state): New.
7274         (yyparse): Don't declare.
7275         (yylex, yyerror): Move declarations after %union.
7276         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7277         (make_name): Add state parameter.
7278         Update all callers.
7279         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7280         parameter.
7281         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7282         Update.
7283         (yylex): Add lvalp, state parameters.
7284         (yyerror): Add state parameter.
7285         (cp_demangled_name_to_comp): Update.
7286
7287 2018-06-01  Tom Tromey  <tom@tromey.com>
7288
7289         * cp-name-parser.y (parser_fprintf): Declare.
7290         (GDB_YY_REMAP_PREFIX): Define.
7291         Include yy-remap.h.  Don't redefine yy* identifiers.
7292
7293 2018-06-01  Tom Tromey  <tom@tromey.com>
7294
7295         * python/py-type.c (typy_legacy_template_argument): Update.
7296         * cp-support.h (cp_demangled_name_to_comp): Update.
7297         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7298         parameter to be a "std::string *".
7299         (main): Update.
7300
7301 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7302
7303         * ada-lex.l: Include "diagnostics.h" instead of
7304         "common/diagnostics.h".
7305         * unittests/environ-selftests.c: Likewise.
7306         * common/diagnostics.h: Moved to ../include.
7307
7308 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7309
7310         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7311         to language_mode_manual while calling breakpoint_re_set_one.
7312
7313 2018-06-01  Tom Tromey  <tom@tromey.com>
7314
7315         * valops.c (value_cast_structs, destructor_name_p): Update.
7316         * symtab.c (gdb_mangle_name): Update.
7317         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7318         Update.
7319         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7320         (pascal_object_print_value_fields, pascal_object_print_value):
7321         Update.
7322         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7323         * linespec.c (find_methods): Update.
7324         * gdbtypes.h (type_name_no_tag): Remove.
7325         (type_name_or_error): Rename from type_name_no_tag_or_error.
7326         * gdbtypes.c (type_name_no_tag): Remove.
7327         (type_name_or_error): Rename from type_name_no_tag_or_error.
7328         (lookup_struct_elt_type, check_typedef): Update.
7329         * expprint.c (print_subexp_standard): Update.
7330         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7331         * d-namespace.c (d_lookup_nested_symbol): Update.
7332         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7333         (cp_print_class_member): Update.
7334         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7335         * completer.c (add_struct_fields): Update.
7336         * c-typeprint.c (cp_type_print_derivation_info)
7337         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7338         Update.
7339         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7340         (ada_prefer_type, ada_is_exception_sym): Update.
7341
7342 2018-06-01  Tom Tromey  <tom@tromey.com>
7343
7344         * valops.c (enum_constant_from_type, value_namespace_elt)
7345         (value_maybe_namespace_elt): Update.
7346         * valarith.c (find_size_for_pointer_math): Update.
7347         * target-descriptions.c (make_gdb_type): Update.
7348         * symmisc.c (print_symbol): Update.
7349         * stabsread.c (define_symbol, read_type)
7350         (complain_about_struct_wipeout, add_undefined_type)
7351         (cleanup_undefined_types_1): Update.
7352         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7353         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7354         (rust_internal_print_type, rust_composite_type)
7355         (rust_evaluate_funcall, rust_evaluate_subexp)
7356         (rust_inclusive_range_type_p): Update.
7357         * python/py-type.c (typy_get_tag): Update.
7358         * p-typeprint.c (pascal_type_print_base): Update.
7359         * mdebugread.c (parse_symbol, parse_type): Update.
7360         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7361         Update.
7362         * guile/scm-type.c (gdbscm_type_tag): Update.
7363         * go-lang.c (sixg_string_p): Update.
7364         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7365         Update.
7366         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7367         (TYPE_TAG_NAME): Remove.
7368         * gdbtypes.c (type_name_no_tag): Simplify.
7369         (check_typedef, check_types_equal, recursive_dump_type)
7370         (copy_type_recursive, arch_composite_type): Update.
7371         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7372         in summary mode when needed.
7373         * eval.c (evaluate_funcall): Update.
7374         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7375         (process_structure_scope, read_enumeration_type)
7376         (read_namespace_type, read_module_type, determine_prefix): Update.
7377         * cp-support.c (inspect_type): Update.
7378         * coffread.c (process_coff_symbol, decode_base_type): Update.
7379         * c-varobj.c (c_is_path_expr_parent): Update.
7380         * c-typeprint.c (c_type_print_base_struct_union): Update.
7381         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7382         summary when using C language.
7383         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7384         (gen_maybe_namespace_elt): Update.
7385         * ada-lang.c (ada_type_name): Simplify.
7386         (empty_record, ada_template_to_fixed_record_type_1)
7387         (template_to_static_fixed_type)
7388         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7389
7390 2018-06-01  Tom Tromey  <tom@tromey.com>
7391
7392         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7393         c_print_type.
7394         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7395         (c_print_type): Update.
7396         (c_print_type): New overload.
7397         (c_type_print_varspec_prefix, c_type_print_args)
7398         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7399         (c_type_print_base_struct_union, c_type_print_base_1)
7400         (cp_type_print_method_args): Add "language" parameter.
7401         (c_type_print_base): Update.
7402         * c-lang.h (c_print_type): Add new overload.
7403
7404 2018-06-01  Tom Tromey  <tom@tromey.com>
7405
7406         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7407         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7408
7409 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7410
7411         * aarch64-tdep.c (aarch64_sve_register_names): New const
7412         var.
7413         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7414         (AARCH64_SVE_Z_REGS_NUM): New define.
7415         (AARCH64_SVE_P_REGS_NUM): Likewise.
7416         (AARCH64_SVE_NUM_REGS): Likewise.
7417
7418 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7419
7420         * nat/linux-ptrace.h [__alpha__]
7421         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7422         definitions.
7423
7424 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7425
7426         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7427         the endianness selected.
7428         * NEWS: Document `set endian auto' mode operation update.
7429
7430 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7431
7432         * Makefile.in: Add new header.
7433         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7434         (sve_vl_from_vg): Likewise.
7435         (sve_vq_from_vl): Likewise.
7436         (sve_vl_from_vq): Likewise.
7437         (sve_vq_from_vg): Likewise.
7438         (sve_vg_from_vq): Likewise.
7439         * configure.nat: Add new c file.
7440         * nat/aarch64-sve-linux-ptrace.c: New file.
7441         * nat/aarch64-sve-linux-ptrace.h: New file.
7442
7443 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7444
7445         * aarch64-linux-nat.c (aarch64_linux_read_description):
7446         Add parmeter zero.
7447         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7448         Likewise.
7449         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7450         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7451         (aarch64_gdbarch_init): Add parmeter zero.
7452         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7453         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7454         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7455         parmeter.
7456         * doc/gdb.texinfo: Describe SVE feature
7457         * features/aarch64-sve.c: New file.
7458
7459 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7460
7461         PR gdb/23210
7462         * gdbarch.sh (significant_addr_bit): Default to zero when
7463         not set by target architecture.
7464         * gdbarch.c: Re-generated.
7465         * utils.c (address_significant): Update.
7466
7467 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7468
7469         * stack.c (func_command): Remove trailing newline in call to error.
7470
7471 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7472
7473         * regcache.h (regcache_raw_collect): Remove, update callers to
7474         use regcache::raw_collect.
7475         * regcache.c (regcache_raw_collect): Remove.
7476
7477 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7478
7479         * regcache.h (regcache_raw_supply): Remove, update callers to
7480         use detached_regcache::raw_supply.
7481         * regcache.c (regcache_raw_supply): Remove.
7482
7483 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7484
7485         * regcache.h (regcache_cooked_write_part): Remove, update
7486         callers to use regcache::cooked_write_part.
7487         * regcache.c (regcache_cooked_write_part): Remove.
7488
7489 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7490
7491         * regcache.h (regcache_cooked_read_part): Remove, update callers
7492         to use readable_regcache::cooked_read_part.
7493         * regcache.c (regcache_cooked_read_part): Remove.
7494
7495 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7496
7497         * regcache.h (regcache_cooked_read_value): Remove, update
7498         callers to use readable_regcache::cooked_read_value.
7499         * regcache.c (regcache_cooked_read_value): Remove.
7500
7501 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7502
7503         * regcache.h (regcache_cooked_write): Remove, update callers to
7504         use regcache::cooked_write.
7505         * regcache.c (regcache_cooked_write): Remove.
7506
7507 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7508
7509         * regcache.h (regcache_invalidate): Remove, update callers to
7510         use detached_regcache::invalidate instead.
7511         * regcache.c (regcache_invalidate): Remove.
7512
7513 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7514
7515         * regcache.h (regcache_raw_write_part): Remove, update callers
7516         to use regcache::raw_write_part instead.
7517         * regcache.c (regcache_raw_write_part): Remove.
7518
7519 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7520
7521         * regcache.h (regcache_raw_read_part): Remove, update callers to
7522         use readable_regcache::raw_read_part instead.
7523         * regcache.c (regcache_raw_read_part): Remove.
7524
7525 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7526
7527         * regcache.h (regcache_cooked_read): Remove, update callers to
7528         use readable_regcache::cooked_read instead.
7529         * regcache.c (regcache_cooked_read): Remove.
7530
7531 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7532
7533         * regcache.h (regcache_raw_write): Remove, update callers to use
7534         regcache::raw_write instead.
7535         * regcache.c (regcache_raw_write): Remove.
7536
7537 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7538
7539         * regcache.h (regcache_raw_read): Remove, update callers to use
7540         readable_regcache::raw_read instead.
7541         * regcache.c (regcache_raw_read): Remove.
7542
7543 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7544
7545         * regcache.h (regcache_raw_update): Remove, update callers to
7546         use readable_regcache::raw_update instead.
7547         * regcache.c (regcache_raw_update): Remove.
7548
7549 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7550
7551         * regcache.h (regcache_register_status): Remove, update callers
7552         to use reg_buffer::get_register_status directly instead.
7553         * regcache.c (regcache_register_status): Remove.
7554
7555 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7556
7557         * regcache.h (regcache_get_ptid): Remove, update all callers to
7558         call regcache::ptid instead.
7559         * regcache.c (regcache_get_ptid): Remove.
7560
7561 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7562
7563         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7564
7565 2018-05-30  Pedro Alves  <palves@redhat.com>
7566
7567         * common/common-exceptions.h (exception_rethrow): Use
7568         ATTRIBUTE_NORETURN.
7569
7570 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7571
7572         * breakpoint.c (print_solib_event, check_status_catch_solib):
7573         Remove struct keyword in range-based for loops.
7574         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7575         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7576         Likewise.
7577         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7578         Likewise.
7579         * symfile.c (addr_info_make_relative): Likewise.
7580         * thread.c (value_in_thread_stack_temporaries): Likewise.
7581
7582 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7583
7584         PR gdb/16841
7585         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7586         aggregate type to get its real type before accessing it.
7587
7588 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7589
7590         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7591         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7592         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7593         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7594         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7595         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7596         * printcmd.c (info_address_command): Likewise.
7597
7598 2018-05-29  Tom Tromey  <tom@tromey.com>
7599
7600         * windows-nat.c (handle_exception): Update fall-through comment.
7601
7602 2018-05-29  Tom Tromey  <tom@tromey.com>
7603
7604         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7605         (struct program_space) <added_solibs>: Now a std::vector.
7606         * breakpoint.c (print_solib_event): Update.
7607         (check_status_catch_solib): Update.
7608         * progspace.c (clear_program_space_solib_cache): Update.
7609         * solib.c (update_solib_list): Update.
7610
7611 2018-05-29  Tom Tromey  <tom@tromey.com>
7612
7613         * python/py-type.c (typy_richcompare): Update.
7614         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7615         * gdbtypes.h (types_deeply_equal): Return bool.
7616         (types_equal): Likewise.
7617         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7618         declare VEC.
7619         (check_types_equal): Change worklist to std::vector.  Return
7620         bool.
7621         (struct type_equality_entry): Add constructor.
7622         (compare_maybe_null_strings): Return bool.
7623         (check_types_worklist): Return bool.  Change worklist to
7624         std::vector.
7625         (types_deeply_equal): Use std::vector.
7626         (types_equal): Return bool.
7627         (compare_maybe_null_strings): Simplify.
7628
7629 2018-05-29  Tom Tromey  <tom@tromey.com>
7630
7631         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7632
7633 2018-05-29  Tom Tromey  <tom@tromey.com>
7634
7635         * objc-lang.h: Don't include cp-support.h.
7636         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7637         declare VEC.
7638
7639 2018-05-27  Tom Tromey  <tom@tromey.com>
7640
7641         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7642
7643 2018-05-25  Tom Tromey  <tom@tromey.com>
7644
7645         * value.c (value::location): Initialize.
7646
7647 2018-05-25  Tom Tromey  <tom@tromey.com>
7648
7649         * dbxread.c (init_bincl_list): Remove.
7650         (bincl_list): Now a std::vector.
7651         (bincls_allocated, next_bincl): Remove.
7652         (free_bincl_list, do_free_bincl_list_cleanup)
7653         (make_cleanup_free_bincl_list): Remove.
7654         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7655         unique_xmalloc_ptr.
7656         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7657         (struct header_file_location): Add constructor.
7658         (add_bincl_to_list): Remove.
7659
7660 2018-05-25  Tom Tromey  <tom@tromey.com>
7661
7662         * tui/tui.c (tui_enable): Update.
7663         * mi/mi-interp.c (mi_interp::init): Update.
7664         * interps.h (class interp) <name>: New method.
7665         <m_name>: Rename from name.
7666         (~scoped_restore_interp): Update.
7667         * interps.c (interp::interp): Update.
7668         (interp_add, interp_set, interp_lookup_existing)
7669         (current_interp_named_p): Update.
7670
7671 2018-05-25  Tom Tromey  <tom@tromey.com>
7672
7673         * interps.c (interp_name): Remove.
7674         * mi/mi-interp.c (mi_interp::init): Update.
7675         * interps.h (interp_name): Remove.
7676         (~scoped_restore_interp): Update.
7677         * tui/tui.c (tui_enable): Update.
7678
7679 2018-05-25  Tom Tromey  <tom@tromey.com>
7680
7681         * utils.c (fputs_maybe_filtered): Update.
7682         * linespec.c (decode_line_full): Update.
7683         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7684         (mi_print_breakpoint_for_event, mi_solib_loaded)
7685         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7686         (mi_user_selected_context_changed): Update.
7687         * mi/mi-main.c (mi_execute_command): Update.
7688         * cli/cli-script.c (execute_control_command): Update.
7689         * python/python.c (execute_gdb_command): Update.
7690         * solib.c (info_sharedlibrary_command): Update.
7691         * interps.c (interp_ui_out): Remove.
7692         * interps.h (interp_ui_out): Remove.
7693
7694 2018-05-25  Tom Tromey  <tom@tromey.com>
7695
7696         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7697         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7698         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7699
7700 2018-05-25  Tom Tromey  <tom@tromey.com>
7701
7702         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7703         * interps.c (interp_exec): Use scoped_restore.
7704
7705 2018-05-25  Tom Tromey  <tom@tromey.com>
7706
7707         * remote.c (remote_target::remote_file_get): Use
7708         gdb::byte_vector.
7709         (remote_target::remote_file_put): Likewise.
7710
7711 2018-05-25  Tom Tromey  <tom@tromey.com>
7712
7713         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7714         a std::string.
7715         (get_pe_section_index, add_pe_exported_sym): Update.
7716         (read_pe_exported_syms): Use gdb::def_vector.
7717
7718 2018-05-25  Tom Tromey  <tom@tromey.com>
7719
7720         * frame.c (remove_prev_frame): Remove.
7721         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7722
7723 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7724
7725         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7726         Remove prototypes.
7727         * mips-linux-nat.c (supply_fpregset): Always call
7728         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7729         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7730         `mips_fill_fpregset'.
7731         * mips-linux-tdep.c (mips_supply_fpregset)
7732         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7733         (mips_fill_fpregset_wrapper): Remove functions.
7734         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7735         (mips_linux_fpregset): Remove variable.
7736         (mips_linux_iterate_over_regset_sections): Use
7737         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7738         (mips_linux_o32_sigframe_init): Remove comment.
7739
7740 2018-05-25  Pedro Alves  <palves@redhat.com>
7741
7742         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7743         (struct readahead_cache, struct packet_reg, struct
7744         remote_arch_state, class remote_state): Move higher up in the
7745         file.
7746         (remote_target::m_remote_state): Now an object instead of a pointer.
7747         (remote_target::get_remote_state): Adjust.
7748
7749 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7750
7751         * stack.c (select_and_print_frame): Delete.
7752         (struct function_bounds): Move struct within function.
7753         (func_command): Most content moved into new function
7754         find_frame_for_function, use new function, print result, add
7755         function comment.
7756         (find_frame_for_function): New function, now returns a result.
7757
7758 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7759
7760         * stack.c (iterate_over_block_arg_vars): Fix comment.
7761         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7762
7763 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7764
7765         PR gdb/23203
7766         * frame.c
7767         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7768         Define.
7769         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7770         Define.
7771         * frame.h (class scoped_restore_selected_frame): New class.
7772         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7773         of any exception, use scoped_restore_selected_frame to restore the
7774         frame instead.
7775
7776 2018-05-24  Pedro Alves  <palves@redhat.com>
7777
7778         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7779         override.
7780
7781 2018-05-23  Tom Tromey  <tom@tromey.com>
7782
7783         * complaints.c (struct complaints): Remove.
7784         (symfile_complaint_book): Remove.
7785         (series): New global.
7786         (complaint_internal): Update.
7787         (clear_complaints): Update.
7788
7789 2018-05-23  Tom Tromey  <tom@tromey.com>
7790
7791         * complaints.c (counters): New global.
7792         (struct complain): Remove.
7793         (struct complaints) <root>: Remove.
7794         (complaint_sentinel): Remove.
7795         (symfile_complaint_book): Update.
7796         (find_complaint) Remove.
7797         (complaint_internal, clear_complaints): Update.
7798
7799 2018-05-23  Tom Tromey  <tom@tromey.com>
7800
7801         * complaints.c (struct complain) <file, line>: Remove.
7802         (find_complaint): Remove file, line parameters.
7803         (complaint_internal): Update.
7804
7805 2018-05-23  Tom Tromey  <tom@tromey.com>
7806
7807         * complaints.c (vcomplaint): Remove.
7808         (complaint_internal) Merge in contents of vcomplaint.
7809
7810 2018-05-23  Tom Tromey  <tom@tromey.com>
7811
7812         * complaints.c (struct complaints) <explanation>: Remove.
7813         (symfile_explanations): Remove.
7814         (symfile_complaint_book): Update.
7815         (vcomplaint): Update.
7816         (struct explanation): Remove.
7817
7818 2018-05-23  Tom Tromey  <tom@tromey.com>
7819
7820         * complaints.c (symfile_complaints): Remove.
7821         (complaint_internal): Remove "complaints" parameter.
7822         (clear_complaints, vcomplaint): Remove "c" parameter.
7823         (get_complaints): Remove.
7824         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7825         (dwarf2_debug_line_missing_file_complaint)
7826         (dwarf2_debug_line_missing_end_sequence_complaint)
7827         (dwarf2_complex_location_expr_complaint)
7828         (dwarf2_const_value_length_mismatch_complaint)
7829         (dwarf2_section_buffer_overflow_complaint)
7830         (dwarf2_macro_malformed_definition_complaint)
7831         (dwarf2_invalid_attrib_class_complaint)
7832         (create_addrmap_from_index, dw2_symtab_iter_next)
7833         (dw2_expand_marked_cus)
7834         (dw2_debug_names_iterator::find_vec_in_debug_names)
7835         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7836         (create_debug_type_hash_table, init_cutu_and_read_dies)
7837         (partial_die_parent_scope, add_partial_enumeration)
7838         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7839         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7840         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7841         (create_cus_hash_table, create_dwp_hash_table)
7842         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7843         (dwarf2_rnglists_process, dwarf2_ranges_process)
7844         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7845         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7846         (handle_struct_member_die, process_structure_scope)
7847         (read_array_type, read_common_block, read_module_type)
7848         (read_tag_pointer_type, read_typedef, read_base_type)
7849         (read_subrange_type, load_partial_dies, partial_die_info::read)
7850         (partial_die_info::read, partial_die_info::read)
7851         (partial_die_info::read, read_checked_initial_length_and_offset)
7852         (dwarf2_string_attr, read_formatted_entries)
7853         (dwarf_decode_line_header)
7854         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7855         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7856         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7857         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7858         (get_signatured_type, get_DW_AT_signature_type)
7859         (decode_locdesc, file_file_name, consume_improper_spaces)
7860         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7861         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7862         (dwarf2_symbol_mark_computed, set_die_type)
7863         (read_attribute_value): Update.
7864         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7865         Update.
7866         * dbxread.c (unknown_symtype_complaint)
7867         (lbrac_mismatch_complaint, repeated_header_complaint)
7868         (set_namestring, function_outside_compilation_unit_complaint)
7869         (read_dbx_symtab, process_one_symbol): Update.
7870         * gdbtypes.c (stub_noname_complaint): Update.
7871         * windows-nat.c (handle_unload_dll): Update.
7872         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7873         (decode_base_type): Update.
7874         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7875         (eb_complaint, record_include_begin, record_include_end)
7876         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7877         (process_xcoff_symbol, read_symbol)
7878         (function_outside_compilation_unit_complaint)
7879         (scan_xcoff_symtab): Update.
7880         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7881         * buildsym.c (finish_block_internal, make_blockvector)
7882         (end_symtab_get_static_block, augment_type_symtab): Update.
7883         * dtrace-probe.c (dtrace_process_dof)
7884         (dtrace_static_probe_ops::get_probes): Update.
7885         * complaints.h (struct complaint): Don't declare.
7886         (symfile_complaints): Remove.
7887         (complaint_internal): Remove "complaints" parameter.
7888         (complaint): Likewise.
7889         (clear_complaints): Likewise.
7890         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7891         (reread_symbols): Update.
7892         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7893         (dwarf2_frame_cache, decode_frame_entry): Update.
7894         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7895         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7896         (info_selectors_command): Update.
7897         * macrotab.c (macro_include, check_for_redefinition)
7898         (macro_undef): Update.
7899         * objfiles.c (filter_overlapping_sections): Update.
7900         * stabsread.c (invalid_cpp_abbrev_complaint)
7901         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7902         (define_symbol, error_type, read_type, rs6000_builtin_type)
7903         (stabs_method_name_from_physname, read_member_functions)
7904         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7905         (attach_fields_to_type, complain_about_struct_wipeout)
7906         (read_range_type, read_args, common_block_start)
7907         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7908         Update.
7909         * mdebugread.c (index_complaint, unknown_ext_complaint)
7910         (basic_type_complaint, bad_tag_guess_complaint)
7911         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7912         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7913         (parse_procedure, parse_lines)
7914         (function_outside_compilation_unit_complaint)
7915         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7916         (bad_tag_guess_complaint, reg_value_complaint): Update.
7917         * cp-support.c (demangled_name_complaint): Update.
7918         * macroscope.c (sal_macro_scope): Update.
7919         * dwarf-index-write.c (class debug_names): Update.
7920
7921 2018-05-23  Tom Tromey  <tom@tromey.com>
7922
7923         * complaints.c (clear_complaints): Remove "noisy" parameter.
7924         * complaints.h (clear_complaints): Update.
7925         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7926         (reread_symbols): Update.
7927
7928 2018-05-23  Tom Tromey  <tom@tromey.com>
7929
7930         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7931         SUBSEQUENT_MESSAGE.
7932         (vcomplaint, clear_complaints): Update.
7933         (symfile_explanations): Remove some messages.
7934
7935 2018-05-23  Tom Tromey  <tom@tromey.com>
7936
7937         * complaints.c (internal_complaint): Remove.
7938         * complaints.h (internal_complaint): Remove.
7939
7940 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7941
7942         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7943
7944 2018-05-22  Pedro Alves  <palves@redhat.com>
7945
7946         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7947         (remote_fileio_badfd, remote_fileio_return_errno)
7948         (remote_fileio_return_success, remote_fileio_func_open)
7949         (remote_fileio_func_open, remote_fileio_func_close)
7950         (remote_fileio_func_read, remote_fileio_func_write)
7951         (remote_fileio_func_lseek, remote_fileio_func_rename)
7952         (remote_fileio_func_unlink, remote_fileio_func_stat)
7953         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7954         (remote_fileio_func_isatty, remote_fileio_func_system): Add
7955         remote_target parameter.
7956         (remote_fio_func_map) <func>: Add remote_target parameter.
7957         (do_remote_fileio_request, remote_fileio_request):
7958         * remote-fileio.h (remote_fileio_request):
7959         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7960         remote_target parameter.
7961         (remote_notif_process, handle_notification): Adjust to pass down
7962         the remote.
7963         (remote_notif_state_allocate): Add remote_target parameter.  Save
7964         it.
7965         * remote-notif.h (struct remote_target): Forward declare.
7966         (struct notif_client) <parse, ack, can_get_pending_events>: Add
7967         remote_target parameter.
7968         (struct remote_notif_state) <remote>: New field.
7969         (remote_notif_ack, remote_notif_parse): Add remote_target
7970         parameter.
7971         (remote_notif_state_allocate, remote_notif_state_allocate): Add
7972         remote_target parameter.
7973         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7974         (threads_listing_context, rmt_thread_action, protocol_feature)
7975         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7976         (packet_result, struct threads_listing_context, remote_state):
7977         Move definitions and declarations higher up.
7978         (remote_target) <~remote_target>: Declare.
7979         (remote_download_command_source, remote_file_put, remote_file_get)
7980         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7981         (remote_hostio_pread_vFile, remote_hostio_send_command)
7982         (remote_hostio_set_filesystem, remote_hostio_open)
7983         (remote_hostio_close, remote_hostio_unlink, remote_state)
7984         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7985         (get_memory_write_packet_size, get_memory_read_packet_size)
7986         (append_pending_thread_resumptions, remote_detach_1)
7987         (append_resumption, remote_resume_with_vcont)
7988         (add_current_inferior_and_thread, wait_ns, wait_as)
7989         (process_stop_reply, remote_notice_new_inferior)
7990         (process_initial_stop_replies, remote_add_thread)
7991         (btrace_sync_conf, remote_btrace_maybe_reopen)
7992         (remove_new_fork_children, kill_new_fork_children)
7993         (discard_pending_stop_replies, stop_reply_queue_length)
7994         (check_pending_events_prevent_wildcard_vcont)
7995         (discard_pending_stop_replies_in_queue, stop_reply)
7996         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7997         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7998         (remote_interrupt_as, remote_interrupt_ns)
7999         (remote_get_noisy_reply, remote_query_attached)
8000         (remote_add_inferior, remote_current_thread, get_current_thread)
8001         (set_thread, set_general_thread, set_continue_thread)
8002         (set_general_process, write_ptid)
8003         (remote_unpack_thread_info_response, remote_get_threadinfo)
8004         (parse_threadlist_response, remote_get_threadlist)
8005         (remote_threadlist_iterator, remote_get_threads_with_ql)
8006         (remote_get_threads_with_qxfer)
8007         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
8008         (get_offsets, remote_check_symbols, remote_supported_packet)
8009         (remote_query_supported, remote_packet_size)
8010         (remote_serial_quit_handler, remote_detach_pid)
8011         (remote_vcont_probe, remote_resume_with_hc)
8012         (send_interrupt_sequence, interrupt_query)
8013         (remote_notif_get_pending_events, fetch_register_using_p)
8014         (send_g_packet, process_g_packet, fetch_registers_using_g)
8015         (store_register_using_P, store_registers_using_G)
8016         (set_remote_traceframe, check_binary_download)
8017         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
8018         (remote_xfer_live_readonly_partial, remote_read_bytes)
8019         (remote_send_printf, remote_flash_write, readchar)
8020         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
8021         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
8022         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
8023         (extended_remote_disable_randomization, extended_remote_run)
8024         (send_environment_packet, extended_remote_environment_support)
8025         (extended_remote_set_inferior_cwd, remote_write_qxfer)
8026         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
8027         (packet_command): Now methods of ...
8028         (remote_target): ... this class.
8029         (m_remote_state) <remote_target>: New field.
8030         (struct remote_state) <stop_reply_queue,
8031         remote_async_inferior_event_token, wait_forever_enabled_p>: New
8032         fields.
8033         (remote_state::remote_state): Allocate stop_reply_queue.
8034         (remote_state): Delete global.
8035         (get_remote_state_raw): Delete.
8036         (remote_target::get_remote_state): Allocate m_remote_state on
8037         demand.
8038         (get_current_remote_target): New.
8039         (remote_ops, extended_remote_ops): Delete.
8040         (wait_forever_enabled_p, remote_async_inferior_event_token):
8041         Delete, moved to struct remote_state.
8042         (remote_target::close): Delete self.  Destruction bits split to
8043         ...
8044         (remote_target::~remote_target): ... this.
8045         (show_memory_packet_size): Adjust to use
8046         get_current_remote_target.
8047         (struct protocol_feature) <func>: Add remote_target parameter.
8048         All callers adjusted.
8049         (curr_quit_handler_target): New.
8050         (remote_serial_quit_handler): Reimplement.
8051         (remote_target::open_1): Adjust to use get_current_remote_target.
8052         Heap-allocate remote_target/extended_remote_target instances.
8053         (vcont_builder::vcont_builder): Add remote_target parameter, and
8054         save it in m_remote.  All callers adjusted.
8055         (vcont_builder::m_remote): New field.
8056         (vcont_builder::restart, vcont_builder::flush)
8057         (vcont_builder::push_action): Use it.
8058         (remote_target::commit_resume): Use it.
8059         (struct queue_iter_param) <remote>: New field.
8060         (remote_target::remove_new_fork_children): Fill in 'remote' field.
8061         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
8062         (check_pending_event_prevents_wildcard_vcont_callback)
8063         (remote_target::check_pending_events_prevent_wildcard_vcont)
8064         (remote_target::discard_pending_stop_replies)
8065         (remote_target::discard_pending_stop_replies_in_queue)
8066         (remote_target::remote_notif_remove_queued_reply): Fill in
8067         'remote' field.
8068         (remote_notif_get_pending_events): New.
8069         (remote_target::readchar, remote_target::remote_serial_write):
8070         Save/restore curr_quit_handler_target.
8071         (putpkt): New.
8072         (kill_new_fork_children): Fill in 'remote' field.
8073         (packet_command): Use get_current_remote_target, defer to
8074         remote_target method of same name.
8075         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
8076         parameter, and save it in m_remote.  All callers adjusted.
8077         (scoped_remote_fd::release): Use m_remote.
8078         (scoped_remote_fd::m_remote): New field.
8079         (remote_file_put, remote_file_get, remote_file_delete): Use
8080         get_current_remote_target, defer to remote_target method of same
8081         name.
8082         (remote_btrace_reset): Add remote_state paremeter.  Update all
8083         callers.
8084         (remote_async_inferior_event_handler). Pass down 'data'.
8085         (remote_new_objfile): Use get_current_remote_target.
8086         (remote_target::vcont_r_supported): New.
8087         (set_range_stepping): Use get_current_remote_target and
8088         remote_target::vcont_r_supported.
8089         (_initialize_remote): Don't allocate 'remote_state' and
8090         'stop_reply_queue' globals.
8091         * remote.h (struct remote_target): Forward declare.
8092         (getpkt, putpkt, remote_notif_get_pending_events): Add
8093         'remote_target' parameter.
8094
8095 2018-05-22  Pedro Alves  <palves@redhat.com>
8096
8097         * remote.c (vcont_builder): Now a class.  Make all data members
8098         private.
8099         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8100         Declare methods.
8101         (vcont_builder_restart): Rename to ...
8102         (vcont_builder::restart): ... this.
8103         (vcont_builder_flush): Rename to ...
8104         (vcont_builder::flush): ... this.
8105         (vcont_builder_push_action): Rename to ...
8106         (vcont_builder::push_action): ... this.
8107         (remote_target::commit_resume): Adjust.
8108
8109 2018-05-22  Pedro Alves  <palves@redhat.com>
8110
8111         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8112         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8113         (get_fixed_memory_packet_size): New.
8114         (get_memory_packet_size): Use it.
8115         (set_memory_packet_size): Don't override the config size with
8116         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8117         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8118         Don't refer to get_memory_packet_size if not connected to a remote
8119         target.  Show "(default)" if configured size is 0.
8120
8121 2018-05-22  Pedro Alves  <palves@redhat.com>
8122
8123         * remote.c (remote_target::mourn_inferior): Move
8124         discard_pending_stop_replies call here from ...
8125         (_initialize_remote): ... here.
8126
8127 2018-05-22  Pedro Alves  <palves@redhat.com>
8128
8129         * remote.c (compare_section_command): Remove set_general_process
8130         call.
8131
8132 2018-05-22  Pedro Alves  <palves@redhat.com>
8133
8134         * remote.c (struct packet_reg, struct remote_arch_state):
8135         Move higher up in the file.
8136         (remote_state) <m_arch_states>: Store remote_arch_state values
8137         instead of remote_arch_state pointers.
8138         (remote_state::get_remote_arch_state): Adjust.
8139
8140 2018-05-22  Pedro Alves  <palves@redhat.com>
8141
8142         * remote.c: Include <unordered_map>.
8143         (remote_state): Now a class.
8144         (remote_state) <get_remote_arch_state>: Declare method.
8145         <get_remote_arch_state>: New field.
8146         (remote_arch_state) <remote_arch_state>: Declare ctor.
8147         <regs>: Now a unique_ptr.
8148         (remote_gdbarch_data_handle): Delete.
8149         (get_remote_arch_state): Delete.
8150         (remote_state::get_remote_arch_state): New.
8151         (get_remote_state): Adjust to call remote_state's
8152         get_remote_arch_state method.
8153         (init_remote_state): Delete, bits factored out to ...
8154         (remote_arch_state::remote_arch_state): ... this new method.
8155         (get_remote_packet_size, get_memory_packet_size)
8156         (process_g_packet, remote_target::fetch_registers)
8157         (remote_target::prepare_to_store, store_registers_using_G)
8158         (remote_target::store_registers, remote_target::get_trace_status):
8159         Adjust to call remote_state's method.
8160         (_initialize_remote): Remove reference to
8161         remote_gdbarch_data_handle.
8162
8163 2018-05-22  Pedro Alves  <palves@redhat.com>
8164
8165         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8166         pread>: New method declarations.
8167         (remote_target::open_1): Adjust.
8168         (readahead_cache_invalidate): Rename to ...
8169         (readahead_cache::invalidate): ... this, and adjust to be a class
8170         method.
8171         (readahead_cache_invalidate_fd): Rename to ...
8172         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8173         class method.
8174         (remote_hostio_pwrite): Adjust.
8175         (remote_hostio_pread_from_cache): Rename to ...
8176         (readahead_cache::pread): ... this, and adjust to be a class
8177         method.
8178         (remote_hostio_close): Adjust.
8179
8180 2018-05-22  Pedro Alves  <palves@redhat.com>
8181
8182         * remote.c (remote_hostio_close_cleanup): Delete.
8183         (class scoped_remote_fd): New.
8184         (remote_file_put, remote_file_get): Use it.
8185
8186 2018-05-22  Pedro Alves  <palves@redhat.com>
8187
8188         (struct vCont_action_support): Use bool and initialize all fields.
8189         (struct readahead_cache): Initialize all fields.
8190         (remote_state): Use bool and initialize all fields.
8191         (remote_state::remote_state, remote_state::~remote_state): New.
8192         (new_remote_state): Delete.
8193         (_initialize_remote): Use new to allocate remote_state.
8194
8195 2018-05-22  Pedro Alves  <palves@redhat.com>
8196             張俊芝  <zjz@zjz.name>
8197
8198         PR gdb/22973
8199         * c-exp.y: Include "c-support.h".
8200         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8201         of tolower.  Use c_ident_is_alpha to scan names.
8202         * c-lang.c: Include "c-support.h".
8203         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8204         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8205         * c-support.h: New file, with bits factored out from ...
8206         * cp-name-parser.y: ... this file.
8207         Include "c-support.h".
8208         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8209         c-support.h and renamed.
8210         (symbol_end, yylex): Adjust.
8211
8212 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8213
8214         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8215         parameter type to CORE_ADDR.
8216         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8217         parameter type in declaration to CORE_ADDR.
8218         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8219         target_auxv_search to get AT_HWCAP and use the result to get the
8220         target description.
8221         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8222         to CORE_ADDR. Remove the cast of the return value to unsigned
8223         long. Fix error predicate of target_auxv_search.
8224         (ppc_linux_nat_target::read_description): Change the type of the
8225         hwcap variable to CORE_ADDR.
8226
8227 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8228
8229         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8230         if the size of fpscr is larger than 32 bits.
8231
8232 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8233
8234         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8235         (ppc32_linux_vsxregmap): New global.
8236         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8237         regcache_supply_regset, and regcache_collect_regset.
8238         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8239         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8240         (fetch_vsx_register, store_vsx_register): Remove.
8241         (fetch_vsx_registers): Add regno parameter. Get regset using
8242         ppc_linux_vsxregset. Use regset to supply registers.
8243         (store_vsx_registers): Add regno parameter. Get regset using
8244         ppc_linux_vsxregset. Use regset to collect registers.
8245         (fetch_register): Call fetch_vsx_registers instead of
8246         fetch_vsx_register.
8247         (store_register): Call store_vsx_registers instead of
8248         store_vsx_register.
8249         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8250         new regno parameter.
8251         (store_ppc_registers): Call store_vsx_registers with -1 for the
8252         new regno parameter.
8253         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8254         (ppc_collect_vsxregset): Remove.
8255
8256 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8257
8258         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8259         offset fields.
8260         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8261         for vector register offset fields.
8262         (ppc64_fbsd_reg_offsets): Likewise.
8263         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8264         to vector register offset fields.
8265         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8266         to vector register offset fields.
8267         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8268         vector register offset fields.
8269         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8270         initializers for vector register offset fields.
8271         (rs6000_aix64_reg_offsets): Likewise.
8272         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8273         (ppc_supply_vrregset): Remove.
8274         (ppc_collect_vrregset): Remove.
8275         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8276         (ppc_linux_vrregset) : New function.
8277         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8278         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8279         (ppc32_linux_vrregset): Remove.
8280         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8281         and use result instead of ppc32_linux_vrregset.
8282         (ppc32_linux_reg_offsets): Remove initializers for vector register
8283         offset fields.
8284         (ppc64_linux_reg_offsets): Likewise.
8285         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8286         * ppc-linux-nat.c: Include regset.h.
8287         (gdb_vrregset_t): Adjust comment to account for little-endian
8288         mode.
8289         (supply_vrregset, fill_vrregset): Remove.
8290         (fetch_altivec_register, store_altivec_register): Remove.
8291         (fetch_altivec_registers): Add regno parameter. Get regset using
8292         ppc_linux_vrregset. Use regset to supply registers.
8293         (store_altivec_registers): Add regno parameter. Get regset using
8294         ppc_linux_vrregset. Use regset to collect registers.
8295         (fetch_register): Call fetch_altivec_registers instead of
8296         fetch_altivec_register.
8297         (store_register): Call store_altivec_registers instead of
8298         store_altivec_register.
8299         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8300         the new regno parameter.
8301         (store_ppc_registers): Call store_altivec_registers with -1 for
8302         the new regno parameter.
8303
8304 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8305
8306         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8307         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8308         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8309         (gdb_vrregset_t): Change array type size to
8310         PPC_LINUX_SIZEOF_VRREGSET.
8311         (gdb_vsxregset_t): Change array type size to
8312         PPC_LINUX_SIZEOF_VSXREGSET.
8313         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8314         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8315         PPC_LINUX_SIZEOF_VSXREGSET.
8316
8317 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8318
8319         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8320         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8321         nat/ppc-linux.c.
8322         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8323         ppc_linux_target_wordsize with tid.
8324         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8325         wordsize with tid.
8326         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8327         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8328         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8329         tid parameter. Remove static specifier.
8330         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8331         (ppc_linux_target_wordsize): New declaration.
8332
8333 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8334
8335         * arch/ppc-linux-common.c: New file.
8336         * arch/ppc-linux-common.h: New file.
8337         * arch/ppc-linux-tdesc.h: New file.
8338         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8339         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8340         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8341         arch/ppc-linux-tdesc.h.
8342         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8343         arch/ppc-linux-tdesc.h.
8344         (ppc_linux_nat_target::read_description): Remove target
8345         description matching code. Fill a ppc_linux_features struct and
8346         call ppc_linux_match_description with it. Move comment about ISA
8347         2.05 to ppc-linux-common.c.
8348         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8349         arch/ppc-linux-tdesc.h.
8350         (ppc_linux_core_read_description): Remove target description
8351         matching code. Fill a ppc_linux_features struct and call
8352         ppc_linux_match_description with it.
8353         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8354         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8355         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8356         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8357         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8358         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8359         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8360         (tdesc_powerpc_e500l): Remove.
8361
8362 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8363
8364         * ada-lang.c (catch_assert_command): Pass empty string instead
8365         of NULL for excep_string argument.
8366
8367 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8368
8369         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8370         the width of the requested register exceeds the width of the
8371         `ptrace' data type.
8372
8373 2018-05-21  Tom Tromey  <tom@tromey.com>
8374
8375         * printcmd.c (output_command): Remove.
8376         (output_command_const): Rename to output_command.
8377         * valprint.h (output_command): Rename from output_command_const.
8378         * tracepoint.c (trace_dump_actions): Call output_command.
8379
8380 2018-05-21  Tom Tromey  <tom@tromey.com>
8381
8382         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8383         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8384         * ada-lang.h (create_ada_exception_catchpoint): Update.
8385         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8386         std::string.
8387         (create_excep_cond_exprs, ~ada_catchpoint)
8388         (should_stop_exception, print_one_exception)
8389         (print_mention_exception, print_recreate_exception): Update.
8390         (ada_get_next_arg): Remove.
8391         (catch_ada_exception_command_split): Use std::string.  Change type
8392         of "excep_string", "cond_string".
8393         (catch_ada_exception_command): Update.
8394         (create_ada_exception_catchpoint): Change type of excep_string.
8395         (ada_exception_sal): Remove excep_string parameter.
8396         (~ada_catchpoint): Remove.
8397
8398 2018-05-21  Tom Tromey  <tom@tromey.com>
8399
8400         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8401         cleanup.
8402
8403 2018-05-21  Tom Tromey  <tom@tromey.com>
8404
8405         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8406         Return unique_xmalloc_ptr.
8407         (print_it_exception): Update.
8408
8409 2018-05-21  Tom Tromey  <tom@tromey.com>
8410
8411         * tracepoint.c (trace_dump_actions): Use std::string.
8412
8413 2018-05-21  Tom Tromey  <tom@tromey.com>
8414
8415         * symfile.c (reread_symbols): Use std::string for original_name.
8416
8417 2018-05-21  Tom Tromey  <tom@tromey.com>
8418
8419         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8420         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8421         constructor.
8422
8423 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8424
8425         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8426         instance to...
8427         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8428         * objfiles.c (get_objfile_bfd_data): Allocate
8429         objfile_per_bfd_storage with obstack_new when allocating on
8430         obstack.
8431
8432 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8433
8434         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8435         OBSTACK_ZALLOC.
8436         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8437         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8438         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8439         (add_pending): Likewise.
8440         (parse_symbol): Likewise.
8441         (parse_partial_symbols): Likewise.
8442         (psymtab_to_symtab_1): Likewise.
8443         (new_psymtab): Likewise.
8444         (elfmdebug_build_psymtabs): Likewise.
8445         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8446         * objfiles.c (get_objfile_bfd_data): Likewise.
8447         (objfile_register_static_link): Likewise.
8448         * psymtab.c (allocate_psymtab): Likewise.
8449         * stabsread.c (read_member_functions): Likewise.
8450         * xcoffread.c (xcoff_end_psymtab): Likewise.
8451
8452 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8453
8454         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8455         compiler supports std::is_trivially_constructible.
8456         * common/poison.h: Include obstack.h.
8457         (IsMallocable): Define to is_trivially_constructible if the
8458         compiler supports it, define to true_type otherwise.
8459         (xobnew): New.
8460         (XOBNEW): Redefine.
8461         (xobnewvec): New.
8462         (XOBNEWVEC): Redefine.
8463         * gdb_obstack.h (obstack_zalloc): New.
8464         (OBSTACK_ZALLOC): Redefine.
8465         (obstack_calloc): New.
8466         (OBSTACK_CALLOC): Redefine.
8467         (obstack_new): New.
8468         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8469         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8470         gdbarch.c.
8471         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8472         obstack_calloc/obstack_zalloc.
8473         (gdbarch_obstack_zalloc): Remove.
8474         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8475
8476 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8477
8478         * stack.c (backtrace_command_1): Remove useless variable int i.
8479
8480 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8481
8482         * stack.c (print_frame_info): Fix comment.
8483
8484 2018-05-18  Tom Tromey  <tom@tromey.com>
8485
8486         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8487         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8488         (~dwarf2_per_objfile): Update
8489         (dwarf2_get_dwz_file): Use new.
8490         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8491         unique_ptr.
8492
8493 2018-05-18  Tom Tromey  <tom@tromey.com>
8494
8495         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8496         unique_ptr.
8497         * dwarf2read.c (struct dwp_file): Add constructor and
8498         initializers.
8499         (open_and_init_dwp_file): Return a unique_ptr.
8500         (dwarf2_per_objfile, create_dwp_hash_table)
8501         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8502         (lookup_dwo_unit_in_dwp): Update.
8503         (open_and_init_dwp_file, get_dwp_file): Update.
8504
8505 2018-05-18  Tom Tromey  <tom@tromey.com>
8506
8507         * dwarf2read.c (dwarf2_per_objfile): Update.
8508         (struct mapped_index): Add initializers.
8509         (dwarf2_read_index): Use new.
8510         (dw2_symtab_iter_init): Update.
8511         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8512         unique_ptr.
8513
8514 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8515
8516         * dwarf2read.c (mapped_index) <total_size>: Remove.
8517
8518 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8519
8520         * unittests/format_pieces-selftests.c (test_format_specifier):
8521         Add ARI comments.
8522
8523 2018-05-18  Tom Tromey  <tom@tromey.com>
8524
8525         * c-typeprint.c (maybe_print_hole): New function.
8526         (c_print_type_struct_field_offset): Update.
8527         (c_type_print_base_struct_union): Call maybe_print_hole.
8528
8529 2018-05-17  Keith Seitz  <keiths@redhat.com>
8530
8531         * breakpoint.c (build_bpstat_chain): New function, moved from
8532         bpstat_stop_status.
8533         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8534         If no stop chain is passed, call build_bpstat_chain to build it.
8535         * breakpoint.h (build_bpstat_chain): Declare.
8536         (bpstat_stop_status): Move documentation here from breakpoint.c.
8537         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8538         build the stop chain and pass it to skip_inline_frames.
8539         Pass this stop chain to bpstat_stop_status.
8540         * inline-frame.c: Include breakpoint.h.
8541         (stopped_by_user_bp_inline_frame): New function.
8542         (skip_inline_frames): Add parameter `stop_chain'.
8543         Move documention to inline-frame.h.
8544         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8545         whether the frame should be elided.
8546         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8547         Add moved documentation and update for new parameter.
8548
8549 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8550
8551         PR cli/14975
8552         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8553         unittests/format_pieces-selftests.c.
8554         * common/format.h (format_piece) <operator==>: New.
8555         (format_pieces) <operator[]>: Remove.
8556         * common/format.c (format_pieces::format_pieces): Handle \e.
8557         * unittests/format_pieces-selftests.c: New.
8558
8559 2018-05-17  Tom Tromey  <tom@tromey.com>
8560
8561         PR symtab/23010:
8562         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8563         (dw2_instantiate_symtab): Add skip_partial parameter.
8564         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8565         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8566         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8567         (dw2_expand_symtabs_matching_one)
8568         (dw2_find_pc_sect_compunit_symtab)
8569         (dw2_debug_names_lookup_symbol)
8570         (dw2_debug_names_expand_symtabs_for_function): Update.
8571         (init_cutu_and_read_dies): Add skip_partial parameter.
8572         (process_psymtab_comp_unit, build_type_psymtabs_1)
8573         (process_skeletonless_type_unit, load_partial_comp_unit)
8574         (psymtab_to_symtab_1): Update.
8575         (load_full_comp_unit): Add skip_partial parameter.
8576         (process_imported_unit_die, dwarf2_read_addr_index)
8577         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8578         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8579         (read_signatured_type): Update.
8580
8581 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8582
8583         * value.c (release_value): Remove unused variable.
8584         (record_latest_value): Likewise.
8585         (access_value_history): Likewise.
8586         (preserve_values): Likewise.
8587
8588 2018-05-17  Tom Tromey  <tom@tromey.com>
8589
8590         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8591         Initialize.
8592
8593 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8594
8595         PR gdb/22286
8596         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8597         Also handle registers whose width is not a multiple of
8598         PTRACE_TYPE_RET.
8599         (linux_nat_trad_target::store_register): Likewise.
8600
8601 2018-05-16  Tom Tromey  <tom@tromey.com>
8602
8603         * gdbcore.h (core_bfd): Redefine.
8604         * corelow.c (core_target::close): Update.
8605         (core_target_open): Update.
8606         * progspace.h (struct program_space) <cbfd>: Now a
8607         gdb_bfd_ref_ptr.
8608
8609 2018-05-16  Tom Tromey  <tom@tromey.com>
8610
8611         PR cli/19551:
8612         * symfile-add-flags.h (enum symfile_add_flags)
8613         <SYMFILE_NOT_FILENAME>: New constant.
8614         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8615         objfile name from BFD.
8616         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8617         * minidebug.c (find_separate_debug_file_in_section): Put
8618         ".gnu_debugdata" into BFD's file name.
8619
8620 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8621
8622         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8623         Remove.
8624
8625 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8626
8627         PR binutils/21446
8628         * aarch64-tdep.c (aarch64_analyze_prologue,
8629         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8630         Indicate not interested in errors.
8631
8632 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8633
8634         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8635         Supply the MIPS_ZERO_REGNUM register.
8636
8637 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8638
8639         * mips-tdep.c (mask_address_var): Make variable static.
8640
8641 2018-05-14  Tom Tromey  <tom@tromey.com>
8642
8643         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8644
8645 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8646
8647         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8648         FXSAVE_ADDR for the mxcsr register.
8649
8650 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8651
8652         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8653
8654 2018-05-11  Pedro Alves  <palves@redhat.com>
8655
8656         * corelow.c (core_target) <core_target>: No longer inline.
8657         Initialize m_core_gdbarch, m_core_vec and build the section table
8658         here.
8659         <~core_target>: New.
8660         <core_gdbarch, get_core_register_section>: New methods.
8661         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8662         factored out from ...
8663         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8664         (core_ops): Delete.
8665         (sniff_core_bfd): Add gdbarch parameter.
8666         (core_close): Delete, merged into ...
8667         (core_target::close): ... here.  Delete self.
8668         (core_close_cleanup): Delete.
8669         (core_target_open): Allocate a core_target on the heap.  Use a
8670         unique_ptr instead of a cleanup.  Bits moved into the core_target
8671         ctor.  Adjust to use core_target methods instead of globals.
8672         (get_core_register_section): Rename to ...
8673         (core_target::get_core_register_section): ... this and adjust.
8674         (struct get_core_registers_cb_data): New.
8675         (get_core_registers_cb): Use it.  Use bool.
8676         (core_target::fetch_registers, core_target::files_info)
8677         (core_target::xfer_partial, core_target::read_description)
8678         (core_target::pid_to, core_target::thread_name): Adjust to
8679         reference class fields instead of globals.
8680         * target.h (struct target_ops_deleter, target_ops_up): New.
8681
8682 2018-05-11  Pedro Alves  <palves@redhat.com>
8683
8684         * corefile.c (core_file_command): Move to corelow.c.
8685         * corelow.c (the_core_target): Delete.
8686         (core_file_command): Moved from corefile.c.  Check exec_bfd
8687         instead of the_core_target.  Use target_detach instead of calling
8688         into the_core_target directly.
8689         (maybe_say_no_core_file_now): New.
8690         (core_target::detach): Use it.
8691         (_initialize_corelow): Remove references to the_core_target.
8692         * gdbcore.h (the_core_target): Delete.
8693
8694 2018-05-11  Tom Tromey  <tromey@redhat.com>
8695             Pedro Alves  <palves@redhat.com>
8696
8697         * corefile.c (core_bfd): Remove.
8698         * gdbcore.h (core_bfd): Now a macro.
8699         * progspace.h (struct program_space) <cbfd>: New field.
8700
8701 2018-05-11  Tom Tromey  <tom@tromey.com>
8702
8703         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8704         gdb::def_vector.
8705
8706 2018-05-10  Tom Tromey  <tom@tromey.com>
8707
8708         * configure: Rebuild.
8709         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8710
8711 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8712
8713         PR server/23158:
8714         * regformats/regdat.sh: Adjust script, following the addition
8715         of the new expedite_regs parameter to init_target_desc.
8716
8717 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8718     
8719         PR gdb/23127
8720         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8721         set_gdbarch_significant_addr_bit.
8722         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8723         set_gdbarch_significant_addr_bit.
8724         * utils.c (address_significant): Update to sign extend addr.
8725
8726 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8727
8728         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8729         (xtensa_linux_init_abi): Limit tdep->num_regs by
8730         tdep->num_nopriv_regs.
8731         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8732         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8733         not initialized.
8734
8735 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8736
8737         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8738
8739 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8740
8741         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8742         (I387_MXCSR_INIT_VAL): New constant.
8743         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8744         buffer if it was supplied by the inferior.
8745         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8746         (i387_xsave_get_clear_bv): New function.
8747         (i387_supply_xsave): Only read x87 control registers from the
8748         xsave buffer if the feature is enabled, and the state will have
8749         been written, otherwise, provide a suitable default.
8750         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8751         including x87 control registers.  Update control registers if they
8752         have changed from the default value, and mark features as enabled
8753         as required.
8754         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8755
8756 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8757
8758         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8759
8760 2018-05-07  Tom Tromey  <tom@tromey.com>
8761
8762         * configure: Rebuild.
8763         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8764
8765 2018-05-07  Tom Tromey  <tom@tromey.com>
8766
8767         PR tdep/20362:
8768         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8769         bit.  Use correct value for VDIV.
8770
8771 2018-05-04  Tom Tromey  <tom@tromey.com>
8772
8773         * configure: Rebuild.
8774         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8775
8776 2018-05-04  Tom Tromey  <tom@tromey.com>
8777
8778         * linux-record.c (record_linux_system_call) <case
8779         RECORD_SYS_RECVFROM>: Add "break".
8780
8781 2018-05-04  Tom Tromey  <tom@tromey.com>
8782
8783         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8784         Add missing "break".
8785         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8786         Add missing "break".
8787
8788 2018-05-04  Tom Tromey  <tom@tromey.com>
8789
8790         * rs6000-tdep.c (ppc_process_record_op4)
8791         (ppc_process_record_op63): Add fall-through comment.
8792
8793 2018-05-04  Tom Tromey  <tom@tromey.com>
8794
8795         * i386-tdep.c (i386_process_record): Add fall-through comment.
8796
8797 2018-05-04  Tom Tromey  <tom@tromey.com>
8798
8799         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8800         comment.
8801
8802 2018-05-04  Tom Tromey  <tom@tromey.com>
8803
8804         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8805         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8806         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8807         comment.
8808         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8809         comment.
8810         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8811         comment.
8812
8813 2018-05-04  Tom Tromey  <tom@tromey.com>
8814
8815         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8816
8817 2018-05-04  Tom Tromey  <tom@tromey.com>
8818
8819         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8820         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8821         * symfile.c (section_is_mapped): Fix fall-through comment.
8822         * stabsread.c (define_symbol, read_member_functions): Fix
8823         fall-through comment.
8824         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8825         comment.
8826         * remote.c (remote_wait_as): Fix fall-through comment.
8827         * p-exp.y (yylex): Fix fall-through comment.
8828         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8829         comment.
8830         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8831         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8832         * jv-exp.y (yylex): Fix fall-through comment.
8833         * go-exp.y (lex_one_token): Fix fall-through comment.
8834         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8835         fall-through comment.
8836         * f-exp.y (yylex): Fix fall-through comment.
8837         * dwarf2read.c (process_die): Fix fall-through comments.
8838         * dbxread.c (process_one_symbol): Fix fall-through comment.
8839         * d-exp.y (lex_one_token): Fix fall-through comment.
8840         * cp-name-parser.y (yylex): Fix fall-through comment.
8841         * coffread.c (coff_symtab_read): Fix fall-through comment.
8842         * c-exp.y (lex_one_token): Fix fall-through comment.
8843         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8844         comment.
8845         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8846         comment.
8847
8848 2018-05-04  Tom Tromey  <tom@tromey.com>
8849
8850         PR python/22730:
8851         * NEWS: Mention gdb.execute change.
8852         * gdbcmd.h (execute_control_command): Don't declare.
8853         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8854         execute_control_commands, execute_control_commands_to_string.
8855         * cli/cli-script.h (execute_control_commands)
8856         (execute_control_commands_to_string): Declare.
8857         (execute_control_command): Add from_tty parameter.
8858         * cli/cli-script.c (execute_control_commands)
8859         (execute_control_commands_to_string): New functions.
8860         (execute_user_command): Use execute_control_commands.
8861         (execute_control_command_1): Add "from_tty" parameter.  Update.
8862         (execute_control_command): Likewise.
8863
8864 2018-05-04  Tom Tromey  <tom@tromey.com>
8865
8866         PR python/22731:
8867         * NEWS: Mention that breakpoint commands are writable.
8868         * python/py-breakpoint.c (bppy_set_commands): New function.
8869         (breakpoint_object_getset) <"commands">: Use it.
8870
8871 2018-05-04  Tom Tromey  <tom@tromey.com>
8872
8873         * tracepoint.c (actions_command): Update.
8874         * mi/mi-cmd-break.c (mi_command_line_array)
8875         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8876         (mi_read_next_line): Remove.
8877         (mi_cmd_break_commands): Update.
8878         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8879         function_view.
8880         * cli/cli-script.c (get_command_line): Update.
8881         (process_next_line): Use function_view.  Constify.
8882         (recurse_read_control_structure, read_command_lines)
8883         (read_command_lines_1): Change argument types to function_view.
8884         (do_define_command, document_command): Update.
8885         * breakpoint.h (check_tracepoint_command): Don't declare.
8886         * breakpoint.c (check_tracepoint_command): Remove.
8887         (commands_command_1, create_tracepoint_from_upload): Update.
8888
8889 2018-05-04  Tom Tromey  <tom@tromey.com>
8890
8891         PR gdb/11750:
8892         * cli/cli-script.h (enum command_control_type) <define_control>:
8893         New constant.
8894         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8895         (build_command_line, execute_control_command_1)
8896         (process_next_line): Likewise.
8897         (do_define_command): New function, extracted from define_command.
8898         (define_command): Use it.
8899
8900 2018-05-04  Tom Tromey  <tom@tromey.com>
8901
8902         * tracepoint.c (actions_command): Update.
8903         * cli/cli-script.h (read_command_lines): Update.
8904         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8905         (MAX_TMPBUF): Remove define.
8906         (define_command): Use string_printf.
8907         (document_command): Likewise.
8908         * breakpoint.c (commands_command_1): Update.
8909
8910 2018-05-04  Tom Tromey  <tom@tromey.com>
8911
8912         * top.c (execute_command): Update.
8913         * cli/cli-script.h (print_command_lines): Now varargs.
8914         * cli/cli-script.c (print_command_lines): Now varargs.
8915         (execute_control_command_1) <case while_control, case if_control>:
8916         Update.
8917
8918 2018-05-04  Tom Tromey  <tom@tromey.com>
8919
8920         * tracepoint.c (all_tracepoint_actions): Rename from
8921         all_tracepoint_actions_and_cleanup.  Change return type.
8922         (actions_command, encode_actions_1, encode_actions)
8923         (trace_dump_actions, tdump_command): Update.
8924         * remote.c (remote_download_command_source): Update.
8925         * python/python.c (gdbpy_eval_from_control_command)
8926         (python_command, python_interactive_command): Update.
8927         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8928         * guile/guile.c (guile_command)
8929         (gdbscm_eval_from_control_command, guile_command): Update.
8930         * compile/compile.c (compile_code_command)
8931         (compile_print_command, compile_to_object): Update.
8932         * cli/cli-script.h (struct command_lines_deleter): New.
8933         (counted_command_line): New typedef.
8934         (struct command_line): Add constructor, destructor.
8935         <body_list>: Remove.
8936         <body_list_0, body_list_1>: New members.
8937         (command_line_up): Remove typedef.
8938         (read_command_lines, read_command_lines_1, get_command_line):
8939         Update.
8940         (copy_command_lines): Don't declare.
8941         * cli/cli-script.c (build_command_line): Use "new".
8942         (get_command_line): Return counted_command_line.
8943         (print_command_lines, execute_user_command)
8944         (execute_control_command_1, while_command, if_command): Update.
8945         (realloc_body_list): Remove.
8946         (process_next_line, recurse_read_control_structure): Update.
8947         (read_command_lines, read_command_lines_1): Return counted_command_line.
8948         (free_command_lines): Use "delete".
8949         (copy_command_lines): Remove.
8950         (define_command, document_command, show_user_1): Update.
8951         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8952         a counted_command_line.
8953         * breakpoint.h (counted_command_line): Remove typedef.
8954         (breakpoint_set_commands): Update.
8955         * breakpoint.c (check_no_tracepoint_commands)
8956         (validate_commands_for_breakpoint): Update.
8957         (breakpoint_set_commands): Change commands to be a
8958         counted_command_line.
8959         (commands_command_1, update_dprintf_command_list)
8960         (create_tracepoint_from_upload): Update.
8961
8962 2018-05-04  Tom Tromey  <tom@tromey.com>
8963
8964         * cli/cli-decode.h (cmd_list_element): New constructor.
8965         (~cmd_list_element): New destructor.
8966         (struct cmd_list_element): Add initializers.
8967         * cli/cli-decode.c (do_add_cmd): Use "new".
8968         (delete_cmd): Use "delete".
8969
8970 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
8971             Pedro Alves <palves@redhat.com>
8972
8973         PR breakpoints/19806 and support for PR external/20207.
8974         * NEWS: Mention Aarch64 watchpoint improvements.
8975         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8976         watchpoints and PR external/20207 watchpoints.
8977         * nat/aarch64-linux-hw-point.c
8978         (kernel_supports_any_contiguous_range): New.
8979         (aarch64_watchpoint_offset): New.
8980         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8981         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8982         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8983         (aarch64_align_watchpoint): New parameters aligned_offset_p and
8984         next_addr_orig_p.  Support PR external/20207 watchpoints.
8985         (aarch64_downgrade_regs): New.
8986         (aarch64_dr_state_insert_one_point): New parameters offset and
8987         addr_orig.
8988         (aarch64_dr_state_remove_one_point): Likewise.
8989         (aarch64_handle_breakpoint): Update caller.
8990         (aarch64_handle_aligned_watchpoint): Likewise.
8991         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8992         aligned_offset.
8993         (aarch64_linux_set_debug_regs): Remove const from state.  Call
8994         aarch64_downgrade_regs.
8995         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8996         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8997         (DR_CONTROL_MASK): ... this.
8998         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8999         (unsigned int aarch64_watchpoint_offset): New prototype.
9000         (aarch64_linux_set_debug_regs): Remove const from state.
9001         * utils.c (align_up, align_down): Move to ...
9002         * common/common-utils.c (align_up, align_down): ... here.
9003         * utils.h (align_up, align_down): Move to ...
9004         * common/common-utils.h (align_up, align_down): ... here.
9005
9006 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
9007
9008         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
9009         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
9010         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
9011         Re-implement to match the ABI as summarized in GCC's
9012         gcc/config/sparc/sparc.c.  All callers updated.
9013         (sparc32_store_arguments): Remove assertion.
9014
9015 2018-05-04  Tom Tromey  <tom@tromey.com>
9016
9017         * printcmd.c: Don't include tui.h.
9018         (decode_format): Use skip_spaces.
9019
9020 2018-05-04  Tom Tromey  <tom@tromey.com>
9021
9022         PR gdb/22619:
9023         * printcmd.c (last_count): New global.
9024         (x_command): Use saved count when repeating.
9025
9026 2018-05-04  Tom Tromey  <tom@tromey.com>
9027
9028         * nto-procfs.c (do_closedir_cleanup): Remove.
9029         (procfs_pidlist): Use gdb_dir_up.
9030         * procfs.c (do_closedir_cleanup): Remove.
9031         (proc_update_threads): Use gdb_dir_up.
9032         * common/filestuff.h (struct gdb_dir_deleter): New.
9033         (gdb_dir_up): New typedef.
9034
9035 2018-05-04  Tom Tromey  <tom@tromey.com>
9036
9037         * ada-lang.c (print_mention_exception): Use std::string.
9038
9039 2018-05-04  Tom Tromey  <tom@tromey.com>
9040
9041         * ada-lang.c (create_excep_cond_exprs): Update.
9042         (ada_exception_catchpoint_cond_string): Use std::string.
9043
9044 2018-05-04  Tom Tromey  <tom@tromey.com>
9045
9046         * ada-lang.c (xget_renaming_scope): Return std::string.
9047         (old_renaming_is_invisible): Update.
9048
9049 2018-05-04  Tom Tromey  <tom@tromey.com>
9050
9051         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
9052         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
9053
9054 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
9055
9056         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
9057
9058 2018-05-04  Tom Tromey  <tom@tromey.com>
9059
9060         * remote.c (remote_query_supported_append): Change type.
9061         (remote_check_symbols): Update.
9062
9063 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
9064
9065         PR gdb/11420
9066         * configure.ac: Prepend libpython.
9067         * python/python-config.py: Likewise.
9068         * configure: Regenerate.
9069
9070 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
9071
9072         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
9073
9074 2018-05-03  Pedro Alves  <palves@redhat.com>
9075
9076         * s390-linux-nat.c
9077         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
9078         override.  Write 'true' instead of '1'.
9079         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
9080         declaration.
9081
9082 2018-05-02  Pedro Alves  <palves@redhat.com>
9083
9084         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9085         add_inf_child_target.
9086         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9087         add_inf_child_target.
9088         * aix-thread.c (aix_thread_target_info): New.
9089         (aix_thread_target) <shortname, longname, doc>: Delete.
9090         <info>: New.
9091         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9092         add_inf_child_target.
9093         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9094         add_inf_child_target.
9095         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9096         add_inf_child_target.
9097         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9098         add_inf_child_target.
9099         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9100         add_inf_child_target.
9101         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9102         add_inf_child_target.
9103         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9104         add_inf_child_target.
9105         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9106         add_inf_child_target.
9107         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9108         add_inf_child_target.
9109         * bfd-target.c (target_bfd_target_info): New.
9110         (target_bfd) <shortname, longname, doc>: Delete.
9111         <info>: New.
9112         * bsd-kvm.c (bsd_kvm_target_info): New.
9113         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9114         <info>: New.
9115         (bsd_kvm_target::open): Rename to ...
9116         (bsd_kvm_target_open): ... this.  Adjust.
9117         * bsd-uthread.c (bsd_uthread_target_info): New.
9118         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9119         <info>: New.
9120         * corefile.c (core_file_command): Adjust.
9121         * corelow.c (core_target_info): New.
9122         (core_target) <shortname, longname, doc>: Delete.
9123         <info>: New.
9124         (core_target::open): Rename to ...
9125         (core_target_open): ... this.  Adjust.
9126         * ctf.c (ctf_target_info): New.
9127         (ctf_target) <shortname, longname, doc>: Delete.
9128         <info>: New.
9129         (ctf_target::open): Rename to ...
9130         (ctf_target_open): ... this.
9131         (_initialize_ctf): Adjust.
9132         * exec.c (exec_target_info): New.
9133         (exec_target) <shortname, longname, doc>: Delete.
9134         <info>: New.
9135         (exec_target::open): Rename to ...
9136         (exec_target_open): ... this.
9137         * gdbcore.h (core_target_open): Declare.
9138         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9139         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9140         add_inf_child_target.
9141         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9142         add_inf_child_target.
9143         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9144         add_inf_child_target.
9145         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9146         add_inf_child_target.
9147         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9148         add_inf_child_target.
9149         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9150         add_inf_child_target.
9151         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9152         add_inf_child_target.
9153         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9154         add_inf_child_target.
9155         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9156         add_inf_child_target.
9157         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9158         add_inf_child_target.
9159         * inf-child.c (inf_child_target_info): New.
9160         (inf_child_target::info): New.
9161         (inf_child_open_target): Remove 'target' parameter.  Use
9162         get_native_target instead.
9163         (inf_child_target::open): Delete.
9164         (add_inf_child_target): New.
9165         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9166         Delete.
9167         <info>: New.
9168         (add_inf_child_target): Declare.
9169         (inf_child_open_target): Declare.
9170         * linux-thread-db.c (thread_db_target_info): New.
9171         (thread_db_target) <shortname, longname, doc>: Delete.
9172         <info>: New.
9173         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9174         add_inf_child_target.
9175         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9176         add_inf_child_target.
9177         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9178         add_inf_child_target.
9179         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9180         add_inf_child_target.
9181         * make-target-delegates (print_class): Adjust.
9182         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9183         add_inf_child_target.
9184         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9185         add_inf_child_target.
9186         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9187         add_inf_child_target.
9188         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9189         add_inf_child_target.
9190         * nto-procfs.c (nto_native_target_info): New.
9191         (nto_procfs_target_native) <shortname, longname, doc>:
9192         Delete.
9193         <info>: New.
9194         (nto_procfs_target_info): New.
9195         (nto_procfs_target_procfs) <shortname, longname, doc>:
9196         Delete.
9197         <info>: New.
9198         (init_procfs_targets): Adjust.
9199         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9200         add_inf_child_target.
9201         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9202         add_inf_child_target.
9203         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9204         add_inf_child_target.
9205         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9206         add_inf_child_target.
9207         * ravenscar-thread.c (ravenscar_target_info): New.
9208         (ravenscar_thread_target) <shortname, longname, doc>:
9209         Delete.
9210         <info>: New.
9211         * record-btrace.c (record_btrace_target_info):
9212         (record_btrace_target) <shortname, longname, doc>: Delete.
9213         <info>: New.
9214         (record_btrace_target::open): Rename to ...
9215         (record_btrace_target_open): ... this.  Adjust.
9216         * record-full.c (record_longname, record_doc): New.
9217         (record_full_base_target) <shortname, longname, doc>: Delete.
9218         <info>: New.
9219         (record_full_target_info): New.
9220         (record_full_target): <shortname>: Delete.
9221         <info>: New.
9222         (record_full_core_open_1, record_full_open_1): Update comments.
9223         (record_full_base_target::open): Rename to ...
9224         (record_full_open): ... this.
9225         (cmd_record_full_restore): Update.
9226         (_initialize_record_full): Update.
9227         * remote-sim.c (remote_sim_target_info): New.
9228         (gdbsim_target) <shortname, longname, doc>: Delete.
9229         <info>: New.
9230         (gdbsim_target::open): Rename to ...
9231         (gdbsim_target_open): ... this.
9232         (_initialize_remote_sim): Adjust.
9233         * remote.c (remote_doc): New.
9234         (remote_target_info): New.
9235         (remote_target) <shortname, longname, doc>: Delete.
9236         <info>: New.
9237         (extended_remote_target_info): New.
9238         (extended_remote_target) <shortname, longname, doc>: Delete.
9239         <info>: New.
9240         (remote_target::open_1): Make static.  Adjust.
9241         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9242         * s390-linux-nat.c (_initialize_s390_nat): Use
9243         add_inf_child_target.
9244         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9245         add_inf_child_target.
9246         * sol-thread.c (thread_db_target_info): New.
9247         (sol_thread_target) <shortname, longname, doc>: Delete.
9248         <info>: New.
9249         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9250         add_inf_child_target.
9251         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9252         add_inf_child_target.
9253         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9254         add_inf_child_target.
9255         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9256         add_inf_child_target.
9257         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9258         add_inf_child_target.
9259         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9260         add_inf_child_target.
9261         * spu-linux-nat.c (_initialize_spu_nat): Use
9262         add_inf_child_target.
9263         * spu-multiarch.c (spu_multiarch_target_info): New.
9264         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9265         <info>: New.
9266         * target-delegates.c: Regenerate.
9267         * target.c: Include <unordered_map>.
9268         (target_ops_p): Delete.
9269         (DEF_VEC_P(target_ops_p)): Delete.
9270         (target_factories): New.
9271         (test_target_info): New.
9272         (test_target_ops::info): New.
9273         (open_target): Adjust to use target_factories.
9274         (add_target_with_completer): Rename to ...
9275         (add_target): ... this.  Change prototype.  Register target_info
9276         and open callback in target_factories.  Register target_info in
9277         command context instead of target_ops.
9278         (add_target): Delete old implementation.
9279         (add_deprecated_target_alias): Change prototype.  Adjust.
9280         (the_native_target): New.
9281         (set_native_target, get_native_target): New.
9282         (find_default_run_target): Use the_native_target.
9283         (find_attach_target, find_run_target): Simplify.
9284         (target_ops::open): Delete.
9285         (dummy_target_info): New.
9286         (dummy_target::shortname, dummy_target::longname)
9287         (dummy_target::doc): Delete.
9288         (dummy_target::info): New.
9289         (debug_target::shortname, debug_target::longname)
9290         (debug_target::doc): Delete.
9291         (debug_target::info): New.
9292         * target.h (struct target_info): New.
9293         (target_ops::~target_ops): Add comment.
9294         (target_ops::info): New.
9295         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9296         longer virtual.  Implement in terms of target_info.
9297         (set_native_target, get_native_target): Declare.
9298         (target_open_ftype): New.
9299         (add_target, add_target_with_completer)
9300         (add_deprecated_target_alias): Change prototype.
9301         (test_target) <shortname, longname, doc>: Delete.
9302         <info>: New.
9303         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9304         add_inf_child_target.
9305         * tracefile-tfile.c (tfile_target_info): New.
9306         (tfile_target) <shortname, longname, doc>: Delete.
9307         <info>: New.
9308         (tfile_target::open): Rename to ...
9309         (tfile_target_open): ... this.
9310         (_initialize_tracefile_tfile): Adjust.
9311         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9312         add_inf_child_target.
9313         * windows-nat.c (_initialize_windows_nat): Use
9314         add_inf_child_target.
9315         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9316         add_inf_child_target.
9317
9318 2018-05-02  Pedro Alves  <palves@redhat.com>
9319
9320         * linux-nat.h (linux_nat_target) <low_new_thread,
9321         low_delete_thread, low_new_fork, low_forget_process,
9322         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9323         New virtual methods.
9324         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9325         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9326         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9327         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9328         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9329         Delete.
9330         * linux-fork.c (delete_fork): Adjust to call low method.
9331         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9332         (linux_nat_new_fork, linux_nat_forget_process_hook)
9333         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9334         (linux_nat_status_is_event):
9335         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9336         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9337         to call low method.
9338         (sigtrap_is_event): Rename to ...
9339         (linux_nat_target::low_status_is_event): ... this.
9340         (linux_nat_set_status_is_event): Delete.
9341         (save_stop_reason, linux_nat_wait_1)
9342         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9343         low methods.
9344         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9345         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9346         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9347         (linux_nat_set_prepare_to_resume): Delete.
9348         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9349         low virtual methods.
9350         * amd64-linux-nat.c: Likewise.
9351         * arm-linux-nat.c: Likewise.
9352         * i386-linux-nat.c: Likewise.
9353         * ia64-linux-nat.c: Likewise.
9354         * mips-linux-nat.c: Likewise.
9355         * ppc-linux-nat.c: Likewise.
9356         * s390-linux-nat.c: Likewise.
9357         * sparc64-linux-nat.c: Likewise.
9358         * x86-linux-nat.c: Likewise.
9359         * x86-linux-nat.h: Include "nat/x86-linux.h".
9360         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9361         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9362         Override methods.
9363
9364 2018-05-02  Pedro Alves  <palves@redhat.com>
9365
9366         * target.h (target_ops)
9367         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9368         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9369         stopped_by_watchpoint, have_continuable_watchpoint,
9370         stopped_data_address, watchpoint_addr_within_range,
9371         can_accel_watchpoint_condition, can_run, thread_alive,
9372         has_all_memory, has_memory, has_stack, has_registers,
9373         has_execution, can_async_p, is_async_p, supports_non_stop,
9374         always_non_stop_p, can_execute_reverse, supports_multi_process,
9375         supports_enable_disable_tracepoint,
9376         supports_disable_randomization, supports_string_tracing,
9377         supports_evaluation_of_breakpoint_conditions,
9378         can_run_breakpoint_commands, filesystem_is_local,
9379         can_download_tracepoint, get_trace_state_variable_value,
9380         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9381         record_is_replaying, record_will_replay,
9382         augmented_libraries_svr4_read>: Adjust to return bool.
9383         * aarch64-linux-nat.c: All implementations adjusted.
9384         * aix-thread.c: All implementations adjusted.
9385         * arm-linux-nat.c: All implementations adjusted.
9386         * breakpoint.c: All implementations adjusted.
9387         * bsd-kvm.c: All implementations adjusted.
9388         * bsd-uthread.c: All implementations adjusted.
9389         * corelow.c: All implementations adjusted.
9390         * ctf.c: All implementations adjusted.
9391         * darwin-nat.c: All implementations adjusted.
9392         * darwin-nat.h: All implementations adjusted.
9393         * exec.c: All implementations adjusted.
9394         * fbsd-nat.c: All implementations adjusted.
9395         * fbsd-nat.h: All implementations adjusted.
9396         * gnu-nat.c: All implementations adjusted.
9397         * gnu-nat.h: All implementations adjusted.
9398         * go32-nat.c: All implementations adjusted.
9399         * ia64-linux-nat.c: All implementations adjusted.
9400         * inf-child.c: All implementations adjusted.
9401         * inf-child.h: All implementations adjusted.
9402         * inf-ptrace.c: All implementations adjusted.
9403         * inf-ptrace.h: All implementations adjusted.
9404         * linux-nat.c: All implementations adjusted.
9405         * linux-nat.h: All implementations adjusted.
9406         * mips-linux-nat.c: All implementations adjusted.
9407         * nto-procfs.c: All implementations adjusted.
9408         * ppc-linux-nat.c: All implementations adjusted.
9409         * procfs.c: All implementations adjusted.
9410         * ravenscar-thread.c: All implementations adjusted.
9411         * record-btrace.c: All implementations adjusted.
9412         * record-full.c: All implementations adjusted.
9413         * remote-sim.c: All implementations adjusted.
9414         * remote.c: All implementations adjusted.
9415         * s390-linux-nat.c: All implementations adjusted.
9416         * sol-thread.c: All implementations adjusted.
9417         * spu-multiarch.c: All implementations adjusted.
9418         * target-delegates.c: All implementations adjusted.
9419         * target.c: All implementations adjusted.
9420         * target.h: All implementations adjusted.
9421         * tracefile-tfile.c: All implementations adjusted.
9422         * tracefile.c: All implementations adjusted.
9423         * tracefile.h: All implementations adjusted.
9424         * windows-nat.c: All implementations adjusted.
9425         * x86-linux-nat.h: All implementations adjusted.
9426         * x86-nat.h: All implementations adjusted.
9427
9428 2018-05-02  Pedro Alves  <palves@redhat.com>
9429
9430         * make-target-delegates (scan_target_h): Don't trim lines here.
9431         Replace sequences of tabs and/or whitespace with a single
9432         whitespace.
9433         (top level, parsing methods): Trim each line before processing it
9434         here.
9435
9436 2018-05-02  Pedro Alves  <palves@redhat.com>
9437             John Baldwin  <jhb@freebsd.org>
9438
9439         * target.h (enum strata) <debug_stratum>: New.
9440         (struct target_ops) <all delegation methods>: Replace by C++
9441         virtual methods, and drop "to_" prefix.  All references updated
9442         throughout.
9443         <to_shortname, to_longname, to_doc, to_data,
9444         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9445         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9446         virtual methods.  All references updated throughout.
9447         <can_attach, supports_terminal_ours, can_create_inferior,
9448         get_thread_control_capabilities, attach_no_wait>: New
9449         virtual methods.
9450         <insert_breakpoint, remove_breakpoint>: Now
9451         TARGET_DEFAULT_NORETURN methods.
9452         <info_proc>: Now returns bool.
9453         <to_magic>: Delete.
9454         (OPS_MAGIC): Delete.
9455         (current_target): Delete.  All references replaced by references
9456         to ...
9457         (target_stack): ... this.  New.
9458         (target_shortname, target_longname): Adjust.
9459         (target_can_run): Now a function declaration.
9460         (default_child_has_all_memory, default_child_has_memory)
9461         (default_child_has_stack, default_child_has_registers)
9462         (default_child_has_execution): Remove target_ops parameter.
9463         (complete_target_initialization): Delete.
9464         (memory_breakpoint_target): New template class.
9465         (test_target_ops): Refactor as a C++ class with virtual methods.
9466         * make-target-delegates (NAME_PART): Tighten.
9467         (POINTER_PART, CP_SYMBOL): New.
9468         (SIMPLE_RETURN_PART): Reimplement.
9469         (VEC_RETURN_PART): Expect less.
9470         (RETURN_PART, VIRTUAL_PART): New.
9471         (METHOD): Adjust to C++ virtual methods.
9472         (scan_target_h): Remove reference to C99.
9473         (dname): Output "target_ops::" prefix.
9474         (write_function_header): Adjust to output a C++ class method.
9475         (write_declaration): New.
9476         (write_delegator): Adjust to output a C++ class method.
9477         (tdname): Output "dummy_target::" prefix.
9478         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9479         method.
9480         (tdefault_names, debug_names): Delete.
9481         (return_types, tdefaults, styles, argtypes_array): New.
9482         (top level): All methods are delegators.
9483         (print_class): New.
9484         (top level): Print dummy_target and debug_target classes.
9485         * target-delegates.c: Regenerate.
9486         * target-debug.h (target_debug_print_enum_info_proc_what)
9487         (target_debug_print_thread_control_capabilities)
9488         (target_debug_print_thread_info_p): New.
9489         * target.c (dummy_target): Delete.
9490         (the_dummy_target, the_debug_target): New.
9491         (target_stack): Now extern.
9492         (set_targetdebug): Push/unpush debug target.
9493         (default_child_has_all_memory, default_child_has_memory)
9494         (default_child_has_stack, default_child_has_registers)
9495         (default_child_has_execution): Remove target_ops parameter.
9496         (complete_target_initialization): Delete.
9497         (add_target_with_completer): No longer call
9498         complete_target_initialization.
9499         (target_supports_terminal_ours): Use regular delegation.
9500         (update_current_target): Delete.
9501         (push_target): No longer check magic number.  Don't call
9502         update_current_target.
9503         (unpush_target): Don't call update_current_target.
9504         (target_is_pushed): No longer check magic number.
9505         (target_require_runnable): Skip for all stratums over
9506         process_stratum.
9507         (target_ops::info_proc): New.
9508         (target_info_proc): Use find_target_at and
9509         find_default_run_target.
9510         (target_supports_disable_randomization): Use regular delegation.
9511         (target_get_osdata): Use find_target_at.
9512         (target_ops::open, target_ops::close, target_ops::can_attach)
9513         (target_ops::attach, target_ops::can_create_inferior)
9514         (target_ops::create_inferior, target_ops::can_run)
9515         (target_can_run): New.
9516         (default_fileio_target): Use regular delegation.
9517         (target_ops::fileio_open, target_ops::fileio_pwrite)
9518         (target_ops::fileio_pread, target_ops::fileio_fstat)
9519         (target_ops::fileio_close, target_ops::fileio_unlink)
9520         (target_ops::fileio_readlink): New.
9521         (target_fileio_open_1, target_fileio_unlink)
9522         (target_fileio_readlink): Always call the target method.  Handle
9523         FILEIO_ENOSYS.
9524         (return_zero, return_zero_has_execution): Delete.
9525         (init_dummy_target): Delete.
9526         (dummy_target::dummy_target, dummy_target::shortname)
9527         (dummy_target::longname, dummy_target::doc)
9528         (debug_target::debug_target, debug_target::shortname)
9529         (debug_target::longname, debug_target::doc): New.
9530         (target_supports_delete_record): Use regular delegation.
9531         (setup_target_debug): Delete.
9532         (maintenance_print_target_stack): Skip debug_stratum.
9533         (initialize_targets): Instantiate the_dummy_target and
9534         the_debug_target.
9535         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9536         use target_stack.
9537         (target_auxv_search, fprint_target_auxv): Adjust.
9538         (info_auxv_command): Adjust to use target_stack.
9539         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9540         * exceptions.c (print_flush): Handle a NULL target_stack.
9541         * regcache.c (target_ops_no_register): Refactor as class with
9542         virtual methods.
9543
9544         * exec.c (exec_target): New class.
9545         (exec_ops): Now an exec_target.
9546         (exec_open, exec_close_1, exec_get_section_table)
9547         (exec_xfer_partial, exec_files_info, exec_has_memory)
9548         (exec_make_note_section): Refactor as exec_target methods.
9549         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9550         Delete.
9551         (exec_target::find_memory_regions): New.
9552         (_initialize_exec): Don't call init_exec_ops.
9553         * gdbcore.h (exec_file_clear): Delete.
9554
9555         * corefile.c (core_target): Delete.
9556         (core_file_command): Adjust.
9557         * corelow.c (core_target): New class.
9558         (the_core_target): New.
9559         (core_close): Remove target_ops parameter.
9560         (core_close_cleanup): Adjust.
9561         (core_target::close): New.
9562         (core_open, core_detach, get_core_registers, core_files_info)
9563         (core_xfer_partial, core_thread_alive, core_read_description)
9564         (core_pid_to_str, core_thread_name, core_has_memory)
9565         (core_has_stack, core_has_registers, core_info_proc): Rework as
9566         core_target methods.
9567         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9568         (_initialize_corelow): Initialize the_core_target.
9569         * gdbcore.h (core_target): Delete.
9570         (the_core_target): New.
9571
9572         * ctf.c: (ctf_target): New class.
9573         (ctf_ops): Now a ctf_target.
9574         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9575         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9576         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9577         methods.
9578         (init_ctf_ops): Delete.
9579         (_initialize_ctf): Don't call it.
9580         * tracefile-tfile.c (tfile_target): New class.
9581         (tfile_ops): Now a tfile_target.
9582         (tfile_open, tfile_close, tfile_files_info)
9583         (tfile_get_tracepoint_status, tfile_trace_find)
9584         (tfile_fetch_registers, tfile_xfer_partial)
9585         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9586         Refactor as tfile_target methods.
9587         (tfile_xfer_partial_features): Remove target_ops parameter.
9588         (init_tfile_ops): Delete.
9589         (_initialize_tracefile_tfile): Don't call it.
9590         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9591         (tracefile_has_stack, tracefile_has_registers)
9592         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9593         tracefile_target methods.
9594         (init_tracefile_ops): Delete.
9595         (tracefile_target::tracefile_target): New.
9596         * tracefile.h: Include "target.h".
9597         (tracefile_target): New class.
9598         (init_tracefile_ops): Delete.
9599
9600         * spu-multiarch.c (spu_multiarch_target): New class.
9601         (spu_ops): Now a spu_multiarch_target.
9602         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9603         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9604         (spu_search_memory, spu_mourn_inferior): Refactor as
9605         spu_multiarch_target methods.
9606         (init_spu_ops): Delete.
9607         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9608         complete_target_initialization.
9609
9610         * ravenscar-thread.c (ravenscar_thread_target): New class.
9611         (ravenscar_ops): Now a ravenscar_thread_target.
9612         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9613         (ravenscar_thread_alive, ravenscar_pid_to_str)
9614         (ravenscar_fetch_registers, ravenscar_store_registers)
9615         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9616         (ravenscar_stopped_by_hw_breakpoint)
9617         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9618         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9619         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9620         methods.
9621         (init_ravenscar_thread_ops): Delete.
9622         (_initialize_ravenscar): Remove references to
9623         init_ravenscar_thread_ops and complete_target_initialization.
9624
9625         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9626         (bsd_uthread_target): New class.
9627         (bsd_uthread_ops): Now a bsd_uthread_target.
9628         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9629         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9630         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9631         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9632         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9633         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9634         (bsd_uthread_target): Delete function.
9635         (_initialize_bsd_uthread): Remove reference to
9636         complete_target_initialization.
9637
9638         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9639         (target_bfd): ... this new class.
9640         (target_bfd_xfer_partial, target_bfd_get_section_table)
9641         (target_bfd_close): Refactor as target_bfd methods.
9642         (target_bfd::~target_bfd): New.
9643         (target_bfd_reopen): Adjust.
9644         (target_bfd::close): New.
9645
9646         * record-btrace.c (record_btrace_target): New class.
9647         (record_btrace_ops): Now a record_btrace_target.
9648         (record_btrace_open, record_btrace_stop_recording)
9649         (record_btrace_disconnect, record_btrace_close)
9650         (record_btrace_async, record_btrace_info)
9651         (record_btrace_insn_history, record_btrace_insn_history_range)
9652         (record_btrace_insn_history_from, record_btrace_call_history)
9653         (record_btrace_call_history_range)
9654         (record_btrace_call_history_from, record_btrace_record_method)
9655         (record_btrace_is_replaying, record_btrace_will_replay)
9656         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9657         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9658         (record_btrace_store_registers, record_btrace_prepare_to_store)
9659         (record_btrace_to_get_unwinder)
9660         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9661         (record_btrace_commit_resume, record_btrace_wait)
9662         (record_btrace_stop, record_btrace_can_execute_reverse)
9663         (record_btrace_stopped_by_sw_breakpoint)
9664         (record_btrace_supports_stopped_by_sw_breakpoint)
9665         (record_btrace_stopped_by_hw_breakpoint)
9666         (record_btrace_supports_stopped_by_hw_breakpoint)
9667         (record_btrace_update_thread_list, record_btrace_thread_alive)
9668         (record_btrace_goto_begin, record_btrace_goto_end)
9669         (record_btrace_goto, record_btrace_stop_replaying_all)
9670         (record_btrace_execution_direction)
9671         (record_btrace_prepare_to_generate_core)
9672         (record_btrace_done_generating_core): Refactor as
9673         record_btrace_target methods.
9674         (init_record_btrace_ops): Delete.
9675         (_initialize_record_btrace): Remove reference to
9676         init_record_btrace_ops.
9677         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9678         the execution_direction global.
9679         (record_full_base_target, record_full_target)
9680         (record_full_core_target): New classes.
9681         (record_full_ops): Now a record_full_target.
9682         (record_full_core_ops): Now a record_full_core_target.
9683         (record_full_target::detach, record_full_target::disconnect)
9684         (record_full_core_target::disconnect)
9685         (record_full_target::mourn_inferior, record_full_target::kill):
9686         New.
9687         (record_full_open, record_full_close, record_full_async): Refactor
9688         as methods of the record_full_base_target class.
9689         (record_full_resume, record_full_commit_resume): Refactor
9690         as methods of the record_full_target class.
9691         (record_full_wait, record_full_stopped_by_watchpoint)
9692         (record_full_stopped_data_address)
9693         (record_full_stopped_by_sw_breakpoint)
9694         (record_full_supports_stopped_by_sw_breakpoint)
9695         (record_full_stopped_by_hw_breakpoint)
9696         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9697         methods of the record_full_base_target class.
9698         (record_full_store_registers, record_full_xfer_partial)
9699         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9700         Refactor as methods of the record_full_target class.
9701         (record_full_can_execute_reverse, record_full_get_bookmark)
9702         (record_full_goto_bookmark, record_full_execution_direction)
9703         (record_full_record_method, record_full_info, record_full_delete)
9704         (record_full_is_replaying, record_full_will_replay)
9705         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9706         (record_full_stop_replaying): Refactor as methods of the
9707         record_full_base_target class.
9708         (record_full_core_resume, record_full_core_kill)
9709         (record_full_core_fetch_registers)
9710         (record_full_core_prepare_to_store)
9711         (record_full_core_store_registers, record_full_core_xfer_partial)
9712         (record_full_core_insert_breakpoint)
9713         (record_full_core_remove_breakpoint)
9714         (record_full_core_has_execution): Refactor
9715         as methods of the record_full_core_target class.
9716         (record_full_base_target::supports_delete_record): New.
9717         (init_record_full_ops): Delete.
9718         (init_record_full_core_ops): Delete.
9719         (record_full_save): Refactor as method of the
9720         record_full_base_target class.
9721         (_initialize_record_full): Remove references to
9722         init_record_full_ops and init_record_full_core_ops.
9723
9724         * remote.c (remote_target, extended_remote_target): New classes.
9725         (remote_ops): Now a remote_target.
9726         (extended_remote_ops): Now an extended_remote_target.
9727         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9728         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9729         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9730         (remote_pass_signals, remote_set_syscall_catchpoint)
9731         (remote_program_signals, )
9732         (remote_thread_always_alive): Remove target_ops parameter.
9733         (remote_thread_alive, remote_thread_name)
9734         (remote_update_thread_list, remote_threads_extra_info)
9735         (remote_static_tracepoint_marker_at)
9736         (remote_static_tracepoint_markers_by_strid)
9737         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9738         (remote_open): Refactor as methods of remote_target.
9739         (extended_remote_open, extended_remote_detach)
9740         (extended_remote_attach, extended_remote_post_attach):
9741         (extended_remote_supports_disable_randomization)
9742         (extended_remote_create_inferior): : Refactor as method of
9743         extended_remote_target.
9744         (remote_set_permissions, remote_open_1, remote_detach)
9745         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9746         (remote_resume, remote_commit_resume, remote_stop)
9747         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9748         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9749         (remote_prepare_to_store, remote_store_registers)
9750         (remote_flash_erase, remote_flash_done, remote_files_info)
9751         (remote_kill, remote_mourn, remote_insert_breakpoint)
9752         (remote_remove_breakpoint, remote_insert_watchpoint)
9753         (remote_watchpoint_addr_within_range)
9754         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9755         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9756         (remote_supports_stopped_by_sw_breakpoint)
9757         (remote_stopped_by_hw_breakpoint)
9758         (remote_supports_stopped_by_hw_breakpoint)
9759         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9760         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9761         (remote_verify_memory): Refactor as methods of remote_target.
9762         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9763         parameter.
9764         (remote_xfer_partial, remote_get_memory_xfer_limit)
9765         (remote_search_memory, remote_rcmd, remote_memory_map)
9766         (remote_pid_to_str, remote_get_thread_local_address)
9767         (remote_get_tib_address, remote_read_description): Refactor as
9768         methods of remote_target.
9769         (remote_target::fileio_open, remote_target::fileio_pwrite)
9770         (remote_target::fileio_pread, remote_target::fileio_close): New.
9771         (remote_hostio_readlink, remote_hostio_fstat)
9772         (remote_filesystem_is_local, remote_can_execute_reverse)
9773         (remote_supports_non_stop, remote_supports_disable_randomization)
9774         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9775         (remote_supports_enable_disable_tracepoint)
9776         (remote_supports_string_tracing)
9777         (remote_can_run_breakpoint_commands, remote_trace_init)
9778         (remote_download_tracepoint, remote_can_download_tracepoint)
9779         (remote_download_trace_state_variable, remote_enable_tracepoint)
9780         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9781         (remote_trace_start, remote_get_trace_status)
9782         (remote_get_tracepoint_status, remote_trace_stop)
9783         (remote_trace_find, remote_get_trace_state_variable_value)
9784         (remote_save_trace_data, remote_get_raw_trace_data)
9785         (remote_set_disconnected_tracing, remote_core_of_thread)
9786         (remote_set_circular_trace_buffer, remote_traceframe_info)
9787         (remote_get_min_fast_tracepoint_insn_len)
9788         (remote_set_trace_buffer_size, remote_set_trace_notes)
9789         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9790         (remote_disable_btrace, remote_teardown_btrace)
9791         (remote_read_btrace, remote_btrace_conf)
9792         (remote_augmented_libraries_svr4_read, remote_load)
9793         (remote_pid_to_exec_file, remote_can_do_single_step)
9794         (remote_execution_direction, remote_thread_handle_to_thread_info):
9795         Refactor as methods of remote_target.
9796         (init_remote_ops, init_extended_remote_ops): Delete.
9797         (remote_can_async_p, remote_is_async_p, remote_async)
9798         (remote_thread_events, remote_upload_tracepoints)
9799         (remote_upload_trace_state_variables): Refactor as methods of
9800         remote_target.
9801         (_initialize_remote): Remove references to init_remote_ops and
9802         init_extended_remote_ops.
9803
9804         * remote-sim.c (gdbsim_target): New class.
9805         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9806         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9807         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9808         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9809         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9810         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9811         Refactor as methods of gdbsim_target.
9812         (gdbsim_ops): Now a gdbsim_target.
9813         (init_gdbsim_ops): Delete.
9814         (gdbsim_cntrl_c): Adjust.
9815         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9816
9817         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9818         (the_amd64_linux_nat_target): New.
9819         (amd64_linux_fetch_inferior_registers)
9820         (amd64_linux_store_inferior_registers): Refactor as methods of
9821         amd64_linux_nat_target.
9822         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9823         * i386-linux-nat.c: Don't include "linux-nat.h".
9824         (i386_linux_nat_target): New class.
9825         (the_i386_linux_nat_target): New.
9826         (i386_linux_fetch_inferior_registers)
9827         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9828         as methods of i386_linux_nat_target.
9829         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9830         * inf-child.c (inf_child_ops): Delete.
9831         (inf_child_fetch_inferior_registers)
9832         (inf_child_store_inferior_registers): Delete.
9833         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9834         methods of inf_child_target.
9835         (inf_child_target::supports_terminal_ours)
9836         (inf_child_target::terminal_init)
9837         (inf_child_target::terminal_inferior)
9838         (inf_child_target::terminal_ours_for_output)
9839         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9840         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9841         New.
9842         (inf_child_open, inf_child_disconnect, inf_child_close)
9843         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9844         (inf_child_post_startup_inferior, inf_child_can_run)
9845         (inf_child_pid_to_exec_file): Refactor as methods of
9846         inf_child_target.
9847         (inf_child_follow_fork): Delete.
9848         (inf_child_target::can_create_inferior)
9849         (inf_child_target::can_attach): New.
9850         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9851         (inf_child_target::has_stack, inf_child_target::has_registers)
9852         (inf_child_target::has_execution): New.
9853         (inf_child_fileio_open, inf_child_fileio_pwrite)
9854         (inf_child_fileio_pread, inf_child_fileio_fstat)
9855         (inf_child_fileio_close, inf_child_fileio_unlink)
9856         (inf_child_fileio_readlink, inf_child_use_agent)
9857         (inf_child_can_use_agent): Refactor as methods of
9858         inf_child_target.
9859         (return_zero, inf_child_target): Delete.
9860         (inf_child_target::inf_child_target): New.
9861         * inf-child.h: Include "target.h".
9862         (inf_child_target): Delete function prototype.
9863         (inf_child_target): New class.
9864         (inf_child_open_target, inf_child_mourn_inferior)
9865         (inf_child_maybe_unpush_target): Delete.
9866         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9867         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9868         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9869         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9870         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9871         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9872         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9873         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9874         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9875         methods of inf_ptrace_target.
9876         (inf_ptrace_target): Delete function.
9877         * inf-ptrace.h: Include "inf-child.h".
9878         (inf_ptrace_target): Delete function declaration.
9879         (inf_ptrace_target): New class.
9880         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9881         * linux-nat.c (linux_target): New.
9882         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9883         (linux_nat_target::~linux_nat_target): New.
9884         (linux_child_post_attach, linux_child_post_startup_inferior)
9885         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9886         (linux_child_remove_fork_catchpoint)
9887         (linux_child_insert_vfork_catchpoint)
9888         (linux_child_remove_vfork_catchpoint)
9889         (linux_child_insert_exec_catchpoint)
9890         (linux_child_remove_exec_catchpoint)
9891         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9892         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9893         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9894         (linux_nat_stopped_data_address)
9895         (linux_nat_stopped_by_sw_breakpoint)
9896         (linux_nat_supports_stopped_by_sw_breakpoint)
9897         (linux_nat_stopped_by_hw_breakpoint)
9898         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9899         (linux_nat_kill, linux_nat_mourn_inferior)
9900         (linux_nat_xfer_partial, linux_nat_thread_alive)
9901         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9902         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9903         (linux_child_static_tracepoint_markers_by_strid)
9904         (linux_nat_is_async_p, linux_nat_can_async_p)
9905         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9906         (linux_nat_supports_multi_process)
9907         (linux_nat_supports_disable_randomization, linux_nat_async)
9908         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9909         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9910         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9911         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9912         methods of linux_nat_target.
9913         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9914         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9915         parameter.
9916         (check_stopped_by_watchpoint): Adjust.
9917         (linux_xfer_partial): Delete.
9918         (linux_target_install_ops, linux_target, linux_nat_add_target):
9919         Delete.
9920         (linux_nat_target::linux_nat_target): New.
9921         * linux-nat.h: Include "inf-ptrace.h".
9922         (linux_nat_target): New.
9923         (linux_target, linux_target_install_ops, linux_nat_add_target):
9924         Delete function declarations.
9925         (linux_target): Declare global.
9926         * linux-thread-db.c (thread_db_target): New.
9927         (thread_db_target::thread_db_target): New.
9928         (thread_db_ops): Delete.
9929         (the_thread_db_target): New.
9930         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9931         (thread_db_update_thread_list, thread_db_pid_to_str)
9932         (thread_db_extra_thread_info)
9933         (thread_db_thread_handle_to_thread_info)
9934         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9935         (thread_db_resume): Refactor as methods of thread_db_target.
9936         (init_thread_db_ops): Delete.
9937         (_initialize_thread_db): Remove reference to init_thread_db_ops.
9938         * x86-linux-nat.c: Don't include "linux-nat.h".
9939         (super_post_startup_inferior): Delete.
9940         (x86_linux_nat_target::~x86_linux_nat_target): New.
9941         (x86_linux_child_post_startup_inferior)
9942         (x86_linux_read_description, x86_linux_enable_btrace)
9943         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9944         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9945         methods of x86_linux_nat_target.
9946         (x86_linux_create_target): Delete.  Bits folded ...
9947         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
9948         pointer.
9949         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9950         (x86_linux_nat_target): New class.
9951         (x86_linux_create_target): Delete.
9952         (x86_linux_add_target): Now takes a linux_nat_target pointer.
9953         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9954         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9955         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9956         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9957         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9958         make extern.
9959         (x86_use_watchpoints): Delete.
9960         * x86-nat.h: Include "breakpoint.h" and "target.h".
9961         (x86_use_watchpoints): Delete.
9962         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9963         (x86_stopped_by_watchpoint, x86_stopped_data_address)
9964         (x86_insert_watchpoint, x86_remove_watchpoint)
9965         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9966         (x86_stopped_by_hw_breakpoint): New declarations.
9967         (x86_nat_target): New template class.
9968
9969         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9970         (the_ppc_linux_nat_target): New.
9971         (ppc_linux_fetch_inferior_registers)
9972         (ppc_linux_can_use_hw_breakpoint)
9973         (ppc_linux_region_ok_for_hw_watchpoint)
9974         (ppc_linux_ranged_break_num_registers)
9975         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9976         (ppc_linux_insert_mask_watchpoint)
9977         (ppc_linux_remove_mask_watchpoint)
9978         (ppc_linux_can_accel_watchpoint_condition)
9979         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9980         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9981         (ppc_linux_watchpoint_addr_within_range)
9982         (ppc_linux_masked_watch_num_registers)
9983         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9984         (ppc_linux_read_description): Refactor as methods of
9985         ppc_linux_nat_target.
9986         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
9987
9988         * procfs.c (procfs_xfer_partial): Delete forward declaration.
9989         (procfs_target): New class.
9990         (the_procfs_target): New.
9991         (procfs_target): Delete function.
9992         (procfs_auxv_parse, procfs_attach, procfs_detach)
9993         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9994         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9995         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9996         (procfs_create_inferior, procfs_update_thread_list)
9997         (procfs_thread_alive, procfs_pid_to_str)
9998         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9999         (procfs_stopped_data_address, procfs_insert_watchpoint)
10000         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
10001         (proc_find_memory_regions, procfs_info_proc)
10002         (procfs_make_note_section): Refactor as methods of procfs_target.
10003         (_initialize_procfs): Adjust.
10004         * sol-thread.c (sol_thread_target): New class.
10005         (sol_thread_ops): Now a sol_thread_target.
10006         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
10007         (sol_thread_fetch_registers, sol_thread_store_registers)
10008         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
10009         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
10010         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
10011         (init_sol_thread_ops): Delete.
10012         (_initialize_sol_thread): Adjust.  Remove references to
10013         init_sol_thread_ops and complete_target_initialization.
10014
10015         * windows-nat.c (windows_nat_target): New class.
10016         (windows_fetch_inferior_registers)
10017         (windows_store_inferior_registers, windows_resume, windows_wait)
10018         (windows_attach, windows_detach, windows_pid_to_exec_file)
10019         (windows_files_info, windows_create_inferior)
10020         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
10021         (windows_close, windows_pid_to_str, windows_xfer_partial)
10022         (windows_get_tib_address, windows_get_ada_task_ptid)
10023         (windows_thread_name, windows_thread_alive): Refactor as
10024         windows_nat_target methods.
10025         (do_initial_windows_stuff): Adjust.
10026         (windows_target): Delete function.
10027         (_initialize_windows_nat): Adjust.
10028
10029         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
10030         (darwin_mourn_inferior, darwin_kill_inferior)
10031         (darwin_create_inferior, darwin_attach, darwin_detach)
10032         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
10033         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
10034         (darwin_supports_multi_process): Refactor as darwin_nat_target
10035         methods.
10036         (darwin_resume_to, darwin_files_info): Delete.
10037         (_initialize_darwin_inferior): Rename to ...
10038         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
10039         * darwin-nat.h: Include "inf-child.h".
10040         (darwin_nat_target): New class.
10041         (darwin_complete_target): Delete.
10042         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
10043         (darwin_target): New.
10044         (i386_darwin_fetch_inferior_registers)
10045         (i386_darwin_store_inferior_registers): Refactor as methods of
10046         darwin_nat_target.
10047         (darwin_complete_target): Delete, with ...
10048         (_initialize_i386_darwin_nat): ... bits factored out here.
10049
10050         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
10051         (the_alpha_linux_nat_target): New.
10052         (alpha_linux_register_u_offset): Refactor as
10053         alpha_linux_nat_target method.
10054         (_initialize_alpha_linux_nat): Adjust.
10055         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
10056         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10057         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
10058         methods of linux_nat_trad_target.
10059         (linux_trad_target): Delete.
10060         * linux-nat-trad.h (linux_trad_target): Delete function.
10061         (linux_nat_trad_target): New class.
10062         * mips-linux-nat.c (mips_linux_nat_target): New class.
10063         (super_fetch_registers, super_store_registers, super_close):
10064         Delete.
10065         (the_mips_linux_nat_target): New.
10066         (mips64_linux_regsets_fetch_registers)
10067         (mips64_linux_regsets_store_registers)
10068         (mips64_linux_fetch_registers, mips64_linux_store_registers)
10069         (mips_linux_register_u_offset, mips_linux_read_description)
10070         (mips_linux_can_use_hw_breakpoint)
10071         (mips_linux_stopped_by_watchpoint)
10072         (mips_linux_stopped_data_address)
10073         (mips_linux_region_ok_for_hw_watchpoint)
10074         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
10075         (mips_linux_close): Refactor as methods of mips_linux_nat.
10076         (_initialize_mips_linux_nat): Adjust to C++ification.
10077
10078         * aix-thread.c (aix_thread_target): New class.
10079         (aix_thread_ops): Now an aix_thread_target.
10080         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10081         (aix_thread_fetch_registers, aix_thread_store_registers)
10082         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10083         (aix_thread_thread_alive, aix_thread_pid_to_str)
10084         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10085         Refactor as methods of aix_thread_target.
10086         (init_aix_thread_ops): Delete.
10087         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10088         and complete_target_initialization.
10089         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10090         (rs6000_nat_target): New class.
10091         (the_rs6000_nat_target): New.
10092         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10093         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10094         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10095         (super_create_inferior): Delete.
10096         (_initialize_rs6000_nat): Adjust to C++ification.
10097
10098         * arm-linux-nat.c (arm_linux_nat_target): New class.
10099         (the_arm_linux_nat_target): New.
10100         (arm_linux_fetch_inferior_registers)
10101         (arm_linux_store_inferior_registers, arm_linux_read_description)
10102         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10103         (arm_linux_remove_hw_breakpoint)
10104         (arm_linux_region_ok_for_hw_watchpoint)
10105         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10106         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10107         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10108         arm_linux_nat_target.
10109         (_initialize_arm_linux_nat): Adjust to C++ification.
10110
10111         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10112         (the_aarch64_linux_nat_target): New.
10113         (aarch64_linux_fetch_inferior_registers)
10114         (aarch64_linux_store_inferior_registers)
10115         (aarch64_linux_child_post_startup_inferior)
10116         (aarch64_linux_read_description)
10117         (aarch64_linux_can_use_hw_breakpoint)
10118         (aarch64_linux_insert_hw_breakpoint)
10119         (aarch64_linux_remove_hw_breakpoint)
10120         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10121         (aarch64_linux_region_ok_for_hw_watchpoint)
10122         (aarch64_linux_stopped_data_address)
10123         (aarch64_linux_stopped_by_watchpoint)
10124         (aarch64_linux_watchpoint_addr_within_range)
10125         (aarch64_linux_can_do_single_step): Refactor as methods of
10126         aarch64_linux_nat_target.
10127         (super_post_startup_inferior): Delete.
10128         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10129
10130         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10131         (the_hppa_linux_nat_target): New.
10132         (hppa_linux_fetch_inferior_registers)
10133         (hppa_linux_store_inferior_registers): Refactor as methods of
10134         hppa_linux_nat_target.
10135         (_initialize_hppa_linux_nat): Adjust to C++ification.
10136
10137         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10138         (the_ia64_linux_nat_target): New.
10139         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10140         (ia64_linux_stopped_data_address)
10141         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10142         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10143         ia64_linux_nat_target methods.
10144         (super_xfer_partial): Delete.
10145         (_initialize_ia64_linux_nat): Adjust to C++ification.
10146
10147         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10148         (the_m32r_linux_nat_target): New.
10149         (m32r_linux_fetch_inferior_registers)
10150         (m32r_linux_store_inferior_registers): Refactor as
10151         m32r_linux_nat_target methods.
10152         (_initialize_m32r_linux_nat): Adjust to C++ification.
10153
10154         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10155         (the_m68k_linux_nat_target): New.
10156         (m68k_linux_fetch_inferior_registers)
10157         (m68k_linux_store_inferior_registers): Refactor as
10158         m68k_linux_nat_target methods.
10159         (_initialize_m68k_linux_nat): Adjust to C++ification.
10160
10161         * s390-linux-nat.c (s390_linux_nat_target): New class.
10162         (the_s390_linux_nat_target): New.
10163         (s390_linux_fetch_inferior_registers)
10164         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10165         (s390_insert_watchpoint, s390_remove_watchpoint)
10166         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10167         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10168         (s390_auxv_parse, s390_read_description): Refactor as methods of
10169         s390_linux_nat_target.
10170         (_initialize_s390_nat): Adjust to C++ification.
10171
10172         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10173         (the_sparc_linux_nat_target): New.
10174         (_initialize_sparc_linux_nat): Adjust to C++ification.
10175         * sparc-nat.c (sparc_fetch_inferior_registers)
10176         (sparc_store_inferior_registers): Remove target_ops parameter.
10177         * sparc-nat.h (sparc_fetch_inferior_registers)
10178         (sparc_store_inferior_registers): Remove target_ops parameter.
10179         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10180         (the_sparc64_linux_nat_target): New.
10181         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10182
10183         * spu-linux-nat.c (spu_linux_nat_target): New class.
10184         (the_spu_linux_nat_target): New.
10185         (spu_child_post_startup_inferior, spu_child_post_attach)
10186         (spu_child_wait, spu_fetch_inferior_registers)
10187         (spu_store_inferior_registers, spu_xfer_partial)
10188         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10189         methods.
10190         (_initialize_spu_nat): Adjust to C++ification.
10191
10192         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10193         (the_tilegx_linux_nat_target): New.
10194         (fetch_inferior_registers, store_inferior_registers):
10195         Refactor as methods.
10196         (_initialize_tile_linux_nat): Adjust to C++ification.
10197
10198         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10199         (the_xtensa_linux_nat_target): New.
10200         (xtensa_linux_fetch_inferior_registers)
10201         (xtensa_linux_store_inferior_registers): Refactor as
10202         xtensa_linux_nat_target methods.
10203         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10204
10205         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10206         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10207         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10208         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10209         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10210         (fbsd_stopped_by_sw_breakpoint)
10211         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10212         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10213         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10214         (fbsd_post_startup_inferior, fbsd_post_attach)
10215         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10216         (fbsd_set_syscall_catchpoint)
10217         (super_xfer_partial, super_resume, super_wait)
10218         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10219         (fbsd_handle_debug_trap): Remove target_ops parameter.
10220         (fbsd_nat_add_target): Delete.
10221         * fbsd-nat.h: Include "inf-ptrace.h".
10222         (fbsd_nat_add_target): Delete.
10223         (USE_SIGTRAP_SIGINFO): Define.
10224         (fbsd_nat_target): New class.
10225
10226         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10227         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10228         (amd64bsd_target): Delete.
10229         * amd64-bsd-nat.h: New file.
10230         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10231         "x86-bsd-nat.h".
10232         (amd64_fbsd_nat_target): New class.
10233         (the_amd64_fbsd_nat_target): New.
10234         (amd64fbsd_read_description): Refactor as method of
10235         amd64_fbsd_nat_target.
10236         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10237         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10238         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10239         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10240         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10241         (i386bsd_target): Delete.
10242         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10243         (i386bsd_fetch_inferior_registers)
10244         (i386bsd_store_inferior_registers): Declare.
10245         (i386_bsd_nat_target): New class.
10246         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10247         (the_i386_fbsd_nat_target): New.
10248         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10249         i386_fbsd_nat_target methods.
10250         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10251         (_initialize_i386fbsd_nat): Adjust to C++ification.
10252         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10253         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10254         (_initialize_x86_bsd_nat): Adjust to C++ification.
10255         * x86-bsd-nat.h: Include "x86-nat.h".
10256         (x86bsd_target): Delete declaration.
10257         (x86bsd_nat_target): New class.
10258
10259         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10260         (the_aarch64_fbsd_nat_target): New.
10261         (aarch64_fbsd_fetch_inferior_registers)
10262         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10263         aarch64_fbsd_nat_target.
10264         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10265         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10266         (the_alpha_bsd_nat_target): New.
10267         (alphabsd_fetch_inferior_registers)
10268         (alphabsd_store_inferior_registers): Refactor as
10269         alpha_bsd_nat_target methods.
10270         (_initialize_alphabsd_nat): Refactor as methods of
10271         alpha_bsd_nat_target.
10272         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10273         (the_amd64_nbsd_nat_target): New.
10274         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10275         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10276         (the_amd64_obsd_nat_target): New.
10277         (_initialize_amd64obsd_nat): Adjust to C++ification.
10278         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10279         (the_arm_fbsd_nat_target): New.
10280         (arm_fbsd_fetch_inferior_registers)
10281         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10282         (_initialize_arm_fbsd_nat): Refactor as methods of
10283         arm_fbsd_nat_target.
10284         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10285         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10286         (the_arm_netbsd_nat_target): New.
10287         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10288         arm_netbsd_nat_target.
10289         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10290         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10291         (the_hppa_nbsd_nat_target): New.
10292         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10293         hppa_nbsd_nat_target methods.
10294         (_initialize_hppanbsd_nat): Adjust to C++ification.
10295         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10296         (the_hppa_obsd_nat_target): New.
10297         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10298         methods of hppa_obsd_nat_target.
10299         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10300         add_target.
10301         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10302         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10303         add_target.
10304         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10305         (_initialize_i386obsd_nat): Use add_target.
10306         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10307         (the_m68k_bsd_nat_target): New.
10308         (m68kbsd_fetch_inferior_registers)
10309         (m68kbsd_store_inferior_registers): Refactor as methods of
10310         m68k_bsd_nat_target.
10311         (_initialize_m68kbsd_nat): Adjust to C++ification.
10312         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10313         (the_mips_fbsd_nat_target): New.
10314         (mips_fbsd_fetch_inferior_registers)
10315         (mips_fbsd_store_inferior_registers): Refactor as methods of
10316         mips_fbsd_nat_target.
10317         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10318         add_target.
10319         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10320         (the_mips_nbsd_nat_target): New.
10321         (mipsnbsd_fetch_inferior_registers)
10322         (mipsnbsd_store_inferior_registers): Refactor as methods of
10323         mips_nbsd_nat_target.
10324         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10325         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10326         (the_mips64_obsd_nat_target): New.
10327         (mips64obsd_fetch_inferior_registers)
10328         (mips64obsd_store_inferior_registers): Refactor as methods of
10329         mips64_obsd_nat_target.
10330         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10331         add_target.
10332         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10333         nbsd_nat_target.
10334         * nbsd-nat.h: Include "inf-ptrace.h".
10335         (nbsd_nat_target): New class.
10336         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10337         (obsd_wait): Refactor as methods of obsd_nat_target.
10338         (obsd_add_target): Delete.
10339         * obsd-nat.h: Include "inf-ptrace.h".
10340         (obsd_nat_target): New class.
10341         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10342         (the_ppc_fbsd_nat_target): New.
10343         (ppcfbsd_fetch_inferior_registers)
10344         (ppcfbsd_store_inferior_registers): Refactor as methods of
10345         ppc_fbsd_nat_target.
10346         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10347         add_target.
10348         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10349         (the_ppc_nbsd_nat_target): New.
10350         (ppcnbsd_fetch_inferior_registers)
10351         (ppcnbsd_store_inferior_registers): Refactor as methods of
10352         ppc_nbsd_nat_target.
10353         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10354         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10355         (the_ppc_obsd_nat_target): New.
10356         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10357         methods of ppc_obsd_nat_target.
10358         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10359         add_target.
10360         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10361         (the_sh_nbsd_nat_target): New.
10362         (shnbsd_fetch_inferior_registers)
10363         (shnbsd_store_inferior_registers): Refactor as methods of
10364         sh_nbsd_nat_target.
10365         (_initialize_shnbsd_nat): Adjust to C++ification.
10366         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10367         (inf_ptrace_xfer_partial): Delete.
10368         (sparc_xfer_partial, sparc_target): Delete.
10369         * sparc-nat.h (sparc_fetch_inferior_registers)
10370         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10371         (sparc_target): Delete function declaration.
10372         (sparc_target): New template class.
10373         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10374         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10375         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10376         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10377         add_target.
10378         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10379         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10380         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10381         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10382         add_target.
10383         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10384         (the_vax_bsd_nat_target): New.
10385         (vaxbsd_fetch_inferior_registers)
10386         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10387         methods.
10388         (_initialize_vaxbsd_nat): Adjust to C++ification.
10389
10390         * bsd-kvm.c (bsd_kvm_target): New class.
10391         (bsd_kvm_ops): Now a bsd_kvm_target.
10392         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10393         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10394         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10395         bsd_kvm_target.
10396         (bsd_kvm_return_one): Delete.
10397         (bsd_kvm_add_target): Adjust to C++ification.
10398
10399         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10400         (nto_procfs_target_procfs): New classes.
10401         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10402         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10403         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10404         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10405         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10406         (procfs_remove_hw_breakpoint, procfs_resume)
10407         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10408         (procfs_kill_inferior, procfs_store_registers)
10409         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10410         as methods of nto_procfs_target.
10411         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10412         (nto_native_ops): Delete.
10413         (procfs_open, procfs_native_open): Delete.
10414         (nto_native_ops): Now an nto_procfs_target_native.
10415         (init_procfs_targets): Adjust to C++ification.
10416         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10417         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10418         Refactor as methods of nto_procfs_target.
10419
10420         * go32-nat.c (go32_nat_target): New class.
10421         (the_go32_nat_target): New.
10422         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10423         (go32_store_registers, go32_xfer_partial, go32_files_info)
10424         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10425         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10426         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10427         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10428         (go32_target): Delete.
10429         (_initialize_go32_nat): Adjust to C++ification.
10430
10431         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10432         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10433         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10434         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10435         gnu_nat_target.
10436         (gnu_target): Delete.
10437         * gnu-nat.h (gnu_target): Delete.
10438         (gnu_nat_target): New class.
10439         * i386-gnu-nat.c (gnu_base_target): New.
10440         (i386_gnu_nat_target): New class.
10441         (the_i386_gnu_nat_target): New.
10442         (_initialize_i386gnu_nat): Adjust to C++ification.
10443
10444 2018-05-02  Pedro Alves  <palves@redhat.com>
10445
10446         * bfd-target.c (target_bfd_xclose): Rename to ...
10447         (target_bfd_close): ... this.
10448         (target_bfd_reopen): Adjust.
10449         * target.c (target_close): Remove references to to_xclose.
10450         * target.h (target_ops::to_xclose): Delete.
10451         (target_ops::to_close): Update comments.
10452
10453 2018-05-02  Pedro Alves  <palves@redhat.com>
10454
10455         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10456         "linux-nat.h".
10457         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10458         * inf-ptrace.c (inf_ptrace_register_u_offset)
10459         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10460         (inf_ptrace_store_register, inf_ptrace_store_registers)
10461         (inf_ptrace_trad_target): Move to ...
10462         * linux-nat-trad.c: ... this new file.
10463         * linux-nat-trad.h: New file.
10464         * linux-nat.c (linux_target_install_ops): Make extern.
10465         (linux_trad_target): Delete.
10466         * linux-nat.h (linux_trad_target): Delete declaration.
10467         (linux_target_install_ops): Declare.
10468         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10469         "linux-nat.h".
10470
10471 2018-05-02  Pedro Alves  <palves@redhat.com>
10472
10473         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10474         procfs_target/add_target here.
10475         * procfs.c (procfs_target): Make static.
10476         (_initialize_procfs): Call add_target here.
10477         * procfs.h (struct target_ops): Remove forward declaration.
10478         (procfs_target): Remove declaration.
10479         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10480
10481 2018-05-02  Pedro Alves  <palves@redhat.com>
10482
10483         * procfs.c (procfs_stopped_by_watchpoint)
10484         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10485         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10486         Forward declare.
10487         (procfs_use_watchpoints): Delete, move contents...
10488         (procfs_target): ... here.
10489         * procfs.h (procfs_use_watchpoints): Delete declaration.
10490         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10491         procfs_use_watchpoints.
10492         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10493         procfs_use_watchpoints.
10494
10495 2018-05-02  Tom Tromey  <tom@tromey.com>
10496
10497         PR python/20084:
10498         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10499         and var_zuinteger_unlimited.
10500         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10501         and PARAM_ZUINTEGER_UNLIMITED.
10502         (set_parameter_value): Handle var_zuinteger and
10503         var_zuinteger_unlimited.
10504         (add_setshow_generic): Likewise.
10505         (parmpy_init): Likewise.
10506
10507 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10508
10509         PR rust/23124
10510         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10511         pointer is not null before dereferencing it.
10512
10513 2018-04-30  Tom Tromey  <tom@tromey.com>
10514
10515         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10516         is_mi_like_p.
10517
10518 2018-04-30  Tom Tromey  <tom@tromey.com>
10519
10520         * breakpoint.c (mention): Remove use of is_mi_like_p.
10521         (print_mention_ranged_breakpoint): Likewise.
10522         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10523         of is_mi_like_p.
10524
10525 2018-04-30  Tom Tromey  <tom@tromey.com>
10526
10527         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10528
10529 2018-04-30  Tom Tromey  <tom@tromey.com>
10530
10531         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10532         (info_spu_event_command): Remove some uses of is_mi_like_p.
10533
10534 2018-04-30  Tom Tromey  <tom@tromey.com>
10535
10536         * python/py-framefilter.c (py_print_single_arg)
10537         (enumerate_locals, py_print_args, py_print_frame): Remove some
10538         uses of is_mi_like_p.
10539
10540 2018-04-30  Tom Tromey  <tom@tromey.com>
10541
10542         * ui-out.c: Update.
10543         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10544         * ui-out.h (ui_out::is_mi_like_p): Now const.
10545         (ui_out::do_is_mi_like_p): Now const.
10546         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10547
10548 2018-04-30  Tom Tromey  <tom@tromey.com>
10549
10550         * varobj.c (varobj_set_visualizer): Use new_reference.
10551         * python/python.c (gdbpy_decode_line): Use new_reference.
10552         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10553         new_reference.
10554
10555 2018-04-30  Tom Tromey  <tom@tromey.com>
10556
10557         * varobj.c (install_new_value): Use new_reference.
10558         * value.h (value_incref): Return void.  Swap intro comment with
10559         value_decref.
10560         * value.c (set_value_parent): Use new_reference.
10561         (value_incref): Return void.  Update intro comment.
10562         (release_value): Use new_reference.
10563         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10564
10565 2018-04-30  Tom Tromey  <tom@tromey.com>
10566
10567         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10568         * gdb_bfd.h (new_bfd_ref): Remove.
10569         (gdb_bfd_open): Update comment.
10570         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10571         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10572         (gdb_bfd_fdopenr): Use new_reference.
10573         * exec.c (exec_file_attach): Use new_reference.
10574
10575 2018-04-30  Tom Tromey  <tom@tromey.com>
10576
10577         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10578         method.
10579
10580 2018-04-30  Tom Tromey  <tom@tromey.com>
10581
10582         * jit.c (jit_read_code_entry): Use type_align.
10583         * i386-tdep.c (i386_gdbarch_init): Don't call
10584         set_gdbarch_long_long_align_bit.
10585         * gdbarch.sh: Remove long_long_align_bit.
10586         * gdbarch.c, gdbarch.h: Rebuild.
10587         * arc-tdep.c (arc_type_align): New function.
10588         (arc_gdbarch_init): Use arc_type_align.  Don't call
10589         set_gdbarch_long_long_align_bit.
10590
10591 2018-04-30  Tom Tromey  <tom@tromey.com>
10592
10593         * rust-lang.c (rust_type_alignment): Remove.
10594         (rust_composite_type): Use type_align.
10595
10596 2018-04-30  Tom Tromey  <tom@tromey.com>
10597
10598         * NEWS: Mention Type.align.
10599         * python/py-type.c (typy_get_alignof): New function.
10600         (type_object_getset): Add "alignof".
10601
10602 2018-04-30  Tom Tromey  <tom@tromey.com>
10603
10604         PR exp/17095:
10605         * NEWS: Update.
10606         * std-operator.def (UNOP_ALIGNOF): New operator.
10607         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10608         New.
10609         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10610         * c-lang.c (c_op_print_tab): Add alignof.
10611         * c-exp.y (ALIGNOF): New token.
10612         (exp): Add "ALIGNOF" production.
10613         (ident_tokens): Add _Alignof and alignof.
10614
10615 2018-04-30  Tom Tromey  <tom@tromey.com>
10616
10617         * i386-tdep.c (i386_type_align): New function.
10618         (i386_gdbarch_init): Update.
10619         * gdbarch.sh (type_align): New method.
10620         * gdbarch.c, gdbarch.h: Rebuild.
10621         * arch-utils.h (default_type_align): Declare.
10622         * arch-utils.c (default_type_align): New function.
10623         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10624         (struct type) <align_log2>: New field.
10625         <instance_flags>: Now a bitfield.
10626         (TYPE_RAW_ALIGN): New macro.
10627         (type_align, type_raw_align, set_type_align): Declare.
10628         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10629         functions.
10630         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10631         (get_alignment, maybe_set_alignment): New functions.
10632         (read_structure_type, read_enumeration_type, read_array_type)
10633         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10634         (read_subrange_type, read_base_type): Set type alignment.
10635
10636 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10637
10638         * dwarf2read.c (read_index_from_section): Use bool.
10639
10640 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10641
10642         PR gdb/22950
10643         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10644         with #ifdef.
10645
10646 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10647
10648         PR build/22873
10649         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10650         last step, and do it atomically.
10651
10652 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10653
10654         * compile/compile-c-types.c (convert_int, convert_float):
10655         Update for C FE v1.
10656
10657 2018-04-27  Tom Tromey  <tom@tromey.com>
10658
10659         PR rust/22545:
10660         * rust-lang.c (rust_inclusive_range_type_p): New function.
10661         (rust_range): Handle inclusive ranges.
10662         (rust_compute_range): Likewise.
10663         * rust-exp.y (struct rust_op) <inclusive>: New field.
10664         (DOTDOTEQ): New constant.
10665         (range_expr): Add "..=" productions.
10666         (operator_tokens): Add "..=" token.
10667         (ast_range): Add "inclusive" parameter.
10668         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10669         ranges.
10670         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10671         bounds values.
10672         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10673         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10674         Update comments.
10675         * expprint.c (print_subexp_standard): Handle new bounds values.
10676         (dump_subexp_body_standard): Likewise.
10677
10678 2018-04-27  Tom Tromey  <tom@tromey.com>
10679
10680         * configure: Rebuild.
10681         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10682         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10683         "OVERRIDE".
10684         (class symbol_needs_eval_context): Likewise.
10685         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10686         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10687         "virtual".
10688         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10689         "override".
10690         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10691         * aarch64-tdep.c (instruction_reader::read): Use "override".
10692         (instruction_reader_test::read): Likewise.
10693         * arm-tdep.c (instruction_reader::read): Use "override".
10694         (instruction_reader_thumb::read): Likewise.
10695
10696 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10697
10698         PR remote/9665
10699         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10700         instead of remote_send.
10701         (remote_send): Remove.
10702
10703 2018-04-26  Pedro Alves  <palves@redhat.com>
10704
10705         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10706         find_function_start_sal instead of find_pc_line.
10707
10708 2018-04-26  Pedro Alves  <palves@redhat.com>
10709
10710         * breakpoint.c (set_breakpoint_location_function): Handle
10711         mst_data_gnu_ifunc.
10712         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10713         * elfread.c (elf_symtab_read): Give data symbols with
10714         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10715         (elf_rel_plt_read): Update comment.
10716         * linespec.c (convert_linespec_to_sals): Handle
10717         mst_data_gnu_ifunc.
10718         (minsym_found): Handle mst_data_gnu_ifunc.
10719         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10720         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10721         * parse.c (find_minsym_type_and_address): Handle
10722         mst_data_gnu_ifunc.
10723         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10724         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10725         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10726         comment.
10727         <mst_data_gnu_ifunc>: New enumerator.
10728
10729 2018-04-26  Pedro Alves  <palves@redhat.com>
10730
10731         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10732         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10733         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10734         Handle it.
10735         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10736         (lookup_minimal_symbol_by_pc): Adjust.
10737         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10738         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10739         * minsyms.h (lookup_msym_prefer): New enum.
10740         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10741         parameter by a lookup_msym_prefer parameter.
10742
10743 2018-04-26  Pedro Alves  <palves@redhat.com>
10744
10745         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10746         ends in "@plt" instead of looking at the symbol's section.
10747
10748 2018-04-26  Pedro Alves  <palves@redhat.com>
10749
10750         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10751         all references.
10752         (find_pc_partial_function_gnu_ifunc): Rename to ...
10753         (find_pc_partial_function): ... this, and remove references to
10754         'is_gnu_ifunc_p'.
10755         (find_pc_partial_function): Delete old implementation.
10756         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10757
10758 2018-04-26  Pedro Alves  <palves@redhat.com>
10759
10760         * linespec.c (struct bound_minimal_symbol_search_key): New.
10761         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10762         skip first line if we found a GNU ifunc minimal symbol by name.
10763         (compare_msymbols): Change parameters to work with a destructured
10764         lhs minsym.
10765         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10766         functions.
10767
10768 2018-04-26  Pedro Alves  <palves@redhat.com>
10769
10770         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10771         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10772         address/name.
10773         (add_location_to_breakpoint): Store the minsym and the objfile in
10774         the breakpoint location.
10775         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10776         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10777         Record the minsym in the sal.
10778         * symtab.h (symtab_and_line) <msymbol>: New field.
10779
10780 2018-04-26  Pedro Alves  <palves@redhat.com>
10781
10782         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10783         unless we actually resolved the ifunc.
10784
10785 2018-04-26  Pedro Alves  <palves@redhat.com>
10786
10787         * c-exp.y (variable production): Prefer ifunc minsyms over
10788         regular function symbols.
10789         * symtab.c (find_gnu_ifunc): New function.
10790         * minsyms.h (lookup_msym_prefer): New enum.
10791         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10792         parameter by a lookup_msym_prefer parameter.
10793         * symtab.h (find_gnu_ifunc): New declaration.
10794
10795 2018-04-26  Pedro Alves  <palves@redhat.com>
10796
10797         * blockframe.c (find_gnu_ifunc_target_type): New function.
10798         (find_function_type): New.
10799         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10800         return a value with a memory address.
10801         (eval_call): For calls to GNU ifunc functions, try to find the
10802         type of the target function from the type that the resolver
10803         returns.
10804         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10805         symbols.
10806         * infcall.c (find_function_return_type): Delete.
10807         (find_function_addr): Add 'function_type' parameter.  For calls to
10808         GNU ifunc functions, try to find the type of the target function
10809         from the type that the resolver returns, and return it via
10810         FUNCTION_TYPE.
10811         (call_function_by_hand_dummy): Adjust to use the function type
10812         returned by find_function_addr.
10813         (find_function_addr): Add 'function_type' parameter and move
10814         description here.
10815         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10816         declarations.
10817
10818 2018-04-26  Pedro Alves  <palves@redhat.com>
10819
10820         * c-exp.y (variable production): Skip finding an alias for ifunc
10821         symbols.
10822
10823 2018-04-26  Pedro Alves  <palves@redhat.com>
10824
10825         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10826
10827 2018-04-25  Pedro Alves  <palves@redhat.com>
10828
10829         * infcmd.c (kill_command): Print the pid as string, not the whole
10830         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10831         message.
10832         * remote.c (remote_detach_1): Print the pid as string, not the
10833         whole thread's ptid.
10834
10835 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10836             Sergio Durigan Junior  <sergiodj@redhat.com>
10837             Pedro Alves  <palves@redhat.com>
10838
10839         * infcmd.c (kill_command): Print message when inferior has
10840         been killed.
10841         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10842         '1'.
10843         (add_inferior): Improve message printed when
10844         'print_inferior_events' is on.
10845         (exit_inferior): Remove message printed when
10846         'print_inferior_events' is on.
10847         (detach_inferior): Improve message printed when
10848         'print_inferior_events' is on.
10849         (initialize_inferiors): Use 'add_inferior_silent' to set
10850         'current_inferior_'.
10851         * inferior.h (print_inferior_events): Declare here as
10852         'extern'.
10853         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10854         '[Detaching...]' messages when 'print_inferior_events' is on.
10855         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10856         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10857         'Detaching after fork from child...', replace it by '... from
10858         parent...'.
10859         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10860         prefix/suffix when printing 'Detaching...' messages.  Print
10861         them when 'print_inferior_events' is on.
10862         * remote.c (remote_detach_1): Print message when detaching
10863         from inferior and '!is_fork_parent'.
10864
10865 2018-04-24  Tom Tromey  <tom@tromey.com>
10866
10867         * cli-out.h: Reindent.
10868
10869 2018-04-24  Tom Tromey  <tom@tromey.com>
10870
10871         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10872         (cli_ui_out::do_field_string): Use fputs_filtered.
10873         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10874
10875 2018-04-23  Tom Tromey  <tom@tromey.com>
10876
10877         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10878         gdb::unique_xmalloc_ptr.
10879
10880 2018-04-23  Tom Tromey  <tom@tromey.com>
10881
10882         * configure: Rebuild.
10883
10884 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10885
10886         PR gdb/23095
10887         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10888         prepare_for_testing.  Set normal_bp to r_debug_state if target
10889         is bsd.
10890
10891 2018-04-21  Pedro Alves  <palves@redhat.com>
10892             Rajendra SY  <rajendra.sy@gmail.com>
10893
10894         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10895         * remote.c (extended_remote_attach): In all-stop mode, mark the
10896         thread as executing.
10897
10898 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10899
10900         * thread.c (thread_apply_all_command): Fix comment.
10901         (thread_command): Fix comment.
10902
10903 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10904
10905         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10906         parameter.
10907         * features/aarch64-core.c (create_feature_aarch64_core):
10908         Regenerate.
10909         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10910         Likewise.
10911         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10912         Likewise.
10913         * features/i386/32bit-avx512.c
10914         (create_feature_i386_32bit_avx512): Likewise.
10915         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10916         Likewise.
10917         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10918         Likewise.
10919         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10920         Likewise.
10921         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10922         Likewise.
10923         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10924         Likewise.
10925         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10926         Likewise.
10927         * features/i386/64bit-avx512.c
10928         (create_feature_i386_64bit_avx512): Likewise.
10929         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10930         Likewise.
10931         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10932         Likewise.
10933         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10934         Likewise.
10935         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10936         Likewise.
10937         * features/i386/64bit-segments.c
10938         (create_feature_i386_64bit_segments): Likewise.
10939         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10940         Likewise.
10941         * features/i386/x32-core.c
10942         (create_feature_i386_x32_core): Likewise.
10943         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10944         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10945         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10946         * target-descriptions.c: In generated code, don't pass xml
10947         filename.
10948
10949 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10950
10951         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10952         (print_xml_feature::visit_post): Likewise.
10953         (print_xml_feature::visit): Likewise.
10954         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10955         (print_xml_feature): Add new class.
10956         * regformats/regdat.sh: Null xmltarget on feature targets.
10957         * target-descriptions.c (struct target_desc): Add xmltarget.
10958         (maintenance_check_tdesc_xml_convert): Add unittest function.
10959         (tdesc_get_features_xml): Add function to get xml.
10960         (maintenance_check_xml_descriptions): Test xml generation.
10961         * xml-tdesc.c (string_read_description_xml): Add function.
10962         * xml-tdesc.h (string_read_description_xml): Add declaration.
10963
10964 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10965
10966         * features/Makefile: Add feature marker to targets with new style
10967         target descriptions.
10968         * regformats/aarch64.dat: Regenerate.
10969         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10970         * regformats/i386/amd64-avx-linux.dat: Likewise.
10971         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10972         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10973         * regformats/i386/amd64-linux.dat: Likewise.
10974         * regformats/i386/amd64-mpx-linux.dat: Likewise.
10975         * regformats/i386/amd64.dat: Likewise.
10976         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10977         * regformats/i386/i386-avx-linux.dat: Likewise.
10978         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10979         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10980         * regformats/i386/i386-linux.dat: Likewise.
10981         * regformats/i386/i386-mmx-linux.dat: Likewise.
10982         * regformats/i386/i386-mpx-linux.dat: Likewise.
10983         * regformats/i386/i386.dat: Likewise.
10984         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10985         * regformats/i386/x32-avx-linux.dat: Likewise.
10986         * regformats/i386/x32-linux.dat: Likewise.
10987         * regformats/tic6x-c62x-linux.dat: Likewise.
10988         * regformats/tic6x-c64x-linux.dat: Likewise.
10989         * regformats/tic6x-c64xp-linux.dat: Likewise.
10990         * regformats/regdat.sh: Parse feature marker.
10991
10992 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10993
10994         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10995         (tdesc_osabi_name): Likewise.
10996         * target-descriptions.c (tdesc_architecture_name): Add new
10997         function.
10998         (tdesc_osabi_name): Likewise.
10999
11000 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11001
11002         * common/tdesc.c (tdesc_predefined_type): Move to here.
11003         (tdesc_named_type): Likewise.
11004         (tdesc_create_vector): Likewise.
11005         (tdesc_create_struct): Likewise.
11006         (tdesc_set_struct_size): Likewise.
11007         (tdesc_create_union): Likewise.
11008         (tdesc_create_flags): Likewise.
11009         (tdesc_create_enum): Likewise.
11010         (tdesc_add_field): Likewise.
11011         (tdesc_add_typed_bitfield): Likewise.
11012         (tdesc_add_bitfield): Likewise.
11013         (tdesc_add_flag): Likewise.
11014         (tdesc_add_enum_value): Likewise.
11015         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
11016         (struct tdesc_type_vector): Likewise.
11017         (struct tdesc_type_field): Likewise.
11018         (struct tdesc_type_with_fields): Likewise.
11019         (tdesc_create_enum): Add declaration.
11020         (tdesc_add_typed_bitfield): Likewise.
11021         (tdesc_add_enum_value): Likewise.
11022         * target-descriptions.c (tdesc_type_field): Move from here.
11023         (tdesc_type_builtin): Likewise.
11024         (tdesc_type_vector): Likewise.
11025         (tdesc_type_with_fields): Likewise.
11026         (tdesc_predefined_types): Likewise.
11027         (tdesc_named_type): Likewise.
11028         (tdesc_create_vector): Likewise.
11029         (tdesc_create_struct): Likewise.
11030         (tdesc_set_struct_size): Likewise.
11031         (tdesc_create_union): Likewise.
11032         (tdesc_create_flags): Likewise.
11033         (tdesc_create_enum): Likewise.
11034         (tdesc_add_field): Likewise.
11035         (tdesc_add_typed_bitfield): Likewise.
11036         (tdesc_add_bitfield): Likewise.
11037         (tdesc_add_flag): Likewise.
11038         (tdesc_add_enum_value): Likewise.
11039         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
11040         (tdesc_add_typed_bitfield): Likewise.
11041         (tdesc_add_enum_value): Likewise.
11042
11043 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11044
11045         * common/tdesc.c (tdesc_feature::accept): Move to here.
11046         (tdesc_feature::operator==): Likewise.
11047         (tdesc_create_reg): Likewise.
11048         * common/tdesc.h (tdesc_type_kind): Likewise.
11049         (struct tdesc_type): Likewise.
11050         (struct tdesc_feature): Likewise.
11051         * regformats/regdat.sh: Create a feature.
11052         * target-descriptions.c (tdesc_type_kind): Move from here.
11053         (tdesc_type): Likewise.
11054         (tdesc_type_up): Likewise.
11055         (tdesc_feature): Likewise.
11056         (tdesc_create_reg): Likewise.
11057
11058 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
11059
11060         * Makefile.in: Add arch/tdesc.c
11061         * common/tdesc.c: New file.
11062         * common/tdesc.h (tdesc_element_visitor): Move to here.
11063         (tdesc_element): Likewise.
11064         (tdesc_reg): Likewise.
11065         (tdesc_reg_up): Likewise.
11066         * regformats/regdef.h (reg): Add offset to constructors.
11067         * target-descriptions.c (tdesc_element_visitor): Move from here.
11068         (tdesc_element): Likewise.
11069         (tdesc_reg): Likewise.
11070         (tdesc_reg_up): Likewise.
11071
11072 2018-04-17  Tom Tromey  <tom@tromey.com>
11073
11074         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
11075         discriminant field.
11076
11077 2018-04-17  Tom Tromey  <tom@tromey.com>
11078
11079         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
11080
11081 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11082
11083         * symtab.c (print_symbol_info): Skip printing filename and line
11084         number when `last' is NULL.
11085         (symtab_symbol_info): Use empty string instead of NULL for first
11086         invocation of print_symbol_info.
11087         (rbreak_command): Pass NULL to `last' parameter of
11088         print_symbol_info.
11089
11090 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11091
11092         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11093         instead of nullptr.
11094
11095 2018-04-16  Pedro Alves  <palves@redhat.com>
11096
11097         * MAINTAINERS (sh): Remove.
11098         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11099         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11100         (ALLDEPFILES): Remove sh64-tdep.c.
11101         * NEWS: Mentions that support for SH-5/SH64 is removed.
11102         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11103         (sh*-*-openbsd*): Ditto.
11104         (sh64-*-elf*): Remove.
11105         (sh*): Remove.
11106         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11107         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11108         * sh-tdep.c: No longer include "sh64-tdep.h".
11109         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11110         * sh64-tdep.c, sh64-tdep.h: Remove files.
11111
11112 2018-04-16  Pedro Alves  <palves@redhat.com>
11113
11114         * MAINTAINERS: Remove m88k.
11115         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11116         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11117         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11118         * NEWS: Mention that support for m88k was removed.
11119         * configure.host (m88*-*-*): Remove support.
11120         * configure.nat (m88k-*-*): Remove support.
11121         * configure.tgt (m88*-*-openbsd*): Remove.
11122         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11123
11124 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11125
11126         * configure.tgt (x86_tobjs): New variable.
11127         (amd64_tobjs, i386_tobjs): Use it.
11128
11129 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11130
11131         * symtab.c (print_symbol_info): Precede the symbol definition by
11132         the line number when available.
11133         * NEWS: Advertise this enhancement.
11134
11135 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11136
11137         * NEWS (New options): announce set/show record btrace cpu.
11138         * btrace.c: Include record-btrace.h.
11139         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11140         the vendor is unknown.
11141         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11142         Maybe overwrite the btrace configuration's cpu.
11143         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11144         (btrace_fetch): Add cpu parameter.  Update callers.
11145         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11146         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11147         errata workarounds if the vendor is unknown.
11148         * python/py-record-btrace.c: Include record-btrace.h.
11149         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11150         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11151         * record-btrace.c (record_btrace_cpu_state_kind): New.
11152         (record_btrace_cpu): New.
11153         (set_record_btrace_cpu_cmdlist): New.
11154         (record_btrace_get_cpu): New.
11155         (require_btrace_thread, record_btrace_info)
11156         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11157         (cmd_set_record_btrace_cpu_none): New.
11158         (cmd_set_record_btrace_cpu_auto): New.
11159         (cmd_set_record_btrace_cpu): New.
11160         (cmd_show_record_btrace_cpu): New.
11161         (_initialize_record_btrace): Initialize set/show record btrace cpu
11162         commands.
11163         * record-btrace.h (record_btrace_get_cpu): New.
11164
11165 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11166
11167         * record.c (set_record_command): Fix typo in message.
11168
11169 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11170
11171         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11172
11173 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11174
11175         * infrun.c (process_event_stop_test): Call
11176         gdbarch_in_indirect_branch_thunk.
11177         * gdbarch.sh (in_indirect_branch_thunk): New.
11178         * gdbarch.c: Regenerated.
11179         * gdbarch.h: Regenerated.
11180         * x86-tdep.h: New.
11181         * x86-tdep.c: New.
11182         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11183         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11184         (ALLDEPFILES): Add x86-tdep.c.
11185         * arch-utils.h (default_in_indirect_branch_thunk): New.
11186         * arch-utils.c (default_in_indirect_branch_thunk): New.
11187         * i386-tdep: Include x86-tdep.h.
11188         (i386_in_indirect_branch_thunk): New.
11189         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11190         function.
11191         * amd64-tdep: Include x86-tdep.h.
11192         (amd64_in_indirect_branch_thunk): New.
11193         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11194
11195 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11196
11197         PR gdb/23053
11198         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11199         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11200         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11201         regression.
11202
11203 2018-04-12  Tom Tromey  <tom@tromey.com>
11204
11205         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11206         (rust_evaluate_subexp): Likewise.
11207
11208 2018-04-12  Pedro Alves  <palves@redhat.com>
11209
11210         * procfs.c (procfs_detach): Make forward declaration's prototype
11211         match definition's protototype.
11212         (proc_get_LDT_entry): Remove stale do_cleanups call.
11213
11214 2018-04-12  Pedro Alves  <palves@redhat.com>
11215
11216         * target.h (target_ops::to_has_exited): Delete.
11217         (target_has_exited): Delete.
11218         * target-delegates.c: Regenerate.
11219
11220 2018-04-11  Pedro Alves  <palves@redhat.com>
11221
11222         * target.c (fileio_fh_t::t): Add comment.
11223         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11224         (target_fileio_close): Handle a NULL target.
11225         (invalidate_fileio_fh): New.
11226         (target_close): Call it.
11227         * remote.c (remote_hostio_send_command): No longer check whether
11228         remote_desc is open.
11229
11230 2018-04-11  Pedro Alves  <palves@redhat.com>
11231
11232         * target.c (fileio_fh_t): Make it a named struct instead of a
11233         typedef.
11234         (fileio_fh_t::is_closed): New method.
11235         (DEF_VEC_O (fileio_fh_t)): Remove.
11236         (fileio_fhandles): Now a std::vector.
11237         (is_closed_fileio_fh): Delete.
11238         (acquire_fileio_fd): Adjust.  Rename parameters.
11239         (release_fileio_fd): Adjust.
11240         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11241         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11242         (target_fileio_close): Adjust.
11243
11244 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11245
11246         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11247         index.
11248
11249 2018-04-10  Pedro Alves  <palves@redhat.com>
11250
11251         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11252         (scoped_finish_thread_state): New class.
11253         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11254         cleanup.
11255         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11256         (fetch_inferior_event, normal_stop): Likewise.
11257         * thread.c (finish_thread_state_cleanup): Delete.
11258
11259 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11260             Pedro Alves  <palves@redhat.com>
11261
11262         * value.c: Include "selftest.h" and "common/array-view.h".
11263         (struct range) <operator ==>: New.
11264         (test_ranges_contain): New.
11265         (check_ranges_vector): New.
11266         (test_insert_into_bit_range_vector): New.
11267         (_initialize_values): Register selftests.
11268         * common/array-view.h (operator==, operator!=): New.
11269
11270 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11271
11272         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11273         an iterator.
11274         * inline-frame.c: Include <algorithm>.
11275         (struct inline_state): Add constructor.
11276         (inline_state_s): Remove.
11277         (DEF_VEC_O(inline_state_s)): Remove.
11278         (inline_states): Change type to std::vector.
11279         (find_inline_frame_state): Adjust to std::vector.
11280         (allocate_inline_frame_state): Remove.
11281         (clear_inline_frame_state): Adjust to std::vector.
11282         (skip_inline_frames): Adjust to std::vector.
11283
11284 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11285
11286         * tracepoint.h (struct trace_state_variable): Add constructor.
11287         <name>: Change type to std::string.
11288         * tracepoint.c (tsv_s): Remove.
11289         (DEF_VEC_O(tsv_s)): Remove.
11290         (tvariables): Change to std::vector.
11291         (create_trace_state_variable): Adjust to std::vector.
11292         (find_trace_state_variable): Likewise.
11293         (find_trace_state_variable_by_number): Likewise.
11294         (delete_trace_state_variable): Likewise.
11295         (trace_variable_command): Adjust to std::string.
11296         (delete_trace_variable_command): Likewise.
11297         (tvariables_info_1): Adjust to std::vector.
11298         (save_trace_state_variables): Likewise.
11299         (start_tracing): Likewise.
11300         (merge_uploaded_trace_state_variables): Adjust to std::vector
11301         and std::string.
11302         * target.h (struct target_ops)
11303         <to_download_trace_state_variable>: Pass reference to
11304         trace_state_variable.
11305         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11306         * target-delegates.c: Re-generate.
11307         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11308         (mi_tsv_deleted): Likewise.
11309         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11310         * remote.c (remote_download_trace_state_variable): Change
11311         pointer to reference and adjust.
11312         * make-target-delegates (parse_argtypes): Handle references.
11313         (write_function_header): Likewise.
11314         (munge_type): Likewise.
11315
11316 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11317
11318         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11319         string_view-selftests.c.
11320         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11321         testsuite.
11322         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11323         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11324         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11325         * unittests/basic_string_view/element_access/char/1.cc:
11326         Likewise.
11327         * unittests/basic_string_view/element_access/char/empty.cc:
11328         Likewise.
11329         * unittests/basic_string_view/element_access/char/front_back.cc:
11330         Likewise.
11331         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11332         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11333         Likewise.
11334         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11335         Likewise.
11336         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11337         Likewise.
11338         * unittests/basic_string_view/operations/compare/char/1.cc:
11339         Likewise.
11340         * unittests/basic_string_view/operations/compare/char/13650.cc:
11341         Likewise.
11342         * unittests/basic_string_view/operations/copy/char/1.cc:
11343         Likewise.
11344         * unittests/basic_string_view/operations/data/char/1.cc:
11345         Likewise.
11346         * unittests/basic_string_view/operations/find/char/1.cc:
11347         Likewise.
11348         * unittests/basic_string_view/operations/find/char/2.cc:
11349         Likewise.
11350         * unittests/basic_string_view/operations/find/char/3.cc:
11351         Likewise.
11352         * unittests/basic_string_view/operations/find/char/4.cc:
11353         Likewise.
11354         * unittests/basic_string_view/operations/rfind/char/1.cc:
11355         Likewise.
11356         * unittests/basic_string_view/operations/rfind/char/2.cc:
11357         Likewise.
11358         * unittests/basic_string_view/operations/rfind/char/3.cc:
11359         Likewise.
11360         * unittests/basic_string_view/operations/substr/char/1.cc:
11361         Likewise.
11362         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11363         * unittests/string_view-selftests.c: New file.
11364
11365 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11366
11367         * unittests/basic_string_view/capacity/1.cc: New file.
11368         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11369         * unittests/basic_string_view/cons/char/1.cc: New file.
11370         * unittests/basic_string_view/cons/char/2.cc: New file.
11371         * unittests/basic_string_view/cons/char/3.cc: New file.
11372         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11373         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11374         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11375         * unittests/basic_string_view/element_access/char/1.cc: New file.
11376         * unittests/basic_string_view/element_access/char/2.cc: New file.
11377         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11378         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11379         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11380         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11381         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11382         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11383         * unittests/basic_string_view/include.cc: New file.
11384         * unittests/basic_string_view/inserters/char/1.cc: New file.
11385         * unittests/basic_string_view/inserters/char/2.cc: New file.
11386         * unittests/basic_string_view/inserters/char/3.cc: New file.
11387         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11388         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11389         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11390         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11391         * unittests/basic_string_view/literals/types.cc: New file.
11392         * unittests/basic_string_view/literals/values.cc: New file.
11393         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11394         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11395         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11396         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11397         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11398         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11399         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11400         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11401         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11402         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11403         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11404         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11405         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11406         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11407         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11408         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11409         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11410         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11411         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11412         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11413         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11414         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11415         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11416         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11417         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11418         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11419         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11420         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11421         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11422         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11423         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11424         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11425         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11426         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11427         * unittests/basic_string_view/operators/char/2.cc: New file.
11428         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11429         * unittests/basic_string_view/range_access/char/1.cc: New file.
11430         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11431         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11432         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11433         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11434         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11435         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11436         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11437         * unittests/basic_string_view/typedefs.cc: New file.
11438         * unittests/basic_string_view/types/1.cc: New file.
11439
11440 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11441
11442         * common/gdb_string_view.h: Remove libstdc++ implementation
11443         details, adjust to gdb reality.
11444         * common/gdb_string_view.tcc: Likewise.
11445         * cli/cli-script.c (struct string_view): Remove.
11446         (user_args) <m_args>: Change element type to gdb::string_view.
11447         (user_args::insert_args): Adjust.
11448
11449 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11450
11451         * common/gdb_string_view.h: New file.
11452         * common/gdb_string_view.tcc: New file.
11453
11454 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11455
11456         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11457         * configure: Re-generate.
11458
11459 2018-04-09  Pedro Alves  <palves@redhat.com>
11460
11461         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11462         (set_target_gdbarch): Call
11463         gdb::observers::architecture_changed.notify instead of
11464         observer_notify_architecture_changed.
11465
11466 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11467
11468         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11469         (do_restore_current_traceframe_cleanup): Remove.
11470         (restore_current_traceframe_cleanup_dtor): Remove.
11471         (make_cleanup_restore_current_traceframe): Remove.
11472         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11473         New.
11474         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11475         * infrun.c (fetch_inferior_event): Use
11476         scoped_restore_current_traceframe.
11477
11478 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11479
11480         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11481         Remove.
11482         <n_allocated_type_units>: Remove.
11483         <all_type_units>: Change to std::vector.
11484         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11485         to std::vector change.
11486         (dwarf2_per_objfile::get_cutu): Likewise.
11487         (dwarf2_per_objfile::get_tu): Likewise.
11488         (create_signatured_type_table_from_index): Likewise.
11489         (create_signatured_type_table_from_debug_names): Likewise.
11490         (dw2_symtab_iter_next): Likewise.
11491         (dw2_print_stats): Likewise.
11492         (dw2_expand_all_symtabs): Likewise.
11493         (dw2_expand_marked_cus): Likewise.
11494         (dw2_debug_names_iterator::next): Likewise.
11495         (dwarf2_initialize_objfile): Likewise.
11496         (add_signatured_type_cu_to_table): Likewise.
11497         (create_all_type_units): Likewise.
11498         (add_type_unit): Likewise.
11499         (struct tu_abbrev_offset): Add constructor.
11500         (build_type_psymtabs_1): Adjust to std::vector change.
11501         (print_tu_stats): Likewise.
11502         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11503         (write_debug_names): Likewise.
11504
11505 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11506
11507         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11508         Make an std::vector.
11509         <n_comp_units>: Remove.
11510         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11511         to std::vector change.
11512         (dwarf2_per_objfile::get_cutu): Likewise.
11513         (dwarf2_per_objfile::get_cu): Likewise.
11514         (create_cus_from_index): Likewise.
11515         (create_addrmap_from_index): Likewise.
11516         (create_addrmap_from_aranges): Likewise.
11517         (dwarf2_read_index): Likewise.
11518         (dw2_find_last_source_symtab): Likewise.
11519         (dw2_map_symtabs_matching_filename): Likewise.
11520         (dw2_symtab_iter_next): Likewise.
11521         (dw2_print_stats): Likewise.
11522         (dw2_expand_all_symtabs): Likewise.
11523         (dw2_expand_symtabs_with_fullname): Likewise.
11524         (dw2_expand_marked_cus): Likewise.
11525         (dw2_map_symbol_filenames): Likewise.
11526         (create_cus_from_debug_names): Likewise.
11527         (dwarf2_read_debug_names): Likewise.
11528         (dw2_debug_names_iterator::next): Likewise.
11529         (dwarf2_initialize_objfile): Likewise.
11530         (set_partial_user): Likewise.
11531         (dwarf2_build_psymtabs_hard): Likewise.
11532         (read_comp_units_from_section): Remove arguments, adjust to
11533         std::vector change.
11534         (create_all_comp_units): Adjust to std::vector and
11535         read_comp_units_from_section changes.
11536         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11537         change.
11538         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11539         (psyms_seen_size): Likewise.
11540         (write_gdbindex): Likewise.
11541         (write_debug_names): Likewise.
11542
11543 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11544
11545         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11546         with dwarf2_per_objfile.
11547         (create_cus_from_index): Likewise.
11548         (create_signatured_type_table_from_index): Likewise.
11549         (dwarf2_read_index): Likewise.
11550         (dwarf2_initialize_objfile): Likewise.
11551         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11552         per_cu rather than get_dwarf2_per_objfile.
11553
11554 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11555
11556         * dwarf2read.h (struct signatured_type): Forward declare.
11557         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11558         New methods.
11559         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11560         (dw2_get_cutu): ...this.
11561         (dwarf2_per_objfile::get_cu): Rename from...
11562         (dw2_get_cu): ...this.
11563         (dwarf2_per_objfile::get_tu): New.
11564         (create_addrmap_from_index): Adjust.
11565         (create_addrmap_from_aranges): Adjust.
11566         (dw2_find_last_source_symtab): Adjust.
11567         (dw2_map_symtabs_matching_filename): Adjust.
11568         (dw2_symtab_iter_next): Adjust.
11569         (dw2_print_stats): Adjust.
11570         (dw2_expand_all_symtabs): Adjust.
11571         (dw2_expand_symtabs_with_fullname): Adjust.
11572         (dw2_expand_marked_cus): Adjust.
11573         (dw_expand_symtabs_matching_file_matcher): Adjust.
11574         (dw2_map_symbol_filenames): Adjust.
11575         (dw2_debug_names_iterator::next): Adjust.
11576         (dwarf2_initialize_objfile): Adjust.
11577         (set_partial_user): Adjust.
11578         (dwarf2_build_psymtabs_hard): Adjust.
11579
11580 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11581
11582         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11583         Remove unused variables.
11584         (dw2_map_symtabs_matching_filename): Likewise.
11585         (dwarf2_record_block_ranges): Likewise.
11586         (dwarf2_read_addr_index): Likewise.
11587         (follow_die_offset): Likewise.
11588
11589 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11590
11591         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11592         to symbol_file_add_main.
11593
11594 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11595
11596         PR mi/22299
11597         * mi/mi-console.c (do_fputc_async_safe): New.
11598         (mi_console_file::write_async_safe): New.
11599         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11600         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11601         New.
11602         * ui-file.c (ui_file::putstrn): Adjust call to
11603         fputstrn_unfiltered.
11604         * utils.c (printchar): Replace do_fputs and do_fprintf
11605         parameters by do_fputc.
11606         (fputstr_filtered): Adjust call to printchar.
11607         (fputstr_unfiltered): Likewise.
11608         (fputstrn_filtered): Likewise.
11609         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11610         printchar.
11611         * utils.h (do_fputc_ftype): New typedef.
11612         (fputstrn_unfiltered): Add do_fputc parameter.
11613
11614 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11615
11616         * regformats/i386/i386-avx.dat: Remove.
11617
11618 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11619
11620         PR gdb/22979
11621         * amd64-tdep.c (amd64_none_init_abi): New function.
11622         (amd64_x32_none_init_abi): New function.
11623         (_initialize_amd64_tdep): Register handlers for x86-64 and
11624         x64_32 with GDB_OSABI_NONE.
11625         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11626         GDB_OSABI_NONE osabi.
11627
11628 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11629
11630         PR gdb/22980
11631         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11632         GDB_OSABI_NONE.
11633         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11634         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11635
11636 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11637
11638         * common/byte-vector.h (char_vector): New type.
11639         * target.h (target_read_alloc): Return
11640         gdb::optional<byte_vector>.
11641         (target_read_stralloc): Return gdb::optional<char_vector>.
11642         (target_get_osdata): Return gdb::optional<char_vector>.
11643         * target.c (target_read_alloc_1): Templatize.  Replacement
11644         manual memory management with vector.
11645         (target_read_alloc): Change return type, adjust.
11646         (target_read_stralloc): Change return type, adjust.
11647         (target_get_osdata): Change return type, adjust.
11648         * auxv.c (struct auxv_info) <length>: Remove.
11649         <data>: Change type to gdb::optional<byte_vector>.
11650         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11651         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11652         (target_auxv_search): Adjust.
11653         (fprint_target_auxv): Adjust.
11654         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11655         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11656         (linux_make_corefile_notes): Adjust.
11657         * osdata.c (get_osdata): Adjust.
11658         * remote.c (remote_get_threads_with_qxfer): Adjust.
11659         (remote_memory_map): Adjust.
11660         (remote_traceframe_info): Adjust.
11661         (btrace_read_config): Adjust.
11662         (remote_read_btrace): Adjust.
11663         (remote_pid_to_exec_file): Adjust.
11664         * solib-aix.c (solib_aix_get_library_list): Adjust.
11665         * solib-dsbt.c (decode_loadmap): Don't free buf.
11666         (dsbt_get_initial_loadmaps): Adjust.
11667         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11668         * solib-target.c (solib_target_current_sos): Adjust.
11669         * tracepoint.c (sdata_make_value): Adjust.
11670         * xml-support.c (xinclude_start_include): Adjust.
11671         (xml_fetch_content_from_file): Adjust.
11672         * xml-support.h (xml_fetch_another): Change return type.
11673         (xml_fetch_content_from_file): Change return type.
11674         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11675         * xml-tdesc.c (file_read_description_xml): Adjust.
11676         (fetch_available_features_from_target): Change return type.
11677         (target_fetch_description_xml): Adjust.
11678         (target_read_description_xml): Adjust.
11679
11680 2018-04-06  Tom Tromey  <tom@tromey.com>
11681
11682         * value.c (~value): Update.
11683         (struct value) <contents>: Now unique_xmalloc_ptr.
11684         (value_contents_bits_eq, allocate_value_contents)
11685         (value_contents_raw, value_contents_all_raw)
11686         (value_contents_for_printing, value_contents_for_printing_const)
11687         (set_value_enclosing_type): Update.
11688
11689 2018-04-06  Tom Tromey  <tom@tromey.com>
11690
11691         * value.c (range_s): Remove typedef, VEC.
11692         (struct range): Add operator<.
11693         (range_lessthan): Remove.
11694         (ranges_contain): Change type.
11695         (~value): Update.
11696         (struct value) <unavailable, optimized_out>: Now std::vector.
11697         (value_entirely_available)
11698         (value_entirely_covered_by_range_vector)
11699         (value_entirely_unavailable, value_entirely_optimized_out):
11700         Update.
11701         (insert_into_bit_range_vector): Change argument type.
11702         (find_first_range_overlap): Likewise.
11703         (struct ranges_and_idx, value_contents_bits_eq)
11704         (require_not_optimized_out, require_available): Update.
11705         (ranges_copy_adjusted): Change argument types.
11706         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11707
11708 2018-04-06  Tom Tromey  <tom@tromey.com>
11709
11710         * value.c (~value): Update.
11711         (struct value) <parent>: Now a value_ref_ptr.
11712         (value_parent, set_value_parent, value_address, value_copy):
11713         Update.
11714
11715 2018-04-06  Tom Tromey  <tom@tromey.com>
11716
11717         * value.c (struct value): Add constructor, destructor, and member
11718         initializers.
11719         (allocate_value_lazy, value_decref): Update.
11720
11721 2018-04-06  Tom Tromey  <tom@tromey.com>
11722
11723         * value.c (struct value) <released, next>: Remove.
11724         (all_values): Now a std::vector.
11725         (allocate_value_lazy): Update.
11726         (value_next): Remove.
11727         (value_mark, value_free_to_mark, release_value)
11728         (value_release_to_mark): Update.
11729
11730 2018-04-06  Tom Tromey  <tom@tromey.com>
11731
11732         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11733         (free_value_chain): Remove.
11734         * value.c (free_value_chain): Remove.
11735         (value_release_to_mark): Return a std::vector.
11736         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11737         std::vector.
11738         (check_condition): Update.
11739         * eval.c (fetch_subexp_value): Change "val_chain" to a
11740         std::vector.
11741         * breakpoint.c (update_watchpoint): Update.
11742         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11743
11744 2018-04-06  Tom Tromey  <tom@tromey.com>
11745
11746         * value.h (free_all_values): Remove.
11747         * value.c (free_all_values): Remove.
11748
11749 2018-04-06  Tom Tromey  <tom@tromey.com>
11750
11751         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11752         (value_history_chain, value_history_count): Remove.
11753         (value_history): New global.
11754         (record_latest_value, access_value_history, show_values)
11755         (preserve_values): Update.
11756
11757 2018-04-06  Tom Tromey  <tom@tromey.com>
11758
11759         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11760         * varobj.c (varobj_set_display_format, varobj_set_value)
11761         (install_default_visualizer, construct_visualizer)
11762         (install_new_value, ~varobj, varobj_get_value_type)
11763         (my_value_of_variable, varobj_editable_p): Update.
11764         * c-varobj.c (c_describe_child, c_value_of_variable)
11765         (cplus_number_of_children, cplus_describe_child): Update.
11766         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11767         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11768         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11769
11770 2018-04-06  Tom Tromey  <tom@tromey.com>
11771
11772         * printcmd.c (last_examine_address): Change type to
11773         value_ref_ptr.
11774         (do_examine, x_command): Update.
11775
11776 2018-04-06  Tom Tromey  <tom@tromey.com>
11777
11778         * value.c (release_value): Update.
11779         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11780         (struct bpstats) <val>: Now a value_ref_ptr.
11781         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11782         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11783         (~watchpoint, print_it_watchpoint, watch_command_1)
11784         (invalidate_bp_value_on_memory_change): Update.
11785
11786 2018-04-06  Tom Tromey  <tom@tromey.com>
11787
11788         * varobj.c (varobj_clear_saved_item)
11789         (update_dynamic_varobj_children, install_new_value, ~varobj):
11790         Update.
11791         * value.h (value_incref): Move declaration earlier.
11792         (value_decref): Rename from value_free.
11793         (struct value_ref_policy): New.
11794         (value_ref_ptr): New typedef.
11795         (struct value_deleter): Remove.
11796         (gdb_value_up): Remove typedef.
11797         (release_value): Change return type.
11798         (release_value_or_incref): Remove.
11799         * value.c (set_value_parent): Update.
11800         (value_incref): Change return type.
11801         (value_decref): Rename from value_free.
11802         (value_free_to_mark, free_all_values, free_value_chain): Update.
11803         (release_value): Return value_ref_ptr.
11804         (release_value_or_incref): Remove.
11805         (record_latest_value, set_internalvar, clear_internalvar):
11806         Update.
11807         * stack.c (info_frame_command): Don't call value_free.
11808         * python/py-value.c (valpy_dealloc, valpy_new)
11809         (value_to_value_object): Update.
11810         * printcmd.c (do_examine): Update.
11811         * opencl-lang.c (lval_func_free_closure): Update.
11812         * mi/mi-main.c (register_changed_p): Don't call value_free.
11813         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11814         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11815         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11816         value_free.
11817         * guile/scm-value.c (vlscm_free_value_smob)
11818         (vlscm_scm_from_value): Update.
11819         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11820         (frame_unwind_register_unsigned, get_frame_register_bytes)
11821         (put_frame_register_bytes): Don't call value_free.
11822         * findvar.c (address_from_register): Don't call value_free.
11823         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11824         * dwarf2loc.c (entry_data_value_free_closure)
11825         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11826         (dwarf2_evaluate_loc_desc_full): Update.
11827         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11828         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11829         (~watchpoint, watch_command_1)
11830         (invalidate_bp_value_on_memory_change): Update.
11831         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11832
11833 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11834
11835         PR gdb/23022
11836         * warning.m4: Add -Wno-error=deprecated-register.
11837         * configure: Re-generate.
11838
11839 2018-04-05  Tom Tromey  <tom@tromey.com>
11840
11841         * linespec.h: Remove include of "vec.h".
11842
11843 2018-04-05  Tom Tromey  <tom@tromey.com>
11844
11845         * linespec.c (typep): Remove typedef.
11846         (find_methods, find_superclass_methods): Take a std::vector.
11847         (find_method): Use std::vector.
11848
11849 2018-04-05  Tom Tromey  <tom@tromey.com>
11850
11851         * utils.c (compare_strings): Remove.
11852         * utils.h (compare_strings): Remove.
11853         * objc-lang.h (find_imps): Update.
11854         * objc-lang.c (find_methods): Take a std::vector.
11855         (uniquify_strings, find_imps): Likewise.
11856         * linespec.c (find_methods): Take a std::vector.
11857         (decode_objc): Use std::vector.
11858         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11859         a std::vector.
11860         (find_method, find_function_symbols): Use std::vector.
11861
11862 2018-04-05  Tom Tromey  <tom@tromey.com>
11863
11864         * completer.c (completion_tracker::completion_tracker): Remove
11865         cast.
11866         (completion_tracker::discard_completions): Likewise.
11867         * breakpoint.c (ambiguous_names_p): Remove cast.
11868         * ada-lang.c (_initialize_ada_language): Remove cast.
11869         * utils.h (streq): Update.
11870         (streq_hash): Add new declaration.
11871         * utils.c (streq): Return bool.
11872         (streq_hash): New function.
11873
11874 2018-04-05  Tom Tromey  <tom@tromey.com>
11875
11876         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11877         Remove a string copy.
11878
11879 2018-04-05  Tom Tromey  <tom@tromey.com>
11880
11881         * linespec.c (filter_results): Use std::vector.
11882         (decode_line_2, decode_line_full): Update.
11883
11884 2018-04-05  Tom Tromey  <tom@tromey.com>
11885
11886         * linespec.c (canonical_to_fullform): Return std::string.
11887         (filter_results): Update.
11888         (struct decode_line_2_item): Add constructor.
11889         <fullform, displayform>: Now std::string.
11890         (decode_line_2_compare_items): Now a std::sort comparator.
11891         (decode_line_2): Update.
11892
11893 2018-04-05  Tom Tromey  <tom@tromey.com>
11894
11895         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11896         (unexpected_linespec_error): Update.
11897         (linespec_parse_basic, parse_linespec): Update.
11898
11899 2018-04-05  Tom Tromey  <tom@tromey.com>
11900
11901         * linespec.c (linespec_parse_basic): Reindent.
11902
11903 2018-04-05  Tom Tromey  <tom@tromey.com>
11904
11905         * minsyms.h (iterate_over_minimal_symbols): Update.
11906         * minsyms.c (iterate_over_minimal_symbols): Take a
11907         gdb::function_view.
11908         * linespec.c (struct collect_minsyms): Remove.
11909         (compare_msyms): Now a std::sort comparator.
11910         (add_minsym): Add parameters.
11911         (search_minsyms_for_name): Update.  Use std::vector.
11912
11913 2018-04-03  Tom Tromey  <tom@tromey.com>
11914
11915         * mipsread.c (read_alphacoff_dynamic_symtab): Use
11916         gdb::byte_vector.
11917
11918 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11919
11920         * MAINTAINERS (Write After Approval): Add Weimin Pan.
11921
11922 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11923
11924         PR gdb/16959
11925         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
11926         printing static type.
11927
11928 2018-04-01  Tom Tromey  <tom@tromey.com>
11929
11930         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11931         (rs6000_xfer_shared_libraries): Update.
11932
11933 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
11934
11935         * common/gdb_vecs.h (char_ptr): Remove.
11936         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11937
11938 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11939
11940         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11941         with std::vector.
11942         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11943
11944 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11945
11946         * tracepoint.h (struct uploaded_tp): Initialize fields.
11947         <actions, step_actions, cmd_strings>: Change type to
11948         std::vector<char *>.
11949         * tracepoint.c (get_uploaded_tp): Allocate with new.
11950         (free_uploaded_tps): Free with delete.
11951         (parse_tracepoint_definition): Adjust to std::vector change.
11952         * breakpoint.c (read_uploaded_action): Likewise.
11953         (create_tracepoint_from_upload): Likewise.
11954         * ctf.c (ctf_write_uploaded_tp): Likewise.
11955         (SET_ARRAY_FIELD): Likewise.
11956         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11957
11958 2018-03-30  Tom Tromey  <tom@tromey.com>
11959
11960         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
11961         std::unique_ptr.
11962         (svr4_keep_data_in_core): Update.
11963         (svr4_read_so_list): Update.
11964
11965 2018-03-30  Tom Tromey  <tom@tromey.com>
11966
11967         * windows-nat.c (handle_output_debug_string, handle_exception):
11968         Update.
11969         * target.h (target_read_string): Update.
11970         * target.c (target_read_string): Change "string" to
11971         unique_xmalloc_ptr.
11972         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11973         Update.
11974         * solib-frv.c (frv_current_sos): Update.
11975         * solib-dsbt.c (dsbt_current_sos): Update.
11976         * solib-darwin.c (darwin_current_sos): Update.
11977         * linux-thread-db.c (inferior_has_bug): Update.
11978         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11979         Update.  Remove alloca.
11980         * ada-lang.c (ada_main_name): Update.
11981
11982 2018-03-30  Tom Tromey  <tom@tromey.com>
11983
11984         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11985         (struct dwo_file_deleter): New.
11986         (dwo_file_up): New typedef.
11987         (open_and_init_dwo_file): Use dwo_file_up.
11988         (free_dwo_file_cleanup): Remove.
11989
11990 2018-03-30  Tom Tromey  <tom@tromey.com>
11991
11992         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11993         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11994
11995 2018-03-30  Tom Tromey  <tom@tromey.com>
11996
11997         * dwarf2read.c (class free_cached_comp_units): New class.
11998         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11999         (free_cached_comp_units): Remove function.
12000
12001 2018-03-30  Tom Tromey  <tom@tromey.com>
12002
12003         * utils.h (make_cleanup_unpush_target): Remove.
12004         * inf-ptrace.c (struct target_unpusher): New.
12005         (target_unpush_up) New typedef.
12006         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
12007         target_unpush_up.
12008         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
12009
12010 2018-03-27  Tom Tromey  <tom@tromey.com>
12011
12012         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
12013
12014 2018-03-27  Pedro Alves  <palves@redhat.com>
12015             Tom Tromey  <tom@tromey.com>
12016
12017         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
12018         destructor.  Now a class.
12019         (gdb_readline_wrapper_cleanup): Remove function.
12020         (gdb_readline_wrapper): Remove cleanups.
12021
12022 2018-03-27  Tom Tromey  <tom@tromey.com>
12023
12024         * typeprint.h (struct type_print_options) <local_typedefs,
12025         global_typedefs>: Remove "struct" keyword.
12026         (class typedef_hash_table): New class.
12027         (recursively_update_typedef_hash, add_template_parameters)
12028         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
12029         (find_typedef_in_hash): Don't declare.
12030         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
12031         (typedef_hash_table::recursively_update): Rename from
12032         recursively_update_typedef_hash.  Now a member.
12033         (typedef_hash_table::add_template_parameters): Rename from
12034         add_template_parameters.  Now a member.
12035         (typedef_hash_table::typedef_hash_table): Now a constructor;
12036         rename from create_typedef_hash.
12037         (typedef_hash_table::~typedef_hash_table): Now a destructor;
12038         rename from free_typedef_hash.
12039         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
12040         (do_free_global_table): Remove.
12041         (typedef_hash_table::typedef_hash_table): New constructor; renamed
12042         from copy_type_recursive.
12043         (create_global_typedef_table): Remove.
12044         (typedef_hash_table::find_global_typedef): Now a member of
12045         typedef_hash_table.
12046         (typedef_hash_table::find_typedef): Rename from
12047         find_typedef_in_hash; now a member.
12048         (whatis_exp): Update.
12049         * extension.h (struct ext_lang_type_printers): Add constructor and
12050         destructor.
12051         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
12052         declare.
12053         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
12054         Now a constructor; rename from start_ext_lang_type_printers.
12055         (ext_lang_type_printers): Now a destructor; rename from
12056         free_ext_lang_type_printers.
12057         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
12058         Update.
12059         (c_type_print_base_struct_union): Update.  Remove cleanups.
12060
12061 2018-03-27  Tom Tromey  <tom@tromey.com>
12062
12063         * dwarf-index-write.c: Include <cmath>.
12064
12065 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12066
12067         * NEWS: Add entry describing new "set|show varsize-limit" command.
12068         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
12069         command.
12070         * printcmd.c (_initialize_printcmd): Add "set var" alias of
12071         "set variable".
12072
12073 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
12074
12075         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
12076         dwarf-index-write.c
12077         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
12078         * dwarf-index-common.c: New file.
12079         * dwarf-index-common.h: New file.
12080         * dwarf-index-write.c: New file.
12081         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12082         (struct dwarf2_section_info): Move from here.
12083         (dwarf2_section_info_def): Likewise.
12084         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12085         (offset_type): Likewise.
12086         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12087         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12088         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12089         (byte_swap): Likewise.
12090         (MAYBE_SWAP): Likewise.
12091         (dwarf2_per_cu_ptr): Likewise.
12092         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12093         (struct tu_stats): Likewise.
12094         (struct dwarf2_per_objfile): Likewise.
12095         (struct dwarf2_per_cu_data): Likewise.
12096         (struct signatured_type): Likewise.
12097         (sig_type_ptr): Likewise.
12098         (DEF_VEC_P (sig_type_ptr)): Likewise.
12099         (INDEX4_SUFFIX): Likewise.
12100         (INDEX5_SUFFIX): Likewise.
12101         (DEBUG_STR_SUFFIX): Likewise.
12102         (dwarf2_read_section): Make non-static.
12103         (mapped_index_string_hash): Move from here.
12104         (dwarf5_djb_hash): Likewise.
12105         (file_write): Likewise.
12106         (class data_buf): Likewise.
12107         (struct symtab_index_entry): Likewise.
12108         (struct mapped_symtab): Likewise.
12109         (find_slot): Likewise.
12110         (hash_expand): Likewise.
12111         (add_index_entry): Likewise.
12112         (uniquify_cu_indices): Likewise.
12113         (class c_str_view): Likewise.
12114         (class c_str_view_hasher): Likewise.
12115         (class vector_hasher): Likewise.
12116         (write_hash_table): Likewise.
12117         (psym_index_map): Likewise.
12118         (struct addrmap_index_data): Likewise.
12119         (add_address_entry): Likewise.
12120         (add_address_entry_worker): Likewise.
12121         (write_address_map): Likewise.
12122         (symbol_kind): Likewise.
12123         (write_psymbols): Likewise.
12124         (struct signatured_type_index_data): Likewise.
12125         (write_one_signatured_type): Likewise.
12126         (recursively_count_psymbols): Likewise.
12127         (recursively_write_psymbols): Likewise.
12128         (class debug_names): Likewise.
12129         (check_dwarf64_offsets): Likewise.
12130         (psyms_seen_size): Likewise.
12131         (write_gdbindex): Likewise.
12132         (write_debug_names): Likewise.
12133         (assert_file_size): Likewise.
12134         (write_psymtabs_to_index): Likewise.
12135         (save_gdb_index_command): Likewise.
12136         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12137         command.
12138         * dwarf2read.h: New file.
12139
12140 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12141
12142         PR gdb/22670
12143         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12144         symbol name if the CU's language stores symbol names in linkage
12145         format.
12146         * language.h (struct language_defn)
12147         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12148         all instances of this struct.
12149
12150 2018-03-26  Tom Tromey  <tom@tromey.com>
12151
12152         * stack.c (backtrace_command_1): Remove verbose code.
12153
12154 2018-03-26  Tom Tromey  <tom@tromey.com>
12155
12156         * python/py-framefilter.c (py_print_type): Don't catch
12157         exceptions.  Return void.
12158         (py_print_value): Likewise.
12159         (py_print_single_arg): Likewise.
12160         (enumerate_args): Don't catch exceptions.
12161         (py_print_args): Likewise.
12162         (py_print_frame): Likewise.
12163         (gdbpy_apply_frame_filter): Catch exceptions here.
12164
12165 2018-03-26  Tom Tromey  <tom@tromey.com>
12166
12167         * stack.c (_initialize_stack): Remove trailing newlines from help
12168         text.  Add "Usage" line to "backtrace" help.
12169
12170 2018-03-26  Tom Tromey  <tom@tromey.com>
12171
12172         PR python/16486:
12173         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12174
12175 2018-03-26  Tom Tromey  <tom@tromey.com>
12176
12177         * python/py-framefilter.c (py_print_single_arg): Return
12178         EXT_LANG_BT_ERROR from catch.
12179
12180 2018-03-26  Tom Tromey  <tom@tromey.com>
12181
12182         PR backtrace/15584:
12183         * stack.c (backtrace_command_1): Move some code into no-filters
12184         "if".
12185
12186 2018-03-26  Tom Tromey  <tom@tromey.com>
12187
12188         * python/py-framefilter.c (throw_quit_or_print_exception): New
12189         function.
12190         (gdbpy_apply_frame_filter): Use it.
12191
12192 2018-03-26  Tom Tromey  <tom@tromey.com>
12193
12194         PR cli/17716:
12195         * python/py-framefilter.c (py_print_type, py_print_value)
12196         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12197         RETURN_MASK_ERROR.
12198
12199 2018-03-26  Tom Tromey  <tom@tromey.com>
12200
12201         * python/py-framefilter.c (enumerate_args): Use
12202         gdb::unique_xmalloc_ptr.
12203
12204 2018-03-26  Tom Tromey  <tom@tromey.com>
12205
12206         * python/py-framefilter.c (py_print_frame): Return
12207         EXT_LANG_BT_OK.
12208         (gdbpy_apply_frame_filter): Update comment.
12209         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12210         Remove.
12211         <EXT_LANG_BT_NO_FILTERS>: Change value.
12212
12213 2018-03-26  Tom Tromey  <tom@tromey.com>
12214
12215         PR backtrace/15582:
12216         * stack.c (backtrace_command): Parse "hide" argument.
12217         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12218         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12219         constant.
12220
12221 2018-03-26  Tom Tromey  <tom@tromey.com>
12222
12223         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12224         add "flags".
12225         (backtrace_command): Remove "fulltrace", add "flags".
12226
12227 2018-03-26  Tom Tromey  <tom@tromey.com>
12228
12229         * stack.c (backtrace_command): Rewrite command line parsing.
12230
12231 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12232
12233         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12234
12235 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12236
12237         * filename-seen-cache.h: Add include guard.
12238
12239 2018-03-26  Keith Seitz  <keiths@redhat.com>
12240
12241         * symfile.c (place_section): Remove "struct" from section_addr_info
12242         in comment.
12243         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12244         "struct" keyword from section_addr_info.
12245
12246 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12247
12248         * regformats/regdef.h (reg): Add constructors.
12249
12250 2018-03-25  Pedro Alves  <palves@redhat.com>
12251
12252         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12253         if then/else bodies in var_func_name extraction.
12254
12255 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12256
12257         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12258         lookup_minimal_symbol() to find symbol entry.
12259         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12260
12261 2018-03-23  Keith Seitz  <keiths@redhat.com>
12262
12263         PR c++/22968
12264         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12265         nested type definitions for C++, too.
12266
12267 2018-03-23  Tom Tromey  <tom@tromey.com>
12268
12269         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12270         a typedef.
12271         (macho_register_oso): Remove.
12272         (macho_symtab_read): Take a std::vector.
12273         (oso_el_compare_name): Now a std::sort comparator.
12274         (macho_symfile_read_all_oso): Take a std::vector.
12275         (macho_symfile_read): Use std::vector.  Remove cleanups.
12276
12277 2018-03-22  Tom Tromey  <tom@tromey.com>
12278
12279         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12280         (record_full_goto_bookmark): Use std::string.
12281
12282 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12283
12284         PR tdep/18295
12285         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12286         a single mask.
12287
12288 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12289
12290         * rs6000-tdep.c (store_insn_p): New function.
12291         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12292         and cr_reg to their unshifted values. Use store_insn_p to
12293         match LR saves using either R1 or fdata->alloca_reg. Use
12294         store_insn_p to match CR saves. Set alloca_reg_offset
12295         when alloca_reg and framep are set. Remove lr_reg shift
12296         when assigning to fdata->lr_register.
12297
12298 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12299
12300         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12301         command line args instead of emitting a warning.
12302
12303 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12304
12305         * tracepoint.h (struct static_tracepoint_marker): Initialize
12306         fields, define default constructor, move constructor and move
12307         assignment, disable the rest.
12308         <str_id, extra>: Make std::string.
12309         (release_static_tracepoint_marker): Remove.
12310         (free_current_marker): Remove.
12311         * tracepoint.c (free_current_marker): Remove.
12312         (parse_static_tracepoint_marker_definition): Adjust to
12313         std::string, use new hex2str overload.
12314         (release_static_tracepoint_marker): Remove.
12315         (print_one_static_tracepoint_marker): Get marker by reference
12316         and adjust to std::string.
12317         (info_static_tracepoint_markers_command): Adjust to std::vector
12318         changes
12319         * target.h (static_tracepoint_marker_p): Remove typedef.
12320         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12321         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12322         bool.
12323         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12324         * target-debug.h
12325         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12326         (target_debug_print_std_vector_static_tracepoint_marker): New.
12327         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12328         to...
12329         (target_debug_print_static_tracepoint_marker_p): ... this.
12330         * target-delegates.c: Re-generate.
12331         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12332         Make std::string.
12333         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12334         (decode_static_tracepoint_spec): Adjust to std::vector.
12335         (tracepoint_print_one_detail): Adjust to std::string.
12336         (strace_marker_decode_location): Adjust to std::string.
12337         (update_static_tracepoint): Adjust to std::string, remove call
12338         to release_static_tracepoint_marker.
12339         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12340         Adjust to std::vector.
12341         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12342         (remote_static_tracepoint_markers_by_strid): Adjust to
12343         std::vector.
12344         * common/rsp-low.h (hex2str): New overload with explicit count
12345         of bytes.
12346         * common/rsp-low.c (hex2str): New overload with explicit count
12347         of bytes.
12348         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12349         (_initialize_rsp_low_selftests): Add test_hex2str test.
12350         * unittests/tracepoint-selftests.c
12351         (test_parse_static_tracepoint_marker_definition): Adjust to
12352         std::string.
12353
12354 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12355
12356         * tracepoint.c (parse_static_tracepoint_marker_definition):
12357         Consider case where the definition is followed by more
12358         definitions.
12359         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12360         tracepoint-selftests.c.
12361         * unittests/tracepoint-selftests.c: New.
12362
12363 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12364
12365         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12366         Carvalho.
12367
12368 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12369
12370         * symtab.c (find_pc_sect_line): fixed indentation.
12371
12372 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12373
12374         * symtab.c (find_pc_sect_line): now uses binary search.
12375
12376 2018-03-19  Tom Tromey  <tom@tromey.com>
12377
12378         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12379         "IDENT" production.
12380
12381 2018-03-19  Pedro Alves  <palves@redhat.com>
12382             Tom Tromey  <tom@tromey.com>
12383
12384         * unittests/observable-selftests.c: New file.
12385         * common/observable.h: New file.
12386         * observable.h: New file.
12387         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12388         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12389         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12390         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12391         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12392         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12393         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12394         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12395         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12396         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12397         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12398         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12399         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12400         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12401         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12402         tui/tui-interp.c, valops.c: Update all users.
12403         * tui/tui-hooks.c (tui_bp_created_observer)
12404         (tui_bp_deleted_observer, tui_bp_modified_observer)
12405         (tui_inferior_exit_observer, tui_before_prompt_observer)
12406         (tui_normal_stop_observer, tui_register_changed_observer):
12407         Remove.
12408         (tui_observers_token): New global.
12409         (attach_or_detach, tui_attach_detach_observers): New functions.
12410         (tui_install_hooks, tui_remove_hooks): Use
12411         tui_attach_detach_observers.
12412         * record-btrace.c (record_btrace_thread_observer): Remove.
12413         (record_btrace_thread_observer_token): New global.
12414         * observer.sh: Remove.
12415         * observer.c: Rename to observable.c.
12416         * observable.c (namespace gdb_observers): Define new objects.
12417         (observer_debug): Move into gdb_observers namespace.
12418         (struct observer, struct observer_list, xalloc_observer_list_node)
12419         (xfree_observer_list_node, generic_observer_attach)
12420         (generic_observer_detach, generic_observer_notify): Remove.
12421         (_initialize_observer): Update.
12422         Don't include observer.inc.
12423         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12424         (clean mostlyclean): Likewise.
12425         (observer.h, observer.inc): Remove targets.
12426         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12427         (COMMON_SFILES): Use observable.c, not observer.c.
12428         * .gitignore: Remove observer.h.
12429
12430 2018-03-18  Tom Tromey  <tom@tromey.com>
12431
12432         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12433         gdb::def_vector.
12434         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12435
12436 2018-03-17  Tom Tromey  <tom@tromey.com>
12437
12438         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12439
12440 2018-03-17  Tom Tromey  <tom@tromey.com>
12441
12442         * target.c (class scoped_target_fd): New.
12443         (target_fileio_close_cleanup): Remove.
12444         (target_fileio_read_alloc_1): Use scoped_target_fd.
12445
12446 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12447
12448         * silent-rules.mk: New.
12449         * Makefile.in: Include silent-rules.mk
12450         (srcdir, VPATH, top_srcdir): Move up.
12451         (COMPILE): Add ECHO_CXX.
12452         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12453         (init.c): Add ECHO_INIT_C.
12454         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12455         (version.c): Add ECHO_GEN.
12456         (printcmd.o): Add ECHO_CXX.
12457         (target-float.o): Add ECHO_CXX.
12458         (ada-exp.o): Add ECHO_CXX.
12459         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12460         (insight$(EXEEXT)): Add ECHO_CXXLD.
12461         * gnulib/configure.ac: Add AM_SILENT_RULES.
12462         * gnulib/aclocal.m4: Re-generate.
12463         * gnulib/configure: Re-generate.
12464         * gnulib/import/Makefile.in: Re-generate.
12465
12466 2018-03-16  Tom Tromey  <tom@tromey.com>
12467
12468         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12469         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12470         * utils.c (do_free_section_addr_info)
12471         (make_cleanup_free_section_addr_info): Remove.
12472         * symfile.h (struct other_sections): Add constructor.
12473         (struct section_addr_info): Remove.
12474         (section_addr_info): New typedef.
12475         (struct sym_fns) <sym_offsets>: Change type of parameter.
12476         (build_section_addr_info_from_objfile)
12477         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12478         (default_symfile_offsets, symbol_file_add)
12479         (symbol_file_add_from_bfd)
12480         (build_section_addr_info_from_section_table): Update.
12481         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12482         * symfile.c (alloc_section_addr_info): Remove.
12483         (build_section_addr_info_from_section_table): Change return type.
12484         Update.
12485         (build_section_addr_info_from_bfd)
12486         (build_section_addr_info_from_objfile): Likewise.
12487         (free_section_addr_info): Remove.
12488         (relative_addr_info_to_section_offsets): Change type of "addrs".
12489         (addrs_section_compar): Now a std::sort comparator.
12490         (addrs_section_sort): Change return type.
12491         (addr_info_make_relative): Change type of "addrs".  Update.
12492         (default_symfile_offsets, syms_from_objfile_1)
12493         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12494         (symbol_file_add_separate): Update.
12495         (symbol_file_add): Change type of "addrs".  Update.
12496         (add_symbol_file_command): Update.  Remove cleanups.
12497         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12498         cleanups.
12499         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12500         * solib.c (solib_read_symbols): Update.
12501         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12502         * machoread.c (macho_symfile_offsets): Update.
12503         * jit.c (jit_bfd_try_read_symtab): Update.
12504
12505 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12506
12507         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12508         unittests/utils-selftests.c.
12509         * unittests/utils-selftests.c: New file.
12510
12511 2018-03-14  Tom Tromey  <tom@tromey.com>
12512
12513         PR cli/14977:
12514         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12515         for NULL.
12516
12517 2018-03-14  Tom Tromey  <tom@tromey.com>
12518
12519         PR cli/19918:
12520         * printcmd.c (printf_pointer): Allow "-" in format.
12521
12522 2018-03-14  Tom Tromey  <tom@tromey.com>
12523
12524         * printcmd.c (_initialize_printcmd): Add usage to printf.
12525
12526 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12527
12528         * MAINTAINERS: Update my email address.
12529
12530 2018-03-13  Tom Tromey  <tom@tromey.com>
12531
12532         * machoread.c (macho_check_dsym): Change filenamep to a
12533         std::string*.
12534         (macho_symfile_read): Update.
12535         * symfile.c (load_command): Use std::string.
12536
12537 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12538
12539         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12540         to error message string.
12541         (riscv_register_name): Use xsnprintf instead of sprintf.
12542         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12543         internal_error.
12544         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12545         error.
12546         (riscv_push_dummy_call): Likewise.
12547
12548 2018-03-12  Tom Tromey  <tom@tromey.com>
12549
12550         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12551         Use gdb::byte_vector.
12552         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12553
12554 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12555
12556         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12557         parameter type to readable_regcache.
12558         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12559         the declaration.
12560
12561 2018-03-11  Tom Tromey  <tom@tromey.com>
12562
12563         * dwarf2read.c (struct nextfield): Add initializers.
12564         (struct nextfnfield): Remove.
12565         (struct fnfieldlist): Add initializers.  Remove "length" and
12566         "head", use std::vector.
12567         (struct decl_field_list): Remove.
12568         (struct field_info): Add initializers.
12569         <fields, baseclasses>: Now std::vector.
12570         <nbaseclasses, nfnfields, typedef_field_list_count,
12571         nested_types_list_count>: Remove.
12572         (dwarf2_add_field, dwarf2_add_type_defn)
12573         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12574         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12575         (process_structure_scope): Update.
12576
12577 2018-03-11  Tom Tromey  <tom@tromey.com>
12578
12579         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12580         for use by std::sort.
12581         (build_type_psymtabs_1): Use std::vector.
12582
12583 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12584
12585         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12586         and LIBMPFR in the printed configuration.
12587
12588 2018-03-08  Tom Tromey  <tom@tromey.com>
12589
12590         * source.c (get_filename_and_charpos): Use scoped_fd.
12591         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12592         (procfs_pidlist): Likewise.
12593         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12594         (iterate_over_mappings): Likewise.
12595
12596 2018-03-08  Tom Tromey  <tom@tromey.com>
12597
12598         * infcall.c (struct call_return_meta_info)
12599         <stack_temporaries_enabled>: Remove.
12600         (get_call_return_value, call_function_by_hand_dummy): Update.
12601         * thread.c (disable_thread_stack_temporaries): Remove.
12602         (enable_thread_stack_temporaries): Remove.
12603         (thread_stack_temporaries_enabled_p): Return bool.
12604         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12605         (get_last_thread_stack_temporary): Update.
12606         * eval.c (evaluate_subexp): Update.
12607         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12608         class, not a function.
12609         (value_ptr, value_vec): Remove typedefs.
12610         (class thread_info) <stack_temporaries_enabled>: Now bool.
12611         <stack_temporaries>: Now a std::vector.
12612         (thread_stack_temporaries_enabled_p)
12613         (value_in_thread_stack_temporaries): Return bool.
12614
12615 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12616
12617         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12618         (getpkt_or_notif_sane_1): Likewise.
12619
12620 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12621
12622         * build-id.c (build_id_to_debug_bfd): Use std::string.
12623
12624 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12625
12626         * build-id.c (find_separate_debug_file_by_buildid): Return
12627         std::string.
12628         * build-id.h (find_separate_debug_file_by_buildid): Return
12629         std::string.
12630         * coffread.c (coff_symfile_read): Adjust to std::string.
12631         * elfread.c (elf_symfile_read): Adjust to std::string.
12632         * symfile.c (separate_debug_file_exists): Change parameter to
12633         std::string.
12634         (find_separate_debug_file): Return std::string.
12635         (find_separate_debug_file_by_debuglink): Return std::string.
12636         * symfile.h (find_separate_debug_file_by_debuglink): Return
12637         std::string.
12638
12639 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12640
12641         * common/xml-utils.c (xml_escape_text): Move code to...
12642         (xml_escape_text_append): ... this new function.
12643         * common/xml-utils.h (xml_escape_text_append): New declaration.
12644         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12645         New function.
12646         (_initialize_xml_utils): register test_xml_escape_text_append as
12647         a selftest.
12648
12649 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12650
12651         * defs.h: Remove MAX_REGISTER_SIZE.
12652         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12653         asserts.
12654         * python/py-unwind.c (pyuw_sniffer): Likewise.
12655
12656 2018-03-07  Tom Tromey  <tom@tromey.com>
12657
12658         * linux-tdep.c (linux_info_proc): Update.
12659         * target.h (struct target_ops) <to_fileio_readlink>: Return
12660         optional<string>.
12661         (target_fileio_readlink): Return optional<string>.
12662         * remote.c (remote_hostio_readlink): Return optional<string>.
12663         * inf-child.c (inf_child_fileio_readlink): Return
12664         optional<string>.
12665         * target.c (target_fileio_readlink): Return optional<string>.
12666
12667 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12668
12669         * regcache.c (cooked_read_test): Add riscv to the list of
12670         architectures that have a save_reggroup.
12671
12672 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12673
12674         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12675         value is not a dynamic class object.
12676
12677 2018-03-06  Tom Tromey  <tom@tromey.com>
12678
12679         * rust-exp.y: Formatting fixes.
12680
12681 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12682
12683         * riscv-tdep.c (riscv_register_name): Remove target description
12684         support.
12685         (riscv_gdbarch_init): Remove target description check.
12686
12687 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12688
12689         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12690         comment.
12691         * riscv-tdep.h: Likewise.
12692
12693 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12694
12695         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12696         (riscv_pseudo_register_write): Delete.
12697         (riscv_gdbarch_init): Remove all use of pseudo registers.
12698
12699 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12700
12701         * record-btrace.c (btrace_print_lines): Replace cleanup
12702         parameter with RAII equivalents.
12703         (btrace_insn_history): Replace cleanup with RAII equivalents.
12704         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12705         make_cleanup_ui_out_tuple_begin_end): Remove.
12706         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12707         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12708         make_cleanup_ui_out_list_begin_end): Remove.
12709
12710 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12711
12712         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12713         parameter types to std::vector.  Use bool.
12714         (record_btrace_wait): Replace VEC(tp_t) with
12715         std::vector<thread_info *>.
12716         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12717
12718 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12719
12720         * record-btrace.c (record_btrace_disable_callback): Remove.
12721         (struct scoped_btrace_disable): New.
12722         (record_btrace_open): Use scoped_btrace_disable.
12723
12724 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12725
12726         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12727         reading values from registers.
12728
12729 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12730
12731         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12732         where appropriate.
12733
12734 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12735
12736         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12737         change parameter type.  Use GDB's print functions, and use
12738         core_addr_to_string where appropriate.
12739         (riscv_push_dummy_call): Use core_addr_to_string where
12740         appropriate, update call to riscv_print_arg_location, and reindent
12741         a few lines.
12742         (riscv_return_value): Update call to riscv_print_arg_location.
12743
12744 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12745             Tim Newsome <tim@sifive.com>
12746             Albert Ou <a0u@eecs.berkeley.edu>
12747             Darius Rad <darius@bluespec.com>
12748
12749         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12750         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12751         (ALLDEPFILES): Add riscv-tdep.c
12752         * configure.tgt: Add riscv support.
12753         * riscv-tdep.c: New file.
12754         * riscv-tdep.h: New file.
12755         * NEWS: Mention new target.
12756         * MAINTAINERS: Add entry for riscv.
12757
12758 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12759
12760         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12761         fields within aggregates.
12762
12763 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12764
12765         * record-btrace.c (btrace_print_lines): Change type of flags to
12766         gdb_disassembly_flags.
12767
12768 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12769
12770         * fbsd-nat.c: Include "inf-ptrace.h".
12771         (USE_SIGTRAP_SIGINFO): Conditionally define.
12772         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12773         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12774         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12775         function.
12776         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12777         Likewise.
12778         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12779         Likewise.
12780         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12781         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12782         "supports_stopped_by_hw_breakpoint" target methods.
12783
12784 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12785
12786         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12787         * fbsd-nat.c (debug_fbsd_nat): New variable.
12788         (show_fbsd_nat_debug): New function.
12789         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12790         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12791
12792 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12793
12794         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12795         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12796         prototype.
12797         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12798         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12799         method.
12800
12801 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12802
12803         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12804         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12805
12806 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12807
12808         * charset.c (struct charset_vector): New.
12809         (charsets): Change type to charset_vector.
12810         (find_charset_names): Adjust.
12811         (add_one): Adjust.
12812         (_initialize_charset): Adjust.
12813
12814 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12815
12816         * progspace.h (struct program_space) <deleted_solibs>: Change
12817         type to std::vector<std::string>.
12818         * progspace.c (clear_program_space_solib_cache): Adjust.
12819         * breakpoint.c (print_solib_event): Adjust.
12820         (check_status_catch_solib): Adjust.
12821         * solib.c (update_solib_list): Adjust.
12822         * ui-out.h (class ui_out) <field_string>: New overload.
12823         * ui-out.c (ui_out::field_string): New overload.
12824
12825 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12826
12827         * progspace.h (struct program_space): Add constructor and
12828         destructor, initialize fields.
12829         (add_program_space): Remove.
12830         * progspace.c (add_program_space): Rename to...
12831         (program_space::program_space): ... this.
12832         (release_program_space): Rename to...
12833         (program_space::~program_space): ... this.
12834         (delete_program_space): Use delete to delete program_space.
12835         (initialize_progspace): Use new to allocate program_space.
12836         * inferior.c (add_inferior_with_spaces): Likewise.
12837         (clone_inferior_command): Likewise.
12838         * infrun.c (follow_fork_inferior): Likewise.
12839         (handle_vfork_child_exec_or_exit): Likewise.
12840
12841 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12842
12843         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12844         (delim_string_to_char_ptr_vec): Return std::vector of
12845         gdb::unique_xmalloc_ptr.
12846         (dirnames_to_char_ptr_vec_append): Take std::vector of
12847         gdb::unique_xmalloc_ptr.
12848         (dirnames_to_char_ptr_vec): Return std::vector of
12849         gdb::unique_xmalloc_ptr.
12850         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12851         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12852         (delim_string_to_char_ptr_vec): Return an std::vector of
12853         gdb::unique_xmalloc_ptr, adjust the code.
12854         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12855         gdb::unique_xmalloc_ptr, adjust the code.
12856         (dirnames_to_char_ptr_vec): Return an std::vector of
12857         gdb::unique_xmalloc_ptr, adjust the code.
12858         * auto-load.c (auto_load_safe_path_vec): Change type to
12859         std::vector of gdb::unique_xmalloc_ptr.
12860         (auto_load_expand_dir_vars): Return an std::vector of
12861         gdb::unique_xmalloc_ptr, adjust the code.
12862         (auto_load_safe_path_vec_update): Adjust.
12863         (filename_is_in_auto_load_safe_path_vec): Adjust.
12864         (auto_load_objfile_script_1): Adjust.
12865         * build-id.c (build_id_to_debug_bfd): Adjust.
12866         * linux-thread-db.c (thread_db_load_search): Adjust.
12867         * source.c (add_path): Adjust.
12868         (openp): Adjust.
12869         * symfile.c (find_separate_debug_file): Adjust.
12870         * utils.c (do_free_char_ptr_vec): Remove.
12871         (make_cleanup_free_char_ptr_vec): Remove.
12872
12873 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12874
12875         PR gdb/22907
12876         * common/pathstuff.c: Conditionally include "<windows.h>".
12877
12878 2018-03-01  Georg Sauthoff  <mail@georg.so>
12879
12880         PR gdb/22888
12881         * gcore.in: Quote variables and switch interpreter to bash.
12882
12883 2018-03-01  Tom Tromey  <tom@tromey.com>
12884
12885         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12886         assertion.  Add assertion for discriminant_index.
12887         (quirk_rust_enum): Use correct base type name in univariant case.
12888
12889 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12890
12891         * record.c (get_call_history_modifiers): Return a
12892         record_print_flags.
12893         (cmd_record_call_history): Adjust.
12894         * record-btrace.c (record_btrace_call_history): Adjust.
12895         (record_btrace_call_history_range): Adjust.
12896         (record_btrace_call_history_from): Adjust.
12897         * target-debug.h (target_debug_print_record_print_flags): New.
12898         * target-delegates.c: Re-generate.
12899         * target.c (target_call_history): Change flags type.
12900         (target_call_history_from): Likewise.
12901         (target_call_history_range): Likewise.
12902         * target.h (struct target_ops) <target_call_history>: Likewise.
12903         (target_call_history_from): Likewise.
12904         (target_call_history_range): Likewise.
12905
12906 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12907             Simon Marchi  <simon.marchi@polymtl.ca>
12908
12909         * common/common-utils.c: Include "sys/stat.h".
12910         (is_regular_file): Move here from "source.c"; change return
12911         type to "bool".
12912         * common/common-utils.h (is_regular_file): New prototype.
12913         * common/pathstuff.c (contains_dir_separator): New function.
12914         * common/pathstuff.h (contains_dir_separator): New prototype.
12915         * source.c: Don't include "sys/stat.h".
12916         (is_regular_file): Move to "common/common-utils.c".
12917
12918 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12919
12920         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12921         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12922         * auto-load.c: Include "common/pathstuff.h".
12923         * common/common-def.h (current_directory): Move here.
12924         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12925         function.
12926         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12927         prototype.
12928         * common/pathstuff.c: New file.
12929         * common/pathstuff.h: New file.
12930         * compile/compile.c: Include "common/pathstuff.h".
12931         * defs.h (current_directory): Move to "common/common-defs.h".
12932         * dwarf2read.c: Include "common/pathstuff.h".
12933         * exec.c: Likewise.
12934         * guile/scm-safe-call.c: Likewise.
12935         * linux-thread-db.c: Likewise.
12936         * main.c: Likewise.
12937         * nto-tdep.c: Likewise.
12938         * objfiles.c: Likewise.
12939         * source.c: Likewise.
12940         * symtab.c: Likewise.
12941         * utils.c: Include "common/pathstuff.h".
12942         (gdb_realpath): Move to "common/pathstuff.c".
12943         (gdb_realpath_keepfile): Likewise.
12944         (gdb_abspath): Likewise.
12945         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12946         (gdb_realpath_keepfile): Likewise.
12947         (gdb_abspath): Likewise.
12948
12949 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
12950
12951         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12952         wildcard process pid for super_resume for kernels with a
12953         specific bug.
12954
12955 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
12956
12957         * compile/compile.c (get_args): Add additional comments
12958         explaining function.
12959
12960 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
12961             Tom Tromey  <tom@tromey.com>
12962
12963         * target.h (memory_write_request_s): Remove typedef.  Don't define
12964         VEC.
12965         (target_write_memory_blocks): Change argument to std::vector.
12966         (struct memory_write_request): Add constructor.
12967         * target-memory.c (compare_block_starting_address): Return bool.
12968         Change argument types.
12969         (claim_memory): Change arguments to use std::vector.
12970         (split_regular_and_flash_blocks, blocks_to_erase)
12971         (compute_garbled_blocks): Likewise.
12972         (cleanup_request_data, cleanup_write_requests_vector): Remove.
12973         (target_write_memory_blocks): Change argument to std::vector.
12974         * symfile.c (struct load_section_data): Add constructor and
12975         destructor.  Use std::vector for "requests".
12976         (struct load_progress_data): Add initializers.
12977         (load_section_callback): Update.  Use "new".
12978         (clear_memory_write_data): Remove.
12979         (generic_load): Update.
12980
12981 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
12982
12983         * arch/aarch64.h: Use common/tdesc.h.
12984
12985 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12986
12987         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12988         architecture with a 64-bit ABI.
12989
12990 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12991
12992         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12993         ahead of target description loading.
12994
12995 2018-02-26  Tom Tromey  <tom@tromey.com>
12996
12997         * stack.c (backtrace_command_1): Update.
12998         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12999         of "flags".
13000         * python/py-framefilter.c (py_print_frame)
13001         (gdbpy_apply_frame_filter): Change type of "flags".
13002         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
13003         of "flags".
13004         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
13005         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
13006         * extension.h (enum frame_filter_flag): Rename from
13007         frame_filter_flags.
13008         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
13009         (apply_ext_lang_frame_filter): Change type of "flags".
13010         * extension.c (apply_ext_lang_frame_filter): Change type of
13011         "flags".
13012         * extension-priv.h (struct extension_language_ops)
13013         <apply_frame_filter>: Change type of "flags".
13014
13015 2018-02-26  Tom Tromey  <tom@tromey.com>
13016
13017         PR python/16497:
13018         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
13019         off-by-one in py_end computation.
13020         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
13021         PRINT_MORE_FRAMES.
13022         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
13023         constant.
13024
13025 2018-02-26  Tom Tromey  <tom@tromey.com>
13026
13027         * dwarf2read.c (struct variant_field): New.
13028         (struct nextfield) <variant>: New field.
13029         (dwarf2_add_field): Handle DW_TAG_variant_part.
13030         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
13031         discriminated union.
13032         (read_structure_type): Handle DW_TAG_variant_part.
13033         (handle_struct_member_die): New function, extracted from
13034         process_structure_scope.  Handle DW_TAG_variant.
13035         (process_structure_scope): Handle discriminated unions.  Call
13036         handle_struct_member_die.
13037
13038 2018-02-26  Tom Tromey  <tom@tromey.com>
13039
13040         * rust-lang.h (rust_last_path_segment): Declare.
13041         * rust-lang.c (rust_last_path_segment): Now public.  Change
13042         contract.
13043         (struct disr_info): Remove.
13044         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
13045         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
13046         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
13047         (rust_enum_p, rust_enum_variant): New function.
13048         (rust_underscore_fields): Remove "offset" parameter.
13049         (rust_print_enum): New function.
13050         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
13051         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
13052         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
13053         enums.
13054         (rust_internal_print_type): New function, from rust_print_type.
13055         Remove enum code.
13056         (rust_print_type): Call rust_internal_print_type.
13057         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
13058         Update enum handling.
13059         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
13060         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
13061         (rust_union_quirks): New functions.
13062         (process_full_comp_unit, process_full_type_unit): Call
13063         rust_union_quirks.
13064         (process_structure_scope): Update rust_unions if necessary.
13065
13066 2018-02-26  Tom Tromey  <tom@tromey.com>
13067
13068         * value.h (value_union_variant): Declare.
13069         * valops.c (value_union_variant): New function.
13070         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
13071         (struct discriminant_info): New.
13072         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
13073         enumerator.
13074         (struct main_type) <flag_discriminated_union>: New field.
13075
13076 2018-02-26  Tom Tromey  <tom@tromey.com>
13077
13078         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13079         unittests/unpack-selftests.c.
13080         * unittests/unpack-selftests.c: New file.
13081         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13082
13083 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13084
13085         * dwarf2read.c (struct partial_die_info) <read>: New method.
13086         (read_partial_die): Remove the declaration.
13087         (load_partial_dies): Update.
13088         (partial_die_info::partial_die_info):
13089         (read_partial_die): Change it to partial_die_info::read.
13090
13091 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13092
13093         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13094         (fixup_partial_die): Remove declaration.
13095         (scan_partial_symbols): Update.
13096         (partial_die_parent_scope): Likewise.
13097         (partial_die_full_name): Likewise.
13098         (fixup_partial_die): Change it to partial_die_info::fixup.
13099
13100 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13101
13102         * dwarf2read.c (read_partial_die): Update the declaration.
13103         (load_partial_dies): Caller update.
13104         (read_partial_die): Remove one argument abbrev_len.
13105
13106 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13107
13108         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13109         assignment operator.
13110         (load_partial_dies): Use ctor and copy ctor.
13111         (read_partial_die): Update.
13112         (dwarf2_cu::find_partial_die): Use ctor.
13113
13114 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13115
13116         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13117         (find_partial_die_in_comp_unit): Change it to
13118         dwarf2_cu::find_partial_die.
13119         (find_partial_die): Update.
13120
13121 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13122
13123         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13124         is NULL.
13125
13126 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13127
13128         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13129
13130 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13131
13132         * arch/amd64.h: Use common/tdesc.h.
13133         * arch/i386.c: Likewise.
13134         * arch/i386.h: Likewise.
13135         * arch/tic6x.c: Likewise.
13136         * arch/tdesc.h: Move file from here...
13137         * common/tdesc.h: ...to here.
13138         * features/aarch64-core.c: Regenerate.
13139         * features/aarch64-fpu.c: Regenerate.
13140         * features/i386/32bit-avx.c: Regenerate.
13141         * features/i386/32bit-avx512.c: Regenerate.
13142         * features/i386/32bit-core.c: Regenerate.
13143         * features/i386/32bit-linux.c: Regenerate.
13144         * features/i386/32bit-mpx.c: Regenerate.
13145         * features/i386/32bit-pkeys.c: Regenerate.
13146         * features/i386/32bit-sse.c: Regenerate.
13147         * features/i386/64bit-avx.c: Regenerate.
13148         * features/i386/64bit-avx512.c: Regenerate.
13149         * features/i386/64bit-core.c: Regenerate.
13150         * features/i386/64bit-linux.c: Regenerate.
13151         * features/i386/64bit-mpx.c: Regenerate.
13152         * features/i386/64bit-pkeys.c: Regenerate.
13153         * features/i386/64bit-segments.c: Regenerate.
13154         * features/i386/64bit-sse.c: Regenerate.
13155         * features/i386/x32-core.c: Regenerate.
13156         * features/tic6x-c6xp.c: Regenerate.
13157         * features/tic6x-core.c: Regenerate.
13158         * features/tic6x-gp.c: Regenerate.
13159         * target-descriptions.c: Use common/tdesc.h.
13160         * target-descriptions.h: Likewise.
13161
13162 2018-02-24  Tom Tromey  <tom@tromey.com>
13163
13164         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13165         (try_thread_db_load_from_dir, thread_db_load_search): Use
13166         std::string.
13167         (info_auto_load_libthread_db_compare): Return bool.  Change
13168         argument types.
13169         (info_auto_load_libthread_db): Use std::vector, std::string.
13170         Remove cleanups.
13171
13172 2018-02-24  Tom Tromey  <tom@tromey.com>
13173
13174         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13175         std::string.
13176         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13177         std::string*.
13178         * gdbarch.c: Rebuild.
13179         * gdbarch.h: Rebuild.
13180         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13181         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13182         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13183         std::string*.
13184
13185 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13186
13187         * gdbtypes.h (sect_offset): Change type to uint64_t.
13188         (sect_offset_str): New function.
13189         * dwarf2read.c (create_addrmap_from_aranges): Use
13190         sect_offset_str.
13191         (error_check_comp_unit_head): Likewise.
13192         (create_debug_type_hash_table): Likewise.
13193         (read_cutu_die_from_dwo): Likewise.
13194         (init_cutu_and_read_dies): Likewise.
13195         (init_cutu_and_read_dies_no_follow): Likewise.
13196         (process_psymtab_comp_unit_reader): Likewise.
13197         (partial_die_parent_scope): Likewise.
13198         (peek_die_abbrev): Likewise.
13199         (process_queue): Likewise.
13200         (dwarf2_physname): Likewise.
13201         (read_namespace_alias): Likewise.
13202         (read_import_statement): Likewise.
13203         (create_dwo_cu_reader): Likewise.
13204         (create_cus_hash_table): Likewise.
13205         (lookup_dwo_cutu): Likewise.
13206         (inherit_abstract_dies): Likewise.
13207         (read_func_scope): Likewise.
13208         (read_call_site_scope): Likewise.
13209         (dwarf2_add_member_fn): Likewise.
13210         (read_common_block): Likewise.
13211         (read_module_type): Likewise.
13212         (read_typedef): Likewise.
13213         (read_subrange_type): Likewise.
13214         (load_partial_dies): Likewise.
13215         (read_partial_die): Likewise.
13216         (find_partial_die): Likewise.
13217         (read_str_index): Likewise.
13218         (dwarf2_string_attr): Likewise.
13219         (build_error_marker_type): Likewise.
13220         (lookup_die_type): Likewise.
13221         (dump_die_shallow): Likewise.
13222         (follow_die_ref): Likewise.
13223         (dwarf2_fetch_die_loc_sect_off): Likewise.
13224         (dwarf2_fetch_constant_bytes): Likewise.
13225         (follow_die_sig): Likewise.
13226         (get_signatured_type): Likewise.
13227         (get_DW_AT_signature_type): Likewise.
13228         (dwarf2_find_containing_comp_unit): Likewise.
13229         (set_die_type): Likewise.
13230
13231 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13232
13233         * arch/aarch64.c: Include "common-defs.h".
13234         * arch/amd64.c: Likewise.
13235         * arch/i386.c: Likewise.
13236
13237 2018-02-21  Tom Tromey  <tom@tromey.com>
13238
13239         * value.h: (extract_field_op): Update.
13240         * eval.c (extract_field_op): Return a const char *.
13241         * expression.h (parse_expression_for_completion): Update.
13242         * completer.c (complete_expression): Update.
13243         (add_struct_fields): Make fieldname const.
13244         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13245         (mark_completion_tag, parse_exp_in_context_1): Update.
13246         (parse_expression_for_completion): Change "name" to
13247         unique_xmalloc_ptr*.
13248
13249 2018-02-21  Tom Tromey  <tom@tromey.com>
13250
13251         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13252
13253 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13254
13255         * avr-tdep.c (avr_read_pc): Change parameter type to
13256         readable_regcache.
13257         * gdbarch.sh (read_pc): Likewise.
13258         * gdbarch.c: Re-generated.
13259         * gdbarch.h: Re-generated.
13260         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13261         readable_regcache.
13262         * ia64-tdep.c (ia64_read_pc): Likewise.
13263         * mips-tdep.c (mips_read_pc): Likewise.
13264         * spu-tdep.c (spu_read_pc): Likewise.
13265
13266 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13267
13268         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13269         * regcache-dump.c: New file.
13270         * regcache.c: Move register_dump to regcache-dump.c.
13271         (maintenance_print_registers): Likewise.
13272         (maintenance_print_raw_registers): Likewise.
13273         (maintenance_print_cooked_registers): Likewise.
13274         (maintenance_print_register_groups): Likewise.
13275         (maintenance_print_remote_registers): Likewise.
13276         (_initialize_regcache): Likewise.
13277         * regcache.h (register_dump): Moved from regcache.c.
13278
13279 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13280
13281         * regcache.c (regcache::regcache): Update.
13282         (regcache::invalidate): Move it to detached_regcache::invalidate.
13283         (get_thread_arch_aspace_regcache): Update.
13284         (regcache::raw_update): Update.
13285         (regcache::cooked_read): Remove some code.
13286         (regcache::cooked_read_value): Likewise.
13287         (regcache::raw_write): Remove assert on m_readonly_p.
13288         (regcache::raw_supply_integer): Move it to
13289         detached_regcache::raw_supply_integer.
13290         (regcache::raw_supply_zeroed): Likewise.
13291         * regcache.h (detached_regcache) <raw_supply_integer>: New
13292         declaration.
13293         <raw_supply_zeroed, invalidate>: Likewise.
13294         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13295         <invalidate>: Likewise.
13296         <m_readonly_p>: Removed.
13297
13298 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13299
13300         * infcmd.c (get_return_value): Let stop_regs point to
13301         get_current_regcache.
13302         * regcache.c (regcache::regcache): Remove.
13303         (register_dump_reg_buffer): New class.
13304         (regcache_print): Adjust.
13305         * regcache.h (regcache): Remove constructors.
13306
13307 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13308
13309         * regcache.c (class register_dump): New class.
13310         (register_dump_regcache, register_dump_none): New class.
13311         (register_dump_remote, register_dump_groups): New class.
13312         (regcache_print): Update.
13313         * regcache.h (regcache_dump_what): Move it to regcache.c.
13314         (regcache) <dump>: Remove.
13315
13316 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13317
13318         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13319          reg_buffer_rw *.
13320         (jit_unwind_reg_set_impl): Call raw_supply.
13321         (jit_frame_sniffer): Use reg_buffer_rw.
13322         * record-full.c (record_full_core_regbuf): Change its type.
13323         (record_full_core_open_1): Use reg_buffer_rw.
13324         (record_full_close): Likewise.
13325         (record_full_core_fetch_registers): Use regcache->raw_supply.
13326         (record_full_core_store_registers): Likewise.
13327         * regcache.c (regcache::get_register_status): Move it to
13328         reg_buffer.
13329         (regcache_raw_set_cached_value): Remove.
13330         (regcache::raw_set_cached_value): Remove.
13331         (regcache::raw_write): Call raw_supply.
13332         (regcache::raw_supply): Move it to reg_buffer_rw.
13333         * regcache.h (regcache_raw_set_cached_value): Remove.
13334         (reg_buffer_rw): New class.
13335
13336 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13337
13338         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13339         readonly_detached_regcache.
13340         (dummy_frame_prev_register): Use regcache->cooked_read.
13341         * frame.c (frame_save_as_regcache): Change return type.
13342         (frame_pop): Update.
13343         * frame.h (frame_save_as_regcache): Update declaration.
13344         * inferior.h (get_infcall_suspend_state_regcache): Update
13345         declaration.
13346         * infrun.c (infcall_suspend_state) <registers>: use
13347         readonly_detached_regcache.
13348         (save_infcall_suspend_state): Don't use regcache_dup.
13349         (get_infcall_suspend_state_regcache): Change return type.
13350         * linux-fork.c (struct fork_info) <savedregs>: Change to
13351         readonly_detached_regcache.
13352         <pc>: New field.
13353         (fork_save_infrun_state): Don't use regcache_dup.
13354         (info_checkpoints_command): Adjust.
13355         * mi/mi-main.c (register_changed_p): Update declaration.
13356         (mi_cmd_data_list_changed_registers): Use
13357         readonly_detached_regcache.
13358         (register_changed_p): Change parameter type to
13359         readonly_detached_regcache.
13360         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13361         readonly_detached_regcache.
13362         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13363         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13364         New.
13365         (regcache::save): Move it to reg_buffer.
13366         (regcache::restore): Change parameter type.
13367         (regcache_dup): Remove.
13368         * regcache.h (reg_buffer) <save>: New method.
13369         (readonly_detached_regcache): New class.
13370         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13371         readonly_detached_regcache.
13372         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13373
13374 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13375
13376         * frame.c (frame_save_as_regcache): Use regcache method save.
13377         (frame_pop): Use regcache method restore.
13378         * infrun.c (restore_infcall_suspend_state): Likewise.
13379         * linux-fork.c (fork_load_infrun_state): Likewise.
13380         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13381         save.
13382         * regcache.c (regcache_save): Remove.
13383         (regcache::restore): More asserts.
13384         (regcache_cpy): Remove.
13385         * regcache.h (regcache_save): Remove the declaration.
13386         (regcache::restore): Move from private to public.
13387         Remove the friend declaration of regcache_cpy.
13388         (regcache_cpy): Remove declaration.
13389
13390 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13391
13392         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13393         parameter type to 'readable_regcache *'.
13394         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13395         * arm-tdep.c (arm_neon_quad_read): Likewise.
13396         (arm_pseudo_read): Likewise.
13397         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13398         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13399         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13400         * gdbarch.c: Re-generated.
13401         * gdbarch.h: Re-generated.
13402         * gdbarch.sh (pseudo_register_read): Change parameter type to
13403         'readable_regcache *'.
13404         (pseudo_register_read_value): Likewise.
13405         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13406         (h8300_pseudo_register_read): Likewise.
13407         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13408         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13409         (i386_pseudo_register_read_into_value): Likewise.
13410         (i386_pseudo_register_read_value): Likewise.
13411         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13412         declaration.
13413         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13414         * m32c-tdep.c (m32c_raw_read): Likewise.
13415         (m32c_read_flg): Likewise.
13416         (m32c_banked_register): Likewise.
13417         (m32c_banked_read): Likewise.
13418         (m32c_sb_read): Likewise.
13419         (m32c_part_read): Likewise.
13420         (m32c_cat_read): Likewise.
13421         (m32c_r3r2r1r0_read): Likewise.
13422         (m32c_pseudo_register_read): Likewise.
13423         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13424         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13425         (mep_pseudo_cr64_read): Likewise.
13426         (mep_pseudo_register_read): Likewise.
13427         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13428         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13429         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13430         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13431         (regcache::cooked_read): Likewise.
13432         (regcache::cooked_read_value): Likewise.
13433         (regcache_cooked_read_signed):
13434         (regcache::cooked_read): Likewise.
13435         * regcache.h (readable_regcache): New class.
13436         (regcache): Inherit readable_regcache.  Move some methods to
13437         readable_regcache.
13438         * rl78-tdep.c (rl78_pseudo_register_read): Change
13439         parameter type to 'readable_regcache *'.
13440         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13441         (e500_pseudo_register_read): Change parameter type to
13442         'readable_regcache *'.
13443         (dfp_pseudo_register_read): Likewise.
13444         (vsx_pseudo_register_read): Likewise.
13445         (efpr_pseudo_register_read): Likewise.
13446         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13447         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13448         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13449         (sh64_pseudo_register_read): Likewise.
13450         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13451         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13452         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13453         (spu_pseudo_register_read): Likewise.
13454         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13455         (xtensa_pseudo_register_read): Likewise.
13456
13457 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13458
13459         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13460         (regcache::arch): Move it to reg_buffer::arch.
13461         (regcache::register_buffer): Likewise.
13462         (regcache::assert_regnum): Likewise.
13463         (regcache::num_raw_registers): Likewise.
13464         * regcache.h (reg_buffer): New class.
13465         (regcache): Inherit reg_buffer.
13466
13467 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13468
13469         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13470         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13471
13472 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13473
13474         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13475
13476 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13477
13478         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13479         (SFILES): Remove common/*.c files.
13480         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13481         * common/common.host: Add common reference.
13482         * configure.ac: Likewise.
13483         * configure: Regenerate.
13484
13485 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13486
13487         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13488         (block_initialize_namespace): Use new.
13489         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13490         (dwarf2_free_objfile): Use delete.
13491         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13492         (copy_type_recursive): Use new.
13493         * gdb_obstack.h (allocate_on_obstack): New.
13494
13495 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13496
13497         PR gdb/22849
13498         * inferior.c (exit_inferior_1): Reset inf->control.
13499
13500 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13501
13502         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13503         declaration.
13504
13505 2018-02-14  Pedro Alves  <palves@redhat.com>
13506
13507         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13508         frame_cleanup_after_sniffer on exception.
13509
13510 2018-02-14  Tom Tromey  <tom@tromey.com>
13511
13512         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13513         const.
13514         (solib_bfd_open): Make pathname const.
13515         * solib.c (solib_bfd_open): Make pathname const.
13516         * solib-spu.c (spu_bfd_fopen): Make name const.
13517         (spu_bfd_open): Make pathname const.
13518         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13519         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13520
13521 2018-02-14  Tom Tromey  <tom@tromey.com>
13522
13523         * symfile.c (symfile_bfd_open): Update.
13524         * source.h (openp, source_full_path_of, find_and_open_source):
13525         Change argument type to unique_xmalloc_ptr.
13526         * source.c (openp): Take a unique_xmalloc_ptr.
13527         (source_full_path_of, find_and_open_source): Likewise.
13528         (open_source_file, symtab_to_fullname): Update.
13529         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13530         unique_xmalloc_ptr.
13531         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13532         (exec_file_find): Update.
13533         * psymtab.c (psymtab_to_fullname): Update.
13534         * nto-tdep.h (nto_find_and_open_solib): Update.
13535         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13536         unique_xmalloc_ptr.
13537         * exec.c (exec_file_attach): Update.
13538         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13539         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13540
13541 2018-02-14  Tom Tromey  <tom@tromey.com>
13542
13543         * solib.c: Include source.h.
13544         * nto-tdep.c: Include source.h.
13545         * mi/mi-cmd-env.c: Include source.h.
13546         * infcmd.c: Include source.h.
13547         * exec.c: Include source.h.
13548         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13549         (add_path, directory_switch, source_path, init_source_path): Move
13550         declarations...
13551         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13552         (add_path, directory_switch, source_path, init_source_path):
13553         ...here.
13554
13555 2018-02-14  Tom Tromey  <tom@tromey.com>
13556
13557         * solist.h (exec_file_find, solib_find): Return
13558         unique_xmalloc_ptr.
13559         (solib_bfd_fopen): Take a const char *.
13560         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13561         (exec_file_find, solib_find): Likewise.
13562         (solib_bfd_fopen): Do not take ownership of "pathname".
13563         (solib_bfd_open): Use unique_xmalloc_ptr.
13564         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13565         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13566         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13567         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13568
13569 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13570
13571         * ada-lang.c (name_match_type_from_name): Remove reference to
13572         ada_name_for_lookup in function's documentation.
13573         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13574
13575 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13576
13577         * defs.h (enum openp_flags): New enum.
13578         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13579         Move to enum openp_flags.
13580         (openp_flags): New enum flags.
13581         (openp): Change parameter type to openp_flags.
13582         * source.c (openp): Change parameter type to openp_flags.
13583         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13584         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13585
13586 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13587
13588         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13589         per-command.
13590
13591 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13592
13593         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13594         into...
13595         (class dwarf2_queue_guard): ...the destructor of this new class.
13596         (dw2_do_instantiate_symtab): Create instance of the new class
13597         dwarf2_queue_guard, remove cleanup.
13598
13599 2018-02-09  Tom Tromey  <tom@tromey.com>
13600
13601         * source.c (find_source_lines): Don't reference past the end of
13602         the vector.
13603
13604 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13605
13606         * remote.c (remote_btrace_maybe_reopen): Change error message.
13607         * btrace.c (btrace_enable): Likewise.
13608         (parse_xml_btrace): Likewise.
13609         (parse_xml_btrace_conf): Likewise.
13610
13611 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13612
13613         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13614         (linux_enable_pt, linux_enable_bts): Call
13615         diagnose_perf_event_open_fail.
13616
13617 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13618
13619         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13620         Remove parameter and change return type.  Update callers.  Move it.
13621         (linux_enable_bts, linux_enable_pt): Improve error message.
13622         (linux_enable_pt): Remove zero buffer size check.
13623         (linux_enable_btrace): Improve error messages.  Remove NULL return
13624         check.
13625
13626 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13627
13628         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13629         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13630         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13631         (linux_supports_pt, linux_supports_btrace): Remove.
13632         (linux_enable_bts): Call cpu_supports_bts.
13633         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13634         * remote.c (remote_supports_btrace): Remove.
13635         (init_remote_ops): Remove remote_supports_btrace.
13636         * target-delegates.c: Regenerated.
13637         * target.c (target_supports_btrace): Remove.
13638         * target.h (target_ops) <to_supports_btrace>: Remove
13639         (target_supports_btrace): Remove.
13640         * x86-linux-nat.c (x86_linux_create_target): Remove
13641         linux_supports_btrace.
13642
13643 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13644
13645         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13646         btrace failed.
13647         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13648         exception and use message in own exception.
13649
13650 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13651
13652         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13653         (perf_event_pt_event_type): Use gdb_file_up.
13654         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13655         scoped_fd, and scoped_mmap.
13656
13657 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13658
13659         * common/scoped_mmap.h: New.
13660         * unittests/scoped_mmap-selftest.c: New.
13661         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13662         unittests/scoped_mmap-selftest.c.
13663
13664 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13665
13666         * common/scoped_fd.h: New.
13667         * unittests/scoped_fd-selftest.c: New.
13668         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13669         unittests/scoped_fd-selftest.c.
13670
13671 2018-02-09  Tom Tromey  <tom@tromey.com>
13672
13673         * auto-load.c (auto_load_section_scripts): Use
13674         gdb::unique_xmalloc_ptr.
13675
13676 2018-02-09  Tom Tromey  <tom@tromey.com>
13677
13678         * auto-load.c (execute_script_contents): Use std::string.
13679
13680 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13681
13682         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13683         Python function, rather than a new command.
13684
13685 2018-02-08  Tom Tromey  <tom@tromey.com>
13686
13687         * solib.c (solib_find_1): Use std::string.
13688         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13689
13690 2018-02-08  Tom Tromey  <tom@tromey.com>
13691
13692         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13693
13694 2018-02-08  Tom Tromey  <tom@tromey.com>
13695
13696         * source.c (find_source_lines): Use gdb::def_vector.
13697
13698 2018-02-08  Tom Tromey  <tom@tromey.com>
13699
13700         * macrocmd.c (struct temporary_macro_definition): New.
13701         (macro_define_command): Use temporary_macro_definition.  Remove
13702         cleanups.
13703         (free_macro_definition_ptr): Remove.
13704
13705 2018-02-08  Tom Tromey  <tom@tromey.com>
13706
13707         * macroexp.c (maybe_expand): Use std::string.
13708
13709 2018-02-08  Tom Tromey  <tom@tromey.com>
13710
13711         * macroexp.c (struct macro_buffer): Add initializers for some
13712         members.
13713         (init_buffer, init_shared_buffer, free_buffer)
13714         (free_buffer_return_text): Remove.
13715         (macro_buffer): New constructors.
13716         (~macro_buffer): New destructor.
13717         (macro_buffer::set_shared): New method.
13718         (macro_buffer::resize_buffer, macro_buffer::appendc)
13719         (macro_buffer::appendmem): Now methods, not free functions.
13720         (set_token, append_tokens_without_splicing, stringify)
13721         (macro_stringify): Update.
13722         (gather_arguments): Change return type.  Remove argc_p argument,
13723         add args_ptr argument.  Use std::vector.
13724         (substitute_args): Remove argc argument.  Accept std::vector.
13725         (expand): Update.  Use std::vector.
13726         (scan, macro_expand, macro_expand_next): Update.
13727
13728 2018-02-08  Tom Tromey  <tom@tromey.com>
13729
13730         * symtab.c (default_collect_symbol_completion_matches_break_on):
13731         Use unique_xmalloc_ptr.
13732         * macroscope.h: (sal_macro_scope, user_macro_scope)
13733         (default_macro_scope): Return unique_xmalloc_ptr.
13734         * macroscope.c (sal_macro_scope, user_macro_scope)
13735         (default_macro_scope): Return unique_xmalloc_ptr.
13736         * macroexp.h (macro_expand, macro_expand_once): Return
13737         unique_xmalloc_ptr.
13738         * macroexp.c (macro_expand, macro_expand_once): Return
13739         unique_xmalloc_ptr.
13740         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13741         (info_macro_command, info_macros_command): Use
13742         unique_xmalloc_ptr.
13743         * compile/compile-c-support.c (write_macro_definitions): Use
13744         unique_xmalloc_ptr.
13745         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13746
13747 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13748
13749         * value.c (value_static_field): Assign field type instead of
13750         containing type when returning an optimized out value.
13751
13752 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13753
13754         * ft32-tdep.c (ft32_read_pc): Remove.
13755         (ft32_write_pc): Remove.
13756         (ft32_gdbarch_init): Update.
13757         * m32r-tdep.c (m32r_read_pc): Remove.
13758         (m32r_gdbarch_init): Update.
13759         * mep-tdep.c (mep_read_pc): Remove.
13760         (mep_gdbarch_init): Update.
13761         * microblaze-tdep.c (microblaze_write_pc): Remove.
13762         (microblaze_gdbarch_init): Update.
13763         * mn10300-tdep.c (mn10300_read_pc): Remove.
13764         (mn10300_write_pc): Remove.
13765         (mn10300_gdbarch_init): Update.
13766         * moxie-tdep.c (moxie_read_pc): Remove.
13767         (moxie_write_pc): Remove.
13768         (moxie_gdbarch_init): Update.
13769
13770 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13771
13772         * expprint.c (print_subexp_standard): Handle
13773         OP_F77_UNDETERMINED_ARGLIST.
13774         (dump_subexp_body_standard): Likewise.
13775
13776 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13777
13778         * target-descriptions.c (tdesc_element_visitor) Add empty
13779         implementations.
13780         (tdesc_type): Move make_gdb_type from here.
13781         (tdesc_type_builtin): Likewise.
13782         (tdesc_type_vector): Likewise.
13783         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13784         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13785         (make_gdb_type_union): Likewise.
13786         (make_gdb_type_flags): Likewise.
13787         (make_gdb_type_enum): Likewise.
13788         (make_gdb_type): New function.
13789         (tdesc_register_type): Use static make_gdb_type.
13790
13791 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13792
13793         * infcmd.c (default_print_one_register_info): Align natural-format
13794         column values consistently one under another.
13795         (pad_to_column): New function.
13796
13797 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13798
13799         * dwarf2read.c (dwarf2_physname): Move commment.
13800
13801 2018-02-01  Leszek Swirski  <leszeks@google.com>
13802
13803         * varobj.c (varobj_formatted_print_options): Allow recursive
13804         pretty printing if pretty printing is enabled.
13805
13806 2018-02-01  Leszek Swirski  <leszeks@google.com>
13807
13808         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13809         names after a structop as a filename.
13810
13811 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13812
13813         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13814         (arm_record_coproc_data_proc): Likewise.
13815
13816 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13817
13818         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13819
13820 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13821
13822         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13823         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13824
13825 2018-01-31  Pedro Alves  <palves@redhat.com>
13826
13827         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13828         * inflow.c (child_terminal_save_inferior): Wrap reference to
13829         tcgetpgrp in HAVE_TERMIOS_H.
13830         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13831         _WIN32.
13832         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13833         always iterate over all inferiors.
13834         (gdbsim_cntrl_c): Adjust.
13835         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13836
13837 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13838
13839         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13840         index type is objfile-owned if the element type is as well.
13841
13842 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13843
13844         GDB 8.1 released.
13845
13846 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13847
13848         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13849         "features/s390x-linux64.c".
13850         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13851         s390_linux32 and s390x_linux64.
13852         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13853         default tdesc.
13854         * s390-tdep.c: Include "features/s390-linux32.c" and
13855         "features/s390x-linux64.c".
13856         (s390_tdesc_valid): Add check for tdesc_has_registers.
13857         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13858         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13859         tdesc_s390x_linux64.
13860         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13861         tdesc_s390x_linux64 to...
13862         * s390-tdep.h: ...here.
13863
13864 2018-01-30  Pedro Alves  <palves@redhat.com>
13865
13866         PR gdb/13211
13867         * config.in, configure: Regenerate.
13868         * configure.ac: Check for getpgid.
13869         * go32-nat.c (go32_pass_ctrlc): New.
13870         (go32_target): Install it.
13871         * inf-child.c (inf_child_target): Install
13872         child_terminal_save_inferior, child_pass_ctrlc and
13873         child_interrupt.
13874         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13875         (inf_ptrace_target): No longer install it.
13876         * infcmd.c (interrupt_target_1): Adjust.
13877         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13878         (child_interrupt): Declare.
13879         (inferior::terminal_state): New.
13880         * inflow.c (struct terminal_info): Update comments.
13881         (inferior_process_group): Delete.
13882         (terminal_is_ours): Delete.
13883         (gdb_tty_state): New.
13884         (child_terminal_init): Adjust.
13885         (is_gdb_terminal, sharing_input_terminal_1)
13886         (sharing_input_terminal): New functions.
13887         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13888         Set the process's actual process group in the foreground if
13889         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13890         mark terminal as the inferior's if not sharing GDB's terminal.
13891         Don't check attach_flag.
13892         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13893         pass down a target_terminal_state.
13894         (child_terminal_save_inferior): New, factored out from ...
13895         (child_terminal_ours_1): ... this.  Handle
13896         target_terminal_state::is_ours_for_output.
13897         (child_interrupt, child_pass_ctrlc): New.
13898         (inflow_inferior_exit): Clear the inferior's terminal_state.
13899         (copy_terminal_info): Copy the inferior's terminal state.
13900         (_initialize_inflow): Remove reference to terminal_is_ours.
13901         * inflow.h (inferior_process_group): Delete.
13902         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13903         * procfs.c (procfs_target): Don't install procfs_interrupt.
13904         (procfs_interrupt): Delete.
13905         * remote.c (remote_serial_quit_handler): Adjust.
13906         (remote_interrupt): Remove ptid parameter.  Adjust.
13907         * target-delegates.c: Regenerate.
13908         * target.c: Include "terminal.h".
13909         (target_terminal::terminal_state): Rename to ...
13910         (target_terminal::m_terminal_state): ... this.
13911         (target_terminal::init): Adjust.
13912         (target_terminal::inferior): Adjust to per-inferior
13913         terminal_state.
13914         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13915         (target_terminal::ours, target_terminal::ours_for_output): Use
13916         target_terminal_is_ours_kind.
13917         (target_interrupt): Remove ptid parameter.  Adjust.
13918         (default_target_pass_ctrlc): Adjust.
13919         * target.h (target_ops::to_terminal_save_inferior): New field.
13920         (target_ops::to_interrupt): Remove ptid_t parameter.
13921         (target_interrupt): Remove ptid_t parameter.  Update comment.
13922         (target_pass_ctrlc): Update comment.
13923         * target/target.h (target_terminal_state): New scoped enum,
13924         factored out of ...
13925         (target_terminal::terminal_state): ... here.
13926         (target_terminal::inferior): Update comments.
13927         (target_terminal::restore_inferior): New.
13928         (target_terminal::is_inferior, target_terminal::is_ours)
13929         (target_terminal::is_ours_for_output): Adjust.
13930         (target_terminal::scoped_restore_terminal_state): Adjust to
13931         rename, and call restore_inferior() instead of inferior().
13932         (target_terminal::scoped_restore_terminal_state::m_state): Change
13933         type.
13934         (target_terminal::terminal_state): Rename to ...
13935         (target_terminal::m_terminal_state): ... this and change type.
13936
13937 2018-01-30  Pedro Alves  <palves@redhat.com>
13938
13939         * linux-nat.c (wait_for_signal): New function.
13940         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13941         directly.
13942         (async_terminal_is_ours)
13943         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13944         (linux_nat_add_target): Don't override
13945         to_terminal_inferior/to_terminal_ours.
13946
13947 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
13948
13949         * remote.c (remote_follow_fork): Don't call "detach_inferior".
13950
13951 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
13952
13953         * dwarf2read.c (free_dwo_files): Add forward-declaration.
13954         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13955         dwarf2_per_objfile_free here.
13956         (dwarf2_per_objfile_free): Remove.
13957         (_initialize_dwarf2_read): Don't register
13958         dwarf2_per_objfile_free as a registry cleanup.
13959
13960 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
13961
13962         Avoid compilation errors in MinGW native builds
13963
13964         The error is triggered by including python-internal.h, and the
13965         error message is:
13966
13967              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13968                       from build-gnulib/import/math.h:27,
13969                       from d:/usr/Python26/include/pyport.h:235,
13970                       from d:/usr/Python26/include/Python.h:58,
13971                       from python/python-internal.h:94,
13972                       from python/py-arch.c:24:
13973              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13974         using ::hypot;
13975                 ^~~~~
13976
13977         This happens because Python headers define 'hypot' to expand t
13978         '_hypot' in the Windows builds.
13979         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13980         'hypoth'.  This avoids a compilation error.
13981
13982 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13983
13984         * MAINTAINERS (Write After Approval): Fix ordering.
13985
13986 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13987
13988         * MAINTAINERS (Write After Approval): Add Alan Hayward.
13989
13990 2018-01-26  Alan Modra  <amodra@gmail.com>
13991
13992         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13993         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13994         Remove nop.  Make const.  Comment.
13995         (powerpc32_plt_stub_so_2): New.
13996         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13997         Correct count.  Update uses.
13998         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13999         Move common code reading PLT entry word.  Correct
14000         powerpc32_plt_stub PLT address calculation.
14001         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
14002         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
14003         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
14004         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
14005         (ppc64_standard_linkage8): Likewise.
14006         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
14007         Correct insns description.
14008         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
14009
14010 2018-01-24  Pedro Alves  <palves@redhat.com>
14011
14012         GCC PR libstdc++/83906
14013         * gdbtypes.c (operator==(const dynamic_prop &,
14014         const dynamic_prop &)): New.
14015         (operator==(const range_bounds &, const range_bounds &)): New.
14016         (check_types_equal): Use them instead of memcmp.
14017         * gdbtypes.h (operator==(const dynamic_prop &,
14018         const dynamic_prop &)): Declare.
14019         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
14020         (operator==(const range_bounds &, const range_bounds &)): Declare.
14021         (operator!=(const range_bounds &, const range_bounds &)): Declare.
14022
14023 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14024
14025         * s390-linux-tdep.c (s390_record_address_mask)
14026         (s390_record_calc_disp_common, s390_record_calc_disp)
14027         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14028         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14029         (s390_process_record): Move to s390-tdep.c.
14030         (s390_linux_init_abi_any): Adjust.
14031         * s390-tdep.c (s390_record_address_mask)
14032         (s390_record_calc_disp_common, s390_record_calc_disp)
14033         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
14034         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
14035         (s390_process_record): Moved from s390-linux-tdep.c
14036         (s390_gdbarch_init): Adjust.
14037
14038 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14039
14040         * s390-linux-nat.c (s390-tdep.h): New include.
14041         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
14042         (HFILES_NO_SRCDIR): Add s390-tdep.h.
14043         (ALLDEPFILES): Add s390-tdep.c.
14044         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
14045         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
14046         * s390-tdep.h: ...this.  New file.
14047         * s390-linux-tdep.c (s390-tdep.h): New include.
14048         (_initialize_s390_tdep): Rename to...
14049         (_initialize_s390_linux_tdep): ...this and adjust.
14050         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
14051         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
14052         s390-tdep.h.
14053         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
14054         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
14055         (s390_is_partial_instruction, s390_software_single_step)
14056         (is_non_branch_ril, s390_displaced_step_copy_insn)
14057         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
14058         (s390_prologue_data, s390_addr, s390_store, s390_load)
14059         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
14060         (s390_register_call_saved, s390_guess_tracepoint_registers)
14061         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
14062         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
14063         (s390_pseudo_register_name, s390_pseudo_register_type)
14064         (s390_pseudo_register_read, s390_pseudo_register_write)
14065         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
14066         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
14067         (s390_addr_bits_remove, s390_address_class_type_flags)
14068         (s390_address_class_type_flags_to_name)
14069         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
14070         (s390_function_arg_float, s390_function_arg_vector)
14071         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
14072         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
14073         (s390_frame_align, s390_register_return_value, s390_return_value)
14074         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
14075         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
14076         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
14077         (s390_trad_frame_prev_register, s390_unwind_cache)
14078         (s390_prologue_frame_unwind_cache)
14079         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
14080         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14081         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14082         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14083         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14084         (s390_frame_base_address, s390_local_base_address)
14085         (s390_frame_base, s390_gcc_target_options)
14086         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14087         (s390_validate_reg_range, s390_tdesc_valid)
14088         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14089         * s390-tdep.c: ...this.  New file.
14090
14091 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14092
14093         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14094         (s390_process_record, s390_gdbarch_tdep_alloc)
14095         (s390_linux_init_abi_any): Use/set new hook.
14096
14097 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14098
14099         * s390-linux-tdep.c (osabi.h): New include.
14100         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14101         (s390_linux_init_abi_any): New functions.
14102         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14103
14104 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14105
14106         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14107         tdesc_has_registers check
14108
14109 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14110
14111         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14112         (s390_validate_reg_range): New macro.
14113         (s390_gdbarch_init): Adjust.
14114
14115 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14116
14117         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14118         (s390_gdbarch_tdep_alloc): Adjust.
14119         (s390_gdbarch_init): Adjust.
14120
14121 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14122
14123         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14124         <have_tdb>: Change type to bool.
14125         (s390_gdbarch_tdep_alloc): Adjust.
14126         (s390_gdbarch_init): Adjust.
14127
14128 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14129
14130         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14131         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14132         (s390_gdbarch_tdep_alloc): New function.
14133         (s390_gdbarch_init): Allocate tdep at start and use its fields
14134         instead of separate variables.
14135
14136 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14137
14138         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14139         when looking for cached gdbarch and add comment for remaining.
14140
14141 2018-01-22  Pedro Alves  <palves@redhat.com>
14142             Sergio Durigan Junior  <sergiodj@redhat.com>
14143
14144         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14145         case.
14146
14147 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14148
14149         * MAINTAINERS: Update my company e-mail address.
14150
14151 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14152
14153         * regcache.c (cooked_write_test): New function.
14154         (_initialize_regcache): Register the test.
14155
14156 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14157
14158         * ia64-tdep.c (ia64_pseudo_register_read): Call
14159         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14160         * m32c-tdep.c (m32c_cat_read): Likewise.
14161         (m32c_r3r2r1r0_read): Likewise.
14162         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14163         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14164
14165 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14166
14167         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14168         method raw_read instead of regcache_raw_read.
14169         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14170         * arm-tdep.c (arm_neon_quad_read): Likewise.
14171         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14172         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14173         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14174         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14175         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14176         (i386_pseudo_register_read_into_value): Likewise.
14177         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14178         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14179         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14180         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14181         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14182         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14183         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14184         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14185         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14186
14187 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14188
14189         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14190         * configure.tgt: Remove target mt.
14191         * mt-tdep.c: Remove.
14192         * regcache.c (cooked_read_test): Remove the check for mt.
14193
14194 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14195
14196         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14197         instead of gdbarch_pseudo_register_read_value.
14198
14199 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14200
14201         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14202         language is Ada.
14203
14204 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14205
14206         * linespec.c (create_sals_line_offset): Remove code that preserved
14207         the symtab_and_line's line number.
14208
14209 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14210
14211         * varobj.c (varobj_create): Don't set valid_block when creating a
14212         floating varobj.
14213
14214 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14215
14216         * varobj.c (varobj_create): Remove out of date comment.
14217
14218 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14219
14220         PR mi/20395
14221         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14222         updating innermost block.
14223         * parse.c (innermost_block_tracker::update): Take extra type
14224         parameter, and check types match before updating innermost block.
14225         (write_dollar_variable): Update innermost block for registers.
14226         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14227         (innermost_block_tracker::innermost_block_tracker): Initialise
14228         m_types member.
14229         (innermost_block_tracker::reset): Take type parameter.
14230         (innermost_block_tracker::update): Take type parameter, and pass
14231         type through as needed.
14232         (innermost_block_tracker::m_types): New member.
14233         * varobj.c (varobj_create): Pass type when reseting innermost
14234         block.
14235
14236 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14237
14238         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14239         * ada-lang.c (resolve_subexp): Likewise.
14240         * breakpoint.c (set_breakpoint_condition) Likewise.
14241         (watch_command_1) Likewise.
14242         * c-exp.y (variable): Likewise.
14243         * d-exp.y (PrimaryExpression): Likewise.
14244         * f-exp.y (variable): Likewise.
14245         * go-exp.y (variable): Likewise.
14246         * m2-exp.y (variable): Likewise.
14247         * objfiles.c (objfile::~objfile): Likewise.
14248         * p-exp.y (variable): Likewise.
14249         * parse.c (innermost_block): Change type.
14250         * parser-defs.h (class innermost_block_tracker): New.
14251         (innermost_block): Change to innermost_block_tracker.
14252         * printcmd.c (display_command): Switch to innermost_block API.
14253         (do_one_display): Likewise.
14254         * rust-exp.y (do_one_display): Likewise.
14255         * symfile.c (clear_symtab_users): Likewise.
14256         * varobj.c (varobj_create): Switch to innermost_block API, replace
14257         use of innermost_block with block stored on varobj object.
14258
14259 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14260
14261         * expression.h (innermost_block): Remove declaration.
14262         * varobj.c: Add 'parser-defs.h' include.
14263
14264 2018-01-19  Tom Tromey  <tom@tromey.com>
14265
14266         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14267         symbols in the static and global blocks.
14268
14269 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14270
14271         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14272         gdb_ptrace.h, and move including gdb_wait.h ...
14273         * nat/linux-ptrace.h: ... to here.
14274
14275 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14276
14277         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14278         inf_ptrace_detach_success.
14279         (inf_ptrace_detach_success): Add inferior parameter, use it
14280         instead of inferior_ptid, pass it to detach_inferior.
14281         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14282         parameter.
14283         * inferior.c (detach_inferior): Add overload that takes an
14284         inferior object.
14285         * inferior.h (detach_inferior): Likewise.
14286         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14287         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14288         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14289
14290 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14291
14292         * target.h (struct target_ops) <to_detach>: Add inferior
14293         parameter.
14294         (target_detach): Likewise.
14295         * target.c (dispose_inferior): Pass inferior down.
14296         (target_detach): Pass inferior down.  Assert that it is equal to
14297         the current inferior.
14298         * aix-thread.c (aix_thread_detach): Pass inferior down.
14299         * corefile.c (core_file_command): Pass current_inferior() down.
14300         * corelow.c (core_detach): Add inferior parameter.
14301         * darwin-nat.c (darwin_detach): Likewise.
14302         * gnu-nat.c (gnu_detach): Likewise.
14303         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14304         * infcmd.c (detach_command): Pass current_inferior() down to
14305         target_detach.
14306         * infrun.c (follow_fork_inferior): Pass parent_inf to
14307         target_detach.
14308         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14309         target_detach.
14310         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14311         * linux-thread-db.c (thread_db_detach): Likewise.
14312         * nto-procfs.c (procfs_detach): Likewise.
14313         * procfs.c (procfs_detach): Likewise.
14314         * record.c (record_detach): Likewise.
14315         * record.h (struct inferior): Forward-declare.
14316         (record_detach): Add inferior parameter.
14317         * remote-sim.c (gdbsim_detach): Likewise.
14318         * remote.c (remote_detach_1): Likewise.
14319         (remote_detach): Likewise.
14320         (extended_remote_detach): Likewise.
14321         * sol-thread.c (sol_thread_detach): Likewise.
14322         * target-debug.h (target_debug_print_inferior_p): New macro.
14323         * target-delegates.c: Re-generate.
14324         * top.c (kill_or_detach): Pass inferior down to target_detach.
14325         * windows-nat.c (windows_detach): Add inferior parameter.
14326
14327 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14328
14329         * target.h (struct target_ops) <to_detach>: Remove args
14330         parameter.
14331         (target_detach): Likewise.
14332         * target.c (dispose_inferior): Adjust.
14333         (target_detach): Remove args parameter, adjust.
14334         * aix-thread.c (aix_thread_detach): Adjust.
14335         * corefile.c (core_file_command): Adjust.
14336         * corelow.c (core_detach): Adjust.
14337         * darwin-nat.c (darwin_detach): Adjust.
14338         * gnu-nat.c (gnu_detach): Adjust.
14339         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14340         * infcmd.c (detach_command): Adjust
14341         * infrun.c (follow_fork_inferior): Adjust.
14342         (handle_vfork_child_exec_or_exit): Adjust.
14343         * linux-fork.c (linux_fork_detach): Remove args parameter.
14344         * linux-fork.h (linux_fork_detach): Likewise.
14345         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14346         * linux-thread-db.c (thread_db_detach): Likewise.
14347         * nto-procfs.c (procfs_detach): Likewise.
14348         * procfs.c (procfs_detach): Likewise.
14349         (do_detach): Remove signo parameter.
14350         * record.c (record_detach): Remove args parameter.
14351         * record.h (record_detach): Likewise.
14352         * remote-sim.c (gdbsim_detach): Likewise.
14353         * remote.c (remote_detach_1): Likewise.
14354         (remote_detach): Likewise.
14355         (extended_remote_detach): Likewise.
14356         * sol-thread.c (sol_thread_detach): Likewise.
14357         * target-delegates.c: Re-generate.
14358         * top.c (struct qt_args) <args>: Remove field.
14359         (kill_or_detach): Don't pass args.
14360         (quit_force): Don't set args.
14361         * windows-nat.c (windows_detach): Remove args parameter.
14362
14363 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14364
14365         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14366         (arm_linux_init_abi): Install it.
14367
14368 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14369
14370         * osabi.c (gdb_osabi_names): Extend the regexp for
14371         arm-linux-gnueabihf.
14372
14373 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14374
14375         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14376         m_abbrevs.
14377         (abbrev_table::add_abbrev): Update.
14378         (abbrev_table::lookup_abbrev): Update.
14379
14380 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14381
14382         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14383
14384 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14385
14386         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14387         to "std::string".
14388
14389 2018-01-17  Tom Tromey  <tom@tromey.com>
14390
14391         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14392
14393 2018-01-17  Tom Tromey  <tom@tromey.com>
14394
14395         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14396         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14397         (create_array_type_with_stride): Update.
14398         * dwarf2read.c (set_die_type): Update.
14399
14400 2018-01-17  Tom Tromey  <tom@tromey.com>
14401
14402         * dwarf2read.c (delayed_method_info): Remove typedef.
14403         (dwarf2_cu::method_info): Now a std::vector.
14404         (add_to_method_list): Update.
14405         (free_delayed_list): Remove.
14406         (compute_delayed_physnames): Update.
14407         (process_full_comp_unit, process_full_type_unit): Clear the method
14408         list.  Remove cleanups.
14409         (psymtab_include_file_name): Add name_holder parameter.  Use
14410         unique_xmalloc_ptr.
14411         (dwarf_decode_lines): Update.
14412
14413 2018-01-17  Tom Tromey  <tom@tromey.com>
14414             Simon Marchi  <simon.marchi@ericsson.com>
14415
14416         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14417         (dwarf2_per_objfile::free_cached_comp_units)
14418         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14419         (init_cutu_and_read_dies_no_follow): Update.
14420         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14421         (dwarf2_cu::~dwarf2_cu): New.
14422         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14423         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14424
14425 2018-01-17  Tom Tromey  <tom@tromey.com>
14426             Simon Marchi  <simon.marchi@ericsson.com>
14427
14428         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14429         (struct die_reader_specs) <abbrev_table>: New member.
14430         (struct abbrev_table): Add constructor.
14431         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14432         <abbrev_obstack>: Now an auto_obstack.
14433         (abbrev_table_up): New typedef.
14434         (init_cu_die_reader): Add abbrev_table parameter.
14435         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14436         Add result_dwo_abbrev_table.
14437         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14438         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14439         Update.
14440         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14441         parameter.
14442         (skip_children): Update.
14443         (abbrev_table::alloc_abbrev): Rename from
14444         abbrev_table_alloc_abbrev.
14445         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14446         (abbrev_table::lookup_abbrev): Rename from
14447         abbrev_table_lookup_abbrev.
14448         (abbrev_table_read_table): Return abbrev_table_up.
14449         (abbrev_table_free, abbrev_table_free_cleanup)
14450         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14451         (load_partial_dies): Update.
14452
14453 2018-01-17  Tom Tromey  <tom@tromey.com>
14454
14455         * dwarf2read.c (dwarf2_compute_name): Update comment.
14456         (read_func_scope, read_variable): Update.
14457         (new_symbol): Remove.
14458         (new_symbol_full): Rename to new_symbol.
14459
14460 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14461
14462         PR gdb/16577
14463         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14464         a warning instead of throwing an error, set section size to 0 and return
14465         NULL.
14466         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14467
14468 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14469
14470         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14471         std::string.
14472         (linux_ptrace_attach_fail_reason_string): Likewise.
14473         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14474         Likewise.
14475         (linux_ptrace_attach_fail_reason_string): Likewise.
14476         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14477
14478 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14479
14480         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14481
14482 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14483
14484         PR gdb/21559
14485         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14486         checking for fs_base/gs_base fields in struct user_regs_struct.
14487         * configure: Regenerate.
14488
14489 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14490
14491         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14492         function.
14493         (aarch64_linux_init_abi): Install it to gdbarch hook
14494         gcc_target_options.
14495
14496 2018-01-15  Pedro Alves  <palves@redhat.com>
14497
14498         * common/signals-state-save-restore.c
14499         (save_original_signals_state): Fix typos.
14500
14501 2017-01-12  Tom Tromey  <tom@tromey.com>
14502             Sergio Durigan Junior  <sergiodj@redhat.com>
14503
14504         * Makefile.in (install-only): Install gdb-add-index.
14505
14506 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14507
14508         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14509
14510 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14511
14512         * infrun.c (keep_going_pass_signal): Clear step-over info when
14513         insert_breakpoints fails.
14514
14515 2018-01-11  Pedro Alves  <palves@redhat.com>
14516
14517         PR gdb/22583
14518         * infrun.c (resume): Rename to ...
14519         (resume_1): ... this.
14520         (resume): Reimplement as wrapper around resume_1.
14521
14522 2018-01-11  Pedro Alves  <palves@redhat.com>
14523
14524         PR remote/22597
14525         * remote.c (remote_parse_stop_reply): Default to the last-set
14526         general thread instead of to 'magic_null_ptid'.
14527
14528 2018-01-10  Pedro Alves  <palves@redhat.com>
14529
14530         * language.h (language_get_symbol_name_matcher): Rename ...
14531         (get_symbol_name_matcher): ... this.
14532         * language.c (language_get_symbol_name_matcher): Ditto.
14533         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14534         callers adjusted.
14535
14536 2018-01-10  Pedro Alves  <palves@redhat.com>
14537
14538         PR gdb/22670
14539         * dwarf2read.c
14540         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14541         Adjust to use language_get_symbol_name_matcher instead of
14542         language_defn::la_get_symbol_name_matcher.
14543         * language.c (language_get_symbol_name_matcher): If in Ada mode
14544         and the lookup name is a verbatim match, return Ada's matcher.
14545         * language.h (language_get_symbol_name_matcher): Adjust comment.
14546         (ada_lookup_name_info::verbatim_p):: New method.
14547
14548 2018-01-10  Pedro Alves  <palves@redhat.com>
14549
14550         PR gdb/22670
14551         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14552         minsym's language is language_auto or language_cplus, pass down
14553         language_ada instead.
14554         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14555
14556 2018-01-10  Pedro Alves  <palves@redhat.com>
14557
14558         PR gdb/22670
14559         * minsyms.c (linkage_name_str): New function.
14560         (iterate_over_minimal_symbols): Use it.
14561
14562 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14563
14564         * NEWS: Document that 'info proc' now works on FreeBSD.
14565
14566 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14567
14568         * configure.ac: Check for kinfo_getfile in libutil.
14569         * configure: Regenerate.
14570         * config.in: Regenerate.
14571         * fbsd-nat.c: Include "fbsd-tdep.h".
14572         (fbsd_fetch_cmdline): New.
14573         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14574         rather than calling error.
14575         (fbsd_info_proc): New.
14576         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14577         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14578         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14579
14580 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14581
14582         * fbsd-nat.c (struct free_deleter): Remove.
14583         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14584
14585 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14586
14587         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14588         NULL for an empty pathname.
14589
14590 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14591
14592         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14593         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14594         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14595         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14596         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14597         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14598         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14599         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14600         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14601         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14602         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14603         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14604         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14605         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14606         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14607
14608 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14609
14610         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14611         (gnu_xfer_auxv): New function.
14612         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14613         TARGET_OBJECT_AUXV.
14614
14615 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14616             Simon Marchi  <simon.marchi@ericsson.com>
14617
14618         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14619         common/selftest.c.
14620         (COMMON_OBS): Remove selftest.o.
14621         * configure.ac: Append selftest-arch.c and common/selftest.c to
14622         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14623         * configure: Re-generated.
14624         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14625         GDB_SELF_TEST.
14626         (maintenance_info_selftests): Likewise.
14627
14628 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14629
14630         * ada-valprint.c (val_print_packed_array_elements): Use
14631         proper number of elements when printing an array indexed
14632         by an enumeration type.
14633
14634 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14635
14636         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14637         (dw2_get_file_names_reader): Adjust.
14638         (lookup_dwo_signatured_type): Adjust.
14639         (lookup_dwp_signatured_type): Adjust.
14640         (lookup_signatured_type): Adjust.
14641         (create_type_unit_group): Adjust.
14642         (get_type_unit_group): Adjust.
14643         (process_psymtab_comp_unit_reader): Adjust.
14644         (build_type_psymtabs_reader): Adjust.
14645         (scan_partial_symbols): Adjust.
14646         (add_partial_symbol): Adjust.
14647         (add_partial_subprogram): Adjust.
14648         (peek_die_abbrev): Adjust.
14649         (fixup_go_packaging): Adjust.
14650         (process_imported_unit_die): Adjust.
14651         (dwarf2_compute_name): Adjust.
14652         (dwarf2_physname): Adjust.
14653         (read_import_statement): Adjust.
14654         (handle_DW_AT_stmt_list): Adjust.
14655         (read_file_scope): Adjust.
14656         (read_func_scope): Adjust.
14657         (read_lexical_block_scope): Adjust.
14658         (read_call_site_scope): Adjust.
14659         (read_variable): Adjust.
14660         (dwarf2_rnglists_process): Adjust.
14661         (dwarf2_ranges_process): Adjust.
14662         (dwarf2_ranges_read): Adjust.
14663         (dwarf2_get_pc_bounds): Adjust.
14664         (dwarf2_record_block_ranges): Adjust.
14665         (dwarf2_add_field): Adjust.
14666         (dwarf2_add_member_fn): Adjust.
14667         (read_structure_type): Adjust.
14668         (process_structure_scope): Adjust.
14669         (read_enumeration_type): Adjust.
14670         (read_array_type): Adjust.
14671         (mark_common_block_symbol_computed): Adjust.
14672         (read_common_block): Adjust.
14673         (read_namespace_type): Adjust.
14674         (read_namespace): Adjust.
14675         (read_module_type): Adjust.
14676         (read_tag_pointer_type): Adjust.
14677         (read_tag_ptr_to_member_type): Adjust.
14678         (read_tag_string_type): Adjust.
14679         (read_subroutine_type): Adjust.
14680         (read_typedef): Adjust.
14681         (read_base_type): Adjust.
14682         (attr_to_dynamic_prop): Adjust.
14683         (read_subrange_type): Adjust.
14684         (read_unspecified_type): Adjust.
14685         (dwarf2_read_abbrevs): Adjust.
14686         (load_partial_dies): Adjust.
14687         (read_partial_die): Adjust.
14688         (find_partial_die): Adjust.
14689         (guess_partial_die_structure_name): Adjust.
14690         (fixup_partial_die): Adjust.
14691         (read_attribute_value): Adjust.
14692         (read_addr_index): Adjust.
14693         (read_addr_index_from_leb128): Adjust.
14694         (read_str_index): Adjust.
14695         (dwarf2_string_attr): Adjust.
14696         (get_debug_line_section): Adjust.
14697         (dwarf_decode_line_header): Adjust.
14698         (lnp_state_machine::check_line_address): Adjust.
14699         (dwarf_decode_lines_1): Adjust.
14700         (dwarf_decode_lines): Adjust.
14701         (dwarf2_start_symtab): Adjust.
14702         (var_decode_location): Adjust.
14703         (new_symbol_full): Adjust.
14704         (dwarf2_const_value_data): Adjust.
14705         (dwarf2_const_value_attr): Adjust.
14706         (dwarf2_const_value): Adjust.
14707         (die_type): Adjust.
14708         (die_containing_type): Adjust.
14709         (build_error_marker_type): Adjust.
14710         (lookup_die_type): Adjust.
14711         (guess_full_die_structure_name): Adjust.
14712         (anonymous_struct_prefix): Adjust.
14713         (determine_prefix): Adjust.
14714         (dwarf2_name): Adjust.
14715         (follow_die_ref_or_sig): Adjust.
14716         (follow_die_offset): Adjust.
14717         (follow_die_ref): Adjust.
14718         (follow_die_sig_1): Adjust.
14719         (follow_die_sig): Adjust.
14720         (get_signatured_type): Adjust.
14721         (get_DW_AT_signature_type): Adjust.
14722         (decode_locdesc): Adjust.
14723         (dwarf_decode_macros): Adjust.
14724         (cu_debug_loc_section): Adjust.
14725         (fill_in_loclist_baton): Adjust.
14726         (dwarf2_symbol_mark_computed): Adjust.
14727         (init_one_comp_unit): Don't assign
14728         dwarf2_cu::dwarf2_per_objfile.
14729         (set_die_type): Adjust.
14730
14731 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14732
14733         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14734         <dwarf2_per_objfile>: New field.
14735         (dwarf2_per_objfile): Remove global.
14736         (get_dwarf2_per_objfile): New function.
14737         (set_dwarf2_per_objfile): New function.
14738         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14739         dwarf2_per_objfile.
14740         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14741         (read_abbrev_offset): Likewise.
14742         (read_indirect_string): Likewise.
14743         (read_indirect_line_string): Likewise.
14744         (read_indirect_string_at_offset): Likewise.
14745         (read_indirect_string_from_dwz): Likewise.
14746         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14747         dwarf2_per_objfile.
14748         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14749         (create_all_comp_units): Change objfile parameter to
14750         dwarf2_per_objfile.
14751         (create_all_type_units): Likewise.
14752         (process_queue): Add dwarf2_per_objfile parameter.
14753         (read_and_check_comp_unit_head): Likewise.
14754         (lookup_dwo_unit_in_dwp): Likewise.
14755         (get_dwp_file): Likewise.
14756         (process_cu_includes): Likewise.
14757         (struct free_dwo_file_cleanup_data): New struct.
14758         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14759         set_dwarf2_per_objfile.
14760         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14761         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14762         context, adjust calls.
14763         (dw2_instantiate_symtab): Likewise.
14764         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14765         (dw2_get_cu): Likewise.
14766         (create_cu_from_index_list): Change objfile parameter to
14767         dwarf2_per_objfile.
14768         (create_cus_from_index_list): Get dwarf2_per_objfile from
14769         context, adjust calls.
14770         (create_cus_from_index): Likewise.
14771         (create_signatured_type_table_from_index): Change objfile
14772         parameter to dwarf2_per_objfile.
14773         (create_signatured_type_table_from_debug_names): Change objfile
14774         parameter to dwarf2_per_objfile.
14775         (create_addrmap_from_index): Likewise.
14776         (create_addrmap_from_aranges): Likewise.
14777         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14778         (dw2_setup): Remove.
14779         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14780         context.
14781         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14782         get_dwarf2_per_objfile.
14783         (dw2_forget_cached_source_info): Likewise.
14784         (dw2_map_symtabs_matching_filename): Likewise.
14785         (struct dw2_symtab_iterator) <index>: Remove.
14786         <dwarf2_per_objfile>: New field.
14787         (dw2_symtab_iter_init): Replace index parameter with
14788         dwarf2_per_objfile.
14789         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14790         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14791         (dw2_print_stats): Likewise.
14792         (dw2_dump): Likewise.
14793         (dw2_expand_symtabs_for_function): Likewise.
14794         (dw2_expand_all_symtabs): Likewise.
14795         (dw2_expand_symtabs_with_fullname): Likewise.
14796         (dw2_expand_marked_cus): Replace index and objfile parameters
14797         with dwarf2_per_objfile.
14798         (dw_expand_symtabs_matching_file_matcher): Add
14799         dwarf2_per_objfile parameter and adjust calls.
14800         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14801         adjust calls.
14802         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14803         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14804         adjust calls.
14805         (create_cus_from_debug_names_list): Replace objfile parameter
14806         with dwarf2_per_objfile and adjust calls.
14807         (create_cus_from_debug_names): Likewise.
14808         (dwarf2_read_debug_names): Likewise.
14809         (mapped_debug_names::namei_to_name): Adjust call.
14810         (dw2_debug_names_iterator::next): Likewise.
14811         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14812         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14813         (dw2_debug_names_dump): Likewise.
14814         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14815         (dw2_debug_names_expand_symtabs_matching): Likewise.
14816         (dwarf2_initialize_objfile): Likewise.
14817         (dwarf2_build_psymtabs): Likewise.
14818         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14819         this_cu.
14820         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14821         (read_and_check_comp_unit_head): Likewise.
14822         (read_abbrev_offset): Likewise.
14823         (create_debug_type_hash_table): Likewise.
14824         (create_debug_types_hash_table): Likewise.
14825         (create_all_type_units): Replace objfile parameter with
14826         dwarf2_per_objfile.
14827         (add_type_unit): Add dwarf2_per_objfile parameter.
14828         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14829         with dwarf2_per_objfile.
14830         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14831         (lookup_dwp_signatured_type): Likewise.
14832         (lookup_signatured_type): Likewise.
14833         (read_cutu_die_from_dwo): Likewise.
14834         (init_tu_and_read_dwo_dies): Likewise.
14835         (init_cutu_and_read_dies): Likewise.
14836         (init_cutu_and_read_dies_no_follow): Likewise.
14837         (allocate_type_unit_groups_table): Add objfile parameter.
14838         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14839         (get_type_unit_group): Likewise.
14840         (process_psymtab_comp_unit): Update call.
14841         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14842         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14843         (print_tu_stats): Likewise.
14844         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14845         in void* parameter.
14846         (build_type_psymtabs): Change objfile parameter to
14847         dwarf2_per_objfile.
14848         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14849         passed in void* parameter.
14850         (process_skeletonless_type_units): Change objfile parameter to
14851         dwarf2_per_objfile.
14852         (set_partial_user): Likewise.
14853         (dwarf2_build_psymtabs_hard): Likewise.
14854         (read_comp_units_from_section): Likewise.
14855         (create_all_comp_units): Likewise.
14856         (scan_partial_symbols): Update calls.
14857         (add_partial_symbol): Likewise.
14858         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14859         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14860         (process_queue): Add dwarf2_per_objfile parameter.
14861         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14862         (compute_compunit_symtab_includes): Likewise.
14863         (process_cu_includes): Add dwarf2_per_objfile parameter.
14864         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14865         (process_full_type_unit): Likewise.
14866         (process_imported_unit_die): Update call.
14867         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14868         (read_file_scope): Likewise.
14869         (allocate_dwo_file_hash_table): Add objfile parameter.
14870         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14871         (create_cus_hash_table): Likewise.
14872         (create_dwp_hash_table): Likewise.
14873         (create_dwo_unit_in_dwp_v1): Likewise.
14874         (create_dwp_v2_section): Likewise.
14875         (create_dwo_unit_in_dwp_v2): Likewise.
14876         (lookup_dwo_unit_in_dwp): Likewise.
14877         (try_open_dwop_file): Likewise.
14878         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14879         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14880         cleanup to include a reference to dwarf2_per_objfile.
14881         (open_dwp_file): Add dwarf2_per_objfile parameter.
14882         (open_and_init_dwp_file): Likewise.
14883         (get_dwp_file): Likewise.
14884         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14885         (queue_and_load_all_dwo_tus): Update call.
14886         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14887         data.
14888         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14889         (dwarf2_ranges_process): Likewise.
14890         (dwarf2_get_pc_bounds): Likewise.
14891         (mark_common_block_symbol_computed): Likewise.
14892         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14893         (dwarf2_read_abbrevs): Update call.
14894         (read_partial_die): Use dwarf2_per_objfile from cu.
14895         (find_partial_die): Likewise.
14896         (fixup_partial_die): Likewise.
14897         (read_attribute_value): Likewise.
14898         (read_indirect_string_at_offset_from): Add objfile parameter.
14899         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14900         parameter.
14901         (read_indirect_string_from_dwz): Add objfile parameter.
14902         (read_indirect_string): Add objfile parameter.
14903         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14904         (read_addr_index): Use dwarf2_per_objfile from cu.
14905         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14906         call dw2_setup.
14907         (read_str_index): Use dwarf2_per_objfile from cu.
14908         (get_debug_line_section): Likewise.
14909         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14910         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14911         (new_symbol_full): Use dwarf2_per_objfile from cu.
14912         (build_error_marker_type): Likewise.
14913         (lookup_die_type): Likewise.
14914         (determine_prefix): Likewise.
14915         (follow_die_offset): Likewise.
14916         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14917         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14918         (dwarf2_fetch_die_type_sect_off): Likewise.
14919         (dwarf2_get_die_type): Likewise.
14920         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14921         (get_signatured_type): Likewise.
14922         (get_DW_AT_signature_type): Likewise.
14923         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14924         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14925         (cu_debug_loc_section): Likewise.
14926         (fill_in_loclist_baton): Likewise.
14927         (dwarf2_symbol_mark_computed): Likewise.
14928         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14929         dwarf2_per_objfile.
14930         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14931         parameter.
14932         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14933         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14934         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14935         (set_die_type): Use dwarf2_free_objfile from cu.
14936         (get_die_type_at_offset): Likewise.
14937         (dwarf2_per_objfile_free): Don't assign global variable.
14938         (debug_names) <constructor>: Add dwarf2_per_objfile
14939         parameter, update m_debugstrlookup construction.
14940         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14941         parameter.
14942         <m_dwarf2_per_objfile>: New field.
14943         <lookup>: Use m_dwarf2_per_objfile.
14944         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14945         (psyms_seen_size): Likewise.
14946         (write_gdbindex): Replace objfile parameter with
14947         dwarf2_per_objfile.
14948         (write_debug_names): Likewise.
14949         (write_psymtabs_to_index): Likewise.
14950         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14951         calls.
14952
14953 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14954
14955         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14956         <dwarf2_per_objfile>: New field.
14957         (struct dwarf2_per_cu_data) <objfile>: Remove.
14958         <dwarf2_per_objfile>: New field.
14959         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14960         of objfile.
14961         (create_signatured_type_table_from_index): Likewise.
14962         (create_debug_type_hash_table): Likewise.
14963         (fill_in_sig_entry_from_dwo_entry): Likewise.
14964         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14965         (create_type_unit_group): Assign dwarf2_per_objfile instead of
14966         objfile.
14967         (create_partial_symtab): Access objfile through
14968         dwarf2_per_objfile.
14969         (process_psymtab_comp_unit_reader): Likewise.
14970         (read_comp_units_from_section): Likewise.
14971         (scan_partial_symbols): Likewise.
14972         (add_partial_symbol): Likewise.
14973         (add_partial_subprogram): Likewise.
14974         (peek_die_abbrev): Likewise.
14975         (fixup_go_packaging): Likewise.
14976         (process_full_comp_unit): Likewise.
14977         (process_full_type_unit): Likewise.
14978         (process_imported_unit_die): Likewise.
14979         (dwarf2_compute_name): Likewise.
14980         (dwarf2_physname): Likewise.
14981         (read_import_statement): Likewise.
14982         (create_cus_hash_table): Assign dwarf2_physname instead of
14983         objfile.
14984         (read_func_scope): Access objfile through dwarf2_per_objfile.
14985         (read_lexical_block_scope): Likewise.
14986         (read_call_site_scope): Likewise.
14987         (read_variable): Likewise.
14988         (dwarf2_rnglists_process): Likewise.
14989         (dwarf2_ranges_process): Likewise.
14990         (dwarf2_ranges_read): Likewise.
14991         (dwarf2_record_block_ranges): Likewise.
14992         (dwarf2_add_field): Likewise.
14993         (dwarf2_add_member_fn): Likewise.
14994         (read_structure_type): Likewise.
14995         (process_structure_scope): Likewise.
14996         (read_enumeration_type): Likewise.
14997         (read_array_type): Likewise.
14998         (read_common_block): Likewise.
14999         (read_namespace_type): Likewise.
15000         (read_namespace): Likewise.
15001         (read_module_type): Likewise.
15002         (read_tag_pointer_type): Likewise.
15003         (read_tag_ptr_to_member_type): Likewise.
15004         (read_tag_string_type): Likewise.
15005         (read_subroutine_type): Likewise.
15006         (read_typedef): Likewise.
15007         (read_base_type): Likewise.
15008         (attr_to_dynamic_prop): Likewise.
15009         (read_subrange_type): Likewise.
15010         (read_unspecified_type): Likewise.
15011         (load_partial_dies): Likewise.
15012         (read_partial_die): Likewise.
15013         (find_partial_die): Likewise.
15014         (guess_partial_die_structure_name): Likewise.
15015         (fixup_partial_die): Likewise.
15016         (read_attribute_value): Likewise.
15017         (read_addr_index_from_leb128): Likewise.
15018         (dwarf2_read_addr_index): Likewise.
15019         (dwarf2_string_attr): Likewise.
15020         (lnp_state_machine::check_line_address): Likewise.
15021         (dwarf_decode_lines_1): Likewise.
15022         (dwarf_decode_lines): Likewise.
15023         (dwarf2_start_symtab): Likewise.
15024         (var_decode_location): Likewise.
15025         (new_symbol_full): Likewise.
15026         (dwarf2_const_value_data): Likewise.
15027         (dwarf2_const_value_attr): Likewise.
15028         (dwarf2_const_value): Likewise.
15029         (die_type): Likewise.
15030         (die_containing_type): Likewise.
15031         (lookup_die_type): Likewise.
15032         (guess_full_die_structure_name): Likewise.
15033         (anonymous_struct_prefix): Likewise.
15034         (dwarf2_name): Likewise.
15035         (follow_die_ref_or_sig): Likewise.
15036         (follow_die_offset): Likewise.
15037         (follow_die_ref): Likewise.
15038         (dwarf2_fetch_die_loc_sect_off): Likewise.
15039         (dwarf2_fetch_constant_bytes): Likewise.
15040         (dwarf2_fetch_die_type_sect_off): Likewise.
15041         (dwarf2_get_die_type): Likewise.
15042         (follow_die_sig): Likewise.
15043         (decode_locdesc): Likewise.
15044         (dwarf2_per_cu_objfile): Likewise.
15045         (dwarf2_per_cu_text_offset): Likewise.
15046         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
15047         objfile.
15048         (set_die_type): Access objfile through
15049         dwarf2_per_objfile.
15050
15051 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
15052
15053         * valprint.c (converted_character_d): Remove typedef.
15054         (DEF_VEC_O (converted_character_d)): Remove.
15055         (count_next_character): Use std::vector.
15056         (print_converted_chars_to_obstack): Likewise.
15057         (generic_printstr): Likewise.
15058
15059 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15060
15061         * xml-support.h (struct gdb_xml_value): Add constructor.
15062         <value>: Change type to unique_xmalloc_ptr.
15063         (gdb_xml_value_s): Remove typedef.
15064         (DEF_VEC_O (gdb_xml_value_s)): Remove.
15065         (gdb_xml_element_start_handler): Change parameter type to
15066         std::vector.
15067         (xml_find_attribute): Likewise.
15068         * xml-support.c (xml_find_attribute): Change parameter type to
15069         std::vector and adjust.
15070         (gdb_xml_values_cleanup): Remove.
15071         (gdb_xml_parser::start_element): Adjust to std::vector.
15072         (xinclude_start_include): Change paraeter type to std::vector
15073         and adjust.
15074         * btrace.c (check_xml_btrace_version): Likewise.
15075         (parse_xml_btrace_block): Likewise.
15076         (parse_xml_btrace_pt_config_cpu): Likewise.
15077         (parse_xml_btrace_pt): Likewise.
15078         (parse_xml_btrace_conf_bts): Likewise.
15079         (parse_xml_btrace_conf_pt): Likewise.
15080         * memory-map.c (memory_map_start_memory): Likewise.
15081         (memory_map_start_property): Likewise.
15082         * osdata.c (osdata_start_osdata): Likewise.
15083         (osdata_start_item): Likewise.
15084         (osdata_start_column): Likewise.
15085         * remote.c (start_thread): Likewise.
15086         * solib-aix.c (library_list_start_library): Likewise.
15087         (library_list_start_list): Likewise.
15088         * solib-svr4.c (library_list_start_library): Likewise.
15089         (svr4_library_list_start_list): Likewise.
15090         * solib-target.c (library_list_start_segment): Likewise.
15091         (library_list_start_section): Likewise.
15092         (library_list_start_library): Likewise.
15093         (library_list_start_list): Likewise.
15094         * tracepoint.c (traceframe_info_start_memory): Likewise.
15095         (traceframe_info_start_tvar): Likewise.
15096         * xml-syscall.c (syscall_start_syscall): Likewise.
15097         * xml-tdesc.c (tdesc_start_target): Likewise.
15098         (tdesc_start_feature): Likewise.
15099         (tdesc_start_reg): Likewise.
15100         (tdesc_start_union): Likewise.
15101         (tdesc_start_struct): Likewise.
15102         (tdesc_start_flags): Likewise.
15103         (tdesc_start_enum): Likewise.
15104         (tdesc_start_field): Likewise.
15105         (tdesc_start_enum_value): Likewise.
15106         (tdesc_start_vector): Likewise.
15107
15108 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15109
15110         * extension.h (struct xmethod_worker) <clone>: Remove.
15111         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15112         Remove.
15113         (python_xmethod_worker::clone): Remove.
15114         * valops.c (find_overload_match): Use std::move instead of
15115         clone.
15116
15117 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15118
15119         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15120         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15121         <free_xmethod_worker_data>: Remove.
15122         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15123         <get_xmethod_arg_types>: Remove.
15124         <get_xmethod_result_type>: Remove.
15125         <invoke_xmethod>: Remove.
15126         * extension.c (new_xmethod_worker): Remove.
15127         (clone_xmethod_worker): Remove.
15128         (get_matching_xmethod_workers): Return void, pass std::vector by
15129         pointer.
15130         (get_xmethod_arg_types): Rename to...
15131         (xmethod_worker::get_arg_types): ... this, and adjust.
15132         (get_xmethod_result_type): Rename to...
15133         (xmethod_worker::get_result_type): ... this, and adjust.
15134         (invoke_xmethod): Remove.
15135         (free_xmethod_worker): Remove.
15136         (free_xmethod_worker_vec): Remove.
15137         * extension.h (enum ext_lang_rc): Move here from
15138         extension-priv.h.
15139         (struct xmethod_worker): Add constructor and destructor.
15140         <data>: Remove.
15141         <value>: Remove.
15142         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15143         virtual pure methods.
15144         <get_arg_types, get_result_type>: New methods.
15145         (xmethod_worker_ptr): Remove typedef.
15146         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15147         (xmethod_worker_vec): Remove typedef.
15148         (xmethod_worker_up): New typedef.
15149         (invoke_xmethod): Remove.
15150         (clone_xmethod_worker): Remove.
15151         (free_xmethod_worker): Remove.
15152         (free_xmethod_worker_vec): Remove.
15153         (get_xmethod_arg_types): Remove.
15154         (get_xmethod_result_type): Remove.
15155         * valops.c (find_method_list): Use std::vector, don't use
15156         intermediate vector.
15157         (value_find_oload_method_list): Use std::vector.
15158         (find_overload_match): Use std::vector.
15159         (find_oload_champ): Use std::vector.
15160         * value.c (value_free): Use operator delete.
15161         (value_of_xmethod): Rename to...
15162         (value_from_xmethod): ... this.  Don't assign
15163         xmethod_worker::value, take rvalue-reference.
15164         (result_type_of_xmethod): Adjust.
15165         (call_xmethod): Adjust.
15166         * value.h: Include extension.h.
15167         (struct xmethod_worker): Don't forward-declare.
15168         (value_of_xmethod): Rename to...
15169         (value_from_xmethod): ... this, take rvalue-reference.
15170         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15171         (struct python_xmethod_worker): ... this, add constructor and
15172         destructor.
15173         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15174         (gdbpy_free_xmethod_worker_data): Rename to...
15175         (python_xmethod_worker::~python_xmethod_worker): ... this and
15176         adjust.
15177         (gdbpy_clone_xmethod_worker_data): Rename to...
15178         (python_xmethod_worker::clone): ... this and adjust.
15179         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15180         temporary vector.
15181         (gdbpy_get_xmethod_arg_types): Rename to...
15182         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15183         (gdbpy_get_xmethod_result_type): Rename to...
15184         (python_xmethod_worker::do_get_result_type): ... this and
15185         adjust.
15186         (gdbpy_invoke_xmethod): Rename to...
15187         (python_xmethod_worker::invoke): ... this and adjust.
15188         (new_python_xmethod_worker): Rename to...
15189         (python_xmethod_worker::python_xmethod_worker): ... this and
15190         adjust.
15191         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15192         Remove.
15193         (gdbpy_free_xmethod_worker_data): Remove.
15194         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15195         (gdbpy_get_xmethod_arg_types): Remove.
15196         (gdbpy_get_xmethod_result_type): Remove.
15197         (gdbpy_invoke_xmethod): Remove.
15198         * python/python.c (python_extension_ops): Remove obsolete
15199         callbacks.
15200
15201 2018-01-05  Pedro Alves  <palves@redhat.com>
15202
15203         PR gdb/18653
15204         * common/signals-state-save-restore.c
15205         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15206         find a custom handler preinstalled, instead of internal erroring.
15207         But only warn if !quiet.
15208         * common/signals-state-save-restore.h
15209         (save_original_signals_state): New parameter 'quiet'.
15210         * main.c (captured_main_1): Move save_original_signals_state call
15211         after option handling, and pass QUIET.
15212
15213 2018-01-05  Pedro Alves  <palves@redhat.com>
15214
15215         * spu-tdep.c (spu_catch_start): Pass
15216         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15217
15218 2018-01-05  Pedro Alves  <palves@redhat.com>
15219
15220         PR gdb/22670
15221         * ada-lang.c (literal_symbol_name_matcher): New function.
15222         (ada_get_symbol_name_matcher): Use it for
15223         symbol_name_match_type::SEARCH_NAME.
15224         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15225         it down instead of assuming symbol_name_match_type::FULL.
15226         * block.h (block_lookup_symbol): New parameter 'match_type'.
15227         * c-valprint.c (print_unpacked_pointer): Use
15228         lookup_symbol_search_name instead of lookup_symbol.
15229         * compile/compile-object-load.c (get_out_value_type): Pass down
15230         symbol_name_match_type::SEARCH_NAME.
15231         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15232         symbol_name_match_type::FULL.
15233         * cp-support.c (cp_get_symbol_name_matcher): Handle
15234         symbol_name_match_type::SEARCH_NAME.
15235         * infrun.c (insert_exception_resume_breakpoint): Use
15236         lookup_symbol_search_name.
15237         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15238         * psymtab.c (maintenance_check_psymtabs): Use
15239         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15240         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15241         SYMBOL_SEARCH_NAME.
15242         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15243         if symbol_name_match_type::SEARCH_NAME.
15244         (lookup_symbol_in_language): Pass down
15245         symbol_name_match_type::FULL.
15246         (lookup_symbol_search_name): New.
15247         (lookup_language_this): Pass down
15248         symbol_name_match_type::SEARCH_NAME.
15249         (lookup_symbol_aux, lookup_local_symbol): New parameter
15250         'match_type'.  Pass it down.
15251         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15252         (lookup_symbol_search_name): New declaration.
15253         (lookup_symbol_in_block): New 'match_type' parameter.
15254
15255 2018-01-05  Pedro Alves  <palves@redhat.com>
15256
15257         PR gdb/22670
15258         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15259         ada_lookup_symbol.
15260         (ada_lookup_symbol): Reimplement in terms of
15261         ada_lookup_symbol_list, bits factored out from
15262         ada_lookup_encoded_symbol.
15263
15264 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15265
15266         * ada-exp.y (write_object_renaming): When subscripting an array
15267         using a symbol as the index, pass the block in call to
15268         ada_lookup_encoded_symbol when looking that symbol up.
15269
15270 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15271
15272         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15273         TYPE_INDEX_TYPE.
15274
15275 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15276
15277         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15278         the case where VALUE_LVAL (val0) is not lval_memory.
15279
15280 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15281
15282         * ada-valprint.c (print_optional_low_bound): Handle
15283         character-indexed array printing like boolean-indexed array
15284         printing.
15285
15286 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15287
15288         * NEWS: Create a new section for the next release branch.
15289         Rename the section of the current branch, now that it has
15290         been cut.
15291
15292 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15293
15294         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15295         * version.in: Bump version to 8.1.50.DATE-git.
15296
15297 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15298
15299         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15300         Add field.
15301         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15302         Add field.
15303         (default_exception_support_info) <catch_handlers_sym>: Add field.
15304         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15305         (ada_exception_name_addr_1): Add "catch handlers" handling.
15306         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15307         Update all callers.
15308         (create_excep_cond_exprs) <ex>: Add parameter.
15309         (re_set_exception): Update create_excep_cond_exprs call.
15310         (print_it_exception, print_one_exception, print_mention_exception)
15311         (print_recreate_exception): Add "catch handler" handling.
15312         (allocate_location_catch_handlers, re_set_catch_handlers)
15313         (check_status_catch_handlers, print_it_catch_handlers)
15314         (print_one_catch_handlers, print_mention_catch_handlers)
15315         (print_recreate_catch_handlers): New function.
15316         (catch_handlers_breakpoint_ops): New variable.
15317         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15318         Add parameter.  Add "catch handler" handling.
15319         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15320         Add "catch handler" handling.
15321         (ada_exception_catchpoint_cond_string): Add "catch handler"
15322         handling.
15323         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15324         call.
15325         (catch_ada_handlers_command): New function.
15326         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15327         operations structure.
15328         (_initialize_ada_language): Add "catch handlers" command entry.
15329         * NEWS: Document "catch handlers" feature.
15330
15331 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15332
15333         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15334         account when creating the array type of the slice.
15335         (ada_value_slice): Likewise.
15336
15337 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15338
15339         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15340         New enum value.
15341         (create_array_type_with_stride): Add byte_stride_prop parameter.
15342         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15343         New parameter.  Update all callers in this file.
15344         (array_type_has_dynamic_stride): New function.
15345         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15346         of arrays with dynamic byte strides.
15347         * dwarf2read.c (read_array_type): Add support for dynamic
15348         DW_AT_byte_stride attributes.
15349
15350 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15351
15352         * dwarf2read.c (read_unspecified_type): Treat
15353         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15354
15355 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15356
15357         Update copyright year range in all GDB files.
15358
15359 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15360
15361         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15362         and gdb/testsuite/gdb.base/step-line.c.
15363
15364 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15365
15366         * copyright.py (main): Dump the contents of
15367         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15368         even if BY_HAND is empty.
15369
15370 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15371
15372         * top.c (print_gdb_version): Update Copyright year in version
15373         message.
15374
15375 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15376
15377         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15378
15379 For older changes see ChangeLog-2017.
15380 \f
15381 Local Variables:
15382 mode: change-log
15383 left-margin: 8
15384 fill-column: 74
15385 version-control: never
15386 coding: utf-8
15387 End: