Announce changes in NEWS to info [args|functions|locals|variables]
[external/binutils.git] / gdb / ChangeLog
1 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
2
3         * NEWS: Mention changes to 'info [args|functions|locals|variables]'
4
5 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6
7         * stack.c (print_variable_and_value_data): Add preg and treg.
8         (print_frame_local_vars): Add quiet, regexp and t_regexp arguments,
9         and update callers.
10         (print_frame_arg_vars): Likewise.
11         (prepare_reg): New function.
12         (info_locals_command): Extract info print args and use them.
13         (info_args_command): Likewise.
14         (_initialize_stack): Modify on-line help.
15         * symtab.c (treg_matches_sym_type_name): New function.
16         (search_symbols): New arg t_regexp.
17         (symtab_symbol_info): New args quiet, regexp, t_regexp.
18         (info_variables_command): Extract info print args and use them.
19         (info_functions_command): Likewise.
20         (info_types_command): Update call to symtab_symbol_info.
21         (_initialize_symtab): Modify on-line help.
22         * symtab.h (treg_matches_sym_type_name): New function.
23         (search_symbols): New t_regexp arg.
24
25 2018-10-27  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
26
27         * cli-utils.c (extract_arg_maybe_quoted): New function.
28         (extract_info_print_args): New function.
29         (info_print_args_help): New function.
30         (report_unrecognized_option_error): New function.
31         * cli-utils.h (extract_arg_maybe_quoted): New function.
32         (extract_info_print_args): New function.
33         (info_print_args_help): New function.
34         (report_unrecognized_option_error): New function.
35
36 2018-10-26  Tom Tromey  <tom@tromey.com>
37
38         * dwarf2read.c (recursively_compute_inclusions): Use std::vector.
39         (compute_compunit_symtab_includes): Update.
40         * symtab.h: (symtab_ptr): Remove typedef.  Don't define a VEC.
41         (compunit_symtab_ptr): Likewise.
42
43 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
44
45         * fbsd-tdep.c (fbsd_print_auxv_entry): Only use
46         default_print_auxv_entry for specific tag values.
47
48 2018-10-26  John Baldwin  <jhb@FreeBSD.org>
49
50         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_FREEBSD_HWCAP2.
51
52 2018-10-26  Jim Wilson  <jimw@sifive.com>
53
54         * riscv-linux-tdep.c: Include tramp-frame.h and trad-frame.h.
55         (riscv_linux_sigframe_init): Declare.
56         (RISCV_INST_LI_A7_SIGRETURN, RISCV_INT_ECALL): New.
57         (riscv_linux_sigframe): New.
58         (SIGFRAME_SIGINFO_SIZE, UCONTEXT_MCONTEXT_OFFSET): New.
59         (riscv_linux_sigframe_init): Define.
60         (riscv_linux_init_abi): Call tramp_frame_prepend_unwinder.
61
62         * riscv-tdep.c (riscv_isa_xlen): Refer to riscv-tdep.h comment.
63         (riscv_isa_flen): Likewise.  Drop static.
64         * riscv-tdep.h (riscv_isa_xlen): Move riscv-tdep.c comment to here.
65         (riscv_isa_flen): Likewise.  Declare.
66
67 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
68             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
69
70         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_htm_vsx32l)
71         (tdesc_powerpc_isa207_htm_vsx64l): Declare.
72         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TM_SPRREGSET)
73         (PPC32_LINUX_SIZEOF_CGPRREGSET, PPC64_LINUX_SIZEOF_CGPRREGSET)
74         (PPC_LINUX_SIZEOF_CFPRREGSET, PPC_LINUX_SIZEOF_CVMXREGSET)
75         (PPC_LINUX_SIZEOF_CVSXREGSET, PPC_LINUX_SIZEOF_CPPRREGSET)
76         (PPC_LINUX_SIZEOF_CDSCRREGSET, PPC_LINUX_SIZEOF_CTARREGSET):
77         Define.
78         (struct ppc_linux_features) <htm>: New field.
79         (ppc_linux_no_features): Add initializer for htm field.
80         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
81         new tdescs.
82         * nat/ppc-linux.h (PPC_FEATURE2_HTM, NT_PPC_TM_CGPR)
83         (NT_PPC_TM_CFPR, NT_PPC_TM_CVMX, NT_PPC_TM_CVSX)
84         (NT_PPC_TM_SPR, NT_PPC_TM_CTAR, NT_PPC_TM_CPPR, NT_PPC_TM_CDSCR):
85         Define if not already defined.
86         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-htm-vsx32l
87         and rs6000/powerpc-isa207-htm-vsx64l.
88         (XMLTOC): Add rs6000/powerpc-isa207-htm-vsx32l.xml and
89         rs6000/powerpc-isa207-htm-vsx64l.xml.
90         * features/rs6000/power-htm-spr.xml: New file.
91         * features/rs6000/power-htm-core.xml: New file.
92         * features/rs6000/power64-htm-core.xml: New file.
93         * features/rs6000/power-htm-fpu.xml: New file.
94         * features/rs6000/power-htm-altivec.xml: New file.
95         * features/rs6000/power-htm-vsx.xml: New file.
96         * features/rs6000/power-htm-ppr.xml: New file.
97         * features/rs6000/power-htm-dscr.xml: New file.
98         * features/rs6000/power-htm-tar.xml: New file.
99         * features/rs6000/powerpc-isa207-htm-vsx32l.xml: New file.
100         * features/rs6000/powerpc-isa207-htm-vsx64l.xml: New file.
101         * features/rs6000/powerpc-isa207-htm-vsx32l.c: Generate.
102         * features/rs6000/powerpc-isa207-htm-vsx64l.c: Generate.
103         * regformats/rs6000/powerpc-isa207-htm-vsx32l.dat: Generate.
104         * regformats/rs6000/powerpc-isa207-htm-vsx64l.dat: Generate.
105         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
106         fetch_regset with HTM regsets.
107         (store_register, store_ppc_registers): Call store_regset with HTM
108         regsets.
109         (ppc_linux_nat_target::read_description): Set htm field in the
110         features struct if needed.
111         * ppc-linux-tdep.c: Include
112         features/rs6000/powerpc-isa207-htm-vsx32l.c and
113         features/rs6000/powerpc-isa207-htm-vsx64l.c.
114         (ppc32_regmap_tm_spr, ppc32_regmap_cgpr, ppc64_le_regmap_cgpr)
115         (ppc64_be_regmap_cgpr, ppc32_regmap_cfpr, ppc32_le_regmap_cvmx)
116         (ppc32_be_regmap_cvmx, ppc32_regmap_cvsx, ppc32_regmap_cppr)
117         (ppc32_regmap_cdscr, ppc32_regmap_ctar): New globals.
118         (ppc32_linux_tm_sprregset, ppc32_linux_cgprregset)
119         (ppc64_be_linux_cgprregset, ppc64_le_linux_cgprregset)
120         (ppc32_linux_cfprregset, ppc32_le_linux_cvmxregset)
121         (ppc32_be_linux_cvmxregset, ppc32_linux_cvsxregset)
122         (ppc32_linux_cpprregset, ppc32_linux_cdscrregset)
123         (ppc32_linux_ctarregset): New globals.
124         (ppc_linux_cgprregset, ppc_linux_cvmxregset): New functions.
125         (ppc_linux_collect_core_cpgrregset): New function.
126         (ppc_linux_iterate_over_regset_sections): Call back with the htm
127         regsets.
128         (ppc_linux_core_read_description): Check if the tm spr section is
129         present and set htm in the features struct.
130         (_initialize_ppc_linux_tdep): Call
131         initialize_tdesc_powerpc_isa207_htm_vsx32l and
132         initialize_tdesc_powerpc_isa207_htm_vsx64l.
133         * ppc-linux-tdep.h (ppc_linux_cgprregset, ppc_linux_cvmxregset):
134         Declare.
135         (ppc32_linux_tm_sprregset, ppc32_linux_cfprregset)
136         (ppc32_linux_cvsxregset, ppc32_linux_cpprregset)
137         (ppc32_linux_cdscrregset, ppc32_linux_ctarregset): Declare.
138         * ppc-tdep.h (struct gdbarch_tdep) <have_htm_spr, have_htm_core>:
139         New fields.
140         <have_htm_fpu, have_htm_altivec, have_htm_vsx>:
141         Likewise.
142         <ppc_cppr_regnum, ppc_cdscr_regnum, ppc_ctar_regnum>: Likewise.
143         <ppc_cdl0_regnum, ppc_cvsr0_regnum, ppc_cefpr0_regnum>: Likewise.
144         (enum) <PPC_TFHAR_REGNUM, PPC_TEXASR_REGNUM, PPC_TFIAR_REGNUM>:
145         New enum fields.
146         <PPC_CR0_REGNUM, PPC_CCR_REGNUM, PPC_CXER_REGNUM>: Likewise.
147         <PPC_CLR_REGNUM, PPC_CCTR_REGNUM, PPC_CF0_REGNUM>: Likewise.
148         <PPC_CFPSCR_REGNUM, PPC_CVR0_REGNUM, PPC_CVSCR_REGNUM>: Likewise.
149         <PPC_CVRSAVE_REGNUM, PPC_CVSR0_UPPER_REGNUM>: Likewise.
150         <PPC_CPPR_REGNUM, PPC_CDSCR_REGNUM>: Likewise.
151         <PPC_CTAR_REGNUM>: Likewise.
152         (PPC_IS_TMSPR_REGNUM, PPC_IS_CKPTGP_REGNUM, PPC_IS_CKPTFP_REGNUM)
153         (PPC_IS_CKPTVMX_REGNUM, PPC_IS_CKPTVSX_REGNUM): Define.
154         * rs6000-tdep.c (IS_CDFP_PSEUDOREG, IS_CVSX_PSEUDOREG)
155         (IS_CEFP_PSEUDOREG): Define.
156         (rs6000_register_name): Hide the upper halves of checkpointed VSX
157         registers.  Return names for the checkpointed DFP, VSX, and EFP
158         pseudo registers.
159         (rs6000_pseudo_register_type): Remove initial assert and raise an
160         internal error in the else clause instead.  Return types for the
161         checkpointed DFP, VSX, and EFP pseudo registers.
162         (dfp_pseudo_register_read, dfp_pseudo_register_write): Handle
163         checkpointed DFP pseudo registers.
164         (vsx_pseudo_register_read, vsx_pseudo_register_write): Handle
165         checkpointed VSX pseudo registers.
166         (efp_pseudo_register_read, efp_pseudo_register_write): Rename
167         from efpr_pseudo_register_read and
168         efpr_pseudo_register_write.  Handle checkpointed EFP pseudo
169         registers.
170         (rs6000_pseudo_register_read, rs6000_pseudo_register_write):
171         Handle checkpointed DFP, VSX, and EFP registers.
172         (dfp_ax_pseudo_register_collect, vsx_ax_pseudo_register_collect)
173         (efp_ax_pseudo_register_collect): New functions.
174         (rs6000_ax_pseudo_register_collect): Move DFP, VSX and EFP pseudo
175         register logic to new functions.  Handle checkpointed DFP, VSX,
176         and EFP pseudo registers.
177         (rs6000_gdbarch_init): Look for and validate the htm features.
178         Include checkpointed DFP, VSX and EFP pseudo-registers.
179         * NEWS: Mention access to PPR, DSCR, TAR, EBB/PMU registers and
180         HTM registers.
181
182 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
183
184         * rs6000-tdep.c (rs6000_gdbarch_init): Reject tdescs with vsx but
185         without altivec or fpu.
186
187 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
188             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
189
190         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_EBBREGSET)
191         (PPC_LINUX_SIZEOF_PMUREGSET): Declare.
192         * nat/ppc-linux.h (PPC_FEATURE2_EBB, NT_PPC_EBB, NT_PPC_PMU):
193         Define if not already defined.
194         * features/rs6000/power-ebb.xml: New file.
195         * features/rs6000/power-linux-pmu.xml: New file.
196         * features/rs6000/powerpc-isa207-vsx32l.xml: Include ebb and pmu
197         features.
198         * features/rs6000/powerpc-isa207-vsx64l.xml: Likewise.
199         * features/rs6000/powerpc-isa207-vsx32l.c: Re-generate.
200         * features/rs6000/powerpc-isa207-vsx64l.c: Re-generate.
201         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Re-generate.
202         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Re-generate.
203         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
204         fetch_regset with ebb and pmu regsets.
205         (store_register, store_ppc_registers): Call store_regset with ebb
206         and pmu regsets.
207         (ppc_linux_nat_target::read_description): Set isa207 field in the
208         features struct if ebb and pmu are avaiable.
209         * ppc-linux-tdep.c (ppc32_regmap_ebb, ppc32_regmap_pmu)
210         (ppc32_linux_ebbregset, ppc32_linux_pmuregset): New globals.
211         (ppc_linux_iterate_over_regset_sections): Call back with the ebb
212         and pmu regsets.
213         (ppc_linux_core_read_description): Check if the pmu section is
214         present and set isa207 in the features struct.
215         * ppc-linux-tdep.h (ppc32_linux_ebbregset)
216         (ppc32_linux_pmuregset): Declare.
217         * ppc-tdep.h (struct gdbarch_tdep) <ppc_mmcr0_regnum>: New field.
218         <ppc_mmcr2_regnum, ppc_siar_regnum, ppc_sdar_regnum>: New fields.
219         <ppc_sier_regnum>: New field.
220         (enum): <PPC_BESCR_REGNUM, PPC_EBBHR_REGNUM, PPC_EBBRR_REGNUM>:
221         New enum values.
222         <PPC_MMCR0_REGNUM, PPC_MMCR2_REGNUM, PPC_SIAR_REGNUM>: New enum
223         values.
224         <PPC_SDAR_REGNUM, PPC_SIER_REGNUM>: New enum values.
225         (PPC_IS_EBB_REGNUM, PPC_IS_PMU_REGNUM): Define.
226         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate the
227         ebb and pmu features.
228
229 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
230             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
231
232         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa207_vsx32l)
233         (tdesc_powerpc_isa207_vsx64l): Declare.
234         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_TARREGSET): Define.
235         (struct ppc_linux_features) <isa207>: New field.
236         (ppc_linux_no_features): Add initializer for isa207 field.
237         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
238         new tdescs.
239         * nat/ppc-linux.h (PPC_FEATURE2_ARCH_2_07, PPC_FEATURE2_TAR)
240         (NT_PPC_TAR): Define if not already defined.
241         * features/Makefile (WHICH): Add rs6000/powerpc-isa207-vsx32l and
242         rs6000/powerpc-isa207-vsx64l.
243         (XMLTOC): Add rs6000/powerpc-isa207-vsx32l.xml and
244         rs6000/powerpc-isa207-vsx64l.xml.
245         * features/rs6000/power-tar.xml: New file.
246         * features/rs6000/powerpc-isa207-vsx32l.xml: New file.
247         * features/rs6000/powerpc-isa207-vsx64l.xml: New file.
248         * features/rs6000/powerpc-isa207-vsx32l.c: Generate.
249         * features/rs6000/powerpc-isa207-vsx64l.c: Generate.
250         * regformats/rs6000/powerpc-isa207-vsx32l.dat: Generate.
251         * regformats/rs6000/powerpc-isa207-vsx64l.dat: Generate.
252         * ppc-linux-nat.c (fetch_register, fetch_ppc_registers): Call
253         fetch_regset with the TAR regset.
254         (store_register, store_ppc_registers): Call store_regset with the
255         TAR regset.
256         (ppc_linux_nat_target::read_description): Set isa207 field in the
257         features struct if needed.
258         * ppc-linux-tdep.c: Include
259         features/rs6000/powerpc-isa207-vsx32l.c and
260         features/rs6000/powerpc-isa207-vsx64l.c.
261         (ppc32_regmap_tar, ppc32_linux_tarregset): New globals.
262         (ppc_linux_iterate_over_regset_sections): Call back with the tar
263         regset.
264         (ppc_linux_core_read_description): Check if the tar section is
265         present and set isa207 in the features struct.
266         (_initialize_ppc_linux_tdep): Call
267         initialize_tdesc_powerpc_isa207_vsx32l and
268         initialize_tdesc_powerpc_isa207_vsx64l.
269         * ppc-linux-tdep.h (ppc32_linux_tarregset): Declare.
270         * ppc-tdep.h (gdbarch_tdep) <ppc_tar_regnum>: New field.
271         (enum) <PPC_TAR_REGNUM>: New enum value.
272         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate tar
273         feature.
274         (ppc_process_record_op31): Record changes to TAR.
275
276 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
277             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
278
279         * arch/ppc-linux-tdesc.h (tdesc_powerpc_isa205_ppr_dscr_vsx32l)
280         (tdesc_powerpc_isa205_ppr_dscr_vsx64l): Declare.
281         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_PPRREGSET)
282         (PPC_LINUX_SIZEOF_DSCRREGSET): Define.
283         (struct ppc_linux_features) <ppr_dscr>: New field.
284         (ppc_linux_no_features): Add initializer for ppr_dscr field.
285         * arch/ppc-linux-common.c (ppc_linux_match_description): Return
286         new tdescs.
287         * nat/ppc-linux.h (PPC_FEATURE2_DSCR, NT_PPC_PPR, NT_PPC_DSCR):
288         Define if not already defined.
289         * features/Makefile (WHICH): Add
290         rs6000/powerpc-isa205-ppr-dscr-vsx32l and
291         rs6000/powerpc-isa205-ppr-dscr-vsx64l.
292         (XMLTOC): Add rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
293         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml.
294         * features/rs6000/power-dscr.xml: New file.
295         * features/rs6000/power-ppr.xml: New file.
296         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml: New file.
297         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml: New file.
298         * features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c: Generate.
299         * features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c: Generate.
300         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx32l.dat: Generate.
301         * regformats/rs6000/powerpc-isa205-ppr-dscr-vsx64l.dat: Generate.
302         * ppc-linux-nat.c: Include <sys/uio.h>.
303         (fetch_regset, store_regset, check_regset): New functions.
304         (fetch_register, fetch_ppc_registers): Call fetch_regset with
305         DSCR and PPR regsets.
306         (store_register, store_ppc_registers): Call store_regset with
307         DSCR and PPR regsets.
308         (ppc_linux_get_hwcap2): New function.
309         (ppc_linux_nat_target::read_description): Call
310         ppc_linux_get_hwcap2 and check_regset, set ppr_dscr field in the
311         features struct if needed.
312         * ppc-linux-tdep.c: Include
313         features/rs6000/powerpc-isa205-ppr-dscr-vsx32l.c and
314         features/rs6000/powerpc-isa205-ppr-dscr-vsx64l.c.
315         (ppc32_regmap_ppr, ppc32_regmap_dscr, ppc32_linux_pprregset)
316         (ppc32_linux_dscrregset): New globals.
317         (ppc_linux_iterate_over_regset_sections): Call back with the ppr
318         and dscr regsets.
319         (ppc_linux_core_read_description): Check if the ppr and dscr
320         sections are present and set ppr_dscr in the features struct.
321         (_initialize_ppc_linux_tdep): Call
322         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx32l and
323         initialize_tdesc_powerpc_isa205_ppr_dscr_vsx64l.
324         * ppc-linux-tdep.h (ppc32_linux_pprregset)
325         (ppc32_linux_dscrregset): Declare.
326         * ppc-tdep.h (struct gdbarch_tdep) <ppc_ppr_regnum>: New field.
327         <ppc_dscr_regnum>: New field.
328         (enum) <PPC_PPR_REGNUM, PPC_DSCR_REGNUM>: New enum values.
329         * rs6000-tdep.c (rs6000_gdbarch_init): Look for and validate ppr
330         and dscr features.
331         (ppc_process_record_op31): Record changes to PPR and DSCR.
332
333 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
334
335         * rs6000-tdep.c (rs6000_gdbarch_init): Replace line wrapping by a
336         second initializer line for the have_* variables.  Initialize
337         have_fpu to 0 instead of 1.
338
339 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
340
341         * arch/ppc-linux-common.c (ppc_linux_match_description):
342         Parenthesize tdesc assignements and indent them properly.
343
344 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
345
346         * ppc-linux-nat.c (fetch_register): Change if statement to else
347         if.
348         (store_register): Likewise.
349
350 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
351
352         * rs6000-tdep.c: Remove reggroups.h include.
353         (rs6000_pseudo_register_reggroup_p): Remove.
354         (rs6000_gdbarch_init): Remove call to
355         set_tdesc_pseudo_register_reggroup_p.
356
357 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
358
359         * reggroups.c (default_register_reggroup_p): Return true for
360         decfloat registers and float_reggroup.
361
362 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
363
364         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): Remove.
365         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): Replace
366         ppc_linux_collect_vrregset by regcache_collect_regset.
367
368 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
369
370         * linux-tdep.c (linux_collect_regset_section_cb): Use
371         std::vector<gdb_byte> instead of char * and malloc for buf.
372         Remove xfree.
373
374 2018-10-26  Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
375
376         * xcoffread.c (read_xcoff_symtab): Pass deduced language to
377         symtab_start instead of always using language_unknown.
378
379 2018-10-26  Andrew Burgess  <andrew.burgess@embecosm.com>
380
381         * riscv-tdep.c (riscv_read_misa_reg): Update comment, remove
382         READ_P parameter, catch and ignore register access errors from
383         either the old or new MISA location.
384         (riscv_has_feature): Update call to riscv_read_misa_reg.
385
386 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
387
388         * python/py-function.c (convert_values_to_python): Return
389         gdbpy_ref<>.  Add header comment.
390         (fnpy_call): Adjust.
391
392 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
393
394         * python/py-cmd.c (cmdpy_completer_helper): Return gdbpy_ref<>.
395         (cmdpy_completer_handle_brkchars): Adjust.
396         (cmdpy_completer): Adjust.
397
398 2018-10-25  Andrew Burgess  <andrew.burgess@embecosm.com>
399
400         * riscv-linux-nat.c (riscv_linux_nat_target::fetch_registers):
401         Pass correct regnum to raw_supply_zeroed.
402
403 2018-10-23  Hafiz Abid Qadeer  <abidh@codesourcery.com>
404
405         * regcache.c (cooked_read_test): Add CSKY to the list of
406         architectures with a save_reggroup
407
408 2018-10-23  Simon Marchi  <simon.marchi@polymtl.ca>
409
410         PR gdb/23368
411         * infrun.c (follow_exec): In the follow_exec_mode_new case,
412         transfer terminal state from old new new inferior.
413         * terminal.h (swap_terminal_info): New function.
414         * inflow.c (swap_terminal_info): New function.
415
416 2018-10-23  Tom Tromey  <tom@tromey.com>
417
418         * record-btrace.c (get_thread_current_frame_id): Rename from
419         get_thread_current_frame.  Return a frame_id.
420         (record_btrace_start_replaying): Update.
421
422 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
423
424         * riscv-tdep.c (riscv_register_name): Use the user-friendly names
425         for CSRs.
426
427 2018-10-23  Joel Brobecker  <brobecker@adacore.com>
428
429         * riscv-tdep.c (riscv_gdbarch_init): Set the gdbarch's
430         have_nonsteppable_watchpoint attribute to 1.
431
432 2018-10-23  Andrew Burgess  <andrew.burgess@embecosm.com>
433
434         * riscv-tdep.c (riscv_gdb_reg_names): Update comment, and all
435         register names.
436         (struct register_alias): Rename to...
437         (struct riscv_register_alias): ...this, and update comment.
438         (riscv_register_aliases): Update type, and alias names.  Remove
439         CSR names from this list.
440         (riscv_register_name): Use riscv_gdb_reg_names for int and float
441         register names.  Add an extra assertion.
442         (riscv_is_regnum_a_named_csr): New function.
443         (riscv_register_reggroup_p): Use riscv_is_regnum_a_named_csr.
444
445 2018-10-22  Jim Wilson  <jimw@sifive.com>
446
447         * riscv-tdep.c (riscv_push_dummy_call) <in_reg>: Check for value in
448         FP reg smaller than FP reg size, and fill with -1 instead of 0.
449
450         * riscv-tdep.c (riscv_fpreg_d_type, riscv_fpreg_q_type): New.
451         (riscv_register_type): Use them.
452         (riscv_print_one_register_info): Handle union of floats same as float.
453         * riscv-tdep.h (struct gdbarch_tdep): Add riscv_fpreg_d_type and
454         riscv_fpreg_q_type fields.
455
456 2018-10-21  Simon Marchi  <simon.marchi@ericsson.com>
457
458         * gdbarch.sh (gdbarch_num_cooked_regs): New.
459         * gdbarch.h: Re-generate.
460         * ax-gdb.c (gen_expr): Use gdbarch_num_cooked_regs.
461         * dwarf2-frame.c (dwarf2_frame_cache): Likewise.
462         * eval.c (evaluate_subexp_standard): Likewise.
463         * findvar.c (value_of_register): Likewise.
464         (value_of_register_lazy): Likewise.
465         (address_from_register): Likewise.
466         * frame.c (get_frame_register_bytes): Likewise.
467         * gdbarch-selftests.c (register_to_value_test): Likewise.
468         * h8300-tdep.c (h8300_register_type): Likewise.
469         * i386-tdep.c (i386_dbx_reg_to_regnum): Likewise.
470         (i386_svr4_reg_to_regnum): Likewise.
471         * infcmd.c (default_print_registers_info): Likewise.
472         (registers_info): Likewise.
473         (print_vector_info): Likewise.
474         (default_print_float_info): Likewise.
475         * m68hc11-tdep.c (m68hc11_frame_unwind_cache): Likewise.
476         * mdebugread.c (mdebug_reg_to_regnum): Likewise.
477         * mi/mi-main.c (mi_cmd_data_list_register_names): Likewise.
478         (mi_cmd_data_list_changed_registers): Likewise.
479         (mi_cmd_data_list_register_values): Likewise.
480         (mi_cmd_data_write_register_values): Likewise.
481         (mi_cmd_trace_frame_collected): Likewise.
482         * mips-tdep.c (print_gp_register_row): Likewise.
483         (mips_print_registers_info): Likewise.
484         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
485         * regcache.c (init_regcache_descr): Likewise.
486         (register_size): Likewise.
487         (register_dump::dump): Likewise.
488         (cooked_read_test): Likewise.
489         (cooked_write_test): Likewise.
490         * rs6000-tdep.c (rs6000_register_sim_regno): Likewise.
491         (rs6000_gdbarch_init): Likewise.
492         * stabsread.c (stab_reg_to_regnum): Likewise.
493         * stack.c (info_frame_command): Likewise.
494         * target-descriptions.c (tdesc_register_name): Likewise.
495         * trad-frame.c (trad_frame_alloc_saved_regs): Likewise.
496         * tui/tui-regs.c (tui_show_register_group): Likewise.
497         * user-regs.c (user_reg_map_name_to_regnum): Likewise.
498         (user_reg_map_regnum_to_name): Likewise.
499         (value_of_user_reg): Likewise.
500         (maintenance_print_user_registers): Likewise.
501         * xtensa-tdep.c (xtensa_find_register_by_name): Likewise.
502         (xtensa_register_name): Likewise.
503         (xtensa_register_type): Likewise.
504         (xtensa_reg_to_regnum): Likewise.
505         (xtensa_pseudo_register_read): Likewise.
506         (xtensa_pseudo_register_write): Likewise.
507
508 2018-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
509
510         * amd64-tdep.c (amd64_pseudo_register_read_value): Use
511         correctly-sized buffer with raw_read.
512         (amd64_pseudo_register_write): Use correctly-sized buffer for
513         raw_read/raw_write.
514
515 2018-10-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
516
517         * typeprint.c (_initialize_typeprint): Fix wrong prefixname arg
518         in add_prefix_cmd of set print type.
519
520 2018-10-19  Tom Tromey  <tom@tromey.com>
521
522         PR tui/18388:
523         * NEWS: Mention tabset deprecation.
524         * tui/tui-win.c (tui_tab_width, internal_tab_width): New globals.
525         (update_tab_width): New function.
526         (tui_set_tab_width, tui_show_tab_width): New functions.
527         (tui_set_tab_width_command): Use update_tab_width.
528         (_initialize_tui_win): Move to end of file.  Deprecate "tabset".
529         Add new "set tui tab-width" command.
530         * tui/tui-source.c (tui_set_source_content): Update.
531         * tui/tui-disasm.c (tui_set_disassem_content): Update.
532         * tui/tui-data.h (tui_default_tab_len, tui_set_default_tab_len):
533         Don't declare.
534         (tui_tab_width): Declare.
535         * tui/tui-data.c (default_tab_len, tui_default_tab_len)
536         (tui_set_default_tab_len): Remove.
537
538 2018-10-19  Tom Tromey  <tom@tromey.com>
539
540         * tui/tui-io.h (key_is_start_sequence, key_is_end_sequence)
541         (key_is_backspace, tui_getc): Don't declare.
542         * tui/tui-io.c (key_is_start_sequence): Now static.
543         (key_is_end_sequence, key_is_backspace): Remove.
544         (tui_getc): Now static.
545
546 2018-10-19  Tom Tromey  <tom@tromey.com>
547
548         * symfile.c (reread_symbols): Clear "static_links".
549
550 2018-10-19  Alan Hayward  <alan.hayward@arm.com>
551
552         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_SIZE): New
553         define.
554         (aarch64_linux_sigframe_init): Extra boundary checks.
555
556 2018-10-19  Andreas Arnez  <arnez@linux.ibm.com>
557
558         * s390-tdep.c (s390_pseudo_register_type): For v0-v15 don't yield
559         the possibly non-existent tdesc type 'vec128', but the type of raw
560         register v16 instead.
561
562 2018-10-19  Gary Benson <gbenson@redhat.com>
563
564         * cli/cli-interp.c (cli_interp::~cli_interp): New function.
565
566 2018-10-18  Sergio Durigan Junior  <sergiodj@redhat.com>
567
568         PR cli/23785
569         * cli/cli-dump.c (restore_binary_file): Check if "file" is
570         NULL.
571
572 2018-10-17  Paul Koning  <paul_koning@dell.com>
573
574         * charset.c (convert_between_encodings): Fix unsigned overflow.
575
576 2018-10-17  John Baldwin  <jhb@FreeBSD.org>
577
578         * fbsd-nat.c (fbsd_nat_target::info_proc) Use
579         fbsd_info_proc_mappings_header and fbsd_info_proc_mappings_entry.
580         * fbsd-tdep.c (fbsd_vm_map_entry_flags): Mark static.
581         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
582         New functions.
583         (fbsd_core_info_proc_mappings): Use fbsd_info_proc_mappings_header
584         and fbsd_info_proc_mappings_header.
585         * fbsd-tdep.h (fbsd_vm_map_entry_flags): Remove.
586         (fbsd_info_proc_mappings_header, fbsd_info_proc_mappings_entry):
587         New.
588
589 2018-10-17  Joel Brobecker  <brobecker@adacore.com>
590
591         * MAINTAINERS (Responsible Maintainers): Add Rainer Orth as
592         Solaris Maintainer.
593
594 2018-10-15  Tom Tromey  <tom@tromey.com>
595
596         * tui/tui.c (strcat_to_buf): Remove casts.
597         * tui/tui-winsource.c (tui_show_source_line)
598         (tui_set_is_exec_point_at, tui_line_is_displayed): Remove casts.
599         * tui/tui-wingeneral.c (tui_refresh_win, box_win): Remove casts.
600         * tui/tui-windata.c (tui_first_data_item_displayed)
601         (tui_delete_data_content_windows, tui_erase_data_content)
602         (tui_display_all_data, tui_display_data_from)
603         (tui_refresh_data_win, tui_vertical_data_scroll): Remove casts.
604         * tui/tui-win.c (tui_set_win_height)
605         (make_invisible_and_set_new_height, parse_scrolling_args): Remove
606         casts.
607         * tui/tui-win.c (tui_resize_all): Remove casts.
608         (tui_scroll_backward_command, tui_set_focus)
609         (tui_set_tab_width_command): Likewise.
610         * tui/tui-source.c (tui_vertical_source_scroll): Remove cast.
611         * tui/tui-regs.c (tui_show_register_group): Remove cast.
612         * tui/tui-layout.c (tui_set_layout_by_name): Remove cast.
613         * tui/tui-disasm.c (tui_vertical_disassem_scroll): Remove cast.
614         * tui/tui-data.c (tui_partial_win_by_name, tui_free_win_content):
615         Remove casts.
616
617 2018-10-15  Simon Marchi  <simon.marchi@ericsson.com>
618
619         * MAINTAINERS (Responsible Maintainers): Add Alan Hayward as
620         AArch64/ARM maintainer.
621
622 2018-10-11  Gary Benson <gbenson@redhat.com>
623
624         * interps.h (interp::m_name): Make private and mutable.
625         * interps.c (interp::~interp): Free m_name.
626
627 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
628             Simon Marchi <simark@simark.ca>
629
630         * README (`configure' options): Add documentation for new
631         "--enable-unit-tests" option.
632         * acinclude.m4: Include "selftest.m4".
633         * configure: Regenerate.
634         * configure.ac: Use "GDB_AC_SELFTEST".
635         * maint.c (maintenance_selftest): Update message informing
636         that selftests have been disabled.
637         (maintenance_info_selftests): Likewise.
638         * selftest.m4: New file.
639
640 2018-10-10  Gary Benson <gbenson@redhat.com>
641
642         * remote.c (remote_target::remote_send_printf): Add
643         missing va_end found by Coverity.
644
645 2018-10-10  Markus Metzger  <markus.t.metzger@intel.com>
646
647         * btrace.c (ftrace_update_function): Add indirect jump heuristic.
648
649 2018-10-09  Tom Tromey  <tom@tromey.com>
650
651         * configure: Rebuild.
652         * sanitize.m4 (AM_GDB_UBSAN): Default to no.
653         * NEWS: Update --enable-ubsan documentation.
654
655 2018-10-09  Gary Benson <gbenson@redhat.com>
656
657         * dwarf2read.c (create_dwp_hash_table): Fix buffer overrun
658         found by Coverity.
659
660 2018-10-08  Tom Tromey  <tom@tromey.com>
661
662         * riscv-fbsd-tdep.c (riscv_fbsd_sigframe_init): Remove unused
663         variable.
664         (riscv_fbsd_init_abi): Likewise.
665
666 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
667         * valops.c (value_struct_elt_for_reference): Rename local variable
668         to work around the shadowing a previous local warning.
669
670 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
671
672         * Makefile.in (ALLDEPFILES): Add riscv-fbsd-nat.c.
673         * NEWS: Mention new FreeBSD/riscv native configuration.
674         * configure.host: Add riscv*-*-freebsd*.
675         * configure.nat: Likewise.
676         * riscv-fbsd-nat.c: New file.
677
678 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
679
680         * Makefile.in (ALL_TARGET_OBS): Add riscv-fbsd-tdep.o.
681         (HFILES_NO_SRCDIR): Add riscv-fbsd-tdep.h.
682         (ALLDEPFILES): Add riscv-fbsd-tdep.c.
683         * NEWS: Mention new FreeBSD/riscv target.
684         * configure.tgt: Add riscv*-*-freebsd*.
685         * riscv-fbsd-tdep.c: New file.
686         * riscv-fbsd-tdep.h: New file.
687
688 2018-10-08  John Baldwin  <jhb@FreeBSD.org>
689
690         * regcache.h (struct regcache_map_entry): Note that this type can
691         be used with traditional frame caches.
692         * trad-frame.c (trad_frame_set_reg_regmap): New.
693         * trad-frame.h (trad_frame_set_reg_regmap): New.
694
695 2018-10-08  Weimin Pan  <weimin.pan@oracle.com>
696
697         PR c++/16841
698         * valops.c (get_virtual_base_offset): New function.
699         (value_struct_elt_for_reference): Use it to get virtual base offset
700         and add it in calculating class member address.
701
702 2018-10-08   John Darrington <john@darrington.wattle.id.au>
703
704     * dwarf2read.c (dwarf2_cu) <producer_is_codewarrior>: New field.
705       (check_producer): Check if the producer is codewarrior.
706       (producer_is_codewarrior): New function.
707       (lnp_state_machine::record_line): Ignore is_stmt flag for records
708        produced by codewarrior.
709       (dwarf2_cu::dwarf2_cu): Initialize producer_is_codewarrior.
710
711 2018-10-06  Tom Tromey  <tom@tromey.com>
712
713         PR python/19399:
714         * python/py-inferior.c: Add "architecture" entry.
715         (infpy_architecture): New function.
716
717 2018-10-06  Tom Tromey  <tom@tromey.com>
718
719         PR python/21765:
720         * python/py-symbol.c (gdbpy_initialize_symbols): Redefine
721         SYMBOL_VARIABLES_DOMAIN, SYMBOL_FUNCTIONS_DOMAIN,
722         SYMBOL_TYPES_DOMAIN.  Define SYMBOL_MODULE_DOMAIN,
723         SYMBOL_COMMON_BLOCK_DOMAIN, SYMBOL_LOC_COMMON_BLOCK.
724
725 2018-10-06  Tom Tromey  <tom@tromey.com>
726
727         PR build/17077:
728         * Makefile.in (OPCODES_CFLAGS): Remove "-I$(OPCODES_SRC)/..".
729         * arc-tdep.c, frv-tdep.c, lm32-tdep.c, mep-tdep.c,
730         microblaze-tdep.c, or1k-tdep.h: Use ../opcodes, not opcodes, in
731         #include.
732
733 2018-10-06  Tom Tromey  <tom@tromey.com>
734
735         * python/py-breakpoint.c (bppy_get_location): Handle a
736         bp_breakpoint without a location.
737
738 2018-10-06  Tom Tromey  <tom@tromey.com>
739
740         * python/lib/gdb/function/strfns.py (_MemEq, _StrLen, _StrEq)
741         (_RegEx): Reformat help text.
742         * python/lib/gdb/function/caller_is.py (CallerIs, CallerMatches)
743         (AnyCallerIs, AnyCallerMatches): Reformat help text.
744         * python/lib/gdb/function/as_string.py (_AsString): Reformat help
745         text.
746         * python/lib/gdb/command/xmethods.py (InfoXMethod)
747         (EnableXMethod, DisableXMethod): Remove help indentation.
748         Capitalize meta-syntactic variables.
749         * python/lib/gdb/command/unwinders.py (InfoUnwinder)
750         (EnableUnwinder, DisableUnwinder): Remove help indentation.
751         Capitalize meta-syntactic variables.
752         * python/lib/gdb/command/explore.py (ExploreCommand)
753         (ExploreValueCommand, ExploreTypeCommand): Reformat help text.
754         * python/lib/gdb/command/type_printers.py (InfoTypePrinter)
755         (EnableTypePrinter, DisableTypePrinter): Remove help indentation.
756         * python/lib/gdb/command/pretty_printers.py (InfoPrettyPrinter):
757         Remove help indentation.
758         (EnablePrettyPrinter, DisablePrettyPrinter): Likewise.
759         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter)
760         (DisableFrameFilter, SetFrameFilterPriority)
761         (ShowFrameFilterPriority, InfoFrameFilter): Reword help text.
762
763 2018-10-06  Tom Tromey  <tom@tromey.com>
764
765         PR tui/28819:
766         * tui/tui-io.c (gdb_wgetch): New function.
767         (tui_mld_getc, tui_getc): Use it.
768
769 2018-10-05  Tom Tromey  <tom@tromey.com>
770
771         * sol-thread.c (sol_thread_target::wait): Rename inner
772         "save_ptid".
773
774 2018-10-04  Tom Tromey  <tom@tromey.com>
775
776         * configure: Rebuild.
777         * warning.m4 (AM_GDB_WARNINGS): Add -Wshadow=local.
778
779 2018-10-04  Tom Tromey  <tom@tromey.com>
780
781         * guile/scm-frame.c (gdbscm_frame_read_var): Remove inner
782         declaration of "block".
783
784 2018-10-04  Tom Tromey  <tom@tromey.com>
785
786         * common/filestuff.c (fdwalk): Remove inner declaration of
787         "result".
788
789 2018-10-04  Tom Tromey  <tom@tromey.com>
790
791         * msp430-tdep.c (msp430_push_dummy_call): Rename inner
792         "structs_addr" and hoist declaration.
793
794 2018-10-04  Tom Tromey  <tom@tromey.com>
795
796         * linux-tdep.c (linux_make_mappings_corefile_notes): Introduce new
797         variable "size".
798
799 2018-10-04  Tom Tromey  <tom@tromey.com>
800
801         * mdebugread.c (parse_partial_symbols): Use std::string.
802
803 2018-10-04  Tom Tromey  <tom@tromey.com>
804
805         * ctf.c (SET_ARRAY_FIELD): Rename "u32".
806         * p-valprint.c (pascal_val_print): Split inner "i" variable.
807         * xtensa-tdep.c (xtensa_push_dummy_call): Declare "i" in loop
808         header.
809         * xstormy16-tdep.c (xstormy16_push_dummy_call): Declare "val" in
810         more inner scope.
811         * xcoffread.c (read_xcoff_symtab): Rename inner "symbol".
812         * varobj.c (varobj_update): Rename inner "newobj",
813         "type_changed".
814         * valprint.c (generic_emit_char): Rename inner "buf".
815         * valops.c (find_overload_match): Rename inner "temp".
816         (value_struct_elt_for_reference): Declare "v" in more inner
817         scope.
818         * v850-tdep.c (v850_push_dummy_call): Rename "len".
819         * unittests/array-view-selftests.c (run_tests): Rename inner
820         "vec".
821         * tui/tui-stack.c (tui_show_frame_info): Declare "i" in loop
822         header.
823         * tracepoint.c (merge_uploaded_trace_state_variables): Declare
824         "tsv" in more inner scope.
825         (print_one_static_tracepoint_marker): Rename inner
826         "tuple_emitter".
827         * tic6x-tdep.c (tic6x_analyze_prologue): Declare "inst" lower.
828         (tic6x_push_dummy_call): Don't redeclare "addr".
829         * target-float.c: Declare "dto" lower.
830         * symtab.c (lookup_local_symbol): Rename inner "sym".
831         (find_pc_sect_line): Rename inner "pc".
832         * stack.c (print_frame): Don't redeclare "gdbarch".
833         (return_command): Rename inner "gdbarch".
834         * s390-tdep.c (s390_prologue_frame_unwind_cache): Renam inner
835         "sp".
836         * rust-lang.c (rust_internal_print_type): Declare "i" in loop
837         header.
838         * rs6000-tdep.c (ppc_process_record): Rename inner "addr".
839         * riscv-tdep.c (riscv_push_dummy_call): Declare "info" in inner
840         scope.
841         * remote.c (remote_target::update_thread_list): Don't redeclare
842         "tp".
843         (remote_target::process_initial_stop_replies): Rename inner
844         "thread".
845         (remote_target::remote_parse_stop_reply): Don't redeclare "p".
846         (remote_target::wait_as): Don't redeclare "stop_reply".
847         (remote_target::get_thread_local_address): Rename inner
848         "result".
849         (remote_target::get_tib_address): Likewise.
850
851         * regcache.c (cooked_read_test): Rename "regnum".
852         * record-btrace.c (cmd_record_btrace_start): Rename inner
853         "exception".
854         * ppc-sysv-tdep.c (ppc64_sysv_abi_return_value): Declare "i" in
855         loop header.
856         * ppc-linux-tdep.c (ppc_linux_syscall_record): Declare "i" in loop
857         header.
858         (ppu2spu_sniffer): Rename inner "buf".
859         * parse.c (operator_check_standard): Rename inner "type",
860         "objfile".
861         * p-valprint.c (pascal_val_print): Introduce new scope for
862         "low_bound", "high_bound".
863         * p-exp.y (yylex): Declare "i" in loop header.
864         * objfiles.c (objfile_relocate1): Declare "i" in loop header.
865         Lower declaration of "s".
866         * nios2-tdep.c (nios2_analyze_prologue): Declare "i" in loop
867         header.
868         (nios2_push_dummy_call): Rename "len".
869         * nat/linux-osdata.c (linux_xfer_osdata_cpus): Rename static
870         "buf".
871         (linux_xfer_osdata_fds, linux_xfer_osdata_shm)
872         (linux_xfer_osdata_sem, linux_xfer_osdata_msg)
873         (linux_xfer_osdata_modules): Likewise.
874         * mips-tdep.c (mips_eabi_push_dummy_call): Rename outer "len".
875         (mips_n32n64_push_dummy_call, mips_o32_push_dummy_call)
876         (mips_o64_push_dummy_call): Likewise.
877         * microblaze-tdep.c (microblaze_analyze_prologue): Rename inner
878         "op".
879         * mi/mi-main.c (list_available_thread_groups): Rename inner
880         "tuple_emitter".
881         (mi_cmd_data_read_memory): Rename inner "opts".
882         * mi/mi-cmd-var.c (varobj_update_one): Rename inner
883         "tuple_emitter".
884         * mep-tdep.c (mep_analyze_prologue): Declare "rn" in loop header.
885         * mdebugread.c (parse_symbol): Rename inner "b".  Declare "f" in
886         more inner scope.
887         (parse_partial_symbols): Rename inner "pst", "p", "name"
888         * main.c (captured_main_1): Rename inner "i"s.
889         * machoread.c (macho_symfile_read_all_oso): Don't redeclare
890         "oso2".
891         * linux-tdep.c (linux_info_proc): Rename inner "filename".
892         * linespec.c (linespec_lexer_lex_string): Rename inner "p".
893         * infrun.c (handle_no_resumed): Don't redeclare "thread".
894         (handle_signal_stop): Rename inner "gdbarch".
895         (handle_command): Declare "signum" in loop header.
896         * ia64-tdep.c (ia64_pseudo_register_read): Don't redeclare
897         "status".
898         (examine_prologue): Rename inner "sol" and "sof".
899         (ia64_extract_return_value): Rename inner "val".  Declare another
900         "val" in a more inner scope.
901         * hppa-bsd-tdep.c (hppabsd_find_global_pointer): Declare "buf" in
902         inner scope.
903         * guile/scm-symbol.c (gdbscm_lookup_symbol): Rename inner
904         "except".
905         * findvar.c (default_read_var_value): Don't redeclare "addr".
906         * f-exp.y (yylex): Declare "i" in loop header.
907         * eval.c (evaluate_subexp_standard): Don't redeclare "type".
908         Rename inner "type", "expect_type".
909         (evaluate_subexp_for_sizeof): Rename inner "pc".
910         * elfread.c (elf_symfile_read): Rename inner "abfd".
911         * dwarf2read.c (read_debug_names_from_section): Don't redeclare
912         "bytes_read".
913         (process_psymtab_comp_unit_reader): Don't redeclare "gdbarch".
914         (add_partial_subprogram): Rename inner "lowpc" and "highpc".
915         (dwarf_decode_line_header): Rename inner "lh".
916         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Don't redeclare
917         "offset".  Declare "i" in loop header.
918         (disassemble_dwarf_expression): Rename inner "addr_size".
919         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Rename
920         inner "result".
921         (dwarf_expr_context::execute_stack_op): Rename inner "offset".
922         * dwarf2-frame.c (decode_frame_entry_1): Rename inner "length"s.
923         * disasm.c (do_mixed_source_and_assembly_deprecated): Rename inner
924         "inner_list_emitter".
925         (do_mixed_source_and_assembly): Rename inner "tuple_emitter".
926         * disasm-selftests.c (print_one_insn_test): Wrap "bplen"
927         declaration in a block.
928         * csky-tdep.c (csky_analyze_prologue): Declare "offset" lower.
929         * cp-valprint.c (cp_print_value_fields): Don't redeclare
930         "obstack_final_size".
931         * cp-support.c (inspect_type): Declare "i" in loop header.
932         * compile/compile.c (compile_instance::insert_symbol_error):
933         Rename inner "e".
934         * common/agent.c (agent_run_command): Remove inner "ret"
935         declaration.
936         * coffread.c (coff_symfile_read): Rename inner "name".
937         (coff_symfile_read): Rename inner "abfd".
938         * cli/cli-utils.c (get_number_trailer): Rename inner "val".
939         * cli/cli-cmds.c (print_disassembly): Rename inner "low" and
940         "high".
941         * c-exp.y (lex_one_token): Move "len" declaration lower.
942         * breakpoint.c (create_longjmp_master_breakpoint): Don't redeclare
943         "gdbarch".
944         (create_exception_master_breakpoint): Likewise.  Don't redeclare
945         "b".
946         (watch_command_1): Declare "mark" later.
947         (clear_command): Don't shadow "a" or "b".
948         (delete_command): Rename inner "b".
949         (delete_trace_command): Likewise.
950         * arm-tdep.c (thumb_process_displaced_32bit_insn): Rename inner
951         "op".
952         (arm_gdbarch_init): Remove inner "e_flags".
953         * arch/arm-get-next-pcs.c (thumb_get_next_pcs_raw): Declare
954         "offset" in inner blocks.
955
956 2018-10-04  Simon Marchi  <simon.marchi@ericsson.com>
957
958         * dwarf-index-write.c (file_write): Don't write if the vector is
959         empty.
960
961 2018-10-05  Tom de Vries  <tdevries@suse.de>
962
963         * python/py-progspace.c (pspy_solib_name): Fix type mismatch in
964         PyArg_ParseTuple call.
965
966 2018-10-05  Tom de Vries  <tdevries@suse.de>
967
968         * python/py-record-btrace.c (recpy_bt_goto): Fix type mismatch in
969         PyArg_ParseTuple call.
970
971 2018-10-04  Joel Brobecker  <brobecker@adacore.com>
972
973         * psymtab.c (recursively_search_psymtabs): Reformat parameters
974         to avoid exceeding 80 characters per line limit.
975
976 2018-10-04  Tom Tromey  <tom@tromey.com>
977
978         * symfile.c (syms_from_objfile_1, finish_new_objfile)
979         (reread_symbols): Update.
980         * complaints.h (clear_complaints): Remove argument.
981         * complaints.c (enum complaint_series): Remove.
982         (series): Remove global.
983         (complaint_internal): Update.
984         (clear_complaints): Remove argument.
985
986 2018-10-04  Tom Tromey  <tom@tromey.com>
987
988         * symfile.c (symbol_file_add_with_addrs): Do not print "no
989         debugging symbols" message if there is a separate debug objfile.
990
991 2018-10-04  Tom Tromey  <tom@tromey.com>
992
993         PR cli/19551:
994         * symfile.c (symbol_file_add_with_addrs): Update output.
995         * psymtab.c (require_partial_symbols): Update output.
996
997 2018-10-04  Tom Tromey  <tom@tromey.com>
998
999         PR cli/22234:
1000         * complaints.c: Emit \n.
1001
1002 2018-10-04  Tom Tromey  <tom@tromey.com>
1003
1004         * symfile.c (symbol_file_add_with_addrs, symbol_file_clear)
1005         (separate_debug_file_exists, find_separate_debug_file)
1006         (add_symbol_file_command, reread_symbols, allocate_symtab)
1007         (allocate_compunit_symtab): Use filtered printing, not
1008         unfiltered.
1009         * psymtab.c (require_partial_symbols, dump_psymtab)
1010         (allocate_psymtab): Use filtered printing, not unfiltered.
1011
1012 2018-10-04  Tom Tromey  <tom@tromey.com>
1013
1014         * complaints.c (complaint_internal): Correctly check complaint
1015         count.
1016
1017 2018-10-04  Tom Tromey  <tom@tromey.com>
1018
1019         * complaints.h (struct complaints): Remove declaration.
1020         * complaints.c (clear_complaints): Remove an unused variable.
1021
1022 2018-10-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1023
1024         * MAINTAINERS (Write After Approval): Add self.
1025
1026 2018-10-03  Tom Tromey  <tom@tromey.com>
1027
1028         * guile/scm-value.c (gdbscm_value_to_string): Initialize
1029         "buffer_contents".
1030         * coffread.c (coff_symtab_read): Initialize "newobj".
1031
1032 2018-10-03  Simon Marchi  <simon.marchi@polymtl.ca>
1033
1034         * dwarf2read.c (read_func_scope): Remove struct keyword in
1035         range-based for.
1036
1037 2018-10-03  Tom Tromey  <tom@tromey.com>
1038
1039         * README: Mention --enable-ubsan.
1040         * NEWS: Mention --enable-ubsan.
1041         * acinclude.m4: Include sanitize.m4.
1042         * configure: Rebuild.
1043         * configure.ac: Call AM_GDB_UBSAN.
1044         * sanitize.m4: New file.
1045
1046 2018-10-03  Tom Tromey  <tom@tromey.com>
1047
1048         * expression.h (enum exp_opcode): Use uint8_t as base type.
1049         * expprint.c (op_name): Handle invalid opcodes.
1050
1051 2018-10-03  Tom Tromey  <tom@tromey.com>
1052
1053         * parse.c (prefixify_expression): Add assert.
1054         (parse_exp_in_context_1): Throw exception if the expression is
1055         empty.
1056
1057 2018-10-03  Tom Tromey  <tom@tromey.com>
1058
1059         * dwarf2read.c (read_signed_leb128): Work in ULONGEST.
1060
1061 2018-10-03  Tom Tromey  <tom@tromey.com>
1062
1063         * c-exp.y (parse_number): Work in unsigned.  Remove casts.
1064
1065 2018-10-03  Tom Tromey  <tom@tromey.com>
1066
1067         * dwarf2read.c (read_subrange_type): Make "negative_mask"
1068         unsigned.
1069
1070 2018-10-03  Tom Tromey  <tom@tromey.com>
1071
1072         * findvar.c (extract_integer): Do work in an unsigned type.
1073
1074 2018-10-03  Tom Tromey  <tom@tromey.com>
1075
1076         * common/enum-flags.h (enum_flags::operator~): Add static assert.
1077         * symfile-add-flags.h (enum symfile_add_flag): Use unsigned as
1078         base type.
1079         * objfile-flags.h (enum objfile_flag): Use unsigned as base type.
1080         * gdbtypes.h (enum type_instance_flag_value): Use unsigned as base
1081         type.
1082         * c-lang.h (enum c_string_type_values): Use unsigned as base
1083         type.
1084         * btrace.h (enum btrace_thread_flag): Use unsigned as base type.
1085
1086 2018-10-03  Tom Tromey  <tom@tromey.com>
1087
1088         * dwarf2-frame.h (dwarf2_frame_state_reg_info)
1089         <~dwarf2_frame_state_reg_info>: Update.
1090         <dwarf2_frame_state_reg_info>: Update.
1091         <alloc_regs>: Add assertion.  Update.
1092         <reg>: Now a std::vector.
1093         <num_regs>: Remove.
1094         <swap>: Update.
1095         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
1096         (execute_cfa_program_test, dwarf2_frame_cache): Update.
1097
1098 2018-10-03  Tom Tromey  <tom@tromey.com>
1099
1100         * namespace.c (add_using_directive): Don't pass NULL to memcpy.
1101
1102 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1103
1104         * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
1105
1106 2018-10-02  Tom Tromey  <tom@tromey.com>
1107
1108         * aarch64-linux-tdep.c (aarch64_linux_sigframe_init): Use pulongest.
1109
1110 2018-10-02  John Darrington <john@darrington.wattle.id.au>
1111
1112         * NEWS: Mention changed commands.
1113         * ser-uds.c: New file.
1114         * configure.ac (SER_HARDWIRE): Add ser-uds.o.
1115         * configure: Regenerate.
1116         * Makefile.in: Add new file.
1117         * serial.c (serial_open): Check if filename is a socket
1118           and lookup the appropriate interface accordingly.
1119
1120 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1121
1122         * aarch64-linux-tdep.c (AARCH64_SIGCONTEXT_RESERVED_OFFSET): Add
1123         define.
1124         (AARCH64_EXTRA_MAGIC): Likewise.
1125         (AARCH64_FPSIMD_MAGIC): Likewise.
1126         (AARCH64_SVE_MAGIC): Likewise.
1127         (AARCH64_EXTRA_DATAP_OFFSET): Likewise.
1128         (AARCH64_FPSIMD_FPSR_OFFSET): Likewise.
1129         (AARCH64_FPSIMD_FPCR_OFFSET): Likewise.
1130         (AARCH64_FPSIMD_V0_OFFSET): Likewise.
1131         (AARCH64_FPSIMD_VREG_SIZE): Likewise.
1132         (AARCH64_SVE_CONTEXT_VL_OFFSET): Likewise.
1133         (AARCH64_SVE_CONTEXT_REGS_OFFSET): Likewise.
1134         (AARCH64_SVE_CONTEXT_P_REGS_OFFSET): Likewise.
1135         (AARCH64_SVE_CONTEXT_FFR_OFFSET): Likewise.
1136         (AARCH64_SVE_CONTEXT_SIZE): Likewise.
1137         (read_aarch64_ctx): Add function.
1138         (aarch64_linux_sigframe_init): Detect FP registers.
1139
1140 2018-10-01  Alan Hayward  <alan.hayward@arm.com>
1141
1142         * aarch64-tdep.c (AARCH64_Q0_REGNUM): Move to here.
1143         (AARCH64_D0_REGNUM): Likewise.
1144         (AARCH64_S0_REGNUM): Likewise.
1145         (AARCH64_H0_REGNUM): Likewise.
1146         (AARCH64_B0_REGNUM): Likewise.
1147         (AARCH64_SVE_V0_REGNUM): Likewise.
1148         * arch/aarch64.h (AARCH64_Q0_REGNUM): Move from here.
1149         (AARCH64_D0_REGNUM): Likewise.
1150         (AARCH64_S0_REGNUM): Likewise.
1151         (AARCH64_H0_REGNUM): Likewise.
1152         (AARCH64_B0_REGNUM): Likewise.
1153         (AARCH64_SVE_V0_REGNUM): Likewise.
1154
1155 2018-10-01  Gary Benson <gbenson@redhat.com>
1156
1157         * gdb_proc_service.h (gdb_prfpregset_t): Remove typedef.
1158         * proc-service.c (ps_lgetfpregs, ps_lsetfpregs): Use
1159         prfpregset_t instead of gdb_prfpregset_t.
1160         * configure.ac (PRFPREGSET_T_BROKEN): Remove check.
1161         * configure, config.in: Rebuild.
1162
1163 2018-10-01  Gary Benson <gbenson@redhat.com>
1164
1165         * common/gdb_proc_service.h: New file, factored out from...
1166         * gdb_proc_service.h: Moved common code to the above file.
1167         * Makefile.in (HFILES_NO_SRCDIR): Add the above new file.
1168
1169 2018-10-01  Gary Benson <gbenson@redhat.com>
1170
1171         * gdb_proc_service.h: Use elf_gregset_t if prgregset_t is
1172         undefined.  Use elf_fpregset_t if prfpregset_t is undefined.
1173
1174 2018-10-01  Gary Benson <gbenson@redhat.com>
1175
1176         * configure.ac: Check if sys/procfs.h defines elf_fpregset_t.
1177         (AC_CHECK_HEADERS): Check for linux/elf.h.
1178         * configure, config.in: Rebuild.
1179         * gdb_proc_service.h: Include linux/elf.h if sys/procfs.h
1180         doesn't define elf_fpregset_t.
1181
1182 2018-10-01  Gary Benson <gbenson@redhat.com>
1183
1184         * gdb_proc_service.h: Whitespace change.
1185
1186 2018-10-01  Tom Tromey  <tom@tromey.com>
1187
1188         * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H.
1189         * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H.
1190         * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
1191
1192 2018-10-01  Tom Tromey  <tom@tromey.com>
1193
1194         * README: Minor change.
1195
1196 2018-09-30  Pedro Alves  <palves@redhat.com>
1197
1198         * darwin-nat-info.c (darwin_debug_regions_recurse)
1199         (info_mach_exceptions_command): Remove unused local variables.
1200         * darwin-nat.c (darwin_decode_notify_message)
1201         (darwin_nat_target::resume, darwin_nat_target::mourn_inferior)
1202         (darwin_stop_inferior, darwin_setup_exceptions)
1203         (darwin_nat_target::kill, darwin_attach_pid, darwin_ptrace_him)
1204         (darwin_nat_target::attach, darwin_nat_target::detach)
1205         (darwin_read_write_inferior, darwin_read_dyld_info): Remove unused
1206         local variables.
1207         * i386-darwin-nat.c (i386_darwin_dr_set): Remove unused local
1208         variables.
1209
1210 2018-09-29  Tom Tromey  <tom@tromey.com>
1211
1212         * README: Remove some leftover text.
1213
1214 2018-09-29  Tom Tromey  <tom@tromey.com>
1215
1216         * PROBLEMS: Rewrite.
1217         * README: Update.
1218
1219 2018-09-28  John Baldwin  <jhb@FreeBSD.org>
1220
1221         * disasm-selftests.c (print_one_insn_test): Add bfd_arch_riscv to
1222         case with explicit breakpoint kind.
1223         * riscv-tdep.c (show_use_compressed_breakpoints): Remove
1224         'additional_info' and related logic.
1225         (riscv_debug_breakpoints): New variable.
1226         (riscv_breakpoint_kind_from_pc): Use the length of the existing
1227         instruction to determine the breakpoint kind.
1228         (_initialize_riscv_tdep): Add 'set/show debug riscv breakpoints'
1229         flag.  Update description of 'set/show riscv
1230         use-compressed-breakpoints' flag.
1231
1232 2018-09-28  Andrew Burgess  <andrew.burgess@embecosm.com>
1233
1234         (NEWS): Mention changes to frame related commands.
1235         * cli/cli-decode.c (add_cmd_suppress_notification): New function.
1236         (add_prefix_cmd_suppress_notification): New function.
1237         (add_com_suppress_notification): Call
1238         add_cmd_suppress_notification.
1239         * command.h (add_cmd_suppress_notification): Declare.
1240         (add_prefix_cmd_suppress_notification): Declare.
1241         * mi/mi-cmd-stack.c: Add 'safe-ctype.h' include.
1242         (parse_frame_specification): Moved from stack.c, with
1243         simplification to handle a single argument.
1244         (mi_cmd_stack_select_frame): Use parse_frame_specification, the
1245         switch to the selected frame.  Add a header comment.
1246         * stack.c: Remove 'safe-ctype.h' include.
1247         (find_frame_for_function): Add declaration.
1248         (find_frame_for_address): New function.
1249         (parse_frame_specification): Moved into mi/mi-cmd-stack.c.
1250         (frame_selection_by_function_completer): New function.
1251         (info_frame_command): Rename to...
1252         (info_frame_command_core): ...this, and update parameter types.
1253         (select_frame_command): Rename to...
1254         (select_frame_command_core): ...this, and update parameter types.
1255         (frame_command): Rename to...
1256         (frame_command_core): ...this, and update parameter types.
1257         (class frame_command_helper): New class to wrap implementations of
1258         frame related sub-commands.
1259         (frame_apply_cmd_list): New static global.
1260         (frame_cmd_list): Make static.
1261         (select_frame_cmd_list): New global for sub-commands.
1262         (info_frame_cmd_list): New global for sub-commands.
1263         (_initialize_stack): Register sub-commands for 'frame',
1264         'select-frame', and 'info frame'.  Update 'frame apply' commands
1265         to use frame_apply_cmd_list.  Move function local static
1266         frame_apply_list to file static frame_apply_cmd_list for
1267         consistency.
1268         * stack.h (select_frame_command): Delete declarationn.
1269         (select_frame_for_mi): Declare new function.
1270
1271 2018-09-26  Andrew Burgess  <andrew.burgess@embecosm.com>
1272
1273         * riscv-tdep.c (riscv_insn::decode): Decode c.lui.
1274         (riscv_scan_prologue): Split handling of AUIPC, LUI, ADD, ADDI,
1275         and NOP.
1276
1277 2018-09-26  Simon Marchi  <simon.marchi@ericsson.com>
1278
1279         * elf32-nds32.c (elf32_nds32_allocate_dynrelocs): Remove.
1280
1281 2018-09-26  Tom Tromey  <tom@tromey.com>
1282
1283         * valops.c (auto_abandon): Remove dead code.
1284
1285 2018-09-26  Tom Tromey  <tom@tromey.com>
1286
1287         * tui/tui-win.c (WIN_HEIGHT_USAGE): Remove extra ">"s.
1288
1289 2018-09-24  Tom Tromey  <tom@tromey.com>
1290
1291         * common/pathstuff.c (get_standard_cache_dir): Make
1292         "xdg_cache_home" and "home" const.
1293         * top.c (init_history): Make "tmpenv" const.
1294         * main.c (get_init_files): Make "homedir" const.
1295
1296 2018-09-23  Tom Tromey  <tom@tromey.com>
1297
1298         PR python/18852:
1299         * python/py-param.c (get_set_value): Use gdbpy_handle_exception.
1300
1301 2018-09-23  Tom Tromey  <tom@tromey.com>
1302
1303         * python/py-function.c (fnpy_call): Use gdbpy_handle_exception.
1304         * python/py-cmd.c (cmdpy_function): Use gdbpy_handle_exception.
1305         * python/python-internal.h (gdbpy_handle_exception): Declare.
1306         * python/py-utils.c (gdbpy_handle_exception): New function.
1307
1308 2018-09-23  Tom Tromey  <tom@tromey.com>
1309
1310         PR python/17284:
1311         * python/py-type.c (typy_template_argument): Check for negative
1312         argument number.
1313
1314 2018-09-23  Tom Tromey  <tom@tromey.com>
1315
1316         PR python/14062:
1317         * python/python.c (gdbpy_run_events): Do not ignore exceptions.
1318
1319 2018-09-23  Tom Tromey  <tom@tromey.com>
1320
1321         PR python/18170:
1322         * python/py-value.c (valpy_int): Allow conversion from pointer
1323         type.
1324
1325 2018-09-23  Tom Tromey  <tom@tromey.com>
1326
1327         PR python/20126:
1328         * python/py-value.c (valpy_int): Respect type sign.
1329
1330 2018-09-23  Tom Tromey  <tom@tromey.com>
1331
1332         PR python/18352;
1333         * python/py-value.c (valpy_float): Allow conversions from int or
1334         char.
1335         (valpy_int, valpy_long): Allow conversions from float.
1336
1337 2018-09-23  Tom Tromey  <tom@tromey.com>
1338
1339         * ctf.c (ctf_start): Use gdb_fopen_cloexec.
1340         * common/scoped_mmap.c (mmap_file): Use gdb_open_cloexec.
1341
1342 2018-09-23  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1343
1344         * amd64-sol2-tdep.c (amd64_sol2_sigtramp_p): Also recognize
1345         __sighndlr.
1346         * i386-sol2-tdep.c (i386_sol2_sigtramp_p): Likewise.
1347
1348 2018-08-02  Jon Turney  <jon.turney@dronecode.org.uk>
1349
1350         * windows-nat.c (windows_nat_target::wait): Remove a spurious
1351         target_terminal::ours().
1352
1353 2018-09-23  Simon Marchi  <simon.marchi@ericsson.com>
1354
1355         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): Change type
1356         of vl to ULONGEST.
1357
1358 2018-09-21  Yacov Simhony  <ysimhony@gmail.com>
1359
1360         * breakpoint.c (update_inserted_breakpoint_locations): Remove
1361         redundant condition.
1362
1363 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1364
1365         * proc-utils.h (PROC_CTL_WORD_TYPE): Remove.
1366
1367         * procfs.c: Don't check for PR_MODEL_NATIVE definition.
1368         * sparc-sol2-nat.c: Likewise.  Remove Linux, __arch64__ references.
1369         * sol-thread.c (ps_pdmodel): Don't guard definition.
1370
1371         * procfs.c: Fix formatting.
1372
1373         * procfs.c (sysset_t_alloc): Remove.
1374         (create_procinfo): Use XNEW instead of sysset_t_alloc.
1375         (procfs_debug_inferior): Likewise.
1376         (procfs_set_exec_trap): Likewise.
1377         (proc_set_traced_sysentry): Don't allocate argp dynamically.
1378         (proc_set_traced_sysexit): Likewise.
1379
1380         * procfs.c (create_procinfo): Use xsnprintf to fix ARI warning.
1381         (dead_procinfo): Likewise.
1382         (proc_warn): Likewise.
1383         (proc_error): Likewise.
1384         (proc_get_LDT_entry): Likewise.
1385         (do_attach): Likewise.
1386         (procfs_target::pid_to_str): Likewise.
1387         (iterate_over_mappings): Likewise.
1388
1389         * procfs.c (create_procinfo): Fix ARI warning.
1390         (proc_get_status): Likewise.
1391         (proc_stop_process): Likewise.
1392         (proc_run_process): Likewise.
1393         (proc_kill): Likewise.
1394         (proc_get_LDT_entry): Likewise.
1395         (procfs_find_LDT_entry): Likewise.
1396         (proc_update_threads): Likewise.
1397         (proc_iterate_over_threads): Likewise.
1398         (do_attach): Likewise.
1399         (procfs_xfer_memory): Likewise.
1400         (invalidate_cache): Likewise.
1401         (procfs_target::resume): Likewise.
1402         (procfs_init_inferior): Likewise.
1403         (procfs_set_exec_trap): Likewise.
1404         (procfs_target::thread_alive): Likewise.
1405         (procfs_target::pid_to_exec_file): Likewise.
1406         (iterate_over_mappings): Likewise.
1407         (procfs_target::make_corefile_notes): Likewise.
1408         * sol-thread.c (sol_thread_target::thread_alive): Likewise.
1409
1410         * procfs.c (procfs_find_LDT_entry): Silence ARI warning.
1411         (procfs_find_LDT_entry): Likewise.
1412         * sol-thread.c (ps_lgetLDT): Likewise.
1413
1414 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1415
1416         PR tdep/17903
1417         * procfs.c (procfs_target): Declare pid_to_exec_file.
1418         (procfs_target::pid_to_exec_file): New.
1419
1420 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1421
1422         * auxv.c (default_print_auxv_entry): Reflect AT_SUN_CAP_HW1
1423         renaming.
1424         Handle AT_SUN_EMULATOR, AT_SUN_BRANDNAME, AT_SUN_BRAND_AUX1,
1425         AT_SUN_BRAND_AUX2, AT_SUN_BRAND_AUX3, AT_SUN_CAP_HW2.
1426
1427 2018-09-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1428
1429         * i386-v4-nat.c (regmap, supply_gregset, fill_gregset)
1430         (supply_fpregset, fill_fpregset): Move ...
1431         * i386-sol2-nat.c [PR_MODEL_NATIVE != PR_MODEL_LP64]: ... here.
1432         Remove HAVE_GREGSET_T, HAVE_FPREGET_T guards.
1433         Remove references to ioctl-based procfs.
1434         Include <sys/reg.h>.
1435         Remove PR_MODEL_NATIVE guards.
1436         * configure.nat <sol2, i386> (NATDEPFILES): Remove i386-v4-nat.o.
1437         * Makefile.in (ALLDEPFILES): Remove i386-v4-nat.c.
1438
1439 2018-09-19  Xavier Roirand  <roirand@adacore.com>
1440
1441         PR gdb/20981:
1442         * solib-darwin.c (darwin_get_dyld_bfd): New function.
1443         (darwin_solib_get_all_image_info_addr_at_init): Update call.
1444         (darwin_solib_create_inferior_hook): Handle unrelocated dyld.
1445
1446 2018-09-19  John Baldwin  <jhb@FreeBSD.org>
1447
1448         * fbsd-tdep.c (fbsd_print_sockaddr_in): Style fix.
1449         (fbsd_print_sockaddr_in6): Likewise.
1450
1451 2018-09-19  Richard Bunt  <richard.bunt@arm.com>
1452             Chris January  <chris.january@arm.com>
1453
1454         * eval.c (skip_undetermined_arglist): Skip argument list helper.
1455         (evaluate_subexp_standard): Return a dummy type when
1456         honoring EVAL_SKIP in OP_VAR_VALUE and handle skipping in the
1457         OP_F77_UNDETERMINED_ARGLIST case.
1458         * expression.h (enum noside): Update comment.
1459
1460 2018-09-19  George Vasick <george.vasick@oracle.com>
1461
1462         * solib-svr4.c (svr4_same_1): Also handle amd64 ld.so.1.
1463
1464 2018-09-19  Stefan Teleman <stefan.teleman@oracle.com>
1465             April Chin <april.chin@oracle.com>
1466             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1467
1468         * procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
1469         uint_t lwpid_t.
1470         (create_procinfo): Print pids in /proc without leading zeros.
1471
1472 2018-09-18  Sandra Loosemore  <sandra@codesourcery.com>
1473
1474         * nios2-tdep.c (nios2_gcc_target_options): New.
1475         (nios2_gdb_arch_init): Install new hook.
1476
1477 2018-09-18  Simon Marchi  <simon.marchi@ericsson.com>
1478
1479         * patches/0001-Fix-PR-gdb-23558-Use-system-s-getcwd-when-cross-comp.patch:
1480         New file.
1481         * update-gnulib.sh: Apply patch.
1482         * configure: Re-generate.
1483
1484 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1485
1486         * infcmd.c (_initialize_infcmd): Remove "running" from "info proc"
1487         description.  Make "info proc" command descriptions more
1488         consistent.
1489
1490 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1491
1492         * NEWS: Mention 'info proc files' command.
1493
1494 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1495
1496         * fbsd-nat.c (fbsd_nat_target::info_proc): List open file
1497         descriptors for IP_FILES and IP_ALL.
1498
1499 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1500
1501         * fbsd-tdep.c (KF_FLAGS, KF_OFFSET, KF_VNODE_TYPE, KF_SOCK_DOMAIN)
1502         (KF_SOCK_TYPE, KF_SOCK_PROTOCOL, KF_SA_LOCAL, KF_SA_PEER)
1503         (KINFO_FILE_TYPE_SOCKET, KINFO_FILE_TYPE_PIPE)
1504         (KINFO_FILE_TYPE_FIFO, KINFO_FILE_TYPE_KQUEUE)
1505         (KINFO_FILE_TYPE_CRYPTO, KINFO_FILE_TYPE_MQUEUE)
1506         (KINFO_FILE_TYPE_SHM, KINFO_FILE_TYPE_SEM, KINFO_FILE_TYPE_PTS)
1507         (KINFO_FILE_TYPE_PROCDESC, KINFO_FILE_FD_TYPE_ROOT)
1508         (KINFO_FILE_FD_TYPE_JAIL, KINFO_FILE_FD_TYPE_TRACE)
1509         (KINFO_FILE_FD_TYPE_CTTY, KINFO_FILE_FLAG_READ)
1510         (KINFO_FILE_FLAG_WRITE, KINFO_FILE_FLAG_APPEND)
1511         (KINFO_FILE_FLAG_ASYNC, KINFO_FILE_FLAG_FSYNC)
1512         (KINFO_FILE_FLAG_NONBLOCK, KINFO_FILE_FLAG_DIRECT)
1513         (KINFO_FILE_FLAG_HASLOCK, KINFO_FILE_FLAG_EXEC)
1514         (KINFO_FILE_VTYPE_VREG, KINFO_FILE_VTYPE_VDIR)
1515         (KINFO_FILE_VTYPE_VCHR, KINFO_FILE_VTYPE_VLNK)
1516         (KINFO_FILE_VTYPE_VSOCK, KINFO_FILE_VTYPE_VFIFO, FBSD_AF_UNIX)
1517         (FBSD_AF_INET, FBSD_AF_INET6, FBSD_SOCK_STREAM, FBSD_SOCK_DGRAM)
1518         (FBSD_SOCK_SEQPACKET, FBSD_IPPROTO_ICMP, FBSD_IPPROTO_TCP)
1519         (FBSD_IPPROTO_UDP, FBSD_IPPROTO_SCTP): New defines.
1520         (struct fbsd_sockaddr_in, struct fbsd_sockaddr_in6)
1521         (struct fbsd_sockaddr_un): New types.
1522         (fbsd_file_fd, fbsd_file_type, fbsd_file_flags, fbsd_ipproto)
1523         (fbsd_print_sockaddr_in, fbsd_print_sockaddr_in6)
1524         (fbsd_info_proc_files_header, fbsd_info_proc_files_entry)
1525         (fbsd_core_info_proc_files): New functions.
1526         (fbsd_core_info_proc): List open file descriptors for IP_FILES and
1527         IP_ALL.
1528         * fbsd-tdep.h (fbsd_info_proc_files_header)
1529         (fbsd_info_proc_files_entry): New.
1530
1531 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1532
1533         * defs.h (enum info_proc_what) [IP_FILES]: New value.
1534         * infcmd.c (info_proc_cmd_files): New function.
1535         (_initialize_infcmd): Register 'info proc files' command.
1536
1537 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1538
1539         * gnulib/aclocal-m4-deps.mk: Re-generate.
1540         * gnulib/aclocal.m4: Re-generate.
1541         * gnulib/config.in: Re-generate.
1542         * gnulib/configure: Re-generate.
1543         * gnulib/import/Makefile.am: Re-generate.
1544         * gnulib/import/Makefile.in: Re-generate.
1545         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1546         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1547         * gnulib/import/arpa_inet.in.h: New file.
1548         * gnulib/import/inet_ntop.c: New file.
1549         * gnulib/import/m4/arpa_inet_h.m4: New file.
1550         * gnulib/import/m4/inet_ntop.m4: New file.
1551         * gnulib/import/m4/netinet_in_h.m4: New file.
1552         * gnulib/import/m4/socklen.m4: New file.
1553         * gnulib/import/m4/sockpfaf.m4: New file.
1554         * gnulib/import/m4/stdalign.m4: New file.
1555         * gnulib/import/m4/sys_uio_h.m4: New file.
1556         * gnulib/import/netinet_in.in.h: New file.
1557         * gnulib/import/stdalign.in.h: New file.
1558         * gnulib/import/sys_socket.c: New file.
1559         * gnulib/import/sys_socket.in.h: New file.
1560         * gnulib/import/sys_uio.in.h: New file.
1561         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add inet_ntop
1562         module.
1563
1564 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1565
1566         * gnulib/aclocal-m4-deps.mk: New file.
1567         * gnulib/update-gnulib.sh: Generate "aclocal-m4-deps.mk"
1568         deterministically.
1569
1570 2018-09-18  John Baldwin  <jhb@FreeBSD.org>
1571
1572         * fbsd-tdep.c (fbsd_core_vnode_path): Use KF_PATH instead of
1573         KVE_PATH.
1574
1575 2018-09-18  Tom Tromey  <tom@tromey.com>
1576
1577         * compile/compile-object-load.c (struct
1578         link_hash_table_cleanup_data): Add constructor and destructor.
1579         Use DISABLE_COPY_AND_ASSIGN.
1580         (~link_hash_table_cleanup_data): Rename from
1581         link_hash_table_free.  Now a destructor.
1582         (copy_sections): Use gdb::unique_xmalloc_ptr.  Remove cleanups.
1583
1584 2018-09-18  Tom Tromey  <tom@tromey.com>
1585
1586         * compile/compile-object-run.c (do_module_cleanup): Use delete.
1587         * compile/compile-object-load.c (struct munmap_list): Move to
1588         header file.
1589         (munmap_list::add): Rename from munmap_list_add; rewrite.
1590         (munmap_list::~munmap_list): Rename from munmap_list_free.
1591         (munmap_listp_free_cleanup): Remove.
1592         (compile_object_load): Update.
1593         * compile/compile-object-load.h (struct munmap_list): Move from
1594         compile-object-load.c.  Rewrite.
1595
1596 2018-09-18  Alan Hayward  <alan.hayward@arm.com>
1597
1598         * aarch64-tdep.c (pass_in_v): Use register size.
1599         (aarch64_extract_return_value): Likewise.
1600         (aarch64_store_return_value): Likewise.
1601
1602 2018-09-18  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1603
1604         * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to
1605         rlim_t.
1606
1607 2018-09-17  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1608
1609         * python/lib/gdb/command/frame_filters.py (EnableFrameFilter):
1610         Fix short help line.
1611
1612 2018-09-17  Tom Tromey  <tom@tromey.com>
1613
1614         PR python/20445:
1615         * configure: Rebuild.
1616         * configure.ac: Conditionally use -DNDEBUG for Python.
1617
1618 2018-09-17  Tom Tromey  <tom@tromey.com>
1619
1620         * configure: Rebuild.
1621         * configure.ac: Use gmp as a library dependency when checking for
1622         mpfr.
1623
1624 2018-09-17  Pedro Alves  <palves@redhat.com>
1625
1626         * python/py-inferior.c (find_inferior_object): Delete.
1627
1628 2018-09-17  Simon Marchi  <simon.marchi@ericsson.com>
1629
1630         * compile/compile-cplus-types.c
1631         (compile_cplus_instance::enter_scope): Don't use new_scope after
1632         std::move.
1633
1634 2018-09-17  Tom Tromey  <tom@tromey.com>
1635
1636         * common/pathstuff.c (get_standard_cache_dir): Use
1637         ~/Library/Caches on macOS.
1638         * common/pathstuff.h (get_standard_cache_dir): Update comment.
1639
1640 2018-09-17  Simon Marchi  <simon.marchi@polymtl.ca>
1641
1642         PR python/23669
1643         * breakpoint.c (commands_cmd_element): New.
1644         (_initialize_breakpoint): Assign commands_cmd_element.
1645         * breakpoint.h (commands_cmd_element): New.
1646         * cli/cli-script.c (while_cmd_element, if_command,
1647         define_cmd_element): New.
1648         (command_name_equals): Remove.
1649         (process_next_line): Compare commands by pointer, not by name.
1650         (_initialize_cli_script): Assign the various cmd_list_element
1651         variables.
1652         * compile/compile.c (compile_cmd_element): New.
1653         (_initialize_compile): Assign compile_cmd_element.
1654         * compile/compile.h (compile_cmd_element): New.
1655         * guile/guile.c (guile_cmd_element): New.
1656         (install_gdb_commands): Assign guile_cmd_element.
1657         * guile/guile.h (guile_cmd_element): New.
1658         * python/python.c (python_cmd_element): New.
1659         (_initialize_python): Assign python_cmd_element.
1660         * python/python.h (python_cmd_element): New.
1661         * tracepoint.c (while_stepping_cmd_element): New.
1662         (_initialize_tracepoint): Assign while_stepping_cmd_element.
1663         * tracepoint.h (while_stepping_cmd_element): New.
1664
1665 2018-09-17  Tom Tromey  <tom@tromey.com>
1666
1667         * infrun.c (save_infcall_suspend_state): Return
1668         infcall_suspend_state_up.
1669         (save_infcall_control_state): Return infcall_control_state_up.
1670         * inferior.h (save_infcall_suspend_state)
1671         (save_infcall_control_state): Declare later.  Return unique
1672         pointers.
1673
1674 2018-09-17  Tom Tromey  <tom@tromey.com>
1675
1676         * infrun.c (struct stop_context): Declare constructor,
1677         destructor, "changed" method.
1678         (stop_context::stop_context): Rename from save_stop_context.
1679         (stop_context::~stop_context): Rename from
1680         release_stop_context_cleanup.
1681         (normal_stop): Update.
1682         (stop_context::changed): Rename from stop_context_changed.  Return
1683         bool.
1684
1685 2018-09-17  Tom Tromey  <tom@tromey.com>
1686
1687         * inferior.h (struct infcall_suspend_state_deleter): New.
1688         (infcall_suspend_state_up): New typedef.
1689         (struct infcall_control_state_deleter): New.
1690         (infcall_control_state_up): New typedef.
1691         (make_cleanup_restore_infcall_suspend_state)
1692         (make_cleanup_restore_infcall_control_state): Don't declare.
1693         * infcall.c (call_function_by_hand_dummy): Update.
1694         * infrun.c (do_restore_infcall_suspend_state_cleanup)
1695         (make_cleanup_restore_infcall_suspend_state): Remove.
1696         (do_restore_infcall_control_state_cleanup)
1697         (make_cleanup_restore_infcall_control_state): Remove.
1698
1699 2018-09-17  Tom Tromey  <tom@tromey.com>
1700
1701         * gdbthread.h (struct thread_control_state): Add initializer.
1702         (class thread_info) <control>: Remove initializer.
1703         * inferior.h (struct inferior_control_state): Add initializer.
1704         (class inferior) <control>: Remove initializer.
1705         (exit_inferior_1): Update.
1706         * infrun.c (struct infcall_control_state): Add constructors.
1707         (save_infcall_control_state): Use new.
1708         (restore_infcall_control_state, discard_infcall_control_state):
1709         Use delete.
1710
1711 2018-09-17  Tom Tromey  <tom@tromey.com>
1712
1713         * infrun.c (struct infcall_suspend_state) <registers>: Now a
1714         unique_ptr.
1715         <siginfo_data>: Now a unique_xmalloc_ptr.
1716         (save_infcall_suspend_state, restore_infcall_suspend_state)
1717         (discard_infcall_suspend_state)
1718         (get_infcall_suspend_state_regcache): Update.
1719
1720 2018-09-17  Tom Tromey  <tom@tromey.com>
1721
1722         * gdbthread.h (struct thread_suspend_state): Add initializers.
1723         (class thread_info) <suspend>: Remove initializer.
1724         * infrun.c (struct infcall_suspend_state): Add initializers.
1725         (save_infcall_suspend_state): Use new.
1726         (discard_infcall_suspend_state): Use delete.
1727
1728 2018-09-16  Tom Tromey  <tom@tromey.com>
1729
1730         * python/python-internal.h (CPYCHECKER_STEALS_REFERENCE_TO_ARG):
1731         Remove.
1732         * python/py-varobj.c (py_varobj_iter_ctor): Change pyiter to
1733         rvalue reference.  Remove CPYCHECKER_STEALS_REFERENCE_TO_ARG.
1734         (py_varobj_iter_new): Likewise.
1735         (py_varobj_get_iterator): Use gdbpy_ref.
1736
1737 2018-09-16  Tom Tromey  <tom@tromey.com>
1738
1739         * python/py-threadevent.c (py_get_event_thread): Simplify.
1740         * python/py-inferior.c (infpy_thread_from_thread_handle):
1741         Return immediately after calling thread_to_thread_object.  Use
1742         Py_RETURN_NONE.
1743         (thread_to_thread_object): Set the exception on a NULL return.
1744
1745 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
1746
1747         * Makefile.in (LIBGDB_OBS): Sort COMMON_OBS.
1748
1749 2018-09-16  Tom Tromey  <tom@tromey.com>
1750
1751         * python/python-internal.h (CPYCHECKER_RETURNS_BORROWED_REF):
1752         Remove.
1753
1754 2018-09-16  Tom Tromey  <tom@tromey.com>
1755
1756         * python/python-internal.h (thread_to_thread_object): Change
1757         return type.
1758         * python/py-inferior.c (thread_to_thread_object): Return a new
1759         reference.
1760         (infpy_thread_from_thread_handle): Update.
1761         * python/py-infthread.c (gdbpy_selected_thread): Update.
1762         * python/py-stopevent.c (create_stop_event_object): Update.
1763         * python/py-threadevent.c (py_get_event_thread): Return a new
1764         reference.
1765         (py_get_event_thread): Update.
1766         * python/py-event.h (py_get_event_thread): Change return type.
1767         * python/py-continueevent.c (create_continue_event_object):
1768         Update.
1769
1770 2018-09-16  Tom Tromey  <tom@tromey.com>
1771
1772         * python/py-progspace.c (pspy_get_objfiles): Update.
1773         * python/python-internal.h (objfile_to_objfile_object): Change
1774         return type.
1775         * python/py-newobjfileevent.c (create_new_objfile_event_object):
1776         Update.
1777         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1778         Update.
1779         * python/python.c (gdbpy_get_current_objfile): Update.
1780         (gdbpy_objfiles): Update.
1781         * python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
1782         Update.
1783         (objfile_to_objfile_object): Return a new reference.
1784         * python/py-symtab.c (stpy_get_objfile): Update.
1785         * python/py-prettyprint.c (find_pretty_printer_from_objfiles):
1786         Update.
1787
1788 2018-09-16  Tom Tromey  <tom@tromey.com>
1789
1790         * python/py-inferior.c (infpy_get_progspace): Update.
1791         * python/python-internal.h (pspace_to_pspace_object): Change
1792         return type.
1793         * python/py-newobjfileevent.c
1794         (create_clear_objfiles_event_object): Update.
1795         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
1796         Update.
1797         * python/python.c (gdbpy_get_current_progspace): Update.
1798         (gdbpy_progspaces): Update.
1799         * python/py-progspace.c (pspace_to_pspace_object): Return a new
1800         reference.
1801         * python/py-objfile.c (objfpy_get_progspace): Update.
1802         * python/py-prettyprint.c (find_pretty_printer_from_progspace):
1803         Update.
1804
1805 2018-09-16  Tom Tromey  <tom@tromey.com>
1806
1807         * python/lib/gdb/__init__.py (current_progspace, objfiles)
1808         (solib_name, block_for_pc, find_pc_line): New functions.
1809         (execute_unwinders): Update.
1810         * python/py-block.c (gdbpy_block_for_pc): Remove.
1811         * python/py-inferior.c (infpy_get_progspace): New function.
1812         (inferior_object_getset) <progspace>: Add.
1813         * python/py-progspace.c (pspy_objfiles): Rewrite.
1814         (pspy_solib_name, pspy_block_for_pc)
1815         (pspy_find_pc_line, pspy_is_valid): New functions.
1816         (progspace_object_methods): Add entries for solib_name,
1817         block_for_pc, find_pc_line, is_valid.
1818         * python/python-internal.h (gdbpy_block_for_pc)
1819         (build_objfiles_list): Don't declare.
1820         * python/python.c: Don't include solib.h.
1821         (gdbpy_solib_name, gdbpy_find_pc_line)
1822         (gdbpy_get_current_progspace, build_objfiles_list)
1823         (gdbpy_objfiles): Remove.
1824         (GdbMethods) <current_progspace, objfiles, block_for_pc,
1825         solib_name, find_pc_line>: Remove entries.
1826
1827 2018-09-16  Tom Tromey  <tom@tromey.com>
1828
1829         * top.c (new_ui_command): Use GNU style for metasyntactic
1830         variables.
1831         * breakpoint.c (stopat_command): Use GNU style for metasyntactic
1832         variables.
1833         * maint.c (maintenance_translate_address): Remove "<>" around
1834         text.
1835         * interps.c (interpreter_exec_cmd): Use GNU style for
1836         metasyntactic variables.
1837         * nto-procfs.c (nto_procfs_target_info): Use GNU style for
1838         metasyntactic variables.
1839         * tracepoint.c (tfind_range_command): Use GNU style for
1840         metasyntactic variables.
1841         (tfind_outside_command): Likewise.
1842         (_initialize_tracepoint): Likewise.
1843         * remote.c (extended_remote_target::create_inferior): Use GNU
1844         style for metasyntactic variables.
1845         * sparc64-tdep.c (adi_examine_command): Use GNU style for
1846         metasyntactic variables.
1847         (adi_assign_command): Likewise.
1848
1849 2018-09-16  Tom Tromey  <tom@tromey.com>
1850
1851         * disasm.c (show_disassembler_options_sfunc): Use GNU style for
1852         metasyntactic variables.  Print message if no disassembler options
1853         are available.
1854
1855 2018-09-15  Tom Tromey  <tom@tromey.com>
1856
1857         * infcmd.c (get_inferior_args): Return const char *.
1858         * inferior.h (get_inferior_args): Return type now const.
1859         * linux-tdep.c (linux_fill_prpsinfo): Update.
1860         * procfs.c (procfs_target::make_corefile_notes): Update.
1861
1862 2018-09-07  Tom Tromey  <tom@tromey.com>
1863
1864         * python/python.c (execute_gdb_command): Call bpstat_do_actions
1865         inside the TRY.
1866
1867 2018-09-14  Sandra Loosemore  <sandra@codesourcery.com>
1868
1869         * nios2-tdep.c (nios2_type_align): New.
1870         (nios2_gdb_arch_init): Install type_align hook.
1871
1872 2018-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
1873
1874         * eval.c (fake_method::fake_method): Call xzalloc directly for a
1875         type that is neither object file owned, nor gdbarch owned.
1876         * gdbtypes.c (get_type_gdbarch): Add an assert that returned
1877         gdbarch is non-NULL.
1878         (alloc_type_instance): Allocate non-objfile owned types on the
1879         gdbarch obstack.
1880         (copy_type_recursive): Allocate TYPE_FIELDS and TYPE_RANGE_DATA
1881         using TYPE_ALLOC to ensure memory is allocated on the correct
1882         obstack.
1883         * gdbtypes.h (TYPE_ALLOC): Allocate space on either the objfile
1884         obstack, or the gdbarch obstack.
1885         (TYPE_ZALLOC): Rewrite using TYPE_ALLOC.
1886
1887 2018-09-14  Tom Tromey  <tom@tromey.com>
1888
1889         * infcall.c (call_function_by_hand_dummy): Remove unnecessary
1890         block.
1891
1892 2018-09-14  Tom Tromey  <tom@tromey.com>
1893
1894         * nat/fork-inferior.c (get_startup_shell): Remove "static".
1895
1896 2018-09-13  Tom Tromey  <tom@tromey.com>
1897
1898         * python/py-inferior.c (infpy_thread_from_thread_handle): Now
1899         static.
1900
1901 2018-09-13  Tom Tromey  <tom@tromey.com>
1902
1903         * exec.c (try_open_exec_file): Use std::string.
1904
1905 2018-09-13  Tom Tromey  <tom@tromey.com>
1906
1907         * utils.h (gdb_bfd_errmsg): Return std::string.
1908         * exec.c (exec_file_attach): Update.
1909         * compile/compile-object-load.c (compile_object_load): Update.
1910         * utils.c (gdb_bfd_errmsg): Return std::string.
1911
1912 2018-09-13  Tom Tromey  <tom@tromey.com>
1913
1914         * procfs.c (struct procinfo_deleter): New.
1915         (procinfo_up): New typedef.
1916         (do_destroy_procinfo_cleanup): Remove.
1917         (procfs_target::info_proc): Use procinfo_up.  Remove cleanups.
1918
1919 2018-09-13  Tom Tromey  <tom@tromey.com>
1920
1921         * source.c (add_path): Use gdb::unique_xmalloc_ptr.
1922
1923 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1924 2018-09-13  Tom Tromey  <tom@tromey.com>
1925
1926         * python/py-progspace.c (PSPY_REQUIRE_VALID): New macro.
1927         (pspy_get_objfiles): New function.
1928         (progspace_object_methods): New.
1929         (pspace_object_type): Add tp_methods callback.
1930         * python/python-internal.h (build_objfiles_list): New
1931         declaration.
1932         * python/python.c (build_objfiles_list): New function.
1933         (gdbpy_objfiles): Implement using build_objfiles_list.
1934         * NEWS: Mention the Progspace.objfiles method.
1935
1936 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1937
1938         * python/py-inferior.c (infpy_get_progspace): New function.
1939         (inferior_object_getset): Add progspace property.
1940         * NEWS: Mention the new property.
1941
1942 2018-09-13  Tom Tromey  <tom@tromey.com>
1943
1944         PR rust/23650:
1945         * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
1946
1947 2018-09-13  Tom Tromey  <tom@tromey.com>
1948
1949         PR rust/23626:
1950         * rust-lang.c (rust_enum_variant): Now static.
1951         (rust_empty_enum_p): New function.
1952         (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
1953         Handle empty enum.
1954
1955 2018-09-13  Simon Marchi  <simon.marchi@ericsson.com>
1956
1957         * python/py-inferior.c (infpy_repr): New.
1958         (inferior_object_type): Register infpy_repr.
1959         * python/py-objfile.c (objfpy_repr): New.
1960         (objfile_object_type): Register objfpy_repr.
1961
1962 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1963
1964         * fbsd-nat.c (fbsd_nat_target::info_proc): Remove unused variable.
1965
1966 2018-09-12  John Baldwin  <jhb@FreeBSD.org>
1967
1968         * aarch64-fbsd-tdep.h (AARCH64_FBSD_SIZEOF_GREGSET): Fix comment
1969         typo.
1970
1971 2018-09-12  Sergio Durigan Junior  <sergiodj@redhat.com>
1972
1973         * common/common-utils.c: Don't include '<sys/stat.h>'.
1974         (is_regular_file): Move to...
1975         * common/filestuff.c (is_regular_file): ... here.
1976         * common/common-utils.h (is_regular_file): Move to...
1977         * common/filestuff.h (is_regular_file): ... here.
1978
1979 2018-09-12  Simon Marchi  <simon.marchi@ericsson.com>
1980
1981         * skip.c (debug_skip): New variable.
1982         (skiplist_entry::do_skip_file_p): Add debug output.
1983         (skiplist_entry::do_skip_gfile_p): Likewise.
1984         (skiplist_entry::skip_function_p): Likewise.
1985         (_initialize_step_skip): Create debug command.
1986         * NEWS: Mention set/show debug skip.
1987
1988 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1989
1990         * darwin-nat.c (should_disable_startup_with_shell):
1991         New function.
1992         (darwin_nat_target::create_inferior): Add call.
1993
1994 2018-09-11  Xavier Roirand  <roirand@adacore.com>
1995
1996         * darwin-nat.h (struct darwin_thread_info) <gdb_port,
1997         inf_port, msg_state>: Initialize.
1998         (struct darwin_thread_info) <signaled, single_step>: Change
1999         type and initialize.
2000         (struct darwin_thread_info) <event>: Initialize.
2001
2002 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2003
2004         PR gdb/23555
2005         PR gdb/23558
2006         * gnulib/import/m4/getcwd-path-max.m4: Add cross-compilation
2007         guesses.
2008
2009 2018-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2010
2011         Revert:
2012         2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2013
2014         PR gdb/23555
2015         PR gdb/23558
2016         * gnulib/aclocal.m4: Regenerate.
2017         * gnulib/config.in: Regenerate.
2018         * gnulib/configure: Regenerate.
2019         * gnulib/import/Makefile.am: Update.
2020         * gnulib/import/Makefile.in: Update.
2021         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2022         * gnulib/import/_Noreturn.h: ... this.
2023         * gnulib/import/alloca.in.h: Update.
2024         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2025         * gnulib/import/arg-nonnull.h: ... this.
2026         * gnulib/import/assure.h: Update.
2027         * gnulib/import/at-func.c: Update.
2028         * gnulib/import/basename-lgpl.c: Update.
2029         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2030         * gnulib/import/c++defs.h: ... this.
2031         * gnulib/import/canonicalize-lgpl.c: Update.
2032         * gnulib/import/cdefs.h: Update.
2033         * gnulib/import/chdir-long.c: Update.
2034         * gnulib/import/chdir-long.h: Update.
2035         * gnulib/import/cloexec.c: Update.
2036         * gnulib/import/cloexec.h: Update.
2037         * gnulib/import/close.c: Update.
2038         * gnulib/import/closedir.c: Update.
2039         * gnulib/import/config.charset: Update.
2040         * gnulib/import/dirent-private.h: Update.
2041         * gnulib/import/dirent.in.h: Update.
2042         * gnulib/import/dirfd.c: Update.
2043         * gnulib/import/dirname-lgpl.c: Update.
2044         * gnulib/import/dirname.h: Update.
2045         * gnulib/import/dosname.h: Update.
2046         * gnulib/import/dup-safer-flag.c: Update.
2047         * gnulib/import/dup-safer.c: Update.
2048         * gnulib/import/dup.c: Update.
2049         * gnulib/import/dup2.c: Update.
2050         * gnulib/import/errno.in.h: Update.
2051         * gnulib/import/error.c: Update.
2052         * gnulib/import/error.h: Update.
2053         * gnulib/import/exitfail.c: Update.
2054         * gnulib/import/exitfail.h: Update.
2055         * gnulib/import/extra/update-copyright: Update.
2056         * gnulib/import/fchdir.c: Update.
2057         * gnulib/import/fcntl.c: Update.
2058         * gnulib/import/fcntl.in.h: Update.
2059         * gnulib/import/fd-hook.c: Update.
2060         * gnulib/import/fd-hook.h: Update.
2061         * gnulib/import/fd-safer-flag.c: Update.
2062         * gnulib/import/fd-safer.c: Update.
2063         * gnulib/import/fdopendir.c: Update.
2064         * gnulib/import/filename.h: Update.
2065         * gnulib/import/filenamecat-lgpl.c: Update.
2066         * gnulib/import/filenamecat.h: Update.
2067         * gnulib/import/flexmember.h: Update.
2068         * gnulib/import/float+.h: Update.
2069         * gnulib/import/float.c: Update.
2070         * gnulib/import/float.in.h: Update.
2071         * gnulib/import/fnmatch.c: Update.
2072         * gnulib/import/fnmatch.in.h: Update.
2073         * gnulib/import/fnmatch_loop.c: Update.
2074         * gnulib/import/fpucw.h: Update.
2075         * gnulib/import/frexp.c: Update.
2076         * gnulib/import/frexpl.c: Update.
2077         * gnulib/import/fstat.c: Update.
2078         * gnulib/import/fstatat.c: Update.
2079         * gnulib/import/getcwd-lgpl.c: Update.
2080         * gnulib/import/getcwd.c: Update.
2081         * gnulib/import/getdtablesize.c: Update.
2082         * gnulib/import/getlogin_r.c: Update.
2083         * gnulib/import/getprogname.c: Update.
2084         * gnulib/import/getprogname.h: Update.
2085         * gnulib/import/gettext.h: Update.
2086         * gnulib/import/gettimeofday.c: Update.
2087         * gnulib/import/glob-libc.h: Update.
2088         * gnulib/import/glob.c: Update.
2089         * gnulib/import/glob.in.h: Update.
2090         * gnulib/import/glob_internal.h: Update.
2091         * gnulib/import/glob_pattern_p.c: Update.
2092         * gnulib/import/globfree.c: Update.
2093         * gnulib/import/hard-locale.c: Update.
2094         * gnulib/import/hard-locale.h: Update.
2095         * gnulib/import/intprops.h: Update.
2096         * gnulib/import/inttypes.in.h: Update.
2097         * gnulib/import/isnan.c: Update.
2098         * gnulib/import/isnand-nolibm.h: Update.
2099         * gnulib/import/isnand.c: Update.
2100         * gnulib/import/isnanl-nolibm.h: Update.
2101         * gnulib/import/isnanl.c: Update.
2102         * gnulib/import/itold.c: Update.
2103         * gnulib/import/libc-config.h: Update.
2104         * gnulib/import/limits.in.h: Update.
2105         * gnulib/import/localcharset.c: Update.
2106         * gnulib/import/localcharset.h: Update.
2107         * gnulib/import/localtime-buffer.c: Update.
2108         * gnulib/import/localtime-buffer.h: Update.
2109         * gnulib/import/lstat.c: Update.
2110         * gnulib/import/m4/00gnulib.m4: Update.
2111         * gnulib/import/m4/__inline.m4: Update.
2112         * gnulib/import/m4/absolute-header.m4: Update.
2113         * gnulib/import/m4/alloca.m4: Update.
2114         * gnulib/import/m4/builtin-expect.m4: Update.
2115         * gnulib/import/m4/canonicalize.m4: Update.
2116         * gnulib/import/m4/chdir-long.m4: Update.
2117         * gnulib/import/m4/close.m4: Update.
2118         * gnulib/import/m4/closedir.m4: Update.
2119         * gnulib/import/m4/configmake.m4: Update.
2120         * gnulib/import/m4/d-ino.m4: Update.
2121         * gnulib/import/m4/d-type.m4: Update.
2122         * gnulib/import/m4/dirent_h.m4: Update.
2123         * gnulib/import/m4/dirfd.m4: Update.
2124         * gnulib/import/m4/dirname.m4: Update.
2125         * gnulib/import/m4/double-slash-root.m4: Update.
2126         * gnulib/import/m4/dup.m4: Update.
2127         * gnulib/import/m4/dup2.m4: Update.
2128         * gnulib/import/m4/eealloc.m4: Update.
2129         * gnulib/import/m4/environ.m4: Update.
2130         * gnulib/import/m4/errno_h.m4: Update.
2131         * gnulib/import/m4/error.m4: Update.
2132         * gnulib/import/m4/exponentd.m4: Update.
2133         * gnulib/import/m4/exponentl.m4: Update.
2134         * gnulib/import/m4/extensions.m4: Update.
2135         * gnulib/import/m4/extern-inline.m4: Update.
2136         * gnulib/import/m4/fchdir.m4: Update.
2137         * gnulib/import/m4/fcntl-o.m4: Update.
2138         * gnulib/import/m4/fcntl.m4: Update.
2139         * gnulib/import/m4/fcntl_h.m4: Update.
2140         * gnulib/import/m4/fdopendir.m4: Update.
2141         * gnulib/import/m4/filenamecat.m4: Update.
2142         * gnulib/import/m4/flexmember.m4: Update.
2143         * gnulib/import/m4/float_h.m4: Update.
2144         * gnulib/import/m4/fnmatch.m4: Update.
2145         * gnulib/import/m4/fnmatch_h.m4: Update.
2146         * gnulib/import/m4/fpieee.m4: Update.
2147         * gnulib/import/m4/frexp.m4: Update.
2148         * gnulib/import/m4/frexpl.m4: Update.
2149         * gnulib/import/m4/fstat.m4: Update.
2150         * gnulib/import/m4/fstatat.m4: Update.
2151         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2152         * gnulib/import/m4/getcwd-path-max.m4: Update.
2153         * gnulib/import/m4/getcwd.m4: Update.
2154         * gnulib/import/m4/getdtablesize.m4: Update.
2155         * gnulib/import/m4/getlogin.m4: Update.
2156         * gnulib/import/m4/getlogin_r.m4: Update.
2157         * gnulib/import/m4/getpagesize.m4: Update.
2158         * gnulib/import/m4/getprogname.m4: Update.
2159         * gnulib/import/m4/gettimeofday.m4: Update.
2160         * gnulib/import/m4/glibc21.m4: Update.
2161         * gnulib/import/m4/glob.m4: Update.
2162         * gnulib/import/m4/glob_h.m4: Update.
2163         * gnulib/import/m4/gnulib-cache.m4: Update.
2164         * gnulib/import/m4/gnulib-common.m4: Update.
2165         * gnulib/import/m4/gnulib-comp.m4: Update.
2166         * gnulib/import/m4/gnulib-tool.m4: Update.
2167         * gnulib/import/m4/hard-locale.m4: Update.
2168         * gnulib/import/m4/include_next.m4: Update.
2169         * gnulib/import/m4/inttypes-pri.m4: Update.
2170         * gnulib/import/m4/inttypes.m4: Update.
2171         * gnulib/import/m4/isnand.m4: Update.
2172         * gnulib/import/m4/isnanl.m4: Update.
2173         * gnulib/import/m4/largefile.m4: Update.
2174         * gnulib/import/m4/limits-h.m4: Update.
2175         * gnulib/import/m4/localcharset.m4: Update.
2176         * gnulib/import/m4/locale-fr.m4: Update.
2177         * gnulib/import/m4/locale-ja.m4: Update.
2178         * gnulib/import/m4/locale-zh.m4: Update.
2179         * gnulib/import/m4/localtime-buffer.m4: Update.
2180         * gnulib/import/m4/longlong.m4: Update.
2181         * gnulib/import/m4/lstat.m4: Update.
2182         * gnulib/import/m4/malloc.m4: Update.
2183         * gnulib/import/m4/malloca.m4: Update.
2184         * gnulib/import/m4/math_h.m4: Update.
2185         * gnulib/import/m4/mbrtowc.m4: Update.
2186         * gnulib/import/m4/mbsinit.m4: Update.
2187         * gnulib/import/m4/mbsrtowcs.m4: Update.
2188         * gnulib/import/m4/mbstate_t.m4: Update.
2189         * gnulib/import/m4/memchr.m4: Update.
2190         * gnulib/import/m4/memmem.m4: Update.
2191         * gnulib/import/m4/mempcpy.m4: Update.
2192         * gnulib/import/m4/memrchr.m4: Update.
2193         * gnulib/import/m4/mkdir.m4: Update.
2194         * gnulib/import/m4/mkstemp.m4: Update.
2195         * gnulib/import/m4/mmap-anon.m4: Update.
2196         * gnulib/import/m4/mode_t.m4: Update.
2197         * gnulib/import/m4/msvc-inval.m4: Update.
2198         * gnulib/import/m4/msvc-nothrow.m4: Update.
2199         * gnulib/import/m4/multiarch.m4: Update.
2200         * gnulib/import/m4/nocrash.m4: Update.
2201         * gnulib/import/m4/off_t.m4: Update.
2202         * gnulib/import/m4/onceonly.m4: Update.
2203         * gnulib/import/m4/open-cloexec.m4: Update.
2204         * gnulib/import/m4/open.m4: Update.
2205         * gnulib/import/m4/openat.m4: Update.
2206         * gnulib/import/m4/opendir.m4: Update.
2207         * gnulib/import/m4/pathmax.m4: Update.
2208         * gnulib/import/m4/rawmemchr.m4: Update.
2209         * gnulib/import/m4/readdir.m4: Update.
2210         * gnulib/import/m4/readlink.m4: Update.
2211         * gnulib/import/m4/realloc.m4: Update.
2212         * gnulib/import/m4/rename.m4: Update.
2213         * gnulib/import/m4/rewinddir.m4: Update.
2214         * gnulib/import/m4/rmdir.m4: Update.
2215         * gnulib/import/m4/save-cwd.m4: Update.
2216         * gnulib/import/m4/secure_getenv.m4: Update.
2217         * gnulib/import/m4/setenv.m4: Update.
2218         * gnulib/import/m4/signal_h.m4: Update.
2219         * gnulib/import/m4/ssize_t.m4: Update.
2220         * gnulib/import/m4/stat-time.m4: Update.
2221         * gnulib/import/m4/stat.m4: Update.
2222         * gnulib/import/m4/std-gnu11.m4: Update.
2223         * gnulib/import/m4/stdbool.m4: Update.
2224         * gnulib/import/m4/stddef_h.m4: Update.
2225         * gnulib/import/m4/stdint.m4: Update.
2226         * gnulib/import/m4/stdio_h.m4: Update.
2227         * gnulib/import/m4/stdlib_h.m4: Update.
2228         * gnulib/import/m4/strchrnul.m4: Update.
2229         * gnulib/import/m4/strdup.m4: Update.
2230         * gnulib/import/m4/strerror.m4: Update.
2231         * gnulib/import/m4/string_h.m4: Update.
2232         * gnulib/import/m4/strstr.m4: Update.
2233         * gnulib/import/m4/strtok_r.m4: Update.
2234         * gnulib/import/m4/sys_socket_h.m4: Update.
2235         * gnulib/import/m4/sys_stat_h.m4: Update.
2236         * gnulib/import/m4/sys_time_h.m4: Update.
2237         * gnulib/import/m4/sys_types_h.m4: Update.
2238         * gnulib/import/m4/tempname.m4: Update.
2239         * gnulib/import/m4/time_h.m4: Update.
2240         * gnulib/import/m4/unistd-safer.m4: Update.
2241         * gnulib/import/m4/unistd_h.m4: Update.
2242         * gnulib/import/m4/warn-on-use.m4: Update.
2243         * gnulib/import/m4/wchar_h.m4: Update.
2244         * gnulib/import/m4/wchar_t.m4: Update.
2245         * gnulib/import/m4/wctype_h.m4: Update.
2246         * gnulib/import/m4/wint_t.m4: Update.
2247         * gnulib/import/malloc.c: Update.
2248         * gnulib/import/malloc/scratch_buffer.h: Update.
2249         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
2250         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
2251         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
2252         * gnulib/import/malloca.c: Update.
2253         * gnulib/import/malloca.h: Update.
2254         * gnulib/import/malloca.valgrind: Update.
2255         * gnulib/import/math.in.h: Update.
2256         * gnulib/import/mbrtowc.c: Update.
2257         * gnulib/import/mbsinit.c: Update.
2258         * gnulib/import/mbsrtowcs-impl.h: Update.
2259         * gnulib/import/mbsrtowcs-state.c: Update.
2260         * gnulib/import/mbsrtowcs.c: Update.
2261         * gnulib/import/memchr.c: Update.
2262         * gnulib/import/memmem.c: Update.
2263         * gnulib/import/mempcpy.c: Update.
2264         * gnulib/import/memrchr.c: Update.
2265         * gnulib/import/mkdir.c: Update.
2266         * gnulib/import/mkstemp.c: Update.
2267         * gnulib/import/msvc-inval.c: Update.
2268         * gnulib/import/msvc-inval.h: Update.
2269         * gnulib/import/msvc-nothrow.c: Update.
2270         * gnulib/import/msvc-nothrow.h: Update.
2271         * gnulib/import/open.c: Update.
2272         * gnulib/import/openat-die.c: Update.
2273         * gnulib/import/openat-priv.h: Update.
2274         * gnulib/import/openat-proc.c: Update.
2275         * gnulib/import/openat.c: Update.
2276         * gnulib/import/openat.h: Update.
2277         * gnulib/import/opendir.c: Update.
2278         * gnulib/import/pathmax.h: Update.
2279         * gnulib/import/pipe-safer.c: Update.
2280         * gnulib/import/rawmemchr.c: Update.
2281         * gnulib/import/readdir.c: Update.
2282         * gnulib/import/readlink.c: Update.
2283         * gnulib/import/realloc.c: Update.
2284         * gnulib/import/ref-add.sin: Update.
2285         * gnulib/import/ref-del.sin: Update.
2286         * gnulib/import/rename.c: Update.
2287         * gnulib/import/rewinddir.c: Update.
2288         * gnulib/import/rmdir.c: Update.
2289         * gnulib/import/same-inode.h: Update.
2290         * gnulib/import/save-cwd.c: Update.
2291         * gnulib/import/save-cwd.h: Update.
2292         * gnulib/import/scratch_buffer.h: Update.
2293         * gnulib/import/secure_getenv.c: Update.
2294         * gnulib/import/setenv.c: Update.
2295         * gnulib/import/signal.in.h: Update.
2296         * gnulib/import/stat-time.c: Update.
2297         * gnulib/import/stat-time.h: Update.
2298         * gnulib/import/stat-w32.c: Update.
2299         * gnulib/import/stat-w32.h: Update.
2300         * gnulib/import/stat.c: Update.
2301         * gnulib/import/stdbool.in.h: Update.
2302         * gnulib/import/stddef.in.h: Update.
2303         * gnulib/import/stdint.in.h: Update.
2304         * gnulib/import/stdio.in.h: Update.
2305         * gnulib/import/stdlib.in.h: Update.
2306         * gnulib/import/str-two-way.h: Update.
2307         * gnulib/import/strchrnul.c: Update.
2308         * gnulib/import/strdup.c: Update.
2309         * gnulib/import/streq.h: Update.
2310         * gnulib/import/strerror-override.c: Update.
2311         * gnulib/import/strerror-override.h: Update.
2312         * gnulib/import/strerror.c: Update.
2313         * gnulib/import/string.in.h: Update.
2314         * gnulib/import/stripslash.c: Update.
2315         * gnulib/import/strnlen1.c: Update.
2316         * gnulib/import/strnlen1.h: Update.
2317         * gnulib/import/strstr.c: Update.
2318         * gnulib/import/strtok_r.c: Update.
2319         * gnulib/import/sys_stat.in.h: Update.
2320         * gnulib/import/sys_time.in.h: Update.
2321         * gnulib/import/sys_types.in.h: Update.
2322         * gnulib/import/tempname.c: Update.
2323         * gnulib/import/tempname.h: Update.
2324         * gnulib/import/time.in.h: Update.
2325         * gnulib/import/unistd--.h: Update.
2326         * gnulib/import/unistd-safer.h: Update.
2327         * gnulib/import/unistd.in.h: Update.
2328         * gnulib/import/unsetenv.c: Update.
2329         * gnulib/import/verify.h: Update.
2330         * gnulib/import/extra/snippet/warn-on-use.h: Update.
2331         * gnulib/import/wchar.in.h: Update.
2332         * gnulib/import/wctype.in.h: Update.
2333         * gnulib/import/xalloc-oversized.h: Update.
2334         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
2335         "53e2c179f26a890fa6685af4b6c1397ee370433b".
2336
2337 2018-09-10  Simon Marchi  <simon.marchi@ericsson.com>
2338
2339         * record-btrace.c (get_thread_current_frame): Remove
2340         old_inferior_ptid.
2341
2342 2018-09-10  Jerome Guitton  <guitton@adacore.com>
2343
2344         * ada-lang.c (ada_value_struct_elt): Call ada_to_fixed_type
2345         with check_tag to 1 if and only if the type is tagged and the
2346         component being searched cannot been found in the current
2347         view. Otherwise, always call ada_to_fixed_type with
2348         check_tag to 0.
2349
2350 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2351
2352         * ada-lang.c (ada_is_access_to_unconstrained_array): Remove static
2353         declaration.
2354         * ada-lang.h: add ada_is_access_to_unconstrained_array prototype.
2355         * ada-varobj.c (ada_varobj_get_number_of_children,
2356         ada_varobj_describe_child, ada_value_is_changeable_p): Cleanup code.
2357
2358 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2359
2360         * ada-valprint.c (ada_value_print): Use type instead of
2361         enclosing type.
2362
2363 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2364
2365         * ada-lang.c (ada_value_subscript): Handle case when parameter is
2366         an array of access to unconstrained array.
2367
2368 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2369
2370         * ada-lang.c (ada_is_access_to_unconstrained_array): New function.
2371         (ada_check_typedef): Use it.
2372
2373 2018-09-10  Xavier Roirand  <roirand@adacore.com>
2374
2375         * ada-varobj.c (ada_varobj_describe_struct_child)
2376         (ada_varobj_describe_child): Handle union case like struct one.
2377
2378 2018-09-10  Tom Tromey  <tom@tromey.com>
2379
2380         PR python/18380:
2381         * python/python.c (_initialize_python): Make example in "python"
2382         help work in Python 3.
2383
2384 2018-09-10  Eli Zaretskii  <eliz@gnu.org>
2385
2386         * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
2387         INSTALL_PROGRAM to install gdb-add-index.sh.  Don't append
2388         $(EXEEXT) to the script, as it is not a program.
2389
2390 2018-09-09  Simon Marchi  <simon.marchi@ericsson.com>
2391
2392         * python/py-prettyprint.c (pretty_print_one_value): Return
2393         gdbpy_ref<>.
2394         (print_string_repr): Adjust.
2395         (apply_varobj_pretty_printer): Return gdbpy_ref<>.
2396         * python/python-internal.h (apply_varobj_pretty_printer): Return
2397         gdbpy_ref<>.
2398         * varobj.c (varobj_value_get_print_value): Adjust.
2399
2400 2018-09-08  Tom Tromey  <tom@tromey.com>
2401
2402         PR python/16047:
2403         * python/py-prettyprint.c (pretty_print_one_value): Check for
2404         to_string method.
2405
2406 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2407
2408         * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
2409         replace_operator_with_call.
2410
2411 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2412
2413         * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
2414
2415 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2416
2417         * ada-typeprint.c (print_range): Print the bounds using TYPE
2418         rather than its TYPE_TARGET_TYPE.
2419
2420 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2421
2422         * ada-lang.c (ada_to_fixed_value): Minor reformatting in
2423         call to ada_to_fixed_value_create.
2424
2425 2018-09-08  Jerome Guitton  <guitton@adacore.com>
2426
2427         * ada-lang.c (ada_decode): strip dot prefix in symbol name.
2428
2429 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2430
2431         * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
2432         by calls to error.
2433
2434 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2435
2436         * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
2437         Move update of loop variable "fi".
2438
2439 2018-09-08  Joel Brobecker  <brobecker@adacore.com>
2440
2441         * ada-lang.c (value_assign_to_component): In the case of
2442         big-endian targets, extract the bits of the given VAL
2443         using an src_offset of zero if container is not a scalar.
2444
2445 2018-09-06  Simon Ser  <contact@emersion.fr>
2446
2447         PR gdb/23105
2448         * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
2449         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2450         * fbsd-tdep.c (fbsd_make_note_desc): New.
2451         (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
2452         NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
2453         * target.h (enum target_object) Add FreeBSD-specific
2454         TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
2455
2456 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2457
2458         * compile/compile-c.h (generate_c_for_variable_locations):
2459         Change reference to pointer.
2460         * compile/compile-c-support.c (compile_program) <compute>:
2461         Likewise.
2462         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
2463         (generate_c_for_for_one_variable): Likewise
2464         (generate_c_for_variable_locations): Likewise
2465         * compile/compile-c-types.c (compile_c_instance::convert_type):
2466         Likewise
2467         * compile/compile-cplus-symbols.c (convert_one_symbol):
2468         std::move the scope passed to enter_scope.
2469         * compile/compile-cplus-types.c
2470         (compile_cplus_instance::enter_scope): Make parameter
2471         rvalue-reference.
2472         (compile_cplus_instance::new_scope): Change reference to
2473         pointer.
2474         (compile_cplus_instance::convert_type): Likewise
2475         (compile_cplus_convert_typedef): std::move the scope passed to
2476         enter_scope.
2477         (compile_cplus_convert_struct_or_union): Likewise.
2478         (compile_cplus_convert_enum): Likewise.
2479         (compile_cplus_convert_namespace): Likewise.
2480         * compile/compile-cplus.h (compile_cplus_instance)
2481         <enter_scope>: Make parameter rvalue-reference.
2482         * compile/compile-internal.h (compile_instance)
2483         <get_cached_type>: Likewise
2484         * compile/compile-loc2c.c (push): Likewise
2485         (pushf): Likewise
2486         (unary): Likewise
2487         (binary): Likewise
2488         (print_label): Likewise
2489         (pushf_register_address): Likewise
2490         (pushf_register): Likewise
2491         (do_compile_dwarf_expr_to_c): Likewise
2492         (compile_dwarf_expr_to_c): Likewise
2493         (compile_dwarf_bounds_to_c): Likewise
2494         * compile/compile.c (compile_instance::get_cached_type):
2495         Likewise
2496         * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
2497         (compile_dwarf_bounds_to_c): Likewise
2498         * dwarf2loc.c (locexpr_generate_c_location): Likewise.
2499         (dwarf2_compile_property_to_c): Likewise
2500         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
2501         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
2502         Likewise
2503
2504 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2505
2506         * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
2507         * tui/tui-data.c (init_content_element): Don't initialize it.
2508
2509 2018-09-06  Simon Marchi  <simon.marchi@ericsson.com>
2510
2511         * tui/tui-data.h (struct tui_win_info)
2512         <detail::opaque>: Remove.
2513         * tui/tui-data.c (init_win_info): Remove assignment.
2514
2515 2018-09-05  Tom Tromey  <tom@tromey.com>
2516
2517         * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
2518         -Wformat-nonliteral.
2519         * target-float.c (host_float_ops<T>::to_string)
2520         (host_float_ops<T>::from_string): Use
2521         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2522         * configure: Rebuild.
2523
2524 2018-09-05  Simon Marchi  <simon.marchi@ericsson.com>
2525
2526         * printcmd.c (printf_c_string): Use
2527         DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
2528         (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
2529
2530 2018-09-05  Tom Tromey  <tom@tromey.com>
2531
2532         * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
2533
2534 2018-09-05  Tom de Vries  <tdevries@suse.de>
2535
2536         * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
2537         with resolve_abstract_p == true.
2538         (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
2539         defaulting to false. Propagate resolve_abstract_p to
2540         dwarf2_fetch_die_loc_sect_off.
2541         * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
2542         parameter, defaulting to false.
2543         * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
2544         (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
2545         parameter.
2546         * dwarf2read.h (struct die_info): Forward-declare.
2547         (die_info_ptr): New typedef.
2548         (struct dwarf2_per_objfile): Add abstract_to_concrete field.
2549
2550 2018-09-05  Joel Brobecker  <brobecker@adacore.com>
2551
2552         GDB 8.2 released.
2553
2554 2018-09-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2555             Pedro Alves  <palves@redhat.com>
2556
2557         * gnulib/Makefile.in (aclocal_m4_deps): Move to
2558         "aclocal-m4-deps.mk".  Include file here.
2559         $(srcdir)/aclocal.m4: Add "configure.ac".
2560         * gnulib/aclocal-m4-deps.mk: New file.
2561         * gnulib/update-gnulib.sh: Automatically update
2562         "aclocal-m4-deps.mk".
2563
2564 2018-09-04  Tom Tromey  <tom@tromey.com>
2565
2566         * configure: Rebuild.
2567         * configure.ac: Remove multi-ice code.
2568
2569 2018-09-04  Tom Tromey  <tom@tromey.com>
2570
2571         * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
2572         (ada-exp.o): Update.
2573
2574 2018-09-04  Tom Tromey  <tom@tromey.com>
2575
2576         * Makefile.in (printcmd.o, target-float.o): Remove.
2577         (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
2578
2579 2018-09-04  Tom Tromey  <tom@tromey.com>
2580
2581         * gnulib/Makefile.in: Remove obsolete comment.
2582         * Makefile.in: Remove obsolete comment.
2583
2584 2018-09-04  Andrew Burgess  <andrew.burgess@embecosm.com>
2585
2586         * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
2587         line with '+'.
2588
2589 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2590
2591         * riscv-tdep.c: Add 'prologue-value.h' include.
2592         (struct riscv_unwind_cache): New struct.
2593         (riscv_debug_unwinder): New global.
2594         (riscv_scan_prologue): Update arguments, capture register details
2595         from prologue scan.
2596         (riscv_skip_prologue): Reformat arguments line, move end of
2597         prologue calculation into riscv_scan_prologue.
2598         (riscv_frame_cache): Update return type, create
2599         riscv_unwind_cache, scan the prologue, and fill in remaining cache
2600         details.
2601         (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
2602         (riscv_frame_prev_register): Use the trad_frame within the
2603         riscv_unwind_cache.
2604         (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
2605         flag.
2606
2607 2018-09-03  Andrew Burgess  <andrew.burgess@embecosm.com>
2608
2609         * trad-frame.h (trad_frame_set_realreg): Declare.
2610         (trad_frame_set_addr): Declare.
2611         * trad-frame.c (trad_frame_set_realreg): Define new function.
2612         (trad_frame_set_addr): Define new function.
2613         (trad_frame_set_reg_realreg): Use new function.
2614         (trad_frame_set_reg_addr): Use new function.
2615
2616 2018-09-01  Keith Seitz  <keiths@redhat.com>
2617
2618         * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
2619         pulongest instead of "%lld".
2620         * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
2621         ATTRIBUTE_UNUSED.
2622
2623 2018-08-31  Tom Tromey  <tom@tromey.com>
2624
2625         * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
2626         variant part type.
2627
2628 2018-08-31  Pedro Alves  <palves@redhat.com>
2629
2630         * gdbarch.h: Regenerate.
2631
2632 2018-08-31  Pedro Alves  <palves@redhat.com>
2633
2634         * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
2635         * target.h (Hardware watchpoint interfaces): Describe
2636         continuable/steppable/non-steppable watchpoints.
2637         * gdbarch.h, gdbarch.c: Regenerate.
2638
2639 2018-08-31  Pedro Alves  <palves@redhat.com>
2640
2641         * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
2642         Delete.
2643         * s390-linux-nat.c
2644         (s390_linux_nat_target::have_continuable_watchpoint): Delete.
2645         * target.h (target_ops::have_continuable_watchpoint): Delete.
2646         (target_have_continuable_watchpoint): Delete.
2647         * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
2648         * target-delegates.c: Regenerate.
2649
2650 2018-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2651
2652         * gnulib/Makefile.in (aclocal_m4_deps): Update according to
2653         the files present in "gnulib/import/m4/".
2654
2655 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2656
2657         * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
2658         c.sw, c.swsp, and c.sdsp.
2659
2660 2018-08-30  Andrew Burgess  <andrew.burgess@embecosm.com>
2661
2662         * riscv-tdep.c (struct riscv_inferior_data): Delete.
2663         (riscv_read_misa_reg): Don't cache value read into inferior data.
2664         (riscv_new_inferior_data): Delete.
2665         (riscv_inferior_data_cleanup): Delete.
2666         (riscv_inferior_data): Delete.
2667         (riscv_invalidate_inferior_data): Delete.
2668         (_initialize_riscv_tdep): Remove initialisation of inferior data.
2669
2670 2018-08-30  Simon Marchi  <simon.marchi@ericsson.com>
2671
2672         * compile/compile-cplus-types.c
2673         (compile_cplus_instance::leave_scope): Take the address of scope
2674         object.
2675         (compile_cplus_instance::convert_qualified_base): Compare quals
2676         to 0.
2677
2678 2018-08-30  Keith Seitz  <keiths@redhat.com>
2679
2680         * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
2681         Use "%s" and host_address_to_string instead of "%p" in printf.
2682
2683 2018-08-29  Keith Seitz  <keiths@redhat.com>
2684
2685         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
2686         and compile-cplus-types.c.
2687         (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
2688         * c-lang.c (cplus_language_defn): Set C++ compile functions.
2689         * c-lang.h (cplus_get_compile_context, cplus_compute_program):
2690         Declare.
2691         * compile/compile-c-support.c: Include compile-cplus.h.
2692         (load_libcompile): Templatize.
2693         (get_compile_context): "New" function.
2694         (c_get_compile_context): Use get_compile_context.
2695         (cplus_get_compile_context): New function.
2696         (cplus_push_user_expression, cplus_pop_user_expression)
2697         (cplus_add_code_header, cplus_add_input, cplus_compile_program)
2698         (cplus_compute_program): Define new structs/functions.
2699         * compile/compile-cplus-symmbols.c: New file.
2700         * compile/compile-cplus-types.c: New file.
2701         * compile/compile-cplus.h: New file.
2702         * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
2703         Declare.
2704         * compile/compile-object-load.c (get_out_value_type): Use
2705         strncmp_iw when comparing symbol names.
2706         (compile_object_load): Add mst_bss and mst_data.
2707         * compile/compile.c (_initialize_compile): Remove
2708         -Wno-implicit-function-declaration from `compile_args'.
2709         * compile/gcc-cp-plugin.h: New file.
2710         * NEWS: Mention C++ compile support and new debug options.
2711
2712 2018-08-29  Keith Seitz  <keiths@redhat.com>
2713
2714         * linespec.c (collect_info::add_symbol): Make virtual.
2715         (struct symbol_searcher_collect_info): New struct.
2716         (symbol_searcher::find_all_symbols): New method.
2717         * symtab.h (class symbol_searcher): New class.
2718
2719 2018-08-29  Keith Seitz  <keiths@redhat.com>
2720
2721         * linespec.c (struct linespec) <function_symbols, label_symbols>:
2722         Change to vector of block_symbol.  Update all users.
2723         (struct collect_info) <symbols>: Likewise.
2724         (collect_info::add_symbol): Take block_symbol as argument.
2725         Update all callers.
2726         (decode_compound_collector) <m_symbols>: Change type to vector
2727         of block_symbol.  Update all users.
2728         (decode_compound_collector::operator ()): Change parameter type
2729         to block_symbol.
2730         (find_method, find_function_symbols, find_linespec_symbols)
2731         (find_label_symbols_in_block, find_label_symbols): Change symbol
2732         vectors to block_symbol vectors.
2733         * symtab.h (symbol_found_callback_ftype): Change parameter type to
2734         block_symbol.
2735
2736 2018-08-29  Keith Seitz  <keiths@redhat.com>
2737
2738         * linespec.c (symbolp): Remove typedef and VEC definitions.
2739         (bound_minimal_symbol_d): Likewise.
2740
2741 2018-08-29  Keith Seitz  <keiths@redhat.com>
2742
2743         * linespec.c (decode_compound_collector::decode_compound_collector):
2744         Remove initialization for `m_symtabs'.
2745         (decode_compound_collector::release_symbols): Change return type
2746         to std::vector.  Update all callers.
2747         (class decode_compound_collector) <m_symbols>: Change type to
2748         std::vector.
2749         (lookup_prefix_sym): Change return type to std::vector.  Update all
2750         callers.
2751         (compare_symbols): Remove.
2752         (std_compare_symbols): Rename to `compare_symbols'.
2753         (find_method): Change `sym_classes' parameter to std::vector.
2754         Update all callers.  Use std::sort to sort sym_classes.
2755         (find_linespec_symbols): Remove cleanup.
2756
2757 2018-08-29  Keith Seitz  <keiths@redhat.com>
2758
2759         * linespec.c (struct linespec) <minimal_symbols>: Change type to
2760         std::vector.  Update all users.
2761         (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
2762         (struct collect_info) <minimal_symbols>: Likewise.
2763         (compare_msymbols): Return bool.  Change parameters to const
2764         bound_minimal_symbol references.
2765         (find_method, find_function_symbols, find_linespec_symbols): Change
2766         `minsyms' parameter to std::vector.  Update all callers.
2767
2768 2018-08-29  Keith Seitz  <keiths@redhat.com>
2769
2770         * linespec.c (struct linespec) <label_symbols>: Change type to
2771         std::vector.  Update all users.
2772         (find_label_symbols_in_block): Change `result' parameter to
2773         std::vector.  Update all callers.
2774         (find_label_symbols): Return std::vector.  Update all callers.
2775
2776 2018-08-29  Keith Seitz  <keiths@redhat.com>
2777
2778         * linespec.c (struct linespec) <function_symbols>: Change type to
2779         std::vector.  Update all users.
2780         (struct collect_info) <function_symbols>: Likewise.
2781         (convert_linespec_to_sals): Use std::sort to sort function_symbols.
2782         (std_compare_symbols): New function.
2783         (find_method, find_function_symbols, find_linespec_symbols)
2784         (find_label_symbols_in_block): Change `symbols' parameter to
2785         std::vector.  Update all callers.
2786         (find_label_symbols): Likewise for `function_symbols' and
2787         `label_funcs_ret'.
2788
2789 2018-08-29  Keith Seitz  <keiths@redhat.com>
2790
2791         * linespec.c (symtab_vector_up): Define.
2792         (struct linespec) <file_symtabs>: Change type to std::vector *.
2793         Update all uses.
2794         (struct collect_info) <file_symtabs>: Likewise.
2795         (collect_symtabs_from_filename): Return symtab_vector_up.
2796         Update all callers.
2797         (decode_objc): Remove cleanup.
2798         (symtab_collector::symtab_collector): Initialize `m_symtabs'.
2799         (symtab_collector::release_symtabs): Return symtab_vector_up.
2800         Update all callers.
2801         (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
2802         Update all users.
2803         (collect_symtabs_from_filename, symtabs_from_filename): Return
2804         symtab_vector_up.  Update all callers.
2805
2806 2018-08-29  Tom Tromey  <tom@tromey.com>
2807
2808         * csky-tdep.c (csky_analyze_prologue): Use
2809         core_addr_to_string_nz.
2810
2811 2018-08-29  Tom Tromey  <tom@tromey.com>
2812
2813         * windows-nat.c (struct xlate_exception) <them>: Change type to
2814         DWORD.
2815         (xlate): Fix formatting.  Remove last entry.
2816         (struct xlate_exception, xlate): Comment out.
2817         (windows_nat_target::resume): Use ranged for.
2818
2819 2018-08-29  Jim Wilson  <jimw@sifive.com>
2820
2821         * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
2822         (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
2823         of NT_PRFPREG.
2824         (riscv_linux_nat_target::store_registers): Likewise.
2825
2826 2018-08-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2827
2828         PR gdb/23555
2829         PR gdb/23558
2830         * gnulib/aclocal.m4: Regenerate.
2831         * gnulib/config.in: Regenerate.
2832         * gnulib/configure: Regenerate.
2833         * gnulib/import/Makefile.am: Update.
2834         * gnulib/import/Makefile.in: Update.
2835         * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
2836         * gnulib/import/_Noreturn.h: ... this.
2837         * gnulib/import/alloca.in.h: Update.
2838         * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
2839         * gnulib/import/arg-nonnull.h: ... this.
2840         * gnulib/import/assure.h: Update.
2841         * gnulib/import/at-func.c: Update.
2842         * gnulib/import/basename-lgpl.c: Update.
2843         * gnulib/import/extra/snippet/c++defs.h: Rename to...
2844         * gnulib/import/c++defs.h: ... this.
2845         * gnulib/import/canonicalize-lgpl.c: Update.
2846         * gnulib/import/cdefs.h: Update.
2847         * gnulib/import/chdir-long.c: Update.
2848         * gnulib/import/chdir-long.h: Update.
2849         * gnulib/import/cloexec.c: Update.
2850         * gnulib/import/cloexec.h: Update.
2851         * gnulib/import/close.c: Update.
2852         * gnulib/import/closedir.c: Update.
2853         * gnulib/import/config.charset: Update.
2854         * gnulib/import/dirent-private.h: Update.
2855         * gnulib/import/dirent.in.h: Update.
2856         * gnulib/import/dirfd.c: Update.
2857         * gnulib/import/dirname-lgpl.c: Update.
2858         * gnulib/import/dirname.h: Update.
2859         * gnulib/import/dosname.h: Update.
2860         * gnulib/import/dup-safer-flag.c: Update.
2861         * gnulib/import/dup-safer.c: Update.
2862         * gnulib/import/dup.c: Update.
2863         * gnulib/import/dup2.c: Update.
2864         * gnulib/import/errno.in.h: Update.
2865         * gnulib/import/error.c: Update.
2866         * gnulib/import/error.h: Update.
2867         * gnulib/import/exitfail.c: Update.
2868         * gnulib/import/exitfail.h: Update.
2869         * gnulib/import/extra/update-copyright: Update.
2870         * gnulib/import/fchdir.c: Update.
2871         * gnulib/import/fcntl.c: Update.
2872         * gnulib/import/fcntl.in.h: Update.
2873         * gnulib/import/fd-hook.c: Update.
2874         * gnulib/import/fd-hook.h: Update.
2875         * gnulib/import/fd-safer-flag.c: Update.
2876         * gnulib/import/fd-safer.c: Update.
2877         * gnulib/import/fdopendir.c: Update.
2878         * gnulib/import/filename.h: Update.
2879         * gnulib/import/filenamecat-lgpl.c: Update.
2880         * gnulib/import/filenamecat.h: Update.
2881         * gnulib/import/flexmember.h: Update.
2882         * gnulib/import/float+.h: Update.
2883         * gnulib/import/float.c: Update.
2884         * gnulib/import/float.in.h: Update.
2885         * gnulib/import/fnmatch.c: Update.
2886         * gnulib/import/fnmatch.in.h: Update.
2887         * gnulib/import/fnmatch_loop.c: Update.
2888         * gnulib/import/fpucw.h: Update.
2889         * gnulib/import/frexp.c: Update.
2890         * gnulib/import/frexpl.c: Update.
2891         * gnulib/import/fstat.c: Update.
2892         * gnulib/import/fstatat.c: Update.
2893         * gnulib/import/getcwd-lgpl.c: Update.
2894         * gnulib/import/getcwd.c: Update.
2895         * gnulib/import/getdtablesize.c: Update.
2896         * gnulib/import/getlogin_r.c: Update.
2897         * gnulib/import/getprogname.c: Update.
2898         * gnulib/import/getprogname.h: Update.
2899         * gnulib/import/gettext.h: Update.
2900         * gnulib/import/gettimeofday.c: Update.
2901         * gnulib/import/glob-libc.h: Update.
2902         * gnulib/import/glob.c: Update.
2903         * gnulib/import/glob.in.h: Update.
2904         * gnulib/import/glob_internal.h: Update.
2905         * gnulib/import/glob_pattern_p.c: Update.
2906         * gnulib/import/globfree.c: Update.
2907         * gnulib/import/hard-locale.c: Update.
2908         * gnulib/import/hard-locale.h: Update.
2909         * gnulib/import/intprops.h: Update.
2910         * gnulib/import/inttypes.in.h: Update.
2911         * gnulib/import/isnan.c: Update.
2912         * gnulib/import/isnand-nolibm.h: Update.
2913         * gnulib/import/isnand.c: Update.
2914         * gnulib/import/isnanl-nolibm.h: Update.
2915         * gnulib/import/isnanl.c: Update.
2916         * gnulib/import/itold.c: Update.
2917         * gnulib/import/libc-config.h: Update.
2918         * gnulib/import/limits.in.h: Update.
2919         * gnulib/import/localcharset.c: Update.
2920         * gnulib/import/localcharset.h: Update.
2921         * gnulib/import/localtime-buffer.c: Update.
2922         * gnulib/import/localtime-buffer.h: Update.
2923         * gnulib/import/lstat.c: Update.
2924         * gnulib/import/m4/00gnulib.m4: Update.
2925         * gnulib/import/m4/__inline.m4: Update.
2926         * gnulib/import/m4/absolute-header.m4: Update.
2927         * gnulib/import/m4/alloca.m4: Update.
2928         * gnulib/import/m4/builtin-expect.m4: Update.
2929         * gnulib/import/m4/canonicalize.m4: Update.
2930         * gnulib/import/m4/chdir-long.m4: Update.
2931         * gnulib/import/m4/close.m4: Update.
2932         * gnulib/import/m4/closedir.m4: Update.
2933         * gnulib/import/m4/configmake.m4: Update.
2934         * gnulib/import/m4/d-ino.m4: Update.
2935         * gnulib/import/m4/d-type.m4: Update.
2936         * gnulib/import/m4/dirent_h.m4: Update.
2937         * gnulib/import/m4/dirfd.m4: Update.
2938         * gnulib/import/m4/dirname.m4: Update.
2939         * gnulib/import/m4/double-slash-root.m4: Update.
2940         * gnulib/import/m4/dup.m4: Update.
2941         * gnulib/import/m4/dup2.m4: Update.
2942         * gnulib/import/m4/eealloc.m4: Update.
2943         * gnulib/import/m4/environ.m4: Update.
2944         * gnulib/import/m4/errno_h.m4: Update.
2945         * gnulib/import/m4/error.m4: Update.
2946         * gnulib/import/m4/exponentd.m4: Update.
2947         * gnulib/import/m4/exponentl.m4: Update.
2948         * gnulib/import/m4/extensions.m4: Update.
2949         * gnulib/import/m4/extern-inline.m4: Update.
2950         * gnulib/import/m4/fchdir.m4: Update.
2951         * gnulib/import/m4/fcntl-o.m4: Update.
2952         * gnulib/import/m4/fcntl.m4: Update.
2953         * gnulib/import/m4/fcntl_h.m4: Update.
2954         * gnulib/import/m4/fdopendir.m4: Update.
2955         * gnulib/import/m4/filenamecat.m4: Update.
2956         * gnulib/import/m4/flexmember.m4: Update.
2957         * gnulib/import/m4/float_h.m4: Update.
2958         * gnulib/import/m4/fnmatch.m4: Update.
2959         * gnulib/import/m4/fnmatch_h.m4: Update.
2960         * gnulib/import/m4/fpieee.m4: Update.
2961         * gnulib/import/m4/frexp.m4: Update.
2962         * gnulib/import/m4/frexpl.m4: Update.
2963         * gnulib/import/m4/fstat.m4: Update.
2964         * gnulib/import/m4/fstatat.m4: Update.
2965         * gnulib/import/m4/getcwd-abort-bug.m4: Update.
2966         * gnulib/import/m4/getcwd-path-max.m4: Update.
2967         * gnulib/import/m4/getcwd.m4: Update.
2968         * gnulib/import/m4/getdtablesize.m4: Update.
2969         * gnulib/import/m4/getlogin.m4: Update.
2970         * gnulib/import/m4/getlogin_r.m4: Update.
2971         * gnulib/import/m4/getpagesize.m4: Update.
2972         * gnulib/import/m4/getprogname.m4: Update.
2973         * gnulib/import/m4/gettimeofday.m4: Update.
2974         * gnulib/import/m4/glibc21.m4: Update.
2975         * gnulib/import/m4/glob.m4: Update.
2976         * gnulib/import/m4/glob_h.m4: Update.
2977         * gnulib/import/m4/gnulib-cache.m4: Update.
2978         * gnulib/import/m4/gnulib-common.m4: Update.
2979         * gnulib/import/m4/gnulib-comp.m4: Update.
2980         * gnulib/import/m4/gnulib-tool.m4: Update.
2981         * gnulib/import/m4/hard-locale.m4: Update.
2982         * gnulib/import/m4/include_next.m4: Update.
2983         * gnulib/import/m4/inttypes-pri.m4: Update.
2984         * gnulib/import/m4/inttypes.m4: Update.
2985         * gnulib/import/m4/isnand.m4: Update.
2986         * gnulib/import/m4/isnanl.m4: Update.
2987         * gnulib/import/m4/largefile.m4: Update.
2988         * gnulib/import/m4/limits-h.m4: Update.
2989         * gnulib/import/m4/localcharset.m4: Update.
2990         * gnulib/import/m4/locale-fr.m4: Update.
2991         * gnulib/import/m4/locale-ja.m4: Update.
2992         * gnulib/import/m4/locale-zh.m4: Update.
2993         * gnulib/import/m4/localtime-buffer.m4: Update.
2994         * gnulib/import/m4/longlong.m4: Update.
2995         * gnulib/import/m4/lstat.m4: Update.
2996         * gnulib/import/m4/malloc.m4: Update.
2997         * gnulib/import/m4/malloca.m4: Update.
2998         * gnulib/import/m4/math_h.m4: Update.
2999         * gnulib/import/m4/mbrtowc.m4: Update.
3000         * gnulib/import/m4/mbsinit.m4: Update.
3001         * gnulib/import/m4/mbsrtowcs.m4: Update.
3002         * gnulib/import/m4/mbstate_t.m4: Update.
3003         * gnulib/import/m4/memchr.m4: Update.
3004         * gnulib/import/m4/memmem.m4: Update.
3005         * gnulib/import/m4/mempcpy.m4: Update.
3006         * gnulib/import/m4/memrchr.m4: Update.
3007         * gnulib/import/m4/mkdir.m4: Update.
3008         * gnulib/import/m4/mkstemp.m4: Update.
3009         * gnulib/import/m4/mmap-anon.m4: Update.
3010         * gnulib/import/m4/mode_t.m4: Update.
3011         * gnulib/import/m4/msvc-inval.m4: Update.
3012         * gnulib/import/m4/msvc-nothrow.m4: Update.
3013         * gnulib/import/m4/multiarch.m4: Update.
3014         * gnulib/import/m4/nocrash.m4: Update.
3015         * gnulib/import/m4/off_t.m4: Update.
3016         * gnulib/import/m4/onceonly.m4: Update.
3017         * gnulib/import/m4/open-cloexec.m4: Update.
3018         * gnulib/import/m4/open.m4: Update.
3019         * gnulib/import/m4/openat.m4: Update.
3020         * gnulib/import/m4/opendir.m4: Update.
3021         * gnulib/import/m4/pathmax.m4: Update.
3022         * gnulib/import/m4/rawmemchr.m4: Update.
3023         * gnulib/import/m4/readdir.m4: Update.
3024         * gnulib/import/m4/readlink.m4: Update.
3025         * gnulib/import/m4/realloc.m4: Update.
3026         * gnulib/import/m4/rename.m4: Update.
3027         * gnulib/import/m4/rewinddir.m4: Update.
3028         * gnulib/import/m4/rmdir.m4: Update.
3029         * gnulib/import/m4/save-cwd.m4: Update.
3030         * gnulib/import/m4/secure_getenv.m4: Update.
3031         * gnulib/import/m4/setenv.m4: Update.
3032         * gnulib/import/m4/signal_h.m4: Update.
3033         * gnulib/import/m4/ssize_t.m4: Update.
3034         * gnulib/import/m4/stat-time.m4: Update.
3035         * gnulib/import/m4/stat.m4: Update.
3036         * gnulib/import/m4/std-gnu11.m4: Update.
3037         * gnulib/import/m4/stdbool.m4: Update.
3038         * gnulib/import/m4/stddef_h.m4: Update.
3039         * gnulib/import/m4/stdint.m4: Update.
3040         * gnulib/import/m4/stdio_h.m4: Update.
3041         * gnulib/import/m4/stdlib_h.m4: Update.
3042         * gnulib/import/m4/strchrnul.m4: Update.
3043         * gnulib/import/m4/strdup.m4: Update.
3044         * gnulib/import/m4/strerror.m4: Update.
3045         * gnulib/import/m4/string_h.m4: Update.
3046         * gnulib/import/m4/strstr.m4: Update.
3047         * gnulib/import/m4/strtok_r.m4: Update.
3048         * gnulib/import/m4/sys_socket_h.m4: Update.
3049         * gnulib/import/m4/sys_stat_h.m4: Update.
3050         * gnulib/import/m4/sys_time_h.m4: Update.
3051         * gnulib/import/m4/sys_types_h.m4: Update.
3052         * gnulib/import/m4/tempname.m4: Update.
3053         * gnulib/import/m4/time_h.m4: Update.
3054         * gnulib/import/m4/unistd-safer.m4: Update.
3055         * gnulib/import/m4/unistd_h.m4: Update.
3056         * gnulib/import/m4/warn-on-use.m4: Update.
3057         * gnulib/import/m4/wchar_h.m4: Update.
3058         * gnulib/import/m4/wchar_t.m4: Update.
3059         * gnulib/import/m4/wctype_h.m4: Update.
3060         * gnulib/import/m4/wint_t.m4: Update.
3061         * gnulib/import/malloc.c: Update.
3062         * gnulib/import/malloc/scratch_buffer.h: Update.
3063         * gnulib/import/malloc/scratch_buffer_grow.c: Update.
3064         * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
3065         * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
3066         * gnulib/import/malloca.c: Update.
3067         * gnulib/import/malloca.h: Update.
3068         * gnulib/import/malloca.valgrind: Update.
3069         * gnulib/import/math.in.h: Update.
3070         * gnulib/import/mbrtowc.c: Update.
3071         * gnulib/import/mbsinit.c: Update.
3072         * gnulib/import/mbsrtowcs-impl.h: Update.
3073         * gnulib/import/mbsrtowcs-state.c: Update.
3074         * gnulib/import/mbsrtowcs.c: Update.
3075         * gnulib/import/memchr.c: Update.
3076         * gnulib/import/memmem.c: Update.
3077         * gnulib/import/mempcpy.c: Update.
3078         * gnulib/import/memrchr.c: Update.
3079         * gnulib/import/mkdir.c: Update.
3080         * gnulib/import/mkstemp.c: Update.
3081         * gnulib/import/msvc-inval.c: Update.
3082         * gnulib/import/msvc-inval.h: Update.
3083         * gnulib/import/msvc-nothrow.c: Update.
3084         * gnulib/import/msvc-nothrow.h: Update.
3085         * gnulib/import/open.c: Update.
3086         * gnulib/import/openat-die.c: Update.
3087         * gnulib/import/openat-priv.h: Update.
3088         * gnulib/import/openat-proc.c: Update.
3089         * gnulib/import/openat.c: Update.
3090         * gnulib/import/openat.h: Update.
3091         * gnulib/import/opendir.c: Update.
3092         * gnulib/import/pathmax.h: Update.
3093         * gnulib/import/pipe-safer.c: Update.
3094         * gnulib/import/rawmemchr.c: Update.
3095         * gnulib/import/readdir.c: Update.
3096         * gnulib/import/readlink.c: Update.
3097         * gnulib/import/realloc.c: Update.
3098         * gnulib/import/ref-add.sin: Update.
3099         * gnulib/import/ref-del.sin: Update.
3100         * gnulib/import/rename.c: Update.
3101         * gnulib/import/rewinddir.c: Update.
3102         * gnulib/import/rmdir.c: Update.
3103         * gnulib/import/same-inode.h: Update.
3104         * gnulib/import/save-cwd.c: Update.
3105         * gnulib/import/save-cwd.h: Update.
3106         * gnulib/import/scratch_buffer.h: Update.
3107         * gnulib/import/secure_getenv.c: Update.
3108         * gnulib/import/setenv.c: Update.
3109         * gnulib/import/signal.in.h: Update.
3110         * gnulib/import/stat-time.c: Update.
3111         * gnulib/import/stat-time.h: Update.
3112         * gnulib/import/stat-w32.c: Update.
3113         * gnulib/import/stat-w32.h: Update.
3114         * gnulib/import/stat.c: Update.
3115         * gnulib/import/stdbool.in.h: Update.
3116         * gnulib/import/stddef.in.h: Update.
3117         * gnulib/import/stdint.in.h: Update.
3118         * gnulib/import/stdio.in.h: Update.
3119         * gnulib/import/stdlib.in.h: Update.
3120         * gnulib/import/str-two-way.h: Update.
3121         * gnulib/import/strchrnul.c: Update.
3122         * gnulib/import/strdup.c: Update.
3123         * gnulib/import/streq.h: Update.
3124         * gnulib/import/strerror-override.c: Update.
3125         * gnulib/import/strerror-override.h: Update.
3126         * gnulib/import/strerror.c: Update.
3127         * gnulib/import/string.in.h: Update.
3128         * gnulib/import/stripslash.c: Update.
3129         * gnulib/import/strnlen1.c: Update.
3130         * gnulib/import/strnlen1.h: Update.
3131         * gnulib/import/strstr.c: Update.
3132         * gnulib/import/strtok_r.c: Update.
3133         * gnulib/import/sys_stat.in.h: Update.
3134         * gnulib/import/sys_time.in.h: Update.
3135         * gnulib/import/sys_types.in.h: Update.
3136         * gnulib/import/tempname.c: Update.
3137         * gnulib/import/tempname.h: Update.
3138         * gnulib/import/time.in.h: Update.
3139         * gnulib/import/unistd--.h: Update.
3140         * gnulib/import/unistd-safer.h: Update.
3141         * gnulib/import/unistd.in.h: Update.
3142         * gnulib/import/unsetenv.c: Update.
3143         * gnulib/import/verify.h: Update.
3144         * gnulib/import/extra/snippet/warn-on-use.h: Update.
3145         * gnulib/import/wchar.in.h: Update.
3146         * gnulib/import/wctype.in.h: Update.
3147         * gnulib/import/xalloc-oversized.h: Update.
3148         * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
3149         "53e2c179f26a890fa6685af4b6c1397ee370433b".
3150
3151 2018-08-16  Gary Benson <gbenson@redhat.com>
3152
3153         PR gdb/13000:
3154         * gdb/main.c (captured_main_1): Exit with nonzero status
3155         in batch mode if the last command to be executed failed.
3156         * NEWS: Mention the above.
3157
3158 2018-08-29  Simon Marchi  <simon.marchi@ericsson.com>
3159
3160         * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
3161         end of warning message.
3162
3163 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3164
3165         PR gdb/22943:
3166         * aarch64-tdep.c (is_hfa_or_hva): Remove function.
3167         (aarch64_extract_return_value): Use
3168         aapcs_is_vfp_call_or_return_candidate.
3169         (aarch64_return_in_memory): Likewise.
3170         (aarch64_store_return_value): Likewise.
3171
3172 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3173
3174         * aarch64-tdep.c
3175         (aapcs_is_vfp_call_or_return_candidate): Make static
3176         (pass_in_v_or_stack): Remove function.
3177         (pass_in_v_vfp_candidate): New function.
3178         (aarch64_push_dummy_call): Check for float register candidates.
3179
3180 2018-08-29  Alan Hayward  <alan.hayward@arm.com>
3181
3182         * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
3183         (aapcs_is_vfp_call_or_return_candidate_1): New function.
3184         (aapcs_is_vfp_call_or_return_candidate): Likewise.
3185
3186 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
3187
3188         PR build/23399
3189         * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
3190         (struct ipa_sym_addresses): Rename to...
3191         (struct ipa_sym_addresses_common): ... this.
3192         * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
3193
3194 2018-08-28  Tom Tromey  <tom@tromey.com>
3195
3196         * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3197         (token_fifo): Now a std::vector.
3198         (yylex, c_parse): Update.
3199         * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3200         (token_fifo): Now a std::vector.
3201         (yylex, d_parse): Update.
3202         * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
3203         (token_fifo): Now a std::vector.
3204         (yylex, go_parse): Update.
3205
3206 2018-08-28  Simon Marchi  <simon.marchi@ericsson.com>
3207
3208         * parser-defs.h (struct type_stack) <elements>: Change type to
3209         std::vector<union type_stack_elt>.
3210         <depth, size>: Remove.
3211         * parse.c (parse_exp_in_context_1): Adjust.
3212         (type_stack_reserve): Remove.
3213         (check_type_stack_depth): Remove.
3214         (insert_into_type_stack): Adjust to std::vector.
3215         (insert_type): Likewise.
3216         (push_type): Likewise.
3217         (push_type_int): Likewise.
3218         (insert_type_address_space): Likewise.
3219         (pop_type): Likewise.
3220         (pop_type_int): Likewise.
3221         (pop_typelist): Likewise.
3222         (pop_type_stack): Likewise.
3223         (append_type_stack): Likewise.
3224         (push_type_stack): Likewise.
3225         (get_type_stack): Likewise.
3226         (type_stack_cleanup): Likewise.
3227         (push_typelist): Likewise.
3228         (follow_types): Likewise.
3229         (_initialize_parse): Likewise.
3230
3231 2018-08-28  Hafiz Abid Qadeer  <abidh@codesourcery.com>
3232
3233         * NEWS: Mention csky target.
3234
3235 2018-08-28  Jiangshuai Li  <jiangshuai_li@c-sky.com>
3236             Hafiz Abid Qadeer  <abidh@codesourcery.com>
3237             Don Breazeal  <donb@codesourcery.com>
3238
3239         * csky-linux-tdep.c: New file.
3240         * csky-tdep.c: Likewise.
3241         * csky-tdep.h: Likewise.
3242         * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
3243         csky-tdep.o.
3244         (HFILES_NO_SRCDIR): Add csky-tdep.h.
3245         (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
3246         * configure.tgt: Add csky support.
3247
3248 2018-08-27  Jan Vrany  <jan.vrany@fit.cvut.cz>
3249
3250         * python/py-framefilter.c (py_print_frame): Print frame architecture
3251         when printing on an MI output.
3252
3253 2018-08-27  Tom Tromey  <tom@tromey.com>
3254
3255         PR build/23087:
3256         * configure: Rebuild.
3257         * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
3258
3259 2018-08-27  Tom Tromey  <tom@tromey.com>
3260
3261         * aarch64-linux-tdep.c
3262         (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
3263         casts to int.
3264
3265 2018-08-27  Tom Tromey  <tom@tromey.com>
3266
3267         * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
3268         unsigned.
3269         (ppc64_standard_linkage1, ppc64_standard_linkage2)
3270         (ppc64_standard_linkage3, ppc64_standard_linkage4)
3271         (ppc64_standard_linkage5, ppc64_standard_linkage6)
3272         (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
3273         unsigned.
3274
3275 2018-08-27  Tom Tromey  <tom@tromey.com>
3276
3277         * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
3278         (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
3279
3280 2018-08-27  Tom Tromey  <tom@tromey.com>
3281
3282         * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
3283         * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
3284         ULONGEST_MAX.
3285         * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
3286         ULONGEST_MAX.
3287         * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
3288         ULONGEST_MAX.
3289         * sparc-linux-tdep.c (sparc32_linux_sigframe)
3290         (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
3291         * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
3292         ULONGEST_MAX.
3293         * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
3294         (ppc64_linux_sigaction_tramp_frame)
3295         (ppc32_linux_sighandler_tramp_frame)
3296         (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3297         * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
3298         (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
3299         * mn10300-linux-tdep.c (am33_linux_sigframe)
3300         (am33_linux_rt_sigframe): Use ULONGEST_MAX.
3301         * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
3302         * mips-linux-tdep.c (mips_linux_o32_sigframe)
3303         (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
3304         (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
3305         (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
3306         (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
3307         * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
3308         (mips64_fbsd_sigframe): Use ULONGEST_MAX.
3309         * microblaze-linux-tdep.c
3310         (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
3311         * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
3312         (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
3313         (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
3314         * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
3315         * common/common-types.h (ULONGEST_MAX): New define.
3316         (CORE_ADDR_MAX): Fix formatting.
3317         * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
3318         * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
3319         * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
3320         (arm_linux_rt_sigreturn_tramp_frame)
3321         (arm_eabi_linux_sigreturn_tramp_frame)
3322         (arm_eabi_linux_rt_sigreturn_tramp_frame)
3323         (thumb2_eabi_linux_sigreturn_tramp_frame)
3324         (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
3325         (arm_linux_restart_syscall_tramp_frame)
3326         (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
3327         * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
3328         * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
3329         ULONGEST_MAX.
3330         * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
3331
3332 2018-08-27  Tom Tromey  <tom@tromey.com>
3333
3334         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
3335         CORE_ADDR_MAX.
3336         * mips-tdep.c (mips_deal_with_atomic_sequence)
3337         (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
3338         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
3339         (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
3340         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
3341         CORE_ADDR_MAX.
3342         * aarch64-tdep.c (aarch64_software_single_step): Use
3343         CORE_ADDR_MAX.
3344
3345 2018-08-27  Tom Tromey  <tom@tromey.com>
3346
3347         * linespec.c (complete_linespec_component): Add cast to "char".
3348         * completer.c (completion_tracker::build_completion_result): Add
3349         cast to "char".
3350
3351 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3352
3353         * solist.h (struct solist, struct target_so_ops): Fix
3354         indentation.
3355
3356 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3357
3358         * ada-tasks.c (ada_task_info_s): Remove typedef.
3359         (DEF_VEC_O(ada_task_info_s)): Remove.
3360         (struct ada_tasks_inferior_data): Initialize fields.
3361         <task_list>: Make an std::vector.
3362         (get_ada_tasks_inferior_data): Allocate with new.
3363         (ada_get_task_number): Adjust.
3364         (get_task_number_from_id): Likewise.
3365         (valid_task_id): Likewise.
3366         (ada_get_task_info_from_ptid): Likewise.
3367         (iterate_over_live_ada_tasks): Likewise.
3368         (add_ada_task): Likewise.
3369         (read_known_tasks): Likewise.
3370         (ada_build_task_list): Likewise.
3371         (print_ada_task_info): Likewise.
3372         (info_task): Likewise.
3373         (task_command_1): Likewise.
3374
3375 2018-08-26  Simon Marchi  <simon.marchi@polymtl.ca>
3376
3377         * ada-lang.c (add_angle_brackets): Return std::string.
3378
3379 2018-08-25  Simon Marchi  <simon.marchi@polymtl.ca>
3380
3381         * python/py-threadevent.c (py_get_event_thread): Initialize
3382         pythread.
3383
3384 2018-08-24  Pedro Alves  <palves@redhat.com>
3385
3386         * python/py-bpevent.c (create_breakpoint_event_object): Use
3387         copy-initialization.
3388         * python/py-continueevent.c (emit_continue_event): Use
3389         copy-initialization.
3390         * python/py-exitedevent.c (create_exited_event_object): Return a
3391         gdbpy_ref<>.
3392         (emit_exited_event): Use copy-initialization.
3393         * python/py-inferior.c (python_new_inferior)
3394         (python_inferior_deleted, add_thread_object): Use
3395         copy-initialization.
3396         * python/py-infevents.c (create_inferior_call_event_object)
3397         (create_register_changed_event_object)
3398         (create_memory_changed_event_object): Return a gdbpy_ref<>.
3399         (emit_inferior_call_event, emit_memory_changed_event)
3400         (emit_register_changed_event): Use copy-initialization.
3401         * python/py-newobjfileevent.c (create_new_objfile_event_object):
3402         Return a gdbpy_ref<>.
3403         (emit_new_objfile_event): Use copy-initialization.
3404         (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
3405         (emit_clear_objfiles_event): Use copy-initialization.
3406         * python/py-signalevent.c (create_signal_event_object): Use
3407         copy-initialization.
3408         * python/py-threadevent.c (create_thread_event_object): Use
3409         copy-initialization.
3410
3411 2018-08-24  Pedro Alves  <palves@redhat.com>
3412             Simon Marchi  <simon.marchi@ericsson.com>
3413
3414         PR gdb/23379
3415         * python/py-continueevent.c: Include "gdbthread.h".
3416         (create_continue_event_object): Add intro comment.  Add 'ptid'
3417         parameter.  Use it to find thread to pass to
3418         create_thread_event_object.
3419         (emit_continue_event): Pass PTID down to
3420         create_continue_event_object.
3421         * python/py-event.h (py_get_event_thread): Declare.
3422         (create_thread_event_object): Remove default from 'thread'
3423         parameter.
3424         * python/py-stopevent.c (create_stop_event_object): Use
3425         py_get_event_thread.
3426         * python/py-threadevent.c (get_event_thread): Rename to ...
3427         (py_get_event_thread): ... this, make extern, add 'ptid' parameter
3428         and use it to find the thread.
3429         (create_thread_event_object): Assert that THREAD isn't null.
3430         Don't find the event thread here.
3431
3432 2018-08-23  Kevin Buettner  <kevinb@redhat.com>
3433
3434         * block.h (blockrange, blockranges): New struct declarations.
3435         (struct block): Add new field named `ranges'.
3436         (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
3437         (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
3438         macros for accessing ranges in struct block.
3439         (make_blockranges): New declaration.
3440         block.c (make_blockranges): New function.
3441         * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
3442         for block.
3443         * symtab.h (find_pc_partial_function): Add new parameter `block'.
3444         * blockframe.c (cache_pc_function_block): New static global.
3445         (clear_pc_function_cache): Clear cache_pc_function_block.
3446         (find_pc_partial_function): Move comment to symtab.h.  Add
3447         support for non-contiguous blocks.
3448         * cli/cli-cmds.c (block.h): Include.
3449         (print_disassembly): Handle printing of non-contiguous blocks.
3450         (disassemble_current_function): Likewise.
3451         (disassemble_command): Likewise.
3452
3453         * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
3454         BLOCK_START.
3455         * blockframe.c (get_pc_function_start): Likewise.
3456         * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
3457         (gcc_symbol_address): Likewise.
3458         * compile/compile-object-run.c (compile_object_run): Likewise.
3459         * compile/compile.c (get_expr_block_and_pc): Likewise.
3460         * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
3461         (func_addr_to_tail_call_list): Likewise.
3462         * findvar.c (default_read_var_value): Likewise.
3463         * inline-frame.c (inline_frame_this_id): Likewise.
3464         (skip-inline_frames): Likewise.
3465         * infcmd.c (until_next_command): Likewise.
3466         * linespec.c (convert_linespec_to_sals): Likewise.
3467         * parse.c (parse_exp_in_context_1): Likewise.
3468         * printcmd.c (build_address_symbolic): likewise.
3469         (info_address_command): Likewise.
3470         symtab.c (find_function_start_sal): Likewise.
3471         (skip_prologue_sal): Likewise.
3472         (find_function_alias_target): Likewise.
3473         (find_gnu_ifunc): Likewise.
3474         * stack.c (find_frame_funname): Likewise.
3475         * symtab.c (fixup_symbol_section): Likewise.
3476         (find_function_start_sal): Likewise.
3477         (skip_prologue_sal): Likewsie.
3478         (find_function_alias_target): Likewise.
3479         (find_gnu_ifunc): Likewise.
3480         * tracepoint.c (info_scope_command): Likewise.
3481         * value.c (value_fn_field): Likewise.
3482
3483         * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
3484         in place of find_pc_partial_function.
3485         * blockframe.c (find_function_entry_range_from_pc): New function.
3486         * symtab.h (find_function_entry_range_from_pc): Declare and document.
3487         * objfiles.c (objfile_relocate1): Relocate start and end addresses
3488         for each range in a block.
3489
3490
3491 2018-08-23  Xavier Roirand  <roirand@adacore.com>
3492
3493         * machoread.c (macho_symfile_read_all_oso): Remove uneeded
3494         incrementation.
3495
3496 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3497
3498         * solib-svr4.c (read_program_headers_from_bfd): Return
3499         gdb::optional<gdb::byte_vector>.
3500         (svr4_exec_displacement): Adjust.
3501
3502 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3503
3504         * solib-svr4.c (read_program_header): Return
3505         gdb::optional<gdb::byte_vector>, remove p_sect_size param.
3506         (find_program_interpreter): Return
3507         gdb::optional<gdb::byte_vector>.
3508         (scan_dyntag_auxv): Adjust.
3509         (enable_break): Adjust.
3510         (svr4_exec_displacement): Adjust.
3511
3512 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3513
3514         * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
3515         * inf-child.c (inf_child_target::terminal_save_inferior): New.
3516
3517 2018-08-22  Simon Marchi  <simon.marchi@polymtl.ca>
3518
3519         * guile/scm-string.c (gdbscm_scm_from_printf): Use
3520         string_vprintf.
3521         * guile/scm-utils.c (gdbscm_printf): Likewise.
3522         * serial.c (serial_printf): Likewise.
3523         * xml-support.c (gdb_xml_parser::vdebug): Likewise.
3524
3525 2018-08-22  Jan Vrany  <jan.vrany@fit.cvut.cz>
3526
3527         * stack.c (print_frame): Print frame architecture when printing on
3528         an MI output.
3529         * NEWS: Mention new "arch" attribute in frame output.
3530
3531 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3532
3533         * arch/aarch64.h (aarch64_regnum): Update comment.
3534
3535 2018-08-21  Alan Hayward  <alan.hayward@arm.com>
3536
3537         * NEWS: Add SVE to 8.2 section.
3538
3539 2018-08-21  Pedro Alves  <palves@redhat.com>
3540
3541         * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
3542         out from gdbscm_parse_function_args.
3543         (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
3544         gdbscm_parse_function_args_1.
3545
3546 2018-08-21  Simon Marchi  <simon.marchi@ericsson.com>
3547
3548         PR gdb/17816
3549         * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
3550         operator.
3551
3552 2018-08-19  Simon Marchi  <simon.marchi@polymtl.ca>
3553
3554         * solib-svr4.c (svr4_exec_displacement): Fix formatting.
3555
3556 2018-08-19  Michael Spang  <spang@google.com>
3557
3558         PR gdb/11786
3559         * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
3560         for PT_TLS segments.
3561
3562 2018-08-18  Kevin Buettner  <kevinb@redhat.com>
3563
3564         * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
3565         dwarf_variable_value.
3566         * dwarf2-frame.c (class dwarf_expr_executor):
3567         Add override for dwarf_variable_value.
3568         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
3569         (class symbol_needs_eval_context): Likewise.
3570         (indirect_synthetic_pointer): Add forward declaration.
3571         (sect_variable_value): New function.
3572         (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
3573         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
3574         for DW_OP_GNU_variable_value.
3575
3576 2018-08-16  Tom Tromey  <tom@tromey.com>
3577
3578         * top.c (read_command_file): Update.
3579         (command_line_input): Remove "repeat" argument.
3580         * ada-lang.c (get_selections): Update.
3581         * linespec.c (decode_line_2): Update.
3582         * defs.h (command_line_input): Remove argument.
3583         * cli/cli-script.c (read_next_line): Update.
3584         * python/py-gdb-readline.c: Update.
3585
3586 2018-08-17  Tom Tromey  <tom@tromey.com>
3587
3588         * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
3589         command_line_input.
3590
3591 2018-08-15  Tom Tromey  <tom@tromey.com>
3592
3593         * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
3594
3595 2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>
3596
3597         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
3598         If used, use find_pc_partial_function to find address range
3599         to disassemble.
3600         * mi/mi-main.c (mi_cmd_list_features): Report
3601         "data-disassemble-a-option" feature.
3602         * NEWS: Mention new -data-disassemble option -a.
3603
3604 2018-08-13  Tom Tromey  <tom@tromey.com>
3605
3606         * common/common-defs.h (_FORTIFY_SOURCE): Define.
3607
3608 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3609
3610         * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
3611         (aarch64_linux_collect_sve_regset): Likewise.
3612         (aarch64_linux_iterate_over_regset_sections): Check for SVE.
3613         * regcache.h (regcache_map_entry_size): New function.
3614
3615 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3616
3617         * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
3618         (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
3619         (SVE_HEADER_VL_LENGTH): Likewise.
3620         (SVE_HEADER_MAX_VL_LENGTH): Likewise.
3621         (SVE_HEADER_FLAGS_LENGTH): Likewise.
3622         (SVE_HEADER_RESERVED_LENGTH): Likewise.
3623         (SVE_HEADER_SIZE_OFFSET): Likewise.
3624         (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
3625         (SVE_HEADER_VL_OFFSET): Likewise.
3626         (SVE_HEADER_MAX_VL_OFFSET): Likewise.
3627         (SVE_HEADER_FLAGS_OFFSET): Likewise.
3628         (SVE_HEADER_RESERVED_OFFSET): Likewise.
3629         (SVE_HEADER_SIZE): Likewise.
3630         (aarch64_linux_core_read_vq): Add function.
3631         (aarch64_linux_core_read_description): Check for SVE section.
3632
3633 2018-08-13  Alan Hayward  <alan.hayward@arm.com>
3634
3635         * aarch64-fbsd-tdep.c
3636         (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
3637         collect_size.
3638         * aarch64-linux-tdep.c
3639         (aarch64_linux_iterate_over_regset_sections): Likewise.
3640         * alpha-linux-tdep.c
3641         (alpha_linux_iterate_over_regset_sections):
3642         * alpha-nbsd-tdep.c
3643         (alphanbsd_iterate_over_regset_sections): Likewise.
3644         * amd64-fbsd-tdep.c
3645         (amd64fbsd_iterate_over_regset_sections): Likewise.
3646         * amd64-linux-tdep.c
3647         (amd64_linux_iterate_over_regset_sections): Likewise.
3648         * arm-bsd-tdep.c
3649         (armbsd_iterate_over_regset_sections): Likewise.
3650         * arm-fbsd-tdep.c
3651         (arm_fbsd_iterate_over_regset_sections): Likewise.
3652         * arm-linux-tdep.c
3653         (arm_linux_iterate_over_regset_sections): Likewise.
3654         * corelow.c (get_core_registers_cb): Likewise.
3655         (core_target::fetch_registers): Likewise.
3656         * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
3657         * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
3658         * gdbarch.h (void): Regenerate.
3659         * gdbarch.sh: Add supply_size and collect_size.
3660         * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
3661         * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
3662         * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
3663         * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
3664         * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
3665         * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
3666         * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
3667         * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
3668         * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
3669         * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
3670         * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
3671         * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
3672         * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
3673         * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
3674         * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
3675         * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
3676         * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
3677         * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
3678         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
3679         * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
3680         * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
3681         * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
3682         * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
3683         * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
3684         * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
3685         * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
3686         * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
3687         * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
3688         * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
3689         * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
3690
3691 2018-08-10  Simon Marchi  <simon.marchi@ericsson.com>
3692
3693         * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
3694         with string_printf.
3695
3696 2018-08-10  Keith Seitz  <keiths@redhat.com>
3697
3698         * compile/compile-c-support.c (add_code_header, add_code_footer):
3699         Move into policy class.
3700         (c_push_user_expression, pop_user_expression_nop)
3701         (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
3702         (compile_program): New host class.
3703         (c_compile_program): New typedef.
3704         (c_compute_porgram): Use c_compile_program.
3705
3706 2018-08-10  Keith Seitz  <keiths@redhat.com>
3707
3708         * compile/compile-internal.h (compile_instance::~compile_instance):
3709         Remove calls to htab_delete.
3710         <m_type_map, m_symbol_err_map>: Switch type to htab_up.
3711         * compile.c (compile_instance::compile_instance): Initialize
3712         htab unique pointers.
3713         (compile_instance::get_cached_type, compile_instance::insert_type)
3714         (compile_instance::error_symbol_once): Update for unique_ptr.
3715
3716 2018-08-10  Keith Seitz  <keiths@redhat.com>
3717
3718         * compile/compile-c-symbols.c (struct symbol_error)
3719         (hash_symbol_error, eq_symbol_error, del_symbol_error)
3720         (compile_instance::insert_symbol_error)
3721         (compile_instance::error_symbol_once): Move to ...
3722         * compile/compile.c: ... here.
3723
3724 2018-08-10  Keith Seitz  <keiths@redhat.com>
3725
3726         * compile/compile-c-support.c (c_get_compile_context): Use `new'
3727         instead of `new_compile_instance'.
3728         * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
3729         Update description.
3730         If the symbol error map is not initialized, create it.
3731         (generate_c_for_for_one_symbol): Do not check/initialize
3732         the symbol error map.
3733         * compile/compile-c-types.c (compile_c_instance): Make a class.
3734         Update all callers.
3735         (compile_instance::compile_instance): Initialize the type cache.
3736         (get_cached_type): New function.
3737         (insert_type): Update description.
3738         (compile_c_instance::m_default_cflags): Define.
3739         (convert_type): Update description.  Use get_cached_type.
3740         (delete_instance): Moved to destructor.
3741         (new_compile_instance): Moved to constructor.
3742         * compile/compile-c.h (compile_c_instance): Make class inheriting
3743         from compile_instance.
3744         <base>: Remove field.
3745         <type_map, symbol_err_map>: Move to base class.
3746         <c_plugin>: Rename to `m_plugin' and remove pointer type.
3747         * compile/compile-internal.h (compile_instance): Make class.
3748         <type_map_t, symbol_err_map_t>: Define.
3749         <fe>: Rename to `m_gcc_fe'.
3750         <scope, block, gcc_target_options>: Add `m_' prefix.
3751         <m_type_map, m_symbol_err_map>: New fields, moved from
3752         compile_c_instance.
3753         <destroy>: Remove.
3754         (convert_type, new_compile_instance): Remove.
3755         * compile/compile.c (cleanup_compile_instance): Remove.
3756         (compile_to_object): Use unique_ptr to eliminate cleanups.
3757         (compile_instance::set_print_callback, compile_instance::version)
3758         (compile_instance::set_verbose)
3759         (compile_instance::set_driver_filename)
3760         (compile_instance::set_triplet_regexp)
3761         (compile_instance::set_arguments)
3762         (compile_instance::set_source_file)
3763         (compile_instance::compile): Define.
3764
3765 2018-08-10  Keith Seitz  <keiths@redhat.com>
3766
3767         * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
3768         * compile/compile-c-types.c: Define GCC_METHODN macros and include
3769         gcc-c-fe.def to define C plugin.
3770         (delete_instance): Delete `c_plugin'.
3771         (new_compile_instance): Initialize `c_plugin'.
3772         * compile/compile-c.h: Include gcc_c_plugin.h.
3773         (struct compile_c_instance) <c_plugin>: New member.
3774         * gcc-c-plugin.h: New file.
3775         Update all callers with API change.
3776
3777 2018-08-10  Keith Seitz  <keiths@redhat.com>
3778
3779         * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
3780         (HFILES_NO_SRCDIR): ... to here.
3781         Add compile-internal.h and compile-c.h.
3782         * compile/compile-c-support.c: Include compile-c.h.
3783         * compile/compile-c-symbols.c: Include compile-c.h.
3784         (generate_c_for_variable_locations): Update comment.
3785         * compile/compile-c-types.c: Include compile-c.h.
3786         * compile/compile-c.h: New file -- moved C language declarations
3787         from other files here.
3788         * compile/compile-internal.h: Do not include hashtab.h or
3789         common/enum-flags.h.
3790         (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
3791         (gcc_convert_symbol, gcc_symbol_address)
3792         (generate_c_for_variable_locations, c_get_mode_for_size)
3793         (c_get_range_decl_name): Definitions moved to compile-c.h.
3794         * compile/compile-loc2c.c: Include compile-c.h.
3795
3796 2018-08-10  Keith Seitz  <keiths@redhat.com>
3797
3798         * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
3799         (c_symbol_substitution_name): ... this.
3800         Update all callers.
3801
3802 2018-08-10  Keith Seitz  <keiths@redhat.com>
3803
3804         * compile/compile-c-support.c (c_compute_program): Use
3805         unique_xmalloc_ptr to eliminate cleanup.
3806         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3807         Return a unique_xmalloc_ptr and eliminate cleanup.
3808         * compile/compile-internal.h (generate_c_for_variable_locations):
3809         Return unique_xmalloc_ptr and update description.
3810
3811 2018-08-10  Alan Hayward  <alan.hayward@arm.com>
3812
3813         * corelow.c (core_target::get_core_register_section): Rename
3814         min_size to section_min_size.
3815
3816 2018-08-09  Jim Wilson  <jimw@sifive.com>
3817
3818         * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
3819         (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
3820         * NEWS: Mention new GNU/Linux RISC-V target.
3821         * configure.host: Add riscv*-*-linux*.
3822         * configure.nat: Add riscv*.
3823         * configure.tgt: Add riscv*-*-linux*.
3824         * riscv-linux-nat.c: New file.
3825         * riscv-linux-tdep.c: New file.
3826
3827 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3828
3829         * infrun.c (resume): Make static, add forward declaration.
3830         (proceed): Update header comment.
3831         * infrun.h (resume): Delete declaration.
3832
3833 2018-08-09  Tom Tromey  <tom@tromey.com>
3834
3835         * riscv-tdep.h: Minor formatting fixes.
3836
3837 2018-08-09  Simon Marchi  <simon.marchi@ericsson.com>
3838
3839         * common/scoped_mmap.c (mmap_file): Silence ARI warning.
3840         * dwarf-index-cache.c (create_dir_and_check): Likewise.
3841         (test_mkdir_recursive): Likewise.
3842         * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
3843
3844 2018-08-09  Andrew Burgess  <andrew.burgess@embecosm.com>
3845
3846         * valarith.c (value_subscripted_rvalue): If an array is not in
3847         memory, and we don't know the upper bound, then we can't know that
3848         the requested element exists or not.
3849
3850 2018-08-08  Simon Marchi  <simon.marchi@ericsson.com>
3851
3852         * target.c (str_comma_list_concat_elem): Fix typo in comment.
3853         (target_options_to_string): Add comment.
3854
3855 2018-08-08  Tom Tromey  <tom@tromey.com>
3856
3857         * unittests/scoped_mmap-selftests.c: Check result of "write".
3858
3859 2018-08-08  Jim Wilson  <jimw@sifive.com>
3860
3861         * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
3862         (decode_register_index_short): New.
3863         (decode_j_type_insn, decode_cj_type_insn): New.
3864         (decode_b_type_insn, decode_cb_type_insn): New.
3865         (riscv_insn::decode): Add support for jumps, branches, lr, and sc.  New
3866         local xlen.  Check xlen when decoding ambiguous compressed insns.  In
3867         compressed decode, use is_c_lui_insn instead of is_lui_insn, and
3868         is_c_sw_insn instead of is_sw_insn.
3869         (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
3870         (riscv_software_single_step): New.
3871         * riscv-tdep.h (riscv_software_single_step): Declare.
3872
3873         * riscv-tdep.c (riscv_isa_xlen): Drop static.
3874         * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
3875
3876 2018-08-08  Andrew Burgess  <andrew.burgess@embecosm.com>
3877
3878         PR gdb/18050:
3879         * target.c (dispose_inferior): Don't dispose of inferiors that are
3880         already killed.
3881
3882 2018-08-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>
3883
3884         * remote.c (remote_target::download_tracepoint): Change char* to
3885         const char*.
3886
3887 2018-08-07  Simon Marchi  <simon.marchi@polymtl.ca>
3888
3889         * target.h (target_options_to_string): Return an std::string.
3890         * target.c (str_comma_list_concat_elem): Return void, use
3891         std::string.
3892         (do_option): Likewise.
3893         (target_options_to_string): Return an std::string.
3894         * linux-nat.c (linux_nat_target::wait): Adjust.
3895         * target-debug.h (target_debug_print_options): Adjust.
3896
3897 2018-08-07  Tom Tromey  <tom@tromey.com>
3898
3899         * Makefile.in (CPPFLAGS): New variable.
3900         (INTERNAL_CPPFLAGS): Use it.
3901
3902 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3903
3904         * NEWS: Mention the index cache.
3905
3906 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3907
3908         * common/pathstuff.h (get_standard_cache_dir): New.
3909         * common/pathstuff.c (get_standard_cache_dir): New.
3910         * build-id.h (build_id_to_string): New.
3911         * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
3912         DEBUG_STR_SUFFIX): Move to here.
3913         * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
3914         DEBUG_STR_SUFFIX): Move from there.
3915         (write_psymtabs_to_index): Make non-static, add basename
3916         parameter.  Write to temporary files, rename when done.
3917         (save_gdb_index_command): Adjust call to
3918         write_psymtabs_to_index.
3919         * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
3920         field.
3921         * dwarf2read.c (dwz_file) <index_cache_res>: New field.
3922         (get_gdb_index_contents_from_cache): New.
3923         (get_gdb_index_contents_from_cache_dwz): New.
3924         (dwarf2_initialize_objfile): Read index from cache.
3925         (dwarf2_build_psymtabs): Save to index.
3926         * dwarf-index-cache.h: New file.
3927         * dwarf-index-cache.c: New file.
3928         * dwarf-index-write.h: New file.
3929
3930 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3931
3932         * gnulib/aclocal.m4: Re-generate.
3933         * gnulib/config.in: Re-generate.
3934         * gnulib/configure: Re-generate.
3935         * gnulib/import/Makefile.am: Re-generate.
3936         * gnulib/import/Makefile.in: Re-generate.
3937         * gnulib/import/m4/gnulib-cache.m4: Re-generate.
3938         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
3939         * gnulib/import/m4/mkdir.m4: New file.
3940         * gnulib/import/mkdir.c: New file.
3941         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
3942         module.
3943
3944 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3945
3946         * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
3947         * common/scoped_mmap.c: New file.
3948         * common/scoped_mmap.h (destroy): New method.
3949         (~scoped_mmap, reset): Use destroy.
3950         (scoped_mmap): New move constructor.
3951         (mmap_file): New declaration.
3952         * unittests/scoped_mmap-selftests.c (test_normal,
3953         test_invalid_filename, run_tests): New functions.
3954         (_initialize_scoped_mmap_selftests): Register selftest.
3955
3956 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3957
3958         * dwarf2read.c (read_gdb_index_from_section): Rename to...
3959         (read_gdb_index_from_buffer): ... this.  Remove section
3960         parameter, add buffer parameter.
3961         (get_gdb_index_contents_ftype,
3962         get_gdb_index_contents_dwz_ftype): New typedefs.
3963         (dwarf2_read_gdb_index): Add callback parameters to get the
3964         index contents.
3965         (get_gdb_index_contents_from_section): New.
3966         (dwarf2_initialize_objfile): Update call to
3967         dwarf2_read_gdb_index.
3968
3969 2018-08-07  Simon Marchi  <simon.marchi@ericsson.com>
3970
3971         * common/filestuff.h (gdb_fopen_cloexec): New overload.
3972         (gdb_open_cloexec): Likewise.
3973         * nat/linux-osdata.c (command_from_pid): Use string_printf.
3974         (commandline_from_pid): Likewise.
3975         (linux_xfer_osdata_threads): Likewise.
3976         (linux_xfer_osdata_fds): Likewise.
3977         * ada-lang.c (is_package_name): Likewise.
3978         * auxv.c (procfs_xfer_auxv): Likewise.
3979         * breakpoint.c (print_one_breakpoint_location): Use
3980         uiout::field_fmt.
3981         (print_one_catch_solib): Use string_printf.
3982         * coff-pe-read.c (add_pe_exported_sym): Likewise.
3983         (add_pe_forwarded_sym): Likewise.
3984         * dwarf2read.c (create_type_unit_group): Likewise.
3985         (build_error_marker_type): Likewise.
3986         * infcall.c (get_function_name): Likewise.
3987         * valprint.c (print_converted_chars_to_obstack): Likewise.
3988         * xtensa-tdep.c (xtensa_register_type): Likewise.
3989
3990 2018-08-06  Simon Marchi  <simon.marchi@ericsson.com>
3991
3992         * remote.c (remote_target::download_tracepoint): Fix format
3993         string errors.
3994
3995 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
3996
3997         * tracefile.c: Include common/byte-vector.h.
3998         (trace_save): Change type of buf to gdb::byte_vector.  Initialize
3999         with trace_regblock_size if needed.  Update uses of buf.
4000
4001 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4002
4003         * tracepoint.h (collection_list) <m_regs_mask>: Change type to
4004         std::vector<unsigned char>.
4005         * tracepoint.c (collection_list::collection_list): Remove
4006         m_regs_mask initializer from initializer list.  Resize
4007         m_regs_mask using the largest remote register number.
4008         (collection_list::add_remote_register): Remove size check on
4009         m_regs_mask.  Use at to access element.
4010         (collection_list::stringify): Change type of temp_buf to
4011         gdb::char_vector.  Update uses of temp_buf.  Resize if needed to
4012         stringify the register mask.  Use pack_hex_byte for the register
4013         mask.
4014
4015 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4016
4017         * tracepoint.h (class collection_list) <add_register>: Remove.
4018         <add_remote_register, add_ax_registers, add_local_register>:
4019         Declare.
4020         <add_memrange>: Add scope parameter.
4021         * tracepoint.c (encode_actions_1): Likewise.
4022         (collection_list::add_register): Rename to ...
4023         (collection_list::add_remote_register): ... this.  Update
4024         comment.
4025         (collection_list::add_ax_registers, add_local_register): New
4026         methods.
4027         (collection_list::add_memrange): Add scope parameter.  Call
4028         add_local_register instead of add_register.
4029         (finalize_tracepoint_aexpr): New function.
4030         (collection_list::collect_symbol): Update calls to add_memrange.
4031         Call add_local_register instead of add_register.  Call
4032         add_ax_registers.  Call finalize_tracepoint_aexpr.
4033         (encode_actions_1): Get remote regnos for $reg action.  Call
4034         add_remote_register, add_ax_registers, and add_local_register.
4035         Update call to add_memrange.  Call finalize_tracepoint_aexpr.
4036         (validate_actionline): Call finalize_tracepoint_aexpr.
4037
4038 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4039
4040         * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
4041         Replace array buf with gdb::char_vector buf, of size
4042         get_remote_packet_size ().  Replace references to buf and
4043         BUF_SIZE to buf.data () and buf.size ().  Replace strcpy, strcat
4044         and xsnprintf with snprintf.  Raise errors if the buffer is too
4045         small.
4046
4047 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4048
4049         * remote.c (remote_target::download_tracepoint): Fix the has_more
4050         predicate in the QTDP action list iteration.
4051
4052 2018-08-06  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
4053
4054         * remote.c (remote_target::download_tracepoint): Fix indentation
4055         in for block.
4056
4057 2018-08-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4058
4059         * proc-api.c (_initialize_proc_api): Remove c, unused.
4060         * procfs.c (procfs_init_inferior): Remove signals, unused.
4061         (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
4062         unused.
4063
4064 2018-08-06  Sergey Korolev  <s.korolev@ndmsystems.com>
4065             Andrew Burgess  <andrew.burgess@embecosm.com>
4066
4067         * linux-nat.c (linux_nat_target::follow_fork): Avoid using
4068         'W_STOPCODE (0)' as this could be ambiguous.
4069
4070 2018-08-03  Sergio Durigan Junior  <sergiodj@redhat.com>
4071
4072         * ser-tcp.c (net_open): Fix thinko when deciding whether to
4073         disable TCP's Nagle algorithm (use "ai_protocol" instead of
4074         "ai_socktype").
4075
4076 2018-08-02  Tom Tromey  <tom@tromey.com>
4077
4078         PR symtab/16842.
4079         * dwarf2read.c (read_func_scope): Set symtab on template parameter
4080         symbols.
4081         (process_structure_scope): Likewise.
4082
4083 2018-08-02  Xavier Roirand  <roirand@adacore.com>
4084
4085         PR gdb/22629:
4086         * darwin-nat.c (darwin_kill_inferior): Fix handling of
4087         kill inferior.
4088
4089 2018-08-02  Tom Tromey  <tom@tromey.com>
4090
4091         * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
4092         (darwin_suspend_inferior, darwin_resume_inferior)
4093         (darwin_decode_notify_message, darwin_resume_inferior_threads)
4094         (darwin_check_new_threads): Check result of get_darwin_inferior.
4095
4096 2018-07-31  Joel Brobecker  <brobecker@adacore.com>
4097
4098         GDB 8.1.1 released.
4099
4100 2018-07-31  Jan Vrany  <jan.vrany@fit.cvut.cz>
4101
4102         * varobj.c (varobj_get_path_expr_parent): Report an error if
4103         parent is a dynamic varobj.
4104
4105 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4106
4107         * gnulib/aclocal.m4: Re-generate.
4108         * gnulib/config.in: Re-generate.
4109         * gnulib/configure: Re-generate.
4110         * gnulib/import/Makefile.in: Re-generate.
4111         * gnulib/import/m4/gnulib-comp.m4: Re-generate.
4112         * gnulib/import/m4/onceonly.m4: Re-generate.
4113
4114 2018-07-31  Simon Marchi  <simon.marchi@ericsson.com>
4115
4116         * target-descriptions.c (struct xml_test_tdesc): New.
4117         (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
4118         (record_xml_tdesc): Update.
4119         (maintenance_check_xml_descriptions): Update.
4120         * target-descriptions.h (record_xml_tdesc): Update comment.
4121
4122 2018-07-30  Andrew Burgess  <andrew.burgess@embecosm.com>
4123
4124         * eval.c (evaluate_subexp_for_sizeof): Check for array type before
4125         checking array bounds are defined.
4126
4127 2018-07-30  Tom Tromey  <tom@tromey.com>
4128
4129         * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
4130         irreflexivity violation.
4131
4132 2018-07-30  Tom Tromey  <tom@tromey.com>
4133
4134         * cli/cli-decode.c (lookup_cmd): Remove lint code.
4135         * value.c (unpack_long): Remove lint code.
4136         * valops.c (value_ind): Remove lint code.
4137         * valarith.c (value_x_binop, value_x_unop, value_equal)
4138         (value_pos): Remove lint code.
4139
4140 2018-07-28  Tom de Vries  <tdevries@suse.de>
4141
4142         * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
4143         with undefined upper bound as <optimized out>.
4144
4145 2018-07-27  Sergio Durigan Junior  <sergiodj@redhat.com>
4146
4147         * gcore.in: Rename variable "name" to "prefix".  Expand
4148         "usage" text.
4149
4150 2018-07-14  Jon Turney  <jon.turney@dronecode.org.uk>
4151
4152         * windows-nat.c (windows_nat_target::create_inferior): Update to
4153         call close() in global namespace.
4154
4155 2018-07-26  Tom Tromey  <tom@tromey.com>
4156
4157         * dwarf-index-write.c (add_address_entry): Don't add objfile
4158         offsets.
4159         * dbxread.c (find_stab_function): Rename from
4160         find_stab_function_addr.  Return a bound_minimal_symbol.
4161         (read_dbx_symtab): Use raw_text_low, raw_text_high.
4162         Don't add objfile offsets.
4163         (end_psymtab): Use raw_text_low, raw_text_high,
4164         MSYMBOL_VALUE_RAW_ADDRESS.
4165         (read_ofile_symtab): Update.
4166         (process_one_symbol): Update.
4167         * dwarf2read.c (create_addrmap_from_index): Don't add objfile
4168         offsets.
4169         (dw2_relocate): Remove.
4170         (dw2_find_pc_sect_symtab): Bias PC by the text offset before
4171         searching addrmap.
4172         (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
4173         Update.
4174         (process_psymtab_comp_unit_reader, add_partial_symbol)
4175         (add_partial_subprogram, dwarf2_ranges_read): Update.
4176         (load_partial_dies): Update.
4177         (add_address_entry): Don't add objfile offsets.
4178         (dwarf2_build_include_psymtabs): Update.
4179         (create_addrmap_from_aranges): Don't add objfile offsets.
4180         (dw2_find_pc_sect_compunit_symtab): Update.
4181         * mdebugread.c (parse_symbol): Don't add objfile offsets.
4182         (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
4183         Update.
4184         (parse_partial_symbols): Don't add objfile offsets.  Use
4185         raw_text_low, raw_text_high.  Update.
4186         (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
4187         * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
4188         or call 'relocate' quick function.  Clear psymbol_map.
4189         * psympriv.h (struct partial_symbol) <address>: Add section
4190         offset.
4191         <set_unrelocated_address>: Rename from set_address.
4192         <raw_text_low, raw_text_high>: New methods.
4193         <text_low, text_high>: Add objfile parameter.
4194         (add_psymbol_to_bcache): Add 'section' parameter.  Call
4195         set_unrelocated_address.
4196         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4197         (find_pc_psymbol): Update.
4198         (fixup_psymbol_section, relocate_psymtabs): Remove.
4199         (dump_psymtab, psym_functions): Update.
4200         (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
4201         parameter.
4202         (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
4203         (start_psymtab_common): Update.
4204         * symfile-debug.c (debug_qf_relocate): Remove.
4205         (debug_sym_quick_functions): Update.
4206         * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
4207         * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
4208         Update.
4209
4210 2018-07-26  Tom Tromey  <tromey@redhat.com>
4211
4212         * dbxread.c (end_psymtab): Use text_high_valid and
4213         text_low_valid.
4214         * mdebugread.c (parse_partial_symbols): Use text_low_valid.
4215         (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
4216         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4217         Update comment.
4218         <text_low_valid, text_high_valid>: New fields.
4219         <set_text_low, set_text_high>: Update.
4220         * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
4221
4222 2018-07-26  Tom Tromey  <tom@tromey.com>
4223
4224         * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
4225         Update.
4226         * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
4227         textlow and texthigh fields.
4228         (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
4229         Update.
4230         * mdebugread.c (parse_lines, parse_partial_symbols)
4231         (psymtab_to_symtab_1): Update.
4232         * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
4233         Rename fields.  Update comment.  Now private.
4234         <text_low, text_high, set_text_low, set_text_high>: New methods.
4235         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4236         (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
4237         (start_psymtab_common, maintenance_info_psymtabs)
4238         (maintenance_check_psymtabs): Update.
4239         * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
4240         texthigh fields.
4241         (scan_xcoff_symtab): Update.
4242
4243 2018-07-26  Tom Tromey  <tromey@redhat.com>
4244
4245         * psympriv.h (struct partial_symbol) <unrelocated_address,
4246         address, set_address>: New methods.
4247         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
4248         (fixup_psymbol_section, relocate_psymtabs): Update.
4249         (print_partial_symbols): Add 'objfile' parameter.  Update.
4250         (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
4251         Update.
4252
4253 2018-07-26  Tom Tromey  <tom@tromey.com>
4254
4255         * dwarf-index-write.c (write_psymbols, debug_names::insert)
4256         (debug_names::write_psymbols): Update.
4257         * psympriv.h (struct partial_symbol): Derive from
4258         general_symbol_info.
4259         <obj_section>: New method.
4260         (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
4261         * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
4262         (find_pc_sect_psymbol, fixup_psymbol_section)
4263         (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
4264         (print_partial_symbols, recursively_search_psymtabs)
4265         (compare_psymbols, psymbol_hash, psymbol_compare)
4266         (add_psymbol_to_bcache, maintenance_check_psymtabs)
4267         (psymbol_name_matches, psym_fill_psymbol_map): Update.
4268
4269 2018-07-26  Tom Tromey  <tromey@redhat.com>
4270
4271         * dbxread.c (end_psymtab): Remove dead code.
4272
4273 2018-07-26  Andrew Burgess  <andrew.burgess@embecosm.com>
4274
4275         * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
4276         DWARF unwinders are disabled.
4277         * dwarf2-frame.c: Add dwarf2read.h include.
4278         (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
4279         disabled.
4280         (dwarf2_frame_unwinders_enabled_p): Define.
4281         (show_dwarf_unwinders_enabled_p): New function.
4282         (_initialize_dwarf2_frame): Register switch to control DWARF
4283         unwinder use.
4284         * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
4285         * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
4286         (show_dwarf_cmdlist): Remove static keyword.
4287         * dwarf2read.h (set_dwarf_cmdlist): Declare.
4288         (show_dwarf_cmdlist): Declare.
4289         * NEWS: Document new feature.
4290
4291 2018-07-26  Tom de Vries  <tdevries@suse.de>
4292
4293         PR breakpoints/23366
4294         * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
4295
4296 2018-07-26  Tom de Vries  <tdevries@suse.de>
4297
4298         * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
4299         DW_AT_count can't be translated to a dynamic prop.
4300
4301 2018-07-25  Tom de Vries  <tdevries@suse.de>
4302
4303         * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
4304         try/catch.
4305
4306 2018-07-25  Jan Vrany  <jan.vrany@fit.cvut.cz>
4307
4308         * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
4309
4310 2018-07-25  Joel Brobecker  <brobecker@adacore.com>
4311
4312         * MAINTAINERS (Global Maintainers): Add Tom Tromey.
4313
4314 2018-07-24  Keith Seitz  <keiths@redhat.comt
4315
4316         PR symtab/23010
4317         * dwarf2read.c (dw2_add_symbol_to_list): New function.
4318         (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
4319         instead of add_symbol_to_list.
4320         (read_file_scope): Call prepare_one_comp_unit before reading
4321         any other DIEs.
4322
4323 2018-07-24  Simon Marchi  <simon.marchi@ericsson.com>
4324
4325         * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
4326
4327 2018-07-24  Tom Tromey  <tom@tromey.com>
4328
4329         * utils.c (malloc, realloc, free): Don't declare.
4330         * configure, config.in: Rebuild.
4331         * configure.ac: Don't check for declarations of free, malloc, or
4332         realloc.
4333
4334 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4335
4336         * aarch64-linux-nat.c
4337         (aarch64_linux_nat_target::stopped_data_address): Remove unused
4338         variable.
4339         * arm-linux-nat.c (fetch_regs): Likewise.
4340         (store_regs): Likewise.
4341         (fetch_vfp_regs): Likewise.
4342         (store_vfp_regs): Likewise.
4343         (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
4344         (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
4345         (arm_linux_nat_target::insert_watchpoint): Likewise.
4346         (arm_linux_nat_target::remove_watchpoint): Likewise.
4347         * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
4348         Likewise.
4349         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
4350         Likewise.
4351         * ppc-linux-nat.c (fetch_register): Likewise.
4352         (fetch_all_gp_regs): Likewise.
4353         (fetch_ppc_registers): Likewise.
4354         (store_all_gp_regs): Likewise.
4355         (store_ppc_registers): Likewise.
4356         (hwdebug_insert_point): Likewise.
4357         (can_use_watchpoint_cond_accel): Likewise.
4358         * remote-sim.c (gdb_os_write_stdout): Likewise.
4359
4360 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
4361             Tom Tromey  <tom@tromey.com>
4362
4363         * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
4364         test for it.
4365         * configure: Rebuild.
4366
4367 2018-07-22  Tom Tromey  <tom@tromey.com>
4368
4369         * regformats/regdat.sh: Define xmltarget_${name} inside
4370         #ifndef IN_PROCESS_AGENT.
4371
4372 2018-07-22  Tom Tromey  <tom@tromey.com>
4373
4374         * value.c (value_fetch_lazy_bitfield): Remove unused variable.
4375
4376 2018-07-22  Tom Tromey  <tom@tromey.com>
4377
4378         * symfile.c (reread_symbols): Notify iter, not objfile.
4379
4380 2018-07-22  Tom Tromey  <tom@tromey.com>
4381
4382         * ravenscar-thread.c (ravenscar_thread_target::store_registers):
4383         Use arch_ops.
4384         (ravenscar_thread_target::prepare_to_store): Likewise.
4385
4386 2018-07-22  Tom Tromey  <tom@tromey.com>
4387
4388         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
4389         unused variable.  Call value_fetch_lazy when needed.
4390         * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
4391         Remove unused variable.  Call value_fetch_lazy when needed.
4392
4393 2018-07-22  Tom Tromey  <tom@tromey.com>
4394
4395         * m32c-tdep.c (mark_dma): Return void.
4396         (make_regs): Remove unused declarations.
4397
4398 2018-07-22  Tom Tromey  <tom@tromey.com>
4399
4400         * guile/scm-cmd.c (gdbscm_dont_repeat): Call
4401         cmdscm_get_valid_command_smob_arg_unsafe for effect.
4402         * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
4403         bkscm_get_valid_block_smob_arg_unsafe for effect.
4404
4405 2018-07-22  Tom Tromey  <tom@tromey.com>
4406
4407         * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
4408         value_type.
4409
4410 2018-07-22  Tom Tromey  <tom@tromey.com>
4411
4412         * windows-nat.c (saved_context): Conditionally define.
4413         * remote.c (remote_target::remote_btrace_maybe_reopen):
4414         Conditionally declare "warned".
4415         * inflow.c (sigquit_ours): Conditionally define.
4416         (new_tty): Move "tty" declaration inside #if.
4417         * guile/guile.c (guile_datadir): Conditionally define.
4418         * charset.c (set_be_le_names): Move some declarations inside #if.
4419         * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
4420         #if.
4421         (parse_xml_btrace_conf): Likewise.
4422
4423 2018-07-22  Tom Tromey  <tom@tromey.com>
4424
4425         * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
4426
4427 2018-07-22  Tom Tromey  <tom@tromey.com>
4428
4429         * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
4430         * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
4431         (vlscm_convert_typed_value_from_scheme): Remove unused variable.
4432         * buildsym-legacy.c (get_macro_table): Remove unused variable.
4433         * stack.c (frame_apply_level_command): Remove unused variable.
4434         * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
4435         * sparc64-tdep.c (adi_examine_command): Remove unused variable.
4436         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
4437         unused variable.
4438         * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
4439         * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
4440         * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
4441         variable.
4442         * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
4443         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
4444         variable.
4445         * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
4446         Remove unused variable.
4447         * cli/cli-script.c (recurse_read_control_structure): Remove unused
4448         variable.
4449         * common/tdesc.c (print_xml_feature::visit): Remove unused
4450         variable.
4451         * compile/compile-object-load.c (store_regs): Remove unused
4452         variables.
4453         * complaints.c (clear_complaints): Remove unused variable.
4454         * corelow.c (core_target_open): Remove unused variable.
4455         * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
4456         variable.
4457         * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
4458         variable.
4459         * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
4460         variable.
4461         * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
4462         variable.
4463         * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
4464         variable.
4465         * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
4466         variable.
4467         * ia64-tdep.c (examine_prologue): Remove unused variable.
4468         * infcall.c (run_inferior_call): Remove unused variable.
4469         * inferior.c (exit_inferior): Remove unused variable.
4470         * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
4471         * linespec.c (decode_line_2): Remove unused variable.
4472         * linux-nat.c (super_close): Remove.
4473         * linux-tdep.c (linux_info_proc): Remove unused variable.
4474         * mi/mi-main.c (mi_execute_command): Remove unused variable.
4475         * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
4476         Remove unused variable.
4477         * parse.c (find_minsym_type_and_address): Remove unused variable.
4478         * printcmd.c (info_symbol_command, printf_floating): Remove unused
4479         variable.
4480         * python/py-breakpoint.c (bppy_set_commands): Remove unused
4481         variable.
4482         * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
4483         variables.
4484         * record-btrace.c (record_btrace_target::store_registers): Remove
4485         unused variable.
4486         (cmd_show_record_btrace_cpu): Remove unused variable.
4487         * riscv-tdep.c (riscv_register_reggroup_p)
4488         (riscv_push_dummy_call, riscv_return_value): Remove unused
4489         variable.
4490         * rust-exp.y (literal): Remove unused variable.
4491         * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
4492         unused variable.
4493         <STRUCTOP_ANONYMOUS>: Likewise.
4494         * s390-linux-tdep.c (s390_linux_init_abi_31)
4495         (s390_linux_init_abi_64): Remove unused variable.
4496         * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
4497         (file_select_thread, net_windows_open, _initialize_ser_windows):
4498         Remove unused variables.
4499         * symtab.c (find_pc_sect_line): Remove unused variable.
4500         * target-memory.c (compute_garbled_blocks): Remove unused
4501         variable.
4502         (target_write_memory_blocks): Remove unused variable.
4503         * target.c (target_stack::unpush): Remove unused variables.
4504         * tracepoint.c (start_tracing, all_tracepoint_actions)
4505         (merge_uploaded_trace_state_variables)
4506         (print_one_static_tracepoint_marker): Remove unused variable.
4507         * unittests/basic_string_view/element_access/char/1.cc (test01):
4508         Remove unused variable.
4509         * windows-nat.c (windows_continue, windows_add_all_dlls)
4510         (do_initial_windows_stuff, windows_nat_target::create_inferior):
4511         Remove unused variables.
4512
4513 2018-07-21  Simon Marchi  <simon.marchi@polymtl.ca>
4514
4515         * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
4516         attr_profile in HAVE_ELF.
4517         * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
4518         HAVE_ELF.
4519
4520 2018-07-20  Simon Marchi  <simon.marchi@polymtl.ca>
4521
4522         * frame.c (frame_register_unwind): Change parameter name.
4523         (frame_unwind_register): Likewise.
4524         (frame_unwind_register_value): Likewise.
4525         (frame_unwind_register_signed): Likewise.
4526         (frame_unwind_register_unsigned): Likewise.
4527         * frame.h (frame_register_unwind): Likewise.
4528         (frame_unwind_register): Likewise.
4529         (frame_unwind_register_value): Likewise.
4530         (frame_unwind_register_signed): Likewise.
4531         (frame_unwind_register_unsigned): Likewise.
4532         (frame_unwind_arch): Likewise.
4533
4534 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4535
4536         * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
4537         ISA maintenance.
4538
4539 2018-07-20  Maciej W. Rozycki  <macro@mips.com>
4540
4541         * mips-linux-nat.c (mips_linux_nat_target::read_description):
4542         Call `get_ptrace_pid' rather than extracting the ptrace PID by
4543         hand.
4544
4545 2018-07-20  Keith Seitz  <keiths@redhat.com>
4546
4547         * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
4548         m_main_subfile, m_comp_dir, m_producer, m_debugformat,
4549         m_compunit_symtab, m_language>: Add "m_" prefix.
4550         Update all uses.
4551         * buildsym.c: Update all uses.
4552
4553 2018-07-20  Tom Tromey  <tom@tromey.com>
4554
4555         * buildsym-legacy.h (record_line): Don't use record_line_ftype.
4556         * buildsym.h (record_line_ftype): Remove typedef.
4557
4558 2018-07-20  Tom Tromey  <tom@tromey.com>
4559
4560         * buildsym-legacy.h (augment_type_symtab): Don't declare.
4561         (end_expandable_symtab): Likewise.
4562         (end_symtab_get_static_block): Likewise.
4563         (end_symtab_from_static_block): Likewise.
4564         * buildsym-legacy.c (augment_type_symtab): Remove.
4565         (end_expandable_symtab): Remove.
4566         (end_symtab_get_static_block): Remove.
4567         (end_symtab_from_static_block): Remove.
4568
4569 2018-07-20  Tom Tromey  <tom@tromey.com>
4570
4571         * dwarf2read.c: Include buildsym.h.
4572         (struct dwarf2_cu) <builder>: New method.
4573         (fixup_go_packaging): Update.
4574         (process_full_comp_unit, process_full_type_unit): Update.  Don't
4575         use scoped_free_pendings.
4576         (using_directives): Add "cu" parameter, remove "language".
4577         (read_import_statement, setup_type_unit_groups, )
4578         (read_func_scope, read_lexical_block_scope)
4579         (dwarf2_record_block_ranges, read_namespace): Update.
4580         (lnp_state_machine::lnp_state_machine): Add cu parameter.
4581         (lnp_state_machine::handle_end_sequence): Update.
4582         (class lnp_state_machine) <m_cu>: New member.
4583         <m_record_line_callback>: Remove.
4584         <m_currently_recording_lines>: New member.
4585         (lnp_state_machine::handle_set_file): Update.
4586         (noop_record_line): Remove.
4587         (dwarf_record_line_p): Add cu parameter.
4588         (dwarf_record_line_1, dwarf_finish_line): Likewise.
4589         (lnp_state_machine::record_line)
4590         (lnp_state_machine::lnp_state_machine)
4591         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4592         (dwarf_decode_lines): Update.
4593         (dwarf2_start_subfile): Add cu parameter.
4594         (dwarf2_start_symtab, new_symbol): Update.
4595         (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
4596         Remove dwarf2_per_objfile parameter.
4597         (dwarf_decode_macros): Update.
4598
4599 2018-07-20  Tom Tromey  <tom@tromey.com>
4600
4601         * stabsread.c (define_symbol): Update.
4602         * buildsym-legacy.h (get_buildsym_compunit): Declare.
4603         * dwarf2read.c (new_symbol): Update.
4604         * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
4605         * cp-namespace.c: Include buildsym.h.
4606         (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
4607         * buildsym-legacy.c (get_buildsym_compunit): New function.
4608
4609 2018-07-20  Tom Tromey  <tom@tromey.com>
4610
4611         * xcoffread.c: Include buildsym-legacy.h.
4612         * windows-nat.c: Include buildsym-legacy.h.
4613         * stabsread.c: Include buildsym-legacy.h.
4614         * mdebugread.c: Include buildsym-legacy.h.
4615         * buildsym-legacy.h: New file.
4616         * buildsym-legacy.c: New file, from buildsym.c.
4617         * go32-nat.c: Include buildsym-legacy.h.
4618         * dwarf2read.c: Include buildsym-legacy.h.
4619         * dbxread.c: Include buildsym-legacy.h.
4620         * cp-namespace.c: Include buildsym-legacy.h.
4621         * coffread.c: Include buildsym-legacy.h.
4622         * buildsym.h: Move some contents to buildsym-legacy.h.
4623         * buildsym.c: Include buildsym-legacy.h.  Move many functions to
4624         buildsym-legacy.c.
4625         * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
4626
4627 2018-07-20  Tom Tromey  <tom@tromey.com>
4628
4629         * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
4630         * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
4631         (buildsym_compunit::buildsym_compunit)
4632         (buildsym_compunit::~buildsym_compunit)
4633         (buildsym_compunit::get_macro_table): Define.
4634
4635 2018-07-20  Tom Tromey  <tom@tromey.com>
4636
4637         * buildsym.c (reset_symtab_globals): Remove.
4638         (buildsym_compunit::end_symtab_from_static_block): Update.
4639         (buildsym_compunit::augment_type_symtab): Update.
4640         (end_symtab_from_static_block): Call free_buildsym_compunit.
4641         (augment_type_symtab, end_symtab, end_expandable_symtab):
4642         Likewise.
4643
4644 2018-07-20  Tom Tromey  <tom@tromey.com>
4645
4646         * arch-utils.c: Do not include buildsym.h.
4647         * mipsread.c: Do not include buildsym.h.
4648         * machoread.c: Do not include buildsym.h.
4649         * elfread.c: Do not include buildsym.h.
4650
4651 2018-07-20  Tom Tromey  <tom@tromey.com>
4652
4653         * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
4654         initialization.
4655         (buildsym_compunit): Add new constructor.
4656         (struct buildsym_compunit) <get_last_source_file, finish_block,
4657         record_block_range, start_subfile, patch_subfile_names,
4658         push_subfile, pop_subfile, record_line, get_compunit_symtab,
4659         set_last_source_start_addr, get_last_source_start_addr,
4660         get_local_using_directives, set_local_using_directives,
4661         get_global_using_directives, outermost_context_p,
4662         get_current_context_stack, get_context_stack_depth,
4663         get_current_subfile, get_local_symbols, get_file_symbols,
4664         get_global_symbols, record_debugformat, record_producer,
4665         push_context, pop_context, end_symtab_get_static_block,
4666         end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
4667         New public methods.
4668         <record_pending_block, finish_block_internal, make_blockvector,
4669         watch_main_source_file_lossage, end_symtab_with_blockvector>: New
4670         private methods.
4671         Update all users.
4672
4673 2018-05-22  Tom Tromey  <tom@tromey.com>
4674
4675         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4676         parameter.
4677         (finish_block_internal): Update.
4678
4679 2018-07-20  Tom Tromey  <tom@tromey.com>
4680
4681         * buildsym.c (record_pending_block): Move earlier.  Remove objfile
4682         parameter.
4683         (finish_block_internal): Update.
4684
4685 2018-07-20  Tom Tromey  <tom@tromey.com>
4686
4687         * buildsym.h (EXTERN): Don't define or undef.
4688         * buildsym.c (EXTERN): Don't define.
4689
4690 2018-07-20  Tom Tromey  <tom@tromey.com>
4691
4692         * buildsym.c: Remove TODO comment.
4693
4694 2018-07-20  Tom Tromey  <tom@tromey.com>
4695
4696         * coffread.c (coff_symtab_read): Update.
4697         * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
4698         (xcoff_new_init): Update.
4699         * mipsread.c (mipscoff_new_init): Update.
4700         * mdebugread.c (mdebug_build_psymtabs): Update.
4701         * elfread.c (elf_new_init): Update.
4702         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4703         Update.
4704         * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
4705         (coffstab_build_psymtabs, elfstab_build_psymtabs)
4706         (stabsect_build_psymtabs): Update.
4707         * buildsym.h (buildsym_init): Don't declare.
4708         * buildsym.c: Update comment.
4709         (prepare_for_building): Remove.
4710         (start_symtab, restart_symtab): Update.
4711         (reset_symtab_globals): Update comment.
4712         (buildsym_init): Remove.
4713
4714 2018-07-20  Tom Tromey  <tom@tromey.com>
4715
4716         * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
4717         * stabsread.c (patch_block_stabs, define_symbol, read_type)
4718         (read_enum_type, common_block_start, common_block_end)
4719         (cleanup_undefined_types_1, finish_global_stabs): Update.
4720         * mdebugread.c (psymtab_to_symtab_1): Update.
4721         * dwarf2read.c (fixup_go_packaging, read_func_scope)
4722         (read_lexical_block_scope, new_symbol): Update.
4723         * dbxread.c (process_one_symbol): Update.
4724         * coffread.c (coff_symtab_read, process_coff_symbol)
4725         (coff_read_enum_type): Update.
4726         * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
4727         declare.
4728         (get_local_symbols, get_file_symbols, get_global_symbols): New
4729         functions.
4730         * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
4731         m_global_symbols.
4732         <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
4733         (~scoped_free_pendings): Update.
4734         (finish_block, prepare_for_building, reset_symtab_globals)
4735         (end_symtab_get_static_block, end_symtab_with_blockvector)
4736         (augment_type_symtab, push_context): Update.
4737         (get_local_symbols, get_file_symbols, get_global_symbols): New
4738         functions.
4739         (buildsym_init): Update.
4740
4741 2018-07-20  Tom Tromey  <tom@tromey.com>
4742
4743         * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
4744         (process_full_type_unit): Likewise.
4745         (dwarf2_start_symtab): Set list_in_scope.
4746
4747 2018-07-20  Tom Tromey  <tom@tromey.com>
4748
4749         * dwarf2read.c (process_psymtab_comp_unit_reader)
4750         (build_type_psymtabs_reader): Do not set list_in_scope.
4751
4752 2018-07-20  Tom Tromey  <tom@tromey.com>
4753
4754         * buildsym.c (free_pendings): Remove.
4755         (add_symbol_to_list, scoped_free_pendings)
4756         (finish_block_internal, buildsym_init): Update.
4757
4758 2018-07-20  Tom Tromey  <tom@tromey.com>
4759
4760         * xcoffread.c (read_xcoff_symtab): Update.
4761         * dwarf2read.c (read_func_scope, read_lexical_block_scope):
4762         Update.
4763         * dbxread.c (process_one_symbol): Update.
4764         * coffread.c (coff_symtab_read): Update.
4765         * buildsym.h (finish_block): Update.
4766         * buildsym.c (finish_block): Remove "listhead" argument.
4767         (end_symtab_get_static_block): Update.
4768
4769 2018-07-20  Tom Tromey  <tom@tromey.com>
4770
4771         * buildsym.h (class scoped_free_pendings): Remove constructor.
4772         * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
4773         method.
4774         <m_pending_block_obstack, m_pending_blocks>: New members.
4775         (pending_block_obstack, pending_blocks): Remove.
4776         (scoped_free_pendings::scoped_free_pendings): Default.
4777         (~scoped_free_pendings): Update.
4778         (free_pending_blocks): Remove.
4779         (finish_block_internal, record_pending_block, make_blockvector)
4780         (end_symtab_get_static_block, augment_type_symtab, push_context)
4781         (buildsym_init): Update.
4782
4783 2018-07-20  Tom Tromey  <tom@tromey.com>
4784
4785         * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
4786         m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
4787         members.
4788         (pending_addrmap, pending_addrmap_obstack)
4789         (pending_addrmap_interesting): Remove.
4790         (scoped_free_pendings, record_block_range, make_blockvector)
4791         (prepare_for_building, reset_symtab_globals, buildsym_init):
4792         Update.
4793
4794 2018-07-20  Tom Tromey  <tom@tromey.com>
4795
4796         * xcoffread.c (process_linenos): Update.
4797         * stabsread.c (define_symbol, read_type, read_enum_type): Update.
4798         * mdebugread.c (psymtab_to_symtab_1): Update.
4799         * dwarf2read.c (setup_type_unit_groups)
4800         (lnp_state_machine::handle_set_file, dwarf_record_line_p)
4801         (lnp_state_machine::record_line, dwarf_decode_lines): Update.
4802         * dbxread.c (process_one_symbol): Update.
4803         * coffread.c (coff_symtab_read, enter_linenos)
4804         (process_coff_symbol): Update.
4805         * buildsym.h (current_subfile): Don't declare.
4806         (get_current_subfile): Declare.
4807         * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
4808         member.
4809         (start_subfile, free_buildsym_compunit, push_subfile)
4810         (prepare_for_building, start_symtab): Update.
4811         (get_current_subfile): New function.
4812
4813 2018-07-20  Tom Tromey  <tom@tromey.com>
4814
4815         * coffread.c (coff_symtab_read): Update.
4816         * xcoffread.c (read_xcoff_symtab): Update.
4817         * dwarf2read.c (new_symbol): Update.
4818         (read_func_scope, read_lexical_block_scope): Update.
4819         * dbxread.c (process_one_symbol): Update.
4820         * buildsym.h (context_stack, context_stack_depth): Don't declare.
4821         (outermost_context_p): Remove macro.
4822         (outermost_context_p, get_current_context_stack)
4823         (get_context_stack_depth): Declare.
4824         (pop_context): Return struct context_stack.
4825         * buildsym.c (struct buildsym_compunit) <m_context_stack: New
4826         member.
4827         (context_stack_size): Remove.
4828         (INITIAL_CONTEXT_STACK_SIZE): Remove.
4829         (prepare_for_building, end_symtab_get_static_block)
4830         (augment_type_symtab, push_context): Update.
4831         (pop_context): Return struct context_stack.
4832         (outermost_context_p, get_current_context_stack)
4833         (get_context_stack_depth): New functions.
4834         (buildsym_init): Update.
4835
4836 2018-07-20  Tom Tromey  <tom@tromey.com>
4837
4838         * rust-exp.y: Now a pure parser.  Update all rules.
4839         (%union): Move earlier.
4840         (current_parser, work_obstack): Remove globals.
4841         (rust_parser, ~rust_parser): Update.
4842         (class rust_parser) <copy_name, concat3, crate_name, super_name,
4843         lex_character, lex_number, lex_string, lex_identifier,
4844         rust_lookup_type, convert_params_to_types, convert_ast_to_type,
4845         convert_name, convert_params_to_expression,
4846         convert_ast_to_expression, ast_basic_type, ast_operation,
4847         ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
4848         ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
4849         ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
4850         ast_array_type, ast_slice_type, ast_reference_type,
4851         ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
4852         (rust_parse): Update.
4853         (rustyyerror, rustyylex): Add parser parameter.
4854         (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
4855         (rust_lex_stringish_test, rust_lex_test_sequence)
4856         (rust_lex_test_trailing_dot, rust_lex_test_completion)
4857         (rust_lex_test_push_back, rust_lex_tests): Update.
4858
4859 2018-07-19  Pedro Alves  <palves@redhat.com>
4860
4861         * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
4862         gdb::unique_xmalloc_ptr.
4863         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
4864         Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
4865         * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
4866         copy-initialization.
4867         * guile/scm-pretty-print.c (ppscm_print_children): Use
4868         gdb::unique_xmalloc_ptr instead of cleanups.
4869         (gdbscm_apply_val_pretty_printer): Remove cleanups.
4870         * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
4871         gdb::unique_xmalloc_ptr.
4872         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4873         Adjust to use gdb::unique_xmalloc_ptr.
4874         * guile/scm-utils.c (extract_arg): Adjust.
4875         * guile/scm-value.c (gdbscm_value_field): Adjust to use
4876         gdb::unique_xmalloc_ptr instead of a cleanup.
4877
4878 2018-07-19  Tom Tromey  <tom@tromey.com>
4879
4880         * utils.c (do_value_free_to_mark)
4881         (make_cleanup_value_free_to_mark): Remove.
4882         * utils.h (make_cleanup_value_free_to_mark): Remove.
4883
4884 2018-07-19  Pedro Alves  <palves@redhat.com>
4885
4886         * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
4887         forwarding reference.
4888
4889 2018-07-18  Pedro Alves  <palves@redhat.com>
4890
4891         * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
4892         gdbscm_wrap.  Use gdb::unique_xmalloc_ptr<char> instead of a
4893         cleanup.
4894
4895 2018-07-18  Pedro Alves  <palves@redhat.com>
4896
4897         * guile/guile-internal.h: Add comment about mixing GDB and Scheme
4898         exceptions.
4899         (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
4900         (gdbscm_wrap): New.
4901         * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
4902         directly instead of a cleanup.
4903         * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
4904         (vlscm_unop): ... this.  Reimplement using gdbscm_wrap.
4905         (vlscm_binop_gdbthrow): New, factored out from ...
4906         (vlscm_binop): ... this.  Reimplement using gdbscm_wrap.
4907         (vlscm_rich_compare): Use gdbscm_wrap.
4908         * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
4909         instead of a cleanup.
4910         (gdbscm_lookup_global_symbol): Use xfree directly instead of a
4911         cleanup.
4912         * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
4913         Use xfree directly instead of a cleanup.
4914         * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
4915         Adjust to use gdbscm_wrap and scoped_value_mark.
4916         (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
4917         (gdbscm_value_address, gdbscm_value_dereference)
4918         (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
4919         scoped_value_mark.
4920         (gdbscm_value_dynamic_type): Use scoped_value_mark.
4921         (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
4922         scoped_value_mark.
4923         (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
4924         gdbscm_wrap and scoped_value_mark.
4925         (gdbscm_value_to_string): Use xfree directly instead of a
4926         cleanup.  Move 'buffer' unique_ptr to TRY scope.
4927         (gdbscm_value_to_lazy_string): Use xfree directly instead of a
4928         cleanup.  Move 'buffer' unique_ptr to TRY scope.  Use
4929         scoped_value_mark.
4930         (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
4931         (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
4932         scoped_value_mark.
4933         (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
4934         gdbscm_wrap.
4935
4936 2018-07-18  Tom de Vries  <tdevries@suse.de>
4937
4938         * findvar.c (default_read_var_value): Also resolve dynamic type for
4939         LOC_OPTIMIZED_OUT vars.
4940
4941 2018-07-18  Maciej W. Rozycki  <macro@mips.com>
4942
4943         * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
4944         decoding.
4945
4946 2018-07-17  Tom Tromey  <tom@tromey.com>
4947
4948         * guile/scm-param.c (pascm_set_func, pascm_show_func)
4949         (compute_enum_list, pascm_set_param_value_x)
4950         (gdbscm_parameter_value): Update.
4951         * guile/guile-internal.h (gdbscm_scm_to_string): Update.
4952         (gdbscm_scm_to_host_string): Update.
4953         * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
4954         Update.
4955         * guile/scm-cmd.c (cmdscm_add_completion): Update.
4956         * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
4957         * guile/scm-string.c (gdbscm_scm_to_string): Return
4958         unique_xmalloc_ptr.
4959         (gdbscm_scm_to_host_string): Likewise.
4960
4961 2018-07-17  Tom Tromey  <tom@tromey.com>
4962
4963         * guile/guile.c (gdbscm_eval_from_control_command): Update.
4964         * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
4965         * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
4966         * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
4967         unique_xmalloc_ptr.
4968
4969 2018-07-17  Tom Tromey  <tom@tromey.com>
4970
4971         * guile/scm-param.c (pascm_signal_setshow_error): Update.
4972         * guile/guile-internal.h (gdbscm_exception_message_to_string):
4973         Update.
4974         * guile/scm-cmd.c (cmdscm_function): Update.
4975         * guile/scm-pretty-print.c
4976         (ppscm_print_exception_unless_memory_error): Update.
4977         * guile/scm-exception.c (gdbscm_exception_message_to_string):
4978         Return unique_xmalloc_ptr.
4979
4980 2018-07-17  Tom Tromey  <tom@tromey.com>
4981
4982         * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
4983         Use string_printf.
4984
4985 2018-07-17  Jim Wilson  <jimw@sifive.com>
4986
4987         * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
4988         set_gdbarch_decr_pc_after_break.  Call riscv_read_misa_reg always.
4989         (riscv_gdbarch_init): Delete local has_compressed_isa.  Delete now
4990         unecessary braces after EF_RISCV_RVC test.  Delete call to
4991         set_gdbarch_decr_pc_after_break.
4992
4993         * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
4994         RISCV_LAST_FP_REGNUM + 1.
4995         (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
4996
4997 2018-07-17  Tom Tromey  <tom@tromey.com>
4998
4999         * configure.ac: Remove --disable-gdbcli.
5000         * configure: Rebuild.
5001         * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
5002         (SUBDIR_CLI_CFLAGS): Remove.
5003         (SFILES): Use SUBDIR_CLI_SRCS.
5004         (COMMON_OBS): Use SUBDIR_CLI_OBS.
5005
5006 2018-07-17  Tom Tromey  <tom@tromey.com>
5007
5008         PR gdb/18624:
5009         * coffread.c (coff_symtab_read): Use scoped_free_pendings.
5010
5011 2018-07-16  Jim Wilson  <jimw@sifive.com>
5012
5013         * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
5014
5015 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5016
5017         * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
5018         variable.
5019         (libunwind_frame_sniffer): Likewise.
5020         (libunwind_frame_prev_register): Likewise.
5021         (libunwind_sigtramp_frame_sniffer): Likewise.
5022         * ia64-tdep.c (ia64_access_reg): Likewise.
5023         (ia64_access_rse_reg): Likewise.
5024         (ia64_libunwind_sigtramp_frame_this_id): Likewise.
5025         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
5026
5027 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5028
5029         * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
5030
5031 2018-07-16  Simon Marchi  <simon.marchi@ericsson.com>
5032
5033         * remote-sim.c (gdbsim_target::close,
5034         gdbsim_target::mourn_inferior): Remove unused variables.
5035
5036 2018-07-16  Simon Marchi  <simon.marchi@polymtl.ca>
5037
5038         * ia64-tdep.c (ktab_buf): New global.
5039         (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
5040         (get_kernel_table): Adjust.
5041
5042 2018-07-16  Tom Tromey  <tom@tromey.com>
5043
5044         * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
5045         * dwarf2read.c (using_directives, new_symbol): Use
5046         outermost_context_p.
5047         * dbxread.c (process_one_symbol): Use outermost_context_p.
5048         * coffread.c (coff_symtab_read): Use outermost_context_p.
5049
5050 2018-07-16  Tom Tromey  <tom@tromey.com>
5051
5052         * dwarf2read.c (using_directives, read_func_scope)
5053         (read_lexical_block_scope): Update.
5054         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5055         * buildsym.h (local_using_directives, global_using_directives):
5056         Don't declare.
5057         (get_local_using_directives, set_local_using_directives)
5058         (get_global_using_directives): Declare.
5059         * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
5060         m_global_using_directives>: New members.
5061         (finish_block_internal, prepare_for_building)
5062         (reset_symtab_globals, end_symtab_get_static_block)
5063         (push_context): Update.
5064         (get_local_using_directives, set_local_using_directives)
5065         (get_global_using_directives): New functions.
5066         (buildsym_init): Update.
5067
5068 2018-07-16  Tom Tromey  <tom@tromey.com>
5069
5070         * xcoffread.c (xcoff_initial_scan): Don't call
5071         free_pending_blocks.
5072         * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
5073         * buildsym.h (class scoped_free_pendings): Add constructor.
5074         (free_pending_blocks): Don't declare.
5075         * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
5076         (free_pending_blocks): Now static.
5077
5078 2018-07-16  Tom Tromey  <tom@tromey.com>
5079
5080         * buildsym.h (push_subfile, pop_subfile): Update declarations.
5081         * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
5082         member.
5083         (struct subfile_stack): Remove.
5084         (subfile_stack): Remove.
5085         (push_subfile, pop_subfile, buildsym_init): Update.
5086
5087 2018-07-16  Tom Tromey  <tom@tromey.com>
5088
5089         * buildsym.c (push_subfile): Use gdb_assert.
5090         (pop_subfile): Use gdb_assert.
5091
5092 2018-07-16  Tom Tromey  <tom@tromey.com>
5093
5094         * buildsym.h (merge_symbol_lists): Remove.
5095         * buildsym.c (merge_symbol_lists): Remove.
5096
5097 2018-07-16  Tom Tromey  <tom@tromey.com>
5098
5099         * stabsread.c (scan_file_globals): Update comment.
5100         * stabsread.h (scan_file_globals): Move from buildsym.h.
5101         * buildsym.h (scan_file_globals): Move to stabsread.h.
5102
5103 2018-07-16  Tom Tromey  <tom@tromey.com>
5104
5105         * xcoffread.c (xcoff_new_init): Update.
5106         * mipsread.c (mipscoff_new_init): Update.
5107         * mdebugread.c (mdebug_build_psymtabs): Update.
5108         * elfread.c (elf_new_init): Update.
5109         * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
5110         (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
5111         * buildsym.h (buildsym_new_init): Don't declare.
5112         * buildsym.c (buildsym_new_init): Remove.
5113
5114 2018-07-16  Tom Tromey  <tom@tromey.com>
5115
5116         * stabsread.h (within_function): Move from buildsym.h.
5117         * stabsread.c (start_stabs): Clear within_function.
5118         * coffread.c (coff_start_symtab): Clear within_function.
5119         * buildsym.h (within_function): Move to stabsread.h.
5120         * buildsym.c (prepare_for_building): Update.
5121
5122 2018-07-16  Tom Tromey  <tom@tromey.com>
5123
5124         * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
5125         * dwarf2read.c (dwarf2_start_symtab): Don't set
5126         processing_gcc_compilation.
5127         * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
5128
5129 2018-07-16  Tom Tromey  <tom@tromey.com>
5130
5131         * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
5132         (next_symbol_text_func): Move from buildsym.h.
5133         * stabsread.c (hashname): Move from buildsym.c.
5134         * buildsym.h (HASHSIZE, symnum, next_symbol_text)
5135         (next_symbol_text_func, hashname): Move to stabsread.h.
5136         * buildsym.c: Don't include bcache.h
5137         (hashname): Move to stasbread.c.
5138
5139 2018-07-16  Tom Tromey  <tom@tromey.com>
5140
5141         * buildsym.h (context_stack_size): Don't declare.
5142         * buildsym.c (context_stack_size): New global.
5143
5144 2018-07-16  Tom Tromey  <tom@tromey.com>
5145
5146         * dbxread.c (processing_acc_compilation): New global.
5147         * buildsym.h (processing_acc_compilation): Don't declare.
5148
5149 2018-07-16  Tom Tromey  <tom@tromey.com>
5150
5151         * xcoffread.c (aix_process_linenos, complete_symtab): Update.
5152         * dbxread.c (read_ofile_symtab): Update.
5153         * coffread.c (coff_start_symtab, coff_end_symtab): Update.
5154         * buildsym.h (last_source_start_addr): Remove.
5155         (set_last_source_start_addr, get_last_source_start_addr):
5156         Declare.
5157         * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
5158         parameter.
5159         (struct buildsym_compunit) <m_last_source_start_addr>: New
5160         member.
5161         (prepare_for_building): Remove start_addr parameter.
5162         (start_symtab, restart_symtab, end_symtab_get_static_block)
5163         (end_symtab_with_blockvector): Update.
5164         (set_last_source_start_addr, get_last_source_start_addr): New
5165         functions.
5166
5167 2018-07-16  Tom Tromey  <tom@tromey.com>
5168
5169         * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
5170         member.
5171         (have_line_numbers): Remove.
5172         (record_line, prepare_for_building, end_symtab_get_static_block)
5173         (augment_type_symtab): Update.
5174
5175 2018-07-16  Tom Tromey  <tom@tromey.com>
5176
5177         * buildsym.c (~buildsym_compunit): Free the macro table.
5178         (struct buildsym_compunit) <get_macro_table, release_macros>: New
5179         methods.
5180         <m_pending_macros>: New member.
5181         (pending_macros): Remove.
5182         (~scoped_free_pendings, get_macro_table, prepare_for_building)
5183         (reset_symtab_globals, end_symtab_get_static_block)
5184         (end_symtab_with_blockvector, augment_type_symtab)
5185         (buildsym_init): Update.
5186
5187 2018-07-16  Tom Tromey  <tom@tromey.com>
5188
5189         * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
5190         parameter.
5191         (buildsym_compunit::set_last_source_file): New method.
5192         <m_last_source_file>: New member.
5193         (prepare_for_building): Remove "name" parameter.
5194         (start_symtab, restart_symtab, reset_symtab_globals): Update.
5195         (last_source_file): Remove.
5196         (set_last_source_file, get_last_source_file): Update.
5197
5198 2018-07-16  Tom Tromey  <tom@tromey.com>
5199
5200         * buildsym.c (prepare_for_building): Add assert.
5201
5202 2018-07-16  Tom Tromey  <tom@tromey.com>
5203
5204         * buildsym.c (~buildsym_compunit): Update.
5205         (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
5206         (start_subfile, patch_subfile_names)
5207         (end_symtab_with_blockvector): Update.
5208
5209 2018-07-16  Tom Tromey  <tom@tromey.com>
5210
5211         * buildsym.c (struct buildsym_compunit): Add constructor,
5212         destructor, initializers.
5213         (start_buildsym_compunit): Remove.
5214         (free_buildsym_compunit): Use "delete".
5215         (start_symtab, restart_symtab): Use "new".
5216
5217 2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
5218
5219         * symfile.c (set_objfile_default_section_offset): Remove struct
5220         keyword.
5221
5222 2018-07-14  Stafford Horne  <shorne@gmail.com>
5223
5224         * (Responsible Maintainers): Add myself as or1k maintainer.
5225
5226 2018-07-13  Tom Tromey  <tom@tromey.com>
5227
5228         * symfile.c (set_objfile_default_section_offset): Use extra braces
5229         around initializer.
5230
5231 2018-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
5232
5233         * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
5234         non-branching basr.
5235
5236 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5237
5238         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5239         unittests/cli-utils-selftests.c
5240         * unittests/cli-utils-selftests.c: New file.
5241
5242 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5243
5244         * NEWS: Mention new commands. Mention change to 'thread apply'.
5245
5246 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5247
5248         * thread.c (thr_try_catch_cmd): New function.
5249         (thread_apply_all_command): Handle qcs flags.
5250         (thread_apply_command): Handle qcs flags.
5251         (taas_command): New function.
5252         (tfaas_command): New function.
5253         (_initialize_thread): Update to setup the new commands 'taas
5254         and 'tfaas'. Change doc string for 'thread apply'.
5255
5256 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5257
5258         * stack.c: (trailing_outermost_frame): New function, mostly
5259         extracted from backtrace_command_1.
5260         (leading_innermost_frame): New function.
5261         (backtrace_command_1): Update to call trailing_outermost_frame.
5262         (frame_apply_command_count): New function.
5263         (frame_apply_level_command): New function.
5264         (frame_apply_all_command): New function.
5265         (frame_apply_command): New function.
5266         (faas_command): New function.
5267         (frame_cmd_list): New variable.
5268         (_initialize_stack): Update to setup the new commands 'frame apply'
5269         and 'faas'.
5270
5271 2018-07-12  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
5272
5273         * cli-utils.c (number_or_range_parser::get_number): Only handle
5274         numbers or convenience var as numbers.
5275         (parse_flags): New function.
5276         (parse_flags_qcs): New function.
5277         (number_or_range_parser::finished): Ensure parsing end is detected
5278         before end of string.
5279         * cli-utils.h (parse_flags): New function.
5280         (parse_flags_qcs): New function.
5281         (number_or_range_parser): Remove m_finished bool.
5282         (number_or_range_parser::skip_range): Set m_in_range to false.
5283
5284 2018-07-12  Sergio Durigan Junior  <sergiodj@redhat.com>
5285
5286         * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
5287         on Windows.
5288
5289 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5290             Jan Kratochvil  <jan.kratochvil@redhat.com>
5291             Paul Fertser  <fercerpav@gmail.com>
5292             Tsutomu Seki  <sekiriki@gmail.com>
5293             Pedro Alves  <palves@redhat.com>
5294
5295         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5296         'unittests/parse-connection-spec-selftests.c'.
5297         (COMMON_SFILES): Add 'common/netstuff.c'.
5298         (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
5299         * NEWS (Changes since GDB 8.2): Mention IPv6 support.
5300         * common/netstuff.c: New file.
5301         * common/netstuff.h: New file.
5302         * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
5303         (wait_for_connect): Update comment.  New parameter
5304         'gdb::optional<int> sock' instead of 'struct serial *scb'.
5305         Use 'sock' directly instead of 'scb->fd'.
5306         (try_connect): New function, with code from 'net_open'.
5307         (net_open): Rewrite main loop to deal with multiple
5308         sockets/addresses.  Handle IPv6-style hostnames; implement
5309         support for IPv6 connections.
5310         * unittests/parse-connection-spec-selftests.c: New file.
5311
5312 2018-07-11  Pedro Alves  <palves@redhat.com>
5313
5314         PR gdb/23377
5315         * remote.c (remote_target::remote_detach_pid): Call
5316         set_current_process.
5317
5318 2018-07-11  Pedro Alves  <palves@redhat.com>
5319
5320         * h8300-tdep.c (h8300_gdbarch_init): Remove
5321         set_gdbarch_ecoff_reg_to_regnum calls.
5322
5323 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
5324
5325         PR c++/23373
5326         * c-typeprint.c (c_type_print_base_struct_union): Don't print
5327         offsets/sizes for static members of a class/struct.
5328
5329 2018-07-11  Alan Hayward  <alan.hayward@arm.com>
5330
5331         * target-descriptions.c (tdesc_register_bitsize): Rename.
5332         * target-descriptions.h (tdesc_register_bitsize): Likewise.
5333         * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
5334         * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
5335
5336 2018-07-10  Tom Tromey  <tom@tromey.com>
5337
5338         * breakpoint.c (moribund_locations): Now static and a
5339         std::vector.
5340         (breakpoint_init_inferior, moribund_breakpoint_here_p)
5341         (build_bpstat_chain, update_global_location_list)
5342         (breakpoint_retire_moribund): Update.
5343         * breakpoint.h (bp_location_p): Remove typedef.  Don't declare
5344         VEC.
5345
5346 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5347
5348         * riscv-tdep.c (riscv_is_fp_regno_p): New function.
5349         (riscv_register_reggroup_p): Use new function, remove unneeded
5350         parenthesis.
5351         (riscv_push_dummy_call): Extend assert to compare against xlen or
5352         flen based on register type.
5353
5354 2018-07-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5355
5356         * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
5357
5358 2018-07-09  Andrew Burgess  <andrew.burgess@embecosm.com>
5359
5360         * remote.c (show_hardware_watchpoint_limit): New function.
5361         (show_hardware_watchpoint_length_limit): New function.
5362         (show_hardware_breakpoint_limit): New function.
5363         (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
5364         where appropriate, update help text.
5365
5366 2018-07-09  Tom Tromey  <tom@tromey.com>
5367
5368         * Makefile.in (CDEPS): Don't mention XM_CDEPS.
5369         (CLIBS): Don't mention NAT_CLIBS.
5370
5371 2018-07-09  Tom Tromey  <tom@tromey.com>
5372
5373         * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
5374         (LIBGDB_OBS, clean mostlyclean): Update.
5375         (gdb$(EXEEXT), insight$(EXEEXT)): Update.
5376
5377 2018-07-09  Tom Tromey  <tom@tromey.com>
5378
5379         * Makefile.in (%.c: %.y): Use ECHO_YACC.
5380         (%.c: %.l): Use ECHO_LEX.  Just fail if flex not available.
5381         * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
5382
5383 2018-07-09  Tom Tromey  <tom@tromey.com>
5384
5385         * Makefile.in (ALLDEPFILES): Remove exec.c.
5386         (COMMON_OBS): Remove exec.o.
5387         (COMMON_SFILES): Add exec.c.
5388
5389 2018-07-09  Tom Tromey  <tom@tromey.com>
5390
5391         * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
5392
5393 2018-07-09  Tom Tromey  <tom@tromey.com>
5394
5395         * Makefile.in (clean mostlyclean): Remove stamp-version.
5396         (version.c): Depend on stamp-version.
5397         (stamp-version): New rule, from version.c rule.
5398
5399 2018-07-09  Tom Tromey  <tom@tromey.com>
5400
5401         * Makefile.in (init.c): Depend on stamp-init.
5402         (stamp-init): New rule, from init.c rule.
5403         (clean mostlyclean): Remove stamp-init.
5404
5405 2018-07-09  Tom Tromey  <tom@tromey.com>
5406
5407         * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
5408         SUBDIR_GCC_COMPILE_SRCS.
5409
5410 2018-07-09  Tom Tromey  <tom@tromey.com>
5411
5412         * Makefile.in (init.c): Remove some unused sed rules.
5413
5414 2018-07-09  Tom Tromey  <tom@tromey.com>
5415
5416         * Makefile.in (TSOBS): Remove.
5417         (INIT_FILES): Update.
5418         (LIBGDB_OBS): Update.
5419         (COMMON_SFILES): Add inflow.c.
5420         (SFILES): Remove inflow.c.
5421
5422 2018-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5423
5424         * contrib/gdb-add-index.sh ($dwarf5): New, use it.
5425
5426 2018-07-07  Simon Marchi  <simon.marchi@polymtl.ca>
5427
5428         * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
5429         get_saveloc_name, is_signal_frame_name, step_name,
5430         init_remote_name, create_addr_space_name,
5431         destroy_addr_space_name, search_unwind_table_name,
5432         find_dyn_list_name): Constify.
5433
5434 2018-07-05  Simon Marchi  <simon.marchi@polymtl.ca>
5435
5436         * darwin-nat.c (darwin_pthread_kill): New function.
5437         (darwin_resume_thread): Use darwin_pthread_kill.
5438
5439 2018-07-05  Tom de Vries  <tdevries@suse.de>
5440
5441         * macroexp.c (macro_buffer) <operator=>: New member function.
5442
5443 2018-07-04  Tom Tromey  <tom@tromey.com>
5444
5445         * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
5446
5447 2018-07-04  Simon Marchi  <simon.marchi@polymtl.ca>
5448
5449         * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
5450         * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
5451         * maint.c: Likewise.
5452         * top.c: Likewise.
5453
5454 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5455
5456         * NEWS: Create a new section for the next release branch.
5457         Rename the section of the current branch, now that it has
5458         been cut.
5459
5460 2018-07-04  Joel Brobecker  <brobecker@adacore.com>
5461
5462         GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
5463         * version.in: Bump version to 8.2.50.DATE-git.
5464
5465 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
5466             Pedro Alves  <palves@redhat.com>
5467
5468         * linux-nat.c (linux_init_ptrace): Rename to ...
5469         (linux_init_ptrace_procfs): ... this.  Call
5470         linux_proc_init_warnings.
5471         (linux_nat_target::post_attach)
5472         (linux_nat_target::post_startup_inferior): Adjust.
5473         * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
5474         * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
5475
5476 2018-07-04  Tom de Vries  <tdevries@suse.de>
5477
5478         * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
5479         check ...
5480         (read_comp_unit_head): ... here.
5481
5482 2018-07-03  Tom Tromey  <tom@tromey.com>
5483
5484         * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
5485         (stop_tracing, tstatus_command)
5486         (find_matching_tracepoint_location, merge_uploaded_tracepoints)
5487         (print_one_static_tracepoint_marker): Update.
5488         * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
5489         std::vector.
5490         * breakpoint.h (breakpoint_p): Remove typedef.  Don't declare
5491         VEC.
5492         (all_tracepoints, static_tracepoints_here): Return std::vector.
5493
5494 2018-07-03  Tom Tromey  <tom@tromey.com>
5495
5496         * common/ptid.c (ptid_equal): Remove.
5497         * common/ptid.h (ptid_equal): Don't declare.
5498         * ada-tasks.c: Update.
5499         * breakpoint.c: Update.
5500         * common/agent.c: Update.
5501         * corelow.c: Update.
5502         * darwin-nat-info.c: Update.
5503         * darwin-nat.c: Update.
5504         * dcache.c: Update.
5505         * dtrace-probe.c: Update.
5506         * dummy-frame.c: Update.
5507         * fbsd-nat.c: Update.
5508         * frame.c: Update.
5509         * gdbthread.h: Update.
5510         * gnu-nat.c: Update.
5511         * go32-nat.c: Update.
5512         * inf-loop.c: Update.
5513         * inf-ptrace.c: Update.
5514         * infcall.c: Update.
5515         * infcmd.c: Update.
5516         * inflow.c: Update.
5517         * infrun.c: Update.
5518         * linux-fork.c: Update.
5519         * linux-nat.c: Update.
5520         * linux-thread-db.c: Update.
5521         * mi/mi-cmd-var.c: Update.
5522         * mi/mi-interp.c: Update.
5523         * mi/mi-main.c: Update.
5524         * nto-procfs.c: Update.
5525         * ppc-linux-tdep.c: Update.
5526         * procfs.c: Update.
5527         * python/py-inferior.c: Update.
5528         * python/py-record-btrace.c: Update.
5529         * python/py-record.c: Update.
5530         * ravenscar-thread.c: Update.
5531         * regcache.c: Update.
5532         * remote-sim.c: Update.
5533         * remote.c: Update.
5534         * sol-thread.c: Update.
5535         * solib.c: Update.
5536         * target.c: Update.
5537         * tui/tui-stack.c: Update.
5538         * varobj.c: Update.
5539         * windows-nat.c: Update.
5540         * windows-tdep.c: Update.
5541
5542 2018-07-03  Tom Tromey  <tom@tromey.com>
5543
5544         * common/ptid.c (ptid_match): Remove.
5545         * common/ptid.h (ptid_match): Don't declare.
5546         * fbsd-nat.c: Update.
5547         * infcmd.c: Update.
5548         * infrun.c: Update.
5549         * linux-nat.c: Update.
5550         * record-btrace.c: Update.
5551         * regcache.c: Update.
5552         * remote.c: Update.
5553
5554 2018-07-03  Tom Tromey  <tom@tromey.com>
5555
5556         * common/ptid.c (ptid_tid_p): Remove.
5557         * common/ptid.h (ptid_tid_p): Don't declare.
5558         * sol-thread.c: Update.
5559
5560 2018-07-03  Tom Tromey  <tom@tromey.com>
5561
5562         * common/ptid.c (ptid_lwp_p): Remove.
5563         * common/ptid.h (ptid_lwp_p): Don't declare.
5564         * fbsd-nat.c: Update.
5565         * linux-nat.c: Update.
5566         * nat/linux-procfs.c: Update.
5567         * nat/x86-linux-dregs.c: Update.
5568         * sol-thread.c: Update.
5569
5570 2018-07-03  Tom Tromey  <tom@tromey.com>
5571
5572         * common/ptid.c (ptid_is_pid): Remove.
5573         * common/ptid.h (ptid_is_pid): Don't declare.
5574         * infrun.c: Update.
5575         * linux-nat.c: Update.
5576         * mi/mi-interp.c: Update.
5577         * remote.c: Update.
5578         * thread.c: Update.
5579
5580 2018-07-03  Tom Tromey  <tom@tromey.com>
5581
5582         * common/ptid.c (ptid_get_tid): Remove.
5583         * common/ptid.h (ptid_get_tid): Don't declare.
5584         * ada-tasks.c: Update.
5585         * aix-thread.c: Update.
5586         * bsd-uthread.c: Update.
5587         * darwin-nat.c: Update.
5588         * fbsd-nat.c: Update.
5589         * i386-darwin-nat.c: Update.
5590         * infrun.c: Update.
5591         * linux-tdep.c: Update.
5592         * nto-procfs.c: Update.
5593         * ppc-ravenscar-thread.c: Update.
5594         * python/py-infthread.c: Update.
5595         * ravenscar-thread.c: Update.
5596         * sol-thread.c: Update.
5597         * sparc-ravenscar-thread.c: Update.
5598         * windows-nat.c: Update.
5599
5600 2018-07-03  Tom Tromey  <tom@tromey.com>
5601
5602         * common/ptid.c (ptid_get_lwp): Remove.
5603         * common/ptid.h (ptid_get_lwp): Don't declare.
5604         * aarch64-linux-nat.c: Update.
5605         * ada-tasks.c: Update.
5606         * aix-thread.c: Update.
5607         * amd64-linux-nat.c: Update.
5608         * arm-linux-nat.c: Update.
5609         * corelow.c: Update.
5610         * fbsd-nat.c: Update.
5611         * fbsd-tdep.c: Update.
5612         * gnu-nat.c: Update.
5613         * i386-cygwin-tdep.c: Update.
5614         * i386-gnu-nat.c: Update.
5615         * i386-linux-nat.c: Update.
5616         * ia64-linux-nat.c: Update.
5617         * inf-ptrace.c: Update.
5618         * infrun.c: Update.
5619         * linux-fork.c: Update.
5620         * linux-nat.c: Update.
5621         * linux-tdep.c: Update.
5622         * linux-thread-db.c: Update.
5623         * mips-linux-nat.c: Update.
5624         * nat/aarch64-linux-hw-point.c: Update.
5625         * nat/aarch64-linux.c: Update.
5626         * nat/linux-btrace.c: Update.
5627         * nat/linux-osdata.c: Update.
5628         * nat/linux-procfs.c: Update.
5629         * nat/x86-linux-dregs.c: Update.
5630         * obsd-nat.c: Update.
5631         * ppc-fbsd-nat.c: Update.
5632         * ppc-linux-nat.c: Update.
5633         * procfs.c: Update.
5634         * python/py-infthread.c: Update.
5635         * ravenscar-thread.c: Update.
5636         * remote.c: Update.
5637         * s390-linux-nat.c: Update.
5638         * sol-thread.c: Update.
5639         * sol2-tdep.c: Update.
5640         * spu-linux-nat.c: Update.
5641         * x86-linux-nat.c: Update.
5642         * xtensa-linux-nat.c: Update.
5643
5644 2018-07-03  Tom Tromey  <tom@tromey.com>
5645
5646         * common/ptid.c (ptid_get_pid): Remove.
5647         * common/ptid.h (ptid_get_pid): Don't declare.
5648         * aarch64-linux-nat.c: Update.
5649         * ada-lang.c: Update.
5650         * aix-thread.c: Update.
5651         * alpha-bsd-nat.c: Update.
5652         * amd64-fbsd-nat.c: Update.
5653         * amd64-linux-nat.c: Update.
5654         * arm-linux-nat.c: Update.
5655         * arm-nbsd-nat.c: Update.
5656         * auxv.c: Update.
5657         * break-catch-syscall.c: Update.
5658         * breakpoint.c: Update.
5659         * bsd-uthread.c: Update.
5660         * corelow.c: Update.
5661         * ctf.c: Update.
5662         * darwin-nat.c: Update.
5663         * fbsd-nat.c: Update.
5664         * fbsd-tdep.c: Update.
5665         * gcore.c: Update.
5666         * gnu-nat.c: Update.
5667         * hppa-nbsd-nat.c: Update.
5668         * hppa-obsd-nat.c: Update.
5669         * i386-fbsd-nat.c: Update.
5670         * ia64-linux-nat.c: Update.
5671         * inf-ptrace.c: Update.
5672         * infcmd.c: Update.
5673         * inferior.c: Update.
5674         * inferior.h: Update.
5675         * inflow.c: Update.
5676         * infrun.c: Update.
5677         * linux-fork.c: Update.
5678         * linux-nat.c: Update.
5679         * linux-tdep.c: Update.
5680         * linux-thread-db.c: Update.
5681         * m68k-bsd-nat.c: Update.
5682         * mi/mi-interp.c: Update.
5683         * mi/mi-main.c: Update.
5684         * mips-linux-nat.c: Update.
5685         * mips-nbsd-nat.c: Update.
5686         * mips64-obsd-nat.c: Update.
5687         * nat/aarch64-linux-hw-point.c: Update.
5688         * nat/aarch64-linux.c: Update.
5689         * nat/linux-btrace.c: Update.
5690         * nat/linux-osdata.c: Update.
5691         * nat/linux-procfs.c: Update.
5692         * nat/x86-linux-dregs.c: Update.
5693         * nto-procfs.c: Update.
5694         * obsd-nat.c: Update.
5695         * ppc-linux-nat.c: Update.
5696         * ppc-nbsd-nat.c: Update.
5697         * ppc-obsd-nat.c: Update.
5698         * proc-service.c: Update.
5699         * procfs.c: Update.
5700         * python/py-inferior.c: Update.
5701         * python/py-infthread.c: Update.
5702         * ravenscar-thread.c: Update.
5703         * record.c: Update.
5704         * remote-sim.c: Update.
5705         * remote.c: Update.
5706         * rs6000-nat.c: Update.
5707         * s390-linux-nat.c: Update.
5708         * sh-nbsd-nat.c: Update.
5709         * sol-thread.c: Update.
5710         * sparc-nat.c: Update.
5711         * sparc64-tdep.c: Update.
5712         * spu-linux-nat.c: Update.
5713         * spu-tdep.c: Update.
5714         * target-debug.h: Update.
5715         * target.c: Update.
5716         * thread.c: Update.
5717         * tid-parse.c: Update.
5718         * tracefile-tfile.c: Update.
5719         * vax-bsd-nat.c: Update.
5720         * windows-nat.c: Update.
5721         * x86-linux-nat.c: Update.
5722         * x86-nat.c: Update.
5723
5724 2018-07-03  Tom Tromey  <tom@tromey.com>
5725
5726         * common/ptid.c (pid_to_ptid): Remove.
5727         * common/ptid.h (pid_to_ptid): Don't declare.
5728         * aix-thread.c: Update.
5729         * arm-linux-nat.c: Update.
5730         * common/ptid.c: Update.
5731         * common/ptid.h: Update.
5732         * corelow.c: Update.
5733         * ctf.c: Update.
5734         * darwin-nat.c: Update.
5735         * fbsd-nat.c: Update.
5736         * fork-child.c: Update.
5737         * gnu-nat.c: Update.
5738         * go32-nat.c: Update.
5739         * inf-ptrace.c: Update.
5740         * infcmd.c: Update.
5741         * inferior.c: Update.
5742         * infrun.c: Update.
5743         * linux-fork.c: Update.
5744         * linux-nat.c: Update.
5745         * nat/aarch64-linux-hw-point.c: Update.
5746         * nat/fork-inferior.c: Update.
5747         * nat/x86-linux-dregs.c: Update.
5748         * nto-procfs.c: Update.
5749         * obsd-nat.c: Update.
5750         * procfs.c: Update.
5751         * progspace.c: Update.
5752         * remote.c: Update.
5753         * rs6000-nat.c: Update.
5754         * s390-linux-nat.c: Update.
5755         * sol-thread.c: Update.
5756         * spu-linux-nat.c: Update.
5757         * target.c: Update.
5758         * top.c: Update.
5759         * tracefile-tfile.c: Update.
5760         * windows-nat.c: Update.
5761
5762 2018-07-03  Tom Tromey  <tom@tromey.com>
5763
5764         * common/ptid.h (ptid_build): Don't declare.
5765         * common/ptid.c (ptid_build): Remove.
5766         * aix-thread.c: Update.
5767         * bsd-kvm.c: Update.
5768         * bsd-uthread.c: Update.
5769         * common/agent.c: Update.
5770         * common/ptid.c: Update.
5771         * common/ptid.h: Update.
5772         * corelow.c: Update.
5773         * darwin-nat.c: Update.
5774         * fbsd-nat.c: Update.
5775         * gnu-nat.c: Update.
5776         * linux-fork.c: Update.
5777         * linux-nat.c: Update.
5778         * linux-thread-db.c: Update.
5779         * nat/linux-osdata.c: Update.
5780         * nat/linux-procfs.c: Update.
5781         * nto-procfs.c: Update.
5782         * obsd-nat.c: Update.
5783         * proc-service.c: Update.
5784         * procfs.c: Update.
5785         * ravenscar-thread.c: Update.
5786         * remote-sim.c: Update.
5787         * remote.c: Update.
5788         * sol-thread.c: Update.
5789         * target.c: Update.
5790         * windows-nat.c: Update.
5791
5792 2018-07-03  Tom Tromey  <tom@tromey.com>
5793
5794         * infrun.c (follow_exec): Use exit_inferior_silent.
5795         * inferior.c (exit_inferior_num_silent): Remove.
5796         * inferior.h (exit_inferior_num_silent): Don't declare.
5797
5798 2018-07-03  Tom Tromey  <tom@tromey.com>
5799
5800         PR cli/23340:
5801         * darwin-nat.c (darwin_attach_pid): Reset inferior and
5802         inferior_ptid on error.
5803
5804 2018-07-02  Maciej W. Rozycki  <macro@mips.com>
5805             Simon Marchi  <simon.marchi@polymtl.ca>
5806
5807         PR tdep/8282
5808         * disasm.h (gdb_disassembler): Add
5809         `m_disassembler_options_holder'. member
5810         * disasm.c (get_all_disassembler_options): New function.
5811         (gdb_disassembler::gdb_disassembler): Use it.
5812         (gdb_buffered_insn_length_init_dis): Likewise.
5813         (gdb_buffered_insn_length): Adjust accordingly.
5814         (set_disassembler_options): Handle options with arguments.
5815         (show_disassembler_options_sfunc): Likewise.  Add a leading new
5816         line if showing options with descriptions.
5817         (disassembler_options_completer): Adapt to using the
5818         `disasm_options_and_args_t' structure.
5819         * mips-tdep.c (mips_disassembler_options): New variable.
5820         (mips_disassembler_options_o32): Likewise.
5821         (mips_disassembler_options_n32): Likewise.
5822         (mips_disassembler_options_n64): Likewise.
5823         (gdb_print_insn_mips): Don't set `disassembler_options'.
5824         (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
5825         functions.
5826         (mips_gdbarch_init): Always set `gdbarch_print_insn' to
5827         `gdb_print_insn_mips'.  Set `gdbarch_disassembler_options',
5828         `gdbarch_disassembler_options_implicit' and
5829         `gdbarch_valid_disassembler_options'.
5830         * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
5831         `disasm_options_and_args_t' structure.
5832         * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
5833         method.
5834         (valid_disassembler_options): Switch from `disasm_options_t' to
5835         the `disasm_options_and_args_t' structure.
5836         * NEWS: Document `set disassembler-options' support for the MIPS
5837         target.
5838         * gdbarch.h: Regenerate.
5839         * gdbarch.c: Regenerate.
5840
5841 2018-07-02  Sebastian Huber  <sebastian.huber@embedded-brains.de>
5842
5843         * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
5844
5845 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
5846
5847         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
5848         parameter in call to amd64_target_description.
5849         * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
5850         * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
5851         (amd64fbsd_init_abi): Likewise.
5852         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
5853         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
5854         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
5855         * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
5856
5857 2018-06-29  Pedro Alves  <palves@redhat.com>
5858
5859         * gdb/amd64-tdep.h (amd64_create_target_description): Add
5860         "segments" parameter.
5861         * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
5862         (_initialize_amd64_tdep): Update call to
5863         amd64_create_target_description.
5864         (amd64_target_description): Add "segments" parameter.  Adjust
5865         the implementation to use it.
5866         * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
5867         call to amd64_create_target_description.
5868         * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
5869         * gdb/arch/amd64.h (amd64_create_target_description): Add
5870         "segments" register.
5871         * gdb/arch/amd64.c (amd64_create_target_description): Add
5872         "segments" parameter.  Call create_feature_i386_64bit_segments
5873         only if SEGMENTS is true.
5874         * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
5875         call to amd64_create_target_description.
5876
5877 2018-06-29  Pedro Alves  <palves@redhat.com>
5878
5879         * thread.c (thread_target_id_str): New, factored out from ...
5880         (print_thread_info_1): ... here.  Use it to compute the max
5881         "Target Id" column width.
5882
5883 2018-06-29  Pedro Alves  <palves@redhat.com>
5884
5885         * remote.c (remote_target::extra_thread_info): Delete
5886         'display_buf' and 'n' locals.  from the cache, regardless of
5887         packet mechanims is in use.  Use cache for qThreadExtra and qP
5888         methods too.
5889
5890 2018-06-29  Pedro Alves  <palves@redhat.com>
5891
5892         * blockframe.c (find_pc_sect_containing_function): New function.
5893         * breakpoint.c (print_breakpoint_location): Don't call
5894         find_pc_sect_function.
5895         * linespec.c (create_sals_line_offset): Record the location's
5896         symbol in the sal.
5897         * linespec.c (convert_address_location_to_sals): Fill in sal's
5898         symbol with find_pc_sect_containing_function.
5899         * symtab.c (find_function_start_sal): Rename to ...
5900         (find_function_start_sal_1): ... this.
5901         (find_function_start_sal): Reimplement as wrapper around
5902         find_function_start_sal_1, and use
5903         find_pc_sect_containing_function to fill in the sal's symbol.
5904         (find_function_start_sal(symbol*, bool)): Adjust.
5905         * symtab.h (find_pc_function, find_pc_sect_function): Adjust
5906         comments.
5907         (find_pc_sect_containing_function): Declare.
5908
5909 2018-06-29  Pedro Alves  <palves@redhat.com>
5910
5911         * inline-frame.c (stopped_by_user_bp_inline_frame): Return
5912         true if the the location has no symbol.
5913
5914 2018-06-28  Tom Tromey  <tom@tromey.com>
5915
5916         * NEWS: Mention --enable-codesign.
5917         * silent-rules.mk (ECHO_SIGN): New variable.
5918         * configure.ac: Add --enable-codesign.
5919         * configure: Rebuild.
5920         * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
5921         (gdb$(EXEEXT)): Optionally invoke codesign.
5922
5923 2018-06-28  Pedro Alves  <palves@redhat.com>
5924
5925         * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
5926         comments.
5927         (switch_to_thread_no_regs): Adjust comment.
5928         * infcmd.c (stop_pc): Delete.
5929         (post_create_inferior, info_program_command): Replace references
5930         to stop_pc with references to thread_info->suspend.stop_pc.
5931         * inferior.h (stop_pc): Delete declaration.
5932         * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
5933         (handle_inferior_event_1, handle_signal_stop)
5934         (process_event_stop_test, keep_going_stepped_thread)
5935         (handle_step_into_function, handle_step_into_function_backward)
5936         (print_stop_location): Replace references to stop_pc with
5937         references to thread_info->suspend.stop_pc.
5938         (struct infcall_suspend_state) <stop_pc>: Delete field.
5939         (save_infcall_suspend_state, restore_infcall_suspend_state):
5940         Remove references to inf_stat->stop_pc.
5941         * linux-fork.c (fork_load_infrun_state): Likewise.
5942         * record-btrace.c (record_btrace_set_replay): Likewise.
5943         * record-full.c (record_full_goto_entry): Likewise.
5944         * remote.c (print_one_stopped_thread): Likewise.
5945         * target.c (target_resume): Extend comment.
5946         * thread.c (set_executing_thread): New.
5947         (set_executing): Use it.
5948         (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
5949         Remove references to stop_pc.
5950
5951 2018-06-28  Pedro Alves  <palves@redhat.com>
5952
5953         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
5954         Moving fetching stop_pc until after ecs->event_thread is refreshed.
5955
5956 2018-06-28  Tom Tromey  <tom@tromey.com>
5957
5958         * coffread.c (coff_symfile_finish): Update.
5959         * xcoffread.c (xcoff_symfile_finish): Update.
5960         * elfread.c (elf_symfile_finish): Update.
5961         * symfile.h (dwarf2_free_objfile): Don't declare.
5962         * dwarf2read.c (_initialize_dwarf2_read): Use
5963         register_objfile_data_with_cleanup.
5964         (dwarf2_free_objfile): Now static.  Change signature.
5965
5966 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5967
5968         * symfile.c (add_symbol_file_command, _initialize_symfile): Add
5969         option "-o" to add-symbol-file-load to add an offset to each
5970         section's load address.
5971         * symfile.c (set_objfile_default_section_offset): New function.
5972
5973 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5974
5975         * symfile.c (add_symbol_file_command): Make sure that sections
5976         with the same name are sorted in the same order.
5977
5978 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5979
5980         * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
5981         require the second argument.  If omitted, load sections at the
5982         addresses specified in the file.
5983
5984 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5985
5986         * symfile.c (symbol_file_command, symbol_file_add_main_1)
5987         (_initialize_symfile): Add option "-o" to symbol-file to add an
5988         offset to each section of the symbol file.
5989
5990 2018-06-28  Petr Tesarik  <ptesarik@suse.cz>
5991
5992         * MAINTAINERS (Write After Approval): Add Petr Tesarik.
5993
5994 2018-06-27  Tom Tromey  <tom@tromey.com>
5995
5996         * stack.c (_initialize_stack): Update "func" help text.
5997
5998 2018-06-27  Tom Tromey  <tom@tromey.com>
5999
6000         * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
6001         std::vector.
6002         (unwind_infopy_str, pyuw_create_unwind_info)
6003         (unwind_infopy_add_saved_register, pyuw_sniffer)
6004         (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
6005         Update.
6006         (struct saved_reg): Add constructor.
6007         <value>: Now a gdbpy_ref<>.
6008
6009 2018-06-27  Tom Tromey  <tom@tromey.com>
6010
6011         * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
6012
6013 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6014
6015         * gdb-gdb.py.in: Format using autopep8.
6016
6017 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6018
6019         * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
6020         (type_lookup_function): Recognize CORE_ADDR values.
6021
6022 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6023
6024         * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
6025         print tag_name.
6026
6027 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6028
6029         * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
6030         <__lt__>: Add.
6031
6032 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6033
6034         * gdb-gdb.py: Move to...
6035         * gdb-gdb.py.in: ... here.
6036         * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
6037         * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
6038         dependencies.
6039         (distclean): Remove gdb-gdb.py when cleaning.
6040         (gdb-gdb.py, gdb-gdb.gdb): New rules.
6041         * configure: Re-generate.
6042
6043 2018-06-27  Pedro Alves  <palves@redhat.com>
6044
6045         * proc-service.c (get_ps_regcache): New.
6046         (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6047         (ps_lsetfpregs): Use it.
6048
6049 2018-06-27  Omair Javaid  <omair.javaid@linaro.org>
6050
6051         PR gdb/21695
6052         * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
6053         (dwarf_decode_lines_1): Adjust.
6054
6055 2018-06-27  Simon Marchi  <simon.marchi@ericsson.com>
6056
6057         * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
6058         override.
6059         <info_proc>: Likewise.
6060
6061 2018-06-26  Joel Brobecker  <brobecker@adacore.com>
6062
6063         * windows-nat.c (do_windows_fetch_inferior_registers): Rename
6064         to windows_fetch_one_register, and only handle the case of
6065         fetching one register.  Move the code that reloads the context
6066         and iterates over all registers if R is negative to...
6067         (windows_nat_target::fetch_registers): ... here.
6068         (do_windows_store_inferior_registers): Rename to
6069         windows_store_one_register, and only handle the case of storing
6070         one register.  Move the code that handles the case where r is
6071         negative to...
6072         (windows_nat_target::store_registers) ... here.
6073
6074 2018-06-26  Tom Tromey  <tom@tromey.com>
6075
6076         PR rust/22574:
6077         * typeprint.c (whatis_exp): Allow ptype/o for Rust.
6078         * rust-lang.c (rust_print_struct_def): Add podata parameter.
6079         Update.
6080         (rust_internal_print_type): Add podata parameter.
6081         (rust_print_type): Update.
6082
6083 2018-06-26  Tom Tromey  <tom@tromey.com>
6084
6085         * typeprint.h (struct print_offset_data) <update, finish,
6086         maybe_print_hole>: New methods.
6087         <indentation>: New constant.
6088         * typeprint.c (print_offset_data::indentation): Define.
6089         (print_offset_data::maybe_print_hole, print_offset_data::update)
6090         (print_offset_data::finish): Move from c-typeprint.c and rename.
6091         * c-typeprint.c (OFFSET_SPC_LEN): Remove.
6092         (print_spaces_filtered_with_print_options): Update.
6093         (c_print_type_union_field_offset, maybe_print_hole)
6094         (c_print_type_struct_field_offset): Move to typeprint.c and
6095         rename.
6096         (c_type_print_base_struct_union): Update.
6097
6098 2018-06-25  Pedro Alves  <palves@redhat.com>
6099
6100         * gdbthread.h (thread_info_ref, delete_thread)
6101         (delete_thread_silent, first_thread_of_inferior)
6102         (any_thread_of_inferior, switch_to_thread)
6103         (enable_thread_stack_temporaries)
6104         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6105         (get_last_thread_stack_temporary)
6106         (value_in_thread_stack_temporaries, can_access_registers_thread):
6107         Spell out "struct thread_info" instead of just "thread_info".
6108         * inferior.h (notice_new_inferior): Likewise.
6109
6110 2018-06-25  Pedro Alves  <palves@redhat.com>
6111
6112         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6113         pass thread_info pointer to delete_thread.
6114         (windows_nat_target::detach): Pass inferior pointer to
6115         detach_inferior.
6116         * aix-thread.c (sync_threadlists): Pass thread_info pointer to
6117         delete_thread.
6118         * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
6119         * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
6120         and pass a thread_info pointer to delete_thread.
6121         * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
6122         pass thread_info pointer to delete_thread.
6123         * go32-nat.c (go32_nat_target::mourn_inferior): Remove
6124         delete_thread_silent call.
6125         * procfs.c (procfs_target::detach): Pass inferior pointer to
6126         detach_inferior.
6127         (procfs_target::wait): Pass thread_info pointer to delete_thread.
6128         * remote-sim.c (gdbsim_target::mourn_inferior): Remove
6129         delete_thread_silent call.
6130         * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
6131         pass thread_info pointer to delete_thread.
6132         (windows_nat_target::detach): Pass inferior pointer to
6133         delete_inferior.
6134
6135 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6136
6137         * regcache.c (readable_regcache::read_part): Fix asserts.
6138         (reg_buffer::raw_collect_part): New function.
6139         (regcache::write_part): Fix asserts.
6140         (reg_buffer::raw_supply_part): New function.
6141         (regcache::transfer_regset_register): New helper function.
6142         (regcache::transfer_regset): Call new functions.
6143         (regcache_supply_regset): Use gdb_byte*.
6144         (regcache::supply_regset): Likewise.
6145         (regcache_collect_regset): Likewise.
6146         (regcache::collect_regset): Likewise.
6147         * regcache.h (reg_buffer::raw_collect_part): New declaration.
6148         (reg_buffer::raw_supply_part): Likewise.
6149         (regcache::transfer_regset_register): Likewise.
6150         (regcache::transfer_regset): Use gdb_byte*.
6151
6152 2018-06-22  Alan Hayward  <alan.hayward@arm.com>
6153
6154         * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
6155
6156 2018-06-21  Pedro Alves  <palves@redhat.com>
6157
6158         * ada-lang.h (ada_get_task_number): Take a thread_info pointer
6159         instead of a ptid_t.  All callers adjusted.
6160         * ada-tasks.c (ada_get_task_number): Likewise.  All callers
6161         adjusted.
6162         (print_ada_task_info, display_current_task_id, task_command_1):
6163         Adjust.
6164         * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
6165         inferior_thread.
6166         (breakpoint_kind): Adjust.
6167         (remove_breakpoints_pid): Rename to ...
6168         (remove_breakpoints_inf): ... this.  Adjust to take an inferior
6169         pointer.  All callers adjusted.
6170         (bpstat_clear_actions): Use inferior_thread.
6171         (get_bpstat_thread): New.
6172         (bpstat_do_actions): Use it.
6173         (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
6174         to take a thread_info pointer.  All callers adjusted.
6175         (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
6176         (breakpoint_re_set_thread): Use inferior_thread.
6177         * breakpoint.h (struct inferior): Forward declare.
6178         (bpstat_stop_status): Update.
6179         (remove_breakpoints_pid): Delete.
6180         (remove_breakpoints_inf): New.
6181         * bsd-uthread.c (bsd_uthread_target::wait)
6182         (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
6183         * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
6184         (maint_btrace_packet_history_cmd)
6185         (maint_btrace_clear_packet_history_cmd): Adjust.
6186         (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
6187         inferior_thread.
6188         * cli/cli-interp.c: Include "inferior.h".
6189         * common/refcounted-object.h (struct
6190         refcounted_object_ref_policy): New.
6191         * compile/compile-object-load.c: Include gdbthread.h.
6192         (store_regs): Use inferior_thread.
6193         * corelow.c (core_target::close): Use current_inferior.
6194         (core_target_open): Adjust to use first_thread_of_inferior and use
6195         the current inferior.
6196         * ctf.c (ctf_target::close): Adjust to use current_inferior.
6197         * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
6198         <thread>: ... this new field.  All references adjusted.
6199         (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
6200         Take a thread_info pointer instead of a ptid_t.
6201         * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
6202         (dummy_frame_discard, register_dummy_frame_dtor): Take a
6203         thread_info pointer instead of a ptid_t.
6204         * elfread.c: Include "inferior.h".
6205         (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
6206         Use inferior_thread.
6207         * eval.c (evaluate_subexp): Likewise.
6208         * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
6209         inferior_thread.
6210         * gdb_proc_service.h (struct thread_info): Forward declare.
6211         (struct ps_prochandle) <ptid>: Delete, replaced by ...
6212         <thread>: ... this new field.  All references adjusted.
6213         * gdbarch.h, gdbarch.c: Regenerate.
6214         * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
6215         'thread' parameter.  All implementations and callers adjusted.
6216         * gdbthread.h (thread_info) <set_running>: New method.
6217         (delete_thread, delete_thread_silent): Take a thread_info pointer
6218         instead of a ptid.
6219         (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
6220         (first_thread_of_process): Delete, replaced by ...
6221         (first_thread_of_inferior): ... this new function.  All callers
6222         adjusted.
6223         (any_live_thread_of_process): Delete, replaced by ...
6224         (any_live_thread_of_inferior): ... this new function.  All callers
6225         adjusted.
6226         (switch_to_thread, switch_to_no_thread): Declare.
6227         (is_executing): Delete.
6228         (enable_thread_stack_temporaries): Update comment.
6229         <enable_thread_stack_temporaries>: Take a thread_info pointer
6230         instead of a ptid_t.  Incref the thread.
6231         <~enable_thread_stack_temporaries>: Decref the thread.
6232         <m_ptid>: Delete
6233         <m_thr>: New.
6234         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6235         (get_last_thread_stack_temporary)
6236         (value_in_thread_stack_temporaries, can_access_registers_thread):
6237         Take a thread_info pointer instead of a ptid_t.  All callers
6238         adjusted.
6239         * infcall.c (get_call_return_value): Use inferior_thread.
6240         (run_inferior_call): Work with thread pointers instead of ptid_t.
6241         (call_function_by_hand_dummy): Work with thread pointers instead
6242         of ptid_t.  Use thread_info_ref.
6243         * infcmd.c (proceed_thread_callback): Access thread's state
6244         directly.
6245         (ensure_valid_thread, ensure_not_running): Use inferior_thread,
6246         access thread's state directly.
6247         (continue_command): Use inferior_thread.
6248         (info_program_command): Use find_thread_ptid and access thread
6249         state directly.
6250         (proceed_after_attach_callback): Use thread state directly.
6251         (notice_new_inferior): Take a thread_info pointer instead of a
6252         ptid_t.  All callers adjusted.
6253         (exit_inferior): Take an inferior pointer instead of a pid.  All
6254         callers adjusted.
6255         (exit_inferior_silent): New.
6256         (detach_inferior): Delete.
6257         (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
6258         (gdb_inferior_id_to_pid, in_inferior_list): Delete.
6259         (detach_inferior_command, kill_inferior_command): Use
6260         find_inferior_id instead of valid_gdb_inferior_id and
6261         gdb_inferior_id_to_pid.
6262         (inferior_command): Use inferior and thread pointers.
6263         * inferior.h (struct thread_info): Forward declare.
6264         (notice_new_inferior): Take a thread_info pointer instead of a
6265         ptid_t.  All callers adjusted.
6266         (detach_inferior): Delete declaration.
6267         (exit_inferior, exit_inferior_silent): Take an inferior pointer
6268         instead of a pid.  All callers adjusted.
6269         (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
6270         (valid_gdb_inferior_id): Delete.
6271         * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
6272         (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
6273         (struct displaced_step_inferior_state) <pid>: Delete, replaced by
6274         ...
6275         <inf>: ... this new field.
6276         <step_ptid>: Delete, replaced by ...
6277         <step_thread>: ... this new field.
6278         (get_displaced_stepping_state): Take an inferior pointer instead
6279         of a pid.  All callers adjusted.
6280         (displaced_step_in_progress_any_inferior): Adjust.
6281         (displaced_step_in_progress_thread): Take a thread pointer instead
6282         of a ptid_t.  All callers adjusted.
6283         (displaced_step_in_progress, add_displaced_stepping_state): Take
6284         an inferior pointer instead of a pid.  All callers adjusted.
6285         (get_displaced_step_closure_by_addr): Adjust.
6286         (remove_displaced_stepping_state): Take an inferior pointer
6287         instead of a pid.  All callers adjusted.
6288         (displaced_step_prepare_throw, displaced_step_prepare)
6289         (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
6290         All callers adjusted.
6291         (start_step_over): Adjust.
6292         (infrun_thread_ptid_changed): Remove bit updating ptids in the
6293         displaced step queue.
6294         (do_target_resume): Adjust.
6295         (fetch_inferior_event): Use inferior_thread.
6296         (context_switch, get_inferior_stop_soon): Take an
6297         execution_control_state pointer instead of a ptid_t.  All callers
6298         adjusted.
6299         (switch_to_thread_cleanup): Delete.
6300         (stop_all_threads): Use scoped_restore_current_thread.
6301         * inline-frame.c: Include "gdbthread.h".
6302         (inline_state) <inline_state>: Take a thread pointer instead of a
6303         ptid_t.  All callers adjusted.
6304         <ptid>: Delete, replaced by ...
6305         <thread>: ... this new field.
6306         (find_inline_frame_state): Take a thread pointer instead of a
6307         ptid_t.  All callers adjusted.
6308         (skip_inline_frames, step_into_inline_frame)
6309         (inline_skipped_frames, inline_skipped_symbol): Take a thread
6310         pointer instead of a ptid_t.  All callers adjusted.
6311         * inline-frame.h (skip_inline_frames, step_into_inline_frame)
6312         (inline_skipped_frames, inline_skipped_symbol): Likewise.
6313         * linux-fork.c (delete_checkpoint_command): Adjust to use thread
6314         pointers directly.
6315         * linux-nat.c (get_detach_signal): Likewise.
6316         * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
6317         (thread_db_notice_clone): Adjust.
6318         (thread_db_find_new_threads_silently)
6319         (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
6320         a thread pointer instead of a ptid_t.  All callers adjusted.
6321         * mi/mi-cmd-var.c: Include "inferior.h".
6322         (mi_cmd_var_update_iter): Update to use thread pointers.
6323         * mi/mi-interp.c (mi_new_thread): Update to use the thread's
6324         inferior directly.
6325         (mi_output_running_pid, mi_inferior_count): Delete, bits factored
6326         out to ...
6327         (mi_output_running): ... this new function.
6328         (mi_on_resume_1): Adjust to use it.
6329         (mi_user_selected_context_changed): Adjust to use inferior_thread.
6330         * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
6331         directly.
6332         (interrupt_thread_callback): : Adjust to use thread and inferior
6333         pointers.
6334         * proc-service.c: Include "gdbthread.h".
6335         (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
6336         * progspace-and-thread.c: Include "inferior.h".
6337         * progspace.c: Include "inferior.h".
6338         * python/py-exitedevent.c (create_exited_event_object): Adjust to
6339         hold a reference to an inferior_object.
6340         * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
6341         inferior_thread.
6342         * python/py-inferior.c (struct inferior_object): Give the type a
6343         tag name instead of a typedef.
6344         (python_on_normal_stop): No need to check if the current thread is
6345         listed.
6346         (inferior_to_inferior_object): Change return type to
6347         inferior_object.  All callers adjusted.
6348         (find_thread_object): Delete, bits factored out to ...
6349         (thread_to_thread_object): ... this new function.
6350         * python/py-infthread.c (create_thread_object): Use
6351         inferior_to_inferior_object.
6352         (thpy_is_stopped): Use thread pointer directly.
6353         (gdbpy_selected_thread): Use inferior_thread.
6354         * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
6355         field, replaced with ...
6356         <thread>: ... this new field.  All users adjusted.
6357         (btpy_insn_or_gap_new): Drop const.
6358         (btpy_list_new): Take a thread pointer instead of a ptid_t.  All
6359         callers adjusted.
6360         * python/py-record.c: Include "gdbthread.h".
6361         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6362         a ptid_t.  All callers adjusted.
6363         (gdbpy_current_recording): Use inferior_thread.
6364         * python/py-record.h (recpy_record_object) <ptid>: Delete
6365         field, replaced with ...
6366         <thread>: ... this new field.  All users adjusted.
6367         (recpy_element_object) <ptid>: Delete
6368         field, replaced with ...
6369         <thread>: ... this new field.  All users adjusted.
6370         (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
6371         a ptid_t.  All callers adjusted.
6372         * python/py-threadevent.c: Include "gdbthread.h".
6373         (get_event_thread): Use thread_to_thread_object.
6374         * python/python-internal.h (struct inferior_object): Forward
6375         declare.
6376         (find_thread_object, find_inferior_object): Delete declarations.
6377         (thread_to_thread_object, inferior_to_inferior_object): New
6378         declarations.
6379         * record-btrace.c: Include "inferior.h".
6380         (require_btrace_thread): Use inferior_thread.
6381         (record_btrace_frame_sniffer)
6382         (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
6383         (get_thread_current_frame): Use scoped_restore_current_thread and
6384         switch_to_thread.
6385         (get_thread_current_frame): Use thread pointer directly.
6386         (record_btrace_replay_at_breakpoint): Use thread's inferior
6387         pointer directly.
6388         * record-full.c: Include "inferior.h".
6389         * regcache.c: Include "gdbthread.h".
6390         (get_thread_arch_regcache): Use the inferior's address space
6391         directly.
6392         (get_thread_regcache, registers_changed_thread): New.
6393         * regcache.h (get_thread_regcache(thread_info *thread)): New
6394         overload.
6395         (registers_changed_thread): New.
6396         (remote_target) <remote_detach_1>: Swap order of parameters.
6397         (remote_add_thread): <remote_add_thread>: Return the new thread.
6398         (get_remote_thread_info(ptid_t)): New overload.
6399         (remote_target::remote_notice_new_inferior): Use thread pointers
6400         directly.
6401         (remote_target::process_initial_stop_replies): Use
6402         thread_info::set_running.
6403         (remote_target::remote_detach_1, remote_target::detach)
6404         (extended_remote_target::detach): Adjust.
6405         * stack.c (frame_show_address): Use inferior_thread.
6406         * target-debug.h (target_debug_print_thread_info_pp): New.
6407         * target-delegates.c: Regenerate.
6408         * target.c (default_thread_address_space): Delete.
6409         (memory_xfer_partial_1): Use current_inferior.
6410         (target_detach): Use current_inferior.
6411         (target_thread_address_space): Delete.
6412         (generic_mourn_inferior): Use current_inferior.
6413         * target.h (struct target_ops) <thread_address_space>: Delete.
6414         (target_thread_address_space): Delete.
6415         * thread.c (init_thread_list): Use ALL_THREADS_SAFE.  Use thread
6416         pointers directly.
6417         (delete_thread_1, delete_thread, delete_thread_silent): Take a
6418         thread pointer instead of a ptid_t.  Adjust all callers.
6419         (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
6420         (first_thread_of_process): Delete, replaced by ...
6421         (first_thread_of_inferior): ... this new function.  All callers
6422         adjusted.
6423         (any_thread_of_process): Rename to ...
6424         (any_thread_of_inferior): ... this, and take an inferior pointer.
6425         (any_live_thread_of_process): Rename to ...
6426         (any_live_thread_of_inferior): ... this, and take an inferior
6427         pointer.
6428         (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
6429         (value_in_thread_stack_temporaries)
6430         (get_last_thread_stack_temporary): Take a thread pointer instead
6431         of a ptid_t.  Adjust all callers.
6432         (thread_info::set_running): New.
6433         (validate_registers_access): Use inferior_thread.
6434         (can_access_registers_ptid): Rename to ...
6435         (can_access_registers_thread): ... this, and take a thread
6436         pointer.
6437         (print_thread_info_1): Adjust to compare thread pointers instead
6438         of ptids.
6439         (switch_to_no_thread, switch_to_thread): Make extern.
6440         (scoped_restore_current_thread::~scoped_restore_current_thread):
6441         Use m_thread pointer directly.
6442         (scoped_restore_current_thread::scoped_restore_current_thread):
6443         Use inferior_thread.
6444         (thread_command): Use thread pointer directly.
6445         (thread_num_make_value_helper): Use inferior_thread.
6446         * top.c (execute_command): Use inferior_thread.
6447         * tui/tui-interp.c: Include "inferior.h".
6448         * varobj.c (varobj_create): Use inferior_thread.
6449         (value_of_root_1): Use find_thread_global_id instead of
6450         global_thread_id_to_ptid.
6451
6452 2018-06-21  Alan Hayward  <alan.hayward@arm.com>
6453
6454         * regcache.c (readable_regcache::read_part): Avoid memcpy when
6455         possible.
6456         (regcache::write_part): Likewise.
6457         (readable_regcache::cooked_read_part): Update comment.
6458         (readable_regcache::cooked_write_part): Likewise.
6459         * regcache.h: (readable_regcache::read_part): Likewise.
6460         (regcache::write_part): Likewise.
6461
6462 2018-06-21  Richard Bunt  <richard.bunt@arm.com>
6463             Dirk Schubert  <dirk.schubert@arm.com>
6464
6465         * aarch64-linux-nat.c (post_attach): New.
6466         (aarch64_linux_nat_target::post_attach): Override post_attach to
6467         record the number of hardware debug registers.
6468
6469 2018-06-20  Tom Tromey  <tom@tromey.com>
6470
6471         * python/py-param.c (add_setshow_generic): Make parameters const.
6472         (parmpy_init): Update.
6473
6474 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6475
6476         * regcache.h (regcache_cooked_read_ftype): Rename to...
6477         (register_read_ftype): ...this, change type to function_view.
6478         (class reg_buffer) <save>: Remove src parameter.
6479         (readonly_detached_regcache) <readonly_detached_regcache>: Make
6480         parameter non-const in first overload.  Remove src parameter in
6481         second overload.
6482         * regcache.c (do_cooked_read): Remove.
6483         (readonly_detached_regcache::readonly_detached_regcache): Make
6484         parameter non-const, adjust call to other constructor.
6485         (reg_buffer::save): Remove src parameter.
6486         * frame.c (do_frame_register_read): Remove.
6487         (frame_save_as_regcache): Use lambda function.
6488         * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
6489         parameter to ppu2spu_data *.
6490         (ppu2spu_sniffer): Use lambda function.
6491
6492 2018-06-20  Simon Marchi  <simon.marchi@polymtl.ca>
6493
6494         * record-full.c (record_full_target::insert_breakpoint): Remove
6495         "struct" keyword, add const.
6496
6497 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
6498
6499         * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
6500         PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
6501         * configure.ac: Remove AC_PREREQ, add missing quoting.
6502         * gnulib/configure.ac: Modernize usage of
6503         AC_INIT/AM_INIT_AUTOMAKE.  Remove AC_PREREQ.
6504         * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
6505         (AUTOMAKE_VERSION): Bump to 1.15.1.
6506         * configure: Re-generate.
6507         * config.in: Re-generate.
6508         * aclocal.m4: Re-generate.
6509         * gnulib/aclocal.m4: Re-generate.
6510         * gnulib/config.in: Re-generate.
6511         * gnulib/configure: Re-generate.
6512         * gnulib/import/Makefile.in: Re-generate.
6513
6514 2018-06-19  Pedro Alves  <palves@redhat.com>
6515
6516         * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
6517         (lookup_minimal_symbol_by_pc_section): ... here with
6518         gdb_assert_not_reached added.
6519
6520 2018-06-19  Pedro Alves  <palves@redhat.com>
6521
6522         * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
6523         parameter with a block parameter.  Compare location's block symbol
6524         with the frame's block instead of addresses.
6525         (skip_inline_frames): Pass the current block instead of the
6526         frame's address.  Break out as soon as we determine the frame
6527         should not be skipped.
6528
6529 2018-06-18  Tom Tromey  <tom@tromey.com>
6530
6531         * solib-aix.c (solib_aix_get_section_offsets): Return
6532         unique_xmalloc_ptr.
6533         (solib_aix_solib_create_inferior_hook): Update.
6534
6535 2018-06-18  Tom Tromey  <tom@tromey.com>
6536
6537         * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
6538
6539 2018-06-18  Tom Tromey  <tom@tromey.com>
6540
6541         * solib-frv.c (frv_relocate_main_executable): Use
6542         unique_xmalloc_ptr.
6543         * solib-dsbt.c (dsbt_relocate_main_executable): Use
6544         unique_xmalloc_ptr.
6545
6546 2018-06-18  Tom Tromey  <tom@tromey.com>
6547
6548         * objfiles.h (inhibit_section_map_updates): Update.
6549         (resume_section_map_updates, resume_section_map_updates_cleanup):
6550         Remove.
6551         * solib-svr4.c (svr4_handle_solib_event): Update.
6552         * objfiles.c (inhibit_section_map_updates): Return
6553         scoped_restore_tmpl<int>.
6554         (resume_section_map_updates, resume_section_map_updates_cleanup):
6555         Remove.
6556
6557 2018-06-18  Tom Tromey  <tom@tromey.com>
6558
6559         * valprint.h (read_string): Update.
6560         * valprint.c (read_string): Change type of "buffer".
6561         (val_print_string): Update.
6562         * python/py-value.c (valpy_string): Update.
6563         * language.h (struct language_defn) <la_get_string>: Change
6564         type of "buffer".
6565         (default_get_string, c_get_string): Update.
6566         * language.c (default_get_string): Change type of "buffer".
6567         * guile/scm-value.c (gdbscm_value_to_string): Update.
6568         * c-lang.c (c_get_string): Change type of "buffer".
6569
6570 2018-06-18  Tom Tromey  <tom@tromey.com>
6571
6572         * ser-mingw.c (struct pipe_state_destroyer): New.
6573         (pipe_state_up): New typedef.
6574         (cleanup_pipe_state): Remove.
6575         (pipe_windows_open): Use pipe_state_up.  Don't release argv.
6576
6577 2018-06-18  Tom Tromey  <tom@tromey.com>
6578
6579         * rust-lang.h (rust_yyerror): Don't declare.
6580         * rust-lang.c (rust_language_defn): Update.
6581         * rust-exp.y (yyerror): Now static.
6582         * parse.c (parse_exp_in_context_1): Update.
6583         * p-lang.h (p_yyerror): Don't declare.
6584         * p-lang.c (p_language_defn): Update.
6585         * p-exp.y (yyerror): Now static.
6586         * opencl-lang.c (opencl_language_defn): Update.
6587         * objc-lang.c (objc_language_defn): Update.
6588         * m2-lang.h (m2_yyerror): Don't declare.
6589         * m2-lang.c (m2_language_defn): Update.
6590         * m2-exp.y (yyerror): Now static.
6591         * language.h (struct language_defn) <la_error>: Remove.
6592         * language.c (unk_lang_error): Remove.
6593         (unknown_language_defn, auto_language_defn): Remove.
6594         * go-lang.h (go_yyerror): Don't declare.
6595         * go-lang.c (go_language_defn): Update.
6596         * go-exp.y (yyerror): Now static.
6597         * f-lang.h (f_yyerror): Don't declare.
6598         * f-lang.c (f_language_defn): Update.
6599         * f-exp.y (yyerror): Now static.
6600         * d-lang.h (d_yyerror): Don't declare.
6601         * d-lang.c (d_language_defn): Update.
6602         * d-exp.y (yyerror): Now static.
6603         * c-lang.h (c_yyerror): Don't declare.
6604         * c-lang.c (c_language_defn, cplus_language_defn)
6605         (asm_language_defn, minimal_language_defn): Update.
6606         * c-exp.y (yyerror): Now static.
6607         * ada-lang.h (ada_yyerror): Don't declare.
6608         * ada-lang.c (ada_language_defn): Update.
6609         * ada-exp.y (yyerror): Now static.
6610
6611 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6612
6613         * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
6614         (store_sveregs_to_thread): Likewise.
6615         (aarch64_linux_fetch_inferior_registers): Check for SVE.
6616         (aarch64_linux_store_inferior_registers): Likewise.
6617         * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
6618         function.
6619         (aarch64_sve_regs_copy_to_regcache): Likewise.
6620         (aarch64_sve_regs_copy_from_regcache): Likewise.
6621         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
6622         declaration.
6623         (aarch64_sve_regs_copy_to_regcache): Likewise.
6624         (aarch64_sve_regs_copy_from_regcache): Likewise.
6625         (sve_context): Structure from Linux headers.
6626         (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
6627         (SVE_SIG_ZREG_SIZE): Likewise.
6628         (SVE_SIG_PREG_SIZE): Likewise.
6629         (SVE_SIG_FFR_SIZE): Likewise.
6630         (SVE_SIG_REGS_OFFSET): Likewise.
6631         (SVE_SIG_ZREGS_OFFSET): Likewise.
6632         (SVE_SIG_ZREG_OFFSET): Likewise.
6633         (SVE_SIG_ZREGS_SIZE): Likewise.
6634         (SVE_SIG_PREGS_OFFSET): Likewise.
6635         (SVE_SIG_PREG_OFFSET): Likewise.
6636         (SVE_SIG_PREGS_SIZE): Likewise.
6637         (SVE_SIG_FFR_OFFSET): Likewise.
6638         (SVE_SIG_REGS_SIZE): Likewise.
6639         (SVE_SIG_CONTEXT_SIZE): Likewise.
6640         (SVE_PT_REGS_MASK): Likewise.
6641         (SVE_PT_REGS_FPSIMD): Likewise.
6642         (SVE_PT_REGS_SVE): Likewise.
6643         (SVE_PT_VL_INHERIT): Likewise.
6644         (SVE_PT_VL_ONEXEC): Likewise.
6645         (SVE_PT_REGS_OFFSET): Likewise.
6646         (SVE_PT_FPSIMD_OFFSET): Likewise.
6647         (SVE_PT_FPSIMD_SIZE): Likewise.
6648         (SVE_PT_SVE_ZREG_SIZE): Likewise.
6649         (SVE_PT_SVE_PREG_SIZE): Likewise.
6650         (SVE_PT_SVE_FFR_SIZE): Likewise.
6651         (SVE_PT_SVE_FPSR_SIZE): Likewise.
6652         (SVE_PT_SVE_FPCR_SIZE): Likewise.
6653         (__SVE_SIG_TO_PT): Likewise.
6654         (SVE_PT_SVE_OFFSET): Likewise.
6655         (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
6656         (SVE_PT_SVE_ZREG_OFFSET): Likewise.
6657         (SVE_PT_SVE_ZREGS_SIZE): Likewise.
6658         (SVE_PT_SVE_PREGS_OFFSET): Likewise.
6659         (SVE_PT_SVE_PREG_OFFSET): Likewise.
6660         (SVE_PT_SVE_PREGS_SIZE): Likewise.
6661         (SVE_PT_SVE_FFR_OFFSET): Likewise.
6662         (SVE_PT_SVE_FPSR_OFFSET): Likewise.
6663         (SVE_PT_SVE_FPCR_OFFSET): Likewise.
6664         (SVE_PT_SVE_SIZE): Likewise.
6665         (SVE_PT_SIZE): Likewise.
6666         (HAS_SVE_STATE): New define.
6667
6668 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
6669
6670         * nat/aarch64-sve-linux-sigcontext.h: New file.
6671         * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
6672         new files.
6673         (SVE_VQ_MIN): Likewise.
6674         (SVE_VQ_MAX): Likewise.
6675         (SVE_VL_MIN): Likewise.
6676         (SVE_VL_MAX): Likewise.
6677         (SVE_NUM_ZREGS): Likewise.
6678         (SVE_NUM_PREGS): Likewise.
6679         (sve_vl_valid): Likewise.
6680         (struct user_sve_header): Likewise.
6681
6682 2018-06-16  Andrew Burgess  <andrew.burgess@embecosm.com>
6683             Richard Bunt <Richard.Bunt@arm.com>
6684
6685         * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
6686         was requested by GDB.
6687
6688 2018-06-15  Tom de Vries  <tdevries@suse.de>
6689
6690         * MAINTAINERS (Write After Approval): Add Tom de Vries.
6691
6692 2018-06-14  Simon Marchi  <simon.marchi@polymtl.ca>
6693
6694         * gnulib/update-gnulib.sh: Print expected versions of
6695         autoconf/aclocal.
6696
6697 2018-06-14  Simon Marchi  <simon.marchi@ericsson.com>
6698
6699         * arch-utils.c (default_type_align): Use type_length_units.
6700         * gdbtypes.c (type_align): Use type_length_units.
6701
6702 2018-06-14  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6703
6704         * cli/cli-script.c (_initialize_cli_script): Fix online documentation
6705         of 'define' command.
6706
6707 2018-06-14  Tom de Vries  <tdevries@suse.de>
6708
6709         PR cli/22573
6710         * infcmd.c (print_return_value_1): Use get_user_print_options instead of
6711         get_no_prettyformat_print_options.
6712
6713 2018-06-13  Simon Marchi  <simon.marchi@ericsson.com>
6714
6715         * sparc-nat.h: Include target.h.
6716         * sparc64-linux-nat.c (class sparc64_linux_nat_target)
6717         <fetch_registers>: Remove this argument in function call.
6718         <store_registers>: Remove this argument in function call, remove
6719         extra semicolon.
6720         <low_forget_process>: Call sparc64_forget_process instead of
6721         sparc_forget_process.
6722
6723 2018-06-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6724
6725         * procfs.c (_initialize_procfs): Use add_inf_child_target.
6726         (procfs_target::make_corefile_notes): Adjust to new
6727         target_read_alloc return type.
6728
6729 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6730             Stephen Roberts  <stephen.roberts@arm.com>
6731
6732         PR gdb/22882
6733         * infrun.c (fetch_inferior_event): If GDB is not proceeding then
6734         run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
6735         Move should_notify_stop local into more inner scope.
6736
6737 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6738             Stephen Roberts  <stephen.roberts@arm.com>
6739
6740         PR gdb/22882
6741         * infrun.c (resume_1): Add call to mark_async_event_handler.
6742
6743 2018-06-12  Andrew Burgess  <andrew.burgess@embecosm.com>
6744
6745         * infrun.c (do_target_wait): Change old version of $pc printed.
6746
6747 2018-06-11  Simon Marchi  <simon.marchi@ericsson.com>
6748
6749         * dwarf2read.c (read_index_from_section): Rename to...
6750         (read_gdb_index_from_section): ... this, update all callers.
6751         (dwarf2_read_index): Rename to...
6752         (dwarf2_read_gdb_index): ... this, update all callers.
6753
6754 2018-06-11  John David Anglin  <danglin@gcc.gnu.org>
6755
6756         * gdb/hppa-linux-nat.c
6757         (hppa_linux_nat_target::fetch_inferior_registers): Rename to
6758         hppa_linux_nat_target::fetch_registers.
6759
6760 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6761
6762         * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
6763         * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
6764         (AARCH64_DWARF_SVE_FFR): Likewise.
6765         (AARCH64_DWARF_SVE_P0): Likewise.
6766         (AARCH64_DWARF_SVE_Z0): Likewise.
6767
6768 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6769
6770         * common/common-regcache.h (raw_compare): New function.
6771         * regcache.c (regcache::raw_compare): Likewise.
6772         * regcache.h (regcache::raw_compare): New declaration.
6773
6774 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
6775
6776         * common/common-regcache.h (reg_buffer_common): New structure.
6777         * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
6778         (reg_buffer::raw_supply): Likewise.
6779         (reg_buffer::raw_supply_integer): Likewise.
6780         (reg_buffer::raw_supply_zeroed): Likewise.
6781         (reg_buffer::raw_collect): Likewise.
6782         (reg_buffer::raw_collect_integer): Likewise.
6783         * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
6784         (reg_buffer::raw_supply): Likewise.
6785         (reg_buffer::raw_supply_integer): Likewise.
6786         (reg_buffer::raw_supply_zeroed): Likewise.
6787         (reg_buffer::raw_collect): Likewise.
6788         (reg_buffer::raw_collect_integer): Likewise.
6789
6790 2018-06-10  Tom Tromey  <tom@tromey.com>
6791
6792         * remote.c (stop_reply_p): Remove typedef.  Don't declare queue.
6793         (class remote_state) <stop_reply_queue>: Now std::vector.
6794         (remote_state::~remote_state)
6795         (remote_target::stop_reply_queue_length): Update.
6796         (struct queue_iter_param, remove_child_of_pending_fork)
6797         (struct check_pending_event_prevents_wildcard_vcont_callback_data)
6798         (check_pending_event_prevents_wildcard_vcont_callback)
6799         (remove_stop_reply_for_inferior)
6800         (remove_stop_reply_of_remote_state)
6801         (remote_notif_remove_once_on_match)
6802         (stop_reply_match_ptid_and_ws)
6803         (remote_kill_child_of_pending_fork): Remove.
6804         (remote_target::remove_new_fork_children)
6805         (remote_target::check_pending_events_prevent_wildcard_vcont)
6806         (remote_target::discard_pending_stop_replies)
6807         (remote_target::discard_pending_stop_replies_in_queue)
6808         (remote_target::remote_notif_remove_queued_reply)
6809         (remote_target::queued_stop_reply)
6810         (remote_target::push_stop_reply, remote_target::peek_stop_reply)
6811         (remote_target::wait, remote_target::kill_new_fork_children)
6812         (remote_target::async): Update.
6813
6814 2018-06-10  Tom Tromey  <tom@tromey.com>
6815
6816         * record-full.c (record_full_arch_list_cleanups): Remove.
6817         (record_full_message): Use try/catch.
6818         (record_full_wait_cleanups): Remove.
6819         (record_full_wait_1): Use try/catch.
6820         (record_full_restore): Likewise.
6821
6822 2018-06-10  Tom Tromey  <tom@tromey.com>
6823
6824         * record-full.c (record_full_breakpoint_p): Remove typedef.  Don't
6825         declare VEC.  Add constructor.
6826         <in_target_beneath>: Now bool.
6827         (record_full_breakpoints): Now a std::vector, static.
6828         (record_full_sync_record_breakpoints)
6829         (record_full_init_record_breakpoints)
6830         (record_full_target::insert_breakpoint)
6831         (record_full_target::remove_breakpoint): Update.  Don't use XNEW.
6832
6833 2018-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
6834
6835         * dwarf2read.c (process_cu_includes): Remove struct keyword.
6836         * serial.c (serial_interface_lookup): Remove struct keyword.
6837
6838 2018-06-10  Tom Tromey  <tom@tromey.com>
6839
6840         * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
6841         method.
6842         * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
6843         a method.
6844         * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
6845         method.
6846         * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
6847         "beneath" as a method.
6848         * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
6849         Use "beneath" as a method.
6850
6851 2018-06-10  Tom Tromey  <tom@tromey.com>
6852
6853         * tracefile.c (struct trace_file_writer_deleter): New.
6854         <operator()>: Rename from trace_file_writer_xfree.
6855         (trace_file_writer_up): New typedef.
6856         (tsave_command, trace_save_tfile, trace_save_ctf): Update.
6857
6858 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6859
6860         * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
6861         <m_registers, m_register_status>: Change type to
6862         std::unique_ptr.
6863         * regcache.c (reg_buffer::reg_buffer): Use new instead of
6864         XCNEWVEC.
6865
6866 2018-06-09  Simon Marchi  <simon.marchi@ericsson.com>
6867
6868         * common/common-regcache.h (enum register_status): Add
6869         underlying type "signed char".
6870         * regcache.h (reg_buffer) <m_register_status>: Change type to
6871         register_status *.
6872         * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
6873         register_status instead of signed char.
6874         (reg_buffer::save): Use REG_UNKNOWN instead of 0.
6875         (reg_buffer::get_register_status): Remove cast.
6876         (readable_regcache::raw_read): Remove cast.
6877         (readable_regcache::cooked_read): Remove cast.
6878
6879 2018-06-09  Tom Tromey  <tom@tromey.com>
6880
6881         * source.c (reverse_search_command, forward_search_command): Use
6882         scoped_fd.
6883
6884 2018-06-09  Tom Tromey  <tom@tromey.com>
6885
6886         * serial.c (serial_ops_p): Remove typedef.  Don't declare VEC.
6887         (serial_ops_list): Now static, std::vector.
6888         (serial_interface_lookup, serial_add_interface): Update.
6889
6890 2018-06-09  Tom Tromey  <tom@tromey.com>
6891
6892         * dwarf2read.c (process_cu_includes): Update.
6893         (process_full_comp_unit): Update.
6894         * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
6895         std::vector.
6896
6897 2018-06-08  Paul Koning  <paul_koning@dell.com>
6898
6899         PR gdb/23252
6900
6901         * python/python.c (do_start_initialization):
6902         Avoid call to internal Python API.
6903         (init__gdb_module): New function.
6904
6905 2018-06-08  Gary Benson <gbenson@redhat.com>
6906
6907         * linux-thread-db.c (valprint.h): New include.
6908         (struct check_thread_db_info): New structure.
6909         (check_thread_db_on_load, tdb_testinfo): New static globals.
6910         (check_thread_db, check_thread_db_callback): New functions.
6911         (try_thread_db_load_1): Run integrity checks if requested.
6912         (maintenance_check_libthread_db): New function.
6913         (_initialize_thread_db): Register "maint check libthread-db"
6914         and "maint set/show check-libthread-db".
6915         * NEWS: Mention the above new commands.
6916
6917 2018-06-08  Tom Tromey  <tom@tromey.com>
6918
6919         * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
6920         now a method.
6921
6922 2018-06-08  Tom Tromey  <tom@tromey.com>
6923
6924         * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
6925
6926 2018-06-08  Tom Tromey  <tom@tromey.com>
6927
6928         * common/btrace-common.h (struct btrace_data): Add constructor,
6929         destructor, move assignment operator.
6930         <empty, clear, fini>: New methods.
6931         <format>: Initialize.
6932         (btrace_data_init, btrace_data_fini, btrace_data_clear)
6933         (btrace_data_empty): Don't declare.
6934         * common/btrace-common.c (btrace_data_init): Remove.
6935         (btrace_data::fini): Rename from btrace_data_fini.
6936         (btrace_data::empty): Rename from btrace_data_empty.
6937         (btrace_data::clear): Rename from btrace_data_clear.  Return
6938         bool.
6939         * btrace.h (make_cleanup_btrace_data): Don't declare.
6940         * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
6941         (parse_xml_btrace): Update.
6942         (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
6943         (maint_btrace_clear_packet_history_cmd): Update.
6944
6945 2018-06-07  Pedro Alves  <palves@redhat.com>
6946
6947         * target.h (target_ops) <beneath>: Now a method.  All references
6948         updated.
6949         (class target_stack): New.
6950         * target.c (g_target_stack): New.
6951         (g_current_top_target): Delete.
6952         (current_top_target): Get the top target out of g_target_stack.
6953         (target_stack::push, target_stack::unpush): New.
6954         (push_target, unpush_target): Reimplement.
6955         (target_is_pushed): Reimplement in terms of g_target_stack.
6956         (target_ops::beneath, target_stack::find_beneath): New.
6957
6958 2018-06-07  Pedro Alves  <palves@redhat.com>
6959
6960         * target.h (find_target_beneath): Delete declaration.
6961         * target.c (find_target_beneath): Delete definition.
6962         * aix-thread.c: All callers of find_target_beneath adjusted to
6963         call target_ops::beneath instead.
6964         * bsd-uthread.c: Likewise.
6965         * linux-thread-db.c: Likewise.
6966         * ravenscar-thread.c: Likewise.
6967         * sol-thread.c: Likewise.
6968         * spu-multiarch.c: Likewise.
6969
6970 2018-06-07  Pedro Alves  <palves@redhat.com>
6971
6972         * target.h (target_ops) <beneath>: Now a method.  All references
6973         updated.
6974         (target_ops) <m_beneath>: New.
6975         * target.c (target_ops::beneath): New.
6976         * corelow.c: Adjust all references to target_ops::beneath.
6977         * linux-thread-db.c: Likewise.
6978         * make-target-delegates: Likewise.
6979         * record-btrace.c: Likewise.
6980         * record-full.c: Likewise.
6981         * remote.c: Likewise.
6982         * target.c: Likewise.
6983         * target-delegates.c: Regenerate.
6984
6985 2018-06-07  Pedro Alves  <palves@redhat.com>
6986
6987         * target.h (target_stack): Delete.
6988         (current_top_target): Declare function.
6989         * target.c (target_stack): Delete.
6990         (g_current_top_target): New.
6991         (current_top_target): New function.
6992         * auxv.c: Use current_top_target instead of target_stack
6993         throughout.
6994         * avr-tdep.c: Likewise.
6995         * breakpoint.c: Likewise.
6996         * corefile.c: Likewise.
6997         * elfread.c: Likewise.
6998         * eval.c: Likewise.
6999         * exceptions.c: Likewise.
7000         * frame.c: Likewise.
7001         * gdbarch-selftests.c: Likewise.
7002         * gnu-v3-abi.c: Likewise.
7003         * ia64-tdep.c: Likewise.
7004         * ia64-vms-tdep.c: Likewise.
7005         * infcall.c: Likewise.
7006         * infcmd.c: Likewise.
7007         * infrun.c: Likewise.
7008         * linespec.c: Likewise.
7009         * linux-tdep.c: Likewise.
7010         * minsyms.c: Likewise.
7011         * ppc-linux-nat.c: Likewise.
7012         * ppc-linux-tdep.c: Likewise.
7013         * procfs.c: Likewise.
7014         * regcache.c: Likewise.
7015         * remote.c: Likewise.
7016         * rs6000-tdep.c: Likewise.
7017         * s390-linux-nat.c: Likewise.
7018         * s390-tdep.c: Likewise.
7019         * solib-aix.c: Likewise.
7020         * solib-darwin.c: Likewise.
7021         * solib-dsbt.c: Likewise.
7022         * solib-spu.c: Likewise.
7023         * solib-svr4.c: Likewise.
7024         * solib-target.c: Likewise.
7025         * sparc-tdep.c: Likewise.
7026         * sparc64-tdep.c: Likewise.
7027         * spu-tdep.c: Likewise.
7028         * symfile.c: Likewise.
7029         * symtab.c: Likewise.
7030         * target-descriptions.c: Likewise.
7031         * target-memory.c: Likewise.
7032         * target.c: Likewise.
7033         * target.h: Likewise.
7034         * tracefile-tfile.c: Likewise.
7035         * tracepoint.c: Likewise.
7036         * valops.c: Likewise.
7037         * valprint.c: Likewise.
7038         * value.c: Likewise.
7039         * windows-tdep.c: Likewise.
7040         * mi/mi-main.c: Likewise.
7041
7042 2018-06-07  Tom Tromey  <tom@tromey.com>
7043
7044         * valprint.h (build_address_symbolic): Declare.
7045         * printcmd.c (print_address_symbolic): Update.
7046         (build_address_symbolic): Change "name" and "filename" to
7047         std::string.
7048         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
7049         Update.
7050         * defs.h (build_address_symbolic): Remove declaration.
7051
7052 2018-06-07  Alan Hayward  <alan.hayward@arm.com>
7053
7054         * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
7055         (aarch64_vnv_type): Add function.
7056         (aarch64_pseudo_register_name): Add V regs for SVE.
7057         (aarch64_pseudo_register_type): Likewise.
7058         (aarch64_pseudo_register_reggroup_p): Likewise.
7059         (aarch64_pseudo_read_value_2): Use V0 offset for SVE
7060         (aarch64_pseudo_read_value): Add V regs for SVE.
7061         (aarch64_pseudo_write_2): Use V0 offset for SVE
7062         (aarch64_pseudo_write): Add V regs for SVE.
7063         * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
7064
7065 2018-06-06  Sergio Durigan Junior  <sergiodj@redhat.com>
7066
7067         * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
7068         (sve_vl_from_vq): Likewise.
7069
7070 2018-06-05  Tom Tromey  <tom@tromey.com>
7071
7072         * cli/cli-cmds.c (show_version): Update.
7073         * top.c (print_gdb_version): Add "interactive" parameter.
7074         Update.
7075         * main.c (captured_main_1): Update.
7076         * top.h (print_gdb_version): Add "interactive" parameter and a
7077         comment.
7078
7079 2018-06-05  David Malcolm  <dmalcolm@redhat.com>
7080
7081         * common/enum-flags.h: Add trailing semicolon to example in
7082         comment.
7083
7084 2018-06-05  Tom Tromey  <tom@tromey.com>
7085
7086         PR cli/12326:
7087         * NEWS: Add entry about pager.
7088         * utils.c (pagination_disabled_for_command): New global.
7089         (prompt_for_continue): Allow "c" response to prompt.
7090         (reinitialize_more_filter): Clear
7091         pagination_disabled_for_command.
7092         (fputs_maybe_filtered): Check pagination_disabled_for_command.
7093
7094 2018-06-04  Tom Tromey  <tom@tromey.com>
7095
7096         * ada-lang.h (ada_lookup_symbol_list): Update.
7097         * ada-lang.c (resolve_subexp): Update.
7098         (symbols_are_identical_enums): Change type of syms.  Remove nsyms
7099         parameter.
7100         (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
7101         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
7102         results parameter to std::vector.
7103         (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
7104         Update.
7105         * ada-exp.y (block_lookup): Update.
7106         (select_possible_type_sym): Change type of syms.  Remove nsyms
7107         parameter.
7108         (write_var_or_type, write_name_assoc): Update.
7109
7110 2018-06-04  Joel Brobecker  <brobecker@adacore.com>
7111
7112         * windows-nat.c (windows_nat_target::xfer_partial): Return
7113         TARGET_XFER_E_IO if we need to delegate to the target beneath
7114         but BENEATH is NULL.
7115
7116 2018-06-04  Simon Marchi  <simon.marchi@ericsson.com>
7117
7118         * Makefile.in (config.status): Add configure.nat as a
7119         dependency.
7120
7121 2018-06-04  Tom Tromey  <tom@tromey.com>
7122
7123         * cp-name-parser.y (cpname_state): Add method declarations.
7124         (HANDLE_QUAL): Update.
7125         (cpname_state::d_grab, cpname_state::fill_comp)
7126         (cpname_state::make_operator, cpname_state::make_dtor)
7127         (cpname_state::make_builtin_type, cpname_state::make_name)
7128         (cpname_state::d_qualify, cpname_state::d_int_type)
7129         (cpname_state::d_unary, cpname_state::d_binary): Now methods.
7130         (%union): Move earlier.
7131
7132 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7133
7134         * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
7135
7136 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7137
7138         * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
7139         (aarch64_pseudo_write_1): Likewise.
7140         (aarch64_pseudo_read_value): Use helper.
7141         (aarch64_pseudo_write): Likewise.
7142
7143 2018-06-04  Pedro Alves  <palves@redhat.com>
7144
7145         * darwin-nat.c (darwin_ops): Delete.
7146         (darwin_attach_pid): Use get_native_target.
7147
7148 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7149
7150         * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
7151         * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
7152
7153 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7154
7155         * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
7156         * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
7157         (aarch64_gdbarch_init): Check for SVE.
7158         * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
7159
7160 2018-06-04  Alan Hayward  <alan.hayward@arm.com>
7161
7162         * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
7163         * aarch64-tdep.h (aarch64_read_description): Likewise.
7164         * arch/aarch64.c (aarch64_create_target_description): Likewise.
7165         * arch/aarch64.h (aarch64_create_target_description): Likewise.
7166         * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
7167         * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
7168         * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
7169
7170 2018-06-02  Simon Marchi  <simon.marchi@ericsson.com>
7171
7172         * value.c (value_fetch_lazy_bitfield): New.
7173         (value_fetch_lazy_memory): New.
7174         (value_fetch_lazy_register): New.
7175         (value_fetch_lazy): Factor out to smaller functions.
7176
7177 2018-06-01  Tom Tromey  <tom@tromey.com>
7178
7179         * cp-name-parser.y (backslashable, represented): Now const.
7180
7181 2018-06-01  Tom Tromey  <tom@tromey.com>
7182
7183         * cp-name-parser.y: Include parser-defs.h.
7184         (parser_fprintf): Remove declaration.
7185
7186 2018-06-01  Tom Tromey  <tom@tromey.com>
7187
7188         * cp-name-parser.y: Use %pure-parser, %lex-param, and
7189         %parse-param.
7190         (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
7191         (global_result): Remove globals.
7192         (struct cpname_state): New.
7193         (yyparse): Don't declare.
7194         (yylex, yyerror): Move declarations after %union.
7195         (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
7196         (make_name): Add state parameter.
7197         Update all callers.
7198         (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
7199         parameter.
7200         (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
7201         Update.
7202         (yylex): Add lvalp, state parameters.
7203         (yyerror): Add state parameter.
7204         (cp_demangled_name_to_comp): Update.
7205
7206 2018-06-01  Tom Tromey  <tom@tromey.com>
7207
7208         * cp-name-parser.y (parser_fprintf): Declare.
7209         (GDB_YY_REMAP_PREFIX): Define.
7210         Include yy-remap.h.  Don't redefine yy* identifiers.
7211
7212 2018-06-01  Tom Tromey  <tom@tromey.com>
7213
7214         * python/py-type.c (typy_legacy_template_argument): Update.
7215         * cp-support.h (cp_demangled_name_to_comp): Update.
7216         * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
7217         parameter to be a "std::string *".
7218         (main): Update.
7219
7220 2018-06-01  H.J. Lu  <hongjiu.lu@intel.com>
7221
7222         * ada-lex.l: Include "diagnostics.h" instead of
7223         "common/diagnostics.h".
7224         * unittests/environ-selftests.c: Likewise.
7225         * common/diagnostics.h: Moved to ../include.
7226
7227 2018-06-01  Joel Brobecker  <brobecker@adacore.com>
7228
7229         * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
7230         to language_mode_manual while calling breakpoint_re_set_one.
7231
7232 2018-06-01  Tom Tromey  <tom@tromey.com>
7233
7234         * valops.c (value_cast_structs, destructor_name_p): Update.
7235         * symtab.c (gdb_mangle_name): Update.
7236         * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
7237         Update.
7238         * p-valprint.c (pascal_object_is_vtbl_ptr_type)
7239         (pascal_object_print_value_fields, pascal_object_print_value):
7240         Update.
7241         * p-typeprint.c (pascal_type_print_derivation_info): Update.
7242         * linespec.c (find_methods): Update.
7243         * gdbtypes.h (type_name_no_tag): Remove.
7244         (type_name_or_error): Rename from type_name_no_tag_or_error.
7245         * gdbtypes.c (type_name_no_tag): Remove.
7246         (type_name_or_error): Rename from type_name_no_tag_or_error.
7247         (lookup_struct_elt_type, check_typedef): Update.
7248         * expprint.c (print_subexp_standard): Update.
7249         * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
7250         * d-namespace.c (d_lookup_nested_symbol): Update.
7251         * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
7252         (cp_print_class_member): Update.
7253         * cp-namespace.c (cp_lookup_nested_symbol): Update.
7254         * completer.c (add_struct_fields): Update.
7255         * c-typeprint.c (cp_type_print_derivation_info)
7256         (c_type_print_varspec_prefix, c_type_print_base_struct_union):
7257         Update.
7258         * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
7259         (ada_prefer_type, ada_is_exception_sym): Update.
7260
7261 2018-06-01  Tom Tromey  <tom@tromey.com>
7262
7263         * valops.c (enum_constant_from_type, value_namespace_elt)
7264         (value_maybe_namespace_elt): Update.
7265         * valarith.c (find_size_for_pointer_math): Update.
7266         * target-descriptions.c (make_gdb_type): Update.
7267         * symmisc.c (print_symbol): Update.
7268         * stabsread.c (define_symbol, read_type)
7269         (complain_about_struct_wipeout, add_undefined_type)
7270         (cleanup_undefined_types_1): Update.
7271         * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
7272         (rust_range_type_p, val_print_struct, rust_print_struct_def)
7273         (rust_internal_print_type, rust_composite_type)
7274         (rust_evaluate_funcall, rust_evaluate_subexp)
7275         (rust_inclusive_range_type_p): Update.
7276         * python/py-type.c (typy_get_tag): Update.
7277         * p-typeprint.c (pascal_type_print_base): Update.
7278         * mdebugread.c (parse_symbol, parse_type): Update.
7279         * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
7280         Update.
7281         * guile/scm-type.c (gdbscm_type_tag): Update.
7282         * go-lang.c (sixg_string_p): Update.
7283         * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
7284         Update.
7285         * gdbtypes.h (struct main_type) <tag_name>: Remove.
7286         (TYPE_TAG_NAME): Remove.
7287         * gdbtypes.c (type_name_no_tag): Simplify.
7288         (check_typedef, check_types_equal, recursive_dump_type)
7289         (copy_type_recursive, arch_composite_type): Update.
7290         * f-typeprint.c (f_type_print_base): Update.  Print "Type" prefix
7291         in summary mode when needed.
7292         * eval.c (evaluate_funcall): Update.
7293         * dwarf2read.c (fixup_go_packaging, read_structure_type)
7294         (process_structure_scope, read_enumeration_type)
7295         (read_namespace_type, read_module_type, determine_prefix): Update.
7296         * cp-support.c (inspect_type): Update.
7297         * coffread.c (process_coff_symbol, decode_base_type): Update.
7298         * c-varobj.c (c_is_path_expr_parent): Update.
7299         * c-typeprint.c (c_type_print_base_struct_union): Update.
7300         (c_type_print_base_1): Update.  Print struct/class/union/enum in
7301         summary when using C language.
7302         * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
7303         (gen_maybe_namespace_elt): Update.
7304         * ada-lang.c (ada_type_name): Simplify.
7305         (empty_record, ada_template_to_fixed_record_type_1)
7306         (template_to_static_fixed_type)
7307         (to_record_with_fixed_variant_part, ada_check_typedef): Update.
7308
7309 2018-06-01  Tom Tromey  <tom@tromey.com>
7310
7311         * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
7312         c_print_type.
7313         * c-typeprint.c (c_print_type_1): Add "language" parameter.
7314         (c_print_type): Update.
7315         (c_print_type): New overload.
7316         (c_type_print_varspec_prefix, c_type_print_args)
7317         (c_type_print_varspec_suffix, c_print_type_no_offsets)
7318         (c_type_print_base_struct_union, c_type_print_base_1)
7319         (cp_type_print_method_args): Add "language" parameter.
7320         (c_type_print_base): Update.
7321         * c-lang.h (c_print_type): Add new overload.
7322
7323 2018-06-01  Tom Tromey  <tom@tromey.com>
7324
7325         * typeprint.h (c_type_print_varspec_suffix): Don't declare.
7326         * c-typeprint.c (c_type_print_varspec_suffix): Now static.
7327
7328 2018-06-01  Alan Hayward  <alan.hayward@arm.com>
7329
7330         * aarch64-tdep.c (aarch64_sve_register_names): New const
7331         var.
7332         * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
7333         (AARCH64_SVE_Z_REGS_NUM): New define.
7334         (AARCH64_SVE_P_REGS_NUM): Likewise.
7335         (AARCH64_SVE_NUM_REGS): Likewise.
7336
7337 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
7338
7339         * nat/linux-ptrace.h [__alpha__]
7340         (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
7341         definitions.
7342
7343 2018-05-31  Maciej W. Rozycki  <macro@mips.com>
7344
7345         * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
7346         the endianness selected.
7347         * NEWS: Document `set endian auto' mode operation update.
7348
7349 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7350
7351         * Makefile.in: Add new header.
7352         * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
7353         (sve_vl_from_vg): Likewise.
7354         (sve_vq_from_vl): Likewise.
7355         (sve_vl_from_vq): Likewise.
7356         (sve_vq_from_vg): Likewise.
7357         (sve_vg_from_vq): Likewise.
7358         * configure.nat: Add new c file.
7359         * nat/aarch64-sve-linux-ptrace.c: New file.
7360         * nat/aarch64-sve-linux-ptrace.h: New file.
7361
7362 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
7363
7364         * aarch64-linux-nat.c (aarch64_linux_read_description):
7365         Add parmeter zero.
7366         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
7367         Likewise.
7368         * aarch64-tdep.c (tdesc_aarch64_list): Add.
7369         (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
7370         (aarch64_gdbarch_init): Add parmeter zero.
7371         * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
7372         * arch/aarch64.c (aarch64_create_target_description): Check VQ.
7373         * arch/aarch64.h (aarch64_create_target_description): Add VQ.
7374         parmeter.
7375         * doc/gdb.texinfo: Describe SVE feature
7376         * features/aarch64-sve.c: New file.
7377
7378 2018-05-31  Omair Javaid  <omair.javaid@linaro.org>
7379
7380         PR gdb/23210
7381         * gdbarch.sh (significant_addr_bit): Default to zero when
7382         not set by target architecture.
7383         * gdbarch.c: Re-generated.
7384         * utils.c (address_significant): Update.
7385
7386 2018-05-30  Joel Brobecker  <brobecker@adacore.com>
7387
7388         * stack.c (func_command): Remove trailing newline in call to error.
7389
7390 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7391
7392         * regcache.h (regcache_raw_collect): Remove, update callers to
7393         use regcache::raw_collect.
7394         * regcache.c (regcache_raw_collect): Remove.
7395
7396 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7397
7398         * regcache.h (regcache_raw_supply): Remove, update callers to
7399         use detached_regcache::raw_supply.
7400         * regcache.c (regcache_raw_supply): Remove.
7401
7402 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7403
7404         * regcache.h (regcache_cooked_write_part): Remove, update
7405         callers to use regcache::cooked_write_part.
7406         * regcache.c (regcache_cooked_write_part): Remove.
7407
7408 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7409
7410         * regcache.h (regcache_cooked_read_part): Remove, update callers
7411         to use readable_regcache::cooked_read_part.
7412         * regcache.c (regcache_cooked_read_part): Remove.
7413
7414 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7415
7416         * regcache.h (regcache_cooked_read_value): Remove, update
7417         callers to use readable_regcache::cooked_read_value.
7418         * regcache.c (regcache_cooked_read_value): Remove.
7419
7420 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7421
7422         * regcache.h (regcache_cooked_write): Remove, update callers to
7423         use regcache::cooked_write.
7424         * regcache.c (regcache_cooked_write): Remove.
7425
7426 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7427
7428         * regcache.h (regcache_invalidate): Remove, update callers to
7429         use detached_regcache::invalidate instead.
7430         * regcache.c (regcache_invalidate): Remove.
7431
7432 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7433
7434         * regcache.h (regcache_raw_write_part): Remove, update callers
7435         to use regcache::raw_write_part instead.
7436         * regcache.c (regcache_raw_write_part): Remove.
7437
7438 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7439
7440         * regcache.h (regcache_raw_read_part): Remove, update callers to
7441         use readable_regcache::raw_read_part instead.
7442         * regcache.c (regcache_raw_read_part): Remove.
7443
7444 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7445
7446         * regcache.h (regcache_cooked_read): Remove, update callers to
7447         use readable_regcache::cooked_read instead.
7448         * regcache.c (regcache_cooked_read): Remove.
7449
7450 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7451
7452         * regcache.h (regcache_raw_write): Remove, update callers to use
7453         regcache::raw_write instead.
7454         * regcache.c (regcache_raw_write): Remove.
7455
7456 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7457
7458         * regcache.h (regcache_raw_read): Remove, update callers to use
7459         readable_regcache::raw_read instead.
7460         * regcache.c (regcache_raw_read): Remove.
7461
7462 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7463
7464         * regcache.h (regcache_raw_update): Remove, update callers to
7465         use readable_regcache::raw_update instead.
7466         * regcache.c (regcache_raw_update): Remove.
7467
7468 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7469
7470         * regcache.h (regcache_register_status): Remove, update callers
7471         to use reg_buffer::get_register_status directly instead.
7472         * regcache.c (regcache_register_status): Remove.
7473
7474 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7475
7476         * regcache.h (regcache_get_ptid): Remove, update all callers to
7477         call regcache::ptid instead.
7478         * regcache.c (regcache_get_ptid): Remove.
7479
7480 2018-05-30  Simon Marchi  <simon.marchi@ericsson.com>
7481
7482         * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
7483
7484 2018-05-30  Pedro Alves  <palves@redhat.com>
7485
7486         * common/common-exceptions.h (exception_rethrow): Use
7487         ATTRIBUTE_NORETURN.
7488
7489 2018-05-29  Simon Marchi  <simon.marchi@polymtl.ca>
7490
7491         * breakpoint.c (print_solib_event, check_status_catch_solib):
7492         Remove struct keyword in range-based for loops.
7493         * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
7494         * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
7495         Likewise.
7496         * linespec.c (find_superclass_methods, search_minsyms_for_name):
7497         Likewise.
7498         * symfile.c (addr_info_make_relative): Likewise.
7499         * thread.c (value_in_thread_stack_temporaries): Likewise.
7500
7501 2018-06-12  Weimin Pan  <weimin.pan@oracle.com>
7502
7503         PR gdb/16841
7504         * valops.c (value_struct_elt_for_reference): Call check_typedef on
7505         aggregate type to get its real type before accessing it.
7506
7507 2018-05-29  Weimin Pan  <weimin.pan@oracle.com>
7508
7509         * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
7510         * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
7511         * coff-pe-read.c (add_pe_forwarded_sym): Replace
7512         lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
7513         * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
7514         * jit.c (jit_breakpoint_re_set_internal): Likewise.
7515         * printcmd.c (info_address_command): Likewise.
7516
7517 2018-05-29  Tom Tromey  <tom@tromey.com>
7518
7519         * windows-nat.c (handle_exception): Update fall-through comment.
7520
7521 2018-05-29  Tom Tromey  <tom@tromey.com>
7522
7523         * progspace.h (so_list_ptr): Remove typedef.  Don't declare VEC.
7524         (struct program_space) <added_solibs>: Now a std::vector.
7525         * breakpoint.c (print_solib_event): Update.
7526         (check_status_catch_solib): Update.
7527         * progspace.c (clear_program_space_solib_cache): Update.
7528         * solib.c (update_solib_list): Update.
7529
7530 2018-05-29  Tom Tromey  <tom@tromey.com>
7531
7532         * python/py-type.c (typy_richcompare): Update.
7533         * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
7534         * gdbtypes.h (types_deeply_equal): Return bool.
7535         (types_equal): Likewise.
7536         * gdbtypes.c (type_equality_entry_d): Remove typedef.  Don't
7537         declare VEC.
7538         (check_types_equal): Change worklist to std::vector.  Return
7539         bool.
7540         (struct type_equality_entry): Add constructor.
7541         (compare_maybe_null_strings): Return bool.
7542         (check_types_worklist): Return bool.  Change worklist to
7543         std::vector.
7544         (types_deeply_equal): Use std::vector.
7545         (types_equal): Return bool.
7546         (compare_maybe_null_strings): Simplify.
7547
7548 2018-05-29  Tom Tromey  <tom@tromey.com>
7549
7550         * record-btrace.c (tp_t): Remove typedef.  Don't declare VEC.
7551
7552 2018-05-29  Tom Tromey  <tom@tromey.com>
7553
7554         * objc-lang.h: Don't include cp-support.h.
7555         * common/gdb_vecs.h (const_char_ptr): Remove typedef.  Don't
7556         declare VEC.
7557
7558 2018-05-27  Tom Tromey  <tom@tromey.com>
7559
7560         * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
7561
7562 2018-05-25  Tom Tromey  <tom@tromey.com>
7563
7564         * value.c (value::location): Initialize.
7565
7566 2018-05-25  Tom Tromey  <tom@tromey.com>
7567
7568         * dbxread.c (init_bincl_list): Remove.
7569         (bincl_list): Now a std::vector.
7570         (bincls_allocated, next_bincl): Remove.
7571         (free_bincl_list, do_free_bincl_list_cleanup)
7572         (make_cleanup_free_bincl_list): Remove.
7573         (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
7574         unique_xmalloc_ptr.
7575         (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
7576         (struct header_file_location): Add constructor.
7577         (add_bincl_to_list): Remove.
7578
7579 2018-05-25  Tom Tromey  <tom@tromey.com>
7580
7581         * tui/tui.c (tui_enable): Update.
7582         * mi/mi-interp.c (mi_interp::init): Update.
7583         * interps.h (class interp) <name>: New method.
7584         <m_name>: Rename from name.
7585         (~scoped_restore_interp): Update.
7586         * interps.c (interp::interp): Update.
7587         (interp_add, interp_set, interp_lookup_existing)
7588         (current_interp_named_p): Update.
7589
7590 2018-05-25  Tom Tromey  <tom@tromey.com>
7591
7592         * interps.c (interp_name): Remove.
7593         * mi/mi-interp.c (mi_interp::init): Update.
7594         * interps.h (interp_name): Remove.
7595         (~scoped_restore_interp): Update.
7596         * tui/tui.c (tui_enable): Update.
7597
7598 2018-05-25  Tom Tromey  <tom@tromey.com>
7599
7600         * utils.c (fputs_maybe_filtered): Update.
7601         * linespec.c (decode_line_full): Update.
7602         * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
7603         (mi_print_breakpoint_for_event, mi_solib_loaded)
7604         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7605         (mi_user_selected_context_changed): Update.
7606         * mi/mi-main.c (mi_execute_command): Update.
7607         * cli/cli-script.c (execute_control_command): Update.
7608         * python/python.c (execute_gdb_command): Update.
7609         * solib.c (info_sharedlibrary_command): Update.
7610         * interps.c (interp_ui_out): Remove.
7611         * interps.h (interp_ui_out): Remove.
7612
7613 2018-05-25  Tom Tromey  <tom@tromey.com>
7614
7615         * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
7616         * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
7617         * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
7618
7619 2018-05-25  Tom Tromey  <tom@tromey.com>
7620
7621         * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
7622         * interps.c (interp_exec): Use scoped_restore.
7623
7624 2018-05-25  Tom Tromey  <tom@tromey.com>
7625
7626         * remote.c (remote_target::remote_file_get): Use
7627         gdb::byte_vector.
7628         (remote_target::remote_file_put): Likewise.
7629
7630 2018-05-25  Tom Tromey  <tom@tromey.com>
7631
7632         * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
7633         a std::string.
7634         (get_pe_section_index, add_pe_exported_sym): Update.
7635         (read_pe_exported_syms): Use gdb::def_vector.
7636
7637 2018-05-25  Tom Tromey  <tom@tromey.com>
7638
7639         * frame.c (remove_prev_frame): Remove.
7640         (get_prev_frame_if_no_cycle): Use TRY/CATCH.
7641
7642 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
7643
7644         * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
7645         Remove prototypes.
7646         * mips-linux-nat.c (supply_fpregset): Always call
7647         `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
7648         (fill_fpregset): Always call `mips64_fill_fpregset' rather than
7649         `mips_fill_fpregset'.
7650         * mips-linux-tdep.c (mips_supply_fpregset)
7651         (mips_supply_fpregset_wrapper, mips_fill_fpregset)
7652         (mips_fill_fpregset_wrapper): Remove functions.
7653         (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
7654         (mips_linux_fpregset): Remove variable.
7655         (mips_linux_iterate_over_regset_sections): Use
7656         `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
7657         (mips_linux_o32_sigframe_init): Remove comment.
7658
7659 2018-05-25  Pedro Alves  <palves@redhat.com>
7660
7661         * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
7662         (struct readahead_cache, struct packet_reg, struct
7663         remote_arch_state, class remote_state): Move higher up in the
7664         file.
7665         (remote_target::m_remote_state): Now an object instead of a pointer.
7666         (remote_target::get_remote_state): Adjust.
7667
7668 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7669
7670         * stack.c (select_and_print_frame): Delete.
7671         (struct function_bounds): Move struct within function.
7672         (func_command): Most content moved into new function
7673         find_frame_for_function, use new function, print result, add
7674         function comment.
7675         (find_frame_for_function): New function, now returns a result.
7676
7677 2018-05-24  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
7678
7679         * stack.c (iterate_over_block_arg_vars): Fix comment.
7680         (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
7681
7682 2018-05-24  Andrew Burgess  <andrew.burgess@embecosm.com>
7683
7684         PR gdb/23203
7685         * frame.c
7686         (scoped_restore_selected_frame::scoped_restore_selected_frame):
7687         Define.
7688         (scoped_restore_selected_frame::~scoped_restore_selected_frame):
7689         Define.
7690         * frame.h (class scoped_restore_selected_frame): New class.
7691         * stack.c (print_frame_local_vars): Remove catching and rethrowing
7692         of any exception, use scoped_restore_selected_frame to restore the
7693         frame instead.
7694
7695 2018-05-24  Pedro Alves  <palves@redhat.com>
7696
7697         * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
7698         override.
7699
7700 2018-05-23  Tom Tromey  <tom@tromey.com>
7701
7702         * complaints.c (struct complaints): Remove.
7703         (symfile_complaint_book): Remove.
7704         (series): New global.
7705         (complaint_internal): Update.
7706         (clear_complaints): Update.
7707
7708 2018-05-23  Tom Tromey  <tom@tromey.com>
7709
7710         * complaints.c (counters): New global.
7711         (struct complain): Remove.
7712         (struct complaints) <root>: Remove.
7713         (complaint_sentinel): Remove.
7714         (symfile_complaint_book): Update.
7715         (find_complaint) Remove.
7716         (complaint_internal, clear_complaints): Update.
7717
7718 2018-05-23  Tom Tromey  <tom@tromey.com>
7719
7720         * complaints.c (struct complain) <file, line>: Remove.
7721         (find_complaint): Remove file, line parameters.
7722         (complaint_internal): Update.
7723
7724 2018-05-23  Tom Tromey  <tom@tromey.com>
7725
7726         * complaints.c (vcomplaint): Remove.
7727         (complaint_internal) Merge in contents of vcomplaint.
7728
7729 2018-05-23  Tom Tromey  <tom@tromey.com>
7730
7731         * complaints.c (struct complaints) <explanation>: Remove.
7732         (symfile_explanations): Remove.
7733         (symfile_complaint_book): Update.
7734         (vcomplaint): Update.
7735         (struct explanation): Remove.
7736
7737 2018-05-23  Tom Tromey  <tom@tromey.com>
7738
7739         * complaints.c (symfile_complaints): Remove.
7740         (complaint_internal): Remove "complaints" parameter.
7741         (clear_complaints, vcomplaint): Remove "c" parameter.
7742         (get_complaints): Remove.
7743         * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
7744         (dwarf2_debug_line_missing_file_complaint)
7745         (dwarf2_debug_line_missing_end_sequence_complaint)
7746         (dwarf2_complex_location_expr_complaint)
7747         (dwarf2_const_value_length_mismatch_complaint)
7748         (dwarf2_section_buffer_overflow_complaint)
7749         (dwarf2_macro_malformed_definition_complaint)
7750         (dwarf2_invalid_attrib_class_complaint)
7751         (create_addrmap_from_index, dw2_symtab_iter_next)
7752         (dw2_expand_marked_cus)
7753         (dw2_debug_names_iterator::find_vec_in_debug_names)
7754         (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
7755         (create_debug_type_hash_table, init_cutu_and_read_dies)
7756         (partial_die_parent_scope, add_partial_enumeration)
7757         (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
7758         (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
7759         (read_import_statement, read_file_scope, create_dwo_cu_reader)
7760         (create_cus_hash_table, create_dwp_hash_table)
7761         (inherit_abstract_dies, read_func_scope, read_call_site_scope)
7762         (dwarf2_rnglists_process, dwarf2_ranges_process)
7763         (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
7764         (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
7765         (handle_struct_member_die, process_structure_scope)
7766         (read_array_type, read_common_block, read_module_type)
7767         (read_tag_pointer_type, read_typedef, read_base_type)
7768         (read_subrange_type, load_partial_dies, partial_die_info::read)
7769         (partial_die_info::read, partial_die_info::read)
7770         (partial_die_info::read, read_checked_initial_length_and_offset)
7771         (dwarf2_string_attr, read_formatted_entries)
7772         (dwarf_decode_line_header)
7773         (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
7774         (new_symbol, dwarf2_const_value_attr, lookup_die_type)
7775         (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
7776         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
7777         (get_signatured_type, get_DW_AT_signature_type)
7778         (decode_locdesc, file_file_name, consume_improper_spaces)
7779         (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
7780         (dwarf_decode_macro_bytes, dwarf_decode_macros)
7781         (dwarf2_symbol_mark_computed, set_die_type)
7782         (read_attribute_value): Update.
7783         * stap-probe.c (handle_stap_probe, get_stap_base_address):
7784         Update.
7785         * dbxread.c (unknown_symtype_complaint)
7786         (lbrac_mismatch_complaint, repeated_header_complaint)
7787         (set_namestring, function_outside_compilation_unit_complaint)
7788         (read_dbx_symtab, process_one_symbol): Update.
7789         * gdbtypes.c (stub_noname_complaint): Update.
7790         * windows-nat.c (handle_unload_dll): Update.
7791         * coffread.c (coff_symtab_read, enter_linenos, decode_type)
7792         (decode_base_type): Update.
7793         * xcoffread.c (bf_notfound_complaint, ef_complaint)
7794         (eb_complaint, record_include_begin, record_include_end)
7795         (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
7796         (process_xcoff_symbol, read_symbol)
7797         (function_outside_compilation_unit_complaint)
7798         (scan_xcoff_symtab): Update.
7799         * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
7800         * buildsym.c (finish_block_internal, make_blockvector)
7801         (end_symtab_get_static_block, augment_type_symtab): Update.
7802         * dtrace-probe.c (dtrace_process_dof)
7803         (dtrace_static_probe_ops::get_probes): Update.
7804         * complaints.h (struct complaint): Don't declare.
7805         (symfile_complaints): Remove.
7806         (complaint_internal): Remove "complaints" parameter.
7807         (complaint): Likewise.
7808         (clear_complaints): Likewise.
7809         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7810         (reread_symbols): Update.
7811         * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
7812         (dwarf2_frame_cache, decode_frame_entry): Update.
7813         * dwarf2loc.c (dwarf_reg_to_regnum): Update.
7814         * objc-lang.c (lookup_objc_class, lookup_child_selector)
7815         (info_selectors_command): Update.
7816         * macrotab.c (macro_include, check_for_redefinition)
7817         (macro_undef): Update.
7818         * objfiles.c (filter_overlapping_sections): Update.
7819         * stabsread.c (invalid_cpp_abbrev_complaint)
7820         (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
7821         (define_symbol, error_type, read_type, rs6000_builtin_type)
7822         (stabs_method_name_from_physname, read_member_functions)
7823         (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
7824         (attach_fields_to_type, complain_about_struct_wipeout)
7825         (read_range_type, read_args, common_block_start)
7826         (common_block_end, cleanup_undefined_types_1, scan_file_globals):
7827         Update.
7828         * mdebugread.c (index_complaint, unknown_ext_complaint)
7829         (basic_type_complaint, bad_tag_guess_complaint)
7830         (bad_rfd_entry_complaint, unexpected_type_code_complaint)
7831         (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
7832         (parse_procedure, parse_lines)
7833         (function_outside_compilation_unit_complaint)
7834         (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
7835         (bad_tag_guess_complaint, reg_value_complaint): Update.
7836         * cp-support.c (demangled_name_complaint): Update.
7837         * macroscope.c (sal_macro_scope): Update.
7838         * dwarf-index-write.c (class debug_names): Update.
7839
7840 2018-05-23  Tom Tromey  <tom@tromey.com>
7841
7842         * complaints.c (clear_complaints): Remove "noisy" parameter.
7843         * complaints.h (clear_complaints): Update.
7844         * symfile.c (syms_from_objfile_1, finish_new_objfile)
7845         (reread_symbols): Update.
7846
7847 2018-05-23  Tom Tromey  <tom@tromey.com>
7848
7849         * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
7850         SUBSEQUENT_MESSAGE.
7851         (vcomplaint, clear_complaints): Update.
7852         (symfile_explanations): Remove some messages.
7853
7854 2018-05-23  Tom Tromey  <tom@tromey.com>
7855
7856         * complaints.c (internal_complaint): Remove.
7857         * complaints.h (internal_complaint): Remove.
7858
7859 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
7860
7861         * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
7862
7863 2018-05-22  Pedro Alves  <palves@redhat.com>
7864
7865         * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
7866         (remote_fileio_badfd, remote_fileio_return_errno)
7867         (remote_fileio_return_success, remote_fileio_func_open)
7868         (remote_fileio_func_open, remote_fileio_func_close)
7869         (remote_fileio_func_read, remote_fileio_func_write)
7870         (remote_fileio_func_lseek, remote_fileio_func_rename)
7871         (remote_fileio_func_unlink, remote_fileio_func_stat)
7872         (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
7873         (remote_fileio_func_isatty, remote_fileio_func_system): Add
7874         remote_target parameter.
7875         (remote_fio_func_map) <func>: Add remote_target parameter.
7876         (do_remote_fileio_request, remote_fileio_request):
7877         * remote-fileio.h (remote_fileio_request):
7878         * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
7879         remote_target parameter.
7880         (remote_notif_process, handle_notification): Adjust to pass down
7881         the remote.
7882         (remote_notif_state_allocate): Add remote_target parameter.  Save
7883         it.
7884         * remote-notif.h (struct remote_target): Forward declare.
7885         (struct notif_client) <parse, ack, can_get_pending_events>: Add
7886         remote_target parameter.
7887         (struct remote_notif_state) <remote>: New field.
7888         (remote_notif_ack, remote_notif_parse): Add remote_target
7889         parameter.
7890         (remote_notif_state_allocate, remote_notif_state_allocate): Add
7891         remote_target parameter.
7892         * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
7893         (threads_listing_context, rmt_thread_action, protocol_feature)
7894         (packet_reg, stop_reply, stop_reply_p, enum packet_support)
7895         (packet_result, struct threads_listing_context, remote_state):
7896         Move definitions and declarations higher up.
7897         (remote_target) <~remote_target>: Declare.
7898         (remote_download_command_source, remote_file_put, remote_file_get)
7899         (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
7900         (remote_hostio_pread_vFile, remote_hostio_send_command)
7901         (remote_hostio_set_filesystem, remote_hostio_open)
7902         (remote_hostio_close, remote_hostio_unlink, remote_state)
7903         (get_remote_state, get_remote_packet_size, get_memory_packet_size)
7904         (get_memory_write_packet_size, get_memory_read_packet_size)
7905         (append_pending_thread_resumptions, remote_detach_1)
7906         (append_resumption, remote_resume_with_vcont)
7907         (add_current_inferior_and_thread, wait_ns, wait_as)
7908         (process_stop_reply, remote_notice_new_inferior)
7909         (process_initial_stop_replies, remote_add_thread)
7910         (btrace_sync_conf, remote_btrace_maybe_reopen)
7911         (remove_new_fork_children, kill_new_fork_children)
7912         (discard_pending_stop_replies, stop_reply_queue_length)
7913         (check_pending_events_prevent_wildcard_vcont)
7914         (discard_pending_stop_replies_in_queue, stop_reply)
7915         (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
7916         (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
7917         (remote_interrupt_as, remote_interrupt_ns)
7918         (remote_get_noisy_reply, remote_query_attached)
7919         (remote_add_inferior, remote_current_thread, get_current_thread)
7920         (set_thread, set_general_thread, set_continue_thread)
7921         (set_general_process, write_ptid)
7922         (remote_unpack_thread_info_response, remote_get_threadinfo)
7923         (parse_threadlist_response, remote_get_threadlist)
7924         (remote_threadlist_iterator, remote_get_threads_with_ql)
7925         (remote_get_threads_with_qxfer)
7926         (remote_get_threads_with_qthreadinfo, extended_remote_restart)
7927         (get_offsets, remote_check_symbols, remote_supported_packet)
7928         (remote_query_supported, remote_packet_size)
7929         (remote_serial_quit_handler, remote_detach_pid)
7930         (remote_vcont_probe, remote_resume_with_hc)
7931         (send_interrupt_sequence, interrupt_query)
7932         (remote_notif_get_pending_events, fetch_register_using_p)
7933         (send_g_packet, process_g_packet, fetch_registers_using_g)
7934         (store_register_using_P, store_registers_using_G)
7935         (set_remote_traceframe, check_binary_download)
7936         (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
7937         (remote_xfer_live_readonly_partial, remote_read_bytes)
7938         (remote_send_printf, remote_flash_write, readchar)
7939         (remote_serial_write, putpkt, putpkt_binary, skip_frame)
7940         (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
7941         (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
7942         (extended_remote_disable_randomization, extended_remote_run)
7943         (send_environment_packet, extended_remote_environment_support)
7944         (extended_remote_set_inferior_cwd, remote_write_qxfer)
7945         (remote_read_qxfer, push_stop_reply, vcont_r_supported)
7946         (packet_command): Now methods of ...
7947         (remote_target): ... this class.
7948         (m_remote_state) <remote_target>: New field.
7949         (struct remote_state) <stop_reply_queue,
7950         remote_async_inferior_event_token, wait_forever_enabled_p>: New
7951         fields.
7952         (remote_state::remote_state): Allocate stop_reply_queue.
7953         (remote_state): Delete global.
7954         (get_remote_state_raw): Delete.
7955         (remote_target::get_remote_state): Allocate m_remote_state on
7956         demand.
7957         (get_current_remote_target): New.
7958         (remote_ops, extended_remote_ops): Delete.
7959         (wait_forever_enabled_p, remote_async_inferior_event_token):
7960         Delete, moved to struct remote_state.
7961         (remote_target::close): Delete self.  Destruction bits split to
7962         ...
7963         (remote_target::~remote_target): ... this.
7964         (show_memory_packet_size): Adjust to use
7965         get_current_remote_target.
7966         (struct protocol_feature) <func>: Add remote_target parameter.
7967         All callers adjusted.
7968         (curr_quit_handler_target): New.
7969         (remote_serial_quit_handler): Reimplement.
7970         (remote_target::open_1): Adjust to use get_current_remote_target.
7971         Heap-allocate remote_target/extended_remote_target instances.
7972         (vcont_builder::vcont_builder): Add remote_target parameter, and
7973         save it in m_remote.  All callers adjusted.
7974         (vcont_builder::m_remote): New field.
7975         (vcont_builder::restart, vcont_builder::flush)
7976         (vcont_builder::push_action): Use it.
7977         (remote_target::commit_resume): Use it.
7978         (struct queue_iter_param) <remote>: New field.
7979         (remote_target::remove_new_fork_children): Fill in 'remote' field.
7980         (check_pending_event_prevents_wildcard_vcont_callback_data): New.
7981         (check_pending_event_prevents_wildcard_vcont_callback)
7982         (remote_target::check_pending_events_prevent_wildcard_vcont)
7983         (remote_target::discard_pending_stop_replies)
7984         (remote_target::discard_pending_stop_replies_in_queue)
7985         (remote_target::remote_notif_remove_queued_reply): Fill in
7986         'remote' field.
7987         (remote_notif_get_pending_events): New.
7988         (remote_target::readchar, remote_target::remote_serial_write):
7989         Save/restore curr_quit_handler_target.
7990         (putpkt): New.
7991         (kill_new_fork_children): Fill in 'remote' field.
7992         (packet_command): Use get_current_remote_target, defer to
7993         remote_target method of same name.
7994         (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
7995         parameter, and save it in m_remote.  All callers adjusted.
7996         (scoped_remote_fd::release): Use m_remote.
7997         (scoped_remote_fd::m_remote): New field.
7998         (remote_file_put, remote_file_get, remote_file_delete): Use
7999         get_current_remote_target, defer to remote_target method of same
8000         name.
8001         (remote_btrace_reset): Add remote_state paremeter.  Update all
8002         callers.
8003         (remote_async_inferior_event_handler). Pass down 'data'.
8004         (remote_new_objfile): Use get_current_remote_target.
8005         (remote_target::vcont_r_supported): New.
8006         (set_range_stepping): Use get_current_remote_target and
8007         remote_target::vcont_r_supported.
8008         (_initialize_remote): Don't allocate 'remote_state' and
8009         'stop_reply_queue' globals.
8010         * remote.h (struct remote_target): Forward declare.
8011         (getpkt, putpkt, remote_notif_get_pending_events): Add
8012         'remote_target' parameter.
8013
8014 2018-05-22  Pedro Alves  <palves@redhat.com>
8015
8016         * remote.c (vcont_builder): Now a class.  Make all data members
8017         private.
8018         (vcont_builder) <vcont_builder, restart, flush, push_action>:
8019         Declare methods.
8020         (vcont_builder_restart): Rename to ...
8021         (vcont_builder::restart): ... this.
8022         (vcont_builder_flush): Rename to ...
8023         (vcont_builder::flush): ... this.
8024         (vcont_builder_push_action): Rename to ...
8025         (vcont_builder::push_action): ... this.
8026         (remote_target::commit_resume): Adjust.
8027
8028 2018-05-22  Pedro Alves  <palves@redhat.com>
8029
8030         * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
8031         (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
8032         (get_fixed_memory_packet_size): New.
8033         (get_memory_packet_size): Use it.
8034         (set_memory_packet_size): Don't override the config size with
8035         DEFAULT_MAX_MEMORY_PACKET_SIZE.
8036         (show_memory_packet_size): Use get_fixed_memory_packet_size.
8037         Don't refer to get_memory_packet_size if not connected to a remote
8038         target.  Show "(default)" if configured size is 0.
8039
8040 2018-05-22  Pedro Alves  <palves@redhat.com>
8041
8042         * remote.c (remote_target::mourn_inferior): Move
8043         discard_pending_stop_replies call here from ...
8044         (_initialize_remote): ... here.
8045
8046 2018-05-22  Pedro Alves  <palves@redhat.com>
8047
8048         * remote.c (compare_section_command): Remove set_general_process
8049         call.
8050
8051 2018-05-22  Pedro Alves  <palves@redhat.com>
8052
8053         * remote.c (struct packet_reg, struct remote_arch_state):
8054         Move higher up in the file.
8055         (remote_state) <m_arch_states>: Store remote_arch_state values
8056         instead of remote_arch_state pointers.
8057         (remote_state::get_remote_arch_state): Adjust.
8058
8059 2018-05-22  Pedro Alves  <palves@redhat.com>
8060
8061         * remote.c: Include <unordered_map>.
8062         (remote_state): Now a class.
8063         (remote_state) <get_remote_arch_state>: Declare method.
8064         <get_remote_arch_state>: New field.
8065         (remote_arch_state) <remote_arch_state>: Declare ctor.
8066         <regs>: Now a unique_ptr.
8067         (remote_gdbarch_data_handle): Delete.
8068         (get_remote_arch_state): Delete.
8069         (remote_state::get_remote_arch_state): New.
8070         (get_remote_state): Adjust to call remote_state's
8071         get_remote_arch_state method.
8072         (init_remote_state): Delete, bits factored out to ...
8073         (remote_arch_state::remote_arch_state): ... this new method.
8074         (get_remote_packet_size, get_memory_packet_size)
8075         (process_g_packet, remote_target::fetch_registers)
8076         (remote_target::prepare_to_store, store_registers_using_G)
8077         (remote_target::store_registers, remote_target::get_trace_status):
8078         Adjust to call remote_state's method.
8079         (_initialize_remote): Remove reference to
8080         remote_gdbarch_data_handle.
8081
8082 2018-05-22  Pedro Alves  <palves@redhat.com>
8083
8084         * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
8085         pread>: New method declarations.
8086         (remote_target::open_1): Adjust.
8087         (readahead_cache_invalidate): Rename to ...
8088         (readahead_cache::invalidate): ... this, and adjust to be a class
8089         method.
8090         (readahead_cache_invalidate_fd): Rename to ...
8091         (readahead_cache::invalidate_fd): ... this, and adjust to be a
8092         class method.
8093         (remote_hostio_pwrite): Adjust.
8094         (remote_hostio_pread_from_cache): Rename to ...
8095         (readahead_cache::pread): ... this, and adjust to be a class
8096         method.
8097         (remote_hostio_close): Adjust.
8098
8099 2018-05-22  Pedro Alves  <palves@redhat.com>
8100
8101         * remote.c (remote_hostio_close_cleanup): Delete.
8102         (class scoped_remote_fd): New.
8103         (remote_file_put, remote_file_get): Use it.
8104
8105 2018-05-22  Pedro Alves  <palves@redhat.com>
8106
8107         (struct vCont_action_support): Use bool and initialize all fields.
8108         (struct readahead_cache): Initialize all fields.
8109         (remote_state): Use bool and initialize all fields.
8110         (remote_state::remote_state, remote_state::~remote_state): New.
8111         (new_remote_state): Delete.
8112         (_initialize_remote): Use new to allocate remote_state.
8113
8114 2018-05-22  Pedro Alves  <palves@redhat.com>
8115             張俊芝  <zjz@zjz.name>
8116
8117         PR gdb/22973
8118         * c-exp.y: Include "c-support.h".
8119         (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
8120         of tolower.  Use c_ident_is_alpha to scan names.
8121         * c-lang.c: Include "c-support.h".
8122         (convert_ucn, convert_octal, convert_hex, convert_escape): Use
8123         ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
8124         * c-support.h: New file, with bits factored out from ...
8125         * cp-name-parser.y: ... this file.
8126         Include "c-support.h".
8127         (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
8128         c-support.h and renamed.
8129         (symbol_end, yylex): Adjust.
8130
8131 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8132
8133         * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
8134         parameter type to CORE_ADDR.
8135         * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
8136         parameter type in declaration to CORE_ADDR.
8137         * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
8138         target_auxv_search to get AT_HWCAP and use the result to get the
8139         target description.
8140         * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
8141         to CORE_ADDR. Remove the cast of the return value to unsigned
8142         long. Fix error predicate of target_auxv_search.
8143         (ppc_linux_nat_target::read_description): Change the type of the
8144         hwcap variable to CORE_ADDR.
8145
8146 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8147
8148         * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
8149         if the size of fpscr is larger than 32 bits.
8150
8151 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8152
8153         * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
8154         (ppc32_linux_vsxregmap): New global.
8155         (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
8156         regcache_supply_regset, and regcache_collect_regset.
8157         * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
8158         * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
8159         (fetch_vsx_register, store_vsx_register): Remove.
8160         (fetch_vsx_registers): Add regno parameter. Get regset using
8161         ppc_linux_vsxregset. Use regset to supply registers.
8162         (store_vsx_registers): Add regno parameter. Get regset using
8163         ppc_linux_vsxregset. Use regset to collect registers.
8164         (fetch_register): Call fetch_vsx_registers instead of
8165         fetch_vsx_register.
8166         (store_register): Call store_vsx_registers instead of
8167         store_vsx_register.
8168         (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
8169         new regno parameter.
8170         (store_ppc_registers): Call store_vsx_registers with -1 for the
8171         new regno parameter.
8172         * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
8173         (ppc_collect_vsxregset): Remove.
8174
8175 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8176
8177         * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
8178         offset fields.
8179         * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
8180         for vector register offset fields.
8181         (ppc64_fbsd_reg_offsets): Likewise.
8182         * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8183         to vector register offset fields.
8184         * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
8185         to vector register offset fields.
8186         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
8187         vector register offset fields.
8188         * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
8189         initializers for vector register offset fields.
8190         (rs6000_aix64_reg_offsets): Likewise.
8191         * rs6000-tdep.c (ppc_vrreg_offset): Remove.
8192         (ppc_supply_vrregset): Remove.
8193         (ppc_collect_vrregset): Remove.
8194         * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
8195         (ppc_linux_vrregset) : New function.
8196         (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
8197         (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
8198         (ppc32_linux_vrregset): Remove.
8199         (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
8200         and use result instead of ppc32_linux_vrregset.
8201         (ppc32_linux_reg_offsets): Remove initializers for vector register
8202         offset fields.
8203         (ppc64_linux_reg_offsets): Likewise.
8204         * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
8205         * ppc-linux-nat.c: Include regset.h.
8206         (gdb_vrregset_t): Adjust comment to account for little-endian
8207         mode.
8208         (supply_vrregset, fill_vrregset): Remove.
8209         (fetch_altivec_register, store_altivec_register): Remove.
8210         (fetch_altivec_registers): Add regno parameter. Get regset using
8211         ppc_linux_vrregset. Use regset to supply registers.
8212         (store_altivec_registers): Add regno parameter. Get regset using
8213         ppc_linux_vrregset. Use regset to collect registers.
8214         (fetch_register): Call fetch_altivec_registers instead of
8215         fetch_altivec_register.
8216         (store_register): Call store_altivec_registers instead of
8217         store_altivec_register.
8218         (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
8219         the new regno parameter.
8220         (store_ppc_registers): Call store_altivec_registers with -1 for
8221         the new regno parameter.
8222
8223 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8224
8225         * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
8226         (PPC_LINUX_SIZEOF_VSXREGSET): Define.
8227         * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
8228         (gdb_vrregset_t): Change array type size to
8229         PPC_LINUX_SIZEOF_VRREGSET.
8230         (gdb_vsxregset_t): Change array type size to
8231         PPC_LINUX_SIZEOF_VSXREGSET.
8232         * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
8233         Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
8234         PPC_LINUX_SIZEOF_VSXREGSET.
8235
8236 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8237
8238         * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
8239         * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
8240         nat/ppc-linux.c.
8241         (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
8242         ppc_linux_target_wordsize with tid.
8243         (ppc_linux_nat_target::read_description): Call ppc_linux_target
8244         wordsize with tid.
8245         * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
8246         (ppc64_64bit_inferior_p): Add static and inline specifiers.
8247         (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
8248         tid parameter. Remove static specifier.
8249         * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
8250         (ppc_linux_target_wordsize): New declaration.
8251
8252 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
8253
8254         * arch/ppc-linux-common.c: New file.
8255         * arch/ppc-linux-common.h: New file.
8256         * arch/ppc-linux-tdesc.h: New file.
8257         * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
8258         * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
8259         (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
8260         arch/ppc-linux-tdesc.h.
8261         * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
8262         arch/ppc-linux-tdesc.h.
8263         (ppc_linux_nat_target::read_description): Remove target
8264         description matching code. Fill a ppc_linux_features struct and
8265         call ppc_linux_match_description with it. Move comment about ISA
8266         2.05 to ppc-linux-common.c.
8267         * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
8268         arch/ppc-linux-tdesc.h.
8269         (ppc_linux_core_read_description): Remove target description
8270         matching code. Fill a ppc_linux_features struct and call
8271         ppc_linux_match_description with it.
8272         * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
8273         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
8274         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
8275         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
8276         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
8277         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
8278         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
8279         (tdesc_powerpc_e500l): Remove.
8280
8281 2018-05-22  Joel Brobecker  <brobecker@adacore.com>
8282
8283         * ada-lang.c (catch_assert_command): Pass empty string instead
8284         of NULL for excep_string argument.
8285
8286 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
8287
8288         * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
8289         the width of the requested register exceeds the width of the
8290         `ptrace' data type.
8291
8292 2018-05-21  Tom Tromey  <tom@tromey.com>
8293
8294         * printcmd.c (output_command): Remove.
8295         (output_command_const): Rename to output_command.
8296         * valprint.h (output_command): Rename from output_command_const.
8297         * tracepoint.c (trace_dump_actions): Call output_command.
8298
8299 2018-05-21  Tom Tromey  <tom@tromey.com>
8300
8301         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
8302         (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
8303         * ada-lang.h (create_ada_exception_catchpoint): Update.
8304         * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
8305         std::string.
8306         (create_excep_cond_exprs, ~ada_catchpoint)
8307         (should_stop_exception, print_one_exception)
8308         (print_mention_exception, print_recreate_exception): Update.
8309         (ada_get_next_arg): Remove.
8310         (catch_ada_exception_command_split): Use std::string.  Change type
8311         of "excep_string", "cond_string".
8312         (catch_ada_exception_command): Update.
8313         (create_ada_exception_catchpoint): Change type of excep_string.
8314         (ada_exception_sal): Remove excep_string parameter.
8315         (~ada_catchpoint): Remove.
8316
8317 2018-05-21  Tom Tromey  <tom@tromey.com>
8318
8319         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
8320         cleanup.
8321
8322 2018-05-21  Tom Tromey  <tom@tromey.com>
8323
8324         * ada-lang.c (ada_exception_message_1, ada_exception_message):
8325         Return unique_xmalloc_ptr.
8326         (print_it_exception): Update.
8327
8328 2018-05-21  Tom Tromey  <tom@tromey.com>
8329
8330         * tracepoint.c (trace_dump_actions): Use std::string.
8331
8332 2018-05-21  Tom Tromey  <tom@tromey.com>
8333
8334         * symfile.c (reread_symbols): Use std::string for original_name.
8335
8336 2018-05-21  Tom Tromey  <tom@tromey.com>
8337
8338         * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
8339         (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN.  Default
8340         constructor.
8341
8342 2018-05-20  Simon Marchi  <simon.marchi@polymtl.ca>
8343
8344         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
8345         instance to...
8346         (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
8347         * objfiles.c (get_objfile_bfd_data): Allocate
8348         objfile_per_bfd_storage with obstack_new when allocating on
8349         obstack.
8350
8351 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8352
8353         * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
8354         OBSTACK_ZALLOC.
8355         * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
8356         * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
8357         * mdebugread.c (mdebug_build_psymtabs): Likewise.
8358         (add_pending): Likewise.
8359         (parse_symbol): Likewise.
8360         (parse_partial_symbols): Likewise.
8361         (psymtab_to_symtab_1): Likewise.
8362         (new_psymtab): Likewise.
8363         (elfmdebug_build_psymtabs): Likewise.
8364         * minsyms.c (terminate_minimal_symbol_table): Likewise.
8365         * objfiles.c (get_objfile_bfd_data): Likewise.
8366         (objfile_register_static_link): Likewise.
8367         * psymtab.c (allocate_psymtab): Likewise.
8368         * stabsread.c (read_member_functions): Likewise.
8369         * xcoffread.c (xcoff_end_psymtab): Likewise.
8370
8371 2018-05-20  Simon Marchi  <simon.marchi@ericsson.com>
8372
8373         * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
8374         compiler supports std::is_trivially_constructible.
8375         * common/poison.h: Include obstack.h.
8376         (IsMallocable): Define to is_trivially_constructible if the
8377         compiler supports it, define to true_type otherwise.
8378         (xobnew): New.
8379         (XOBNEW): Redefine.
8380         (xobnewvec): New.
8381         (XOBNEWVEC): Redefine.
8382         * gdb_obstack.h (obstack_zalloc): New.
8383         (OBSTACK_ZALLOC): Redefine.
8384         (obstack_calloc): New.
8385         (OBSTACK_CALLOC): Redefine.
8386         (obstack_new): New.
8387         * gdbarch.sh: Include gdb_obstack in gdbarch.h.
8388         (gdbarch_obstack): New declaration in gdbarch.h, definition in
8389         gdbarch.c.
8390         (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
8391         obstack_calloc/obstack_zalloc.
8392         (gdbarch_obstack_zalloc): Remove.
8393         * target-descriptions.c (tdesc_data_init): Use obstack_new.
8394
8395 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8396
8397         * stack.c (backtrace_command_1): Remove useless variable int i.
8398
8399 2018-05-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8400
8401         * stack.c (print_frame_info): Fix comment.
8402
8403 2018-05-18  Tom Tromey  <tom@tromey.com>
8404
8405         * dwarf2read.c (struct dwz_file): Add constructor, initializers.
8406         <dwz_bfd>: Now a gdb_bfd_ref_ptr.
8407         (~dwarf2_per_objfile): Update
8408         (dwarf2_get_dwz_file): Use new.
8409         * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
8410         unique_ptr.
8411
8412 2018-05-18  Tom Tromey  <tom@tromey.com>
8413
8414         * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
8415         unique_ptr.
8416         * dwarf2read.c (struct dwp_file): Add constructor and
8417         initializers.
8418         (open_and_init_dwp_file): Return a unique_ptr.
8419         (dwarf2_per_objfile, create_dwp_hash_table)
8420         (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
8421         (lookup_dwo_unit_in_dwp): Update.
8422         (open_and_init_dwp_file, get_dwp_file): Update.
8423
8424 2018-05-18  Tom Tromey  <tom@tromey.com>
8425
8426         * dwarf2read.c (dwarf2_per_objfile): Update.
8427         (struct mapped_index): Add initializers.
8428         (dwarf2_read_index): Use new.
8429         (dw2_symtab_iter_init): Update.
8430         * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
8431         unique_ptr.
8432
8433 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8434
8435         * dwarf2read.c (mapped_index) <total_size>: Remove.
8436
8437 2018-05-18  Simon Marchi  <simon.marchi@ericsson.com>
8438
8439         * unittests/format_pieces-selftests.c (test_format_specifier):
8440         Add ARI comments.
8441
8442 2018-05-18  Tom Tromey  <tom@tromey.com>
8443
8444         * c-typeprint.c (maybe_print_hole): New function.
8445         (c_print_type_struct_field_offset): Update.
8446         (c_type_print_base_struct_union): Call maybe_print_hole.
8447
8448 2018-05-17  Keith Seitz  <keiths@redhat.com>
8449
8450         * breakpoint.c (build_bpstat_chain): New function, moved from
8451         bpstat_stop_status.
8452         (bpstat_stop_status): Add optional parameter, `stop_chain'.
8453         If no stop chain is passed, call build_bpstat_chain to build it.
8454         * breakpoint.h (build_bpstat_chain): Declare.
8455         (bpstat_stop_status): Move documentation here from breakpoint.c.
8456         * infrun.c (handle_signal_stop): Before eliding inlined frames,
8457         build the stop chain and pass it to skip_inline_frames.
8458         Pass this stop chain to bpstat_stop_status.
8459         * inline-frame.c: Include breakpoint.h.
8460         (stopped_by_user_bp_inline_frame): New function.
8461         (skip_inline_frames): Add parameter `stop_chain'.
8462         Move documention to inline-frame.h.
8463         If non-NULL, use stopped_by_user_bp_inline_frame to determine
8464         whether the frame should be elided.
8465         * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
8466         Add moved documentation and update for new parameter.
8467
8468 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8469
8470         PR cli/14975
8471         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8472         unittests/format_pieces-selftests.c.
8473         * common/format.h (format_piece) <operator==>: New.
8474         (format_pieces) <operator[]>: Remove.
8475         * common/format.c (format_pieces::format_pieces): Handle \e.
8476         * unittests/format_pieces-selftests.c: New.
8477
8478 2018-05-17  Tom Tromey  <tom@tromey.com>
8479
8480         PR symtab/23010:
8481         * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
8482         (dw2_instantiate_symtab): Add skip_partial parameter.
8483         (dw2_find_last_source_symtab, dw2_map_expand_apply)
8484         (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
8485         (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
8486         (dw2_expand_symtabs_matching_one)
8487         (dw2_find_pc_sect_compunit_symtab)
8488         (dw2_debug_names_lookup_symbol)
8489         (dw2_debug_names_expand_symtabs_for_function): Update.
8490         (init_cutu_and_read_dies): Add skip_partial parameter.
8491         (process_psymtab_comp_unit, build_type_psymtabs_1)
8492         (process_skeletonless_type_unit, load_partial_comp_unit)
8493         (psymtab_to_symtab_1): Update.
8494         (load_full_comp_unit): Add skip_partial parameter.
8495         (process_imported_unit_die, dwarf2_read_addr_index)
8496         (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
8497         (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
8498         (read_signatured_type): Update.
8499
8500 2018-05-17  Simon Marchi  <simon.marchi@ericsson.com>
8501
8502         * value.c (release_value): Remove unused variable.
8503         (record_latest_value): Likewise.
8504         (access_value_history): Likewise.
8505         (preserve_values): Likewise.
8506
8507 2018-05-17  Tom Tromey  <tom@tromey.com>
8508
8509         * extension.h (struct ext_lang_type_printers) <py_type_printers>:
8510         Initialize.
8511
8512 2018-05-16  Maciej W. Rozycki  <macro@mips.com>
8513
8514         PR gdb/22286
8515         * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
8516         Also handle registers whose width is not a multiple of
8517         PTRACE_TYPE_RET.
8518         (linux_nat_trad_target::store_register): Likewise.
8519
8520 2018-05-16  Tom Tromey  <tom@tromey.com>
8521
8522         * gdbcore.h (core_bfd): Redefine.
8523         * corelow.c (core_target::close): Update.
8524         (core_target_open): Update.
8525         * progspace.h (struct program_space) <cbfd>: Now a
8526         gdb_bfd_ref_ptr.
8527
8528 2018-05-16  Tom Tromey  <tom@tromey.com>
8529
8530         PR cli/19551:
8531         * symfile-add-flags.h (enum symfile_add_flags)
8532         <SYMFILE_NOT_FILENAME>: New constant.
8533         * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME.  Get
8534         objfile name from BFD.
8535         (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
8536         * minidebug.c (find_separate_debug_file_in_section): Put
8537         ".gnu_debugdata" into BFD's file name.
8538
8539 2018-05-16  Simon Marchi  <simon.marchi@ericsson.com>
8540
8541         * regcache.c (regcache_read_ftype, regcache_write_ftype):
8542         Remove.
8543
8544 2018-05-15  Tamar Christina  <tamar.christina@arm.com>
8545
8546         PR binutils/21446
8547         * aarch64-tdep.c (aarch64_analyze_prologue,
8548         aarch64_software_single_step, aarch64_displaced_step_copy_insn):
8549         Indicate not interested in errors.
8550
8551 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8552
8553         * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
8554         Supply the MIPS_ZERO_REGNUM register.
8555
8556 2018-05-15  Maciej W. Rozycki  <macro@mips.com>
8557
8558         * mips-tdep.c (mask_address_var): Make variable static.
8559
8560 2018-05-14  Tom Tromey  <tom@tromey.com>
8561
8562         * dwarf2read.c (rust_union_quirks): Clear rust_unions.
8563
8564 2018-05-11  Andrew Burgess  <andrew.burgess@embecosm.com>
8565
8566         * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
8567         FXSAVE_ADDR for the mxcsr register.
8568
8569 2018-05-11  Max Filippov  <jcmvbkbc@gmail.com>
8570
8571         * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
8572
8573 2018-05-11  Pedro Alves  <palves@redhat.com>
8574
8575         * corelow.c (core_target) <core_target>: No longer inline.
8576         Initialize m_core_gdbarch, m_core_vec and build the section table
8577         here.
8578         <~core_target>: New.
8579         <core_gdbarch, get_core_register_section>: New methods.
8580         <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
8581         factored out from ...
8582         <core_data, core_vec, core_gdbarch>: ... these deleted globals.
8583         (core_ops): Delete.
8584         (sniff_core_bfd): Add gdbarch parameter.
8585         (core_close): Delete, merged into ...
8586         (core_target::close): ... here.  Delete self.
8587         (core_close_cleanup): Delete.
8588         (core_target_open): Allocate a core_target on the heap.  Use a
8589         unique_ptr instead of a cleanup.  Bits moved into the core_target
8590         ctor.  Adjust to use core_target methods instead of globals.
8591         (get_core_register_section): Rename to ...
8592         (core_target::get_core_register_section): ... this and adjust.
8593         (struct get_core_registers_cb_data): New.
8594         (get_core_registers_cb): Use it.  Use bool.
8595         (core_target::fetch_registers, core_target::files_info)
8596         (core_target::xfer_partial, core_target::read_description)
8597         (core_target::pid_to, core_target::thread_name): Adjust to
8598         reference class fields instead of globals.
8599         * target.h (struct target_ops_deleter, target_ops_up): New.
8600
8601 2018-05-11  Pedro Alves  <palves@redhat.com>
8602
8603         * corefile.c (core_file_command): Move to corelow.c.
8604         * corelow.c (the_core_target): Delete.
8605         (core_file_command): Moved from corefile.c.  Check exec_bfd
8606         instead of the_core_target.  Use target_detach instead of calling
8607         into the_core_target directly.
8608         (maybe_say_no_core_file_now): New.
8609         (core_target::detach): Use it.
8610         (_initialize_corelow): Remove references to the_core_target.
8611         * gdbcore.h (the_core_target): Delete.
8612
8613 2018-05-11  Tom Tromey  <tromey@redhat.com>
8614             Pedro Alves  <palves@redhat.com>
8615
8616         * corefile.c (core_bfd): Remove.
8617         * gdbcore.h (core_bfd): Now a macro.
8618         * progspace.h (struct program_space) <cbfd>: New field.
8619
8620 2018-05-11  Tom Tromey  <tom@tromey.com>
8621
8622         * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
8623         gdb::def_vector.
8624
8625 2018-05-10  Tom Tromey  <tom@tromey.com>
8626
8627         * configure: Rebuild.
8628         * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
8629
8630 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
8631
8632         PR server/23158:
8633         * regformats/regdat.sh: Adjust script, following the addition
8634         of the new expedite_regs parameter to init_target_desc.
8635
8636 2018-05-10  Omair Javaid  <omair.javaid@linaro.org>
8637     
8638         PR gdb/23127
8639         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
8640         set_gdbarch_significant_addr_bit.
8641         * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
8642         set_gdbarch_significant_addr_bit.
8643         * utils.c (address_significant): Update to sign extend addr.
8644
8645 2018-05-09  Max Filippov  <jcmvbkbc@gmail.com>
8646
8647         * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
8648         (xtensa_linux_init_abi): Limit tdep->num_regs by
8649         tdep->num_nopriv_regs.
8650         * xtensa-tdep.c (xtensa_derive_tdep): Calculate
8651         tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
8652         not initialized.
8653
8654 2018-05-08  Simon Marchi  <simon.marchi@ericsson.com>
8655
8656         * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
8657
8658 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
8659
8660         * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
8661         (I387_MXCSR_INIT_VAL): New constant.
8662         * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
8663         buffer if it was supplied by the inferior.
8664         * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
8665         (i387_xsave_get_clear_bv): New function.
8666         (i387_supply_xsave): Only read x87 control registers from the
8667         xsave buffer if the feature is enabled, and the state will have
8668         been written, otherwise, provide a suitable default.
8669         (i387_collect_xsave): Pre-clear all registers in xsave buffer,
8670         including x87 control registers.  Update control registers if they
8671         have changed from the default value, and mark features as enabled
8672         as required.
8673         * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
8674
8675 2018-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
8676
8677         * spu-tdep.c (info_spu_event_command): Fix output formatting.
8678
8679 2018-05-07  Tom Tromey  <tom@tromey.com>
8680
8681         * configure: Rebuild.
8682         * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
8683
8684 2018-05-07  Tom Tromey  <tom@tromey.com>
8685
8686         PR tdep/20362:
8687         * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
8688         bit.  Use correct value for VDIV.
8689
8690 2018-05-04  Tom Tromey  <tom@tromey.com>
8691
8692         * configure: Rebuild.
8693         * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
8694
8695 2018-05-04  Tom Tromey  <tom@tromey.com>
8696
8697         * linux-record.c (record_linux_system_call) <case
8698         RECORD_SYS_RECVFROM>: Add "break".
8699
8700 2018-05-04  Tom Tromey  <tom@tromey.com>
8701
8702         * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
8703         Add missing "break".
8704         * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
8705         Add missing "break".
8706
8707 2018-05-04  Tom Tromey  <tom@tromey.com>
8708
8709         * rs6000-tdep.c (ppc_process_record_op4)
8710         (ppc_process_record_op63): Add fall-through comment.
8711
8712 2018-05-04  Tom Tromey  <tom@tromey.com>
8713
8714         * i386-tdep.c (i386_process_record): Add fall-through comment.
8715
8716 2018-05-04  Tom Tromey  <tom@tromey.com>
8717
8718         * stabsread.c (define_symbol) <case 'p'>: Add fall-through
8719         comment.
8720
8721 2018-05-04  Tom Tromey  <tom@tromey.com>
8722
8723         * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
8724         * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
8725         * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
8726         comment.
8727         * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
8728         comment.
8729         * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
8730         comment.
8731
8732 2018-05-04  Tom Tromey  <tom@tromey.com>
8733
8734         * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
8735
8736 2018-05-04  Tom Tromey  <tom@tromey.com>
8737
8738         * s390-tdep.c (s390_process_record): Fix fall-through comments.
8739         * xcoffread.c (scan_xcoff_symtab): Move comment later.
8740         * symfile.c (section_is_mapped): Fix fall-through comment.
8741         * stabsread.c (define_symbol, read_member_functions): Fix
8742         fall-through comment.
8743         * s390-linux-tdep.c (s390_process_record): Fix fall-through
8744         comment.
8745         * remote.c (remote_wait_as): Fix fall-through comment.
8746         * p-exp.y (yylex): Fix fall-through comment.
8747         * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
8748         comment.
8749         * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
8750         * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
8751         * jv-exp.y (yylex): Fix fall-through comment.
8752         * go-exp.y (lex_one_token): Fix fall-through comment.
8753         * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
8754         fall-through comment.
8755         * f-exp.y (yylex): Fix fall-through comment.
8756         * dwarf2read.c (process_die): Fix fall-through comments.
8757         * dbxread.c (process_one_symbol): Fix fall-through comment.
8758         * d-exp.y (lex_one_token): Fix fall-through comment.
8759         * cp-name-parser.y (yylex): Fix fall-through comment.
8760         * coffread.c (coff_symtab_read): Fix fall-through comment.
8761         * c-exp.y (lex_one_token): Fix fall-through comment.
8762         * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
8763         comment.
8764         * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
8765         comment.
8766
8767 2018-05-04  Tom Tromey  <tom@tromey.com>
8768
8769         PR python/22730:
8770         * NEWS: Mention gdb.execute change.
8771         * gdbcmd.h (execute_control_command): Don't declare.
8772         * python/python.c (execute_gdb_command): Use read_command_lines_1,
8773         execute_control_commands, execute_control_commands_to_string.
8774         * cli/cli-script.h (execute_control_commands)
8775         (execute_control_commands_to_string): Declare.
8776         (execute_control_command): Add from_tty parameter.
8777         * cli/cli-script.c (execute_control_commands)
8778         (execute_control_commands_to_string): New functions.
8779         (execute_user_command): Use execute_control_commands.
8780         (execute_control_command_1): Add "from_tty" parameter.  Update.
8781         (execute_control_command): Likewise.
8782
8783 2018-05-04  Tom Tromey  <tom@tromey.com>
8784
8785         PR python/22731:
8786         * NEWS: Mention that breakpoint commands are writable.
8787         * python/py-breakpoint.c (bppy_set_commands): New function.
8788         (breakpoint_object_getset) <"commands">: Use it.
8789
8790 2018-05-04  Tom Tromey  <tom@tromey.com>
8791
8792         * tracepoint.c (actions_command): Update.
8793         * mi/mi-cmd-break.c (mi_command_line_array)
8794         (mi_command_line_array_cnt, mi_command_line_array_ptr)
8795         (mi_read_next_line): Remove.
8796         (mi_cmd_break_commands): Update.
8797         * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
8798         function_view.
8799         * cli/cli-script.c (get_command_line): Update.
8800         (process_next_line): Use function_view.  Constify.
8801         (recurse_read_control_structure, read_command_lines)
8802         (read_command_lines_1): Change argument types to function_view.
8803         (do_define_command, document_command): Update.
8804         * breakpoint.h (check_tracepoint_command): Don't declare.
8805         * breakpoint.c (check_tracepoint_command): Remove.
8806         (commands_command_1, create_tracepoint_from_upload): Update.
8807
8808 2018-05-04  Tom Tromey  <tom@tromey.com>
8809
8810         PR gdb/11750:
8811         * cli/cli-script.h (enum command_control_type) <define_control>:
8812         New constant.
8813         * cli/cli-script.c (multi_line_command_p): Handle define_control.
8814         (build_command_line, execute_control_command_1)
8815         (process_next_line): Likewise.
8816         (do_define_command): New function, extracted from define_command.
8817         (define_command): Use it.
8818
8819 2018-05-04  Tom Tromey  <tom@tromey.com>
8820
8821         * tracepoint.c (actions_command): Update.
8822         * cli/cli-script.h (read_command_lines): Update.
8823         * cli/cli-script.c (read_command_lines): Constify prompt_arg.
8824         (MAX_TMPBUF): Remove define.
8825         (define_command): Use string_printf.
8826         (document_command): Likewise.
8827         * breakpoint.c (commands_command_1): Update.
8828
8829 2018-05-04  Tom Tromey  <tom@tromey.com>
8830
8831         * top.c (execute_command): Update.
8832         * cli/cli-script.h (print_command_lines): Now varargs.
8833         * cli/cli-script.c (print_command_lines): Now varargs.
8834         (execute_control_command_1) <case while_control, case if_control>:
8835         Update.
8836
8837 2018-05-04  Tom Tromey  <tom@tromey.com>
8838
8839         * tracepoint.c (all_tracepoint_actions): Rename from
8840         all_tracepoint_actions_and_cleanup.  Change return type.
8841         (actions_command, encode_actions_1, encode_actions)
8842         (trace_dump_actions, tdump_command): Update.
8843         * remote.c (remote_download_command_source): Update.
8844         * python/python.c (gdbpy_eval_from_control_command)
8845         (python_command, python_interactive_command): Update.
8846         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
8847         * guile/guile.c (guile_command)
8848         (gdbscm_eval_from_control_command, guile_command): Update.
8849         * compile/compile.c (compile_code_command)
8850         (compile_print_command, compile_to_object): Update.
8851         * cli/cli-script.h (struct command_lines_deleter): New.
8852         (counted_command_line): New typedef.
8853         (struct command_line): Add constructor, destructor.
8854         <body_list>: Remove.
8855         <body_list_0, body_list_1>: New members.
8856         (command_line_up): Remove typedef.
8857         (read_command_lines, read_command_lines_1, get_command_line):
8858         Update.
8859         (copy_command_lines): Don't declare.
8860         * cli/cli-script.c (build_command_line): Use "new".
8861         (get_command_line): Return counted_command_line.
8862         (print_command_lines, execute_user_command)
8863         (execute_control_command_1, while_command, if_command): Update.
8864         (realloc_body_list): Remove.
8865         (process_next_line, recurse_read_control_structure): Update.
8866         (read_command_lines, read_command_lines_1): Return counted_command_line.
8867         (free_command_lines): Use "delete".
8868         (copy_command_lines): Remove.
8869         (define_command, document_command, show_user_1): Update.
8870         * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
8871         a counted_command_line.
8872         * breakpoint.h (counted_command_line): Remove typedef.
8873         (breakpoint_set_commands): Update.
8874         * breakpoint.c (check_no_tracepoint_commands)
8875         (validate_commands_for_breakpoint): Update.
8876         (breakpoint_set_commands): Change commands to be a
8877         counted_command_line.
8878         (commands_command_1, update_dprintf_command_list)
8879         (create_tracepoint_from_upload): Update.
8880
8881 2018-05-04  Tom Tromey  <tom@tromey.com>
8882
8883         * cli/cli-decode.h (cmd_list_element): New constructor.
8884         (~cmd_list_element): New destructor.
8885         (struct cmd_list_element): Add initializers.
8886         * cli/cli-decode.c (do_add_cmd): Use "new".
8887         (delete_cmd): Use "delete".
8888
8889 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
8890             Pedro Alves <palves@redhat.com>
8891
8892         PR breakpoints/19806 and support for PR external/20207.
8893         * NEWS: Mention Aarch64 watchpoint improvements.
8894         * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
8895         watchpoints and PR external/20207 watchpoints.
8896         * nat/aarch64-linux-hw-point.c
8897         (kernel_supports_any_contiguous_range): New.
8898         (aarch64_watchpoint_offset): New.
8899         (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
8900         (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
8901         (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
8902         (aarch64_align_watchpoint): New parameters aligned_offset_p and
8903         next_addr_orig_p.  Support PR external/20207 watchpoints.
8904         (aarch64_downgrade_regs): New.
8905         (aarch64_dr_state_insert_one_point): New parameters offset and
8906         addr_orig.
8907         (aarch64_dr_state_remove_one_point): Likewise.
8908         (aarch64_handle_breakpoint): Update caller.
8909         (aarch64_handle_aligned_watchpoint): Likewise.
8910         (aarch64_handle_unaligned_watchpoint): Support addr_orig and
8911         aligned_offset.
8912         (aarch64_linux_set_debug_regs): Remove const from state.  Call
8913         aarch64_downgrade_regs.
8914         (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
8915         * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
8916         (DR_CONTROL_MASK): ... this.
8917         (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
8918         (unsigned int aarch64_watchpoint_offset): New prototype.
8919         (aarch64_linux_set_debug_regs): Remove const from state.
8920         * utils.c (align_up, align_down): Move to ...
8921         * common/common-utils.c (align_up, align_down): ... here.
8922         * utils.h (align_up, align_down): Move to ...
8923         * common/common-utils.h (align_up, align_down): ... here.
8924
8925 2018-05-04  Joel Brobecker  <brobecker@adacore.com>
8926
8927         * sparc-tdep.c (sparc_structure_return_p): Re-implement to
8928         match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
8929         (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
8930         Re-implement to match the ABI as summarized in GCC's
8931         gcc/config/sparc/sparc.c.  All callers updated.
8932         (sparc32_store_arguments): Remove assertion.
8933
8934 2018-05-04  Tom Tromey  <tom@tromey.com>
8935
8936         * printcmd.c: Don't include tui.h.
8937         (decode_format): Use skip_spaces.
8938
8939 2018-05-04  Tom Tromey  <tom@tromey.com>
8940
8941         PR gdb/22619:
8942         * printcmd.c (last_count): New global.
8943         (x_command): Use saved count when repeating.
8944
8945 2018-05-04  Tom Tromey  <tom@tromey.com>
8946
8947         * nto-procfs.c (do_closedir_cleanup): Remove.
8948         (procfs_pidlist): Use gdb_dir_up.
8949         * procfs.c (do_closedir_cleanup): Remove.
8950         (proc_update_threads): Use gdb_dir_up.
8951         * common/filestuff.h (struct gdb_dir_deleter): New.
8952         (gdb_dir_up): New typedef.
8953
8954 2018-05-04  Tom Tromey  <tom@tromey.com>
8955
8956         * ada-lang.c (print_mention_exception): Use std::string.
8957
8958 2018-05-04  Tom Tromey  <tom@tromey.com>
8959
8960         * ada-lang.c (create_excep_cond_exprs): Update.
8961         (ada_exception_catchpoint_cond_string): Use std::string.
8962
8963 2018-05-04  Tom Tromey  <tom@tromey.com>
8964
8965         * ada-lang.c (xget_renaming_scope): Return std::string.
8966         (old_renaming_is_invisible): Update.
8967
8968 2018-05-04  Tom Tromey  <tom@tromey.com>
8969
8970         * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
8971         (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
8972
8973 2018-05-04  Ulrich Weigand  <uweigand@de.ibm.com>
8974
8975         * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
8976
8977 2018-05-04  Tom Tromey  <tom@tromey.com>
8978
8979         * remote.c (remote_query_supported_append): Change type.
8980         (remote_check_symbols): Update.
8981
8982 2018-05-04  Paul Pluzhnikov  <ppluzhnikov@google.com>
8983
8984         PR gdb/11420
8985         * configure.ac: Prepend libpython.
8986         * python/python-config.py: Likewise.
8987         * configure: Regenerate.
8988
8989 2018-05-03  Simon Marchi  <simon.marchi@ericsson.com>
8990
8991         * Makefile.in (%.c: %.l): Use -t instead of --stdout.
8992
8993 2018-05-03  Pedro Alves  <palves@redhat.com>
8994
8995         * s390-linux-nat.c
8996         (s390_linux_nat_target::have_continuable_watchpoint): Mark with
8997         override.  Write 'true' instead of '1'.
8998         (s390_linux_nat_target::watchpoint_addr_within_range): Remove
8999         declaration.
9000
9001 2018-05-02  Pedro Alves  <palves@redhat.com>
9002
9003         * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
9004         add_inf_child_target.
9005         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
9006         add_inf_child_target.
9007         * aix-thread.c (aix_thread_target_info): New.
9008         (aix_thread_target) <shortname, longname, doc>: Delete.
9009         <info>: New.
9010         * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
9011         add_inf_child_target.
9012         * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
9013         add_inf_child_target.
9014         * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
9015         add_inf_child_target.
9016         * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
9017         add_inf_child_target.
9018         * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
9019         add_inf_child_target.
9020         * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
9021         add_inf_child_target.
9022         * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
9023         add_inf_child_target.
9024         * arm-linux-nat.c (_initialize_arm_linux_nat): Use
9025         add_inf_child_target.
9026         * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
9027         add_inf_child_target.
9028         * bfd-target.c (target_bfd_target_info): New.
9029         (target_bfd) <shortname, longname, doc>: Delete.
9030         <info>: New.
9031         * bsd-kvm.c (bsd_kvm_target_info): New.
9032         (bsd_kvm_target) <shortname, longname, doc>: Delete.
9033         <info>: New.
9034         (bsd_kvm_target::open): Rename to ...
9035         (bsd_kvm_target_open): ... this.  Adjust.
9036         * bsd-uthread.c (bsd_uthread_target_info): New.
9037         (bsd_uthread_target) <shortname, longname, doc>: Delete.
9038         <info>: New.
9039         * corefile.c (core_file_command): Adjust.
9040         * corelow.c (core_target_info): New.
9041         (core_target) <shortname, longname, doc>: Delete.
9042         <info>: New.
9043         (core_target::open): Rename to ...
9044         (core_target_open): ... this.  Adjust.
9045         * ctf.c (ctf_target_info): New.
9046         (ctf_target) <shortname, longname, doc>: Delete.
9047         <info>: New.
9048         (ctf_target::open): Rename to ...
9049         (ctf_target_open): ... this.
9050         (_initialize_ctf): Adjust.
9051         * exec.c (exec_target_info): New.
9052         (exec_target) <shortname, longname, doc>: Delete.
9053         <info>: New.
9054         (exec_target::open): Rename to ...
9055         (exec_target_open): ... this.
9056         * gdbcore.h (core_target_open): Declare.
9057         * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
9058         * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
9059         add_inf_child_target.
9060         * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
9061         add_inf_child_target.
9062         * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
9063         add_inf_child_target.
9064         * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
9065         add_inf_child_target.
9066         * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
9067         add_inf_child_target.
9068         * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
9069         add_inf_child_target.
9070         * i386-linux-nat.c (_initialize_i386_linux_nat): Use
9071         add_inf_child_target.
9072         * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
9073         add_inf_child_target.
9074         * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
9075         add_inf_child_target.
9076         * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
9077         add_inf_child_target.
9078         * inf-child.c (inf_child_target_info): New.
9079         (inf_child_target::info): New.
9080         (inf_child_open_target): Remove 'target' parameter.  Use
9081         get_native_target instead.
9082         (inf_child_target::open): Delete.
9083         (add_inf_child_target): New.
9084         * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
9085         Delete.
9086         <info>: New.
9087         (add_inf_child_target): Declare.
9088         (inf_child_open_target): Declare.
9089         * linux-thread-db.c (thread_db_target_info): New.
9090         (thread_db_target) <shortname, longname, doc>: Delete.
9091         <info>: New.
9092         * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
9093         add_inf_child_target.
9094         * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
9095         add_inf_child_target.
9096         * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
9097         add_inf_child_target.
9098         * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
9099         add_inf_child_target.
9100         * make-target-delegates (print_class): Adjust.
9101         * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
9102         add_inf_child_target.
9103         * mips-linux-nat.c (_initialize_mips_linux_nat): Use
9104         add_inf_child_target.
9105         * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
9106         add_inf_child_target.
9107         * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
9108         add_inf_child_target.
9109         * nto-procfs.c (nto_native_target_info): New.
9110         (nto_procfs_target_native) <shortname, longname, doc>:
9111         Delete.
9112         <info>: New.
9113         (nto_procfs_target_info): New.
9114         (nto_procfs_target_procfs) <shortname, longname, doc>:
9115         Delete.
9116         <info>: New.
9117         (init_procfs_targets): Adjust.
9118         * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
9119         add_inf_child_target.
9120         * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
9121         add_inf_child_target.
9122         * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
9123         add_inf_child_target.
9124         * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
9125         add_inf_child_target.
9126         * ravenscar-thread.c (ravenscar_target_info): New.
9127         (ravenscar_thread_target) <shortname, longname, doc>:
9128         Delete.
9129         <info>: New.
9130         * record-btrace.c (record_btrace_target_info):
9131         (record_btrace_target) <shortname, longname, doc>: Delete.
9132         <info>: New.
9133         (record_btrace_target::open): Rename to ...
9134         (record_btrace_target_open): ... this.  Adjust.
9135         * record-full.c (record_longname, record_doc): New.
9136         (record_full_base_target) <shortname, longname, doc>: Delete.
9137         <info>: New.
9138         (record_full_target_info): New.
9139         (record_full_target): <shortname>: Delete.
9140         <info>: New.
9141         (record_full_core_open_1, record_full_open_1): Update comments.
9142         (record_full_base_target::open): Rename to ...
9143         (record_full_open): ... this.
9144         (cmd_record_full_restore): Update.
9145         (_initialize_record_full): Update.
9146         * remote-sim.c (remote_sim_target_info): New.
9147         (gdbsim_target) <shortname, longname, doc>: Delete.
9148         <info>: New.
9149         (gdbsim_target::open): Rename to ...
9150         (gdbsim_target_open): ... this.
9151         (_initialize_remote_sim): Adjust.
9152         * remote.c (remote_doc): New.
9153         (remote_target_info): New.
9154         (remote_target) <shortname, longname, doc>: Delete.
9155         <info>: New.
9156         (extended_remote_target_info): New.
9157         (extended_remote_target) <shortname, longname, doc>: Delete.
9158         <info>: New.
9159         (remote_target::open_1): Make static.  Adjust.
9160         * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
9161         * s390-linux-nat.c (_initialize_s390_nat): Use
9162         add_inf_child_target.
9163         * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
9164         add_inf_child_target.
9165         * sol-thread.c (thread_db_target_info): New.
9166         (sol_thread_target) <shortname, longname, doc>: Delete.
9167         <info>: New.
9168         * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
9169         add_inf_child_target.
9170         * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
9171         add_inf_child_target.
9172         * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
9173         add_inf_child_target.
9174         * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
9175         add_inf_child_target.
9176         * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
9177         add_inf_child_target.
9178         * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
9179         add_inf_child_target.
9180         * spu-linux-nat.c (_initialize_spu_nat): Use
9181         add_inf_child_target.
9182         * spu-multiarch.c (spu_multiarch_target_info): New.
9183         (spu_multiarch_target) <shortname, longname, doc>: Delete.
9184         <info>: New.
9185         * target-delegates.c: Regenerate.
9186         * target.c: Include <unordered_map>.
9187         (target_ops_p): Delete.
9188         (DEF_VEC_P(target_ops_p)): Delete.
9189         (target_factories): New.
9190         (test_target_info): New.
9191         (test_target_ops::info): New.
9192         (open_target): Adjust to use target_factories.
9193         (add_target_with_completer): Rename to ...
9194         (add_target): ... this.  Change prototype.  Register target_info
9195         and open callback in target_factories.  Register target_info in
9196         command context instead of target_ops.
9197         (add_target): Delete old implementation.
9198         (add_deprecated_target_alias): Change prototype.  Adjust.
9199         (the_native_target): New.
9200         (set_native_target, get_native_target): New.
9201         (find_default_run_target): Use the_native_target.
9202         (find_attach_target, find_run_target): Simplify.
9203         (target_ops::open): Delete.
9204         (dummy_target_info): New.
9205         (dummy_target::shortname, dummy_target::longname)
9206         (dummy_target::doc): Delete.
9207         (dummy_target::info): New.
9208         (debug_target::shortname, debug_target::longname)
9209         (debug_target::doc): Delete.
9210         (debug_target::info): New.
9211         * target.h (struct target_info): New.
9212         (target_ops::~target_ops): Add comment.
9213         (target_ops::info): New.
9214         (target_ops::shortname, target_ops::longname, target_ops::doc): No
9215         longer virtual.  Implement in terms of target_info.
9216         (set_native_target, get_native_target): Declare.
9217         (target_open_ftype): New.
9218         (add_target, add_target_with_completer)
9219         (add_deprecated_target_alias): Change prototype.
9220         (test_target) <shortname, longname, doc>: Delete.
9221         <info>: New.
9222         * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
9223         add_inf_child_target.
9224         * tracefile-tfile.c (tfile_target_info): New.
9225         (tfile_target) <shortname, longname, doc>: Delete.
9226         <info>: New.
9227         (tfile_target::open): Rename to ...
9228         (tfile_target_open): ... this.
9229         (_initialize_tracefile_tfile): Adjust.
9230         * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
9231         add_inf_child_target.
9232         * windows-nat.c (_initialize_windows_nat): Use
9233         add_inf_child_target.
9234         * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
9235         add_inf_child_target.
9236
9237 2018-05-02  Pedro Alves  <palves@redhat.com>
9238
9239         * linux-nat.h (linux_nat_target) <low_new_thread,
9240         low_delete_thread, low_new_fork, low_forget_process,
9241         low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
9242         New virtual methods.
9243         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9244         (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
9245         (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
9246         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9247         (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
9248         Delete.
9249         * linux-fork.c (delete_fork): Adjust to call low method.
9250         * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
9251         (linux_nat_new_fork, linux_nat_forget_process_hook)
9252         (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
9253         (linux_nat_status_is_event):
9254         (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
9255         (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
9256         to call low method.
9257         (sigtrap_is_event): Rename to ...
9258         (linux_nat_target::low_status_is_event): ... this.
9259         (linux_nat_set_status_is_event): Delete.
9260         (save_stop_reason, linux_nat_wait_1)
9261         (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
9262         low methods.
9263         (linux_nat_set_new_thread, linux_nat_set_delete_thread)
9264         (linux_nat_set_new_fork, linux_nat_set_forget_process)
9265         (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
9266         (linux_nat_set_prepare_to_resume): Delete.
9267         * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
9268         low virtual methods.
9269         * amd64-linux-nat.c: Likewise.
9270         * arm-linux-nat.c: Likewise.
9271         * i386-linux-nat.c: Likewise.
9272         * ia64-linux-nat.c: Likewise.
9273         * mips-linux-nat.c: Likewise.
9274         * ppc-linux-nat.c: Likewise.
9275         * s390-linux-nat.c: Likewise.
9276         * sparc64-linux-nat.c: Likewise.
9277         * x86-linux-nat.c: Likewise.
9278         * x86-linux-nat.h: Include "nat/x86-linux.h".
9279         (x86_linux_nat_target) <low_new_fork, low_forget_process,
9280         low_prepare_to_resume, low_new_thread, low_delete_thread>:
9281         Override methods.
9282
9283 2018-05-02  Pedro Alves  <palves@redhat.com>
9284
9285         * target.h (target_ops)
9286         <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
9287         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
9288         stopped_by_watchpoint, have_continuable_watchpoint,
9289         stopped_data_address, watchpoint_addr_within_range,
9290         can_accel_watchpoint_condition, can_run, thread_alive,
9291         has_all_memory, has_memory, has_stack, has_registers,
9292         has_execution, can_async_p, is_async_p, supports_non_stop,
9293         always_non_stop_p, can_execute_reverse, supports_multi_process,
9294         supports_enable_disable_tracepoint,
9295         supports_disable_randomization, supports_string_tracing,
9296         supports_evaluation_of_breakpoint_conditions,
9297         can_run_breakpoint_commands, filesystem_is_local,
9298         can_download_tracepoint, get_trace_state_variable_value,
9299         set_trace_notes, get_tib_address, use_agent, can_use_agent,
9300         record_is_replaying, record_will_replay,
9301         augmented_libraries_svr4_read>: Adjust to return bool.
9302         * aarch64-linux-nat.c: All implementations adjusted.
9303         * aix-thread.c: All implementations adjusted.
9304         * arm-linux-nat.c: All implementations adjusted.
9305         * breakpoint.c: All implementations adjusted.
9306         * bsd-kvm.c: All implementations adjusted.
9307         * bsd-uthread.c: All implementations adjusted.
9308         * corelow.c: All implementations adjusted.
9309         * ctf.c: All implementations adjusted.
9310         * darwin-nat.c: All implementations adjusted.
9311         * darwin-nat.h: All implementations adjusted.
9312         * exec.c: All implementations adjusted.
9313         * fbsd-nat.c: All implementations adjusted.
9314         * fbsd-nat.h: All implementations adjusted.
9315         * gnu-nat.c: All implementations adjusted.
9316         * gnu-nat.h: All implementations adjusted.
9317         * go32-nat.c: All implementations adjusted.
9318         * ia64-linux-nat.c: All implementations adjusted.
9319         * inf-child.c: All implementations adjusted.
9320         * inf-child.h: All implementations adjusted.
9321         * inf-ptrace.c: All implementations adjusted.
9322         * inf-ptrace.h: All implementations adjusted.
9323         * linux-nat.c: All implementations adjusted.
9324         * linux-nat.h: All implementations adjusted.
9325         * mips-linux-nat.c: All implementations adjusted.
9326         * nto-procfs.c: All implementations adjusted.
9327         * ppc-linux-nat.c: All implementations adjusted.
9328         * procfs.c: All implementations adjusted.
9329         * ravenscar-thread.c: All implementations adjusted.
9330         * record-btrace.c: All implementations adjusted.
9331         * record-full.c: All implementations adjusted.
9332         * remote-sim.c: All implementations adjusted.
9333         * remote.c: All implementations adjusted.
9334         * s390-linux-nat.c: All implementations adjusted.
9335         * sol-thread.c: All implementations adjusted.
9336         * spu-multiarch.c: All implementations adjusted.
9337         * target-delegates.c: All implementations adjusted.
9338         * target.c: All implementations adjusted.
9339         * target.h: All implementations adjusted.
9340         * tracefile-tfile.c: All implementations adjusted.
9341         * tracefile.c: All implementations adjusted.
9342         * tracefile.h: All implementations adjusted.
9343         * windows-nat.c: All implementations adjusted.
9344         * x86-linux-nat.h: All implementations adjusted.
9345         * x86-nat.h: All implementations adjusted.
9346
9347 2018-05-02  Pedro Alves  <palves@redhat.com>
9348
9349         * make-target-delegates (scan_target_h): Don't trim lines here.
9350         Replace sequences of tabs and/or whitespace with a single
9351         whitespace.
9352         (top level, parsing methods): Trim each line before processing it
9353         here.
9354
9355 2018-05-02  Pedro Alves  <palves@redhat.com>
9356             John Baldwin  <jhb@freebsd.org>
9357
9358         * target.h (enum strata) <debug_stratum>: New.
9359         (struct target_ops) <all delegation methods>: Replace by C++
9360         virtual methods, and drop "to_" prefix.  All references updated
9361         throughout.
9362         <to_shortname, to_longname, to_doc, to_data,
9363         to_have_steppable_watchpoint, to_have_continuable_watchpoint,
9364         to_has_thread_control, to_attach_no_wait>: Delete, replaced by
9365         virtual methods.  All references updated throughout.
9366         <can_attach, supports_terminal_ours, can_create_inferior,
9367         get_thread_control_capabilities, attach_no_wait>: New
9368         virtual methods.
9369         <insert_breakpoint, remove_breakpoint>: Now
9370         TARGET_DEFAULT_NORETURN methods.
9371         <info_proc>: Now returns bool.
9372         <to_magic>: Delete.
9373         (OPS_MAGIC): Delete.
9374         (current_target): Delete.  All references replaced by references
9375         to ...
9376         (target_stack): ... this.  New.
9377         (target_shortname, target_longname): Adjust.
9378         (target_can_run): Now a function declaration.
9379         (default_child_has_all_memory, default_child_has_memory)
9380         (default_child_has_stack, default_child_has_registers)
9381         (default_child_has_execution): Remove target_ops parameter.
9382         (complete_target_initialization): Delete.
9383         (memory_breakpoint_target): New template class.
9384         (test_target_ops): Refactor as a C++ class with virtual methods.
9385         * make-target-delegates (NAME_PART): Tighten.
9386         (POINTER_PART, CP_SYMBOL): New.
9387         (SIMPLE_RETURN_PART): Reimplement.
9388         (VEC_RETURN_PART): Expect less.
9389         (RETURN_PART, VIRTUAL_PART): New.
9390         (METHOD): Adjust to C++ virtual methods.
9391         (scan_target_h): Remove reference to C99.
9392         (dname): Output "target_ops::" prefix.
9393         (write_function_header): Adjust to output a C++ class method.
9394         (write_declaration): New.
9395         (write_delegator): Adjust to output a C++ class method.
9396         (tdname): Output "dummy_target::" prefix.
9397         (write_tdefault, write_debugmethod): Adjust to output a C++ class
9398         method.
9399         (tdefault_names, debug_names): Delete.
9400         (return_types, tdefaults, styles, argtypes_array): New.
9401         (top level): All methods are delegators.
9402         (print_class): New.
9403         (top level): Print dummy_target and debug_target classes.
9404         * target-delegates.c: Regenerate.
9405         * target-debug.h (target_debug_print_enum_info_proc_what)
9406         (target_debug_print_thread_control_capabilities)
9407         (target_debug_print_thread_info_p): New.
9408         * target.c (dummy_target): Delete.
9409         (the_dummy_target, the_debug_target): New.
9410         (target_stack): Now extern.
9411         (set_targetdebug): Push/unpush debug target.
9412         (default_child_has_all_memory, default_child_has_memory)
9413         (default_child_has_stack, default_child_has_registers)
9414         (default_child_has_execution): Remove target_ops parameter.
9415         (complete_target_initialization): Delete.
9416         (add_target_with_completer): No longer call
9417         complete_target_initialization.
9418         (target_supports_terminal_ours): Use regular delegation.
9419         (update_current_target): Delete.
9420         (push_target): No longer check magic number.  Don't call
9421         update_current_target.
9422         (unpush_target): Don't call update_current_target.
9423         (target_is_pushed): No longer check magic number.
9424         (target_require_runnable): Skip for all stratums over
9425         process_stratum.
9426         (target_ops::info_proc): New.
9427         (target_info_proc): Use find_target_at and
9428         find_default_run_target.
9429         (target_supports_disable_randomization): Use regular delegation.
9430         (target_get_osdata): Use find_target_at.
9431         (target_ops::open, target_ops::close, target_ops::can_attach)
9432         (target_ops::attach, target_ops::can_create_inferior)
9433         (target_ops::create_inferior, target_ops::can_run)
9434         (target_can_run): New.
9435         (default_fileio_target): Use regular delegation.
9436         (target_ops::fileio_open, target_ops::fileio_pwrite)
9437         (target_ops::fileio_pread, target_ops::fileio_fstat)
9438         (target_ops::fileio_close, target_ops::fileio_unlink)
9439         (target_ops::fileio_readlink): New.
9440         (target_fileio_open_1, target_fileio_unlink)
9441         (target_fileio_readlink): Always call the target method.  Handle
9442         FILEIO_ENOSYS.
9443         (return_zero, return_zero_has_execution): Delete.
9444         (init_dummy_target): Delete.
9445         (dummy_target::dummy_target, dummy_target::shortname)
9446         (dummy_target::longname, dummy_target::doc)
9447         (debug_target::debug_target, debug_target::shortname)
9448         (debug_target::longname, debug_target::doc): New.
9449         (target_supports_delete_record): Use regular delegation.
9450         (setup_target_debug): Delete.
9451         (maintenance_print_target_stack): Skip debug_stratum.
9452         (initialize_targets): Instantiate the_dummy_target and
9453         the_debug_target.
9454         * auxv.c (target_auxv_parse): Remove 'ops' parameter.  Adjust to
9455         use target_stack.
9456         (target_auxv_search, fprint_target_auxv): Adjust.
9457         (info_auxv_command): Adjust to use target_stack.
9458         * auxv.h (target_auxv_parse): Remove 'ops' parameter.
9459         * exceptions.c (print_flush): Handle a NULL target_stack.
9460         * regcache.c (target_ops_no_register): Refactor as class with
9461         virtual methods.
9462
9463         * exec.c (exec_target): New class.
9464         (exec_ops): Now an exec_target.
9465         (exec_open, exec_close_1, exec_get_section_table)
9466         (exec_xfer_partial, exec_files_info, exec_has_memory)
9467         (exec_make_note_section): Refactor as exec_target methods.
9468         (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
9469         Delete.
9470         (exec_target::find_memory_regions): New.
9471         (_initialize_exec): Don't call init_exec_ops.
9472         * gdbcore.h (exec_file_clear): Delete.
9473
9474         * corefile.c (core_target): Delete.
9475         (core_file_command): Adjust.
9476         * corelow.c (core_target): New class.
9477         (the_core_target): New.
9478         (core_close): Remove target_ops parameter.
9479         (core_close_cleanup): Adjust.
9480         (core_target::close): New.
9481         (core_open, core_detach, get_core_registers, core_files_info)
9482         (core_xfer_partial, core_thread_alive, core_read_description)
9483         (core_pid_to_str, core_thread_name, core_has_memory)
9484         (core_has_stack, core_has_registers, core_info_proc): Rework as
9485         core_target methods.
9486         (ignore, core_remove_breakpoint, init_core_ops): Delete.
9487         (_initialize_corelow): Initialize the_core_target.
9488         * gdbcore.h (core_target): Delete.
9489         (the_core_target): New.
9490
9491         * ctf.c: (ctf_target): New class.
9492         (ctf_ops): Now a ctf_target.
9493         (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
9494         (ctf_xfer_partial, ctf_get_trace_state_variable_value)
9495         (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
9496         methods.
9497         (init_ctf_ops): Delete.
9498         (_initialize_ctf): Don't call it.
9499         * tracefile-tfile.c (tfile_target): New class.
9500         (tfile_ops): Now a tfile_target.
9501         (tfile_open, tfile_close, tfile_files_info)
9502         (tfile_get_tracepoint_status, tfile_trace_find)
9503         (tfile_fetch_registers, tfile_xfer_partial)
9504         (tfile_get_trace_state_variable_value, tfile_traceframe_info):
9505         Refactor as tfile_target methods.
9506         (tfile_xfer_partial_features): Remove target_ops parameter.
9507         (init_tfile_ops): Delete.
9508         (_initialize_tracefile_tfile): Don't call it.
9509         * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
9510         (tracefile_has_stack, tracefile_has_registers)
9511         (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
9512         tracefile_target methods.
9513         (init_tracefile_ops): Delete.
9514         (tracefile_target::tracefile_target): New.
9515         * tracefile.h: Include "target.h".
9516         (tracefile_target): New class.
9517         (init_tracefile_ops): Delete.
9518
9519         * spu-multiarch.c (spu_multiarch_target): New class.
9520         (spu_ops): Now a spu_multiarch_target.
9521         (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
9522         (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
9523         (spu_search_memory, spu_mourn_inferior): Refactor as
9524         spu_multiarch_target methods.
9525         (init_spu_ops): Delete.
9526         (_initialize_spu_multiarch): Remove references to init_spu_ops,
9527         complete_target_initialization.
9528
9529         * ravenscar-thread.c (ravenscar_thread_target): New class.
9530         (ravenscar_ops): Now a ravenscar_thread_target.
9531         (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
9532         (ravenscar_thread_alive, ravenscar_pid_to_str)
9533         (ravenscar_fetch_registers, ravenscar_store_registers)
9534         (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
9535         (ravenscar_stopped_by_hw_breakpoint)
9536         (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
9537         (ravenscar_mourn_inferior, ravenscar_core_of_thread)
9538         (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
9539         methods.
9540         (init_ravenscar_thread_ops): Delete.
9541         (_initialize_ravenscar): Remove references to
9542         init_ravenscar_thread_ops and complete_target_initialization.
9543
9544         * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
9545         (bsd_uthread_target): New class.
9546         (bsd_uthread_ops): Now a bsd_uthread_target.
9547         (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
9548         (bsd_uthread_close, bsd_uthread_mourn_inferior)
9549         (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
9550         (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
9551         (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
9552         (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
9553         (bsd_uthread_target): Delete function.
9554         (_initialize_bsd_uthread): Remove reference to
9555         complete_target_initialization.
9556
9557         * bfd-target.c (target_bfd_data): Delete.  Fields folded into ...
9558         (target_bfd): ... this new class.
9559         (target_bfd_xfer_partial, target_bfd_get_section_table)
9560         (target_bfd_close): Refactor as target_bfd methods.
9561         (target_bfd::~target_bfd): New.
9562         (target_bfd_reopen): Adjust.
9563         (target_bfd::close): New.
9564
9565         * record-btrace.c (record_btrace_target): New class.
9566         (record_btrace_ops): Now a record_btrace_target.
9567         (record_btrace_open, record_btrace_stop_recording)
9568         (record_btrace_disconnect, record_btrace_close)
9569         (record_btrace_async, record_btrace_info)
9570         (record_btrace_insn_history, record_btrace_insn_history_range)
9571         (record_btrace_insn_history_from, record_btrace_call_history)
9572         (record_btrace_call_history_range)
9573         (record_btrace_call_history_from, record_btrace_record_method)
9574         (record_btrace_is_replaying, record_btrace_will_replay)
9575         (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
9576         (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
9577         (record_btrace_store_registers, record_btrace_prepare_to_store)
9578         (record_btrace_to_get_unwinder)
9579         (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
9580         (record_btrace_commit_resume, record_btrace_wait)
9581         (record_btrace_stop, record_btrace_can_execute_reverse)
9582         (record_btrace_stopped_by_sw_breakpoint)
9583         (record_btrace_supports_stopped_by_sw_breakpoint)
9584         (record_btrace_stopped_by_hw_breakpoint)
9585         (record_btrace_supports_stopped_by_hw_breakpoint)
9586         (record_btrace_update_thread_list, record_btrace_thread_alive)
9587         (record_btrace_goto_begin, record_btrace_goto_end)
9588         (record_btrace_goto, record_btrace_stop_replaying_all)
9589         (record_btrace_execution_direction)
9590         (record_btrace_prepare_to_generate_core)
9591         (record_btrace_done_generating_core): Refactor as
9592         record_btrace_target methods.
9593         (init_record_btrace_ops): Delete.
9594         (_initialize_record_btrace): Remove reference to
9595         init_record_btrace_ops.
9596         * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
9597         the execution_direction global.
9598         (record_full_base_target, record_full_target)
9599         (record_full_core_target): New classes.
9600         (record_full_ops): Now a record_full_target.
9601         (record_full_core_ops): Now a record_full_core_target.
9602         (record_full_target::detach, record_full_target::disconnect)
9603         (record_full_core_target::disconnect)
9604         (record_full_target::mourn_inferior, record_full_target::kill):
9605         New.
9606         (record_full_open, record_full_close, record_full_async): Refactor
9607         as methods of the record_full_base_target class.
9608         (record_full_resume, record_full_commit_resume): Refactor
9609         as methods of the record_full_target class.
9610         (record_full_wait, record_full_stopped_by_watchpoint)
9611         (record_full_stopped_data_address)
9612         (record_full_stopped_by_sw_breakpoint)
9613         (record_full_supports_stopped_by_sw_breakpoint)
9614         (record_full_stopped_by_hw_breakpoint)
9615         (record_full_supports_stopped_by_hw_breakpoint): Refactor as
9616         methods of the record_full_base_target class.
9617         (record_full_store_registers, record_full_xfer_partial)
9618         (record_full_insert_breakpoint, record_full_remove_breakpoint):
9619         Refactor as methods of the record_full_target class.
9620         (record_full_can_execute_reverse, record_full_get_bookmark)
9621         (record_full_goto_bookmark, record_full_execution_direction)
9622         (record_full_record_method, record_full_info, record_full_delete)
9623         (record_full_is_replaying, record_full_will_replay)
9624         (record_full_goto_begin, record_full_goto_end, record_full_goto)
9625         (record_full_stop_replaying): Refactor as methods of the
9626         record_full_base_target class.
9627         (record_full_core_resume, record_full_core_kill)
9628         (record_full_core_fetch_registers)
9629         (record_full_core_prepare_to_store)
9630         (record_full_core_store_registers, record_full_core_xfer_partial)
9631         (record_full_core_insert_breakpoint)
9632         (record_full_core_remove_breakpoint)
9633         (record_full_core_has_execution): Refactor
9634         as methods of the record_full_core_target class.
9635         (record_full_base_target::supports_delete_record): New.
9636         (init_record_full_ops): Delete.
9637         (init_record_full_core_ops): Delete.
9638         (record_full_save): Refactor as method of the
9639         record_full_base_target class.
9640         (_initialize_record_full): Remove references to
9641         init_record_full_ops and init_record_full_core_ops.
9642
9643         * remote.c (remote_target, extended_remote_target): New classes.
9644         (remote_ops): Now a remote_target.
9645         (extended_remote_ops): Now an extended_remote_target.
9646         (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
9647         (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
9648         (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
9649         (remote_pass_signals, remote_set_syscall_catchpoint)
9650         (remote_program_signals, )
9651         (remote_thread_always_alive): Remove target_ops parameter.
9652         (remote_thread_alive, remote_thread_name)
9653         (remote_update_thread_list, remote_threads_extra_info)
9654         (remote_static_tracepoint_marker_at)
9655         (remote_static_tracepoint_markers_by_strid)
9656         (remote_get_ada_task_ptid, remote_close, remote_start_remote)
9657         (remote_open): Refactor as methods of remote_target.
9658         (extended_remote_open, extended_remote_detach)
9659         (extended_remote_attach, extended_remote_post_attach):
9660         (extended_remote_supports_disable_randomization)
9661         (extended_remote_create_inferior): : Refactor as method of
9662         extended_remote_target.
9663         (remote_set_permissions, remote_open_1, remote_detach)
9664         (remote_follow_fork, remote_follow_exec, remote_disconnect)
9665         (remote_resume, remote_commit_resume, remote_stop)
9666         (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
9667         (remote_terminal_ours, remote_wait, remote_fetch_registers)
9668         (remote_prepare_to_store, remote_store_registers)
9669         (remote_flash_erase, remote_flash_done, remote_files_info)
9670         (remote_kill, remote_mourn, remote_insert_breakpoint)
9671         (remote_remove_breakpoint, remote_insert_watchpoint)
9672         (remote_watchpoint_addr_within_range)
9673         (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
9674         (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
9675         (remote_supports_stopped_by_sw_breakpoint)
9676         (remote_stopped_by_hw_breakpoint)
9677         (remote_supports_stopped_by_hw_breakpoint)
9678         (remote_stopped_by_watchpoint, remote_stopped_data_address)
9679         (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
9680         (remote_verify_memory): Refactor as methods of remote_target.
9681         (remote_write_qxfer, remote_read_qxfer): Remove target_ops
9682         parameter.
9683         (remote_xfer_partial, remote_get_memory_xfer_limit)
9684         (remote_search_memory, remote_rcmd, remote_memory_map)
9685         (remote_pid_to_str, remote_get_thread_local_address)
9686         (remote_get_tib_address, remote_read_description): Refactor as
9687         methods of remote_target.
9688         (remote_target::fileio_open, remote_target::fileio_pwrite)
9689         (remote_target::fileio_pread, remote_target::fileio_close): New.
9690         (remote_hostio_readlink, remote_hostio_fstat)
9691         (remote_filesystem_is_local, remote_can_execute_reverse)
9692         (remote_supports_non_stop, remote_supports_disable_randomization)
9693         (remote_supports_multi_process, remote_supports_cond_breakpoints)
9694         (remote_supports_enable_disable_tracepoint)
9695         (remote_supports_string_tracing)
9696         (remote_can_run_breakpoint_commands, remote_trace_init)
9697         (remote_download_tracepoint, remote_can_download_tracepoint)
9698         (remote_download_trace_state_variable, remote_enable_tracepoint)
9699         (remote_disable_tracepoint, remote_trace_set_readonly_regions)
9700         (remote_trace_start, remote_get_trace_status)
9701         (remote_get_tracepoint_status, remote_trace_stop)
9702         (remote_trace_find, remote_get_trace_state_variable_value)
9703         (remote_save_trace_data, remote_get_raw_trace_data)
9704         (remote_set_disconnected_tracing, remote_core_of_thread)
9705         (remote_set_circular_trace_buffer, remote_traceframe_info)
9706         (remote_get_min_fast_tracepoint_insn_len)
9707         (remote_set_trace_buffer_size, remote_set_trace_notes)
9708         (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
9709         (remote_disable_btrace, remote_teardown_btrace)
9710         (remote_read_btrace, remote_btrace_conf)
9711         (remote_augmented_libraries_svr4_read, remote_load)
9712         (remote_pid_to_exec_file, remote_can_do_single_step)
9713         (remote_execution_direction, remote_thread_handle_to_thread_info):
9714         Refactor as methods of remote_target.
9715         (init_remote_ops, init_extended_remote_ops): Delete.
9716         (remote_can_async_p, remote_is_async_p, remote_async)
9717         (remote_thread_events, remote_upload_tracepoints)
9718         (remote_upload_trace_state_variables): Refactor as methods of
9719         remote_target.
9720         (_initialize_remote): Remove references to init_remote_ops and
9721         init_extended_remote_ops.
9722
9723         * remote-sim.c (gdbsim_target): New class.
9724         (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
9725         (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
9726         (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
9727         (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
9728         (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
9729         (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
9730         Refactor as methods of gdbsim_target.
9731         (gdbsim_ops): Now a gdbsim_target.
9732         (init_gdbsim_ops): Delete.
9733         (gdbsim_cntrl_c): Adjust.
9734         (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
9735
9736         * amd64-linux-nat.c (amd64_linux_nat_target): New class.
9737         (the_amd64_linux_nat_target): New.
9738         (amd64_linux_fetch_inferior_registers)
9739         (amd64_linux_store_inferior_registers): Refactor as methods of
9740         amd64_linux_nat_target.
9741         (_initialize_amd64_linux_nat): Adjust.  Set linux_target.
9742         * i386-linux-nat.c: Don't include "linux-nat.h".
9743         (i386_linux_nat_target): New class.
9744         (the_i386_linux_nat_target): New.
9745         (i386_linux_fetch_inferior_registers)
9746         (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
9747         as methods of i386_linux_nat_target.
9748         (_initialize_i386_linux_nat): Adjust.  Set linux_target.
9749         * inf-child.c (inf_child_ops): Delete.
9750         (inf_child_fetch_inferior_registers)
9751         (inf_child_store_inferior_registers): Delete.
9752         (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
9753         methods of inf_child_target.
9754         (inf_child_target::supports_terminal_ours)
9755         (inf_child_target::terminal_init)
9756         (inf_child_target::terminal_inferior)
9757         (inf_child_target::terminal_ours_for_output)
9758         (inf_child_target::terminal_ours, inf_child_target::interrupt)
9759         (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
9760         New.
9761         (inf_child_open, inf_child_disconnect, inf_child_close)
9762         (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
9763         (inf_child_post_startup_inferior, inf_child_can_run)
9764         (inf_child_pid_to_exec_file): Refactor as methods of
9765         inf_child_target.
9766         (inf_child_follow_fork): Delete.
9767         (inf_child_target::can_create_inferior)
9768         (inf_child_target::can_attach): New.
9769         (inf_child_target::has_all_memory, inf_child_target::has_memory)
9770         (inf_child_target::has_stack, inf_child_target::has_registers)
9771         (inf_child_target::has_execution): New.
9772         (inf_child_fileio_open, inf_child_fileio_pwrite)
9773         (inf_child_fileio_pread, inf_child_fileio_fstat)
9774         (inf_child_fileio_close, inf_child_fileio_unlink)
9775         (inf_child_fileio_readlink, inf_child_use_agent)
9776         (inf_child_can_use_agent): Refactor as methods of
9777         inf_child_target.
9778         (return_zero, inf_child_target): Delete.
9779         (inf_child_target::inf_child_target): New.
9780         * inf-child.h: Include "target.h".
9781         (inf_child_target): Delete function prototype.
9782         (inf_child_target): New class.
9783         (inf_child_open_target, inf_child_mourn_inferior)
9784         (inf_child_maybe_unpush_target): Delete.
9785         * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
9786         (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
9787         (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
9788         (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
9789         (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
9790         (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
9791         (inf_ptrace_wait, inf_ptrace_xfer_partial)
9792         (inf_ptrace_thread_alive, inf_ptrace_files_info)
9793         (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
9794         methods of inf_ptrace_target.
9795         (inf_ptrace_target): Delete function.
9796         * inf-ptrace.h: Include "inf-child.h".
9797         (inf_ptrace_target): Delete function declaration.
9798         (inf_ptrace_target): New class.
9799         (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
9800         * linux-nat.c (linux_target): New.
9801         (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
9802         (linux_nat_target::~linux_nat_target): New.
9803         (linux_child_post_attach, linux_child_post_startup_inferior)
9804         (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
9805         (linux_child_remove_fork_catchpoint)
9806         (linux_child_insert_vfork_catchpoint)
9807         (linux_child_remove_vfork_catchpoint)
9808         (linux_child_insert_exec_catchpoint)
9809         (linux_child_remove_exec_catchpoint)
9810         (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
9811         (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
9812         (linux_nat_resume, linux_nat_stopped_by_watchpoint)
9813         (linux_nat_stopped_data_address)
9814         (linux_nat_stopped_by_sw_breakpoint)
9815         (linux_nat_supports_stopped_by_sw_breakpoint)
9816         (linux_nat_stopped_by_hw_breakpoint)
9817         (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
9818         (linux_nat_kill, linux_nat_mourn_inferior)
9819         (linux_nat_xfer_partial, linux_nat_thread_alive)
9820         (linux_nat_update_thread_list, linux_nat_pid_to_str)
9821         (linux_nat_thread_name, linux_child_pid_to_exec_file)
9822         (linux_child_static_tracepoint_markers_by_strid)
9823         (linux_nat_is_async_p, linux_nat_can_async_p)
9824         (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
9825         (linux_nat_supports_multi_process)
9826         (linux_nat_supports_disable_randomization, linux_nat_async)
9827         (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
9828         (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
9829         (linux_nat_fileio_open, linux_nat_fileio_readlink)
9830         (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
9831         methods of linux_nat_target.
9832         (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
9833         (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
9834         parameter.
9835         (check_stopped_by_watchpoint): Adjust.
9836         (linux_xfer_partial): Delete.
9837         (linux_target_install_ops, linux_target, linux_nat_add_target):
9838         Delete.
9839         (linux_nat_target::linux_nat_target): New.
9840         * linux-nat.h: Include "inf-ptrace.h".
9841         (linux_nat_target): New.
9842         (linux_target, linux_target_install_ops, linux_nat_add_target):
9843         Delete function declarations.
9844         (linux_target): Declare global.
9845         * linux-thread-db.c (thread_db_target): New.
9846         (thread_db_target::thread_db_target): New.
9847         (thread_db_ops): Delete.
9848         (the_thread_db_target): New.
9849         (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
9850         (thread_db_update_thread_list, thread_db_pid_to_str)
9851         (thread_db_extra_thread_info)
9852         (thread_db_thread_handle_to_thread_info)
9853         (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
9854         (thread_db_resume): Refactor as methods of thread_db_target.
9855         (init_thread_db_ops): Delete.
9856         (_initialize_thread_db): Remove reference to init_thread_db_ops.
9857         * x86-linux-nat.c: Don't include "linux-nat.h".
9858         (super_post_startup_inferior): Delete.
9859         (x86_linux_nat_target::~x86_linux_nat_target): New.
9860         (x86_linux_child_post_startup_inferior)
9861         (x86_linux_read_description, x86_linux_enable_btrace)
9862         (x86_linux_disable_btrace, x86_linux_teardown_btrace)
9863         (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
9864         methods of x86_linux_nat_target.
9865         (x86_linux_create_target): Delete.  Bits folded ...
9866         (x86_linux_add_target): ... here.  Now takes a linux_nat_target
9867         pointer.
9868         * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
9869         (x86_linux_nat_target): New class.
9870         (x86_linux_create_target): Delete.
9871         (x86_linux_add_target): Now takes a linux_nat_target pointer.
9872         * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
9873         (x86_region_ok_for_watchpoint, x86_stopped_data_address)
9874         (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
9875         (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
9876         (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
9877         make extern.
9878         (x86_use_watchpoints): Delete.
9879         * x86-nat.h: Include "breakpoint.h" and "target.h".
9880         (x86_use_watchpoints): Delete.
9881         (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
9882         (x86_stopped_by_watchpoint, x86_stopped_data_address)
9883         (x86_insert_watchpoint, x86_remove_watchpoint)
9884         (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
9885         (x86_stopped_by_hw_breakpoint): New declarations.
9886         (x86_nat_target): New template class.
9887
9888         * ppc-linux-nat.c (ppc_linux_nat_target): New class.
9889         (the_ppc_linux_nat_target): New.
9890         (ppc_linux_fetch_inferior_registers)
9891         (ppc_linux_can_use_hw_breakpoint)
9892         (ppc_linux_region_ok_for_hw_watchpoint)
9893         (ppc_linux_ranged_break_num_registers)
9894         (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
9895         (ppc_linux_insert_mask_watchpoint)
9896         (ppc_linux_remove_mask_watchpoint)
9897         (ppc_linux_can_accel_watchpoint_condition)
9898         (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
9899         (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
9900         (ppc_linux_watchpoint_addr_within_range)
9901         (ppc_linux_masked_watch_num_registers)
9902         (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
9903         (ppc_linux_read_description): Refactor as methods of
9904         ppc_linux_nat_target.
9905         (_initialize_ppc_linux_nat): Adjust.  Set linux_target.
9906
9907         * procfs.c (procfs_xfer_partial): Delete forward declaration.
9908         (procfs_target): New class.
9909         (the_procfs_target): New.
9910         (procfs_target): Delete function.
9911         (procfs_auxv_parse, procfs_attach, procfs_detach)
9912         (procfs_fetch_registers, procfs_store_registers, procfs_wait)
9913         (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
9914         (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
9915         (procfs_create_inferior, procfs_update_thread_list)
9916         (procfs_thread_alive, procfs_pid_to_str)
9917         (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
9918         (procfs_stopped_data_address, procfs_insert_watchpoint)
9919         (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
9920         (proc_find_memory_regions, procfs_info_proc)
9921         (procfs_make_note_section): Refactor as methods of procfs_target.
9922         (_initialize_procfs): Adjust.
9923         * sol-thread.c (sol_thread_target): New class.
9924         (sol_thread_ops): Now a sol_thread_target.
9925         (sol_thread_detach, sol_thread_resume, sol_thread_wait)
9926         (sol_thread_fetch_registers, sol_thread_store_registers)
9927         (sol_thread_xfer_partial, sol_thread_mourn_inferior)
9928         (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
9929         (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
9930         (init_sol_thread_ops): Delete.
9931         (_initialize_sol_thread): Adjust.  Remove references to
9932         init_sol_thread_ops and complete_target_initialization.
9933
9934         * windows-nat.c (windows_nat_target): New class.
9935         (windows_fetch_inferior_registers)
9936         (windows_store_inferior_registers, windows_resume, windows_wait)
9937         (windows_attach, windows_detach, windows_pid_to_exec_file)
9938         (windows_files_info, windows_create_inferior)
9939         (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
9940         (windows_close, windows_pid_to_str, windows_xfer_partial)
9941         (windows_get_tib_address, windows_get_ada_task_ptid)
9942         (windows_thread_name, windows_thread_alive): Refactor as
9943         windows_nat_target methods.
9944         (do_initial_windows_stuff): Adjust.
9945         (windows_target): Delete function.
9946         (_initialize_windows_nat): Adjust.
9947
9948         * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
9949         (darwin_mourn_inferior, darwin_kill_inferior)
9950         (darwin_create_inferior, darwin_attach, darwin_detach)
9951         (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
9952         (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
9953         (darwin_supports_multi_process): Refactor as darwin_nat_target
9954         methods.
9955         (darwin_resume_to, darwin_files_info): Delete.
9956         (_initialize_darwin_inferior): Rename to ...
9957         (_initialize_darwin_nat): ... this.  Adjust to C++ification.
9958         * darwin-nat.h: Include "inf-child.h".
9959         (darwin_nat_target): New class.
9960         (darwin_complete_target): Delete.
9961         * i386-darwin-nat.c (i386_darwin_nat_target): New class.
9962         (darwin_target): New.
9963         (i386_darwin_fetch_inferior_registers)
9964         (i386_darwin_store_inferior_registers): Refactor as methods of
9965         darwin_nat_target.
9966         (darwin_complete_target): Delete, with ...
9967         (_initialize_i386_darwin_nat): ... bits factored out here.
9968
9969         * alpha-linux-nat.c (alpha_linux_nat_target): New class.
9970         (the_alpha_linux_nat_target): New.
9971         (alpha_linux_register_u_offset): Refactor as
9972         alpha_linux_nat_target method.
9973         (_initialize_alpha_linux_nat): Adjust.
9974         * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
9975         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
9976         (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
9977         methods of linux_nat_trad_target.
9978         (linux_trad_target): Delete.
9979         * linux-nat-trad.h (linux_trad_target): Delete function.
9980         (linux_nat_trad_target): New class.
9981         * mips-linux-nat.c (mips_linux_nat_target): New class.
9982         (super_fetch_registers, super_store_registers, super_close):
9983         Delete.
9984         (the_mips_linux_nat_target): New.
9985         (mips64_linux_regsets_fetch_registers)
9986         (mips64_linux_regsets_store_registers)
9987         (mips64_linux_fetch_registers, mips64_linux_store_registers)
9988         (mips_linux_register_u_offset, mips_linux_read_description)
9989         (mips_linux_can_use_hw_breakpoint)
9990         (mips_linux_stopped_by_watchpoint)
9991         (mips_linux_stopped_data_address)
9992         (mips_linux_region_ok_for_hw_watchpoint)
9993         (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
9994         (mips_linux_close): Refactor as methods of mips_linux_nat.
9995         (_initialize_mips_linux_nat): Adjust to C++ification.
9996
9997         * aix-thread.c (aix_thread_target): New class.
9998         (aix_thread_ops): Now an aix_thread_target.
9999         (aix_thread_detach, aix_thread_resume, aix_thread_wait)
10000         (aix_thread_fetch_registers, aix_thread_store_registers)
10001         (aix_thread_xfer_partial, aix_thread_mourn_inferior)
10002         (aix_thread_thread_alive, aix_thread_pid_to_str)
10003         (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
10004         Refactor as methods of aix_thread_target.
10005         (init_aix_thread_ops): Delete.
10006         (_initialize_aix_thread): Remove references to init_aix_thread_ops
10007         and complete_target_initialization.
10008         * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
10009         (rs6000_nat_target): New class.
10010         (the_rs6000_nat_target): New.
10011         (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
10012         (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
10013         (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
10014         (super_create_inferior): Delete.
10015         (_initialize_rs6000_nat): Adjust to C++ification.
10016
10017         * arm-linux-nat.c (arm_linux_nat_target): New class.
10018         (the_arm_linux_nat_target): New.
10019         (arm_linux_fetch_inferior_registers)
10020         (arm_linux_store_inferior_registers, arm_linux_read_description)
10021         (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
10022         (arm_linux_remove_hw_breakpoint)
10023         (arm_linux_region_ok_for_hw_watchpoint)
10024         (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
10025         (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
10026         (arm_linux_watchpoint_addr_within_range): Refactor as methods of
10027         arm_linux_nat_target.
10028         (_initialize_arm_linux_nat): Adjust to C++ification.
10029
10030         * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
10031         (the_aarch64_linux_nat_target): New.
10032         (aarch64_linux_fetch_inferior_registers)
10033         (aarch64_linux_store_inferior_registers)
10034         (aarch64_linux_child_post_startup_inferior)
10035         (aarch64_linux_read_description)
10036         (aarch64_linux_can_use_hw_breakpoint)
10037         (aarch64_linux_insert_hw_breakpoint)
10038         (aarch64_linux_remove_hw_breakpoint)
10039         (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
10040         (aarch64_linux_region_ok_for_hw_watchpoint)
10041         (aarch64_linux_stopped_data_address)
10042         (aarch64_linux_stopped_by_watchpoint)
10043         (aarch64_linux_watchpoint_addr_within_range)
10044         (aarch64_linux_can_do_single_step): Refactor as methods of
10045         aarch64_linux_nat_target.
10046         (super_post_startup_inferior): Delete.
10047         (_initialize_aarch64_linux_nat): Adjust to C++ification.
10048
10049         * hppa-linux-nat.c (hppa_linux_nat_target): New class.
10050         (the_hppa_linux_nat_target): New.
10051         (hppa_linux_fetch_inferior_registers)
10052         (hppa_linux_store_inferior_registers): Refactor as methods of
10053         hppa_linux_nat_target.
10054         (_initialize_hppa_linux_nat): Adjust to C++ification.
10055
10056         * ia64-linux-nat.c (ia64_linux_nat_target): New class.
10057         (the_ia64_linux_nat_target): New.
10058         (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
10059         (ia64_linux_stopped_data_address)
10060         (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
10061         (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
10062         ia64_linux_nat_target methods.
10063         (super_xfer_partial): Delete.
10064         (_initialize_ia64_linux_nat): Adjust to C++ification.
10065
10066         * m32r-linux-nat.c (m32r_linux_nat_target): New class.
10067         (the_m32r_linux_nat_target): New.
10068         (m32r_linux_fetch_inferior_registers)
10069         (m32r_linux_store_inferior_registers): Refactor as
10070         m32r_linux_nat_target methods.
10071         (_initialize_m32r_linux_nat): Adjust to C++ification.
10072
10073         * m68k-linux-nat.c (m68k_linux_nat_target): New class.
10074         (the_m68k_linux_nat_target): New.
10075         (m68k_linux_fetch_inferior_registers)
10076         (m68k_linux_store_inferior_registers): Refactor as
10077         m68k_linux_nat_target methods.
10078         (_initialize_m68k_linux_nat): Adjust to C++ification.
10079
10080         * s390-linux-nat.c (s390_linux_nat_target): New class.
10081         (the_s390_linux_nat_target): New.
10082         (s390_linux_fetch_inferior_registers)
10083         (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
10084         (s390_insert_watchpoint, s390_remove_watchpoint)
10085         (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
10086         (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
10087         (s390_auxv_parse, s390_read_description): Refactor as methods of
10088         s390_linux_nat_target.
10089         (_initialize_s390_nat): Adjust to C++ification.
10090
10091         * sparc-linux-nat.c (sparc_linux_nat_target): New class.
10092         (the_sparc_linux_nat_target): New.
10093         (_initialize_sparc_linux_nat): Adjust to C++ification.
10094         * sparc-nat.c (sparc_fetch_inferior_registers)
10095         (sparc_store_inferior_registers): Remove target_ops parameter.
10096         * sparc-nat.h (sparc_fetch_inferior_registers)
10097         (sparc_store_inferior_registers): Remove target_ops parameter.
10098         * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
10099         (the_sparc64_linux_nat_target): New.
10100         (_initialize_sparc64_linux_nat): Adjust to C++ification.
10101
10102         * spu-linux-nat.c (spu_linux_nat_target): New class.
10103         (the_spu_linux_nat_target): New.
10104         (spu_child_post_startup_inferior, spu_child_post_attach)
10105         (spu_child_wait, spu_fetch_inferior_registers)
10106         (spu_store_inferior_registers, spu_xfer_partial)
10107         (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
10108         methods.
10109         (_initialize_spu_nat): Adjust to C++ification.
10110
10111         * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
10112         (the_tilegx_linux_nat_target): New.
10113         (fetch_inferior_registers, store_inferior_registers):
10114         Refactor as methods.
10115         (_initialize_tile_linux_nat): Adjust to C++ification.
10116
10117         * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
10118         (the_xtensa_linux_nat_target): New.
10119         (xtensa_linux_fetch_inferior_registers)
10120         (xtensa_linux_store_inferior_registers): Refactor as
10121         xtensa_linux_nat_target methods.
10122         (_initialize_xtensa_linux_nat): Adjust to C++ification.
10123
10124         * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
10125         (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
10126         (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
10127         (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
10128         (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
10129         (fbsd_stopped_by_sw_breakpoint)
10130         (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
10131         (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
10132         (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
10133         (fbsd_post_startup_inferior, fbsd_post_attach)
10134         (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
10135         (fbsd_set_syscall_catchpoint)
10136         (super_xfer_partial, super_resume, super_wait)
10137         (fbsd_supports_stopped_by_hw_breakpoint): Delete.
10138         (fbsd_handle_debug_trap): Remove target_ops parameter.
10139         (fbsd_nat_add_target): Delete.
10140         * fbsd-nat.h: Include "inf-ptrace.h".
10141         (fbsd_nat_add_target): Delete.
10142         (USE_SIGTRAP_SIGINFO): Define.
10143         (fbsd_nat_target): New class.
10144
10145         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
10146         (amd64bsd_store_inferior_registers): Remove target_ops parameter.
10147         (amd64bsd_target): Delete.
10148         * amd64-bsd-nat.h: New file.
10149         * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
10150         "x86-bsd-nat.h".
10151         (amd64_fbsd_nat_target): New class.
10152         (the_amd64_fbsd_nat_target): New.
10153         (amd64fbsd_read_description): Refactor as method of
10154         amd64_fbsd_nat_target.
10155         (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10156         (_initialize_amd64fbsd_nat): Adjust to C++ification.
10157         * amd64-nat.h (amd64bsd_target): Delete function declaration.
10158         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
10159         (i386bsd_store_inferior_registers): Remove target_ops parameter.
10160         (i386bsd_target): Delete.
10161         * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
10162         (i386bsd_fetch_inferior_registers)
10163         (i386bsd_store_inferior_registers): Declare.
10164         (i386_bsd_nat_target): New class.
10165         * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
10166         (the_i386_fbsd_nat_target): New.
10167         (i386fbsd_resume, i386fbsd_read_description): Refactor as
10168         i386_fbsd_nat_target methods.
10169         (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
10170         (_initialize_i386fbsd_nat): Adjust to C++ification.
10171         * x86-bsd-nat.c (super_mourn_inferior): Delete.
10172         (x86bsd_mourn_inferior, x86bsd_target): Delete.
10173         (_initialize_x86_bsd_nat): Adjust to C++ification.
10174         * x86-bsd-nat.h: Include "x86-nat.h".
10175         (x86bsd_target): Delete declaration.
10176         (x86bsd_nat_target): New class.
10177
10178         * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
10179         (the_aarch64_fbsd_nat_target): New.
10180         (aarch64_fbsd_fetch_inferior_registers)
10181         (aarch64_fbsd_store_inferior_registers): Refactor as methods of
10182         aarch64_fbsd_nat_target.
10183         (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
10184         * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
10185         (the_alpha_bsd_nat_target): New.
10186         (alphabsd_fetch_inferior_registers)
10187         (alphabsd_store_inferior_registers): Refactor as
10188         alpha_bsd_nat_target methods.
10189         (_initialize_alphabsd_nat): Refactor as methods of
10190         alpha_bsd_nat_target.
10191         * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
10192         (the_amd64_nbsd_nat_target): New.
10193         (_initialize_amd64nbsd_nat): Adjust to C++ification.
10194         * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
10195         (the_amd64_obsd_nat_target): New.
10196         (_initialize_amd64obsd_nat): Adjust to C++ification.
10197         * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
10198         (the_arm_fbsd_nat_target): New.
10199         (arm_fbsd_fetch_inferior_registers)
10200         (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
10201         (_initialize_arm_fbsd_nat): Refactor as methods of
10202         arm_fbsd_nat_target.
10203         (_initialize_arm_fbsd_nat): Adjust to C++ification.
10204         * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
10205         (the_arm_netbsd_nat_target): New.
10206         (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
10207         arm_netbsd_nat_target.
10208         (_initialize_arm_netbsd_nat): Adjust to C++ification.
10209         * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
10210         (the_hppa_nbsd_nat_target): New.
10211         (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
10212         hppa_nbsd_nat_target methods.
10213         (_initialize_hppanbsd_nat): Adjust to C++ification.
10214         * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
10215         (the_hppa_obsd_nat_target): New.
10216         (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
10217         methods of hppa_obsd_nat_target.
10218         (_initialize_hppaobsd_nat): Adjust to C++ification.  Use
10219         add_target.
10220         * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
10221         (_initialize_i386nbsd_nat): Adjust to C++ification.  Use
10222         add_target.
10223         * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
10224         (_initialize_i386obsd_nat): Use add_target.
10225         * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
10226         (the_m68k_bsd_nat_target): New.
10227         (m68kbsd_fetch_inferior_registers)
10228         (m68kbsd_store_inferior_registers): Refactor as methods of
10229         m68k_bsd_nat_target.
10230         (_initialize_m68kbsd_nat): Adjust to C++ification.
10231         * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
10232         (the_mips_fbsd_nat_target): New.
10233         (mips_fbsd_fetch_inferior_registers)
10234         (mips_fbsd_store_inferior_registers): Refactor as methods of
10235         mips_fbsd_nat_target.
10236         (_initialize_mips_fbsd_nat): Adjust to C++ification.  Use
10237         add_target.
10238         * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
10239         (the_mips_nbsd_nat_target): New.
10240         (mipsnbsd_fetch_inferior_registers)
10241         (mipsnbsd_store_inferior_registers): Refactor as methods of
10242         mips_nbsd_nat_target.
10243         (_initialize_mipsnbsd_nat): Adjust to C++ification.
10244         * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
10245         (the_mips64_obsd_nat_target): New.
10246         (mips64obsd_fetch_inferior_registers)
10247         (mips64obsd_store_inferior_registers): Refactor as methods of
10248         mips64_obsd_nat_target.
10249         (_initialize_mips64obsd_nat): Adjust to C++ification.  Use
10250         add_target.
10251         * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
10252         nbsd_nat_target.
10253         * nbsd-nat.h: Include "inf-ptrace.h".
10254         (nbsd_nat_target): New class.
10255         * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
10256         (obsd_wait): Refactor as methods of obsd_nat_target.
10257         (obsd_add_target): Delete.
10258         * obsd-nat.h: Include "inf-ptrace.h".
10259         (obsd_nat_target): New class.
10260         * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
10261         (the_ppc_fbsd_nat_target): New.
10262         (ppcfbsd_fetch_inferior_registers)
10263         (ppcfbsd_store_inferior_registers): Refactor as methods of
10264         ppc_fbsd_nat_target.
10265         (_initialize_ppcfbsd_nat): Adjust to C++ification.  Use
10266         add_target.
10267         * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
10268         (the_ppc_nbsd_nat_target): New.
10269         (ppcnbsd_fetch_inferior_registers)
10270         (ppcnbsd_store_inferior_registers): Refactor as methods of
10271         ppc_nbsd_nat_target.
10272         (_initialize_ppcnbsd_nat): Adjust to C++ification.
10273         * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
10274         (the_ppc_obsd_nat_target): New.
10275         (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
10276         methods of ppc_obsd_nat_target.
10277         (_initialize_ppcobsd_nat): Adjust to C++ification.  Use
10278         add_target.
10279         * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
10280         (the_sh_nbsd_nat_target): New.
10281         (shnbsd_fetch_inferior_registers)
10282         (shnbsd_store_inferior_registers): Refactor as methods of
10283         sh_nbsd_nat_target.
10284         (_initialize_shnbsd_nat): Adjust to C++ification.
10285         * sparc-nat.c (sparc_xfer_wcookie): Make extern.
10286         (inf_ptrace_xfer_partial): Delete.
10287         (sparc_xfer_partial, sparc_target): Delete.
10288         * sparc-nat.h (sparc_fetch_inferior_registers)
10289         (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
10290         (sparc_target): Delete function declaration.
10291         (sparc_target): New template class.
10292         * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
10293         (_initialize_sparcnbsd_nat): Adjust to C++ification.
10294         * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
10295         (_initialize_sparc64fbsd_nat): Adjust to C++ification.  Use
10296         add_target.
10297         * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
10298         (_initialize_sparc64nbsd_nat): Adjust to C++ification.
10299         * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
10300         (_initialize_sparc64obsd_nat): Adjust to C++ification.  Use
10301         add_target.
10302         * vax-bsd-nat.c (vax_bsd_nat_target): New class.
10303         (the_vax_bsd_nat_target): New.
10304         (vaxbsd_fetch_inferior_registers)
10305         (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
10306         methods.
10307         (_initialize_vaxbsd_nat): Adjust to C++ification.
10308
10309         * bsd-kvm.c (bsd_kvm_target): New class.
10310         (bsd_kvm_ops): Now a bsd_kvm_target.
10311         (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
10312         (bsd_kvm_files_info, bsd_kvm_fetch_registers)
10313         (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
10314         bsd_kvm_target.
10315         (bsd_kvm_return_one): Delete.
10316         (bsd_kvm_add_target): Adjust to C++ification.
10317
10318         * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
10319         (nto_procfs_target_procfs): New classes.
10320         (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
10321         (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
10322         (procfs_post_attach, procfs_wait, procfs_fetch_registers)
10323         (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
10324         (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
10325         (procfs_remove_hw_breakpoint, procfs_resume)
10326         (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
10327         (procfs_kill_inferior, procfs_store_registers)
10328         (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
10329         as methods of nto_procfs_target.
10330         (nto_procfs_ops): Now an nto_procfs_target_procfs.
10331         (nto_native_ops): Delete.
10332         (procfs_open, procfs_native_open): Delete.
10333         (nto_native_ops): Now an nto_procfs_target_native.
10334         (init_procfs_targets): Adjust to C++ification.
10335         (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
10336         (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
10337         Refactor as methods of nto_procfs_target.
10338
10339         * go32-nat.c (go32_nat_target): New class.
10340         (the_go32_nat_target): New.
10341         (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
10342         (go32_store_registers, go32_xfer_partial, go32_files_info)
10343         (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
10344         (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
10345         (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
10346         (go32_pid_to_str): Refactor as methods of go32_nat_target.
10347         (go32_target): Delete.
10348         (_initialize_go32_nat): Adjust to C++ification.
10349
10350         * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
10351         (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
10352         (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
10353         (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
10354         gnu_nat_target.
10355         (gnu_target): Delete.
10356         * gnu-nat.h (gnu_target): Delete.
10357         (gnu_nat_target): New class.
10358         * i386-gnu-nat.c (gnu_base_target): New.
10359         (i386_gnu_nat_target): New class.
10360         (the_i386_gnu_nat_target): New.
10361         (_initialize_i386gnu_nat): Adjust to C++ification.
10362
10363 2018-05-02  Pedro Alves  <palves@redhat.com>
10364
10365         * bfd-target.c (target_bfd_xclose): Rename to ...
10366         (target_bfd_close): ... this.
10367         (target_bfd_reopen): Adjust.
10368         * target.c (target_close): Remove references to to_xclose.
10369         * target.h (target_ops::to_xclose): Delete.
10370         (target_ops::to_close): Update comments.
10371
10372 2018-05-02  Pedro Alves  <palves@redhat.com>
10373
10374         * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
10375         "linux-nat.h".
10376         * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
10377         * inf-ptrace.c (inf_ptrace_register_u_offset)
10378         (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
10379         (inf_ptrace_store_register, inf_ptrace_store_registers)
10380         (inf_ptrace_trad_target): Move to ...
10381         * linux-nat-trad.c: ... this new file.
10382         * linux-nat-trad.h: New file.
10383         * linux-nat.c (linux_target_install_ops): Make extern.
10384         (linux_trad_target): Delete.
10385         * linux-nat.h (linux_trad_target): Delete declaration.
10386         (linux_target_install_ops): Declare.
10387         * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
10388         "linux-nat.h".
10389
10390 2018-05-02  Pedro Alves  <palves@redhat.com>
10391
10392         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10393         procfs_target/add_target here.
10394         * procfs.c (procfs_target): Make static.
10395         (_initialize_procfs): Call add_target here.
10396         * procfs.h (struct target_ops): Remove forward declaration.
10397         (procfs_target): Remove declaration.
10398         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
10399
10400 2018-05-02  Pedro Alves  <palves@redhat.com>
10401
10402         * procfs.c (procfs_stopped_by_watchpoint)
10403         (procfs_insert_watchpoint, procfs_remove_watchpoint)
10404         (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
10405         Forward declare.
10406         (procfs_use_watchpoints): Delete, move contents...
10407         (procfs_target): ... here.
10408         * procfs.h (procfs_use_watchpoints): Delete declaration.
10409         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
10410         procfs_use_watchpoints.
10411         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
10412         procfs_use_watchpoints.
10413
10414 2018-05-02  Tom Tromey  <tom@tromey.com>
10415
10416         PR python/20084:
10417         * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
10418         and var_zuinteger_unlimited.
10419         * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
10420         and PARAM_ZUINTEGER_UNLIMITED.
10421         (set_parameter_value): Handle var_zuinteger and
10422         var_zuinteger_unlimited.
10423         (add_setshow_generic): Likewise.
10424         (parmpy_init): Likewise.
10425
10426 2018-04-28  Dan Robertson  <danlrobertson89@gmail.com>
10427
10428         PR rust/23124
10429         * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
10430         pointer is not null before dereferencing it.
10431
10432 2018-04-30  Tom Tromey  <tom@tromey.com>
10433
10434         * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
10435         is_mi_like_p.
10436
10437 2018-04-30  Tom Tromey  <tom@tromey.com>
10438
10439         * breakpoint.c (mention): Remove use of is_mi_like_p.
10440         (print_mention_ranged_breakpoint): Likewise.
10441         * break-catch-throw.c (print_it_exception_catchpoint): Remove use
10442         of is_mi_like_p.
10443
10444 2018-04-30  Tom Tromey  <tom@tromey.com>
10445
10446         * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
10447
10448 2018-04-30  Tom Tromey  <tom@tromey.com>
10449
10450         * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
10451         (info_spu_event_command): Remove some uses of is_mi_like_p.
10452
10453 2018-04-30  Tom Tromey  <tom@tromey.com>
10454
10455         * python/py-framefilter.c (py_print_single_arg)
10456         (enumerate_locals, py_print_args, py_print_frame): Remove some
10457         uses of is_mi_like_p.
10458
10459 2018-04-30  Tom Tromey  <tom@tromey.com>
10460
10461         * ui-out.c: Update.
10462         * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
10463         * ui-out.h (ui_out::is_mi_like_p): Now const.
10464         (ui_out::do_is_mi_like_p): Now const.
10465         * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
10466
10467 2018-04-30  Tom Tromey  <tom@tromey.com>
10468
10469         * varobj.c (varobj_set_visualizer): Use new_reference.
10470         * python/python.c (gdbpy_decode_line): Use new_reference.
10471         * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
10472         new_reference.
10473
10474 2018-04-30  Tom Tromey  <tom@tromey.com>
10475
10476         * varobj.c (install_new_value): Use new_reference.
10477         * value.h (value_incref): Return void.  Swap intro comment with
10478         value_decref.
10479         * value.c (set_value_parent): Use new_reference.
10480         (value_incref): Return void.  Update intro comment.
10481         (release_value): Use new_reference.
10482         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
10483
10484 2018-04-30  Tom Tromey  <tom@tromey.com>
10485
10486         * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
10487         * gdb_bfd.h (new_bfd_ref): Remove.
10488         (gdb_bfd_open): Update comment.
10489         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
10490         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
10491         (gdb_bfd_fdopenr): Use new_reference.
10492         * exec.c (exec_file_attach): Use new_reference.
10493
10494 2018-04-30  Tom Tromey  <tom@tromey.com>
10495
10496         * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
10497         method.
10498
10499 2018-04-30  Tom Tromey  <tom@tromey.com>
10500
10501         * jit.c (jit_read_code_entry): Use type_align.
10502         * i386-tdep.c (i386_gdbarch_init): Don't call
10503         set_gdbarch_long_long_align_bit.
10504         * gdbarch.sh: Remove long_long_align_bit.
10505         * gdbarch.c, gdbarch.h: Rebuild.
10506         * arc-tdep.c (arc_type_align): New function.
10507         (arc_gdbarch_init): Use arc_type_align.  Don't call
10508         set_gdbarch_long_long_align_bit.
10509
10510 2018-04-30  Tom Tromey  <tom@tromey.com>
10511
10512         * rust-lang.c (rust_type_alignment): Remove.
10513         (rust_composite_type): Use type_align.
10514
10515 2018-04-30  Tom Tromey  <tom@tromey.com>
10516
10517         * NEWS: Mention Type.align.
10518         * python/py-type.c (typy_get_alignof): New function.
10519         (type_object_getset): Add "alignof".
10520
10521 2018-04-30  Tom Tromey  <tom@tromey.com>
10522
10523         PR exp/17095:
10524         * NEWS: Update.
10525         * std-operator.def (UNOP_ALIGNOF): New operator.
10526         * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
10527         New.
10528         * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
10529         * c-lang.c (c_op_print_tab): Add alignof.
10530         * c-exp.y (ALIGNOF): New token.
10531         (exp): Add "ALIGNOF" production.
10532         (ident_tokens): Add _Alignof and alignof.
10533
10534 2018-04-30  Tom Tromey  <tom@tromey.com>
10535
10536         * i386-tdep.c (i386_type_align): New function.
10537         (i386_gdbarch_init): Update.
10538         * gdbarch.sh (type_align): New method.
10539         * gdbarch.c, gdbarch.h: Rebuild.
10540         * arch-utils.h (default_type_align): Declare.
10541         * arch-utils.c (default_type_align): New function.
10542         * gdbtypes.h (TYPE_ALIGN_BITS): New define.
10543         (struct type) <align_log2>: New field.
10544         <instance_flags>: Now a bitfield.
10545         (TYPE_RAW_ALIGN): New macro.
10546         (type_align, type_raw_align, set_type_align): Declare.
10547         * gdbtypes.c (type_align, type_raw_align, set_type_align): New
10548         functions.
10549         * dwarf2read.c (quirk_rust_enum): Set type alignment.
10550         (get_alignment, maybe_set_alignment): New functions.
10551         (read_structure_type, read_enumeration_type, read_array_type)
10552         (read_set_type, read_tag_pointer_type, read_tag_reference_type)
10553         (read_subrange_type, read_base_type): Set type alignment.
10554
10555 2018-04-30  Simon Marchi  <simon.marchi@ericsson.com>
10556
10557         * dwarf2read.c (read_index_from_section): Use bool.
10558
10559 2018-04-29  Fabian Groffen  <grobian@gentoo.org>
10560
10561         PR gdb/22950
10562         * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
10563         with #ifdef.
10564
10565 2018-04-29  John Reiser  <jreiser@BitWagon.com>
10566
10567         PR build/22873
10568         * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
10569         last step, and do it atomically.
10570
10571 2018-04-27  Alexandre Oliva  <aoliva@redhat.com>
10572
10573         * compile/compile-c-types.c (convert_int, convert_float):
10574         Update for C FE v1.
10575
10576 2018-04-27  Tom Tromey  <tom@tromey.com>
10577
10578         PR rust/22545:
10579         * rust-lang.c (rust_inclusive_range_type_p): New function.
10580         (rust_range): Handle inclusive ranges.
10581         (rust_compute_range): Likewise.
10582         * rust-exp.y (struct rust_op) <inclusive>: New field.
10583         (DOTDOTEQ): New constant.
10584         (range_expr): Add "..=" productions.
10585         (operator_tokens): Add "..=" token.
10586         (ast_range): Add "inclusive" parameter.
10587         (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
10588         ranges.
10589         * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
10590         bounds values.
10591         * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
10592         LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
10593         Update comments.
10594         * expprint.c (print_subexp_standard): Handle new bounds values.
10595         (dump_subexp_body_standard): Likewise.
10596
10597 2018-04-27  Tom Tromey  <tom@tromey.com>
10598
10599         * configure: Rebuild.
10600         * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
10601         * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
10602         "OVERRIDE".
10603         (class symbol_needs_eval_context): Likewise.
10604         * dwarf2read.c (mock_mapped_index::symbol_name_count)
10605         (mock_mapped_index::symbol_name_at): Use "override".  Remove
10606         "virtual".
10607         * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
10608         "override".
10609         (class dwarf_expr_executor): Use "override", not "OVERRIDE".
10610         * aarch64-tdep.c (instruction_reader::read): Use "override".
10611         (instruction_reader_test::read): Likewise.
10612         * arm-tdep.c (instruction_reader::read): Use "override".
10613         (instruction_reader_thumb::read): Likewise.
10614
10615 2018-04-26  Andrzej Kaczmarek  <andrzej.kaczmarek@codecoup.pl>
10616
10617         PR remote/9665
10618         * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
10619         instead of remote_send.
10620         (remote_send): Remove.
10621
10622 2018-04-26  Pedro Alves  <palves@redhat.com>
10623
10624         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
10625         find_function_start_sal instead of find_pc_line.
10626
10627 2018-04-26  Pedro Alves  <palves@redhat.com>
10628
10629         * breakpoint.c (set_breakpoint_location_function): Handle
10630         mst_data_gnu_ifunc.
10631         * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
10632         * elfread.c (elf_symtab_read): Give data symbols with
10633         BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
10634         (elf_rel_plt_read): Update comment.
10635         * linespec.c (convert_linespec_to_sals): Handle
10636         mst_data_gnu_ifunc.
10637         (minsym_found): Handle mst_data_gnu_ifunc.
10638         * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
10639         (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
10640         * parse.c (find_minsym_type_and_address): Handle
10641         mst_data_gnu_ifunc.
10642         * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
10643         * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
10644         * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
10645         comment.
10646         <mst_data_gnu_ifunc>: New enumerator.
10647
10648 2018-04-26  Pedro Alves  <palves@redhat.com>
10649
10650         * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
10651         (lookup_minimal_symbol_by_pc_section): ... this.  Replace
10652         'want_trampoline' parameter by a lookup_msym_prefer parameter.
10653         Handle it.
10654         (lookup_minimal_symbol_by_pc_section): Delete old implementation.
10655         (lookup_minimal_symbol_by_pc): Adjust.
10656         (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
10657         (lookup_solib_trampoline_symbol_by_pc): Adjust.
10658         * minsyms.h (lookup_msym_prefer): New enum.
10659         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10660         parameter by a lookup_msym_prefer parameter.
10661
10662 2018-04-26  Pedro Alves  <palves@redhat.com>
10663
10664         * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
10665         ends in "@plt" instead of looking at the symbol's section.
10666
10667 2018-04-26  Pedro Alves  <palves@redhat.com>
10668
10669         * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete.  Remove
10670         all references.
10671         (find_pc_partial_function_gnu_ifunc): Rename to ...
10672         (find_pc_partial_function): ... this, and remove references to
10673         'is_gnu_ifunc_p'.
10674         (find_pc_partial_function): Delete old implementation.
10675         * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
10676
10677 2018-04-26  Pedro Alves  <palves@redhat.com>
10678
10679         * linespec.c (struct bound_minimal_symbol_search_key): New.
10680         (convert_linespec_to_sals): Sort minimal symbols earlier.  Don't
10681         skip first line if we found a GNU ifunc minimal symbol by name.
10682         (compare_msymbols): Change parameters to work with a destructured
10683         lhs minsym.
10684         (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
10685         functions.
10686
10687 2018-04-26  Pedro Alves  <palves@redhat.com>
10688
10689         * breakpoint.c (set_breakpoint_location_function): Don't resolve
10690         ifunc targets here.  Instead, if we have an ifunc minsym, use its
10691         address/name.
10692         (add_location_to_breakpoint): Store the minsym and the objfile in
10693         the breakpoint location.
10694         * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
10695         * linespec.c (minsym_found): Resolve GNU ifunc targets here.
10696         Record the minsym in the sal.
10697         * symtab.h (symtab_and_line) <msymbol>: New field.
10698
10699 2018-04-26  Pedro Alves  <palves@redhat.com>
10700
10701         * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
10702         unless we actually resolved the ifunc.
10703
10704 2018-04-26  Pedro Alves  <palves@redhat.com>
10705
10706         * c-exp.y (variable production): Prefer ifunc minsyms over
10707         regular function symbols.
10708         * symtab.c (find_gnu_ifunc): New function.
10709         * minsyms.h (lookup_msym_prefer): New enum.
10710         (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
10711         parameter by a lookup_msym_prefer parameter.
10712         * symtab.h (find_gnu_ifunc): New declaration.
10713
10714 2018-04-26  Pedro Alves  <palves@redhat.com>
10715
10716         * blockframe.c (find_gnu_ifunc_target_type): New function.
10717         (find_function_type): New.
10718         * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
10719         return a value with a memory address.
10720         (eval_call): For calls to GNU ifunc functions, try to find the
10721         type of the target function from the type that the resolver
10722         returns.
10723         * gdbtypes.c (objfile_type): Don't install a return type for ifunc
10724         symbols.
10725         * infcall.c (find_function_return_type): Delete.
10726         (find_function_addr): Add 'function_type' parameter.  For calls to
10727         GNU ifunc functions, try to find the type of the target function
10728         from the type that the resolver returns, and return it via
10729         FUNCTION_TYPE.
10730         (call_function_by_hand_dummy): Adjust to use the function type
10731         returned by find_function_addr.
10732         (find_function_addr): Add 'function_type' parameter and move
10733         description here.
10734         * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
10735         declarations.
10736
10737 2018-04-26  Pedro Alves  <palves@redhat.com>
10738
10739         * c-exp.y (variable production): Skip finding an alias for ifunc
10740         symbols.
10741
10742 2018-04-26  Pedro Alves  <palves@redhat.com>
10743
10744         * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
10745
10746 2018-04-25  Pedro Alves  <palves@redhat.com>
10747
10748         * infcmd.c (kill_command): Print the pid as string, not the whole
10749         thread's ptid.  Add comment.  s/has been killed/killed/ in output
10750         message.
10751         * remote.c (remote_detach_1): Print the pid as string, not the
10752         whole thread's ptid.
10753
10754 2018-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
10755             Sergio Durigan Junior  <sergiodj@redhat.com>
10756             Pedro Alves  <palves@redhat.com>
10757
10758         * infcmd.c (kill_command): Print message when inferior has
10759         been killed.
10760         * inferior.c (print_inferior_events): Remove 'static'.  Set as
10761         '1'.
10762         (add_inferior): Improve message printed when
10763         'print_inferior_events' is on.
10764         (exit_inferior): Remove message printed when
10765         'print_inferior_events' is on.
10766         (detach_inferior): Improve message printed when
10767         'print_inferior_events' is on.
10768         (initialize_inferiors): Use 'add_inferior_silent' to set
10769         'current_inferior_'.
10770         * inferior.h (print_inferior_events): Declare here as
10771         'extern'.
10772         * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
10773         '[Detaching...]' messages when 'print_inferior_events' is on.
10774         Use 'add_thread_silent' instead of 'add_thread'.  Add '[' and ']'
10775         as prefix/suffix for messages.  Remove periods.  Fix erroneous
10776         'Detaching after fork from child...', replace it by '... from
10777         parent...'.
10778         (handle_vfork_child_exec_or_exit): Add '[' and ']' as
10779         prefix/suffix when printing 'Detaching...' messages.  Print
10780         them when 'print_inferior_events' is on.
10781         * remote.c (remote_detach_1): Print message when detaching
10782         from inferior and '!is_fork_parent'.
10783
10784 2018-04-24  Tom Tromey  <tom@tromey.com>
10785
10786         * cli-out.h: Reindent.
10787
10788 2018-04-24  Tom Tromey  <tom@tromey.com>
10789
10790         * cli-out.c (cli_ui_out::out_field_fmt): Remove.
10791         (cli_ui_out::do_field_string): Use fputs_filtered.
10792         * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
10793
10794 2018-04-23  Tom Tromey  <tom@tromey.com>
10795
10796         * guile/scm-frame.c (gdbscm_frame_read_var): Use
10797         gdb::unique_xmalloc_ptr.
10798
10799 2018-04-23  Tom Tromey  <tom@tromey.com>
10800
10801         * configure: Rebuild.
10802
10803 2018-04-22  Rajendra SY  <rajendra.sy@gmail.com>
10804
10805         PR gdb/23095
10806         * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
10807         prepare_for_testing.  Set normal_bp to r_debug_state if target
10808         is bsd.
10809
10810 2018-04-21  Pedro Alves  <palves@redhat.com>
10811             Rajendra SY  <rajendra.sy@gmail.com>
10812
10813         * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
10814         * remote.c (extended_remote_attach): In all-stop mode, mark the
10815         thread as executing.
10816
10817 2018-04-19  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
10818
10819         * thread.c (thread_apply_all_command): Fix comment.
10820         (thread_command): Fix comment.
10821
10822 2018-04-10  Alan Hayward  <alan.hayward@arm.com>
10823
10824         * common/tdesc.h (tdesc_create_feature): Remove xml filename
10825         parameter.
10826         * features/aarch64-core.c (create_feature_aarch64_core):
10827         Regenerate.
10828         * features/aarch64-fpu.c (create_feature_aarch64_fpu):
10829         Likewise.
10830         * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
10831         Likewise.
10832         * features/i386/32bit-avx512.c
10833         (create_feature_i386_32bit_avx512): Likewise.
10834         * features/i386/32bit-core.c (create_feature_i386_32bit_core):
10835         Likewise.
10836         * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
10837         Likewise.
10838         * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
10839         Likewise.
10840         * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
10841         Likewise.
10842         * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
10843         Likewise.
10844         * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
10845         Likewise.
10846         * features/i386/64bit-avx512.c
10847         (create_feature_i386_64bit_avx512): Likewise.
10848         * features/i386/64bit-core.c (create_feature_i386_64bit_core):
10849         Likewise.
10850         * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
10851         Likewise.
10852         * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
10853         Likewise.
10854         * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
10855         Likewise.
10856         * features/i386/64bit-segments.c
10857         (create_feature_i386_64bit_segments): Likewise.
10858         * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
10859         Likewise.
10860         * features/i386/x32-core.c
10861         (create_feature_i386_x32_core): Likewise.
10862         * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
10863         * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
10864         * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
10865         * target-descriptions.c: In generated code, don't pass xml
10866         filename.
10867
10868 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10869
10870         * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
10871         (print_xml_feature::visit_post): Likewise.
10872         (print_xml_feature::visit): Likewise.
10873         * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
10874         (print_xml_feature): Add new class.
10875         * regformats/regdat.sh: Null xmltarget on feature targets.
10876         * target-descriptions.c (struct target_desc): Add xmltarget.
10877         (maintenance_check_tdesc_xml_convert): Add unittest function.
10878         (tdesc_get_features_xml): Add function to get xml.
10879         (maintenance_check_xml_descriptions): Test xml generation.
10880         * xml-tdesc.c (string_read_description_xml): Add function.
10881         * xml-tdesc.h (string_read_description_xml): Add declaration.
10882
10883 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10884
10885         * features/Makefile: Add feature marker to targets with new style
10886         target descriptions.
10887         * regformats/aarch64.dat: Regenerate.
10888         * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
10889         * regformats/i386/amd64-avx-linux.dat: Likewise.
10890         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
10891         * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
10892         * regformats/i386/amd64-linux.dat: Likewise.
10893         * regformats/i386/amd64-mpx-linux.dat: Likewise.
10894         * regformats/i386/amd64.dat: Likewise.
10895         * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
10896         * regformats/i386/i386-avx-linux.dat: Likewise.
10897         * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
10898         * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
10899         * regformats/i386/i386-linux.dat: Likewise.
10900         * regformats/i386/i386-mmx-linux.dat: Likewise.
10901         * regformats/i386/i386-mpx-linux.dat: Likewise.
10902         * regformats/i386/i386.dat: Likewise.
10903         * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
10904         * regformats/i386/x32-avx-linux.dat: Likewise.
10905         * regformats/i386/x32-linux.dat: Likewise.
10906         * regformats/tic6x-c62x-linux.dat: Likewise.
10907         * regformats/tic6x-c64x-linux.dat: Likewise.
10908         * regformats/tic6x-c64xp-linux.dat: Likewise.
10909         * regformats/regdat.sh: Parse feature marker.
10910
10911 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10912
10913         * common/tdesc.h (tdesc_architecture_name): Add new declaration.
10914         (tdesc_osabi_name): Likewise.
10915         * target-descriptions.c (tdesc_architecture_name): Add new
10916         function.
10917         (tdesc_osabi_name): Likewise.
10918
10919 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10920
10921         * common/tdesc.c (tdesc_predefined_type): Move to here.
10922         (tdesc_named_type): Likewise.
10923         (tdesc_create_vector): Likewise.
10924         (tdesc_create_struct): Likewise.
10925         (tdesc_set_struct_size): Likewise.
10926         (tdesc_create_union): Likewise.
10927         (tdesc_create_flags): Likewise.
10928         (tdesc_create_enum): Likewise.
10929         (tdesc_add_field): Likewise.
10930         (tdesc_add_typed_bitfield): Likewise.
10931         (tdesc_add_bitfield): Likewise.
10932         (tdesc_add_flag): Likewise.
10933         (tdesc_add_enum_value): Likewise.
10934         * common/tdesc.h (struct tdesc_type_builtin): Likewise.
10935         (struct tdesc_type_vector): Likewise.
10936         (struct tdesc_type_field): Likewise.
10937         (struct tdesc_type_with_fields): Likewise.
10938         (tdesc_create_enum): Add declaration.
10939         (tdesc_add_typed_bitfield): Likewise.
10940         (tdesc_add_enum_value): Likewise.
10941         * target-descriptions.c (tdesc_type_field): Move from here.
10942         (tdesc_type_builtin): Likewise.
10943         (tdesc_type_vector): Likewise.
10944         (tdesc_type_with_fields): Likewise.
10945         (tdesc_predefined_types): Likewise.
10946         (tdesc_named_type): Likewise.
10947         (tdesc_create_vector): Likewise.
10948         (tdesc_create_struct): Likewise.
10949         (tdesc_set_struct_size): Likewise.
10950         (tdesc_create_union): Likewise.
10951         (tdesc_create_flags): Likewise.
10952         (tdesc_create_enum): Likewise.
10953         (tdesc_add_field): Likewise.
10954         (tdesc_add_typed_bitfield): Likewise.
10955         (tdesc_add_bitfield): Likewise.
10956         (tdesc_add_flag): Likewise.
10957         (tdesc_add_enum_value): Likewise.
10958         * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
10959         (tdesc_add_typed_bitfield): Likewise.
10960         (tdesc_add_enum_value): Likewise.
10961
10962 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10963
10964         * common/tdesc.c (tdesc_feature::accept): Move to here.
10965         (tdesc_feature::operator==): Likewise.
10966         (tdesc_create_reg): Likewise.
10967         * common/tdesc.h (tdesc_type_kind): Likewise.
10968         (struct tdesc_type): Likewise.
10969         (struct tdesc_feature): Likewise.
10970         * regformats/regdat.sh: Create a feature.
10971         * target-descriptions.c (tdesc_type_kind): Move from here.
10972         (tdesc_type): Likewise.
10973         (tdesc_type_up): Likewise.
10974         (tdesc_feature): Likewise.
10975         (tdesc_create_reg): Likewise.
10976
10977 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
10978
10979         * Makefile.in: Add arch/tdesc.c
10980         * common/tdesc.c: New file.
10981         * common/tdesc.h (tdesc_element_visitor): Move to here.
10982         (tdesc_element): Likewise.
10983         (tdesc_reg): Likewise.
10984         (tdesc_reg_up): Likewise.
10985         * regformats/regdef.h (reg): Add offset to constructors.
10986         * target-descriptions.c (tdesc_element_visitor): Move from here.
10987         (tdesc_element): Likewise.
10988         (tdesc_reg): Likewise.
10989         (tdesc_reg_up): Likewise.
10990
10991 2018-04-17  Tom Tromey  <tom@tromey.com>
10992
10993         * dwarf2read.c (quirk_rust_enum): Conditionally drop the
10994         discriminant field.
10995
10996 2018-04-17  Tom Tromey  <tom@tromey.com>
10997
10998         * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
10999
11000 2018-04-17  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11001
11002         * symtab.c (print_symbol_info): Skip printing filename and line
11003         number when `last' is NULL.
11004         (symtab_symbol_info): Use empty string instead of NULL for first
11005         invocation of print_symbol_info.
11006         (rbreak_command): Pass NULL to `last' parameter of
11007         print_symbol_info.
11008
11009 2018-04-16  Simon Marchi  <simon.marchi@ericsson.com>
11010
11011         * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
11012         instead of nullptr.
11013
11014 2018-04-16  Pedro Alves  <palves@redhat.com>
11015
11016         * MAINTAINERS (sh): Remove.
11017         * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
11018         (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
11019         (ALLDEPFILES): Remove sh64-tdep.c.
11020         * NEWS: Mentions that support for SH-5/SH64 is removed.
11021         * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
11022         (sh*-*-openbsd*): Ditto.
11023         (sh64-*-elf*): Remove.
11024         (sh*): Remove.
11025         * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
11026         * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
11027         * sh-tdep.c: No longer include "sh64-tdep.h".
11028         (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
11029         * sh64-tdep.c, sh64-tdep.h: Remove files.
11030
11031 2018-04-16  Pedro Alves  <palves@redhat.com>
11032
11033         * MAINTAINERS: Remove m88k.
11034         * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
11035         (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
11036         (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
11037         * NEWS: Mention that support for m88k was removed.
11038         * configure.host (m88*-*-*): Remove support.
11039         * configure.nat (m88k-*-*): Remove support.
11040         * configure.tgt (m88*-*-openbsd*): Remove.
11041         * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
11042
11043 2018-04-15  Simon Marchi  <simon.marchi@polymtl.ca>
11044
11045         * configure.tgt (x86_tobjs): New variable.
11046         (amd64_tobjs, i386_tobjs): Use it.
11047
11048 2018-04-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11049
11050         * symtab.c (print_symbol_info): Precede the symbol definition by
11051         the line number when available.
11052         * NEWS: Advertise this enhancement.
11053
11054 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11055
11056         * NEWS (New options): announce set/show record btrace cpu.
11057         * btrace.c: Include record-btrace.h.
11058         (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
11059         the vendor is unknown.
11060         (btrace_compute_ftrace_1): Add cpu parameter.  Update callers.
11061         Maybe overwrite the btrace configuration's cpu.
11062         (btrace_compute_ftrace): Add cpu parameter.  Update callers.
11063         (btrace_fetch): Add cpu parameter.  Update callers.
11064         (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
11065         Maybe overwrite the btrace configuration's cpu.  Skip enabling
11066         errata workarounds if the vendor is unknown.
11067         * python/py-record-btrace.c: Include record-btrace.h.
11068         (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
11069         (recpy_bt_function_call_history): Call record_btrace_get_cpu.
11070         * record-btrace.c (record_btrace_cpu_state_kind): New.
11071         (record_btrace_cpu): New.
11072         (set_record_btrace_cpu_cmdlist): New.
11073         (record_btrace_get_cpu): New.
11074         (require_btrace_thread, record_btrace_info)
11075         (record_btrace_resume_thread): Call record_btrace_get_cpu.
11076         (cmd_set_record_btrace_cpu_none): New.
11077         (cmd_set_record_btrace_cpu_auto): New.
11078         (cmd_set_record_btrace_cpu): New.
11079         (cmd_show_record_btrace_cpu): New.
11080         (_initialize_record_btrace): Initialize set/show record btrace cpu
11081         commands.
11082         * record-btrace.h (record_btrace_get_cpu): New.
11083
11084 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11085
11086         * record.c (set_record_command): Fix typo in message.
11087
11088 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11089
11090         * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
11091
11092 2018-04-13  Markus Metzger  <markus.t.metzger@intel.com>
11093
11094         * infrun.c (process_event_stop_test): Call
11095         gdbarch_in_indirect_branch_thunk.
11096         * gdbarch.sh (in_indirect_branch_thunk): New.
11097         * gdbarch.c: Regenerated.
11098         * gdbarch.h: Regenerated.
11099         * x86-tdep.h: New.
11100         * x86-tdep.c: New.
11101         * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
11102         (HFILES_NO_SRCDIR): Add x86-tdep.h.
11103         (ALLDEPFILES): Add x86-tdep.c.
11104         * arch-utils.h (default_in_indirect_branch_thunk): New.
11105         * arch-utils.c (default_in_indirect_branch_thunk): New.
11106         * i386-tdep: Include x86-tdep.h.
11107         (i386_in_indirect_branch_thunk): New.
11108         (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
11109         function.
11110         * amd64-tdep: Include x86-tdep.h.
11111         (amd64_in_indirect_branch_thunk): New.
11112         (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
11113
11114 2018-04-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11115
11116         PR gdb/23053
11117         * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
11118         (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
11119         (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
11120         regression.
11121
11122 2018-04-12  Tom Tromey  <tom@tromey.com>
11123
11124         * rust-lang.c (rust_print_struct_def): Remove univariant code.
11125         (rust_evaluate_subexp): Likewise.
11126
11127 2018-04-12  Pedro Alves  <palves@redhat.com>
11128
11129         * procfs.c (procfs_detach): Make forward declaration's prototype
11130         match definition's protototype.
11131         (proc_get_LDT_entry): Remove stale do_cleanups call.
11132
11133 2018-04-12  Pedro Alves  <palves@redhat.com>
11134
11135         * target.h (target_ops::to_has_exited): Delete.
11136         (target_has_exited): Delete.
11137         * target-delegates.c: Regenerate.
11138
11139 2018-04-11  Pedro Alves  <palves@redhat.com>
11140
11141         * target.c (fileio_fh_t::t): Add comment.
11142         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11143         (target_fileio_close): Handle a NULL target.
11144         (invalidate_fileio_fh): New.
11145         (target_close): Call it.
11146         * remote.c (remote_hostio_send_command): No longer check whether
11147         remote_desc is open.
11148
11149 2018-04-11  Pedro Alves  <palves@redhat.com>
11150
11151         * target.c (fileio_fh_t): Make it a named struct instead of a
11152         typedef.
11153         (fileio_fh_t::is_closed): New method.
11154         (DEF_VEC_O (fileio_fh_t)): Remove.
11155         (fileio_fhandles): Now a std::vector.
11156         (is_closed_fileio_fh): Delete.
11157         (acquire_fileio_fd): Adjust.  Rename parameters.
11158         (release_fileio_fd): Adjust.
11159         (fileio_fd_to_fh): Reimplement as a function instead of a macro.
11160         (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
11161         (target_fileio_close): Adjust.
11162
11163 2018-04-10  Simon Marchi  <simon.marchi@ericsson.com>
11164
11165         * auto-load.c (auto_load_safe_path_vec_update): Iterate by
11166         index.
11167
11168 2018-04-10  Pedro Alves  <palves@redhat.com>
11169
11170         * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
11171         (scoped_finish_thread_state): New class.
11172         * infcmd.c (run_command_1): Use it instead of finish_thread_state
11173         cleanup.
11174         * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
11175         (fetch_inferior_event, normal_stop): Likewise.
11176         * thread.c (finish_thread_state_cleanup): Delete.
11177
11178 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11179             Pedro Alves  <palves@redhat.com>
11180
11181         * value.c: Include "selftest.h" and "common/array-view.h".
11182         (struct range) <operator ==>: New.
11183         (test_ranges_contain): New.
11184         (check_ranges_vector): New.
11185         (test_insert_into_bit_range_vector): New.
11186         (_initialize_values): Register selftests.
11187         * common/array-view.h (operator==, operator!=): New.
11188
11189 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11190
11191         * common/gdb_vecs.h (unordered_remove): Add overload that takes
11192         an iterator.
11193         * inline-frame.c: Include <algorithm>.
11194         (struct inline_state): Add constructor.
11195         (inline_state_s): Remove.
11196         (DEF_VEC_O(inline_state_s)): Remove.
11197         (inline_states): Change type to std::vector.
11198         (find_inline_frame_state): Adjust to std::vector.
11199         (allocate_inline_frame_state): Remove.
11200         (clear_inline_frame_state): Adjust to std::vector.
11201         (skip_inline_frames): Adjust to std::vector.
11202
11203 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11204
11205         * tracepoint.h (struct trace_state_variable): Add constructor.
11206         <name>: Change type to std::string.
11207         * tracepoint.c (tsv_s): Remove.
11208         (DEF_VEC_O(tsv_s)): Remove.
11209         (tvariables): Change to std::vector.
11210         (create_trace_state_variable): Adjust to std::vector.
11211         (find_trace_state_variable): Likewise.
11212         (find_trace_state_variable_by_number): Likewise.
11213         (delete_trace_state_variable): Likewise.
11214         (trace_variable_command): Adjust to std::string.
11215         (delete_trace_variable_command): Likewise.
11216         (tvariables_info_1): Adjust to std::vector.
11217         (save_trace_state_variables): Likewise.
11218         (start_tracing): Likewise.
11219         (merge_uploaded_trace_state_variables): Adjust to std::vector
11220         and std::string.
11221         * target.h (struct target_ops)
11222         <to_download_trace_state_variable>: Pass reference to
11223         trace_state_variable.
11224         * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
11225         * target-delegates.c: Re-generate.
11226         * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
11227         (mi_tsv_deleted): Likewise.
11228         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
11229         * remote.c (remote_download_trace_state_variable): Change
11230         pointer to reference and adjust.
11231         * make-target-delegates (parse_argtypes): Handle references.
11232         (write_function_header): Likewise.
11233         (munge_type): Likewise.
11234
11235 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11236
11237         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11238         string_view-selftests.c.
11239         * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
11240         testsuite.
11241         * unittests/basic_string_view/cons/char/1.cc: Likewise.
11242         * unittests/basic_string_view/cons/char/2.cc: Likewise.
11243         * unittests/basic_string_view/cons/char/3.cc: Likewise.
11244         * unittests/basic_string_view/element_access/char/1.cc:
11245         Likewise.
11246         * unittests/basic_string_view/element_access/char/empty.cc:
11247         Likewise.
11248         * unittests/basic_string_view/element_access/char/front_back.cc:
11249         Likewise.
11250         * unittests/basic_string_view/inserters/char/2.cc: Likewise.
11251         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
11252         Likewise.
11253         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
11254         Likewise.
11255         * unittests/basic_string_view/modifiers/swap/char/1.cc:
11256         Likewise.
11257         * unittests/basic_string_view/operations/compare/char/1.cc:
11258         Likewise.
11259         * unittests/basic_string_view/operations/compare/char/13650.cc:
11260         Likewise.
11261         * unittests/basic_string_view/operations/copy/char/1.cc:
11262         Likewise.
11263         * unittests/basic_string_view/operations/data/char/1.cc:
11264         Likewise.
11265         * unittests/basic_string_view/operations/find/char/1.cc:
11266         Likewise.
11267         * unittests/basic_string_view/operations/find/char/2.cc:
11268         Likewise.
11269         * unittests/basic_string_view/operations/find/char/3.cc:
11270         Likewise.
11271         * unittests/basic_string_view/operations/find/char/4.cc:
11272         Likewise.
11273         * unittests/basic_string_view/operations/rfind/char/1.cc:
11274         Likewise.
11275         * unittests/basic_string_view/operations/rfind/char/2.cc:
11276         Likewise.
11277         * unittests/basic_string_view/operations/rfind/char/3.cc:
11278         Likewise.
11279         * unittests/basic_string_view/operations/substr/char/1.cc:
11280         Likewise.
11281         * unittests/basic_string_view/operators/char/2.cc: Likewise.
11282         * unittests/string_view-selftests.c: New file.
11283
11284 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11285
11286         * unittests/basic_string_view/capacity/1.cc: New file.
11287         * unittests/basic_string_view/capacity/empty_neg.cc: New file.
11288         * unittests/basic_string_view/cons/char/1.cc: New file.
11289         * unittests/basic_string_view/cons/char/2.cc: New file.
11290         * unittests/basic_string_view/cons/char/3.cc: New file.
11291         * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
11292         * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
11293         * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
11294         * unittests/basic_string_view/element_access/char/1.cc: New file.
11295         * unittests/basic_string_view/element_access/char/2.cc: New file.
11296         * unittests/basic_string_view/element_access/char/empty.cc: New file.
11297         * unittests/basic_string_view/element_access/char/front_back.cc: New file.
11298         * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
11299         * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
11300         * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
11301         * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
11302         * unittests/basic_string_view/include.cc: New file.
11303         * unittests/basic_string_view/inserters/char/1.cc: New file.
11304         * unittests/basic_string_view/inserters/char/2.cc: New file.
11305         * unittests/basic_string_view/inserters/char/3.cc: New file.
11306         * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
11307         * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
11308         * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
11309         * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
11310         * unittests/basic_string_view/literals/types.cc: New file.
11311         * unittests/basic_string_view/literals/values.cc: New file.
11312         * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
11313         * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
11314         * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
11315         * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
11316         * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
11317         * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
11318         * unittests/basic_string_view/operations/compare/char/1.cc: New file.
11319         * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
11320         * unittests/basic_string_view/operations/compare/char/2.cc: New file.
11321         * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
11322         * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
11323         * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
11324         * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
11325         * unittests/basic_string_view/operations/copy/char/1.cc: New file.
11326         * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
11327         * unittests/basic_string_view/operations/data/char/1.cc: New file.
11328         * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
11329         * unittests/basic_string_view/operations/find/char/1.cc: New file.
11330         * unittests/basic_string_view/operations/find/char/2.cc: New file.
11331         * unittests/basic_string_view/operations/find/char/3.cc: New file.
11332         * unittests/basic_string_view/operations/find/char/4.cc: New file.
11333         * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
11334         * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
11335         * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
11336         * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
11337         * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
11338         * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
11339         * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
11340         * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
11341         * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
11342         * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
11343         * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
11344         * unittests/basic_string_view/operations/substr/char/1.cc: New file.
11345         * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
11346         * unittests/basic_string_view/operators/char/2.cc: New file.
11347         * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
11348         * unittests/basic_string_view/range_access/char/1.cc: New file.
11349         * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
11350         * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
11351         * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
11352         * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
11353         * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
11354         * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
11355         * unittests/basic_string_view/requirements/typedefs.cc: New file.
11356         * unittests/basic_string_view/typedefs.cc: New file.
11357         * unittests/basic_string_view/types/1.cc: New file.
11358
11359 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11360
11361         * common/gdb_string_view.h: Remove libstdc++ implementation
11362         details, adjust to gdb reality.
11363         * common/gdb_string_view.tcc: Likewise.
11364         * cli/cli-script.c (struct string_view): Remove.
11365         (user_args) <m_args>: Change element type to gdb::string_view.
11366         (user_args::insert_args): Adjust.
11367
11368 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11369
11370         * common/gdb_string_view.h: New file.
11371         * common/gdb_string_view.tcc: New file.
11372
11373 2018-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
11374
11375         * ax_cxx_compile_stdcxx.m4: Sync with upstream.
11376         * configure: Re-generate.
11377
11378 2018-04-09  Pedro Alves  <palves@redhat.com>
11379
11380         * gdbarch.sh: Include "observable.h" instead of "observer.h".
11381         (set_target_gdbarch): Call
11382         gdb::observers::architecture_changed.notify instead of
11383         observer_notify_architecture_changed.
11384
11385 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11386
11387         * tracepoint.c (struct current_traceframe_cleanup): Remove.
11388         (do_restore_current_traceframe_cleanup): Remove.
11389         (restore_current_traceframe_cleanup_dtor): Remove.
11390         (make_cleanup_restore_current_traceframe): Remove.
11391         (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
11392         New.
11393         * tracepoint.h (struct scoped_restore_current_traceframe): New.
11394         * infrun.c (fetch_inferior_event): Use
11395         scoped_restore_current_traceframe.
11396
11397 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11398
11399         * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
11400         Remove.
11401         <n_allocated_type_units>: Remove.
11402         <all_type_units>: Change to std::vector.
11403         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11404         to std::vector change.
11405         (dwarf2_per_objfile::get_cutu): Likewise.
11406         (dwarf2_per_objfile::get_tu): Likewise.
11407         (create_signatured_type_table_from_index): Likewise.
11408         (create_signatured_type_table_from_debug_names): Likewise.
11409         (dw2_symtab_iter_next): Likewise.
11410         (dw2_print_stats): Likewise.
11411         (dw2_expand_all_symtabs): Likewise.
11412         (dw2_expand_marked_cus): Likewise.
11413         (dw2_debug_names_iterator::next): Likewise.
11414         (dwarf2_initialize_objfile): Likewise.
11415         (add_signatured_type_cu_to_table): Likewise.
11416         (create_all_type_units): Likewise.
11417         (add_type_unit): Likewise.
11418         (struct tu_abbrev_offset): Add constructor.
11419         (build_type_psymtabs_1): Adjust to std::vector change.
11420         (print_tu_stats): Likewise.
11421         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11422         (write_debug_names): Likewise.
11423
11424 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11425
11426         * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
11427         Make an std::vector.
11428         <n_comp_units>: Remove.
11429         * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
11430         to std::vector change.
11431         (dwarf2_per_objfile::get_cutu): Likewise.
11432         (dwarf2_per_objfile::get_cu): Likewise.
11433         (create_cus_from_index): Likewise.
11434         (create_addrmap_from_index): Likewise.
11435         (create_addrmap_from_aranges): Likewise.
11436         (dwarf2_read_index): Likewise.
11437         (dw2_find_last_source_symtab): Likewise.
11438         (dw2_map_symtabs_matching_filename): Likewise.
11439         (dw2_symtab_iter_next): Likewise.
11440         (dw2_print_stats): Likewise.
11441         (dw2_expand_all_symtabs): Likewise.
11442         (dw2_expand_symtabs_with_fullname): Likewise.
11443         (dw2_expand_marked_cus): Likewise.
11444         (dw2_map_symbol_filenames): Likewise.
11445         (create_cus_from_debug_names): Likewise.
11446         (dwarf2_read_debug_names): Likewise.
11447         (dw2_debug_names_iterator::next): Likewise.
11448         (dwarf2_initialize_objfile): Likewise.
11449         (set_partial_user): Likewise.
11450         (dwarf2_build_psymtabs_hard): Likewise.
11451         (read_comp_units_from_section): Remove arguments, adjust to
11452         std::vector change.
11453         (create_all_comp_units): Adjust to std::vector and
11454         read_comp_units_from_section changes.
11455         (dwarf2_find_containing_comp_unit): Adjust to std::vector
11456         change.
11457         * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
11458         (psyms_seen_size): Likewise.
11459         (write_gdbindex): Likewise.
11460         (write_debug_names): Likewise.
11461
11462 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11463
11464         * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
11465         with dwarf2_per_objfile.
11466         (create_cus_from_index): Likewise.
11467         (create_signatured_type_table_from_index): Likewise.
11468         (dwarf2_read_index): Likewise.
11469         (dwarf2_initialize_objfile): Likewise.
11470         (dwarf2_fetch_die_loc_sect_off):  Get dwarf2_per_objfile from
11471         per_cu rather than get_dwarf2_per_objfile.
11472
11473 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11474
11475         * dwarf2read.h (struct signatured_type): Forward declare.
11476         (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
11477         New methods.
11478         * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
11479         (dw2_get_cutu): ...this.
11480         (dwarf2_per_objfile::get_cu): Rename from...
11481         (dw2_get_cu): ...this.
11482         (dwarf2_per_objfile::get_tu): New.
11483         (create_addrmap_from_index): Adjust.
11484         (create_addrmap_from_aranges): Adjust.
11485         (dw2_find_last_source_symtab): Adjust.
11486         (dw2_map_symtabs_matching_filename): Adjust.
11487         (dw2_symtab_iter_next): Adjust.
11488         (dw2_print_stats): Adjust.
11489         (dw2_expand_all_symtabs): Adjust.
11490         (dw2_expand_symtabs_with_fullname): Adjust.
11491         (dw2_expand_marked_cus): Adjust.
11492         (dw_expand_symtabs_matching_file_matcher): Adjust.
11493         (dw2_map_symbol_filenames): Adjust.
11494         (dw2_debug_names_iterator::next): Adjust.
11495         (dwarf2_initialize_objfile): Adjust.
11496         (set_partial_user): Adjust.
11497         (dwarf2_build_psymtabs_hard): Adjust.
11498
11499 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11500
11501         * dwarf2read.c (create_signatured_type_table_from_debug_names):
11502         Remove unused variables.
11503         (dw2_map_symtabs_matching_filename): Likewise.
11504         (dwarf2_record_block_ranges): Likewise.
11505         (dwarf2_read_addr_index): Likewise.
11506         (follow_die_offset): Likewise.
11507
11508 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11509
11510         * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
11511         to symbol_file_add_main.
11512
11513 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11514
11515         PR mi/22299
11516         * mi/mi-console.c (do_fputc_async_safe): New.
11517         (mi_console_file::write_async_safe): New.
11518         (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
11519         * mi/mi-console.h (class mi_console_file) <write_async_safe>:
11520         New.
11521         * ui-file.c (ui_file::putstrn): Adjust call to
11522         fputstrn_unfiltered.
11523         * utils.c (printchar): Replace do_fputs and do_fprintf
11524         parameters by do_fputc.
11525         (fputstr_filtered): Adjust call to printchar.
11526         (fputstr_unfiltered): Likewise.
11527         (fputstrn_filtered): Likewise.
11528         (fputstrn_unfiltered): Add do_fputc parameter, pass to
11529         printchar.
11530         * utils.h (do_fputc_ftype): New typedef.
11531         (fputstrn_unfiltered): Add do_fputc parameter.
11532
11533 2018-04-07  Simon Marchi  <simon.marchi@polymtl.ca>
11534
11535         * regformats/i386/i386-avx.dat: Remove.
11536
11537 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11538
11539         PR gdb/22979
11540         * amd64-tdep.c (amd64_none_init_abi): New function.
11541         (amd64_x32_none_init_abi): New function.
11542         (_initialize_amd64_tdep): Register handlers for x86-64 and
11543         x64_32 with GDB_OSABI_NONE.
11544         * osabi.c (gdbarch_init_osabi): Allow running handlers for the
11545         GDB_OSABI_NONE osabi.
11546
11547 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11548
11549         PR gdb/22980
11550         * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
11551         GDB_OSABI_NONE.
11552         * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
11553         * osabi.c (gdb_osabi_names): Add "unknown" entry.
11554
11555 2018-04-07  Simon Marchi  <simon.marchi@ericsson.com>
11556
11557         * common/byte-vector.h (char_vector): New type.
11558         * target.h (target_read_alloc): Return
11559         gdb::optional<byte_vector>.
11560         (target_read_stralloc): Return gdb::optional<char_vector>.
11561         (target_get_osdata): Return gdb::optional<char_vector>.
11562         * target.c (target_read_alloc_1): Templatize.  Replacement
11563         manual memory management with vector.
11564         (target_read_alloc): Change return type, adjust.
11565         (target_read_stralloc): Change return type, adjust.
11566         (target_get_osdata): Change return type, adjust.
11567         * auxv.c (struct auxv_info) <length>: Remove.
11568         <data>: Change type to gdb::optional<byte_vector>.
11569         (auxv_inferior_data_cleanup): Free auxv_info with delete.
11570         (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
11571         (target_auxv_search): Adjust.
11572         (fprint_target_auxv): Adjust.
11573         * avr-tdep.c (avr_io_reg_read_command): Adjust.
11574         * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
11575         (linux_make_corefile_notes): Adjust.
11576         * osdata.c (get_osdata): Adjust.
11577         * remote.c (remote_get_threads_with_qxfer): Adjust.
11578         (remote_memory_map): Adjust.
11579         (remote_traceframe_info): Adjust.
11580         (btrace_read_config): Adjust.
11581         (remote_read_btrace): Adjust.
11582         (remote_pid_to_exec_file): Adjust.
11583         * solib-aix.c (solib_aix_get_library_list): Adjust.
11584         * solib-dsbt.c (decode_loadmap): Don't free buf.
11585         (dsbt_get_initial_loadmaps): Adjust.
11586         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
11587         * solib-target.c (solib_target_current_sos): Adjust.
11588         * tracepoint.c (sdata_make_value): Adjust.
11589         * xml-support.c (xinclude_start_include): Adjust.
11590         (xml_fetch_content_from_file): Adjust.
11591         * xml-support.h (xml_fetch_another): Change return type.
11592         (xml_fetch_content_from_file): Change return type.
11593         * xml-syscall.c (xml_init_syscalls_info): Adjust.
11594         * xml-tdesc.c (file_read_description_xml): Adjust.
11595         (fetch_available_features_from_target): Change return type.
11596         (target_fetch_description_xml): Adjust.
11597         (target_read_description_xml): Adjust.
11598
11599 2018-04-06  Tom Tromey  <tom@tromey.com>
11600
11601         * value.c (~value): Update.
11602         (struct value) <contents>: Now unique_xmalloc_ptr.
11603         (value_contents_bits_eq, allocate_value_contents)
11604         (value_contents_raw, value_contents_all_raw)
11605         (value_contents_for_printing, value_contents_for_printing_const)
11606         (set_value_enclosing_type): Update.
11607
11608 2018-04-06  Tom Tromey  <tom@tromey.com>
11609
11610         * value.c (range_s): Remove typedef, VEC.
11611         (struct range): Add operator<.
11612         (range_lessthan): Remove.
11613         (ranges_contain): Change type.
11614         (~value): Update.
11615         (struct value) <unavailable, optimized_out>: Now std::vector.
11616         (value_entirely_available)
11617         (value_entirely_covered_by_range_vector)
11618         (value_entirely_unavailable, value_entirely_optimized_out):
11619         Update.
11620         (insert_into_bit_range_vector): Change argument type.
11621         (find_first_range_overlap): Likewise.
11622         (struct ranges_and_idx, value_contents_bits_eq)
11623         (require_not_optimized_out, require_available): Update.
11624         (ranges_copy_adjusted): Change argument types.
11625         (value_optimized_out, value_copy, value_fetch_lazy): Update.
11626
11627 2018-04-06  Tom Tromey  <tom@tromey.com>
11628
11629         * value.c (~value): Update.
11630         (struct value) <parent>: Now a value_ref_ptr.
11631         (value_parent, set_value_parent, value_address, value_copy):
11632         Update.
11633
11634 2018-04-06  Tom Tromey  <tom@tromey.com>
11635
11636         * value.c (struct value): Add constructor, destructor, and member
11637         initializers.
11638         (allocate_value_lazy, value_decref): Update.
11639
11640 2018-04-06  Tom Tromey  <tom@tromey.com>
11641
11642         * value.c (struct value) <released, next>: Remove.
11643         (all_values): Now a std::vector.
11644         (allocate_value_lazy): Update.
11645         (value_next): Remove.
11646         (value_mark, value_free_to_mark, release_value)
11647         (value_release_to_mark): Update.
11648
11649 2018-04-06  Tom Tromey  <tom@tromey.com>
11650
11651         * value.h (fetch_subexp_value, value_release_to_mark): Update.
11652         (free_value_chain): Remove.
11653         * value.c (free_value_chain): Remove.
11654         (value_release_to_mark): Return a std::vector.
11655         * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
11656         std::vector.
11657         (check_condition): Update.
11658         * eval.c (fetch_subexp_value): Change "val_chain" to a
11659         std::vector.
11660         * breakpoint.c (update_watchpoint): Update.
11661         (can_use_hardware_watchpoint): Change "vals" to a std::vector.
11662
11663 2018-04-06  Tom Tromey  <tom@tromey.com>
11664
11665         * value.h (free_all_values): Remove.
11666         * value.c (free_all_values): Remove.
11667
11668 2018-04-06  Tom Tromey  <tom@tromey.com>
11669
11670         * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
11671         (value_history_chain, value_history_count): Remove.
11672         (value_history): New global.
11673         (record_latest_value, access_value_history, show_values)
11674         (preserve_values): Update.
11675
11676 2018-04-06  Tom Tromey  <tom@tromey.com>
11677
11678         * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
11679         * varobj.c (varobj_set_display_format, varobj_set_value)
11680         (install_default_visualizer, construct_visualizer)
11681         (install_new_value, ~varobj, varobj_get_value_type)
11682         (my_value_of_variable, varobj_editable_p): Update.
11683         * c-varobj.c (c_describe_child, c_value_of_variable)
11684         (cplus_number_of_children, cplus_describe_child): Update.
11685         * ada-varobj.c (ada_number_of_children, ada_name_of_child)
11686         (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
11687         (ada_value_of_variable, ada_value_is_changeable_p): Update.
11688
11689 2018-04-06  Tom Tromey  <tom@tromey.com>
11690
11691         * printcmd.c (last_examine_address): Change type to
11692         value_ref_ptr.
11693         (do_examine, x_command): Update.
11694
11695 2018-04-06  Tom Tromey  <tom@tromey.com>
11696
11697         * value.c (release_value): Update.
11698         * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
11699         (struct bpstats) <val>: Now a value_ref_ptr.
11700         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11701         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11702         (~watchpoint, print_it_watchpoint, watch_command_1)
11703         (invalidate_bp_value_on_memory_change): Update.
11704
11705 2018-04-06  Tom Tromey  <tom@tromey.com>
11706
11707         * varobj.c (varobj_clear_saved_item)
11708         (update_dynamic_varobj_children, install_new_value, ~varobj):
11709         Update.
11710         * value.h (value_incref): Move declaration earlier.
11711         (value_decref): Rename from value_free.
11712         (struct value_ref_policy): New.
11713         (value_ref_ptr): New typedef.
11714         (struct value_deleter): Remove.
11715         (gdb_value_up): Remove typedef.
11716         (release_value): Change return type.
11717         (release_value_or_incref): Remove.
11718         * value.c (set_value_parent): Update.
11719         (value_incref): Change return type.
11720         (value_decref): Rename from value_free.
11721         (value_free_to_mark, free_all_values, free_value_chain): Update.
11722         (release_value): Return value_ref_ptr.
11723         (release_value_or_incref): Remove.
11724         (record_latest_value, set_internalvar, clear_internalvar):
11725         Update.
11726         * stack.c (info_frame_command): Don't call value_free.
11727         * python/py-value.c (valpy_dealloc, valpy_new)
11728         (value_to_value_object): Update.
11729         * printcmd.c (do_examine): Update.
11730         * opencl-lang.c (lval_func_free_closure): Update.
11731         * mi/mi-main.c (register_changed_p): Don't call value_free.
11732         * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
11733         * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
11734         * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
11735         value_free.
11736         * guile/scm-value.c (vlscm_free_value_smob)
11737         (vlscm_scm_from_value): Update.
11738         * frame.c (frame_register_unwind, frame_unwind_register_signed)
11739         (frame_unwind_register_unsigned, get_frame_register_bytes)
11740         (put_frame_register_bytes): Don't call value_free.
11741         * findvar.c (address_from_register): Don't call value_free.
11742         * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
11743         * dwarf2loc.c (entry_data_value_free_closure)
11744         (value_of_dwarf_reg_entry, free_pieced_value_closure)
11745         (dwarf2_evaluate_loc_desc_full): Update.
11746         * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
11747         (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
11748         (~watchpoint, watch_command_1)
11749         (invalidate_bp_value_on_memory_change): Update.
11750         * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
11751
11752 2018-04-06  Simon Marchi  <simon.marchi@polymtl.ca>
11753
11754         PR gdb/23022
11755         * warning.m4: Add -Wno-error=deprecated-register.
11756         * configure: Re-generate.
11757
11758 2018-04-05  Tom Tromey  <tom@tromey.com>
11759
11760         * linespec.h: Remove include of "vec.h".
11761
11762 2018-04-05  Tom Tromey  <tom@tromey.com>
11763
11764         * linespec.c (typep): Remove typedef.
11765         (find_methods, find_superclass_methods): Take a std::vector.
11766         (find_method): Use std::vector.
11767
11768 2018-04-05  Tom Tromey  <tom@tromey.com>
11769
11770         * utils.c (compare_strings): Remove.
11771         * utils.h (compare_strings): Remove.
11772         * objc-lang.h (find_imps): Update.
11773         * objc-lang.c (find_methods): Take a std::vector.
11774         (uniquify_strings, find_imps): Likewise.
11775         * linespec.c (find_methods): Take a std::vector.
11776         (decode_objc): Use std::vector.
11777         (add_all_symbol_names_from_pspace, find_superclass_methods): Take
11778         a std::vector.
11779         (find_method, find_function_symbols): Use std::vector.
11780
11781 2018-04-05  Tom Tromey  <tom@tromey.com>
11782
11783         * completer.c (completion_tracker::completion_tracker): Remove
11784         cast.
11785         (completion_tracker::discard_completions): Likewise.
11786         * breakpoint.c (ambiguous_names_p): Remove cast.
11787         * ada-lang.c (_initialize_ada_language): Remove cast.
11788         * utils.h (streq): Update.
11789         (streq_hash): Add new declaration.
11790         * utils.c (streq): Return bool.
11791         (streq_hash): New function.
11792
11793 2018-04-05  Tom Tromey  <tom@tromey.com>
11794
11795         * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
11796         Remove a string copy.
11797
11798 2018-04-05  Tom Tromey  <tom@tromey.com>
11799
11800         * linespec.c (filter_results): Use std::vector.
11801         (decode_line_2, decode_line_full): Update.
11802
11803 2018-04-05  Tom Tromey  <tom@tromey.com>
11804
11805         * linespec.c (canonical_to_fullform): Return std::string.
11806         (filter_results): Update.
11807         (struct decode_line_2_item): Add constructor.
11808         <fullform, displayform>: Now std::string.
11809         (decode_line_2_compare_items): Now a std::sort comparator.
11810         (decode_line_2): Update.
11811
11812 2018-04-05  Tom Tromey  <tom@tromey.com>
11813
11814         * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
11815         (unexpected_linespec_error): Update.
11816         (linespec_parse_basic, parse_linespec): Update.
11817
11818 2018-04-05  Tom Tromey  <tom@tromey.com>
11819
11820         * linespec.c (linespec_parse_basic): Reindent.
11821
11822 2018-04-05  Tom Tromey  <tom@tromey.com>
11823
11824         * minsyms.h (iterate_over_minimal_symbols): Update.
11825         * minsyms.c (iterate_over_minimal_symbols): Take a
11826         gdb::function_view.
11827         * linespec.c (struct collect_minsyms): Remove.
11828         (compare_msyms): Now a std::sort comparator.
11829         (add_minsym): Add parameters.
11830         (search_minsyms_for_name): Update.  Use std::vector.
11831
11832 2018-04-03  Tom Tromey  <tom@tromey.com>
11833
11834         * mipsread.c (read_alphacoff_dynamic_symtab): Use
11835         gdb::byte_vector.
11836
11837 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11838
11839         * MAINTAINERS (Write After Approval): Add Weimin Pan.
11840
11841 2018-04-02  Weimin Pan  <weimin.pan@oracle.com>
11842
11843         PR gdb/16959
11844         * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when 
11845         printing static type.
11846
11847 2018-04-01  Tom Tromey  <tom@tromey.com>
11848
11849         * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
11850         (rs6000_xfer_shared_libraries): Update.
11851
11852 2018-04-01  Simon Marchi  <simon.marchi@polymtl.ca>
11853
11854         * common/gdb_vecs.h (char_ptr): Remove.
11855         * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
11856
11857 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11858
11859         * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
11860         with std::vector.
11861         * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
11862
11863 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
11864
11865         * tracepoint.h (struct uploaded_tp): Initialize fields.
11866         <actions, step_actions, cmd_strings>: Change type to
11867         std::vector<char *>.
11868         * tracepoint.c (get_uploaded_tp): Allocate with new.
11869         (free_uploaded_tps): Free with delete.
11870         (parse_tracepoint_definition): Adjust to std::vector change.
11871         * breakpoint.c (read_uploaded_action): Likewise.
11872         (create_tracepoint_from_upload): Likewise.
11873         * ctf.c (ctf_write_uploaded_tp): Likewise.
11874         (SET_ARRAY_FIELD): Likewise.
11875         * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
11876
11877 2018-03-30  Tom Tromey  <tom@tromey.com>
11878
11879         * solib-svr4.c (lm_info_read): Use gdb::byte_vector.  Return
11880         std::unique_ptr.
11881         (svr4_keep_data_in_core): Update.
11882         (svr4_read_so_list): Update.
11883
11884 2018-03-30  Tom Tromey  <tom@tromey.com>
11885
11886         * windows-nat.c (handle_output_debug_string, handle_exception):
11887         Update.
11888         * target.h (target_read_string): Update.
11889         * target.c (target_read_string): Change "string" to
11890         unique_xmalloc_ptr.
11891         * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
11892         Update.
11893         * solib-frv.c (frv_current_sos): Update.
11894         * solib-dsbt.c (dsbt_current_sos): Update.
11895         * solib-darwin.c (darwin_current_sos): Update.
11896         * linux-thread-db.c (inferior_has_bug): Update.
11897         * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
11898         Update.  Remove alloca.
11899         * ada-lang.c (ada_main_name): Update.
11900
11901 2018-03-30  Tom Tromey  <tom@tromey.com>
11902
11903         * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
11904         (struct dwo_file_deleter): New.
11905         (dwo_file_up): New typedef.
11906         (open_and_init_dwo_file): Use dwo_file_up.
11907         (free_dwo_file_cleanup): Remove.
11908
11909 2018-03-30  Tom Tromey  <tom@tromey.com>
11910
11911         * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
11912         (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
11913
11914 2018-03-30  Tom Tromey  <tom@tromey.com>
11915
11916         * dwarf2read.c (class free_cached_comp_units): New class.
11917         (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
11918         (free_cached_comp_units): Remove function.
11919
11920 2018-03-30  Tom Tromey  <tom@tromey.com>
11921
11922         * utils.h (make_cleanup_unpush_target): Remove.
11923         * inf-ptrace.c (struct target_unpusher): New.
11924         (target_unpush_up) New typedef.
11925         (inf_ptrace_create_inferior, inf_ptrace_attach): Use
11926         target_unpush_up.
11927         * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
11928
11929 2018-03-27  Tom Tromey  <tom@tromey.com>
11930
11931         * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
11932
11933 2018-03-27  Pedro Alves  <palves@redhat.com>
11934             Tom Tromey  <tom@tromey.com>
11935
11936         * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
11937         destructor.  Now a class.
11938         (gdb_readline_wrapper_cleanup): Remove function.
11939         (gdb_readline_wrapper): Remove cleanups.
11940
11941 2018-03-27  Tom Tromey  <tom@tromey.com>
11942
11943         * typeprint.h (struct type_print_options) <local_typedefs,
11944         global_typedefs>: Remove "struct" keyword.
11945         (class typedef_hash_table): New class.
11946         (recursively_update_typedef_hash, add_template_parameters)
11947         (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
11948         (find_typedef_in_hash): Don't declare.
11949         * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
11950         (typedef_hash_table::recursively_update): Rename from
11951         recursively_update_typedef_hash.  Now a member.
11952         (typedef_hash_table::add_template_parameters): Rename from
11953         add_template_parameters.  Now a member.
11954         (typedef_hash_table::typedef_hash_table): Now a constructor;
11955         rename from create_typedef_hash.
11956         (typedef_hash_table::~typedef_hash_table): Now a destructor;
11957         rename from free_typedef_hash.
11958         (do_free_typedef_hash, make_cleanup_free_typedef_hash)
11959         (do_free_global_table): Remove.
11960         (typedef_hash_table::typedef_hash_table): New constructor; renamed
11961         from copy_type_recursive.
11962         (create_global_typedef_table): Remove.
11963         (typedef_hash_table::find_global_typedef): Now a member of
11964         typedef_hash_table.
11965         (typedef_hash_table::find_typedef): Rename from
11966         find_typedef_in_hash; now a member.
11967         (whatis_exp): Update.
11968         * extension.h (struct ext_lang_type_printers): Add constructor and
11969         destructor.
11970         (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
11971         declare.
11972         * extension.c (ext_lang_type_printers::ext_lang_type_printers):
11973         Now a constructor; rename from start_ext_lang_type_printers.
11974         (ext_lang_type_printers): Now a destructor; rename from
11975         free_ext_lang_type_printers.
11976         * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
11977         Update.
11978         (c_type_print_base_struct_union): Update.  Remove cleanups.
11979
11980 2018-03-27  Tom Tromey  <tom@tromey.com>
11981
11982         * dwarf-index-write.c: Include <cmath>.
11983
11984 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
11985
11986         * NEWS: Add entry describing new "set|show varsize-limit" command.
11987         * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
11988         command.
11989         * printcmd.c (_initialize_printcmd): Add "set var" alias of
11990         "set variable".
11991
11992 2018-03-27  Simon Marchi  <simon.marchi@ericsson.com>
11993
11994         * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
11995         dwarf-index-write.c
11996         (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
11997         * dwarf-index-common.c: New file.
11998         * dwarf-index-common.h: New file.
11999         * dwarf-index-write.c: New file.
12000         * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
12001         (struct dwarf2_section_info): Move from here.
12002         (dwarf2_section_info_def): Likewise.
12003         (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
12004         (offset_type): Likewise.
12005         (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
12006         (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
12007         (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
12008         (byte_swap): Likewise.
12009         (MAYBE_SWAP): Likewise.
12010         (dwarf2_per_cu_ptr): Likewise.
12011         (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
12012         (struct tu_stats): Likewise.
12013         (struct dwarf2_per_objfile): Likewise.
12014         (struct dwarf2_per_cu_data): Likewise.
12015         (struct signatured_type): Likewise.
12016         (sig_type_ptr): Likewise.
12017         (DEF_VEC_P (sig_type_ptr)): Likewise.
12018         (INDEX4_SUFFIX): Likewise.
12019         (INDEX5_SUFFIX): Likewise.
12020         (DEBUG_STR_SUFFIX): Likewise.
12021         (dwarf2_read_section): Make non-static.
12022         (mapped_index_string_hash): Move from here.
12023         (dwarf5_djb_hash): Likewise.
12024         (file_write): Likewise.
12025         (class data_buf): Likewise.
12026         (struct symtab_index_entry): Likewise.
12027         (struct mapped_symtab): Likewise.
12028         (find_slot): Likewise.
12029         (hash_expand): Likewise.
12030         (add_index_entry): Likewise.
12031         (uniquify_cu_indices): Likewise.
12032         (class c_str_view): Likewise.
12033         (class c_str_view_hasher): Likewise.
12034         (class vector_hasher): Likewise.
12035         (write_hash_table): Likewise.
12036         (psym_index_map): Likewise.
12037         (struct addrmap_index_data): Likewise.
12038         (add_address_entry): Likewise.
12039         (add_address_entry_worker): Likewise.
12040         (write_address_map): Likewise.
12041         (symbol_kind): Likewise.
12042         (write_psymbols): Likewise.
12043         (struct signatured_type_index_data): Likewise.
12044         (write_one_signatured_type): Likewise.
12045         (recursively_count_psymbols): Likewise.
12046         (recursively_write_psymbols): Likewise.
12047         (class debug_names): Likewise.
12048         (check_dwarf64_offsets): Likewise.
12049         (psyms_seen_size): Likewise.
12050         (write_gdbindex): Likewise.
12051         (write_debug_names): Likewise.
12052         (assert_file_size): Likewise.
12053         (write_psymtabs_to_index): Likewise.
12054         (save_gdb_index_command): Likewise.
12055         (_initialize_dwarf2_read): Don't register the "save gdb-index"
12056         command.
12057         * dwarf2read.h: New file.
12058
12059 2018-03-27  Joel Brobecker  <brobecker@adacore.com>
12060
12061         PR gdb/22670
12062         * dwarf2read.c (dwarf2_physname): Do not return the demangled
12063         symbol name if the CU's language stores symbol names in linkage
12064         format.
12065         * language.h (struct language_defn)
12066         <la_store_sym_names_in_linkage_form_p>: New field.  Adjust
12067         all instances of this struct.
12068
12069 2018-03-26  Tom Tromey  <tom@tromey.com>
12070
12071         * stack.c (backtrace_command_1): Remove verbose code.
12072
12073 2018-03-26  Tom Tromey  <tom@tromey.com>
12074
12075         * python/py-framefilter.c (py_print_type): Don't catch
12076         exceptions.  Return void.
12077         (py_print_value): Likewise.
12078         (py_print_single_arg): Likewise.
12079         (enumerate_args): Don't catch exceptions.
12080         (py_print_args): Likewise.
12081         (py_print_frame): Likewise.
12082         (gdbpy_apply_frame_filter): Catch exceptions here.
12083
12084 2018-03-26  Tom Tromey  <tom@tromey.com>
12085
12086         * stack.c (_initialize_stack): Remove trailing newlines from help
12087         text.  Add "Usage" line to "backtrace" help.
12088
12089 2018-03-26  Tom Tromey  <tom@tromey.com>
12090
12091         PR python/16486:
12092         * python/py-framefilter.c (py_print_args): Call wrap_hint.
12093
12094 2018-03-26  Tom Tromey  <tom@tromey.com>
12095
12096         * python/py-framefilter.c (py_print_single_arg): Return
12097         EXT_LANG_BT_ERROR from catch.
12098
12099 2018-03-26  Tom Tromey  <tom@tromey.com>
12100
12101         PR backtrace/15584:
12102         * stack.c (backtrace_command_1): Move some code into no-filters
12103         "if".
12104
12105 2018-03-26  Tom Tromey  <tom@tromey.com>
12106
12107         * python/py-framefilter.c (throw_quit_or_print_exception): New
12108         function.
12109         (gdbpy_apply_frame_filter): Use it.
12110
12111 2018-03-26  Tom Tromey  <tom@tromey.com>
12112
12113         PR cli/17716:
12114         * python/py-framefilter.c (py_print_type, py_print_value)
12115         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
12116         RETURN_MASK_ERROR.
12117
12118 2018-03-26  Tom Tromey  <tom@tromey.com>
12119
12120         * python/py-framefilter.c (enumerate_args): Use
12121         gdb::unique_xmalloc_ptr.
12122
12123 2018-03-26  Tom Tromey  <tom@tromey.com>
12124
12125         * python/py-framefilter.c (py_print_frame): Return
12126         EXT_LANG_BT_OK.
12127         (gdbpy_apply_frame_filter): Update comment.
12128         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
12129         Remove.
12130         <EXT_LANG_BT_NO_FILTERS>: Change value.
12131
12132 2018-03-26  Tom Tromey  <tom@tromey.com>
12133
12134         PR backtrace/15582:
12135         * stack.c (backtrace_command): Parse "hide" argument.
12136         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
12137         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
12138         constant.
12139
12140 2018-03-26  Tom Tromey  <tom@tromey.com>
12141
12142         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
12143         add "flags".
12144         (backtrace_command): Remove "fulltrace", add "flags".
12145
12146 2018-03-26  Tom Tromey  <tom@tromey.com>
12147
12148         * stack.c (backtrace_command): Rewrite command line parsing.
12149
12150 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12151
12152         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
12153
12154 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
12155
12156         * filename-seen-cache.h: Add include guard.
12157
12158 2018-03-26  Keith Seitz  <keiths@redhat.com>
12159
12160         * symfile.c (place_section): Remove "struct" from section_addr_info
12161         in comment.
12162         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
12163         "struct" keyword from section_addr_info.
12164
12165 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
12166
12167         * regformats/regdef.h (reg): Add constructors.
12168
12169 2018-03-25  Pedro Alves  <palves@redhat.com>
12170
12171         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
12172         if then/else bodies in var_func_name extraction.
12173
12174 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
12175
12176         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
12177         lookup_minimal_symbol() to find symbol entry.
12178         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
12179
12180 2018-03-23  Keith Seitz  <keiths@redhat.com>
12181
12182         PR c++/22968
12183         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
12184         nested type definitions for C++, too.
12185
12186 2018-03-23  Tom Tromey  <tom@tromey.com>
12187
12188         * machoread.c (struct oso_el): Add a constructor.  Don't define as
12189         a typedef.
12190         (macho_register_oso): Remove.
12191         (macho_symtab_read): Take a std::vector.
12192         (oso_el_compare_name): Now a std::sort comparator.
12193         (macho_symfile_read_all_oso): Take a std::vector.
12194         (macho_symfile_read): Use std::vector.  Remove cleanups.
12195
12196 2018-03-22  Tom Tromey  <tom@tromey.com>
12197
12198         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
12199         (record_full_goto_bookmark): Use std::string.
12200
12201 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12202
12203         PR tdep/18295
12204         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
12205         a single mask.
12206
12207 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12208
12209         * rs6000-tdep.c (store_insn_p): New function.
12210         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
12211         and cr_reg to their unshifted values. Use store_insn_p to
12212         match LR saves using either R1 or fdata->alloca_reg. Use
12213         store_insn_p to match CR saves. Set alloca_reg_offset
12214         when alloca_reg and framep are set. Remove lr_reg shift
12215         when assigning to fdata->lr_register.
12216
12217 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12218
12219         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
12220         command line args instead of emitting a warning.
12221
12222 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12223
12224         * tracepoint.h (struct static_tracepoint_marker): Initialize
12225         fields, define default constructor, move constructor and move
12226         assignment, disable the rest.
12227         <str_id, extra>: Make std::string.
12228         (release_static_tracepoint_marker): Remove.
12229         (free_current_marker): Remove.
12230         * tracepoint.c (free_current_marker): Remove.
12231         (parse_static_tracepoint_marker_definition): Adjust to
12232         std::string, use new hex2str overload.
12233         (release_static_tracepoint_marker): Remove.
12234         (print_one_static_tracepoint_marker): Get marker by reference
12235         and adjust to std::string.
12236         (info_static_tracepoint_markers_command): Adjust to std::vector
12237         changes
12238         * target.h (static_tracepoint_marker_p): Remove typedef.
12239         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
12240         (struct target_ops) <to_static_tracepoint_marker_at>: Return
12241         bool.
12242         <to_static_tracepoint_markers_by_strid>: Return std::vector.
12243         * target-debug.h
12244         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
12245         (target_debug_print_std_vector_static_tracepoint_marker): New.
12246         (target_debug_print_struct_static_tracepoint_marker_p): Rename
12247         to...
12248         (target_debug_print_static_tracepoint_marker_p): ... this.
12249         * target-delegates.c: Re-generate.
12250         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
12251         Make std::string.
12252         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
12253         (decode_static_tracepoint_spec): Adjust to std::vector.
12254         (tracepoint_print_one_detail): Adjust to std::string.
12255         (strace_marker_decode_location): Adjust to std::string.
12256         (update_static_tracepoint): Adjust to std::string, remove call
12257         to release_static_tracepoint_marker.
12258         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
12259         Adjust to std::vector.
12260         * remote.c (remote_static_tracepoint_marker_at): Return bool.
12261         (remote_static_tracepoint_markers_by_strid): Adjust to
12262         std::vector.
12263         * common/rsp-low.h (hex2str): New overload with explicit count
12264         of bytes.
12265         * common/rsp-low.c (hex2str): New overload with explicit count
12266         of bytes.
12267         * unittests/rsp-low-selftests.c (test_hex2str): New function.
12268         (_initialize_rsp_low_selftests): Add test_hex2str test.
12269         * unittests/tracepoint-selftests.c
12270         (test_parse_static_tracepoint_marker_definition): Adjust to
12271         std::string.
12272
12273 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
12274
12275         * tracepoint.c (parse_static_tracepoint_marker_definition):
12276         Consider case where the definition is followed by more
12277         definitions.
12278         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12279         tracepoint-selftests.c.
12280         * unittests/tracepoint-selftests.c: New.
12281
12282 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
12283
12284         * MAINTAINERS (Write After Approval): Add Pedro Franco de
12285         Carvalho.
12286
12287 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12288
12289         * symtab.c (find_pc_sect_line): fixed indentation.
12290
12291 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
12292
12293         * symtab.c (find_pc_sect_line): now uses binary search.
12294
12295 2018-03-19  Tom Tromey  <tom@tromey.com>
12296
12297         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
12298         "IDENT" production.
12299
12300 2018-03-19  Pedro Alves  <palves@redhat.com>
12301             Tom Tromey  <tom@tromey.com>
12302
12303         * unittests/observable-selftests.c: New file.
12304         * common/observable.h: New file.
12305         * observable.h: New file.
12306         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
12307         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
12308         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
12309         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
12310         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
12311         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
12312         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
12313         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
12314         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
12315         python/py-breakpoint.c, python/py-finishbreakpoint.c,
12316         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
12317         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
12318         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
12319         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
12320         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
12321         tui/tui-interp.c, valops.c: Update all users.
12322         * tui/tui-hooks.c (tui_bp_created_observer)
12323         (tui_bp_deleted_observer, tui_bp_modified_observer)
12324         (tui_inferior_exit_observer, tui_before_prompt_observer)
12325         (tui_normal_stop_observer, tui_register_changed_observer):
12326         Remove.
12327         (tui_observers_token): New global.
12328         (attach_or_detach, tui_attach_detach_observers): New functions.
12329         (tui_install_hooks, tui_remove_hooks): Use
12330         tui_attach_detach_observers.
12331         * record-btrace.c (record_btrace_thread_observer): Remove.
12332         (record_btrace_thread_observer_token): New global.
12333         * observer.sh: Remove.
12334         * observer.c: Rename to observable.c.
12335         * observable.c (namespace gdb_observers): Define new objects.
12336         (observer_debug): Move into gdb_observers namespace.
12337         (struct observer, struct observer_list, xalloc_observer_list_node)
12338         (xfree_observer_list_node, generic_observer_attach)
12339         (generic_observer_detach, generic_observer_notify): Remove.
12340         (_initialize_observer): Update.
12341         Don't include observer.inc.
12342         * Makefile.in (generated_files): Remove observer.h, observer.inc.
12343         (clean mostlyclean): Likewise.
12344         (observer.h, observer.inc): Remove targets.
12345         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
12346         (COMMON_SFILES): Use observable.c, not observer.c.
12347         * .gitignore: Remove observer.h.
12348
12349 2018-03-18  Tom Tromey  <tom@tromey.com>
12350
12351         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
12352         gdb::def_vector.
12353         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
12354
12355 2018-03-17  Tom Tromey  <tom@tromey.com>
12356
12357         * auto-load.c (auto_load_objfile_script_1): Use std::string.
12358
12359 2018-03-17  Tom Tromey  <tom@tromey.com>
12360
12361         * target.c (class scoped_target_fd): New.
12362         (target_fileio_close_cleanup): Remove.
12363         (target_fileio_read_alloc_1): Use scoped_target_fd.
12364
12365 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
12366
12367         * silent-rules.mk: New.
12368         * Makefile.in: Include silent-rules.mk
12369         (srcdir, VPATH, top_srcdir): Move up.
12370         (COMPILE): Add ECHO_CXX.
12371         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
12372         (init.c): Add ECHO_INIT_C.
12373         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
12374         (version.c): Add ECHO_GEN.
12375         (printcmd.o): Add ECHO_CXX.
12376         (target-float.o): Add ECHO_CXX.
12377         (ada-exp.o): Add ECHO_CXX.
12378         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
12379         (insight$(EXEEXT)): Add ECHO_CXXLD.
12380         * gnulib/configure.ac: Add AM_SILENT_RULES.
12381         * gnulib/aclocal.m4: Re-generate.
12382         * gnulib/configure: Re-generate.
12383         * gnulib/import/Makefile.in: Re-generate.
12384
12385 2018-03-16  Tom Tromey  <tom@tromey.com>
12386
12387         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
12388         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
12389         * utils.c (do_free_section_addr_info)
12390         (make_cleanup_free_section_addr_info): Remove.
12391         * symfile.h (struct other_sections): Add constructor.
12392         (struct section_addr_info): Remove.
12393         (section_addr_info): New typedef.
12394         (struct sym_fns) <sym_offsets>: Change type of parameter.
12395         (build_section_addr_info_from_objfile)
12396         (relative_addr_info_to_section_offsets, addr_info_make_relative)
12397         (default_symfile_offsets, symbol_file_add)
12398         (symbol_file_add_from_bfd)
12399         (build_section_addr_info_from_section_table): Update.
12400         (alloc_section_addr_info, free_section_addr_info): Don't declare.
12401         * symfile.c (alloc_section_addr_info): Remove.
12402         (build_section_addr_info_from_section_table): Change return type.
12403         Update.
12404         (build_section_addr_info_from_bfd)
12405         (build_section_addr_info_from_objfile): Likewise.
12406         (free_section_addr_info): Remove.
12407         (relative_addr_info_to_section_offsets): Change type of "addrs".
12408         (addrs_section_compar): Now a std::sort comparator.
12409         (addrs_section_sort): Change return type.
12410         (addr_info_make_relative): Change type of "addrs".  Update.
12411         (default_symfile_offsets, syms_from_objfile_1)
12412         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
12413         (symbol_file_add_separate): Update.
12414         (symbol_file_add): Change type of "addrs".  Update.
12415         (add_symbol_file_command): Update.  Remove cleanups.
12416         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
12417         cleanups.
12418         * symfile-debug.c (debug_sym_offsets): Change type of "info".
12419         * solib.c (solib_read_symbols): Update.
12420         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
12421         * machoread.c (macho_symfile_offsets): Update.
12422         * jit.c (jit_bfd_try_read_symtab): Update.
12423
12424 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
12425
12426         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12427         unittests/utils-selftests.c.
12428         * unittests/utils-selftests.c: New file.
12429
12430 2018-03-14  Tom Tromey  <tom@tromey.com>
12431
12432         PR cli/14977:
12433         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
12434         for NULL.
12435
12436 2018-03-14  Tom Tromey  <tom@tromey.com>
12437
12438         PR cli/19918:
12439         * printcmd.c (printf_pointer): Allow "-" in format.
12440
12441 2018-03-14  Tom Tromey  <tom@tromey.com>
12442
12443         * printcmd.c (_initialize_printcmd): Add usage to printf.
12444
12445 2018-03-14  Yao Qi  <qiyao@sourceware.org>
12446
12447         * MAINTAINERS: Update my email address.
12448
12449 2018-03-13  Tom Tromey  <tom@tromey.com>
12450
12451         * machoread.c (macho_check_dsym): Change filenamep to a
12452         std::string*.
12453         (macho_symfile_read): Update.
12454         * symfile.c (load_command): Use std::string.
12455
12456 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
12457
12458         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
12459         to error message string.
12460         (riscv_register_name): Use xsnprintf instead of sprintf.
12461         (riscv_insn::fetch_instruction): Use gdb_assert instead of
12462         internal_error.
12463         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
12464         error.
12465         (riscv_push_dummy_call): Likewise.
12466
12467 2018-03-12  Tom Tromey  <tom@tromey.com>
12468
12469         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
12470         Use gdb::byte_vector.
12471         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
12472
12473 2018-03-12  Yao Qi  <yao.qi@linaro.org>
12474
12475         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
12476         parameter type to readable_regcache.
12477         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
12478         the declaration.
12479
12480 2018-03-11  Tom Tromey  <tom@tromey.com>
12481
12482         * dwarf2read.c (struct nextfield): Add initializers.
12483         (struct nextfnfield): Remove.
12484         (struct fnfieldlist): Add initializers.  Remove "length" and
12485         "head", use std::vector.
12486         (struct decl_field_list): Remove.
12487         (struct field_info): Add initializers.
12488         <fields, baseclasses>: Now std::vector.
12489         <nbaseclasses, nfnfields, typedef_field_list_count,
12490         nested_types_list_count>: Remove.
12491         (dwarf2_add_field, dwarf2_add_type_defn)
12492         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
12493         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
12494         (process_structure_scope): Update.
12495
12496 2018-03-11  Tom Tromey  <tom@tromey.com>
12497
12498         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
12499         for use by std::sort.
12500         (build_type_psymtabs_1): Use std::vector.
12501
12502 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
12503
12504         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
12505         and LIBMPFR in the printed configuration.
12506
12507 2018-03-08  Tom Tromey  <tom@tromey.com>
12508
12509         * source.c (get_filename_and_charpos): Use scoped_fd.
12510         * nto-procfs.c (procfs_open_1): Use scoped_fd.
12511         (procfs_pidlist): Likewise.
12512         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
12513         (iterate_over_mappings): Likewise.
12514
12515 2018-03-08  Tom Tromey  <tom@tromey.com>
12516
12517         * infcall.c (struct call_return_meta_info)
12518         <stack_temporaries_enabled>: Remove.
12519         (get_call_return_value, call_function_by_hand_dummy): Update.
12520         * thread.c (disable_thread_stack_temporaries): Remove.
12521         (enable_thread_stack_temporaries): Remove.
12522         (thread_stack_temporaries_enabled_p): Return bool.
12523         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
12524         (get_last_thread_stack_temporary): Update.
12525         * eval.c (evaluate_subexp): Update.
12526         * gdbthread.h (class enable_thread_stack_temporaries): Now a
12527         class, not a function.
12528         (value_ptr, value_vec): Remove typedefs.
12529         (class thread_info) <stack_temporaries_enabled>: Now bool.
12530         <stack_temporaries>: Now a std::vector.
12531         (thread_stack_temporaries_enabled_p)
12532         (value_in_thread_stack_temporaries): Return bool.
12533
12534 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
12535
12536         * remote.c (putpkt_binary): Fix omitted bytes reporting.
12537         (getpkt_or_notif_sane_1): Likewise.
12538
12539 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12540
12541         * build-id.c (build_id_to_debug_bfd): Use std::string.
12542
12543 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12544
12545         * build-id.c (find_separate_debug_file_by_buildid): Return
12546         std::string.
12547         * build-id.h (find_separate_debug_file_by_buildid): Return
12548         std::string.
12549         * coffread.c (coff_symfile_read): Adjust to std::string.
12550         * elfread.c (elf_symfile_read): Adjust to std::string.
12551         * symfile.c (separate_debug_file_exists): Change parameter to
12552         std::string.
12553         (find_separate_debug_file): Return std::string.
12554         (find_separate_debug_file_by_debuglink): Return std::string.
12555         * symfile.h (find_separate_debug_file_by_debuglink): Return
12556         std::string.
12557
12558 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
12559
12560         * common/xml-utils.c (xml_escape_text): Move code to...
12561         (xml_escape_text_append): ... this new function.
12562         * common/xml-utils.h (xml_escape_text_append): New declaration.
12563         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
12564         New function.
12565         (_initialize_xml_utils): register test_xml_escape_text_append as
12566         a selftest.
12567
12568 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
12569
12570         * defs.h: Remove MAX_REGISTER_SIZE.
12571         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
12572         asserts.
12573         * python/py-unwind.c (pyuw_sniffer): Likewise.
12574
12575 2018-03-07  Tom Tromey  <tom@tromey.com>
12576
12577         * linux-tdep.c (linux_info_proc): Update.
12578         * target.h (struct target_ops) <to_fileio_readlink>: Return
12579         optional<string>.
12580         (target_fileio_readlink): Return optional<string>.
12581         * remote.c (remote_hostio_readlink): Return optional<string>.
12582         * inf-child.c (inf_child_fileio_readlink): Return
12583         optional<string>.
12584         * target.c (target_fileio_readlink): Return optional<string>.
12585
12586 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
12587
12588         * regcache.c (cooked_read_test): Add riscv to the list of
12589         architectures that have a save_reggroup.
12590
12591 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12592
12593         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
12594         value is not a dynamic class object.
12595
12596 2018-03-06  Tom Tromey  <tom@tromey.com>
12597
12598         * rust-exp.y: Formatting fixes.
12599
12600 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12601
12602         * riscv-tdep.c (riscv_register_name): Remove target description
12603         support.
12604         (riscv_gdbarch_init): Remove target description check.
12605
12606 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12607
12608         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
12609         comment.
12610         * riscv-tdep.h: Likewise.
12611
12612 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12613
12614         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
12615         (riscv_pseudo_register_write): Delete.
12616         (riscv_gdbarch_init): Remove all use of pseudo registers.
12617
12618 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12619
12620         * record-btrace.c (btrace_print_lines): Replace cleanup
12621         parameter with RAII equivalents.
12622         (btrace_insn_history): Replace cleanup with RAII equivalents.
12623         * ui-out.h (make_cleanup_ui_out_list_begin_end,
12624         make_cleanup_ui_out_tuple_begin_end): Remove.
12625         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
12626         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
12627         make_cleanup_ui_out_list_begin_end): Remove.
12628
12629 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12630
12631         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
12632         parameter types to std::vector.  Use bool.
12633         (record_btrace_wait): Replace VEC(tp_t) with
12634         std::vector<thread_info *>.
12635         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
12636
12637 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
12638
12639         * record-btrace.c (record_btrace_disable_callback): Remove.
12640         (struct scoped_btrace_disable): New.
12641         (record_btrace_open): Use scoped_btrace_disable.
12642
12643 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12644
12645         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
12646         reading values from registers.
12647
12648 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12649
12650         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
12651         where appropriate.
12652
12653 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12654
12655         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
12656         change parameter type.  Use GDB's print functions, and use
12657         core_addr_to_string where appropriate.
12658         (riscv_push_dummy_call): Use core_addr_to_string where
12659         appropriate, update call to riscv_print_arg_location, and reindent
12660         a few lines.
12661         (riscv_return_value): Update call to riscv_print_arg_location.
12662
12663 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12664             Tim Newsome <tim@sifive.com>
12665             Albert Ou <a0u@eecs.berkeley.edu>
12666             Darius Rad <darius@bluespec.com>
12667
12668         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
12669         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
12670         (ALLDEPFILES): Add riscv-tdep.c
12671         * configure.tgt: Add riscv support.
12672         * riscv-tdep.c: New file.
12673         * riscv-tdep.h: New file.
12674         * NEWS: Mention new target.
12675         * MAINTAINERS: Add entry for riscv.
12676
12677 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
12678
12679         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
12680         fields within aggregates.
12681
12682 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
12683
12684         * record-btrace.c (btrace_print_lines): Change type of flags to
12685         gdb_disassembly_flags.
12686
12687 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12688
12689         * fbsd-nat.c: Include "inf-ptrace.h".
12690         (USE_SIGTRAP_SIGINFO): Conditionally define.
12691         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
12692         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
12693         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
12694         function.
12695         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
12696         Likewise.
12697         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
12698         Likewise.
12699         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
12700         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
12701         "supports_stopped_by_hw_breakpoint" target methods.
12702
12703 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12704
12705         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
12706         * fbsd-nat.c (debug_fbsd_nat): New variable.
12707         (show_fbsd_nat_debug): New function.
12708         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
12709         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
12710
12711 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
12712
12713         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
12714         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
12715         prototype.
12716         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
12717         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
12718         method.
12719
12720 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12721
12722         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
12723         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
12724
12725 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12726
12727         * charset.c (struct charset_vector): New.
12728         (charsets): Change type to charset_vector.
12729         (find_charset_names): Adjust.
12730         (add_one): Adjust.
12731         (_initialize_charset): Adjust.
12732
12733 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12734
12735         * progspace.h (struct program_space) <deleted_solibs>: Change
12736         type to std::vector<std::string>.
12737         * progspace.c (clear_program_space_solib_cache): Adjust.
12738         * breakpoint.c (print_solib_event): Adjust.
12739         (check_status_catch_solib): Adjust.
12740         * solib.c (update_solib_list): Adjust.
12741         * ui-out.h (class ui_out) <field_string>: New overload.
12742         * ui-out.c (ui_out::field_string): New overload.
12743
12744 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12745
12746         * progspace.h (struct program_space): Add constructor and
12747         destructor, initialize fields.
12748         (add_program_space): Remove.
12749         * progspace.c (add_program_space): Rename to...
12750         (program_space::program_space): ... this.
12751         (release_program_space): Rename to...
12752         (program_space::~program_space): ... this.
12753         (delete_program_space): Use delete to delete program_space.
12754         (initialize_progspace): Use new to allocate program_space.
12755         * inferior.c (add_inferior_with_spaces): Likewise.
12756         (clone_inferior_command): Likewise.
12757         * infrun.c (follow_fork_inferior): Likewise.
12758         (handle_vfork_child_exec_or_exit): Likewise.
12759
12760 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
12761
12762         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
12763         (delim_string_to_char_ptr_vec): Return std::vector of
12764         gdb::unique_xmalloc_ptr.
12765         (dirnames_to_char_ptr_vec_append): Take std::vector of
12766         gdb::unique_xmalloc_ptr.
12767         (dirnames_to_char_ptr_vec): Return std::vector of
12768         gdb::unique_xmalloc_ptr.
12769         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
12770         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
12771         (delim_string_to_char_ptr_vec): Return an std::vector of
12772         gdb::unique_xmalloc_ptr, adjust the code.
12773         (dirnames_to_char_ptr_vec_append): Take an std::vector of
12774         gdb::unique_xmalloc_ptr, adjust the code.
12775         (dirnames_to_char_ptr_vec): Return an std::vector of
12776         gdb::unique_xmalloc_ptr, adjust the code.
12777         * auto-load.c (auto_load_safe_path_vec): Change type to
12778         std::vector of gdb::unique_xmalloc_ptr.
12779         (auto_load_expand_dir_vars): Return an std::vector of
12780         gdb::unique_xmalloc_ptr, adjust the code.
12781         (auto_load_safe_path_vec_update): Adjust.
12782         (filename_is_in_auto_load_safe_path_vec): Adjust.
12783         (auto_load_objfile_script_1): Adjust.
12784         * build-id.c (build_id_to_debug_bfd): Adjust.
12785         * linux-thread-db.c (thread_db_load_search): Adjust.
12786         * source.c (add_path): Adjust.
12787         (openp): Adjust.
12788         * symfile.c (find_separate_debug_file): Adjust.
12789         * utils.c (do_free_char_ptr_vec): Remove.
12790         (make_cleanup_free_char_ptr_vec): Remove.
12791
12792 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
12793
12794         PR gdb/22907
12795         * common/pathstuff.c: Conditionally include "<windows.h>".
12796
12797 2018-03-01  Georg Sauthoff  <mail@georg.so>
12798
12799         PR gdb/22888
12800         * gcore.in: Quote variables and switch interpreter to bash.
12801
12802 2018-03-01  Tom Tromey  <tom@tromey.com>
12803
12804         * dwarf2read.c (alloc_discriminant_info): Fix default_index
12805         assertion.  Add assertion for discriminant_index.
12806         (quirk_rust_enum): Use correct base type name in univariant case.
12807
12808 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
12809
12810         * record.c (get_call_history_modifiers): Return a
12811         record_print_flags.
12812         (cmd_record_call_history): Adjust.
12813         * record-btrace.c (record_btrace_call_history): Adjust.
12814         (record_btrace_call_history_range): Adjust.
12815         (record_btrace_call_history_from): Adjust.
12816         * target-debug.h (target_debug_print_record_print_flags): New.
12817         * target-delegates.c: Re-generate.
12818         * target.c (target_call_history): Change flags type.
12819         (target_call_history_from): Likewise.
12820         (target_call_history_range): Likewise.
12821         * target.h (struct target_ops) <target_call_history>: Likewise.
12822         (target_call_history_from): Likewise.
12823         (target_call_history_range): Likewise.
12824
12825 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12826             Simon Marchi  <simon.marchi@polymtl.ca>
12827
12828         * common/common-utils.c: Include "sys/stat.h".
12829         (is_regular_file): Move here from "source.c"; change return
12830         type to "bool".
12831         * common/common-utils.h (is_regular_file): New prototype.
12832         * common/pathstuff.c (contains_dir_separator): New function.
12833         * common/pathstuff.h (contains_dir_separator): New prototype.
12834         * source.c: Don't include "sys/stat.h".
12835         (is_regular_file): Move to "common/common-utils.c".
12836
12837 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
12838
12839         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
12840         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
12841         * auto-load.c: Include "common/pathstuff.h".
12842         * common/common-def.h (current_directory): Move here.
12843         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
12844         function.
12845         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
12846         prototype.
12847         * common/pathstuff.c: New file.
12848         * common/pathstuff.h: New file.
12849         * compile/compile.c: Include "common/pathstuff.h".
12850         * defs.h (current_directory): Move to "common/common-defs.h".
12851         * dwarf2read.c: Include "common/pathstuff.h".
12852         * exec.c: Likewise.
12853         * guile/scm-safe-call.c: Likewise.
12854         * linux-thread-db.c: Likewise.
12855         * main.c: Likewise.
12856         * nto-tdep.c: Likewise.
12857         * objfiles.c: Likewise.
12858         * source.c: Likewise.
12859         * symtab.c: Likewise.
12860         * utils.c: Include "common/pathstuff.h".
12861         (gdb_realpath): Move to "common/pathstuff.c".
12862         (gdb_realpath_keepfile): Likewise.
12863         (gdb_abspath): Likewise.
12864         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
12865         (gdb_realpath_keepfile): Likewise.
12866         (gdb_abspath): Likewise.
12867
12868 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
12869
12870         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
12871         wildcard process pid for super_resume for kernels with a
12872         specific bug.
12873
12874 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
12875
12876         * compile/compile.c (get_args): Add additional comments
12877         explaining function.
12878
12879 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
12880             Tom Tromey  <tom@tromey.com>
12881
12882         * target.h (memory_write_request_s): Remove typedef.  Don't define
12883         VEC.
12884         (target_write_memory_blocks): Change argument to std::vector.
12885         (struct memory_write_request): Add constructor.
12886         * target-memory.c (compare_block_starting_address): Return bool.
12887         Change argument types.
12888         (claim_memory): Change arguments to use std::vector.
12889         (split_regular_and_flash_blocks, blocks_to_erase)
12890         (compute_garbled_blocks): Likewise.
12891         (cleanup_request_data, cleanup_write_requests_vector): Remove.
12892         (target_write_memory_blocks): Change argument to std::vector.
12893         * symfile.c (struct load_section_data): Add constructor and
12894         destructor.  Use std::vector for "requests".
12895         (struct load_progress_data): Add initializers.
12896         (load_section_callback): Update.  Use "new".
12897         (clear_memory_write_data): Remove.
12898         (generic_load): Update.
12899
12900 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
12901
12902         * arch/aarch64.h: Use common/tdesc.h.
12903
12904 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12905
12906         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
12907         architecture with a 64-bit ABI.
12908
12909 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
12910
12911         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
12912         ahead of target description loading.
12913
12914 2018-02-26  Tom Tromey  <tom@tromey.com>
12915
12916         * stack.c (backtrace_command_1): Update.
12917         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
12918         of "flags".
12919         * python/py-framefilter.c (py_print_frame)
12920         (gdbpy_apply_frame_filter): Change type of "flags".
12921         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
12922         of "flags".
12923         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
12924         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
12925         * extension.h (enum frame_filter_flag): Rename from
12926         frame_filter_flags.
12927         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
12928         (apply_ext_lang_frame_filter): Change type of "flags".
12929         * extension.c (apply_ext_lang_frame_filter): Change type of
12930         "flags".
12931         * extension-priv.h (struct extension_language_ops)
12932         <apply_frame_filter>: Change type of "flags".
12933
12934 2018-02-26  Tom Tromey  <tom@tromey.com>
12935
12936         PR python/16497:
12937         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
12938         off-by-one in py_end computation.
12939         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
12940         PRINT_MORE_FRAMES.
12941         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
12942         constant.
12943
12944 2018-02-26  Tom Tromey  <tom@tromey.com>
12945
12946         * dwarf2read.c (struct variant_field): New.
12947         (struct nextfield) <variant>: New field.
12948         (dwarf2_add_field): Handle DW_TAG_variant_part.
12949         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
12950         discriminated union.
12951         (read_structure_type): Handle DW_TAG_variant_part.
12952         (handle_struct_member_die): New function, extracted from
12953         process_structure_scope.  Handle DW_TAG_variant.
12954         (process_structure_scope): Handle discriminated unions.  Call
12955         handle_struct_member_die.
12956
12957 2018-02-26  Tom Tromey  <tom@tromey.com>
12958
12959         * rust-lang.h (rust_last_path_segment): Declare.
12960         * rust-lang.c (rust_last_path_segment): Now public.  Change
12961         contract.
12962         (struct disr_info): Remove.
12963         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
12964         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
12965         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
12966         (rust_enum_p, rust_enum_variant): New function.
12967         (rust_underscore_fields): Remove "offset" parameter.
12968         (rust_print_enum): New function.
12969         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
12970         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
12971         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
12972         enums.
12973         (rust_internal_print_type): New function, from rust_print_type.
12974         Remove enum code.
12975         (rust_print_type): Call rust_internal_print_type.
12976         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
12977         Update enum handling.
12978         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
12979         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
12980         (rust_union_quirks): New functions.
12981         (process_full_comp_unit, process_full_type_unit): Call
12982         rust_union_quirks.
12983         (process_structure_scope): Update rust_unions if necessary.
12984
12985 2018-02-26  Tom Tromey  <tom@tromey.com>
12986
12987         * value.h (value_union_variant): Declare.
12988         * valops.c (value_union_variant): New function.
12989         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
12990         (struct discriminant_info): New.
12991         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
12992         enumerator.
12993         (struct main_type) <flag_discriminated_union>: New field.
12994
12995 2018-02-26  Tom Tromey  <tom@tromey.com>
12996
12997         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12998         unittests/unpack-selftests.c.
12999         * unittests/unpack-selftests.c: New file.
13000         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
13001
13002 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13003
13004         * dwarf2read.c (struct partial_die_info) <read>: New method.
13005         (read_partial_die): Remove the declaration.
13006         (load_partial_dies): Update.
13007         (partial_die_info::partial_die_info):
13008         (read_partial_die): Change it to partial_die_info::read.
13009
13010 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13011
13012         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
13013         (fixup_partial_die): Remove declaration.
13014         (scan_partial_symbols): Update.
13015         (partial_die_parent_scope): Likewise.
13016         (partial_die_full_name): Likewise.
13017         (fixup_partial_die): Change it to partial_die_info::fixup.
13018
13019 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13020
13021         * dwarf2read.c (read_partial_die): Update the declaration.
13022         (load_partial_dies): Caller update.
13023         (read_partial_die): Remove one argument abbrev_len.
13024
13025 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13026
13027         * dwarf2read.c (struct partial_die_info): Add ctor, delete
13028         assignment operator.
13029         (load_partial_dies): Use ctor and copy ctor.
13030         (read_partial_die): Update.
13031         (dwarf2_cu::find_partial_die): Use ctor.
13032
13033 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13034
13035         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
13036         (find_partial_die_in_comp_unit): Change it to
13037         dwarf2_cu::find_partial_die.
13038         (find_partial_die): Update.
13039
13040 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13041
13042         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
13043         is NULL.
13044
13045 2018-02-26  Yao Qi  <yao.qi@linaro.org>
13046
13047         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
13048
13049 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
13050
13051         * arch/amd64.h: Use common/tdesc.h.
13052         * arch/i386.c: Likewise.
13053         * arch/i386.h: Likewise.
13054         * arch/tic6x.c: Likewise.
13055         * arch/tdesc.h: Move file from here...
13056         * common/tdesc.h: ...to here.
13057         * features/aarch64-core.c: Regenerate.
13058         * features/aarch64-fpu.c: Regenerate.
13059         * features/i386/32bit-avx.c: Regenerate.
13060         * features/i386/32bit-avx512.c: Regenerate.
13061         * features/i386/32bit-core.c: Regenerate.
13062         * features/i386/32bit-linux.c: Regenerate.
13063         * features/i386/32bit-mpx.c: Regenerate.
13064         * features/i386/32bit-pkeys.c: Regenerate.
13065         * features/i386/32bit-sse.c: Regenerate.
13066         * features/i386/64bit-avx.c: Regenerate.
13067         * features/i386/64bit-avx512.c: Regenerate.
13068         * features/i386/64bit-core.c: Regenerate.
13069         * features/i386/64bit-linux.c: Regenerate.
13070         * features/i386/64bit-mpx.c: Regenerate.
13071         * features/i386/64bit-pkeys.c: Regenerate.
13072         * features/i386/64bit-segments.c: Regenerate.
13073         * features/i386/64bit-sse.c: Regenerate.
13074         * features/i386/x32-core.c: Regenerate.
13075         * features/tic6x-c6xp.c: Regenerate.
13076         * features/tic6x-core.c: Regenerate.
13077         * features/tic6x-gp.c: Regenerate.
13078         * target-descriptions.c: Use common/tdesc.h.
13079         * target-descriptions.h: Likewise.
13080
13081 2018-02-24  Tom Tromey  <tom@tromey.com>
13082
13083         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
13084         (try_thread_db_load_from_dir, thread_db_load_search): Use
13085         std::string.
13086         (info_auto_load_libthread_db_compare): Return bool.  Change
13087         argument types.
13088         (info_auto_load_libthread_db): Use std::vector, std::string.
13089         Remove cleanups.
13090
13091 2018-02-24  Tom Tromey  <tom@tromey.com>
13092
13093         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
13094         std::string.
13095         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
13096         std::string*.
13097         * gdbarch.c: Rebuild.
13098         * gdbarch.h: Rebuild.
13099         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
13100         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
13101         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
13102         std::string*.
13103
13104 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
13105
13106         * gdbtypes.h (sect_offset): Change type to uint64_t.
13107         (sect_offset_str): New function.
13108         * dwarf2read.c (create_addrmap_from_aranges): Use
13109         sect_offset_str.
13110         (error_check_comp_unit_head): Likewise.
13111         (create_debug_type_hash_table): Likewise.
13112         (read_cutu_die_from_dwo): Likewise.
13113         (init_cutu_and_read_dies): Likewise.
13114         (init_cutu_and_read_dies_no_follow): Likewise.
13115         (process_psymtab_comp_unit_reader): Likewise.
13116         (partial_die_parent_scope): Likewise.
13117         (peek_die_abbrev): Likewise.
13118         (process_queue): Likewise.
13119         (dwarf2_physname): Likewise.
13120         (read_namespace_alias): Likewise.
13121         (read_import_statement): Likewise.
13122         (create_dwo_cu_reader): Likewise.
13123         (create_cus_hash_table): Likewise.
13124         (lookup_dwo_cutu): Likewise.
13125         (inherit_abstract_dies): Likewise.
13126         (read_func_scope): Likewise.
13127         (read_call_site_scope): Likewise.
13128         (dwarf2_add_member_fn): Likewise.
13129         (read_common_block): Likewise.
13130         (read_module_type): Likewise.
13131         (read_typedef): Likewise.
13132         (read_subrange_type): Likewise.
13133         (load_partial_dies): Likewise.
13134         (read_partial_die): Likewise.
13135         (find_partial_die): Likewise.
13136         (read_str_index): Likewise.
13137         (dwarf2_string_attr): Likewise.
13138         (build_error_marker_type): Likewise.
13139         (lookup_die_type): Likewise.
13140         (dump_die_shallow): Likewise.
13141         (follow_die_ref): Likewise.
13142         (dwarf2_fetch_die_loc_sect_off): Likewise.
13143         (dwarf2_fetch_constant_bytes): Likewise.
13144         (follow_die_sig): Likewise.
13145         (get_signatured_type): Likewise.
13146         (get_DW_AT_signature_type): Likewise.
13147         (dwarf2_find_containing_comp_unit): Likewise.
13148         (set_die_type): Likewise.
13149
13150 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
13151
13152         * arch/aarch64.c: Include "common-defs.h".
13153         * arch/amd64.c: Likewise.
13154         * arch/i386.c: Likewise.
13155
13156 2018-02-21  Tom Tromey  <tom@tromey.com>
13157
13158         * value.h: (extract_field_op): Update.
13159         * eval.c (extract_field_op): Return a const char *.
13160         * expression.h (parse_expression_for_completion): Update.
13161         * completer.c (complete_expression): Update.
13162         (add_struct_fields): Make fieldname const.
13163         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
13164         (mark_completion_tag, parse_exp_in_context_1): Update.
13165         (parse_expression_for_completion): Change "name" to
13166         unique_xmalloc_ptr*.
13167
13168 2018-02-21  Tom Tromey  <tom@tromey.com>
13169
13170         * infcall.c (call_function_by_hand_dummy): Use std::vector.
13171
13172 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13173
13174         * avr-tdep.c (avr_read_pc): Change parameter type to
13175         readable_regcache.
13176         * gdbarch.sh (read_pc): Likewise.
13177         * gdbarch.c: Re-generated.
13178         * gdbarch.h: Re-generated.
13179         * hppa-tdep.c (hppa_read_pc): Change parameter type to
13180         readable_regcache.
13181         * ia64-tdep.c (ia64_read_pc): Likewise.
13182         * mips-tdep.c (mips_read_pc): Likewise.
13183         * spu-tdep.c (spu_read_pc): Likewise.
13184
13185 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13186
13187         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
13188         * regcache-dump.c: New file.
13189         * regcache.c: Move register_dump to regcache-dump.c.
13190         (maintenance_print_registers): Likewise.
13191         (maintenance_print_raw_registers): Likewise.
13192         (maintenance_print_cooked_registers): Likewise.
13193         (maintenance_print_register_groups): Likewise.
13194         (maintenance_print_remote_registers): Likewise.
13195         (_initialize_regcache): Likewise.
13196         * regcache.h (register_dump): Moved from regcache.c.
13197
13198 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13199
13200         * regcache.c (regcache::regcache): Update.
13201         (regcache::invalidate): Move it to detached_regcache::invalidate.
13202         (get_thread_arch_aspace_regcache): Update.
13203         (regcache::raw_update): Update.
13204         (regcache::cooked_read): Remove some code.
13205         (regcache::cooked_read_value): Likewise.
13206         (regcache::raw_write): Remove assert on m_readonly_p.
13207         (regcache::raw_supply_integer): Move it to
13208         detached_regcache::raw_supply_integer.
13209         (regcache::raw_supply_zeroed): Likewise.
13210         * regcache.h (detached_regcache) <raw_supply_integer>: New
13211         declaration.
13212         <raw_supply_zeroed, invalidate>: Likewise.
13213         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
13214         <invalidate>: Likewise.
13215         <m_readonly_p>: Removed.
13216
13217 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13218
13219         * infcmd.c (get_return_value): Let stop_regs point to
13220         get_current_regcache.
13221         * regcache.c (regcache::regcache): Remove.
13222         (register_dump_reg_buffer): New class.
13223         (regcache_print): Adjust.
13224         * regcache.h (regcache): Remove constructors.
13225
13226 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13227
13228         * regcache.c (class register_dump): New class.
13229         (register_dump_regcache, register_dump_none): New class.
13230         (register_dump_remote, register_dump_groups): New class.
13231         (regcache_print): Update.
13232         * regcache.h (regcache_dump_what): Move it to regcache.c.
13233         (regcache) <dump>: Remove.
13234
13235 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13236
13237         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
13238          reg_buffer_rw *.
13239         (jit_unwind_reg_set_impl): Call raw_supply.
13240         (jit_frame_sniffer): Use reg_buffer_rw.
13241         * record-full.c (record_full_core_regbuf): Change its type.
13242         (record_full_core_open_1): Use reg_buffer_rw.
13243         (record_full_close): Likewise.
13244         (record_full_core_fetch_registers): Use regcache->raw_supply.
13245         (record_full_core_store_registers): Likewise.
13246         * regcache.c (regcache::get_register_status): Move it to
13247         reg_buffer.
13248         (regcache_raw_set_cached_value): Remove.
13249         (regcache::raw_set_cached_value): Remove.
13250         (regcache::raw_write): Call raw_supply.
13251         (regcache::raw_supply): Move it to reg_buffer_rw.
13252         * regcache.h (regcache_raw_set_cached_value): Remove.
13253         (reg_buffer_rw): New class.
13254
13255 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13256
13257         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
13258         readonly_detached_regcache.
13259         (dummy_frame_prev_register): Use regcache->cooked_read.
13260         * frame.c (frame_save_as_regcache): Change return type.
13261         (frame_pop): Update.
13262         * frame.h (frame_save_as_regcache): Update declaration.
13263         * inferior.h (get_infcall_suspend_state_regcache): Update
13264         declaration.
13265         * infrun.c (infcall_suspend_state) <registers>: use
13266         readonly_detached_regcache.
13267         (save_infcall_suspend_state): Don't use regcache_dup.
13268         (get_infcall_suspend_state_regcache): Change return type.
13269         * linux-fork.c (struct fork_info) <savedregs>: Change to
13270         readonly_detached_regcache.
13271         <pc>: New field.
13272         (fork_save_infrun_state): Don't use regcache_dup.
13273         (info_checkpoints_command): Adjust.
13274         * mi/mi-main.c (register_changed_p): Update declaration.
13275         (mi_cmd_data_list_changed_registers): Use
13276         readonly_detached_regcache.
13277         (register_changed_p): Change parameter type to
13278         readonly_detached_regcache.
13279         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
13280         readonly_detached_regcache.
13281         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
13282         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
13283         New.
13284         (regcache::save): Move it to reg_buffer.
13285         (regcache::restore): Change parameter type.
13286         (regcache_dup): Remove.
13287         * regcache.h (reg_buffer) <save>: New method.
13288         (readonly_detached_regcache): New class.
13289         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
13290         readonly_detached_regcache.
13291         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
13292
13293 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13294
13295         * frame.c (frame_save_as_regcache): Use regcache method save.
13296         (frame_pop): Use regcache method restore.
13297         * infrun.c (restore_infcall_suspend_state): Likewise.
13298         * linux-fork.c (fork_load_infrun_state): Likewise.
13299         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
13300         save.
13301         * regcache.c (regcache_save): Remove.
13302         (regcache::restore): More asserts.
13303         (regcache_cpy): Remove.
13304         * regcache.h (regcache_save): Remove the declaration.
13305         (regcache::restore): Move from private to public.
13306         Remove the friend declaration of regcache_cpy.
13307         (regcache_cpy): Remove declaration.
13308
13309 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13310
13311         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
13312         parameter type to 'readable_regcache *'.
13313         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
13314         * arm-tdep.c (arm_neon_quad_read): Likewise.
13315         (arm_pseudo_read): Likewise.
13316         * avr-tdep.c (avr_pseudo_register_read): Likewise.
13317         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
13318         * frv-tdep.c (frv_pseudo_register_read): Likewise.
13319         * gdbarch.c: Re-generated.
13320         * gdbarch.h: Re-generated.
13321         * gdbarch.sh (pseudo_register_read): Change parameter type to
13322         'readable_regcache *'.
13323         (pseudo_register_read_value): Likewise.
13324         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
13325         (h8300_pseudo_register_read): Likewise.
13326         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
13327         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
13328         (i386_pseudo_register_read_into_value): Likewise.
13329         (i386_pseudo_register_read_value): Likewise.
13330         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
13331         declaration.
13332         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
13333         * m32c-tdep.c (m32c_raw_read): Likewise.
13334         (m32c_read_flg): Likewise.
13335         (m32c_banked_register): Likewise.
13336         (m32c_banked_read): Likewise.
13337         (m32c_sb_read): Likewise.
13338         (m32c_part_read): Likewise.
13339         (m32c_cat_read): Likewise.
13340         (m32c_r3r2r1r0_read): Likewise.
13341         (m32c_pseudo_register_read): Likewise.
13342         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
13343         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
13344         (mep_pseudo_cr64_read): Likewise.
13345         (mep_pseudo_register_read): Likewise.
13346         * mips-tdep.c (mips_pseudo_register_read): Likewise.
13347         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
13348         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
13349         * regcache.c (regcache::raw_read): Move it to readable_regcache.
13350         (regcache::cooked_read): Likewise.
13351         (regcache::cooked_read_value): Likewise.
13352         (regcache_cooked_read_signed):
13353         (regcache::cooked_read): Likewise.
13354         * regcache.h (readable_regcache): New class.
13355         (regcache): Inherit readable_regcache.  Move some methods to
13356         readable_regcache.
13357         * rl78-tdep.c (rl78_pseudo_register_read): Change
13358         parameter type to 'readable_regcache *'.
13359         * rs6000-tdep.c (do_regcache_raw_read): Remove.
13360         (e500_pseudo_register_read): Change parameter type to
13361         'readable_regcache *'.
13362         (dfp_pseudo_register_read): Likewise.
13363         (vsx_pseudo_register_read): Likewise.
13364         (efpr_pseudo_register_read): Likewise.
13365         * s390-tdep.c (s390_pseudo_register_read): Likewise.
13366         * sh-tdep.c (sh_pseudo_register_read): Likewise.
13367         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
13368         (sh64_pseudo_register_read): Likewise.
13369         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
13370         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
13371         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
13372         (spu_pseudo_register_read): Likewise.
13373         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
13374         (xtensa_pseudo_register_read): Likewise.
13375
13376 2018-02-21  Yao Qi  <yao.qi@linaro.org>
13377
13378         * regcache.c (regcache::regcache): Call reg_buffer ctor.
13379         (regcache::arch): Move it to reg_buffer::arch.
13380         (regcache::register_buffer): Likewise.
13381         (regcache::assert_regnum): Likewise.
13382         (regcache::num_raw_registers): Likewise.
13383         * regcache.h (reg_buffer): New class.
13384         (regcache): Inherit reg_buffer.
13385
13386 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
13387
13388         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
13389         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
13390
13391 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
13392
13393         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
13394
13395 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
13396
13397         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
13398         (SFILES): Remove common/*.c files.
13399         (COMMON_OBS): Remove some *.o files built from common/*.c files.
13400         * common/common.host: Add common reference.
13401         * configure.ac: Likewise.
13402         * configure: Regenerate.
13403
13404 2018-02-16  Yao Qi  <yao.qi@linaro.org>
13405
13406         * block.c (block_namespace_info): Inherit allocate_on_obstack.
13407         (block_initialize_namespace): Use new.
13408         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
13409         (dwarf2_free_objfile): Use delete.
13410         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
13411         (copy_type_recursive): Use new.
13412         * gdb_obstack.h (allocate_on_obstack): New.
13413
13414 2018-02-15  Yao Qi  <yao.qi@linaro.org>
13415
13416         PR gdb/22849
13417         * inferior.c (exit_inferior_1): Reset inf->control.
13418
13419 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
13420
13421         * ada-lang.c (ada_to_fixed_value_create): Delete advance
13422         declaration.
13423
13424 2018-02-14  Pedro Alves  <palves@redhat.com>
13425
13426         * frame-unwind.c (frame_unwind_try_unwinder): Always call
13427         frame_cleanup_after_sniffer on exception.
13428
13429 2018-02-14  Tom Tromey  <tom@tromey.com>
13430
13431         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
13432         const.
13433         (solib_bfd_open): Make pathname const.
13434         * solib.c (solib_bfd_open): Make pathname const.
13435         * solib-spu.c (spu_bfd_fopen): Make name const.
13436         (spu_bfd_open): Make pathname const.
13437         * solib-darwin.c (darwin_bfd_open): Make pathname const.
13438         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
13439
13440 2018-02-14  Tom Tromey  <tom@tromey.com>
13441
13442         * symfile.c (symfile_bfd_open): Update.
13443         * source.h (openp, source_full_path_of, find_and_open_source):
13444         Change argument type to unique_xmalloc_ptr.
13445         * source.c (openp): Take a unique_xmalloc_ptr.
13446         (source_full_path_of, find_and_open_source): Likewise.
13447         (open_source_file, symtab_to_fullname): Update.
13448         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
13449         unique_xmalloc_ptr.
13450         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
13451         (exec_file_find): Update.
13452         * psymtab.c (psymtab_to_fullname): Update.
13453         * nto-tdep.h (nto_find_and_open_solib): Update.
13454         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
13455         unique_xmalloc_ptr.
13456         * exec.c (exec_file_attach): Update.
13457         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
13458         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
13459
13460 2018-02-14  Tom Tromey  <tom@tromey.com>
13461
13462         * solib.c: Include source.h.
13463         * nto-tdep.c: Include source.h.
13464         * mi/mi-cmd-env.c: Include source.h.
13465         * infcmd.c: Include source.h.
13466         * exec.c: Include source.h.
13467         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
13468         (add_path, directory_switch, source_path, init_source_path): Move
13469         declarations...
13470         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
13471         (add_path, directory_switch, source_path, init_source_path):
13472         ...here.
13473
13474 2018-02-14  Tom Tromey  <tom@tromey.com>
13475
13476         * solist.h (exec_file_find, solib_find): Return
13477         unique_xmalloc_ptr.
13478         (solib_bfd_fopen): Take a const char *.
13479         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
13480         (exec_file_find, solib_find): Likewise.
13481         (solib_bfd_fopen): Do not take ownership of "pathname".
13482         (solib_bfd_open): Use unique_xmalloc_ptr.
13483         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
13484         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
13485         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
13486         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
13487
13488 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
13489
13490         * ada-lang.c (name_match_type_from_name): Remove reference to
13491         ada_name_for_lookup in function's documentation.
13492         * ada-lang.h (ada_name_for_lookup): Delete declaration.
13493
13494 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13495
13496         * defs.h (enum openp_flags): New enum.
13497         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
13498         Move to enum openp_flags.
13499         (openp_flags): New enum flags.
13500         (openp): Change parameter type to openp_flags.
13501         * source.c (openp): Change parameter type to openp_flags.
13502         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
13503         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
13504
13505 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
13506
13507         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
13508         per-command.
13509
13510 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
13511
13512         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
13513         into...
13514         (class dwarf2_queue_guard): ...the destructor of this new class.
13515         (dw2_do_instantiate_symtab): Create instance of the new class
13516         dwarf2_queue_guard, remove cleanup.
13517
13518 2018-02-09  Tom Tromey  <tom@tromey.com>
13519
13520         * source.c (find_source_lines): Don't reference past the end of
13521         the vector.
13522
13523 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13524
13525         * remote.c (remote_btrace_maybe_reopen): Change error message.
13526         * btrace.c (btrace_enable): Likewise.
13527         (parse_xml_btrace): Likewise.
13528         (parse_xml_btrace_conf): Likewise.
13529
13530 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13531
13532         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
13533         (linux_enable_pt, linux_enable_bts): Call
13534         diagnose_perf_event_open_fail.
13535
13536 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13537
13538         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
13539         Remove parameter and change return type.  Update callers.  Move it.
13540         (linux_enable_bts, linux_enable_pt): Improve error message.
13541         (linux_enable_pt): Remove zero buffer size check.
13542         (linux_enable_btrace): Improve error messages.  Remove NULL return
13543         check.
13544
13545 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13546
13547         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13548         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
13549         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
13550         (linux_supports_pt, linux_supports_btrace): Remove.
13551         (linux_enable_bts): Call cpu_supports_bts.
13552         * nat/linux-btrace.h (linux_supports_btrace): Remove.
13553         * remote.c (remote_supports_btrace): Remove.
13554         (init_remote_ops): Remove remote_supports_btrace.
13555         * target-delegates.c: Regenerated.
13556         * target.c (target_supports_btrace): Remove.
13557         * target.h (target_ops) <to_supports_btrace>: Remove
13558         (target_supports_btrace): Remove.
13559         * x86-linux-nat.c (x86_linux_create_target): Remove
13560         linux_supports_btrace.
13561
13562 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13563
13564         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
13565         btrace failed.
13566         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
13567         exception and use message in own exception.
13568
13569 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13570
13571         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
13572         (perf_event_pt_event_type): Use gdb_file_up.
13573         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
13574         scoped_fd, and scoped_mmap.
13575
13576 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13577
13578         * common/scoped_mmap.h: New.
13579         * unittests/scoped_mmap-selftest.c: New.
13580         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13581         unittests/scoped_mmap-selftest.c.
13582
13583 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
13584
13585         * common/scoped_fd.h: New.
13586         * unittests/scoped_fd-selftest.c: New.
13587         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13588         unittests/scoped_fd-selftest.c.
13589
13590 2018-02-09  Tom Tromey  <tom@tromey.com>
13591
13592         * auto-load.c (auto_load_section_scripts): Use
13593         gdb::unique_xmalloc_ptr.
13594
13595 2018-02-09  Tom Tromey  <tom@tromey.com>
13596
13597         * auto-load.c (execute_script_contents): Use std::string.
13598
13599 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
13600
13601         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
13602         Python function, rather than a new command.
13603
13604 2018-02-08  Tom Tromey  <tom@tromey.com>
13605
13606         * solib.c (solib_find_1): Use std::string.
13607         (solib_bfd_fopen): Use unique_xmalloc_ptr.
13608
13609 2018-02-08  Tom Tromey  <tom@tromey.com>
13610
13611         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
13612
13613 2018-02-08  Tom Tromey  <tom@tromey.com>
13614
13615         * source.c (find_source_lines): Use gdb::def_vector.
13616
13617 2018-02-08  Tom Tromey  <tom@tromey.com>
13618
13619         * macrocmd.c (struct temporary_macro_definition): New.
13620         (macro_define_command): Use temporary_macro_definition.  Remove
13621         cleanups.
13622         (free_macro_definition_ptr): Remove.
13623
13624 2018-02-08  Tom Tromey  <tom@tromey.com>
13625
13626         * macroexp.c (maybe_expand): Use std::string.
13627
13628 2018-02-08  Tom Tromey  <tom@tromey.com>
13629
13630         * macroexp.c (struct macro_buffer): Add initializers for some
13631         members.
13632         (init_buffer, init_shared_buffer, free_buffer)
13633         (free_buffer_return_text): Remove.
13634         (macro_buffer): New constructors.
13635         (~macro_buffer): New destructor.
13636         (macro_buffer::set_shared): New method.
13637         (macro_buffer::resize_buffer, macro_buffer::appendc)
13638         (macro_buffer::appendmem): Now methods, not free functions.
13639         (set_token, append_tokens_without_splicing, stringify)
13640         (macro_stringify): Update.
13641         (gather_arguments): Change return type.  Remove argc_p argument,
13642         add args_ptr argument.  Use std::vector.
13643         (substitute_args): Remove argc argument.  Accept std::vector.
13644         (expand): Update.  Use std::vector.
13645         (scan, macro_expand, macro_expand_next): Update.
13646
13647 2018-02-08  Tom Tromey  <tom@tromey.com>
13648
13649         * symtab.c (default_collect_symbol_completion_matches_break_on):
13650         Use unique_xmalloc_ptr.
13651         * macroscope.h: (sal_macro_scope, user_macro_scope)
13652         (default_macro_scope): Return unique_xmalloc_ptr.
13653         * macroscope.c (sal_macro_scope, user_macro_scope)
13654         (default_macro_scope): Return unique_xmalloc_ptr.
13655         * macroexp.h (macro_expand, macro_expand_once): Return
13656         unique_xmalloc_ptr.
13657         * macroexp.c (macro_expand, macro_expand_once): Return
13658         unique_xmalloc_ptr.
13659         * macrocmd.c (macro_expand_command, macro_expand_once_command)
13660         (info_macro_command, info_macros_command): Use
13661         unique_xmalloc_ptr.
13662         * compile/compile-c-support.c (write_macro_definitions): Use
13663         unique_xmalloc_ptr.
13664         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
13665
13666 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
13667
13668         * value.c (value_static_field): Assign field type instead of
13669         containing type when returning an optimized out value.
13670
13671 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13672
13673         * ft32-tdep.c (ft32_read_pc): Remove.
13674         (ft32_write_pc): Remove.
13675         (ft32_gdbarch_init): Update.
13676         * m32r-tdep.c (m32r_read_pc): Remove.
13677         (m32r_gdbarch_init): Update.
13678         * mep-tdep.c (mep_read_pc): Remove.
13679         (mep_gdbarch_init): Update.
13680         * microblaze-tdep.c (microblaze_write_pc): Remove.
13681         (microblaze_gdbarch_init): Update.
13682         * mn10300-tdep.c (mn10300_read_pc): Remove.
13683         (mn10300_write_pc): Remove.
13684         (mn10300_gdbarch_init): Update.
13685         * moxie-tdep.c (moxie_read_pc): Remove.
13686         (moxie_write_pc): Remove.
13687         (moxie_gdbarch_init): Update.
13688
13689 2018-02-06  Yao Qi  <yao.qi@linaro.org>
13690
13691         * expprint.c (print_subexp_standard): Handle
13692         OP_F77_UNDETERMINED_ARGLIST.
13693         (dump_subexp_body_standard): Likewise.
13694
13695 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
13696
13697         * target-descriptions.c (tdesc_element_visitor) Add empty
13698         implementations.
13699         (tdesc_type): Move make_gdb_type from here.
13700         (tdesc_type_builtin): Likewise.
13701         (tdesc_type_vector): Likewise.
13702         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
13703         (make_gdb_type_struct): Move from tdesc_type_with_fields.
13704         (make_gdb_type_union): Likewise.
13705         (make_gdb_type_flags): Likewise.
13706         (make_gdb_type_enum): Likewise.
13707         (make_gdb_type): New function.
13708         (tdesc_register_type): Use static make_gdb_type.
13709
13710 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
13711
13712         * infcmd.c (default_print_one_register_info): Align natural-format
13713         column values consistently one under another.
13714         (pad_to_column): New function.
13715
13716 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
13717
13718         * dwarf2read.c (dwarf2_physname): Move commment.
13719
13720 2018-02-01  Leszek Swirski  <leszeks@google.com>
13721
13722         * varobj.c (varobj_formatted_print_options): Allow recursive
13723         pretty printing if pretty printing is enabled.
13724
13725 2018-02-01  Leszek Swirski  <leszeks@google.com>
13726
13727         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
13728         names after a structop as a filename.
13729
13730 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13731
13732         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
13733         (arm_record_coproc_data_proc): Likewise.
13734
13735 2018-02-01  Yao Qi  <yao.qi@linaro.org>
13736
13737         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
13738
13739 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
13740
13741         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
13742         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
13743
13744 2018-01-31  Pedro Alves  <palves@redhat.com>
13745
13746         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
13747         * inflow.c (child_terminal_save_inferior): Wrap reference to
13748         tcgetpgrp in HAVE_TERMIOS_H.
13749         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
13750         _WIN32.
13751         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
13752         always iterate over all inferiors.
13753         (gdbsim_cntrl_c): Adjust.
13754         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
13755
13756 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13757
13758         * gdbtypes.c (lookup_array_range_type): Make sure the array's
13759         index type is objfile-owned if the element type is as well.
13760
13761 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
13762
13763         GDB 8.1 released.
13764
13765 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13766
13767         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
13768         "features/s390x-linux64.c".
13769         (_initialize_s390_linux_tdep): Remove initialization of tdescs
13770         s390_linux32 and s390x_linux64.
13771         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
13772         default tdesc.
13773         * s390-tdep.c: Include "features/s390-linux32.c" and
13774         "features/s390x-linux64.c".
13775         (s390_tdesc_valid): Add check for tdesc_has_registers.
13776         (s390_gdbarch_init): Make sure there is always a valid tdesc.
13777         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
13778         tdesc_s390x_linux64.
13779         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
13780         tdesc_s390x_linux64 to...
13781         * s390-tdep.h: ...here.
13782
13783 2018-01-30  Pedro Alves  <palves@redhat.com>
13784
13785         PR gdb/13211
13786         * config.in, configure: Regenerate.
13787         * configure.ac: Check for getpgid.
13788         * go32-nat.c (go32_pass_ctrlc): New.
13789         (go32_target): Install it.
13790         * inf-child.c (inf_child_target): Install
13791         child_terminal_save_inferior, child_pass_ctrlc and
13792         child_interrupt.
13793         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
13794         (inf_ptrace_target): No longer install it.
13795         * infcmd.c (interrupt_target_1): Adjust.
13796         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
13797         (child_interrupt): Declare.
13798         (inferior::terminal_state): New.
13799         * inflow.c (struct terminal_info): Update comments.
13800         (inferior_process_group): Delete.
13801         (terminal_is_ours): Delete.
13802         (gdb_tty_state): New.
13803         (child_terminal_init): Adjust.
13804         (is_gdb_terminal, sharing_input_terminal_1)
13805         (sharing_input_terminal): New functions.
13806         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
13807         Set the process's actual process group in the foreground if
13808         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
13809         mark terminal as the inferior's if not sharing GDB's terminal.
13810         Don't check attach_flag.
13811         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
13812         pass down a target_terminal_state.
13813         (child_terminal_save_inferior): New, factored out from ...
13814         (child_terminal_ours_1): ... this.  Handle
13815         target_terminal_state::is_ours_for_output.
13816         (child_interrupt, child_pass_ctrlc): New.
13817         (inflow_inferior_exit): Clear the inferior's terminal_state.
13818         (copy_terminal_info): Copy the inferior's terminal state.
13819         (_initialize_inflow): Remove reference to terminal_is_ours.
13820         * inflow.h (inferior_process_group): Delete.
13821         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
13822         * procfs.c (procfs_target): Don't install procfs_interrupt.
13823         (procfs_interrupt): Delete.
13824         * remote.c (remote_serial_quit_handler): Adjust.
13825         (remote_interrupt): Remove ptid parameter.  Adjust.
13826         * target-delegates.c: Regenerate.
13827         * target.c: Include "terminal.h".
13828         (target_terminal::terminal_state): Rename to ...
13829         (target_terminal::m_terminal_state): ... this.
13830         (target_terminal::init): Adjust.
13831         (target_terminal::inferior): Adjust to per-inferior
13832         terminal_state.
13833         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
13834         (target_terminal::ours, target_terminal::ours_for_output): Use
13835         target_terminal_is_ours_kind.
13836         (target_interrupt): Remove ptid parameter.  Adjust.
13837         (default_target_pass_ctrlc): Adjust.
13838         * target.h (target_ops::to_terminal_save_inferior): New field.
13839         (target_ops::to_interrupt): Remove ptid_t parameter.
13840         (target_interrupt): Remove ptid_t parameter.  Update comment.
13841         (target_pass_ctrlc): Update comment.
13842         * target/target.h (target_terminal_state): New scoped enum,
13843         factored out of ...
13844         (target_terminal::terminal_state): ... here.
13845         (target_terminal::inferior): Update comments.
13846         (target_terminal::restore_inferior): New.
13847         (target_terminal::is_inferior, target_terminal::is_ours)
13848         (target_terminal::is_ours_for_output): Adjust.
13849         (target_terminal::scoped_restore_terminal_state): Adjust to
13850         rename, and call restore_inferior() instead of inferior().
13851         (target_terminal::scoped_restore_terminal_state::m_state): Change
13852         type.
13853         (target_terminal::terminal_state): Rename to ...
13854         (target_terminal::m_terminal_state): ... this and change type.
13855
13856 2018-01-30  Pedro Alves  <palves@redhat.com>
13857
13858         * linux-nat.c (wait_for_signal): New function.
13859         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
13860         directly.
13861         (async_terminal_is_ours)
13862         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
13863         (linux_nat_add_target): Don't override
13864         to_terminal_inferior/to_terminal_ours.
13865
13866 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
13867
13868         * remote.c (remote_follow_fork): Don't call "detach_inferior".
13869
13870 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
13871
13872         * dwarf2read.c (free_dwo_files): Add forward-declaration.
13873         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
13874         dwarf2_per_objfile_free here.
13875         (dwarf2_per_objfile_free): Remove.
13876         (_initialize_dwarf2_read): Don't register
13877         dwarf2_per_objfile_free as a registry cleanup.
13878
13879 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
13880
13881         Avoid compilation errors in MinGW native builds
13882
13883         The error is triggered by including python-internal.h, and the
13884         error message is:
13885
13886              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
13887                       from build-gnulib/import/math.h:27,
13888                       from d:/usr/Python26/include/pyport.h:235,
13889                       from d:/usr/Python26/include/Python.h:58,
13890                       from python/python-internal.h:94,
13891                       from python/py-arch.c:24:
13892              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
13893         using ::hypot;
13894                 ^~~~~
13895
13896         This happens because Python headers define 'hypot' to expand t
13897         '_hypot' in the Windows builds.
13898         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
13899         'hypoth'.  This avoids a compilation error.
13900
13901 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13902
13903         * MAINTAINERS (Write After Approval): Fix ordering.
13904
13905 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
13906
13907         * MAINTAINERS (Write After Approval): Add Alan Hayward.
13908
13909 2018-01-26  Alan Modra  <amodra@gmail.com>
13910
13911         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
13912         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
13913         Remove nop.  Make const.  Comment.
13914         (powerpc32_plt_stub_so_2): New.
13915         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
13916         Correct count.  Update uses.
13917         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
13918         Move common code reading PLT entry word.  Correct
13919         powerpc32_plt_stub PLT address calculation.
13920         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
13921         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
13922         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
13923         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
13924         (ppc64_standard_linkage8): Likewise.
13925         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
13926         Correct insns description.
13927         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
13928
13929 2018-01-24  Pedro Alves  <palves@redhat.com>
13930
13931         GCC PR libstdc++/83906
13932         * gdbtypes.c (operator==(const dynamic_prop &,
13933         const dynamic_prop &)): New.
13934         (operator==(const range_bounds &, const range_bounds &)): New.
13935         (check_types_equal): Use them instead of memcmp.
13936         * gdbtypes.h (operator==(const dynamic_prop &,
13937         const dynamic_prop &)): Declare.
13938         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
13939         (operator==(const range_bounds &, const range_bounds &)): Declare.
13940         (operator!=(const range_bounds &, const range_bounds &)): Declare.
13941
13942 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13943
13944         * s390-linux-tdep.c (s390_record_address_mask)
13945         (s390_record_calc_disp_common, s390_record_calc_disp)
13946         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13947         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13948         (s390_process_record): Move to s390-tdep.c.
13949         (s390_linux_init_abi_any): Adjust.
13950         * s390-tdep.c (s390_record_address_mask)
13951         (s390_record_calc_disp_common, s390_record_calc_disp)
13952         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
13953         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
13954         (s390_process_record): Moved from s390-linux-tdep.c
13955         (s390_gdbarch_init): Adjust.
13956
13957 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13958
13959         * s390-linux-nat.c (s390-tdep.h): New include.
13960         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
13961         (HFILES_NO_SRCDIR): Add s390-tdep.h.
13962         (ALLDEPFILES): Add s390-tdep.c.
13963         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
13964         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
13965         * s390-tdep.h: ...this.  New file.
13966         * s390-linux-tdep.c (s390-tdep.h): New include.
13967         (_initialize_s390_tdep): Rename to...
13968         (_initialize_s390_linux_tdep): ...this and adjust.
13969         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
13970         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
13971         s390-tdep.h.
13972         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
13973         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
13974         (s390_is_partial_instruction, s390_software_single_step)
13975         (is_non_branch_ril, s390_displaced_step_copy_insn)
13976         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
13977         (s390_prologue_data, s390_addr, s390_store, s390_load)
13978         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
13979         (s390_register_call_saved, s390_guess_tracepoint_registers)
13980         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
13981         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
13982         (s390_pseudo_register_name, s390_pseudo_register_type)
13983         (s390_pseudo_register_read, s390_pseudo_register_write)
13984         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
13985         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
13986         (s390_addr_bits_remove, s390_address_class_type_flags)
13987         (s390_address_class_type_flags_to_name)
13988         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
13989         (s390_function_arg_float, s390_function_arg_vector)
13990         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
13991         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
13992         (s390_frame_align, s390_register_return_value, s390_return_value)
13993         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
13994         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
13995         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
13996         (s390_trad_frame_prev_register, s390_unwind_cache)
13997         (s390_prologue_frame_unwind_cache)
13998         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
13999         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
14000         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
14001         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
14002         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
14003         (s390_frame_base_address, s390_local_base_address)
14004         (s390_frame_base, s390_gcc_target_options)
14005         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
14006         (s390_validate_reg_range, s390_tdesc_valid)
14007         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
14008         * s390-tdep.c: ...this.  New file.
14009
14010 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14011
14012         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
14013         (s390_process_record, s390_gdbarch_tdep_alloc)
14014         (s390_linux_init_abi_any): Use/set new hook.
14015
14016 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14017
14018         * s390-linux-tdep.c (osabi.h): New include.
14019         (s390_linux_init_abi_31, s390_linux_init_abi_64)
14020         (s390_linux_init_abi_any): New functions.
14021         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
14022
14023 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14024
14025         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
14026         tdesc_has_registers check
14027
14028 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14029
14030         * s390-linux-tdep.c (s390_tdesc_valid): New function.
14031         (s390_validate_reg_range): New macro.
14032         (s390_gdbarch_init): Adjust.
14033
14034 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14035
14036         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
14037         (s390_gdbarch_tdep_alloc): Adjust.
14038         (s390_gdbarch_init): Adjust.
14039
14040 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14041
14042         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
14043         <have_tdb>: Change type to bool.
14044         (s390_gdbarch_tdep_alloc): Adjust.
14045         (s390_gdbarch_init): Adjust.
14046
14047 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14048
14049         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
14050         (gdbarch_tdep) <have_upper, have_vx>: New fields.
14051         (s390_gdbarch_tdep_alloc): New function.
14052         (s390_gdbarch_init): Allocate tdep at start and use its fields
14053         instead of separate variables.
14054
14055 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14056
14057         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
14058         when looking for cached gdbarch and add comment for remaining.
14059
14060 2018-01-22  Pedro Alves  <palves@redhat.com>
14061             Sergio Durigan Junior  <sergiodj@redhat.com>
14062
14063         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
14064         case.
14065
14066 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
14067
14068         * MAINTAINERS: Update my company e-mail address.
14069
14070 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14071
14072         * regcache.c (cooked_write_test): New function.
14073         (_initialize_regcache): Register the test.
14074
14075 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14076
14077         * ia64-tdep.c (ia64_pseudo_register_read): Call
14078         regcache->cooked_read instead of regcache_cooked_read_unsigned.
14079         * m32c-tdep.c (m32c_cat_read): Likewise.
14080         (m32c_r3r2r1r0_read): Likewise.
14081         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
14082         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
14083
14084 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14085
14086         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
14087         method raw_read instead of regcache_raw_read.
14088         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
14089         * arm-tdep.c (arm_neon_quad_read): Likewise.
14090         * avr-tdep.c (avr_pseudo_register_read): Likewise.
14091         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
14092         * frv-tdep.c (frv_pseudo_register_read): Likewise.
14093         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
14094         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
14095         (i386_pseudo_register_read_into_value): Likewise.
14096         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
14097         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
14098         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
14099         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
14100         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
14101         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
14102         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
14103         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
14104         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
14105
14106 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14107
14108         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
14109         * configure.tgt: Remove target mt.
14110         * mt-tdep.c: Remove.
14111         * regcache.c (cooked_read_test): Remove the check for mt.
14112
14113 2018-01-22  Yao Qi  <yao.qi@linaro.org>
14114
14115         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
14116         instead of gdbarch_pseudo_register_read_value.
14117
14118 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14119
14120         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
14121         language is Ada.
14122
14123 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
14124
14125         * linespec.c (create_sals_line_offset): Remove code that preserved
14126         the symtab_and_line's line number.
14127
14128 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14129
14130         * varobj.c (varobj_create): Don't set valid_block when creating a
14131         floating varobj.
14132
14133 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14134
14135         * varobj.c (varobj_create): Remove out of date comment.
14136
14137 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14138
14139         PR mi/20395
14140         * ada-exp.y (write_var_from_sym): Pass extra parameter when
14141         updating innermost block.
14142         * parse.c (innermost_block_tracker::update): Take extra type
14143         parameter, and check types match before updating innermost block.
14144         (write_dollar_variable): Update innermost block for registers.
14145         * parser-defs.h (enum innermost_block_tracker_type): New enum.
14146         (innermost_block_tracker::innermost_block_tracker): Initialise
14147         m_types member.
14148         (innermost_block_tracker::reset): Take type parameter.
14149         (innermost_block_tracker::update): Take type parameter, and pass
14150         type through as needed.
14151         (innermost_block_tracker::m_types): New member.
14152         * varobj.c (varobj_create): Pass type when reseting innermost
14153         block.
14154
14155 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14156
14157         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
14158         * ada-lang.c (resolve_subexp): Likewise.
14159         * breakpoint.c (set_breakpoint_condition) Likewise.
14160         (watch_command_1) Likewise.
14161         * c-exp.y (variable): Likewise.
14162         * d-exp.y (PrimaryExpression): Likewise.
14163         * f-exp.y (variable): Likewise.
14164         * go-exp.y (variable): Likewise.
14165         * m2-exp.y (variable): Likewise.
14166         * objfiles.c (objfile::~objfile): Likewise.
14167         * p-exp.y (variable): Likewise.
14168         * parse.c (innermost_block): Change type.
14169         * parser-defs.h (class innermost_block_tracker): New.
14170         (innermost_block): Change to innermost_block_tracker.
14171         * printcmd.c (display_command): Switch to innermost_block API.
14172         (do_one_display): Likewise.
14173         * rust-exp.y (do_one_display): Likewise.
14174         * symfile.c (clear_symtab_users): Likewise.
14175         * varobj.c (varobj_create): Switch to innermost_block API, replace
14176         use of innermost_block with block stored on varobj object.
14177
14178 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
14179
14180         * expression.h (innermost_block): Remove declaration.
14181         * varobj.c: Add 'parser-defs.h' include.
14182
14183 2018-01-19  Tom Tromey  <tom@tromey.com>
14184
14185         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
14186         symbols in the static and global blocks.
14187
14188 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
14189
14190         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
14191         gdb_ptrace.h, and move including gdb_wait.h ...
14192         * nat/linux-ptrace.h: ... to here.
14193
14194 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14195
14196         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
14197         inf_ptrace_detach_success.
14198         (inf_ptrace_detach_success): Add inferior parameter, use it
14199         instead of inferior_ptid, pass it to detach_inferior.
14200         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
14201         parameter.
14202         * inferior.c (detach_inferior): Add overload that takes an
14203         inferior object.
14204         * inferior.h (detach_inferior): Likewise.
14205         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
14206         use inferior_ptid, adjust call to inf_ptrace_detach_success.
14207         * linux-thread-db.c (thread_db_detach): Use inf parameter.
14208
14209 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14210
14211         * target.h (struct target_ops) <to_detach>: Add inferior
14212         parameter.
14213         (target_detach): Likewise.
14214         * target.c (dispose_inferior): Pass inferior down.
14215         (target_detach): Pass inferior down.  Assert that it is equal to
14216         the current inferior.
14217         * aix-thread.c (aix_thread_detach): Pass inferior down.
14218         * corefile.c (core_file_command): Pass current_inferior() down.
14219         * corelow.c (core_detach): Add inferior parameter.
14220         * darwin-nat.c (darwin_detach): Likewise.
14221         * gnu-nat.c (gnu_detach): Likewise.
14222         * inf-ptrace.c (inf_ptrace_detach): Likewise.
14223         * infcmd.c (detach_command): Pass current_inferior() down to
14224         target_detach.
14225         * infrun.c (follow_fork_inferior): Pass parent_inf to
14226         target_detach.
14227         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
14228         target_detach.
14229         * linux-nat.c (linux_nat_detach): Add inferior parameter.
14230         * linux-thread-db.c (thread_db_detach): Likewise.
14231         * nto-procfs.c (procfs_detach): Likewise.
14232         * procfs.c (procfs_detach): Likewise.
14233         * record.c (record_detach): Likewise.
14234         * record.h (struct inferior): Forward-declare.
14235         (record_detach): Add inferior parameter.
14236         * remote-sim.c (gdbsim_detach): Likewise.
14237         * remote.c (remote_detach_1): Likewise.
14238         (remote_detach): Likewise.
14239         (extended_remote_detach): Likewise.
14240         * sol-thread.c (sol_thread_detach): Likewise.
14241         * target-debug.h (target_debug_print_inferior_p): New macro.
14242         * target-delegates.c: Re-generate.
14243         * top.c (kill_or_detach): Pass inferior down to target_detach.
14244         * windows-nat.c (windows_detach): Add inferior parameter.
14245
14246 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
14247
14248         * target.h (struct target_ops) <to_detach>: Remove args
14249         parameter.
14250         (target_detach): Likewise.
14251         * target.c (dispose_inferior): Adjust.
14252         (target_detach): Remove args parameter, adjust.
14253         * aix-thread.c (aix_thread_detach): Adjust.
14254         * corefile.c (core_file_command): Adjust.
14255         * corelow.c (core_detach): Adjust.
14256         * darwin-nat.c (darwin_detach): Adjust.
14257         * gnu-nat.c (gnu_detach): Adjust.
14258         * inf-ptrace.c (inf_ptrace_detach): Adjust.
14259         * infcmd.c (detach_command): Adjust
14260         * infrun.c (follow_fork_inferior): Adjust.
14261         (handle_vfork_child_exec_or_exit): Adjust.
14262         * linux-fork.c (linux_fork_detach): Remove args parameter.
14263         * linux-fork.h (linux_fork_detach): Likewise.
14264         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
14265         * linux-thread-db.c (thread_db_detach): Likewise.
14266         * nto-procfs.c (procfs_detach): Likewise.
14267         * procfs.c (procfs_detach): Likewise.
14268         (do_detach): Remove signo parameter.
14269         * record.c (record_detach): Remove args parameter.
14270         * record.h (record_detach): Likewise.
14271         * remote-sim.c (gdbsim_detach): Likewise.
14272         * remote.c (remote_detach_1): Likewise.
14273         (remote_detach): Likewise.
14274         (extended_remote_detach): Likewise.
14275         * sol-thread.c (sol_thread_detach): Likewise.
14276         * target-delegates.c: Re-generate.
14277         * top.c (struct qt_args) <args>: Remove field.
14278         (kill_or_detach): Don't pass args.
14279         (quit_force): Don't set args.
14280         * windows-nat.c (windows_detach): Remove args parameter.
14281
14282 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14283
14284         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
14285         (arm_linux_init_abi): Install it.
14286
14287 2018-01-19  Yao Qi  <yao.qi@linaro.org>
14288
14289         * osabi.c (gdb_osabi_names): Extend the regexp for
14290         arm-linux-gnueabihf.
14291
14292 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14293
14294         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
14295         m_abbrevs.
14296         (abbrev_table::add_abbrev): Update.
14297         (abbrev_table::lookup_abbrev): Update.
14298
14299 2018-01-18  Yao Qi  <yao.qi@linaro.org>
14300
14301         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
14302
14303 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
14304
14305         * compile/compile.c (compile_to_object): Convert "triplet_rx"
14306         to "std::string".
14307
14308 2018-01-17  Tom Tromey  <tom@tromey.com>
14309
14310         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
14311
14312 2018-01-17  Tom Tromey  <tom@tromey.com>
14313
14314         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
14315         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
14316         (create_array_type_with_stride): Update.
14317         * dwarf2read.c (set_die_type): Update.
14318
14319 2018-01-17  Tom Tromey  <tom@tromey.com>
14320
14321         * dwarf2read.c (delayed_method_info): Remove typedef.
14322         (dwarf2_cu::method_info): Now a std::vector.
14323         (add_to_method_list): Update.
14324         (free_delayed_list): Remove.
14325         (compute_delayed_physnames): Update.
14326         (process_full_comp_unit, process_full_type_unit): Clear the method
14327         list.  Remove cleanups.
14328         (psymtab_include_file_name): Add name_holder parameter.  Use
14329         unique_xmalloc_ptr.
14330         (dwarf_decode_lines): Update.
14331
14332 2018-01-17  Tom Tromey  <tom@tromey.com>
14333             Simon Marchi  <simon.marchi@ericsson.com>
14334
14335         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
14336         (dwarf2_per_objfile::free_cached_comp_units)
14337         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14338         (init_cutu_and_read_dies_no_follow): Update.
14339         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
14340         (dwarf2_cu::~dwarf2_cu): New.
14341         (free_heap_comp_unit, free_stack_comp_unit): Remove.
14342         (age_cached_comp_units, free_one_cached_comp_unit): Update.
14343
14344 2018-01-17  Tom Tromey  <tom@tromey.com>
14345             Simon Marchi  <simon.marchi@ericsson.com>
14346
14347         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
14348         (struct die_reader_specs) <abbrev_table>: New member.
14349         (struct abbrev_table): Add constructor.
14350         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
14351         <abbrev_obstack>: Now an auto_obstack.
14352         (abbrev_table_up): New typedef.
14353         (init_cu_die_reader): Add abbrev_table parameter.
14354         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
14355         Add result_dwo_abbrev_table.
14356         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
14357         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
14358         Update.
14359         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
14360         parameter.
14361         (skip_children): Update.
14362         (abbrev_table::alloc_abbrev): Rename from
14363         abbrev_table_alloc_abbrev.
14364         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
14365         (abbrev_table::lookup_abbrev): Rename from
14366         abbrev_table_lookup_abbrev.
14367         (abbrev_table_read_table): Return abbrev_table_up.
14368         (abbrev_table_free, abbrev_table_free_cleanup)
14369         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
14370         (load_partial_dies): Update.
14371
14372 2018-01-17  Tom Tromey  <tom@tromey.com>
14373
14374         * dwarf2read.c (dwarf2_compute_name): Update comment.
14375         (read_func_scope, read_variable): Update.
14376         (new_symbol): Remove.
14377         (new_symbol_full): Rename to new_symbol.
14378
14379 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
14380
14381         PR gdb/16577
14382         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
14383         a warning instead of throwing an error, set section size to 0 and return
14384         NULL.
14385         * gdb_bfd.h (gdb_bfd_map_section): Update description.
14386
14387 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14388
14389         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
14390         std::string.
14391         (linux_ptrace_attach_fail_reason_string): Likewise.
14392         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
14393         Likewise.
14394         (linux_ptrace_attach_fail_reason_string): Likewise.
14395         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
14396
14397 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
14398
14399         * linux-nat.c (linux_nat_attach): Remove xstrdup.
14400
14401 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
14402
14403         PR gdb/21559
14404         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
14405         checking for fs_base/gs_base fields in struct user_regs_struct.
14406         * configure: Regenerate.
14407
14408 2018-01-17  Yao Qi  <yao.qi@linaro.org>
14409
14410         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
14411         function.
14412         (aarch64_linux_init_abi): Install it to gdbarch hook
14413         gcc_target_options.
14414
14415 2018-01-15  Pedro Alves  <palves@redhat.com>
14416
14417         * common/signals-state-save-restore.c
14418         (save_original_signals_state): Fix typos.
14419
14420 2017-01-12  Tom Tromey  <tom@tromey.com>
14421             Sergio Durigan Junior  <sergiodj@redhat.com>
14422
14423         * Makefile.in (install-only): Install gdb-add-index.
14424
14425 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
14426
14427         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
14428
14429 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14430
14431         * infrun.c (keep_going_pass_signal): Clear step-over info when
14432         insert_breakpoints fails.
14433
14434 2018-01-11  Pedro Alves  <palves@redhat.com>
14435
14436         PR gdb/22583
14437         * infrun.c (resume): Rename to ...
14438         (resume_1): ... this.
14439         (resume): Reimplement as wrapper around resume_1.
14440
14441 2018-01-11  Pedro Alves  <palves@redhat.com>
14442
14443         PR remote/22597
14444         * remote.c (remote_parse_stop_reply): Default to the last-set
14445         general thread instead of to 'magic_null_ptid'.
14446
14447 2018-01-10  Pedro Alves  <palves@redhat.com>
14448
14449         * language.h (language_get_symbol_name_matcher): Rename ...
14450         (get_symbol_name_matcher): ... this.
14451         * language.c (language_get_symbol_name_matcher): Ditto.
14452         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
14453         callers adjusted.
14454
14455 2018-01-10  Pedro Alves  <palves@redhat.com>
14456
14457         PR gdb/22670
14458         * dwarf2read.c
14459         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
14460         Adjust to use language_get_symbol_name_matcher instead of
14461         language_defn::la_get_symbol_name_matcher.
14462         * language.c (language_get_symbol_name_matcher): If in Ada mode
14463         and the lookup name is a verbatim match, return Ada's matcher.
14464         * language.h (language_get_symbol_name_matcher): Adjust comment.
14465         (ada_lookup_name_info::verbatim_p):: New method.
14466
14467 2018-01-10  Pedro Alves  <palves@redhat.com>
14468
14469         PR gdb/22670
14470         * ada-lang.c (ada_collect_symbol_completion_matches): If the
14471         minsym's language is language_auto or language_cplus, pass down
14472         language_ada instead.
14473         * symtab.c (compare_symbol_name): Don't frob symbol language here.
14474
14475 2018-01-10  Pedro Alves  <palves@redhat.com>
14476
14477         PR gdb/22670
14478         * minsyms.c (linkage_name_str): New function.
14479         (iterate_over_minimal_symbols): Use it.
14480
14481 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14482
14483         * NEWS: Document that 'info proc' now works on FreeBSD.
14484
14485 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14486
14487         * configure.ac: Check for kinfo_getfile in libutil.
14488         * configure: Regenerate.
14489         * config.in: Regenerate.
14490         * fbsd-nat.c: Include "fbsd-tdep.h".
14491         (fbsd_fetch_cmdline): New.
14492         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
14493         rather than calling error.
14494         (fbsd_info_proc): New.
14495         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
14496         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
14497         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
14498
14499 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14500
14501         * fbsd-nat.c (struct free_deleter): Remove.
14502         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
14503
14504 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14505
14506         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
14507         NULL for an empty pathname.
14508
14509 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
14510
14511         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
14512         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
14513         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
14514         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
14515         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
14516         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
14517         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
14518         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
14519         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
14520         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
14521         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
14522         (fbsd_core_fetch_timeval, fbsd_print_sigset)
14523         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
14524         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
14525         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
14526
14527 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
14528
14529         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
14530         (gnu_xfer_auxv): New function.
14531         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
14532         TARGET_OBJECT_AUXV.
14533
14534 2018-01-08  Yao Qi  <yao.qi@linaro.org>
14535             Simon Marchi  <simon.marchi@ericsson.com>
14536
14537         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
14538         common/selftest.c.
14539         (COMMON_OBS): Remove selftest.o.
14540         * configure.ac: Append selftest-arch.c and common/selftest.c to
14541         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
14542         * configure: Re-generated.
14543         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
14544         GDB_SELF_TEST.
14545         (maintenance_info_selftests): Likewise.
14546
14547 2018-01-08  Xavier Roirand  <roirand@adacore.com>
14548
14549         * ada-valprint.c (val_print_packed_array_elements): Use
14550         proper number of elements when printing an array indexed
14551         by an enumeration type.
14552
14553 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14554
14555         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
14556         (dw2_get_file_names_reader): Adjust.
14557         (lookup_dwo_signatured_type): Adjust.
14558         (lookup_dwp_signatured_type): Adjust.
14559         (lookup_signatured_type): Adjust.
14560         (create_type_unit_group): Adjust.
14561         (get_type_unit_group): Adjust.
14562         (process_psymtab_comp_unit_reader): Adjust.
14563         (build_type_psymtabs_reader): Adjust.
14564         (scan_partial_symbols): Adjust.
14565         (add_partial_symbol): Adjust.
14566         (add_partial_subprogram): Adjust.
14567         (peek_die_abbrev): Adjust.
14568         (fixup_go_packaging): Adjust.
14569         (process_imported_unit_die): Adjust.
14570         (dwarf2_compute_name): Adjust.
14571         (dwarf2_physname): Adjust.
14572         (read_import_statement): Adjust.
14573         (handle_DW_AT_stmt_list): Adjust.
14574         (read_file_scope): Adjust.
14575         (read_func_scope): Adjust.
14576         (read_lexical_block_scope): Adjust.
14577         (read_call_site_scope): Adjust.
14578         (read_variable): Adjust.
14579         (dwarf2_rnglists_process): Adjust.
14580         (dwarf2_ranges_process): Adjust.
14581         (dwarf2_ranges_read): Adjust.
14582         (dwarf2_get_pc_bounds): Adjust.
14583         (dwarf2_record_block_ranges): Adjust.
14584         (dwarf2_add_field): Adjust.
14585         (dwarf2_add_member_fn): Adjust.
14586         (read_structure_type): Adjust.
14587         (process_structure_scope): Adjust.
14588         (read_enumeration_type): Adjust.
14589         (read_array_type): Adjust.
14590         (mark_common_block_symbol_computed): Adjust.
14591         (read_common_block): Adjust.
14592         (read_namespace_type): Adjust.
14593         (read_namespace): Adjust.
14594         (read_module_type): Adjust.
14595         (read_tag_pointer_type): Adjust.
14596         (read_tag_ptr_to_member_type): Adjust.
14597         (read_tag_string_type): Adjust.
14598         (read_subroutine_type): Adjust.
14599         (read_typedef): Adjust.
14600         (read_base_type): Adjust.
14601         (attr_to_dynamic_prop): Adjust.
14602         (read_subrange_type): Adjust.
14603         (read_unspecified_type): Adjust.
14604         (dwarf2_read_abbrevs): Adjust.
14605         (load_partial_dies): Adjust.
14606         (read_partial_die): Adjust.
14607         (find_partial_die): Adjust.
14608         (guess_partial_die_structure_name): Adjust.
14609         (fixup_partial_die): Adjust.
14610         (read_attribute_value): Adjust.
14611         (read_addr_index): Adjust.
14612         (read_addr_index_from_leb128): Adjust.
14613         (read_str_index): Adjust.
14614         (dwarf2_string_attr): Adjust.
14615         (get_debug_line_section): Adjust.
14616         (dwarf_decode_line_header): Adjust.
14617         (lnp_state_machine::check_line_address): Adjust.
14618         (dwarf_decode_lines_1): Adjust.
14619         (dwarf_decode_lines): Adjust.
14620         (dwarf2_start_symtab): Adjust.
14621         (var_decode_location): Adjust.
14622         (new_symbol_full): Adjust.
14623         (dwarf2_const_value_data): Adjust.
14624         (dwarf2_const_value_attr): Adjust.
14625         (dwarf2_const_value): Adjust.
14626         (die_type): Adjust.
14627         (die_containing_type): Adjust.
14628         (build_error_marker_type): Adjust.
14629         (lookup_die_type): Adjust.
14630         (guess_full_die_structure_name): Adjust.
14631         (anonymous_struct_prefix): Adjust.
14632         (determine_prefix): Adjust.
14633         (dwarf2_name): Adjust.
14634         (follow_die_ref_or_sig): Adjust.
14635         (follow_die_offset): Adjust.
14636         (follow_die_ref): Adjust.
14637         (follow_die_sig_1): Adjust.
14638         (follow_die_sig): Adjust.
14639         (get_signatured_type): Adjust.
14640         (get_DW_AT_signature_type): Adjust.
14641         (decode_locdesc): Adjust.
14642         (dwarf_decode_macros): Adjust.
14643         (cu_debug_loc_section): Adjust.
14644         (fill_in_loclist_baton): Adjust.
14645         (dwarf2_symbol_mark_computed): Adjust.
14646         (init_one_comp_unit): Don't assign
14647         dwarf2_cu::dwarf2_per_objfile.
14648         (set_die_type): Adjust.
14649
14650 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14651
14652         * dwarf2read.c (struct mapped_debug_names): Add constructor.
14653         <dwarf2_per_objfile>: New field.
14654         (dwarf2_per_objfile): Remove global.
14655         (get_dwarf2_per_objfile): New function.
14656         (set_dwarf2_per_objfile): New function.
14657         (dwarf2_build_psymtabs_hard): Change objfile parameter to
14658         dwarf2_per_objfile.
14659         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14660         (read_abbrev_offset): Likewise.
14661         (read_indirect_string): Likewise.
14662         (read_indirect_line_string): Likewise.
14663         (read_indirect_string_at_offset): Likewise.
14664         (read_indirect_string_from_dwz): Likewise.
14665         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14666         dwarf2_per_objfile.
14667         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14668         (create_all_comp_units): Change objfile parameter to
14669         dwarf2_per_objfile.
14670         (create_all_type_units): Likewise.
14671         (process_queue): Add dwarf2_per_objfile parameter.
14672         (read_and_check_comp_unit_head): Likewise.
14673         (lookup_dwo_unit_in_dwp): Likewise.
14674         (get_dwp_file): Likewise.
14675         (process_cu_includes): Likewise.
14676         (struct free_dwo_file_cleanup_data): New struct.
14677         (dwarf2_has_info): Use get_dwarf2_per_objfile and
14678         set_dwarf2_per_objfile.
14679         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
14680         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
14681         context, adjust calls.
14682         (dw2_instantiate_symtab): Likewise.
14683         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
14684         (dw2_get_cu): Likewise.
14685         (create_cu_from_index_list): Change objfile parameter to
14686         dwarf2_per_objfile.
14687         (create_cus_from_index_list): Get dwarf2_per_objfile from
14688         context, adjust calls.
14689         (create_cus_from_index): Likewise.
14690         (create_signatured_type_table_from_index): Change objfile
14691         parameter to dwarf2_per_objfile.
14692         (create_signatured_type_table_from_debug_names): Change objfile
14693         parameter to dwarf2_per_objfile.
14694         (create_addrmap_from_index): Likewise.
14695         (create_addrmap_from_aranges): Likewise.
14696         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
14697         (dw2_setup): Remove.
14698         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
14699         context.
14700         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
14701         get_dwarf2_per_objfile.
14702         (dw2_forget_cached_source_info): Likewise.
14703         (dw2_map_symtabs_matching_filename): Likewise.
14704         (struct dw2_symtab_iterator) <index>: Remove.
14705         <dwarf2_per_objfile>: New field.
14706         (dw2_symtab_iter_init): Replace index parameter with
14707         dwarf2_per_objfile.
14708         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
14709         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
14710         (dw2_print_stats): Likewise.
14711         (dw2_dump): Likewise.
14712         (dw2_expand_symtabs_for_function): Likewise.
14713         (dw2_expand_all_symtabs): Likewise.
14714         (dw2_expand_symtabs_with_fullname): Likewise.
14715         (dw2_expand_marked_cus): Replace index and objfile parameters
14716         with dwarf2_per_objfile.
14717         (dw_expand_symtabs_matching_file_matcher): Add
14718         dwarf2_per_objfile parameter and adjust calls.
14719         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
14720         adjust calls.
14721         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
14722         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
14723         adjust calls.
14724         (create_cus_from_debug_names_list): Replace objfile parameter
14725         with dwarf2_per_objfile and adjust calls.
14726         (create_cus_from_debug_names): Likewise.
14727         (dwarf2_read_debug_names): Likewise.
14728         (mapped_debug_names::namei_to_name): Adjust call.
14729         (dw2_debug_names_iterator::next): Likewise.
14730         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
14731         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
14732         (dw2_debug_names_dump): Likewise.
14733         (dw2_debug_names_expand_symtabs_for_function): Likewise.
14734         (dw2_debug_names_expand_symtabs_matching): Likewise.
14735         (dwarf2_initialize_objfile): Likewise.
14736         (dwarf2_build_psymtabs): Likewise.
14737         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
14738         this_cu.
14739         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
14740         (read_and_check_comp_unit_head): Likewise.
14741         (read_abbrev_offset): Likewise.
14742         (create_debug_type_hash_table): Likewise.
14743         (create_debug_types_hash_table): Likewise.
14744         (create_all_type_units): Replace objfile parameter with
14745         dwarf2_per_objfile.
14746         (add_type_unit): Add dwarf2_per_objfile parameter.
14747         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
14748         with dwarf2_per_objfile.
14749         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
14750         (lookup_dwp_signatured_type): Likewise.
14751         (lookup_signatured_type): Likewise.
14752         (read_cutu_die_from_dwo): Likewise.
14753         (init_tu_and_read_dwo_dies): Likewise.
14754         (init_cutu_and_read_dies): Likewise.
14755         (init_cutu_and_read_dies_no_follow): Likewise.
14756         (allocate_type_unit_groups_table): Add objfile parameter.
14757         (create_type_unit_group): Use dwarf2_per_objfile from cu.
14758         (get_type_unit_group): Likewise.
14759         (process_psymtab_comp_unit): Update call.
14760         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
14761         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
14762         (print_tu_stats): Likewise.
14763         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
14764         in void* parameter.
14765         (build_type_psymtabs): Change objfile parameter to
14766         dwarf2_per_objfile.
14767         (process_skeletonless_type_unit): Use dwarf2_per_objfile
14768         passed in void* parameter.
14769         (process_skeletonless_type_units): Change objfile parameter to
14770         dwarf2_per_objfile.
14771         (set_partial_user): Likewise.
14772         (dwarf2_build_psymtabs_hard): Likewise.
14773         (read_comp_units_from_section): Likewise.
14774         (create_all_comp_units): Likewise.
14775         (scan_partial_symbols): Update calls.
14776         (add_partial_symbol): Likewise.
14777         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
14778         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
14779         (process_queue): Add dwarf2_per_objfile parameter.
14780         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
14781         (compute_compunit_symtab_includes): Likewise.
14782         (process_cu_includes): Add dwarf2_per_objfile parameter.
14783         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
14784         (process_full_type_unit): Likewise.
14785         (process_imported_unit_die): Update call.
14786         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
14787         (read_file_scope): Likewise.
14788         (allocate_dwo_file_hash_table): Add objfile parameter.
14789         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
14790         (create_cus_hash_table): Likewise.
14791         (create_dwp_hash_table): Likewise.
14792         (create_dwo_unit_in_dwp_v1): Likewise.
14793         (create_dwp_v2_section): Likewise.
14794         (create_dwo_unit_in_dwp_v2): Likewise.
14795         (lookup_dwo_unit_in_dwp): Likewise.
14796         (try_open_dwop_file): Likewise.
14797         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
14798         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
14799         cleanup to include a reference to dwarf2_per_objfile.
14800         (open_dwp_file): Add dwarf2_per_objfile parameter.
14801         (open_and_init_dwp_file): Likewise.
14802         (get_dwp_file): Likewise.
14803         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
14804         (queue_and_load_all_dwo_tus): Update call.
14805         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
14806         data.
14807         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
14808         (dwarf2_ranges_process): Likewise.
14809         (dwarf2_get_pc_bounds): Likewise.
14810         (mark_common_block_symbol_computed): Likewise.
14811         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
14812         (dwarf2_read_abbrevs): Update call.
14813         (read_partial_die): Use dwarf2_per_objfile from cu.
14814         (find_partial_die): Likewise.
14815         (fixup_partial_die): Likewise.
14816         (read_attribute_value): Likewise.
14817         (read_indirect_string_at_offset_from): Add objfile parameter.
14818         (read_indirect_string_at_offset): Add dwarf2_per_objfile
14819         parameter.
14820         (read_indirect_string_from_dwz): Add objfile parameter.
14821         (read_indirect_string): Add objfile parameter.
14822         (read_addr_index_1): Add dwarf2_per_objfile parameter.
14823         (read_addr_index): Use dwarf2_per_objfile from cu.
14824         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
14825         call dw2_setup.
14826         (read_str_index): Use dwarf2_per_objfile from cu.
14827         (get_debug_line_section): Likewise.
14828         (read_formatted_entries): Add dwarf2_per_objfile parameter.
14829         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
14830         (new_symbol_full): Use dwarf2_per_objfile from cu.
14831         (build_error_marker_type): Likewise.
14832         (lookup_die_type): Likewise.
14833         (determine_prefix): Likewise.
14834         (follow_die_offset): Likewise.
14835         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
14836         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
14837         (dwarf2_fetch_die_type_sect_off): Likewise.
14838         (dwarf2_get_die_type): Likewise.
14839         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
14840         (get_signatured_type): Likewise.
14841         (get_DW_AT_signature_type): Likewise.
14842         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
14843         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
14844         (cu_debug_loc_section): Likewise.
14845         (fill_in_loclist_baton): Likewise.
14846         (dwarf2_symbol_mark_computed): Likewise.
14847         (dwarf2_find_containing_comp_unit): Change objfile parameter to
14848         dwarf2_per_objfile.
14849         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
14850         parameter.
14851         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
14852         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
14853         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
14854         (set_die_type): Use dwarf2_free_objfile from cu.
14855         (get_die_type_at_offset): Likewise.
14856         (dwarf2_per_objfile_free): Don't assign global variable.
14857         (debug_names) <constructor>: Add dwarf2_per_objfile
14858         parameter, update m_debugstrlookup construction.
14859         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
14860         parameter.
14861         <m_dwarf2_per_objfile>: New field.
14862         <lookup>: Use m_dwarf2_per_objfile.
14863         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
14864         (psyms_seen_size): Likewise.
14865         (write_gdbindex): Replace objfile parameter with
14866         dwarf2_per_objfile.
14867         (write_debug_names): Likewise.
14868         (write_psymtabs_to_index): Likewise.
14869         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
14870         calls.
14871
14872 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14873
14874         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
14875         <dwarf2_per_objfile>: New field.
14876         (struct dwarf2_per_cu_data) <objfile>: Remove.
14877         <dwarf2_per_objfile>: New field.
14878         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
14879         of objfile.
14880         (create_signatured_type_table_from_index): Likewise.
14881         (create_debug_type_hash_table): Likewise.
14882         (fill_in_sig_entry_from_dwo_entry): Likewise.
14883         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
14884         (create_type_unit_group): Assign dwarf2_per_objfile instead of
14885         objfile.
14886         (create_partial_symtab): Access objfile through
14887         dwarf2_per_objfile.
14888         (process_psymtab_comp_unit_reader): Likewise.
14889         (read_comp_units_from_section): Likewise.
14890         (scan_partial_symbols): Likewise.
14891         (add_partial_symbol): Likewise.
14892         (add_partial_subprogram): Likewise.
14893         (peek_die_abbrev): Likewise.
14894         (fixup_go_packaging): Likewise.
14895         (process_full_comp_unit): Likewise.
14896         (process_full_type_unit): Likewise.
14897         (process_imported_unit_die): Likewise.
14898         (dwarf2_compute_name): Likewise.
14899         (dwarf2_physname): Likewise.
14900         (read_import_statement): Likewise.
14901         (create_cus_hash_table): Assign dwarf2_physname instead of
14902         objfile.
14903         (read_func_scope): Access objfile through dwarf2_per_objfile.
14904         (read_lexical_block_scope): Likewise.
14905         (read_call_site_scope): Likewise.
14906         (read_variable): Likewise.
14907         (dwarf2_rnglists_process): Likewise.
14908         (dwarf2_ranges_process): Likewise.
14909         (dwarf2_ranges_read): Likewise.
14910         (dwarf2_record_block_ranges): Likewise.
14911         (dwarf2_add_field): Likewise.
14912         (dwarf2_add_member_fn): Likewise.
14913         (read_structure_type): Likewise.
14914         (process_structure_scope): Likewise.
14915         (read_enumeration_type): Likewise.
14916         (read_array_type): Likewise.
14917         (read_common_block): Likewise.
14918         (read_namespace_type): Likewise.
14919         (read_namespace): Likewise.
14920         (read_module_type): Likewise.
14921         (read_tag_pointer_type): Likewise.
14922         (read_tag_ptr_to_member_type): Likewise.
14923         (read_tag_string_type): Likewise.
14924         (read_subroutine_type): Likewise.
14925         (read_typedef): Likewise.
14926         (read_base_type): Likewise.
14927         (attr_to_dynamic_prop): Likewise.
14928         (read_subrange_type): Likewise.
14929         (read_unspecified_type): Likewise.
14930         (load_partial_dies): Likewise.
14931         (read_partial_die): Likewise.
14932         (find_partial_die): Likewise.
14933         (guess_partial_die_structure_name): Likewise.
14934         (fixup_partial_die): Likewise.
14935         (read_attribute_value): Likewise.
14936         (read_addr_index_from_leb128): Likewise.
14937         (dwarf2_read_addr_index): Likewise.
14938         (dwarf2_string_attr): Likewise.
14939         (lnp_state_machine::check_line_address): Likewise.
14940         (dwarf_decode_lines_1): Likewise.
14941         (dwarf_decode_lines): Likewise.
14942         (dwarf2_start_symtab): Likewise.
14943         (var_decode_location): Likewise.
14944         (new_symbol_full): Likewise.
14945         (dwarf2_const_value_data): Likewise.
14946         (dwarf2_const_value_attr): Likewise.
14947         (dwarf2_const_value): Likewise.
14948         (die_type): Likewise.
14949         (die_containing_type): Likewise.
14950         (lookup_die_type): Likewise.
14951         (guess_full_die_structure_name): Likewise.
14952         (anonymous_struct_prefix): Likewise.
14953         (dwarf2_name): Likewise.
14954         (follow_die_ref_or_sig): Likewise.
14955         (follow_die_offset): Likewise.
14956         (follow_die_ref): Likewise.
14957         (dwarf2_fetch_die_loc_sect_off): Likewise.
14958         (dwarf2_fetch_constant_bytes): Likewise.
14959         (dwarf2_fetch_die_type_sect_off): Likewise.
14960         (dwarf2_get_die_type): Likewise.
14961         (follow_die_sig): Likewise.
14962         (decode_locdesc): Likewise.
14963         (dwarf2_per_cu_objfile): Likewise.
14964         (dwarf2_per_cu_text_offset): Likewise.
14965         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
14966         objfile.
14967         (set_die_type): Access objfile through
14968         dwarf2_per_objfile.
14969
14970 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
14971
14972         * valprint.c (converted_character_d): Remove typedef.
14973         (DEF_VEC_O (converted_character_d)): Remove.
14974         (count_next_character): Use std::vector.
14975         (print_converted_chars_to_obstack): Likewise.
14976         (generic_printstr): Likewise.
14977
14978 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
14979
14980         * xml-support.h (struct gdb_xml_value): Add constructor.
14981         <value>: Change type to unique_xmalloc_ptr.
14982         (gdb_xml_value_s): Remove typedef.
14983         (DEF_VEC_O (gdb_xml_value_s)): Remove.
14984         (gdb_xml_element_start_handler): Change parameter type to
14985         std::vector.
14986         (xml_find_attribute): Likewise.
14987         * xml-support.c (xml_find_attribute): Change parameter type to
14988         std::vector and adjust.
14989         (gdb_xml_values_cleanup): Remove.
14990         (gdb_xml_parser::start_element): Adjust to std::vector.
14991         (xinclude_start_include): Change paraeter type to std::vector
14992         and adjust.
14993         * btrace.c (check_xml_btrace_version): Likewise.
14994         (parse_xml_btrace_block): Likewise.
14995         (parse_xml_btrace_pt_config_cpu): Likewise.
14996         (parse_xml_btrace_pt): Likewise.
14997         (parse_xml_btrace_conf_bts): Likewise.
14998         (parse_xml_btrace_conf_pt): Likewise.
14999         * memory-map.c (memory_map_start_memory): Likewise.
15000         (memory_map_start_property): Likewise.
15001         * osdata.c (osdata_start_osdata): Likewise.
15002         (osdata_start_item): Likewise.
15003         (osdata_start_column): Likewise.
15004         * remote.c (start_thread): Likewise.
15005         * solib-aix.c (library_list_start_library): Likewise.
15006         (library_list_start_list): Likewise.
15007         * solib-svr4.c (library_list_start_library): Likewise.
15008         (svr4_library_list_start_list): Likewise.
15009         * solib-target.c (library_list_start_segment): Likewise.
15010         (library_list_start_section): Likewise.
15011         (library_list_start_library): Likewise.
15012         (library_list_start_list): Likewise.
15013         * tracepoint.c (traceframe_info_start_memory): Likewise.
15014         (traceframe_info_start_tvar): Likewise.
15015         * xml-syscall.c (syscall_start_syscall): Likewise.
15016         * xml-tdesc.c (tdesc_start_target): Likewise.
15017         (tdesc_start_feature): Likewise.
15018         (tdesc_start_reg): Likewise.
15019         (tdesc_start_union): Likewise.
15020         (tdesc_start_struct): Likewise.
15021         (tdesc_start_flags): Likewise.
15022         (tdesc_start_enum): Likewise.
15023         (tdesc_start_field): Likewise.
15024         (tdesc_start_enum_value): Likewise.
15025         (tdesc_start_vector): Likewise.
15026
15027 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15028
15029         * extension.h (struct xmethod_worker) <clone>: Remove.
15030         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
15031         Remove.
15032         (python_xmethod_worker::clone): Remove.
15033         * valops.c (find_overload_match): Use std::move instead of
15034         clone.
15035
15036 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
15037
15038         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
15039         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
15040         <free_xmethod_worker_data>: Remove.
15041         <get_matching_xmethod_workers>: Chance VEC to std::vector.
15042         <get_xmethod_arg_types>: Remove.
15043         <get_xmethod_result_type>: Remove.
15044         <invoke_xmethod>: Remove.
15045         * extension.c (new_xmethod_worker): Remove.
15046         (clone_xmethod_worker): Remove.
15047         (get_matching_xmethod_workers): Return void, pass std::vector by
15048         pointer.
15049         (get_xmethod_arg_types): Rename to...
15050         (xmethod_worker::get_arg_types): ... this, and adjust.
15051         (get_xmethod_result_type): Rename to...
15052         (xmethod_worker::get_result_type): ... this, and adjust.
15053         (invoke_xmethod): Remove.
15054         (free_xmethod_worker): Remove.
15055         (free_xmethod_worker_vec): Remove.
15056         * extension.h (enum ext_lang_rc): Move here from
15057         extension-priv.h.
15058         (struct xmethod_worker): Add constructor and destructor.
15059         <data>: Remove.
15060         <value>: Remove.
15061         <invoke, clone, do_get_result_type, do_get_arg_types>: New
15062         virtual pure methods.
15063         <get_arg_types, get_result_type>: New methods.
15064         (xmethod_worker_ptr): Remove typedef.
15065         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
15066         (xmethod_worker_vec): Remove typedef.
15067         (xmethod_worker_up): New typedef.
15068         (invoke_xmethod): Remove.
15069         (clone_xmethod_worker): Remove.
15070         (free_xmethod_worker): Remove.
15071         (free_xmethod_worker_vec): Remove.
15072         (get_xmethod_arg_types): Remove.
15073         (get_xmethod_result_type): Remove.
15074         * valops.c (find_method_list): Use std::vector, don't use
15075         intermediate vector.
15076         (value_find_oload_method_list): Use std::vector.
15077         (find_overload_match): Use std::vector.
15078         (find_oload_champ): Use std::vector.
15079         * value.c (value_free): Use operator delete.
15080         (value_of_xmethod): Rename to...
15081         (value_from_xmethod): ... this.  Don't assign
15082         xmethod_worker::value, take rvalue-reference.
15083         (result_type_of_xmethod): Adjust.
15084         (call_xmethod): Adjust.
15085         * value.h: Include extension.h.
15086         (struct xmethod_worker): Don't forward-declare.
15087         (value_of_xmethod): Rename to...
15088         (value_from_xmethod): ... this, take rvalue-reference.
15089         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
15090         (struct python_xmethod_worker): ... this, add constructor and
15091         destructor.
15092         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
15093         (gdbpy_free_xmethod_worker_data): Rename to...
15094         (python_xmethod_worker::~python_xmethod_worker): ... this and
15095         adjust.
15096         (gdbpy_clone_xmethod_worker_data): Rename to...
15097         (python_xmethod_worker::clone): ... this and adjust.
15098         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
15099         temporary vector.
15100         (gdbpy_get_xmethod_arg_types): Rename to...
15101         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
15102         (gdbpy_get_xmethod_result_type): Rename to...
15103         (python_xmethod_worker::do_get_result_type): ... this and
15104         adjust.
15105         (gdbpy_invoke_xmethod): Rename to...
15106         (python_xmethod_worker::invoke): ... this and adjust.
15107         (new_python_xmethod_worker): Rename to...
15108         (python_xmethod_worker::python_xmethod_worker): ... this and
15109         adjust.
15110         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
15111         Remove.
15112         (gdbpy_free_xmethod_worker_data): Remove.
15113         (gdbpy_get_matching_xmethod_workers): Use std::vector.
15114         (gdbpy_get_xmethod_arg_types): Remove.
15115         (gdbpy_get_xmethod_result_type): Remove.
15116         (gdbpy_invoke_xmethod): Remove.
15117         * python/python.c (python_extension_ops): Remove obsolete
15118         callbacks.
15119
15120 2018-01-05  Pedro Alves  <palves@redhat.com>
15121
15122         PR gdb/18653
15123         * common/signals-state-save-restore.c
15124         (save_original_signals_state): New parameter 'quiet'.  Warn if we
15125         find a custom handler preinstalled, instead of internal erroring.
15126         But only warn if !quiet.
15127         * common/signals-state-save-restore.h
15128         (save_original_signals_state): New parameter 'quiet'.
15129         * main.c (captured_main_1): Move save_original_signals_state call
15130         after option handling, and pass QUIET.
15131
15132 2018-01-05  Pedro Alves  <palves@redhat.com>
15133
15134         * spu-tdep.c (spu_catch_start): Pass
15135         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
15136
15137 2018-01-05  Pedro Alves  <palves@redhat.com>
15138
15139         PR gdb/22670
15140         * ada-lang.c (literal_symbol_name_matcher): New function.
15141         (ada_get_symbol_name_matcher): Use it for
15142         symbol_name_match_type::SEARCH_NAME.
15143         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
15144         it down instead of assuming symbol_name_match_type::FULL.
15145         * block.h (block_lookup_symbol): New parameter 'match_type'.
15146         * c-valprint.c (print_unpacked_pointer): Use
15147         lookup_symbol_search_name instead of lookup_symbol.
15148         * compile/compile-object-load.c (get_out_value_type): Pass down
15149         symbol_name_match_type::SEARCH_NAME.
15150         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
15151         symbol_name_match_type::FULL.
15152         * cp-support.c (cp_get_symbol_name_matcher): Handle
15153         symbol_name_match_type::SEARCH_NAME.
15154         * infrun.c (insert_exception_resume_breakpoint): Use
15155         lookup_symbol_search_name.
15156         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
15157         * psymtab.c (maintenance_check_psymtabs): Use
15158         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
15159         * stack.c (print_frame_args): Use lookup_symbol_search_name and
15160         SYMBOL_SEARCH_NAME.
15161         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
15162         if symbol_name_match_type::SEARCH_NAME.
15163         (lookup_symbol_in_language): Pass down
15164         symbol_name_match_type::FULL.
15165         (lookup_symbol_search_name): New.
15166         (lookup_language_this): Pass down
15167         symbol_name_match_type::SEARCH_NAME.
15168         (lookup_symbol_aux, lookup_local_symbol): New parameter
15169         'match_type'.  Pass it down.
15170         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
15171         (lookup_symbol_search_name): New declaration.
15172         (lookup_symbol_in_block): New 'match_type' parameter.
15173
15174 2018-01-05  Pedro Alves  <palves@redhat.com>
15175
15176         PR gdb/22670
15177         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
15178         ada_lookup_symbol.
15179         (ada_lookup_symbol): Reimplement in terms of
15180         ada_lookup_symbol_list, bits factored out from
15181         ada_lookup_encoded_symbol.
15182
15183 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15184
15185         * ada-exp.y (write_object_renaming): When subscripting an array
15186         using a symbol as the index, pass the block in call to
15187         ada_lookup_encoded_symbol when looking that symbol up.
15188
15189 2018-01-05  Jerome Guitton  <guitton@adacore.com>
15190
15191         * ada-lang.c (ada_array_length): Use ada_index_type instead of
15192         TYPE_INDEX_TYPE.
15193
15194 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15195
15196         * ada-lang.c (ada_to_fixed_value_create): Add handling of
15197         the case where VALUE_LVAL (val0) is not lval_memory.
15198
15199 2018-01-05  Xavier Roirand  <roirand@adacore.com>
15200
15201         * ada-valprint.c (print_optional_low_bound): Handle
15202         character-indexed array printing like boolean-indexed array
15203         printing.
15204
15205 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15206
15207         * NEWS: Create a new section for the next release branch.
15208         Rename the section of the current branch, now that it has
15209         been cut.
15210
15211 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
15212
15213         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
15214         * version.in: Bump version to 8.1.50.DATE-git.
15215
15216 2018-01-03  Xavier Roirand  <roirand@adacore.com>
15217
15218         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
15219         Add field.
15220         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
15221         Add field.
15222         (default_exception_support_info) <catch_handlers_sym>: Add field.
15223         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
15224         (ada_exception_name_addr_1): Add "catch handlers" handling.
15225         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
15226         Update all callers.
15227         (create_excep_cond_exprs) <ex>: Add parameter.
15228         (re_set_exception): Update create_excep_cond_exprs call.
15229         (print_it_exception, print_one_exception, print_mention_exception)
15230         (print_recreate_exception): Add "catch handler" handling.
15231         (allocate_location_catch_handlers, re_set_catch_handlers)
15232         (check_status_catch_handlers, print_it_catch_handlers)
15233         (print_one_catch_handlers, print_mention_catch_handlers)
15234         (print_recreate_catch_handlers): New function.
15235         (catch_handlers_breakpoint_ops): New variable.
15236         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
15237         Add parameter.  Add "catch handler" handling.
15238         (ada_exception_sym_name, ada_exception_breakpoint_ops):
15239         Add "catch handler" handling.
15240         (ada_exception_catchpoint_cond_string): Add "catch handler"
15241         handling.
15242         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
15243         call.
15244         (catch_ada_handlers_command): New function.
15245         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
15246         operations structure.
15247         (_initialize_ada_language): Add "catch handlers" command entry.
15248         * NEWS: Document "catch handlers" feature.
15249
15250 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15251
15252         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
15253         account when creating the array type of the slice.
15254         (ada_value_slice): Likewise.
15255
15256 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15257
15258         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
15259         New enum value.
15260         (create_array_type_with_stride): Add byte_stride_prop parameter.
15261         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
15262         New parameter.  Update all callers in this file.
15263         (array_type_has_dynamic_stride): New function.
15264         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
15265         of arrays with dynamic byte strides.
15266         * dwarf2read.c (read_array_type): Add support for dynamic
15267         DW_AT_byte_stride attributes.
15268
15269 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
15270
15271         * dwarf2read.c (read_unspecified_type): Treat
15272         DW_TAG_enumeration_type DIEs from Ada units as stubs.
15273
15274 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15275
15276         Update copyright year range in all GDB files.
15277
15278 2018-01-01, 18  Joel Brobecker  <brobecker@adacore.com>
15279
15280         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
15281         and gdb/testsuite/gdb.base/step-line.c.
15282
15283 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15284
15285         * copyright.py (main): Dump the contents of
15286         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
15287         even if BY_HAND is empty.
15288
15289 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15290
15291         * top.c (print_gdb_version): Update Copyright year in version
15292         message.
15293
15294 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
15295
15296         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
15297
15298 For older changes see ChangeLog-2017.
15299 \f
15300 Local Variables:
15301 mode: change-log
15302 left-margin: 8
15303 fill-column: 74
15304 version-control: never
15305 coding: utf-8
15306 End: